query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
sequencelengths
19
20
metadata
dict
Extracts file to the specified directory using any user defined parameters in UnzipParameters
public void extractFile(ZipModel zipModel, String outputPath, UnzipParameters unzipParameters, ProgressMonitor progressMonitor, boolean runInThread, char[] password) throws ZipException { extractFile(zipModel, outputPath, unzipParameters, null, progressMonitor, runInThread, password); }
[ "public void extractFile(ZipModel zipModel, String outputPath, UnzipParameters unzipParameters, String newFileName,\r\n ProgressMonitor progressMonitor, boolean runInThread, char[] password) throws ZipException {\r\n if (zipModel == null) {\r\n throw new ZipException(\"input zipModel is null\");\r\n }\r\n\r\n if (!Zip4jUtil.checkOutputFolder(outputPath)) {\r\n throw new ZipException(\"Invalid output path\");\r\n }\r\n\r\n if (this == null) {\r\n throw new ZipException(\"invalid file header\");\r\n }\r\n\r\n UnzipEngine unzipEngine = new UnzipEngine(zipModel, progressMonitor, password);\r\n unzipEngine.extractFile(this, outputPath, newFileName, runInThread, unzipParameters);\r\n }", "Unzip createUnzip();", "public static final void unzip(String zipfileName, String baseOutputDir) {\r\n Enumeration entries;\r\n ZipFile zipFile;\r\n try {\r\n zipFile = new ZipFile(zipfileName);\r\n entries = zipFile.entries();\r\n while (entries.hasMoreElements()) {\r\n ZipEntry entry = (ZipEntry) entries.nextElement();\r\n String entryName = entry.getName();\r\n String theName = baseOutputDir + '/' + entryName;\r\n if (entry.isDirectory()) {\r\n // Assume directories are stored parents first then children.\r\n System.out.println(\"Extracting directory: \" + entry.getName());\r\n // This is not robust, just for demonstration purposes.\r\n (new File(theName)).mkdirs();\r\n continue;\r\n }\r\n //(new File(theName)).mkdirs();\r\n forceParentDirectories(theName);\r\n System.out.println(\"Extracting file: \" + theName);\r\n copyInputStream(zipFile.getInputStream(entry), new BufferedOutputStream(new FileOutputStream(theName)));\r\n }\r\n zipFile.close();\r\n } catch (Exception ioe) {\r\n System.err.println(\"Unhandled exception:\");\r\n ioe.printStackTrace();\r\n return;\r\n }\r\n }", "public static void main(String[] args) throws IOException {\n String zipFilePath = \"C:\\\\Users\\\\Jacob\\\\Dropbox\\\\WardsWeb emails\\\\INBOX\\\\jacob@thewardsweb.com (1).zip\";\n// String destDirectory = \"C:\\\\Users\\\\Jacob\\\\Desktop\\\\Test\";\n String destDirectory = \"C:\\\\Users\\\\Jacob\\\\Dropbox\\\\WardsWeb emails\\\\INBOX\\\\Testing\";\n UnzipUtility unzipper = new UnzipUtility();\n try {\n unzipper.unzip(zipFilePath, destDirectory);\n// } catch (IOException ex) {\n } catch (Exception ex) {\n// throw new IOException(\"This is not working\");\n// throws Exception\n ex.printStackTrace();\n }\n }", "protected static File unpack(\r\n final File file,\r\n File location)\r\n throws IOException\r\n {\r\n final int ext = file.getAbsolutePath().lastIndexOf('.');\r\n if (ext<1)\r\n {\r\n throw new IOException(\"File has no extension: \" + file.getAbsolutePath());\r\n }\r\n \r\n if (location==null || !location.exists())\r\n {\r\n location = new File(file.getParent() + \"/\" + StringUtils.remove(file.getName(), '.') + \"/\");\r\n }\r\n if (!location.getAbsolutePath().endsWith(\"/\") && !location.getAbsolutePath().endsWith(\"\\\\\"))\r\n {\r\n location = new File(location.getAbsolutePath() + \"/\");\r\n }\r\n if (!location.exists())\r\n {\r\n // Create the directory\r\n FileUtils.forceMkdir(location);\r\n }\r\n //final String archiveExt = file.getAbsolutePath().substring(ext+1);\r\n //final String archiveExt = FileUtils.getExtension(file.getAbsolutePath()).toLowerCase();\r\n try\r\n {\r\n /*ZipFile zipFile = new ZipFile(file);\r\n for (File fileEntry : zipFile.entries())\r\n final UnArchiver unArchiver = GlobalPatternFileReplace.archiverManager.getUnArchiver(archiveExt);\r\n unArchiver.setSourceFile(file);\r\n unArchiver.setDestDirectory(location);\r\n unArchiver.extract();\r\n }\r\n catch (Throwable throwable)\r\n {\r\n if (throwable instanceof IOException || throwable instanceof ArchiverException)\r\n {\r\n throw new IOException(\"Error unpacking file: \" + file + \"to: \" + location, throwable);\r\n //}\r\n }*/\r\n byte[] buf = new byte[1024];\r\n ZipInputStream zipinputstream = null;\r\n ZipEntry zipentry;\r\n zipinputstream = new ZipInputStream(new FileInputStream(file));\r\n \r\n zipentry = zipinputstream.getNextEntry();\r\n while (zipentry != null) \r\n { \r\n //for each entry to be extracted\r\n String entryName = zipentry.getName();\r\n //System.out.println(\"entryname \"+entryName);\r\n FileOutputStream fileoutputstream;\r\n File newFile = new File(entryName);\r\n String directory = newFile.getParent();\r\n \r\n if(directory == null)\r\n {\r\n if(newFile.isDirectory())\r\n break;\r\n }\r\n \r\n File output = new File(location.getAbsolutePath(), entryName);\r\n fileoutputstream = new FileOutputStream(output); \r\n \r\n int n;\r\n while ((n = zipinputstream.read(buf, 0, 1024)) > -1)\r\n fileoutputstream.write(buf, 0, n);\r\n \r\n fileoutputstream.close(); \r\n zipinputstream.closeEntry();\r\n zipentry = zipinputstream.getNextEntry();\r\n \r\n }//while\r\n \r\n zipinputstream.close();\r\n }\r\n catch (Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n return location;\r\n }", "public void unzip(String zipFilePath, String destDirectory) throws IOException {\n File destDir = new File(destDirectory);\n if (!destDir.exists()) {\n destDir.mkdir();\n }\n ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath));\n ZipEntry entry = zipIn.getNextEntry();\n // iterates over entries in the zip file\n while (entry != null) {\n String filePath = destDirectory + \"\\\\\" + entry.getName();\n if (!entry.isDirectory()) {\n // if the entry is a file, extracts it\n extractFile(zipIn, filePath);\n } else {\n // if the entry is a directory, make the directory\n File dir = new File(filePath);\n dir.mkdir();\n }\n zipIn.closeEntry();\n entry = zipIn.getNextEntry();\n }\n zipIn.close();\n }", "public static void extractFile(String zipFilePath, String inZipFilePath, String destDirectory) throws IOException {\n ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath));\n ZipEntry entry = zipIn.getNextEntry();\n // iterates over entries in the zip file\n while (entry != null) {\n if (!entry.isDirectory() && inZipFilePath.equals(entry.getName())) {\n String filePath = entry.getName();\n int separatorIndex = filePath.lastIndexOf(File.separator);\n if (separatorIndex > -1)\n filePath = filePath.substring(separatorIndex + 1, filePath.length());\n filePath = destDirectory + File.separator + filePath;\n extractFile(zipIn, filePath);\n break;\n }\n zipIn.closeEntry();\n entry = zipIn.getNextEntry();\n }\n zipIn.close();\n }", "public void unarchive(String baseDir) throws MojoExecutionException {\n try (FileInputStream fis = new FileInputStream(archive);\n ZipArchiveInputStream zipIn = new ZipArchiveInputStream(fis)) {\n ZipArchiveEntry zipEnry = zipIn.getNextZipEntry();\n while (zipEnry != null) {\n // Create a file for this tarEntry\n final File destPath = new File(baseDir + File.separator + zipEnry.getName());\n if (zipEnry.isDirectory()) {\n destPath.mkdirs();\n }\n else {\n destPath.createNewFile();\n try (BufferedOutputStream bout = new BufferedOutputStream(new FileOutputStream(destPath))) {\n IOUtils.copy(zipIn, bout);\n }\n }\n zipEnry = zipIn.getNextZipEntry();\n }\n }\n catch (IOException ex) {\n throw new MojoExecutionException(\"Could not extract archive: \" + archive.getAbsolutePath(), ex);\n }\n\n // delete archive after extraction\n archive.delete();\n }", "public void extractAll() {\n ZipUtil.unpack(new File(zipFile.toString()), new File(zipFile.getParent().toString()));\n }", "public static void unzip(String zipFilePath, String destDirectory) throws IOException {\n File destDir = new File(destDirectory);\n if (!destDir.exists()) {\n destDir.mkdir();\n }\n ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath));\n ZipEntry entry = zipIn.getNextEntry();\n // iterates over entries in the zip file\n while (entry != null) {\n String filePath = destDirectory + File.separator + entry.getName();\n if (!entry.isDirectory()) {\n // if the entry is a file, extracts it\n extractFile(zipIn, filePath);\n } else {\n // if the entry is a directory, make the directory\n File dir = new File(filePath);\n dir.mkdir();\n }\n zipIn.closeEntry();\n entry = zipIn.getNextEntry();\n }\n zipIn.close();\n }", "@Override\r\n public void extractArchive(ArchiveExtractor decompressor) throws ArcException {\r\n\r\n\tString fileName = ManipString.substringAfterFirst(this.idSource, \"_\");\r\n\r\n\tboolean uncompressInProgress=false;\r\n\tFile dir = new File(this.archiveChargement + \".dir\");\r\n\tif (!dir.exists()) {\r\n\t\ttry {\r\n\t\t if (dir.mkdir())\r\n\t\t {\r\n\t\t \tStaticLoggerDispatcher.debug(LOGGER,\"$$\"+Thread.currentThread().getId()+\" is decompressing \"+dir.getAbsolutePath());\r\n\t\t \tdecompressor.extract(this.archiveChargement);\r\n\t\t \tuncompressInProgress=true;\r\n\t\t }\r\n\t\t}\r\n\t\t catch (Exception ex)\r\n\t\t{\r\n\t\t\t throw new ArcException(ex, ArcExceptionMessage.FILE_EXTRACT_FAILED, this.archiveChargement).logFullException();\r\n\t\t}\r\n\t}\r\n\t\r\n\tif (!uncompressInProgress) {\r\n\t\t\t// check if file exists\r\n\t File toRead = new File(dir + File.separator + ManipString.redoEntryName(fileName));\r\n\t while (!toRead.exists()) {\r\n\t \ttry {\r\n\t\t\t\tThread.sleep(MILLISECOND_UNCOMPRESSION_CHECK_INTERVAL);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\tThread.currentThread().interrupt();\r\n\t\t\t StaticLoggerDispatcher.error(LOGGER, \"Error in thread sleep extractArchive()\");\r\n\t\t\t}\r\n\t \ttoRead = new File(dir + File.separator + ManipString.redoEntryName(fileName));\r\n\t }\r\n\t}\r\n\r\n\r\n\t\r\n }", "public void unZip(String zipFile) throws ZipException, IOException {\n System.out.println(zipFile);\n int BUFFER = 2048;\n File file = new File(zipFile);\n\n ZipFile zip = new ZipFile(file);\n //String newPath = zipFile.substring(0, zipFile.length() - 4);\n\n //String newPath = Environment.getExternalStorageDirectory() + \"/Android/Data/\" + context.getPackageName() + \"/Recieved\";\n\n new File(receivedMainPath).mkdir();\n Enumeration zipFileEntries = zip.entries();\n\n // Process each entry\n while (zipFileEntries.hasMoreElements()) {\n // grab a zip file entry\n ZipEntry entry = (ZipEntry) zipFileEntries.nextElement();\n String currentEntry = entry.getName();\n File destFile = new File(receivedMainPath, currentEntry);\n //destFile = new File(newPath, destFile.getName());\n File destinationParent = destFile.getParentFile();\n\n // create the parent directory structure if needed\n destinationParent.mkdirs();\n\n if (!entry.isDirectory()) {\n BufferedInputStream is = new BufferedInputStream(zip.getInputStream(entry));\n int currentByte;\n // establish buffer for writing file\n byte data[] = new byte[BUFFER];\n\n // write the current file to disk\n FileOutputStream fos = new FileOutputStream(destFile);\n BufferedOutputStream dest = new BufferedOutputStream(fos, BUFFER);\n\n // read and write until last byte is encountered\n while ((currentByte = is.read(data, 0, BUFFER)) != -1) {\n dest.write(data, 0, currentByte);\n }\n dest.flush();\n dest.close();\n is.close();\n }\n\n if (currentEntry.endsWith(\".map\")) {\n // found a zip file, try to open\n unZip(destFile.getAbsolutePath());\n }\n }\n }", "public void unZip(String apkFile) throws Exception \r\n\t{\r\n\t\tLog.p(tag, apkFile);\r\n\t\tFile file = new File(apkFile);\r\n\t\r\n\t\t/*\r\n\t\t * Create the Base Directory, whose name should be same as Zip file name.\r\n\t\t * All decompressed contents will be placed under this folder.\r\n\t\t */\r\n\t\tString apkFileName = file.getName();\r\n\t\t\r\n\t\tif(apkFileName.indexOf('.') != -1)\r\n\t\t\tapkFileName = apkFileName.substring(0, apkFileName.indexOf('.'));\r\n\t\t\r\n\t\tLog.d(tag, \"Folder name: \"+ apkFileName);\r\n\t\t\r\n\t\tFile extractFolder = new File((file.getParent() == null ? \"\" : file.getParent() + File.separator) + apkFileName);\r\n\t\tif(!extractFolder.exists())\r\n\t\t\textractFolder.mkdir();\r\n\t\t\r\n\t\t/*\r\n\t\t * Read zip entries.\r\n\t\t */\r\n\t\tFileInputStream fin = new FileInputStream(apkFile);\r\n\t\tZipInputStream zin = new ZipInputStream(new BufferedInputStream(fin));\r\n\t\t\r\n\t\t/*\r\n\t\t * Zip InputStream shifts its index to every Zip entry when getNextEntry() is called.\r\n\t\t * If this method returns null, Zip InputStream reaches EOF.\r\n\t\t */\r\n\t\tZipEntry ze = null;\r\n\t\tBufferedOutputStream dest;\r\n\t\t\r\n\t\twhile((ze = zin.getNextEntry()) != null)\r\n\t\t{\r\n\t\t\tLog.d(tag, \"Zip entry: \" + ze.getName() + \" Size: \"+ ze.getSize());\r\n\t\t\t/*\r\n\t\t\t * Create decompressed file for each Zip entry. A Zip entry can be a file or directory.\r\n\t\t\t * ASSUMPTION: APK Zip entry uses Unix style File seperator- \"/\"\r\n\t\t\t * \r\n\t\t\t * 1. Create the prefix Zip Entry folder, if it is not yet available\r\n\t\t\t * 2. Create the individual Zip Entry file.\r\n\t\t\t */\r\n\t\t\tString zeName = ze.getName();\r\n\t\t\tString zeFolder = zeName;\r\n\t\t\t\r\n\t\t\tif(ze.isDirectory())\r\n\t\t\t{\r\n\t\t\t\tzeName = null; // Don't create Zip Entry file\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tif(zeName.indexOf(\"/\") == -1) // Zip entry uses \"/\"\r\n\t\t\t\t\tzeFolder = null; // It is File. don't create Zip entry Folder\r\n\t\t\t\telse {\r\n\t\t\t\t\tzeFolder = zeName.substring(0, zeName.lastIndexOf(\"/\"));\r\n\t\t\t\t\tzeName = zeName.substring( zeName.lastIndexOf(\"/\") + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tLog.d(tag, \"zeFolder: \"+ zeFolder +\" zeName: \"+ zeName);\r\n\t\t\t\r\n\t\t\t// Create Zip Entry Folder\r\n\t\t\tFile zeFile = extractFolder;\r\n\t\t\tif(zeFolder != null)\r\n\t\t\t{\r\n\t\t\t\tzeFile = new File(extractFolder.getPath() + File.separator + zeFolder);\r\n\t\t\t\tif(!zeFile.exists())\r\n\t\t\t\t\tzeFile.mkdirs();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Create Zip Entry File\r\n\t\t\tif(zeName == null)\r\n\t\t\t\tcontinue;\r\n\t\t\t\r\n\t\t\t// Keep track of XML files, they are in Android Binary XML format\r\n\t\t\tif(zeName.endsWith(\".xml\"))\r\n\t\t\t\txmlFiles.add(zeFile.getPath() + File.separator + zeName);\r\n\t\t\t\r\n\t\t\t// Keep track of the Dex/ODex file. Need to convert to Jar\r\n\t\t\tif(zeName.endsWith(\".dex\") || zeName.endsWith(\".odex\"))\r\n\t\t\t\tdexFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Keep track of Resources.arsc file- resources.arsc\r\n\t\t\tif(zeName.endsWith(\".arsc\"))\r\n\t\t\t\tresFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Write Zip entry File to the disk\r\n\t\t\tint count;\r\n\t\t\tbyte data[] = new byte[BUFFER];\r\n\t\t\t\r\n\t\t\tFileOutputStream fos = new FileOutputStream(zeFile.getPath() + File.separator + zeName);\r\n\t\t\tdest = new BufferedOutputStream(fos, BUFFER);\r\n\r\n\t\t\twhile ((count = zin.read(data, 0, BUFFER)) != -1) \r\n\t\t\t{\r\n\t\t\t\tdest.write(data, 0, count);\r\n\t\t\t}\r\n\t\t\tdest.flush();\r\n\t\t\tdest.close();\r\n\t\t}\r\n\r\n\t\t// Close Zip InputStream\r\n\t\tzin.close();\r\n\t\tfin.close();\r\n\t}", "public void toUnzip(String zipFile, String targetDir) {\n\n\t\tMessage message = new Message();\n\t\tmessage.what = SUCCESS;\n\n\t\tint SIZE = 4096; // buffer size: 4KB\n\t\tString strEntry; // each zip entry name\n\t\ttry {\n\t\t\tBufferedOutputStream dest = null; // buffer output stream\n\t\t\tFileInputStream fis = new FileInputStream(zipFile);\n\t\t\tZipInputStream zis = new ZipInputStream(\n\t\t\t\t\tnew BufferedInputStream(fis));\n\t\t\tZipEntry entry; // each zip entry\n\t\t\twhile ((entry = zis.getNextEntry()) != null) {\n\t\t\t\ttry {\n\t\t\t\t\tint count;\n\t\t\t\t\tbyte data[] = new byte[SIZE];\n\t\t\t\t\tstrEntry = entry.getName();\n\n\t\t\t\t\tFile entryFile = new File(targetDir + strEntry);\n\t\t\t\t\tFile entryDir = new File(entryFile.getParent());\n\t\t\t\t\tif (!entryDir.exists()) {\n\t\t\t\t\t\tentryDir.mkdirs();\n\t\t\t\t\t}\n\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(entryFile);\n\t\t\t\t\tdest = new BufferedOutputStream(fos, SIZE);\n\t\t\t\t\twhile ((count = zis.read(data, 0, SIZE)) != -1) {\n\t\t\t\t\t\tdest.write(data, 0, count);\n\n\t\t\t\t\t\tMessage msg = Message.obtain();\n\t\t\t\t\t\tmsg.what = PROGRESS;\n\t\t\t\t\t\tmsg.obj = count;\n\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t}\n\t\t\t\t\tdest.flush();\n\t\t\t\t\tdest.close();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tmessage.what = ERROR;\n\t\t\t\t\tmessage.obj = ex.getMessage();\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tzis.close();\n\t\t\tFile fileszipe = new File(zipFile);\n\t\t\tfileszipe.delete();\n\t\t} catch (Exception cwj) {\n\t\t\tmessage.what = ERROR;\n\t\t\tmessage.obj = cwj.getMessage();\n\t\t\tcwj.printStackTrace();\n\t\t}\n\t\thandler.sendMessage(message);\n\t}", "protected void getFile(ZipEntry e) throws IOException {\n String zipName = e.getName();\n switch (mode) {\n case EXTRACT:\n if (zipName.startsWith(\"/\")) {\n if (!warnedMkDir)\n System.out.println(\"Ignoring absolute paths\");\n warnedMkDir = true;\n zipName = zipName.substring(1);\n }\n // if a directory, just return. We mkdir for every file,\n // since some widely-used Zip creators don't put out\n // any directory entries, or put them in the wrong place.\n if (zipName.endsWith(\"/\")) {\n return;\n }\n // Else must be a file; open the file for output\n // Get the directory part.\n int ix = zipName.lastIndexOf('/');\n if (ix > 0) {\n //String dirName = zipName.substring(0, ix);\n String fileName = zipName.substring(ix + 1, zipName.length());\n zipName = fileName;\n\n }\n String targetFile = this.unzipFileTargetLocation;\n File file = new File(targetFile);\n if (!file.exists())\n file.createNewFile();\n FileOutputStream os = null;\n InputStream is = null;\n try {\n os = new FileOutputStream(targetFile);\n is = zippy.getInputStream(e);\n int n = 0;\n while ((n = is.read(b)) > 0)\n os.write(b, 0, n);\n\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n if (os != null) {\n try {\n os.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n }\n break;\n case LIST:\n // Not extracting, just list\n if (e.isDirectory()) {\n System.out.println(\"Directory \" + zipName);\n } else {\n System.out.println(\"File \" + zipName);\n }\n break;\n default:\n throw new IllegalStateException(\"mode value (\" + mode + \") bad\");\n }\n }", "private void unZipFile(){\n\t\tint size = 4096; // buffer 4kb\n\t\tString strEntry;\n\t\ttry{\n\t\t\tBufferedOutputStream dest = null; \n\t\t\tInputStream fis = instance.getResources().openRawResource(R.raw.cp);\n\t\t\tZipInputStream zis = new ZipInputStream(new BufferedInputStream(fis));\n\t\t\tZipEntry entry;\n\t\t\twhile ((entry = zis.getNextEntry()) != null) {\n\t\t\t\ttry {\n\t\t\t\t\tLog.i(\"Unzip: \",\"=\"+ entry);\n\t\t\t\t\tint count; \n\t\t\t\t\tbyte data[] = new byte[size];\n\t\t\t\t\tstrEntry = entry.getName();\n\n\t\t\t\t\tFile entryFile = new File(Globals.CurrentDirectoryPath + \"/\" + strEntry);\n\t\t\t\t\tFile entryDir = new File(entryFile.getParent());\n\t\t\t\t\tif (!entryDir.exists()) {\n\t\t\t\t\t\tentryDir.mkdirs();\n\t\t\t\t\t}\n\t\t\t\t\tif (!entryFile.exists()){\n\t\t\t\t\t\tFileOutputStream fos = new FileOutputStream(entryFile);\n\t\t\t\t\t\tdest = new BufferedOutputStream(fos, size);\n\t\t\t\t\t\twhile ((count = zis.read(data, 0, size)) != -1) {\n\t\t\t\t\t\t\tdest.write(data, 0, count);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdest.flush();\n\t\t\t\t\t\tdest.close();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tzis.close();\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void unzip(String file)\n {\n try\n {\n File fSourceZip = new File(file);\n String zipPath = file.substring(0, file.length()-4);\n ZipFile zipFile = new ZipFile(fSourceZip);\n Enumeration<? extends ZipEntry> e = zipFile.entries();\n while(e.hasMoreElements())\n {\n ZipEntry entry = (ZipEntry)e.nextElement();\n File destinationFilePath = new File(zipPath,entry.getName());\n destinationFilePath.getParentFile().mkdirs();\n if(entry.isDirectory())\n {\n continue;\n }\n else\n {\n BufferedInputStream bis = new BufferedInputStream(zipFile.getInputStream(entry));\n int b;\n byte buffer[] = new byte[BYTE_SIZE];\n FileOutputStream fos = new FileOutputStream(destinationFilePath);\n BufferedOutputStream bos = new BufferedOutputStream(fos, BYTE_SIZE);\n while((b = bis.read(buffer, 0, BYTE_SIZE)) != -1)\n {\n bos.write(buffer, 0, b);\n }\n bos.flush();\n bos.close();\n bis.close();\n String name = destinationFilePath.getName();\n if(name.endsWith(\".jar\") && pluginFile(name))\n {\n destinationFilePath.renameTo(new File(\"plugins/\" + updateFolder + \"/\" + name));\n }\n }\n entry = null;\n destinationFilePath = null;\n }\n e = null;\n zipFile.close();\n zipFile = null;\n // Move any plugin data folders that were included to the right place, Bukkit won't do this for us.\n for(File dFile : new File(zipPath).listFiles())\n {\n if(dFile.isDirectory())\n {\n if(pluginFile(dFile.getName()))\n {\n File oFile = new File(\"plugins/\" + dFile.getName()); // Get current dir\n File [] contents = oFile.listFiles(); // List of existing files in the current dir\n for(File cFile : dFile.listFiles()) // Loop through all the files in the new dir\n {\n boolean found = false;\n for(File xFile : contents) // Loop through contents to see if it exists\n {\n if(xFile.getName().equals(cFile.getName()))\n {\n found = true;\n break;\n }\n }\n if(!found)\n {\n // Move the new file into the current dir\n cFile.renameTo(new File(oFile.getCanonicalFile() + \"/\" + cFile.getName()));\n }\n else\n {\n // This file already exists, so we don't need it anymore.\n cFile.delete();\n }\n }\n }\n }\n dFile.delete();\n }\n new File(zipPath).delete();\n fSourceZip.delete();\n }\n catch(IOException ex)\n {\n ex.printStackTrace();\n plugin.getLogger().warning(\"The auto-updater tried to unzip a new update file, but was unsuccessful.\");\n result = Updater.UpdateResult.FAIL_DOWNLOAD;\n }\n new File(file).delete();\n }", "private Path extractFileFromArchive(String archiveName, String nameOfFileToExtract) {\n\n\t\tPath tempFile = null;\n\t\tbyte[] buffer = new byte[1024];\n ZipInputStream zis = null;\n\t\ttry {\n\t\t\tzis = new ZipInputStream(new FileInputStream(archiveName));\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n ZipEntry zipEntry;\n\t\ttry {\n\t\t\tzipEntry = zis.getNextEntry();\n\t\t\tPath tempDirectory = Files.createTempDirectory(TEMP_SUBFOLDER);\n\t\t\tTEMP_FILES.put(\"tempdir\", tempDirectory);\n\t\t\twhile (zipEntry != null) {\n\t\t\t\tString fileName = zipEntry.getName();\n\n\t\t\t\t// check if current zip entry is the wanted file to extract\n\t\t\t\tif (fileName.equals(nameOfFileToExtract)) {\n\t\t\t\t\t\n\t\t\t\t\t// extract the file\n\t\t\t\t\tString tempFileName = fileName.replaceAll(\"/\", \"_\");\n\t\t\t\t\tSystem.out.println(\"Creating temp file: \" + tempFileName);\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttempFile = Files.createTempFile(tempDirectory, null, tempFileName);\n\t\t\t\t\t} \n\t\t\t\t\tcatch (IllegalArgumentException iae) {\n\t\t\t\t\t\tSystem.err.println(\"Error creating temp file: \" + tempFileName);\n\t\t\t\t\t\tSystem.err.println(iae.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(tempFile.toFile());\n\t\t\t\t\tint len;\n\t\t\t\t\twhile ((len = zis.read(buffer)) > 0) {\n\t\t\t\t\t\tfos.write(buffer, 0, len);\n\t\t\t\t\t}\n\t\t\t\t\tfos.close();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tzipEntry = zis.getNextEntry();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tzis.closeEntry();\n\t\t\t\tzis.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// noop\n\t\t\t}\n\t\t}\n \n return tempFile;\n\t}", "void onUnzipCompleted(String output);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates and returns a QueryTranslator appropriate for the specified query parameter. Sets translator "query" and "adapter" property. This factory method allows subclasses to specify their own translators that implement vendorspecific optimizations.
public QueryTranslator getQueryTranslator(Query query) throws Exception;
[ "public RequestTranslator getQueryTranslator() {\n\t\treturn QUERY_TRANSLATOR;\n\t}", "void setQueryTranslation(java.lang.String queryTranslation);", "Query newQuery(String language, Object query);", "Query newQuery (String language, Object query);", "public CDOQuery createQuery(String language, String queryString);", "public QueryTranslatorImpl(\n \t String queryString,\n \t Map enabledFilters,\n \t SessionFactoryImplementor factory) {\n \t\tthis( queryString, queryString, enabledFilters, factory );\n \t}", "public QueryBuilder() {\n messageProvider = DynamicMessage.getProvider();\n }", "public Query createQuery(String query) throws OtmException;", "Query newQuery(String language, Class cls, Object query);", "protected Class queryTranslatorClass(Query q) {\n if (q == null) {\n throw new NullPointerException(\"Null query.\");\n }\n else if (q instanceof SelectQuery) {\n return SelectTranslator.class;\n }\n else if (q instanceof UpdateQuery) {\n return UpdateTranslator.class;\n }\n else if (q instanceof InsertQuery) {\n return InsertTranslator.class;\n }\n else if (q instanceof DeleteQuery) {\n return DeleteTranslator.class;\n }\n else if (q instanceof SqlSelectQuery) {\n return SqlSelectTranslator.class;\n }\n else if (q instanceof SqlModifyQuery) {\n return SqlModifyTranslator.class;\n }\n else if (q instanceof ProcedureQuery) {\n return ProcedureTranslator.class;\n }\n else {\n throw new CayenneRuntimeException(\n \"Unrecognized query class...\" + q.getClass().getName());\n }\n }", "Builder addTranslator(String value);", "public QualifierTranslator getQualifierTranslator(QueryAssembler queryAssembler) {\n return new QualifierTranslator(queryAssembler);\n }", "java.lang.String getQueryTranslation();", "Query newQuery (String query);", "public QueryProvider() {\r\n query = new PreparedStmt();\r\n }", "<T> Query<T> newNamedQuery (Class<T> cls, String queryName);", "public QueryParser(String query) {\n\t\tlexer = new QueryLexer(query);\n\t\tthis.query = new ArrayList<>();\n\t\tparseQuery();\n\t}", "public interface IQueryProcessor {\r\n\r\n\t/**\r\n\t * Method checks if the given string represented query is a valid query of\r\n\t * the processor-represented query language.\r\n\t * \r\n\t * @param query\r\n\t * the query as string literal\r\n\t * @return <code>true</code> if the query is valid in the context of the\r\n\t * processor-represented query language, <code>false</code>\r\n\t * otherwise.\r\n\t */\r\n\tpublic boolean isValid(final String query);\r\n\r\n\t/**\r\n\t * Method provides a query instance of the specific language.\r\n\t * \r\n\t * @param topicMap\r\n\t * the topic map\r\n\t * @param query\r\n\t * the query\r\n\t * @param optional\r\n\t * optional arguments\r\n\t * @return a data object representing the query of the specific language\r\n\t * @throws IllegalArgumentException\r\n\t * thrown if the given string cannot represent within the\r\n\t * current language\r\n\t */\r\n\tpublic IQuery getQuery(TopicMap topicMap, final String query, Object... optional);\r\n\r\n\t/**\r\n\t * Method transforms the given query to a TMQL query.\r\n\t * \r\n\t * @param topicMap\r\n\t * the topic map\r\n\t * @param query\r\n\t * the query\r\n\t * @return the corresponding TMQL query\r\n\t * @throws IllegalArgumentException\r\n\t * thrown if the given string cannot represent within the\r\n\t * current language\r\n\t * @throws UnsupportedOperationException\r\n\t * thrown if the transformation is not supported by the current\r\n\t * processor\r\n\t */\r\n\tpublic IQuery asTmqlQuery(TopicMap topicMap, final String query);\r\n\r\n\t/**\r\n\t * Return the name of the current query language.\r\n\t * \r\n\t * @return the language name\r\n\t */\r\n\tpublic String getLanguageName();\r\n\r\n}", "private QueryFactory()\n {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show notification in the bottom of activity as a "Snackbar"
public void showNotification(String notificationText) { View parentLayout = findViewById(android.R.id.content); Snackbar mySnackbar = Snackbar.make(parentLayout, notificationText, Snackbar.LENGTH_LONG); mySnackbar.show(); }
[ "@Override\n public void showNotification(String message) {\n View parentLayout = findViewById(android.R.id.content);\n Snackbar mySnackbar = Snackbar.make(parentLayout, message, Snackbar.LENGTH_LONG);\n mySnackbar.show();\n //TODO: Fab intersection avoidance\n }", "void showSnackbar() {}", "public void DisplaySnackBarAboveBar(String message, Boolean setAction) {\n int marginSide = 0;\n int marginBottom = 150;\n Snackbar snackbar = Snackbar.make(\n coordinatorLayout,\n message,\n Snackbar.LENGTH_LONG\n );\n\n if (setAction) {\n snackbar.setAction(\"Share Now\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent sendIntent = new Intent();\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, \"please visit https://www.noobsplanet.com\");\n sendIntent.setType(\"text/plain\");\n startActivity(Intent.createChooser(sendIntent, \"Send to \"));\n }\n });\n }\n\n View snackbarView = snackbar.getView();\n CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) snackbarView.getLayoutParams();\n params.setMargins(\n params.leftMargin + marginSide,\n params.topMargin,\n params.rightMargin + marginSide,\n params.bottomMargin + marginBottom + 100\n );\n\n snackbarView.setLayoutParams(params);\n snackbar.show();\n }", "private void showSnackbar() {\n\n Snackbar.make(findViewById(R.id.coordinatorLayout), R.string.messageMissingMultipleData, Snackbar.LENGTH_SHORT).show();\n\n }", "private void popupSnackbarForCompleteUpdate() {\n if (useDefaultSnackbar) {\n View rootView = activity.getWindow().getDecorView().findViewById(android.R.id.content);\n if (snackbar != null)\n snackbar.dismiss();\n\n snackbar = Snackbar.make(rootView,\n snackBarMessage,\n Snackbar.LENGTH_INDEFINITE);\n snackbar.setAction(snackBarAction, new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n // Triggers the completion of the update of the app for the flexible flow.\n appUpdateManager.completeUpdate();\n }\n });\n snackbar.show();\n }\n }", "private void showMySnackBar(String message) {\n\n Snackbar.make(mCordntrlyotMain, message, Snackbar.LENGTH_LONG).show();\n }", "private void showSnackBar(String message) {\n if (message != null) {\n Snackbar.make(coordinatorLayout, message, Snackbar.LENGTH_SHORT).show();\n }\n }", "public static void showToastAtBottom(Context context, final String message) {\r\n final Toast toast = Toast.makeText(context.getApplicationContext(), message, Toast.LENGTH_LONG);\r\n toast.setGravity(Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 0, 0);\r\n toast.show();\r\n }", "private void showSnackBar() {\n\n final Snackbar snackbar = Snackbar.make(mView.mRelativeLayout,\n getResources().getString(R.string.internet_connection), Snackbar.LENGTH_LONG);\n// showErrorText(getResources().getString(R.string.internet_connection));\n\n snackbar.setAction(\"RETRY\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n checkInternetParseData();\n }\n }).show();\n\n }", "protected void showTopSnackBar(String message, int bColor) {\n\n Snackbar snack = Snackbar.make(getWindow().getDecorView().findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG);\n View snackbarView = snack.getView();\n snackbarView.setBackgroundColor(bColor);\n// TextView textView = (TextView) snackbarView.findViewById(com.androidadvance.topsnackbar.R.id.snackbar_text);\n// textView.setTextColor(Color.WHITE);\n// textView.setGravity(Gravity.CENTER_HORIZONTAL);\n// FrameLayout.LayoutParams params =(FrameLayout.LayoutParams)snackbarView.getLayoutParams();\n// params.gravity = Gravity.TOP;\n// snackbarView.setLayoutParams(params);\n snack.show();\n }", "public static void displayToastBottom(String message, Activity activity) {\n Toast.makeText(activity, message, Toast.LENGTH_SHORT).show();\n }", "private void showSnackbarMessage(String message){\n if(view != null){\n Snackbar.make(view, message, Snackbar.LENGTH_SHORT).show();\n }\n }", "void showErrorSnackbar();", "public void showComingSoonMessage() {\n showToastMessage(\"Coming soon!\");\n }", "public void notificacionToast(String mensaje){\n Toast toast = Toast.makeText(getApplicationContext(),mensaje,Toast.LENGTH_LONG);\n toast.setGravity(Gravity.CENTER_HORIZONTAL, 0, 0);\n toast.show();\n }", "public void onBottom();", "public void customSnackBar(String message) {\n snackbar = Snackbar.make(getCurrentFocus(), message, Snackbar.LENGTH_LONG).setAction(\"✘\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n snackbar.dismiss();\n }\n }).setActionTextColor(Color.RED);\n View snackBarView = snackbar.getView();\n snackBarView.setBackgroundColor(Color.WHITE);\n TextView tv = (TextView) snackBarView.findViewById(android.support.design.R.id.snackbar_text);\n tv.setTextColor(Color.BLUE);\n tv.setGravity(Gravity.CENTER_HORIZONTAL);\n\n snackbar.show();\n }", "public static void showGreenSnackbar(String message, Activity activity, int snackbarDuration) {\n snackbar = Snackbar.make(activity.findViewById(android.R.id.content), message, snackbarDuration);\n View snackbarView = snackbar.getView();\n snackbarView.setBackgroundColor(Color.parseColor(GREEN));\n\n TextView snackbarText = snackbarView.findViewById(com.google.android.material.R.id.snackbar_text);\n snackbarText.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_vector_checkmark, 0, 0, 0);\n snackbarText.setCompoundDrawablePadding(ICON_PADDING_SNACKBAR);\n snackbarText.setGravity(Gravity.CENTER);\n\n FrameLayout.LayoutParams params = (FrameLayout.LayoutParams)snackbarView.getLayoutParams();\n params.width = FrameLayout.LayoutParams.MATCH_PARENT;\n snackbarView.setLayoutParams(params);\n\n snackbar.show();\n }", "public void showToast() {\n Toast toast = Toast.makeText(this, R.string.pushStart, Toast.LENGTH_SHORT);\n toast.setGravity(Gravity.CENTER | Gravity.TOP, 0, 50);\n toast.show();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get docs names by matrix
public List<String> getDocNameByMatrix(File[] files, int res[]){ List<String> list = new ArrayList<String>(); for (int i = 0; i < res.length; i++) { if(res[i] == 1) list.add(files[i].getName()); } return list; }
[ "public interface DocumentNameFinder {\n\n /**\n * Returns tokens span for the specified document of sentences and their tokens.\n * Span start and end indices are relative to the sentence they are in.\n * For example, a span identifying a name consisting of the first and second word\n * of the second sentence would be 0..2 and be referenced as spans[1][0].\n *\n * @param document An array of tokens for each sentence of a document.\n * @return The token spans for each sentence of the specified document.\n */\n Span[][] find(String[][] document);\n\n}", "public ArrayList<String> arrayIndexToDocumentNames( int arrayIndex ){\n\t\tArrayList<String> documentNames = new ArrayList<String>();\n\t\tMatrixIndices indices = toMatrixIndices.get(arrayIndex);\n\t\tint row = indices.row;\n\t\tint column = indices.column;\n\t\tString doc1 = documentList.get(row);\n\t\tString doc2 = documentList.get(column);\n\t\tdocumentNames.add(doc1);\n\t\tdocumentNames.add(doc2);\n\t\treturn documentNames;\n\t}", "java.lang.String getDocumentSchemaNames(int index);", "java.lang.String getDocumentImageArray(int i);", "java.lang.String getMatrix();", "public abstract String[][] getTopWords();", "public void listarDocDaDisciplina(){\r\n for(int i=0;i<docentes.size();i++){\r\n System.out.println(docentes.get(i).toString());\r\n }\r\n }", "public String[] getUserDocsTitle() {\n\t\t\tDocument[] docArr = theModel.getUserDocuments();\n\t\t\tString[] strArr = new String[docArr.length];\n\t\t\tfor(int i = 0; i < docArr.length; i++) {\n\t\t\t\tstrArr[i] = docArr[i].getTitle();\n\t\t\t}\n\t\t\treturn strArr;\n\t\t}", "public void createMatrixRepresentation(){\n\t\tint numberOfIndices = (int) (Math.pow(numberOfDocuments, 2) - \n\t\t\t\tnumberOfDocuments) / 2;\n\t\ttoMatrixIndices = new HashMap<Integer, MatrixIndices>();\n\t\tint row = 1;\n\t\tint column = 0; \n\t\tint counter = 0;\n\t\tfor( int i = 0; i < numberOfIndices; i++ ){\n\t\t\tif( counter == row ){\n\t\t\t\tcolumn = 0;\n\t\t\t\trow++;\n\t\t\t\tcounter = 0;\n\t\t\t}\n\t\t\tMatrixIndices m = new MatrixIndices( row, column );\n\t\t\ttoMatrixIndices.put(i, m);\n\t\t\tcolumn++;\n\t\t\tcounter++;\n\t\t}\n\t}", "public String getIndexName();", "public String [] getAnnotationList(String fieldName, int [] indices);", "public ClsNodeDocument[] GetDocuments (ClsNodeDocument[] searchDocs);", "public Vector getSampleAnnotationFieldNames();", "java.lang.String[] getDocumentImageArray();", "String[] getColumnNames();", "private List<MongoElement> arraysUnder (String documentName) {\n List<MongoElement> elements = new ArrayList<>();\n\n genElements.forEach(consumer -> {\n if (consumer.parent.equals(documentName))\n elements.add(consumer);\n });\n\n return elements;\n }", "java.lang.String getKeypointNames(int index);", "public List<String> makeOutputNames(int rows)\r\n\t{\r\n\t\tfinal int OutputCellCount = 4;\r\n\t\tfinal int RowSpacing = 2;\r\n\t\tint startRow = rows + RowSpacing;\r\n\t\tList<String> result = new ArrayList<String>();\r\n\t\tfor(int i=startRow; i < (startRow + OutputCellCount); i++)\r\n\t\t{\r\n\t\t\tString outputCellName = VariableNamePrefix + OverallFiguresColumn + (FirstRowNumber + i);\r\n\t\t\tresult.add(outputCellName);\r\n\t\t\toutputNames.add(outputCellName);\r\n\t\t}\t\r\n\t\toutputVarCount = result.size();\r\n\t\treturn result;\t\t\r\n\t}", "String getGlobalMasterDocuments(String rowFormat);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Change the frame's percentages of the main frame, and updates the size.
protected final void changeFramePercents(final double theXPerc, final double theYPerc) { myXPerc = theXPerc; myYPerc = theYPerc; updateSize(getSize()); }
[ "private void sizeFrame()\r\n\t{\r\n//\t\tmainBox.revalidate();\r\n//\t\tDimension pSize = mainBox.getPreferredSize();\r\n//\t\tsetSize((int) pSize.getWidth() + 75, (int) pSize.getHeight() + 50);\r\n//\t\trevalidate();\r\n//\t\trepaint();\r\n\t}", "@Override\n\tpublic void addNotify()\n\t{\n\t\tfinal Dimension size = getSize();\n\t\tsuper.addNotify();\n\t\tif (frameSizeAdjusted)\n\t\t\treturn;\n\t\tframeSizeAdjusted = true;\n\t\t// Adjust size of frame according to the insets\n\t\tfinal Insets insets = getInsets();\n\t\tsetSize(insets.left + insets.right + size.width, insets.top + insets.bottom + size.height);\n\t}", "public void setSizePlayingFields()\r\n {\n setPreferredSize(new Dimension(109*8,72*8));//powieżchnia o 2 m z każdej strony większa niz boisko 106 i 69 pomnożone o 8\r\n //większe boisko żeby było widać\r\n setMaximumSize(getMaximumSize());\r\n setBackground(Color.green);\r\n }", "protected void adjustSize() {\r\n fieldDim = mineField.getSquareLength() * mineField.getFieldLength();\r\n setSize( fieldDim + X_BORDER * 2, fieldDim + Y_BORDER * 3 );\r\n validate();\r\n }", "public void adjustSize() {\r\n /*\r\n * Calculate target width: max of header, adjusted window, content\r\n * \r\n * TODO: restrict to available desktop space\r\n */\r\n int targetWidth = TOTAL_BORDER_THICKNESS\r\n + MathUtils.maxInt(headerBar.getOffsetWidth(),\r\n contentWidget.getOffsetWidth(), getWidth()\r\n - TOTAL_BORDER_THICKNESS);\r\n /*\r\n * Calculate target height: max of adjusted window, content\r\n * \r\n * TODO: restrict to available desktop space\r\n */\r\n int targetHeight = TOTAL_BORDER_THICKNESS\r\n + MathUtils.maxInt(contentWidget.getOffsetHeight(), getHeight()\r\n - TOTAL_BORDER_THICKNESS - headerBar.getOffsetHeight());\r\n\r\n setPixelSize(targetWidth, targetHeight);\r\n }", "public void updateBounds() {\n\t\tswitch (this.species){\n\t\tcase HOGCHOKER:\n\t\tcase SILVERSIDE:\n\t\tcase FLOUNDER:\n\t\t\tthis.topYBound = frameHeight / 3 * 2;\n\t\t\tthis.bottomYBound = frameHeight - imageHeight - frameBarSize;\n\t\t\tbreak;\n\t\tcase PERCH: \n\t\tcase MINNOW: \n\t\tcase WEAKFISH:\n\t\t\tthis.topYBound = frameHeight / 3;\n\t\t\tthis.bottomYBound = frameHeight / 3 * 2 - imageHeight;\n\t\t\tbreak;\n\n\t\tcase MENHADEN:\n\t\tcase MUMMICHOG:\n\t\t\tthis.topYBound = 0;\n\t\t\tthis.bottomYBound = frameHeight / 3 - imageHeight;\n\t\t\tbreak;\n\t\tcase GOLD:\n\t\tdefault:\n\t\t\ttopYBound = 0;\n\t\t\tbottomYBound = frameHeight;\n\t\t}\n\t}", "private void updateMiniFrame() {\r\n Rectangle viewRect = displayScrollPane.getViewport().getViewRect();\r\n Dimension fullSize = displayScrollPane.getViewport().getView().getSize();\r\n // express location and view frame as fractions out of 1.0;\r\n // e.g. width 0.3 means 30% of the total width is visible;\r\n // and an X coordinate of 0.1 means the left edge is at 10%\r\n final double normX = (double)viewRect.getX() / fullSize.getWidth();\r\n final double normY = (double)viewRect.getY() / fullSize.getHeight();\r\n final double normW = (double)viewRect.getWidth() / fullSize.getWidth();\r\n final double normH = (double)viewRect.getHeight() / fullSize.getHeight();\r\n miniFrame.setNormalizedViewRect(normX, normY, normW, normH);\r\n // it is not always necessary to show the frame; if the\r\n // view frame shows everything, hide the mini-frame\r\n if ((normW >= 1) && (normH >= 1)) {\r\n miniFrame.setVisible(false);\r\n } else {\r\n addOrReuseComponent(miniFrame, javax.swing.JLayeredPane.PALETTE_LAYER);\r\n // new frame will already float due to layering; do not want\r\n // to change active state of display frame\r\n //bringToFront(miniFrame);\r\n }\r\n }", "public void setFramesSize(float width, float height) {\n for (Frame frame : frames) {\n frame.setFrameSize(width, height);\n }\n }", "@Override\r\n\tprotected void updateSize()\r\n\t{\r\n\t\tif(_height < _watching.size*LINE_HEIGHT + 17)\r\n\t\t\t_height = _watching.size*LINE_HEIGHT + 17;\r\n\r\n\t\tsuper.updateSize();\r\n\r\n\t\t//_values.x = _width/2 + 2;\r\n\r\n\t\tint i = 0;\r\n\t\tint l = _watching.size;\r\n\t\twhile(i < l)\r\n\t\t\t_watching.get(i++).updateWidth(_width/2,_width/2-10);\r\n\t}", "public void updateFrame() {\r\n child.getLocalVisibleRect(frame);\r\n }", "private void updateSize() {\n double width = pane.getWidth();\n double height = pane.getHeight();\n\n if(oldWidth == 0) {\n oldWidth = width;\n }\n if(oldHeight == 0) {\n oldHeight = height;\n }\n\n double oldHvalue = pane.getHvalue();\n double oldVvalue = pane.getVvalue();\n if(Double.isNaN(oldVvalue)) {\n oldVvalue = 0;\n }\n if(Double.isNaN(oldHvalue)) {\n oldHvalue = 0;\n }\n\n pane.setVmax(height);\n pane.setHmax(width);\n\n if(grow) {\n renderMapGrow(width, height, curZoom);\n } else {\n renderMap(width, height, curZoom);\n }\n\n pane.setVvalue((height/oldHeight)*oldVvalue);\n pane.setHvalue((width/oldWidth)*oldHvalue);\n\n oldWidth = width;\n oldHeight = height;\n }", "public void update() {\n remHpWidth = healthbarWidth * ent.getCurrentHealth() / ent.getMaxHealth();\n lostHpWidth = healthbarWidth - remHpWidth;\n }", "private void configureFrame() {\n //add resize listener\n addComponentListener(new ComponentResizeListener());\n \n //visibility\n setVisible(true);\n setPreferredSize(new Dimension(FRAME_WIDTH, FRAME_HEIGHT));\n setMinimumSize(new Dimension(FRAME_MIN_WIDTH, FRAME_MIN_HEIGHT));\n pack();\n }", "protected void doResize() {\r\n\t\tif (renderer.surface == null) {\r\n\t\t\tdoNew();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tNewResizeDialog dlg = new NewResizeDialog(labels, false);\r\n\t\tdlg.widthText.setText(\"\" + renderer.surface.width);\r\n\t\tdlg.heightText.setText(\"\" + renderer.surface.height);\r\n\t\tdlg.setLocationRelativeTo(this);\r\n\t\tdlg.setVisible(true);\r\n\t\tif (dlg.success) {\r\n\t\t\trenderer.surface.width = dlg.width;\r\n\t\t\trenderer.surface.height = dlg.height;\r\n\t\t\trenderer.surface.computeRenderingLocations();\r\n\t\t}\r\n\t}", "public void changeSize()\n {\n //if mouse is on the play button, make it bigger\n if(Greenfoot.mouseMoved(this))\n setImage(\"play button bigger.png\");\n //if mouse is on the background, return play button to regular size\n else if(Greenfoot.mouseMoved(getWorld()))\n setImage(\"play button.png\");\n }", "public void setFrameSize();", "protected void newSize() {\r\n adjustSize();\r\n halt();\r\n newGame();\r\n }", "public void resize_image(){\n\t\tif(imgw > frameWidth){\n\t\t\timageRatio = (float)frameWidth / imgw;\n\t\t\timgw = frameWidth-20; \n\t\t\timgh = (int) (imgh * imageRatio);\t\t\t\n\t\t}\n\t\t\n\t\tif(imgh > frameHeight){\n\t\t\timageRatio = (float)frameHeight / imgh;\n\t\t\timgh = frameHeight-100; \n\t\t\timgw = (int) (imgw * imageRatio);\t\n\t\t}\n\t\trepaint();\n\t}", "private void setGuiSizeToWorldSize() {\n worldPanel.setPreferredSize(new Dimension(worldPanel.getWorld()\n .getWidth(), worldPanel.getWorld().getHeight()));\n worldPanel.setSize(new Dimension(worldPanel.getWorld().getWidth(),\n worldPanel.getWorld().getHeight()));\n this.getParentFrame().pack();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR start "delColumnFamily" /home/kane/apachecassandra0.7.4src/src/java/org/apache/cassandra/cli/Cli.g:312:1: delColumnFamily : DROP COLUMN FAMILY columnFamily > ^( NODE_DEL_COLUMN_FAMILY columnFamily ) ;
public final CliParser.delColumnFamily_return delColumnFamily() throws RecognitionException { CliParser.delColumnFamily_return retval = new CliParser.delColumnFamily_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token DROP157=null; Token COLUMN158=null; Token FAMILY159=null; CliParser.columnFamily_return columnFamily160 = null; CommonTree DROP157_tree=null; CommonTree COLUMN158_tree=null; CommonTree FAMILY159_tree=null; RewriteRuleTokenStream stream_FAMILY=new RewriteRuleTokenStream(adaptor,"token FAMILY"); RewriteRuleTokenStream stream_DROP=new RewriteRuleTokenStream(adaptor,"token DROP"); RewriteRuleTokenStream stream_COLUMN=new RewriteRuleTokenStream(adaptor,"token COLUMN"); RewriteRuleSubtreeStream stream_columnFamily=new RewriteRuleSubtreeStream(adaptor,"rule columnFamily"); try { // /home/kane/apache-cassandra-0.7.4-src/src/java/org/apache/cassandra/cli/Cli.g:313:5: ( DROP COLUMN FAMILY columnFamily -> ^( NODE_DEL_COLUMN_FAMILY columnFamily ) ) // /home/kane/apache-cassandra-0.7.4-src/src/java/org/apache/cassandra/cli/Cli.g:313:7: DROP COLUMN FAMILY columnFamily { DROP157=(Token)match(input,DROP,FOLLOW_DROP_in_delColumnFamily2181); if (state.failed) return retval; if ( state.backtracking==0 ) stream_DROP.add(DROP157); COLUMN158=(Token)match(input,COLUMN,FOLLOW_COLUMN_in_delColumnFamily2183); if (state.failed) return retval; if ( state.backtracking==0 ) stream_COLUMN.add(COLUMN158); FAMILY159=(Token)match(input,FAMILY,FOLLOW_FAMILY_in_delColumnFamily2185); if (state.failed) return retval; if ( state.backtracking==0 ) stream_FAMILY.add(FAMILY159); pushFollow(FOLLOW_columnFamily_in_delColumnFamily2187); columnFamily160=columnFamily(); state._fsp--; if (state.failed) return retval; if ( state.backtracking==0 ) stream_columnFamily.add(columnFamily160.getTree()); // AST REWRITE // elements: columnFamily // token labels: // rule labels: retval // token list labels: // rule list labels: // wildcard labels: if ( state.backtracking==0 ) { retval.tree = root_0; RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null); root_0 = (CommonTree)adaptor.nil(); // 314:9: -> ^( NODE_DEL_COLUMN_FAMILY columnFamily ) { // /home/kane/apache-cassandra-0.7.4-src/src/java/org/apache/cassandra/cli/Cli.g:314:12: ^( NODE_DEL_COLUMN_FAMILY columnFamily ) { CommonTree root_1 = (CommonTree)adaptor.nil(); root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(NODE_DEL_COLUMN_FAMILY, "NODE_DEL_COLUMN_FAMILY"), root_1); adaptor.addChild(root_1, stream_columnFamily.nextTree()); adaptor.addChild(root_0, root_1); } } retval.tree = root_0;} } retval.stop = input.LT(-1); if ( state.backtracking==0 ) { retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { } return retval; }
[ "public final CliParser.delStatement_return delStatement() throws RecognitionException {\n CliParser.delStatement_return retval = new CliParser.delStatement_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token DEL124=null;\n CliParser.columnFamilyExpr_return columnFamilyExpr125 = null;\n\n\n CommonTree DEL124_tree=null;\n RewriteRuleTokenStream stream_DEL=new RewriteRuleTokenStream(adaptor,\"token DEL\");\n RewriteRuleSubtreeStream stream_columnFamilyExpr=new RewriteRuleSubtreeStream(adaptor,\"rule columnFamilyExpr\");\n try {\n // /home/kane/apache-cassandra-0.7.4-src/src/java/org/apache/cassandra/cli/Cli.g:257:5: ( DEL columnFamilyExpr -> ^( NODE_THRIFT_DEL columnFamilyExpr ) )\n // /home/kane/apache-cassandra-0.7.4-src/src/java/org/apache/cassandra/cli/Cli.g:257:7: DEL columnFamilyExpr\n {\n DEL124=(Token)match(input,DEL,FOLLOW_DEL_in_delStatement1743); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_DEL.add(DEL124);\n\n pushFollow(FOLLOW_columnFamilyExpr_in_delStatement1745);\n columnFamilyExpr125=columnFamilyExpr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_columnFamilyExpr.add(columnFamilyExpr125.getTree());\n\n\n // AST REWRITE\n // elements: columnFamilyExpr\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 258:9: -> ^( NODE_THRIFT_DEL columnFamilyExpr )\n {\n // /home/kane/apache-cassandra-0.7.4-src/src/java/org/apache/cassandra/cli/Cli.g:258:12: ^( NODE_THRIFT_DEL columnFamilyExpr )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(NODE_THRIFT_DEL, \"NODE_THRIFT_DEL\"), root_1);\n\n adaptor.addChild(root_1, stream_columnFamilyExpr.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public final DropColumnFamilyStatement dropColumnFamilyStatement() throws RecognitionException {\n DropColumnFamilyStatement stmt = null;\n\n CFName cf = null;\n\n\n try {\n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:509:5: ( K_DROP K_COLUMNFAMILY cf= columnFamilyName )\n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:509:7: K_DROP K_COLUMNFAMILY cf= columnFamilyName\n {\n match(input,K_DROP,FOLLOW_K_DROP_in_dropColumnFamilyStatement2675); \n match(input,K_COLUMNFAMILY,FOLLOW_K_COLUMNFAMILY_in_dropColumnFamilyStatement2677); \n pushFollow(FOLLOW_columnFamilyName_in_dropColumnFamilyStatement2681);\n cf=columnFamilyName();\n\n state._fsp--;\n\n stmt = new DropColumnFamilyStatement(cf); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return stmt;\n }", "void deleteColumns(String columnFamily, String key, String... columns);", "public final CliParser.delKeyspace_return delKeyspace() throws RecognitionException {\n CliParser.delKeyspace_return retval = new CliParser.delKeyspace_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token DROP154=null;\n Token KEYSPACE155=null;\n CliParser.keyspace_return keyspace156 = null;\n\n\n CommonTree DROP154_tree=null;\n CommonTree KEYSPACE155_tree=null;\n RewriteRuleTokenStream stream_DROP=new RewriteRuleTokenStream(adaptor,\"token DROP\");\n RewriteRuleTokenStream stream_KEYSPACE=new RewriteRuleTokenStream(adaptor,\"token KEYSPACE\");\n RewriteRuleSubtreeStream stream_keyspace=new RewriteRuleSubtreeStream(adaptor,\"rule keyspace\");\n try {\n // /home/kane/apache-cassandra-0.7.4-src/src/java/org/apache/cassandra/cli/Cli.g:308:5: ( DROP KEYSPACE keyspace -> ^( NODE_DEL_KEYSPACE keyspace ) )\n // /home/kane/apache-cassandra-0.7.4-src/src/java/org/apache/cassandra/cli/Cli.g:308:7: DROP KEYSPACE keyspace\n {\n DROP154=(Token)match(input,DROP,FOLLOW_DROP_in_delKeyspace2143); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_DROP.add(DROP154);\n\n KEYSPACE155=(Token)match(input,KEYSPACE,FOLLOW_KEYSPACE_in_delKeyspace2145); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_KEYSPACE.add(KEYSPACE155);\n\n pushFollow(FOLLOW_keyspace_in_delKeyspace2147);\n keyspace156=keyspace();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_keyspace.add(keyspace156.getTree());\n\n\n // AST REWRITE\n // elements: keyspace\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 309:9: -> ^( NODE_DEL_KEYSPACE keyspace )\n {\n // /home/kane/apache-cassandra-0.7.4-src/src/java/org/apache/cassandra/cli/Cli.g:309:12: ^( NODE_DEL_KEYSPACE keyspace )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(NODE_DEL_KEYSPACE, \"NODE_DEL_KEYSPACE\"), root_1);\n\n adaptor.addChild(root_1, stream_keyspace.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public void deleteColumn()throws Exception{\n admin.deleteColumn(TableName.valueOf(\"t6\"), Bytes.toBytes(\"f1\"));\n\n }", "Header removeNode(int index) throws UnknownColumnException;", "ColumnFamily getColumnFamily();", "public void removeFamily(Family exFamily) {\n\n }", "public void deleteColumn(Column column) {\n\t\t// Start of user code for method deleteColumn\n\t\t// End of user code\n\t}", "public final DeleteStatement deleteStatement() throws RecognitionException {\n DeleteStatement expr = null;\n\n List<Operation.RawDeletion> dels = null;\n\n CFName cf = null;\n\n List<Relation> wclause = null;\n\n\n\n Attributes attrs = new Attributes();\n List<Operation.RawDeletion> columnDeletions = Collections.emptyList();\n \n try {\n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:340:5: ( K_DELETE (dels= deleteSelection )? K_FROM cf= columnFamilyName ( usingClauseDelete[attrs] )? K_WHERE wclause= whereClause )\n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:340:7: K_DELETE (dels= deleteSelection )? K_FROM cf= columnFamilyName ( usingClauseDelete[attrs] )? K_WHERE wclause= whereClause\n {\n match(input,K_DELETE,FOLLOW_K_DELETE_in_deleteStatement1526); \n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:340:16: (dels= deleteSelection )?\n int alt27=2;\n int LA27_0 = input.LA(1);\n\n if ( (LA27_0==K_COUNT||(LA27_0>=K_FILTERING && LA27_0<=K_TTL)||LA27_0==K_VALUES||LA27_0==K_TIMESTAMP||LA27_0==K_COUNTER||(LA27_0>=K_KEY && LA27_0<=K_CLUSTERING)||LA27_0==IDENT||LA27_0==K_TYPE||LA27_0==K_LIST||(LA27_0>=K_ALL && LA27_0<=K_PASSWORD)||LA27_0==QUOTED_NAME||(LA27_0>=K_ASCII && LA27_0<=K_MAP)) ) {\n alt27=1;\n }\n switch (alt27) {\n case 1 :\n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:340:18: dels= deleteSelection\n {\n pushFollow(FOLLOW_deleteSelection_in_deleteStatement1532);\n dels=deleteSelection();\n\n state._fsp--;\n\n columnDeletions = dels; \n\n }\n break;\n\n }\n\n match(input,K_FROM,FOLLOW_K_FROM_in_deleteStatement1545); \n pushFollow(FOLLOW_columnFamilyName_in_deleteStatement1549);\n cf=columnFamilyName();\n\n state._fsp--;\n\n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:342:7: ( usingClauseDelete[attrs] )?\n int alt28=2;\n int LA28_0 = input.LA(1);\n\n if ( (LA28_0==K_USING) ) {\n alt28=1;\n }\n switch (alt28) {\n case 1 :\n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:342:9: usingClauseDelete[attrs]\n {\n pushFollow(FOLLOW_usingClauseDelete_in_deleteStatement1559);\n usingClauseDelete(attrs);\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n match(input,K_WHERE,FOLLOW_K_WHERE_in_deleteStatement1571); \n pushFollow(FOLLOW_whereClause_in_deleteStatement1575);\n wclause=whereClause();\n\n state._fsp--;\n\n\n return new DeleteStatement(cf, columnDeletions, wclause, attrs);\n \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return expr;\n }", "public final CliParser.addColumnFamily_return addColumnFamily() throws RecognitionException {\n CliParser.addColumnFamily_return retval = new CliParser.addColumnFamily_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token CREATE143=null;\n Token COLUMN144=null;\n Token FAMILY145=null;\n CliParser.keyValuePairExpr_return keyValuePairExpr146 = null;\n\n\n CommonTree CREATE143_tree=null;\n CommonTree COLUMN144_tree=null;\n CommonTree FAMILY145_tree=null;\n RewriteRuleTokenStream stream_FAMILY=new RewriteRuleTokenStream(adaptor,\"token FAMILY\");\n RewriteRuleTokenStream stream_CREATE=new RewriteRuleTokenStream(adaptor,\"token CREATE\");\n RewriteRuleTokenStream stream_COLUMN=new RewriteRuleTokenStream(adaptor,\"token COLUMN\");\n RewriteRuleSubtreeStream stream_keyValuePairExpr=new RewriteRuleSubtreeStream(adaptor,\"rule keyValuePairExpr\");\n try {\n // /home/kane/apache-cassandra-0.7.4-src/src/java/org/apache/cassandra/cli/Cli.g:293:5: ( CREATE COLUMN FAMILY keyValuePairExpr -> ^( NODE_ADD_COLUMN_FAMILY keyValuePairExpr ) )\n // /home/kane/apache-cassandra-0.7.4-src/src/java/org/apache/cassandra/cli/Cli.g:293:7: CREATE COLUMN FAMILY keyValuePairExpr\n {\n CREATE143=(Token)match(input,CREATE,FOLLOW_CREATE_in_addColumnFamily2027); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_CREATE.add(CREATE143);\n\n COLUMN144=(Token)match(input,COLUMN,FOLLOW_COLUMN_in_addColumnFamily2029); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_COLUMN.add(COLUMN144);\n\n FAMILY145=(Token)match(input,FAMILY,FOLLOW_FAMILY_in_addColumnFamily2031); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_FAMILY.add(FAMILY145);\n\n pushFollow(FOLLOW_keyValuePairExpr_in_addColumnFamily2033);\n keyValuePairExpr146=keyValuePairExpr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_keyValuePairExpr.add(keyValuePairExpr146.getTree());\n\n\n // AST REWRITE\n // elements: keyValuePairExpr\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 294:9: -> ^( NODE_ADD_COLUMN_FAMILY keyValuePairExpr )\n {\n // /home/kane/apache-cassandra-0.7.4-src/src/java/org/apache/cassandra/cli/Cli.g:294:12: ^( NODE_ADD_COLUMN_FAMILY keyValuePairExpr )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(NODE_ADD_COLUMN_FAMILY, \"NODE_ADD_COLUMN_FAMILY\"), root_1);\n\n adaptor.addChild(root_1, stream_keyValuePairExpr.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public void onDeleteColumn(DeleteColumnEvent event) {\n reset();\n }", "public final CliParser.columnFamily_return columnFamily() throws RecognitionException {\n CliParser.columnFamily_return retval = new CliParser.columnFamily_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token Identifier225=null;\n\n CommonTree Identifier225_tree=null;\n\n try {\n // /home/kane/apache-cassandra-0.7.4-src/src/java/org/apache/cassandra/cli/Cli.g:447:2: ( Identifier )\n // /home/kane/apache-cassandra-0.7.4-src/src/java/org/apache/cassandra/cli/Cli.g:447:4: Identifier\n {\n root_0 = (CommonTree)adaptor.nil();\n\n Identifier225=(Token)match(input,Identifier,FOLLOW_Identifier_in_columnFamily3050); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n Identifier225_tree = (CommonTree)adaptor.create(Identifier225);\n adaptor.addChild(root_0, Identifier225_tree);\n }\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "Column removeColumnAt(int index);", "public final CliParser.updateColumnFamily_return updateColumnFamily() throws RecognitionException {\n CliParser.updateColumnFamily_return retval = new CliParser.updateColumnFamily_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token UPDATE150=null;\n Token COLUMN151=null;\n Token FAMILY152=null;\n CliParser.keyValuePairExpr_return keyValuePairExpr153 = null;\n\n\n CommonTree UPDATE150_tree=null;\n CommonTree COLUMN151_tree=null;\n CommonTree FAMILY152_tree=null;\n RewriteRuleTokenStream stream_FAMILY=new RewriteRuleTokenStream(adaptor,\"token FAMILY\");\n RewriteRuleTokenStream stream_UPDATE=new RewriteRuleTokenStream(adaptor,\"token UPDATE\");\n RewriteRuleTokenStream stream_COLUMN=new RewriteRuleTokenStream(adaptor,\"token COLUMN\");\n RewriteRuleSubtreeStream stream_keyValuePairExpr=new RewriteRuleSubtreeStream(adaptor,\"rule keyValuePairExpr\");\n try {\n // /home/kane/apache-cassandra-0.7.4-src/src/java/org/apache/cassandra/cli/Cli.g:303:5: ( UPDATE COLUMN FAMILY keyValuePairExpr -> ^( NODE_UPDATE_COLUMN_FAMILY keyValuePairExpr ) )\n // /home/kane/apache-cassandra-0.7.4-src/src/java/org/apache/cassandra/cli/Cli.g:303:7: UPDATE COLUMN FAMILY keyValuePairExpr\n {\n UPDATE150=(Token)match(input,UPDATE,FOLLOW_UPDATE_in_updateColumnFamily2104); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_UPDATE.add(UPDATE150);\n\n COLUMN151=(Token)match(input,COLUMN,FOLLOW_COLUMN_in_updateColumnFamily2106); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_COLUMN.add(COLUMN151);\n\n FAMILY152=(Token)match(input,FAMILY,FOLLOW_FAMILY_in_updateColumnFamily2108); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_FAMILY.add(FAMILY152);\n\n pushFollow(FOLLOW_keyValuePairExpr_in_updateColumnFamily2110);\n keyValuePairExpr153=keyValuePairExpr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_keyValuePairExpr.add(keyValuePairExpr153.getTree());\n\n\n // AST REWRITE\n // elements: keyValuePairExpr\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 304:9: -> ^( NODE_UPDATE_COLUMN_FAMILY keyValuePairExpr )\n {\n // /home/kane/apache-cassandra-0.7.4-src/src/java/org/apache/cassandra/cli/Cli.g:304:12: ^( NODE_UPDATE_COLUMN_FAMILY keyValuePairExpr )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(NODE_UPDATE_COLUMN_FAMILY, \"NODE_UPDATE_COLUMN_FAMILY\"), root_1);\n\n adaptor.addChild(root_1, stream_keyValuePairExpr.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public void deleteColumn(String column) throws SQLException{\n \tint colNum = findColumn(column);\n \tif(_original != null){\n\t \tif(colNum > 0 && colNum <= _original.size()){\n\t \t\t_original.remove(colNum-1);\n\t \t}\n \t}\n \t\n \tif(_tempChanges != null){\n \t\tdeleteColumnFromHashmap(colNum, _tempChanges);\n \t}\n \t\n \tif(_modified != null){\n \t\tdeleteColumnFromHashmap(colNum, _modified);\n \t}\n }", "void deleteTableColumnsByIds(String tableColumnQuery)throws EazyBpmException;", "public final Operation.RawDeletion deleteOp() throws RecognitionException {\n Operation.RawDeletion op = null;\n\n ColumnIdentifier c = null;\n\n Term.Raw t = null;\n\n\n try {\n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:356:5: (c= cident | c= cident '[' t= term ']' )\n int alt30=2;\n alt30 = dfa30.predict(input);\n switch (alt30) {\n case 1 :\n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:356:7: c= cident\n {\n pushFollow(FOLLOW_cident_in_deleteOp1664);\n c=cident();\n\n state._fsp--;\n\n op = new Operation.ColumnDeletion(c); \n\n }\n break;\n case 2 :\n // /home/alex/workspace/cassandra-mv/src/java/org/apache/cassandra/cql3/Cql.g:357:7: c= cident '[' t= term ']'\n {\n pushFollow(FOLLOW_cident_in_deleteOp1691);\n c=cident();\n\n state._fsp--;\n\n match(input,131,FOLLOW_131_in_deleteOp1693); \n pushFollow(FOLLOW_term_in_deleteOp1697);\n t=term();\n\n state._fsp--;\n\n match(input,132,FOLLOW_132_in_deleteOp1699); \n op = new Operation.ElementDeletion(c, t); \n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return op;\n }", "void addDeleteFamilyBloomFilter(BloomFilterWriter bfw) throws IOException;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
service REST delete item from a specific shopping list
@DELETE @Path("{id}/{idItem}") @Produces(MediaType.APPLICATION_XML) @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public void deleteItemInShoppingList(@PathParam("id") Long id, @PathParam("idItem") Long idItem) throws WebApplicationException { boolean b = sls.deleteItemShoppingList(id, idItem); if (b == false) { throw new WebApplicationException(Response.Status.NOT_FOUND); } }
[ "@DELETE\n @Path(\"{id}\")\n @Produces(MediaType.APPLICATION_XML)\n public void deleteShoppingList(@PathParam(\"id\") Long id) throws WebApplicationException {\n boolean b = sls.deleteShoppingList(id);\n if (b == false) {\n throw new WebApplicationException(Response.Status.NOT_FOUND);\n }\n\n }", "public void deleteShoppingCartItem() {\n String value = FacesContext.getCurrentInstance().\n getExternalContext().getRequestParameterMap().get(\"menu_id\");\n int menu_id = Integer.parseInt(value);\n for (int i = 0; i < menulists.size(); i++) {\n if (menulists.get(i).menu_id == menu_id) {\n menulists.remove(i);\n break;\n }\n }\n }", "@DeleteMapping(\"/{userId}/{productId}\")\r\n\t\tprivate ResponseEntity<?> deleteWishlistedItem(@PathVariable(\"userId\") String userId,@PathVariable(\"productId\") String productId) \r\n\t\t{\r\n\t\twishlistService.delete(productId, userId);\r\n\t\treturn new ResponseEntity<>(HttpStatus.OK);\r\n\t\t}", "@GetMapping(\"/deleteItem\")\n\tpublic String deleteItem(HttpServletRequest servletRequest) {\n\t\t\n\t\ttoDoListService.deleteById(Long.parseLong(servletRequest.getParameter(\"itemId\"))); // Delete the to do list item record.\n\t\t\n\t\treturn \"redirect:/welcome\";\n\t}", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete ShoppingList : {}\", id);\n shoppingListRepository.deleteById(id);\n }", "void removeList(ShoppingList _ShoppingList);", "@RequestMapping(value = \"/item-lists/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteItemList(@PathVariable Long id) {\n log.debug(\"REST request to delete ItemList : {}\", id);\n itemListService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"itemList\", id.toString())).build();\n }", "void deleteCartItemDetails(int id);", "@DeleteMapping(\"/ordered-items/{id}\")\n @Timed\n public ResponseEntity<Void> deleteOrderedItem(@PathVariable String id) {\n log.debug(\"REST request to delete OrderedItem : {}\", id);\n orderedItemService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id)).build();\n }", "@DeleteMapping(\"/product/{productid}\") \nprivate void deleteProduct(@PathVariable(\"productid\") int productid) \n{ \nproductsService.delete(productid); \n}", "@Test\n\tpublic void testDeleteShop() throws Exception { \n\t\t\n\t\t//Building the Request body data\n\t\t // Map<String, Object> requestBody = new HashMap<String, Object>();\n\t\t HttpHeaders requestHeaders = new HttpHeaders();\n\t\t requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n\n\t\t //Creating http entity object with request body and headers\n\t\t HttpEntity<String> httpEntity =\n\t\t new HttpEntity<String>(\"\", requestHeaders);\n\t\t//Invoking the API\n\t\t @SuppressWarnings(\"unchecked\")\n\t\t Map<String, Object> apiResponse =\n\t\t\t\t new TestRestTemplate().postForObject(\"http://localhost:\" + this.port + \"/shops/shop?shopName=Apple Store&shopAddress= 1901 NW Expressway Street, Oklahoma City, OK 73118, United States&shopNumber=1&shopPostalCode=73118\", httpEntity, Map.class, Collections.EMPTY_MAP);\n\t\t String shopId = apiResponse.get(\"shopId\").toString();\n\t\t assertNotNull(shopId);\n\t\t apiResponse =\n\t\t\t\t\t new TestRestTemplate().postForObject(\"http://localhost:\" + this.port + \"/shops/shop?shopName=Apple Store&shopAddress=132 South Avenue, Bloomington, MN 55425, United States&shopNumber=3&shopPostalCode=55425\", httpEntity, Map.class, Collections.EMPTY_MAP);\n\t\t shopId = apiResponse.get(\"shopId\").toString();\n\t\t assertNotNull(shopId);\n\t\t new TestRestTemplate().delete(\"http://localhost:\" + this.port + \"/shops/shop?shopId=\"+shopId);\n\t\t\n\t\t ResponseEntity<Map> entity = new TestRestTemplate().getForEntity(\n\t\t\t\t\t\"http://localhost:\" + this.port + \"/shops/shop?shopId=\"+shopId, Map.class);\n\t\t\tassertEquals(HttpStatus.NOT_FOUND, entity.getStatusCode());\t \n\t\t\t\n\t}", "@DeleteMapping(\"/items/{id}\")\n public ResponseEntity<Void> deleteItems(@PathVariable Long id) {\n log.debug(\"REST request to delete Items : {}\", id);\n itemsRepository.deleteById(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "void deleteItem(IDAOSession session, int id);", "public void deleteProductFromHomeProductList(int productId);", "private void deleteShoppingList() {\n Logger.v(LOG_TAG, \"deleteShoppingList()\");\n if (listDetailsFragment == null) {\n Logger.e(LOG_TAG, \"List Details Fragment is null!\");\n return;\n }\n listDetailsFragment.hideViewList(true, new AnimationFinishedCallback() {\n @Override\n public void animationFinished() {\n listDetailsFragment.showViewLoading(true, null);\n }\n });\n\n ContentProviderAccess cpa = new ContentProviderAccess(getContentResolver());\n ShoppingList currentShoppingList = listDetailsFragment.getCurrentShoppingList();\n\n DeleteCallback<ShoppingList> callback = new DeleteCallback<ShoppingList>() {\n @Override\n public void onSuccess(ShoppingList object) {\n Intent returnIntent = new Intent();\n returnIntent.putExtra(RESULT_OPERATION, OPERATION_REMOVE);\n returnIntent.putExtra(RESULT_SHOPPING_LIST, listDetailsFragment.getCurrentShoppingList());\n setResult(RESULT_OK, returnIntent);\n finish();\n }\n\n @Override\n public void onFailure() {\n Snackbar.make(coordinatorCL, R.string.fragment_list_details_error_delete_shopping_list, Snackbar.LENGTH_LONG)\n .setAction(R.string.snackbar_action_retry, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n deleteShoppingList();\n }\n }).show();\n }\n };\n cpa.deleteShoppingList(currentShoppingList, callback);\n }", "@RequestMapping(\"/delete\")\n\tpublic String delete(HttpServletRequest request, Model model) {\n\t\tdao.delete(request.getParameter(\"bId\"));\n\t\treturn \"redirect:list\"; \n\t}", "@Delete\n Single<Integer> deleteItemFromCart(Cart carts);", "@RequestMapping(value = \"/delete\", method = RequestMethod.GET)\r\n\tpublic String deleteList(){\r\n\t\tClearList list = clearListRepository.findById(getActiveListId()).get();\r\n\t\tString listN = list.getListName();\r\n\t\tclearListRepository.deleteById(getActiveListId());\r\n\t\t\r\n\t\treturn String.format(\"The Clearlist %s has been deleted\",listN);\r\n\t}", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete ShippingList : {}\", id);\n shippingListRepository.deleteById(id);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets this classes BitSet mask to new mask.
public void setBitSetMask(BitSet mask) { newMask = mask; }
[ "public void setMask(BitSet newMask) {\r\n mask = newMask;\r\n entireImage = false;\r\n }", "void setMask(Mask newMask) throws MatrixException;", "public void setMask(BitSet imageMask) {\r\n mask = imageMask;\r\n }", "public BitSet getBitSetMask() {\r\n return newMask;\r\n }", "void setMask();", "void setNetworkMask(byte[] networkMask);", "public Mask(long mask ) {\r\n\t\tsuper();\r\n\t\tsetBools(mask);\r\n\t}", "public BitSet getMask() {\r\n return mask;\r\n }", "public void setDataMask(byte val)\n \t{\n \t\tdataMask = val;\n \t}", "public void setShortMask(short[] mask) {\r\n newShortMask = mask;\r\n }", "public void setTo(AttributeSet attrSet) {\r\n bits = (BitSet) attrSet.bits.clone();\r\n }", "public UnmodifiableBitSet setBit(int i){\n\t\tUnmodifiableBitSet nbs = (UnmodifiableBitSet)this.clone();\n\t\tnbs.setBitInn(i);\n\t\treturn nbs;\n\t}", "public void setMask(String mask){\r\n\t\tthis.mask = mask;\r\n\t}", "private void resetMask() {\n maskArray = new int [][]{\n {0,0,0,0},\n {0,0,0,0},\n {0,0,0,0},\n {0,0,0,0}\n };\n }", "public ImmutableBitSet(BitSet origBitSet) {\n if (origBitSet == null) {\n throw new NullPointerException(\"Can't provide a null BitSet\");\n }\n\n this.bitSet = new BitSet(origBitSet.length());\n\n for (int i = 0; i < origBitSet.length(); i++) {\n this.bitSet.set(i, origBitSet.get(i));\n }\n }", "void setApplyMask(boolean applyMask);", "public void setBools(long mask) {\r\n\t\tthis.clear();\r\n\t\tfor(int i = 0; i < 64; i++) {\r\n\t\t\tthis.add((mask & (1L << i)) != 0);\r\n\t\t}\r\n\t}", "static void setBitMaskedByte(ArrowBuf data, int byteIndex, byte bitMask) {\n byte currentByte = data.getByte(byteIndex);\n currentByte |= bitMask;\n data.setByte(byteIndex, currentByte);\n }", "public void setAll(boolean in){\n\t\t\tfor (int i=0 ; i<size ;i++) {\n\t\t\t\tmaskBit[i] = in;\n\t\t\t}\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate the Lens field ("theXxx" field).
public GenField generateTheLensField() { val choiceName = choiceCase.name; val choiceTypeName = sourceSpec.sourceType.simpleName(); val caseName = choiceCase.name; val packageName = sourceSpec.sourceType.packageName(); val encloseName = sourceSpec.sourceType.encloseName(); val generics = sourceSpec.generics.stream().map(generic -> generic.name).collect(Collectors.toList()); val targetType = new Type(packageName, choiceTypeName, caseName, generics.toArray(new String[0])); val lensType = targetType.lensType(packageName, encloseName, null).withGenerics(asList(new Generic(choiceName))); val defaultValue = String.format("new %1$s<>(%2$s.of(%3$s.class))", lensType.simpleName(), Core.LensSpec.simpleName(), choiceName); val theField = new GenField(PUBLIC, FINAL, STATIC, "the"+choiceName, lensType, defaultValue); return theField; }
[ "java.lang.String getField1307();", "java.lang.String getField1406();", "java.lang.String getField1730();", "java.lang.String getField1734();", "java.lang.String getField1020();", "java.lang.String getField1704();", "java.lang.String getField1464();", "java.lang.String getField1032();", "java.lang.String getField1740();", "java.lang.String getField1772();", "java.lang.String getField1834();", "java.lang.String getField1762();", "java.lang.String getField1264();", "java.lang.String getField1797();", "java.lang.String getField1836();", "java.lang.String getField1706();", "java.lang.String getField1415();", "java.lang.String getField1534();", "java.lang.String getField1718();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/RelativeLayout n = (RelativeLayout) rootView.findViewById(R.id.no_result); n.setVisibility(View.GONE);
public void clean(){ RelativeLayout r = (RelativeLayout) rootView.findViewById(R.id.no_result); r.removeAllViews(); }
[ "public void setPLPRecyclerNoResultView()\n {\n recyclerView.setVisibility(View.GONE);\n recyclerViewNoResult.setVisibility(View.VISIBLE);\n }", "private void hideErrorMessage() {\n RelativeLayout errRl;\n TextView errTextView = (TextView) findViewById(R.id.failmessage_text);\n if (errTextView != null) {\n errRl = (RelativeLayout) errTextView.getParent();\n errRl.setVisibility(View.GONE);\n }\n }", "public void hideProgressLayout(){\n\n if(progressLayout != null) {\n progressLayout.setVisibility(View.GONE);\n }\n }", "private void checkHideRewardButton(){\n FrameLayout frameLayout = (FrameLayout) findViewById(R.id.rewards_frame);\n int numberOfRewards = StringUtils.getNumberOfQuestRewards(character.getRewardIds());\n if(numberOfRewards == 0){\n frameLayout.setVisibility(View.INVISIBLE);\n }else{\n TextView tv = (TextView) findViewById(R.id.rewards_button_number);\n tv.setText(\"\"+numberOfRewards);\n }\n }", "private void hideContinueButton()\n {\n Button continueBtn = (Button) findViewById(R.id.continueBtn);\n continueBtn.setVisibility(View.INVISIBLE);\n }", "private void showNoImagesView() {\n if (mNoImagesView == null) {\n ViewGroup root = (ViewGroup) findViewById(R.id.root);\n getLayoutInflater().inflate(R.layout.warn_no_content, root);\n mNoImagesView = findViewById(R.id.no_images);\n }\n mNoImagesView.setVisibility(View.VISIBLE);\n }", "private void showNoFavoriteMoviesTextView(){\n errorTextView.setVisibility(View.INVISIBLE);\n errorButton.setVisibility(View.INVISIBLE);\n errorButton.setEnabled(false);\n recyclerView.setVisibility(View.INVISIBLE);\n progressBar.setVisibility(View.INVISIBLE);\n noFavoriteMoviesTextView.setVisibility(View.VISIBLE);\n }", "private void hideResults() {\n results.setVisibility(View.INVISIBLE);\n restartButton.setVisibility(View.INVISIBLE);\n }", "private void goneEmptyAddViews() {\n mImgEmptyAdd.setVisibility(View.GONE);\n mTextViewEmptyAdd.setVisibility(View.GONE);\n }", "private void display_noInternet() {\n progressBar.setVisibility(View.GONE);\n textView.setVisibility(View.VISIBLE);\n }", "private void clearDisplay(){\n ((RadioGroup) findViewById(R.id.answerButtons)).clearCheck();\n }", "private void showNoApiariesViews() {\r\n apiariesView.setVisibility(View.GONE);\r\n noApiariesView.setVisibility(View.VISIBLE);\r\n }", "public void hidePositiveButton() {\n btRight.setVisibility(View.GONE);\n }", "private void findHide() {\n \tif (this.pagesView != null) this.pagesView.setFindMode(false);\n \tthis.currentFindResultNumber = null;\n \tthis.currentFindResultPage = null;\n \tthis.findButtonsLayout.setVisibility(View.GONE);\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 }", "public void removeAnswers(){\n for(int i=0;i<gridView.getChildCount();i++){\n final View child = gridView.getChildAt(i);\n if(Build.VERSION.SDK_INT>15){\n child.animate().alpha(0).setDuration(300).withEndAction(new Runnable() {\n @Override\n public void run() {\n child.setVisibility(View.GONE);\n }\n });}else{ child.setAlpha(0);\n child.setVisibility(View.GONE);}\n }\n\n }", "private void showNoResult(boolean isShow) {\n if (!isShow && skeletonScreen != null) {\n skeletonScreen.hide();\n }\n noResultView.setVisibility(isShow ? View.VISIBLE : View.GONE);\n swipeRefreshLayout.setVisibility(isShow ? View.GONE : View.VISIBLE);\n stopRefreshing();\n }", "protected void hideView(View view){\n view.setVisibility(View.GONE);\n }", "private void showBuddyUpEmptyView() {\n mRecyclerView.setVisibility(View.GONE);\n emptyViewRoot.setVisibility(View.VISIBLE);\n emptyViewBudddyUp.setVisibility(View.VISIBLE);\n emptyViewPickUp.setVisibility(View.GONE);\n emptyViewNoInternet.setVisibility(View.GONE);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Populates stations HashMap by adding line name and relevant stations to each line
public void addToStations(String lineName, ArrayList<String> s) { //put line name as key and arraylist as value to stations hashMap stations.put(lineName, new ArrayList<String>(s)); }
[ "public void createLinkedStructure() {\n\t\t\n\t\tfor (ArrayList<String> s : stations.values())\n\t\t//Check every ArrayList of stations in the stations hashmap\n\t\t{\n\t\t\tArrayList<String> stationsInLine = s;\n\t\t\t// get the arraylist of stations value and put it into a new arraylist stationsInLine\n\t\t\tint i = 0;\n\t\t\twhile(i < stationsInLine.size())\n\t\t\t//loop through the list of stations 1 by 1\n\t\t\t{\n\t\t\t\tString currentStation = stationsInLine.get(i);\n\t\t\t\t//get current station at position i in the arraylist and assign it to String variable currentStation\n\n\t\t\t\tArrayList<String> links;\n\t\t\t\t//create empty arraylist links for storing relevant stations\n\n\t\t\t\tif (linkedStations.containsKey(currentStation))\n\t\t\t\t//if the linkedStations hashmap has the current station as the key\n\t\t\t\t{\n\t\t\t\t\tlinks = linkedStations.get(currentStation);\n\t\t\t\t\t//assign the current station to the links array list\n\t\t\t\t} else \n\t\t\t\t{\n\t\t\t\t\tlinks = new ArrayList<>();\n\t\t\t\t\t//if it is the very first link then create an new arraylist\n\t\t\t\t}\n\t\t\t\tif (i + 1 < stationsInLine.size()) {\n\t\t\t\t\tlinks.add(stationsInLine.get(i + 1));\n\t\t\t\t\t//if it is not the last station, add the next station to the current one\n\t\t\t\t}\n\t\t\t\tif (i > 0) {\n\t\t\t\t\tlinks.add(stationsInLine.get(i - 1));\n\t\t\t\t\t//if it is not the first item add the station previous to the one you are at - this will form a line of stations\n\t\t\t\t}\n\t\t\t\t//populate the HashMap with station as key and the relevant links arraylist created\n\t\t\t\tlinkedStations.put(currentStation, links);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t}", "public void createDebugMap(ArrayList<Station> stations) {\r\n\t\tStation stationValby = new Station(\"Valby\", 1);\r\n\t\tstations.add(stationValby);\r\n\r\n\t\tStation stationFrederiksund = new Station(\"Frederiksund\", 2);\r\n\t\tstations.add(stationFrederiksund);\r\n\r\n\t\tStation stationHerlev = new Station(\"Herlev\", 3);\r\n\t\tstations.add(stationHerlev);\r\n\r\n\t\tStation stationHvidovre = new Station(\"Hvidovre\", 4);\r\n\t\tstations.add(stationHvidovre);\r\n\r\n\t\tStation stationHumsum = new Station(\"Husum\", 5);\r\n\t\tstations.add(stationHumsum);\r\n\r\n\t\tStation stationIslev = new Station(\"Islev\", 6);\r\n\t\tstations.add(stationIslev);\r\n\r\n\t\tStation stationDanshoj = new Station(\"Danshoj\", 7);\r\n\t\tstations.add(stationDanshoj);\r\n\r\n\t\tStation stationSkovlunde = new Station(\"Skovlunde\", 8);\r\n\t\tstations.add(stationSkovlunde);\r\n\r\n\t\t// add neighbor connections\r\n\t\tstationValby.neighbors.add(new Neighbor(stationIslev, 4, 4));\r\n\r\n\t\tstationIslev.neighbors.add(new Neighbor(stationValby, 4, 4));\r\n\t\tstationIslev.neighbors.add(new Neighbor(stationHumsum, 8, 8));\r\n\t\tstationIslev.neighbors.add(new Neighbor(stationSkovlunde, 3, 3));\r\n\r\n\t\tstationHumsum.neighbors.add(new Neighbor(stationHerlev, 3, 3));\r\n\t\tstationHumsum.neighbors.add(new Neighbor(stationFrederiksund, 4, 4));\r\n\t\tstationHumsum.neighbors.add(new Neighbor(stationHvidovre, 2, 2));\r\n\t\tstationHumsum.neighbors.add(new Neighbor(stationDanshoj, 3, 3));\r\n\t\tstationHumsum.neighbors.add(new Neighbor(stationIslev, 8, 8));\r\n\r\n\t\tstationHerlev.neighbors.add(new Neighbor(stationHumsum, 3, 3));\r\n\t\tstationHerlev.neighbors.add(new Neighbor(stationFrederiksund, 2, 2));\r\n\r\n\t\tstationFrederiksund.neighbors.add(new Neighbor(stationHumsum, 4, 4));\r\n\t\tstationFrederiksund.neighbors.add(new Neighbor(stationHerlev, 2, 2));\r\n\t\tstationFrederiksund.neighbors.add(new Neighbor(stationHvidovre, 5, 5));\r\n\r\n\t\tstationHvidovre.neighbors.add(new Neighbor(stationHumsum, 2, 2));\r\n\t\tstationHvidovre.neighbors.add(new Neighbor(stationFrederiksund, 5, 5));\r\n\t\tstationHvidovre.neighbors.add(new Neighbor(stationDanshoj, 4, 4));\r\n\r\n\t\tstationDanshoj.neighbors.add(new Neighbor(stationHumsum, 3, 3));\r\n\t\tstationDanshoj.neighbors.add(new Neighbor(stationHvidovre, 5, 5));\r\n\t\tstationDanshoj.neighbors.add(new Neighbor(stationSkovlunde, 10, 10));\r\n\r\n\t\tstationSkovlunde.neighbors.add(new Neighbor(stationHumsum, 3, 3));\r\n\t\tstationSkovlunde.neighbors.add(new Neighbor(stationDanshoj, 10, 10));\r\n\t}", "public void readFile() {\n //HashMap to be returned.\n HashMap<String, ArrayList<Station>> readHashMap = new HashMap<String, ArrayList<Station>>();\n //Line of the file\n String line = null;\n\n try {\n ArrayList<Station> LineStations = null;\n String MRTLine = null;\n BufferedReader reader = new BufferedReader(new FileReader(\"MRT.txt\"));\n while ((line = reader.readLine()) != null) {\n\n if (line.equals(\"(start)\")) {\n LineStations = new ArrayList<Station>();\n line = reader.readLine().trim();\n //Get Line to put in the hashmap (key)\n MRTLine = line.substring(0, 2);\n //Method to add new station object\n LineStations.add(new Station(line, reader.readLine().trim()));\n } else if (line.equals(\"(end)\")) {\n readHashMap.put(MRTLine, LineStations);\n } else {\n LineStations.add(new Station(line, reader.readLine().trim()));\n }\n }\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Station not found\", \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n this.Stations = readHashMap;\n }", "private static void buildStationInformation(){\r\n\t\tfor(Integer rwI : Line.getRailWays().keySet()){\r\n\t\t\tCanton canton = Line.getRailWays().get(rwI).getFirstCanton();\r\n\t\t\ttry{\r\n\t\t\t\tStation s = null;\r\n\t\t\t\twhile(s == null){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\ts = canton.getStation();\r\n\t\t\t\t\t} catch (StationNotFoundException e) {\r\n\t\t\t\t\t\tcanton = canton.getNextCanton(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(!canton.getClass().equals(Terminus.class)){\r\n\t\t\t\t\twhile(!canton.getClass().equals(Terminus.class)){\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tif(canton.hasStation()){\r\n\t\t\t\t\t\t\t\ts.addNextStation(rwI, canton.getId());\r\n\t\t\t\t\t\t\t\ts = canton.getStation();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (StationNotFoundException e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcanton = canton.getNextCanton(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tTerminus term = (Terminus) canton;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif(term.hasStation()){\r\n\t\t\t\t\t\ts.addNextStation(rwI, term.getId());\r\n\t\t\t\t\t\ts = term.getStation();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (StationNotFoundException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tArrayList<Integer> rList = term.getNextRailWays();\r\n\t\t\t\tfor(Integer i : rList){\r\n\t\t\t\t\tcanton = Line.getRailWays().get(i).getFirstCanton();\r\n\t\t\t\t\t\r\n\t\t\t\t\tboolean haveNext = false;\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\twhile(!haveNext){\r\n\t\t\t\t\t\t\tif(canton.hasStation()){\r\n\t\t\t\t\t\t\t\ts.addNextStation(i, canton.getId());\r\n\t\t\t\t\t\t\t\thaveNext = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcanton = canton.getNextCanton(null);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch(TerminusException e){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} catch(TerminusException e){\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public ArrayList<String> getStationLine(String station) {\n ArrayList<String> linesServed = new ArrayList<String>();\n for (String key : this.Stations.keySet()) {\n for (Station stn : this.Stations.get(key)) {\n if (station.equals(stn.getStnName())) {\n linesServed.add(key);\n break;\n }\n }\n }\n return linesServed;\n }", "private void createConnectionsMap() {\n connections = new HashMap<Station, ArrayList<Station>>();\n for(Station station : stations) {\n connections.put(station, new ArrayList<>());\n }\n try {\n Scanner scanner = new Scanner(connectionsFile);\n while (scanner.hasNext()) {\n String[] connected = scanner.nextLine().split(\"/\");\n Station from = findStation(connected[0]);\n Station to = findStation(connected[1]);\n if(from != null && to != null) {\n connections.get(from).add(to);\n }\n }\n } catch(FileNotFoundException e) {\n System.out.println(\"Failed to read connections file in createConnectionsMap method.\");\n }\n }", "public void createStations() \n\t{\n\t\tint stationID;\n\t\tint routeID=0;\n\t\tString[] files = {\"Western.csv\", \"Central.csv\", \"Harbour.csv\"};\n\t\tArrayList<Station> stationList = new ArrayList<Station>();\t\t\n\t\ttry \n\t\t{\n\t\t\tfor (String f : files) \n\t\t\t{\t\t\t\t\n\t\t\t\tFile file = new File(f);\n\t\t\t\tif (!file.exists()) \n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Input file not exist\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t@SuppressWarnings(\"resource\")\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\t\t\n\t\t\t\tString line;\n\t\t\t\tString route= br.readLine().split(\",\")[0];\n\t\t\t\tStation.routeName[routeID++] = route;\n\t\t\t\tstationID=0;\n\t\t\t\tdouble dist = 0.0;\n\t\t\t\twhile ((line = br.readLine()) != null) \n\t\t\t\t{\t\n\t\t\t\t\tString[] stn = line.split(\",\");\n\t\t\t\t\tif(stn[1]==\"\")\tstn[1]= \"1\";\n\t\t\t\t\tdist += Double.parseDouble(stn[1]);\n\t\t\t\t\tStation st = new Station(routeID, route+\"_\"+(++stationID), stn[0], Double.parseDouble(stn[1]),dist);\n\t\t\t\t\t\n\t\t\t\t\tstationList.add(st);\n\t\t\t\t}\n\t\t\t\tStation.routeList.add(stationList);\n\t\t\t\tStation.TerminalsUp.add(stationList.get(0).stationName);\n\t\t\t\tStation.TerminalsDown.add(stationList.get(stationList.size()-1).stationName);\n\t\t\t\t\n\t\t\t\tstationList = new ArrayList<>();\n\t\t\t}\n\t\t}catch(IOException e) {}\n\t}", "public void addStations() {\n stationList.add(\"CSMT\");\n stationList.add(\"Masjid\");\n stationList.add(\"Sandhurst Road\");\n stationList.add(\"Byculla\");\n stationList.add(\"Chinchpokli\");\n stationList.add(\"Currey Road\");\n stationList.add(\"Parel\");\n stationList.add(\"Dadar\");\n stationList.add(\"Matunga\");\n stationList.add(\"Sion\");\n stationList.add(\"Kurla\");\n stationList.add(\"Vidyavihar\");\n stationList.add(\"Ghatkopar\");\n stationList.add(\"Vikhroli\");\n stationList.add(\"Kanjur Marg\");\n stationList.add(\"Bhandup\");\n stationList.add(\"Nahur\");\n stationList.add(\"Mulund\");\n stationList.add(\"Thane\");\n }", "public ArrayList<Station> getLineStations(String line){\n return this.Stations.get(line);\n }", "private void populateDriverAndTrips(String line) {\n\t\tif(line != null) {\n\t\t\tString[] arr = line.split(\" \");\n\n\t\t\t// Check if the line begins with Driver or Trip\n\t\t\t// if Driver, create an entry in HasMap\n\t\t\t// if Trip, add the trip object to the corresponding driver\n\t\t\tif(arr[0].equals(\"Driver\")) {\n\n\t\t\t\tif(!drivers.containsKey(arr[0])) {\n\t\t\t\t\tdrivers.put(arr[1], new ArrayList<Trip>());\n\t\t\t\t}\n\n\t\t\t} else if(arr[0].equals(\"Trip\")) {\n\t\t\t\tTrip trip = new Trip(arr[2], arr[3], arr[4]);\n\n\t\t\t\tif(!drivers.containsKey(arr[1])) {\n\t\t\t\t\tdrivers.put(arr[1], new ArrayList<Trip>());\n\t\t\t\t}\n\n\t\t\t\tdrivers.get(arr[1]).add(trip);\n\t\t\t}\n\t\t}\n\n\t}", "public void updateMarkers(){\n markerMap = new HashMap<>();\n googleMap.clear();\n for (Station station : main.getStations()) {\n float fillLevel = station.getFillLevel();\n float colour = fillLevel * 120;\n Marker marker = googleMap.addMarker(new MarkerOptions().position(station.getLocation()).title(station.getName()).snippet(Integer.toString(station.getOccupancy())).icon(BitmapDescriptorFactory.defaultMarker(colour)));\n marker.setTag(station.getId());\n markerMap.put(station.getId(), marker);\n }\n }", "public HashMap<String, ArrayList<String>> getStations() \n\t{\n\t\t//return stations hashMap\n\t\treturn stations;\n\t}", "public abstract Map<Integer, Station> getStations(boolean includeSilent);", "public void addStation(String station) {\n this.station = station;\n }", "public static List<StationMap> buildStationMap() throws UrbanRailNetworkException {\n\t\t// Mapping file is already there in cache\n\t\tif (stationMapCache.size() > 0)\n\t\t\treturn stationMapCache;\n\t\ttry (Reader reader = Files.newBufferedReader(Paths.get(SAMPLE_CSV_FILE_PATH));\n\t\t\t\tCSVReader csvReader = new CSVReader(reader);) {\n\t\t\tString[] nextRecord;\n\t\t\tcsvReader.readNext();\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd MMM yyyy\");\n\t\t\twhile ((nextRecord = csvReader.readNext()) != null) {\n\t\t\t\tStationMap stationMap = new StationMap(nextRecord[0], nextRecord[1], format.parse(nextRecord[2]));\n\t\t\t\tstationMapCache.add(stationMap);\n\t\t\t}\n\t\t\treader.close();\n\t\t\tcsvReader.close();\n\t\t} catch (IOException | ParseException e) {\n\t\t\tthrow new UrbanRailNetworkException(\n\t\t\t\t\t\"Got error while parsing StationMap, please enter a valid csv file having format Station Code,Station Name,Opening Date\");\n\t\t}\n\t\tCollections.sort(stationMapCache);\n\t\treturn stationMapCache;\n\t}", "private HashMap<String, Marker> loadNMarkers(){\n HashMap<String, Marker> map = new HashMap<String, Marker>();\n if (googleMap != null) {\n googleMap.clear();\n }\n float alpha = (float) 0.5;\n if (main.state.getBookingState() != State.RESERVE_BIKE_SELECTION_STATE && main.state.getBookingState() != State.RESERVE_DOCK_SELECTION_STATE){\n alpha = 1;\n }\n for (Station station : stationList) {\n float fillLevel = station.getFillLevel(); // change the marker colors depending on the station fill levels\n float colour = fillLevel * 120;\n Marker marker = googleMap.addMarker(new MarkerOptions().position(station.getLocation()).title(station.getName()).snippet(Integer.toString(station.getOccupancy())).icon(BitmapDescriptorFactory.defaultMarker(colour)).alpha(alpha));\n marker.setTag(station.getId()); // set tag to reference markers later\n map.put(station.getId(), marker);\n }\n return map;\n }", "public void buildStation(Station station) {\n stations.add(station);\n }", "private void setStations() {\n\n Log.d(TAG, \"setStations function called\");\n\n mFirestore.collection(\"stationsCoordinates\").addSnapshotListener(new EventListener<QuerySnapshot>() {\n @Override\n public void onEvent(@Nullable QuerySnapshot queryDocumentSnapshots, @Nullable FirebaseFirestoreException e) {\n for (DocumentSnapshot documentSnapshot : queryDocumentSnapshots) {\n Station station = new Station(\n documentSnapshot.getString(\"latitude\"),\n documentSnapshot.getString(\"longitude\"),\n documentSnapshot.getString(\"name\")\n );\n Log.d(TAG, \"reading bus station data: \" + station.getName());\n busStations.add(station);\n }\n\n if (busStations.size() != 0) {\n\n for (Station station : busStations) {\n\n Log.d(TAG, \"creating bus stations markers\");\n\n LatLng latLng = new LatLng(Double.parseDouble(station.getLatitude()), Double.parseDouble(station.getLongitude()));\n\n mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .title(station.getName())\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_bus_station))\n .draggable(false)\n );\n }\n }\n }\n });\n }", "public void setStations(LinkedList<Station> stations) {\n this.stations = stations;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If this old language corresponds to a legacy language which was tied to a specific compiler specification, a suitable ID will be returned.
public CompilerSpecID getOldCompilerSpecID() { Collection<CompilerSpecDescription> compatibleCompilerSpecDescriptions = langDescription.getCompatibleCompilerSpecDescriptions(); if (!compatibleCompilerSpecDescriptions.isEmpty()) { return compatibleCompilerSpecDescriptions.iterator().next().getCompilerSpecID(); } return null; }
[ "java.lang.String getLegacyId();", "String getLangId();", "Integer getCodeSystemId(String codeSystem);", "long getCodeId();", "public String getLegacyId() {\n return this.legacy_id;\n }", "io.dstore.values.IntegerValue getLanguageId();", "public native int getEngineID() throws DecoderException;", "@SuppressWarnings(\"deprecation\")\n public int getId()\n {\n if ( this.data != 0 || (this.legacy.length != 0 && Integer.parseInt( this.legacy[0].substring( 2 ) ) >= 13) )\n {\n return -1;\n }\n Material material = this.parseMaterial();\n return material == null ? -1 : material.getId();\n }", "io.dstore.values.IntegerValue getValueLanguageId();", "java.lang.String getLegacyCommentId();", "io.dstore.values.IntegerValueOrBuilder getLanguageIdOrBuilder();", "public String getLegacyId() {\n return (String)getAttributeInternal(LEGACYID);\n }", "public String getLanguageID() {\r\n\t\treturn (languageID == null) ? new String() : languageID;\r\n\t}", "public Integer getCallerLanguageId() {\r\n CompanyUserDetails details = (CompanyUserDetails) getSpringSecurityService().getPrincipal();\r\n return details.getLanguageId();\r\n }", "String getProgramId();", "int getCompilerVersion();", "public static String getDefaultCompilerId( String sbtVersion, String playVersion )\n {\n String result = null;\n if ( sbtVersion != null && !sbtVersion.isEmpty() )\n {\n if ( sbtVersion.equals( \"0.13\" ) || sbtVersion.startsWith( \"0.13.\" ) )\n {\n result = \"sbt013\";\n }\n else if ( sbtVersion.equals( \"0.12\" ) || sbtVersion.startsWith( \"0.12.\" ) )\n {\n result = \"sbt012\";\n }\n }\n if ( result == null )\n {\n if ( playVersion != null && !playVersion.isEmpty() )\n {\n if ( playVersion.startsWith( \"2.1.\" ) || playVersion.startsWith( \"2.1-\" ) )\n {\n result = \"sbt012\";\n }\n }\n }\n if ( result == null )\n {\n result = \"sbt013\"; // use latest version\n }\n return result;\n }", "public static SourceCodeLanguage identify(BytecodeClass bclass, boolean useSrcAttribute) {\n ClassNode asm = bclass.asm();\n if (useSrcAttribute && asm.sourceFile != null) {\n /*\n These can be used to accurately determine the source code language when:\n 1) The sourceFile attribute was not manipulated by an obfuscater.\n 2) The source code isn't precomputed into another language before being compiled into bytecode.\n\n For an example of a language that violates condition #2, take a look at Xtend (hosted by eclipse).\n */\n if (asm.sourceFile.endsWith(\".java\")) {\n return SourceCodeLanguage.JAVA;\n } else if (asm.sourceFile.endsWith(\".scala\")) {\n return SourceCodeLanguage.SCALA;\n } else if (asm.sourceFile.endsWith(\".groovy\")) {\n return SourceCodeLanguage.GROOVY;\n } else if (asm.sourceFile.endsWith(\".kt\")) {\n return SourceCodeLanguage.KOTLIN;\n } else if (asm.sourceFile.endsWith(\".ceylon\")) {\n return SourceCodeLanguage.CEYLON;\n }\n }\n if (asm.superName.equals(\"groovy/lang/Script\")) {\n //Top level Groovy classes extend groovy/lang/Script.\n return SourceCodeLanguage.GROOVY;\n }\n for (String iface : asm.interfaces) {\n if (iface.equals(\"groovy/lang/GroovyObject\")) {\n //Groovy enums and inner classes implement groovy/lang/GroovyObject.\n return SourceCodeLanguage.GROOVY;\n }\n }\n if (asm.visibleAnnotations != null) {\n for (AnnotationNode annotation : asm.visibleAnnotations) {\n switch (annotation.desc) {\n case \"Lkotlin/jvm/internal/KotlinClass;\":\n //Kotlin classes, enums, objects, and interfaces have this annotation.\n //It contains information about the primary constructor among other things\n return SourceCodeLanguage.KOTLIN;\n case \"Lscala/reflect/ScalaSignature;\":\n //Scala classes, objects, and traits have this annotation.\n //It contains information that Scala uses for reflection.\n return SourceCodeLanguage.SCALA;\n case \"Lgroovy/transform/Trait;\":\n //Top level groovy traits contain this annotation.\n //If it contains any useful information, please inform me.\n return SourceCodeLanguage.GROOVY;\n case \"Lcom/redhat/ceylon/compiler/java/metadata/Ceylon;\":\n //All classes generated by Ceylon contain this annotation\n return SourceCodeLanguage.CEYLON;\n }\n }\n }\n if (asm.attrs != null) {\n for (Attribute attribute : asm.attrs) {\n switch (attribute.type) {\n case \"Scala\":\n //Scala \"inner\" objects and traits contain this non-standard bytecode attribute.\n //By \"inner\" objects and traits I'm referring to the class that ends with $ that's\n //generated when you compile a Scala object or trait.\n //I'm not sure of it's purpose and would be welcome to having someone explain it to me.\n return SourceCodeLanguage.SCALA;\n case \"ScalaSig\":\n //Scala classes, objects, and traits contain this non-standard bytecode attribute.\n //I'm not sure of it's purpose and would be welcome to having someone explain it to me.\n return SourceCodeLanguage.SCALA;\n case \"ScalaInlineInfo\":\n //Scala classes and traits contain this non-standard bytecode attribute.\n //Scala \"inner\" objects also contain this non-standard bytecode attribute.\n //By \"inner\" objects I'm referring to the class that ends with $ that's generated\n //when you compile a Scala object.\n //I'm not sure of it's purpose and would be welcome to having someone explain it to me.\n return SourceCodeLanguage.SCALA;\n }\n }\n }\n for (MethodNode mn : asm.methods) {\n ListIterator<AbstractInsnNode> itr = mn.instructions.iterator();\n while (itr.hasNext()) {\n AbstractInsnNode insn = itr.next();\n //Look for kotlin standard library calls.\n if (insn instanceof MethodInsnNode && ((MethodInsnNode) insn).owner.startsWith(\"kotlin/\")) {\n return SourceCodeLanguage.KOTLIN;\n }\n }\n }\n /*\n Let's assume that the source code language was Java if we don't identify a marker that would lead us to believe\n that the bytecode was built from another source code language.\n */\n return SourceCodeLanguage.JAVA;\n }", "public abstract java.lang.String getIdpc();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the summary page with incomplete request data label is missing
@Test public void test_donateSummary3_shouldReturn400_missingLabel() { Map<String, String> data = new HashMap<>(requestData1); // remove label data.remove("label"); Result result = callAction(controllers.routes.ref.Donate.summary(), fakeRequest().withFormUrlEncodedBody(data)); // check reply HTTP status assertThat(status(result)).isEqualTo(Http.Status.BAD_REQUEST); assertThat(contentAsString(result)).contains("Bitte befüllen Sie dieses Feld!"); }
[ "@Test\n\tpublic void test_donateSummary3_shouldReturn400_missingDescription() {\n\t\tMap<String, String> data = new HashMap<>(requestData1);\n\t\t\n\t\t// remove label\n\t\tdata.remove(\"description\");\n\t\t\n\t\tResult result = callAction(controllers.routes.ref.Donate.summary(), fakeRequest().withFormUrlEncodedBody(data));\n\t\t\n\t\t// check reply HTTP status\n\t\tassertThat(status(result)).isEqualTo(Http.Status.BAD_REQUEST);\n\t\tassertThat(contentAsString(result)).contains(\"Bitte befüllen Sie dieses Feld!\");\n\t}", "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(\"there is no Article entry for that Article\")\r\n\tpublic void checkNoArticleEntryInResponse(){\n\t\tXmlReaderHelper xmlReader = new XmlReaderHelper(responseBody);\r\n\t\tint sectionIndex = xmlReader.getIndexOfNodeWithValue(\"/feed/entry/category[@term=\\\"article\\\"]\", \"\");\r\n\r\n\t\tSystem.out.println(\"sectionIndex is: \" + sectionIndex);\r\n\t\tassertThat(sectionIndex, is(-1));\r\n\t}", "@Test\n\tpublic void checkNoElementInTableOutsideAPI() throws ParseException\n\t{\n\t\t// Table Data\n\t\tMap<String, Object> tableMap = dashboardPage.addRowDataToMap();\n\t\t// API Data\n\t\tresponsePage = new APIResponsePageObject(driver);\n\t\tMap<String, Object> apiMap = responsePage.getRateDataFromAPI();\n\t\t\n\t\t// Map that has key - values missing in tableMap that are in apiMap\n\t\tMap notInAPIMap = new HashMap<>(tableMap);\n\t\tnotInAPIMap.keySet().removeAll(apiMap.keySet());\n\t\tnotInAPIMap.values().removeAll(apiMap.values());\n\t\t\n\t\tif(notInAPIMap.size() > 1)\n\t\t{\n\t\t\terrorMessage = \"Html table is having \" + notInAPIMap.toString() + \" that are not from API\";\n\t\t\tAssert.fail(errorMessage);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tAssert.assertTrue(notInAPIMap.size() == 0);\n\t\t}\n\t}", "public void ifSearchResultIsEmptyResultPageDisplayed() {\r\n if (title_list.size() == 0) {\r\n\r\n String structure_displayed = breadcrumbs_box.getText();\r\n String[] splited_structure_displayed = structure_displayed.split(\">\");\r\n String[] splited_third_structure_displayed = splited_structure_displayed[3].trim().split(\" \");\r\n String resultNumber = splited_third_structure_displayed[0];\r\n\r\n if (Integer.parseInt(resultNumber) == 0) {\r\n System.out.println(\"Verified that search result is empty.\");\r\n ATUReports.add(time + \" Verified that search result is empty.\", \"True.\", \"True.\", LogAs.PASSED, null);\r\n Assert.assertTrue(true);\r\n } else {\r\n System.out.println(\"search result is empty.\");\r\n ATUReports.add(time + \" Verified that search result is empty.\", \"True.\", \"false.\", LogAs.FAILED, null);\r\n Assert.assertTrue(false);\r\n }\r\n }\r\n\r\n }", "@Then(\"^I should see USL basic attributes on plenti summary page$\")\n public void I_should_see_USL_basic_attributes_on_plenti_summary_page() throws Throwable {\n String pageName = MEW() ? \"plenti_summary\" : \"usl_account_summary\";\n String actualUslId = Elements.getText(Elements.element(pageName + \".added_usl_id\"));\n String addedUslId = MyAccountSteps.newUslId == null ? TestUsers.getEnrolledUslId().getPlentiId() : MyAccountSteps.newUslId;\n String expectedUslId = StringUtils.overlay(addedUslId, StringUtils.repeat(\"*\", addedUslId.length() - 4), 0, addedUslId.length() - 4);\n Assert.assertTrue(\"USL ID is not displayed correctly on USL account summary page\", actualUslId.contains(expectedUslId));\n\n Elements.elementShouldBePresent(pageName + \".remove_usl_id\");\n Elements.elementShouldBePresent(pageName + \".goto_learn_more\");\n Elements.elementShouldBePresent(pageName + \".goto_faq\");\n\n String actualRedeemMessage = Elements.getText(Elements.element(pageName + \".redeem_message\"));\n String expectedRedeemMessage = TestUsers.getCustomerInformation().getUser().getProfileAddress().getFirstName() + \"'s Plenti points balance:\";\n Assert.assertTrue(\"Redeem message is not displayed correctly on USL account summary page\", actualRedeemMessage.equals(expectedRedeemMessage));\n }", "@Test\n\tpublic void test_donateSummary1_shouldReturn200() {\n\t\tMap<String, String> data = new HashMap<>(requestData1);\n\t\tResult result = callAction(controllers.routes.ref.Donate.summary(), fakeRequest().withFormUrlEncodedBody(data));\n\t\t\n\t\t// check reply HTTP status\n\t\tassertThat(status(result)).isEqualTo(Http.Status.OK);\n\t\t\n\t\t// summary page mustn't persist data!\n\t\tJPA.withTransaction(new play.libs.F.Callback0() {\n\t\t\tpublic void invoke() {\n\t\t\t\tassertThat(Donation.findAll()).isEmpty();\n\t\t\t\tassertThat(Donor.findAll()).isEmpty();\n\t\t\t}\n\t\t});\n\t}", "public void doesNotHaveRequiredFieldErrors() {\n assertThat(this.pageSource()).doesNotContain(\"You must provide a name for your Set.\");\n assertThat(this.pageSource()).doesNotContain(\"Please provide a description of this Set.\");\n // assertThat(this.pageSource()).doesNotContain(\"Please select at least one Routine for a Set.\");\n }", "public void XXXtestEmptyContentDescription() throws Throwable {\n view.setTitle(\"RawIViewPart\");\n verifySettings(\"RawIViewPart\", \"RawIViewPart\", \"\");\n verifyEvents(true, false, true);\n }", "public void noResultsFoundMessage()\n\t{\n\t\tenter_text_value(\"Rate Sheet Search\", rateSheetSearch, get_random_alphanumeric(8));\n\t\tperformKeyBoardAction(\"ENTER\");\n\t\tfixed_wait_time(4);\n\t\t \n\t\tif(IsDisplayed(\"No Items Found Message\", noItemsFoundInfo))\n\t\t\toReport.AddStepResult(\"No Items Found Message\", \"Searched with invalid Rate Sheet name, Verified that No Result found message is displayed\", \"PASS\");\n\t\telse\n\t\t\toReport.AddStepResult(\"No Items Found Message\", \"Searched with invalid Rate Sheet name, But No Result found message is not displayed\", \"FAIL\");\n\t}", "@Test\n @DisplayName(\"POST request with no content length - should not work\")\n void test12 () {\n try {\n String httpRequest = \"POST /reviewsearch HTTP/1.1\\n\" +\n \"Host: localhost:8080\\n\" +\n \"User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0\\n\" +\n \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8\\n\" +\n \"Accept-Language: en-US,en;q=0.5\\n\" +\n \"Accept-Encoding: gzip, deflate\\n\" +\n \"Referer: http://localhost:8080/reviewsearch\\n\" +\n \"Content-Type: application/x-www-form-urlencoded\\n\" +\n \"Origin: http://localhost:8080\\n\" +\n \"DNT: 1\\n\" +\n \"Connection: keep-alive\\n\" +\n \"Upgrade-Insecure-Requests: 1\\n\" +\n \"Sec-Fetch-Dest: document\\n\" +\n \"Sec-Fetch-Mode: navigate\\n\" +\n \"Sec-Fetch-Site: same-origin\\n\" +\n \"Sec-Fetch-User: ?1\\n\" +\n \"Cache-Control: max-age=0\\n\" +\n \"\\n\" +\n \"message=testing\";\n\n HTTPParser parser = getLoadedParser(httpRequest);\n boolean isValid = parser.isRequestIsValid();\n assertTrue(isValid);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Test(timeout = 1000L)\n @Graded(points = 20)\n public void testSummaryFilter() {\n assertThat(Summary.filter(Collections.emptyList(), \"test\")).hasSize(0);\n assertThat(Summary.filter(Collections.singletonList(BADM100), \"intro\")).hasSize(1);\n assertThat(Summary.filter(Collections.singletonList(BADM100), \"xyz\")).hasSize(0);\n assertThat(Summary.filter(Arrays.asList(CS125, CS125Spring), \"125\")).hasSize(2);\n assertThat(Summary.filter(Arrays.asList(CS125, CS125Spring), \"Terrible\")).hasSize(0);\n assertThat(Summary.filter(Arrays.asList(CS125, CS125Spring, CS225), \"25\")).hasSize(3);\n assertThat(\n Summary.filter(\n Arrays.asList(BADM100, CS125, CS125Spring, CS225, CS498VR, CS498CB), \"Badminton\"))\n .hasSize(2);\n }", "@Test\n void testNoViolations() {\n JsonDataIntegrityReport report = getDataIntegrityReport();\n assertEquals(0, report.node().count(JsonNodeType.STRING));\n }", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "public void verifySearchResultIsEmpty() {\r\n\r\n if (title_list.size() == 0) {\r\n System.out.println(\"Verified that search result is empty.\");\r\n ATUReports.add(time + \" Verified that search result is empty.\", \"True.\", \"True.\", LogAs.PASSED, null);\r\n Assert.assertTrue(true);\r\n } else {\r\n System.out.println(\"Not verified that search result is empty.\");\r\n ATUReports.add(time + \" Verified that search result is empty.\", \"True.\", \"False.\", LogAs.FAILED, new CaptureScreen(ScreenshotOf.BROWSER_PAGE));\r\n }\r\n }", "public String badOrMissingResponseData();", "@Test\n public void testContainsLabel2() {\n assertFalse(emptyDf.containsLabel(\"test\"));\n assertFalse(emptyDf.containsLabel(\"test\"));\n assertFalse(students.containsLabel(\"test\"));\n assertFalse(students.containsLabel(\"numEtudiant\"));\n assertFalse(cities.containsLabel(\"Cities\"));\n assertFalse(cities.containsLabel(\"States\"));\n assertFalse(oscars.containsLabel(\"Years\"));\n assertFalse(oscars.containsLabel(\"Movies\"));\n }", "public void setSummary(java.lang.String value) {\n this.summary = value;\n }", "@Test\r\n\tpublic void test004() {\r\n\t\tSystem.out.println(\"************PRINT Body RESPSONE when validation fails************\");\r\n\t\tgiven()\r\n\t\t.param(\"programme\", \"Financial Analysis\")\r\n\t\t.param(\"limit\", -1) //-1 is a negative value which fails the test\r\n\t\t.when()\r\n\t\t.get(\"/list\")\r\n\t\t.then()\r\n\t\t.log() //print response headers . log should be present after then()\r\n\t\t.ifError(); // prints Protocol & Status code like 200, 201\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Function: SetLatestMoviesString() Description: Takes a JSONObject containing an upcoming movies list and converts it to a string, storing it in the SharedPrefereneces. Parameters : JSONObject latestMovies The JSON data containing the list of upcoming movies Return: : N/A
public void SetLatestMoviesString(JSONObject latestMovies) { sharedPreferences.edit().putString("UpcomingMovies", latestMovies.toString()).commit(); }
[ "public void SetSearchMoviesString(JSONObject searchResults)\n {\n sharedPreferences.edit().putString(\"SearchMovies\", searchResults.toString()).commit();\n }", "private void getMoviesFromJson(String moviesJsonStr) throws JSONException {\n\n // These are the names of the JSON objects that need to be extracted.\n final String OWM_LIST = \"results\";\n final String OWM_MOVIE_ID = \"id\";\n final String OWM_OVERVIEW = \"overview\";\n final String OWM_TITLE = \"title\";\n final String OWM_POPULARITY = \"popularity\";\n final String OWM_POSTER = \"poster_path\";\n final String OWM_VOTE_AVERAGE = \"vote_average\";\n final String OWM_RELEASE_DATE = \"release_date\";\n\n\n try {\n JSONObject moviesJSON = new JSONObject(moviesJsonStr);\n JSONArray moviesArray = moviesJSON.getJSONArray(OWM_LIST);\n\n // Insert the new movie information into the database\n Vector<ContentValues> cVVector = new Vector<ContentValues>(moviesArray.length());\n\n for(int i = 0; i < moviesArray.length(); i++) {\n // Get the JSON object representing a movie\n JSONObject movie = moviesArray.getJSONObject(i);\n\n int movieId = movie.getInt(OWM_MOVIE_ID);\n String title = movie.getString(OWM_TITLE);\n String overview = movie.getString(OWM_OVERVIEW);\n double popularity = movie.getDouble(OWM_POPULARITY);\n double voteAverage = movie.getDouble(OWM_VOTE_AVERAGE);\n String poster = movie.getString(OWM_POSTER);\n String date = movie.getString(OWM_RELEASE_DATE);\n\n // Get millis from date\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n Calendar cal = Calendar.getInstance();\n cal.setTime(formatter.parse(date));\n long dateMillis = cal.getTimeInMillis();\n\n\n ContentValues movieValues = new ContentValues();\n\n movieValues.put(MoviesContract.MovieEntry._ID, movieId);\n movieValues.put(MoviesContract.MovieEntry.COLUMN_TITLE, title);\n movieValues.put(MoviesContract.MovieEntry.COLUMN_DESCRIPTION, overview);\n movieValues.put(MoviesContract.MovieEntry.COLUMN_POPULARITY, popularity);\n movieValues.put(MoviesContract.MovieEntry.COLUMN_VOTE, voteAverage);\n movieValues.put(MoviesContract.MovieEntry.COLUMN_POSTER, poster);\n movieValues.put(MoviesContract.MovieEntry.COLUMN_DATE, dateMillis);\n\n cVVector.add(movieValues);\n }\n\n // add to database\n int inserted = 0;\n if ( cVVector.size() > 0 ) {\n // delete old data so we don't build up an endless history\n mContext.getContentResolver().delete(MoviesContract.MovieEntry.CONTENT_URI, null, null);\n\n // Insert movies with bulkInsert\n ContentValues[] cvArray = new ContentValues[cVVector.size()];\n cVVector.toArray(cvArray);\n mContext.getContentResolver().bulkInsert(MoviesContract.MovieEntry.CONTENT_URI, cvArray);\n\n }\n\n } catch (JSONException e) {\n Log.e(LOG_TAG, e.getMessage(), e);\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "public void SetRandomMovieString(JSONObject movieDetails)\n {\n sharedPreferences.edit().putString(\"RandomMovie\", movieDetails.toString()).commit();\n }", "public void setMlatestMessage(String mlatestMessage) {\n this.mLatestMessage = mlatestMessage;\n }", "public void setLatestActivities(LatestActivitiesDTO latestActivities) {\r\n this.latestActivities = latestActivities;\r\n }", "public void setLatestArmies(int latestArmies) {\r\n\t\tthis.latestArmies = latestArmies;\r\n\t}", "private ArrayList<Movie> getMovies(String moviesJsonStr) throws JSONException {\n final String TMDB_RESULTS = \"results\";\n final String TMDB_backdrop_path = \"backdrop_path\";\n final String TMDB_ID = \"id\";\n final String TMDB_ORIGINAL_TITLE = \"original_title\";\n final String TMDB_OVERVIEW = \"overview\";\n final String TMDB_RELEASE_DATE = \"release_date\";\n final String TMDB_POSTER_PATH = \"poster_path\";\n final String TMDB_VOTE_AVERAGE = \"vote_average\";\n final String TMDB_VOTE_COUNT = \"vote_count\";\n\n JSONObject moviesJson = new JSONObject(moviesJsonStr);\n JSONArray moviesArray = moviesJson.getJSONArray(TMDB_RESULTS);\n\n int moviesArrayLength = moviesArray.length();\n\n mMoviesList = new ArrayList<Movie>();\n for (int i = 0; i < moviesArrayLength; i++) {\n JSONObject movieInfo = moviesArray.getJSONObject(i);\n\n int id = movieInfo.getInt(TMDB_ID);\n\n String backdropPath = movieInfo.getString(TMDB_backdrop_path);\n String posterPath = movieInfo.getString(TMDB_POSTER_PATH);\n\n String originalTitle = movieInfo.getString(TMDB_ORIGINAL_TITLE);\n String overview = movieInfo.getString(TMDB_OVERVIEW);\n String releaseDate = movieInfo.getString(TMDB_RELEASE_DATE);\n\n String voteAverage = movieInfo.getString(TMDB_VOTE_AVERAGE);\n String voteCount = movieInfo.getString(TMDB_VOTE_COUNT);\n\n Movie movie = new Movie(id);\n movie.setBackdropPath(backdropPath);\n movie.setPosterPath(posterPath);\n movie.setOriginalTitle(originalTitle);\n movie.setOverview(overview);\n movie.setReleaseDate(releaseDate);\n movie.setVoteAverage(voteAverage);\n movie.setVoteCount(voteCount);\n mMoviesList.add(movie);\n }\n\n return mMoviesList;\n }", "public ArrayList<Movie> GetUpcomingMovies(Context context)\n {\n int numMovies = 0;\n JSONObject latestMoviesObject;\n JSONArray latestMoviesArray;\n ArrayList latestMovies = new ArrayList();\n\n try\n {\n latestMoviesObject = new JSONObject(sharedPreferences.getString(\"UpcomingMovies\",\"\"));\n latestMoviesArray = latestMoviesObject.getJSONArray(\"results\");\n numMovies = latestMoviesArray.length();\n\n for (int upcomingCounter = 0; upcomingCounter < numMovies; upcomingCounter++)\n {\n latestMovies.add(new Movie(latestMoviesArray.getJSONObject(upcomingCounter), context));\n }\n }\n catch (JSONException exception)\n {\n ShowSnackbar(context.getString(R.string.shared_pref_json_ERR), ((Activity)context).getWindow().findViewById(android.R.id.content));\n Log.d(context.getString(R.string.shared_pref_json_ERR), exception.toString());\n }\n\n return latestMovies;\n }", "public void setMlatestMessageId(String mlatestMessageId) {\n this.mLatestMessageId = mlatestMessageId;\n }", "private String moviesToString() {\n \n StringBuilder sb = new StringBuilder();\n \n sb.append(\"movies={\");\n \n if (movies.size() == 0) {\n return sb.append(\"}\").toString();\n } else {\n sb.append(movies.stream().map(Movie::toStringLazily).collect(Collectors.joining(\" \"))); \n sb.append(\"}\"); \n return sb.toString();\n }\n }", "private void updateMovies() {\n FetchMoviesTask fetchMoviesTask = new FetchMoviesTask();\n\n SharedPreferences sharedPrefs =\n PreferenceManager.getDefaultSharedPreferences(getActivity());\n\n String sortOrder = sharedPrefs.getString(\n getString(R.string.pref_sort_order_key),\n getString(R.string.pref_sort_order_most_popular));\n\n String path = null;\n if (sortOrder.equals(getString(R.string.pref_sort_order_most_popular))) {\n path = MOST_POPULAR_PATH;\n } else if (sortOrder.equals(getString(R.string.pref_sort_order_top_rated))) {\n path = TOP_RATED_PATH;\n }\n\n fetchMoviesTask.execute(path, sortOrder);\n }", "private static List<Movie> getMovieInfo(String movieJsonString) {\n List<Movie> movies = new ArrayList<>();\n\n try {\n JSONObject movieData = new JSONObject(movieJsonString);\n JSONArray movieArray = movieData.getJSONArray(\"results\");\n\n for (int i = 0; i < movieArray.length(); i++) {\n JSONObject individualMovie = movieArray.getJSONObject(i);\n int movieId = individualMovie.optInt(\"id\");\n String posterPath = individualMovie.optString(\"poster_path\", NA);\n String originalTitle = individualMovie.optString(\"original_title\", NA);\n String overview = individualMovie.optString(\"overview\", NA);\n String releaseDate = individualMovie.optString(\"release_date\", NA);\n double voteAverage = individualMovie.optDouble(\"vote_average\");\n\n //Create a new movie object if the movie has both an id and a relative path to the\n //movie poster image.\n if (movieId != 0 && !posterPath.equalsIgnoreCase(NA)) {\n movies.add(new Movie(movieId, posterPath, originalTitle,\n overview, releaseDate, voteAverage));\n }\n }\n return movies;\n\n } catch (JSONException e) {\n Log.e(LOG_TAG, \"Error parsing JSON data. \", e);\n return null;\n }\n }", "public void setMovie(String newMovie)\n {\n movie = newMovie;\n }", "private static List<Movie> extractMovies(String moviesJSON){\n if (TextUtils.isEmpty(moviesJSON)) {\n return null;\n }\n ArrayList<Movie> movies = new ArrayList<>();\n try {\n JSONObject baseJsonResponse = new JSONObject(moviesJSON);\n JSONArray moviesArray = baseJsonResponse.getJSONArray(\"results\");\n\n for (int i = 0; i < moviesArray.length(); i++) {\n JSONObject currentMovie = moviesArray.getJSONObject(i);\n String id = currentMovie.getString(\"id\");\n String title;\n String date;\n String poster_path;\n String vote_average;\n String overview;\n\n if(!currentMovie.getString(\"title\").equals(\"\"))\n title = currentMovie.getString(\"title\");\n else\n title = UNKNOWN_TITLE;\n\n if(!currentMovie.getString(\"release_date\").equals(\"\"))\n date = currentMovie.getString(\"release_date\").substring(0,10);\n else\n date = UNKNOWN_DATE;\n\n if(!currentMovie.getString(\"poster_path\").equals(\"\"))\n poster_path = IMAGE_URL + currentMovie.getString(\"poster_path\");\n else\n poster_path = UNKNOWN_POSTER_PATH;\n\n if(!currentMovie.getString(\"vote_average\").equals(\"\"))\n vote_average = String.valueOf(currentMovie.getDouble(\"vote_average\"));\n else\n vote_average = UNKNOWN_VOTE_AVERAGE;\n\n if(!currentMovie.getString(\"overview\").equals(\"\"))\n overview = currentMovie.getString(\"overview\");\n else\n overview = UNKNOWN_OVERVIEW;\n\n Movie movie = new Movie(id, title, date, poster_path, vote_average, overview);\n movies.add(movie);\n }\n\n }catch (JSONException e){\n Log.e(LOG_TAG,\"Error in fetching data\",e);\n }\n return movies;\n }", "public void setLatestCommentText(java.lang.String latestCommentText) {\n this.latestCommentText = latestCommentText;\n }", "public void setLastestVideoName(String videoPath){\n \t\tprogProps.setProperty(\"UMPD.latestVideo\", videoPath);\n \t\tSystem.setProperty(\"UMPD.latestVideo\", videoPath);\n \t\t//save the system properties again now in case of an error later\n \t\tsaveProperties();\n \t}", "public GetLatestMovieResponse getLatestMovie() {\n return getLatestMovie(null);\n }", "private void setLatestMarketData(String latestData) {\n\t\tlatestMarketData = latestData;\n\t}", "public static Movie convertToMovieObject(String movieJsonString) {\n try {\n JSONObject movieJson = new JSONObject(movieJsonString);\n int id = movieJson.optInt(ID, -1);\n String title = movieJson.optString(TITLE, \"\");\n String tempPath = movieJson.optString(POSTER_PATH, \"\");\n String posterPath = \"\";\n\n if (!tempPath.equals(\"\")) {\n posterPath = IMAGE_BASE_URL + tempPath;\n }\n\n String overview = movieJson.optString(OVERVIEW, \"\");\n double voteAverage = movieJson.optDouble(VOTE_AVERAGE, -1);\n String releaseDate = movieJson.optString(RELEASE_DATE, \"\");\n\n return new Movie(id, title, posterPath, overview, voteAverage, releaseDate);\n\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a detached, initialised MrktCmpttrRecord
public MrktCmpttrRecord(BigDecimal mrktId, BigDecimal cmpttrId, String crncyCd, String cmpttrBusTxt, String retlTyp, String mrktShrPctTxt, String cmpttnTyp, String bnchmrkClmsTxt, String trnvrAmtTxt, String strtgyTxt, String futrDirctnTxt, String plndMrktgInvstmtsTxt, String creatUserId, Date creatTs, String lastUpdtUserId, Date lastUpdtTs) { super(MrktCmpttr.MRKT_CMPTTR); setValue(0, mrktId); setValue(1, cmpttrId); setValue(2, crncyCd); setValue(3, cmpttrBusTxt); setValue(4, retlTyp); setValue(5, mrktShrPctTxt); setValue(6, cmpttnTyp); setValue(7, bnchmrkClmsTxt); setValue(8, trnvrAmtTxt); setValue(9, strtgyTxt); setValue(10, futrDirctnTxt); setValue(11, plndMrktgInvstmtsTxt); setValue(12, creatUserId); setValue(13, creatTs); setValue(14, lastUpdtUserId); setValue(15, lastUpdtTs); }
[ "public MrktCmpttrRecord() {\n\t\tsuper(MrktCmpttr.MRKT_CMPTTR);\n\t}", "public MailAttachmentRecord() {\n super(MailAttachment.MAIL_ATTACHMENT);\n }", "public MrktPromtnCmplncRecord(BigDecimal patrnId, BigDecimal mrktId, String patrnDescTxt, String patrnValTxt, BigDecimal patrnLen, String dcsnTag, BigDecimal patrnTypId, String creatUserId, Date creatTs, String lastUpdtUserId, Date lastUpdtTs) {\n\t\tsuper(MrktPromtnCmplnc.MRKT_PROMTN_CMPLNC);\n\n\t\tsetValue(0, patrnId);\n\t\tsetValue(1, mrktId);\n\t\tsetValue(2, patrnDescTxt);\n\t\tsetValue(3, patrnValTxt);\n\t\tsetValue(4, patrnLen);\n\t\tsetValue(5, dcsnTag);\n\t\tsetValue(6, patrnTypId);\n\t\tsetValue(7, creatUserId);\n\t\tsetValue(8, creatTs);\n\t\tsetValue(9, lastUpdtUserId);\n\t\tsetValue(10, lastUpdtTs);\n\t}", "public WERecordDataModel()\n\t{\n\t\tsuper();\n\t\tsetEqFileName(RECORD_NAME);\n\t\tinitMessages();\n\t}", "public MrktPromtnCmplncRecord() {\n\t\tsuper(MrktPromtnCmplnc.MRKT_PROMTN_CMPLNC);\n\t}", "public Record() {\n\t}", "public Record create()\n { return create(new byte[keyLength], \n (valueLength > 0) ? new byte[valueLength] : null) ;\n }", "public PawnTicketReissueRecord () {\n\t\tsuper();\n\t}", "public String create(StringBuffer sbXMLRecord) {\n\n\tString sUser = null;\n\tString sPassword = null;\n\tString sDatabase = null;\n\tString sSchema = null;\n\tString sRecordType = null;\n\tString sDisplayName = null;\n\tString sError = null;\n\tString sClient = null;\n\tCqProvider provider = null;\n\tCqRecord newTeamCqRecord = null;\n\tCqRecord createdTeamCqRecord = null;\n\tcqCreateInput xCqCreateInput = null;\n\tFeedback feedback = null;\n\tcqUsageMeasurement xCqUsageMeasurement = null;\n\tcqClientAuthorization xCqClientAuthorization = null;\n\tCqRecordType xRecordType = null;\n\t\n\ttry {\n\n\t\t// Process the data in XML.\n\t xCqCreateInput = new cqCreateInput(sbXMLRecord);\n\t sUser = xCqCreateInput.getCqUser().getUsername();\n\t sPassword = xCqCreateInput.getCqUser().getPassword();\n\t sDatabase = xCqCreateInput.getCqUser().getDatabase();\n\t sSchema = xCqCreateInput.getCqUser().getSchema();\n\t sClient = xCqCreateInput.getCqClient().getClientName();\n\t sRecordType = xCqCreateInput.getCqRecord().getRecordType();\n\n\t if (sUser == null) {\n\t \tthrow new Exception(\"User is null.\");\n\t }\n\t if (sPassword == null) {\n\t \tthrow new Exception(\"Password is null.\");\n\t }\n\t if (sDatabase == null) {\n\t \tthrow new Exception(\"Database is null.\");\n\t }\n\t if (sSchema == null) {\n\t \tthrow new Exception(\"Schema is null.\");\n\t }\n\t if (sClient == null) {\n\t \tthrow new Exception(\"Client is null.\");\n\t }\n\t if (sRecordType == null) {\n\t \tthrow new Exception(\"Record type is null.\");\n\t }\n\n\t // Construct the service name and validate.\n\t String sService = cqUtil.CREATE + \"-\" + sRecordType;\n\t cqUtil.validateService(sService);\n\n\t // Initialize the measurements collection.\n\t xCqUsageMeasurement = new cqUsageMeasurement(xCqCreateInput\n\t\t .getCqUser(), xCqCreateInput.getCqClient(), sService, true);\n\n\t // Check authorization for the service.\n\t xCqClientAuthorization = new cqClientAuthorization(xCqCreateInput\n\t\t .getCqUser(), xCqCreateInput.getCqClient(), sService);\n\t xCqClientAuthorization.checkAuthorization();\n\n\t // Initialize the CqRecord object.\n\t provider = getProvider(sUser, sPassword);\n\n\t // Get the requested CqRecordType from the requested database proxy.\n\t xRecordType = getCqRecordType(provider, sSchema, sDatabase, sRecordType);\n\n\t // get a new proxy CqRecord with a user friendly \"suggested\" location \n\t // of the requested type. Name has not been set yet.\n\t newTeamCqRecord = provider.cqRecord((StpLocation) xRecordType\n\t \t\t.getUserFriendlyLocation().child(\"new\"));\n\n\t feedback = new PropertyRequestItem.PropertyRequest(\n\t\t\t new PropertyNameList.PropertyName[] {CqRecord.DISPLAY_NAME,\n\t\t\t\t CqRecord.ALL_FIELD_VALUES, CqRecord.STABLE_LOCATION});\n\n\t // Creating the record with the requested properties, but not \n\t // delivering it yet, because required fields are yet to be set\n\t // this will establish a stable location, however (I think).\n\t createdTeamCqRecord = (CqRecord) newTeamCqRecord\n \t\t.doCreateRecord(feedback, CqProvider.HOLD);\n\n\t // Refresh proxy. Location may have changed from the user friendly \n\t // location\n\t // this worked before, but seems to lose the feedback now and the \n\t // entity appears missing in the db, at least for dip_revisions\n\t //createdTeamCqRecord = xRecordType.cqProvider()\n \t//.cqRecord(createdTeamCqRecord.getStableLocation());\n \n\t // Set the fields of the CqRequest.\n\t \n\t if (sRecordType.equals(\"dip_revision\")) {\n\t \t// First field indicates webservice, needed by dip_revision types \n\t \t// to turn off read-only, which only happens for webservices\n\t \tcreatedTeamCqRecord.setField(\"process_type\", \"webservice\");\n\t }\n\t \n\t xCqCreateInput.getCqRecord().populateFields(createdTeamCqRecord);\n\t // Commit the record.\n\t createdTeamCqRecord = (CqRecord) createdTeamCqRecord\n\t \t.doWriteProperties(feedback, CqProvider.DELIVER);\n\n\t // Display name as the id \"<DBNAME>000nnnnn\" format.\n\t sDisplayName = createdTeamCqRecord.getDisplayName();\n\n\t // Update CQ database that the client just used \"create\"\n\t // service.\n\t cqSysAppUsage xCqSysAppUsage = new cqSysAppUsage(sService, sClient,\n\t\t sUser);\n\t xCqSysAppUsage.recordUsageToCQ(provider, sSchema, sDatabase);\n\n\t // Release the resource.\n\t if (provider != null) {\n\t\tprovider.terminate();\n\t }\n\n\t // Finish the measurements collection.\n\t xCqUsageMeasurement.record();\n\n\t} catch (Exception e) {\n\t StringWriter sw = new StringWriter();\n\t e.printStackTrace(new PrintWriter(sw, true));\n\t try {\n\t\tsError = cqUtil.filterXMLReservedChars(sw.toString());\n\t } catch (Exception ignore) {\n\t\tsError = sw.toString();\n\t }\n\t} finally {\n\t provider = null;\n\t newTeamCqRecord = null;\n\t createdTeamCqRecord = null;\n\t xCqCreateInput = null;\n\t xCqUsageMeasurement = null;\n\t xCqClientAuthorization = null;\n\t}\n\treturn getCreateResponse(sDisplayName, sError).toString();\n }", "public abstract T createRecord();", "public\r\nMBRecord(Name name, int dclass, long ttl, Name mailbox) {\r\n\tsuper(name, Type.MB, dclass, ttl, mailbox, \"mailbox\");\r\n}", "private void prepareNewEntry() throws Exception {\r\n recordPreviousEntryIfExists();\r\n entry = createNewEntry();\r\n entryMsgBuffer = new StringBuilder(80);\r\n entry.setUserDefinedFields(new HashMap<String, Object>(1)); // Create an empty Map with only one element allocated\r\n }", "private ExchangeRecord(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "public M csrRecordSubjectNull(){if(this.get(\"csrRecordSubjectNot\")==null)this.put(\"csrRecordSubjectNot\", \"\");this.put(\"csrRecordSubject\", null);return this;}", "public MessageRecord() {\n super(Message.MESSAGE);\n }", "public ContactRecord() {\n super(Contact.CONTACT);\n }", "public StmRecomRecord() {\n super(StmRecom.STM_RECOM);\n }", "public Record create(FieldSet recordData) throws Exception {\n\t\t\t// Prep the record data.\n\t\t\tFieldSet finalRecordData = getDefaultData();\n\t\t\tthis.addStamp(recordData);\t\t\t\n\t\t\tfinalRecordData.putAll(recordData);\n\t\t\tArrayList<HashMap<String, String>> listOfMaps = new ArrayList<HashMap<String, String>>();\n\t\t\tlistOfMaps.add(prepForREST(finalRecordData));\n\t\t\t// TODO: This is a terrible hack. Fix email address relationship\n\t\t\t// handling.\n\t\t\trecordData.remove(\"emailAddress\");\n\t\t\tVoodooUtils.voodoo.log.info(\"Maps ready. Creating \"\n\t\t\t\t\t+ listOfMaps.size() + \" records.\");\n\t\t\t// Create the record.\n\t\t\tWsRestV10 rest = new WsRestV10();\t\t\t\n\t\t\tint totalCount = rest.getTotalCount(moduleNamePlural);\t\t\t\n\t\t\tVoodooUtils.voodoo.log.info(\"Before create: totalCount = \"\n\t\t\t\t\t+ totalCount);\n\t\t\trest.create(moduleNamePlural, listOfMaps);\n\t\t\t\n\t\t\ttotalCount = rest.getTotalCount(moduleNamePlural);\n\t\t\tVoodooUtils.voodoo.log.info(\"After create: totalCount = \"\n\t\t\t\t\t+ totalCount);\t\t\n\t\t\t// Return the record.\n\t\t\treturn (Record) Class.forName(RecordsModule.this.recordClassName)\n\t\t\t\t\t.getConstructor(FieldSet.class).newInstance(recordData);\n\t\t}", "public ACARSRecord() {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Throw an Intent to the MyMessagesActivity class. The FLAG_ACTIVITY_CLEAR_TOP flag is set, which ensures that no more than one instance of such a class will be created for the current task stack.
public void myMessages(View v) { Intent intent = new Intent(RootMenuActivity.this, MyMessagesActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); }
[ "public static void pushWithClearTop(Activity activity, Intent objIntent) {\n objIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n activity.startActivity(objIntent);\n activity.finish();\n activity.overridePendingTransition(R.anim.pull_in_left, R.anim.push_out_right);\n }", "private void moveToMessages() {\n Intent intent2 = new Intent(userFirends_Activity.this, CurrentMessages.class);\n startActivity(intent2);\n\n }", "@TargetApi(Build.VERSION_CODES.JELLY_BEAN)\n @Override\n public Intent getParentActivityIntent() {\n return super.getParentActivityIntent().addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n }", "private void goToActivity (Class activity)\n {\n Intent intent = new Intent(this, activity);\n //if (model.mam.activityIsAlreadyOpened(activity)) intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n }", "public static void finish() {\n if (null != topActivity && null != topActivity.get()) {\n finish(topActivity.get());\n }\n }", "private void commitIntentToActivityAndFinish(Class to)\r\n {\r\n Intent intent = new Intent(this, to);\r\n startActivity(intent);\r\n finish();\r\n }", "private void goToInbox() {\n\n Logger.d(TAG, \"goToInbox()\");\n\n // in case the screen was not created by the inbox screen (but by a new\n // message notification)\n if (!screenLaunchedByInbox) {\n // block other threads from entering while the flag is updated\n synchronized (this) {\n\n if (!goToInboxCalled) {\n goToInboxCalled = true;\n // launch the inbox screen only of not launch before\n Intent intent = new Intent(getApplicationContext(),\tInboxActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n }\n }\n }\n finish();\n\n Logger.d(TAG, \"goToInbox() ended\");\n }", "@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)\n public static void goToIntent(Context ctx, Class<?> clazz) {\n Intent intent = new Intent(ctx, clazz);\n ctx.startActivity(intent);\n ((Activity) ctx).setResult(Activity.RESULT_CANCELED);\n ((Activity) ctx).finishAffinity();\n }", "public static void pop() {\n Activity activity = STACK.popFromStack();\n if (activity != null) {\n activity.finish();\n }\n Logger.i(TAG, \"pop = \" + activity);\n }", "private void goChatActivity() {\n Intent i = new Intent(this, ChatActivity.class);\n startActivity(i);\n }", "@Override\n public void startActivity(Intent intent) {\n startActivity(intent, null);\n }", "static Intent[] makeMessageIntentStack(Context context) {\r\n\t // A typical convention for notifications is to launch the user deeply\r\n\t // into an application representing the data in the notification; to\r\n\t // accomplish this, we can build an array of intents to insert the back\r\n\t // stack stack history above the item being displayed.\r\n\t Intent[] intents = new Intent[2]; // was 4 but not sure what 2 and 3 do.\r\n\r\n\t // First: root activity of notification's activity.\r\n\t // This is a convenient way to make the proper Intent to launch and\r\n\t // reset an application's task.\r\n\t intents[0] = Intent.makeRestartActivityTask(new ComponentName(context,\r\n\t com.tutorial.aaronpractice.Menu.class));\r\n\r\n\t // \"App\" ??\r\n\t //intents[1] = new Intent(context, com.tutorial.aaronpractice.Menu.class);\r\n\t //intents[1].putExtra(\"com.tutorial.aaronpractice.Menu.Path\", \"App\");\r\n\t \r\n\t // \"App/Notification\" ??\r\n\t //intents[2] = new Intent(context, com.tutorial.aaronpractice.Menu.class);\r\n\t //intents[2].putExtra(\"com.tutorial.aaronpractice.Menu.Path\", \"App/Notification\");\r\n\r\n\t // Now the activity to display to the user. Also fill in the data it\r\n\t // should display.\r\n\t intents[1] = new Intent(context, StatusBar.class);\r\n\r\n\t return intents;\r\n\t}", "public static <T> Intent getHomeIntent(Context context, Class<T> activity) {\r\n Intent intent = new Intent(context, activity);\r\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\r\n return intent;\r\n }", "private static void addInStackAndStartActivity(Activity activity, Intent intent)\n {\n stack.add(intent);\n activity.startActivity(stack.get(stack.size() - 1).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));\n\n }", "private void navigateToConversationsActivity() {\n startActivity(this.conversationsIntent);\n }", "public void openNewActivity(){\r\n Intent intent = new Intent(this, MainActivity.class);\r\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\r\n startActivity(intent);\r\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(MainActivity.this, OrderActivity.class);\n intent.putExtra(EXTRA_ORDER_KEY, mOrderMessage);\n startActivity(intent);\n }", "@Override\n public void startActivity(Intent intent) {\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);\n super.startActivity(intent);\n }", "private void composeMessage() {\n\n Log.d(\"TimelineActivityDebug\", \"About to enter the ComposeActivity\");\n\n Intent tweetIntent = new Intent(this, ComposeActivity.class);\n\n\n\n startActivityForResult(tweetIntent, COMPOSE_TWEET_REQUEST_CODE);\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the parameters of a single Backup.
public com.google.longrunning.Operation updateBackup( com.google.cloud.alloydb.v1alpha.UpdateBackupRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getUpdateBackupMethod(), getCallOptions(), request); }
[ "BackupPolicy.Update update();", "public abstract void updateBackup() throws OperationInterruptedException;", "Update withBackupDriveManifest(Boolean backupDriveManifest);", "public void setBackupId(String backupId) {\n this.backupId = backupId;\n }", "public void setbackupdone(String customerid){\n\t\t\n\t\t/*String query = \" update Customer as c set c.backup=1 where c.customerId='\"+ customerid + \"'\";*/\n\t\tString query = \"update customer c set c.backup=1 where c.customerId='\"+customerid+\"' \";\n\t\tDBConnection dbc = null;\n\t\ttry {\n\t\t\tdbc = new DBConnection();\n\t\t\tdbc.openConnection();\n\t\t\tSession session = dbc.getSession();\n\t\t\tQuery q = session.createSQLQuery(query);\n\t\t\tTransaction tx = session.beginTransaction();\n\t\t\tq.executeUpdate();\n\t\t\ttx.commit();\n\t\t} catch (Exception e) {\n\t\t\tLogUtil.error(\"Error while saving backup Info in customer: \"+e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\tdbc.closeConnection();\n\t\t}\n\n\t}", "interface WithBackupDriveManifest {\n /**\n * Specifies the backupDriveManifest property: Indicates whether the manifest files on the drives should be\n * copied to block blobs..\n *\n * @param backupDriveManifest Indicates whether the manifest files on the drives should be copied to block\n * blobs.\n * @return the next definition stage.\n */\n Update withBackupDriveManifest(Boolean backupDriveManifest);\n }", "Update withDailyBackupsToKeep(Integer dailyBackupsToKeep);", "public void setBackupLocation(String backupLocation) {\n this.backupLocation = backupLocation;\n }", "public void updateBankParameter(BankParameterData bankParameterData);", "public void setBackup( int model, ProjectModel backup ) {\n \tif( backup == null ){\n \t\tbackups.remove( models );\n \t}\n \telse{\n \t\tbackups.put( model, backup );\n \t}\n \t\n \tif( model < models.size() ){\n \t\tmodels.get( model ).backup = backup;\n \t}\n }", "Update withWeeklyBackupsToKeep(Integer weeklyBackupsToKeep);", "public void setBackup(boolean fBackup)\n {\n m_fBackup = fBackup;\n }", "public void setBackups(boolean isbackup)\n\t\t\tthrows WindowsAzureInvalidProjectOperationException {\n\t\tElement ele = getCachedNode();\n\t\tString backup = \"0\";\n\t\tif (isbackup) {\n\t\t\tbackup = \"1\";\n\t\t}\n\n\t\tString newCache = JSONHelper.setParamValue(getCache(), \"secondaries\",\n\t\t\t\tbackup);\n\t\tele.setAttribute(WindowsAzureConstants.ATTR_VALUE, setCache(newCache));\n\t\tthis.isBackup = isbackup;\n\t}", "interface Update\n extends UpdateStages.WithTags,\n UpdateStages.WithDailyBackupsToKeep,\n UpdateStages.WithWeeklyBackupsToKeep,\n UpdateStages.WithMonthlyBackupsToKeep,\n UpdateStages.WithEnabled {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n BackupPolicy apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n BackupPolicy apply(Context context);\n }", "Update withMonthlyBackupsToKeep(Integer monthlyBackupsToKeep);", "public void setBackupType(String BackupType) {\n this.BackupType = BackupType;\n }", "public void setBackupName(String backupName) {\n this.backupName = backupName;\n }", "public static void updateBackup(String type) {\n conn = getConnection();\n try {\n // create the java mysql update preparedstatement\n String query = \"INSERT INTO last_backup_timestamps (backup_name, backup_timestamp) VALUES (?, NOW());\";\n PreparedStatement preparedStmt = conn.prepareStatement(query);\n preparedStmt.setString(1, type);\n\n // execute the java preparedstatement\n preparedStmt.executeUpdate();\n\n conn.close();\n } catch (Exception e) {\n if (e.toString().contains(\"Duplicate entry '\" + type + \"' for key 'PRIMARY'\")) {\n // Try updating instead of inserting.\n try {\n // create the java mysql update preparedstatement\n String query = \"UPDATE last_backup_timestamps SET backup_timestamp = NOW() WHERE backup_name = ?\";\n PreparedStatement preparedStmt = conn.prepareStatement(query);\n preparedStmt.setString(1, type);\n\n // execute the java preparedstatement\n preparedStmt.executeUpdate();\n\n conn.close();\n } catch (Exception e2) {\n System.err.println(\"Exception trying to update the backup timestamp: \" + e.getMessage());\n } finally {\n closeConnection(conn);\n }\n } else {\n System.out.println(\"Error trying to update last backup timestamp for \" + type + \": \" + e);\n }\n } finally {\n closeConnection(conn);\n }\n }", "@Override\n public TransferReversal update(Map<String, Object> params) throws StripeException {\n return update(params, (RequestOptions) null);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the customerName value for this Address.
public java.lang.String getCustomerName() { return customerName; }
[ "public String customerName() {\n return this.innerProperties() == null ? null : this.innerProperties().customerName();\n }", "public String getCustomerName() {\n return (String) getAttributeInternal(CUSTOMERNAME);\n }", "public String getCustomerName() {\r\n return name.getName();\r\n }", "public String getCustomerName()\n\t{\n\t\treturn getCustomer();\n\t}", "public String getCustomerName()\n\t{\n\t\treturn name;\n\t}", "public String getName() {\n\n return customername;\n }", "public String getCustomerName()\n\t{\n\t\treturn getColumn(OFF_CUSTOMER_NAME, LEN_CUSTOMER_NAME) ;\n\t}", "public String getCustomerName()\n\t{\n\t\treturn wCustomerName;\n\t}", "String getName() {\n\t\treturn customer.getName();\n\t}", "public String getName() {\n return this.currentCustomer.getName();\n }", "public String getCustomername() {\n return customername;\n }", "public String customerDisplayName() {\n return this.innerProperties() == null ? null : this.innerProperties().customerDisplayName();\n }", "public static String getCustomerAddress() {\n\t\treturn customerAddress;\n\t}", "public String getName()\n {\n return customer;\n }", "public java.lang.String getCustomerId(\r\n ) {\r\n return this._customerId;\r\n }", "public String getCustname() {\r\n return custname;\r\n }", "public String getCustomersName()\r\n {\r\n return customersName;\r\n }", "public String getCustomer()\n {\n return name;\n }", "public String getCustomerAddress() {\n return customerAddress;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Drops this collection, removing all of the documents it contains from the DB
public void drop() { this.name = null; this.file.delete(); this.documents.clear(); }
[ "private void removeAllDocuments () {\n\t\tLOG.info(\"Remove all documents in collection : \" + COLLECTION_NAME);\n\t\t\n\t try {\n\t \tMongoClient mongoClient = new MongoClient(new MongoClientURI(SERVER_URL));\n\t \tMongoDatabase database = mongoClient.getDatabase(DATABASE_NAME);\n\t \tMongoCollection<Document> collection = database.getCollection(COLLECTION_NAME);\n\t \t\n//\t \tcollection.deleteMany(null);\n\t \tcollection.drop();\n\t \t\n\t \tmongoClient.close();\n\t \tLOG.info(\"MongoDB : all documents are deleted in collection : \" + COLLECTION_NAME);\n\t \t\n\t } catch (Exception error) {\n\t \terror.printStackTrace();\n\t \tLOG.severe(error.getClass().getName() + \": \" + error.getMessage());\n\t \tSystem.exit(0);\n\t }\n\t}", "public void drop() {\n if (collection != null) {\n collection.drop();\n }\n }", "public void clearCollection() {\n\t\tMongoDatabase db = mongoClient.getDatabase(MongoActions.props.getDBName());\n\t\tMongoCollection<Document> table = db.getCollection(MongoActions.props.getCollectionName());\n\t\ttable.drop();\n\t}", "public void drop() {\n try {\n executor.execute(new DropCollectionOperation(getNamespace(), getWriteConcern()), getReadConcern());\n } catch (MongoWriteConcernException e) {\n throw createWriteConcernException(e);\n }\n }", "void remove() {\n fs.getFilesCollection().remove(new BasicDBObject(\"_id\", id));\n fs.getChunksCollection().remove(new BasicDBObject(\"files_id\", id));\n }", "public void clearDatabase() {\n\n\t\tObjectSet<Article> articles = db.query(Article.class);\n\t\tarticles.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<CreditCard> creditCards = db.query(CreditCard.class);\n\t\tcreditCards.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<Customer> customers = db.query(Customer.class);\n\t\tcustomers.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<Order> orders = db.query(Order.class);\n\t\torders.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<OrderDetail> orderDetails = db.query(OrderDetail.class);\n\t\torderDetails.stream()\n\t\t\t.forEach(db::delete);\n\t\t\n\t\tSystem.out.println(\"\\nBase de dades esborrada per complet\");\n\t}", "@Override\n\tpublic void removeAll() {\n\t\tfor (vdocField vdocField : findAll()) {\n\t\t\tremove(vdocField);\n\t\t}\n\t}", "public void deleteAllFromDB() {\r\n for (int i = 0; i < uploads.size(); i++) {\r\n FileUtil.deleteFile(uploads.get(i).getFilepath());\r\n }\r\n super.getBasebo().remove(uploads);\r\n }", "public void clearDatabase() {\n new ExecutionEngine(this.database).execute(\"MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE r, n\");\n }", "public void deleteAll() {\n log.info(\"Clear book repo\");\n bookRepository.deleteAll();\n }", "void dropCollection( String name);", "protected void purge () {\n purgeDBs(Collections.singleton(_dbpre));\n _subdbs.remove(_dbpre);\n }", "public void delete(){\n\n //search for folder references, and remove them\n for(NoteFolder noteFolder : getLinkedNoteFolders()){\n noteFolder.removeFromCollection(getName());\n }\n\n //delete this collection from storage\n savedInfoFile.delete();\n }", "public void deleteAllContents()\n {\n // Delete all contents in document\n this.docContents = new List();\n }", "public void clear() {\n collection.clear();\n }", "@Override\n public void clearStorage() throws StorageException {\n \tif(mongoClient!=null){\n \t\tmongoClient.dropDatabase(DB_NAME);\t\n \t}\n \tclose();\n }", "private void cleanDB() {\n // the database will contain a maximum of MAX_DB_SIZE wallpapers (default N=50)\n // when the db gets bigger then N, the oldest wallpapers are deleted from the database\n // the user will set if he wants to delete also the wallpaper or the database entry only\n if (maxDbSize != -1 && getOldWallpapersID().size() > maxDbSize) {\n try (ResultSet rs = db.executeQuery(\"SELECT wp FROM WALLPAPERS ORDER BY date FETCH FIRST 20 PERCENT ROWS ONLY\")) {\n while (!keepWallpapers && rs.next()) {\n Wallpaper wp = (Wallpaper) rs.getObject(\"wp\");\n log.log(Level.FINEST, wp::toString);\n log.log(Level.FINE, () -> \"Cleaning of DB, removing \" + wp.getID());\n\n new File(wp.getPath()).delete();\n }\n db.executeUpdate(\"DELETE FROM WALLPAPERS WHERE id IN (SELECT id FROM WALLPAPERS ORDER BY date fetch FIRST 20 PERCENT rows only)\");\n\n } catch (SQLException throwables) {\n log.log(Level.WARNING, \"Query Error in cleanDB()\");\n log.log(Level.FINEST, throwables.getMessage());\n }\n }\n }", "@Before\n public void beforeTest() {\n collection = mongoDB.getCollection(\"assets\");\n collection.remove(new BasicDBObject());\n\n }", "public final void clean() {\n distributed_graph.unpersist(true);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the light has shadow casting enabled.
public boolean isShadowCastingEnabled() { return this.enableShadows; }
[ "public boolean hasShadow() {\n\t\treturn !hasElevation() && getShadowRadius() > 0.0f;\n\t}", "public final boolean getShadowEnabled() {\n return mShadowEnabled;\n }", "public boolean getDisplayShadows();", "public Boolean getShadow() {\r\n\t\treturn shadow;\r\n\t}", "public boolean isHasLight() {\n\t\treturn hasLight;\n\t}", "boolean hasShadowRules();", "public boolean isShadowItem()\n\t{\n\t\treturn (_mana >= 0);\n\t}", "public boolean getExternalShadowDelayEnabled() {\n buffer[0] = (byte) I2Cdev.readBit(MPU6050_Registers.MPU6050_RA_I2C_MST_DELAY_CTRL, MPU6050_Registers.MPU6050_DELAYCTRL_DELAY_ES_SHADOW_BIT);\n return buffer[0] == 1;\n }", "boolean getLightOn();", "@GSLWhitelistMember\n public boolean isGlowing() {\n return internal.isGlowing();\n }", "private Boolean inShadow(Light light, HitRecord hitRecord, Stack<Matrix4f> modelView) {\n Vector4f lightVector = new Vector4f(light.getPosition()).sub(new Vector4f(hitRecord.getP()));\n lightVector.normalize();\n float fudge = 0.01f;\n Vector4f start = new Vector4f(new Vector4f(hitRecord.getP()).add(lightVector.mul(fudge)));\n Vector4f direction = new Vector4f(lightVector);\n Ray ray = new Ray(start, direction);\n HitRecord shadowHitRecord = root.intersect(ray, modelView);\n return shadowHitRecord.isHit();\n }", "public boolean isLightEnabled() {\n return mLightEnabled;\n }", "public boolean isStaticLight();", "public boolean isGlow() {\n return glow;\n }", "public boolean isGlowing() {\n return _glowing;\n }", "public void setDrawShadows(boolean a) {\n\t\tthis.shadows = a;\n\t}", "public boolean isGlowing() {\r\n return isGlowing;\r\n }", "public abstract boolean canInteractWithLight();", "public void setShadow(boolean shadow) {\n this.shadow = shadow;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/here used a loop to place and the number of segments defined by a constant
private void caterpillar(int segments) { for (int i= 0; i<SEGMENTS; i++){ creatingCircle(i); } }
[ "private void createSegments () {\n // this call will remove each segment from the MarkerChangeListener list\n // of the start and end Marker objects of the segment. If we don't do\n // this the segments will not be garbage collected.\n stopSegmentsListening ();\n\n segments = new FeatureSegmentVector ();\n\n final Location location = getLocation ();\n\n final RangeVector ranges = location.getRanges ();\n\n for (int i = 0 ; i < ranges.size () ; ++i) {\n final Range this_range = ranges.elementAt (i);\n\n segments.add (makeSegment (this_range));\n }\n\n startSegmentsListening ();\n }", "Segment segmentAt(int n);", "private void processSegment() {\n double total = 0;\n for (int i = 0; i < 12; ++i) total += segment_totals[i];\n if (total > 0) {\n for (int i = 0; i < 12; ++i) segment_totals[i] /= total;\n }\n for (int f = 0; f < filters.size(); ++f) {\n KeyProbabilityFilter filter = (KeyProbabilityFilter)filters.get(f);\n filter.add(segment_totals);\n } \n segment_size = 0;\n for (int i = 0; i < segment_totals.length; ++i) {\n segment_totals[i] = 0;\n } \n }", "public int getSegment();", "public int numberOfSegments() {\r\n\t return linesegcount;\t\r\n\t}", "protected abstract void renderSegment(DrawContext drawContext, Rectangle segmentArea, int segmentIndex, int numberOfVisibleSegments);", "int getMaxSegments();", "public void setTotalSegments(int value) {\n this.totalSegments = value;\n }", "private void genSegmentNumber(int size) {\n\n int temp = size << 19;\n virtualAddress = virtualAddress | temp;\n }", "public int numberOfSegments() {\n return line.size(); \n \n }", "public void updateSegmentsIndexes() {\n\t\t\tint segmentIndex = 0;\n\t\t\tfor(Contour contour: getContours()) {\n\t\t\t\tfor(Node node: contour.getNodes()) {\n\t\t\t\t\tSegment seg = node.getNextSegment();\n\t\t\t\t\tseg.setSegmentIndex(segmentIndex++);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private void splitEmptySegments(ArrayList<DataSegment> segments, int maxLength) { \n for (int i=0;i<segments.size();i++) {\n DataSegment segment=segments.get(i);\n if (segment.containsData()) continue; // don't split segments that have already been filled with data\n if (segment.getSize()>maxLength) { // this empty segment should be split up\n int segmentSize=segment.getSize();\n int parts=(int)Math.ceil((double)segmentSize/(double)maxLength);\n int subsegmentsize=(int)Math.ceil((double)segmentSize/(double)parts);\n //engine.logMessage(\"Splitting segment of size (\"+segmentSize+\") into \"+parts+\" segments of size \"+subsegmentsize);\n segments.remove(i);\n int j=i;\n int offset=0;\n for (;j<i+parts;j++) {\n DataSegment subsegment=segment.getEmptySubSegment(offset, subsegmentsize);\n segments.add(j, subsegment);\n offset+=subsegmentsize;\n }\n i=j; \n }\n }\n }", "public void createAdjLists() {\n int upSegment, downSegment, rightSegment;\n\n for(int i = 0; i < vertices; i++) {\n if(i % n != n - 1) {\n upSegment = i + n;\n if (upSegment < vertices && !potholeLocations.contains(upSegment))\n adjSegList[i].add(upSegment);\n\n downSegment = i - n;\n if (downSegment >= 0 && !potholeLocations.contains(downSegment))\n adjSegList[i].add(downSegment);\n\n rightSegment = i + 1;\n if (rightSegment < vertices && !potholeLocations.contains(rightSegment))\n adjSegList[i].add(rightSegment);\n }\n }\n }", "public int numberOfSegments() {\n return lineSeg.size();\n }", "public int getNumDataSegments();", "public LinkedList<Point> segmentsToDraw() {\n LinkedList<Point> segmentCoordinates = new LinkedList<Point>();\n for (int segment = 1; segment <= snakeSize; segment++) {\n //search array for each segment number\n for (int x = 0; x < maxX; x++) {\n for (int y = 0; y < maxY; y++) {\n if (snakeSquares[x][y] == segment) {\n //make a Point for this segment's coordinates and add to list\n Point p = new Point(x * SnakeGame.getSquareSize(), y * SnakeGame.getSquareSize());\n segmentCoordinates.add(p);\n }\n }\n }\n }\n return segmentCoordinates;\n\n }", "void setStartSegment(int startSegment);", "public int numberOfSegments() {\n return lineSegs.length;\n }", "public void startSnake()\n {\n int thisA = (150+1260)/2; //705\n int thisB = (150+630)/2 -195; //195\n \n for(int i=0 ; i<3; i++)\n {\n list.add(new Location(thisA,thisB));\n //drawSegment(g,thisA,thisB);\n thisB += 15;\n \n }\n head.setA(thisA);\n head.setB(thisB-15); //to adjust for the extra +15 at the end of the last for loop run through \n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'TransferSerials' field.
public java.util.List<TransferSerial> getTransferSerials() { return TransferSerials; }
[ "public java.util.List<TransferSerial> getTransferSerials() {\n return TransferSerials;\n }", "public void setTransferSerials(java.util.List<TransferSerial> value) {\n this.TransferSerials = value;\n }", "public boolean hasTransferSerials() {\n return fieldSetFlags()[3];\n }", "public Builder setTransferSerials(java.util.List<TransferSerial> value) {\n validate(fields()[3], value);\n this.TransferSerials = value;\n fieldSetFlags()[3] = true;\n return this; \n }", "@Override\n\tpublic long getSerialNums() {\n\t\treturn _available.getSerialNums();\n\t}", "public native String[] getDeviceSerials();", "public List<SerialInfo> getSerialInfoList() {\n\t\treturn serialInfoList;\n\t}", "public Integer getDepSerial() {\n return depSerial;\n }", "public java.lang.String getSerial() {\n return serial;\n }", "public int getSerial() {\n\t\treturn serial;\n\t}", "public java.lang.String getSerialNo () {\n\t\treturn serialNo;\n\t}", "public String getSerdes() {\n return serdes;\n }", "public java.lang.String getTransferNumber()\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(TRANSFERNUMBER$10, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "java.lang.String getSerial();", "public String getSerialNo() {\r\n return serialNo;\r\n }", "public java.lang.Integer getSerialNo() {\n return serialNo;\n }", "public String getSerialNo() {\n return serialNo;\n }", "public String getTransSerialNumber() {\n return transSerialNumber;\n }", "@GET\n @Path(\"/transmissions\")\n public Collection<String> getTransmissions() {\n return em.createNamedQuery(DISTINCT_TRANSMISSIONS, String.class).getResultList();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a value, but if the value isn't there, it reserves the slot where it will go with a new instance where the key matches, but the type is a unique value. Threading: not synchronized for main path where get is finding an element. Since elements are never updated, there is no race if an element is found. And it doesn't matter if the table is resized (if the element is found). If it is not found, or a reserve is found, need to get the lock, and start over if resized, or continue from reserved or null spot if not
FeatureStructureImpl getReserve(final int key, final int hash) { boolean isLocked = false; final int[] probeInfo = probeInfoGet.get(); try { retry: while (true) { // loop back point after locking against updates, to re-traverse the bucket chain from the beginning resetProbeInfo(probeInfo); final FeatureStructureImpl m; final FeatureStructureImpl[] localTable = table; if (isReal(m = find(localTable, key, hash, probeInfo))) { return m; // fast path for found item } // is reserve or null. Redo or continue search under lock // need to do this for reserve-case because otherwise, could // wait, but notify could come before wait - hence, wait forever if (!isLocked) { lock.lock(); isLocked = true; } /***************** * LOCKED * *****************/ final FeatureStructureImpl[] localTable3; if (localTable != table) { // redo search from top, because table resized resetProbeInfo(probeInfo); localTable3 = table; } else { localTable3 = localTable; } // // re acquire the FeatureStructure m, because another thread could change it before the lock got acquired // final FeatureStructureImpl m2 = localTable[probeInfo[PROBE_ADDR_INDEX]]; // if (isReal(m2)) { // return m2; // another thread snuck in before the lock and switched this // } // note: localTable not used from this point, unless reset // note: this "find" either finds from the top (if size changed) or finds from current spot. final FeatureStructureImpl m2 = find(localTable3, key, hash, probeInfo); if (isReal(m2)) { return m2; // fast path for found item } while (isReserve(m2)) { final FeatureStructureImpl[] localTable2 = table; // to see if table gets resized // can't wait on reserved item because would need to do lock.unlock() followed by wait, but // inbetween these, another thread could already do the notify. try { /********** * WAIT * **********/ lockCondition.await(); // wait on object that needs to be unlocked } catch (InterruptedException e) { } // at this point, the lock was released, and re-aquired if (localTable2 != table) { // table was resized continue retry; } final FeatureStructureImpl m3 = localTable2[probeInfo[PROBE_ADDR_INDEX]]; if (isReserve(m3)) { continue; // case = interruptedexception && no resize && not changed to real, retry } return m3; // return real item } /************* * RESERVE * *************/ // is null. Reserve this slot to prevent other "getReserved" calls for this same instance from succeeding, // causing them to wait until this slot gets filled in with a FS value // Use table, not localTable, because resize may have occurred table[probeInfo[PROBE_ADDR_INDEX]] = new TOP(key, RESERVE_TOP_TYPE_INSTANCE); incrementSize(); return null; } } finally { if (isLocked) { lock.unlock(); } } }
[ "private HashTableNode<K, V> getNodeWithValue(V value) {\n if (size() == ??) {\n return null;\n }\n\n\t// This seems too tough for Sketch\n\tint bs = buckets.size();\n\tint b = {|this.size, this.currentCapacity, this.capacityGrowth,\n\t\t this.initialCapacity, bs|};\n\tfor (int i = ??; i < b; i++) {\n // for (int i = 0; i < buckets.size(); i++) {\n HashTableNode<K, V> current = buckets.get(i);\n\n while (current != null) {\n\t\tV v = current.getValue();\n\t\tboolean b2 = v.equals(value);\n if ({|b2, v == value|}) {\n // if (v.equals(value)) {\n return current;\n }\n current = current.getNext();\n }\n }\n\n return null;\n }", "public T get(K key) {\n if( cache.containsKey( key ) ) {\n return cache.get( key );\n } else {\n T desired = dataSource.get( key );\n if( cache.size() == capacity ) {\n evictElement( desired );\n }\n cache.put(key, desired);\n long currentRank = desired.getRank();\n Set<K> keySet = ranking.getOrDefault( currentRank, new LinkedHashSet<K>());\n keySet.add( key );\n ranking.put( currentRank, keySet );\n return desired;\n }\n }", "public V get(K key) \r\n\t{\r\n\t\tItem cur = map.get(key);\r\n\t\tif (cur == null)\r\n\t\t\treturn null;\r\n\r\n\t\tif (System.currentTimeMillis() > cur.expires)\r\n\t\t{\r\n\t\t\tmap.remove(cur.key);\r\n\t\t\tremoveItem(cur);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\tif(cur != startItem.next)\r\n\t\t\tmoveToHead(cur);\r\n\t\treturn (V)cur.value;\r\n\t}", "private V insertLockFree(K kkey, V value, boolean put) {\n\t\tHeadPointer<K, V> top = topStart, bottom = bottomStart;\n\t\tComparable<? super K> key = comparable(kkey);\n\t\tNode<K, V> prev = null;\n\t\tNode<K, V> newNode = null;\n\t\tif (!maintenance) {\n\t\t\t// if there is no maintenance then we have to raise the node within\n\t\t\t// the insert\n\t\t\tprev = getPrev(key, topStart.node, top.value, bottom.value);\n\t\t} else {\n\t\t\tprev = getPrevFast(key, topStart.node, top.value, bottom.value);\n\t\t}\n\t\tint c;\n\n\t\tfor (;;) {\n\t\t\tNode<K, V> next = prev.next;\n\t\t\tif (next == null)\n\t\t\t\t// end of the list\n\t\t\t\tc = -1;\n\t\t\telse {\n\t\t\t\tK nextKey = next.key;\n\t\t\t\tif (nextKey == null) {\n\t\t\t\t\t// marker, can't stop traversal here\n\t\t\t\t\tc = 1;\n\t\t\t\t} else\n\t\t\t\t\tc = key.compareTo(nextKey);\n\t\t\t}\n\t\t\tif (c == 0) {\n\t\t\t\t// found the node\n\t\t\t\tV val = next.value;\n\t\t\t\t// loop trying to finish the operation, if the value points to\n\t\t\t\t// the node,\n\t\t\t\t// then it has been physically removed, so exit loop and\n\t\t\t\t// continue traversal\n\t\t\t\twhile (val != next) {\n\t\t\t\t\tif (val != null) {\n\t\t\t\t\t\t// node is not marked deleted\n\t\t\t\t\t\tif (put) {\n\t\t\t\t\t\t\t// if a put, then update the value\n\t\t\t\t\t\t\tif (next.casValue(val, value)) {\n\t\t\t\t\t\t\t\treturn val;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// not a put so just return the value\n\t\t\t\t\t\t\treturn val;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// node is marked deleted, undelete it!\n\t\t\t\t\t\tif (next.casValue(val, value))\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tval = next.value;\n\t\t\t\t}\n\t\t\t} else if (c < 0) {\n\t\t\t\t// didn't find the key, so insert a new node\n\t\t\t\t// but only do it if we are not at a marker node\n\t\t\t\tif (prev.value != prev && prev.key != null) {\n\t\t\t\t\tnext = prev.next;\n\t\t\t\t\tif (newNode == null) {\n\t\t\t\t\t\tnewNode = new Node<K, V>(kkey, value);\n\t\t\t\t\t}\n\t\t\t\t\tnewNode.prev = prev;\n\t\t\t\t\tnewNode.next = next;\n\t\t\t\t\tif (prev.casNext(next, newNode)) {\n\t\t\t\t\t\tif (next != null) {\n\t\t\t\t\t\t\tnext.prev = newNode;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!maintenance) {\n\t\t\t\t\t\t\t// no maintenance, so must raise the node here\n\t\t\t\t\t\t\traiseLevels(key, newNode, top, bottom.value);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// We were not at the right prev node, so continue traversal!\n\t\t\t// Will do helping in here\n\t\t\tprev = getPrevNode(key, prev, true);\n\t\t}\n\t}", "public V get(K key) {\n String hash = hash(key);\n acquireLock(hash);\n try {\n V value = internalGetValue(hash);\n if (value != null) {\n reused(hash);\n return value;\n }\n value = factory.create(key);\n internalSetValue(hash, value);\n addUsed(hash);\n return value;\n }\n finally {\n releaseLock(hash);\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic V get(K key) {\n\t\tint hash = key.hashCode() % hashTable.length;\n\t\tV info;\n\t\tV info2;\n\t\tV value = null;\n\n\t\tfor(int i = 0; i < hashTable[hash].size() ; i++) {\n\t\t\tinfo = (V) key;\n\t\t\tinfo2 = (V) hashTable[hash].get(i).getKey();\n\n\t\t\tif(hashTable[hash] == null)\n\t\t\t\tthrow new NoSuchElementException(\"Item does not exist\");\n\t\t\tif(info.equals(info2))\n\t\t\t\tvalue = hashTable[hash].get(i).getValue();\n\t\t}\n\t\tif(value == null)\n\t\t\tthrow new NoSuchElementException(\"Item does not exist\");\n\t\treturn value;\n\t}", "private Value lookupInCache(Row row)\n \t{\n \t\tValue tk = (Value) data.cache.get(row);\n \t\treturn tk;\n \t}", "public V get(K key) {\n int hashCode = scaledHashCode(key);\n OwnLinkedList<K, V> list = table[hashCode];\n if (list == null) {\n return null;\n }\n PairNode<K, V> result = list.search(key);\n if (result == null) {\n return null;\n }\n return result.getValue();\n }", "public Vector<V> find(K key)\r\n\t{\r\n\t\tint size = SIZES[sizeIdx];\r\n\r\n\t\t// Probe no more iterations than the size of the table\r\n\t\tfor (int i = 0; i < size; ++i)\r\n\t\t{\r\n\t\t\t// Compute the next index in the probe sequence\r\n\t\t\tint index = probe(key, i, size);\r\n\r\n\t\t\t// If we reach an empty slot, we know the key isn't in the table\r\n\t\t\tif (table[index] == null)\r\n\t\t\t{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t// If we find the key and it isn't a tombstone\r\n\t\t\telse if (table[index].key.equals(key) && !table[index].isTombstone)\r\n\t\t\t{\r\n\t\t\t\t// Return the vector of values for that slot\r\n\t\t\t\treturn table[index].value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// If we've been probing for a long time, the key probably isn't in the\r\n\t\t// table\r\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic CourseDBElement get(int crn) throws IOException {\r\n\t\tint key = Integer.toString(crn).hashCode()%getTableSize();\r\n\t\t \r\n\t\tif(hashTable[key] == null)\r\n\t\t\tthrow new IOException(\"Element is not in the table\");\r\n\t\telse {\r\n\t\t\tfor(int i = 0; i < hashTable[key].size(); i++) {\r\n\t\t\t\tif(hashTable[key].get(i).getCRN() == crn)\r\n\t\t\t\t\treturn hashTable[key].get(i);\r\n\t\t\t}\r\n\t\t\tthrow new IOException(\"Element is not in the table\");\r\n\t\t}\r\n\t}", "synchronized public T get(String id) throws NotFoundException {\n checkState();\n for (T element : buffer.keySet()) {\n if (element.id().equals(id)) {\n long cacheTime = System.currentTimeMillis() + timeout * 1000;\n buffer.replace(element, cacheTime);\n return element;\n }\n }\n throw new NotFoundException(\"No object with matching ID in cache.\");\n }", "public Hashable get(Hashable element){\n\t\tlocation = element.hash(size);\n\t\tresetCompares();\n\t\t\n\t\twhile (numCompares < size){ //Uses linear probing to find an element\n\t\t\tnumCompares++;\n\t\t\tif (element.equals(table[location]))\n\t\t\t\treturn table[location];\n\t\t\tlocation = (location+relativePrime) % size; \n\t\t}\n\t\treturn null;\n\t}", "private int findSlot(K key, boolean forAdd)\r\n\t{\r\n\t\tint slot = hash1(key);\r\n\t\tint step = hash2(key);\r\n\t\tint M = table.length;\r\n\t\t\r\n\t\tif (forAdd)\r\n\t\t{\r\n\t\t\t//TODO: is it possible that this will loop forever?\r\n\t\t\twhile (true)\r\n\t\t\t{\r\n\t\t\t\tMapEntry<K, V> e = table[slot];\r\n\t\t\t\tif(e == null || e == DUMMY) //we can override DUMMY\r\n\t\t\t\t{ \r\n\t\t\t\t\treturn slot;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tslot = (slot + step) % M;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//TODO: is it possible that this will loop forever?\r\n\t\t\twhile (table[slot] != null)\r\n\t\t\t{\r\n\t\t\t\tMapEntry<K, V> e = table[slot];\r\n\t\t\t\tif(key.equals(e.getKey()))\r\n\t\t\t\t{\r\n\t\t\t\t\treturn slot;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tslot = (slot + step) % M;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn -1;\r\n\t}", "public abstract Heaper fetchValue(int index);", "public V getValue(K key)\r\n\t{\r\n\t\tint slot = findSlot(key, false);\r\n\t\t\r\n\t\tif (slot < 0) \r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tMapEntry<K, V> e = table[slot];\r\n\t\treturn e.getValue();\r\n\t}", "private V getForNullKey() {\n for (Entry<K,V> e = table[0]; e != null; e = e.next) {\n if (e.key == null)\n return e.value;\n }\n return null;\n }", "@Override\n\t@TimeComplexity(\"O(n)\")\n\tpublic V put(K key, V value) {\n\t\t//calls findIndex which is O(log n)\n\t\t//in the case that an old entry is being replaced, only static actions follow\n\t\t//in the case a new entry is needed, the ArrayList.add() function must be called\n\t\t//this function is O(n) so this function is O(n)\n\t\t//depending on use, replacing entries could be more or less common, so it is not fair to say the expected complexity is O(log n)\n\t\t//but O(log n) will occur often in some use cases\n\t\t\n\t\tint n = findIndex(key);\n\t\tif (n < size() && key.compareTo( table.get(n).getKey()) == 0) {\n\t\t\tV temp = table.get(n).getValue();\n\t\t\ttable.get(n).setValue(value);\n\t\t\treturn temp;\n\t\t}\n\t\ttable.add(n, new mapEntry<K,V>(key,value));\n\t\treturn null;\n\t}", "private Node _locate(Object key){\n\t\tint hashCode = key.hashCode();\r\n\t\tint bucketNum = hashCode % _numBuckets;\r\n\t\treturn _locate(key, bucketNum);\r\n\t}", "@Override\r\n\tpublic V put(K key, V value) {\r\n\t\tint index = key.hashCode() % table.length;\r\n\t\tif(index < 0)\r\n\t\t\tindex += table.length;\r\n\t\t\r\n\t\tif(table[index] == null) {\r\n\t\t\t// Create a new Binary tree at table[index]\r\n\t\t\ttable[index] = new BinaryTree<Entry<K, V>>();\r\n\t\t}\r\n\t\t\r\n\t\t// Search the tree at table[index] to find the key.\r\n\t\tV oldValue = findForPut(table[index].root, key, value);\r\n\t\tif(oldValue != null)\r\n\t\t\treturn oldValue;\r\n\t\t\r\n\t\t// assert: key is not in the table, add new item.\r\n\t\ttable[index].root = addKey(table[index].root, key, value);\r\n\t\tnumKeys++;\r\n\t\tif(numKeys > (LOAD_THRESHOLD * table.length))\r\n\t\t\trehash();\r\n\t\t\r\n\t\treturn null;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A service used to create and manage token buckets.
public interface ITokenBucketService { public static final String KEY = "TokenBucketService"; /** * Create a token bucket. * @param capacity Capacity of the bucket. * @param speed Speed of the bucket. Bytes per millisecond. * @return <tt>null</tt> if fail to create. */ ITokenBucket createTokenBucket(long capacity, long speed); /** * Remove this bucket. * * @param bucket Bucket to remove */ void removeTokenBucket(ITokenBucket bucket); }
[ "ITokenBucket createTokenBucket(long capacity, long speed);", "protected void createBucket() {\n }", "Map<String, Object> createBucket(String key);", "BucketEntity createBucket(BucketEntity bucket);", "public interface MetadataService {\n\n /**\n * Creates the given bucket.\n *\n * @param bucket the bucket to create\n * @return the created bucket\n */\n BucketEntity createBucket(BucketEntity bucket);\n\n /**\n * Retrieves the bucket with the given id.\n *\n * @param bucketIdentifier the id of the bucket to retrieve\n * @return the bucket with the given id, or null if it does not exist\n */\n BucketEntity getBucketById(String bucketIdentifier);\n\n /**\n * Retrieves the buckets with the given name. The name comparison must be case-insensitive.\n *\n * @param name the name of the bucket to retrieve\n * @return the buckets with the given name, or empty list if none exist\n */\n List<BucketEntity> getBucketsByName(String name);\n\n /**\n * Updates the given bucket, only the name and description should be allowed to be updated.\n *\n * @param bucket the updated bucket to save\n * @return the updated bucket, or null if no bucket with the given id exists\n */\n BucketEntity updateBucket(BucketEntity bucket);\n\n /**\n * Deletes the bucket, as well as any objects that reference the bucket.\n *\n * @param bucket the bucket to delete\n */\n void deleteBucket(BucketEntity bucket);\n\n /**\n * Retrieves all buckets with the given ids.\n *\n * @param bucketIds the ids of the buckets to retrieve\n * @return the set of all buckets\n */\n List<BucketEntity> getBuckets(Set<String> bucketIds);\n\n /**\n * Retrieves all buckets.\n *\n * @return the set of all buckets\n */\n List<BucketEntity> getAllBuckets();\n\n // --------------------------------------------------------------------------------------------\n\n /**\n * Retrieves items for the given bucket.\n *\n * @param bucketId the id of bucket to retrieve items for\n * @return the set of items for the bucket\n */\n List<BucketItemEntity> getBucketItems(String bucketId);\n\n /**\n * Retrieves items for the given buckets.\n *\n * @param bucketIds the ids of buckets to retrieve items for\n * @return the set of items for the bucket\n */\n List<BucketItemEntity> getBucketItems(Set<String> bucketIds);\n\n // --------------------------------------------------------------------------------------------\n\n /**\n * Creates a versioned flow in the given bucket.\n *\n * @param flow the versioned flow to create\n * @return the created versioned flow\n * @throws IllegalStateException if no bucket with the given identifier exists\n */\n FlowEntity createFlow(FlowEntity flow);\n\n /**\n * Retrieves the versioned flow with the given id and DOES NOT populate the versionCount.\n *\n * @param flowIdentifier the identifier of the flow to retrieve\n * @return the versioned flow with the given id, or null if no flow with the given id exists\n */\n FlowEntity getFlowById(String flowIdentifier);\n\n /**\n * Retrieves the versioned flow with the given id and DOES populate the versionCount.\n *\n * @param flowIdentifier the identifier of the flow to retrieve\n * @return the versioned flow with the given id, or null if no flow with the given id exists\n */\n FlowEntity getFlowByIdWithSnapshotCounts(String flowIdentifier);\n\n /**\n * Retrieves the versioned flows with the given name. The name comparison must be case-insensitive.\n *\n * @param name the name of the flow to retrieve\n * @return the versioned flows with the given name, or empty list if no flows with the given name exists\n */\n List<FlowEntity> getFlowsByName(String name);\n\n /**\n * Retrieves the versioned flows with the given name in the given bucket. The name comparison must be case-insensitive.\n *\n * @param bucketIdentifier the identifier of the bucket\n * @param name the name of the flow to retrieve\n * @return the versioned flows with the given name in the given bucket, or empty list if no flows with the given name exists\n */\n List<FlowEntity> getFlowsByName(String bucketIdentifier, String name);\n\n /**\n * Retrieves the versioned flows for the given bucket.\n *\n * @param bucketIdentifier the bucket id to retrieve flows for\n * @return the flows in the given bucket\n */\n List<FlowEntity> getFlowsByBucket(String bucketIdentifier);\n\n /**\n * Updates the given versioned flow, only the name and description should be allowed to be updated.\n *\n * @param flow the updated versioned flow to save\n * @return the updated versioned flow\n */\n FlowEntity updateFlow(FlowEntity flow);\n\n /**\n * Deletes the flow if one exists.\n *\n * @param flow the flow to delete\n */\n void deleteFlow(FlowEntity flow);\n\n // --------------------------------------------------------------------------------------------\n\n /**\n * Creates a versioned flow snapshot.\n *\n * @param flowSnapshot the snapshot to create\n * @return the created snapshot\n * @throws IllegalStateException if the versioned flow specified by flowSnapshot.getFlowIdentifier() does not exist\n */\n FlowSnapshotEntity createFlowSnapshot(FlowSnapshotEntity flowSnapshot);\n\n /**\n * Retrieves the snapshot for the given flow identifier and snapshot version.\n *\n * @param flowIdentifier the identifier of the flow the snapshot belongs to\n * @param version the version of the snapshot\n * @return the versioned flow snapshot for the given flow identifier and version, or null if none exists\n */\n FlowSnapshotEntity getFlowSnapshot(String flowIdentifier, Integer version);\n\n /**\n * Retrieves the snapshot with the latest version number for the given flow in the given bucket.\n *\n * @param flowIdentifier the id of flow to retrieve the latest snapshot for\n * @return the latest snapshot for the flow, or null if one doesn't exist\n */\n FlowSnapshotEntity getLatestSnapshot(String flowIdentifier);\n\n /**\n * Retrieves the snapshots for the given flow in the given bucket.\n *\n * @param flowIdentifier the id of the flow\n * @return the snapshots\n */\n List<FlowSnapshotEntity> getSnapshots(String flowIdentifier);\n\n /**\n * Deletes the flow snapshot.\n *\n * @param flowSnapshot the flow snapshot to delete\n */\n void deleteFlowSnapshot(FlowSnapshotEntity flowSnapshot);\n\n // --------------------------------------------------------------------------------------------\n\n /**\n * Creates the given extension bundle.\n *\n * @param extensionBundle the extension bundle to create\n * @return the created extension bundle\n */\n BundleEntity createBundle(BundleEntity extensionBundle);\n\n /**\n * Retrieves the extension bundle with the given id.\n *\n * @param extensionBundleId the id of the extension bundle\n * @return the extension bundle with the id, or null if one does not exist\n */\n BundleEntity getBundle(String extensionBundleId);\n\n /**\n * Retrieves the extension bundle in the given bucket with the given group and artifact id.\n *\n * @return the extension bundle, or null if one does not exist\n */\n BundleEntity getBundle(String bucketId, String groupId, String artifactId);\n\n /**\n * Retrieves all extension bundles in the buckets with the given bucket ids.\n *\n * @param bucketIds the bucket ids\n * @param filterParams the optional filter params\n * @return the list of all extension bundles in the given buckets\n */\n List<BundleEntity> getBundles(Set<String> bucketIds, BundleFilterParams filterParams);\n\n /**\n * Retrieves the extension bundles for the given bucket.\n *\n * @param bucketId the bucket id\n * @return the list of extension bundles for the bucket\n */\n List<BundleEntity> getBundlesByBucket(String bucketId);\n\n /**\n * Retrieves the extension bundles for the given bucket and group.\n *\n * @param bucketId the bucket id\n * @param groupId the group id\n * @return the list of extension bundles for the bucket and group\n */\n List<BundleEntity> getBundlesByBucketAndGroup(String bucketId, String groupId);\n\n /**\n * Deletes the given extension bundle.\n *\n * @param extensionBundle the extension bundle to delete\n */\n void deleteBundle(BundleEntity extensionBundle);\n\n /**\n * Deletes the extension bundle with the given id.\n *\n * @param extensionBundleId the id extension bundle to delete\n */\n void deleteBundle(String extensionBundleId);\n\n // --------------------------------------------------------------------------------------------\n\n /**\n * Creates a version of an extension bundle.\n *\n * @param extensionBundleVersion the bundle version to create\n * @return the created bundle version\n */\n BundleVersionEntity createBundleVersion(BundleVersionEntity extensionBundleVersion);\n\n /**\n * Retrieves the extension bundle version for the given bundle id and version.\n *\n * @param extensionBundleId the id of the extension bundle\n * @param version the version of the extension bundle\n * @return the extension bundle version, or null if does not exist\n */\n BundleVersionEntity getBundleVersion(String extensionBundleId, String version);\n\n /**\n * Retrieves the extension bundle version by bucket, group, artifact, version.\n *\n * @param bucketId the bucket id\n * @param groupId the group id\n * @param artifactId the artifact id\n * @param version the version\n * @return the extension bundle version, or null if does not exist\n */\n BundleVersionEntity getBundleVersion(String bucketId, String groupId, String artifactId, String version);\n\n /**\n * Retrieves the extension bundle versions in the given buckets, matching the optional filter parameters.\n *\n * @param bucketIdentifiers the bucket identifiers\n * @param filterParams the optional filter params\n * @return the extension bundle versions\n */\n List<BundleVersionEntity> getBundleVersions(Set<String> bucketIdentifiers, BundleVersionFilterParams filterParams);\n\n /**\n * Retrieves the extension bundle versions for the given extension bundle id.\n *\n * @param extensionBundleId the extension bundle id\n * @return the list of extension bundle versions\n */\n List<BundleVersionEntity> getBundleVersions(String extensionBundleId);\n\n /**\n * Retrieves the extension bundle version with the given group id and artifact id in the given bucket.\n *\n * @param bucketId the bucket id\n * @param groupId the group id\n * @param artifactId the artifact id\n * @return the list of extension bundles\n */\n List<BundleVersionEntity> getBundleVersions(String bucketId, String groupId, String artifactId);\n\n /**\n * Retrieves the extension bundle versions with the given group id, artifact id, and version across all buckets.\n *\n * @param groupId the group id\n * @param artifactId the artifact id\n * @param version the versions\n * @return all bundle versions for the group id, artifact id, and version\n */\n List<BundleVersionEntity> getBundleVersionsGlobal(String groupId, String artifactId, String version);\n\n /**\n * Deletes the extension bundle version.\n *\n * @param extensionBundleVersion the extension bundle version to delete\n */\n void deleteBundleVersion(BundleVersionEntity extensionBundleVersion);\n\n /**\n * Deletes the extension bundle version.\n *\n * @param extensionBundleVersionId the id of the extension bundle version\n */\n void deleteBundleVersion(String extensionBundleVersionId);\n\n // --------------------------------------------------------------------------------------------\n\n /**\n * Creates the given extension bundle version dependency.\n *\n * @param dependencyEntity the dependency entity\n * @return the created dependency\n */\n BundleVersionDependencyEntity createDependency(BundleVersionDependencyEntity dependencyEntity);\n\n /**\n * Retrieves the bundle dependencies for the given bundle version.\n *\n * @param extensionBundleVersionId the id of the extension bundle version\n * @return the list of dependencies\n */\n List<BundleVersionDependencyEntity> getDependenciesForBundleVersion(String extensionBundleVersionId);\n\n // --------------------------------------------------------------------------------------------\n\n /**\n * Creates the given extension.\n *\n * @param extension the extension to create\n * @return the created extension\n */\n ExtensionEntity createExtension(ExtensionEntity extension);\n\n /**\n * Retrieves the extension with the given id.\n *\n * @param id the id of the extension\n * @return the extension with the id, or null if one does not exist\n */\n ExtensionEntity getExtensionById(String id);\n\n /**\n * Retrieves the extension with the given name in the given bundle version.\n *\n * @param bundleVersionId the bundle version id\n * @param name the name\n * @return the extension\n */\n ExtensionEntity getExtensionByName(String bundleVersionId, String name);\n\n /**\n * Retrieves the additional details documentation for the given extension.\n *\n * @param bundleVersionId the bundle version id\n * @param name the name of the extension\n * @return the additional details content, or an empty optional\n */\n ExtensionAdditionalDetailsEntity getExtensionAdditionalDetails(String bundleVersionId, String name);\n\n /**\n * Retrieves all extensions in the given buckets.\n *\n * @param bucketIdentifiers the bucket identifiers to retrieve extensions from\n * @param filterParams the filter params\n * @return the list of all extensions in the given buckets\n */\n List<ExtensionEntity> getExtensions(Set<String> bucketIdentifiers, ExtensionFilterParams filterParams);\n\n /**\n * Retrieves the extensions in the given buckets that provide the given service API.\n *\n * @param bucketIdentifiers the identifiers of the buckets\n * @param providedServiceAPI the provided service API\n * @return the extensions that provided the service API\n */\n List<ExtensionEntity> getExtensionsByProvidedServiceApi(Set<String> bucketIdentifiers, ProvidedServiceAPI providedServiceAPI);\n\n /**\n * Retrieves the extensions for the given extension bundle version.\n *\n * @param extensionBundleVersionId the id of the extension bundle version\n * @return the extensions in the given bundle\n */\n List<ExtensionEntity> getExtensionsByBundleVersionId(String extensionBundleVersionId);\n\n /**\n * Retrieves the set of all extension tags.\n *\n * @return the set of all extension tags\n */\n List<TagCountEntity> getAllExtensionTags();\n\n /**\n * Deletes the given extension.\n *\n * @param extension the extension to delete\n */\n void deleteExtension(ExtensionEntity extension);\n\n\n // --------------------------------------------------------------------------------------------\n\n /**\n * @return the set of field names for Buckets\n */\n Set<String> getBucketFields();\n\n /**\n * @return the set of field names for BucketItems\n */\n Set<String> getBucketItemFields();\n\n /**\n * @return the set of field names for Flows\n */\n Set<String> getFlowFields();\n\n}", "public Bucket() {\n// this.bucketPath = bucketPath;\n keys = new Vector<>();\n }", "private void initializeTokenBucket() {\n final double burstSec = burstFrames / framesPerSec;\n final Bandwidth limit = Bandwidth.simple(burstFrames, Duration.ofMillis((long) (1000*burstSec)));\n tokenBucket = Bucket4j.builder().addLimit(limit).build();\n // Start with an empty bucket to allow a ramp up.\n tokenBucket.tryConsumeAsMuchAsPossible();\n }", "public BucketRateLimiter(TimerService service, int maxOutstandingRequests, int maxStoredTokens,\n int tokenPeriodMs) {\n this(service, maxOutstandingRequests, maxStoredTokens, 0, tokenPeriodMs);\n }", "void createBuckets(long distributionId, int bucketCount);", "public interface StorageService {\n\n /**\n * List all the {@link Bucket}s in a given {@link com.google.openbidder.ui.entity.Project}.\n */\n List<Bucket> listAllBuckets(ProjectUser projectUser);\n\n /**\n * List all the objects in a given {@link Bucket}.\n */\n BucketContents listAllObjectsInBucket(ProjectUser projectUser, String bucketName);\n\n /**\n * List all objects in a given {@link Bucket} with a prefix.\n */\n BucketContents listAllObjectsInBucket(\n ProjectUser projectUser,\n String bucketName,\n String objectPrefix);\n\n /**\n * Remove the specified object.\n */\n void deleteObject(ProjectUser projectUser, String bucketName, String objectName);\n}", "public String getBucket();", "public Bucket() {\n super();\n }", "private OMBucketCreateResponse createBucket(String volumeName,\n String bucketName, long transactionID) {\n\n BucketInfo.Builder bucketInfo =\n newBucketInfoBuilder(bucketName, volumeName)\n .setStorageType(OzoneManagerProtocolProtos.StorageTypeProto.DISK);\n OzoneManagerProtocolProtos.OMRequest omRequest =\n OMRequestTestUtils.newCreateBucketRequest(bucketInfo).build();\n\n OMBucketCreateRequest omBucketCreateRequest =\n new OMBucketCreateRequest(omRequest);\n\n return (OMBucketCreateResponse) omBucketCreateRequest\n .validateAndUpdateCache(ozoneManager, transactionID,\n ozoneManagerDoubleBufferHelper);\n\n }", "Map<String, Object> getBucket(String key);", "public Map<String, Object> createBucket(HttpServletRequest request) {\n\t\t\r\n\t\tStringBuilder command = new StringBuilder();\r\n\t\tcommand.append(\"curl -v X POST -u \");\r\n\t\tcommand.append(request.getParameter(\"userName\"));\r\n\t\tcommand.append(\":\");\r\n\t\tcommand.append(request.getParameter(\"userPassword\"));\r\n\t\tcommand.append(\" http://\");\r\n\t\tcommand.append(request.getParameter(\"hostName\"));\r\n\t\tcommand.append(\":\");\r\n\t\tcommand.append(request.getParameter(\"portNumber\"));\r\n\t\tcommand.append(\"/pools/default/buckets/\");\r\n\t\tcommand.append(\" -d name=\");\r\n\t\tcommand.append(request.getParameter(\"newBucketName\"));\r\n\t\tcommand.append(\" -d ramQuotaMB=\");\r\n\t\tcommand.append(request.getParameter(\"bucketMemory\"));\r\n\t\tcommand.append(\" -d bucketType=\");\r\n\t\tcommand.append(request.getParameter(\"newBucketType\"));\r\n\t\t\r\n\t\tif(!request.getParameter(\"newBucketType\").equals(\"memcached\")) {\r\n\t\t\tcommand.append(\" -d replicaNumber=\");\r\n\t\t\tcommand.append(request.getParameter(\"newBucketReplicas\"));\r\n\t\t\tcommand.append(\" -d flushEnabled=\");\r\n\t\t\tcommand.append(request.getParameter(\"flushEnable\"));\r\n\t\t\tif(request.getParameter(\"newBucketType\").equals(\"couchbase\")) {\r\n\t\t\t\tcommand.append(\" -d replicaIndex=\");\r\n\t\t\t\tcommand.append(request.getParameter(\"indexReplicaEnable\"));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(command);\r\n\t\t\r\n\t\tMap<String, Object> resultMap = serviceUtil.curlExcute(command.toString());\r\n\t\t\r\n\t\treturn resultMap;\r\n\t}", "SecretsClient getSecrets();", "private void createStorageBucket() throws IOException {\n try {\n storage.buckets().insert(projectName, new Bucket()\n .setName(projectName + \"-cloud-pubsub-loadtest\")).execute();\n } catch (GoogleJsonResponseException e) {\n if (e.getStatusCode() != ALREADY_EXISTS) {\n throw e;\n }\n }\n }", "Bostoken createBostoken();", "BucketName(String bucketName) {\n this.bucketName = bucketName;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new subscription list for all events that occur within a namespace.
private SubscriptionList getNamespaceSubscriptions(String baseNS) throws RepositoryException { SubscriptionResource sr = namespaceCache.get( baseNS ); if (sr == null) { try { sr = new SubscriptionResource( fileUtils, baseNS, null, null ); namespaceCache.put( baseNS, sr ); } catch (IOException e) { throw new RepositoryException("Error loading subscription list content.", e); } } return sr.getResource(); }
[ "Collection<Subscription> getSubscriptions();", "Collection<Subscription> listSubscriptions() throws IOException;", "Collection<Service> getAllSubscribeService();", "java.util.concurrent.Future<ListEventSubscriptionsResult> listEventSubscriptionsAsync(ListEventSubscriptionsRequest listEventSubscriptionsRequest);", "Set<SubscriptionHandle> getSubscriptions();", "public ArrayList<Subscription> viewAllSubscriptions() {\n String sqlCommand = \"SELECT * FROM Orders NATURAL JOIN Subscription;\";\n return getSubscriptions(sqlCommand);\n }", "public void createSubscription(SubscriptionData subscription, List<EntitlementEvent> initialEvents, InternalCallContext context);", "public List<Subscription> getAllSubscriptions(){\n return subscriptionRepository.findAll();\n }", "public final ISubscription<T> [] getSubscriptions() {\n\t\t ISubscription<T>[] array = (SubscriptionDelegate[]) Array.newInstance(SubscriptionDelegate.class, 0); \n\t\t return activeSubscriptions.toArray(array);\n\t}", "protected abstract void setupSubscriptions();", "public abstract List<SubscriptionOperation> listSubscriptionOperations(\r\n\t\t\tString startTimeFrame, String endTimeFrame);", "public List<Subscription> getSubscriptions() {\n return subscriptions.stream().collect(Collectors.toList());\n }", "public final ISubscription<T> [] getSubscriptions(final InstrumentSpecification spec, final TimeFrame timeFrame) {\n\t\tList<ISubscription<T>> subscriptions = new ArrayList<ISubscription<T>>();\n\t\t// iterate over all subscriptions and search for matching subscriptions ...\n\t\tfor(ISubscription<T> subscription : activeSubscriptions){\n\t\t\tif(subscription.getInstrumentSpecification().equals(spec) && subscription.getTimeFrame().equals(timeFrame)){\n\t\t\t\t// ... and add them to the list of returned subscriptions. \n\t\t\t\tsubscriptions.add(subscription); \n\t\t\t}\n\t\t}\n\t\t// have to take way across Delegate. \n\t\tISubscription<T>[] array = (SubscriptionDelegate[]) Array.newInstance(SubscriptionDelegate.class, 0);\n\t\treturn subscriptions.toArray(array); \n\t}", "private List<String> getNotificationList(String affectedNamespace, RepositoryActionType action) throws RepositoryException {\n\t\tString baseNS = RepositoryNamespaceUtils.normalizeUri( affectedNamespace );\n\t\tSubscriptionEventType eventType = action.getEventType();\n\t\tList<String> userList = new ArrayList<>();\n\t\t\n\t\twhile (baseNS != null) {\n\t\t\taddUsers( userList, getNamespaceSubscriptions( baseNS ), eventType );\n\t\t\t\n\t\t\ttry {\n\t\t\t\tbaseNS = RepositoryNamespaceUtils.getParentNamespace( baseNS, manager );\n\t\t\t\t\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\t// Ignore error and stop searching\n\t\t\t\tbaseNS = null;\n\t\t\t}\n\t\t}\n\t\treturn userList;\n\t}", "public List<SubscriptionEventType> getNamespaceSubscriptions(String baseNS, String userId)\n\t\t\tthrows RepositoryException {\n\t\tList<SubscriptionEventType> eventTypes = new ArrayList<>();\n\t\t\n\t\tif ((userId != null) && !userId.equals( UserPrincipal.ANONYMOUS_USER_ID )) {\n\t\t\tSubscriptionList subscriptions = getNamespaceSubscriptions( baseNS );\n\t\t\t\n\t\t\tfor (Subscription subscription : subscriptions.getSubscription()) {\n\t\t\t\tif (subscription.getUser().contains( userId )) {\n\t\t\t\t\teventTypes.add( subscription.getEventType() );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn eventTypes;\n\t}", "List<NamespaceMeta> listNamespaces();", "public ArrayList<Subscriber> getSubscribers() {\n ArrayList<Subscriber> subscribers = new ArrayList<>();\n subRep.findAll()\n .forEach(subscribers::add);\n return subscribers;\n }", "public NsNamespaces() {\n this(DSL.name(\"ns_namespaces\"), null);\n }", "<E extends SciJavaEvent> List<EventSubscriber<E>> getSubscribers(Class<E> c);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prints to the Display Pane the name, number and balance of the receiver.
public void displayDetails() { System.out.println("Holder Name: " + this.getHolder()); System.out.println("Account Num: " + this.getNumber()); System.out.println("Balance: " + this.getBalance()); }
[ "public void displayDetails() {\n\t\t//System.out.println(\"Account number is \" + accountNum);\n\t\tSystem.out.println(\"Balance is \" + balance);\n\t}", "public void print() \n\t{\n\t System.out.println(\"\\nBank Name : \" + getBankName() + \n\t\t\t \"\\nAccount Holder : \" + accountName + \n\t\t\t \"\\nAccount Number : \" + accountNum +\n\t\t\t \"\\nAccount balance: \" + balance);\n\t}", "public void displayAccountInfo(){\n System.out.println(\"Account Number is\\t\" + getaccno() + \"\\nAccount Balance is\\t\"+ getbalance());\n System.out.println(\"--------------------------------------------\");\n }", "public void view_balance() {\r\n\t\tSystem.out.println(\"Your balance is: $\" + tuition_balance);\r\n\t}", "private void display()\n {\n\n tvTipAmount.setText(tipCalcObject.getTipAmountD().toString());\n tvBillAmount.setText(tipCalcObject.getBillAmountD().toString());\n\n // Format NOT DONE -------\n // NumberFormat formatter = NumberFormat.getCurrencyInstance();\n // tvTotalPerPerson.setText(amountPerPersonD.toString()); TODO\n tvTotalPerPerson.setText(tipCalcObject.getAmountPerPersonD().toString());\n\n\n }", "@Override\n\tpublic void displayBalance() {\n\t\tString formattedBalance = String.format(\"%.2f\", getBalance());\n\t\tSystem.out.println(\"Saving Account Balance: $\" + formattedBalance);\n\t}", "public void printAccountInfo(){\n System.out.printf(\"%-5d %-20s %10.2f\",getAccountNum(), getCustomerName(), getBalance());\n }", "public void showInfo()\n\t{\n\t\tSystem.out.println(\"Account Number : \"+getAccountNumber());\n\t\tSystem.out.println(\"Balance : \"+getBalance());\n\t\tSystem.out.println(\"Tenure Year : \"+tenureYear);\n\t}", "public void viewBalanceUI() {\n //print out all account information\n System.out.println(\"Here's the list of your account.\");\n for(Account i : self.getAccountList()) {\n System.out.println(i);\n }\n //calculate net total for each currency\n System.out.println(\"Net Balance:\");\n\n ArrayList<String> currencyName = new ArrayList<>();\n for(Account i : self.getAccountList()) {\n if(!currencyName.contains(i.getMoneyType())){\n currencyName.add(i.getMoneyType());\n double totalSum = 0;\n\n for(Account j : self.getAccountList()){\n if(j.getMoneyType().equals(i.getMoneyType())){\n if(j instanceof AssetAccount){\n totalSum += j.getBalance();\n }\n if(j instanceof DebtAccount){\n totalSum -= j.getBalance();\n }\n }\n }\n System.out.printf(\"%S: %.2f\\n\", i.getMoneyType(), totalSum);\n }\n }\n }", "public void showBalance(){\n for(Player player: players){\n System.out.println(player + \"'s balance: \" + player.getWallet());\n }\n System.out.println();\n dealer.showProfit();\n System.out.println();\n }", "public void printBalance() {\n System.out.println(balance);\n }", "public void viewBalance() {\n\t\t\n\t\tSystem.out.println(\"Balance is $:\" +tuitionBalance);\n\t}", "public void display_Current_Balance(){\n System.out.println(\"The balance in the current account is :\" + \" \" + balance_amt );\r\n }", "public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}", "public void print() {\n System.out.println(\"Nome: \" + nome);\n System.out.println(\"Telefone: \" + telefone);\n }", "public void printReceipt()\r\n {\r\n System.out.println(\"Item: \" + name);\r\n System.out.println(\"Total received: \" + total);\r\n }", "public void displayReceipt()\n\t{\n\t\t/**Print array list of selections*/\n\t\tuser.PrintSelections();\n\t\t\n\t\tSystem.out.println(\"------------\");\n\t\t\n\t\t/**Print total price.*/\n\t\tSystem.out.println(\"Total: $\" + totalprice);\n\t}", "public void displayEwallet(){\n for (int i = 0; i < Ewallets.size(); i++) {\n System.out.println(\"Ewallet \"+ (i+1));\n System.out.println(Ewallets.get(i));\n }\n }", "private void displayInfo() {\r\n messageArea.setText(\"\");\r\n locLabel.setText(\"\");\r\n diceLabel.setText(\"\");\r\n propModel.removeAllElements();\r\n if (player.isBankrupt()) {\r\n cashLabel.setText(\"BANKROET\");\r\n propList.setEnabled(false);\r\n } else {\r\n cashLabel.setText(\"Cash: \" + player.getCash());\r\n locLabel.setText(\"Location: \" + player.getLocation().getName());\r\n if (player.hasTurn()) {\r\n String same = \"\";\r\n if (player.getCup().equalValues()) {\r\n same = \" (double)\";\r\n }\r\n diceLabel.setText(\"Dobbelstenen: \" + player.getCup().getTotal() + same);\r\n }\r\n // refill property list\r\n for (PropertySquare psq : player.getProperties()) {\r\n propModel.addElement(psq);\r\n }\r\n }\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Schedules a task to purge the given map. An updatetask will be scheduled right after the purge, to get the map uptodate again.
boolean scheduleMapPurgeTask(BlueMapMap map) throws IOException;
[ "boolean scheduleMapUpdateTask(BlueMapMap map, boolean force);", "private void deleteStaleTasks() {\n taskProvider.removeStaleTasks(HOURS.toMillis(TASK_PURGE_INTERVAL));\n }", "boolean scheduleMapUpdateTask(BlueMapMap map, Collection<Vector2i> regions, boolean force);", "default boolean scheduleMapUpdateTask(BlueMapMap map) {\n\t\treturn scheduleMapUpdateTask(map, false);\n\t}", "void purge(long timestamp);", "void clearTasks();", "private synchronized void scheduleRemoveTask(final String ipAddress) {\n Validate.notNull(ipAddress, \"The ip address cannot be null.\");\n if (ips.containsKey(ipAddress)) {\n ips.get(ipAddress).cancel();\n }\n TimerTask task = new TimerTask() {\n @Override\n public void run() {\n ips.remove(ipAddress);\n }\n };\n timer.schedule(task, period);\n ips.put(ipAddress, task);\n }", "OffsetDateTime scheduledPurgeDate();", "private void reScheduleRefreshTask() {\n\t\trefreshtask.cancel();\n\t\trefreshtask = new RefreshTask();\n\t\trefreshTimer.scheduleAtFixedRate(refreshtask, 0, Long.valueOf(notifRate));\n\t}", "@Scheduled(cron = \"0 0 0 * * ?\")\n\tpublic void callPurger() {\n\t\tlogger.info(\"Planner::callPurger [START]\");\n\n\t\t//call purger\n\t\tpurger.purgeDatabase();\n\n\t\tlogger.info(\"Planner::callPurger [END]\");\n\t}", "void deleteTask(TaskDef task) throws OpenXDataException;", "void unlockMap();", "void removeTask();", "void unschedule();", "void deleteTask(String taskId);", "void deleteScheduleEntry(String userName, Timestamp taskStartTime,\n Integer taskDuration, String taskName, String scriptName);", "public void scheduleExpirationTask() {\n if (!task.isCleanupEnabled() || nodeEngine.getLocalMember().isLiteMember() || scheduled.get()\n || !scheduled.compareAndSet(false, true)) {\n return;\n }\n\n scheduledExpirationTask =\n globalTaskScheduler.scheduleWithRepetition(task, taskPeriodSeconds,\n taskPeriodSeconds, SECONDS);\n\n scheduledOneTime.set(true);\n }", "public void kill(int taskID){\n\t\tthis.tasks.remove(taskID);\n\t\tmap[taskID] = null;\n\n\t}", "void unscheduleExpirationTask() {\n scheduled.set(false);\n ScheduledFuture<?> scheduledFuture = this.scheduledExpirationTask;\n if (scheduledFuture != null) {\n scheduledFuture.cancel(false);\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
We assume that any 500 range error for Google is something we should retry.
public static boolean isGoogleServiceUnavailableException(IOException e) { if (e instanceof GoogleJsonResponseException) { int code = ((GoogleJsonResponseException) e).getDetails().getCode(); return code >= 500 && code < 600; } return false; }
[ "private void detectRateLimitingElseRethrow(StravaUserEntity stravaUserEntity, String endpoint, RestClientException e)\n throws StravaApiException {\n\n if(e instanceof HttpStatusCodeException) {\n HttpStatusCodeException httpStatusCodeException = (HttpStatusCodeException)e;\n HttpStatus statusCode = httpStatusCodeException.getStatusCode();\n logger.error(\"Unexpected response {} when calling {}\", httpStatusCodeException.getStatusCode(), endpoint);\n\n if(HttpStatus.FORBIDDEN.equals(statusCode)) {\n String message = String.format(\"Got 403 Forbidden from Strava API for strava user %s - possible rate-limiting\",\n stravaUserEntity.getStravaUsername());\n\n throw new StravaApiException(message);\n }\n }\n\n // We may still be able to handle the non-success case higher up\n throw e;\n }", "void handleApiError(IOException e) throws IOException {\n int responseCode;\n try {\n responseCode = connection.getResponseCode();\n } catch (IOException e2) {\n // likely to be a network exception (e.g. SSLHandshakeException),\n // connection.getResponseCode() and any other getter on the response will cause an exception\n if (LOGGER.isLoggable(FINE))\n LOGGER.log(FINE, \"Silently ignore exception retrieving response code for '\" + connection.getURL() + \"'\" +\n \" handling exception \" + e, e);\n throw e;\n }\n if (responseCode == HttpURLConnection.HTTP_UNAUTHORIZED) // 401 / Unauthorized == bad creds\n throw e;\n\n // Retry-After is not documented but apparently that field exists\n if (responseCode == HttpURLConnection.HTTP_FORBIDDEN &&\n connection.getHeaderField(\"Retry-After\") != null) {\n return;\n }\n\n InputStream es = wrapStream(connection.getErrorStream());\n try {\n if (es!=null) {\n String error = IOUtils.toString(es, \"UTF-8\");\n if (e instanceof FileNotFoundException) {\n // pass through 404 Not Found to allow the caller to handle it intelligently\n throw (IOException) new FileNotFoundException(error).initCause(e);\n } else if (e instanceof HttpException) {\n HttpException http = (HttpException) e;\n throw new HttpException(error, http.getResponseCode(), http.getResponseMessage(), http.getUrl(), e);\n } else {\n throw new IOException(error, e);\n }\n } else\n throw e;\n } finally {\n IOUtils.closeQuietly(es);\n }\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n // An unresolvable error has occurred and a connection to Google APIs\n // could not be established. Display an error message, or handle\n // the failure silently\n }", "public void globalLimitExceeded(long retry) {\n globalLimit = System.currentTimeMillis() + retry;\n }", "public void configuredRetriesMetOrExceededWithoutSuccess();", "public boolean shouldRetryForStatusCode(int status) {\n return (status != 400 && status != 401 && status != 403 && status != 404);\n }", "private static void maxRetriesError(int x) throws SocketTimeoutException {\n\t\tthrow new SocketTimeoutException (\"ERROR\" +\"\\t\"+ \"Maximum number of retries [\" + x +\"] exceeded\");\n\t}", "public void testHttpFailureRetries() {\n delayTestFinish(RUNASYNC_TIMEOUT);\n runAsync1(0);\n }", "@Override\n\t\tpublic boolean isRetry() { return true; }", "void doRetry();", "@VisibleForTesting\r\n protected Response throwExceptionIfNotOkayHttpStatus(Response response) throws IOException {\r\n int code = response.getCode();\r\n if (code != HTTP_OK) {\r\n String problem = String.format(\"There was a code %d error!\", code);\r\n System.out.println(problem);\r\n throw new IOException();\r\n }\r\n return response;\r\n }", "public static boolean shouldRetry(Exception ex) {\n // Determine if error appears transient (warranting retrial)\n // We give most errors the \"benefit of the doubt\" by considering them transient\n // This picks out a few that we consider non-transient\n if (ex instanceof UnknownHostException) {\n // User probably mistyped the url in the custom target.\n return false;\n } else if (ex instanceof MalformedURLException) {\n // This should never happen due to validations but if we get here, retrial won't fix it.\n return false;\n }\n return true;\n }", "private void retry() {\n if (catalog == null) {\n if (--retries < 0) {\n inactive = true;\n pendingRequests.clear();\n log.error(\"Maximum retries exceeded while attempting to load catalog for endpoint \" + discoveryEndpoint\n + \".\\nThis service will be unavailabe.\");\n } else {\n try {\n sleep(RETRY_INTERVAL * 1000);\n _loadCatalog();\n } catch (InterruptedException e) {\n log.warn(\"Thread for loading CDS Hooks catalog for \" + discoveryEndpoint + \"has been interrupted\"\n + \".\\nThis service will be unavailable.\");\n }\n }\n }\n }", "@Override\n public void waitUntilRetryOk() throws InterruptedException {\n Thread.sleep(max(0L, retryTime - Clock.unixTime()));\n }", "@Override\n public void pingFailed() {\n long now = new Date().getTime();\n if (now - lastPing > 30000) {\n Log.e(LOG_TAG, \"Ping failure, reconnect\");\n startReconnectIfNecessary();\n lastPing = now;\n } else {\n Log.e(LOG_TAG, \"Ping failure reported too early. Skipping this occurrence.\");\n }\n }", "@Test\n public void testRefreshRemoteDataFailure() throws RequestException {\n validateRemoteDataFailure(501);\n }", "private void checkResponseStatus(HttpResponse response) throws IOException {\n\n int statusCode = response.getStatusLine().getStatusCode();\n\n if (statusCode >= 200 && statusCode < 300) {\n return;\n } else if (statusCode == 401 || statusCode == 403) {\n throw new UploadcareAuthenticationException(\n streamToString(response.getEntity().getContent()));\n } else if (statusCode == 400 || statusCode == 404) {\n throw new UploadcareInvalidRequestException(\n streamToString(response.getEntity().getContent()));\n } else if(statusCode == 429 ){\n throw new UploadcareApiException(\n streamToString(response.getEntity().getContent()));\n } else {\n throw new UploadcareApiException(\n \"Unknown exception during an API call, response:\" + streamToString(\n response.getEntity().getContent()));\n }\n }", "public void checkErrorLimit(int increment) {\n errorCounter += increment;\n if (errorCounter >= AppyAdService.getInstance().maxErrors()) {\n setAdProcessing(false);\n // todo ????\n }\n }", "private void requestThrottledExceptionHandler(long throttlingLimit) {\n try {\n log.info(\"Request throttled. Sleeping for \" + throttlingLimit\n + \" milliseconds.\");\n Thread.sleep(throttlingLimit);\n } catch (InterruptedException e) {\n log.error(e.getMessage(), e);\n return;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creates a new PButton object. With its center point at x, y and a size of width and height. The label font is Arial 14 pt. to change this use the appropriate functions.
public PButton(float x, float y, float width, float height, String label, PApplet p){ this.p = p; this.setSize(width, height); this.setLocation(x, y); this.setChecked(false); this.textFont = this.p.createFont("Arial", 14, true); this.text = label; this.stroke = 0; //40 this.strokeHighlight = 0; //230 this.fill = null; // noFill() this.fillHighlight = null; //125 this.textColor = 0; //230 this.textColorHighlight = 0; //230 this.cornerRadius = 0; this.outlineWeight = 0; this.adaptToLabel = false; }
[ "public BoardSizeButton(final String theLabel) {\r\n super();\r\n myLabel = theLabel;\r\n myButtonAreaSize = new Dimension(ORIG_SIZE.width * M + AREA_PADDING,\r\n ORIG_SIZE.height * M + AREA_PADDING);\r\n myRect = new Rectangle(0, 0, ORIG_SIZE.width * M, ORIG_SIZE.height * M);\r\n myFont = new Font(\"Font\", Font.PLAIN, FONT_SIZE);\r\n setupButton();\r\n }", "private JButton makeButton(String action, String label, int x, int y, int width, int height,\r\n float alignment, String soundName) {\r\n JButton button = new JButton(label);\r\n button.setBounds(x, y, width, height);\r\n button.setAlignmentX(alignment);\r\n button.setBackground(Color.ORANGE);\r\n clickActionListener(button, action, soundName);\r\n return button;\r\n }", "public TranslateButton() {\n this.posX = 0;\n this.posY = 0;\n this.width = 0;\n this.height = 0;\n translateButton = new JButton();\n }", "private Button createBigButton(String name, int fontSize, int cornerSize) {\n Button button = createButton(name, fontSize, cornerSize);\n button.setMaxHeight(Double.MAX_VALUE);\n button.wrapTextProperty().setValue(true);\n button.setTextAlignment(CENTER);\n return button;\n }", "public PButton() {\r\n\t}", "public Button(String text, int textSize) {\n this(text, textSize, Color.BLACK);\n }", "JButton createTranslateButton(ParagraphTranslateGUI app) {\n ImageIcon translateIcon = new ImageIcon(\"resources/TranslateButton.png\");\n translateButton = new JButton(resizeIcon(translateIcon, this.width, this.height));\n translateButton.setBounds(this.posX, this.posY, this.width, this.height);\n\n addMouseListener(app);\n\n return translateButton;\n }", "@Override\r\n\tpublic void draw() {\r\n\t\t//to center text and button\r\n\t\tp.rectMode(PConstants.CENTER);\r\n\t\tp.textAlign(PConstants.CENTER, PConstants.CENTER);\r\n\t\t//button outline thickness\r\n\t\tp.strokeWeight(outlineWeight);\r\n\t\r\n\t\tif(isChecked()){\r\n\t\t\t//button outline color if clicked\r\n\t\t\tif(strokeHighlight == null){\r\n\t\t\t\tp.noStroke();\r\n\t\t\t}else{\r\n\t\t\t\tp.stroke(strokeHighlight);\r\n\t\t\t}\r\n\t\t\t//button fill color if clicked \r\n\t\t\tif(fillHighlight == null){\r\n\t\t\t\tp.noFill();\r\n\t\t\t}else {\r\n\t\t\t\tp.fill(fillHighlight);\r\n\t\t\t}\r\n\t\t\t//draw the button at position x, y and buttonWidth and buttonHeight and a corner-radius of 0\r\n\t\t\tp.rect(getX(), getY(), getWidth(), getHeight(), cornerRadius);\r\n\t\t\t//button text color if clicked\r\n\t\t\tp.fill(textColorHighlight); \r\n\t\t\t//drawing the button label\r\n\t\t\tp.textFont(this.textFont);\r\n\t\t\t\r\n\t\t\tp.text(text, getX(), getY() - (p.textAscent() * 0.1f));\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//button outline color if NOT clicked\r\n\t\t\tif(stroke == null){\r\n\t\t\t\tp.noStroke();\r\n\t\t\t}else{\r\n\t\t\t\tp.stroke(stroke);\r\n\t\t\t}\r\n\t\t\t//button fill color if NOT clicked\r\n\t\t\tif(fill == null){\r\n\t\t\t\tp.noFill();\r\n\t\t\t}else{\r\n\t\t\t\tp.fill(fill);\r\n\t\t\t}\r\n\t\t\t//draw the button at position x, y and buttonWidth and buttonHeight and a corner radius of 0\r\n\t\t\tp.rect(getX(), getY(), getWidth(), getHeight(), cornerRadius);\r\n\t\t\t//Button text color if NOT clicked\r\n\t\t\tp.fill(textColor); \r\n\t\t\t//drawing the button label\r\n\t\t\tp.textFont(this.textFont);\r\n\t\t\tp.text(text, getX(), getY() - (p.textAscent() * 0.1f));\r\n\t\t}\r\n\t}", "private void initButton() {\r\n\t\tthis.panelButton = new JPanel();\r\n\t\tthis.panelButton.setLayout(new BoxLayout(this.panelButton,\r\n\t\t\t\tBoxLayout.LINE_AXIS));\r\n\t\tthis.modifyButton = new JButton(\"Modify\");\r\n\t\tthis.buttonSize(this.modifyButton);\r\n\t\tthis.deleteButton = new JButton(\"Delete\");\r\n\t\tthis.buttonSize(this.deleteButton);\r\n\t\tthis.cancelButton = new JButton(\"Cancel\");\r\n\t\tthis.buttonSize(this.cancelButton);\r\n\r\n\t\tthis.modifyButton.addActionListener(this.editWeaponControl);\r\n\t\tthis.deleteButton.addActionListener(this.editWeaponControl);\r\n\t\tthis.cancelButton.addActionListener(this.editWeaponControl);\r\n\r\n\t\tthis.panelButton.add(this.modifyButton);\r\n\t\tthis.panelButton.add(Box.createRigidArea(new Dimension(15, 0)));\r\n\t\tthis.panelButton.add(this.deleteButton);\r\n\t\tthis.panelButton.add(Box.createRigidArea(new Dimension(15, 0)));\r\n\t\tthis.panelButton.add(this.cancelButton);\r\n\t}", "@Override\r\n\tprotected void createButton(JComponent parent) {\r\n\t\tbutton = new JButton(\"Play The Whole Drawing\");\r\n\t\tbutton = customizeButton(button);\r\n\t\taddToParent(parent);\r\n\t}", "private JButton setUpDefaultSizeButton() {\n final JButton defaultSize = new JButton(\"10 X 20\");\n final int width = 10;\n final int height = 20;\n defaultSize.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n dispose();\n new GUI(width, height);\n }\n });\n return defaultSize;\n }", "private JButton setUpGridSizeButton() {\n final JButton size = new JButton(\"13 X 23\");\n final int width = 13;\n final int height = 23;\n size.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n dispose();\n new GUI(width, height);\n }\n });\n return size;\n }", "Button createButton();", "public Button(String text, int textSize, Color textColor, Style type) {\n this.text = text;\n size = textSize;\n this.textColor = textColor;\n style = type;\n paint();\n }", "public Button(String text, int textSize, Color textColor) {\n this(text, textSize, Color.BLACK, Style.RECTANGLE);\n }", "public static JButton createButton() {\n\t\tJButton button = new JButton();\n\t\tbutton.setSize(width,height);\n\t\tbutton.setVisible(visible);\n\t\tbutton.setText(\"Find folder to copy:\");\n\t\t\n\t\treturn button;\n\t}", "protected JButton createTitleButton() {\r\n\t\tJButton button = new JButton() {\r\n\t\t\t@Override\r\n\t\t\tpublic String getName() {\r\n\t\t\t\treturn \"FrameButton\";\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tbutton.setFocusPainted(false);\r\n\t\tbutton.setFocusable(false);\r\n\t\tbutton.setOpaque(true);\r\n\t\tbutton.setBorder(BorderFactory.createEmptyBorder());\r\n\t\treturn button;\r\n\t}", "public void paint(Graphics g) \n{ \n int i; \n int x=gRectangle.x;\n int y = gRectangle.y;\n int width=gRectangle.width;\n int height=gRectangle.height;\n \n g.setColor(ButtonColor); \n // Clickable Button \n // Unfortunately Java doesn't seem to have the concept of thickness \n // for borders. To get a border of a certain thickness, we have to \n // draw multiple rectangles having slightly different sizes \n \n for (i=0; i < GC_BUTTON_BORDER_THICKNESS; i++) \n { \n g.draw3DRect(x+i, y+i, width - 2*i+1, height - 2*i+1, raised); \n } \n g.fillRect(x+GC_BUTTON_BORDER_THICKNESS, \n y+GC_BUTTON_BORDER_THICKNESS, \n width -2* GC_BUTTON_BORDER_THICKNESS+2, \n height - 2*GC_BUTTON_BORDER_THICKNESS+2); \n \n // Put the label on the button \n \n g.setColor(Color.black); \n g.setFont(buttonFont);\n g.drawString(ButtonName, x+GC_BUTTON_BORDER_THICKNESS+GC_BUTTON_HORIZ_PAD,\n y+GC_BUTTON_BORDER_THICKNESS+GC_BUTTON_VERT_PAD+fontMaxAscent);\n \n \n // The following was added to see how big the alloted Canvas area was that was \n // made available to our MyButtonClass \n\n g.drawRect(0,0, gRectangle.width+2*GC_CANVAS_HORIZ_GAP-1,\n gRectangle.height+2*GC_CANVAS_VERT_GAP-1);\n\n }", "public Button LocateAButton(SpringLayout myButtonLayout, Button myButton, String ButtonCaption, int x, int y, int w, int h)\n { \n myButton = new Button(ButtonCaption);\n add(myButton);\n myButton.addActionListener(this);\n myButtonLayout.putConstraint(SpringLayout.WEST, myButton, x, SpringLayout.WEST, this);\n myButtonLayout.putConstraint(SpringLayout.NORTH, myButton, y, SpringLayout.NORTH, this);\n myButton.setPreferredSize(new Dimension(w,h));\n return myButton;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds name and InChI information to a CML molecule.
private static void enhanceCMLMolecule(IMolecule mol, Element cmlMolElem, String name) { String inchi = ConverterToInChI.getInChI(mol); if(inchi != null) { Element identifier = new Element("identifier"); identifier.addAttribute(new Attribute("convention", "iupac:inchi")); identifier.appendChild(inchi); cmlMolElem.insertChild(identifier, 0); } if(name != null) { Element nameElem = new Element("name"); nameElem.appendChild(name); cmlMolElem.insertChild(nameElem, 0); } Nodes n = cmlMolElem.query(".//cml:label", new XPathContext("cml", "http://www.xml-cml.org/schema")); for(int i=0;i<n.size();i++) n.get(i).detach(); }
[ "public abstract void setInChI(String inchi);", "public void putMoleculeInCilia(){\n\t\t\tcilia.setOdorantMolecule(molecule);\n\t\t}", "void setMolecule(String mol, Object conc);", "public static String cmlToInChI(Element cmlMol) throws Exception {\n\t\treturn ConverterToInChI.getInChI(cmlToMolecule(cmlMol));\n\t}", "public void addInstruction(ConcIns ins)\n {\n instructions.add(ins);\n }", "public ChemkinMolecule() {\n \tlabel = \"\";\n }", "void addMetadata(CellID cid, Metadata metadata){\n db.addMetadata(cid, metadata);\n metadataModification(cid, metadata);\n }", "public static String molfileToInchi(String molfile, String fileNum, String outputDir, String outputType, String extraArgs) throws Exception {\n // Set up\n String tempMolFile = outputDir + \"orchem\" + fileNum + \".mol\";\n String tempOutFile = outputDir + \"orchem\" + fileNum + \".out\";\n String tempLogFile = outputDir + \"orchem\" + fileNum + \".log\";\n String tempProblemFile = outputDir + \"orchem\" + fileNum + \".prb\";\n\n //Write the molfile into the output dir so that the Inchi convertor can\n //open it from there\n FileWriter fstream = new FileWriter(tempMolFile);\n BufferedWriter out = new BufferedWriter(fstream);\n out.write(molfile);\n out.close();\n\n int numOfArgs=6;\n List<String> extraArguments = new ArrayList<String>();\n\n if (extraArgs!=null ) {\n StringTokenizer st = new StringTokenizer(extraArgs,\" \");\n while (st.hasMoreTokens()) {\n numOfArgs++;\n extraArguments.add(st.nextToken());\n }\n }\n\n //Prepare an array to shove into the Inchi generator\n String[] args = new String[numOfArgs];\n\n args[0] = \"\";\n args[1] = tempMolFile;\n args[2] = tempOutFile;\n args[3] = tempLogFile;\n args[4] = tempProblemFile;\n args[5] = \"-Key\";\n \n int idx=6; \n for (String stdinchiArg : extraArguments) {\n args[idx] = stdinchiArg;\n idx++;\n }\n\n \n //Call the actual Inchi\n StdInchi103 i = new StdInchi103();\n i.run(args);\n\n /* Read the generated InChi from the output file */\n FileInputStream fInstream = new FileInputStream(tempOutFile);\n DataInputStream in = new DataInputStream(fInstream);\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n String strLine;\n StringBuffer inchi = new StringBuffer();\n int lineCount = 0;\n while ((strLine = br.readLine()) != null) {\n lineCount++;\n if(outputType.equals(\"INCHI\"))\n if (lineCount ==3) \n inchi.append(strLine);\n if(outputType.equals(\"INCHI_KEY\"))\n if (lineCount ==5) \n inchi.append(strLine);\n \n }\n in.close();\n\n /* Delete temporary files */\n deleteFile(tempMolFile);\n deleteFile(tempOutFile);\n deleteFile(tempLogFile);\n deleteFile(tempProblemFile);\n\n return inchi.toString();\n }", "public void addIndivualToSpecifClass(String newIndivName, String className){\r\n\t\t\r\n\t\tString newIndivPath = baseUri + \"#\"+ newIndivName;\r\n\t\tExtendedIterator iterator = currentModel.listClasses();\r\n\t\tResource res = null;\r\n\t\tfor (; iterator.hasNext();) {\r\n\t\t\tres = (Resource) iterator.next();\r\n\t\t\tif(res.getLocalName().equals(className))\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t Individual newIndiv = currentModel.createIndividual(newIndivPath, res);\r\n\t writeToOwl();\r\n\t \r\n\t}", "public static void addChemicalInfuserRecipe(ChemicalPair input, GasStack output)\n\t{\n\t\tRecipe.CHEMICAL_INFUSER.put(input, output);\n\t}", "public void addIfield(String i){\n\t\tifield.add(i);\n\t}", "public void emitIadd() {\n\t\tlines.append(\"iadd\\n\");\n\t}", "private void addCUIs(List<String> line, Map<Source, String> CUIs, Map<Source, String> tempNames) {\n\t\tString cui, name;\n\t\tint missing = 0;\n\t\tStringBuffer log = new StringBuffer();\n\t\tfor(Source voc : nobleCoderVocabs) {\n\t\t\tcui = CUIs.get(voc);\n\t\t\tname = tempNames.get(voc);\n\t\t\tif(cui == null) {\n\t\t\t\tinsert(line, 2, \"\");\n\t\t\t\tmissingNoblecoderCUIs.put(voc, missingNoblecoderCUIs.get(voc) + 1);\n\t\t\t\t++missing;\n\t\t\t}\n\t\t\telse\n\t\t\t\tinsert(line, 2, cui + \"|\" + name);\n\t\t}\n\t\tif(missing == nobleCoderVocabs.length)\n\t\t\tmissingNoblecoderCUIs.put(new Source(\"All missing\"), missingNoblecoderCUIs.get(new Source(\"All missing\")) + 1);\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic boolean addCuis(String input, String output, String meshLocation) {\n\t\t\n\t\t\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(input));\n\t\t\tPrintWriter out = new PrintWriter(output);\n\t\t\tList<String> line = new LinkedList<String>(Arrays.asList(in.readLine().split(\"\\t\")));\n\t\t\t\n\t\t\tSystem.out.println(\"Starting the CUI adder\");\n\t\t\tinsert(line, 8, \"msh_intervention_CUI\");\n\t\t\tinsert(line, 7, \"msh_condition_CUI\");\n\t\t\t\n\t\t\tinsert(line, 2, \"text_MedDRA_CUI\");\n\t\t\tinsert(line, 2, \"text_SNOMED_CT_CUI\");\n\t\t\tinsert(line, 2, \"text_MeSH_CUI\");\n\t\t\t\n\t\t\tout.write(outputString(line, \"\\t\") + \"\\n\");\t\t\t\n\t\t\t\n\t\t\tObjectInputStream meshMapfile = new ObjectInputStream(new FileInputStream(meshLocation));\n\t\t\tmeshMap = (HashMap<String, String>)meshMapfile.readObject();\n\t\t\tsetupNobleCoder();\n\t\t\tmeshMapfile.close();\n\t\t\t\n\t\t\tSystem.out.println(\"Adding CUIs. This may take take a while.\");\n\t\t\t\n\t\t\t//Reading the input row-by-row\n\t\t\twhile(in.ready()) {\n\t\t\t\t\n\t\t\t\tline = new ArrayList<String>(Arrays.asList(in.readLine().split(\"\\t\")));\n\t\t\t\taddMesh(line, 8);\n\t\t\t\taddMesh(line, 7);\n\t\t\t\taddFromNobleCoder(line);\n\t\t\t\tout.write(outputString(line, \"\\t\") + \"\\n\");\n\t\t\t\t++lines;\n\t\t\t}\n\t\t\t\n\t\t\twriteReport(output + \"_report.txt\");\n\t\t\tSystem.out.println(\"Finished!\");\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\tpseudolog.close();\n\t\t\t\n\t\t\n\t\t} catch(IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\treturn false;\n\t\t} catch(ClassNotFoundException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t\t\t\n\t\treturn true;\n\t\t\n\t}", "public void setCif(String cif) {\n this.cif = cif;\n }", "public void assignImexIdentifierToInteractions(Collection<String> interactionAcs, String imexId, ImexCentralManager imexCentralManager, Set<String> updatedIntAcs) throws PublicationImexUpdaterException;", "void addCpItem(ICpItem item);", "public boolean addCalciumChloride(String compoundName_, int count,\n\t\t\tPBox2D box2d_, P5Canvas parent_) {\n\n\t\tboolean res = true;\n\t\tString ion1 = \"Chlorine-Ion\";\n\t\tString ion2 = \"Calcium-Ion\";\n\t\tString ion3 = \"Chlorine-Ion\";\n\t\tVec2 size1 = Molecule.getShapeSize(ion1, parent_);\n\t\tVec2 size3 = Molecule.getShapeSize(ion3, parent_);\n\n\t\tfloat centerX = p5Canvas.x + 65; // X coordinate around which we are going to\n\t\t\t\t\t\t\t\t\t// add Ions, 50 is border width\n\t\tfloat centerY = p5Canvas.y + 100 - Boundary.difVolume; // Y coordinate around\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// which we are going to\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// add Ions\n\n\t\tfloat increX = p5Canvas.w / 3;\n\t\t\n\t\t\n\t\tVec2 topLeft = new Vec2(0, 0);\n\t\tVec2 botRight = new Vec2(0, 0);\n\n\t\t\n\t\tboolean isClear = false;\n\n\t\tVec2 molePos = new Vec2(0, 0); // Molecule position parameter\n\t\tVec2 molePosInPix = new Vec2(0, 0);\n\n\t\t// Specify new add area.\n\t\tsetCalciumChlorideArea(count,centerX,centerY,size1,size3,topLeft,botRight);\n\t\t// Check if there are any molecules in add area. If yes, add molecules\n\t\t// to another area.\n\t\twhile (!isClear) {\n\t\t\t\n\t\t\t// Reset flag\n\t\t\tisClear = true;\n\n\t\t\tfor (int k = 0; k < molecules.size(); k++) {\n\n\t\t\t\t//if (!((String) molecules.get(k).getName()).equals(\"Water\")) {\n\t\t\t\t\tmolePos.set(molecules.get(k).getPosition());\n\t\t\t\t\tmolePosInPix.set(box2d.coordWorldToPixels(molePos));\n\n\t\t\t\t\tif (areaBodyCheck(molePosInPix, topLeft, botRight)) {\n\t\t\t\t\t\tisClear = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t//}\n\t\t\t}\n\t\t\tif (!isClear) {\n\t\t\t\tcenterX += increX;\n\t\t\t\t// Specify new add area.\n\t\t\t\tsetCalciumChlorideArea(count,centerX,centerY,size1,size3,topLeft,botRight);\n\t\t\t\t// If we have gone through all available areas.\n\t\t\t\tif (botRight.x > (p5Canvas.x + p5Canvas.w)||topLeft.x<p5Canvas.x) {\n\t\t\t\t\tisClear = true; // Ready to jump out\n\t\t\t\t\tres = false; // Set output bolean flag to false\n\t\t\t\t\t// TO DO: Show tooltip on Add button when we cant add more\n\t\t\t\t\t// compounds\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (res) {\n\n\t\t\tfor (int i = 0; i < count; i++) {\n\t\t\t\tfloat x1, y1, angle1;\n\t\t\t\tfloat x2, y2, angle2;\n\t\t\t\tfloat x3, y3, angle3;\n\t\t\t\tx1 = centerX + (i % 2) * (size1.x * 3);\n\t\t\t\tx2 = x1 + size1.x;\n\t\t\t\tx3 = x1 + size1.x + size3.x;\n\t\t\t\ty1 = centerY + (i / 2) * 2 * size1.y;\n\t\t\t\ty2 = y1;\n\t\t\t\ty3 = y1;\n\t\t\t\tangle1 = 0;\n\t\t\t\tangle2 = 0;\n\t\t\t\tangle3 = 0;\n\t\t\t\tif (i % 4 == 1) {\n\t\t\t\t\tx2 = x1;\n\t\t\t\t\tx3 = x1;\n\t\t\t\t\ty1 = y1 - size1.x;\n\t\t\t\t\ty2 = y1 + size1.x;\n\t\t\t\t\ty3 = y2 + size1.x;\n\t\t\t\t} else if (i % 4 == 2) {\n\t\t\t\t\tx1 = x2;\n\t\t\t\t\tx3 = x2;\n\t\t\t\t\ty1 = y1 - size1.x;\n\t\t\t\t\ty2 = y1 + size1.x;\n\t\t\t\t\ty3 = y2 + size1.x;\n\t\t\t\t} else if (i % 4 == 3) {\n\t\t\t\t\tx1 = x1 - size1.x;\n\t\t\t\t\tx2 = x2 - size1.x;\n\t\t\t\t\tx3 = x3 - size1.x;\n\t\t\t\t}\n\n\t\t\t\tmolecules.add(new Molecule(x1, y1, ion1, box2d_, parent_,\n\t\t\t\t\t\tangle1));\n\t\t\t\tmolecules.add(new Molecule(x2, y2, ion2, box2d_, parent_,\n\t\t\t\t\t\tangle2));\n\t\t\t\tmolecules.add(new Molecule(x3, y3, ion3, box2d_, parent_,\n\t\t\t\t\t\tangle3));\n\n\t\t\t\tint num = molecules.size();\n\t\t\t\tint index1 = num - 3;\n\t\t\t\tint index2 = num - 2;\n\t\t\t\tint index3 = num - 1;\n\t\t\t\tMolecule m1 = molecules.get(index1);\n\t\t\t\tMolecule m2 = molecules.get(index2);\n\t\t\t\tMolecule m3 = molecules.get(index3);\n\t\t\t\tjointCaCl(index1, index2, index3, m1, m2, m3);\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "public void addNewCouncil() {\r\n\t\tlogger.info(\"Adding new council\");\r\n\t\t\r\n\t\tsetSelectedCouncil(new Council(getTask()));\r\n\t\tgetSelectedCouncil().setDateOfRequest(DateUtils.truncate(new Date(), java.util.Calendar.DAY_OF_MONTH));\r\n\t\tgetSelectedCouncil().setName(generateName());\r\n\t\tgetSelectedCouncil().setCouncilState(CouncilState.EditState);\r\n\t\tgetSelectedCouncil().setAttachedPdfs(new ArrayList<PDFContainer>());\r\n\r\n\t\tsaveCouncilData();\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getter for isFullCycle boolean
public boolean isFullCycle() { return isFullCycle; }
[ "public void setFullCycle(boolean isFullCycle) {\r\n\t\tthis.isFullCycle = isFullCycle;\r\n\t}", "public boolean inCycle() {\n return cycleDepth > 0;\n }", "public boolean isFirstCycle() {\n return cycle == 0;\n }", "public boolean isSetCycle() {\n return EncodingUtils.testBit(__isset_bitfield, __CYCLE_ISSET_ID);\n }", "public boolean elapsedCycle() {\n if (endCycle > 0) {\n this.endCycle--;\n return true;\n }\n return false;\n }", "public boolean isCycle ()\n {\n if (path.get(0).equals (path.get(path.size()-1)))\n return true;\n else\n return false;\n }", "public boolean isIsFull() {\r\n return isFull;\r\n }", "public boolean isFull() {\r\n\t\treturn this.full;\r\n\t}", "public boolean hasNegativeCycle() {\n return hasNegativeCycle;\n }", "public Integer getIsFullTimeDriver() {\n return isFullTimeDriver;\n }", "public boolean hasLooped(){\n\t\treturn haslooped;\n\t}", "boolean getWakeCycleEnabled() {\n buffer[0] = (byte) I2Cdev.readBit(MPU6050_Registers.MPU6050_RA_PWR_MGMT_1, MPU6050_Registers.MPU6050_PWR1_CYCLE_BIT);\n return buffer[0] == 1;\n }", "public boolean getImplicitDownCycleTraversal() {\n\treturn implicitDownCycleTraversal;\n }", "@Override\n public boolean isFinished() {\n return cycles > MIN_CYCLES;\n }", "private boolean hasCycle()\r\n {\r\n boolean passed = false;\r\n for(Field.RadioData dst=radioList; dst!=null; dst=dst.next)\r\n {\r\n if(dst==radioList && passed) return true;\r\n passed = true;\r\n }\r\n return false;\r\n }", "boolean getStraight();", "public boolean getFillAfter() {\n return mFillAfter;\n }", "public boolean getLoop() {\n return this.loop.getValue();\n }", "@Override\n\tpublic boolean isFullDay() {\n\t\treturn _events.isFullDay();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
initializes our processes arraylist based on job mix
public static void initProcesses(int jobMix, int sizeOfProcess, int numReferencesPerProcess) { if(jobMix == 1){ processes.add(new Process(1.0, 0.0, 0.0, sizeOfProcess, numReferencesPerProcess, 1)); } else if( jobMix == 2){ processes.add(new Process(1.0, 0.0, 0.0, sizeOfProcess, numReferencesPerProcess, 1)); processes.add(new Process(1.0, 0.0, 0.0, sizeOfProcess, numReferencesPerProcess, 2)); processes.add(new Process(1.0, 0.0, 0.0, sizeOfProcess, numReferencesPerProcess, 3)); processes.add(new Process(1.0, 0.0, 0.0, sizeOfProcess, numReferencesPerProcess, 4)); } else if(jobMix == 3){ processes.add(new Process(0.0, 0.0, 0.0, sizeOfProcess, numReferencesPerProcess, 1)); processes.add(new Process(0.0, 0.0, 0.0, sizeOfProcess, numReferencesPerProcess, 2)); processes.add(new Process(0.0, 0.0, 0.0, sizeOfProcess, numReferencesPerProcess, 3)); processes.add(new Process(0.0, 0.0, 0.0, sizeOfProcess, numReferencesPerProcess, 4)); } else if(jobMix == 4){ processes.add(new Process(0.75, 0.25, 0.0, sizeOfProcess, numReferencesPerProcess, 1)); processes.add(new Process(0.75, 0.0, 0.25, sizeOfProcess, numReferencesPerProcess, 2)); processes.add(new Process(0.75, 0.125, 0.125, sizeOfProcess, numReferencesPerProcess, 3)); processes.add(new Process(0.5, 0.125, 0.125, sizeOfProcess, numReferencesPerProcess, 4)); } else{ System.err.println("Invalid j. Must be between 1-4."); System.exit(1); } }
[ "private void initializeJobs(){\n\t\tjobs = new Job[jobCount];\n\t}", "public void getJobMixAndMakeProcesses(){\n if(jobType == 1){\n //type 1: there is only one process, with A=1 and B=C=0\n //since there is only one process, no the currentWord is 111%processSize\n processes.add(new process(1, 1, 0, 0, 111 % processSize));\n\n }else if(jobType ==2){\n //type 2: there are four processes, each with A=1, B=C=0\n for(int i=1; i<5; i++){\n processes.add(new process(i, 1, 0, 0, (111*i) % processSize));\n }\n\n\n }else if(jobType ==3){\n //type 3: there are four processes, each with A=B=C=0\n for(int i=1; i<5; i++){\n processes.add(new process(i,0, 0, 0, (111*i) % processSize));\n }\n\n }else{\n System.out.println(\"job type 4!!\");\n //process 1 with A=0.75, B=0.25, C=0\n processes.add(new process(1, 0.75, 0.25, 0, (111) % processSize));\n //process 2 with A=0.75, B= 0, C=0.25\n processes.add(new process(2, 0.75, 0, 0.25, (111*2) % processSize));\n //process 3 with A=0.75, B=0.125, C=0.125\n processes.add(new process(3, 0.75, 0.125, 0.125, (111*3) % processSize));\n //process 4 with A=0.5, B=0.125, C=0.125\n processes.add(new process(4, 0.5, 0.125, 0.125, (111*4) % processSize));\n\n }\n\n }", "private void setup()\n {\n // Input Queue List contains all queues which start the pipeline.\n input = new ArrayList<>();\n NotificationQueue<Task> queue1 = new NotificationQueue<>(new LinkedBlockingQueue());\n input.add(queue1);\n\n // Intermediatary Queue List containing sub-lists which are used between tasks.\n List<NotificationQueue<Task>> step2 = new ArrayList<>();\n NotificationQueue<Task> queue2 = new NotificationQueue<>(new LinkedBlockingQueue());\n step2.add(queue2);\n\n // Output Queue List which contains all queues that are at the end of the pipeline\n output = new ArrayList<>();\n NotificationQueue<Task> queue3 = new NotificationQueue<>(new LinkedBlockingQueue());\n output.add(queue3);\n\n Worker factorialWorker = new FactorialWorker(10, step2);\n Worker primeWorker = new PrimeWorker(10, output);\n\n queue1.addListener(factorialWorker);\n queue2.addListener(primeWorker);\n \n workers.add(factorialWorker);\n workers.add(primeWorker);\n }", "public void initialize() {\n\n\t\t// Initialize taskList\n\t\tthis.taskList = new LinkedList<Task>();\n\n\t\t// create a new thread for total size of pool\n\t\tfor (int i = 0; i < this.poolSize; ++i) {\n\t\t\tthreadPool.add(new WorkerThread(this));\n\t\t}\n\n\t\t// Start each thread in thread pool\n\t\tfor (WorkerThread t : threadPool) {\n\t\t\tnew Thread(t).start();\n\t\t}\n\n\t}", "public void startPopulateWorkers(){\r\n\t\tArrayList<Thread> threads = new ArrayList<Thread>();\r\n\t\t\r\n\t\t//Create threads\r\n\t\tfor(int i = 0; i < pts.length; i++){\r\n\t\t\tthreads.add(new Thread(pts[i]));\r\n\t\t\tthreads.get(i).start();\r\n\t\t}\r\n\t\t\r\n\t\t//Wait for threads to finish\r\n\t\tfor(int i = 0; i < pts.length; i++){\r\n\t\t\ttry {\r\n\t\t\t\tthreads.get(i).join();\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\tthrow new RuntimeException(e.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public abstract void initializeProcess();", "abstract protected void initializeWorkList();", "public void init(){\n\t\tcoreNumber = this.readIntValueFromFile(MAX_CORE_ID) + 1;\n\t\tparseAvailableFrequencies();\n\t\t\n\t\tmBaseCpuSpeedTimes = new long[cpuFrequencies.length];\n\t\tmRelCpuSpeedTimes = new long[cpuFrequencies.length];\t\t\t\t\n\t\tcores = new Core[coreNumber];\n\t\tfor(int i = 0; i < coreNumber; i++){\n\t\t\tcores[i] = new Core(i);\n\t\t\tcores[i].init();\n\t\t}\n\t}", "public void initial() {\n\t\tthis.input_buffer_list = new InputBuffer[this.input_files_name.size()];\n\t\t// initialize input buffers\n\t\tfor (int i = 0; i < this.input_files_name.size(); i++) {\n\t\t\tInputBuffer temp = new InputBuffer(this.input_buffer_size,\n\t\t\tthis.input_files_name.get(i));\n\t\t\tthis.input_buffer_list[i] = temp;\n\t\t}\n\t\t// initialize output buffers\n\t\tthis.output_buffer = new OutputBuffer(this.output_buffer_size,\n\t\t\t\tthis.output_buffer_filename_prefix);\n\t\tthis.output_buffer.initialization();\n\t\t// initialize priority queue\n\t\tint begin=(int) System.currentTimeMillis()/1000;\n\t\tfor (int i = 0; i < this.input_buffer_list.length; i++) {\n\t\t\tthis.queue.add(new PriorityQueueItem(i, this.input_buffer_list[i]\n\t\t\t\t\t.getNext()));\n//\t\t\tSystem.out.println(i);\n\t\t}\n\t\tint mid=(int) System.currentTimeMillis()/1000;\n\t\tint timetaken=mid-begin;\n\t\tSystem.out.println(\"initialization priority queue time taken: \"+timetaken+\" seconds\");\n\t\tSystem.out.println(\"initialization priority queue time taken: \"+timetaken/60+\" minutes and \"+timetaken%60+\" seconds\");\n\t}", "private void setupProcessingPipeline() throws Exception {\n // activeProcessingUnits = 1;\n\n nonThreadedProcessingUnit = new NonThreadedProcessingUnit(this);\n // Assign initial status to all Cas Processors in the processing pipeline\n for (int i = 0; i < annotatorList.size(); i++) {\n ((ProcessingContainer) annotatorList.get(i)).setStatus(Constants.CAS_PROCESSOR_RUNNING);\n }\n\n nonThreadedProcessingUnit.setContainers(annotatorList);\n nonThreadedProcessingUnit.setCasPool(casPool);\n for (int j = 0; j < statusCbL.size(); j++) {\n BaseStatusCallbackListener statCL = (BaseStatusCallbackListener) statusCbL.get(j);\n if (statCL != null) {\n nonThreadedProcessingUnit.addStatusCallbackListener(statCL);\n }\n }\n }", "public void createJobs(){\n \t\n \tjobSimulator.simulateJobs(this.list, this.timeToPlay);\n\n }", "private static void initLists() {\n channelCommands = new ArrayList<Command>();\n serverCommands = new ArrayList<Command>();\n queryCommands = new ArrayList<Command>();\n \n channelParsers = new ArrayList<CommandParser>();\n serverParsers = new ArrayList<CommandParser>();\n queryParsers = new ArrayList<CommandParser>();\n \n initCommands();\n }", "protected void setSchedulerParams() {\n Process p1 = new Process(\"p1\", new int[] {5, 27, 3, 31, 5, 43, 4, 18, 6, 22, 4, 26, 3, 24, 4});\n Process p2 = new Process(\"p2\", new int[] {4, 48, 5, 44, 7, 42, 12, 37, 9, 76, 4, 41, 9, 31, 7, 43, 8});\n Process p3 = new Process(\"p3\", new int[] {8, 33, 12, 41, 18, 65, 14, 21, 4, 61, 15, 18, 14, 26, 5, 31, 6}); \n Process p4 = new Process(\"p4\", new int[] {3, 35, 4, 41, 5, 45, 3, 51, 4, 61, 5, 54, 6, 82, 5, 77, 3});\n Process p5 = new Process(\"p5\", new int[] {16, 24, 17, 21, 5, 36, 16, 26, 7, 31, 13, 28, 11, 21, 6, 13, 3, 11, 4});\n Process p6 = new Process(\"p6\", new int[] {11, 22, 4, 8, 5, 10, 6, 12, 7, 14, 9, 18, 12, 24, 15, 30, 8});\n Process p7 = new Process(\"p7\", new int[] {14, 46, 17, 41, 11, 42, 15, 21, 4, 32, 7, 19, 16, 33, 10});\n Process p8 = new Process(\"p8\", new int[] {4, 14, 5, 33, 6, 51, 14, 73, 16, 87, 6});\n \n ready_queue.add(p1);\n ready_queue.add(p2);\n ready_queue.add(p3);\n ready_queue.add(p4);\n ready_queue.add(p5);\n ready_queue.add(p6);\n ready_queue.add(p7);\n ready_queue.add(p8);\n }", "public JobMonitor (int _iterNum, int _taskNum) {\t\t\r\n\t\tthis.agg_list = new ArrayList<Double>();\r\n\t\t//this.counters_list = new ArrayList<Counters>();\r\n\t}", "@PostConstruct\n public void initialize() {\n \n List<Job> jobs = getJobList();\n \n if ((jobs != null) && (jobs.size() > 0)) {\n metrics = new BundlerMetrics();\n MetricsCalculator calc = new MetricsCalculator();\n calc.getMetrics(metrics, jobs);\n }\n else {\n LOGGER.warn(\"No jobs have been submitted/processed 30 days. \"\n + \"This is almost certainly an error. Please review \"\n + \"previous log entries.\");\n }\n }", "public void createJobList(){\n //puts these jobs into the available jobs list\n availableJobs = CSVController.selectJobsWithoutFisher();\n }", "public JobManager(){\n //Initialize the job manager for use of the system\n }", "public void initPrimaryContainer() {\n for (IMixinPlatformAgent agent : this.agents) {\n MixinContainer.logger.debug(\"Processing launch tasks for {}\", agent);\n agent.initPrimaryContainer();\n }\n }", "private void startJobs() {\n List<JobProfile> profileList = getJobConfDb().getAcceptedJobs();\n for (JobProfile profile : profileList) {\n LOGGER.info(\"init starting job from db {}\", profile.toJsonStr());\n addJob(new Job(profile));\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs the adrenaline card action.
public String itemAdrenalineAction() { this.updateAllJournals("Player " + playerID + " uses: Adrenaline card."); Player p = CommonMethods.toPlayer(playerID, playerList); p.setMoves(2); usedAdrenalineCard = true; return "OK"; }
[ "public boolean acknowledgeCardAbility(Card card){\n if(card.isNoble){\n switch(card.getId()){\n\n //add noble from deck to end of card line after collecting this noble\n case \"Capt_Guard\":\n gameState.actionCardPlayed = true;\n dealNoble();\n gameState.actionCardPlayed = false;\n break;\n//\n// case \"Count\":\n// //needs to go in special calculate points\n// if(gameState.playerTurn == 0){\n// p0Count = true;\n// }\n// else{\n// p1Count = true;\n// }\n// break;\n//\n// case \"Countess\":\n// //need to go in calculate points statement\n// if(gameState.playerTurn == 0){\n// p0Countess = true;\n// }\n// else{\n// p1Countess = true;\n// }\n// break;\n//\n// case \"Fast_Noble\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// getNoble(gameState.p0Field);\n// }\n// else{\n// getNoble(gameState.p1Field);\n// }\n// gameState.actionCardPlayed = false;\n//\n// break;\n//\n// case \"General\":\n// gameState.actionCardPlayed = true;\n//\n// dealNoble();\n//\n// gameState.actionCardPlayed = false;\n//\n// break;\n//\n// //user selects a card in their action card and the click\n// //gets the location and then it uses the location to discard the card\n// case \"Innocent\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// discardActionCard(gameState.p0Field, loc);\n// }\n// else{\n// discardActionCard(gameState.p1Field, loc);\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// case \"Lady\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// dealActionCard(gameState.p0Field);\n// }\n// else{\n// dealActionCard(gameState.p1Field);\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// case \"Lady_Waiting\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// dealActionCard(gameState.p0Field);\n// }\n// else{\n// dealActionCard(gameState.p1Field);\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// case \"Lord\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// dealActionCard(gameState.p0Field);\n// }\n// else{\n// dealActionCard(gameState.p1Field);\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// case \"Spy\":\n// gameState.actionCardPlayed = true;\n// //need to add method and checks\n// gameState.actionCardPlayed = false;\n// break;\n//\n// case \"Palace_Guard1\":\n// //ability is in calculate point method\n// if(gameState.playerTurn == 0){\n// p0PalaceGuard++;\n// }\n// else{\n// p1PalaceGuard++;\n// }\n// break;\n//\n// case \"Palace_Guard2\":\n// //ability is in calculate point method\n// if(gameState.playerTurn == 0){\n// p0PalaceGuard++;\n// }\n// else{\n// p1PalaceGuard++;\n// }\n// break;\n//\n// case \"Palace_Guard3\":\n// //ability is in calculate point method\n// if(gameState.playerTurn == 0){\n// p0PalaceGuard++;\n// }\n// else{\n// p1PalaceGuard++;\n// }\n// break;\n//\n// case \"Palace_Guard4\":\n// //ability is in calculate point method\n// if(gameState.playerTurn == 0){\n// p0PalaceGuard++;\n// }\n// else{\n// p1PalaceGuard++;\n// }\n// break;\n//\n// case \"Palace_Guard5\":\n// //ability is in calculate point method\n// if(gameState.playerTurn == 0){\n// p0PalaceGuard++;\n// }\n// else{\n// p1PalaceGuard++;\n// }\n// break;\n//\n// case \"Rival1\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// gameState.p0Field.add(gameState.deckNoble.get(0));\n// gameState.deckNoble.remove(0);\n// }\n// else{\n// gameState.p1Field.add(gameState.deckNoble.get(0));\n// gameState.deckNoble.remove(0);\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// case \"Rival2\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// gameState.p0Field.add(gameState.deckNoble.get(0));\n// gameState.deckNoble.remove(0);\n// }\n// else{\n// gameState.p1Field.add(gameState.deckNoble.get(0));\n// gameState.deckNoble.remove(0);\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// case \"Robespierre\":\n// gameState.actionCardPlayed = true;\n// discardRemainingNobles();\n// gameState.actionCardPlayed = false;\n// break;\n//\n// case \"Clown\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// placeClown(gameState.p1Field, gameState.p0Field.get(gameState.p0Field.size()-1));\n// gameState.p0Field.remove(gameState.p0Field.size()-1);\n// }\n// else{\n// placeClown(gameState.p0Field, gameState.p1Field.get(gameState.p1Field.size()-1));\n// gameState.p1Field.remove(gameState.p1Field.size()-1);\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// case \"Tragic_Figure\":\n// //action is in calculate points method\n// break;\n//\n//\n }\n }\n else{\n switch(card.getId()){\n//\n// // put noble at front of line into other players field\n// case \"After_You\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n//\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// getNoble(gameState.p1Field);\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"After_You\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// getNoble(gameState.p0Field);\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"After_You\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move noble at front of line to end of line\n// case \"Bribed\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// moveNoble(0, gameState.nobleLine.size()-1);\n// if(gameState.playerTurn == 0){\n//\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Bribed\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Bribed\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// case \"Callous\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n//\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Callous\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Callous\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //card goes to field and is used for the pointer counter\n// case \"Church_Support\":\n// gameState.actionCardPlayed = true;\n//\n// if(gameState.playerTurn == 0){\n//\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Church_Support\")){\n// gameState.p0Field.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Church_Support\")){\n// gameState.p1Field.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n//\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //moves one green card to a different spot in the line\n// //gets the locations from the onclick, so i cant implement this\n// case \"Civic_Pride\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// if(gameState.nobleLine.get(loc1).cardColor.equals(\"Green\")) {\n// moveNoble(loc1, loc2);\n// }\n//\n//\n// if(gameState.playerTurn == 0){\n//\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Civic_Pride\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Civic_Pride\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //increases point values in field. Will be calculated in a points method\n// case \"Civic_Support\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n//\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Civic_Support\")){\n// gameState.p0Field.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Civic_Support\")){\n// gameState.p1Field.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //lets players swap nobles (cant swap same noble)\n// //need locations that both players choose using onclick\n// case \"Clerical_Error\":\n// gameState.actionCardPlayed = true;\n// //will write method later\n//\n//\n// if(gameState.playerTurn == 0){\n//\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Clerical_Error\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Clerical_Error\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //discard any noble in nobleline and replace it with card in Ndeck\n// case \"Clothing_Swap\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// gameState.deckDiscard.add(gameState.nobleLine.get(touchloc));\n// gameState.nobleLine.remove(touchLoc);\n// gameState.nobleLine.add(touchloc, gameState.deckNoble.get(0));\n// gameState.deckNoble.remove(0);\n// gameState.actionCardPlayed = false;\n//\n//\n// if(gameState.playerTurn == 0){\n//\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Clothing_Swap\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Clothing_Swap\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// break;\n//\n// //shuffles noble line right before other player draws a noble\n// case \"Confusion\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n//\n// if(gameState.playerTurn == 0){\n//\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Confusion\")){\n// this.shuffle1 = true;\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Confusion\")){\n// this.shuffle0 = true;\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //lets user collect additional noble from noble line\n// case \"Double_Feature1\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// getNoble(gameState.p0Hand);\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Double_Feature1\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// getNoble(gameState.p1Hand);\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Double_Feature1\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //lets user collect additional noble from noble line\n// case \"Double_Feature2\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// getNoble(gameState.p0Hand);\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Double_Feature2\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// getNoble(gameState.p1Hand);\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Double_Feature2\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n// //discard two nobleline cards and then shuffle the nobleline deck\n// case \"Escape\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0) {\n// int rand1 = (int) (Math.random() * gameState.nobleLine.size());\n// gameState.deckDiscard.add(gameState.nobleLine.get(rand1));\n// gameState.nobleLine.remove(rand1);\n//\n// int rand2 = (int) (Math.random() * gameState.nobleLine.size());\n// gameState.deckDiscard.add(gameState.nobleLine.get(rand2));\n// gameState.nobleLine.remove(rand2);\n// Collections.shuffle(gameState.nobleLine);\n//\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Escape\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Escape\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //add 3 nobles from noble deck to noble line\n// case \"Extra_Cart1\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// for(int i = 0; i < 3; i++){\n// dealNoble();\n// }\n//\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Extra_Cart1\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Extra_Cart1\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //add 3 nobles from noble deck to noble line\n// case \"Extra_Cart2\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// for(int i = 0; i < 3; i++){\n// dealNoble();\n// }/\n//\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Extra_Cart2\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Extra_Cart2\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move noble up to 3 card positions back\n// //locs from onclick\n// case \"Fainting\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// if(newPos - origPos > 3){\n// gameState.nobleLine.add(newPost, gameState.nobleLine.get(origPost));\n// gameState.nobleLine.remove(origPost);\n// }\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Fainting\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Fainting\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //discard any noble in line\n// //needs onclick to select the noble\n// case \"Fled\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n//\n// gameState.nobleLine.remove(cardPos);\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Fled\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Fled\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //randomly removes action card from other player\n// case \"Forced_Break\":\n// gameState.actionCardPlayed = true;\n//\n// int rand = 0;\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Forced_Break\")){\n// if(!gameState.p1Hand.isEmpty()) {\n// rand = (int) (Math.random() * gameState.p1Hand.size());\n// gameState.deckDiscard.add(gameState.p1Hand.get(rand));\n// gameState.p1Hand.remove(rand);\n// }\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Forced_Break\")){\n// if(!gameState.p0Hand.isEmpty()) {\n// rand = (int) (Math.random() * gameState.p0Hand.size());\n// gameState.deckDiscard.add(gameState.p0Hand.get(rand));\n// gameState.p0Hand.remove(rand);\n// }\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //put card in field and draw an actioncard when you get purple noble\n// case \"Foreign_Support\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Foreign_Support\")){\n// gameState.p0Field.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// FS0 = true;\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Foreign_Support\")){\n// gameState.p1Field.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// FS0 = true;\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //grabs the first palace guard in noble line and puts it at position 0\n// case \"Forward_March\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n//\n//\n// //going through line to find the first palace guard. Putting in discard\n// //so then I could get the card when readding it.\n// for(int k = 0; k < gameState.nobleLine.size(); k++){\n// if(gameState.nobleLine.get(k).getId().contains(\"Palace_Guard\")){\n// gameState.deckDiscard.add(0,gameState.nobleLine.get(k));\n// gameState.nobleLine.remove(k);\n// gameState.nobleLine.add(0, gameState.deckDiscard.get(0));\n// gameState.deckDiscard.remove(0);\n// k = gameState.nobleLine.size();\n// }\n// }\n//\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Forward_March\")){\n// gameState.p0Field.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Forward_March\")){\n// gameState.p1Field.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //card is in field and worth 2 points\n// //actiond one in points method\n// case \"Fountain\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Fountain\")){\n// gameState.p0Field.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Fountain\")){\n// gameState.p1Field.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move noble backwards up to 2 spaces\n// case \"Friend_Queen1\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// if(newLoc - oldLoc < 3){\n// moveNoble(oldLoc, newLoc);\n// }\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Friend_Queen1\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Friend_Queen1\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move noble card 2 spaces back\n// case \"Friend_Queen2\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// if(newLoc - oldLoc < 3){\n// moveNoble(oldLoc, newLoc);\n// }\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Friend_Queen2\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Friend_Queen2\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move noble up to two spaces\n// case \"Idiot1\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n//\n// if(oldLoc - newLoc < 3 && oldLoc - newLoc >=0){\n// moveNoble(oldLoc, newLoc);\n// }\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Idiot1\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Idiot1\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move noble card up to 2 spaces\n// case \"Idiot2\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// if(oldLoc - newLoc < 3 && oldLoc - newLoc >=0){\n// moveNoble(oldLoc, newLoc);\n// }\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Idiot2\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Idiot2\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move noble exactly four spaces\n// //need onclick location of card they choose\n// case \"Ignoble1\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// if(oldLoc - 4 >= 0){\n// moveNoble(oldLoc, oldLoc-4);\n// }\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Ignoble1\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Ignoble1\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move noble exactly four spaces\n// //need onclick location of card they choose\n// case \"Ignoble2\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// if(oldLoc - 4 >= 0){\n// moveNoble(oldLoc, oldLoc-4);\n// }\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Ignoble2\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Ignoble2\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //makes all gray cards in user field worth 1 point\n// //implemented more in point method\n// case \"Indifferent\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Indifferent\")){\n// gameState.p0Field.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Indifferent\")){\n// gameState.p0Field.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //other player discards two action cards\n// //uses onclick for user choice\n// case \"Infighting\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Infighting\")){\n// for(int k = 0; k < 2; k ++) {\n// if(gameState.p1Hand.size() != 0) {\n// discardActionCard(gameState.p1Hand, userLoc);\n// }\n// }\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Infighting\")){\n// for(int k = 0; k < 2; k ++) {\n// if(gameState.p0Hand.size() != 0) {\n// discardActionCard(gameState.p0Hand, userLoc);\n// }\n// }\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //trade user hands\n// case \"Info_Exchange\":\n// gameState.actionCardPlayed = true;\n// tradeHands(gameState.p0Hand, gameState.p1Hand);\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Info_Exchange\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Info_Exchange\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move nearest blue noble to front of line\n// case \"Lack_Faith\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n//\n// for(int k = 0; k < gameState.nobleLine.size(); k++){\n// if(gameState.nobleLine.get(k).cardColor.equals(\"Blue\")){\n// moveNoble(k, 0);\n// }\n// }\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Lack_Faith\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Lack_Faith\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //look at enemy player hand and discard one card\n// //cannot do as of right now\n// case \"Lack_Support\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Lack_Support\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Lack_Support\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n//\n// //look at top three cards of noble deck and add one to nobleLine\n// case \"Late_Arrival\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Late_Arrival\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// topThreeCards(gameState.p0Field);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Late_Arrival\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// topThreeCards(gameState.p1Field);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //if marie is in line, move her to front\n// case \"Let_Cake\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n//\n// for(int k = 0; k < gameState.nobleLine.size(); k++){\n// if(gameState.nobleLine.get(k).id.equals(\"Antoinette\")){\n// moveNoble(k, 0);\n// }\n// }\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Let_Cake\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Let_Cake\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move purple noble up to 2 spaces ahead\n// //needs onclick\n// case \"Majesty\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n//\n// if(gameState.nobleLine.get(userLoc).cardColor.equals(\"Purple\")){\n// if(userLoc - newLoc < 3){\n// moveNoble(userLoc, newLoc);\n// }\n// }\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Majesty\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Majesty\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //put all noble cards in noble line back in noble deck, shuffle noble deck\n// //and redeal the same amount of noble cards that used to be in line\n// case \"Mass_Confusion\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// int var = gameState.nobleLine.size();\n// for(int k = 0; k < gameState.nobleLine.size(); k++){\n// gameState.deckNoble.add(gameState.nobleLine.get(k));\n// gameState.nobleLine.remove(k);\n// }\n// shuffleDecks();\n// for(int l = 0; l < var; l++){\n// dealNoble();\n// }\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Mass_Confusion\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Mass_Confusion\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move red card up to two spaces forward\n// case \"Military_Might\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n//\n// if(gameState.nobleLine.get(userLoc).cardColor.equals(\"Red\")){\n// if(userLoc - newLoc < 3){\n// moveNoble(userLoc, newLoc);\n// }\n// }\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Military_Might\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Military_Might\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //if this card is in your field, then you get +1 points for all red cards you have\n// //is implemented in point method\n// case \"Military_Support\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Military_Support\")){\n// gameState.p0Field.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Military_Support\")){\n// gameState.p1Field.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //randomly shuffle first 5 nobles in line\n// case \"Milling1\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n//\n// rearrangeFives();\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Milling1\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Milling1\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //randomly shuffle first five nobles in line\n// case \"Milling2\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n//\n// rearrangeFives();\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Milling2\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Milling2\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //other player places their last collected noble back in noble line\n// case \"Missed\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// boolean notFound = true;\n// int length;\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Missed\")){\n// length = gameState.p1Field.size()-1;\n// while(notFound){\n// if(gameState.p1Field.get(length).isNoble){\n// gameState.nobleLine.add(gameState.p1Field.get(length));\n// gameState.p1Field.remove(length);\n// notFound = false;\n// }\n// length--;\n// }\n//\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Missed\")){\n// length = gameState.p0Field.size()-1\n// while(notFound){\n// if(gameState.p0Field.get(length).isNoble){\n// gameState.nobleLine.add(gameState.p0Field.get(length));\n// gameState.p0Field.remove(length);\n// notFound = false;\n// }\n// length--;\n// }\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //removes random noble from enemy player noble field\n// case \"Missing_Heads\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Missing_Heads\")){\n// gameState.p1Field.remove((int)(Math.random()*gameState.p1Field.size()));\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Missing_Heads\")){\n// gameState.p0Field.remove((int)(Math.random()*gameState.p0Field.size()));\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //user rearranges the first four nobles however they want\n// case \"Opinionated\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n//\n// if(gameState.nobleLine.size() > 3) {\n// moveNoble(0, newLoc);\n// moveNoble(1, newLoc);\n// moveNoble(2, newLoc);\n// moveNoble(3, newLoc);\n// }\n// else{\n// for(int k = 0; k < gameState.nobleLine.size(); k++){\n// moveNoble(k, newLoc);\n// }\n// }\n//\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Opinionated\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Opinionated\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //get 3 action cards and skip collect noble phase\n// case \"Political_Influence1\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Political_Influence1\")){\n// dealActionCard(gameState.p0Hand);\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Political_Influence1\")){\n// dealActionCard(gameState.p1Hand);\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.turnPhase++;\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //get 3 action cards and skip noble draw phase\n// case \"Political_Influence2\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Political_Influence2\")){\n// dealActionCard(gameState.p0Hand);\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Political_Influence2\")){\n// dealActionCard(gameState.p1Hand);\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.turnPhase++;\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move anynoble in line to front\n// //requires on click\n// case \"Public_Demand\":\n// gameState.actionCardPlayed = true;\n// moveNoble(userLoc, 0);\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Public_Demand\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Public_Demand\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move noble card exactly 2 spaces in line\n// //need on click listener\n// case \"Pushed1\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n//\n// if(userLoc - 2 >=0){\n// moveNoble(userLoc, userLoc-2);\n// }\n// else{\n// moveNoble(userLoc, 0);\n// }\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Pushed1\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Pushed1\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move noble card exactly 2 spaces in line\n// //need on click listener\n// case \"Pushed2\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// if(userLoc - 2 >=0){\n// moveNoble(userLoc, userLoc-2);\n// }\n// else{\n// moveNoble(userLoc, 0);\n// }\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Pushed2\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Pushed2\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //put players action cards back in action deck, shuffle action deck and give each player 5 cards\n// case \"Rain_Delay\":\n// gameState.actionCardPlayed = true;\n//\n// while(!gameState.p0Hand.isEmpty()){\n// gameState.deckAction.add(gameState.p0Hand.get(0));\n// gameState.p0Hand.remove(0);\n// }\n// while(!gameState.p1Hand.isEmpty()){\n// gameState.deckAction.add(gameState.p1Hand.get(0));\n// gameState.p1Hand.remove(0);\n// }\n// shuffleDecks();\n// for(int k = 0; k < 5; k++){\n// dealActionCard(gameState.p0Hand);\n// dealActionCard(gameState.p1Hand);\n// }\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Rain_Delay\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Rain_Delay\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //put action card in discard pile into your hand\n// //need onclick\n// case \"Rat_Break\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Rat_Break\")){\n// if(!gameState.deckDiscard.get(userLoc).isNoble) {\n// gameState.p0Hand.add(gameState.deckDiscard.get(userLoc));\n// gameState.deckDiscard.remove(userLoc);\n// }\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Rat_Break\")){\n// if(!gameState.deckDiscard.get(userLoc).isNoble) {\n// gameState.p1Hand.add(gameState.deckDiscard.get(userLoc));\n// gameState.deckDiscard.remove(userLoc);\n// }\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //other player cant play action on their next turn\n// case \"Rush_Job\":\n// gameState.actionCardPlayed = true;\n// noAction = true;\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Rush_Job\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Rush_Job\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //day ends after player finishes turn, discards all noble line\n// case \"Scarlet\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// scarletInPlay = true;\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Scarlet\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Scarlet\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move one noble card one spot forward\n// case \"Stumble1\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n//\n// if(userLoc != 0){\n// moveNoble(userLoc, userLoc -1);\n// }\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Stumble1\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Stumble1\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move one noble card one spot forward\n// case \"Stumble2\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// if(userLoc != 0){\n// moveNoble(userLoc, userLoc -1);\n// }\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Stumble2\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Stumble2\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n //reverse nobleline order\n case \"Long_Walk\":\n if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n break;\n }\n gameState.actionCardPlayed = true;\n reverseLineOrder();\n if(gameState.playerTurn == 0){\n for(int i = 0; i < gameState.p0Hand.size(); i++){\n if(gameState.p0Hand.get(i).getId().equals(\"Long_Walk\")){\n gameState.deckDiscard.add(gameState.p0Hand.get(i));\n gameState.p0Hand.remove(i);\n }\n }\n }\n else{\n for(int i = 0; i < gameState.p1Hand.size(); i++){\n if(gameState.p1Hand.get(i).getId().equals(\"Long_Walk\")){\n gameState.deckDiscard.add(gameState.p1Hand.get(i));\n gameState.p1Hand.remove(i);\n }\n }\n\n }\n gameState.actionCardPlayed = false;\n break;\n//\n// //move noble forward exactly 3 places\n// case \"Better_Thing\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// if(userLoc - 3 >=0){\n// moveNoble(userLoc, userLoc-3);\n// }\n// else{\n// moveNoble(userLoc, 0);\n// }\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Better_Thing\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Better_Thing\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n//\n// //add card to other player field, it is worth -2\n// //will be done in point method\n// case \"Tough_Crowd\":\n//\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Tough_Crowd\")){\n// gameState.p1Field.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Tough_Crowd\")){\n// gameState.p0Field.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move noble card back one spot let user play another action\n// //i have no idea how to let the user play another action\n// case \"Trip1\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// gameState.turnPhase --;\n//\n// if(userLoc != gameState.nobleLine.size()-1){\n// moveNoble(userLoc, userLoc +1);\n// }\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Trip1\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Trip1\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move noble card back one spot let user play another action\n// //i have no idea how to let the user play another action\n// case \"Trip2\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n// gameState.turnPhase --;\n//\n// if(userLoc != gameState.nobleLine.size()-1){\n// moveNoble(userLoc, userLoc +1);\n// }\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Trip2\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Trip2\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //put any action card in player field into discard\n// //need onclick user loc\n// case \"Twist_Fate\":\n// gameState.actionCardPlayed = true;\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Twist_Fate\")){\n// if(!gameState.p1Field.get(userLoc).isNoble){\n// gameState.deckDiscard.add(gameState.p1Field.get(userLoc));\n// gameState.p1Field.remove(userLoc);\n// }\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Twist_Fate\")){\n// if(!gameState.p0Field.get(userLoc).isNoble){\n// gameState.deckDiscard.add(gameState.p0Field.get(userLoc));\n// gameState.p0Field.remove(userLoc);\n// }\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n// //move any noble up to 3 spaces forward\n// //need onclick user loc and the new location\n// case \"Was_Name\":\n// if(gameState.p1Field.contains(card.id.equals(\"Callous\")) || gameState.p0Field.contains(card.id.equals(\"Callous\")) ){\n// break;\n// }\n// gameState.actionCardPlayed = true;\n//\n// if(userLoc - newLoc >=0){\n// moveNoble(userLoc, newLoc);\n// }\n// else{\n// moveNoble(userLoc, 0);\n// }\n//\n// if(gameState.playerTurn == 0){\n// for(int i = 0; i < gameState.p0Hand.size(); i++){\n// if(gameState.p0Hand.get(i).getId().equals(\"Was_Name\")){\n// gameState.deckDiscard.add(gameState.p0Hand.get(i));\n// gameState.p0Hand.remove(i);\n// }\n// }\n// }\n// else{\n// for(int i = 0; i < gameState.p1Hand.size(); i++){\n// if(gameState.p1Hand.get(i).getId().equals(\"Was_Name\")){\n// gameState.deckDiscard.add(gameState.p1Hand.get(i));\n// gameState.p1Hand.remove(i);\n// }\n// }\n//\n// }\n// gameState.actionCardPlayed = false;\n// break;\n//\n }\n }\n return false;\n }", "public void SpecialCardAction(UNOCard aCard) {\n\t\t\n\t\tif (aCard.getName() == \"Reverse\") { // Reverse card is played, so game direction is switched\n\t\t\tif (gameDirection == \"right\") {\n\t\t\t\tgameDirection = \"left\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgameDirection = \"right\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (aCard.getName() == \"Skip\") {\n\t\t\tif (gameDirection == \"right\") { // If Game is moving in one direction\n\t\t\t\tcurrentPlayerToPlayIndex = currentPlayerToPlayIndex + 2; // player next to play is skipped\n\t\t\t\tif (currentPlayerToPlayIndex >= players.size()) {\n\t\t\t\t\tcurrentPlayerToPlayIndex = currentPlayerToPlayIndex - players.size();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (gameDirection == \"left\") { // If Game is moving in other direction\n\t\t\t\tcurrentPlayerToPlayIndex = currentPlayerToPlayIndex - 2; // player next to play is skipped\n\t\t\t\tif (currentPlayerToPlayIndex <= 0) {\n\t\t\t\t\tcurrentPlayerToPlayIndex = currentPlayerToPlayIndex + players.size();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tcurrentPlayerToPlay = players.get(currentPlayerToPlayIndex); // Next Player to play a card\n\t\t\n\t\tif (aCard.getName() == \"Draw Two\") { // If a Draw Two Card is played, the enxt player to play is dealt two cards\n\t\t\tif (gameDirection == \"right\") {\n\t\t\t\tif (currentPlayerToPlayIndex < players.size()) {\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (gameDirection == \"left\") {\n\t\t\t\tif (currentPlayerToPlayIndex != 0) {\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (aCard.getName() == \"Wild\") { // Wild is played, function called to ask user for new color\n\t\t\tWildIsPlayedAskUserForColor();\n\t\t}\n\t\t\n\t\tif (aCard.getName() == \"Wild Draw Four\") {\n\t\t\tif (gameDirection == \"right\") { // if game direction is this way\n\t\t\t\tif (currentPlayerToPlayIndex < players.size()) {\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard()); // draw four cards\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex + 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard()); // draw four cards\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(0).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (gameDirection == \"left\") { // if game direction is this way\n\t\t\t\tif (currentPlayerToPlayIndex != 0) {\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard()); // draw four cards\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(currentPlayerToPlayIndex - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard()); // draw four cards\n\t\t\t\t\tplayers.get(players.size() - 1).getPlayersHand().add(GameUNODeck.DealACard());\n\t\t\t\t}\n\t\t\t}\n\t\t\tWildIsPlayedAskUserForColor();\n\t\t}\n\t\t\n\t}", "public void dealerAcceptCards(Card aCard){\r\n\t\tdealerHand.add(aCard);\r\n\t\thandSum += aCard.getValue();\r\n\t\tif(aCard.getValue()==11){\r\n\t\t\tace = true;\r\n\t\t}\r\n\t\tif(ace && handSum >21){\r\n\t\t\thandSum -= 10;\r\n\t\t\tace = false;\r\n\t\t}\r\n\t}", "Card giveAdversaryCard();", "public abstract void attack(ICard card);", "@Override\r\n public void executeReinforcement() {\r\n notifyView();\r\n\r\n Integer getReinforcementCountFromCards = getReinforcementCountFromValidCardsAI();\r\n Integer totalReinforcementArmyCount = getReinforcementCountFromCards + calculateReinforcementArmy();\r\n ReinforcementPhaseState reinforcementPhase = new ReinforcementPhaseState();\r\n reinforcementPhase.setNumberOfArmiesReceived(totalReinforcementArmyCount);\r\n\r\n reinforcementPhaseState.add(reinforcementPhase);\r\n\r\n notifyView();\r\n placeArmy(totalReinforcementArmyCount);\r\n\r\n }", "public void playCard() {\n\t}", "private void scanCard() {\n\n Intent intent = new ScanCardIntent.Builder(getActivity()).build();\n startActivityForResult(intent, Constant.REQUEST_CODE_SCAN_CARD);\n }", "public void doCard(Card c, Player p) {\n String m = c.getMessage();\n if (!p.isAI())\n board.showMessageDialog(c.getMessage());\n if (m.equals(\"Take a ride on the Reading Railroad. If you pass go collect $200.\")) {\n if (p.getLocation() > 5)\n p.addMoney(200);\n moveToLocation(p, 5);\n landedOnSpot(\"Reading Railroad\", p, roll);\n }\n else if (m.equals(\"Bank pays you dividend of $50\"))\n p.addMoney(50);\n else if (m.equals(\"Advance to Illinois Avenue\")) {\n moveToLocation(p, 24); \n landedOnSpot(\"Illinois Avenue\", p, roll);\n }\n else if (m.equals(\"Your building and loan matures. Collect $150\"))\n p.addMoney(150);\n else if (m.equals(\"Get out of jail free card\"))\n p.addJailCard();\n else if (m.equals(\"Make general repairs on all your property. Pay $25 for each house. Pay $100 for each hotel\")) {\n int numHouses = 0;\n int numHotels = 0;\n for (String s : properties.keySet()) {\n if (propertyOwners.get(s) != null && propertyOwners.get(s).equals(p)) {\n numHouses += properties.get(s).getNumHouses();\n if (properties.get(s).hasHotel())\n numHotels++;\n }\n }\n }\n else if (m.equals(\"Advance token to the nearest railroad and pay the owner \\n \" + \n \"twice the rental to which he is otherwise \\n \" + \n \"entitled. If railroad is unowned, you may buy it from the bank.\")) {\n if (p.getLocation() < 5)\n moveToLocation(p, 5);\n else if (p.getLocation() < 15)\n moveToLocation(p, 15);\n else if (p.getLocation() < 25)\n moveToLocation(p, 25);\n else\n moveToLocation(p, 35);\n \n landedOnSpot(allSpots.get(p.getLocation()), p, roll);\n }\n else if (m.equals(\"Pay poor tax of $15\"))\n p.addMoney(-15);\n else if (m.equals(\"Take a walk on the Boardwalk\")) {\n moveToLocation(p, 39);\n landedOnSpot(\"Boardwalk\", p, roll);\n }\n else if (m.equals(\"Advance to St. Charles Place\")) {\n moveToLocation(p, 11);\n landedOnSpot(\"St. Charles Place\", p, roll);\n }\n else if (m.equals(\"You have been elected chairman of the board. Pay each player $50\")) {\n for (Player player : players) {\n p.addMoney(-50);\n player.addMoney(50);\n }\n }\n \n else if (m.equals(\"Advance token to nearest utility. \" +\n \"\\nIf unowned, you may buy it from the bank. \" +\n \"\\nIf owned, throw the dice and pay owner a total of 10 times the amount thrown\")) {\n if (p.getLocation() < 12)\n moveToLocation(p, 12); //electric company\n else\n moveToLocation(p, 28); //water works\n \n if (utilityOwners.get(allSpots.get(p.getLocation())) != null) { //if utility is owned\n int amtToPay = rollDice() * 10;\n utilityOwners.get(allSpots.get(p.getLocation())).addMoney(amtToPay);\n p.addMoney(-amtToPay);\n }\n else\n landedOnSpot(allSpots.get(p.getLocation()), p, roll);\n }\n else if (m.equals(\"Go back 3 spaces\")) {\n move(p, -3);\n System.out.println(p.getLocation());\n landedOnSpot(allSpots.get(p.getLocation()), p, roll);\n }\n else if (m.equals(\"Advance to Go. Collect $200 dollars\")) {\n moveToLocation(p, 0);\n p.addMoney(200);\n }\n else if (m.equals(\"Go directly to jail\")) {\n moveToLocation(p, 40);\n p.addJailTurn();\n }\n \n //community chest\n else if (m.equals(\"Income Tax Refund. Collect $20\"))\n p.addMoney(20);\n else if (m.equals(\"You are assessed for street repairs. $40 per house $115 per hotel\")) {\n int numHouses = 0;\n int numHotels = 0;\n for (String s : properties.keySet()) {\n if (propertyOwners.get(s) != null && propertyOwners.get(s).equals(p)) {\n numHouses += properties.get(s).getNumHouses();\n if (properties.get(s).hasHotel())\n numHotels++;\n }\n }\n while (numHouses > 0) {\n p.addMoney(-40);\n numHouses--;\n }\n while (numHotels > 0) {\n p.addMoney(-115);\n numHotels--;\n }\n }\n else if (m.equals(\"You inherit $100!\"))\n p.addMoney(100);\n else if (m.equals(\"Grand Opera Opening. Collect $50 from every player\")) {\n for (Player player : players) {\n player.addMoney(-50);\n p.addMoney(50);\n }\n }\n else if (m.equals(\"Xmas fund matures. Collect $100\"))\n p.addMoney(100);\n else if (m.equals(\"Advance to Go. Collect $200\")) {\n moveToLocation(p, 0);\n p.addMoney(200);\n }\n else if (m.equals(\"Bank Error in your favor. Collect $200\"))\n p.addMoney(200);\n else if (m.equals(\"Get out of jail free card\"))\n p.addJailCard();\n else if (m.equals(\"Pay hospital $100\"))\n p.addMoney(-100);\n else if (m.equals(\"Receive for Services $25\"))\n p.addMoney(25);\n else if (m.equals(\"Go to Jail\")) {\n moveToLocation(p, 40);\n p.addJailTurn();\n }\n else if (m.equals(\"Pay school tax of $150\"))\n p.addMoney(-150);\n else if (m.equals(\"Doctors Fee. Pay $50\"))\n p.addMoney(-50);\n else if (m.equals(\"From sale of stock you get $45\"))\n p.addMoney(45);\n else if (m.equals(\"Life insurance matures. Collect $100\"))\n p.addMoney(100);\n else if (m.equals(\"You have won second prize in a beauty contest! Collect $10\"))\n p.addMoney(10);\n else {}\n }", "private void cards() {\n newUserCard();\n editTypeCard();\n changePasswordCard();\n }", "private void dealCard()\n\t{\n\t\tif(deck.isEmpty()){\n\t\t\tnewShuffledDeck();\n\t\t}\n\t\tplayerCards.add(deck.returnFirstCard());\n\t}", "void askLeaderCardActivation();", "private void addCard() {\n Intent intent = new Intent(this, NewCard.class);\n intent.putExtra(\"cardSetId\", cardSetId);\n startActivity(intent);\n }", "public void run() {\n\t\t// Alter this gradually to add more details\n\t\tString border=\"\";\n\t\tthis.card = new CardOrder(getNameFromUser());//이름입력\n\t\t\n\t\t//테두리 입력받기\n\t\twhile(true){\n\t\t\t//샘플 카드 보여주기\n\t\t\tSystem.out.print(\"\\nHere is a sample card: \\n\\n\");\n\t\t\tSystem.out.print(card.getSampleCard());\n\t\t\t\n\t\t\tSystem.out.print(\"\\nEnter “OK” if this card is ok, otherwise enter an alternative border character:\");\n\t\t\tborder=scanner.nextLine();\n\t\t\t\n\t\t\tif(!border.equals(\"OK\")) {\n\t\t\t\t//OK가 아니면\n\t\t\t\tthis.card.setBorder(border.charAt(0));\n\t\t\t}else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.card.setNumCards(getNumberFromUser());//매수 입력\n\t\t\n\t\tSystem.out.print(\"\\nThe price of \"+ card.getNumCards() +\" cards is \"+ (int)card.getFinalCost() +\" won\\n\");\n\t\tif(card.hasDiscount()) {\n\t\t\tSystem.out.print(\"10% discount applied\\n\");\n\t\t}else {\n\t\t\tSystem.out.print(\"No discount given\\n\");\n\t\t}\n\t\t\n\n\t}", "void playMonumentCard();", "public void cardsOKButtonPressed() { // Logic to add armies!\r\n\t\tint count;\r\n\t\tif (toggleCardButtonsPanel())\r\n\t\t\tif (isTradedCardSetValid()) {\r\n\t\t\t\tif (doesCardMatchCurrentPlayerTerritory() > 0) {\r\n\t\t\t\t\tcount = risk.curPlayer.getArmiesRecivedByTradingCards() + RiskGameModel.fetchTradedArmiesCount()\r\n\t\t\t\t\t\t\t+ 2;\r\n\t\t\t\t\trisk.curPlayer.setArmiesRecivedByTradingCards(count);\r\n\t\t\t\t\trisk.curPlayer.addArmies(count);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcount = risk.curPlayer.getArmiesRecivedByTradingCards() + RiskGameModel.fetchTradedArmiesCount();\r\n\t\t\t\t\trisk.curPlayer.setArmiesRecivedByTradingCards(count);\r\n\t\t\t\t\trisk.curPlayer.addArmies(count);\r\n\t\t\t\t}\r\n\t\t\t\tcardStatusLabel.setText(\"Success\");\r\n\t\t\t\trisk.setState(RiskGameModel.REINFORCE); // allowing the player\r\n\t\t\t\trisk.notifyPhaseViewChange(); // to\r\n\t\t\t\t\t\t\t\t\t\t\t\t// set the armies after\r\n\t\t\t\t\t\t\t\t\t\t\t\t// trading the card\r\n\t\t\t\tstatusLabel.setText(\"You have \" + risk.curPlayer.getNumberOfArmies() + \" left to place\");\r\n\t\t\t\tjPanel3.repaint();\r\n\t\t\t}\r\n\t}", "@Override\n public void performAction(Player playerActingOn) {\n System.out.println(\"Perform action PlayerPlayingCard\");\n if (this.strengthBoost == 0)\n playerActingOn.gainInstantWin();\n playerActingOn.increaseStrengthGain(this.strengthBoost);\n }", "void putInExpedition(Card card);", "public void takeCard(Card cr);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a new line with a given start and direction.
public Line(Point start, Vector2D direction) { this(start, start.asVector().add(direction).asPoint()); }
[ "public abstract void addHorizontalLine(int start);", "public Line(Vector direction) {\n\t\tthis(Vector.ZERO, direction);\n\t}", "public abstract void addHorizontalLine(int start, int end);", "Line createLine();", "ILine createLine(double x1, double y1, double x2, double y2);", "void addLine(int index, Coordinate start, Coordinate end);", "public Bidi createLineBidi(int start, int end)\n {\n // This isn't the most efficient implementation possible.\n // This probably does not matter, so we choose simplicity instead.\n int level = getLevelAt(start);\n int flag = (((level % 2) == 0)\n ? DIRECTION_LEFT_TO_RIGHT\n : DIRECTION_RIGHT_TO_LEFT);\n return new Bidi(text, textOffset + start,\n embeddings, embeddingOffset + start,\n end - start, flag);\n }", "public Line(Point start) {\n\t\tthis.start = start;\n\t\tthis.thickness = 0;\n\t}", "private Line createLine(Instruction instructionToUse)\n {\n IndoorVertex source = (IndoorVertex) instructionToUse.getSource();\n IndoorVertex destination = (IndoorVertex) instructionToUse.getDestination();\n Line line = null;\n\n int sourceX = findXDPIPositionFor(source.getPosition().getX());\n int sourceY = findYDPIPositionFor(source.getPosition().getY());\n int destX = findXDPIPositionFor(destination.getPosition().getX());\n int destY = findYDPIPositionFor(destination.getPosition().getY());\n\n if(sourceX >= 0 && sourceY >= 0 && destX >= 0 && destY >= 0)\n {\n line = new Line(sourceX, sourceY, destX, destY);\n }\n\n return line;\n }", "public Line(Vector point, Vector direction) {\n\t\tthis.point = point;\n\t\tthis.direction = direction;\n\t}", "public CSE11_Line( Point start, Point end )\n {\n super(\"CSE11_Line\"); // Superclass Constructor\n this.setStart(start); // Set Start Point\n this.setEnd(end); // Set End Point\n }", "public static Line createedShiftedLine(Vector<String> words) {\n\t\tLine line = new Line( getMostRecentLineId(), words );\n\t\treturn line;\n\t}", "private Polyline createPolylineTo(SkipListNode node, SkipListNode to, int level) {\n\t\t// get east center anchor of starting TextRect\n\t\tNode source = getRectAnchor(\"EC\", node.tower[level]);\n\n\t\t// determine whether the successor is another SkipListNode or the nullTower\n\t\tTextRect successor = to == null ? nullTower[level] : to.tower[level];\n\n\t\t// get west center anchor of target TextRect\n\t\tNode target = getRectAnchor(\"WC\", successor);\n\n\t\tNode[] nodes = { source, target };\n\n\t\tPolyline line = lang.newPolyline(nodes, \"Polyline[\" + ID++ + \"]\", null, polyProp);\n\t\tpolylines.add(line);\n\t\treturn node.pointers[level] = line;\n\t}", "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}", "Bidi createLineBidi(int start, int limit) {\n byte[] newLevels = new byte[limit - start];\n System.arraycopy(levels, start, newLevels, 0, newLevels.length);\n\n if (dirs != null) {\n byte x = (byte)(ltr ? 0 : 1);\n for (int i = newLevels.length; --i >= 0;) {\n\tif ((newLevels[i] % 2) == x || dirs[start + i] != WS) {\n\t break;\n\t}\n\tnewLevels[i] = x;\n }\n }\n\n return new Bidi(newLevels, ltr);\n }", "public void addStart(Integer startLine) {\n\t\tthis.startLine = startLine;\n\t}", "public CSE11_Line()\n {\n super(\"CSE11_Line\"); // Superclass Constructor\n this.setStart(this.DEFAULT_STARTX,this.DEFAULT_STARTY);\n this.setEnd(this.DEFAULT_ENDX,this.DEFAULT_ENDY);\n }", "public Line(Point start, Point end) {\n this.start = start;\n this.end = end;\n\n // determinePointPositions();\n }", "public LineDrawing(Vector2 par1) {\n\t\tstart = par1;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Access method for claveacceso.
public byte[] getClaveacceso() { return claveacceso; }
[ "public ClaveAcceso getClaveAcceso() {\n\t\treturn claveAcceso;\n\t}", "public String getClaveAcceso(Comprobante comprobante) throws GenericException;", "public int GetClave() {\n return claveExpediente;\n }", "public void setClaveacceso(byte[] aClaveacceso) {\r\n claveacceso = aClaveacceso;\r\n }", "public String getClave ( ) {\n return clave;\n }", "public Comprobante getComprobantePorClaveAcceso(String claveAcceso) throws GenericException;", "public String getClave() {\n return clave;\n }", "public void setClaveAcceso(ClaveAcceso claveAcceso) {\n\t\tassert claveAcceso != null;\n\t\tthis.claveAcceso = claveAcceso;\n\t}", "String get(String clave);", "public java.lang.String getClave() {\n return clave;\n }", "public java.lang.String getPalabrasClave()\r\n {\r\n return this.palabrasClave;\r\n }", "public String getClaveDivisa() {\r\n return claveDivisa;\r\n }", "public int getClaveEntidad() {\n return claveEntidad;\n }", "public BeanRecuperarClave() {\n// ControlSesion ms = new ControlSesion();\n// if (!ms.obtenerEstadoSesionUsuario()) {\n//\n// BeanDireccionamiento nosesion=new BeanDireccionamiento();\n// nosesion.direccionarLogin();\n// }\n }", "public int getIdEstatusClave() {\r\n\t\treturn idEstatusClave;\r\n\t}", "public java.lang.String getClaveUsuario() {\n return claveUsuario;\n }", "public void setClave ( String newVar ) {\n clave = newVar;\n }", "public PalabraClave verPalabraClave(String nombre);", "public boolean existeEstaPalabraClave(PalabraClave palabraClave);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the map sprite.
public Sprite getMapSprite() { return mapSprite; }
[ "public static BufferedImage getSprite() {\n return sprite;\n }", "public BufferedImage getSprite() {\n return loader.GetPokeman(this.getName());\n }", "public String getSprite() {\n return sprite;\n }", "public Sprite getSprite() {\n\t\treturn sprites[dir];\n\t}", "public Image getSprite( int spriteId );", "public Sprite getMapFaceSprite() {\r\n\t\treturn mapFaceSprite;\r\n\t}", "@Override\n\tpublic final Sprite getSprite() {\n\t\treturn this.sprite;\n\t}", "public static Sprite getSprite(LevelSprite levelSprite) {\n return levelSpriteMap.get(levelSprite);\n }", "public static Sprite getSprite(TileSprite tileSprite) {\n return tileSpriteMap.get(tileSprite);\n }", "public String getSprite(){\r\n\t\treturn sSprite;\r\n\t}", "public Sprite getSprite() {\r\n\t\tif (this.currentAnimation != null && (this.currentAnimation.isPlayed() || this.getSprite() == null)) {\r\n\t\t\treturn this.currentAnimation.getSprite();\r\n\t\t} else {\r\n\t\t\treturn this.tile.getSprite();\r\n\t\t}\r\n\t}", "@Override\n public Image getSprite() {\n if (shield) {\n return shieldedSprite;\n }\n return sprite;\n }", "public BufferedImage getSprite() {\r\n return frames.get(currentFrame).getFrame();\r\n }", "public Sprite getSprite() {\n\t\treturn this.mySprite;\n\t}", "public Sprite getSprite() {\n return sprite;\n }", "public BufferedImage getSprite() {\n return wolfSprite;\n }", "public Image getImage() {\n\t\treturn spriteImage;\n\t}", "public File getSpriteFile() {\r\n\t\treturn this.sprite;\r\n\t}", "public Sprite getSprite(int spriteId)\n {\n return sprites.get(spriteId);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the spreadMinimo value for this CustoEfetivoTotal.
public java.lang.Float getSpreadMinimo() { return spreadMinimo; }
[ "public void setSpreadMinimo(java.lang.Float spreadMinimo) {\n this.spreadMinimo = spreadMinimo;\n }", "public java.lang.Float getSpreadDaOperacao() {\n return spreadDaOperacao;\n }", "public int getGradoMinimo() {\n\t\treturn grMin;\n\t}", "public double getPrecioMinimo() {\n\t\treturn this.precio_minimo;\n\t}", "public double getMinValue() {\n\t\tdouble min = Double.POSITIVE_INFINITY;\n\t\tfor (int i = 0; i < dataSheet.getDesignCount(); i++) {\n\t\t\tdouble value = dataSheet.getDesign(i).getDoubleValue(this);\n\t\t\tif (value < min)\n\t\t\t\tmin = value;\n\t\t}\n\t\treturn min;\n\t}", "public int getQuantidadeMinima() {\n\t\treturn quantidadeMinima;\n\t}", "public java.lang.Integer getMinAmount() {\n return minAmount;\n }", "public double getMin()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MIN$18);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }", "public double getMinS() {\n return u[0];\n }", "public float _getMin()\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n return (getMinimum() / max);\r\n } else\r\n {\r\n return getMinimum();\r\n }\r\n }", "public Integer getMin() { \n\t\treturn getMinElement().getValue();\n\t}", "public String getSmallestSpread() {\n\t\tString returnValue = \"\";\n\t\tint smallestSpread = -1;\n\t\tfor (ArrayList<String> line : _data) {\n\t\t\tint maxValue = Integer.parseInt(line.get(1));\n\t\t\tint minValue = Integer.parseInt(line.get(2));\n\t\t\tint diff = maxValue - minValue;\n\t\t\tif (smallestSpread == -1) { // If not yet initialized\n\t\t\t\tsmallestSpread = diff;\n\t\t\t}\n\t\t\tif ((diff > 0) && (diff < smallestSpread)) {\n\t\t\t\tsmallestSpread = diff;\n\t\t\t\treturnValue = line.get(0);\n\t\t\t}\n\t\t}\n\t\treturn returnValue;\n\t}", "public double getSpreadParidad() {\r\n return spreadParidad;\r\n }", "public Number getEBookMinPrice() {\n return (Number)getAttributeInternal(EBOOKMINPRICE);\n }", "public int getMinAmount() {\n return minAmount;\n }", "public double getDesiredMinIncome()\n {\n return m_desiredPartner.getDesiredMinIncome();\n }", "public String getTamanhoMinimo() {\r\n\t\treturn tamanhoMinimo;\r\n\t}", "public double get_min()\n\t{\n\t\treturn this.min_value;\n\t}", "public float getSilicateMin() {\n return silicateMin;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
places a Letter on a Case of the Board or returns false if rack doesn't contain letter
public boolean playLetter(Letter e, int x, int y) { if(rack.contains(e)) { board.placeLetter(e,x,y); rack.removeLetter(e); return true; } else { return false; } }
[ "public boolean checkLetter(char letter){\n\t\tboolean found=false;\r\n\t\tfor(int i=0;i<this.word.length();i++){\r\n\t\t\t\tif(letter==this.word.charAt(i)){\r\n\t\t\t\t\tfound=true;\r\n\t\t\t\t\tintroduced+=letter;\r\n\t\t\t\t\tgamestatearray[i]=letter;\r\n\t\t\t\t\tgamestate=String.valueOf(gamestatearray);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tif(found==false)mistakes++;\r\n\t\treturn found;\r\n\t}", "private boolean letter() {\r\n return CATS(Lu, Ll, Lt, Lm, Lo);\r\n }", "private boolean isLegalMove(Move move, String dir, ArrayList<Tile> rack) {\n\t\t// one of the possibly many words created by the move, to be checked\n\t\t// with the supplied dictionary\n\t\tString word = \"\";\n\t\tint r = 0;\n\t\tint c = 0;\n\t\t// check the word created in the vertical direction only once, then for\n\t\t// every letter in the move, check the word created in the horizontal\n\t\t// direction\n\t\tif (dir.equals(\"vertical\")) {\n\t\t\t// add the letters in the move to the word created\n\t\t\tfor (int i = 0; i < move.size(); i++)\n\t\t\t\tword += move.get(i).getChar();\n\t\t\t// add any adjacent letters on the board above the first letter in\n\t\t\t// move, adds the letters to the beginning of the word created\n\t\t\tr = move.get(0).getLoc().getRow() - 1;\n\t\t\tc = move.get(0).getLoc().getCol();\n\t\t\twhile (r >= 0 && board[r][c].getLetter() != null) {\n\t\t\t\tword = board[r][c].getLetter().getChar() + word;\n\t\t\t\tr--;\n\t\t\t}\n\t\t\t// add any adjacent letters on the board below the last letter in\n\t\t\t// move, adds the letters to the end of the word created\n\t\t\tr = move.get(move.size() - 1).getLoc().getRow() + 1;\n\t\t\twhile (r < len && board[r][c].getLetter() != null) {\n\t\t\t\tword += board[r][c].getLetter().getChar();\n\t\t\t\tr++;\n\t\t\t}\n\t\t\t// check if the created word is in the dictionary provided if\n\t\t\t// the word created is longer than one letter\n\t\t\tif (word.length() > 1 && !isWord(word))\n\t\t\t\treturn false;\n\n\t\t\t// add any adjacent letters on the board that are left and right of\n\t\t\t// the current letter of move at the given coordinate, adds the\n\t\t\t// letters to the beginning and end of the word created,\n\t\t\t// respectively\n\t\t\tfor (int i = 0; i < move.size(); i++) {\n\t\t\t\t// clear the word to be checked\n\t\t\t\tword = \"\";\n\t\t\t\t// add the current letter to the word to be checked\n\t\t\t\tword += move.get(i).getChar();\n\t\t\t\tr = move.get(i).getLoc().getRow();\n\t\t\t\tc = move.get(i).getLoc().getCol() - 1;\n\t\t\t\t// add letters left of the current letter\n\t\t\t\twhile (c >= 0 && board[r][c].getLetter() != null) {\n\t\t\t\t\tword = board[r][c].getLetter().getChar() + word;\n\t\t\t\t\tc--;\n\t\t\t\t}\n\t\t\t\t// add letters right of the current letter\n\t\t\t\tc = move.get(move.size() - 1).getLoc().getCol() + 1;\n\t\t\t\twhile (c < len && board[r][c].getLetter() != null) {\n\t\t\t\t\tword += board[r][c].getLetter().getChar();\n\t\t\t\t\tc++;\n\t\t\t\t}\n\t\t\t\t// check if the created word is in the dictionary provided if\n\t\t\t\t// the word created is longer than one letter\n\t\t\t\tif (word.length() > 1 && !isWord(word))\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif (dir.equals(\"horizontal\")) {\n\t\t\t// add the letters in the move to the word created\n\t\t\tfor (int i = 0; i < move.size(); i++) {\n\t\t\t\tword += move.get(i).getChar();\n\t\t\t}\n\t\t\t// add any adjacent letters on the board left of the first letter in\n\t\t\t// move, adds the letters to the beginning of the word created\n\t\t\tr = move.get(0).getLoc().getRow();\n\t\t\tc = move.get(0).getLoc().getCol() - 1;\n\t\t\twhile (c >= 0 && board[r][c].getLetter() != null) {\n\t\t\t\tword = board[r][c].getLetter().getChar() + word;\n\t\t\t\tc--;\n\t\t\t}\n\t\t\t// add any adjacent letters on the board right of the last letter in\n\t\t\t// move, adds the letters to the end of the word created\n\t\t\tc = move.get(move.size() - 1).getLoc().getCol() + 1;\n\t\t\twhile (c < len && board[r][c].getLetter() != null) {\n\t\t\t\tword += board[r][c].getLetter().getChar();\n\t\t\t\tc++;\n\t\t\t}\n\t\t\t// check if the created word is in the dictionary provided if\n\t\t\t// the word created is longer than one letter\n\t\t\tif (word.length() > 1 && !isWord(word))\n\t\t\t\treturn false;\n\n\t\t\t// add any adjacent letters on the board that are above and below\n\t\t\t// the current letter of move at the given coordinate, adds the\n\t\t\t// letters to the beginning and end of the word created,\n\t\t\t// respectively\n\t\t\tfor (int i = 0; i < move.size(); i++) {\n\t\t\t\t// clear the word to be checked\n\t\t\t\tword = \"\";\n\t\t\t\t// add the current letter to the word to be checked\n\t\t\t\tword += move.get(i).getChar();\n\t\t\t\tr = move.get(i).getLoc().getRow() - 1;\n\t\t\t\tc = move.get(i).getLoc().getCol();\n\t\t\t\t// add letters above the current letter\n\t\t\t\twhile (r >= 0 && board[r][c].getLetter() != null) {\n\t\t\t\t\tword = board[r][c].getLetter().getChar() + word;\n\t\t\t\t\tr--;\n\t\t\t\t}\n\t\t\t\t// add letters below the current letter\n\t\t\t\tr = move.get(move.size() - 1).getLoc().getRow() + 1;\n\t\t\t\twhile (r < len && board[r][c].getLetter() != null) {\n\t\t\t\t\tword += board[r][c].getLetter().getChar();\n\t\t\t\t\tr++;\n\t\t\t\t}\n\t\t\t\t// check if the created word is in the dictionary provided if\n\t\t\t\t// the word created is longer than one letter\n\t\t\t\tif (word.length() > 1 && !isWord(word))\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif (isReplacing(move) || hasMissingLetters(move, rack))\n\t\t\treturn false;\n\t\treturn true;\n\t}", "private static boolean isLetter( char s ){\n\t\tif ( Character.isLetter(s)) return true; \n\t\tthrow new IllegalArgumentException(\"Name of town '\"+ s +\"' should be a letter\");\n\t}", "public static boolean hasA( String w, String letter ) \n {\n return (w.indexOf(letter) > -1);\n }", "public static boolean hasA( String w, String letter ) {\n\treturn w.indexOf(letter) != -1;\n }", "public static boolean hasA( String w, String letter )\r\n { return w.indexOf(letter) != -1;\r\n }", "public static boolean hasA( String w, String letter ) {\r\n return (w.indexOf(letter) != -1); // checks if letter is in string w, otherwise it will return -1\r\n }", "private static boolean isLetterAZ(char c) {\n\t\tint value = (int)c;\n\t\tif ((90 >= value && value >= 65) || (122 >= value && value >= 97)) {\n\t\t\treturn true;\n\t\t}else\n\t\t\treturn\tfalse;\n\t}", "public boolean guess(char letter)\n\t{\n\t\treturn false;\n\t}", "public boolean hasLetter(String letter);", "public boolean takeGuess(char letter) {\n\t\t// reset default result as false\n\t\tboolean result = false;\n\t\t// iterate through the characters in the word\n\t\tfor (int i = 0; i < this.getLength(); i++) {\n\t\t\t// if the guess is correct\n\t\t\tif (this.theWord[i] == letter) {\n\t\t\t\t// unmask the slot, set the result as true\n\t\t\t\tthis.unmaskSlot(i);\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t}\n\t\t//return the result\n\t\treturn result;\n\t}", "public static boolean hasA( String w, String letter ) \n {\n\treturn w.indexOf(letter) >= 0;\n\t// str.indexOf() returns a value >= 0 if the letter is in str\n }", "public boolean addLetterToGuessedWord(char letter)\n {\n \n \n boolean letterFound = false;\n \n // create a temporary string variable and set it to guessedWord\n // reset guessedWord to \"\"\n String temp = guessedWord;\n guessedWord = \"\";\n \n for (int i=0; i < theWord.length(); i++)\n {\n \t// is the letter == ith character of theWord ???\n \t// if so, add the letter to guessedWord and set letterFound to true\n \t// if not, add the ith character of your temp variable to guessedWord\n \tif (letter == theWord.charAt(i))\n \t{\n \t\tletterFound = true;\n \t\tguessedWord += letter;\n \t}\n \telse\n \t{\n \t\tguessedWord += temp.charAt(i);\n \t}\n \t\n }\n \n return letterFound; // READ THIS!!! return true if the letter was in theWord else false\n }", "private boolean containsCharacter(Character ch) {\n\n for (int i = 0; i < forest.size(); i ++) {\n\n if (forest.get(i).data == ch)\n return true;\n }\n\n return false;\n }", "public boolean findLetterInWord(char letter, String wordToGuess) {\n\n\t\tfor (int i = 0; i < wordToGuess.length(); i++) {\n\n\t\t\tif (wordToGuess.indexOf(letter) != -1) {\n\t\t\t\tint index = wordToGuess.indexOf(letter);\n\t\t\t\tguessedWord[index] = letter;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\n\t}", "public boolean tryCharacter(char ch) {\r\n\t\tboolean contains = false;\r\n\t\tString spacedAnswer = answerString.replace(\"\", \" \").trim();\r\n\t\tfor (int i = 0; i < answerString.length(); i++) {\r\n\r\n\t\t\tif (answerString.charAt(i) == ch) {\r\n\t\t\t\tcurrString = currString.substring(0, i * 2) + ch + currString.substring((i * 2) + 1);\r\n\t\t\t\tcontains = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (spacedAnswer.equals(currString)) {\r\n\t\t\t\treset(\"hello\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!contains) {\r\n\t\t\tincorrectGuesses++;\r\n\t\t}\r\n\t\trepaint();\r\n\t\treturn contains;\r\n\t}", "private boolean winInCols(char letter) {\n\t\treturn sameLetter(letter, getLetter(0,0), getLetter(0,1), getLetter(0,2)) ||\n\t\t\t sameLetter(letter, getLetter(1,0), getLetter(1,1), getLetter(1,2)) ||\n\t\t\t sameLetter(letter, getLetter(2,0), getLetter(2,1), getLetter(2,2));\n\t}", "boolean hasHasCharacter();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For drawing a door within the confines of this zone to graphics g
private void drawDoor(Graphics g, Color main, Color indents, Color knob) { g.setColor(main); fillZone(g); g.setColor(indents); g.fillRect(x1 + Adventure.xo + (width / 7), y2 + Adventure.yo + (height / 11), width * 2 / 7, height * 4 / 11); g.fillRect(x1 + Adventure.xo + (width * 4 / 7), y2 + Adventure.yo + (height / 11), width * 2 / 7, height * 4 / 11); g.fillRect(x1 + Adventure.xo + (width / 7), y2 + Adventure.yo + (height * 6 / 11), width * 2 / 7, height * 4 / 11); g.fillRect(x1 + Adventure.xo + (width * 4 / 7), y2 + Adventure.yo + (height * 6 / 11), width * 2 / 7, height * 4 / 11); g.setColor(knob); g.fillOval(x1 + Adventure.xo + (width * 49 / 56), y2 + Adventure.yo + (height * 6 / 11) + ((height / 2) / 56), width * 6 / 56, width * 6 / 56); }
[ "public static void drawDoor(Graphics g){\ng.setColor(Color.blue);\ng.fillRect(170, 250, 25, 50);\ng.setColor(Color.black);\ng.drawRect(170, 250, 25, 50);\n\n//this draws that oval..circle thing in the middle of the door\ng.setColor(Color.black);\ng.drawOval(170, 250, 25, 50 );\ng.setColor(Color.blue);\n\n// this draws the door knob because we'd like to get inside\ng.setColor(Color.black);\ng.drawOval(190, 270, 5, 10 );\ng.setColor(Color.blue);\n\n}", "public void createDoor() {\n Door door = new Door((Display.getWidth() / 2.0f) - 50, Display.getHeight() - 150, 148, 125, \"res/assets/ExitDoor.png\",1);\n\n addObj(door);\n }", "public void draw(){\r\n\r\n\t\t\t//frame of house\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(250,0);\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.move(0,300);\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.move(-250,0);\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\r\n\t\t\t//door\r\n\t\t\tpen.setColor(Color.blue);\r\n\t\t\tpen.setWidth(10);\r\n\t\t\tpen.move(50,0);\r\n\t\t\tpen.move(50,100);\r\n\t\t\tpen.move(-50,100);\r\n\t\t\tpen.move(-50,0);\r\n\t\t\tpen.move(0,0);\r\n\r\n\t\t\t//windows\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(-150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\r\n\t\t\t//extra\r\n\t\t\tpen.move(-45,120);\r\n\t\t\tpen.down();\r\n\t\t\tpen.setColor(Color.black);\r\n\t\t\tpen.drawString(\"This is a house\");\r\n\t}", "public void drawRobot(Graphics g){\r\n\t\t\r\n\t\tGraphics2D g2 = (Graphics2D) g;\r\n\t\t\r\n\t\tdouble widthOfRoom = width + padding + padding;\r\n\t\t\r\n\t\tg2.setColor(Color.BLUE);\r\n\t\t\r\n\t\tRectangle2D.Double rect = new Rectangle2D.Double(\r\n\t\t\t\tx * widthOfRoom + padding,\r\n\t\t\t\ty * widthOfRoom + padding,\r\n\t\t\t\twidth,\r\n\t\t\t\twidth\r\n\t\t\t\t);\r\n\t\t\r\n\t\tg2.fill(rect);\r\n\t\t\r\n\t\tGeneralPath path = determineDirectionPath();\r\n\t\tg2.setColor(Color.YELLOW);\r\n\t\tg2.fill(path);\r\n\t\t\r\n\t}", "public void draw(Graphics gc, \n int width, int height, double xUnit, double yUnit, int bas, int mar) {\n\n // geometrical data in logical units \n int alt = alti, \n dis = (2*pin.disp+1)*(pin.base.diam+Tower.inc_b), \n rad = /*if*/ (this == pin.shaft) ?/*then*/ Tower.inc_p :/*else*/ \n /*if*/ (this == pin.base) ?/*then*/ diam+Tower.inc_b :/*else*/ \n diam+Tower.inc_d, \n depth = deep; \n\n //System.out.println(\n // \"HanoiVar disc: i, alt, dis, rad, depth, shade = \" \n // + String.valueOf(i) + \" \" \n // + String.valueOf(alt) + \" \" + String.valueOf(dis) + \" \" \n // + String.valueOf(rad) + \" \" + String.valueOf(depth) + \" \" \n // + String.valueOf(shade) + \" \"); \n\n // Red,Green,Blue discs, White pins, background outlines. \n int outline = 2, lin = 3; // edge thick line colour and width \n int ff = 1; // fudge factor to correct disc artifact \n gc.setColor(Colour.table [outline]); \n gc.fillOval (\n (int) Math.round ((dis-rad)*xUnit + mar-lin), \n (int) Math.round (height - alt*yUnit - rad*ecc*xUnit - lin-mar-bas), \n (int) Math.round ((2*rad)*xUnit + 2*lin), \n (int) Math.round (2*rad*ecc*xUnit + 2*lin)); \n gc.setColor(Colour.table [shade%Colour.table.length]); \n gc.fillOval (\n (int) Math.round ((dis-rad)*xUnit + mar), \n (int) Math.round (height - alt*yUnit - rad*ecc*xUnit - mar-bas), \n (int) Math.round ((2*rad)*xUnit), \n (int) Math.round (2*rad*ecc*xUnit)); \n gc.setColor(Colour.table [outline]); \n gc.fillRect (\n (int) Math.round ((dis-rad)*xUnit + mar-lin), \n (int) Math.round (height - (alt+depth)*yUnit - mar-bas), \n (int) Math.round ((2*rad)*xUnit + 2*lin + ff), \n (int) Math.round ((depth)*yUnit)); \n gc.setColor(Colour.table [shade%Colour.table.length]); \n gc.fillRect (\n (int) Math.round ((dis-rad)*xUnit + mar), \n (int) Math.round (height - (alt+depth)*yUnit - mar-bas), \n (int) Math.round ((2*rad)*xUnit + ff), \n (int) Math.round ((depth)*yUnit)); \n gc.setColor(Colour.table [outline]); \n gc.fillOval (\n (int) Math.round ((dis-rad)*xUnit + mar-lin), \n (int) Math.round (height - (alt+depth)*yUnit - rad*ecc*xUnit - lin-mar-bas), \n (int) Math.round ((2*rad)*xUnit+2*lin), \n (int) Math.round (2*rad*ecc*xUnit+2*lin)); \n gc.setColor(Colour.table [shade%Colour.table.length]); \n gc.fillOval (\n (int) Math.round ((dis-rad)*xUnit + mar), \n (int) Math.round (height - (alt+depth)*yUnit - rad*ecc*xUnit - mar-bas), \n (int) Math.round ((2*rad)*xUnit), \n (int) Math.round (2*rad*ecc*xUnit)); \n return;}", "public void draw(GraphicsContext gc)\r\n {\r\n gc.setFill(this.color); // Setting the fill colour for the house.\r\n gc.fillRect(this.x, this.y - this.size, this.size, this.size); // Drawing the square representing a house.\r\n \r\n // *** Creating an object instance of the Door class and applying the class' .draw() method to draw it.\r\n Door door = new Door(this.x + this.size / 2 , this.y - this.size / 3, this.size / 3);\r\n door.draw(gc);\r\n \r\n // *** Creating an object instance of the Window class and applying the class' .draw() method to draw it.\r\n Window window = new Window(this.x + this.size / 8, this.y - (3 * this.size / 4),\r\n this.size / 3 + Math.random() * this.size / 3);\r\n window.draw(gc);\r\n }", "private void drawBody(Graphics g) {\r\n Graphics2D g2d = (Graphics2D) g;\r\n\r\n g2d.setColor(color); //set fill color\r\n g2d.fillArc(this.getX(), this.getY(), diameter, diameter, 30, 290);\r\n\r\n g2d.setColor(Color.black);//set outline color\r\n\r\n g2d.drawArc(this.getX(), this.getY(), diameter, diameter, 30, 290);\r\n }", "public void doorClose(){\n this.setRoadBlock(true);\n this.setRender(true);\n }", "@Override\r\npublic void draw(Graphics g) {\r\n\t\tsetColor(g);\r\n\t\t\r\n\t\tif (isSolid().equalsIgnoreCase(\"Oval\")) {\r\n\t\t g.fillOval(this.x, this.y, this.width, this.height);\r\n\t\t } else {\r\n\t\t g.drawOval(this.x, this.y, this.width, this.height);\r\n\t\t \t\t}\r\n\t\t\t}", "public void makeDoorHitboxes() { \n\t\t \n\t\t \n\t\tint doorThickness = SIZE/2;\n\t\tdouble doorXPos = 0, doorYPos = 0;\n\t\tint doorWidth = 0, doorHeight = 0;\n\t\tint wallWidth = 0, wallHeight = 0;\n\t\t//Left and right relative to the outward face\n\t\tdouble leftWallXPos = 0, leftWallYPos = 0;\n\t\t\n\t\tdouble rightWallXPos = 0, rightWallYPos = 0;\n\t\t \n\t\t\n\t\tif(orientation == NORTH || orientation == SOUTH) {\n \n\t\t\tdoorXPos = getXPosWorld();\n\t\t\tdoorWidth = doorThickness;\n\t\t\tdoorHeight = wallThickness;\n\t\t\twallWidth = (SIZE - doorThickness)/2;\n\t\t\twallHeight = wallThickness;\n\t\t\tSystem.out.println(\"Wall: \" + wallWidth/2);\n\t\t\t\n\t\t\tleftWallXPos = doorXPos - doorWidth + wallWidth/2;\n\t\t\trightWallXPos = doorXPos + doorWidth - (wallWidth/2);\n\t\t\t\n\t\t\tif(orientation == NORTH) \n\t\t\t\tdoorYPos = getYPosWorld() - SIZE/2 + wallThickness/2;\n\t\t\t\n\t\t\telse \n\t\t\t\tdoorYPos = getYPosWorld() + SIZE/2 - wallThickness/2;\n\t\t\t\n\t\t\t\n\t\t\tleftWallYPos = doorYPos;\n\t\t\trightWallYPos = doorYPos;\n\t\t} \n\t\telse {\n\t\t\tdoorYPos = getYPosWorld(); \n\t\t\tdoorWidth = wallThickness;\n\t\t\tdoorHeight = doorThickness;\n\t\t\twallWidth = wallThickness;\n\t\t\twallHeight = (SIZE - doorThickness)/2;\n\t\t\tleftWallYPos = doorYPos + doorHeight - (wallHeight/2);\n\t\t\trightWallYPos = doorYPos - doorHeight + (wallHeight/2);\n\t\t\t\n\t\t\tif(orientation == WEST) \n\t\t\t\tdoorXPos = getXPosWorld() - SIZE/2 + wallThickness/2;\n\t\t\telse\n\t\t\t\tdoorXPos = getXPosWorld() + SIZE/2 - wallThickness/2;\n\t\t\t\n\t\t\tleftWallXPos = doorXPos;\n\t\t\trightWallXPos = doorXPos;\n\t\t}\n\t\t\n\t\tputHitbox(DOOR, ActionBox.makeActionBox(doorXPos, doorYPos, doorWidth, doorHeight, this));\n\t\tgetHitbox(DOOR).setEnabled(isOpen());\n\t\tgetHitbox(DOOR).setBlock(true);\n\t\tgetHitbox(DOOR).setZPos(getHitbox(DOOR).getZPos() + 1);\n\t\tputHitbox(LEFTWALL, ActionBox.makeActionBox(leftWallXPos, leftWallYPos, wallWidth, wallHeight));\n\t\tgetHitbox(LEFTWALL).setEnabled(true);\n\t\tgetHitbox(LEFTWALL).setZPos(getHitbox(LEFTWALL).getZPos() + 1);\n\t\tputHitbox(RIGHTWALL, ActionBox.makeActionBox(rightWallXPos, rightWallYPos, wallWidth, wallHeight));\n\t\tgetHitbox(RIGHTWALL).setEnabled(true);\n\t\tgetHitbox(RIGHTWALL).setZPos(getHitbox(RIGHTWALL).getZPos() + 1);\n\t\t\n\t\tremoveHitbox(orientation);\n\t}", "private void selectFloorZone(Graphics2D g2d) {\r\n \r\n int minX = (int)Math.round(getWidth() * 0.05);\r\n int minY = (int)Math.round(getHeight() * 0.05);\r\n int maxX = (int)Math.round(getWidth() * 0.95);\r\n int maxY = (int)Math.round(getHeight() * 0.95);\r\n \r\n Polygon floorSelected = new Polygon();\r\n\r\n floorSelected.addPoint(minX, minY);\r\n floorSelected.addPoint(minX, maxY);\r\n floorSelected.addPoint(maxX, maxY);\r\n floorSelected.addPoint(maxX, minY);\r\n \r\n g2d.drawPolygon(floorSelected);\r\n\r\n }", "private static void drawOcean(Graphics g) {\n for( Ocean o : Ocean.theOcean ) {\n g.setColor( o.patchColor );\n g.fillPolygon( o.x, o.y, o.x.length );\n }\n }", "private void drawRoom(){\n\t\tdrawFloor();\n\t\tdrawEntities();\n\t}", "private void drawBoundary(Graphics2D g, Color c)\r\n\t{\t\t\r\n\t\t//This drawing code inspired by drawJoint() method in net.phys2d.raw.test.AbstractDemo\r\n\t\t//by Kevin Glass, 2006\r\n\t\t//Source: http://www.cokeandcode.com/phys2d/source/builds/src060408.zip\r\n\r\n\t\tVector2f[] points = getBoundary();\r\n\r\n\t\tg.setColor(c);\r\n\t\tfor(int i=0; i<4; i++)\r\n\t\t{\r\n\t\t\tg.drawLine((int)points[i].x, (int)points[i].y, (int)points[(i+1)%4].x, (int)points[(i+1)%4].y);\r\n\t\t}\t\t\r\n\t}", "public void drawOval(int x, int y, int width, int height);", "public void drawAssigments(int[] assig)\r\n {\r\n // WGraphics wg;\r\n VisFrame Vz = new VisFrame();\r\n // wg = new WGraphics(400, 400, minx, miny, maxx, maxy);\r\n boolean depotOpen[] = new boolean[nDepots + 1];\r\n\r\n int d;\r\n for (int i = 1; i <= nClients; i++)\r\n {\r\n d = assig[i - 1];\r\n depotOpen[d] = true;\r\n // wg.drawLine(coordClient[i][0],coordClient[i][1],coordDepot[d][0],coordDepot[d][1], Color.lightGray);\r\n Line2D.Double line= new Line2D.Double(coordClient[i][0],coordClient[i][1],coordDepot[d][0],coordDepot[d][1]);\r\n Vz.getPanel().drawLine(line);\r\n \r\n //wg.drawMark(coordDepot[d][0], coordDepot[d][1], Color.red);\r\n Rectangle2D.Double depot = new Rectangle2D.Double(coordDepot[d][0], coordDepot[d][1],4,4);\r\n Vz.getPanel().drawShape(depot);\r\n \r\n //wg.drawMark(coordClient[i][0], coordClient[i][1], Color.blue);\r\n Ellipse2D.Double client = new Ellipse2D.Double(coordClient[i][0], coordClient[i][1],4,4);\r\n Vz.getPanel().drawShape(client);\r\n }\r\n\r\n for (int j = 1; j <= nDepots; j++)\r\n {\r\n if (depotOpen[j])\r\n {\r\n \t//wg.drawMark(coordDepot[j][0], coordDepot[j][1], Color.red);\r\n \tRectangle2D.Double depot2 = new Rectangle2D.Double(coordDepot[j][0], coordDepot[j][1],4,4);\r\n Vz.getPanel().drawShape(depot2);\r\n }\r\n \r\n }\r\n\r\n for (int k = 1; k < numPointsBoundary; k++)\r\n {\r\n// wg.drawLine(coordBoundary[k][0], coordBoundary[k][1], coordBoundary[k + 1][0], coordBoundary[k + 1][1],\r\n// Color.black);\r\n Line2D.Double line2= new Line2D.Double(coordBoundary[k][0], coordBoundary[k][1], coordBoundary[k + 1][0], coordBoundary[k + 1][1]);\r\n Vz.getPanel().drawLine(line2);\r\n }\r\n Vz.getPanel().repaint();\r\n }", "public void openDoor() {\n \t gate.rotate(-200);\n }", "public void drawDragon(Graphics g)\n {\n g.setColor(c); // Watermelon Dragon.\n g.fillRect(x, y , size * 25, size * 25); //Draw Head\n g.fillRect(bodyX, bodyY, bodyWidth, bodyHeight); //Draw Body\n g.fillRect(x+size * 25, (y + size*25) + size * 50, size * 10, size * 50); //Draw Leg #1\n g.fillRect(x+size * 25+ size*60-size*10, (y + size*25) + size * 50, size * 10, size * 50); //Draw Leg #2//Draw Health bar\n /*if(health > 30)\n {\n g.setColor(Color.YELLOW);\n g.fillRect(x, y - 50, size * 60, size*50/6);\n }*/\n \n }", "public void drawCompass() {\n\t\tgraphics.setColour(0, 128, 0);\n\t\tgraphics.circle(false, position.x() + 16, position.y() + 16, COMPASS_RADIUS);\n\t\tfor (int i = 0; i < 360; i += 60) {\n\t\t\tdouble r = Math.toRadians(i - 90);\n\t\t\tdouble x = position.x() + 16 + (1.1 * COMPASS_RADIUS * Math.cos(r));\n\t\t\tdouble y = position.y() + 14 + (1.1 * COMPASS_RADIUS * Math.sin(r));\n\t\t\tif (i > 170) x -= 24;\n\t\t\tif (i == 180) x += 12;\n\t\t\tgraphics.print(String.valueOf(i), x, y);\n\t\t}\n\t\tdouble x, y;\n\t\tif (isManuallyControlled && input.isMouseDown(input.MOUSE_LEFT)) {\n\t\t\tgraphics.setColour(0, 128, 0, 128);\n\t\t\tdouble r = Math.atan2(input.mouseY() - position.y(), input.mouseX() - position.x());\n\t\t\tx = 16 + position.x() + (COMPASS_RADIUS * Math.cos(r));\n\t\t\ty = 16 + position.y() + (COMPASS_RADIUS * Math.sin(r));\n\t\t\tgraphics.line(position.x() + 16, position.y() + 16, x, y);\n\t\t\tgraphics.line(position.x() + 15, position.y() + 16, x, y);\n\t\t\tgraphics.line(position.x() + 16, position.y() + 15, x, y);\n\t\t\tgraphics.line(position.x() + 17, position.y() + 16, x, y);\n\t\t\tgraphics.line(position.x() + 17, position.y() + 17, x, y);\n\t\t\tgraphics.setColour(0, 128, 0, 16);\n\t\t}\n\t\tx = 16 + position.x() + (COMPASS_RADIUS * Math.cos(bearing()));\n\t\ty = 16 + position.y() + (COMPASS_RADIUS * Math.sin(bearing()));\n\t\tgraphics.line(position.x() + 16, position.y() + 16, x, y);\n\t\tgraphics.line(position.x() + 15, position.y() + 16, x, y);\n\t\tgraphics.line(position.x() + 16, position.y() + 15, x, y);\n\t\tgraphics.line(position.x() + 17, position.y() + 16, x, y);\n\t\tgraphics.line(position.x() + 17, position.y() + 17, x, y);\n\t\t\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
take note, already the real and imaginary has been declared, the method below takes a new set of values simply add the real parts and the imaginary
public void add(double real, double imaginary){ this.real += real; this.imaginary += imaginary; }
[ "public void add(Complex toAdd){\n real = real + toAdd.getReal();\n imag = imag + toAdd.getImag();\n }", "public void add(Complex other) {\n this.real += other.real;\n this.imag += other.imag;\n }", "public void setImag(double imag) {this.imag = imag;}", "Complex(){\r\n real = 1;\r\n imaginary = 1;\r\n }", "public Complex add(Complex other) {\n double sumReal = real + other.real;\n double sumImaginary = imaginary + other.imaginary;\n return new Complex(sumReal, sumImaginary); //replace this return statement\n }", "public Complex add(Complex s)\r\n\t{\r\n\t\tComplex temp = new Complex();\r\n\t\ttemp.setReal(s.real() + this.a);\r\n\t\ttemp.setImag(s.imag() + this.b);\r\n\t\treturn temp;\r\n\t}", "public void setImag(double im) {imag = im;}", "public void updateBaseComplex()\n {\n calculateBaseComplex();\n }", "public cal add(cal a, cal b) {\n int real = this.real + b.real;\r\n int img = this.img + b.img;\r\n cal ans =new cal(real,img);\r\n return ans;\r\n}", "private double[] combineComplex(double[] real, double[] imaginary) {\n int N = real.length*2;\n double[] c = doubleMemoryArray;\n for (int i = 0; i < N; i+=2) {\n c[i] = real[i/2];\n c[i + 1] = imaginary[i/2];\n }\n return c;\n }", "private void createSet() {\n\t\tMain.log(ComplexSet.class.getSimpleName() + \".createSet() entered\");\n\t\t\n\t\tdouble theReal, theImaginary;\n\t\tfor (int y = 0; y < ROWS; y++) {\n\t\t\tfor (int x = 0; x < COLS; x++) {\n\t\t\t\ttheReal = ((double)(x - DEFAULT_X_OFFSET + xOffset)) / zoom;\n\t\t\t\tif (x == 0) minReal = theReal;\n\t\t\t\telse if (x == COLS - 1) maxReal = theReal;\n\t\t\t\t\n\t\t\t\ttheImaginary = ((double)(y - DEFUALT_Y_OFFSET + yOffset)) / zoom;\n\t\t\t\tif (y == 0) minImaginary = theImaginary;\n\t\t\t\telse if (y == ROWS - 1) maxImaginary = theImaginary;\n\t\t\t\t\n\t\t\t\tcomplexSet[x][y] = new ComplexValue(theReal, theImaginary);\n\t\t\t}\n\t\t}\n\t}", "private void simplify(){\n imaginary = (Math.abs(exp % 4) < 2) ? imaginary : -imaginary;\n exp = (imaginary == 0) ? 0 : exp % 2;\n if(exp == 0){\n real = real + imaginary;\n imaginary = 0;\n }\n if( exp < 0){\n imaginary = -imaginary;\n exp = - exp;\n }\n }", "private Complex[] toComplex(double[] real, double[] imaginary) {\n int N = real.length;\n Complex[] x = complexResult;\n for (int i = 0; i < N; i++) {\n x[i].re = real[i];\n x[i].im = imaginary[i];\n }\n return x;\n }", "public void complexValue(double i,double j)\r\n{\r\n\tznow_r=(((double)i*2)/800)-1;\r\n\tznow_c=1-(((double)j*2)/800);\r\n}", "public void addAll(Vector figures);", "public void set( int row, int col, double real, double imaginary ) {\n if (imaginary == 0) {\n set(row, col, real);\n } else {\n ops.set(mat, row, col, real, imaginary);\n }\n }", "public Complex plus(Complex a){\n float real = this.re + a.re;\n float imag = this.im + a.im;\n return new Complex(real, imag);\n }", "Complex add(Complex z){\n return new Complex(this.re+z.re,this.im+z.im);\n }", "public void transform(double[] realParts, double[] imaginaryParts, int startIndex) {\n int n1, n2;\n double t1, t2;\n \n int j = 0;\n n2 = windowsize / 2;\n for (int i = 1; i < windowsize - 1; i++) {\n n1 = n2;\n while (j >= n1) {\n j -= n1;\n n1 /= 2;\n }\n \n j += n1;\n \n if (i < j) {\n t1 = realParts[i + startIndex];\n realParts[i + startIndex] = realParts[j + startIndex];\n realParts[j + startIndex] = t1;\n t1 = imaginaryParts[i + startIndex];\n imaginaryParts[i + startIndex] = imaginaryParts[j + startIndex];\n imaginaryParts[j + startIndex] = t1;\n }\n }\n \n n1 = 0;\n n2 = 1;\n \n for (int i = 0; i < powerOfTwoOfWindowSize; i++) {\n n1 = n2;\n n2 *= 2;\n int a = 0;\n \n for (j = 0; j < n1; j++) {\n double cosValue = cosValues[a];\n double sinValue = sinValues[a];\n a += 1 << (powerOfTwoOfWindowSize - i - 1);\n \n for (int k = j; k < windowsize; k = k + n2) {\n t1 = cosValue * realParts[k + n1 + startIndex] - \n sinValue * imaginaryParts[k + n1 + startIndex];\n t2 = sinValue * realParts[k + n1 + startIndex] + \n cosValue * imaginaryParts[k + n1 + startIndex];\n realParts[k + n1 + startIndex] = \n realParts[k + startIndex] - t1;\n imaginaryParts[k + n1 + startIndex] = \n imaginaryParts[k + startIndex] - t2;\n realParts[k + startIndex] = \n realParts[k + startIndex] + t1;\n imaginaryParts[k + startIndex] = \n imaginaryParts[k + startIndex] + t2;\n }\n }\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Remove 500 elements from setA
public void remove(){ int counter = 0; for(int i : setA){ if(counter == 500) return; int keys[] = map.get(i); for(int j : keys){ filter[j]--; } counter++; } }
[ "void removeAllFrom(NumberSet x);", "private HashSet<Integer> removeNodesFromSet(HashSet<Integer> set, int maxSize) {\n\t\tArrayList<Integer> list = new ArrayList<Integer>(set);\n\n\t\t// Keep removing nodes while the set is too big.\n\t\twhile (list.size() > maxSize) {\n\t\t\tlist.remove(random.nextInt(list.size()));\n\t\t}\n\n\t\treturn new HashSet<Integer>(list);\n\t}", "void removeAll(NumberSet x);", "public void removeAllFrom(NumberSet x) {\n for (int i = 0; i < nelem; i++)\n x.remove(list[i]);\n }", "public void removeAllPartOfSet() {\r\n\t\tBase.removeAll(this.model, this.getResource(), PARTOFSET);\r\n\t}", "@Test\n public void testRemoval() {\n HashSet<Integer> endSet = new HashSet<>();\n endSet.add(1);\n endSet.add(2);\n\n // start.removeAll(end) -> deleted elements\n startSet.removeAll(endSet);\n\n HashSet<Integer> expectedResultSet = new HashSet<>();\n expectedResultSet.add(3);\n\n assertEquals(expectedResultSet, startSet);\n }", "protected abstract Set<String> _removeFromSet(String key, Collection<String> str);", "@Test\n public void test_removeOccurrences_removeAll() throws Exception {\n Multiset<String> originalSet = ImmutableMultiset.of(STR_0, STR_1, STR_2, STR_0, STR_2, STR_0);\n Multiset<String> set1 = HashMultiset.create(originalSet);\n Multiset<String> set2 = HashMultiset.create(ImmutableList.of(STR_0, STR_1));\n Multiset<String> set3 = HashMultiset.create(ImmutableList.of(STR_0, STR_1, STR_2, STR_0, STR_2));\n Multiset<String> set4 = HashMultiset.create(ImmutableList.of(STR_0, STR_1, STR_2, STR_0, STR_2, STR_3));\n Multiset<String> set5 = HashMultiset.create(ImmutableList.of(STR_0, STR_1, STR_2, STR_0, STR_2, STR_0, STR_0));\n\n\n Assert.assertTrue(Multisets.removeOccurrences(set1, set1));\n Assert.assertEquals(0, set1.size());\n\n set1 = HashMultiset.create(originalSet);\n Assert.assertTrue(Multisets.removeOccurrences(set1, set2));\n Assert.assertEquals(4, set1.size());\n Assert.assertEquals(2, set1.count(STR_0));\n Assert.assertEquals(2, set1.count(STR_2));\n\n set1 = HashMultiset.create(originalSet);\n Assert.assertTrue(Multisets.removeOccurrences(set1, set3));\n Assert.assertEquals(1, set1.size());\n Assert.assertEquals(1, set1.count(STR_0));\n\n set1 = HashMultiset.create(originalSet);\n Assert.assertTrue(Multisets.removeOccurrences(set1, set4));\n Assert.assertEquals(1, set1.size());\n Assert.assertEquals(1, set1.count(STR_0));\n\n set1 = HashMultiset.create(originalSet);\n Assert.assertTrue(Multisets.removeOccurrences(set1, set5));\n Assert.assertEquals(0, set1.size());\n\n\n set1 = HashMultiset.create(originalSet);\n try {\n set1.removeAll(set1);\n DebugUtils.neverGoesHere();\n } catch (Exception e) {\n AssertExt.assertClassification(ConcurrentModificationException.class, e);\n }\n\n set1 = HashMultiset.create(originalSet);\n Assert.assertTrue(set1.removeAll(set2));\n Assert.assertEquals(2, set1.size());\n Assert.assertEquals(2, set1.count(STR_2));\n\n set1 = HashMultiset.create(originalSet);\n Assert.assertTrue(set1.removeAll(set3));\n Assert.assertEquals(0, set1.size());\n\n set1 = HashMultiset.create(originalSet);\n Assert.assertTrue(set1.removeAll(set4));\n Assert.assertEquals(0, set1.size());\n\n set1 = HashMultiset.create(originalSet);\n Assert.assertTrue(set1.removeAll(set5));\n Assert.assertEquals(0, set1.size());\n }", "public void makeEmpty(){\n for(int element = set.length - 1; element >= 0; element--){\n remove(set[element]);\n }\n }", "public Set removeDuplicateUsingSet() throws ComputationException {\n Set<Integer> uniqueSet = new HashSet<>();\n log.debug(\"Removing duplicate using Set......\");\n int[] intArray = getRandomArray();\n log.debug(\"Actual size of int array:\" + intArray.length);\n for (int i = 0; i < intArray.length; i++) {\n uniqueSet.add(intArray[i]);\n }\n log.debug(\"refined size of int array using Set: \" + uniqueSet.size());\n log.debug(Arrays.toString(uniqueSet.toArray()));\n return uniqueSet;\n }", "public static void removeTest() {\n IntegerSet testSet = new IntegerSet();\n\n // remove from populated set\n test(\"Remove\", 1);\n // populates set\n populateSet(testSet, 7);\n printIntegerSet(BEFORE, testSet);\n // removes 6 from set\n testSet.remove(6);\n printInteger(\"Test Integer\", 6);\n printIntegerSet(AFTER, testSet);\n\n // remove from empty set\n test(\"Remove\", 2);\n testSet.clear();\n printIntegerSet(BEFORE, testSet);\n // removes 6 from set\n testSet.remove(6);\n printInteger(\"Test Integer\", 6);\n printIntegerSet(AFTER, testSet);\n\n\n // remove from set where not present\n test(\"Remove\", 3);\n // populates set\n populateSet(testSet, 7);\n printIntegerSet(BEFORE, testSet);\n // removes 6 from set\n testSet.remove(7);\n printInteger(\"Test Integer\", 7);\n printIntegerSet(AFTER, testSet);\n\n // remove from one integer set\n test(\"Remove\", 4);\n testSet.clear();\n // populates set\n populateSet(testSet, 1);\n printIntegerSet(BEFORE, testSet);\n // removes 6 from set\n testSet.remove(0);\n printInteger(\"Test Integer\", 0);\n printIntegerSet(AFTER, testSet);\n }", "private void remove(HashSet<String> bichos,HashSet<String> resp,ArrayList<Pergunta> perguntas){\n\t\tString[] aRemover=resp.toArray(new String[resp.size()]);\n\t\tfor(int x=0;x<aRemover.length;x++){\n\t\t\tbichos.remove(aRemover[x]);\n\t\t\tfor(Pergunta per:perguntas)\n\t\t\t\tper.removeAnimal(aRemover[x]);\n\t\t}\n\t}", "private static Set<ARGState> removeSet(Set<ARGState> elements) {\n Set<ARGState> toWaitlist = new LinkedHashSet<ARGState>();\n int i=0;\n for (ARGState ae : elements) {\n if(ae.getParents()!=null){\n for (ARGState parent : ae.getParents()) {\n if (!elements.contains(parent)) {\n toWaitlist.add(parent);\n }\n }\n if(ae.getChildren()!=null)\n ae.removeFromARG();\n else\n ae.setDestroyed(true);\n }\n\n // ae.setNull();\n }\n return toWaitlist;\n }", "@Test\r\n\t\tpublic void testDeleteAll() {\n\t\t\ttestingSet = new IntegerSet(); \r\n\t\t\ttestingSet.insertAll(list1); \r\n\t\t\ttestingSet.deleteAll();\r\n\t\t\t// after data is deleted set should be empty \r\n\t\t\tassertTrue(testingSet.isEmpty());\r\n\t\t}", "public static Set<Ballot> unspoiledBallots(Set<Ballot> ballots) {\n // [your code here]\n \n return Collections.emptySet();\n }", "private void removeDuplicated (){\n LinkedHashSet<String> lhs = new LinkedHashSet<String>(loadedArrayList);\n\n // Removing ArrayList elements\n loadedArrayList.clear();\n\n // Adding LinkedHashSet elements to the ArrayList\n loadedArrayList.addAll(lhs);\n }", "public void testRemoveDuplicatesHashSet() {\n DeDup dd7 = new DeDup();\n int[] ri = randomIntegers;\n int[] answer = dd7.removeDuplicatesHashSet(ri);\n assertEquals(result.length,answer.length); \n }", "private void removeAllSetValuesFromPossibleOnes() {\n for(int xIndex=0; xIndex<9; xIndex++) {\n for(int yIndex=0; yIndex<9; yIndex++) {\n\n SudokuElement theElement = this.sudokuElementsArray[xIndex][yIndex];\n\n //row\n for(int i=0; i<9; i++) {\n theElement.removePossibleValue(sudokuElementsArray[i][yIndex].getValue());\n }\n\n //column\n for(int i=0; i<9; i++) {\n theElement.removePossibleValue(sudokuElementsArray[xIndex][i].getValue());\n }\n\n //3x3 section\n int xStartIndex = xIndex - xIndex%3;\n int yStartIndex = yIndex - yIndex%3;\n for(int i=0; i<3; i++) {\n for(int j=0; j<3; j++) {\n theElement.removePossibleValue(sudokuElementsArray[xStartIndex + i][yStartIndex + j].getValue());\n }\n }\n\n }\n }\n }", "@Override\n public void preWalk() {\n set.remove(element);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the state of this field from the board to the current player's index.
public void setState(int row, int col) throws ArrayIndexOutOfBoundsException { board[row][col] = currentPlayer; }
[ "void setIndexPlayer(int indexPlayer);", "public void setCurrentPlayer(int index){\n this.currentPlayer=index%4;\n }", "public void setBoardIndex(int boardIndex) {\n this.boardIndex = boardIndex;\n }", "public void setPlayerIndex(int playerIndex) {\n this.playerIndex = playerIndex;\n }", "public void setMoveIndex(int index) {\n\n boardIterator.goTo(index);\n\n queueEvent(new Runnable() {\n @Override\n public void run() {\n board.setBoard(boardIterator.board);\n }\n });\n\n autoFollow = index == game.getHistory().getNumBoardCommands() - 1;\n canPlay = true; // always true because animation will no longer be in progress.\n\n updateHighlights();\n\n if(listener != null)\n listener.onBoardStateChanged(this);\n }", "void setIndex(int index);", "public void setCurrPlayer(int i) {\n if (currPlayer == -1) {\n currPlayer = i;\n }\n }", "public void setCurrentPlayer(int playerIndex) {\n turnCounter = playerIndex;\n if (playerList.get(playerIndex).isPoweredDown) setCurrentPlayer(playerIndex + 1);\n }", "public void setIndex(int index) { this.index = index; }", "public abstract void setCurrentIndex(int current);", "private void setIndex(int index){\n\t\tthis.index = index;\n\t}", "public int getBoardIndex() {\n return boardIndex;\n }", "private void setComponentsOfIndex() {\n\t\tint t = this.numbersIdex + 1;\n\t\tif (t == NUMBEROFEACHCARD) {\n\t\t\tthis.numbersIdex = 0;\n\t\t\tsetColorIndex();\n\t\t} else {\n\t\t\tthis.numbersIdex = t;\n\t\t}\n\t}", "public void setIndex() {\r\n index = (opcode & 0x0FFF);\r\n pc += 2;\r\n }", "public void switchPlayers() {\n activePlayerIndex = 1 - activePlayerIndex;\n }", "public void setMovePlayer1(int row, int column);", "public void switchToNextPlayer() {\r\n currentPlayerIndex = (currentPlayerIndex + 1 == players.size()) ? 0 : currentPlayerIndex + 1;\r\n }", "public int getPlayerIndex() {\n return playerIndex;\n }", "private void increaseCurrentPlayerIndex() {\n\t\tcurrentPlayer++;\n\t\tif(currentPlayer>3)\n\t\t\tcurrentPlayer=0;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the experience contributed to the clan by this clan mate.
public long getExperience() { return experience; }
[ "public int getExperience() {\n\t\treturn experience;\n\t}", "public Integer getExperience() {\n return experience;\n }", "long getExperience();", "public in.trujobs.proto.PreScreenExperienceObject getExperience() {\n return experience_ == null ? in.trujobs.proto.PreScreenExperienceObject.getDefaultInstance() : experience_;\n }", "public int getExperienceGained() {\r\n return experienceGained;\r\n }", "public int getExperiencePoints() {\n return experiencePoints;\n }", "int getExperienceForLeveUp();", "public ArrayList<ExperienceInfo> getExpericence() {\n return experience;\n }", "@Override\n protected int getBonusPoints() {\n return leadership + experience;\n }", "public int getCandidateTotalExperience() {\n return candidateTotalExperience_;\n }", "public int getCandidateTotalExperience() {\n return candidateTotalExperience_;\n }", "public in.trujobs.proto.PreScreenExperienceObjectOrBuilder getExperienceOrBuilder() {\n if (experienceBuilder_ != null) {\n return experienceBuilder_.getMessageOrBuilder();\n } else {\n return experience_ == null ?\n in.trujobs.proto.PreScreenExperienceObject.getDefaultInstance() : experience_;\n }\n }", "public Integer getuExperience() {\n return uExperience;\n }", "public int getTotalExperience ( ) {\n\t\treturn extract ( handle -> handle.getTotalExperience ( ) );\n\t}", "public double[] getExperience() {\n\t\t\treturn exp;\n\t\t}", "public int teamExperience() {\n int experiencedPlayers = 0;\n for (Map.Entry<Integer,Player> entry : mPlayers.entrySet()) {\n Player player = entry.getValue();\n if (player.isPreviousExperience()) {\n experiencedPlayers++;\n }\n }\n return experiencedPlayers;\n }", "public final int getLifeGainedThisTurn() {\n return this.lifeGainedThisTurn;\n }", "public int getExperienceValue() {\n return (((getDamage() + getDefense() + getHealth()) + 5) / 10) * 10;\n }", "public int getSkillPoint() {\n return skillPoint;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete tokens for given identity
public void deleteTokensForIdentity(Identity identity) throws SystemException;
[ "void deleteToken(String token);", "private void removeToken(String customerId, String token) {\n // TODO remove the token\n }", "void removeToken(String token);", "void deleteAuthorizationToken(User forUser);", "public void deleteAllToken() throws BusinessException;", "@DELETE\r\n public void deletAccessToken(@PathParam(\"T_ID\") String token) {\r\n if (builder.getUser().getRole() != UserProfile.Role.ADMIN) {\r\n throw new ForbiddenException(\"Only admin users can manage access tokens.\");\r\n }\r\n\r\n AccessTokenDAO accessTokenDAO = new AccessTokenDAO();\r\n AccessToken accessToken = accessTokenDAO.findByValue(token);\r\n if (accessToken == null) {\r\n throw new NotFoundException();\r\n }\r\n accessTokenDAO.delete(accessToken);\r\n }", "public AuthorizationToken removeToken(String token);", "void clearTokens();", "@POST\r\n\t@Path(\"/tokens\")\r\n\tpublic void deleteExpiredTokens() {\r\n\t\t\r\n\t\tQuery<Entity> query = Query.newEntityQueryBuilder()\r\n\t\t\t\t.setKind(\"AuthToken\")\r\n\t\t\t\t.setFilter(PropertyFilter.le(\"expirationDate\", System.currentTimeMillis()))\r\n\t\t\t\t.build();\r\n\t\tQueryResults<Entity> tasks = datastore.run(query);\r\n\t\t\r\n\t\ttasks.forEachRemaining(at -> {\r\n\t\t\tdatastore.delete(at.getKey());\r\n\t\t});\r\n\t}", "public void remove(CIdentity identity) {\n\n\t\tcoreMatcher.remove(identity);\n\t}", "void delete(SecretIdentifier secretIdentifier);", "@Override\n @Transactional(rollbackFor = {Exception.class})\n public void removeUserTokens(String username) {\n rememberMeTokenDao.removeUserTokens(username);\n }", "@RequestMapping(method = RequestMethod.DELETE, value = \"/oauth/token\")\n @ResponseBody\n @ApiOperation(value = \"Supprimer un token\")\n public void supprimerLeToken(HttpServletRequest request) {\n String token = request.getHeader(\"token\");\n if (token != null) {\n tokenServices.revokeToken(token);\n }\n }", "@Test\n public void deleteDeviceTokenTest() throws ApiException {\n String deviceId = null;\n // DeviceTokenEnvelope response = api.deleteDeviceToken(deviceId);\n\n // TODO: test validations\n }", "public void removeVote(String token);", "void unexpectedTokenDeleted(Term token);", "public int removeTokens_Report(Inventory i, int num);", "public void deleteIndividualAcl(Individual i);", "void deleteExpression(Expression expression);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a SpriteSheet object of specified width and height in pixel precision. A width = 16 and a height = 32 means a SpriteSheet object 16 pixels wide and 32 pixels tall.
public SpriteSheet(String path, int spriteWidth, int spriteHeight) { url = getClass().getClassLoader().getResource(path); this.spriteWidth = spriteWidth; this.spriteHeight = spriteHeight; load(); }
[ "public SpriteSheet(SpriteSheet sheet, int xOfs, int yOfs, int width, int height, int spriteWidth, int spriteHeight) {\n int x = xOfs * spriteWidth;\n int y = yOfs * spriteHeight;\n int w = width * spriteWidth;\n int h = height * spriteHeight;\n this.spriteWidth = w;\n this.spriteHeight = h;\n pixels = new int[w * h];\n for (int yy = 0; yy < h; yy++) {\n int yp = y + yy;\n for (int xx = 0; xx < w; xx++) {\n int xp = x + xx;\n pixels[xx + yy * w] = sheet.pixels[xp + yp * sheet.spriteWidth];\n }\n }\n int frame = 0;\n sprites = new Sprite[width * height];\n for (int yTile = 0; yTile < height; yTile++) {\n for (int xTile = 0; xTile < width; xTile++) {\n int[] spritePixels = new int[spriteWidth * spriteHeight];\n for (int yPixel = 0; yPixel < spriteHeight; yPixel++) {\n for (int xPixel = 0; xPixel < spriteWidth; xPixel++) {\n spritePixels[xPixel + yPixel * spriteWidth] = pixels[(xPixel + xTile * spriteWidth)\n + (yPixel + yTile * spriteHeight) * this.spriteWidth];\n }\n }\n Sprite sprite = new Sprite(spritePixels, spriteWidth, spriteHeight);\n sprites[frame++] = sprite;\n }\n }\n }", "public SpriteSheet(String path, float sWidth, float sHeight) {\n\t\tthis.path = path;\n\t\tthis.sWidth = sWidth;\n\t\tthis.sHeight = sHeight;\n\t\t\n\t\t//trys to create a buffered image sheet from the path\n\t\t//provided in the constructor\n\t\ttry {\n\t\t\tsheet = ImageIO.read(new File(path));\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public Image createImage(int width, int height);", "public static native Size createSize(float width, float height)\r\n\t/*-{\r\n\t\treturn {\r\n\t\t\twidth : width,\r\n\t\t\theight : height\r\n\t\t};\r\n\t}-*/;", "public Sprite(int width, int height){\r\n\t\tthis(new BufferedImage(width <= 0? 1 : width,height <= 0? 1 : height,BufferedImage.TYPE_INT_ARGB));\r\n\t}", "public SpriteSheet(BufferedImage sheet) {\n this.sheet = sheet;\n }", "public SpriteSheet(BufferedImage sheet){\n this.sheet = sheet;\n }", "Sprite(float x, float y, float w, float h) {\n _img = createImage(1, 1, RGB);\n _x = x;\n _y = y;\n _w = w;\n _h = h;\n _rotVector = new PVector(1, 0, 0);\n resetRectHitbox();\n }", "@Override\n public Sprite createSprite(SnakeSmash game) {\n Texture texture = game.getAssetManager().get(\"pinkSquare.png\");\n return new Sprite(texture, texture.getWidth(), texture.getHeight());\n }", "public SpriteSheet(String filename, int tileWidth , int tileHeight){\n\t\ttry {\n\t\t\timage = ImageIO.read(new File(filename));\n\t\t\tdead = ImageIO.read(new File(\"assets/sprites/deadguy.png\"));\n\t\t\tthis.tileWidth =tileWidth;\n\t\t\tthis.tileHeight = tileHeight;\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Couldn't find image!!!!\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public Sprite createScaledSprite(Texture texture)\n {\n Sprite sprite = new Sprite(texture);\n sprite.getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);\n sprite.setSize(sprite.getWidth() / PlayScreen.PPM/SCALE,\n sprite.getHeight() / PlayScreen.PPM/SCALE);\n return sprite;\n }", "public Shape(int width, int height) {\r\n\r\n\t\t// Shape width and height should not be greater than the sheet width and height\r\n\t\tif (width > Sheet.SHEET_WIDTH || height > Sheet.SHEET_HEIGHT) {\r\n\t\t\tthrow new IllegalArgumentException(\"Shape width or height is not valid\");\r\n\t\t}\r\n\r\n\t\tthis.sWidth = width;\r\n\t\tthis.sHeight = height;\r\n\t}", "public Picture(int width, int height){\n this.height = height;\n this.width = width;\n createWhitePicture();\n }", "@Override\n public Sprite createRegion(final int x, final int y, final int width,\n final int height, final Object ref) {\n return new TileSprite(this, x, y, width, height, ref);\n }", "public SpriteSheet(String path) {\n\t\tBufferedImage image = null;\n\n\t\ttry {\n\t\t\timage = ImageIO.read(SpriteSheet.class.getResourceAsStream(path));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tif (image == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.path = path;\n\t\tthis.width = image.getWidth();\n\t\tthis.height = image.getHeight();\n\n\t\tpixels = image.getRGB(0, 0, width, height, null, 0, width);\n\t\tfor (int i = 0; i < pixels.length; i++) {\n\t\t\tpixels[i] = (pixels[i] & 0xff) / 64;\n\t\t}\n\t}", "public Slingshot(double w, double h) {\n\n\t\twidth = w;\n\t\theight = h;\n\n\t\tslingshot = new GImage(\"slingshot.png\");\n\t\tslingshot.setSize(width, height);\n\t\tadd(slingshot, 0, 0);\n\t}", "Size createSize();", "@Override\r\n\tpublic Board createBoard(long width, long height)\r\n\t{\r\n\t\treturn new Board(width, height);\r\n\t}", "public static SpriteSheet getInstance(String path) {\r\n\t\tif (spriteSheet == null) {\r\n\t\t\tspriteSheet = new SpriteSheet(path);\r\n\t\t\treturn spriteSheet;\r\n\t\t}\r\n\r\n\t\treturn spriteSheet;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a scaled amount of the byproduct amount
public int getByproductScaled(int scale) { return this.byproduct.getFluidAmount() * scale / TOTAL_BYPRODUCT_SPACE; }
[ "public int scale() {\r\n\t return amount.scale();\r\n\t }", "public int scale(int original);", "Integer getCurrencyScale();", "public int getReservoirAmountScaled(int scale)\n {\n\n return this.getReservoirAmount() * scale / TOTAL_RESERVOIR_SPACE;\n }", "public final double getScaler()\n { \n return Math.pow(10, m_Scaler);\n }", "double getScale();", "int getScale();", "private double scalex(double x) {\n return x/scalingFactor;\n }", "float getScaler();", "public double getScale() {\n return scale;\n }", "public float spiderScaleAmount()\n {\n return 1.9F;\n }", "public void calculateScale(){scale = (getHeight() - margin)/Collections.max(list);}", "public float scalePower(float power){\n return Math.abs(power) * power;\n }", "public double applySizeModifier(double basePrice) {\n\t\tdouble price;\n\t\tswitch (this.sideSize.toLowerCase()) {\n\t\tcase \"small\":\n\t\t\tprice = basePrice * COST_SIZE_SMALL_MODIFIER;\n\t\t\tbreak;\n\t\tcase \"medium\":\n\t\t\tprice = basePrice * COST_SIZE_MEDIUM_MODIFIER;\n\t\t\tbreak;\n\t\tcase \"large\":\n\t\t\tprice = basePrice * COST_SIZE_LARGE_MODIFIER;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tprice = 0;\n\t\t}\n\t\treturn price;\n\t}", "public BigDecimal getMULTIPLIER()\r\n {\r\n\treturn MULTIPLIER;\r\n }", "float getPurifiedStardustMultiplier();", "public float scaledWidth();", "public int getDecimalScale() {\n return decimalScale;\n }", "float getPurifiedCandyMultiplier();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Update Data Model' reference. If the meaning of the 'Update Data Model' reference isn't clear, there really should be more of a description here...
DataModel getUpdateDataModel();
[ "protected String getUpdateString() {\r\n\t\treturn this.updateString;\r\n\t}", "public UpdateDefinition getDefinition() {\r\n\t\treturn _updateDefinition;\r\n\t}", "String getUpdate();", "public String getUpdatePropRegNo() {\n\t\treturn updatePropRegNo;\n\t}", "public String getDataUpdated() {\n return dataUpdated;\n }", "public java.lang.String getUpdateDesc() {\r\n java.lang.Object ref = updateDesc_;\r\n if (ref instanceof java.lang.String) {\r\n return (java.lang.String) ref;\r\n } else {\r\n com.google.protobuf.ByteString bs = \r\n (com.google.protobuf.ByteString) ref;\r\n java.lang.String s = bs.toStringUtf8();\r\n if (bs.isValidUtf8()) {\r\n updateDesc_ = s;\r\n }\r\n return s;\r\n }\r\n }", "public String getUpdateId() {\r\n return updateId;\r\n }", "public String getUpdateRule () {\n return updateRule;\n }", "org.zenoss.cloud.dataRegistry.UpdateMode getUpdateMode();", "@VTID(65)\r\n boolean getManualUpdate();", "java.lang.String getUpdUpdate();", "@Override\n\tpublic long getUpdateId() {\n\t\treturn _scienceAppDescription.getUpdateId();\n\t}", "io.yuri.yuriserver.packet.Protos.Update getUpdate();", "public String getUpdateVersion() {\n return updateVersion;\n }", "public String getUpdateName() {\r\n\t\treturn updateName;\r\n\t}", "public String getReference(){\r\n\t\t\r\n\t\treturn McsElement.getElementByXpath(driver,REFERENCE_INPUT).getAttribute(\"value\");\r\n\t}", "public Integer getPatchUpdate() {\n return patchUpdate;\n }", "public String getLast_update_remark() {\n return last_update_remark;\n }", "String getDataModelURI();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the Scholar ArrayList of committee members.
public ArrayList<Scholar> getCommitteeMembers(){ return committeeMembers; }
[ "public String getAllCommitteeMembers(){\r\n\t\tString allCommitteeMembers = \"\";\r\n\t\tfor(int index = 0; index < committeeMembers.size(); ++index){\r\n\t\t\tallCommitteeMembers += committeeMembers.get(index).returnNameInString() + \"\\n\\t\";\r\n\t\t}\r\n\t\treturn allCommitteeMembers;\r\n\t}", "public List<Individual> getMembers() {\n return members;\n }", "public List<member> getMembersList() {\t\t\n\t\treturn new ArrayList<member>(members.values()); \n\t}", "public List<CommunityMember> getCommunityMemberships() {\n\t\tList<CommunityMember> communityMemberships = person.getMemberships();\n\t\tIterator<CommunityMember> membershipIterator = communityMemberships.iterator();\n\t\t\n\t\twhile (membershipIterator.hasNext()) {\n\t\t\tCommunityMember membership = membershipIterator.next();\n\t\t\tif (membership.getCommunity().getPrivateUser() != null && \n\t\t\t\tmembership.getCommunity().getPrivateUser().getPersonId() == person.getPersonId()) {\n\t\t\t\tmembershipIterator.remove();\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn communityMemberships;\n\t}", "public ArrayList getSubmitterList() throws SQLException, Exception {\n\n\t\treturn getProjMemberList();\n\t}", "public List<String> communityMembers() {\n return this.communityMembers;\n }", "Collection<Entity> getMembers();", "public ArrayList<String> getParticipants(){\n\t\treturn participants;\r\n\t}", "public String getMembers() {\r\n \t\tString members = _creator;\r\n \t\tfor (String member : _otherMembersList) {\r\n \t\t\tmembers.concat(\", \" + member);\r\n \t\t}\r\n \t\treturn members;\r\n \t}", "Set<Member> getMembers();", "public List<String> getTeamMembers() {\r\n\t\treturn teamMembers;\r\n\t}", "private List<TeamMember> readTeamMembers() {\n return ((PublishContainerProvider) contentProvider).readPublishToTeam(\n getInputContainerId());\n }", "public List<Member> getMemberList() {\n List<Member> members = new ArrayList<>();\n List<User> users = this.memberService.loadUsers(createcMapForSubSystem());\n removeDeactivatedUsers(users);\n members.addAll(users);\n members.addAll(this.memberService.loadGroups(createcMapForSubSystem()));\n return members;\n }", "public Collection<Member> getMembersList() {\n return memberMap.values();\n }", "java.util.List<String> getOtherContributorsList();", "public ArrayList getOwnersList() throws SQLException, Exception {\n\n\t\treturn getProjMemberList();\n\n\t}", "public List<Member> members() {\n return list;\n }", "public List getMultiPartyCollaborationList()\n {\n return Collections.unmodifiableList(_objMultiPartyCollaboration);\n }", "Collection getCommunities();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs the inverse of the transform to the given rotation matrix by this orientation. The operation is equivalent to prepend the inverse of this orientation to the given rotation matrix.
default void inverseTransform(RotationMatrixBasics matrixToTransform) { inverseTransform(matrixToTransform, matrixToTransform); }
[ "public Rotation inverse(){\n //System.out.println(\"In Rotation::inverse()\");\n // create a copy of this matrix, transpose it, construct and return a Rotation containing it.\n Matrix mat = new Matrix(getMatrix());\n mat = mat.transpose();\n Rotation inverse = new Rotation(mat);\n //System.out.println(\"rotation inverse history size: \" + inverse.getHistorySize());\n return inverse;\n }", "public Matrix inverse();", "@Override\n public abstract MathTransform inverse();", "default void inverseTransform(Orientation3DBasics orientationToTransform)\n {\n inverseTransform(orientationToTransform, orientationToTransform);\n }", "default void inverseTransform(Matrix3DBasics matrixToTransform)\n {\n inverseTransform(matrixToTransform, matrixToTransform);\n }", "public Translation inverse(){\n // Create a copy of the matrix, negate the values. Return a new Translation containing it.\n Matrix mat = new Matrix(getMatrix());\n mat = mat.multiply(-1.0);\n mat = mat.add(IDENTITY.multiply(2.0));\n return new Translation(mat);\n }", "@JsProperty(name = \"inverseTransform\")\n public native Matrix4 inverseTransform();", "abstract public void inverseTranspose();", "private void resetInvertMatrix() {\n mInvert.reset();\n mInvert.postTranslate(-1 * mPosition.x, -1 * mPosition.y);\n mInvert.postRotate(-1 * mAngle);\n }", "@Override\n public synchronized MathTransform inverse() throws NoninvertibleTransformException {\n if (inverse == null) {\n inverse = new Inverse();\n }\n return inverse;\n }", "public Matrix inverse() {\n\t\tMatrix a = copy();\n\t\tif (a.M != a.N) {\n\t\t\tthrow new RuntimeException(\"This matrix is not square!\");\n\t\t}\n\t\tMatrix i = identity(a.N);\n\t\tMatrix ai = a.augment(i);\n\t\tai = ai.specialrref();\n\t\tMatrix[] split = ai.split(a.N);\n\t\tif (split[0].equals(i)) {\n\t\t\treturn split[1];\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"This matrix is not invertible!\");\n\t\t}\n\t}", "public Matrix inverse () {\n return solve(identity(m,m));\n }", "public Matrix pseudoInverse();", "public ComplexMatrix inverse() {\n Complex[][] temp = new Complex[rows][cols];\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++) {\n temp[i][j] = new Complex(i == j ? 1.0 : 0.0);\n }\n }\n return new ComplexMatrix(new LUDecomposition(array).solve(temp));\n }", "public Matrix inverse(){\r\n \tint n = this.nrow;\r\n \tif(n!=this.ncol)throw new IllegalArgumentException(\"Matrix is not square\");\r\n \tdouble[] col = new double[n];\r\n \tdouble[] xvec = new double[n];\r\n \tMatrix invmat = new Matrix(n, n);\r\n \tdouble[][] invarray = invmat.getArrayReference();\r\n \tMatrix ludmat;\r\n\r\n\t \tludmat = this.luDecomp();\r\n \tfor(int j=0; j<n; j++){\r\n \t\tfor(int i=0; i<n; i++)col[i]=0.0D;\r\n \t\tcol[j]=1.0;\r\n \t\txvec=ludmat.luBackSub(col);\r\n \t\tfor(int i=0; i<n; i++)invarray[i][j]=xvec[i];\r\n \t}\r\n \t\treturn invmat;\r\n \t}", "Vector3D applyInverseTo(Vector3D position);", "public void invertOrientation() {\n\t\tPoint3D temp = getPoint(2);\n\t\tsetPoint(2, getPoint(1));\n\t\tsetPoint(1, temp);\n\n\t\tTriangleElt3D temp2 = getNeighbour(2);\n\t\tsetNeighbour(2, getNeighbour(1));\n\t\tsetNeighbour(1, temp2);\n\t\tif (this.getNetComponent() != null)\n\t\t\tthis.getNetComponent().setOriented(false);\n\t}", "public Quaternion inverse()\n {\n return new Quaternion(this.re, this.im.mult(-1.0));\n }", "public void invert() throws NoninvertibleTransform3DException {\r\n\t\tthis.set(getInverse());\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Export the view as an SVG.
void exportSvg() throws IOException;
[ "private void handleExportToSVG() {\n FileChooser chooser = new FileChooser();\n chooser.setTitle(\"Export to SVG\");\n FileChooser.ExtensionFilter filter = new FileChooser.ExtensionFilter(\n \"Scalable Vector Graphics (SVG)\", \"*.svg\");\n chooser.getExtensionFilters().add(filter);\n File file = chooser.showSaveDialog(getScene().getWindow());\n if (file != null) {\n ExportUtils.writeAsSVG((Drawable) this.canvas.getChart(), (int) getWidth(), \n (int) getHeight(), file);\n }\n }", "public String SVG() {\n iniciaSVG();\n setSize();\n estructuraSVG();\n terminaSVG();\n return svg;\n }", "public void outputSVG() {\n FileWriter writer = null;\n StringBuffer out = new StringBuffer();\n String name = fileName.getText();\n itemStateDisplay.setText(\"SVG output was written to file: \" + fileName.getText() + \".svg\");\n\n fileName.setText(\"\");\n try {\n writer = new FileWriter(new File(name + \".svg\"));\n } catch (IOException e) {\n System.err.println(\"Caught IOException: \" + e.getMessage());\n }\n if (this.isLooped) {\n if (this.model.getGroupFigs().size() > 0) {\n IViewImplSVGLayeredLooped viewSVG = new IViewImplSVGLayeredLooped(this.model, out, this.tempo,\n 1200, 900);\n ArrayList<String> allShapes = new ArrayList<>();\n for (ArrayList<String> list : this.model.getGroupFigs().values()) {\n allShapes.addAll(list);\n }\n viewSVG.play(allShapes);\n }\n else {\n IView viewSVG = new IViewImplSVGLooped(this.model, out, this.tempo,\n 1200, 900);\n viewSVG.play();\n }\n }\n else {\n if (this.model.getGroupFigs().size() > 0) {\n IViewImplSVGLayered viewSVG = new IViewImplSVGLayered(this.model, out, this.tempo,\n 1200, 900);\n ArrayList<String> allShapes = new ArrayList<>();\n for (ArrayList<String> list : this.model.getGroupFigs().values()) {\n allShapes.addAll(list);\n }\n viewSVG.play(allShapes);\n }\n else {\n IView viewSVG = new IViewImplSVGAnimation(model, out,\n tempo, 800, 800);\n viewSVG.play();\n }\n }\n // closes writer to flush\n if (writer != null) {\n try {\n writer.write(out.toString());\n writer.close();\n } catch (IOException e) {\n throw new IllegalArgumentException();\n }\n }\n }", "public final String toSVG(){\r\n\t\treturn toSVG(\"\");\r\n\t}", "public String toSVG() {\n\n StringBuilder toReturn = new StringBuilder();\n toReturn.append(\"<svg width=\" + \"\\\"\" + Integer.toString(this.width)\n + \"\\\"\" + \" height=\" + \"\\\"\" + Integer.toString(this.height)\n + \"\\\"\" + \" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n\"); // add website\n String tag;\n for (String s : model.getIDSet()) {\n\n IShape sh = model.currentShape(0, s);\n if (sh.isRectangle()) {\n toReturn.append(\"<rect id=\" + \"\\\"\" + s + \"\\\"\" + \" \");\n tag = \"</rect>\";\n toReturn.append(\"x=\\\"\" + sh.getLocation().getX() + \"\\\" y=\\\"\"\n + sh.getLocation().getY() + \"\\\" width=\\\"\" + sh.getWidth() + \"\\\" height=\\\"\"\n + sh.getHeight() + \"\\\" fill=\\\"rgb(\" + sh.getColor().getRedInt() + \",\" +\n sh.getColor().getGreenInt() + \",\"\n + sh.getColor().getBlueInt() + \")\\\" visibility=\\\"visible\\\" >\\n\");\n } else {\n toReturn.append(\"<ellipse id=\" + \"\\\"\" + s + \"\\\"\" + \" \");\n toReturn.append(\"cx=\\\"\" + sh.getLocation().getX() + \"\\\" cy=\\\"\" + sh.getLocation().getY()\n + \"\\\" rx=\\\"\" + sh.getWidth() + \"\\\" ry=\\\"\" + sh.getHeight() + \"\\\" fill=\\\"rgb(\"\n + sh.getColor().getRedInt() + \",\" + sh.getColor().getGreenInt() + \",\"\n + sh.getColor().getBlueInt() + \")\\\" visibility=\\\"visible\\\" >\\n\");\n tag = \"</ellipse>\";\n }\n\n toReturn.append(svgColors(s));\n\n toReturn.append(svgSizes(s));\n\n toReturn.append(svgMoves(s));\n\n toReturn.append(tag + \"\\n\");\n\n }\n toReturn.append(\"</svg>\");\n return toReturn.toString();\n }", "@Override\n public void render() {\n StringBuilder sb = new StringBuilder();\n\n Iterator<IShape> itShape = this.model.getShapes();\n\n IShape curShape;\n sb.append(String.format(\"<svg width=\\\"%s\\\" height=\\\"%s\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n\",\n model.getWidth(), model.getHeight()));\n\n while (itShape.hasNext()) {\n curShape = itShape.next();\n switch (curShape.getCode()) {\n case \"rectangle\":\n this.svgRect(curShape, sb);\n break;\n case \"ellipse\":\n this.svgEllipse(curShape, sb);\n break;\n }\n }\n sb.append(\"</svg>\");\n\n try {\n this.out.append(sb.toString());\n } catch (IOException e) {\n System.out.println(\"unable to append\");\n }\n }", "public void outputSvg(String fileName){\n\t\ttry {\n\t\t\tFileWriter fw = new FileWriter(new File(fileName));\n\t\t\tfw.write(output);\n\t\t\tfw.flush();\n\t\t\tfw.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t}", "private SVG generarSVG() {\n double largo = (diametro * arbolBinario.altura() * 3);\n double ancho = diametro * (arbolBinario.getElementos() + 2);\n SVG svg = new SVG(largo, ancho);\n double anchoRaiz = obtenerElementosSubArbolIZquierdo(arbolBinario.raiz()) * diametro;\n graficarAuxiliar(\n arbolBinario.raiz(), Pareja.crearPareja(anchoRaiz, diametro), svg, diametro / 2, anchoRaiz);\n return svg;\n }", "public void export() {\n IO.saveToPNG(mazeview);\n }", "void paintSVG( SVGGraphics2D g2d);", "private void writeSVGCLoser() {\n List<String> tail = new ArrayList<String>();\n tail.add(\"</svg>\\n\");\n this.events.add(this.events.size(), tail);\n }", "public String exportAsXML() {\n\n StringBuffer sb = new StringBuffer( 1000 );\n sb.append( \"<GraphicFill>\" );\n sb.append( ( (Marshallable) graphic ).exportAsXML() );\n sb.append( \"</GraphicFill>\" );\n\n return sb.toString();\n }", "private void convertToSVG(RendererContext context,\n BarcodeGenerator bargen, String msg, Orientation orientation)\n throws BarcodeCanvasSetupException {\n final DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();\n\n final SVGCanvasProvider canvas = new SVGCanvasProvider(impl, true, orientation);\n bargen.generateBarcode(canvas, msg);\n final Document svg = canvas.getDOM();\n\n //Call the renderXML() method of the renderer to render the SVG\n if (DEBUG) {\n System.out.println(\" --> SVG\");\n }\n context.getRenderer().renderXML(context,\n svg, SVGDOMImplementation.SVG_NAMESPACE_URI);\n }", "private String getSVGText(ReadOnlyExcellenceOperations model) {\n String text = \"<?xml version=\\\"1.0\\\" standalone=\\\"no\\\"?>\\n\" +\n \"<!DOCTYPE svg PUBLIC \\\"-//W3C//DTD SVG 1.1//EN\\\"\\n\" +\n \" \\\"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\\\">\\n\" +\n \"<svg \" + makeAttributeDescription(\"viewbox\",\n model.getTopLeft().getX() + \" \" + model.getTopLeft().getY()\n + \" \" + model.getWidth() + \" \" + model.getHeight()) + \"\\n\"\n + \" xmlns=\\\"http://www.w3.org/2000/svg\\\" version=\\\"1.1\\\">\\n\";\n\n\n for (Map.Entry<Shape, List<Instruction>> e : model.getInstructions().entrySet()) {\n text = text.concat(makeShapeDescription(e.getKey()));\n\n for (Instruction i : e.getValue()) {\n text = text.concat(makeInstructDescription(e.getKey().getType(), i));\n }\n }\n\n text = text.concat(\"</g>\\n</svg>\");\n\n\n return text;\n }", "private File transcodeToSVG(Document doc) {\n\t \tFile destFile = null;\n\t \tFileOutputStream outputStream = null;\n\t try {\n\t //Determine output type:\n\t SVGTranscoder t = new SVGTranscoder();\n\n\t //Set transcoder input/output\n\t TranscoderInput input = new TranscoderInput(doc);\n\t ByteArrayOutputStream bytestream = new ByteArrayOutputStream();\n\t OutputStreamWriter ostream = new OutputStreamWriter(bytestream, \"UTF-8\");\n\t TranscoderOutput output = new TranscoderOutput(ostream);\n\n\t //Perform transcoding\n\t t.transcode(input, output);\n\t ostream.flush();\n\t ostream.close();\n\t destFile = getFileName(\"svg\");\n\t byte[] svgBytes = bytestream.toByteArray();\n\t outputStream = new FileOutputStream(destFile);\n\t outputStream.write(svgBytes);\n\t } catch (Exception e) {\n\t e.printStackTrace();\n\t } finally {\n\t \tFileUtils.closeStream(outputStream);\n\t }\n\t return destFile;\n\t}", "public SVGView(ImmutableModel model, Appendable out, int speed) {\n this.model = model;\n this.out = out;\n this.speed = speed;\n }", "public void exportToSVG(OutputStream o, String encoding, boolean pictureOnly) throws IOException {\n final String ZONE_STYLE = \"fill:none;stroke:red;stroke-width:0.2;stroke-opacity:1\";\n Writer out = new OutputStreamWriter(o, encoding);\n out.write(\"<?xml version='1.0' \");\n DoubleFormatter formatter = new DoubleFormatter(PRECISION);\n\n if (!\"\".equals(encoding)) {\n out.write(\"encoding ='\" + encoding + \"' \");\n }\n out.write(\"standalone='no'?>\\n\");\n out.write(\"<svg width='\");\n formatter.writeTo(out, bbox.getWidth());\n out.write(\"' height='\");\n formatter.writeTo(out, bbox.getHeight());\n out.write(\"' \");\n // Necessary according to firefox site.\n out.write(\"xmlns='http://www.w3.org/2000/svg' \");\n out.write(\"xmlns:xlink='http://www.w3.org/1999/xlink' \");\n out.write(\"version='1.1' \");\n if (!pictureOnly) {\n out\n .write(\"xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'\");\n }\n out.write(\">\\n\");\n out.write(\"<path style='fill:black; stroke:none' d='\");\n writeSVGPath(out, PRECISION);\n out.write(\"'/>\");\n // The ligature zones.\n if (!pictureOnly && zones != null) {\n for (int i = 0; i < zones.length; i++) {\n if (zones[i] != null) {\n out.write(\"<rect\");\n out.write(' ');\n out.write(\"style='\" + ZONE_STYLE + \"'\");\n out.write(' ');\n out.write(\"id='zone\" + (i + 1) + \"'\");\n out.write(' ');\n out.write(\"width='\" + zones[i].getWidth() + \"'\");\n out.write(' ');\n out.write(\"height='\" + zones[i].getHeight() + \"'\");\n out.write(' ');\n out.write(\"x='\" + zones[i].getMinX() + \"'\");\n out.write(' ');\n out.write(\"y='\" + zones[i].getMinY() + \"'\");\n out.write(' ');\n String gravity = \"\";\n if (!zones[i].getHorizontalGravity().equals(\n HorizontalGravity.CENTER)) {\n gravity += zones[i].getHorizontalGravity().getCode();\n }\n if (!zones[i].getVerticalGravity().equals(\n VerticalGravity.CENTER)) {\n gravity += zones[i].getVerticalGravity().getCode();\n }\n if (gravity.length() > 0) {\n out.write(\"inkscape:label='gravity:\" + gravity + \"'\");\n }\n out.write(\"/>\");\n }\n }\n }\n out.write(\"</svg>\\n\");\n out.close();\n }", "protected void renderSVGDocument(final RendererContext context,\n final Document doc) throws IOException {\n updateRendererContext(context);\n final RendererContextWrapper wrappedContext = RendererContext.wrapRendererContext(context);\n int x = wrappedContext.getCurrentXPosition();\n int y = wrappedContext.getCurrentYPosition();\n\n //Prepare\n SVGUserAgent ua = new SVGUserAgent(\n context.getUserAgent().getSourcePixelUnitToMillimeter(),\n new AffineTransform());\n GVTBuilder builder = new GVTBuilder();\n final BridgeContext ctx = new BridgeContext(ua);\n\n //Build the GVT tree\n final GraphicsNode root;\n try {\n root = builder.build(ctx, doc);\n } catch (Exception e) {\n log.error(\"SVG graphic could not be built: \" + e.getMessage(), e);\n return;\n }\n\n //Create the painter\n Graphics2DImagePainter painter = new Graphics2DImagePainter() {\n\n public void paint(Graphics2D g2d, Rectangle2D area) {\n // If no viewbox is defined in the svg file, a viewbox of 100x100 is\n // assumed, as defined in SVGUserAgent.getViewportSize()\n float iw = (float) ctx.getDocumentSize().getWidth();\n float ih = (float) ctx.getDocumentSize().getHeight();\n float w = (float) area.getWidth();\n float h = (float) area.getHeight();\n g2d.scale(w / iw, h / ih);\n\n root.paint(g2d);\n }\n\n public Dimension getImageSize() {\n return new Dimension(wrappedContext.getWidth(), wrappedContext.getHeight());\n }\n\n };\n\n //Let the painter paint the SVG on the Graphics2D instance\n Graphics2DAdapter adapter = context.getRenderer().getGraphics2DAdapter();\n adapter.paintImage(painter, context, \n x, y, wrappedContext.getWidth(), wrappedContext.getHeight()); \n }", "public String fileCirclesToSVG() {\r\n\t\t\r\n\t\tString ret = \"<svg width=\\\"\"+getWidth()+\"\\\" height=\\\"\"+getHeight()+\"\\\">\\n\";\r\n\t\tfor (Node n : getGraph().getNodes()) {\r\n\t\t\tdouble x = n.getX();\r\n\t\t\tdouble y = n.getY();\r\n\t\t\tif(n.getPreciseCentre() != null) {\r\n\t\t\t\tx = n.getPreciseCentre().x;\r\n\t\t\t\ty = n.getPreciseCentre().y;\r\n\t\t\t}\r\n\t\t\tret += \"\\t<circle cx=\\\"\"+x+\"\\\" cy=\\\"\"+y+\"\\\" r=\\\"\"+n.getPreciseRadius()+\"\\\" fill=\\\"none\\\" stroke=\\\"black\\\" stroke-width=\\\"2\\\" />\\n\";\r\n\t\t\tret += \"\\t<text x=\\\"\"+x+\"\\\" y=\\\"\"+y+\"\\\">\"+n.getContour()+\"</text>\\n\";\r\n\t\t}\r\n\t\t\r\n\t\tret += \"</svg>\";\r\n\t\treturn ret;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
try to recover with the PresenterSavior
@SuppressWarnings("unchecked") public void onCreate_afterSuper(final Bundle savedInstanceState) { if (savedInstanceState != null) { final String recoveredPresenterId = savedInstanceState.getString(SAVED_STATE_PRESENTER_ID); if (mPresenter == null) { if (recoveredPresenterId != null) { // recover with Savior // this should always work. TiLog.v(mLogTag.getLoggingTag(), "try to recover Presenter with id: " + recoveredPresenterId); mPresenter = (P) mSavior .recover(recoveredPresenterId, mTiActivity.getHostingActivity()); TiLog.v(mLogTag.getLoggingTag(), "recovered Presenter from savior " + mPresenter); } else { TiLog.v(mLogTag.getLoggingTag(), "could not recover a Presenter from savior"); } } if (mPresenter == null) { TiLog.i(mLogTag.getLoggingTag(), "could not recover the Presenter " + "although it's not the first start of the Activity. This is normal when " + "configured as .setRetainPresenterEnabled(false)."); } else { // save recovered presenter with new id. No other instance of this activity, // holding the presenter before, is now able to remove the reference to // this presenter from the savior mSavior.free(recoveredPresenterId, mTiActivity.getHostingActivity()); mPresenterId = mSavior.save(mPresenter, mTiActivity.getHostingActivity()); } } if (mPresenter == null) { // could not recover, create a new presenter mPresenter = mPresenterProvider.providePresenter(); if (mPresenter.getState() != TiPresenter.State.INITIALIZED) { throw new IllegalStateException("Presenter not in initialized state. " + "Current state is " + mPresenter.getState() + ". " + "Presenter provided with #providePresenter() cannot be reused. " + "Always return a fresh instance!"); } TiLog.v(mLogTag.getLoggingTag(), "created Presenter: " + mPresenter); final TiConfiguration config = mPresenter.getConfig(); if (config.shouldRetainPresenter()) { mPresenterId = mSavior.save(mPresenter, mTiActivity.getHostingActivity()); } mPresenter.create(); } final TiConfiguration config = mPresenter.getConfig(); if (config.isCallOnMainThreadInterceptorEnabled()) { addBindViewInterceptor(new CallOnMainThreadInterceptor()); } if (config.isDistinctUntilChangedInterceptorEnabled()) { addBindViewInterceptor(new DistinctUntilChangedInterceptor()); } //noinspection unchecked final UiThreadExecutorAutoBinder uiThreadAutoBinder = new UiThreadExecutorAutoBinder(mPresenter, mTiActivity.getUiThreadExecutor()); // bind ui thread to presenter when view is attached mUiThreadBinderRemovable = mPresenter.addLifecycleObserver(uiThreadAutoBinder); }
[ "protected abstract void onPresenterCreatedOrRestored(P presenter);", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n mPresenter.saveState(outState);\n }", "protected boolean retainPresenter() {\n return true;\n }", "private void ricaricaProvvedimento() throws WebServiceInvocationFailureException {\n\t\tfinal String methodName = \"ricaricaProvvedimento\";\n\t\tRicercaProvvedimento req = model.creaRequestRicercaProvvedimento();\n\t\tRicercaProvvedimentoResponse res = provvedimentoService.ricercaProvvedimento(req);\n\t\tif (res.hasErrori()) {\n\t\t\taddErrori(res);\n\t\t\tthrow new WebServiceInvocationFailureException(createErrorInServiceInvocationString(req, res));\n\t\t}\n\t\tif(res.getListaAttiAmministrativi().isEmpty()) {\n\t\t\taddErrore(ErroreCore.ENTITA_NON_TROVATA.getErrore(\"Atto amministrativo\", \"uid \" + model.getAttoAmministrativo().getUid()));\n\t\t\tthrow new WebServiceInvocationFailureException(\"Nessun provvedimento reperito per uid \" + model.getAttoAmministrativo().getUid());\n\t\t}\n\t\tAttoAmministrativo aa = res.getListaAttiAmministrativi().get(0);\n\t\tmodel.setAttoAmministrativo(aa);\n\t\tmodel.setUidProvvedimento(aa.getUid());\n\t\tmodel.getProgetto().setAttoAmministrativo(aa);\n\t\t\n\t\tlog.debug(methodName, \"Progetto aggiornato\");\n\t}", "Object onFailedCreateFromEditor() {\n\t\t_mode = Mode.CREATE;\n\t\t_personId = null;\n\t\treturn _editorZone.getBody();\n\t}", "public void revicer() throws Exception;", "Object onFailedCreateFromEditor() {\n\t\t_mode = Mode.CREATE;\n\t\t_facilityId = null;\n\t\treturn _editorZone.getBody();\n\t}", "public void restoreFromSavePoint()\r\n {\r\n String methodName = MODULE_NAME + \"restoreFromSavePoint()\";\r\n\r\n //JGD TODO commented out for now since I don't expose the resetContents actions yet and I wanted to make\r\n //JGD TODO sure this wasn't killing me. 8/31/06\r\n\r\n //Logger.log( methodName + \" called for namme: \" + getStringProperty(DISPLAY_NAME), Logger.CONFIG );\r\n\r\n //theProps = theSavedProps;\r\n }", "protected void restoreParcelableData(Bundle savedInstanceState) {\r\n\r\n\t}", "private void persistVehiclePipoData(VehicleAndCrewDataPersistenceService vehicleAndCrewDataPersistenceService) {\n\t\tboolean retry = true;\n\t\tint retryCount = 0;\n\t\twhile(retry) {\n\t\t\ttry {\n\t\t\t\t_log.info(\"persisting vehicle PIPO data\");\n\t\t\t\tvehicleAndCrewDataPersistenceService.saveVehiclePulloutData();\n\t\t\t\tretry = false;\n\t\t\t} catch(DataAccessResourceFailureException e) {\n\t\t\t\t//Retry once if there is an exception\n\t\t\t\tretryCount++;\n\t\t\t\tif(retryCount > 1) {\n\t\t\t\t\tretry = false;\n\t\t\t\t\t_log.error(\"Error persisting vehicle PIPO data after retrying once\");\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif(retry) {\n\t\t\t\t\t_log.info(\"Retry persisting vehicle PIPO data\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test(expected = ReliabilityDataPersistenceException.class)\r\n public void testGetUserParticipationDataWithPersistenceError() throws Exception {\r\n instance.open();\r\n\r\n ((Connection) FailureTestHelper.getField(instance, \"connection\")).close();\r\n\r\n instance.getUserParticipationData(1, 1, new Date());\r\n }", "public boolean restorePhysician(Physician physician) throws ApplicationException;", "public void migrateData() throws Throwable\r\n\t{\r\n\t\tthis.createStagingPrivateInstance();\r\n\t\tthis.maskData();\r\n\t\tthis.importDataInPublicInstance();\r\n\t}", "boolean getNeedRecover();", "public void remPresenterImport(){\n ((ViewDMO) core).remPresenterImport();\n }", "Object onFailedCreateFromEditor() {\n\t\t_mode = Mode.CREATE;\n\t\t_sectionId = null;\n\t\treturn _editorZone.getBody();\n\t}", "@Override\n public Object onRetainCustomNonConfigurationInstance() {\n return presenter;\n }", "public abstract void restore();", "public void restore(){\n\tfifo.restore();\n\t\n\t// Restore eligibility trace\n\teligibility = eligibilityBackup;\t\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'MT_SYSTEM' field.
public org.LNDCDC_NCS_TCS.CF_MEDIA_TYPES.apache.nifi.LNDCDC_NCS_TCS_CF_MEDIA_TYPES.Builder clearMTSYSTEM() { MT_SYSTEM = null; fieldSetFlags()[7] = false; return this; }
[ "public void unsetSystem()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SYSTEM$0, 0);\n }\n }", "public void setMTSYSTEM(java.lang.CharSequence value) {\n this.MT_SYSTEM = value;\n }", "void unsetSystem();", "public void simClearSystemCollection() {\n systemColl.clear();\n }", "public void clear() {\n\t\tsystems.clear();\n\t}", "public static synchronized void useSystemTime() {\n clockMs = null;\n TimeUtil.resetCurrentMillisSupplier();\n }", "public java.lang.CharSequence getMTSYSTEM() {\n return MT_SYSTEM;\n }", "public java.lang.CharSequence getMTSYSTEM() {\n return MT_SYSTEM;\n }", "public void clearDevice() {\n this.smfDev = null;\n \n this.mplTrgParms.emptyPool();\n \n this.knbTrgDly.setEditable(false);\n this.knbTrgDly.setValue(0);\n \n this.whlTrgDly.setEditable(false);\n this.whlTrgDly.setValue(0);\n \n this.pnlTrgEvt.clearTriggerEvent();\n }", "public void setSystem(String system) {\n this.system = system == null ? null : system.trim();\n }", "public org.LNDCDC_NCS_TCS.CF_MEDIA_TYPES.apache.nifi.LNDCDC_NCS_TCS_CF_MEDIA_TYPES.Builder setMTSYSTEM(java.lang.CharSequence value) {\n validate(fields()[7], value);\n this.MT_SYSTEM = value;\n fieldSetFlags()[7] = true;\n return this;\n }", "public void setSystem(String value) {\r\n this.system = value;\r\n }", "public void setSystemType(String systemType) {\n this.systemType = systemType == null ? null : systemType.trim();\n }", "public boolean hasMTSYSTEM() {\n return fieldSetFlags()[7];\n }", "public void setSystem(String system) {\r\n this.system = system;\r\n }", "public void unsetOs()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(OS$8, 0);\r\n }\r\n }", "public AS400 getSystem() {\r\n return system;\r\n }", "void setSystem(java.lang.String system);", "public void resetSystemMessageCount(){\n\t\tiMessageCount = 0;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performance profile that can be used to annotate HLO operations in the computation graph. .tensorflow.RunMetadata hlo_metadata = 5;
public org.tensorflow.framework.RunMetadataOrBuilder getHloMetadataOrBuilder() { return getHloMetadata(); }
[ "org.tensorflow.framework.RunMetadata getHloMetadata();", "org.tensorflow.framework.RunMetadataOrBuilder getHloMetadataOrBuilder();", "public org.tensorflow.framework.RunMetadata getHloMetadata() {\n return hloMetadata_ == null ? org.tensorflow.framework.RunMetadata.getDefaultInstance() : hloMetadata_;\n }", "tensorflow.tpu.op_profile.OpProfile.Profile getOpProfile();", "public org.tensorflow.framework.RunMetadataOrBuilder getHloMetadataOrBuilder() {\n if (hloMetadataBuilder_ != null) {\n return hloMetadataBuilder_.getMessageOrBuilder();\n } else {\n return hloMetadata_ == null ?\n org.tensorflow.framework.RunMetadata.getDefaultInstance() : hloMetadata_;\n }\n }", "tensorflow.tpu.op_profile.OpProfile.ProfileOrBuilder getOpProfileOrBuilder();", "boolean hasHloMetadata();", "tensorflow.TpuProfiler.ProfileOptions getOpts();", "@LargeTest\n public void testHistogram() {\n TestAction ta = new TestAction(TestName.HISTOGRAM);\n runTest(ta, TestName.HISTOGRAM.name());\n }", "public Histogram getPutLatencyHistogram();", "tensorflow.TpuProfiler.ProfileToolData getToolData(int index);", "private double getOEEPerformance(Batch batch) {\n return 1;\n }", "java.util.Map<java.lang.Long, org.tensorflow.proto.profiler.XStatMetadata>\n getStatMetadataMap();", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 518,\n FQN=\"llvm::Module::getProfileSummary\", NM=\"_ZN4llvm6Module17getProfileSummaryEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module17getProfileSummaryEv\")\n //</editor-fold>\n public Metadata /*P*/ getProfileSummary() {\n return getModuleFlag(new StringRef(/*KEEP_STR*/\"ProfileSummary\"));\n }", "public tensorflow.tpu.op_profile.OpProfile.Profile getOpProfile() {\n return opProfile_ == null ? tensorflow.tpu.op_profile.OpProfile.Profile.getDefaultInstance() : opProfile_;\n }", "tensorflow.TpuProfiler.ProfileOptionsOrBuilder getOptsOrBuilder();", "public HologramTarget getHologramTarget()\n {\n return _target;\n }", "public tensorflow.tpu.op_profile.OpProfile.Profile getOpProfile() {\n if (opProfileBuilder_ == null) {\n return opProfile_ == null ? tensorflow.tpu.op_profile.OpProfile.Profile.getDefaultInstance() : opProfile_;\n } else {\n return opProfileBuilder_.getMessage();\n }\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/Analysis/ProfileSummaryInfo.cpp\", line = 57,\n FQN=\"llvm::ProfileSummaryInfo::computeSummary\", NM=\"_ZN4llvm18ProfileSummaryInfo14computeSummaryEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.analysis/llvmToClangType ${LLVM_SRC}/llvm/lib/Analysis/ProfileSummaryInfo.cpp -nm=_ZN4llvm18ProfileSummaryInfo14computeSummaryEv\")\n //</editor-fold>\n private void computeSummary() {\n if (Summary.$bool()) {\n return;\n }\n Metadata /*P*/ SummaryMD = M.getProfileSummary();\n if (!(SummaryMD != null)) {\n return;\n }\n Summary.reset(ProfileSummary.getFromMD(SummaryMD));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gather specific files from FileStatus
private void gatherFile(FileStatus[] fstat) { inputSize = 0; paths = new Path[fstat.length]; for(int i=0;i<fstat.length;i++) { inputSize+=fstat[i].getLen(); paths[i] = fstat[i].getPath(); } }
[ "comnet.minihadoop.common.message.cli.ListResponse.File getFiles(int index);", "java.util.List<comnet.minihadoop.common.message.cli.ListResponse.File> \n getFilesList();", "com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.File getFiles(int index);", "@NonNull\n synchronized Set<String> getFilesForStatus(Status status) {\n ImmutableSet.Builder<String> builder = ImmutableSet.builder();\n for (String s : records.keySet()) {\n if (getChangeFor(s) == status) {\n builder.add(s);\n }\n }\n return builder.build();\n }", "private List<String> scoutForFiles(FileType fileType, Path path) {\n\t\tfinal List<String> filesFound = new ArrayList<>();\n\n\t\t// Create a stream of Paths for the contents of the directory\n\t\ttry (Stream<Path> walk = Files.walk(path)) {\n\n\t\t\t// Filter the stream to find only Paths that match the filetype we are looking\n\t\t\tfilesFound.addAll(walk.map(x -> x.toString())\n\t\t\t\t.filter(f -> f.endsWith(fileType.suffix)).collect(Collectors.toList()));\n\t\t} catch (IOException e) {\n\t\t\tthrow new MessagePassableException(EventKey.ERROR_EXTERNAL_DIR_NOT_READABLE, e, path.toString());\n\t\t}\n\n\t\treturn filesFound;\n\t}", "private void getFilesList() {\n\t\ttry {\n\t\t\tint length = in.read(); // TODO won't work for more than 1 byte of files\n\t\t\tList<String> list = new LinkedList<>();\n\t\t\tbyte[] mybytearray = new byte[1024];\n\t\t\tfor(int i=0;i<length;i++) {\n\t\t\t\tint bytesRead = in.read(mybytearray, 0, mybytearray.length);\n\t\t\t\tif(bytesRead > 0) {\n\t\t\t\t\tString fileName = new String(mybytearray,0,bytesRead);\n\t\t\t\t\tlist.add(fileName);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmaster.addFiles(id, list);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Exception while receiving file listing from Client: \" + e);\n\t\t}\n\t}", "private void listFiles(String command) throws IOException {\n File file = new File(\".store//\");\n String response = \"\";\n try {\n\n DirectoryStream<Path> dir = Files.newDirectoryStream(file.toPath());\n response = file.list().length + \"\\n\";\n for (Path filePath : dir) {\n response = response + filePath.getFileName() + \"\\n\";\n }\n } catch (Exception ex) {\n response = \"ERROR: \" + ex.getMessage();\n }\n\n sendMessageToClient(response);\n }", "private void findAllFiles() {\n foundFiles = searcher.search(params.getDirectoryKey(), params.getFileNameKey());\n }", "private void listFiles()\n {\n (new List(socketWriter, logWriter)).execute();\n }", "java.util.List<? extends comnet.minihadoop.common.message.cli.ListResponse.FileOrBuilder> \n getFilesOrBuilderList();", "public abstract List getOpenFiles();", "private void findRecordings(){\n File[] files = new File(\"Concatenated/\").listFiles();\n _records.clear();\n _versionNum = 1;\n for (File file : files){\n if (file.isFile()){\n String nameOnFile = file.getName().substring(file.getName().lastIndexOf('_')+1,file.getName().lastIndexOf('.')).toUpperCase();\n if (nameOnFile.equals(_name.toUpperCase())){\n _records.add(file.getName());\n _versionNum++;\n }\n }\n }\n }", "private void getFilesList() {\n File file = new File(view.getContext().getFilesDir().getAbsolutePath()); // Get path to directory\n FilenameFilter filter = (dir, name) -> name.contains(\"hourly\");\n\n fileList = file.listFiles(filter);\n Arrays.sort(fileList, Comparator.comparingLong(File::lastModified).reversed()); // sort in reversed date order\n\n if (fileList.length == 0) {\n Toast toast = Toast.makeText(view.getContext(), \"No Miles Data Available. Please start using your FitBit to see your health progress.\", Toast.LENGTH_LONG);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n } else {\n HourlyAllActiveData = new ArrayList<>();\n new MyTask().execute();\n }\n }", "Map getPossibleFileStatusInfoMap();", "List<URI> getCurrentFiles();", "public List<FileWithFaultLocations> getFaultyFiles();", "public File[] listFiles(File f, FilenameFilter ff);", "edu.usfca.cs.dfs.StorageMessages.ListFileResponse getListFileResponse();", "String getFileStatus(Long fileId);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XAssignment__FeatureAssignment_1_1_0_0_1" $ANTLR start "rule__XAssignment__RightOperandAssignment_1_1_1" InternalDroneScript.g:17426:1: rule__XAssignment__RightOperandAssignment_1_1_1 : ( ruleXAssignment ) ;
public final void rule__XAssignment__RightOperandAssignment_1_1_1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDroneScript.g:17430:1: ( ( ruleXAssignment ) ) // InternalDroneScript.g:17431:2: ( ruleXAssignment ) { // InternalDroneScript.g:17431:2: ( ruleXAssignment ) // InternalDroneScript.g:17432:3: ruleXAssignment { if ( state.backtracking==0 ) { before(grammarAccess.getXAssignmentAccess().getRightOperandXAssignmentParserRuleCall_1_1_1_0()); } pushFollow(FOLLOW_2); ruleXAssignment(); state._fsp--; if (state.failed) return ; if ( state.backtracking==0 ) { after(grammarAccess.getXAssignmentAccess().getRightOperandXAssignmentParserRuleCall_1_1_1_0()); } } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__XAssignment__RightOperandAssignment_1_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15205:1: ( ( ruleXAssignment ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15206:1: ( ruleXAssignment )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15206:1: ( ruleXAssignment )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15207:1: ruleXAssignment\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXAssignmentAccess().getRightOperandXAssignmentParserRuleCall_1_1_1_0()); \n }\n pushFollow(FOLLOW_ruleXAssignment_in_rule__XAssignment__RightOperandAssignment_1_1_130586);\n ruleXAssignment();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXAssignmentAccess().getRightOperandXAssignmentParserRuleCall_1_1_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XAssignment__RightOperandAssignment_1_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17090:1: ( ( ruleXAssignment ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17091:1: ( ruleXAssignment )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17091:1: ( ruleXAssignment )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17092:1: ruleXAssignment\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXAssignmentAccess().getRightOperandXAssignmentParserRuleCall_1_1_1_0()); \n }\n pushFollow(FOLLOW_ruleXAssignment_in_rule__XAssignment__RightOperandAssignment_1_1_134409);\n ruleXAssignment();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXAssignmentAccess().getRightOperandXAssignmentParserRuleCall_1_1_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XAssignment__RightOperandAssignment_1_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16057:1: ( ( ruleXAssignment ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16058:1: ( ruleXAssignment )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16058:1: ( ruleXAssignment )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:16059:1: ruleXAssignment\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXAssignmentAccess().getRightOperandXAssignmentParserRuleCall_1_1_1_0()); \n }\n pushFollow(FOLLOW_ruleXAssignment_in_rule__XAssignment__RightOperandAssignment_1_1_132319);\n ruleXAssignment();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXAssignmentAccess().getRightOperandXAssignmentParserRuleCall_1_1_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XAssignment__RightOperandAssignment_1_1_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30389:1: ( ( ruleXAssignment ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30390:1: ( ruleXAssignment )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30390:1: ( ruleXAssignment )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30391:1: ruleXAssignment\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXAssignmentAccess().getRightOperandXAssignmentParserRuleCall_1_1_1_0()); \r\n }\r\n pushFollow(FOLLOW_ruleXAssignment_in_rule__XAssignment__RightOperandAssignment_1_1_161110);\r\n ruleXAssignment();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXAssignmentAccess().getRightOperandXAssignmentParserRuleCall_1_1_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XAssignment__RightOperandAssignment_1_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12158:1: ( ( ruleXAssignment ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12159:1: ( ruleXAssignment )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12159:1: ( ruleXAssignment )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:12160:1: ruleXAssignment\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXAssignmentAccess().getRightOperandXAssignmentParserRuleCall_1_1_1_0()); \n }\n pushFollow(FOLLOW_ruleXAssignment_in_rule__XAssignment__RightOperandAssignment_1_1_124382);\n ruleXAssignment();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXAssignmentAccess().getRightOperandXAssignmentParserRuleCall_1_1_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XAssignment__RightOperandAssignment_1_1_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17407:1: ( ( ruleXAssignment ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17408:1: ( ruleXAssignment )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17408:1: ( ruleXAssignment )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:17409:1: ruleXAssignment\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXAssignmentAccess().getRightOperandXAssignmentParserRuleCall_1_1_1_0()); \r\n }\r\n pushFollow(FOLLOW_ruleXAssignment_in_rule__XAssignment__RightOperandAssignment_1_1_135142);\r\n ruleXAssignment();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXAssignmentAccess().getRightOperandXAssignmentParserRuleCall_1_1_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XAssignment__Group_1_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3726:1: ( ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3727:1: ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3727:1: ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3728:1: ( rule__XAssignment__RightOperandAssignment_1_1_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXAssignmentAccess().getRightOperandAssignment_1_1_1()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3729:1: ( rule__XAssignment__RightOperandAssignment_1_1_1 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3729:2: rule__XAssignment__RightOperandAssignment_1_1_1\n {\n pushFollow(FOLLOW_rule__XAssignment__RightOperandAssignment_1_1_1_in_rule__XAssignment__Group_1_1__1__Impl8024);\n rule__XAssignment__RightOperandAssignment_1_1_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXAssignmentAccess().getRightOperandAssignment_1_1_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XAssignment__Group_1_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:7963:1: ( ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:7964:1: ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:7964:1: ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:7965:1: ( rule__XAssignment__RightOperandAssignment_1_1_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXAssignmentAccess().getRightOperandAssignment_1_1_1()); \r\n }\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:7966:1: ( rule__XAssignment__RightOperandAssignment_1_1_1 )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:7966:2: rule__XAssignment__RightOperandAssignment_1_1_1\r\n {\r\n pushFollow(FOLLOW_rule__XAssignment__RightOperandAssignment_1_1_1_in_rule__XAssignment__Group_1_1__1__Impl16415);\r\n rule__XAssignment__RightOperandAssignment_1_1_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXAssignmentAccess().getRightOperandAssignment_1_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XAssignment__Group_1_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17399:1: ( ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17400:1: ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17400:1: ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17401:1: ( rule__XAssignment__RightOperandAssignment_1_1_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXAssignmentAccess().getRightOperandAssignment_1_1_1()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17402:1: ( rule__XAssignment__RightOperandAssignment_1_1_1 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:17402:2: rule__XAssignment__RightOperandAssignment_1_1_1\r\n {\r\n pushFollow(FOLLOW_rule__XAssignment__RightOperandAssignment_1_1_1_in_rule__XAssignment__Group_1_1__1__Impl35317);\r\n rule__XAssignment__RightOperandAssignment_1_1_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXAssignmentAccess().getRightOperandAssignment_1_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XAssignment__Group_1_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4435:1: ( ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4436:1: ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) )\n {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4436:1: ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4437:1: ( rule__XAssignment__RightOperandAssignment_1_1_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXAssignmentAccess().getRightOperandAssignment_1_1_1()); \n }\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4438:1: ( rule__XAssignment__RightOperandAssignment_1_1_1 )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4438:2: rule__XAssignment__RightOperandAssignment_1_1_1\n {\n pushFollow(FOLLOW_rule__XAssignment__RightOperandAssignment_1_1_1_in_rule__XAssignment__Group_1_1__1__Impl9465);\n rule__XAssignment__RightOperandAssignment_1_1_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXAssignmentAccess().getRightOperandAssignment_1_1_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XAssignment__Group_1_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5332:1: ( ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5333:1: ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5333:1: ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5334:1: ( rule__XAssignment__RightOperandAssignment_1_1_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXAssignmentAccess().getRightOperandAssignment_1_1_1()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5335:1: ( rule__XAssignment__RightOperandAssignment_1_1_1 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5335:2: rule__XAssignment__RightOperandAssignment_1_1_1\n {\n pushFollow(FOLLOW_rule__XAssignment__RightOperandAssignment_1_1_1_in_rule__XAssignment__Group_1_1__1__Impl11278);\n rule__XAssignment__RightOperandAssignment_1_1_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXAssignmentAccess().getRightOperandAssignment_1_1_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XAssignment__Group_1_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:6345:1: ( ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:6346:1: ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:6346:1: ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:6347:1: ( rule__XAssignment__RightOperandAssignment_1_1_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXAssignmentAccess().getRightOperandAssignment_1_1_1()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:6348:1: ( rule__XAssignment__RightOperandAssignment_1_1_1 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:6348:2: rule__XAssignment__RightOperandAssignment_1_1_1\r\n {\r\n pushFollow(FOLLOW_rule__XAssignment__RightOperandAssignment_1_1_1_in_rule__XAssignment__Group_1_1__1__Impl13348);\r\n rule__XAssignment__RightOperandAssignment_1_1_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXAssignmentAccess().getRightOperandAssignment_1_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XAssignment__Group_1_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:3456:1: ( ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:3457:1: ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:3457:1: ( ( rule__XAssignment__RightOperandAssignment_1_1_1 ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:3458:1: ( rule__XAssignment__RightOperandAssignment_1_1_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXAssignmentAccess().getRightOperandAssignment_1_1_1()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:3459:1: ( rule__XAssignment__RightOperandAssignment_1_1_1 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:3459:2: rule__XAssignment__RightOperandAssignment_1_1_1\n {\n pushFollow(FOLLOW_rule__XAssignment__RightOperandAssignment_1_1_1_in_rule__XAssignment__Group_1_1__1__Impl7274);\n rule__XAssignment__RightOperandAssignment_1_1_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXAssignmentAccess().getRightOperandAssignment_1_1_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XRelationalExpression__Group_1_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:6590:1: ( ( ( rule__XRelationalExpression__RightOperandAssignment_1_1_1 ) ) )\r\n // InternalDroneScript.g:6591:1: ( ( rule__XRelationalExpression__RightOperandAssignment_1_1_1 ) )\r\n {\r\n // InternalDroneScript.g:6591:1: ( ( rule__XRelationalExpression__RightOperandAssignment_1_1_1 ) )\r\n // InternalDroneScript.g:6592:2: ( rule__XRelationalExpression__RightOperandAssignment_1_1_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXRelationalExpressionAccess().getRightOperandAssignment_1_1_1()); \r\n }\r\n // InternalDroneScript.g:6593:2: ( rule__XRelationalExpression__RightOperandAssignment_1_1_1 )\r\n // InternalDroneScript.g:6593:3: rule__XRelationalExpression__RightOperandAssignment_1_1_1\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__XRelationalExpression__RightOperandAssignment_1_1_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXRelationalExpressionAccess().getRightOperandAssignment_1_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XRelationalExpression__RightOperandAssignment_1_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17241:1: ( ( ruleXOtherOperatorExpression ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17242:1: ( ruleXOtherOperatorExpression )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17242:1: ( ruleXOtherOperatorExpression )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:17243:1: ruleXOtherOperatorExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXRelationalExpressionAccess().getRightOperandXOtherOperatorExpressionParserRuleCall_1_1_1_0()); \n }\n pushFollow(FOLLOW_ruleXOtherOperatorExpression_in_rule__XRelationalExpression__RightOperandAssignment_1_1_134720);\n ruleXOtherOperatorExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXRelationalExpressionAccess().getRightOperandXOtherOperatorExpressionParserRuleCall_1_1_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XRelationalExpression__RightOperandAssignment_1_1_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:17581:1: ( ( ruleXOtherOperatorExpression ) )\r\n // InternalDroneScript.g:17582:2: ( ruleXOtherOperatorExpression )\r\n {\r\n // InternalDroneScript.g:17582:2: ( ruleXOtherOperatorExpression )\r\n // InternalDroneScript.g:17583:3: ruleXOtherOperatorExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXRelationalExpressionAccess().getRightOperandXOtherOperatorExpressionParserRuleCall_1_1_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleXOtherOperatorExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXRelationalExpressionAccess().getRightOperandXOtherOperatorExpressionParserRuleCall_1_1_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XRelationalExpression__Group_1_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4742:1: ( ( ( rule__XRelationalExpression__RightOperandAssignment_1_1_1 ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4743:1: ( ( rule__XRelationalExpression__RightOperandAssignment_1_1_1 ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4743:1: ( ( rule__XRelationalExpression__RightOperandAssignment_1_1_1 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4744:1: ( rule__XRelationalExpression__RightOperandAssignment_1_1_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXRelationalExpressionAccess().getRightOperandAssignment_1_1_1()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4745:1: ( rule__XRelationalExpression__RightOperandAssignment_1_1_1 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4745:2: rule__XRelationalExpression__RightOperandAssignment_1_1_1\n {\n pushFollow(FOLLOW_rule__XRelationalExpression__RightOperandAssignment_1_1_1_in_rule__XRelationalExpression__Group_1_1__1__Impl10020);\n rule__XRelationalExpression__RightOperandAssignment_1_1_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXRelationalExpressionAccess().getRightOperandAssignment_1_1_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XRelationalExpression__Group_1_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6348:1: ( ( ( rule__XRelationalExpression__RightOperandAssignment_1_1_1 ) ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6349:1: ( ( rule__XRelationalExpression__RightOperandAssignment_1_1_1 ) )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6349:1: ( ( rule__XRelationalExpression__RightOperandAssignment_1_1_1 ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6350:1: ( rule__XRelationalExpression__RightOperandAssignment_1_1_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXRelationalExpressionAccess().getRightOperandAssignment_1_1_1()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6351:1: ( rule__XRelationalExpression__RightOperandAssignment_1_1_1 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6351:2: rule__XRelationalExpression__RightOperandAssignment_1_1_1\n {\n pushFollow(FOLLOW_rule__XRelationalExpression__RightOperandAssignment_1_1_1_in_rule__XRelationalExpression__Group_1_1__1__Impl13274);\n rule__XRelationalExpression__RightOperandAssignment_1_1_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXRelationalExpressionAccess().getRightOperandAssignment_1_1_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XRelationalExpression__RightOperandAssignment_1_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15356:1: ( ( ruleXOtherOperatorExpression ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15357:1: ( ruleXOtherOperatorExpression )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15357:1: ( ruleXOtherOperatorExpression )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15358:1: ruleXOtherOperatorExpression\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXRelationalExpressionAccess().getRightOperandXOtherOperatorExpressionParserRuleCall_1_1_1_0()); \n }\n pushFollow(FOLLOW_ruleXOtherOperatorExpression_in_rule__XRelationalExpression__RightOperandAssignment_1_1_130897);\n ruleXOtherOperatorExpression();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXRelationalExpressionAccess().getRightOperandXOtherOperatorExpressionParserRuleCall_1_1_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the P parameter. The plaintext data format is bigendian and rightaligned (the least significant bit is the least significant bit of last byte). Input P parameter data is copied into the internal representation.
void setP( byte[] buffer, short offset, short length) throws CryptoException;
[ "protected void setP1(byte p1) {\n\theader[2] = p1;\n }", "@objid (\"4a70fdf5-35b2-4c97-bf6d-f67d64977605\")\n void setPBase(Parameter value);", "public void setP(double p) {\n this.p = p;\n setPID(p, i, d);\n }", "protected void setP1P2(byte[] p1p2) {\n\tsetP1(p1p2[0]);\n\tsetP2(p1p2[1]);\n }", "public void setParameter(short param) throws TFTPPacketException;", "public void setP1(Point p){\n this.p1 = new Point(p);\n }", "public void setPayload(byte[] pld) throws TFTPPacketException;", "protected void setP2(byte p2) {\n\theader[3] = p2;\n }", "private void setP1( Point p1 ){\n this.p1=p1;\n }", "protected boolean setInternalParameter(int parameter, int[] pData) throws\n IOException,\n InterruptedIOException,\n CoronisException {\n /*\n * Query the waveport and read it's firmware version in order to check\n * that the RS-232 connection works fine\n */\n if (isConnected == false) {\n connect();\n }\n \n Logger.debug(\"Set property request sent\");\n \n int timeout = getTimeOut(null);\n \n // message is parameter id + parameter data\n int[] msg = new int[1+ pData.length];\n msg[0] = parameter;\n for (int i =1; i < pData.length+1; i++ ) {\n msg[i] = pData[i-1];\n }\n \n WavePortSetParameterRequest ptp = new WavePortSetParameterRequest(this, msg, (int)(timeout * 1.1* 100)); \n int resent = 0;\n int tranmissionError = 0;\n int timeoutError = 0;\n // request is sent maximum three times if TransmissionException or TimeOutException are catched.\n do {\n try {\n try {\n Thread.sleep(ACK_RETRY_COUNT * WavePort.ACK_RECEIVED_TIMEOUT);\n } catch (InterruptedException e) {\n \n }\n if (ptp.process()) {\n Logger.debug(\"Set write parameter returned\");\n if (((ResWriteParameterFrame)ptp.getAnswer()).getStatus() == true) {\n Logger.debug(\"Property setted ok\"); \n return true;\n } else {\n Logger.error(\"Write parameter error while trying to set parameter \" + Functions.printHumanHex(parameter, true) );\n return false; \n }\n } else if (ptp.isTimeOut()) throw new TimeOutException(\"Waveport set paremeter request has timed out ...\");\n else {\n Logger.debug(\"Strange process did not finish correctly but it's not a timeout ...\");\n throw new CoronisException(\"Strange process did not finish correctly but it's not a timeout ...\");\n }\n } catch (TransmissionException e) {\n tranmissionError++;\n ptp.unsubscribe(); // remove old event subscription\n } catch (TimeOutException e) {\n timeoutError++;\n ptp.unsubscribe(); // remove old event subscription\n } catch (NoAckException e) {\n tranmissionError++;\n ptp.unsubscribe();\n Logger.warning(\"No ack exception. WavePort is in a bad mood. Waiting 10 seconds\");\n try {\n Thread.sleep(10000);\n } catch (InterruptedException ex) {\n ex.printStackTrace();\n }\n } catch (CommandException e) {\n tranmissionError++;\n ptp.unsubscribe();\n Logger.warning(\"Command exception while talking to the WavePort. WavePort is in a bad mood. Waiting 10 seconds\");\n try {\n Thread.sleep(10000);\n } catch (InterruptedException ex) {\n ex.printStackTrace();\n }\n }\n } while (++resent < this.queryRetries);\n throw new TransmissionException(this.queryRetries \n \t\t\t\t\t\t\t\t+\" repetition of the setInternalParameter request did not succed ( \"\n \t\t\t\t\t\t\t\t+ tranmissionError + \" transmission errors and \"\n \t\t\t\t\t\t\t\t+ timeoutError + \" timeout errors)\");\n }", "public void setPlength (java.lang.Integer plength) {\n\t\tthis.plength = plength;\n\t}", "public void setP2(Point p){\n this.p2 = new Point(p);\n }", "void setPQ( byte[] buffer, short offset, short length) throws CryptoException;", "boolean IVS_PU_SetISPPara(ULONG ulIdentifyID, PU_ISP_PARTICULAR_PARA pstISPPara, LongByReference ulBitmap);", "@Private\n @Unstable\n public abstract void setParams(ByteBuffer policyParams);", "public void setParametr(double p) {\n parametr = p; // додано 26.12.2011\n timeServ = parametr; // 20.11.2012\n\n }", "void setDP1( byte[] buffer, short offset, short length) throws CryptoException;", "public void SetParab( gp_Parab Prb) {\n OCCwrapJavaJNI.Geom_Parabola_SetParab(swigCPtr, this, gp_Parab.getCPtr(Prb), Prb);\n }", "public void setEncodedPassword(String p)\n {\n this.setPassword(p);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the L2ItemInstance of the arrows needed for this crossbow.
public L2ItemInstance findArrowForCrossbow(final L2Item xbow) { final int[] boltsId = BOLTS[xbow.getCrystalType().externalOrdinal]; L2ItemInstance ret = null; for(final int id : boltsId) if((ret = getItemByItemId(id)) != null) return ret; return null; }
[ "public ArrayList<Arrow> getArrows() {\r\n\t\treturn arrows;// return active Arrows\r\n\t}", "public Object getArrow(int i) {\r\n\t\treturn arrows.get(i);// returns specific Arrow\r\n\t}", "public abstract ArrowDecoratorStyle getArrowDecorator();", "public L2ItemInstance findArrowForBow(final L2Item bow)\n\t{\n\t\tfinal int[] arrowsId = ARROWS[bow.getCrystalType().externalOrdinal];\n\t\tL2ItemInstance ret = null;\n\t\tfor(final int id : arrowsId)\n\t\t\tif((ret = getItemByItemId(id)) != null)\n\t\t\t\treturn ret;\n\t\treturn null;\n\t}", "protected Menu createArrowMenu() {\n CommandMenu menu = new CommandMenu(\"Arrow\");\n menu.add(new ChangeAttributeCommand(\"none\", \"ArrowMode\", new Integer(PolyLineFigure.ARROW_TIP_NONE), fView));\n menu.add(new ChangeAttributeCommand(\"at Start\", \"ArrowMode\", new Integer(PolyLineFigure.ARROW_TIP_START), fView));\n menu.add(new ChangeAttributeCommand(\"at End\", \"ArrowMode\", new Integer(PolyLineFigure.ARROW_TIP_END), fView));\n menu.add(new ChangeAttributeCommand(\"at Both\", \"ArrowMode\", new Integer(PolyLineFigure.ARROW_TIP_BOTH), fView));\n return menu;\n }", "public GeneralPath createArrowHeads() {\n return OMArrowHead.createArrowHeads(OMArrowHead.ARROWHEAD_DIRECTION_FORWARD,\n 100,\n this,\n OMArrowHead.DEFAULT_WINGTIP,\n OMArrowHead.DEFAULT_WINGLENGTH);\n }", "public int getArrowType() {\n\t\treturn arrow;\n\t}", "public int getArrowShape() {\r\n\t\treturn _arrowShape;\r\n\t}", "public void asArrow() { \r\n if (this.getShapeType() != ShapeTypes.Point)\r\n return;\r\n \r\n if (this.legendBreaks.get(0) instanceof ArrowBreak) {\r\n return;\r\n }\r\n \r\n for (int i = 0; i < this.legendBreaks.size(); i++) {\r\n this.legendBreaks.set(i, new ArrowBreak((PointBreak)this.legendBreaks.get(i)));\r\n }\r\n }", "protected JButton createArrowButton() {\n\n // Construct a AltapriseArrow that points south (down for those that\n // are compass impaired) and returns it for rendering.\n return new AltapriseArrowButton (AltapriseArrowButton.SOUTH);\n }", "public Projectile getArrow() {\r\n return entity;\r\n }", "public Arrow()\n {\n arrow = new Rectangle();\n loc = 3;\n xSpeed = x[loc];\n ySpeed = y[loc];\n ang = angle[loc];\n fileName = Integer.toString(ang) + \"Arrow.png\";\n right();\n }", "public TurnArrow getTurnArrow() {\r\n\t\treturn turnArrow;\r\n\t}", "@Override\r\n protected float maxArrowLength() {\r\n return 2f;\r\n }", "void addArrow() {\n Drawer.getInstance().addElem(this);\n Drawer.getInstance().addElem(triangle);\n }", "public int getNumArrows() {\r\n return numArrows;\r\n }", "@Override\n\tpublic Weapon copy() {\n\t\treturn new Arrow(this.getCoordinates().getX(), this.getCoordinates().getY(), this.user);\n\t}", "protected IDrawableAnimated getArrow(KilnRecipe recipe) {\n int cookTime = recipe.getCookTime();\n if (cookTime <= 0) {\n cookTime = 100;\n }\n\n return this.cachedArrows.getUnchecked(cookTime);\n }", "public boolean drawArrows() { return arrows_cbmi.isSelected(); }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column ec_cust_phone.is_deault
public String getIsDeault() { return isDeault; }
[ "public String getDeaultValue()\n\t{\n\t\treturn deaultValue;\n\t}", "public String getIsDerate() {\n return isDerate;\n }", "public String getDebitCard() {\n return debitCard;\n }", "public int getDownPayment() {\n return downPayment;\n }", "public float getDebit() {\n return debit;\n }", "public Integer getCustCd() {\n return custCd;\n }", "public void setIsDeault(String isDeault) {\n this.isDeault = isDeault;\n }", "public String getDegrade() {\n return degrade;\n }", "public String getnomdudepartement() {\n AppModuleImpl am = (AppModuleImpl)this.getApplicationModule();\n ViewObjectImpl voimp = am.getDepartementView1();\n voimp.setWhereClause(\"Iddepartements = \"+getIddepartements());\n String Resultat = \"\";\n voimp.executeQuery();\n if(voimp.hasNext()){\n Row r = voimp.next();\n Resultat = r.getAttribute(\"Nomdepartement\").toString();\n }\n voimp.setWhereClause(null);\n voimp.executeQuery();\n return Resultat;\n //return (String) getAttributeInternal(NOMDUDEPARTEMENT);\n }", "public String getCodedepartement() {\n return (String) getAttributeInternal(CODEDEPARTEMENT);\n }", "public BigDecimal getDOWNPAYMENT_INS_NO()\r\n {\r\n\treturn DOWNPAYMENT_INS_NO;\r\n }", "public String getIsDel() {\n return isDel;\n }", "public BigDecimal getDEPT_CODE() {\r\n return DEPT_CODE;\r\n }", "public String getDEAL_IND() {\r\n return DEAL_IND;\r\n }", "public BigDecimal getDEAL_NO() {\r\n return DEAL_NO;\r\n }", "public java.lang.Boolean getDebitaBudget() {\n return debitaBudget;\n }", "public java.lang.String getDischarge () {\n\t\treturn discharge;\n\t}", "public String getDetalle() {\r\n return this.detalle;\r\n }", "public BigDecimal getCHARGE_ON_DEAL()\r\n {\r\n\treturn CHARGE_ON_DEAL;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the URL to the first party for cookies used in combination with CefURLRequest.
public abstract String getFirstPartyForCookies();
[ "public abstract void setFirstPartyForCookies(String url);", "String getRequestURL();", "public String buildCookieHeader(URL url) {\r\n String domain = url.getHost();\r\n int dot = domain.indexOf('.');\r\n if (dot >= 0)\r\n domain = domain.substring(dot);\r\n if (domain.equals(this.domain)) {\r\n String path = url.getPath();\r\n int secure = url.getProtocol().equalsIgnoreCase(\"https\") ? 1 : 0;\r\n StringBuffer sb = new StringBuffer();\r\n for (String key : this.jar.keySet()) {\r\n Cookie c = this.jar.get(key);\r\n if (null != c)\r\n sb.append(c.getHeader(path, secure));\r\n }\r\n if (sb.length() > 0) {\r\n sb.append(\"\\r\\n\");\r\n return \"Cookie: \" + sb.toString();\r\n }\r\n }\r\n return null;\r\n }", "public static String getCookieDomain(){\n return UTConstants.COOKIE_DOMAIN;\n }", "java.lang.String getWebUrl();", "public String getCookie();", "String getCurrentUrl();", "public static URL getHostUrl() {\n try {\n String protocol = getRequestsProtocol();\n return new URL(protocol + \"://\" + Controller.request().host());\n } catch (MalformedURLException e) {\n LOGGER.error(\".getHostUrl: couldn't get request's host URL\", e);\n }\n // Should never happen\n return null;\n }", "@Description(\"The configured host domain used for session cookies\")\n public String getCookieDomain();", "java.lang.String getURL();", "private HttpUriRequest addCookie(HttpUriRequest request) {\n String cookie = Preferences.getString(PrefType.COOKIE_APPENGINE, activity);\n if (cookie != null) {\n request.setHeader(\"Cookie\", cookie);\n }\n return request;\n }", "String getCookieDefaultPath();", "public static String getClientDownloadUrl(WizardContext wizardContext) {\r\n return getClientDownloadUrl(wizardContext, wizardContext.getClientInfo().getClientPlatform());\r\n }", "HttpClientRequest addCookie(Cookie cookie);", "String getResponseUrl();", "public static synchronized String getCookieInfo(URL u)\n {\n\tinitialize();\n\n\tString cookie = null;\n\n\ttry\n\t{\n\t // Find key to lookup cookie table\n\t String key = u.getProtocol() + u.getHost() + u.getFile();\n\n\t // To lookup the cookie, just the URL hostname and path without filename\n\t int index = key.lastIndexOf('/');\n\n\t if (index < 0)\n\t\treturn null;\n\n\t key = key.substring(0, index);\n\n\t try\n\t {\n\t\tcookie = cookieHandler.getCookieInfo(u.toString());\n\n\t\t// Store cookie into cache\n\t\t//\n\t\tif (cookie != null && !cookie.equals(\"\") && !cookie.equals(\"\\n\") && !cookie.equals(\"\\r\\n\"))\n\t\t cookieTable.put(key, cookie);\n\t\telse {\n\t\t cookieTable.put(key, \"\");\n\t\t cookie = null;\n\t\t}\n\t }\n\t catch (ServiceUnavailableException se)\n\t {\n\t\tSystem.out.println(ResourceHandler.getMessage(\"cookiehandler.noservice\"));\n\n\t\t// Obtain cookie from cache\n\t\tcookie = (String) cookieTable.get(key);\n\t }\n\n\t if (cookie != null)\n\t {\n\t\tTrace.msgNetPrintln(\"cookiehandler.connect\", new Object[] {u, cookie});\n\t }\n\t}\n\tcatch (Throwable e)\n\t{\n\t e.printStackTrace();\n\t}\n\n return cookie;\n }", "String getQueryRequestUrl();", "String getFirstCookieValue(String domain, String name);", "void requestCanonicalUrl(Tab tab, Callback<GURL> url);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "RULE_LESS_THAN" $ANTLR start "RULE_MORE_THAN"
public final void mRULE_MORE_THAN() throws RecognitionException { try { int _type = RULE_MORE_THAN; int _channel = DEFAULT_TOKEN_CHANNEL; // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:12833:16: ( '>' ) // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:12833:18: '>' { match('>'); } state.type = _type; state.channel = _channel; } finally { } }
[ "public static BinaryExpression greaterThan(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "private Expr comparison(){\n Expr expr = addition();\n\n while (match(GREATER, GREATEREQ, LESS, LESSEQ)){\n Token op = previous();\n Expr right = addition();\n expr = new Expr.Binary(expr, op, right);\n }\n\n return expr;\n }", "public final void mRULE_LESS_THAN() throws RecognitionException {\n try {\n int _type = RULE_LESS_THAN;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:12831:16: ( '<' )\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:12831:18: '<'\n {\n match('<'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public static BinaryExpression lessThan(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public final AstValidator.rel_op_lte_return rel_op_lte() throws RecognitionException {\n AstValidator.rel_op_lte_return retval = new AstValidator.rel_op_lte_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree set528=null;\n\n CommonTree set528_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:782:12: ( STR_OP_LTE | NUM_OP_LTE )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n set528=(CommonTree)input.LT(1);\n\n if ( input.LA(1)==NUM_OP_LTE||input.LA(1)==STR_OP_LTE ) {\n input.consume();\n if ( state.backtracking==0 ) {\n set528_tree = (CommonTree)adaptor.dupNode(set528);\n\n\n adaptor.addChild(root_0, set528_tree);\n }\n\n state.errorRecovery=false;\n state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n throw mse;\n }\n\n if ( state.backtracking==0 ) {\n } \n\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public final void rulerel_op_greater_then() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:1157:2: ( ( '>' ) )\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:1158:1: ( '>' )\r\n {\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:1158:1: ( '>' )\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:1159:1: '>'\r\n {\r\n before(grammarAccess.getRel_op_greater_thenAccess().getGreaterThanSignKeyword()); \r\n match(input,24,FOLLOW_24_in_rulerel_op_greater_then2395); \r\n after(grammarAccess.getRel_op_greater_thenAccess().getGreaterThanSignKeyword()); \r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final Enumerator ruleRelationalOperator() throws RecognitionException {\n Enumerator current = null;\n\n setCurrentLookahead(); resetLookahead(); \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6766:6: ( ( ( '<' ) | ( '<=' ) | ( '>' ) | ( '>=' ) ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6767:1: ( ( '<' ) | ( '<=' ) | ( '>' ) | ( '>=' ) )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6767:1: ( ( '<' ) | ( '<=' ) | ( '>' ) | ( '>=' ) )\n int alt99=4;\n switch ( input.LA(1) ) {\n case 23:\n {\n alt99=1;\n }\n break;\n case 68:\n {\n alt99=2;\n }\n break;\n case 24:\n {\n alt99=3;\n }\n break;\n case 69:\n {\n alt99=4;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"6767:1: ( ( '<' ) | ( '<=' ) | ( '>' ) | ( '>=' ) )\", 99, 0, input);\n\n throw nvae;\n }\n\n switch (alt99) {\n case 1 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6767:2: ( '<' )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6767:2: ( '<' )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6767:4: '<'\n {\n match(input,23,FOLLOW_23_in_ruleRelationalOperator11830); \n\n current = grammarAccess.getRelationalOperatorAccess().getLessThanEnumLiteralDeclaration_0().getEnumLiteral().getInstance();\n createLeafNode(grammarAccess.getRelationalOperatorAccess().getLessThanEnumLiteralDeclaration_0(), null); \n \n\n }\n\n\n }\n break;\n case 2 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6773:6: ( '<=' )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6773:6: ( '<=' )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6773:8: '<='\n {\n match(input,68,FOLLOW_68_in_ruleRelationalOperator11845); \n\n current = grammarAccess.getRelationalOperatorAccess().getLessThanOrEqualToEnumLiteralDeclaration_1().getEnumLiteral().getInstance();\n createLeafNode(grammarAccess.getRelationalOperatorAccess().getLessThanOrEqualToEnumLiteralDeclaration_1(), null); \n \n\n }\n\n\n }\n break;\n case 3 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6779:6: ( '>' )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6779:6: ( '>' )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6779:8: '>'\n {\n match(input,24,FOLLOW_24_in_ruleRelationalOperator11860); \n\n current = grammarAccess.getRelationalOperatorAccess().getGreaterThanEnumLiteralDeclaration_2().getEnumLiteral().getInstance();\n createLeafNode(grammarAccess.getRelationalOperatorAccess().getGreaterThanEnumLiteralDeclaration_2(), null); \n \n\n }\n\n\n }\n break;\n case 4 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6785:6: ( '>=' )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6785:6: ( '>=' )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:6785:8: '>='\n {\n match(input,69,FOLLOW_69_in_ruleRelationalOperator11875); \n\n current = grammarAccess.getRelationalOperatorAccess().getGreaterThanOrEqualToEnumLiteralDeclaration_3().getEnumLiteral().getInstance();\n createLeafNode(grammarAccess.getRelationalOperatorAccess().getGreaterThanOrEqualToEnumLiteralDeclaration_3(), null); \n \n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "@Override\n\tpublic RestrictionResult andTrue2(VariableLess left) {\n\t\tRestrictionResult res = restrictInequality(left,lt);\n\t\tVariableLess less = (VariableLess) res.newConstraint;\t\t\n\t\treturn new RestrictionResult(new VariableInterval(gt,less),res.restrictionList);\n\t}", "DSL_Expression_Larger createDSL_Expression_Larger();", "protected void sequence_EGreaterThan(ISerializationContext context, EGreaterThan semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, RMPackage.Literals.EGREATER_THAN__VAL) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, RMPackage.Literals.EGREATER_THAN__VAL));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getEGreaterThanAccess().getValEAlphaNumericValueParserRuleCall_1_0(), semanticObject.getVal());\n\t\tfeeder.finish();\n\t}", "public final void less_condition_operator() throws RecognitionException {\n\t\ttry { dbg.enterRule(getGrammarFileName(), \"less_condition_operator\");\n\t\tif ( getRuleLevel()==0 ) {dbg.commence();}\n\t\tincRuleLevel();\n\t\tdbg.location(1206, 0);\n\n\t\ttry {\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:1207:5: ( GREATER | GREATER_OR_EQ | OPEQ | LESS | LESS_OR_EQ )\n\t\t\tdbg.enterAlt(1);\n\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:\n\t\t\t{\n\t\t\tdbg.location(1207,5);\n\t\t\tif ( (input.LA(1) >= GREATER && input.LA(1) <= GREATER_OR_EQ)||input.LA(1)==LESS||input.LA(1)==LESS_OR_EQ||input.LA(1)==OPEQ ) {\n\t\t\t\tinput.consume();\n\t\t\t\tstate.errorRecovery=false;\n\t\t\t\tstate.failed=false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (state.backtracking>0) {state.failed=true; return;}\n\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\tdbg.recognitionException(mse);\n\t\t\t\tthrow mse;\n\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\tdbg.location(1209, 4);\n\n\t\t}\n\t\tfinally {\n\t\t\tdbg.exitRule(getGrammarFileName(), \"less_condition_operator\");\n\t\t\tdecRuleLevel();\n\t\t\tif ( getRuleLevel()==0 ) {dbg.terminate();}\n\t\t}\n\n\t}", "@Test\n public void parseComparisonLT() {\n Node root = new Parser().parseExpression(new Scanner().scan(wrap(\"3 < 2\")));\n assertEquals(ExpressionNode, root.getNodeKind());\n assertEquals(ExpressionKind.OperatorExpression, root.getExpressionKind());\n assertEquals(TokenType.LT, root.getOperationAttribute());\n\n Node lhs = root.getChild(0);\n Node rhs = root.getChild(1);\n\n assertEquals(ExpressionNode, lhs.getNodeKind());\n assertEquals(ExpressionKind.ConstantExpression, lhs.getExpressionKind());\n assertEquals(TokenType.NUMBER, lhs.getOperationAttribute());\n assertEquals(3, lhs.getValue());\n\n assertEquals(ExpressionNode, rhs.getNodeKind());\n assertEquals(ExpressionKind.ConstantExpression, rhs.getExpressionKind());\n assertEquals(TokenType.NUMBER, rhs.getOperationAttribute());\n assertEquals(2, rhs.getValue());\n\n }", "public final void rule__OpCompare__Alternatives() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:2604:1: ( ( '>=' ) | ( ( rule__OpCompare__Group_1__0 ) ) | ( '>' ) | ( '<' ) )\r\n int alt10=4;\r\n switch ( input.LA(1) ) {\r\n case 25:\r\n {\r\n alt10=1;\r\n }\r\n break;\r\n case 27:\r\n {\r\n int LA10_2 = input.LA(2);\r\n\r\n if ( (LA10_2==EOF||(LA10_2>=RULE_ID && LA10_2<=RULE_STRING)||LA10_2==27||(LA10_2>=34 && LA10_2<=35)||LA10_2==40||(LA10_2>=45 && LA10_2<=50)||LA10_2==55||LA10_2==58||(LA10_2>=72 && LA10_2<=73)||(LA10_2>=76 && LA10_2<=77)||LA10_2==79||(LA10_2>=82 && LA10_2<=89)||LA10_2==91||LA10_2==99) ) {\r\n alt10=4;\r\n }\r\n else if ( (LA10_2==13) ) {\r\n alt10=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 10, 2, input);\r\n\r\n throw nvae;\r\n }\r\n }\r\n break;\r\n case 26:\r\n {\r\n alt10=3;\r\n }\r\n break;\r\n default:\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 10, 0, input);\r\n\r\n throw nvae;\r\n }\r\n\r\n switch (alt10) {\r\n case 1 :\r\n // InternalDroneScript.g:2605:2: ( '>=' )\r\n {\r\n // InternalDroneScript.g:2605:2: ( '>=' )\r\n // InternalDroneScript.g:2606:3: '>='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpCompareAccess().getGreaterThanSignEqualsSignKeyword_0()); \r\n }\r\n match(input,25,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpCompareAccess().getGreaterThanSignEqualsSignKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // InternalDroneScript.g:2611:2: ( ( rule__OpCompare__Group_1__0 ) )\r\n {\r\n // InternalDroneScript.g:2611:2: ( ( rule__OpCompare__Group_1__0 ) )\r\n // InternalDroneScript.g:2612:3: ( rule__OpCompare__Group_1__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpCompareAccess().getGroup_1()); \r\n }\r\n // InternalDroneScript.g:2613:3: ( rule__OpCompare__Group_1__0 )\r\n // InternalDroneScript.g:2613:4: rule__OpCompare__Group_1__0\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__OpCompare__Group_1__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpCompareAccess().getGroup_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // InternalDroneScript.g:2617:2: ( '>' )\r\n {\r\n // InternalDroneScript.g:2617:2: ( '>' )\r\n // InternalDroneScript.g:2618:3: '>'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpCompareAccess().getGreaterThanSignKeyword_2()); \r\n }\r\n match(input,26,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpCompareAccess().getGreaterThanSignKeyword_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 4 :\r\n // InternalDroneScript.g:2623:2: ( '<' )\r\n {\r\n // InternalDroneScript.g:2623:2: ( '<' )\r\n // InternalDroneScript.g:2624:3: '<'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpCompareAccess().getLessThanSignKeyword_3()); \r\n }\r\n match(input,27,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpCompareAccess().getLessThanSignKeyword_3()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__PredicateComparison__OpAlternatives_1_1_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2162:1: ( ( '>=' ) | ( '<=' ) | ( '>' ) | ( '<' ) )\n int alt4=4;\n switch ( input.LA(1) ) {\n case 15:\n {\n alt4=1;\n }\n break;\n case 16:\n {\n alt4=2;\n }\n break;\n case 17:\n {\n alt4=3;\n }\n break;\n case 18:\n {\n alt4=4;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 4, 0, input);\n\n throw nvae;\n }\n\n switch (alt4) {\n case 1 :\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2163:1: ( '>=' )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2163:1: ( '>=' )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2164:1: '>='\n {\n before(grammarAccess.getPredicateComparisonAccess().getOpGreaterThanSignEqualsSignKeyword_1_1_0_0()); \n match(input,15,FOLLOW_15_in_rule__PredicateComparison__OpAlternatives_1_1_04125); \n after(grammarAccess.getPredicateComparisonAccess().getOpGreaterThanSignEqualsSignKeyword_1_1_0_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2171:6: ( '<=' )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2171:6: ( '<=' )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2172:1: '<='\n {\n before(grammarAccess.getPredicateComparisonAccess().getOpLessThanSignEqualsSignKeyword_1_1_0_1()); \n match(input,16,FOLLOW_16_in_rule__PredicateComparison__OpAlternatives_1_1_04145); \n after(grammarAccess.getPredicateComparisonAccess().getOpLessThanSignEqualsSignKeyword_1_1_0_1()); \n\n }\n\n\n }\n break;\n case 3 :\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2179:6: ( '>' )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2179:6: ( '>' )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2180:1: '>'\n {\n before(grammarAccess.getPredicateComparisonAccess().getOpGreaterThanSignKeyword_1_1_0_2()); \n match(input,17,FOLLOW_17_in_rule__PredicateComparison__OpAlternatives_1_1_04165); \n after(grammarAccess.getPredicateComparisonAccess().getOpGreaterThanSignKeyword_1_1_0_2()); \n\n }\n\n\n }\n break;\n case 4 :\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2187:6: ( '<' )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2187:6: ( '<' )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2188:1: '<'\n {\n before(grammarAccess.getPredicateComparisonAccess().getOpLessThanSignKeyword_1_1_0_3()); \n match(input,18,FOLLOW_18_in_rule__PredicateComparison__OpAlternatives_1_1_04185); \n after(grammarAccess.getPredicateComparisonAccess().getOpLessThanSignKeyword_1_1_0_3()); \n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void mGREATERTHAN() throws RecognitionException {\n try {\n int _type = GREATERTHAN;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Users\\\\David\\\\workspace\\\\Virtual-Ecology-Workbench\\\\src\\\\VEW\\\\XMLCompiler\\\\ANTLR\\\\BACON.g:149:15: ( '>' )\n // C:\\\\Users\\\\David\\\\workspace\\\\Virtual-Ecology-Workbench\\\\src\\\\VEW\\\\XMLCompiler\\\\ANTLR\\\\BACON.g:149:17: '>'\n {\n match('>'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n \t// do for sure before leaving\n }\n }", "public final void rule__ComparisonOpExp__NameAlternatives_1_1_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:2238:1: ( ( '>' ) | ( '<' ) | ( '>=' ) | ( '<=' ) )\n int alt8=4;\n switch ( input.LA(1) ) {\n case 55:\n {\n alt8=1;\n }\n break;\n case 56:\n {\n alt8=2;\n }\n break;\n case 57:\n {\n alt8=3;\n }\n break;\n case 58:\n {\n alt8=4;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 8, 0, input);\n\n throw nvae;\n }\n\n switch (alt8) {\n case 1 :\n // InternalOCLlite.g:2239:2: ( '>' )\n {\n // InternalOCLlite.g:2239:2: ( '>' )\n // InternalOCLlite.g:2240:3: '>'\n {\n before(grammarAccess.getComparisonOpExpAccess().getNameGreaterThanSignKeyword_1_1_0_0()); \n match(input,55,FOLLOW_2); \n after(grammarAccess.getComparisonOpExpAccess().getNameGreaterThanSignKeyword_1_1_0_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // InternalOCLlite.g:2245:2: ( '<' )\n {\n // InternalOCLlite.g:2245:2: ( '<' )\n // InternalOCLlite.g:2246:3: '<'\n {\n before(grammarAccess.getComparisonOpExpAccess().getNameLessThanSignKeyword_1_1_0_1()); \n match(input,56,FOLLOW_2); \n after(grammarAccess.getComparisonOpExpAccess().getNameLessThanSignKeyword_1_1_0_1()); \n\n }\n\n\n }\n break;\n case 3 :\n // InternalOCLlite.g:2251:2: ( '>=' )\n {\n // InternalOCLlite.g:2251:2: ( '>=' )\n // InternalOCLlite.g:2252:3: '>='\n {\n before(grammarAccess.getComparisonOpExpAccess().getNameGreaterThanSignEqualsSignKeyword_1_1_0_2()); \n match(input,57,FOLLOW_2); \n after(grammarAccess.getComparisonOpExpAccess().getNameGreaterThanSignEqualsSignKeyword_1_1_0_2()); \n\n }\n\n\n }\n break;\n case 4 :\n // InternalOCLlite.g:2257:2: ( '<=' )\n {\n // InternalOCLlite.g:2257:2: ( '<=' )\n // InternalOCLlite.g:2258:3: '<='\n {\n before(grammarAccess.getComparisonOpExpAccess().getNameLessThanSignEqualsSignKeyword_1_1_0_3()); \n match(input,58,FOLLOW_2); \n after(grammarAccess.getComparisonOpExpAccess().getNameLessThanSignEqualsSignKeyword_1_1_0_3()); \n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private Term parseComparison(final boolean required) throws ParseException {\n Term t1 = parseBitwiseOr(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '<') {\n Term t2 = parseBitwiseOr(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.LtD(t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.LtI(t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.LtD(t1, t2);\n } else {\n reportTypeErrorN2(\"'<'\");\n }\n } else if (tt == '>') {\n Term t2 = parseBitwiseOr(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.GtD(t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.GtI(t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.GtD(t1, t2);\n } else {\n reportTypeErrorN2(\"'>'\");\n }\n } else if (isSpecial(\"==\")) {\n Term t2 = parseBitwiseOr(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.EqD(t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.EqI(t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.EqD(t1, t2);\n } else {\n reportTypeErrorN2(\"'=='\");\n }\n } else if (isSpecial(\"!=\")) {\n Term t2 = parseBitwiseOr(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.NEqD(t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.NEqI(t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.NEqD(t1, t2);\n } else {\n reportTypeErrorN2(\"'!='\");\n }\n } else if (isSpecial(\"<=\")) {\n Term t2 = parseBitwiseOr(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.LeD(t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.LeI(t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.LeD(t1, t2);\n } else {\n reportTypeErrorN2(\"'<='\");\n }\n } else if (isSpecial(\">=\")) {\n Term t2 = parseBitwiseOr(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.GeD(t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.GeI(t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.GeD(t1, t2);\n } else {\n reportTypeErrorN2(\"'>='\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public final void rulerel_op_Less_then() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:1097:2: ( ( '<' ) )\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:1098:1: ( '<' )\r\n {\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:1098:1: ( '<' )\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:1099:1: '<'\r\n {\r\n before(grammarAccess.getRel_op_Less_thenAccess().getLessThanSignKeyword()); \r\n match(input,22,FOLLOW_22_in_rulerel_op_Less_then2271); \r\n after(grammarAccess.getRel_op_Less_thenAccess().getLessThanSignKeyword()); \r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "LengthGreater createLengthGreater();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
string prepended_search_string = 2;
public com.google.protobuf.ByteString getPrependedSearchStringBytes() { java.lang.Object ref = prependedSearchString_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); prependedSearchString_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } }
[ "@java.lang.Override\n public java.lang.String getPrependedSearchString() {\n java.lang.Object ref = prependedSearchString_;\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 prependedSearchString_ = s;\n return s;\n }\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getPrependedSearchStringBytes() {\n java.lang.Object ref = prependedSearchString_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n prependedSearchString_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getPrependedSearchString() {\n java.lang.Object ref = prependedSearchString_;\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 prependedSearchString_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public Builder setPrependedSearchString(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n prependedSearchString_ = value;\n onChanged();\n return this;\n }", "private String removeBeginningAt(final String input,\n final String searchString) {\n final int i = input.indexOf(searchString);\n if (i != -1) {\n return input.substring(i + 1, input.length());\n }\n return input;\n }", "SimpleString getPrefix(SimpleString address);", "private static int getFirstIndex(String ql, String keyword){\nint index=ql.indexOf(keyword);\nint index2=ql.indexOf(keyword.toUpperCase());\nif (index<0||(index2>=0&&index>index2))\nindex=index2;\nreturn index;\n}", "int getStartSearch();", "int getPhraseMatchStart() ;", "public static void main(String[] args) {\n String testString = \"Hi, world!\";\n System.out.println(testString.startsWith(\"Hi\"));\n\n // part2\n String str1=\"Hi Techno Study,world Hello\";\n System.out.println(str1.startsWith(\"Hello\",9));\n\n int indexOfComma = str1.indexOf(',');\n System.out.println(indexOfComma);\n System.out.println(str1.startsWith(\"Hello\",indexOfComma + 1)); // start search after the comma\n\n }", "public int findfirstIndexofSubString (String input);", "private void findPrefix() {\r\n\t\t//\t<prefix> ::= <servername> | <nick> [ '!' <user> ] [ '@' <host> ]\r\n\t\t\r\n\t\tprefix = rawline.substring(1, rawline.indexOf(' '));\r\n\t\tindex += prefix.length() + 2;\r\n\t}", "String getFirstIndex();", "public abstract String getSuggestedPrefix();", "private String preProcess(String s) {\n if (s == null || s.length() == 0) return \"^$\";\n StringBuilder rvalue = new StringBuilder(\"^\");\n for (int i = 0; i < s.length(); i++)\n rvalue.append(\"#\").append(s.substring(i, i+1));\n rvalue.append(\"#$\");\n return rvalue.toString();\n }", "java.lang.String getFindStr();", "@WeelRawMethod(args = 2, returnsValue = true)\n public final static void strStartsWith(final WeelRuntime runtime)\n {\n final String v = runtime.popString();\n final String str = runtime.popString();\n runtime.load(str.startsWith(v));\n }", "public String getSearchString();", "IntegerFormula indexOf(StringFormula str, StringFormula part, IntegerFormula startIndex);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
General Sets whether to force selection of the single lowest bitrate audio and video tracks that comply with all other constraints.
public ParametersBuilder setForceLowestBitrate(boolean forceLowestBitrate) { this.forceLowestBitrate = forceLowestBitrate; return this; }
[ "public ParametersBuilder setForceHighestSupportedBitrate(boolean forceHighestSupportedBitrate) {\n this.forceHighestSupportedBitrate = forceHighestSupportedBitrate;\n return this;\n }", "public boolean hasMinbitrate() {\n return fieldSetFlags()[11];\n }", "public void setMinbitrate(java.lang.Integer value) {\n this.minbitrate = value;\n }", "T setAudioBitrate(Optional<Integer> val);", "public org.openrtb.common.api.Video.Builder setMinbitrate(java.lang.Integer value) {\n validate(fields()[11], value);\n this.minbitrate = value;\n fieldSetFlags()[11] = true;\n return this; \n }", "public ParametersBuilder setAllowAudioMixedSampleRateAdaptiveness(\n boolean allowAudioMixedSampleRateAdaptiveness) {\n this.allowAudioMixedSampleRateAdaptiveness = allowAudioMixedSampleRateAdaptiveness;\n return this;\n }", "public void setHightQuality(boolean q){\n mHQ=q;\n }", "public boolean isSetMaxSingleOrderVol() {\n return EncodingUtils.testBit(__isset_bitfield, __MAXSINGLEORDERVOL_ISSET_ID);\n }", "public boolean convertAudioTypeToDefault();", "T setAudioBitrate(int val);", "public static CodecOptions getDefaultOptions() {\n CodecOptions options = new CodecOptions();\n options.littleEndian = false;\n options.interleaved = false;\n options.lossless = true;\n return options;\n }", "void setNilSingleBetMinimum();", "public void setPreferredVideoDefinition(VideoDefinition vdef);", "public ParametersBuilder setAllowAudioMixedChannelCountAdaptiveness(\n boolean allowAudioMixedChannelCountAdaptiveness) {\n this.allowAudioMixedChannelCountAdaptiveness = allowAudioMixedChannelCountAdaptiveness;\n return this;\n }", "protected void setDefaultSettings() {\n\t\tint processors = Runtime.getRuntime().availableProcessors();\n\t\tint half = processors/2;\n\t\tif (half == 0) {\n\t\t\thalf = 1;\n\t\t}\n\t\tthis.numberOfFastQueueConsumers = half;\n\t\tthis.numberOfSlowQueueConsumers = processors;\n\t}", "public org.openrtb.common.api.Video.Builder clearMinbitrate() {\n minbitrate = null;\n fieldSetFlags()[11] = false;\n return this;\n }", "public void setQuality(float quality);", "void setPreferredVideoSizeByName(String name);", "void setDefaultPlayLength(int playLength);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the associativity of the branch target buffer used in the two bit branch predictor.
public int getTwoBitBranchPredictorBranchTargetBufferAssociativity() { return twoBitBranchPredictorBranchTargetBufferAssociativity; }
[ "public int getTwoLevelBranchPredictorBranchTargetBufferAssociativity() {\n return twoLevelBranchPredictorBranchTargetBufferAssociativity;\n }", "public int getCombinedBranchPredictorBranchTargetBufferAssociativity() {\n return combinedBranchPredictorBranchTargetBufferAssociativity;\n }", "public void setTwoLevelBranchPredictorBranchTargetBufferAssociativity(int twoLevelBranchPredictorBranchTargetBufferAssociativity) {\n this.twoLevelBranchPredictorBranchTargetBufferAssociativity = twoLevelBranchPredictorBranchTargetBufferAssociativity;\n }", "public void setTwoBitBranchPredictorBranchTargetBufferAssociativity(int twoBitBranchPredictorBranchTargetBufferAssociativity) {\n this.twoBitBranchPredictorBranchTargetBufferAssociativity = twoBitBranchPredictorBranchTargetBufferAssociativity;\n }", "public void setCombinedBranchPredictorBranchTargetBufferAssociativity(int combinedBranchPredictorBranchTargetBufferAssociativity) {\n this.combinedBranchPredictorBranchTargetBufferAssociativity = combinedBranchPredictorBranchTargetBufferAssociativity;\n }", "public int getL2Associativity() {\n return l2Associativity;\n }", "public int getassociativity()\n {\n \treturn storedassociativity;\n }", "public int getTlbAssociativity() {\n return tlbAssociativity;\n }", "private int getReductionOperator()\n {\n switch(token_.getType()) {\n case IToken.tPLUS:\n return PASTOMPPragma.OmpOpPlus;\n case IToken.tSTAR:\n return PASTOMPPragma.OmpOpMult;\n case IToken.tMINUS:\n return PASTOMPPragma.OmpOpMinus;\n case IToken.tAMPER:\n return PASTOMPPragma.OmpOpBAnd;\n case IToken.tXOR:\n return PASTOMPPragma.OmpOpBXor;\n case IToken.tBITOR:\n return PASTOMPPragma.OmpOpBOr;\n case IToken.tAND:\n return PASTOMPPragma.OmpOpLAnd;\n case IToken.tOR:\n return PASTOMPPragma.OmpOpLOr;\n default:\n return PASTOMPPragma.OmpOpUnknown;\n }\n }", "public int getCombinedBranchPredictorShiftWidth() {\n return combinedBranchPredictorShiftWidth;\n }", "public int getL1IAssociativity() {\n return l1IAssociativity;\n }", "public int getCombinedBranchPredictorBranchTargetBufferNumSets() {\n return combinedBranchPredictorBranchTargetBufferNumSets;\n }", "Object getBinaryOperatorValue (Object binaryOperatorKey, Object operand1, Object operand2);", "public int getTwoBitBranchPredictorBranchTargetBufferNumSets() {\n return twoBitBranchPredictorBranchTargetBufferNumSets;\n }", "int assocVal(String op) {\n if(Assoc.LEFT.equals(getAssociativity(op))) {\n return 1;\n }\n return 0;\n }", "public int getCombinedBranchPredictorBimodSize() {\n return combinedBranchPredictorBimodSize;\n }", "public int getPrecedence() {\n switch (operator) {\n case AND:\n return 2;\n case OR:\n default:\n return 1;\n }\n }", "public int getTwoBitBranchPredictorBimodSize() {\n return twoBitBranchPredictorBimodSize;\n }", "public int getOperandB();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retorna valor parametrico de reforma tributaria
public String getParamReformaTributaria() { return this.paramReformaTributaria; }
[ "public java.lang.String getValor3();", "public abstract java.lang.String getValor3();", "public abstract java.lang.String getValor4();", "public java.lang.String getValor2();", "public java.lang.String getValor4();", "Object getParameterValue(Parameter param);", "public abstract java.lang.String getValor2();", "String getValParam();", "public String getTribe() {\n\t\treturn tribeField.getText();\n\t}", "public void setParamReformaTributaria(String paramReformaTributaria)\n {\n this.paramReformaTributaria=paramReformaTributaria;\n }", "public java.lang.String getValor1();", "@Override\r\n public Object getResult()\r\n {\r\n float[][] transf = ScalarPanel.getTransformation( );\r\n \r\n if( transf == null || transf.length !=3)\r\n return new ErrorString(\"No Transformation has been selected\");\r\n \r\n String Result = gov.anl.ipns.Util.Sys.StringUtil.toString( transf ) ;\r\n ScriptUtil.display( \"Result=\"+ Result);\r\n \r\n Vector V = (Vector)Command.ScriptUtil.ToVec( transf);\r\n \r\n getResultParam().setValue( Result );\r\n \r\n for( int i=0; i< this.getNum_parameters( ); i++)\r\n ((IParameterGUI)getParameter(i)).setValidFlag( true );\r\n getResultParam().setValidFlag( true );\r\n \r\n return V;\r\n }", "public abstract java.lang.String getValor1();", "double getTtr1();", "public String getTribe() {\n \t\treturn tribe;\n \t}", "Object getParameterValue (Object parameter);", "public int getTriple() {\r\n //return miNum * 3;\r\n return getDoble() + getValor();\r\n }", "java.lang.String getParameterValue();", "godot.wire.Wire.Transform getTransformValue();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if and only if the entire search phrase matches at least one of the task name tokens exactly.
private static boolean searchWholeWord(String searchPhrase, String[] taskNameTokens) { for (String s : taskNameTokens) { if (searchPhrase.equals(s)) { return true; } } return false; }
[ "private static boolean searchSubstring(String searchPhrase, String[] taskNameTokens) {\n\t\tfor (String s : taskNameTokens) {\n\t\t\tif (s.contains(searchPhrase)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "@Override\n public boolean test(Person person) {\n return keywords.stream()\n .anyMatch(keyword -> (person.getAddress().value.toLowerCase().contains(keyword.toLowerCase())));\n }", "@Override\n public boolean run(ReadOnlyTask task) {\n return findKeyWords.stream()\n .filter(keyword -> (this.searchScope.contains(\"name\") && StringUtil.containsIgnoreCase(task.getName().fullName, keyword))\n || (this.searchScope.contains(\"information\") && StringUtil.containsIgnoreCase(task.getInformation().fullInformation, keyword))\n || (this.searchScope.contains(\"tag\") && task.getTags().containsStringAsTag(keyword))\n )\n .findAny()//finds first one\n .isPresent();//check if null\n }", "private boolean matchedKeyword(String keyword, String[] tokens) {\n\t\tfor (int i = 0; i < tokens.length; i++)\n\t\t\tif (keyword.equalsIgnoreCase(tokens[i]))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}", "private boolean searchForTask(Task task) {\n\n for (Task entry : taskList) {\n\n if (entry.equals(task)) {\n return true;\n }\n }\n\n return false;\n }", "private boolean containsOneOf( String str, String[] targets )\n {\n String[] words = str.split( \"\\\\s\" ); // \\\\s = [ \\\\t\\\\n\\\\x0B\\\\f\\\\r]\n boolean found = false;\n // check each word in str\n for( int i = 0; i < words.length; i++ )\n {\n // check each target word\n for( int j = 0; j < targets.length; j++ )\n if( words[i].equalsIgnoreCase( targets[j] ) )\n {\n found = true;\n break;\n }\n if( found )\n break;\n }\n return found;\n }", "private boolean containsInTaskName(String taskName, String taskClsName, String s) {\n assert taskName != null;\n assert taskClsName != null;\n\n if (taskName.equals(taskClsName)) {\n int idx = taskName.lastIndexOf('.');\n\n return ((idx >= 0) ? taskName.substring(idx + 1) : taskName).toLowerCase().contains(s);\n }\n\n return taskName.toLowerCase().contains(s);\n }", "@Test\n\tpublic void findTask_oneWordMatchMultipleTasks() {\n\t\tSet<String> stringsToFind = createSetOfStrings(\"Task\");\n\t\tFindTaskCommand command = new FindTaskCommand(stringsToFind);\n\t\tcommand.setData(taskList);\n\t\t\n\t\tassertTasksFound(command, 3);\n\t}", "boolean matches(String query) {\n String expr = String.format(\"(?i)%s.*\", query);\n\n return ticker.matches(expr)\n || name.matches(expr);\n }", "boolean containsAtLeastOneDfddKeyword( List<String> keywordsToCheck );", "@Test\n\tpublic void findTask_oneWordMatch() {\n\t\tSet<String> stringsToFind = createSetOfStrings(\"1\");\n\t\tFindTaskCommand command = new FindTaskCommand(stringsToFind);\n\t\tcommand.setData(taskList);\n\t\t\n\t\tassertTasksFound(command, 1);\n\t}", "@Test\n\tpublic void findTask_substringMatch() {\n\t\tSet<String> stringsToFind = createSetOfStrings(\"Ta\", \"as\", \"sk\", \"Tas\", \"ask\");\n\t\tFindTaskCommand command = new FindTaskCommand(stringsToFind);\n\t\tcommand.setData(taskList);\n\t\t\n\t\tassertTasksFound(command, 3);\n\t}", "public boolean isValidTaskTitle(List<Task> tmpTaskList, String tmpTaskName) {\n\t\tboolean taskFlag = false;\n\t\tif (tmpTaskList.size() >= 0) {\n\t\t\tIterator<Task> iterator = tmpTaskList.iterator();\n\t\t\tfor (; iterator.hasNext();) {\n\t\t\t\tif (iterator.next().getTaskTitle().equalsIgnoreCase(tmpTaskName)) {\n\t\t\t\t\ttaskFlag = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn taskFlag;\n\t}", "public void verifySearchByName(final EntPaymPlanTestData testData) {\n final String[] positiveName = testData.getValidSearchValue().split(\" \");\n final String[] negativeName = testData.getInvalidSearchValue().split(\" \");\n final Boolean result = positiveSearchFirstName(positiveName[0])\n && positiveSearchLastName(positiveName[1])\n && negativeSearchFirstName(negativeName[0])\n && negativeSearchLastName(negativeName[1])\n && typeInNotActiveName();\n Log.altVerify(true, result, \"Verify search is success done?\");\n }", "public boolean matches(TokenName name)\n\t{\n\t\tTokenId tk = FantomLexerTokens.getTokenByName(name);\n\t\tif (tk == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn tk.ordinal() == ordinal;\n\t}", "private boolean isIn(final String wordsList)\n {\n return wordsList.indexOf(\"|\" + token.toUpperCase() + \"|\") > -1;\n }", "private boolean isValidFreeTextSearchResult(String sFreeText, ArrayList<Post> oPosts){\n\t\tString[] oWords = sFreeText.split(\" \");\n\t\tfor(Post oPost : oPosts){\n\t\t\tfor(String sWord : oWords){\n\t\t\t\tif(!oPost.getTitle().toLowerCase().contains(sWord) && //\n\t\t\t\t !oPost.getBody().toLowerCase().contains(sWord)){\n\t\t\t\t\treturn false;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public abstract boolean containsToken(String token);", "public static boolean hasToken(String s) {\n\t\tboolean founded=false;\n\t\tfor(int i = 0 ; i < dataList.size() ; i ++ ) {\n\t\t\tif(dataList.get(i).name.equals(s)) {\n\t\t\t\t\n\t\t\t\tfounded = true;\n\t\t\t}\n\t\t}\n\t\treturn founded;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Flower1 fl[] = new Flower1[4]; fl[0] = new Flower1("Rose","red","basket", 45.95D); fl[1] = new Flower1("Lilis","purple","bouquet", 25.05); fl[2] = new Flower1("Daisy","white","bouquet", 15.25D); fl[3] = new Flower1("Tulip","orange","basket", 10.75D); System.out.println("Flower Type: " + flr.type); System.out.println("Flower Color: " + flr.color); System.out.println("Arrangement: " + flr.arrangement); System.out.printf("Price: %.2f", flr.unitPrice); System.out.println("Flower Type: " + fl[0].type);
public static void main(String[] args) { Flower1[] fl = { new Flower1("Rose","red","basket", 45.95D), new Flower1("Lilis","purple","bouquet", 25.05), new Flower1("Daisy","white","bouquet", 15.25D), new Flower1("Tulip","orange","basket", 10.75D) }; for (Flower1 a : fl) { System.out.println("\n Type: " + a.type + "\n Color: " + a.color +"\n Arrangement: " + a.arrangement + "\n Price: " + "$"+ a.unitPrice); } }
[ "public static void main(String[] args) {\n\n Addition lettuce = new Addition(1, \"Lettuce\");\n Addition tomato = new Addition(1, \"Tomato\");\n Addition carrot = new Addition(1, \"Carrot\");\n Addition mushroom = new Addition(1, \"Mushroom\");\n Addition onion = new Addition(1, \"Onion\");\n Addition bacon = new Addition(2, \"Bacon\");\n Addition cheese = new Addition(1, \"Cheese\");\n\n\n\n Burger baseBurger = new Burger(\"BaseBurger\", 10.00, \"regular\", \"beef\");\n baseBurger.addAddition(lettuce);\n baseBurger.addAddition(tomato);\n baseBurger.addAddition(carrot);\n baseBurger.addAddition(mushroom);\n baseBurger.addAddition(onion);\n System.out.println(baseBurger.getPrice());\n\n System.out.println(\"---------------------\");\n\n HealthyBurger healthyBurger = new HealthyBurger(15.00, \"organic beef\");\n healthyBurger.addAddition(lettuce);\n healthyBurger.addAddition(tomato);\n healthyBurger.addAddition(carrot);\n healthyBurger.addAddition(mushroom);\n healthyBurger.addAddition(onion);\n healthyBurger.addAddition(bacon);\n healthyBurger.addAddition(cheese);\n System.out.println(healthyBurger.getPrice());\n\n System.out.println(\"---------------------\");\n\n DeluxeHamburger deluxeHamburger = new DeluxeHamburger(14, \"whole wheet\", \"double beef\");\n deluxeHamburger.addAddition(tomato);\n System.out.println(deluxeHamburger.getPrice());\n\n }", "public static void main(String[] args) {\n\n Fish fish2 = new Fish(\"tom\",17, \"red\");\n System.out.println(fish2.getName());\n System.out.println(fish2.getAge()); \n System.out.println(fish2.getColor());\n\n }", "public static void main(String[] args) {\n Vehicule mesVehicule[] = new Vehicule[4];\n\n mesVehicule[0] = new Vehicule(\"12GB\", \"Ferrari\", \"A8\");\n mesVehicule[1] = new VehiculeTourisme(\"12GB\", \"Ferrari\", \"A8\", 5);\n mesVehicule[2] = new VehiculeDeportive(\"12GB\", \"Ferrari\", \"A8\", 1500);\n mesVehicule[3] = new VehiculeFourgonnette(\"12GB\", \"Ferrari\", \"A8\", 500);\n\n for (int i = 0; i < 4; i++) {\n System.out.println(mesVehicule[i].getDonner());\n\n }\n //Convertion type Upcasting\n Vehicule vehicule = new VehiculeTourisme(\"12GB\", \"Ferrari\", \"A8\", 5);\n System.out.println(vehicule);\n // Convertion type Downcasting\n VehiculeTourisme vehiculeTourisme = (VehiculeTourisme) vehicule;\n System.out.println(vehiculeTourisme);\n\n\n }", "public static void main(String[] args) {\n Food test1 = new Food(FoodType.POPCORN, 99.99, FoodSize.S);\n System.out.println(test1.getDescription());\n System.out.println(test1.getPrice());\n System.out.println(test1.getSize());\n }", "public static void main(String[] args) {\n\t\tFstDemo obj =new FstDemo();\r\n\t\r\n\tSystem.out.print(obj.num1+\" \"+obj.name+\" \"+obj.price+\" \"+obj.address);\r\n\t\r\n\t}", "public static void main(String [] args){\n Donut firstDonut = new Donut(); \r\n firstDonut.name = \"Nemo\"; \r\n firstDonut.donutType = \"Chocolate\"; \r\n firstDonut.size = \"Tiny\";\r\n System.out.println(\"Checking firstDonut percent\");\r\n System.out.println( firstDonut.getPercRemaining() ); \r\n \r\n \r\n // call simulate eating \r\n firstDonut.simulateEating(12);\r\n System.out.println( \"Percent Remaining of Donut \" +firstDonut.getPercRemaining());\r\n firstDonut.simulateEating(25);\r\n System.out.println(\"Percent Reamining of Donut \" +firstDonut.getPercRemaining());\r\n \r\n // accessing memeber variables on a Donut\r\n // objects we created \r\n \r\n System.out.println(\"FirstDonut's name: \" + firstDonut.name);\r\n \r\n Donut secondDonut = new Donut ();\r\n secondDonut.name = \"Dory\";\r\n secondDonut.donutType = \"Cinnamon Spice\";\r\n secondDonut.size = \"Jumbo\";\r\n System.out.println(\"SecondDonut's name: \" + secondDonut.name);\r\n \r\n \r\n printObject1Data(firstDonut);\r\n printObject1Data(secondDonut); \r\n \r\n }", "public static void main(String[] args) {\n\t\tX01_Coffee[] coffeeArray = new X01_Coffee[2];\t\t\t\t// array in our class // coffee array can hold [2]\r\n\t\t\r\n\t\t// create coffee object and assign to index\r\n\t\tcoffeeArray[0] = new X01_Coffee();\t\t\t\t\t\t// we are declearing new coffe index\r\n\t\t\r\n\t\t// access coffee object in index 0 and set data\r\n\t\tcoffeeArray[0].setCoffeInfo(\"EXPRESSO\", \"TALL\" , 2.55, 7);\r\n\t\t\r\n\t\t// access coffee object in index 0 and call method getCoffeeInfo\r\n\t\tcoffeeArray[0].getCoffeeInfo();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// create a single object first\r\n\t\tX01_Coffee latte = new X01_Coffee();\t\t\t\t\t\t\t// ust taraftaki gibi de olur, burasi gibi de. burasi daha cleare\r\n\t\t\r\n\t\t// assign data\r\n\t\tlatte.setCoffeInfo(\"CAFE LATTE\", \"GRANDE\", 3.85, 190);\r\n\t\t\r\n\t\t// assign the latte object to index 1 of the array\r\n\t\tcoffeeArray[1] = latte;\t\t\t\t\t\t\t\t\t// bu ve yukaridaki coffeeArray[0] atadigimiz isim\r\n\t\t\r\n\t\t// print data fro objec in index 1.\r\n\t\tcoffeeArray[1].getCoffeeInfo();\r\n\t\t\t\r\n\t}", "public static void main(String[] args)\n {\n ArrayList<RetailItem> items = new ArrayList<RetailItem>();\n for (int i = 0; i < 3; ++i)\n items.add(new RetailItem());\n\n // Populate the objects' fields with the given information\n items.get(0).setFields(\"Jacket\", 12, 59.95);\n items.get(1).setFields(\"Designer Jeans\", 40, 34.95);\n items.get(2).setFields(\"Shirt\", 20, 24.95);\n\n // Print the information held by each object\n for (int i = 0; i < items.size(); ++i)\n {\n System.out.println(\"Item \" + (i + 1) + ':');\n System.out.println(\" - Description: \" +\n items.get(i).getDescription());\n System.out.println(\" - Units on hand: \" +\n items.get(i).getUnitsOnHand());\n System.out.println(\" - Price: $\" +\n items.get(i).getPrice());\n }\n }", "public FlowerList() {\r\n flower = new Flower[INIT_SIZE];\r\n size = 0;\r\n }", "public static void main(String[] args){\n Fan fan1 = new Fan();\n fan1.setSpeed(10);\n fan1.setRadius(10);\n fan1.setColor(\"yellow\");\n fan1.setStatus(true);\n\n System.out.println(fan1.toString());\n\n //init and display fan2\n Fan fan2 = new Fan();\n fan2.setSpeed(5);\n fan2.setRadius(5);\n fan2.setColor(\"blue\");\n fan2.setStatus(false);\n\n System.out.println(fan2.toString());\n }", "public static void main(String[] args) {\n Food f1 = new Appetizer(\"Thai Soup\");\n //class Appetizer inside package c2 in package c1\n Food f2 = new Dessert(\"CheeseCake\");\n //class dessert inside package c3 in package c1\n Food f3= new Appetizer(\"Wontons\", 6);\n Food f4 = new Dessert(\"Ice Cream\", 150.0);\n f1.eat();\n f1.getPrice();\n f2.eat();\n f2.getPrice();\n f3.eat();\n f3.getPrice();\n f4.eat();\n f4.getPrice();\n Food f5= new Food();\n f5.eat();\n f5.getPrice();\n /*\n Class Appetizer has a method named void getQuantity() which prints the following for f3:\n We ordered 6 number of Wontons\n Here, 6 is the is the value of the instance variable named quantity(int) and Wontons is the name.\n Now, you have to print this by calling the method for f3. You can add a line here for this part.\n\n */\n f3.getQuantity(6);\n \n }", "public static void main(String[] args) {\n\t\tInvoice invoice1 = new Invoice(\"5641\", \"Wedge\", 4, 12.55);\r\n\t\tInvoice invoice2 = new Invoice(\"1234\", \"Golden Hammer\", 2, 56.99);\r\n\t\tInvoice invoice3 = new Invoice(\"0012\", \"Pick axe\", -5, 5.99);\r\n\t\tInvoice invoice4 = new Invoice(\"5000\", \"Apple\", -4, -2.99);\r\n\t\t\r\n\t\t// print out the information using printf and format it using %s%d%.2f\r\n\t\t// access each object and use .get to obtain the information that has been stored\r\n\t\t// and calculated in class Invoice\r\n\t\t\r\n\t\tSystem.out.printf(\"Part number: %s\\nDescription: %s\\nQuantity: %d\\nPrice: %.2f\\n\" +\r\n\t\t\t\t\"Invoice amount: %.2f\\n\", invoice1.getNumber(), invoice1.getDesc(),\r\n\t\t\t\tinvoice1.getQuantity(), invoice1.getPrice(), \r\n\t\t\t\tinvoice1.getInvoiceAmount(invoice1.getQuantity(), invoice1.getPrice()));\r\n\t\t\r\n\t\tSystem.out.printf(\"\\nPart number: %s\\nDescription: %s\\nQuantity: %d\\nPrice: %.2f\\n\" +\r\n\t\t\t\t\"Invoice amount: %.2f\\n\", invoice2.getNumber(), invoice2.getDesc(),\r\n\t\t\t\tinvoice2.getQuantity(), invoice2.getPrice(), \r\n\t\t\t\tinvoice2.getInvoiceAmount(invoice2.getQuantity(), invoice2.getPrice()));\r\n\t\t\r\n\t\tSystem.out.printf(\"\\nPart number: %s\\nDescription: %s\\nQuantity: %d\\nPrice: %.2f\\n\" +\r\n\t\t\t\t\"Invoice amount: %.2f\\n\", invoice3.getNumber(), invoice3.getDesc(),\r\n\t\t\t\tinvoice3.getQuantity(), invoice3.getPrice(), \r\n\t\t\t\tinvoice3.getInvoiceAmount(invoice3.getQuantity(), invoice3.getPrice()));\r\n\t\t\r\n\t\tSystem.out.printf(\"\\nPart number: %s\\nDescription: %s\\nQuantity: %d\\nPrice: %.2f\\n\" +\r\n\t\t\t\t\"Invoice amount: %.2f\\n\", invoice4.getNumber(), invoice4.getDesc(),\r\n\t\t\t\tinvoice4.getQuantity(), invoice4.getPrice(), \r\n\t\t\t\tinvoice4.getInvoiceAmount(invoice4.getQuantity(), invoice4.getPrice()));\r\n\r\n\t}", "@Override\n public String toString() {\n\tStringBuilder sb = new StringBuilder(\"\");\n\tsb.append(\"Das floatArray mit einer Größe von \" + laengeArray + \":\" + \"\\n\");\n\tfor (int i = 0; i < laengeArray; i++) {\n\t sb.append(i + \": \" + floatArray[i] + \"\\n\");\n\t}\n\treturn sb.toString();\n }", "public static void main(String args[]){\n\t\t\r\n\t\tBicycle bike1 = new Bicycle();\r\n\t\tbike1.setSpeed(10);\r\n\t\t\r\n\t\t\r\n\t\t//Create object name bike2 of MountainBike class with\r\n\t\t//speed = 20 and seatHeight = 5\r\n\t\t\r\n\t\tBicycle bike2 = new Bicycle();\r\n\t\tbike2.setSpeed(20);\r\n\t\tMountainBike mbike2 = new MountainBike(5,10);\r\n\t\t//mbike2. 'seatHeight' = 5;\r\n\t\t\r\n\t\t//mbike2.setSpeed(5);\r\n\t\t//Create array of 2 Bike objects and assign above\r\n\t\t//bike1 and bike2 to its 0th and 1st element\r\nSystem.out.println(mbike2.getSpeed());\r\nSystem.out.println(mbike2.getSeatHeight());\r\n}", "public static void main(String [] args){\n ArrayOfObjects[] arrayOfClass = new ArrayOfObjects[10];\n for(int i = 0; i < 10; i++){\n arrayOfClass[0] = new ArrayOfObjects(\"Sample test - \" + (i + 1));\n }\n }", "public FishTankArray(int fishCount)\n {\n this.fish = new Fish[fishCount];\n for (int i=0; i<fishCount; i++) {\n this.fish[i] = new Fish(\"ORANGE\", 10, 0, 0);\n }\n }", "public static void main(String args[]) {\n for (PizzaFactory.PizzaType pizzaType : PizzaFactory.PizzaType.values()) {\n System.out.println(\"Price of \" + pizzaType + \" is \" + PizzaFactory.createPizza(pizzaType).getPrice());\n }\n }", "public static void printFlights(){\n \n AirPlane ap1 = new AirPlane(\"Boeing\", 505, 400);\n AirPlane ap2 = new AirPlane(\"Boeing\", 968, 400);\n AirPlane ap3 = new AirPlane(\"Boeing\", 756, 400);\n \n Pilot p1 = new Pilot(\"Fernando\", \"Tenorio\", \"aaa@aaaa\", ap1);\n Pilot p2 = new Pilot(\"Diana\", \"Agatha\", \"vvvv@aaaa\", ap2);\n Pilot p3 = new Pilot(\"Iago\", \"Freitas\", \"iii@aaaa\", ap3);\n \n Flight f1 = new Flight(\"Brazil\", \"Dublin\", new Date(2018,01,12), \"#55\", p1);\n Flight f2 = new Flight(\"Madrid\", \"China\", new Date(2018,02,12), \"#552\", p2);\n Flight f3 = new Flight(\"London\", \"Sao Paulo\", new Date(2018,02,12), \"#123\", p3);\n Flight f4 = new Flight(\"Lisbon\", \"Rio de Janeiro\", new Date(2018,10,12), \"#2312\", p1);\n Flight f5 = new Flight(\"Paris\", \"Toronto\", new Date(2018,11,12), \"#12312\", p2);\n \n ArrayList<Flight> flights = new ArrayList<>();\n flights.add(f1);\n flights.add(f2);\n flights.add(f3);\n flights.add(f4);\n flights.add(f5);\n \n System.out.println(\"Type Flights to See Full list of flights.\");\n \n Scanner sn = new Scanner(System.in);\n \n while(flights.add(f5) == sn.hasNextInt()){\n System.out.println(flights.add(f2));\n \n } \n for (int i = 0; i<flights.size();i++){\n flights.get(i).schedule(2.00, 8.00);\n flights.get(i).schedule(2.15); \n System.out.println(flights.get(i));\n } \n \n }", "public static void basicBurger(){\n Burger basicBurger = new Burger(\"multi-grain\",\"chicken\");\n System.out.println(basicBurger.getBurgerName());\n System.out.println(\"basic burger price is : \" + basicBurger.getBurgerPrice());\n System.out.println();\n\n basicBurger.getTrackAdditions().getCucumberPrice();\n basicBurger.addFoodItem(\"cucumber\",2);\n System.out.println(\"total price of bill is \" + basicBurger.getTotalBill());\n System.out.println();\n\n basicBurger.getTrackAdditions().getLettucePrice();\n basicBurger.addFoodItem(\"lettuce\",1);\n System.out.println(\"total price of bill is \" + basicBurger.getTotalBill());\n System.out.println();\n\n basicBurger.getTrackAdditions().getOlivesPrice();\n basicBurger.addFoodItem(\"olives\",1);\n System.out.println(\"total price of bill is \" + basicBurger.getTotalBill());\n System.out.println();\n\n basicBurger.getTrackAdditions().getTomatoPrice();\n basicBurger.addFoodItem(\"tomato\",1);\n System.out.println(\"total price of bill is \" + basicBurger.getTotalBill());\n System.out.println();\n System.out.println(\"###################################\");\n // normal burger class //\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get value for careerpath_desc
public String getCareerpath_desc() { return (String) get("careerpath_desc"); }
[ "public String getCareerpath_id() {\r\n return (String) get(\"careerpath_id\");\r\n }", "public String getPath()\n\t{\n\t\treturn f_pathField.getText();\n\t}", "public final String getPathDescription()\n {\n if (tryGetHost() == null)\n {\n return getCanonicalPath();\n } else\n {\n if (tryGetRsyncModule() == null)\n {\n return tryGetHost() + HOST_FILE_SEP + getPath();\n } else\n {\n return tryGetHost() + HOST_FILE_SEP + tryGetRsyncModule() + HOST_FILE_SEP\n + getPath();\n }\n }\n }", "@Override\n\tpublic java.lang.String getMolecularPathologicDescription() {\n\t\treturn _pathologyData.getMolecularPathologicDescription();\n\t}", "private static final String PATH() {\n return PropertiesUtil.getContextProperty(\"path\");\n }", "@Override\n public String getDescription() {\n StringBuilder builder = new StringBuilder(\"class path resource [\");\n String pathToUse = this.path;\n if (this.clazz != null && !pathToUse.startsWith(\"/\")) {\n builder.append(ClassUtils.classPackageAsResourcePath(this.clazz));\n builder.append('/');\n }\n if (pathToUse.startsWith(\"/\")) {\n pathToUse = pathToUse.substring(1);\n }\n builder.append(pathToUse);\n builder.append(']');\n return builder.toString();\n }", "private String getLocationPathFieldValue() {\n return mLocationPathField == null ? \"\" : mLocationPathField.getText().trim();\n }", "public final String getAdditionalInformationPath() {\n\t\t// Generate path.\n\t\tString language = Configuration.getInstance().getLanguageCode();\n\t\tString path = \"/\" + this.getId() + \"/\" + language + \"/\" + \"additional_information.html\"; \n\t\treturn path;\n\t}", "String getAboutDetailsResourcePath();", "public String getFinalPath()\n {\n return finalPathField.getText();\n }", "java.lang.String getDesc();", "public String getPathInfo() {\n return pathInfo;\n }", "public java.lang.String getDesc()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DESC$22);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public String getLocationDesc() {\n return (String)getAttributeInternal(LOCATIONDESC);\n }", "public java.lang.String getDesc()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DESC$10);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public String getLabel() {\n return pathName != null ? pathName : \"\";\n }", "public String getTermPath() {\r\n return (String) getAttributeInternal(TERMPATH);\r\n }", "public static Object getPathValue(String key) {\n Object object = pathParamMap.get(key);\n if(null == object)\n return \"\";\n return object;\n }", "public String getCdDescTxt()\n {\n return cdDescTxt;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
^ means XOR toggleLeft = shift to the left
public void toggleLeft() { barType = barType ^ LEFT; }
[ "public void moveShiftLeft();", "public static BinaryExpression leftShift(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "void shiftLeftS(){\n Color sign = getPoint(122);\n shiftLeft();\n setPoint(122, sign);\n }", "BitvectorFormula shiftLeft(BitvectorFormula number, BitvectorFormula toShift);", "public static BinaryExpression leftShift(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public static void swipe_Tow_Integers_Using_Logical_Operator_XOR(int x,int y){\n// x =5 = 0101 ,y = 7 = 0111\n x= x^y;\n// 0101\n// 0111\n// x=5^7= 0010\n y= x^y;\n// 0010\n// 0111\n// y=2^7=0101=5\n x= x^y;\n// 0010\n// 0101\n// x=2^5=0111=7\n System.out.println(\"Using logical operator XOR : \"+\"x= \"+x+\" , \"+\" y= \"+y);\n }", "public final void mSHIFT_LEFT() throws RecognitionException {\n try {\n int _type = SHIFT_LEFT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:81:12: ( '<<' )\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:81:14: '<<'\n {\n match(\"<<\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public final void mXOR() throws RecognitionException {\n try {\n int _type = XOR;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:87:5: ( '^' )\n // src/main/java/pl/ncdc/differentia/antlr/Java.g:87:7: '^'\n {\n match('^'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "private void invertS() {\r\n isShiftDown = !isShiftDown;\r\n terminal.setIsShiftDown(isShiftDown);\r\n }", "public static BinaryExpression leftShiftAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public TribitByte shiftLeft(int shift){\n return shiftRight(-shift);\n }", "public void shiftLeft() {\n int currentPointer = this.registerPointer;\n\n if (currentPointer == 0)\n this.registerPointer = this.registerCapacity - 1;\n else\n this.registerPointer -= 1;\n }", "public final void mSHIFT_LEFT() throws RecognitionException {\n try {\n int _type = SHIFT_LEFT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:65:12: ( '<<' )\n // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:65:14: '<<'\n {\n match(\"<<\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "private void shiftLow(){\n\t\tleftShifter.set(DoubleSolenoid.Value.kReverse);\n\t\trightShifter.set(DoubleSolenoid.Value.kReverse);\n\t}", "protected void strafeLeft(){\n\t\tqcmd( Direction.LEFT);\n\t\tqcmd( Direction.FORWARD);\n\t\tqcmd( Direction.RIGHT);\n\t}", "protected void reverseLeft(){\n\t\tqcmd( Direction.BACK);\n\t\tqcmd( Direction.RIGHT);\n\t\tqcmd( Direction.BACK);\n\t}", "public static BinaryExpression leftShiftAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public static BinaryExpression leftShiftAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) { throw Extensions.todo(); }", "@Nonnull\n\tstatic LLogicalBinaryOperator xor() {\n\t\treturn Boolean::logicalXor;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Additional Operation > Count the amount of leaf nodes of myBinaryTree: my_leaf_count
public int my_leaf_count();
[ "public int leafCount(){ \n\treturn leafCount(root);\n}", "protected int leafCount(ASTRoot tree) {\n // create traverser using mill\n TreesTraverser traverser = TreesMill.traverser();\n LeafCounter counter = new LeafCounter();\n traverser.add4Trees(counter);\n \n // compute\n tree.accept(traverser);\n return counter.getCount();\n }", "public int countLeaves(){\n return countLeaves(root);\n }", "int getNo_of_trees();", "protected int numOfLeafNodes(PredictionNode root) {\n \n int numSoFar = 0;\n if (root.getChildren().size() > 0) {\n for (Enumeration e = root.children(); e.hasMoreElements(); ) {\n\tSplitter split = (Splitter) e.nextElement();\n\tfor (int i=0; i<split.getNumOfBranches(); i++)\n\t numSoFar += numOfLeafNodes(split.getChildForBranch(i));\n }\n } else numSoFar = 1;\n return numSoFar;\n }", "public int treeNodeCount()\r\n\t{\r\n\t\treturn nodeCount(root);\r\n\t}", "public int num_nontrivial_leaves(){return num_nontrivial_leaves(null);}", "private int countNodes(mbynum_TreeNode<T> tree)\n {\n if (tree == null)\n return 0;\n else\n return countNodes(tree.leftNode) +\n countNodes(tree.rightNode) + 1;\n }", "public int countNodes() {\r\n \r\n // call the private countNodes method with root\r\n return countNodes(root);\r\n }", "private int nodeCount(BinaryTreeNode p)\r\n\t{\r\n\t\tSystem.out.println(\"See Programming Exercise 1.\");\r\n\t\treturn 0;\r\n\t}", "public int countNodes(){\r\n \treturn count(root);\r\n }", "public int nodeCount( ) //main calls this\n {\n if( isEmpty( ) )\n return 0;\n return nodeCount( root );\n }", "public static int getTreeCount() {\n return XMLMapReader.getTrees().getChildren(\"tree\").size();\n }", "public int countLeaves() {\n \treturn numberOfLeaves;\n }", "private int leavesCount(BinaryTreeNode p)\r\n\t{\r\n\t\tSystem.out.println(\"See Programming Exercise 2.\");\r\n\t\treturn 0;\r\n\t}", "public int my_node_count();", "public int getTreeCount()\n\t{\n\t\treturn treeCount;\n\t}", "int getNodeCount();", "public int treeLeavesCount()\r\n\t{\r\n\t\treturn leavesCount(root);\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the EClass eStaticClass() method test.
@Test public void testEStaticClass_1() throws Exception { ModelElementImpl fixture = ModelElementImplFactory.createModelElementImpl(); EClass result = fixture.eStaticClass(); assertNotNull(result); assertEquals(false, result.isInterface()); assertEquals(false, result.isAbstract()); assertEquals(6, result.getFeatureCount()); assertEquals(0, result.getOperationCount()); assertEquals(null, result.getEIDAttribute()); assertEquals(null, result.getDefaultValue()); assertEquals("net.certware.argument.arm.Annotation", result.getInstanceClassName()); assertEquals(6, result.getClassifierID()); assertEquals("net.certware.argument.arm.Annotation", result.getInstanceTypeName()); assertEquals("Annotation", result.getName()); assertEquals(false, result.eIsProxy()); assertEquals(true, result.eDeliver()); }
[ "public static void main(String[] args) {\n\n\t StaticTest firstInstance = new StaticTest(\"1st Instance\");\n System.out.println(firstInstance.getName() + \" is instance number \" + StaticTest.getNumInstances());\n\n StaticTest secondInstance = new StaticTest(\"2nd Instance\");\n System.out.println(secondInstance.getName() + \" is instance number \" + StaticTest.getNumInstances());\n\n //All .getNumInstance method calls return the correct value because the member variable is static.\n StaticTest thirdInstance = new StaticTest(\"3rd Instance\");\n System.out.println(thirdInstance.getName() + \" is instance number \" + StaticTest.getNumInstances());\n\n\n //Static methods cannot call from non static fields or methods, because they do not\n //exist when the method is called.\n int answer = multiply(6);\n System.out.println(\"The answer is \" + answer);\n System.out.println(\"Multiplier is \" + multiplier);\n }", "EClassUtil get_eClassUtil();", "public static void staticExample() {\n\t\tSystem.out.println(\"I am the static method from the child class\");\n\t}", "public static void main(String[] args) {\n new TestBuilder(). iAmStaticMethod();\n }", "public static void main(String[] args){\n System.out.println(\"Hi!\");\n //call constructors from loaded classes:\n Ex23 e = new Ex23();\n //call to static field loads & initialization classes\n System.out.println(C.a);\n //call to constructor loads D:\n D d = new D();\n\n }", "@Test\n public void test01()\n {\n MetaClass.forClass(Class, reflectorFactory)\n }", "void testClassStart(Class<?> testClass, String browserType, String testNameAppendix);", "@Test\n public void testVisitClass() {\n ApplicationWriter aw = new ApplicationWriter();\n aw.visitClass(0, \"class\", null, null, null);\n }", "@Test\r\n public void testRegisteredForClass() {\r\n this.admin.createClass(\"class1\", 2017, \"Instructor1\", 15);\r\n this.student.registerForClass(\"student1\", \"class1\", 2017);\r\n assertTrue(this.student.isRegisteredFor(\"student1\", \"class1\", 2017));\r\n }", "public static void main(String[] args) {\n OuterClass outerClass = new OuterClass();\n InnerClass innerClass = outerClass.new InnerClass();\n StaticInnerClass staticInnerClass = new StaticInnerClass();\n }", "@Test\r\n public void testStartProgram() {\r\n ErrorView.display(this.getClass().getName(),\"startProgram\");\r\n StartProgram instance = new StartProgram();\r\n //instance.startProgram();\r\n \r\n }", "@Test\n public void testAllInstances() throws IOException {\n assertSelfInstantiate(\"allInstances\", MAIN_RULE, \"typeSelectTest\", null);\n }", "public void testCrearInstancia_Class() {\n System.out.println(\"crearInstancia\");\n Class<?> objClase = null;\n Object expResult = null;\n Object result = UtilAnalizador.crearInstancia(objClase);\n assertEquals(expResult, result);\n }", "@Test\r\n public void testTestReturnStaticValue() {\r\n System.out.println(\"testReturnStaticValue\");\r\n WordsReversTest instance = new WordsReversTest();\r\n instance.testReturnStaticValue();\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void classInstantiated() {\n assertNotNull(displayWorld);\n }", "public void testJavaClassRepository874() throws Exception {\n\t\tJavaClassRepository var2730 = new JavaClassRepository();\n\t\tvar2730.getClass(Gadget.class.getCanonicalName());\n\t\tvar2730.getClass(LoDStaticCall.class.getCanonicalName());\n\t}", "public static void staticMethodThree(){\n ClassOne.staticMethodOne();\n }", "@Test\n public void testGetClassIndex() {\n }", "@Test\n public void classInstantiated() {\n assertNotNull(radar);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the tags for a shoppingCartConnection. Get all existing shoppingCartConnection tags.
@Test public void getShoppingCartConnectionTagsTest() throws ApiException { Integer shoppingCartConnectionId = null; api.getShoppingCartConnectionTags(shoppingCartConnectionId); // TODO: test validations }
[ "List<NewsTag> getAllTags();", "List<Tag> getTags();", "List<Tag> getTagList();", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedIterable<DeviceTag> getAllDeviceTags() {\n return this.serviceClient.getAllDeviceTags();\n }", "java.util.List<SteammessagesEconSteamclient.CEconItem_Tag> \n getTagsList();", "public List<TagEntity> getTags();", "public Object getTags() {\n return this.tags;\n }", "ITag[] getAllTags();", "public List<Tag> getTagList(Account account){\n return getAccountDetailUC.getTagList(account);\n }", "public static Content_tag[] getContent_tags() {\n\t\tGetMethod get = new GetMethod(Constants.SELECT_ALL_CONTENT_TAG_OPERATION);\n\t\tContent_tagCollection collection = new Content_tagCollection();\n\n\t\tHttpClient httpClient = new HttpClient();\n\t\ttry {\n\t\t\tint result = httpClient.executeMethod(get);\n\t\t\tSystem.out.println(Constants.RESPONSE_STATUS_CODE + result);\n\t\t\tcollection =\n\t\t\t\t\tMarshal.unmarshal(Content_tagCollection.class, get.getResponseBodyAsStream());\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tget.releaseConnection();\n\n\t\t}\n\t\tif (null != collection.getContentTags() && collection.getContentTags().length > 0) {\n\t\t\treturn collection.getContentTags();\n\t\t} else {\n\t\t\tSystem.out.println(\"unmarshalling returned empty collection\");\n\t\t}\n\t\treturn null;\n\t}", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedIterable<DeviceTag> getAllDeviceTags(Context context) {\n return this.serviceClient.getAllDeviceTags(context);\n }", "public static void getOppoTags() {\n cn.leancloud.oppo.LCMixPushManager.getOppoTags();\n }", "public ObservableList<Tag> getAllTags() {\n\t\treturn this.allTags;\n\t}", "public List getTags();", "@Test\n public void addShoppingCartConnectionTagTest() throws ApiException {\n Integer shoppingCartConnectionId = null;\n String shoppingCartConnectionTag = null;\n api.addShoppingCartConnectionTag(shoppingCartConnectionId, shoppingCartConnectionTag);\n\n // TODO: test validations\n }", "public List<Tag> getTags() {\n return fullPhoto.getTags();\n }", "public String getTags() {\n return tags;\n }", "private ArrayList<Tag> privateGetTagsByBookId(Connection connection, int id) {\n ArrayList<Tag> tags = new ArrayList<>();\n try {\n String query = \"SELECT tag.name FROM Tag JOIN Book_tag_mapping ON \"\n + \"Tag.id = Book_tag_mapping.tag_id WHERE book_id = (?)\";\n PreparedStatement p = connection\n .prepareStatement(query);\n p.setInt(first, id);\n ResultSet rs = p.executeQuery();\n while (rs.next()) {\n tags.add(new Tag(rs.getString(\"name\")));\n }\n } catch (SQLException e) {\n //System.err.println(e.getMessage());\n }\n return tags;\n }", "public TagCloudModel getTags() {\r\n return tags;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "object" $ANTLR start "return_sentence" src\\calculator.g:441:1: return_sentence[int tab] returns [String value] : ( expr_value[$tab] |);
public final String return_sentence(int tab) throws RecognitionException { String value = null; String expr_value91 =null; value = null; try { // src\\calculator.g:445:2: ( expr_value[$tab] |) int alt27=2; int LA27_0 = input.LA(1); if ( (LA27_0==CHAR||(LA27_0 >= ID && LA27_0 <= INT)||LA27_0==9||LA27_0==17||LA27_0==25) ) { alt27=1; } else if ( (LA27_0==32) ) { alt27=2; } else { NoViableAltException nvae = new NoViableAltException("", 27, 0, input); throw nvae; } switch (alt27) { case 1 : // src\\calculator.g:445:4: expr_value[$tab] { pushFollow(FOLLOW_expr_value_in_return_sentence1710); expr_value91=expr_value(tab); state._fsp--; value = expr_value91; } break; case 2 : // src\\calculator.g:447:4: { value = ""; } break; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { // do for sure before leaving } return value; }
[ "Expression getActionSentence();", "private ReturnStmt returnStmt() {\n Expr myExpr = null;\n \n lexer.nextToken();\n \n if (isFunction) myExpr = expr();\n \n return new ReturnStmt(myExpr); \n }", "public final ANTLRv3Parser.rule_return rule() throws RecognitionException {\r\n rule_stack.push(new rule_scope());\r\n ANTLRv3Parser.rule_return retval = new ANTLRv3Parser.rule_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token modifier=null;\r\n Token arg=null;\r\n Token rt=null;\r\n Token DOC_COMMENT39=null;\r\n Token string_literal40=null;\r\n Token string_literal41=null;\r\n Token string_literal42=null;\r\n Token string_literal43=null;\r\n Token char_literal45=null;\r\n Token string_literal46=null;\r\n Token char_literal51=null;\r\n Token char_literal53=null;\r\n ANTLRv3Parser.id_return id44 =null;\r\n\r\n ANTLRv3Parser.throwsSpec_return throwsSpec47 =null;\r\n\r\n ANTLRv3Parser.optionsSpec_return optionsSpec48 =null;\r\n\r\n ANTLRv3Parser.ruleScopeSpec_return ruleScopeSpec49 =null;\r\n\r\n ANTLRv3Parser.ruleAction_return ruleAction50 =null;\r\n\r\n ANTLRv3Parser.altList_return altList52 =null;\r\n\r\n ANTLRv3Parser.exceptionGroup_return exceptionGroup54 =null;\r\n\r\n\r\n CommonTree modifier_tree=null;\r\n CommonTree arg_tree=null;\r\n CommonTree rt_tree=null;\r\n CommonTree DOC_COMMENT39_tree=null;\r\n CommonTree string_literal40_tree=null;\r\n CommonTree string_literal41_tree=null;\r\n CommonTree string_literal42_tree=null;\r\n CommonTree string_literal43_tree=null;\r\n CommonTree char_literal45_tree=null;\r\n CommonTree string_literal46_tree=null;\r\n CommonTree char_literal51_tree=null;\r\n CommonTree char_literal53_tree=null;\r\n RewriteRuleTokenStream stream_DOC_COMMENT=new RewriteRuleTokenStream(adaptor,\"token DOC_COMMENT\");\r\n RewriteRuleTokenStream stream_RET=new RewriteRuleTokenStream(adaptor,\"token RET\");\r\n RewriteRuleTokenStream stream_BANG=new RewriteRuleTokenStream(adaptor,\"token BANG\");\r\n RewriteRuleTokenStream stream_FRAGMENT=new RewriteRuleTokenStream(adaptor,\"token FRAGMENT\");\r\n RewriteRuleTokenStream stream_86=new RewriteRuleTokenStream(adaptor,\"token 86\");\r\n RewriteRuleTokenStream stream_87=new RewriteRuleTokenStream(adaptor,\"token 87\");\r\n RewriteRuleTokenStream stream_74=new RewriteRuleTokenStream(adaptor,\"token 74\");\r\n RewriteRuleTokenStream stream_88=new RewriteRuleTokenStream(adaptor,\"token 88\");\r\n RewriteRuleTokenStream stream_ARG_ACTION=new RewriteRuleTokenStream(adaptor,\"token ARG_ACTION\");\r\n RewriteRuleTokenStream stream_76=new RewriteRuleTokenStream(adaptor,\"token 76\");\r\n RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,\"rule id\");\r\n RewriteRuleSubtreeStream stream_exceptionGroup=new RewriteRuleSubtreeStream(adaptor,\"rule exceptionGroup\");\r\n RewriteRuleSubtreeStream stream_throwsSpec=new RewriteRuleSubtreeStream(adaptor,\"rule throwsSpec\");\r\n RewriteRuleSubtreeStream stream_ruleScopeSpec=new RewriteRuleSubtreeStream(adaptor,\"rule ruleScopeSpec\");\r\n RewriteRuleSubtreeStream stream_optionsSpec=new RewriteRuleSubtreeStream(adaptor,\"rule optionsSpec\");\r\n RewriteRuleSubtreeStream stream_altList=new RewriteRuleSubtreeStream(adaptor,\"rule altList\");\r\n RewriteRuleSubtreeStream stream_ruleAction=new RewriteRuleSubtreeStream(adaptor,\"rule ruleAction\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:157:2: ( ( DOC_COMMENT )? (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )? id ( '!' )? (arg= ARG_ACTION )? ( 'returns' rt= ARG_ACTION )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* ':' altList ';' ( exceptionGroup )? -> ^( RULE id ( ^( ARG[$arg] $arg) )? ( ^( 'returns' $rt) )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR[\\\"EOR\\\"] ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:157:4: ( DOC_COMMENT )? (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )? id ( '!' )? (arg= ARG_ACTION )? ( 'returns' rt= ARG_ACTION )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* ':' altList ';' ( exceptionGroup )?\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:157:4: ( DOC_COMMENT )?\r\n int alt15=2;\r\n int LA15_0 = input.LA(1);\r\n\r\n if ( (LA15_0==DOC_COMMENT) ) {\r\n alt15=1;\r\n }\r\n switch (alt15) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:157:4: DOC_COMMENT\r\n {\r\n DOC_COMMENT39=(Token)match(input,DOC_COMMENT,FOLLOW_DOC_COMMENT_in_rule870); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_DOC_COMMENT.add(DOC_COMMENT39);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:3: (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )?\r\n int alt17=2;\r\n int LA17_0 = input.LA(1);\r\n\r\n if ( (LA17_0==FRAGMENT||(LA17_0 >= 86 && LA17_0 <= 88)) ) {\r\n alt17=1;\r\n }\r\n switch (alt17) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:5: modifier= ( 'protected' | 'public' | 'private' | 'fragment' )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:14: ( 'protected' | 'public' | 'private' | 'fragment' )\r\n int alt16=4;\r\n switch ( input.LA(1) ) {\r\n case 87:\r\n {\r\n alt16=1;\r\n }\r\n break;\r\n case 88:\r\n {\r\n alt16=2;\r\n }\r\n break;\r\n case 86:\r\n {\r\n alt16=3;\r\n }\r\n break;\r\n case FRAGMENT:\r\n {\r\n alt16=4;\r\n }\r\n break;\r\n default:\r\n if (state.backtracking>0) {state.failed=true; return retval;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 16, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n switch (alt16) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:15: 'protected'\r\n {\r\n string_literal40=(Token)match(input,87,FOLLOW_87_in_rule880); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_87.add(string_literal40);\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:27: 'public'\r\n {\r\n string_literal41=(Token)match(input,88,FOLLOW_88_in_rule882); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_88.add(string_literal41);\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:36: 'private'\r\n {\r\n string_literal42=(Token)match(input,86,FOLLOW_86_in_rule884); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_86.add(string_literal42);\r\n\r\n\r\n }\r\n break;\r\n case 4 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:46: 'fragment'\r\n {\r\n string_literal43=(Token)match(input,FRAGMENT,FOLLOW_FRAGMENT_in_rule886); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_FRAGMENT.add(string_literal43);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n pushFollow(FOLLOW_id_in_rule894);\r\n id44=id();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_id.add(id44.getTree());\r\n\r\n if ( state.backtracking==0 ) {((rule_scope)rule_stack.peek()).name = (id44!=null?input.toString(id44.start,id44.stop):null);}\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:160:3: ( '!' )?\r\n int alt18=2;\r\n int LA18_0 = input.LA(1);\r\n\r\n if ( (LA18_0==BANG) ) {\r\n alt18=1;\r\n }\r\n switch (alt18) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:160:3: '!'\r\n {\r\n char_literal45=(Token)match(input,BANG,FOLLOW_BANG_in_rule900); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_BANG.add(char_literal45);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:161:3: (arg= ARG_ACTION )?\r\n int alt19=2;\r\n int LA19_0 = input.LA(1);\r\n\r\n if ( (LA19_0==ARG_ACTION) ) {\r\n alt19=1;\r\n }\r\n switch (alt19) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:161:5: arg= ARG_ACTION\r\n {\r\n arg=(Token)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_rule909); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_ARG_ACTION.add(arg);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:162:3: ( 'returns' rt= ARG_ACTION )?\r\n int alt20=2;\r\n int LA20_0 = input.LA(1);\r\n\r\n if ( (LA20_0==RET) ) {\r\n alt20=1;\r\n }\r\n switch (alt20) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:162:5: 'returns' rt= ARG_ACTION\r\n {\r\n string_literal46=(Token)match(input,RET,FOLLOW_RET_in_rule918); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_RET.add(string_literal46);\r\n\r\n\r\n rt=(Token)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_rule922); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_ARG_ACTION.add(rt);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:3: ( throwsSpec )?\r\n int alt21=2;\r\n int LA21_0 = input.LA(1);\r\n\r\n if ( (LA21_0==89) ) {\r\n alt21=1;\r\n }\r\n switch (alt21) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:3: throwsSpec\r\n {\r\n pushFollow(FOLLOW_throwsSpec_in_rule930);\r\n throwsSpec47=throwsSpec();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_throwsSpec.add(throwsSpec47.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:15: ( optionsSpec )?\r\n int alt22=2;\r\n int LA22_0 = input.LA(1);\r\n\r\n if ( (LA22_0==OPTIONS) ) {\r\n alt22=1;\r\n }\r\n switch (alt22) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:15: optionsSpec\r\n {\r\n pushFollow(FOLLOW_optionsSpec_in_rule933);\r\n optionsSpec48=optionsSpec();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_optionsSpec.add(optionsSpec48.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:28: ( ruleScopeSpec )?\r\n int alt23=2;\r\n int LA23_0 = input.LA(1);\r\n\r\n if ( (LA23_0==SCOPE) ) {\r\n alt23=1;\r\n }\r\n switch (alt23) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:28: ruleScopeSpec\r\n {\r\n pushFollow(FOLLOW_ruleScopeSpec_in_rule936);\r\n ruleScopeSpec49=ruleScopeSpec();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_ruleScopeSpec.add(ruleScopeSpec49.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:43: ( ruleAction )*\r\n loop24:\r\n do {\r\n int alt24=2;\r\n int LA24_0 = input.LA(1);\r\n\r\n if ( (LA24_0==AT) ) {\r\n alt24=1;\r\n }\r\n\r\n\r\n switch (alt24) {\r\n \tcase 1 :\r\n \t // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:43: ruleAction\r\n \t {\r\n \t pushFollow(FOLLOW_ruleAction_in_rule939);\r\n \t ruleAction50=ruleAction();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return retval;\r\n \t if ( state.backtracking==0 ) stream_ruleAction.add(ruleAction50.getTree());\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop24;\r\n }\r\n } while (true);\r\n\r\n\r\n char_literal51=(Token)match(input,74,FOLLOW_74_in_rule944); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_74.add(char_literal51);\r\n\r\n\r\n pushFollow(FOLLOW_altList_in_rule946);\r\n altList52=altList();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_altList.add(altList52.getTree());\r\n\r\n char_literal53=(Token)match(input,76,FOLLOW_76_in_rule948); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_76.add(char_literal53);\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:165:3: ( exceptionGroup )?\r\n int alt25=2;\r\n int LA25_0 = input.LA(1);\r\n\r\n if ( ((LA25_0 >= 81 && LA25_0 <= 82)) ) {\r\n alt25=1;\r\n }\r\n switch (alt25) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:165:3: exceptionGroup\r\n {\r\n pushFollow(FOLLOW_exceptionGroup_in_rule952);\r\n exceptionGroup54=exceptionGroup();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_exceptionGroup.add(exceptionGroup54.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // AST REWRITE\r\n // elements: arg, RET, id, ruleScopeSpec, throwsSpec, ruleAction, altList, optionsSpec, exceptionGroup, rt\r\n // token labels: arg, rt\r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleTokenStream stream_arg=new RewriteRuleTokenStream(adaptor,\"token arg\",arg);\r\n RewriteRuleTokenStream stream_rt=new RewriteRuleTokenStream(adaptor,\"token rt\",rt);\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 166:6: -> ^( RULE id ( ^( ARG[$arg] $arg) )? ( ^( 'returns' $rt) )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR[\\\"EOR\\\"] )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:166:9: ^( RULE id ( ^( ARG[$arg] $arg) )? ( ^( 'returns' $rt) )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR[\\\"EOR\\\"] )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n (CommonTree)adaptor.create(RULE, \"RULE\")\r\n , root_1);\r\n\r\n adaptor.addChild(root_1, stream_id.nextTree());\r\n\r\n adaptor.addChild(root_1, modifier!=null?adaptor.create(modifier):null);\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:166:67: ( ^( ARG[$arg] $arg) )?\r\n if ( stream_arg.hasNext() ) {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:166:67: ^( ARG[$arg] $arg)\r\n {\r\n CommonTree root_2 = (CommonTree)adaptor.nil();\r\n root_2 = (CommonTree)adaptor.becomeRoot(\r\n (CommonTree)adaptor.create(ARG, arg)\r\n , root_2);\r\n\r\n adaptor.addChild(root_2, stream_arg.nextNode());\r\n\r\n adaptor.addChild(root_1, root_2);\r\n }\r\n\r\n }\r\n stream_arg.reset();\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:166:86: ( ^( 'returns' $rt) )?\r\n if ( stream_RET.hasNext()||stream_rt.hasNext() ) {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:166:86: ^( 'returns' $rt)\r\n {\r\n CommonTree root_2 = (CommonTree)adaptor.nil();\r\n root_2 = (CommonTree)adaptor.becomeRoot(\r\n stream_RET.nextNode()\r\n , root_2);\r\n\r\n adaptor.addChild(root_2, stream_rt.nextNode());\r\n\r\n adaptor.addChild(root_1, root_2);\r\n }\r\n\r\n }\r\n stream_RET.reset();\r\n stream_rt.reset();\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:167:9: ( throwsSpec )?\r\n if ( stream_throwsSpec.hasNext() ) {\r\n adaptor.addChild(root_1, stream_throwsSpec.nextTree());\r\n\r\n }\r\n stream_throwsSpec.reset();\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:167:21: ( optionsSpec )?\r\n if ( stream_optionsSpec.hasNext() ) {\r\n adaptor.addChild(root_1, stream_optionsSpec.nextTree());\r\n\r\n }\r\n stream_optionsSpec.reset();\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:167:34: ( ruleScopeSpec )?\r\n if ( stream_ruleScopeSpec.hasNext() ) {\r\n adaptor.addChild(root_1, stream_ruleScopeSpec.nextTree());\r\n\r\n }\r\n stream_ruleScopeSpec.reset();\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:167:49: ( ruleAction )*\r\n while ( stream_ruleAction.hasNext() ) {\r\n adaptor.addChild(root_1, stream_ruleAction.nextTree());\r\n\r\n }\r\n stream_ruleAction.reset();\r\n\r\n adaptor.addChild(root_1, stream_altList.nextTree());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:169:9: ( exceptionGroup )?\r\n if ( stream_exceptionGroup.hasNext() ) {\r\n adaptor.addChild(root_1, stream_exceptionGroup.nextTree());\r\n\r\n }\r\n stream_exceptionGroup.reset();\r\n\r\n adaptor.addChild(root_1, \r\n (CommonTree)adaptor.create(EOR, \"EOR\")\r\n );\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n rule_stack.pop();\r\n }\r\n return retval;\r\n }", "private void returnStmt1()\r\n {\r\n curToken = getToken();\r\n\r\n // Implement the \";\" production.\r\n if(curToken.getToken().equals(\";\"))\r\n {\r\n removeToken();\r\n }\r\n // Implement the \"expression ;\" production.\r\n else if(curToken.getTokenType().equals(\"INT\") || curToken.getTokenType().equals(\"ID\") || curToken.getTokenType().equals(\"FLOAT\") || curToken.getToken().equals(\"(\"))\r\n {\r\n expression();\r\n\r\n if(isValid)\r\n {\r\n curToken = getToken();\r\n\r\n if(curToken.getToken().equals(\";\"))\r\n {\r\n removeToken();\r\n }\r\n // Invalid program detected.\r\n else\r\n {\r\n isValid = false;\r\n }\r\n }\r\n }\r\n // Invalid program detected.\r\n else\r\n {\r\n isValid = false;\r\n }\r\n }", "@Override\n public String visitCmdRetorne (LAParser.CmdRetorneContext ctx) {\n sp.println(\"return \" + ctx.expressao().getText() + \";\");\n return null;\n }", "String query_grammar () throws BaseException;", "String query_grammar (SharkTransaction t) throws BaseException;", "public final String statements(int tab) throws RecognitionException {\n String value = null;\n\n\n String a =null;\n\n String statement2 =null;\n\n\n\n \tvalue = null;\n\n try {\n // src\\\\calculator.g:12:2: ( statement[$tab] a= statements[$tab] |)\n int alt1=2;\n int LA1_0 = input.LA(1);\n\n if ( (LA1_0==COMMENT||LA1_0==11||(LA1_0 >= 47 && LA1_0 <= 48)||(LA1_0 >= 52 && LA1_0 <= 53)||(LA1_0 >= 58 && LA1_0 <= 60)||LA1_0==63||(LA1_0 >= 65 && LA1_0 <= 66)) ) {\n alt1=1;\n }\n else if ( (LA1_0==EOF) ) {\n alt1=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 1, 0, input);\n\n throw nvae;\n\n }\n switch (alt1) {\n case 1 :\n // src\\\\calculator.g:12:5: statement[$tab] a= statements[$tab]\n {\n pushFollow(FOLLOW_statement_in_statements38);\n statement2=statement(tab);\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_statements_in_statements43);\n a=statements(tab);\n\n state._fsp--;\n\n\n value = statement2 + a;\n\n }\n break;\n case 2 :\n // src\\\\calculator.g:14:4: \n {\n value = \"\";\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\n }", "java.lang.String getAbnfGrammar(int index);", "private String match (TokenType t) {\n String value = token.value();\n if (token.type().equals(t)){\n token = lexer.next();\n// System.out.println(\"Toke : \" + token);\n }\n else\n error(t);\n return value;\n }", "public final String statement(int tab) throws RecognitionException {\n String value = null;\n\n\n Token COMMENT4=null;\n String func_or_var3 =null;\n\n\n\n \tvalue = null;\n\n try {\n // src\\\\calculator.g:21:2: ( type[$tab] func_or_var[$tab] | '#include' '<' ID '>' | 'using' 'namespace' ID ';' | COMMENT )\n int alt2=4;\n switch ( input.LA(1) ) {\n case 47:\n case 48:\n case 52:\n case 53:\n case 58:\n case 59:\n case 60:\n case 63:\n case 66:\n {\n alt2=1;\n }\n break;\n case 11:\n {\n alt2=2;\n }\n break;\n case 65:\n {\n alt2=3;\n }\n break;\n case COMMENT:\n {\n alt2=4;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 2, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt2) {\n case 1 :\n // src\\\\calculator.g:21:4: type[$tab] func_or_var[$tab]\n {\n pushFollow(FOLLOW_type_in_statement75);\n type(tab);\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_func_or_var_in_statement78);\n func_or_var3=func_or_var(tab);\n\n state._fsp--;\n\n\n value = func_or_var3 + \"\\n\";\n\n }\n break;\n case 2 :\n // src\\\\calculator.g:23:4: '#include' '<' ID '>'\n {\n match(input,11,FOLLOW_11_in_statement88); \n\n match(input,33,FOLLOW_33_in_statement90); \n\n match(input,ID,FOLLOW_ID_in_statement92); \n\n match(input,38,FOLLOW_38_in_statement94); \n\n value = \"\";\n\n }\n break;\n case 3 :\n // src\\\\calculator.g:25:4: 'using' 'namespace' ID ';'\n {\n match(input,65,FOLLOW_65_in_statement103); \n\n match(input,61,FOLLOW_61_in_statement105); \n\n match(input,ID,FOLLOW_ID_in_statement107); \n\n match(input,32,FOLLOW_32_in_statement109); \n\n value = \"\";\n\n }\n break;\n case 4 :\n // src\\\\calculator.g:27:4: COMMENT\n {\n COMMENT4=(Token)match(input,COMMENT,FOLLOW_COMMENT_in_statement118); \n\n value = \"\"; for(int i = 0; i < tab; i++) value += \"\\t\"; value += (COMMENT4!=null?COMMENT4.getText():null);\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return value;\n }", "@Override \n\tpublic List<Ast> visitReturnStmt(JavaliParser.ReturnStmtContext ctx) { \n\t\tExpr expr = null;\n\t\tif(ctx.expr() != null)\n\t\t\texpr = (Expr)ctx.expr().accept(this).get(0);\n\t\treturn Arrays.asList(new ReturnStmt(expr));\n\t}", "public static GotoExpression return_(LabelTarget labelTarget, Expression expression, Class type) { throw Extensions.todo(); }", "expression_statement getExpression_statement();", "public final BeeParser.prog_return prog() throws RecognitionException {\r\n BeeParser.prog_return retval = new BeeParser.prog_return();\r\n retval.start = input.LT(1);\r\n int prog_StartIndex = input.index();\r\n BeeCommonNodeTree root_0 = null;\r\n\r\n Token EOF2=null;\r\n BeeParser.statements_return statements1 = null;\r\n\r\n\r\n BeeCommonNodeTree EOF2_tree=null;\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 1) ) { return retval; }\r\n // E:\\\\lijz\\\\javamonkey\\\\git\\\\oschina_beetl\\\\src\\\\org\\\\bee\\\\tl\\\\core\\\\Bee.g:133:6: ( ( statements )? EOF )\r\n // E:\\\\lijz\\\\javamonkey\\\\git\\\\oschina_beetl\\\\src\\\\org\\\\bee\\\\tl\\\\core\\\\Bee.g:133:8: ( statements )? EOF\r\n {\r\n root_0 = (BeeCommonNodeTree)adaptor.nil();\r\n\r\n // E:\\\\lijz\\\\javamonkey\\\\git\\\\oschina_beetl\\\\src\\\\org\\\\bee\\\\tl\\\\core\\\\Bee.g:133:8: ( statements )?\r\n int alt1=2;\r\n int LA1_0 = input.LA(1);\r\n\r\n if ( (LA1_0==Identifier||LA1_0==LEFT_BRACE||LA1_0==LEFT_TEXT_TOKEN||(LA1_0>=LEFT_TOKEN && LA1_0<=VAR)||(LA1_0>=96 && LA1_0<=99)||LA1_0==103||(LA1_0>=106 && LA1_0<=107)||(LA1_0>=116 && LA1_0<=117)) ) {\r\n alt1=1;\r\n }\r\n switch (alt1) {\r\n case 1 :\r\n // E:\\\\lijz\\\\javamonkey\\\\git\\\\oschina_beetl\\\\src\\\\org\\\\bee\\\\tl\\\\core\\\\Bee.g:0:0: statements\r\n {\r\n pushFollow(FOLLOW_statements_in_prog304);\r\n statements1=statements();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) adaptor.addChild(root_0, statements1.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n EOF2=(Token)match(input,EOF,FOLLOW_EOF_in_prog307); if (state.failed) return retval;\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (BeeCommonNodeTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n\r\n catch (RecognitionException e) {\r\n reportError(e); \r\n throw e;\r\n }\r\n finally {\r\n if ( state.backtracking>0 ) { memoize(input, 1, prog_StartIndex); }\r\n }\r\n return retval;\r\n }", "protected Parser phrase() {\r\n\tSequence phrase = new Sequence(\"phrase\");\r\n\tphrase.add(factor());\r\n\tAlternation a = new Alternation();\r\n\ta.add(timesFactor());\r\n\ta.add(divideFactor());\r\n\tphrase.add(new Repetition(a));\r\n\treturn phrase;\r\n}", "public interface ATTabulation extends ATExpression {\n\n\t/**\n\t * The table expression must evaluate to a native table\n\t * Example: <code>`(m()[idx+1]).tableExpression == `(m())</code>\n\t * @return the table expression\n\t */\n\tpublic ATExpression base_tableExpression();\n\t\n\t/**\n\t * The index expression must evaluate to a native number\n\t * Example: <code>`(m()[idx+1]).indexExpression == `(idx.+(1))</code>\n\t * @return the index expression\n\t */\n\tpublic ATExpression base_indexExpression();\n\t\n}", "String getStringTerm1();", "public abstract Sentence getArg(int i);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Print the body of the status HTML document on the given print writer.
private void printStatusHtmlBody (PrintWriter out, long now) { out.println ("<P>"); out.println ("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>"); out.println ("<TR>"); out.println ("<TD ALIGN=\"center\" VALIGN=\"top\">"); out.println ("Nodes"); out.println ("<TABLE BORDER=1 CELLPADDING=3 CELLSPACING=0>"); out.println ("<TR>"); out.println ("<TD ALIGN=\"left\" VALIGN=\"top\">"); out.println ("<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0>"); printBackendLabels (out); int i = 0; for (BackendInfo backend : myBackendInfo) { printBackendInfo (out, now, backend, i); ++ i; } out.println ("</TABLE>"); out.println ("</TD>"); out.println ("</TR>"); out.println ("</TABLE>"); out.println ("</TD>"); out.println ("<TD WIDTH=40> </TD>"); out.println ("<TD ALIGN=\"center\" VALIGN=\"top\">"); out.println ("Jobs"); out.println ("<TABLE BORDER=1 CELLPADDING=3 CELLSPACING=0>"); out.println ("<TR>"); out.println ("<TD ALIGN=\"left\" VALIGN=\"top\">"); out.println ("<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0>"); printJobLabels (out); i = 0; for (JobInfo job : myRunningJobList) { printJobInfo (out, now, job, i); ++ i; } for (JobInfo job : myWaitingJobList) { printJobInfo (out, now, job, i); ++ i; } out.println ("</TABLE>"); out.println ("</TD>"); out.println ("</TR>"); out.println ("</TABLE>"); printTotalComputeTime (out); out.print ("<BR>"); printJobCount (out); out.println ("<BR>Since " + new Date (myStartDateTime)); out.println ("</TD>"); out.println ("</TR>"); out.println ("</TABLE>"); }
[ "private void printStatusHtmlEnd\n\t\t(PrintWriter out)\n\t\t{\n\t\tout.println (\"<P>\");\n\t\tout.println (\"<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\");\n\t\tout.println (\"<TR>\");\n\t\tout.println (\"<TD ALIGN=\\\"left\\\" VALIGN=\\\"top\\\">\");\n\t\tout.println (\"Web interface:&nbsp;&nbsp;\");\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"<TD ALIGN=\\\"left\\\" VALIGN=\\\"top\\\">\");\n\t\tout.print (\"<A HREF=\\\"\");\n\t\tprintWebInterfaceURL (out);\n\t\tout.print (\"\\\">\");\n\t\tprintWebInterfaceURL (out);\n\t\tout.println (\"</A>\");\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"</TR>\");\n\t\tout.println (\"<TR>\");\n\t\tout.println (\"<TD ALIGN=\\\"left\\\" VALIGN=\\\"top\\\">\");\n\t\tout.println (\"Powered by Parallel Java:&nbsp;&nbsp;\");\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"<TD ALIGN=\\\"left\\\" VALIGN=\\\"top\\\">\");\n\t\tout.println (\"<A HREF=\\\"http://www.cs.rit.edu/~ark/pj.shtml\\\">http://www.cs.rit.edu/~ark/pj.shtml</A>\");\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"</TR>\");\n\t\tout.println (\"<TR>\");\n\t\tout.println (\"<TD ALIGN=\\\"left\\\" VALIGN=\\\"top\\\">\");\n\t\tout.println (\"Developed by Alan Kaminsky:&nbsp;&nbsp;\");\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"<TD ALIGN=\\\"left\\\" VALIGN=\\\"top\\\">\");\n\t\tout.println (\"<A HREF=\\\"http://www.cs.rit.edu/~ark/\\\">http://www.cs.rit.edu/~ark/</A>\");\n\t\tout.println (\"</TD>\");\n\t\tout.println (\"</TR>\");\n\t\tout.println (\"</TABLE>\");\n\t\tout.println (\"</BODY>\");\n\t\tout.println (\"</HTML>\");\n\t\t}", "public void run()\n {\n PrinterJob printJob = PrinterJob.getPrinterJob();\n PageFormat pf = printJob.pageDialog(printJob.defaultPage());\n\n printJob.setPrintable(this, pf);\n\n if (printJob.printDialog())\n {\n try\n {\n printJob.print();\n } catch (Exception PrintException)\n {\n PrintException.printStackTrace();\n }\n }\n }", "public void printHtmlJob() throws PrintException {\n HTMLPrinter htmlPrinter = null;\n jep = new JEditorPane();\n if (filetypestr.equalsIgnoreCase(\"text/html\")) {\n jep.setContentType(\"text/html\");\n jep.setEditable(false);\n jep.addHyperlinkListener(new HyperlinkListener() {\n public void hyperlinkUpdate(HyperlinkEvent e) {\n if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {\n JEditorPane pane = (JEditorPane) e.getSource();\n if (e instanceof HTMLFrameHyperlinkEvent) {\n HTMLFrameHyperlinkEvent evt = (HTMLFrameHyperlinkEvent)e;\n HTMLDocument doc = (HTMLDocument)pane.getDocument();\n doc.processHTMLFrameHyperlinkEvent(evt);\n } else {\n try {\n pane.setPage(e.getURL());\n } catch (Throwable t) {\n t.printStackTrace();\n }\n }\n }\n }\n });\n jep.setDocument(new HTMLDocument());\n PrinterHTMLEditorKit kit1 = new PrinterHTMLEditorKit(url, jep);\n jep.setEditorKit(kit1);\n if (url == null) {\n try {\n jep.read(is, kit1);\n } catch (IOException ioe) {\n throw new PrintException(\"Error in reading the html InputStream by the JEditorPane\", ioe);\n }\n } else {\n try {\n jep.setPage(url);\n } catch (IOException ioe) {\n throw new PrintException(\"Error in setting the URL to the JEditorPane\", ioe);\n }\n }\n htmlPrinter = new HTMLPrinter(jep, aset, service, services, units, paging);\n htmlPrinter.setPreview(preview);\n htmlPrinter.setPrintRequestAttributes(aset);\n htmlPrinter.addPrintJobListener(new PrintServiceJobListener());\n htmlPrinter.addPrintServiceAttributeListener(new PrintAttributeListener());\n\n }\n if (filetypestr.equalsIgnoreCase(\"text/rtf\")) {\n jep.setContentType(\"text/rtf\");\n jep.setEditable(false);\n\n try {\n jep.read(is, new RTFEditorKit());\n } catch (IOException ioe) {\n throw new PrintException(\"Error in reading the rtf InputStream by the JEditorPane\", ioe);\n }\n htmlPrinter = new HTMLPrinter(jep, aset, service, services, units, paging);\n htmlPrinter.setPreview(preview);\n htmlPrinter.setPrintRequestAttributes(aset);\n htmlPrinter.addPrintJobListener(new PrintServiceJobListener());\n htmlPrinter.addPrintServiceAttributeListener(new PrintAttributeListener());\n\n }\n if (filetypestr.equalsIgnoreCase(\"text/plain\")) {\n jep.setContentType(\"text/plain\");\n jep.setEditable(false);\n try {\n jep.read(is, new DefaultEditorKit());\n } catch (IOException ioe) {\n throw new PrintException(\"Error in reading the text InputStream by the JEditorPane\", ioe);\n }\n htmlPrinter = new HTMLPrinter(jep, aset, service, services, units, paging);\n htmlPrinter.setPreview(preview);\n htmlPrinter.setPrintRequestAttributes(aset);\n htmlPrinter.addPrintJobListener(new PrintServiceJobListener());\n htmlPrinter.addPrintServiceAttributeListener(new PrintAttributeListener());\n\n }\n htmlPrinter.printEditorPane(false);\n }", "private void PrintBody (PrintWriter out)\n {\n PrintBody(out, \"\", \"\");\n }", "public Printable print(){\n\t\t MessageFormat header = new MessageFormat(\"\");\n\t\t MessageFormat footer = new MessageFormat(\"page {0,number,integer}\");\n\t\t return html.getPrintable(header, footer);\n\t }", "public void PrinterStatus(){\n PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);\n System.out.println(\"Printer Services found:\");\n printService(services);\n\n // Look up the default print service\n PrintService service = PrintServiceLookup.lookupDefaultPrintService();\n if (service!=null) {\n System.out.println(\"Default Printer Service found:\");\n System.out.println(\"t\" + service);\n }\n\n\t\n // find printer service by name\n AttributeSet aset_name = new HashAttributeSet();\n aset_name.add(new PrinterName(\"Microsoft XPS Document Writer\", null));\n services = PrintServiceLookup.lookupPrintServices(null, aset_name);\n\n System.out.println(\"Printer Service Microsoft XPS Document Writer:\");\n printService(services);\n \n // find printer service by ip\n PrintServiceAttributeSet aset_URI = new HashPrintServiceAttributeSet();\n try {\n aset_URI.add(new PrinterURI(new URI(\"this ipp is wrong --ipp://hostName/printerName\")));\n } catch (URISyntaxException e) {\n System.out.println(\"URI exception caught: \"+e);\n }\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n \n /*\n //another way to print to a specific uri\n URI printerURI = null;\n try {\n printerURI = new URI(\"ipp://SERVER:631/printers/PRINTER_NAME\");\n } catch (URISyntaxException ex) {\n Logger.getLogger(PrinterStatus.class.getName()).log(Level.SEVERE, null, ex);\n }\n IppPrintService svc = new IppPrintService(printerURI);\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n // following is the way to print sth in a format of flavor\n InputStream stream = new BufferedInputStream(new FileInputStream(\"image.epl\"));\n DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;\n Doc myDoc = new SimpleDoc(stream, flavor, null);\n DocPrintJob job = svc.createPrintJob();\n job.print(myDoc, null);\n */\n \n /*\n // find services that support a particular input format (e.g. JPEG)\n services = PrintServiceLookup.lookupPrintServices(DocFlavor.INPUT_STREAM.JPEG, null);\n System.out.println(\"Printer Services with JPEG support:\");\n printService(services);\n\n //find services that support a set of print job capabilities (e.g. color)\n aset = new HashAttributeSet();\n aset.add(ColorSupported.SUPPORTED);\n services = PrintServiceLookup.lookupPrintServices(null, aset);\n\n System.out.println(\"Printer Services with color support:\");\n printService(services);\n */ \n }", "private void printHtml()\n {\n out.println(this.html.getHtmlAnswer());\n }", "private void renderBody() throws MavenReportException {\n sink.section1();\n\n sink.sectionTitle1();\n sink.text(messages.getString(\"report.name\"));\n sink.sectionTitle1_();\n\n sink.paragraph();\n sink.text(messages.getString(\"report.description\"));\n sink.paragraph_();\n sink.paragraph();\n sink.rawText(messages.getString(\"report.further-information\"));\n sink.paragraph_();\n\n renderAliasGroups();\n\n renderExtensions();\n\n renderFooter();\n sink.section1_();\n }", "private String readWebpage(PrintWriter writer) {\n\n\t\t// create new userAgent (headless browser)\n\t\tUserAgent userAgent = new UserAgent();\n\n\t\t// visit a url\n\t\ttry {\n\t\t\tuserAgent.visit(url);\n\n\t\t\ttitle = userAgent.doc.findFirst(\"<title>\").getText();\n\n\t\t\t// prints all text with \"span\" header\n\t\t\tElements step1 = userAgent.doc.findEvery(heading);\n\n\t\t\t// trims extra spaces\n\t\t\tString noSpaces = \"\";\n\t\t\tif (innerText) {\n\t\t\t\tnoSpaces = step1.innerText(null, true, true);\n\t\t\t} else {\n\t\t\t\tnoSpaces = step1.innerHTML();\n\t\t\t}\n\t\t\tnoSpaces = noSpaces.replaceAll(\" \", \"\");\n\t\t\treturn noSpaces;\n\t\t} catch (JauntException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn e.getMessage();\n\t\t}\n\t}", "public void print() {\n\t\tSystem.out.println(\"document \" + name + \" is printing...\");\n\t}", "void printPageEnd(PrintWriter html) {\n\t\thtml.println(\" </body>\");\n\t\thtml.println(\"</html>\");\n\t}", "private void printDebugHtmlBody\n\t\t(PrintWriter out)\n\t\t{\n\t\tout.println (\"<P>\");\n\t\tout.println (\"<HR/>\");\n\t\tout.println (\"<H3>Thread Dump</H3>\");\n\t\tout.println (\"</P>\");\n\t\tMap<Thread,StackTraceElement[]> traces = Thread.getAllStackTraces();\n\t\tfor (Map.Entry<Thread,StackTraceElement[]> entry : traces.entrySet())\n\t\t\t{\n\t\t\tThread thread = entry.getKey();\n\t\t\tout.println (\"<P>\");\n\t\t\tout.print (\"Name: \");\n\t\t\tout.print (thread.getName());\n\t\t\tout.println (\"&nbsp;&nbsp;&nbsp;&nbsp;\");\n\t\t\tout.print (\" ID: \");\n\t\t\tout.print (thread.getId());\n\t\t\tout.println (\"&nbsp;&nbsp;&nbsp;&nbsp;\");\n\t\t\tout.print (\" Daemon: \");\n\t\t\tout.print (thread.isDaemon() ? \"yes\" : \"no\");\n\t\t\tout.println (\"&nbsp;&nbsp;&nbsp;&nbsp;\");\n\t\t\tout.print (\" State: \");\n\t\t\tout.print (thread.getState());\n\t\t\tout.println (\"&nbsp;&nbsp;&nbsp;&nbsp;\");\n\t\t\tout.print (\" Priority: \");\n\t\t\tout.print (thread.getPriority());\n\t\t\tout.println (\"&nbsp;&nbsp;&nbsp;&nbsp;\");\n\t\t\tout.print (\" Thread Group: \");\n\t\t\tout.print (thread.getThreadGroup().getName());\n\t\t\tout.println ();\n\t\t\tfor (StackTraceElement element : entry.getValue())\n\t\t\t\t{\n\t\t\t\tout.print (\"<BR/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\");\n\t\t\t\tout.println (element);\n\t\t\t\t}\n\t\t\tout.println (\"</P>\");\n\t\t\t}\n\t\tout.println (\"<P>\");\n\t\tout.println (\"<HR/>\");\n\t\tout.println (\"</P>\");\n\t\t}", "public void print() {\n window.print();\n setBackground();\n }", "public void print(HTMLDocument htmlDocument) {\n\t\tsetDocument(htmlDocument);\n\t\tprintDialog();\n\t}", "private void printTitleBar( BufferedWriter writer ) throws IOException\n\t{\n\t\twriter.write( \"\\n\" );\n\t\twriter.write( \"======================================================\\n\");\n\t\twriter.write( \" Scheduling Algorithm Placement \\n\" );\n\t\twriter.write( \"======================================================\\n\" );\n\t}", "public void print() {\n\t\tPrinter.print(doPrint());\n\t}", "private void write(HttpServletResponse resp, OAuthResponse r) throws IOException {\n resp.setStatus(r.getResponseStatus());\n PrintWriter pw = resp.getWriter();\n pw.print(r.getBody());\n pw.flush();\n pw.close();\n }", "public void print() throws PrintException {\n setRequest();\n service = null;\n if (useDialog) {\n Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();\n int defaultPSidx = 0;\n PrintService dps = PrintServiceLookup.lookupDefaultPrintService();\n for (int i=0; i<services.length; i++) {\n if (dps != null) {\n if (dps.equals(services[i])) defaultPSidx = i;\n }\n }\n service = ServiceUI.printDialog(null, (screen.width/2)-220, (screen.height/2)-220, services, services[defaultPSidx], null, aset);\n try {\n String serviceName = service.getName();\n } catch (NullPointerException npe) {\n throw new PrintException(\"no printer selected - printing cancelled\", npe);\n }\n } else {\n service = PrintServiceLookup.lookupDefaultPrintService();\n }\n if(!(isSupportedFileType(filetypestr))) {\n throw new PrintException(\"File Type \"+filetypestr+\" is not supported.\\n\" +\n \"Supported filetypes (case insensitive):\\n\" +\n \"\\tunknown\\n\" +\n \"\\ttext\\n\" +\n \"\\ttext/plain (rendered by JEditorPane)\\n\" +\n \"\\tHTML (rendered by JEditorPane)\\n\" +\n \"\\ttext/html (rendered by JEditorPane)\\n\" +\n \"\\tRTF (rendered by JEditorPane)\\n\" +\n \"\\ttext/rtf (rendered by JEditorPane)\\n\" +\n \"\\tGIF\\n\" +\n \"\\tJPEG\\n\" +\n \"\\tPCL\\n\" +\n \"\\tPDF\\n\" +\n \"\\tPOSTSCRIPT\");\n }\n setDocFlavor(); //Calling this method sets the appropriate DocFlavor\n //addPrintAListener(service);\n DocPrintJob pj = createDocPrintJob(service);\n //addPrintJListener(pj);\n \n log.info(\"File being printed: \" + url);\n if (filetypestr.equalsIgnoreCase(\"html\") || filetypestr.equalsIgnoreCase(\"text/html\") || filetypestr.equalsIgnoreCase(\"rtf\") || filetypestr.equalsIgnoreCase(\"text/rtf\") || filetypestr.equalsIgnoreCase(\"text/plain\")) {\n printHtmlJob();\n } else {\n Doc d = createFinalDoc(is);\n printJob(pj,d);\n }\n \n }", "public void setPrintBodyOnly(boolean bodyOnly)\n {\n configuration.bodyOnly = bodyOnly;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the height (vertical size) of the GIF image from the given path (in window coordinates). Return 0, if GIF image is invalid.
public double imageHeight(String imagePath) { return _wnd.toWindowHeight(_wnd.getImageHeight(imagePath)); }
[ "public int getImageHeight()\n {\n \n int retVal = getImageHeight_0(nativeObj);\n \n return retVal;\n }", "public int getHeight() {\n\t\treturn this.img.height;\n\t}", "public int getHeight(){\n \tif (pcount==0){\n \t\treturn 0;\n \t}\n \treturn boxImages.get(pcount-1).getHeight(null);\n }", "public Integer getImgheight() {\n return imgheight;\n }", "public int height() {\n return picture.height();\n }", "public int getImageHeight()\n {\n return image_height_;\n }", "public int height() {\n return picture.height();\n }", "@Generated\n @CFunction\n @NFloat\n public static native double CGRectGetHeight(@ByValue CGRect rect);", "public int getImageHeight() {\n return imageHeight_;\n }", "public int getImageHeight() {\n\t\treturn imageHeight;\n\t}", "long getHeight();", "private Integer getImageMaxHeight() {\n if (mImageMaxHeight == null) {\n // Calculate the max width in portrait mode. This is done lazily since we need to\n // wait for\n // a UI layout pass to get the right values. So delay it to first time image\n // rendering time.\n mImageMaxHeight =\n shareIV.getHeight();\n }\n\n return mImageMaxHeight;\n }", "public double getHeightInDeg();", "public int getHeight() {\r\n return bitmapHeight;\r\n }", "public double imageHeight(URL imageUrl)\n {\n return _wnd.toWindowHeight(_wnd.getImageHeight(imageUrl));\n }", "public int height() \n {\n return this.picture.height();\n }", "public int get_screenshot_height() {\n return drawframe.ORIGINAL_HEIGHT; \n }", "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 getCurrentHeight();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
new columns (id) //
public ScGridColumn<AcFacilityDestinationMapping> newIdColumn() { return newIdColumn("Id"); }
[ "public ScGridColumn<AcItem> newIdColumn()\n {\n return newIdColumn(\"Id\");\n }", "public ScGridColumn<AcActionAutoCorrectedLog> newIdColumn()\n {\n return newIdColumn(\"Id\");\n }", "public ScGridColumn<AcDomesticCandidateRouteLeg> newIdColumn()\n {\n return newIdColumn(\"Id\");\n }", "public ScGridColumn<AcUspsDomesticSupply> newIdColumn()\n {\n return newIdColumn(\"Id\");\n }", "public ScGridColumn<AcFlightDepartureMessageItem> newIdColumn()\n {\n return newIdColumn(\"Id\");\n }", "public ScGridColumn<AcUspsDomesticSupplyAdjustment> newIdColumn()\n {\n return newIdColumn(\"Id\");\n }", "public ScGridColumn<AcDomesticItemSupplement> newItemIdColumn()\n {\n return newItemIdColumn(\"Item Id\");\n }", "void addColumn(int column);", "public ScGridColumn<AcDomesticItemDispatchSupplement> newItemIdColumn()\n {\n return newItemIdColumn(\"Item Id\");\n }", "Column createColumn();", "protected interface CoursesIdColumns {\n String COLUMN_COURSE_ID = \"course_id\";\n }", "Col createCol();", "java.lang.String getColId();", "private void setupId(NormalColumn normalColumn, PersistentContext context, final StringBuilder xml) {\n }", "public IdColumn() {\n this(0);\n }", "public ScGridColumn<AcItem> newConsignmentIdColumn()\n {\n return newConsignmentIdColumn(\"Consignment Id\");\n }", "public ScGridColumn<AcFlightDepartureMessageItem> newActionIdColumn()\n {\n return newActionIdColumn(\"Action Id\");\n }", "public ScGridColumn<AcFlightDepartureMessageItem> newEventIdColumn()\n {\n return newEventIdColumn(\"Event Id\");\n }", "protected void setupDBColumns() \n\t{\n\t\tthis.dbColumnNames = new Vector<String>();\n\t\tthis.dbColumnNames.addElement(\"ID\");\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the videoUserGuid value for this VideoTimeInfoDTO.
public java.lang.String getVideoUserGuid() { return videoUserGuid; }
[ "public java.lang.String getVideoUserDomainGuid() {\n return videoUserDomainGuid;\n }", "public java.lang.String getVideoUserUserTypeGuid() {\n return videoUserUserTypeGuid;\n }", "public java.lang.String getVideoGuid() {\n return videoGuid;\n }", "public java.lang.String getVideoUserUserName() {\n return videoUserUserName;\n }", "public void setVideoUserGuid(java.lang.String videoUserGuid) {\n this.videoUserGuid = videoUserGuid;\n }", "public java.lang.String getVideoUserUserTypeName() {\n return videoUserUserTypeName;\n }", "public java.lang.String getVideoUserDomainName() {\n return videoUserDomainName;\n }", "@Override\n\tpublic String getUserUuid() {\n\t\treturn _activityCoursePlace.getUserUuid();\n\t}", "@Override\n\tpublic java.lang.String getUuid() {\n\t\treturn _userInfo.getUuid();\n\t}", "public java.lang.String getVideoUserDomainCode() {\n return videoUserDomainCode;\n }", "@Override\n\tpublic String getUserUuid() {\n\t\treturn model.getUserUuid();\n\t}", "@Override\n\tpublic java.lang.String getUserUuid() {\n\t\treturn _events.getUserUuid();\n\t}", "@Override\n\tpublic java.lang.String getUserUuid() {\n\t\treturn _second.getUserUuid();\n\t}", "public void setVideoUserUserTypeGuid(java.lang.String videoUserUserTypeGuid) {\n this.videoUserUserTypeGuid = videoUserUserTypeGuid;\n }", "java.lang.String getPlayerGuid();", "@Override\n\tpublic java.lang.String getUserUuid() {\n\t\treturn _userTracker.getUserUuid();\n\t}", "public String getUserUuid();", "public String getVideoId() {\n return videoId;\n }", "@Override\n public long getUserId() {\n return _leagueDay.getUserId();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the list of sensors in the room. The list of sensors stored by the room should always be in alphabetical order, by the sensor's class name. Adding or removing sensors from this list should not affect the room's internal list of sensors.
public List<Sensor> getSensors(){ List<Sensor> sensorListCopy = new ArrayList<>(this.sensorList); // Comparing class name to sort alphabetically sensorListCopy.sort((sensor1, sensor2) -> { if (sensor1.getClass().getSimpleName().equals (sensor2.getClass().getSimpleName())){ return 0; } return sensor1.getClass().getSimpleName().compareTo (sensor2.getClass().getSimpleName()); }); return sensorListCopy; }
[ "public List<Sensor> getSensorList()\n {\n return new ArrayList<>(sensors.values());\n }", "public List<Sensor> getSensorList(int type) {\n\t\treturn mgr.getSensorList(type);\n\t}", "public List<SensorObject> getSensorData(){\n\t\t\n\t\t//Cleaning all the information stored\n\t\tthis.sensorData.clear();\n\t\t\n\t\t//Getting the information from the keyboard listener\n\t\tif(keyboardListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.keyboardListener.getKeyboardEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.keyboardListener.getKeyboardEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.keyboardListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse listener\n\t\tif(mouseListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseListener.getMouseEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseListener.getMouseEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse motion listener\n\t\tif(mouseMotionListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseMotionListener.getMouseMotionEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseMotionListener.getMouseMotionEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseMotionListener.clearEvents();\n\t\t}\n\t\t//Getting the information from the mouse wheel listener\n\t\tif(mouseWheelListenerIsActive){\n\t\t\t\n\t\t\tint elements = this.mouseWheelListener.getMouseWheelEvents().size();\n\t\t\tfor(int i=0; i<elements; i++) {\n\t\t\t\tthis.addSensorObject(this.mouseWheelListener.getMouseWheelEvent(i));\n\t\t\t}\n\t\t\t\n\t\t\tthis.mouseWheelListener.clearEvents();\n\t\t}\n\t\t\n\t\t//If we want to write a JSON file with the data\n\t\tif(Boolean.parseBoolean(this.configuration.get(artie.sensor.common.enums.ConfigurationEnum.SENSOR_FILE_REGISTRATION.toString()))){\n\t\t\tthis.writeDataToFile();\n\t\t}\n\t\t\n\t\treturn this.sensorData;\n\t}", "@Override\n\tpublic Sensor[] getAllSensors() {\t\n\t\tArrayList<Sensor> sensorArray = new ArrayList<Sensor>();\n\t\t\n\t\tfor(Entry<String, ArrayList<Sensor>> entry : this.sensors.entrySet()) {\n\t\t\tfor(Sensor thisSensor : entry.getValue()) {\n\t\t\t\tsensorArray.add(thisSensor);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// ArrayList.toArray() didn't want to play ball.\n\t\tSensor[] sensorRealArray = new Sensor[sensorArray.size()];\n\t\t\n\t\treturn sensorArray.toArray(sensorRealArray);\n\t}", "public GeoAreaSensorList getAllSensors() {\n GeoAreaSensorList geoAreaSensorList = new GeoAreaSensorList();\n for (GeographicalArea geoArea : geoAreaRepository.findAll()) {\n geoAreaSensorList.getListOfSensors().addAll(geoArea.getSensorListInTheGeographicArea().getListOfSensors());\n }\n return geoAreaSensorList;\n }", "public Map<ISensorPort, Sensor> getSensors() {\n return this.sensors;\n }", "public List<SensorData> getSensorDataList()\n\t{\n\t\treturn this.sensorDataList;\n\t}", "java.util.List<org.jcjxb.wsn.service.proto.BasicDataType.SensorsOnHost> \n getSensorsOnHostList();", "protected Sensor[] getSensorValues() { return sensors; }", "public static List<Sensor> getSensors(Machine machine) {\n List<Sensor> ss = new ArrayList<>();\n ss.add(new Sensor(\"sensor1\", 12, 0, 20,\"Units\"));\n ss.add(new Sensor(\"sensor2\", 1, 0, 20,\"Units\"));\n ss.add(new Sensor(\"sensor3\", 23, 10, 25,\"Units\"));\n return ss;\n }", "private LinkedList<Smoke> listSensorSmoke(){\r\n LinkedList<Smoke> aux=new LinkedList<>();\r\n for (Sensor s:sensors){\r\n if(s instanceof Smoke)\r\n aux.add((Smoke)s);\r\n }\r\n return aux;\r\n }", "public final List< SensorConfigurationEntry > getListSensorConfigurations()\r\n {\r\n return sensorConfigurations;\r\n }", "@SuppressWarnings(\"unchecked\")\n public <T extends SimulatedSensor> List<T> getSensors(Class<T> sensorType)\n {\n List<SimulatedSensor> allSensors = getSensors();\n\n List<T> specificSensors = new ArrayList<>();\n\n for (SimulatedSensor sensor : allSensors)\n {\n if (sensorType.isAssignableFrom(sensor.getClass()))\n {\n specificSensors.add((T) sensor);\n }\n }\n\n return specificSensors;\n }", "public java.util.List<eu.rawfie.uxv.SensorType> getTypes() {\n return types;\n }", "public static SensorsCache getSensorsCache() {\n\t\treturn cache;\n\t}", "private List<AgentSensor> getSensorMorphology() {\n\n MorphologyConfig morphologyConfig = null;\n\n try {\n morphologyConfig = new MorphologyConfig(experimentConfig.getMorphologyConfigFile());\n }\n catch(ParseException p) {\n System.out.println(\"Error parsing morphology file.\");\n p.printStackTrace();\n }\n\n return morphologyConfig.getSensorList();\n }", "public synchronized Sensor[] getSensorArray(){\n\t\treturn sensorArray;\n\t}", "static LinkedList<Event> getEvent(SensorInterface sensor)\n {\n LinkedList<Event> events = new LinkedList<>();\n for(Event e : EVENTS)\n {\n if(e.getMySensor() == sensor)\n {\n events.add(e);\n }\n }\n\n return events;\n }", "public List<Room> getRooms() {\n return new ArrayList<>(room);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the Reference2 field. The insurer or reinsurer claim reference number 2
@gw.internal.gosu.parser.ExtendedProperty public java.lang.String getReference2() { return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(REFERENCE2_PROP.get()); }
[ "public java.lang.String getReference2() {\n return reference2;\n }", "public String getRef2() {\n\t\treturn ref2;\n\t}", "public String getREFERENCE2() {\r\n return REFERENCE2;\r\n }", "public void setReference2(java.lang.String reference2) {\n this.reference2 = reference2;\n }", "public void setRef2(String ref2) {\n\t\tthis.ref2 = ref2;\n\t}", "private String getRef2Val(String refVal2) {\n logger.info(\"Ref 1 from profile Options is null\");\n String refTag = \"\";\n if (refVal2.equalsIgnoreCase(\"PURCHASE ORDER NUMBER\")) {\n refTag = \n \"<PONumber>\" + reference2 + \"</PONumber>\" + \"<CustomerReference>\" + \n reference1 + \"</CustomerReference>\";\n } else if (refVal2.equalsIgnoreCase(\"SALES ORDER NUMBER\")) {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference1 + \" SO# \" + reference2 + \n \"</CustomerReference>\";\n } else {\n refTag = \n \"<CustomerReference>\" + \"Ref# \" + reference1 + \" Del# \" + reference2 + \n \"</CustomerReference>\";\n }\n return refTag;\n }", "public java.lang.String getReference1() {\n return reference1;\n }", "public String getMerchantReference2() {\n return this.merchantReference2;\n }", "public java.lang.CharSequence getField2() {\n return field2;\n }", "public String getREFERENCE1() {\r\n return REFERENCE1;\r\n }", "public java.lang.CharSequence getField2() {\n return field2;\n }", "public String getRef1() {\n\t\treturn ref1;\n\t}", "public String getPMS_REFERENCE2() {\r\n return PMS_REFERENCE2;\r\n }", "public java.lang.String getRemark2()\r\n {\r\n return _remark2;\r\n }", "public java.lang.String getExtReference2() {\r\n return extReference2;\r\n }", "public String getField2() {\n return field2;\n }", "public java.lang.String getValue2() {\n return this.value2;\n }", "public void setREFERENCE2(String REFERENCE2) {\r\n this.REFERENCE2 = REFERENCE2 == null ? null : REFERENCE2.trim();\r\n }", "public String getR2() {\r\n return r2;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return list of last completed Download tasks in "ReportStructure" style you can use it as notifier
public List<ReportStructure> lastCompletedDownloads() { List<ReportStructure> reportList; List<Task> lastCompleted = tasksDataSource.getUnnoticedCompleted(); reportList = readyTaskList(lastCompleted); return reportList; }
[ "private void doViewAllCompletedTasks() {\n ArrayList<Task> t1 = todoList.getListOfCompletedTasks();\n if (t1.size() > 0) {\n for (Task task : t1) {\n System.out.println(task.getTime() + \" \" + task.getDescription() + \" \" + task.getDate());\n }\n } else {\n System.out.println(\"No completed tasks available.\");\n }\n }", "List<ConanTask<? extends ConanPipeline>> getCompletedTasksSummary();", "void getCompletedTasks(){\n zk.getChildren(\"/completed\",\n tasksCompletedWatcher,\n completedTasksGetChildrenCallback,\n null);\n }", "List<DownloadProgress> getDownloadsInProgress(short siteId);", "public ArrayList<Task> getAllCompletedTasks() {\n\n String selectTasksWithStatusAs1 = \"select * from \" + TABLE + \" where \" + KEY_STATUS + \" = 1\";\n return getTasks(selectTasksWithStatusAs1);\n }", "java.util.List<org.roylance.yaorm.TestingModel.Task>\n getUncompletedTasksList();", "List<BackfillTask> getRunning();", "public int getDownloadingTask() {\r\n return DOWNLOADING_TASK.size();\r\n\r\n }", "org.roylance.yaorm.TestingModel.Task getCompletedTasks(int index);", "@Override\n\tpublic List<Task> getTasks() {\n\t\treturn details.getPendingTasks();\n\t}", "int getTradesCompleted();", "public String[] getJobsWaiting();", "public ArrayList<Task> getFinishedTasks(){\r\n return finished;\r\n }", "public List<ModuleInformation> getModulesScheduledForUpdateOrDownload() {\r\n List<ModuleInformation> ret = new ArrayList<>();\r\n for (String module: pendingDownloads) {\r\n ModuleInformation pi = getModuleInformation(module);\r\n if (pi == null) {\r\n continue;\r\n }\r\n ret.add(pi);\r\n }\r\n return ret;\r\n }", "@Override\n\tpublic List<TradeMessage> getTradedCompleted() {\n\t\tList<TradeMessage> trades = null;\n\n\t\tMap<String, TradeMessage> messages = InMemoryDatabaseStub.getProcessedMessageData();\n\t\tif (!messages.isEmpty()) {\n\t\t\ttrades = new ArrayList<TradeMessage>(messages.values());\n\t\t}\n\t\treturn trades;\n\t}", "List<JobTrackingWorkerDependency> reportJobTaskComplete(final String jobTaskId) throws JobReportingException;", "public String listTasks() {\n String str = \"\";\n\n for (int i = 0; i < list.size(); i++) {\n PtTask task = list.get(i);\n\n str = str + i + \") \" + task.getTaskDesc().toString() + \"\\n\";\n }\n return str;\n }", "@Override\n public List<Listing> getAllCompletedTrades() {\n return tradeRepository.findAllCompletedTrades(TradeStatus.PENDING);\n }", "public static ArrayList<ArrayList<String>> getFullWaitlist() {\r\n con = DBConnection.getConnection();\r\n waitlist.clear();\r\n try {\r\n PreparedStatement getAll = con.prepareStatement(\"Select * from Waitlist order by DATE, TIMESTAMP\");\r\n ResultSet res = getAll.executeQuery();\r\n\r\n WaitlistQueries.getArrayListResult(res);\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n return waitlist;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Affecter le montant de la mise a une case
public void MiserCase(int somme, int num) { tab[num].setMise(tab[num].getMise() + somme); }
[ "public void May()\n {\n int may=0;\n calcMay(raiz);\n System.out.println(\"El mayor promedio es: \"+may);\n }", "private void taillesCases() {\n\t\tthis.largeurCase=gui.getPanelWidth()/this.automate.getNbCol();\n\t\tthis.hauteurCase=gui.getPanelHeight()/this.automate.getNbLig();\n\t}", "private double probaMetropolis(double deltaValeur) {\r\n\t\treturn Math.exp(-deltaValeur / temperature);\r\n\t}", "public abstract void debiterMontant( double montant);", "public void setMach(float Mach);", "public void contaAbdominais() {\n abdominal = abdominal + 1;\n }", "public void minutoStamina(int minutoStamina){\n tiempoReal = (minutoStamina * 6)+10;\n }", "@Override\n public double calculaIposto() {\n return this.getValorVenal() * 0.07;\n }", "public void afficheMeilleurSolution(){\n\t\tSystem.out.println(\"Meilleur score: \");\n\t\tSystem.out.println(cartes.get(0).toString());\n\t\tcartes.get(0).evalueScore(true);\n\t}", "public void setMa(int value) {\n this.ma = value;\n }", "void setMatricule(int ma){\n \t this.matricule = ma;\n }", "public void calculateMMage() {\n\t\t\n\t}", "@Override\n public int calculerPerimetre() {\n return (int)(rayon * 2 * Math.PI);\n }", "public void changeMages(int change) {\r\n mages += change;\r\n if (mages < 0) {\r\n mages = 0;\r\n }\r\n }", "private double getMonteCarlo() {\n return montepi = 4.0 * (((double) inmonte) / mcount);\n }", "public void setMetratura(double metratura) {\r\n this.metratura = metratura;\r\n }", "public void resta(int num) {\r\n miNum = miNum - num;\r\n }", "public void setMois(int mois) \r\n\t{\r\n\t\tif(mois>0 && mois<13)\r\n\t\t{\r\n\t\t\tthis.mois = mois;\r\n\t\t}else\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Mois non valide !\");\r\n\t\t}\r\n\t}", "public void cambiaMiNum(int num) {\r\n miNum = num;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all the marks for a given student
public ArrayList<Marks> getMarks(Student student) { ArrayList<Marks> marks = new ArrayList<>(); String query = String.format("SELECT * FROM enrollment WHERE student_id = '%s'", student.getId()); try { result = statement.executeQuery(query); while(result.next()){ String yearMark = result.getString("year_mark"); String examMark = result.getString("exam_mark"); String finalMark = result.getString("final_mark"); String tutAttendance = result.getString("tut_attendance"); String outcome = result.getString("outcome"); String course_id = result.getString("course_code"); String course = getCourseName(course_id); marks.add(new Marks(course, yearMark, examMark, finalMark, outcome, tutAttendance)); } return marks; } catch (SQLException e){ return marks; } }
[ "private Map<Course, Integer> generateMarksList()\n\t\t\tthrows StudentEnrollmentException {\n\t\tMap<Course, Integer> marksList = new HashMap<Course, Integer>();\n\t\tCourse newCourse;\n\t\tfor (int i = 0; i < courseID.length; i++) {\n\t\t\tnewCourse = courseDao.getCourse(courseID[i]);\n\t\t\tmarksList.put(newCourse, marks[i]);\n\t\t}\n\t\treturn marksList;\n\t}", "public List<Attendance> getAttendance(Student s, Studygroup sg);", "default public Map<Boolean, List<Student>> splitStudentsByMarks(float splitMark) {\n return someStudents.stream()\n .collect(Collectors.groupingBy(\n student -> student.getGrade() >= splitMark, \n Collectors.toList()));\n }", "List<Student> getAllStudents();", "public Mark[] getMarks(Course c)\r\n\t{\r\n\t\tLinkedList<Mark> ret = marks.get(c.getCode());\r\n\t\tif (ret == null) {\r\n\t\t\tret = creator.loadMarks(this, c);\r\n\t\t}\r\n\t\treturn ret.toArray(new Mark[] {});\r\n\t}", "public net.opentrends.training.model.Marks fetchByPrimaryKey(long marksid)\n throws com.liferay.portal.kernel.exception.SystemException;", "public static Map<String, Student> getStudents() {\n\t\treturn students;\n\t}", "Student[] getStudents(){\n\t\treturn enrolled.toArray(new Student[enrolled.size()]);\n\t}", "public List<Student> getAllStudentData() {\r\n\t\tList<Student> list = new ArrayList<Student>();\r\n\t\ttry {\r\n\t\t\tConnection con = DatabaseUtility.getCon(inputStream);\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"select * from student\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tStudent stud = new Student();\r\n\r\n\t\t\t\tstud.setRollno(rs.getInt(1));\r\n\t\t\t\tstud.setFname(rs.getString(2));\r\n\t\t\t\tstud.setLname(rs.getString(3));\r\n\t\t\t\tstud.setEmail(rs.getString(4));\r\n\t\t\t\tstud.setGender(rs.getString(5));\r\n\t\t\t\tstud.setDOB(rs.getString(6));\r\n\t\t\t\tstud.setAddress(rs.getString(7));\r\n\t\t\t\tstud.setContact(rs.getString(8));\r\n\r\n\t\t\t\tlist.add(stud);\r\n\t\t\t}\r\n\t\t\tcon.close();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.out.println(ex);\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "public void showstudents(){\n for (int i=0; i<slist.size(); i++){\n System.out.println(slist.get(i).getStudent());\n }\n }", "public List<String> getStudents();", "public int[] getMarks(){\n return marks;\n }", "public Stream<Student> students() {\n ////\n return grades.keySet().stream();\n }", "public List<Student> getStudents(List<Integer> studentLus) {\n\t\tList<Student> students = null;\n\t\tHttpClient httpClient = getHttpClient();\n\t\tString lusForRequest = \"\";\n\t\tfor (int studentLu : studentLus) {\n\t\t\tif (!\"\".equals(lusForRequest)){\n\t\t\t\tlusForRequest += \"_\";\n\t\t\t}\n\t\t\tlusForRequest += studentLu;\n\t\t}\n\t\tHttpGet get = new HttpGet(\n\t\t\t\t\"http://\"+serverIp+\":8080/PFI/student/batch_data/\" + lusForRequest);\n\t\tget.setHeader(\"content-type\", \"application/json\");\n\t\ttry {\n\t\t\tHttpResponse resp = httpClient.execute(get);\n\t\t\tString respStr = EntityUtils.toString(resp.getEntity());\n\t\t\tstudents = JSONUtil.getStudents(respStr); \n\t\t} catch (ClientProtocolException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (JSONException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn students;\n\t}", "public static void setStudentMarks(){ //\n char choice = 'q';\n int index = 0;\n \n System.out.println(\"This option lets you add marks to students\");\n \n for(int i = 0; i < studentsInList; i++){\n\n System.out.println(\"\\nStudent Number: \" + (i+1));\n System.out.println(studentList[i].toString()); //Prints students already loaded information to screen to check user has correct student\n studentList[i].setMarks(); //Gets user to enter marks for UnderGrad or PostGrad\n studentList[i].computeMark(); //sets Final mark and grade for student\n }\n }", "private void printMarks() {\r\n\r\n System.out.println(\"Marks: \");\r\n for(int i = 0; i < numberOfCourses; i++)\r\n System.out.println(marks[i] + \"%\\t\" + letterGrades[i]);\r\n }", "public void studentsList() \r\n\t{\r\n\t\tSystem.out.println(students);\r\n\t}", "public int getMarks() {\n return marks;\n }", "public void listAllStudents() {\n System.out.println(repo.findAllStudents());\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get speciality of doctor.
public String getSpeciality() { return this.speciality; }
[ "public int getDexterity(){\n\t\treturn this.dexterity;\n\t}", "Doctor getDoctor();", "public Doctor getDoctor() {\r\n\t\treturn doctor;\r\n\t}", "@Override\n public java.lang.String getLegalPersonality() {\n return _entityCustomer.getLegalPersonality();\n }", "public String getDoctor3()\n {\n return doctor3;\n }", "String getDoctorName();", "public String getGeneralTypOfDisease() {}", "public String getDoctorName() {\n return doctorName;\n }", "String getPersonality();", "CodeableConcept getConfidentiality();", "public java.lang.String getPracticality() {\n return this.practicality;\n }", "public Specials getSpecial() {\n switch(school) {\n case STEM: return stemSpecial;\n case HUMANITARIAN: return humSpecial;\n case MEDICAL: return medSpecial;\n }\n return null;\n }", "public int getDexterityModifier()\n {\n return this.getAbilityModifier(this.getDexterity());\n }", "public Character getDistrictPermitFlag() {\n return districtPermitFlag;\n }", "java.lang.String getDoctorReqCd();", "public String getDoctorCode() {\n return doctorCode;\n }", "public float getDexterity()\n {\n return dexterity;\n }", "public java.lang.String getDoctor_Code()\n {\n return this._doctor_Code;\n }", "public java.lang.String getDoctor_Name()\n {\n return this._doctor_Name;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Easy method to return the default TextButtonStyle as a proper class.
public final TextButton.TextButtonStyle getDefaultTextButtonStyle() { return get("default_textButtonStyle", TextButton.TextButtonStyle.class); }
[ "protected final TextButton.TextButtonStyle generateDefaultTextButtonStyle() {\n TextButton.TextButtonStyle buttonStyle = new TextButton.TextButtonStyle();\n buttonStyle.fontColor = Color.GREEN;\n buttonStyle.font = this.get(\"default_font\", BitmapFont.class);\n Sprite sprite = new Sprite(cAssets.getTexture(\"images/wooden_sign.png\"));\n Sprite disabled = new Sprite(cAssets.getTexture(\"images/wooden_sign_gray.png\"));\n final float scalar = 0.42f;\n sprite.setSize(sprite.getWidth() * scalar * cUiScalar, sprite.getHeight() * scalar * cUiScalar);\n disabled.setSize(sprite.getWidth() * scalar * cUiScalar, sprite.getHeight() * scalar * cUiScalar);\n buttonStyle.up = new SpriteDrawable(sprite);\n sprite = new Sprite(sprite);\n sprite.setColor(.8f, .8f, .8f, 1);\n buttonStyle.over = new SpriteDrawable(sprite);\n sprite = new Sprite(sprite);\n sprite.setColor(.6f, .6f, .6f, 1);\n buttonStyle.down = new SpriteDrawable(sprite);\n buttonStyle.disabled = new SpriteDrawable(disabled);\n return buttonStyle;\n }", "protected void createPlainTextButtonStyle() {\n\t\ttextButtonStyle = new TextButton.TextButtonStyle();\n\t\ttextButtonStyle.up = skin.newDrawable(\"white\", getMainColor());\n\t\ttextButtonStyle.down = skin.newDrawable(\"white\", getMainColor());\n\t\ttextButtonStyle.checked = skin.newDrawable(\"white\", getMainColor());\n\t\ttextButtonStyle.over = skin.newDrawable(\"white\", getMainColor());\n\t\ttextButtonStyle.font = skin.getFont(\"halfFont\");\n\t\ttextButtonStyle.fontColor = Color.BLACK;\n\t\tskin.add(\"plainButton\", textButtonStyle);\n\t}", "public String getButtonFontStyle() {\r\n\t\tif (_saveButton == null)\r\n\t\t\treturn null;\r\n\t\telse\r\n\t\t\treturn _saveButton.getButtonFontStyle();\r\n\t}", "public TextStyle getStyle(\n )\n {return style;}", "public String getStyle() {\n return textStyle;\n }", "public final TextField.TextFieldStyle getDefaultTextFieldStyle() {\n return this.get(\"default_textFieldStyle\", TextField.TextFieldStyle.class);\n }", "public String getDefaultStyle()\n {\n return strategy.getDefaultStyle();\n }", "public static ButtonStyle fromName(String name) {\n switch (name) {\n case \"blurple\":\n return PRIMARY;\n case \"grey\":\n return SECONDARY;\n case \"green\":\n return SUCCESS;\n case \"red\":\n return DANGER;\n case \"url\":\n return LINK;\n default:\n return UNKNOWN;\n }\n }", "public mxStyleSheet getTextStyle()\n\t{\n\t\treturn textStyle;\n\t}", "protected int getInputTextStyle() {\r\n\t\treturn SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL;\r\n\t}", "protected int getInputTextStyle() {\r\n \t\treturn SWT.MULTI | SWT.WRAP;\r\n \t}", "protected String getStyleClass()\n {\n return _styleClass;\n }", "public FontStyle getStyle();", "public RMTextStyle getStyle() { return _style; }", "public String getLabelStyleClass() {\n\t\treturn (String) getStateHelper().eval(PropertyKeys.labelStyleClass);\n\t}", "public final Label.LabelStyle getDefaultLabelStyle() {\n return get(\"default_labelStyle\", Label.LabelStyle.class);\n }", "public fontStyleTypes getStyleType() {\n fontStyleTypes styleType = fontStyleTypes.PLAIN;\n if ( mTextView.getTypeface().getStyle() == Typeface.BOLD) styleType = fontStyleTypes.BOLD;\n else if ( mTextView.getTypeface().getStyle() == Typeface.ITALIC) styleType = fontStyleTypes.ITALIC;\n else if ( mTextView.getTypeface().getStyle() == Typeface.BOLD_ITALIC) styleType = fontStyleTypes.BOLDITALIC;\n return styleType;\n }", "public ReliefStyle getRelief() {\n // return GtkButton.getRelief(this);\n // TODO use real translation layer method\n return (ReliefStyle) getPropertyEnum(\"relief\");\n }", "public TextStyle2D getTextStyle() {\r\n return textStyle;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get method for patient total
public double getTotal (){ return total; }
[ "public Total getTotal();", "String getTotale();", "int getTotal();", "double getSubtotal();", "double totalPayment();", "public int getTotal () {\r\n return total;\r\n }", "public int getTotal () {\n return total;\n }", "java.lang.String getSumPaid();", "public int getPuntuacionTotal(){ return puntuacionTotal; }", "public Integer totalDias();", "java.lang.String getPatientPay();", "public abstract double totalSalario();", "double getPaid();", "public double getPercentOfTotal();", "public Number getTotal() {\n return (Number)getAttributeInternal(TOTAL);\n }", "int getAmount();", "double getPaidAmount();", "public double getTotal() {\r\n\r\n return getSubtotal() + getTax();\r\n }", "public void getTotalAmount(){\r\n totalAmount = (this.child * 2.50) + (this.adult * 5.00);\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Transform CDSReferenceEntity to PsdReferenceEntity
List<PsdReferenceEntity> wrapReferenceEntity(List<CDSReferenceEntity> xmlReferEntitiesList);
[ "void createOrUpdateReferenceEntity(List<PsdReferenceEntity> psdReferEntities);", "EntityReference getEntityReference();", "List<PsdReferenceObligationPair> wrapReferenceObligPair(CDSReferenceObligationPairs refObPairsXmlObject, List<PsdReferenceEntity> listReferenceEntity);", "private void replaceReferences(Object entity) {\r\n BeanMap beanMap = new BeanMap(entity);\r\n MappedClass mappedClass = MappedClass.getMappedClass(entity.getClass());\r\n for (MappedPath mappedPath : mappedClass.getProperties()){\r\n if (mappedPath.isReference() && mappedPath.isSimpleProperty()){\r\n Object value = mappedPath.getMappedProperty().getValue(beanMap);\r\n if (value != null && persisted.containsKey(value)){\r\n value = persisted.get(value);\r\n mappedPath.getMappedProperty().setValue(beanMap, value);\r\n } \r\n } \r\n }\r\n }", "BlueprintEntity toEntity();", "public ReferenceType mapReferenceTypeEntityToReferenceType(ReferenceTypeEntity referenceTypeEntity) {\n\t\tif(referenceTypeEntity == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\t//--- Generic mapping \n\t\tReferenceType referenceType = map(referenceTypeEntity, ReferenceType.class);\n\n\t\treturn referenceType;\n\t}", "public ExternalId getReferenceEntity() {\n return _referenceEntity;\n }", "E convertToEntity(D dto);", "public abstract T convertToEntity(D dto);", "public DSpaceCSVLine resolveEntityRefs(Context c, DSpaceCSVLine line) throws MetadataImportException {\n DSpaceCSVLine newLine = new DSpaceCSVLine(line.getID());\n UUID originId = evaluateOriginId(line.getID());\n for (String key : line.keys()) {\n // If a key represents a relation field attempt to resolve the target reference from the csvRefMap\n if (key.split(\"\\\\.\")[0].equalsIgnoreCase(\"relation\")) {\n if (line.get(key).size() > 0) {\n for (String val : line.get(key)) {\n // Attempt to resolve the relation target reference\n // These can be a UUID, metadata target reference or rowName target reference\n String uuid = resolveEntityRef(c, val).toString();\n newLine.add(key, uuid);\n //Entity refs have been resolved / placeholdered\n //Populate the EntityRelationMap\n populateEntityRelationMap(uuid, key, originId.toString());\n }\n } else {\n newLine.add(key, null);\n }\n } else {\n if (line.get(key).size() > 0) {\n for (String value : line.get(key)) {\n newLine.add(key, value);\n }\n } else {\n newLine.add(key, null);\n }\n }\n }\n\n return newLine;\n }", "YAnnotEntity getEntityref();", "public abstract List<T> convertToEntities(List<D> dtos);", "Entity getReferencedEntity();", "@Override\n\tprotected Node deepExport(Node n, AbstractDocument d) {\n\t\tsuper.deepExport(n, d);\n\t\tAbstractEntityReference ae = (AbstractEntityReference) n;\n\t\tae.nodeName = nodeName;\n\t\treturn n;\n\t}", "@Override\n public D entityToDTO( final E entity )\n {\n //final String methodName = \"cachedDataToDTO\";\n //logMethodBegin( methodName, entity );\n Objects.requireNonNull( entity, \"entity argument cannot be null\" );\n D dto = super.entityToDTO( entity );\n /*\n * I think this is a good use of instanceof...although I am not convinced, I'll have to think about this...\n * If any stock DTO is a stock company container, it will be populated automatically with the stock company\n * information. No need for any sub cvl\n *\n * NEED TO SERIOUSLY THINK ABOUT A BETTER SOLUTION HERE....5/9/2017 Mike.\n *\n * Need to develop some sort of \"conversion\" registration so that subclasses can register \"converters\" to be\n * run on entity.\n *\n /*\n * StockPriceQuoteContainers contain everything in a StockPriceContainer so get that instead\n */\n /*\n if ( dto instanceof StockQuoteDTOContainer )\n {\n this.stockQuoteEntityService\n .setQuoteInformation( dto );\n }\n */\n /*\n * The quote contains the company name\n */\n /*\n else if ( dto instanceof StockCompanyEntityContainer )\n {\n this.stockCompanyEntityService\n .setCompanyInformation( (StockCompanyDTOContainer) dto );\n }\n if ( dto instanceof StockPriceQuoteDTOContainer )\n {\n this.stockPriceQuoteService\n .setStockPriceQuote( dto, ASYNCHRONOUS );\n }\n */\n\n /*\n * Convert the UUID to a string and get the notes source name for the UUID\n */\n if ( entity instanceof NotesSourceUuidContainer &&\n dto instanceof NotesSourceIdContainer )\n {\n final NotesSourceUuidContainer notesSourceUuidContainer = (NotesSourceUuidContainer)entity;\n if ( notesSourceUuidContainer.getNotesSourceEntity().isPresent() )\n {\n final NotesSourceIdContainer notesSourceIdContainer = (NotesSourceIdContainer)dto;\n final StockNoteSourceEntity stockNoteSourceEntity = notesSourceUuidContainer.getNotesSourceEntity().get();\n notesSourceIdContainer.setNotesSourceName( stockNoteSourceEntity.getName() );\n notesSourceIdContainer.setNotesSourceId( stockNoteSourceEntity.getUuid().toString() );\n }\n }\n\n if ( dto instanceof TagsContainer )\n {\n final TagsContainer tagsContainer = (TagsContainer)dto;\n tagsContainer.setTags( this.stockTagService.findStockTags( UUIDUtil.uuid( tagsContainer.getCustomerId() ),\n StockTagEntity.StockTagReferenceType.STOCK_TO_BUY,\n UUIDUtil.uuid( tagsContainer.getEntityId() ) ) );\n }\n //logMethodEnd( methodName, dto );\n return dto;\n }", "private void transformEntity(NamedEntity entity, List<JsonSchemaNamedReference> definitions) {\n ObjectTransformer<NamedEntity,CodegenArtifacts,CodeGenerationTransformerContext> transformer =\n getTransformerFactory().getTransformer( entity, CodegenArtifacts.class );\n CodeGenerationFilter filter = context.getCodeGenerator().getFilter();\n\n if ((transformer != null) && ((filter == null) || filter.processEntity( entity ))) {\n CodegenArtifacts artifacts = transformer.transform( entity );\n\n if (artifacts != null) {\n for (JsonSchemaNamedReference memberDef : artifacts\n .getArtifactsOfType( JsonSchemaNamedReference.class )) {\n definitions.add( memberDef );\n }\n }\n }\n }", "private ReferenceType createRef(IntuitEntity entity) {\n ReferenceType referenceType = new ReferenceType();\n referenceType.setValue(entity.getId());\n return referenceType;\n }", "public Ciudad mapCiudadEntityToCiudad(CiudadEntity ciudadEntity) {\n\t\tif(ciudadEntity == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\t//--- Generic mapping \n\t\tCiudad ciudad = map(ciudadEntity, Ciudad.class);\n\n\t\t//--- Link mapping ( link to Provincia )\n\t\tif(ciudadEntity.getProvincia() != null) {\n\t\t\tciudad.setProvinciaid(ciudadEntity.getProvincia().getId());\n\t\t}\n\t\treturn ciudad;\n\t}", "public boolean getExpandEntityReferences();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use ForceExitReqMsg.newBuilder() to construct.
private ForceExitReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "private ForceExitRspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "pb4server.CancelMakeSoliderAskReqOrBuilder getCancelMakeSoliderAskReqOrBuilder();", "public io.confluent.developer.InterceptTest.Builder clearReqMessage() {\n req_message = null;\n fieldSetFlags()[1] = false;\n return this;\n }", "pb4server.CancelMakeSoliderAskReq getCancelMakeSoliderAskReq();", "private CancelPraiseReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "com.bingo.server.msg.Fight.FightAgreeExitGameRequest getFightAgreeExitGameRequest();", "pb4server.KillPrisonAskReqOrBuilder getKillPrisonAskReqOrBuilder();", "pb4server.CancelCureSoliderAskReq getCancelCureSoliderAskReq();", "public void requestUnfreeze() {\n\n try {\n controllerPresenter.get(\"UnfreezeReq\");\n controllerPresenter.get(\"YesNo\");\n\n int option = this.readYesNo();\n\n //Handles incorrect input\n if (option == 0) {\n controllerPresenter.get(\"WantYesOrNo\");\n this.requestUnfreeze();\n }\n //Handles yes\n else if (option == 1) {\n systemFacade.users().requestUnfreeze(userId);\n controllerPresenter.get(\"RequestSend\");\n }\n //Do nothing if the user says no\n //else if (option == 2) {}\n\n } catch (IOException | PersistenceException e) {\n errorPresenter.displayIOException();\n }\n }", "pb4server.CancelCureSoliderAskReqOrBuilder getCancelCureSoliderAskReqOrBuilder();", "com.bingo.server.msg.Fight.FightExitGameRequest getFightExitGameRequest();", "pb4server.ResurgenceAskReqOrBuilder getResurgenceAskReqOrBuilder();", "private DelFenceReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "pb4server.EatPoisonNumAskReqOrBuilder getEatPoisonNumAskReqOrBuilder();", "pb4server.MakeSoliderAskReqOrBuilder getMakeSoliderAskReqOrBuilder();", "private ActivateReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "@Override\n public Cancel_Msg CreateCancelMsg() {\n return new Cancel_Msg1();\n }", "private ModifyFenceReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "org.bolg_developers.bolg.NotifyReceivingRequest getNotifyReceivingReq();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the given mutation to the mutations list
public static void add(Mutation mutation) { mutations.add(mutation); }
[ "public static void addAll(Collection<? extends Mutation> mutationsToAdd) {\n mutations.addAll(mutationsToAdd);\n }", "@Test\n public void testMutation() {\n AbstractMutation mutation = Mockito.mock(AbstractMutation.class);\n strand.addMutation(mutation);\n assertEquals(strand.getMutations().size(), 1);\n assertEquals(strand.getMutations().get(0), mutation);\n }", "public void setMutationMethod(Mutation m){\n mutationType = m;\n }", "void buffer(Mutation mutation);", "private void recordMutation(@NonNull TagGroupsMutation mutation) {\n synchronized (recordLock) {\n List<MutationRecord> records = getMutationRecords();\n\n // Add new record\n records.add(new MutationRecord(clock.currentTimeMillis(), mutation));\n\n // Sort entries by oldest first\n Collections.sort(records, new Comparator<MutationRecord>() {\n @Override\n public int compare(@NonNull MutationRecord lh, @NonNull MutationRecord rh) {\n if (lh.time == rh.time) {\n return 0;\n }\n if (lh.time > rh.time) {\n return 1;\n }\n return -1;\n }\n });\n\n dataStore.put(RECORDS_KEY, JsonValue.wrapOpt(records));\n }\n }", "public static void remove(Mutation mutation) {\n mutations.remove(mutation);\n }", "MutationBatch addMutationBatch(\n Timestamp localWriteTime, List<Mutation> baseMutations, List<Mutation> mutations);", "java.util.List<Googleplay.LibraryMutation> \n getMutationList();", "public void setMutationFactor(Double mutationFactor) {\n this.mutationFactor = mutationFactor;\n }", "public CommitLogPosition add(Mutation mutation) throws CDCWriteException\n {\n assert mutation != null;\n\n mutation.validateSize(MessagingService.current_version, ENTRY_OVERHEAD_SIZE);\n\n try (DataOutputBuffer dob = DataOutputBuffer.scratchBuffer.get())\n {\n Mutation.serializer.serialize(mutation, dob, MessagingService.current_version);\n int size = dob.getLength();\n int totalSize = size + ENTRY_OVERHEAD_SIZE;\n Allocation alloc = segmentManager.allocate(mutation, totalSize);\n\n CRC32 checksum = new CRC32();\n final ByteBuffer buffer = alloc.getBuffer();\n try (BufferedDataOutputStreamPlus dos = new DataOutputBufferFixed(buffer))\n {\n // checksummed length\n dos.writeInt(size);\n updateChecksumInt(checksum, size);\n buffer.putInt((int) checksum.getValue());\n\n // checksummed mutation\n dos.write(dob.unsafeGetBufferAndFlip());\n updateChecksum(checksum, buffer, buffer.position() - size, size);\n buffer.putInt((int) checksum.getValue());\n }\n catch (IOException e)\n {\n throw new FSWriteError(e, alloc.getSegment().getPath());\n }\n finally\n {\n alloc.markWritten();\n }\n\n executor.finishWriteFor(alloc);\n return alloc.getCommitLogPosition();\n }\n catch (IOException e)\n {\n throw new FSWriteError(e, segmentManager.allocatingFrom().getPath());\n }\n }", "public interface Mutation {\n\t\n /**\n * Compares the type of this mutation to {@code m}\n * \n * @param m\n * The mutation to compare with\n * @return Whether this mutation is the same type as {@code m}\n */\n boolean equals(Mutation m);\n \n /** Mutates a node*/\n boolean Mutate(Node n);\n \n public void initiate(Program p);\n \n public String type();\n \n}", "List<com.google.bigtable.v2.Mutation> getMutations() {\n return mutations.build();\n }", "protected abstract void performMutation(Context context);", "public interface IMutationOperator extends IDescriptable, Opcodes {\n\t/**\n\t * Gets all possible points in given class (bytecode) where different\n\t * mutants can be produced.\n\t *\n\t * @param bytecode bytecode to be analyzed\n\t * @return list of mutation points witihn given class (bytecode)\n\t */\n\tList<IMutationPoint> getMutationPoints(byte[] bytecode);\n\n\t/**\n\t * Mutate given bytecode to create mutants with given mutation points.\n\t *\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPoint mutation point in given class (bytecode)\n\t * @return list of mutants created within given point\n\t */\n\tList<IMutantBytecode> mutate(byte[] bytecode, IMutationPoint mutationPoint);\n\n\t/**\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPointIndex mutation point in given class (bytecode)\n\t * @param mutantIndex specific mutant index within given point\n\t * @return mutated bytecode - mutant\n\t */\n\tIMutantBytecode mutate(byte[] bytecode, int mutationPointIndex, int mutantIndex);\n}", "void mutate(MutationDocumentContext context, MutationConfig config);", "public void add(MiningTask mt) {\n miningTasks.add(mt);\n }", "long mainAppendMutationFromUpstream(ConfigEntry peer, long upstreamTermNumber, long previousMutationTermNumber, MutationRecord mutation);", "private void addOp(final Op op) {\n result.add(op);\n }", "MutationsQuery<T, K> mutate();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
carga la tabla y premios
public void cargarTablaPremios() { this.txtGanador.setText(""); this.tabla.setRowCount(0); this.tabla.fireTableDataChanged(); String moneda = this.traerTipoMoneda(); SimpleDateFormat formato = new SimpleDateFormat("yyyy/MM/dd"); String fecha = formato.format(this.dateFecha.getDate()); String v[] = this.txtLoteria.getText().split("-"); int codigo = Integer.parseInt(v[0]); this.premios = this.principal.getFachada().consultarPremiosXFechaXMoneda(fecha, moneda, codigo); this.txtCantidad.setText(this.premios.size() + ""); NumberFormat formatoNumero = NumberFormat.getNumberInstance(); int totalPremio = 0; int totalValor = 0; if(!this.premios.isEmpty()){ this.txtGanador.setText("Numero ganador: "+this.premios.get(0).getNumeroGanador()); } for (PremioDto dto : this.premios) { this.tabla.fireTableDataChanged(); String registro[] = new String[10]; registro[0] = dto.getSerial(); registro[1] = dto.getFecha(); registro[2] = dto.getPersona().getCodigo() + ""; registro[3] = dto.getMoneda(); registro[4] = dto.getPagado() + ""; registro[5] = dto.getConsecutivo() + ""; registro[6] = dto.getDetPremio().getLoteria().getCodigoNombre() + ""; registro[7] = dto.getDetPremio().getTipoPremio().getTipoNombre() + ""; registro[8] = dto.getDetPremio().getValorFormato(); registro[9] = dto.getDetPremio().getPremioFormato() + ""; this.tabla.addRow(registro); this.tabla.fireTableDataChanged(); totalPremio += dto.getDetPremio().getPremio(); totalValor += dto.getDetPremio().getValor(); } this.txtPremio.setText(formatoNumero.format(totalPremio)); this.txtValor.setText(formatoNumero.format(totalValor)); }
[ "private void cargarTabla() {\n\t\tObject[] fila = new Object[7];\r\n\t\tfila[1] = txtCedula.getText();\r\n\t\tfila[2] = txtFuncionario.getText();\r\n\t\tfila[3] = util.getDateToString(dcDesde.getDate());\r\n\t\tif (cbTipo.getSelectedIndex() == 1 || cbTipo.getSelectedIndex() == 2) {\r\n\t\t\tfila[4] = util.getDateToString(dcDesde.getDate());\r\n\t\t} else {\r\n\t\t\tfila[4] = util.getDateToString(dcHasta.getDate());\r\n\t\t}\r\n\t\tfila[5] = cbTipo.getSelectedItem();\r\n\t\tfila[6] = txtMotivo.getText().toUpperCase();\r\n\t\tthis.modelo.addRow(fila);\r\n\t\ttbJustificaciones.setModel(this.modelo);\r\n\t}", "public void createTable() {\n try {\n tableLayout = findViewById(R.id.tabla);\n tb = new TableDinamic(tableLayout, getApplicationContext(), \"cargarDetalle\", clc, cap_1, cap_2, cap_ct, txtidReg, txtId, txtBloque, txtVariedad);\n tableLayout.removeAllViews();\n tb.addHeader(header);\n tb.addData(cargarTabla());\n tb.backgroundHeader(\n Color.parseColor(\"#20C0FF\")\n );\n tb.backgroundData(\n Color.parseColor(\"#FFFFFF\"),\n Color.parseColor(\"#81F0EDED\")\n );\n } catch (Exception e) {\n Toast.makeText(this, \"Error de la table: \" + e.toString(), Toast.LENGTH_LONG).show();\n }\n }", "private void cargarColumnasTabla() {\n\n modeloTabla.addColumn(\"Fecha\");\n modeloTabla.addColumn(\"Partida N°\");\n modeloTabla.addColumn(\"Ingreso\");\n modeloTabla.addColumn(\"Egreso\");\n\n }", "private void porDefectoTareas(){\r\n MostrarParteTarea(false);\r\n tblTareas.getColumns().clear();\r\n CargarTareas(tblTareas, conexion, \"Ninguna\");\r\n }", "public void llenadoDeTablas() {\n \n DefaultTableModel modelo1 = new DefaultTableModel();\n modelo1 = new DefaultTableModel();\n modelo1.addColumn(\"ID Usuario\");\n modelo1.addColumn(\"NOMBRE\");\n UsuarioDAO asignaciondao = new UsuarioDAO();\n List<Usuario> asignaciones = asignaciondao.select();\n TablaPerfiles.setModel(modelo1);\n String[] dato = new String[2];\n for (int i = 0; i < asignaciones.size(); i++) {\n dato[0] = (Integer.toString(asignaciones.get(i).getId_usuario()));\n dato[1] = asignaciones.get(i).getNombre_usuario();\n\n modelo1.addRow(dato);\n }\n }", "public void tabla_campos() {\n int rec = AgendarA.tblAgricultor.getSelectedRow();// devuelve un entero con la posicion de la seleccion en la tabla\n ccAgricultor = AgendarA.tblAgricultor.getValueAt(rec, 1).toString();\n crearModeloAgenda();\n }", "private void configurarTabela() {\n TableColumn<Hospede, String> colNome = new TableColumn(\"Nome\");\r\n TableColumn<Hospede, LocalDate> colNascimento = new TableColumn(\"Nascimento\");\r\n TableColumn<Hospede, String> colCelular = new TableColumn(\"Celular\");\r\n\r\n //Configurar como os valores serão lidos (nome dos atributos)\r\n colNome.setCellValueFactory(new PropertyValueFactory<Hospede, String>(\"nome\"));\r\n colNascimento.setCellValueFactory(new PropertyValueFactory<Hospede, LocalDate>(\"dataNascimentoFormatada\"));\r\n colCelular.setCellValueFactory(new PropertyValueFactory<Hospede, String>(\"celular\"));\r\n\r\n //Configurando a largura das colunas da tabela\r\n tabelaHospedes.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);\r\n colNome.setMaxWidth(1f * Integer.MAX_VALUE * 50); // 20% width\r\n colNascimento.setMaxWidth(1f * Integer.MAX_VALUE * 25); // 20% width\r\n colCelular.setMaxWidth(1f * Integer.MAX_VALUE * 25); // 20% width\r\n\r\n //Adiciona as colunas na tabela na ordem que devem aparecer\r\n tabelaHospedes.getColumns().addAll(colNome, colNascimento, colCelular);\r\n\r\n }", "private void cargarColumnasTareasProyecto(TableView<Usuario_has_Tareas> table) {\r\n TableColumn tblCTarea = new TableColumn(idioma.getProperty(\"Tarea\"));\r\n tblCTarea.setCellValueFactory(new PropertyValueFactory<Usuario_has_Tareas, String>(\"Tarea\"));\r\n tblCTarea.setMinWidth(160);\r\n \r\n TableColumn tblCEmpleado = new TableColumn(idioma.getProperty(\"Empleado\"));\r\n tblCEmpleado.setCellValueFactory(new PropertyValueFactory<Usuario_has_Tareas, String>(\"Empleado\"));\r\n tblCEmpleado.setMinWidth(160);\r\n TableColumn tblCEstado = new TableColumn(idioma.getProperty(\"Estado\"));\r\n tblCEstado.setCellValueFactory(new PropertyValueFactory<Usuario_has_Tareas, String>(\"Estado\"));\r\n tblCEstado.setMinWidth(113);\r\n TableColumn tblCIteraciones = new TableColumn(idioma.getProperty(\"Iteraciones\"));\r\n tblCIteraciones.setCellValueFactory(new PropertyValueFactory<Usuario_has_Tareas, String>(\"Iteraciones\"));\r\n tblCIteraciones.setMinWidth(80);\r\n table.getColumns().addAll(tblCTarea, tblCEmpleado, tblCEstado, tblCIteraciones);\r\n }", "private void preencherTabela() {\n\t\tList<Cidade> listCidade;\n\t\tCidadeDAO cidadeDAO;\n\t\tObservableList<Cidade> oListCidade;\n\n\t\t// Determina os atributos que irão preencher as colunas\n\t\tcolCidade.setCellValueFactory(new PropertyValueFactory<>(\"nomeCidades\"));\n\t\tcolEstado.setCellValueFactory(new PropertyValueFactory<>(\"nomeEstado\"));\n\t\tcolSigla.setCellValueFactory(new PropertyValueFactory<>(\"siglaEstado\"));\n\t\tcolCodigoCidade.setCellValueFactory(new PropertyValueFactory<>(\"idCidade\"));\n\t\tcolIdEstado.setCellValueFactory(new PropertyValueFactory<>(\"idEstado\"));\n\n\t\t// Instancia a lista de cidades e a DAO\n\t\tlistCidade = new ArrayList<Cidade>();\n\t\tcidadeDAO = new CidadeDAO();\n\n\t\t// Chama o metodo para selecionar todas as cidades e atribuir a lista\n\t\tlistCidade = cidadeDAO.selecionar();\n\n\t\t// Converte a lista de cidades em observablearray\n\t\toListCidade = FXCollections.observableArrayList(listCidade);\n\n\t\t// Adiciona a lista na tabela\n\t\ttblCidades.setItems(oListCidade);\n\t}", "public void llenarTabla() {\n\n String matriz[][] = new String[lPComunes.size()][2];\n\n for (int i = 0; i < AccesoFichero.lPComunes.size(); i++) {\n matriz[i][0] = AccesoFichero.lPComunes.get(i).getPalabra();\n matriz[i][1] = AccesoFichero.lPComunes.get(i).getCodigo();\n\n }\n\n jTableComun.setModel(new javax.swing.table.DefaultTableModel(\n matriz,\n new String[]{\n \"Palabra\", \"Morse\"\n }\n ) {// Bloquea que las columnas se puedan editar, haciendo doble click en ellas\n @SuppressWarnings(\"rawtypes\")\n Class[] columnTypes = new Class[]{\n String.class, String.class\n };\n\n @SuppressWarnings({\"unchecked\", \"rawtypes\"})\n @Override\n public Class getColumnClass(int columnIndex) {\n return columnTypes[columnIndex];\n }\n boolean[] columnEditables = new boolean[]{\n false, false\n };\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return columnEditables[column];\n }\n });\n\n }", "public void cargarTabla(JTable table) {\n\t\tList<CocheTaller> coches = mecanicoController.cargarTablaCocheTaller();\n\t\t\n\t\tString[] columnNames = {\"Marticula\", \"Marca\", \"Modelo\", \"DNI Cliente\", \"Mecanico\", \"Coste\", \"Estado\"};\n\t\t\n\t\tif (!coches.isEmpty()) {\n\t\t\t DefaultTableModel model = new DefaultTableModel();\n\t\t\t table.setModel(model);\n\t\t\t model.setColumnIdentifiers(columnNames);\n\t\t\t \n\t\t\t for (CocheTaller c : coches) {\n\t\t\t\t Object[] o = new Object[7];\n\t\t\t\t o[0] = c.getMatricula();\n\t\t\t\t o[1] = c.getMarca();\n\t\t\t\t o[2] = c.getModelo();\n\t\t\t\t o[3] = c.getDniCliente();\n\t\t\t\t o[4] = c.getMecanico();\n\t\t\t\t o[5] = c.getCoste() + \"€\";\n\t\t\t\t o[6] = mecanicoController.traducirEstado(c.getEstado());\n\t\t\t\t model.addRow(o);\n\t\t\t\t }\n\t\t} else {\n\t\t\tlogger.error(\"No llegan correctamente los CocheTaller\");\n\t\t}\n\t}", "private void cargarColumnasTareas(TableView<Tarea> table) {\r\n TableColumn tblCNombre = new TableColumn(idioma.getProperty(\"Nombre\"));\r\n tblCNombre.setCellValueFactory(new PropertyValueFactory<Tarea, String>(\"Nombre\"));\r\n tblCNombre.setMinWidth(367.5);\r\n TableColumn tblCDescripcion = new TableColumn(idioma.getProperty(\"Descripcion\"));\r\n tblCDescripcion.setCellValueFactory(new PropertyValueFactory<Tarea, String>(\"Descripcion\"));\r\n tblCDescripcion.setMinWidth(367.5);\r\n table.getColumns().addAll(tblCNombre, tblCDescripcion);\r\n }", "private void cargarTablaEnvios() {\n modeloEnvios.setEnvios(ed.listar());\n tblenvios.setModel(modeloEnvios);\n tblenvios.updateUI();\n }", "protected void escribirTabla(Document doc, PaginaTabla pagina,\n\t\t\tOutputStream baos) throws Exception {\n\t\tint numColumnas = getEncabezadosColumnas().size();\n\t\t/*\n\t\t * int numColumnasReales = numColumnas; if (columnasOcultas != null) {\n\t\t * numColumnasReales = numColumnas - columnasOcultas.length; }\n\t\t */\n\n\t\tPdfPTable datatable = null;\n\t\ttry {\n\t\t\t/** Definie estilos para la tabla */\n\n\t\t\tdatatable = new PdfPTable(numColumnas - 1);\n\t\t\t// Data texto = null;\n\t\t\tString texto = null;\n\t\t\tPhrase valorCelda;\n\t\t\t// datatable.setDefaultCellBorderWidth(2);\n\t\t\t// datatable.setBorder(0);\n\t\t\t// datatable.setBorderColor(Color.GRAY);\n\t\t\t// datatable.setWidth(100f);\n\t\t\t// datatable.setVerticalAlignment(Element.ALIGN_MIDDLE);\n\t\t\t// datatable.setSpaceInsideCell(2);\n\n\t\t\t/** Llenar datos en tabla */\n\t\t\tIterator iEncabezados = getEncabezadosColumnas().iterator();\n\t\t\tFont letraEncabezado = FontFactory.getFont(\n\t\t\t\t\tgetTipoLetraEncabezados(), getTamanoLetraEncabezados());\n\n\t\t\t// datatable.setHorizontalAlignment(Element.ALIGN_CENTER);\n\t\t\t// datatable.setLastHeaderRow(0);\n\t\t\tFont letra = FontFactory.getFont(getTipoLetra(), getTamanoLetra());\n\t\t\t/** Llena lo titulos de las columnas */\n\t\t\tList ocultas = new ArrayList();\n\t\t\tfor (int i = 0; i < numColumnas && iEncabezados.hasNext(); i++) {\n\t\t\t\tString valida = ((Data) iEncabezados.next()).getDisplayName();\n\t\t\t\tif (isOculta(valida)) {\n\t\t\t\t\ttexto = valida;\n\t\t\t\t\tocultas.add(new Integer(i));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\ttexto = valida;\n\t\t\t\tvalorCelda = new Phrase(texto, letraEncabezado);\n\t\t\t\t// encabezados.add(texto);\n\t\t\t\tPdfPCell celda = new PdfPCell(valorCelda);\n\t\t\t\tdatatable.addCell(celda);\n\t\t\t}// while encabezados\n\t\t\t// datatable.setLastHeaderRow(0);\n\t\t\t/** Llena las Celdas */\n\t\t\tList subFilas;\n\t\t\t/** Machetazo porque sublist no funciona bien con un solo elemento */\n\t\t\tif (pagina.getPosInicial() == pagina.getPosFinal()) {\n\t\t\t\tsubFilas = new ArrayList();\n\t\t\t\tsubFilas.add(getFilas().get(pagina.getPosInicial()));\n\t\t\t} else {\n\t\t\t\tsubFilas = getFilas().subList(pagina.getPosInicial(),\n\t\t\t\t\t\tpagina.getPosFinal() + 1); // Se le suma porque es\n\t\t\t\t// exclusivo al final,\n\t\t\t\t// entonces para que no bote\n\t\t\t\t// la última fila.\n\t\t\t}\n\t\t\tIterator iFilas = subFilas.iterator();\n\t\t\tboolean x = iFilas.hasNext();\n\t\t\twhile (iFilas.hasNext()) {\n\t\t\t\tObject o = iFilas.next();\n\t\t\t\tif (o instanceof Hashtable) {\n\t\t\t\t\tHashtable celdas = ((Hashtable) o);\n\t\t\t\t\t// Iterator namesColumns = celdas.keySet().iterator();\n//\t\t\t\t\tString[] columnNames = new String[] { \"dependenciaRemite\",\n//\t\t\t\t\t\t\t\"numRad\", \"descripcionAnexos\", \"dependenciaRecibe\",\n//\t\t\t\t\t\t\t\"fechaRad\", \"\" };\n\t\t\t\t\t//TODO. verificar las columnas para los tipos de comunicacion\n\t\t\t\t\tString[] columnNames = new String[] { \"Origen\",\n\t\t\t\t\t\t\t\"Radicado\", \"Anexos\", \"Destinatario\",\n\t\t\t\t\t\t\t\"FechaRadicado\", \"\" };\n\n\t\t\t\t\t\n\t\t\t\t\tfor (int i = 0; i < columnNames.length; i++) { // i <\n\t\t\t\t\t\t// numColumnas\n\t\t\t\t\t\t\n\t\t\t\t\t\tString valida = columnNames[i];\n\t\t\t\t\t\t//\n\t\t\t\t\t\tvalida= (i!=3)?valida:\"DependenciaDestino\";\n\t\t\t\t\t\tif (isOculta(valida)) {\n\t\t\t\t\t\t\ttexto = valida;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// + if (namesColumns.hasNext()) {\n\t\t\t\t\t\tif (valida.length() > 0) {\n\t\t\t\t\t\t\ttexto = valida;\n\t\t\t\t\t\t\tvalorCelda = null;\n\t\t\t\t\t\t\tif (celdas.get(texto) instanceof Date) {\n\t\t\t\t\t\t\t\tString fecha = ((Date) celdas.get(texto))\n\t\t\t\t\t\t\t\t\t\t.toGMTString();\n\t\t\t\t\t\t\t\tvalorCelda = new Phrase(fecha, letra);\n\t\t\t\t\t\t\t} else if (texto.length() > 0) {\n\t\t\t\t\t\t\t\tif (celdas.get(texto) != null)\n\t\t\t\t\t\t\t\t\tvalorCelda = new Phrase(celdas.get(texto)\n\t\t\t\t\t\t\t\t\t\t\t.toString(), letra);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tvalorCelda = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (valorCelda != null)\n\t\t\t\t\t\t\t\tdatatable.addCell(valorCelda);\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdatatable.addCell(\"\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}// for i\n\t\t\t}// while iFilas.hasNext()\n\t\t\tdoc.add(datatable);\n\t\t} catch (Exception e) {\n\t\t\tdatatable = null;\n\t\t\tthrow e;\n\t\t}\n\t}", "private void preencheTable(){\n\t\t\n\t\tlistaArquivos.setItemCount(0);\n\t\t\n\t\tfor(File f : arquivos){\n\t\t\tTableItem it = new TableItem(listaArquivos, SWT.NONE);\n\t\t\tit.setText(0, f.getName());\n\t\t\tit.setText(1, formataDouble(f.length()));\n\t\t\tit.setText(2, formataData(f.lastModified()));\n\t\t}\n\t\t\n\t}", "public void crearTabla() {\n\t\tthis.tabla= new String[palabras.length+1][4];\t\n\t}", "public void carregarTabela() {\n\t\ttry {\n\t\t\tcontrole.buscaClientesNome(tfPesquisa.getText());\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttbvPesqCliente.setItems(controle.getLista());\n\t}", "public void reiniciaTablero(){\n iniciada = false;\n finalizada = -1;\n jugadores = null;\n jugadores = new ArrayList<Bebedor>();\n ficha = null;\n ficha = new int[maximoJugadores];\n restantes = null;\n restantes = new int[maximoJugadores];\n }", "public void cargarTablas(){\n ControladorEmpleados empleados= new ControladorEmpleados();\n ControladorProyectos proyectos= new ControladorProyectos();\n ControladorCasos casos= new ControladorCasos();\n actualizarListadoObservable(empleados.consultarEmpleadosAdminProyectos(ESTADO_ASIGNADO, TIPO_3),casos.consultarCasos(devolverUser()),casos.consultarTiposCaso());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
cleans up empty burstPairs in thread
private void cleanUp(Thread thread) { if (thread.getBurstPairs().get(0).getCpuBurst() == 0 && thread.getBurstPairs().get(0).getIoBurst() == 0) thread.getBurstPairs().remove(0); }
[ "private void discardQueued() {\n ChannelBuffer buf;\n\n while (outQueueHead != null) {\n buf = outQueueHead;\n outQueueHead = buf.next;\n recycleBuffer(buf, false);\n }\n outQueueHead = null;\n outQueueTail = null;\n }", "private void lazyCleanup() {\n\t\twhile(!_mergePairTreeMap.isEmpty()) {\n\t\t\t// Purging from the lowest rank\n\t\t\tEntry<Long, List<MergePair>> entry = _mergePairTreeMap.firstEntry();\n\t\t\tList<MergePair> mergePairs = entry.getValue();\n\t\t\twhile(!mergePairs.isEmpty()) {\n\t\t\t\tMergePair mergePair = mergePairs.get(0);\n\t\t\t\t// Stop until we see a pair that should not be purged\n\t\t\t\tif(isNodeMerged(mergePair.getLeft()) || \n\t\t\t\t\t\tisNodeMerged(mergePair.getRight())) {\n\t\t\t\t\tmergePairs.remove(0);\n\t\t\t\t} else {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t_mergePairTreeMap.remove(entry.getKey());\n\t\t}\n\t}", "private void remove_elements() throws InterruptedException {\n while (buffer.getNumElementsInBuffer() > 0 || !this.threadComplete) {\n if (hasServerRemovedAllElements()) {\n return;\n }\n if (buffer.attemptRemove(this)) {\n elementsRemoved++;\n }\n //Thread.sleep(1); // For testing buffer being frequently full\n }\n }", "public synchronized void clear() {\n\t\tevenQueue.clear();\n\t\toddQueue.clear();\n\t}", "public void clear(){\n polled.clear();\n queue.clear();\n player.stopTrack();\n }", "public void run() {\n\t\tBag cleanedBag;\n\t\twhile (!interrupted()) {\n\t\t\ttry {\n\t\t\t\t// take cleaned bag from scanner\n\t\t\t\t// only when the short belt is empty \n\t\t\t\t// or the first segment is available\n\t\t\t\tsynchronized (belt) {\n\t\t\t\t\tif (belt.peek(0) == null) {\n\t\t\t\t\t\tcleanedBag = scanner.getBag();\n\t\t\t\t\t\tSystem.out.println(\"cleaned:\" + cleanedBag.toString()\n\t\t\t\t\t\t\t\t+ \" has been got by Robot\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t// robot spends some time on transferring bag\n\t\t\t\t\t\tsleep(TRANSFER_TIME);\n\t\t\t\t\t\tbelt.put(cleanedBag, 0);\n\t\t\t\t\t\tSystem.out.println(\"cleaned Bag return:\"\n\t\t\t\t\t\t\t\t+ cleanedBag.toString());\n\t\t\t\t\t}\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}", "private void doIo() {\n Queue<Thread> enqueue = new ArrayDeque<>();\n List<Thread> delete = new ArrayList<>();\n for (Thread thread : ioList) {\n thread.getBurstPairs().get(0).decreaseIoBurst();\n cleanUp(thread);\n if (thread.getBurstPairs().isEmpty()) {\n delete.add(thread);\n } else if (thread.getBurstPairs().get(0).getCpuBurst() > 0) {\n enqueue.add(thread);\n }\n }\n enqueue(enqueue);\n ioList.removeAll(enqueue);\n ioList.removeAll(delete);\n }", "public void unPair() {\n if (this.pairedWithID!= 0) {\r\n this.pairedWithID = 0;\r\n Turkey.pairedCount -= 2;\r\n Turkey.unpairedCount += 2;\r\n }\r\n }", "public void clearQueuedPassengers(){\n this._queuedPassengers = 0;\n }", "private void performGC() {\n for(int i = futures.size() - 1; i >= 0; i--) {\n if(futures.get(i).isDone()) {\n futures.remove(i);\n }\n }\n }", "public void cleanupOldBlocks (long threshTime) ;", "public void stopCollection() {\r\n for(int i=0;i<sber.size();i++){\r\n sber.get(i).setRunning(false);\r\n try {\r\n GSMsberThread.get(i).join();\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(SurveillanceThread.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n sber.clear();\r\n GSMsberThread.clear();\r\n }", "public void removeAllDevices(){\n rescheduleQueue.clear();\n threadManager.terminateAll();\n }", "private void resetBurst(){\n\t\tif (directionBurstTime + burstExpiresIn < System.currentTimeMillis()){\n\t\t\tdirectionBurst = 0;\t\n\t\t}\n\t\tif (speedBurstTime + burstExpiresIn < System.currentTimeMillis()){\n\t\t\tspeedBurst = 0;\n\t\t}\n\t}", "public void clearQueue(){\n\t\tremoveAllElements();\n\t}", "private void clearLogBufferQueueWhenBlocked() {\n if (logBufferQue.size() >= getLogQueueCapacity()) {\n int removeNum = getLogQueueCapacity() / 5;\n while (removeNum > 0) {\n try {\n LogEvent loggingEvent = logBufferQue.take();\n printLoggingEvent(loggingEvent);\n } catch (Exception ex) {\n StatusLogger.getLogger().error(\"Take event interrupted!\", ex);\n }\n removeNum--;\n }\n }\n }", "public void clear(){\r\n\t\tqueue.clear();\r\n\t}", "private void carsLeaving() {\n \tint i = 0;\n \twhile(exitQueue.carsInQueue() > 0 && i < exitSpeed){\n exitQueue.removeCar();\n i++;\n \t}\t\n }", "private void removeDeadThreads() {\r\n\t \tfor (int i = 0; i < players.size(); i++) {\r\n\t\t\t\tif (players.get(i).getDisconnected()) {\r\n\t \t\t\tSystem.out.println(\"Thread \" + Thread.currentThread().getId() + \": Player \" + players.get(i).getPName() + \" removed from list\");\r\n\t \t\t\tplayers.removeElementAt(i);\r\n\t \t\t}\r\n\t \t}\r\n\t }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates the querystring objects
public void GenerateQueryString() throws HttpRequestParsingException { try { m_QueryString = new LinkedHashMap<HttpQueryStringType, LinkedHashMap<String, String>>(); // did we get any params from the URI? int paramSeperator = m_RequestedURI.indexOf('?'); if (paramSeperator != -1) { // yes we can! String params = m_RequestedURI.substring(paramSeperator + 1, m_RequestedURI.length()); m_QueryString.put(HttpQueryStringType.GET, parseQueryString(params)); } // did we get any in the content (POST?) if (GetContentSize() > 0 && GetMethod().equals(HttpRequestMethod.POST)) { String params = new String(GetContent()); m_QueryString.put(HttpQueryStringType.POST, parseQueryString(params)); } } catch (Exception e) { // something bad happen, we do not have the query string m_QueryString = null; throw new HttpRequestParsingException("Error parsing Query String", e); } }
[ "public String generateQueryString() {\n QueryString qs = new QueryString();\n\n // build query\n if(this.cursor != null) qs.add(\"cursor\", this.cursor);\n if(this.getLimit() > 0) qs.add(\"limit\",Integer.toString(this.getLimit()));\n if (this.getKeyword() != null) qs.add(\"keyword\", this.getKeyword());\n if (this.getSlugs() != null) qs.add(\"slug\",this.getSlugs());\n if (this.getOrigin() != null) qs.add(\"origin\", this.getOrigin());\n if (this.getDestinations() != null) qs.add(\"destination\",this.getDestinations());\n if (this.getTags() != null) qs.add(\"tag\",this.getTags());\n if (this.getCreatedAtMin() != null) qs.add(\"created_at_min\", DateMethods.toString(this.getCreatedAtMin()));\n if (this.getCreatedAtMax() != null) qs.add(\"created_at_max\", DateMethods.toString(this.getCreatedAtMax()));\n if (this.getFields() != null) qs.add(\"fields\",this.getFields());\n if (this.getLang() != null)qs.add(\"lang\", this.getLang());\n\n String generatedQuery = qs.getQuery();\n if(!generatedQuery.isEmpty()) {\n generatedQuery = '?' + generatedQuery;\n generatedQuery = generatedQuery.replaceFirst(\"&\", \"\");\n }\n return generatedQuery;\n }", "public String createQueryString() {\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\r\n\t\tSet<Map.Entry<String, Object>> set = queryParams.entrySet();\r\n\t\tEnumeration<Map.Entry<String, Object>> en = Collections.enumeration(set);\r\n\t\ttry\r\n\t\t{\r\n\t\t\twhile (en.hasMoreElements())\r\n\t\t\t{\r\n\t\t\t\tMap.Entry<String, Object> entry = en.nextElement();\r\n\t\t\t\tString key = entry.getKey();\r\n\t\t\t\tObject val = entry.getValue();\r\n\t\t\t\tif (val instanceof String)\r\n\t\t\t\t{\r\n\t\t\t\t\tString s = null;\r\n\t\t\t\t\ts = (String) val;\r\n\t\t\t\t\ts = URLEncoder.encode(s, \"US-ASCII\");\r\n\t\t\t\t\tsb.append(\"&\").append(key).append(\"=\").append(s);\r\n\t\t\t\t}\r\n\t\t\t\telse if (val instanceof String[])\r\n\t\t\t\t\tsb.append(\"&\").append(getNameValueString(key, (String[]) val));\r\n\t\t\t}\r\n\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\r\n\t\treturn sb.substring(1);\r\n\t}", "private String generateQueryString(Map<String, String> args) {\n StringBuilder url = new StringBuilder();\n\n // Create the query string (?foo=bar&key1=val1\n url.append(\"?\");\n for (Iterator<Map.Entry<String, String>> it = args.entrySet().iterator(); it.hasNext(); ) {\n Map.Entry<String, String> entry = it.next();\n\n url.append(urlEncode(entry.getKey()));\n url.append(\"=\");\n url.append(urlEncode(entry.getValue()));\n if (it.hasNext()) {\n // More parameters are coming, add a separator\n url.append(\"&\");\n }\n }\n\n return url.toString();\n }", "protected String createQueryString() {\r\n\t\tassert !this.hasBinaryAttachments;\r\n\t\t\r\n\t\tif (this.params.isEmpty())\r\n\t\t\treturn \"\";\r\n\t\t\r\n\t\tStringBuilder bld = null;\r\n\t\t\r\n\t\tfor (Map.Entry<String, Object> param: this.params.entrySet()) {\r\n\t\t\tif (bld == null)\r\n\t\t\t\tbld = new StringBuilder();\r\n\t\t\telse\r\n\t\t\t\tbld.append('&');\r\n\t\t\t\r\n\t\t\tbld.append(StringUtils.urlEncode(param.getKey()));\r\n\t\t\tbld.append('=');\r\n\t\t\tbld.append(StringUtils.urlEncode(param.getValue().toString()));\r\n\t\t}\r\n\t\t\r\n\t\treturn bld.toString();\r\n\t}", "protected String createQueryString() {\n StringBuilder variables = new StringBuilder();\n StringBuilder paths = new StringBuilder();\n StringBuilder namespaces = new StringBuilder();\n Set<String> addedNamespaces = new HashSet<String>();\n \n for (Select select : selectPaths.values()) {\n addTo(variables, select.getVariable());\n addTo(paths, select.getPath());\n for (Namespace namespace : select.getNamespaces()) {\n if (!addedNamespaces.contains(namespace.getPrefix())) {\n addedNamespaces.add(namespace.getPrefix());\n addTo(namespaces, namespace.getPrefix() + \"=<\" + namespace.getURI() + \">\");\n }\n }\n }\n \n StringBuilder statement = new StringBuilder(\"SELECT \");\n if (distinct) statement.append(\"DISTINCT \");\n statement.append(variables);\n statement.append(\" FROM \");\n statement.append(paths);\n statement.append(' ');\n if (limit > -1) {\n statement.append(\"LIMIT \");\n statement.append(limit);\n statement.append(' ');\n }\n if (offset > 0) {\n statement.append(\"OFFSET \");\n statement.append(offset);\n statement.append(' ');\n }\n\n if(whereClause != null) {\n String clause = whereClause.getClause();\n if (!clause.trim().isEmpty()) {\n statement.append(\"WHERE \");\n statement.append(whereClause.getClause());\n statement.append(' ');\n }\n }\n if (namespaces.length() > 0) {\n statement.append(\"USING NAMESPACE \");\n statement.append(namespaces);\n }\n return statement.toString();\n }", "private static String buildQueryString(Multimap<String, String> params) {\n StringBuilder bld = new StringBuilder();\n\n boolean afterFirst = false;\n for (Map.Entry<String, String> entry : params.entries()) {\n if (afterFirst)\n bld.append(\"&\");\n else\n afterFirst = true;\n\n bld.append(urlEncode(entry.getKey()));\n bld.append(\"=\");\n checkNotNull(entry.getValue(), format(\"query parameter[%s] has no value\", entry.getKey()));\n bld.append(urlEncode(entry.getValue()));\n }\n\n return bld.toString();\n }", "public String buildQueryString() throws UnsupportedEncodingException {\n return buildString(\"?\");\n }", "String getQueryString ();", "private String createQueryString() {\n\t\t\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd\");\n\t\tString query = \"\";\n\t\tif(userIngredients.containsKey(FROM_KEY))\n\t\t\tquery += \"from:\" + userIngredients.get(FROM_KEY);\n\t\tif(getLastRefresh()==null){\n\t\t\tDate d = new Date();\n\t\t\tthis.lastRefresh = new Date(d.getTime() - 1 * 24 * 3600 * 1000 ); //Subtract 1 days \n\t\t}\n\t\tquery += \" after:\" + dateFormat.format(getLastRefresh());\n\t\tSystem.out.println(\"Query: \" + query);\n\t\treturn query;\n\t}", "public String toQueryUrl() {\n StringBuilder urlBuilder = new StringBuilder();\n Set<Map.Entry<String, Object>> entrySet = params.entrySet();\n int i = entrySet.size();\n for (Map.Entry<String, Object> entry : entrySet) {\n try {\n if (null != entry.getValue()) {\n urlBuilder.append(entry.getKey()).append('=')\n .append(URLEncoder.encode(String.valueOf(entry.getValue()), DEFAULT_ENC));\n if (i > 1) {\n urlBuilder.append('&');\n }\n }\n i--;\n } catch (UnsupportedEncodingException e) {\n throw new RuntimeException(e);\n }\n }\n \n return urlBuilder.toString();\n }", "private String createQueryString() {\n\t\tString result = \"// [Queries]\\n\"+\n\t\t\t\t\"// Queries are commented out, because they need to be passed via the console, not in the file.\\n\"\n\t\t\t\t+ \"// The corresponding query strings are (1 per line):\\n\";\n\t\tArrayList<String> queries = transformQueries();\n\t\t\n\t\tfor (String q: queries) {\n\t\t\tresult += \"// \" + q + \"\\n\";\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public void createURL(){\n\t\t//Concatenate separate portions\n\t\tthis.url = new String(this.base_url + this.query_url + this.keyword);\n\t}", "public String getQueryParamsAsString() {\n\t\tStringBuffer params = new StringBuffer(30);\n\t\tString key, value;\n\t\tfor (Iterator it = validQueryParams.keySet().iterator(); it.hasNext();) {\n\t\t\tkey = (String) it.next();\n\t\t\tvalue = (String) validQueryParams.get(key);\n\t\t\tparams.append(key).append(\"=\").append(value);\n//\t\t\tif (it.hasNext()) {\n\t\t\t\tparams.append(\"&\");\n//\t\t\t}\n\t\t}\n\t\t// add extral value(used in web page)\n\t\tparams.append(\"hasQueried=true\");\n\t\treturn params.toString();\n\t}", "CampusSearchQuery generateQuery();", "private String buildQueryString(Map<String, String> params) {\n\t\tStringBuffer query = new StringBuffer();\n\n\t\tif (params.size() > 0) {\n\t\t\tquery.append(\"?\");\n\n\t\t\tfor (String key : params.keySet()) {\n\t\t\t\tquery.append(key);\n\t\t\t\tquery.append(\"=\");\n\t\t\t\tquery.append(encodeParameter(params.get(key)));\n\t\t\t\tquery.append(\"&\");\n\t\t\t}\n\n\t\t\tif (query.charAt(query.length() - 1) == '&') {\n\t\t\t\tquery.deleteCharAt(query.length() - 1);\n\t\t\t}\n\t\t}\n\t\treturn query.toString();\n\t}", "public String getQueryString(String contentEncoding) {\n \n CollectionProperty arguments = getArguments().getArguments();\n // Optimisation : avoid building useless objects if empty arguments\n if(arguments.size() == 0) {\n return \"\";\n }\n \n // Check if the sampler has a specified content encoding\n if (JOrphanUtils.isBlank(contentEncoding)) {\n // We use the encoding which should be used according to the HTTP spec, which is UTF-8\n contentEncoding = EncoderCache.URL_ARGUMENT_ENCODING;\n }\n \n StringBuilder buf = new StringBuilder(arguments.size() * 15);\n PropertyIterator iter = arguments.iterator();\n boolean first = true;\n while (iter.hasNext()) {\n HTTPArgument item = null;\n /*\n * N.B. Revision 323346 introduced the ClassCast check, but then used iter.next()\n * to fetch the item to be cast, thus skipping the element that did not cast.\n * Reverted to work more like the original code, but with the check in place.\n * Added a warning message so can track whether it is necessary\n */\n Object objectValue = iter.next().getObjectValue();\n try {\n item = (HTTPArgument) objectValue;\n } catch (ClassCastException e) {\n log.warn(\"Unexpected argument type: \" + objectValue.getClass().getName());\n item = new HTTPArgument((Argument) objectValue);\n }\n final String encodedName = item.getEncodedName();\n if (encodedName.length() == 0) {\n continue; // Skip parameters with a blank name (allows use of optional variables in parameter lists)\n }\n if (!first) {\n buf.append(QRY_SEP);\n } else {\n first = false;\n }\n buf.append(encodedName);\n if (item.getMetaData() == null) {\n buf.append(ARG_VAL_SEP);\n } else {\n buf.append(item.getMetaData());\n }\n \n // Encode the parameter value in the specified content encoding\n try {\n buf.append(item.getEncodedValue(contentEncoding));\n } catch(UnsupportedEncodingException e) {\n log.warn(\"Unable to encode parameter in encoding \" + contentEncoding + \", parameter value not included in query string\");\n }\n }\n return buf.toString();\n }", "private String buildEncodedUrlQuery(List<HtmlParameter> formDataSet) {\n\t\tStringBuilder request = new StringBuilder();\n\t\t// Build the query\n\t\tfor (HtmlParameter p : formDataSet) {\n\t\t\tString v;\n\t\t\ttry {\n\t\t\t\tv = URLEncoder.encode(p.getName(), ENCODING_TYPE);\n\t\t\t\trequest.append(v);\n\t\t\t\trequest.append(\"=\");\n\t\t\t\tv = URLEncoder.encode(p.getValue(), ENCODING_TYPE);\n\t\t\t\trequest.append(v);\n\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\tlog.warn(\"Error while encoding query for form.\", e);\n\t\t\t}\n\t\t\trequest.append(\"&\");\n\t\t}\n\t\t// Delete the last ampersand\n\t\tif (request.length() > 0) {\n\t\t\trequest.deleteCharAt(request.length() - 1);\n\t\t}\n\n\t\treturn request.toString();\n\t}", "private String getQueryString(Map<String, Object>... pipeline) throws JsonProcessingException {\n ObjectMapper mapper = getObjectMapper();\n List<NameValuePair> params = new ArrayList<>();\n\n List<Map<String, Object>> newPipeLine = new ArrayList<>();\n\n // make sure to fetch statement for correct source\n newPipeLine.add(m(\"$match\", m(\"statement.actor.account.homePage\", homePage)));\n newPipeLine.addAll(l((Map<String, Object>[]) pipeline));\n\n params.add(new BasicNameValuePair(\"pipeline\", mapper.writeValueAsString(newPipeLine)));\n\n return \"?\" + URLEncodedUtils.format(params, StandardCharsets.US_ASCII);\n }", "private String buildSearchSearcherQuery(HttpServletRequest request){\r\n\t\t\r\n\t\t//Create a Map that will store the Search Parameter names and Search Parameter value\r\n\t\t//ie.) location: USA, Hawaii --> Search Paramter name: location; Search Parameter value: USA, Hawaii\r\n\t\tMap<String, String>paraMap = new HashMap<String, String>();\r\n\t\tboolean qkSearch=false;\r\n\t\t\r\n\t\t//Get Map from DbDict that stores all the Search Parameter names (front-end and back-end)\r\n\t\t//Front-end: what it's called in the website\r\n\t\t//Back-end: what it's called in the code and database\r\n\t\tMap<String, String> paraColMap = DbDict.getDict(request.getParameter(\"action\"));\r\n\t\t\r\n\t\t//A list (enumeration) of the search parameter names from the Search Job Searcher \r\n\t\tEnumeration paramNames = request.getParameterNames();\r\n\t\t\r\n\t\twhile (paramNames.hasMoreElements()) {\t\t\t\r\n\t\t\tString paraName = (String) paramNames.nextElement();\r\n\t\t\t\r\n\t\t\t//If request parameter name is \"action\", this will cause colName to be null. Hence, do and write nothing.\r\n\t\t\tif( paraName.equals(\"action\") || paraName.equals(\"sessionKey\")){\r\n\t\t\t\t//do and write nothing\r\n\t\t\t}\r\n\t\t\t//Else if parameter name is something else i.e.) a request parameter name of an html input: \"name\", etc.\r\n\t\t\telse {\r\n\t\t\t\t//Look up corresponding search parameter names from paraColMap MAP\r\n\t\t\t\tString colName = paraColMap.get(paraName);\r\n\t\t\t\t//Put the parameters' names and values into the paraMap MAP\r\n\t\t\t\tparaMap.put(colName,request.getParameter(paraName) );\r\n\t\t\t\t\r\n\t\t\t\t//Debug\r\n\t\t\t\tSystem.out.println(\"Column: \" + colName); \r\n\t\t\t\tSystem.out.println(\"Value: \" + paraMap.get(colName));\r\n\t\t\t}\r\n\t\t}/**end of while loop**/\r\n\t\t\r\n\t\t//CAUTION: NEED TO HAVE A SPACE AT THE END oF FOLLOWING Query!\r\n\t\tString query\t\t\t= \"SELECT * FROM tableProfileSearcher LEFT OUTER JOIN tableLocationProfile USING (idAccount) WHERE \";\r\n\t\tString andKeyword \t\t= \" AND \";\t\t//CAUTION: SPACE IMPORTANT\r\n\t\tString inKeyword \t\t= \" IN \";\t\t//CAUTION: SPACE IMPORTANT\r\n\t\tString orKeyword\t\t= \" OR \"; \t\t//CAUTION: SPACE IMPORTANT\r\n\t\tString likeKeyword\t\t= \" LIKE \"; \t//CAUTION: SPACE IMPORTANT\r\n\t\tString regExKeyword \t= \" REGEXP \";\t//CAUTION: SPACE IMPORTANT\r\n\t\tString whereKeyword\t\t= \" WHERE \";\t//CAUTION: SPACE IMPORTANT\r\n\t\tString orderByKeyword\t= \" ORDER BY \"; //CAUTION: SPACE IMPORTANT\r\n\t\tString limitKeyword\t\t= \" LIMIT \"; \t//CAUTION: SPACE IMPORTANT\r\n\t\tString descKeyword\t\t= \" DESC \"; \t//CAUTION: SPACE IMPORTANT\r\n\t\tStringBuffer wordRegExBuffer = new StringBuffer(\" '[[:<:]][[:>:]]' \"); //CAUTION: SPACE IMPORTANT, Middle pos:9\r\n\t\t\r\n\t\tStringBuffer queryBuf = new StringBuffer();\r\n\t\tqueryBuf.append(query);\r\n\t\t\r\n\t\tfor(Map.Entry<String, String> entry : paraMap.entrySet()){\r\n\t\t\t//Get parameter's name and value\r\n\t\t\tString column = entry.getKey();\r\n\t\t\tString value = entry.getValue();\r\n\r\n \t\tif(column.equals(\"name\")){\r\n \t\t\tqueryBuf.append(column + likeKeyword + \"\\'%\" +value+\"%\\'\" + andKeyword);\r\n \t\t}\r\n \t\telse if(column.equals(\"educationLevel\")){\r\n \t \t\tqueryBuf.append(column+ \"=\" + value + andKeyword);\r\n \t\t}\r\n \t\telse if(column.equals(\"startingDate\")){\r\n \t\t\tlong dateInLong = Utility.dateConvertor(value);\r\n \t\t\tqueryBuf.append(column+ \">=\" + dateInLong +andKeyword);\r\n \t\t}\r\n \t\telse if(column.equals(\"location\")){\r\n \t\t\tqueryBuf.append(column + likeKeyword + \"\\'%\" +value+\"%\\'\" + andKeyword);\r\n \t\t} \r\n }/**end of for loop**/\r\n \t\t\t\r\n\t \tif(!qkSearch)\r\n\t \t\tqueryBuf.delete(queryBuf.length() - andKeyword.length(), queryBuf.length()); //remove the last \" AND \"\r\n\t \telse\r\n\t \t\tqueryBuf.delete(queryBuf.length() - orKeyword.length(), queryBuf.length()); //remove the last \" OR \"\r\n\t \t\t\r\n\t \tquery = queryBuf.toString();\r\n \r\n\t\treturn query;\r\n\t\t\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check which genre is selected to add it to the key,value pair extra string
public String checkWhichGenreIsSelected() { String genre = ""; if (genre1clicked) { genre = "politics"; } else if (genre2clicked) { genre = "sex"; } else if (genre3clicked) { genre = "love"; } else if (genre4clicked) { genre = "personality"; } else if (genre5clicked) { genre = "ethics"; } else if (genre6clicked) { genre = "life&death"; } return genre; }
[ "Builder addGenre(String value);", "Builder addGenre(Text value);", "public void addGenre(String newGenre) {\n this.genre.add(newGenre);\n }", "public void setGenre(String genre);", "public void setGenre(String genre)\r\n {\r\n this.genre=genre;\r\n }", "public void setGenre(String newGenre) {\n this.genre = newGenre;\n }", "public void browseGenre(String genre) {\n for (int i = 0; i < libraryDatabase.getMediaDatabase().size(); i++) {\n String MediaGenre = (libraryDatabase.getMediaDatabase().get(i)).getGenre();\n if (genre.equals(MediaGenre)) {\n System.out.println(libraryDatabase.getMediaDatabase().get(i));\n }\n }\n }", "private static void addToGenreTable(BookDetails book, String bookTitle) {\n\t\t//ALL_GENRES representation --> Biology|Mathematics|Chemistry|Physics|Science_Fiction|Fantasy|Action|Drama|Romance|Horror|History|Autobiography|Biography \n\t\tswitch(book.getGenre()){\n\t\t\tcase Biology:\n\t\t\t\tALL_GENRES.get(0).add(bookTitle);\n\t\t\t\tbreak;\n\t\t\tcase Mathematics:\n\t\t\t\tALL_GENRES.get(1).add(bookTitle);\n\t\t\t\tbreak;\n\t\t\tcase Chemistry:\n\t\t\t\tALL_GENRES.get(2).add(bookTitle);\n\t\t\t\tbreak;\n\t\t\tcase Physics:\n\t\t\t\tALL_GENRES.get(3).add(bookTitle);\n\t\t\t\tbreak;\n\t\t\tcase Science_Fiction:\n\t\t\t\tALL_GENRES.get(4).add(bookTitle);\n\t\t\t\tbreak;\n\t\t\tcase Fantasy:\n\t\t\t\tALL_GENRES.get(5).add(bookTitle);\n\t\t\t\tbreak;\n\t\t\tcase Action:\n\t\t\t\tALL_GENRES.get(6).add(bookTitle);\n\t\t\t\tbreak;\n\t\t\tcase Drama:\n\t\t\t\tALL_GENRES.get(7).add(bookTitle);\n\t\t\t\tbreak;\n\t\t\tcase Romance:\n\t\t\t\tALL_GENRES.get(8).add(bookTitle);\n\t\t\t\tbreak;\n\t\t\tcase Horror:\n\t\t\t\tALL_GENRES.get(9).add(bookTitle);\n\t\t\t\tbreak;\n\t\t\tcase History:\n\t\t\t\tALL_GENRES.get(10).add(bookTitle);\n\t\t\t\tbreak;\n\t\t\tcase Autobiography:\n\t\t\t\tALL_GENRES.get(11).add(bookTitle);\n\t\t\t\tbreak;\n\t\t\tcase Biography:\n\t\t\t\tALL_GENRES.get(12).add(bookTitle);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"ERROR: Invalid Genre Input\");\n\t\t\t\tbreak;\n\t\t}\n\t}", "java.lang.String getGenre(int index);", "public void setGenre(String genreName) {\n genre = genreName;\n }", "public String getGenreOfSong(String songTitle){\n String finalOutput = \"\";\n \n for(String genre : map.keySet()){\n if(map.get(genre).contains(songTitle)){\n finalOutput = genre;\n break;\n }\n }\n return finalOutput;\n }", "public String getGenre();", "public void setGenre(String genre) {\n\t\tthis.genre = genre;\n\t}", "public void setGenre(String genre){\n\t\t//FIXME\n\t\tthis.genre = genre;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn genre;\n\t}", "public void setGenre() {\r\n this.genre = genre;\r\n }", "public void showGenre(Genre genre) {\n for (Record r : cataloue) {\n if (r.getGenre() == genre) {\n System.out.println(r);\n }\n }\n\n }", "public String genre14(){\n String genre14MovieTitle = \" \";\n for(int i = 0; i < results.length; i++){\n if(results[i].genre()) {\n genre14MovieTitle += results[i].getTitle() + \"\\n\";\n }\n }\n System.out.println(genre14MovieTitle);\n return genre14MovieTitle;\n }", "public void addSong(String genre, String songTitle){\n\t\tif(genreMap.containsKey(genre)) {\n\t\t\tgenreMap.get(genre).add(songTitle);\n\t\t}else {\n\t\t\tgenreMap.put(genre, new HashSet<String>());\n\t\t\tthis.addSong(genre, songTitle);\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get solution from parent if the solution has been set Otherwise compute solution
public Solution getSolution() { if (this.solution.lengthOfS() == 0) { // call the main logic of the current algorithm this.setSolution(); } return this.solution; }
[ "public PartialSolution calculateOptimalSolution() {\n\t\twhile (shouldRunSequentially()) {\n\t\t\tPartialSolution currentSolution = unexploredSolutions.poll();\n\n\t\t\t// Check if partial solution contains all the vertices\n\t\t\tif (isComplete(currentSolution)) {\n\t\t\t\treturn currentSolution;\n\t\t\t} else {\n\t\t\t\texpandPartialSolution(currentSolution);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*This will be reached in the parallel version, as shouldRunSequentially() \n\t\t will return false after N iterations*/\n\t\treturn null;\n\t}", "public abstract OptimisationSolution getBestSolution();", "SolutionRef getCurrentSolution();", "public SolutionType getBestSolution();", "public Solution getBestSolution() {\n return solutions[0];\n }", "public final TrajectoryInfo getSolution() { \n\t\treturn solution; \n\t}", "public int getCurrentSolution() {\n return currentSolution;\n }", "public int solve() {\r\n\t\t// implementation\r\n\t\treturn 0;\r\n\t}", "public void solve() {\r\n\t\tOptimizationStatus status;\r\n\t\tdo {\r\n\t\t\tstatus = iterate();\r\n\t\t} while (status == RUNNING);\r\n\t}", "@Override\n\tpublic String getSolution() {\n\t\t// COMPLETE THIS\n\t\tString sol = solutions.first();\n\t\treturn sol;\n\t}", "private Solution solution(int id) {\n return solutions.get(id);\n }", "public SASolution getNeighborSolution();", "ISolution getSolution(String type){\n if (type.equalsIgnoreCase(\"SOLUTION\"))\n return new Solution();\n if (type.equalsIgnoreCase(\"SOLUTIONOPTIMAL\"))\n return new SolutionOptimal();\n if (type.equalsIgnoreCase(\"SOLUTIONWITHPARENTS\"))\n return new SolutionWithParents();\n if (type.equalsIgnoreCase(\"SOLUTIONWITHPARENTSOPTIMAL\"))\n return new SolutionWithParentsOptimal();\n return null;\n }", "public MocoSolution solve() {\n return new MocoSolution(opensimMocoJNI.MocoTrack_solve(swigCPtr, this), true);\n }", "public Optional<Cause> getParent() {\n return this.parent;\n }", "Clustered getParent();", "SolutionRef getStartSolution();", "public boolean solve() {\r\n boolean foundSol = this.solveRB(0);\r\n return foundSol;\r\n }", "public Alternative calculateOptimalSolution() throws TopsisIncompleteAlternativeDataException {\n\t\treturn this.calculateOptimalSolutionSortedList().get(0); // Top solution after sorting is the best score\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getUrl method, of class SPWeb.
@Test public void testGetUrl() { System.out.println("getUrl"); String result = instance.getUrl(); assertNotNull(result); }
[ "@Test\n public void testGetUrl() {\n LOG.entering(CLASS, \"testGetUrl\");\n try{\n String url = URL;\n setUrl(url);\n String result = MarionetteUtil.parseJsonObject(GET(getUri(\"getUrl\", sessionId)).body()).getString(\"url\");\n Assertions.assertTrue(Objects.equals(url, result), String.format(\"\\\"%s\\\" should match \\\"%s\\\"\", result, url));\n LOG.exiting(CLASS, \"testGetUrl\", result);\n } catch(Exception e){\n LOG.throwing(CLASS, \"testGetUrl\", e);\n throw e;\n }\n }", "@Test\n\tpublic void testGetUrl(){\n\t\tArticleEntry ae = new ArticleEntry();\n\t\tString expResult = \"db/journals/acta/acta20.html#Simon83\";\n\t\tae.setUrl(\"db/journals/acta/acta20.html#Simon83\");\n\t\tString result = ae.getUrl();\n\t\tassertEquals(expResult, result);\n\t}", "java.lang.String getWebUrl();", "java.lang.String getURL();", "@Test\n void setUrl() {\n g.setUrl(url);\n assertEquals(url, g.getUrl(), \"URL mismatch\");\n }", "@Test\r\n public void testGetUrl() {\r\n System.out.println(\"getUrl\");\r\n Cell instance = new Cell();\r\n String expResult = \"\";\r\n String result = instance.getUrl();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n public void testGetURL() \r\n {\r\n System.out.println(\"getURL\");\r\n String symbol = \"\";\r\n CPTAYahooEODMessage instance = new CPTAYahooEODMessage();\r\n String expResult = \"\";\r\n String result = instance.getURL(symbol);\r\n // assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n // fail(\"The test case is a prototype.\");\r\n }", "String getResponseUrl();", "@Test(expected = IllegalArgumentException.class)\n public final void throwAnExceptionWhenTheUrlIsNotValid() {\n Wget.fetchUrl(\"ehm\");\n }", "@Test\n\tpublic void testGetShopHPServicesUrl() {\n\t\t\n\t\tString detailsUrl = Utility.getShopHPServicesUrl(request);\n\t\t\n\n\t\tString expected = \"http://localhost:8180/portal/site/hpsc/template.PAGE/action.process/it/credits/available/?javax.portlet.action=true&spf_p.tpst=creditsAvailableServicesDetails&javax.portlet.begCacheTok=com.vignette.cachetoken&spf_p.prp_creditsAvailableServicesDetails=wsrp-interactionState%3Daction%253Dfilter%257CdomainKeyString%253D-1&javax.portlet.endCacheTok=com.vignette.cachetoken\";\n\t\t\n\t\t\n\t\tAssert.assertEquals(expected, detailsUrl.toString());\n\t\t\n\t}", "@Test\n public void testGetWebAppUrl() {\n LOGGER.info(\"getWebAppUrl\");\n\n String result = WebUtils.getWebAppUrl(hsrHttp80);\n Assert.assertEquals(\"http://www.bipolar.mx/bm\", result);\n\n result = WebUtils.getWebAppUrl(hsrHttps443);\n Assert.assertEquals(\"https://www.bipolar.mx/bm\", result);\n\n result = WebUtils.getWebAppUrl(hsrHttp8080);\n Assert.assertEquals(\"http://www.bipolar.mx:8080/bm\", result);\n\n result = WebUtils.getWebAppUrl(hsrHttps8080);\n Assert.assertEquals(\"https://www.bipolar.mx:8080/bm\", result);\n\n result = WebUtils.getWebAppUrl(hsrFtp21);\n Assert.assertEquals(\"ftp://www.bipolar.mx:21/bm\", result);\n }", "public void willRequestUrl(String url){\n\n }", "public boolean hasURL();", "public static void shouldContainHttp(String url) {}", "public void testBuildInContextUrl() {\r\n System.out.println(\"buildInContextUrl\");\r\n String alias = \"http://localhost:8080/dv/cgi/awstats/js\";\r\n UrlValidator instance = new UrlValidator();\r\n String expResult = \"http://localhost:8080/dv/cgi/awstats/js\";\r\n String result = instance.buildInContextUrl(null, alias);\r\n assertEquals(expResult, result);\r\n }", "public static String getUrl()throws Exception{\n\t\t String url = prop.getProperty(\"URL\");\n\t\t return url;\n\t\t }", "@Test\n public void targetUrlTest() {\n // TODO: test targetUrl\n }", "public void testValidateUrl() throws Exception {\r\n System.out.println(\"validateUrl Test ...\");\r\n \r\n String aUrl = \"http://dvn.iq.harvard.edu/dvn\";\r\n UrlValidator instance = new UrlValidator();\r\n \r\n boolean expResult = true;\r\n boolean result = instance.validateUrl(aUrl);\r\n assertEquals(expResult, result);\r\n \r\n // TODO review the generated test code and remove the default call to fail.\r\n //fail(\"The test case is a prototype. Expect fail.\");\r\n }", "protected abstract String getInstrumentedUrl(String url);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accessor to retrieve the reference to the XTCESpaceSystem object that is associated to the tree node that is represented by the object of this class.
public XTCESpaceSystem getSpaceSystemReference() { return referenceObject_; }
[ "public SolarSystem getSystemAssociation() {\n return systemAssociation;\n }", "public ShipSystem getSystem() {\n\t\treturn system;\n\t}", "public EntitySystem getSystem() {\n\t\tif (instance == null) {\n\t\t\ttry {\n\t\t\t\tinstance = type.newInstance();\n\t\t\t} catch (Exception e) {\n\t\t\t\tPrint.fatal(\"Couln not create EntitySystem of type \" + type.getName(), e);\n\t\t\t}\n\t\t}\n\t\treturn instance;\n\t}", "public ShipSystem getSystem() {\n return system;\n }", "public org.apache.xmlbeans.XmlString xgetExternalSystem()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(EXTERNALSYSTEM$12, 0);\n return target;\n }\n }", "public Workspace getSystemWorkspace()\n\t{\n\t\tWorkspace workspace = null;\n\t\tProvider wsProvider = Providers.getProvider(\"SystemDatabase\");\n\t\tif (wsProvider != null)\n\t\t\tworkspace = (Workspace) wsProvider.getProvider();\n\t\treturn workspace;\n\t}", "public org.apache.xmlbeans.XmlString xgetExtSystem()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(EXTSYSTEM$8, 0);\n return target;\n }\n }", "public SystemUnitClassElements getSystemUnitClassAccess() {\n\t\treturn pSystemUnitClass;\n\t}", "public SystemImplementationElements getSystemImplementationAccess() {\n\t\treturn pSystemImplementation;\n\t}", "public SystemNode getAssignedSystemNode() {\n\t\treturn assignedSystemNode;\n\t}", "@Override\n public final GeohashReferenceSystem getReferenceSystem() {\n return GeohashReferenceSystem.this;\n }", "public SystemPrototypeElements getSystemPrototypeAccess() {\n\t\treturn pSystemPrototype;\n\t}", "public VerticalCrs getCoordinateReferenceSystem() {\n return crs;\n }", "public CoordinateSystem getCoordinateSystem() {\n System.out.println(\"BaseCatalog: getCoordinateSystem() \");\n CoordinateSystem cs = null;\n if (_layout.getMapElementCount() >0 ) {\n MapElement mapEle = (MapElement)_layout.getMapElements().next();\n cs = mapEle.getMap().getCoordinateSystem();\n }\n System.out.println(\"BaseCatalog: getCoordinateSystem() \" + cs);\n return cs;\n }", "public Toolboxspace getToolboxspace() {\n return toolboxspace;\n }", "public Node getTargetSpace()\n {\n return _targetSpace;\n }", "public AS400 getSystem() {\r\n return system;\r\n }", "public NameSpace getNameSpace() {\n return globalNameSpace;\n }", "public static TicketSystem getInstance() {\n if (ticketSys == null)\n ticketSys = new TicketSystem();\n return ticketSys;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XOtherOperatorExpression__Group__1" $ANTLR start "rule__XOtherOperatorExpression__Group__1__Impl" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4892:1: rule__XOtherOperatorExpression__Group__1__Impl : ( ( rule__XOtherOperatorExpression__Group_1__0 ) ) ;
public final void rule__XOtherOperatorExpression__Group__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4896:1: ( ( ( rule__XOtherOperatorExpression__Group_1__0 )* ) ) // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4897:1: ( ( rule__XOtherOperatorExpression__Group_1__0 )* ) { // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4897:1: ( ( rule__XOtherOperatorExpression__Group_1__0 )* ) // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4898:1: ( rule__XOtherOperatorExpression__Group_1__0 )* { if ( state.backtracking==0 ) { before(grammarAccess.getXOtherOperatorExpressionAccess().getGroup_1()); } // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4899:1: ( rule__XOtherOperatorExpression__Group_1__0 )* loop46: do { int alt46=2; alt46 = dfa46.predict(input); switch (alt46) { case 1 : // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4899:2: rule__XOtherOperatorExpression__Group_1__0 { pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group_1__0_in_rule__XOtherOperatorExpression__Group__1__Impl10321); rule__XOtherOperatorExpression__Group_1__0(); state._fsp--; if (state.failed) return ; } break; default : break loop46; } } while (true); if ( state.backtracking==0 ) { after(grammarAccess.getXOtherOperatorExpressionAccess().getGroup_1()); } } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__XOtherOperatorExpression__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4885:1: ( rule__XOtherOperatorExpression__Group__1__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4886:2: rule__XOtherOperatorExpression__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group__1__Impl_in_rule__XOtherOperatorExpression__Group__110294);\n rule__XOtherOperatorExpression__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XOtherOperatorExpression__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4946:1: ( rule__XOtherOperatorExpression__Group_1__1__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4947:2: rule__XOtherOperatorExpression__Group_1__1__Impl\n {\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group_1__1__Impl_in_rule__XOtherOperatorExpression__Group_1__110416);\n rule__XOtherOperatorExpression__Group_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XOtherOperatorExpression__Group_1_0_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:5039:1: ( rule__XOtherOperatorExpression__Group_1_0_0__1__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:5040:2: rule__XOtherOperatorExpression__Group_1_0_0__1__Impl\n {\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group_1_0_0__1__Impl_in_rule__XOtherOperatorExpression__Group_1_0_0__110597);\n rule__XOtherOperatorExpression__Group_1_0_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XOtherOperatorExpression__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6491:1: ( rule__XOtherOperatorExpression__Group__1__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6492:2: rule__XOtherOperatorExpression__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group__1__Impl_in_rule__XOtherOperatorExpression__Group__113548);\n rule__XOtherOperatorExpression__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XOtherOperatorExpression__Group_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4929:1: ( ( ( rule__XOtherOperatorExpression__Group_1_0__0 ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4930:1: ( ( rule__XOtherOperatorExpression__Group_1_0__0 ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4930:1: ( ( rule__XOtherOperatorExpression__Group_1_0__0 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4931:1: ( rule__XOtherOperatorExpression__Group_1_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXOtherOperatorExpressionAccess().getGroup_1_0()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4932:1: ( rule__XOtherOperatorExpression__Group_1_0__0 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4932:2: rule__XOtherOperatorExpression__Group_1_0__0\n {\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group_1_0__0_in_rule__XOtherOperatorExpression__Group_1__0__Impl10386);\n rule__XOtherOperatorExpression__Group_1_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXOtherOperatorExpressionAccess().getGroup_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XOtherOperatorExpression__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6502:1: ( ( ( rule__XOtherOperatorExpression__Group_1__0 )* ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6503:1: ( ( rule__XOtherOperatorExpression__Group_1__0 )* )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6503:1: ( ( rule__XOtherOperatorExpression__Group_1__0 )* )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6504:1: ( rule__XOtherOperatorExpression__Group_1__0 )*\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXOtherOperatorExpressionAccess().getGroup_1()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6505:1: ( rule__XOtherOperatorExpression__Group_1__0 )*\n loop59:\n do {\n int alt59=2;\n alt59 = dfa59.predict(input);\n switch (alt59) {\n \tcase 1 :\n \t // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6505:2: rule__XOtherOperatorExpression__Group_1__0\n \t {\n \t pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group_1__0_in_rule__XOtherOperatorExpression__Group__1__Impl13575);\n \t rule__XOtherOperatorExpression__Group_1__0();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop59;\n }\n } while (true);\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXOtherOperatorExpressionAccess().getGroup_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XOtherOperatorExpression__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6552:1: ( rule__XOtherOperatorExpression__Group_1__1__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6553:2: rule__XOtherOperatorExpression__Group_1__1__Impl\n {\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group_1__1__Impl_in_rule__XOtherOperatorExpression__Group_1__113670);\n rule__XOtherOperatorExpression__Group_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XOtherOperatorExpression__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4917:1: ( rule__XOtherOperatorExpression__Group_1__0__Impl rule__XOtherOperatorExpression__Group_1__1 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4918:2: rule__XOtherOperatorExpression__Group_1__0__Impl rule__XOtherOperatorExpression__Group_1__1\n {\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group_1__0__Impl_in_rule__XOtherOperatorExpression__Group_1__010356);\n rule__XOtherOperatorExpression__Group_1__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group_1__1_in_rule__XOtherOperatorExpression__Group_1__010359);\n rule__XOtherOperatorExpression__Group_1__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XOtherOperatorExpression__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:5594:1: ( rule__XOtherOperatorExpression__Group__1__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:5595:2: rule__XOtherOperatorExpression__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group__1__Impl_in_rule__XOtherOperatorExpression__Group__111735);\n rule__XOtherOperatorExpression__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XOtherOperatorExpression__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:18558:1: ( rule__XOtherOperatorExpression__Group__1__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:18559:2: rule__XOtherOperatorExpression__Group__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group__1__Impl_in_rule__XOtherOperatorExpression__Group__137587);\r\n rule__XOtherOperatorExpression__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XOtherOperatorExpression__Group_1_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4978:1: ( rule__XOtherOperatorExpression__Group_1_0__0__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4979:2: rule__XOtherOperatorExpression__Group_1_0__0__Impl\n {\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group_1_0__0__Impl_in_rule__XOtherOperatorExpression__Group_1_0__010477);\n rule__XOtherOperatorExpression__Group_1_0__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XOtherOperatorExpression__Group_1_0_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6645:1: ( rule__XOtherOperatorExpression__Group_1_0_0__1__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6646:2: rule__XOtherOperatorExpression__Group_1_0_0__1__Impl\n {\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group_1_0_0__1__Impl_in_rule__XOtherOperatorExpression__Group_1_0_0__113851);\n rule__XOtherOperatorExpression__Group_1_0_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XOtherOperatorExpression__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6523:1: ( rule__XOtherOperatorExpression__Group_1__0__Impl rule__XOtherOperatorExpression__Group_1__1 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6524:2: rule__XOtherOperatorExpression__Group_1__0__Impl rule__XOtherOperatorExpression__Group_1__1\n {\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group_1__0__Impl_in_rule__XOtherOperatorExpression__Group_1__013610);\n rule__XOtherOperatorExpression__Group_1__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group_1__1_in_rule__XOtherOperatorExpression__Group_1__013613);\n rule__XOtherOperatorExpression__Group_1__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XOtherOperatorExpression__Group_1__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:18602:1: ( ( ( rule__XOtherOperatorExpression__Group_1_0__0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:18603:1: ( ( rule__XOtherOperatorExpression__Group_1_0__0 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:18603:1: ( ( rule__XOtherOperatorExpression__Group_1_0__0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:18604:1: ( rule__XOtherOperatorExpression__Group_1_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXOtherOperatorExpressionAccess().getGroup_1_0()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:18605:1: ( rule__XOtherOperatorExpression__Group_1_0__0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:18605:2: rule__XOtherOperatorExpression__Group_1_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group_1_0__0_in_rule__XOtherOperatorExpression__Group_1__0__Impl37679);\r\n rule__XOtherOperatorExpression__Group_1_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXOtherOperatorExpressionAccess().getGroup_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XOtherOperatorExpression__Group_1_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4989:1: ( ( ( rule__XOtherOperatorExpression__Group_1_0_0__0 ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4990:1: ( ( rule__XOtherOperatorExpression__Group_1_0_0__0 ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4990:1: ( ( rule__XOtherOperatorExpression__Group_1_0_0__0 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4991:1: ( rule__XOtherOperatorExpression__Group_1_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXOtherOperatorExpressionAccess().getGroup_1_0_0()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4992:1: ( rule__XOtherOperatorExpression__Group_1_0_0__0 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4992:2: rule__XOtherOperatorExpression__Group_1_0_0__0\n {\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group_1_0_0__0_in_rule__XOtherOperatorExpression__Group_1_0__0__Impl10504);\n rule__XOtherOperatorExpression__Group_1_0_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXOtherOperatorExpressionAccess().getGroup_1_0_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XOtherOperatorExpression__Group_1_0_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:5748:1: ( rule__XOtherOperatorExpression__Group_1_0_0__1__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:5749:2: rule__XOtherOperatorExpression__Group_1_0_0__1__Impl\n {\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group_1_0_0__1__Impl_in_rule__XOtherOperatorExpression__Group_1_0_0__112038);\n rule__XOtherOperatorExpression__Group_1_0_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XOtherOperatorExpression__Group_1_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6584:1: ( rule__XOtherOperatorExpression__Group_1_0__0__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6585:2: rule__XOtherOperatorExpression__Group_1_0__0__Impl\n {\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group_1_0__0__Impl_in_rule__XOtherOperatorExpression__Group_1_0__013731);\n rule__XOtherOperatorExpression__Group_1_0__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XOtherOperatorExpression__Group_1_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6595:1: ( ( ( rule__XOtherOperatorExpression__Group_1_0_0__0 ) ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6596:1: ( ( rule__XOtherOperatorExpression__Group_1_0_0__0 ) )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6596:1: ( ( rule__XOtherOperatorExpression__Group_1_0_0__0 ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6597:1: ( rule__XOtherOperatorExpression__Group_1_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXOtherOperatorExpressionAccess().getGroup_1_0_0()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6598:1: ( rule__XOtherOperatorExpression__Group_1_0_0__0 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:6598:2: rule__XOtherOperatorExpression__Group_1_0_0__0\n {\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group_1_0_0__0_in_rule__XOtherOperatorExpression__Group_1_0__0__Impl13758);\n rule__XOtherOperatorExpression__Group_1_0_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXOtherOperatorExpressionAccess().getGroup_1_0_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XOtherOperatorExpression__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4856:1: ( rule__XOtherOperatorExpression__Group__0__Impl rule__XOtherOperatorExpression__Group__1 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4857:2: rule__XOtherOperatorExpression__Group__0__Impl rule__XOtherOperatorExpression__Group__1\n {\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group__0__Impl_in_rule__XOtherOperatorExpression__Group__010235);\n rule__XOtherOperatorExpression__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XOtherOperatorExpression__Group__1_in_rule__XOtherOperatorExpression__Group__010238);\n rule__XOtherOperatorExpression__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the viewer binding for the table.
IViewerBinding getBinding();
[ "public TableViewer getTableViewer() {\n\t\treturn _viewer;\n\t}", "public TableViewer getTableViewer() {\n return viewer;\n }", "protected TableViewer getTableViewer() {\n\t\treturn tableViewer;\n\t}", "public StructuredViewer getTableViewer() {\n return tableViewer;\n }", "Binding getBinding();", "public VarBindingDef getBinding()\n {\n return binding_;\n }", "private TableViewer createTableViewer(Composite parent) {\r\n\t\tfinal TableViewer viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);\r\n\t\tviewer.setContentProvider(new HandlerContentProvider());\r\n\t\tviewer.setLabelProvider(new PrebookingViewLabelProvider());\r\n\t\tviewer.setInput(transportHandler);\r\n\t\tviewer.getTable().setLinesVisible(true);\r\n\t\tviewer.getTable().addMouseListener(new MouseAdapter() {\r\n\r\n\t\t\tpublic void mouseDown(MouseEvent e) {\r\n\t\t\t\tif (viewer.getTable().getItem(new Point(e.x, e.y)) == null) {\r\n\t\t\t\t\tviewer.setSelection(new StructuredSelection());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tfinal Table table = viewer.getTable();\r\n\t\ttable.setLinesVisible(true);\r\n\t\ttable.setHeaderVisible(true);\r\n\r\n\t\tfinal TableColumn blockColumn = new TableColumn(table, SWT.NONE);\r\n\t\tblockColumn.setToolTipText(\"Eintrag wird gerade bearbeitet\");\r\n\t\tblockColumn.setWidth(24);\r\n\t\tblockColumn.setText(\"L\");\r\n\r\n\t\tfinal TableColumn bTableColumnOrtsstelle = new TableColumn(table, SWT.NONE);\r\n\t\tbTableColumnOrtsstelle.setWidth(30);\r\n\t\tbTableColumnOrtsstelle.setText(\"OS\");\r\n\r\n\t\tfinal TableColumn bTableColumnAbfahrt = new TableColumn(table, SWT.NONE);\r\n\t\tbTableColumnAbfahrt.setToolTipText(\"Geplante Abfahrt an der Ortsstelle\");\r\n\t\tbTableColumnAbfahrt.setWidth(43);\r\n\t\tbTableColumnAbfahrt.setText(\"Abf\");\r\n\r\n\t\tfinal TableColumn bTableColumnAnkunft = new TableColumn(table, SWT.NONE);\r\n\t\tbTableColumnAnkunft.setToolTipText(\"Geplante Ankunft beim Patienten\");\r\n\t\tbTableColumnAnkunft.setWidth(43);\r\n\t\tbTableColumnAnkunft.setText(\"Ank\");\r\n\r\n\t\tfinal TableColumn bTableColumnTermin = new TableColumn(table, SWT.NONE);\r\n\t\tbTableColumnTermin.setToolTipText(\"Termin am Zielort\");\r\n\t\tbTableColumnTermin.setWidth(43);\r\n\t\tbTableColumnTermin.setText(\"Termin\");\r\n\r\n\t\tfinal TableColumn bTableColumnTransportVon = new TableColumn(table, SWT.NONE);\r\n\t\tbTableColumnTransportVon.setWidth(188);\r\n\t\tbTableColumnTransportVon.setText(\"Transport von\");\r\n\r\n\t\tfinal TableColumn bTtableColumnPatient = new TableColumn(table, SWT.NONE);\r\n\t\tbTtableColumnPatient.setWidth(160);\r\n\t\tbTtableColumnPatient.setText(\"Patient\");\r\n\r\n\t\tfinal TableColumn bTableColumnTransportNach = new TableColumn(table, SWT.NONE);\r\n\t\tbTableColumnTransportNach.setWidth(188);\r\n\t\tbTableColumnTransportNach.setText(\"Transport nach\");\r\n\r\n\t\tfinal TableColumn bTableColumnTA = new TableColumn(table, SWT.NONE);\r\n\t\tbTableColumnTA.setToolTipText(\"Transportart\");\r\n\t\tbTableColumnTA.setWidth(23);\r\n\t\tbTableColumnTA.setText(\"T\");\r\n\r\n\t\tfinal TableColumn anmerkungTransporte = new TableColumn(table, SWT.NONE);\r\n\t\tanmerkungTransporte.setWidth(66);\r\n\t\tanmerkungTransporte.setText(\"Anmerkung\");\r\n\r\n\t\tListener sortListener = new Listener() {\r\n\r\n\t\t\tpublic void handleEvent(Event e) {\r\n\t\t\t\t// determine new sort column and direction\r\n\t\t\t\tTableColumn sortColumn = viewer.getTable().getSortColumn();\r\n\t\t\t\tTableColumn currentColumn = (TableColumn) e.widget;\r\n\t\t\t\tint dir = viewer.getTable().getSortDirection();\r\n\t\t\t\t// revert the sort order if the column is the same\r\n\t\t\t\tif (sortColumn == currentColumn) {\r\n\t\t\t\t\tif (dir == SWT.UP) {\r\n\t\t\t\t\t\tdir = SWT.DOWN;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tdir = SWT.UP;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tviewer.getTable().setSortColumn(currentColumn);\r\n\t\t\t\t\tdir = SWT.UP;\r\n\t\t\t\t}\r\n\t\t\t\t// sort the data based on column and direction\r\n\t\t\t\tString sortIdentifier = null;\r\n\t\t\t\tif (currentColumn == bTableColumnOrtsstelle) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.RESP_STATION_SORTER;\r\n\t\t\t\t}\r\n\t\t\t\tif (currentColumn == bTableColumnAbfahrt) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.ABF_SORTER;\r\n\t\t\t\t}\r\n\t\t\t\tif (currentColumn == bTableColumnAnkunft) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.AT_PATIENT_SORTER;\r\n\t\t\t\t}\r\n\t\t\t\tif (currentColumn == bTableColumnTermin) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.TERM_SORTER;\r\n\t\t\t\t}\r\n\t\t\t\tif (currentColumn == bTableColumnTransportVon) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.TRANSPORT_FROM_SORTER;\r\n\t\t\t\t}\r\n\t\t\t\tif (currentColumn == bTtableColumnPatient) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.PATIENT_SORTER;\r\n\t\t\t\t}\r\n\t\t\t\tif (currentColumn == bTableColumnTransportNach) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.TRANSPORT_TO_SORTER;\r\n\t\t\t\t}\r\n\t\t\t\tif (currentColumn == bTableColumnTA) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.TA_SORTER;\r\n\t\t\t\t}\r\n\t\t\t\tif (currentColumn == anmerkungTransporte) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.NOTES_SORTER;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// apply the filter\r\n\t\t\t\tviewer.getTable().setSortDirection(dir);\r\n\t\t\t\tviewer.setSorter(new TransportSorter(sortIdentifier, dir));\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// attach the listener\r\n\t\tbTableColumnOrtsstelle.addListener(SWT.Selection, sortListener);\r\n\t\tbTableColumnAbfahrt.addListener(SWT.Selection, sortListener);\r\n\t\tbTableColumnAnkunft.addListener(SWT.Selection, sortListener);\r\n\t\tbTableColumnTermin.addListener(SWT.Selection, sortListener);\r\n\t\tbTableColumnTransportVon.addListener(SWT.Selection, sortListener);\r\n\t\tbTtableColumnPatient.addListener(SWT.Selection, sortListener);\r\n\t\tbTableColumnTransportNach.addListener(SWT.Selection, sortListener);\r\n\t\tbTableColumnTA.addListener(SWT.Selection, sortListener);\r\n\t\tanmerkungTransporte.addListener(SWT.Selection, sortListener);\r\n\r\n\t\treturn viewer;\r\n\t}", "public Viewer getViewer() {\n return (Viewer) getSource();\n }", "public ThingsPropertyViewReader getView() {\r\n\t\treturn myView;\r\n\t}", "public String tableTypeForView();", "@Override\n\tprotected StructuredViewer getNewViewer(Composite parent) {\n\t\treturn new TableViewer(parent);\n\t}", "public Binding getBinding() {\n return binding;\n }", "public Viewer getViewer() {\n\t\treturn viewer;\n\t}", "String getBindingName();", "public TreeViewer getViewer() {\n\t\treturn viewer;\n\t}", "TreeViewer getTreeViewer() {\n\t\treturn legend.getTreeViewer();\n\t}", "public Binding getBinding() { \n\t\tif (myBinding == null) {\n\t\t\tmyBinding = new Binding();\n\t\t}\n\t\treturn myBinding;\n\t}", "public TreeViewer getViewer() {\n return fTreeViewer;\n }", "public String getBindingType();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
define the possibilities of where the scale max comes from.
protected void buildScaleMax(JPanel holder, GridBagConstraints gbc, GridBagLayout gbl) { JLabel labelScaleMax = new JLabel("Use as scale maximum:"); labelScaleMax.setForeground(Color.black); labelScaleMax.setFont(serif12); gbc.gridwidth = GridBagConstraints.RELATIVE; gbc.anchor = GridBagConstraints.WEST; gbc.weightx = 1; gbl.setConstraints(labelScaleMax, gbc); holder.add(labelScaleMax); // add kernel label comboBoxScaleMax = new JComboBox(); comboBoxScaleMax.setFont(serif12); comboBoxScaleMax.setBackground(Color.white); gbc.gridwidth = GridBagConstraints.REMAINDER; gbc.anchor = GridBagConstraints.EAST; gbc.weightx = 0; gbl.setConstraints(comboBoxScaleMax, gbc); // ITEMS comboBoxScaleMax.addItem("Local"); comboBoxScaleMax.addItem("Slice"); comboBoxScaleMax.addItem("Image"); if (image.isColorImage()) { comboBoxScaleMax.setSelectedIndex(2); scaleMaxValue = 2; } else { comboBoxScaleMax.setSelectedIndex(1); scaleMaxValue = 1; } holder.add(comboBoxScaleMax); }
[ "int getMaxScale();", "double[] setMaxScaling(double[] scaling);", "void setMaxScale(int value);", "private void newMax() {\n\t\tif (point.getID() != -1) {\n\n\t\t\t// calculating all 3 cases\n\t\t\tint case1 = left.maxval;\n\t\t\tint case2 = left.val + getP();\n\t\t\tint case3 = case2 + right.maxval;\n\t\t\tmaxval = Math.max(Math.max(case1, case2), case3);\n\n\t\t\tif (maxval == case1) {\n\t\t\t\temax = left.getEmax();\n\t\t\t} else if (maxval == case2) {\n\t\t\t\temax = point;\n\t\t\t} else if (maxval == case3) {\n\t\t\t\temax = right.getEmax();\n\t\t\t}\n\t\t}\n\t}", "public void setScaleMaxValue(int value) {\r\n scaleMaxValue = value;\r\n }", "protected final void setMax() {\n\n\tint prevmax = this.max;\n\n\tint i1 = this.high;\n\tint i2 = left.max;\n\tint i3 = right.max;\n\n\tif ((i1 >= i2) && (i1 >= i3)) {\n\t this.max = i1;\n\t} else if ((i2 >= i1) && (i2 >= i3)) {\n\t this.max = i2;\n\t} else {\n\t this.max = i3;\n\t}\n\t\n\tif ((p != IntervalNode.nullIntervalNode) &&\n\t (prevmax != this.max)) {\n \t p.setMax();\n\t}\n }", "float getMaxRange();", "Limits limits();", "protected abstract int getMaxSelectedValues();", "protected double getMaxScale() {\n return 1;\n }", "private void setMaxScale(final Double value) {\n if (isValidScale(\"MaxScaleDenominator\", value)) {\n maxScale = value;\n }\n }", "Max createMax();", "public void setCursorMaxShape(final int maxNumValues) {\n\n long maxNumValuesL = maxNumValues;\n\n int c3 = _maxBrickIndex[_axis3] + 1;\n int c2 = _maxBrickIndex[_axis2] + 1;\n int c1 = _maxBrickIndex[_axis1] + 1;\n\n long c1L = c1;\n long c2L = c2;\n long c3L = c3;\n\n long c23L = c2L * c3L;\n long c123L = c1L * c2L * c3L;\n\n if (maxNumValues < c3) {\n // Less than one trace worth.\n // set the cursor shape to <1,1,maxNumCursorValues>\n _cursorMaxShape[_axis1] = 1;\n _cursorMaxShape[_axis2] = 1;\n _cursorMaxShape[_axis3] = maxNumValues;\n } else if (maxNumValuesL < c23L) {\n // Less than one plane worth\n // set the cursor shape to <1, maxNumCursorValues / c3, c3>\n _cursorMaxShape[_axis1] = 1;\n _cursorMaxShape[_axis2] = maxNumValues / c3;\n _cursorMaxShape[_axis3] = c3;\n } else if (maxNumValuesL < c123L) {\n // bigger or equal to one plane, but less than the whole volume\n // set the cursor shape to <maxNumCursorValues / (c2*c3), c2, c3>\n _cursorMaxShape[_axis1] = (int) (maxNumValuesL / c23L);\n _cursorMaxShape[_axis2] = c2;\n _cursorMaxShape[_axis3] = c3;\n } else {\n // bigger than the whole volume. Set it to the whole volume\n _cursorMaxShape[_axis1] = c1;\n _cursorMaxShape[_axis2] = c2;\n _cursorMaxShape[_axis3] = c3;\n }\n }", "@Override\n public boolean isMaximum(){\n return super.isMaximum() || speciallyMaximized;\n }", "public void SetMaxScale(float max)\n\t{\n\t\tmaxscale=max;\n\t}", "public void setMaximumPoints(int maximum);", "private void\n\t\tassignChannelMinMax(final ImageDisplay disp, final ImagePlus imp)\n\t{\n\t\tfinal DataView dataView = disp.getActiveView();\n\t\tif (!(dataView instanceof DatasetView)) return;\n\t\tfinal DatasetView view = (DatasetView) dataView;\n\t\tfinal int channelCount = view.getChannelCount();\n\t\tfinal double[] min = new double[channelCount];\n\t\tfinal double[] max = new double[channelCount];\n\n\t\tif (imp instanceof CompositeImage) {\n\t\t\tfinal CompositeImage ci = (CompositeImage) imp;\n\t\t\tfor (int c = 0; c < channelCount; c++) {\n\t\t\t\t// some image modes return null for this call\n\t\t\t\tfinal ImageProcessor ip = ci.getProcessor(c + 1);\n\t\t\t\tif (ip != null) {\n\t\t\t\t\t// use the data min max when possible\n\t\t\t\t\tmin[c] = ip.getMin();\n\t\t\t\t\tmax[c] = ip.getMax();\n\t\t\t\t}\n\t\t\t\telse { // ip == null\n\t\t\t\t\t// use best estimate we last had\n\t\t\t\t\tLUT[] luts = ci.getLuts();\n\t\t\t\t\tmin[c] = luts[c].min;\n\t\t\t\t\tmax[c] = luts[c].max;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tdouble mn = imp.getDisplayRangeMin();\n\t\t\tdouble mx = imp.getDisplayRangeMax();\n\t\t\tif ((imp.getBitDepth() == 16) && (imp.getCalibration().isSigned16Bit())) {\n\t\t\t\tmn -= 32768.0;\n\t\t\t\tmx -= 32768.0;\n\t\t\t}\n\t\t\tfor (int c = 0; c < channelCount; c++) {\n\t\t\t\tmin[c] = mn;\n\t\t\t\tmax[c] = mx;\n\t\t\t}\n\t\t}\n\n\t\tDataset dataset = imgDispSrv.getActiveDataset(disp);\n\t\tRealType<?> type = dataset.getType();\n\t\tfor (int c = 0; c < channelCount; c++) {\n\t\t\tdouble mn = outOfBounds(min[c], type) ? type.getMinValue() : min[c];\n\t\t\tdouble mx = outOfBounds(max[c], type) ? type.getMaxValue() : max[c];\n\t\t\tif (mn > mx) {\n\t\t\t\tthrow new IllegalArgumentException(\"Bad display range setting\");\n\t\t\t}\n\t\t\tview.setChannelRange(c, mn, mx);\n\t\t}\n\t}", "void makeAnalysis(double v_min, double v_max) {\n\t\t\tfmt_result = universalFormat;\n\t\t\tdouble range = v_max - v_min;\n\t\t\tscale = 0.;\n\t\t\tif (range > 0.) {\n\t\t\t\tscale = Math.pow(10., Math.floor(1.000001 * Math.log(range) / Math.log(10.0)));\n\t\t\t}\n\t\t\tif (scale == 0.) {\n\t\t\t\tscale = 1.;\n\t\t\t\tvalue_min = -1.0;\n\t\t\t\tvalue_max = +1.0;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvalue_min = scale * Math.floor(v_min / scale);\n\t\t\tvalue_max = scale * Math.ceil(v_max / scale);\n\t\t\tif (value_min * value_max == 0. && (scale == Math.abs(value_max) || scale == Math.abs(value_min))) {\n\t\t\t\tscale = scale / 5.0;\n\t\t\t\tvalue_min = scale * Math.floor(v_min / scale);\n\t\t\t\tvalue_max = scale * Math.ceil(v_max / scale);\n\t\t\t}\n\n\t\t\tdouble[] arr = new double[3];\n\t\t\tarr[0] = scale;\n\t\t\tarr[1] = value_min;\n\t\t\tarr[2] = value_max;\n\n\t\t\tdouble zz_max = Math.max(Math.abs(arr[1]), Math.abs(arr[2]));\n\t\t\tint nV = (int) (Math.floor(1.0001 * Math.log(zz_max) / Math.log(10.0)));\n\t\t\tif (nV >= 0) {\n\t\t\t\tnV += 1;\n\t\t\t} else {\n\t\t\t\tnV -= 1;\n\t\t\t}\n\n\t\t\tzz_max = zz_max / Math.abs(arr[0]);\n\t\t\tint nD = (int) (Math.floor(1.0001 * Math.log(zz_max) / Math.log(10.0)));\n\t\t\tif (nD >= 0) {\n\t\t\t\tnD += 1;\n\t\t\t}\n\n\t\t\t//This is for zoom, so we want to increase number of significant digits\n\t\t\tnD = nD + 1;\n\n\t\t\tif (nV >= 4) {\n\t\t\t\tint n = Math.min(4, Math.abs(nD));\n\t\t\t\tfmt_result = scientificFormats[n];\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (nV > 0 && nV < 4) {\n\t\t\t\tif (nV >= nD) {\n\t\t\t\t\tfmt_result = simpleFormats[0];\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tint n = Math.min(4, Math.abs(nV - nD));\n\t\t\t\t\tfmt_result = simpleFormats[n];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (nV < 0 && nV > -4) {\n\t\t\t\tint n = Math.abs(nV) + Math.abs(nD) - 2;\n\t\t\t\tif (n <= 4) {\n\t\t\t\t\tfmt_result = simpleFormats[n];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void calculateScale(){scale = (getHeight() - margin)/Collections.max(list);}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ setAlwaysNotify Set the always_notify flag to determine whether or not a MESSAGES_PROCESSED message will be sent every time the list of messages is processed, or only if the list of messages was NOT empty and at least one message returned true. Setting this true can be useful for driving animations.
public void setAlwaysNotify( boolean onoff ) { this.always_notify = onoff; }
[ "public void setNotify(boolean flag) {\n this.notify = flag;\n }", "public void setMessageNotify(java.lang.String messageNotify) {\n this.messageNotify = messageNotify;\n }", "public void setNotify(String message) {\n\t\tset(\"notify\", message);\n\t}", "public void setNotify(long notify) {\n\t\tthis.notify = notify;\n\t}", "public void setPromptlyNotify(Boolean promptlyNotify) {\r\n\t\tthis.promptlyNotify = promptlyNotify;\r\n\t}", "public void doNotify() {\r\n\t\tdefaults.event(\"*\");\r\n\t\tdefaults.doNotify();\r\n\t}", "public Builder setAlwaysProcess(boolean value) {\n \n alwaysProcess_ = value;\n onChanged();\n return this;\n }", "public synchronized boolean dispatchMessages()\n { \n synchronized(lists_lock)\n {\n\n if ( message_table.size() <= 0 ) // nothing to send\n {\n if ( always_notify )\n send( MESSAGES_PROCESSED );\n return false;\n }\n // grab all current messages and\n // replace master table of messgaes\n // with a new empty table\n sender_message_table = message_table;\n message_table = new Hashtable<Object,Vector<Message>>();\n\n // get copy of table of receivers\n sender_receiver_table = new Hashtable<Object,Vector<IReceiveMessage>>();\n\n Vector<IReceiveMessage> list;\n Vector<IReceiveMessage> new_list;\n Enumeration keys = receiver_table.keys();\n while ( keys.hasMoreElements() )\n {\n Object key = keys.nextElement();\n list = receiver_table.get( key );\n new_list = new Vector<IReceiveMessage>();\n for ( int i = 0; i < list.size(); i++ )\n new_list.add( list.elementAt(i) );\n sender_receiver_table.put( key, new_list );\n }\n\n int n_changed = sendAll( sender_message_table, sender_receiver_table );\n if ( n_changed > 0 )\n return true;\n else\n return false;\n }\n }", "public boolean triggerNotify(String msg)\n {\n return triggerNotify(msg,null,null,null,null);\n }", "public void setNotifyStyle(String notifyStyle) {\n this.notifyStyle = notifyStyle == null ? null : notifyStyle.trim();\n }", "@SuppressWarnings(\"unused\")\n public void setNotifyWhileDragging(boolean flag) {\n this.notifyWhileDragging = flag;\n }", "public void setNotifications(boolean notifications)\n {\n this.notifications = notifications;\n postValue(this);\n }", "public void ifNotificationOnChecked() {\n\t\tif (notificationOnChecked && bNotification) {\n\t\t\tnotifyMain(\"Autostop:\\n\" + upTime + \" s\", \"Recording...\");\n\t\t} else {\n\t\t\tif (notificationManager != null) {\n\t\t\t\tnotificationManager.cancelAll();\n\t\t\t}\n\t\t}\n\t}", "public void setIsEnableCmqNotify(Long IsEnableCmqNotify) {\n this.IsEnableCmqNotify = IsEnableCmqNotify;\n }", "public void notifyListener() {\n\t\tbuffer.putInt(1);\n\t\tbuffer.flip();\n\t\tsocketLock.lock();\n\t\ttry {\n\t\t\tnotifyChannel.write(buffer);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"[Turing Server] Non è stato possibile notificare il client.\");\n\t\t}\n\t\tsocketLock.unlock();\n\t\tbuffer.clear();\n\t}", "public boolean getAlwaysProcess() {\n return alwaysProcess_;\n }", "public void setReconNotify(String reconNotify) {\n\t\tthis.reconNotify = reconNotify;\n\t}", "public void setEmailNotification(boolean value) {\n this.emailNotification = value;\n }", "public boolean getAlwaysProcess() {\n return alwaysProcess_;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Provides access to a the set of possible pixelvalue labels of a segmented image.
@Override public ImageData[] getLabels() { ImageData[] r = new ImageData[256]; // BJL: Need to revisit this assumption of 256 pixel values for (int i=0; i < r.length; i++) { r[i] = getLabel((double)i); } return r; }
[ "com.google.monitoring.v3.LabelValue getLabelValues(int index);", "java.util.List<com.google.monitoring.v3.LabelValue> \n getLabelValuesList();", "java.util.List<com.sri.recognizer.message.RecognizerMessages.SegmentValues> \n getAnnotationsList();", "public LabelElement[] getLabels();", "ArrayList<String> getLabels();", "public LabelStatement[] getLabels();", "public float[][] Image_Segmented(double[] kmeansLabels) {\n\n int x, y;\n ImageProcessor ip_ = sme_pluginGetManifold.getStack1().getProcessor(1); // Done just to have W and H of one image\n int W = ip_.getWidth(); // Get the image width\n int H = ip_.getHeight(); // Get the image height\n sme_pluginGetManifold.setMap2DImage( new float[W][H]);\n\n for (x = 0; x < W; x++) { //Go through x coordinates\n for (y = 0; y < H; y++) { //Go through y coordinates\n int k = y * W + x;\n sme_pluginGetManifold.getMap2DImage()[x][y] = (float) kmeansLabels[k];\n }\n }\n\n //Image Display in a new window\n FloatProcessor fp3 = new FloatProcessor(sme_pluginGetManifold.getMap2DImage());\n ImageProcessor ip3 = fp3.convertToFloat();\n ip3.setFloatArray(sme_pluginGetManifold.getMap2DImage());\n ImagePlus imp3 = new ImagePlus(\"SME_ENS_Kmeans_Engine Segmented Image\" + sme_pluginGetManifold.getImp().getTitle(), ip3);\n imp3.setProcessor(ip3);\n sme_pluginGetManifold.setImp3(imp3);\n //imp3.show();\n\n return sme_pluginGetManifold.getMap2DImage();\n }", "public Set<String> labelSet();", "protected void parseValueLabelsRecord() {\r\n PORValueLabels valuelabels = new PORValueLabels();\r\n \r\n int vartype = PORValue.TYPE_UNASSIGNED;\r\n\r\n // Parse the number of variables\r\n int count;\r\n \r\n // Variable names count\r\n count = parseIntU();\r\n \r\n valuelabels.vars.ensureCapacity(count);\r\n \r\n for (int i = 0; i < count; i++) {\r\n String varname = parseString();\r\n // Resolve variable\r\n PORVariable cvar = por.getVariable(varname);\r\n if (cvar == null) {\r\n error_parse(\"Value labels list specify an unknown variable: \\\"%s\\\"\", varname);\r\n }\r\n \r\n if (vartype == PORValue.TYPE_UNASSIGNED) {\r\n // Assign the type\r\n vartype = cvar.width == 0 ? \r\n PORValue.TYPE_NUMERIC : PORValue.TYPE_STRING;\r\n } else {\r\n // Verify the type\r\n if (((vartype == PORValue.TYPE_NUMERIC)\r\n && (cvar.width != 0)) \r\n || ((vartype == PORValue.TYPE_STRING)\r\n && (cvar.width == 0)))\r\n {\r\n error_parse(\"Value labels list contain contradictory value types\");\r\n }\r\n } // if-else\r\n \r\n // Append to the variables list\r\n valuelabels.vars.add(cvar);\r\n } // for: varnames list\r\n \r\n // Value labels count\r\n count = parseIntU();\r\n \r\n for (int i = 0; i < count; i++) {\r\n PORValue value;\r\n String label;\r\n \r\n value = parseValue(vartype);\r\n label = parseString();\r\n valuelabels.mappings.put(value, label);\r\n } // for: value-label list\r\n \r\n // Add to PORFile object\r\n por.labels.add(valuelabels);\r\n \r\n por.sections.add(PORSection.newValueLabelsRecord(valuelabels));\r\n }", "java.util.Map<java.lang.String, java.lang.String> getLabelsMap();", "prometheus.Types.Label getLabels(int index);", "public interface StringValueSetIndexes\n{\n /**\n * Get the {@link ImmutableBitmap} corresponding to the supplied value. Generates an empty bitmap when passed a\n * value that doesn't exist. Never returns null.\n */\n BitmapColumnIndex forValue(@Nullable String value);\n\n /**\n * Get an {@link Iterable} of {@link ImmutableBitmap} corresponding to the specified set of values (if they are\n * contained in the underlying column). The set must be sorted using\n * {@link org.apache.druid.java.util.common.guava.Comparators#naturalNullsFirst()}.\n */\n BitmapColumnIndex forSortedValues(SortedSet<String> values);\n}", "java.util.List<? extends com.google.monitoring.v3.LabelValueOrBuilder> \n getLabelValuesOrBuilderList();", "public int[] getLabels() {\n return this.labels;\n }", "public static List<String> getAllIconValues() {\n List<String> values = new ArrayList<String>();\n for (String value : MAP.keySet()) {\n values.add(value);\n }\n return values;\n }", "java.util.List<remote.RemoteStorage.LabelPair> \n getLabelsList();", "public final float[] exportSegmentation() {\n \tfloat[] seg = new float[nx*ny*nz];\n \tfor (int xyz=0; xyz<nx*ny*nz; xyz++) {\n \t\t//if (mgdmlabels[0][xyz]>-1) {\n\t\t\tif (segmentation[xyz]>-1) {\n\t\t\t\t//seg[xyz] = objLabel[mgdmlabels[0][xyz]];\n\t\t\t\tseg[xyz] = objLabel[segmentation[xyz]];\n\t\t\t}\n \t}\n \treturn seg;\n }", "DatasetLabel getLabel();", "double getLabelX();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test method for createSlots(long, long[]). In this case, the bidids is null.
public void testCreateSlots_NullBidIds() throws Exception { try { dao.createSlots(1, null); fail("IllegalArgumentException expected"); } catch (IllegalArgumentException e) { // should land here } }
[ "public void createParkingLot(int no_slots);", "@Override\r\n\tpublic void createSlots(Map<Integer, ParkingStatus> availableSlots, int noOfSlots) {\r\n\t\tAllocateParkingSlot.logger.info(CURRENT_CLASS_NAME + \"Executing createSlots method\" );\r\n\t\tSystem.out.println(\"Created parking lot with \" + noOfSlots + \" slots \");\r\n\t\tfor (int i = 1; i <= noOfSlots; i++) {\r\n\t\t\tParkingStatusBuilder psb = new ParkingStatusBuilder().setStatus(ParkingLotConstants.AVAILABE);\r\n\t\t\tavailableSlots.put(i, psb.getParkingStatus());\r\n\r\n\t\t}\r\n\r\n\t}", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Slot createSlot();", "@Test\n public void clusterSlots() {\n String status = ClusterCommandsTest.node1.clusterAddSlots(3000, 3001, 3002);\n Assert.assertEquals(\"OK\", status);\n status = ClusterCommandsTest.node2.clusterAddSlots(4000, 4001, 4002);\n Assert.assertEquals(\"OK\", status);\n List<Object> slots = ClusterCommandsTest.node1.clusterSlots();\n Assert.assertNotNull(slots);\n Assert.assertTrue(((slots.size()) > 0));\n for (Object slotInfoObj : slots) {\n List<Object> slotInfo = ((List<Object>) (slotInfoObj));\n Assert.assertNotNull(slots);\n Assert.assertTrue(((slots.size()) >= 2));\n Assert.assertTrue(((slotInfo.get(0)) instanceof Long));\n Assert.assertTrue(((slotInfo.get(1)) instanceof Long));\n if ((slots.size()) > 2) {\n // assigned slots\n Assert.assertTrue(((slotInfo.get(2)) instanceof List));\n }\n }\n }", "public abstract void constructSlots(IInventory inv);", "@Test\n\tvoid checkSlotAvailability(){\n\t\tfor (int i=0; i <= 50; i++){\n\t\t\tVehicle vehicle = new Vehicle(\"CAA0897\",\"Toyota\",\"Axio\",BigDecimal.valueOf(50000),\"auto\",1500,4,\"car\");\n\t\t\tvehicle.setNoOfPassengers(4);\n\t\t\tvehicle.setVehicleType(\"car\");\n\t\t\tvehicleList.add(vehicle);\n\t\t}\n\t\tString testMessage = rentalVehicleManager.addVehicleList(vehicleList);\n\t\tAssert.assertEquals(\"NO SLOTS AVAILABLE\",testMessage);\n\t}", "public void createParkingLot(String count) {\n this.slots = Integer.parseInt(count);\n vehicleMap = new HashMap<>();\n ageGroups = new AgeGroup[200];\n parkingslots = new ParkingSlot[slots+1];\n System.out.println(\"Created parking of \" + slots + \" slots\");\n }", "public void testUpdateSlots_NullSlots() throws PersistenceException {\n try {\n dao.updateSlots(null);\n fail(\"IllegalArgumentException expected\");\n } catch (IllegalArgumentException e) {\n // should land here\n }\n }", "InventorySlot[] slots();", "Slot createSlot();", "private void initiateSlots(){\n for(WeekSlots weekSlot: slots){\n Slot mon = weekSlot.getMonday();\n Slot tue = weekSlot.getTuesday();\n Slot wed = weekSlot.getWednesday();\n Slot thu = weekSlot.getThursday();\n Slot fri = weekSlot.getFriday();\n \n int monDay = Integer.parseInt(mon.getDate().split(\"/\")[0]);\n int tueDay = Integer.parseInt(tue.getDate().split(\"/\")[0]);\n int wedDay = Integer.parseInt(wed.getDate().split(\"/\")[0]);\n int thuDay = Integer.parseInt(thu.getDate().split(\"/\")[0]);\n int friDay = Integer.parseInt(fri.getDate().split(\"/\")[0]);\n \n if(monDay > LocalDate.now().getDayOfMonth()){\n mon.setBooked(false);\n }\n if(tueDay > LocalDate.now().getDayOfMonth()){\n tue.setBooked(false);\n }\n if(wedDay > LocalDate.now().getDayOfMonth()){\n wed.setBooked(false);\n }\n if(thuDay > LocalDate.now().getDayOfMonth()){\n thu.setBooked(false);\n }\n if(friDay > LocalDate.now().getDayOfMonth()){\n fri.setBooked(false);\n }\n }\n }", "private void addBlankSlots(int dayOfTheWeek)\n {\n for (int i = 0; i < times.length; i++)\n {\n //if exists then it doesn't matter, if it doesn't then we need to add a blank timeslot for that slot (time)\n boolean exists = false;\n\n for (Timeslot timeslot : timeslots)\n {\n if (timeslot.getSlot() == i)\n {\n exists = true;\n break;\n }\n }\n\n if(!exists)\n {\n Timeslot blankSlot = new Timeslot(\"\", \"\", \"\", \"\", dayOfTheWeek, i);\n timeslots.add(blankSlot);\n }\n }\n\n Collections.sort(timeslots, new TimeslotComparator());\n }", "@Test\n\tpublic void testValidate() {\n\t\tfor (Integer expectedDayOfMonth=1; expectedDayOfMonth<=31; expectedDayOfMonth++) {\n\t\t\ttestSlots.clear();\n\t\t\ttestSlots.put(\"DayOfMonth\", Slot.builder().withName(\"DayOfMonth\").withValue(expectedDayOfMonth.toString()).build());\n\t\t\tIntent intent = Intent.builder().withName(\"MyIntentName\").withSlots(testSlots).build();\n\t\t\tSlotDayOfMonth slotDayOfMonth = new SlotDayOfMonth(intent); \n\t\t\tassertEquals(expectedDayOfMonth, slotDayOfMonth.validate());\n\t\t}\n\t\t\n\t\t// Validate for a \"bad\" Slot in SlotDayOfMonth\n\t\ttestSlots.clear();\n\t\ttestSlots.put(\"DayOfMonth\", Slot.builder().withName(\"DayOfMonth\").withValue(\"0\").build());\n\t\tIntent intent = Intent.builder().withName(\"MyIntentName\").withSlots(testSlots).build();\n\t\tSlotDayOfMonth slotDayOfMonth = new SlotDayOfMonth(intent);\n\t\tassertNull(slotDayOfMonth.validate());\n\t\t\n\t\t// Validate for a \"bad\" Slot in SlotDayOfMonth\n\t\ttestSlots.clear();\n\t\ttestSlots.put(\"DayOfMonth\", Slot.builder().withName(\"DayOfMonth\").withValue(\"32\").build());\n\t\tintent = Intent.builder().withName(\"MyIntentName\").withSlots(testSlots).build();\n\t\tslotDayOfMonth = new SlotDayOfMonth(intent);\n\t\tassertNull(slotDayOfMonth.validate());\n\t\t\n\t\t// Validate for a \"bad\" Slot in SlotDayOfMonth\n\t\ttestSlots.clear();\n\t\ttestSlots.put(\"DayOfMonth\", Slot.builder().withName(\"DayOfMonth\").withValue(\"garbage\").build());\n\t\tintent = Intent.builder().withName(\"MyIntentName\").withSlots(testSlots).build();\n\t\tslotDayOfMonth = new SlotDayOfMonth(intent);\n\t\tassertNull(slotDayOfMonth.validate());\n\t\t\n\t\t// Validate for a null Slot in SlotDayOfMonth\n\t\ttestSlots.clear();\n\t\ttestSlots.put(\"DayOfMonth\", Slot.builder().withName(\"DayOfMonth\").withValue(null).build());\n\t\tintent = Intent.builder().withName(\"MyIntentName\").withSlots(testSlots).build();\n\t\tslotDayOfMonth = new SlotDayOfMonth(intent);\n\t\tassertNull(slotDayOfMonth.validate());\n\t\t\n\t\t// Validate for a empty (whitespace only) Slot in SlotDayOfMonth\n\t\ttestSlots.clear();\n\t\ttestSlots.put(\"DayOfMonth\", Slot.builder().withName(\"DayOfMonth\").withValue(\" \").build());\n\t\tintent = Intent.builder().withName(\"MyIntentName\").withSlots(testSlots).build();\n\t\tslotDayOfMonth = new SlotDayOfMonth(intent);\n\t\tassertNull(slotDayOfMonth.validate());\n\t}", "void freeInactiveSlots(JobID jobId, @RpcTimeout Time timeout);", "public void setSlots(java.util.List<maestro.components.internal.Slot> value) {\n this.slots = value;\n }", "@Test\n public void testCreateAppointment() {\n //CREATING TIMESLOT\n Calendar c = Calendar.getInstance();\n c.set(2021, Calendar.MAY, 1, 9, 0, 0);\n Date appointmentDate = new Date(c.getTimeInMillis());\n LocalTime startTime = LocalTime.parse(\"09:00\");\n c.set(2021, Calendar.MAY, 1, 10, 0, 0);\n LocalTime endTime = LocalTime.parse(\"10:00\");\n TimeSlot timeSlot = timeSlotService.createTimeSlot(appointmentDate, Time.valueOf(startTime), Time.valueOf(endTime));\n timeSlot.setId(0L);\n\n List<BookableService> bookableServices = createTestListServices();\n Customer customer = createTestCustomer();\n Appointment appointment = null;\n try {\n appointment = appointmentService.createAppointment(bookableServices, customer, timeSlot);\n\n } catch (AppointmentException e) {\n // Check that no error occurred\n fail();\n }\n checkResultAppointment(appointment,bookableServices,\n customer.getEmail(),appointmentDate, startTime,endTime);\n }", "private void syncSlotsToClub() {\n\t\n\t\tLOGGER.info(\"syncSlotsToClub: Reviewing slot requirements for Club:\" + this.getSName());\n\t\tGDatabase db = (GDatabase) ContextManager.getDatabase(\"GDatabase\");\n\t\tGDatabase db2 = (GDatabase) ContextManager.getDatabase(\"GDatabase\");\n\t\t//\n\t\t// lets get the information for the outside loop now..\n\t\t//\n\t\tArrayList<String> dates = db.getWeekendsForAllSeasons();\n\t\t\n\t\t//\n\t\t// Lets remove too early and too late\n\t\t//\n\t\tString sEarliestDate = dates.get(0);\n\t\tString sLatestDate = dates.get(dates.size() -1);\n\t\tdb2.removeEarlySlots(this, sEarliestDate);\n\t\tdb2.removeLateSlots(this, sLatestDate);\n\t\tdb2.cleanup();\n\n\t\tfor (String date : dates) {\n\t\t\t\n\t\t\t // first .. lets remove all the slots that are there prior to any scheduling\n\t\t\t // \n\t\t\t ResultSet rs = db.getSlotTeamplate(this, date);\n\t\t\t if (rs != null) {\n\t\t\t\t try {\n\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\tint i=1;\n\t\t\t\t\t\tString sFromDate = rs.getString(i++);\n\t\t\t\t\t\tString sToDate = rs.getString(i++);\n\t\t\t\t\t\tString sGameLen = rs.getString(i++);\n\t\t\t\t\t\tint iSlotCount = rs.getInt(i++);\n\t\t\t\t\t\tLOGGER.info(\"syncSlotsToClub: Slot req for club \" + this.getSName() + \" are sc=\" + iSlotCount + \". fdate=\" + sFromDate + \". todate=\" + sToDate + \". gl=\" + sGameLen);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// Ok.. here we do the following:\n\t\t\t\t\t\t// \n\t\t\t\t\t\t\n\t\t\t\t\t\t// later.. we need to eliminate any extra slots that are \"unused\".. if any\n\t\t\t\t\t\t// if we have extra slots that are used.. we have to renumber them so they are sequential.\n\t\t\t\t\t\t// this is important so we do not have any gaps..\n\t\t\t\t\t\t// this will happen if teams get deleted and we need less slots for that particular weekend.\n\t\t\t\t\t\t// \n\t\t\t\t\t\tfor (int c = 1;c<=iSlotCount;c++) {\n\t\t\t\t\t\t\tdb2.synchSlot(this,c,sFromDate,sToDate,sGameLen);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdb2.cleanup();\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// ok.. for the given week.. we want to remove any slots that exist that are above and beyond\n\t\t\t\t\t\t// andy count\n\t\t\t\t\t\tdb2.removeExcessSlots(this,sFromDate, sToDate, sGameLen,iSlotCount);\n\t\t\t\t\t\tdb2.cleanup();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tdb.cleanup();\n\t\t\t\t}\n\t\t\t }\n\t\t\t \n\t\t\n\t\t}\n\t\tdb.free();\n\t\t //\n\t\t// ok.. now we have to look to see if we can take our generic slots and see if we can assign any club slots to\n\t\t// give them real meaning\n\t\t//\n\t\t// The club could have recently added club slots to make up for their short commings\n\t\t// \n\t\tdb.synchClubSlots(this); // Match them up based upon date and unassigned\n\t\tdb.fillMisfitSlots(this, \"1.5\"); // take any extra club provided slots and force them into an open gen slot\n\t\tdb.fillMisfitSlots(this, \"1.25\"); // take any extra club provided slots and force them into an open gen slot\n\t\tdb.createBonusSlots(this); // Generate bonus slots\n\t\tdb2.free();\n\t\tLOGGER.info(\"syncSlotsToClub: Done reviewing slot requirements for Club:\" + this.getSName());\n\t\t\n\t}", "private void addContainerSlots()\n {\n //the Slot constructor takes the IInventory and the slot number in that it binds to\n //and the x-y coordinates it resides on-screen\n for (int slotIndex = 0; slotIndex < SampleMod.CONTAINER_SIZE; slotIndex++) \n { \n int xCoord = INVENTORY_LEFT + slotIndex % 3 * SampleMod.INVENTORY_SLOT_SIZE;\n int yCoord = INVENTORY_TOP + slotIndex / 3 * SampleMod.INVENTORY_SLOT_SIZE;\n addSlotToContainer(new Slot(this.containerEntity, slotIndex, xCoord, yCoord));\n }\n }", "private boolean isSlotsValid (int slots) {\n\t\treturn slots>=0 && slots<5;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }