query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
This function allows the user to select the directory they would like to use when constructing their Slideshow
private void changeDirectory() { directory = SlideshowManager.getDirectory(this); //use SlideshowManager to select a directory if (directory != null) //if a valid directory was selected... { JFrame loading = new JFrame("Loading..."); Image icon = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB_PRE); loading.setIconImage(icon); loading.setResizable(false); loading.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); loading.setSize(new Dimension(250,30)); loading.setLocationRelativeTo(null); loading.setVisible(true); timeline.reset(); timeline.setSlideDurationVisible(automated); timeline.setDefaultSlideDuration(slideInterval); m_ImageLibrary = ImageLibrary.resetLibrary(timeline, directory); //...reset the libraries to purge the current contents... JScrollPane spImages = new JScrollPane(m_ImageLibrary); spImages.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); spImages.getVerticalScrollBar().setUnitIncrement(20); libraries.remove(0); libraries.add("Images", spImages); m_AudioLibrary.resetAudio(); m_AudioLibrary = AudioLibrary.resetLibrary(timeline, directory); JScrollPane spAudio = new JScrollPane(m_AudioLibrary); spAudio.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); spAudio.getVerticalScrollBar().setUnitIncrement(20); libraries.remove(0); libraries.add("Audio", spAudio); loading.dispose(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String setFolderPath(int selection) {\n\t\tString directory = \"\";\n\t\tswitch (selection) {\n\t\tcase 1:\n\t\t\tdirectory = \"\\\\art\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tdirectory = \"\\\\mikons_1\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tdirectory = \"\\\\mikons_2\";\n\t\t\tbreak;\n\t\t}\n\t\treturn directory;\n\t}", "private void chooseDirectoryAction(){\n\t\t \tJFileChooser chooser = new JFileChooser(); \n\t\t chooser.setCurrentDirectory(lastChoosedDirectory == null ? new java.io.File(\".\") : lastChoosedDirectory);\n\t\t chooser.setDialogTitle(translations.getChooseDirectory());\n\t\t chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\t\t //\n\t\t // disable the \"All files\" option.\n\t\t //\n\t\t chooser.setAcceptAllFileFilterUsed(false);\n\t\t // \n\t\t if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { \n\t\t \tFile file = chooser.getSelectedFile();\n\t\t \tsetDirectoryInfoLabel(file.getAbsolutePath());\n\t\t\t\tsetMessage( translations.getDirChosen().replace(\"#replace\", file.getAbsolutePath() ) );\n\t\t\t\tlastChoosedDirectory = file;\n\t\t }\n\t\t else {\n\t\t \tsetDirectoryInfoLabel(translations.getDirHasNotBeenChosen());\n\t\t \tshowWarningMessage( translations.getDirHasNotBeenChosen() );\n\t\t \tlastChoosedDirectory = null;\n\t\t }\n\t}", "public void updateLabtainersPath(){\n labsPath = new File(labtainerPath + File.separator + \"labs\");\n labChooser.setCurrentDirectory(labsPath); \n }", "private void showDestinationDirChooser() {\r\n\t\tDirectoryChooser chooser = new DirectoryChooser();\r\n\t\tchooser.setTitle(\"Pick destination directory for split DARs. Hint: use a folder on TeacherShare.\");\r\n\t\tFile defaultDirectory = new File(System.getenv(\"userprofile\") + \"\\\\Desktop\");\r\n\t\tchooser.setInitialDirectory(defaultDirectory);\r\n\t\tFile selectedDirectory = chooser.showDialog(null);\r\n\r\n\t\tif (selectedDirectory != null) {\r\n\t\t\tString messageS = null;\r\n\t\t\tmessageS = selectedDirectory.getAbsolutePath();\r\n\t\t\tpreferences.setProperty(prefOutputPath, messageS);\r\n\t\t\tdestinationDirFX.update();\r\n\t\t}\r\n\t}", "@FXML\n private void selectPath(MouseEvent mouseEvent) {\n\n DirectoryChooser directoryChooser = new DirectoryChooser();\n File selectedDirectory = directoryChooser.showDialog(getStage(mouseEvent));\n if (selectedDirectory != null){\n pathTextField.setText(selectedDirectory.getPath());\n }\n\n }", "@Override\n public void onChosenDir(String chosenDir) {\n ((EditTextPreference)preference).setText(chosenDir);\n AvnLog.i(Constants.LOGPRFX, \"select chart directory \" + chosenDir);\n }", "private void setupDirectoryChooser(DirectoryChooser directoryChooser) \n {\n directoryChooser.setTitle(\"Select Directory to save Report\");\n\n // Set Initial Directory\n directoryChooser.setInitialDirectory(new File(System.getProperty(\"user.home\")));\n }", "public SlideshowEditor()\n {\n // INITIALIZING THE WINDOW\n \t\n try { //set theme for SlideshowEditors\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n setTitle(\"Slideshow Editor\");\n setLayout(new BorderLayout());\n\n // CREATING THE TIMELINE\n\n timeline = Timeline.getInstance();\n add(timeline, BorderLayout.EAST);\n\n // CREATING THE MEDIA LIBRARIES\n\n libraries = new JTabbedPane();\n\n m_ImageLibrary = ImageLibrary.getInstance(timeline, null); //initialize libraries with null since user has not selected a directory\n JScrollPane spImages = new JScrollPane(m_ImageLibrary);\n spImages.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n spImages.getVerticalScrollBar().setUnitIncrement(20);\n libraries.add(\"Images\", spImages);\n\n m_AudioLibrary = AudioLibrary.getInstance(timeline, null);\n JScrollPane spAudio = new JScrollPane(m_AudioLibrary);\n spAudio.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n spAudio.getVerticalScrollBar().setUnitIncrement(20);\n libraries.add(\"Audio\", spAudio);\n\n libraries.setPreferredSize(new Dimension(1000,750));\n add(libraries, BorderLayout.WEST);\n\n libraries.setBorder(BorderFactory.createTitledBorder(\"Media\"));\n\n libraries.addChangeListener(new ChangeListener() {\n public void stateChanged(ChangeEvent e) {\n timeline.setActivePane(libraries.getSelectedIndex()); //makes sure Timeline tab matches selected library\n }\n });\n\n timeline.enablePaneMatch(libraries);\n\n // CONFIGURING THE WINDOW\n\n JMenuBar topMenu = new JMenuBar(); //create a menu bar for the window\n setJMenuBar(topMenu);\n\n JMenu fileMenu = new JMenu(\"File\");\n topMenu.add(fileMenu);\n\n JMenuItem newDirectory = new JMenuItem(\"Set Directory\"); //allow user to set directory for Slideshow creation\n newDirectory.addActionListener(event -> changeDirectory());\n newDirectory.setAccelerator(\n KeyStroke.getKeyStroke(KeyEvent.VK_O, ActionEvent.CTRL_MASK)); //add keyboard shortcut Ctrl + O\n fileMenu.add(newDirectory);\n\n JMenuItem exportSlideshow = new JMenuItem(\"Export Slideshow\");\n exportSlideshow.addActionListener(event -> timeline.exportSlideshow(automated));\n exportSlideshow.setAccelerator(\n KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK)); //add keyboard shortcut Ctrl + S\n fileMenu.add(exportSlideshow);\n\n JMenuItem closeProgram = new JMenuItem(\"Exit\"); //add Exit Program button to File menu\n closeProgram.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n System.exit(0);\n }\n });\n fileMenu.add(closeProgram);\n\n JMenu settingsMenu = new JMenu(\"Settings\");\n topMenu.add(settingsMenu);\n\n JMenuItem changeSettings = new JMenuItem(\"Change Playback Settings\");\n changeSettings.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (!settingsPresent)\n {\n settingsPresent = true;\n settingsPopup();\n }\n else\n settingsFrame.toFront();\n }\n });\n\n settingsMenu.add(changeSettings);\n\n JMenu helpMenu = new JMenu(\"Help\");\n topMenu.add(helpMenu);\n\n JMenuItem tutorial = new JMenuItem(\"Tutorial\");\n String tutorialMsg = \"<html>Creating a slideshow is easy!<br><ol><li>Open the folder containing the image and audio files you'd like to use. (File -> Set Directory)</li>\" +\n \"<li>To add image and audio files to your slideshow, just click \\\"Add\\\" under the given image/audio file.</li>\" +\n \"<li>To set your slideshow to play back automatically, open the settings window (Settings -> Change Playback Settings) and click the \\\"Automatic Slideshow\\\" checkbox. <br>From there, click the \\\"Submit Changes\\\" button to save your settings. (To set it back to manual, just do the reverse!)</li>\" +\n \"<li>To change the default slide duration of an automatic slideshow, open the settings window and change the value in the \\\"Default Slide Duration\\\" textbox. <br>From there, click the \\\"Submit Changes\\\" button to save your settings.</li>\" +\n \"<li>To change the duration of an individual slide in an automatic slideshow, uncheck the \\\"Use Default Slide Duration\\\" at the bottom of the slide item in the Timeline.<br>From there, click the \\\"Change Duration\\\" button to the right of the slide duration value and enter a new value.<br>(To set it back to the default slide duration, just recheck the \\\"Use Default Slide Duration\\\" checkbox!)</li>\" +\n \"<li>To set a transition to play at the beginning of a slide, select a transition type from the \\\"Transition Type\\\" dropdown at the top of a slide item.</li>\" +\n \"<li>To change the duration of a slide's transition, select a transition duration from the \\\"Transition Duration\\\" dropdown at the top of a slide item.<br>(This dropdown will only be enabled if a transition has been set.)</li>\" +\n \"<li>To move a slide up/down the timeline, click the \\\"Move Up/Down\\\" button at the bottom of a slide item.</li>\" +\n \"<li>To remove a slide from your slideshow, click the \\\"Remove\\\" button at the bottom on a slide item.</li>\" +\n \"<li>Audio items in the Timeline work the same as slide items, except they can't use transitions.</li>\" +\n \"<li>To export your slideshow, navigate to File -> Export Slideshow. From there, give your slideshow a name and click save!<br>Your slideshow is now stored in the same folder as your image and audio files.</li></ol>\" +\n \"NOTE: The left column of blocks in the \\\"Timing\\\" area of the screen, present when creating an automatic slideshow, represents slides. The right column represents audio clips.<br></html>\";\n tutorial.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showMessageDialog(null, tutorialMsg, \"Tutorial\", JOptionPane.INFORMATION_MESSAGE);\n }\n });\n\n helpMenu.add(tutorial);\n\n ImageIcon windowIcon = new ImageIcon(\"images\\\\SlideshowIcon.png\");\n // TODO: Uncomment below for JAR\n //ImageIcon windowIcon = new ImageIcon(getClass().getClassLoader().getResource(\"SlideshowIcon.png\"));\n Image icon = windowIcon.getImage();\n setIconImage(icon);\n setSize(new Dimension(1500, 750));\n setResizable(false);\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n pack();\n setLocationRelativeTo(null);\n setVisible(true);\n\n\n String welcomeMsg = \"<html><div style='text-align: center;'>Welcome to the greatest slideshow creator ever made.<br>To start creating a slideshow, \" +\n \"use the \\\"File\\\" menu in the top left corner<br>and select \\\"Set Directory\\\" and find the directory containing the images and audio you'd like to work with.<br>\" +\n \"This will also be the directory you'll save your slideshow into.<br>Go ahead. Select one. (You know you want to.)</div></html>\";\n JOptionPane.showMessageDialog(null, welcomeMsg, \"Welcome to Slideshow Editor!\", JOptionPane.INFORMATION_MESSAGE);\n }", "public void showDirPath(String[] list);", "@FXML\n private void chooseNewDirEvent() throws IOException {\n DirectoryChooser chooser = new DirectoryChooser();\n chooser.setTitle(\"Choose Home Directory\");\n Stage curStage = (Stage) rootPane.getScene().getWindow();\n File selectedDirectory = chooser.showDialog(curStage);\n if (selectedDirectory != null) {\n model.User.setRootDir(selectedDirectory);\n model.DirectoryManager.set(selectedDirectory);\n model.User.setGalleryPhotos(model.DirectoryManager.getTree().getDir().getPhotos());\n fadeOutEvent();\n } else {\n curStage.show();\n }\n }", "private void chooseFilesDirectory() {\n JFileChooser setWD = new JFileChooser(System.getProperty(\"user.home\"));\n setWD.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n setWD.setDialogType(JFileChooser.OPEN_DIALOG);\n setWD.showDialog(this, \"Выбрать папку\");\n workingDirectory = setWD.getSelectedFile();\n putLog(\"Директория с файлами: \" + workingDirectory.getPath());\n jbParse.setEnabled(workingDirectory != null && remainderFile != null);\n }", "@FXML private void handleExaminar() {\r\n \tDirectoryChooser dc = new DirectoryChooser();\r\n \tdc.setTitle(\"Examinar archivos\");\r\n \t\r\n \t\r\n \tFile dir = dc.showDialog(null); \r\n \t\r\n \tif(dir != null) {\r\n \t\tpath = dir.getAbsolutePath().replace('\\\\', '/');\r\n \t\ttext_examinar.setText(path);\r\n \t}\r\n \t\r\n \tlista_usuarios.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);\r\n \tlista_usuarios.setMouseTransparent( false );\r\n \tlista_usuarios.setFocusTraversable( true );\r\n }", "@FXML\r\n\tprivate void choisirFichier()\r\n\t{\r\n\t\tFileChooser fileChooser = new FileChooser();\r\n\r\n\t\tfileChooser\r\n\t\t\t\t.setInitialDirectory(new File(System.getProperty(\"user.dir\")));\r\n\t\tFile fichier = fileChooser.showOpenDialog(new Stage());\r\n\r\n\t\tif (fichier != null)\r\n\t\t{\r\n\t\t\ttextFieldFichier.setText(fichier.getPath());\r\n\t\t}\r\n\t}", "public void chooseOutputDirectory() {\n File file;\n JFileChooser fileChooser = new JFileChooser(\n new java.io.File(defaultDirectory));\n fileChooser.setDialogTitle(NbBundle.getMessage(\n SessionTopComponent.class, \"ChooseOutputDirectory\"));\n fileChooser.setFileSelectionMode(\n JFileChooser.DIRECTORIES_ONLY);\n int returnVal = fileChooser.showOpenDialog(this);\n\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n file = fileChooser.getSelectedFile();\n\n outputDirectoryTextField.setText(file.getAbsolutePath());\n defaultDirectory = file.getPath();\n }\n enableStartButton();\n }", "public void directoryPathPrompt() {\n System.out.println(\"Enter a file path to export the PDF of the schedule to.\");\n }", "@FXML\n private void handleChooseDirectory(){\n\n //Use directoryChooser for let user select the directory he wants\n //to be monitored\n DirectoryChooser directoryChooser = new DirectoryChooser();\n directoryChooser.setTitle(\"Select a directory to be monitored...\");\n directoryChooser.setInitialDirectory(new File(\"C:\\\\\"));\n File chosenDirectory = directoryChooser.showDialog(mainApp.getPrimaryStage());\n\n\n //Check that the path is valid and if it exists\n if(chosenDirectory.isDirectory() && chosenDirectory.exists()){\n //Put the full path in the textField\n directoryPathField.setText(chosenDirectory.getAbsolutePath());\n }\n\n //Enable buttons after directory has been chosen\n startWatcherButton.setDisable(false);\n stopWatcherButton.setDisable(true);\n\n //Getting the path\n monitoredPath = Paths.get(chosenDirectory.getAbsolutePath());\n }", "@Override\n public void onChosenDir(String chosenDir) {\n ((EditTextPreference)preference).setText(chosenDir);\n try {\n SettingsActivity.createWorkingDir(getActivity(), new File(chosenDir));\n } catch (Exception ex) {\n Toast.makeText(getActivity(), ex.getMessage(), Toast.LENGTH_SHORT).show();\n }\n AvnLog.i(Constants.LOGPRFX, \"select work directory \" + chosenDir);\n }", "private static JFileChooser createFileChooser() {\n final JFileChooser fc = new JFileChooser();\n fc.setCurrentDirectory(new java.io.File(\".\"));\n fc.setDialogTitle(\"Select the folder containing project files and audio exports\");\n fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n fc.setCurrentDirectory(loadFilePath());\n return fc;\n }", "public static void processDirectorySelecction()\n {\n int answer = JSoundsMainWindowViewController.jFileChooser1.showOpenDialog(JSoundsMainWindowViewController.jSoundsMainWindow);\n \n if (answer == JFileChooser.APPROVE_OPTION)\n {\n File actualDirectory = JSoundsMainWindowViewController.jFileChooser1.getCurrentDirectory();\n String directory = actualDirectory.getAbsolutePath() + \"/\" + JSoundsMainWindowViewController.jFileChooser1.getSelectedFile().getName();\n UtilFunctions.listFilesAndFilesSubDirectories(directory);\n JSoundsMainWindowViewController.orderBy(true, false, false);\n \n \n }\n }", "private void showPathChooser() {\n Log.d(TAG, \"****showPathChooser*****\");\n\n // BaseMediaPaths.getInstance().addPath(\"/mnt/sdcard/\");\n\n loadBasePaths();\n\n }", "public void chooseDataDirectory() {\n File file;\n JFileChooser fileChooser = new JFileChooser(\n new java.io.File(defaultDirectory));\n fileChooser.setDialogTitle(NbBundle.getMessage(\n SessionTopComponent.class, \"ChooseDataDirectory\"));\n fileChooser.setFileSelectionMode(\n JFileChooser.DIRECTORIES_ONLY);\n int returnVal = fileChooser.showOpenDialog(this);\n\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n file = fileChooser.getSelectedFile();\n\n dataDirectoryTextField.setText(file.getAbsolutePath());\n defaultDirectory = file.getPath();\n }\n enableStartButton();\n }", "private void showFileChooser(){\n\t\t//Create the file chooser with a default directory of the last downloadPath (default will be user.home\\Downloads\\)\n\t\tJFileChooser chooser = new JFileChooser(downloadPath);\n\t\t//Allow the file chooser to only select directories\n\t\tchooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\t\t//Set the title\n\t\tchooser.setDialogTitle(\"Choose where to save your images\");\n\t\t//If the user chose a directory, then set the new path\n\t\tif(chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION){\t\n\t\t\tdownloadPath = chooser.getSelectedFile().getAbsolutePath() + File.separator;\n\t\t}\n\t\t//If the user did not choose a directory, then reset to default path\n\t\telse{\n\t\t\tsetDefaultPath();\n\t\t}\n\t\t//Check to see if the path is completed by a \\\n\t\tif(!downloadPath.endsWith(File.separator)){\n\t\t\tdownloadPath += File.separator;\n\t\t}\n\t\t//Update to let the user see where their files are downloaded\n\t\tcurrentPath.setText(downloadPath);\n\t\tcurrentPath.setToolTipText(downloadPath);\n\t}", "private static Path openDirectoryDialog(String title, String initialPath) throws Exception, Error {\n System.setProperty(\"apple.awt.fileDialogForDirectories\", \"true\");\n\n FileDialog chooser = new FileDialog(MainWindow.getFrame(), title);\n if (StringUtils.isNotBlank(initialPath)) {\n Path path = Paths.get(initialPath);\n if (Files.exists(path)) {\n chooser.setDirectory(path.toFile().getAbsolutePath());\n }\n }\n chooser.setVisible(true);\n\n // reset system property\n System.setProperty(\"apple.awt.fileDialogForDirectories\", \"false\");\n\n if (StringUtils.isNotEmpty(chooser.getFile())) {\n return Paths.get(chooser.getDirectory(), chooser.getFile());\n }\n else {\n return null;\n }\n }", "@FXML\n private void pickDiscFour() {\n activeDisc = \"Disc 4\";\n discSwitchButton.setText(\"Disc 4\");\n displayFilesFromDisc();\n }", "@FXML\n private void pickDiscOne() {\n activeDisc = \"Disc 1\";\n discSwitchButton.setText(\"Disc 1\");\n displayFilesFromDisc();\n }", "public CommandLineBuilderPanel() {\n initComponents();\n buildCommandLine();\n fileChooser.setCurrentDirectory(new File(System.getProperty(\"user.dir\")));\n }", "public String choosePath(int chooserType) {\n JFileChooser jfc=new JFileChooser();\n jfc.setFileSelectionMode(chooserType );\n jfc.showDialog(new JLabel(), \"选择\");\n File file=jfc.getSelectedFile();\n if(file.isDirectory()){\n return file.getAbsolutePath()+\"\\\\\";\n }\n System.out.println(jfc.getSelectedFile().getName());\n return file.getAbsolutePath();\n }", "public void actionPerformed(ActionEvent e) {\n\t \tJFileChooser fileChooser = new JFileChooser(lastChoosenDir);\n\t int returnValue = fileChooser.showOpenDialog(null);\n\t if (returnValue == JFileChooser.APPROVE_OPTION) {\n\t selectedFile = fileChooser.getSelectedFile();\n\t lastChoosenDir = selectedFile.getParentFile();\n\t System.out.println(selectedFile.getName());\n\t // lblSlika=new JLabel(\"aa\");\n\t displayChosen();\n\t \n\t // content.add(lblSlika);\n\t \n\t }\n\t }", "public void fileChooser() {\n\t\tWindow stage = mediaView.getScene().getWindow();\n// configureFileChooser(fileChooser);\n\t\tfileChooser.setTitle(\"Open Resource File\");\n\t\tfileChooser.getExtensionFilters().addAll(new ExtensionFilter(\"Video Files\", \"*.mp4\", \"*.mpeg\"),\n\t\t\t\tnew ExtensionFilter(\"Audio Files\", \"*.mp3\"),\n\t\t\t\tnew ExtensionFilter(\"All Files\", \"*.*\"));\n\t\tFile selectedFile = fileChooser.showOpenDialog(stage);\n\t\tif (selectedFile != null) {\n\t\t\ttry {\n\t\t\t\tif(arrayList.size() != 0) {\n\t\t\t\t\tmp.stop();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdesktop.open(selectedFile);\n\t\t\t\tdirectory = selectedFile.getAbsolutePath();\n\t\t\t\t\n\t\t\t\tplayMedia(directory);\n\t\t\t\t\n\t\t\t\tarrayList.add(new File(directory));\n//\t\t\t\tSystem.out.println(arrayList.get(i).getName());\n\t\t\t\ti++;\n\t\t\t\t\n\n\t\t\t} catch (IOException ex) {\n\t\t\t\tLogger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t}\n\t\t}\n\t}", "@FXML\n private void pickDiscThree() {\n activeDisc = \"Disc 3\";\n discSwitchButton.setText(\"Disc 3\");\n displayFilesFromDisc();\n }", "private static String getDirectory() {\n System.out.println(\"Please enter a directory: \");\n Scanner dirScanner = new Scanner(System.in);\n return dirScanner.nextLine();\n }", "public String promptForFolder( Component parent )\n\t{\n\t JFileChooser fc = new JFileChooser();\n\t fc.setFileSelectionMode( JFileChooser.FILES_AND_DIRECTORIES);\n\n\t if( fc.showOpenDialog( parent ) == JFileChooser.APPROVE_OPTION )\n\t {\n\t return fc.getSelectedFile().getAbsolutePath();\n\t }\n\n\t return null;\n\t}", "public plateInterface() {\r\n initComponents();\r\n setTitle(\"停车场计费系统\");\r\n// label = new JLabel();\r\n// add(label);\r\n chooser = new JFileChooser();\r\n chooser = new JFileChooser();\r\n chooser.setCurrentDirectory(new File(\"E:\"));\r\n \r\n\r\n \r\n \r\n\r\n\r\n }", "@FXML\n public void openFolder()\n {\n try\n {\n Desktop.getDesktop().open(nng.getStorePopulation().getParentFile());\n }\n catch (IOException e)\n {\n }\n }", "void selectImage(String path);", "@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tJFileChooser fc = new JFileChooser();\r\n\t\t\t\t\tfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\r\n\t\t\t\t\tint result = fc.showOpenDialog(new JFrame());\r\n\t\t\t\t\tif(result == JFileChooser.APPROVE_OPTION){\r\n\t\t\t\t\t\tString path = fc.getSelectedFile().getAbsolutePath();\r\n\t\t\t\t\t\ttfPath.setText(path);\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "private void setChooser ()\n {\n chooser.setCurrentDirectory (new File (\".\"));\n // accept all files ending with .xml\n chooser.setFileFilter (new javax.swing.filechooser.FileFilter ()\n {\n public boolean accept (File f)\n {\n return f.getName ().toLowerCase ().endsWith (\".xml\") || f.isDirectory ();\n }\n\n public String getDescription ()\n {\n return \"XML files\";\n }\n });\n }", "public String openDirectoryChooser() {\n\t\tthis.setCurrentDirectory(new File(\".\"));\n\t\tthis.setDialogTitle(\"Choose your path\");\n\t\tthis.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\t\tthis.setAcceptAllFileFilterUsed(false);\n\t\tint returnValue = this.showOpenDialog(null);\n\t\tif (returnValue == JFileChooser.APPROVE_OPTION) {\n\t\t\treturn this.getSelectedFile().getAbsolutePath();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public boolean onPreferenceClick(final Preference preference) {\n SimpleFileDialog FolderChooseDialog = new SimpleFileDialog(getActivity(), SimpleFileDialog.FolderChoose,\n new SimpleFileDialog.SimpleFileDialogListener() {\n @Override\n public void onChosenDir(String chosenDir) {\n // The code in this function will be executed when the dialog OK button is pushed\n ((EditTextPreference)preference).setText(chosenDir);\n AvnLog.i(Constants.LOGPRFX, \"select chart directory \" + chosenDir);\n }\n\n @Override\n public void onCancel() {\n\n }\n });\n FolderChooseDialog.Default_File_Name=\"avnav\";\n FolderChooseDialog.dialogTitle=getString(R.string.selectChartDir);\n FolderChooseDialog.newFolderNameText=getString(R.string.newFolderName);\n FolderChooseDialog.newFolderText=getString(R.string.createFolder);\n FolderChooseDialog.chooseFile_or_Dir(myChartPref.getText());\n return true;\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\r\n JFileChooser fileChooser = new JFileChooser();\r\n fileChooser.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\r\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"*.Images\", \"jpg\", \"gif\", \"png\");\r\n fileChooser.addChoosableFileFilter(filter);\r\n int result1 = fileChooser.showOpenDialog(null);\r\n if(result1 == JFileChooser.APPROVE_OPTION) {\r\n \tselectedFile = fileChooser.getSelectedFile();\r\n \treview.setText(selectedFile.getAbsolutePath());\r\n }\r\n }", "@Override\r\n\tprotected void directorySelectionChangedDirectly() {\n\r\n\t}", "public String show() {\n Stage stage = new Stage();\n FileChooser fc = new FileChooser();\n\n //geef de filechooser een duidelijke naam zodat de gebruiker weet wat hij/zij moet doen.\n fc.setTitle(\"Selecteer een eerder opgeslagen .SAV bestand.\");\n\n //zorg dat de filechooser alleen .sav files accepteert.\n FileChooser.ExtensionFilter extentionFilter = new FileChooser.ExtensionFilter(\"SAV files .sav\", \"*.sav\");\n fc.getExtensionFilters().add(extentionFilter);\n\n //initial directory = de home folder van de user.\n String currentDir = System.getProperty(\"user.home\");\n File directoryPath = new File(currentDir);\n fc.setInitialDirectory(directoryPath);\n String filePath = fc.showOpenDialog(stage).getAbsolutePath();\n return filePath;\n }", "public void loadInputImage()\n{\n selectInput(\"Select a file to process:\", \"imageLoader\"); // select image window -> imageLoader()\n}", "public void goToSlide() {\t\t\t\t\r\n\t\tString pageNumberStr = JOptionPane.showInputDialog(\"Page number?\");\r\n\t\tint pageNumber = Integer.parseInt(pageNumberStr);\r\n\t\t\r\n\t\tgoToSlide(pageNumber);\r\n\t}", "private void jCBListFoodActionPerformed(java.awt.event.ActionEvent evt) {\n int aux2 = jCBListFood.getSelectedIndex();\n if (aux2 != -1) {\n filePath = \"C:\\\\PGS\\\\nutricion\\\\\" + jCBListFood.getSelectedItem();\n controller.openDocument(filePath);\n } else {\n filePath = \"\";\n }\n }", "private void loadFolderPressed() {\n\n\t\t// open a jfile chooser and then go through the directory chosen\n\t\t// then load all the video and audio files in that directory\n\n\t\tFile chosenDirectory =null;\n\n\t\t// choose a directory only\n\t\tJFileChooser chooser = new JFileChooser();\n\t\tchooser.setCurrentDirectory(new java.io.File(\".\"));\n\t\tchooser.setDialogTitle(\"Choose Directory\");\n\t\tchooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\t\tint response = chooser.showOpenDialog(Library.this);\n\t\tif (response == JFileChooser.APPROVE_OPTION) {\n\t\t\t// Chose the directory to save to\n\t\t\tchosenDirectory = chooser.getSelectedFile().getAbsoluteFile();\n\t\t}\n\t\tif(chosenDirectory != null){\n\t\t\t// go through the chosen directory and get all the files\n\t\t\tl.clear();\n\t\t\tFile[] directoryListing = chosenDirectory.listFiles();\n\t\t\tif (directoryListing != null) {\n\n\t\t\t\t// check if that file chosen currently is a media file. If it is then\n\t\t\t\t// add it to the list\n\t\t\t\tInvalidCheck ic = new InvalidCheck();\n\n\t\t\t\tfor(File f : directoryListing){\n\t\t\t\t\tboolean isValid = ic.invalidCheck(f.getAbsolutePath());\n\n\t\t\t\t\tif(isValid){\n\t\t\t\t\t\tlistFolder.add(f);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(File f2 : listFolder){\n\t\t\t\t\tSystem.out.println(f2.getName());\n\t\t\t\t}\n\n\t\t\t\t// get the paths and sizes of the media files.\n\t\t\t\tfor(File f : listFolder){\n\t\t\t\t\t// only put the file in if it is not size 0 so that any bad files are avoided.\n\t\t\t\t\tif(f.length() != 0){\n\t\t\t\t\t\tl.addElement(f.getName());\n\t\t\t\t\t\tpaths.put(f.getName(),f.getAbsoluteFile());\n\t\t\t\t\t\tsizes.put(f.getName(), f.length());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void subir_file()\n {\n FileChooser fc = new FileChooser();\n\n fc.getExtensionFilters().addAll(new FileChooser.ExtensionFilter(\"PDF Files\",\"*.pdf\")\n , new FileChooser.ExtensionFilter(\"Jpg Images\",\"*.jpg\",\"*.JPEG\",\"*.JPG\",\"*.jpeg\",\"*.PNG\",\"*.png\"));\n\n File fileSelected = fc.showOpenDialog(null);\n\n if (fileSelected!= null){\n txt_ruta.setText(fileSelected.getPath());\n\n if(txt_ruta.getText().contains(\".pdf\"))\n {\n System.out.println(\"si es pdf\");\n Image image = new Image(\"/sample/Clases/pdf.png\");\n image_esquema.setImage(image);\n\n }\n else\n {\n File file = new File(txt_ruta.getText());\n javafx.scene.image.Image image = new Image(file.toURI().toString());\n image_esquema.setImage(image);\n }\n\n }\n else{\n System.out.println(\"no se seleccinoó\");\n }\n }", "void openChooser(Property<String> pathProperty);", "public void setSrc(File source) {\r\n if (!(source.exists())) {\r\n throw new BuildException(\"the presentation \" + source.getName()+ \" doesn't exist\");\r\n }\r\n if (source.isDirectory()) {\r\n throw new BuildException(\"the presentation \" + source.getName() + \" can't be a directory\");\r\n }\r\n this._source = source;\r\n }", "private void chooseRemaindersFile() {\n JFileChooser setEF = new JFileChooser(System.getProperty(\"user.home\"));\n setEF.setDialogType(JFileChooser.OPEN_DIALOG);\n setEF.showDialog(this, \"Выбрать файл\");\n remainderFile = setEF.getSelectedFile();\n putLog(\"Файл остатков: \" + remainderFile.getPath());\n jbParse.setEnabled(workingDirectory != null && remainderFile != null);\n }", "private void setLabtainersDir() throws IOException{\n String newLabtainersPath = LabtainersDirTextfield.getText();\n \n // check if labtainers path exist\n if(new File(newLabtainersPath).isDirectory()){\n pathValidLabel.setVisible(false);\n \n FileOutputStream out = new FileOutputStream(iniFile);\n writeValueToINI(out, \"labtainersPath\", newLabtainersPath);\n\n labtainerPath = newLabtainersPath;\n updateLabtainersPath();\n \n LabtainersDirDialog.setVisible(false);\n }\n else{\n pathValidLabel.setVisible(true);\n } \n }", "private static void configureFileChooser(final FileChooser fileChooser){\n fileChooser.setTitle(\"View Pictures\");\n fileChooser.setInitialDirectory(\n new File(System.getProperty(\"user.home\"))\n );\n fileChooser.getExtensionFilters().setAll(jpg, png);\n }", "@FXML\n private void pickDiscTwo() {\n activeDisc = \"Disc 2\";\n discSwitchButton.setText(\"Disc 2\");\n displayFilesFromDisc();\n }", "@FXML\n private void pickDiscFive() {\n activeDisc = \"Disc 5\";\n discSwitchButton.setText(\"Disc 5\");\n displayFilesFromDisc();\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onChosenDir(String chosenDir) {\n\t\t\t\t\t\t\t\t\tm_chosen = chosenDir;\n\t\t\t\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Chosen FileOpenDialog File: \" +\n\t\t\t\t\t\t\t\t\t\t\tm_chosen, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\tRecord_Dialog_On = false;\n\t\t\t\t\t\t\t\t}", "public static String setFilePath() {\r\n\t\tJFileChooser fc = new JFileChooser(\".\"); // start at current directory\r\n\t\tint returnVal = fc.showOpenDialog(null);\r\n\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tFile file = fc.getSelectedFile();\r\n\t\t\tString pathName = file.getAbsolutePath();\r\n\t\t\treturn pathName;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn \"\";\r\n\t}", "private void outputFolderButtonActionPerformed(java.awt.event.ActionEvent evt) {\n JFileChooser chooser = new JFileChooser();\n chooser.setDialogTitle(\"Select Output Folder\");\n chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n File workingDirectory = new File(System.getProperty(\"user.dir\"));\n chooser.setCurrentDirectory(workingDirectory);\n if (chooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {\n outputFile = chooser.getSelectedFile();\n outputFolderLabel.setText(getFileName(chooser.getSelectedFile()));\n }\n }", "public File getFileChooserDirectory() {\n\n\t\tFile dir = null;\n\n\t\ttry {\n\t\t\tFile tmpDir = new File(diffuseBaseValueControl.getText());\n\t\t\tif (tmpDir.exists()) dir = tmpDir.getParentFile();\n\t\t} catch (Exception ex) {\n\t\t}\n\n\t\ttry {\n\t\t\tFile tmpDir = new File(specularBaseValueControl.getText());\n\t\t\tif (tmpDir.exists()) dir = tmpDir.getParentFile();\n\t\t} catch (Exception ex) {\n\t\t}\n\n\t\ttry {\n\t\t\tFile tmpDir = new File(((TextField) textureInputLayout.lookup(\"tex_path\")).getText());\n\t\t\tif (tmpDir.exists()) dir = tmpDir.getParentFile();\n\t\t} catch (Exception ex) {\n\t\t}\n\n\t\treturn dir;\n\t}", "private void displayFileChooser() {\n\n // Initiate file chooser, and set title\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"Save Poster\");\n\n // Set extension filter\n FileChooser.ExtensionFilter filter = new FileChooser.ExtensionFilter(\"Image\", \"*.jpg\");\n fileChooser.getExtensionFilters().add(filter);\n\n // If preferences file is empty\n if (userDirectoryString.equals(\"empty\")) {\n\n userDirectoryString = System.getProperty(\"user.home\");\n }\n\n File userDirectory = new File(userDirectoryString);\n\n // If it can't access User Home, default to C drive\n if (!userDirectory.canRead()) {\n userDirectory = new File(\"C:\\\\\");\n }\n\n // Set the initial save directory\n fileChooser.setInitialDirectory(userDirectory);\n\n if (movie != null) {\n\n // Get movie's title and set an initial file name\n String movieTitle = movie.getMovieTitle();\n\n // Replace any invalid characters\n movieTitle = movieTitle.replaceAll(\"[\\\"/?\\\"*><|]\", \"\").replace(\":\", \"-\");\n\n // Set initial file name\n fileChooser.setInitialFileName(movieTitle);\n }\n\n // Show file chooser dialog\n File file = fileChooser.showSaveDialog(primaryStage);\n\n // Check file isn't null, so it the image view\n if (file != null && imgPoster.getImage() != null) {\n\n try {\n\n ImageIO.write(SwingFXUtils.fromFXImage(imgPoster.getImage(), null), \"jpg\", file);\n setLblStatus(\"Poster saved successfully.\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Update preferences with the new location, and local variable\n preferences.put(\"saveLocation\", file.getParentFile().toString());\n userDirectoryString = file.getParentFile().toString();\n }\n }", "private void chooseFileWindow()\n\t{\n\t\tInitFrame init = new InitFrame();\n\t\tinit.setFilePath(FILE_NAME);\n\t\tJFrame frame = new JFrame(\"Bowling Game\");\t\t\t\n\t\tSplashScreen splash = new SplashScreen();\n splash.setFilePath(FILE_NAME);\n // Normally, we'd call splash.showSplash() and get on \n // with the program. But, since this is only a test... \n\t\t\n\t\tsplash.showSplash();\t\t\n\t\tframe.setSize(400,400);\t\t\n\t\tinit.LoadComponents(frame);\n\t\t\n\n\t\t// first show the first fileChooser window\n\t\t\n\t\tString p1 = \"\", p = init.FileChooser(frame);\n\t\tsimpleProgressBar progres = new simpleProgressBar(100,100);\n\t\t\t\n\t\t//System.out.println(\"p(VIEWCONTORLLER):\" + p + \" \" + p.length());\n\t\t\n\t\tint i = p.length() - 1, j = 0;\n\t\t//System.out.println(i + \" \" + p.charAt(i));\n\t\twhile(i > 0)\n\t\t{\n\t\t\tif( (p.charAt(i) == '/') || (p.charAt(i) == '\\''))\n\t\t\t{\n\t\t\t\tj = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\t\tp1 = p.substring(j, p.length());\n\t\t//FILE_NAME = p1;\n\t\tInitView.setTxtFilePath(p);\n\t\t//BowlFrame bFrame = new BowlFrame();\n\t\t//bFrame.setVisible(true);\n\t\twhile ( null==InitView.getTxtFilePath() )\n\t\t{ \n\t\t\t\n\t\t}\n\t\tSystem.out.println(\" FILENAME: \" + FILE_NAME);\n\t\tBowl = new BowlFrame(FILE_NAME);\t\t\n\t\tBowl.setVisible(true);\n\t\n\t\tframe.dispose();\n\t}", "void selectFile(){\n JLabel lblFileName = new JLabel();\n fc.setCurrentDirectory(new java.io.File(\"saved\" + File.separator));\n fc.setDialogTitle(\"FILE CHOOSER\");\n FileNameExtensionFilter xmlfilter = new FileNameExtensionFilter(\n \"json files (*.json)\", \"json\");\n fc.setFileFilter(xmlfilter);\n int response = fc.showOpenDialog(this);\n if (response == JFileChooser.APPROVE_OPTION) {\n lblFileName.setText(fc.getSelectedFile().toString());\n }else {\n lblFileName.setText(\"the file operation was cancelled\");\n }\n System.out.println(fc.getSelectedFile().getAbsolutePath());\n }", "private String displayPDFFileDialog() {\r\n String fileName = null;\r\n if(fileChooser == null) {\r\n // COEUSQA-1925: Narrative upload recall the last folder from which an upload Can't be done - Start\r\n// fileChooser = new JFileChooser();\r\n fileChooser = new CoeusFileChooser(CoeusGuiConstants.getMDIForm());\r\n if(budgetSubAwardFileFilter == null) {\r\n budgetSubAwardFileFilter = new BudgetSubAwardFileFilter();\r\n }\r\n fileChooser.setFileFilter(budgetSubAwardFileFilter);\r\n fileChooser.setAcceptAllFileFilterUsed(false);\r\n }\r\n// int selection = fileChooser.showOpenDialog(subAwardBudget);\r\n fileChooser.showFileChooser();\r\n if(fileChooser.isFileSelected()){\r\n // if(selection == JFileChooser.APPROVE_OPTION) {\r\n// File file = fileChooser.getSelectedFile();\r\n File file = fileChooser.getFileName();\r\n // COEUSQA-1925: Narrative upload recall the last folder from which an upload Can't be done - End\r\n fileName = file.getAbsolutePath();\r\n }\r\n return fileName;\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n JFileChooser j = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\n\n // set the selection mode to directories only\n j.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\n // invoke the showsSaveDialog function to show the save dialog\n int r = j.showSaveDialog(null);\n\n if (r == JFileChooser.APPROVE_OPTION) {\n // set the label to the path of the selected directory\n directory.setText(j.getSelectedFile().getAbsolutePath());\n }\n // if the user cancelled the operation\n else\n directory.setText(\"the user cancelled the operation\");\n }", "private void selectPDFFile() {\n JFileChooser jfc = new JFileChooser();\n jfc.setFileFilter(new PDFFilter());\n jfc.setMultiSelectionEnabled(false);\n int ret = jfc.showDialog(this, \"Open\");\n if (ret == 0) {\n readFile = jfc.getSelectedFile();\n inputField.setText(readFile.getAbsolutePath());\n String outString = readFile.getAbsolutePath();\n outString = outString.substring(0, outString.length() - 3);\n outString = outString + \"txt\";\n outputField.setText(outString);\n progressLabel.setBackground(INFO);\n progressLabel.setText(PRESS_EXTRACT);\n } else {\n System.out.println(NO_FILE_SELECTED);\n progressLabel.setBackground(WARNING);\n progressLabel.setText(SELECT_FILE);\n }\n }", "public abstract void chooseMedia();", "void selectDirectory(){\n fc.setCurrentDirectory(new java.io.File( \"saved\" + File.separator));\n fc.setDialogTitle(\"FILE CHOOSER!\");\n FileNameExtensionFilter xmlfilter = new FileNameExtensionFilter(\n \"json files (*.json)\", \"json\");\n fc.setFileFilter(xmlfilter);\n int response = fc.showSaveDialog(this);\n if (response == JFileChooser.APPROVE_OPTION) {\n File selectedFile = fc.getSelectedFile();\n System.out.println(\"Save as file: \" + selectedFile.getAbsolutePath());\n } else if (response == JFileChooser.CANCEL_OPTION) {\n System.out.println(\"Cancel was selected\");\n }\n System.out.println(fc.getSelectedFile().getAbsolutePath());\n }", "private void showSejdaChooser() {\r\n\t\tFileChooser fileChooser = new FileChooser();\r\n\t\tfileChooser.setInitialDirectory(new File(System.getenv(\"userprofile\")));\r\n\t\tfileChooser.setTitle(\r\n\t\t\t\t\"Select and open \\\"sedja-console\\\" from within \\\"sejda-console-2.10.4-bin\\\\sejda-console-2.10.4\\\\bin\\\"\");\r\n\t\t// fileChooser.setSelectedExtensionFilter(filter);\r\n\t\tFile selectedFile = fileChooser.showOpenDialog(null);\r\n\r\n\t\tif (selectedFile != null) {\r\n\t\t\tpreferences.setProperty(prefSejdaDirectory, selectedFile.getParent());\r\n\t\t\tpreferences.setProperty(prefSejdaLocation, selectedFile.getAbsolutePath());\r\n\t\t\tsedjaDARFX.update();\r\n\t\t}\r\n\t}", "public void setDir() throws FileNotFoundException, IOException{\r\n final JFileChooser jfc = new JFileChooser();\r\n jfc.setDialogTitle(\"Choose Workplace Dirtory\");\r\n FileSystemView fsv = FileSystemView.getFileSystemView();\r\n //wppath stores workplace location\r\n wppath = fsv.getDefaultDirectory();\r\n File rd = new File(wppath.getAbsolutePath() + \"/USQ_Reporter.txt\");\r\n int ext = 0;\r\n if(rd.exists())ext=1;\r\n if(!rd.exists())ext=2;\r\n FileReader fr; \r\n if(rd.exists()){\r\n fr= new FileReader(rd);\r\n if(fr.read()==-1)\r\n ext=2;\r\n }\r\n //System.out.println(ext);\r\n //workplace path\r\n if(ext==1) {\r\n BufferedReader br = new BufferedReader(new FileReader(rd));\r\n workplace = br.readLine();\r\n }else if (ext==2) {\r\n jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\r\n int returnVal = jfc.showOpenDialog(this);\r\n \r\n if(returnVal == JFileChooser.APPROVE_OPTION) {\r\n File file = jfc.getSelectedFile();\r\n if(!file.exists()) {\r\n JOptionPane.showMessageDialog(null, \"file doesn't exist.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n } else if(file.isDirectory()) {\r\n workplace = file.getAbsolutePath();\r\n }\r\n }\r\n BufferedWriter bw = new BufferedWriter(new FileWriter(rd));\r\n bw.write(workplace);\r\n bw.flush();\r\n bw.close();\r\n }\r\n }", "private void editLabtainersDirButton(){\n LabtainersDirTextfield.setText(labtainerPath);\n pathValidLabel.setVisible(false);\n LabtainersDirDialog.setVisible(true);\n }", "public void addDirectory1(View view){\n\t\tcontrol(1);\n\t}", "SubMenuItem(String directoryName) {\n super(directoryName, \"pieces/16/folder.png\");\n this.fileName = directoryName;\n this.extension = \"\";\n this.isDirectory = true;\n }", "public File start(){\n\t\t\n\t\tJFileChooser fileChooser = new JFileChooser();\n\t\tfileChooser.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\n\t\tint result = fileChooser.showOpenDialog(null);\n\t\tFile selectedFile = null;\n\t\tif (result == JFileChooser.APPROVE_OPTION) {\n\t\t\tselectedFile = fileChooser.getSelectedFile();\n\t\t}\n\t\treturn selectedFile;\n\t\t\n\t}", "private static void browseOrganizedMenu(OrganizedCategory folder)\n {\n\t// True if the 'Back to 'Main' menu...' option has been selected.\n\tboolean backToMain = false;\n\t// A browser for files beginning at the user's home directory.\n\tImageBrowser browser = new ImageBrowser(folder);\n\t// A temporary variable for holding the option the user chooses.\n\tint userOption;\n\t// A temporary variable for holding the text the user enters.\n\tString userText;\n\n\twhile(!backToMain)\n\t {\n\t\tbrowser.view();\n\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\">>Main>Browse organized images:\");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"1: Open image...\");\n\t\tSystem.out.println(\"2: Open sub category.\");\n\t\tSystem.out.println(\"3: Create new sub category.\");\n\t\tSystem.out.println(\"4: Open parent category.\");\n\t\tSystem.out.println(\"5: Move category/image...\");\n\t\tSystem.out.println(\"6: Remove category/image.\");\n\t\tSystem.out.println(\"7: Rename category/image.\");\n\t\tSystem.out.println(\"8: Back to 'Main' menu...\");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.print(\"\\t>> \");\n\t\t\n\t\tswitch(getUserOption())\n\t\t {\n\t\t case(1):\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.print(\"Please enter the number of the image you wish to open: \");\n\t\t\tuserOption = getUserOption();\n\t\t\tif(browser.get(userOption) != null)\n\t\t\t {\n\t\t\t\tif(browser.get(userOption).isImage())\n\t\t\t\t {\n\t\t\t\t\topenImageMenu((OrganizedImage) browser.get(userOption), userOption);\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t {\n\t\t\t\t\tSystem.out.println(\"That was not a valid option, please try again:\");\n\t\t\t\t }\n\t\t\t }\n\t\t\tbreak;\n\t\t case(2):\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.print(\"Please enter the number of the sub category you wish to open: \");\n\t\t\tuserOption = getUserOption();\n\t\t\tif(browser.get(userOption) != null)\n\t\t\t {\n\t\t\t\tbrowser.goToSubFolder(userOption);\n\t\t\t }\n\t\t\telse\n\t\t\t {\n\t\t\t\tSystem.out.println(\"That was not a valid option, please try again:\");\n\t\t\t }\n\t\t\tbreak;\n\t\t case(3):\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.print(\"Please enter the name of the new category you wish to add: \");\n\t\t\tbrowser.getCurrent().addEmptyCategory(getUserText());\n\t\t\tbreak;\n\t\t case(4):\n\t\t\tbrowser.goToParentFolder();\n\t\t\tbreak;\n\t\t case(5):\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.print(\"Please enter the number of the category/image you wish to move: \");\n\t\t\tuserOption = getUserOption();\n\t\t\tif(browser.get(userOption) != null)\n\t\t\t {\n\t\t\t\tmoveMenu(browser.getCurrent(), userOption);\n\t\t\t }\n\t\t\telse\n\t\t\t {\n\t\t\t\tSystem.out.println(\"That was not a valid option, please try again:\");\n\t\t\t }\n\t\t\tbreak;\n\t\t case(6):\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.print(\"Please enter the number of the category/image you wish to remove: \");\n\t\t\tbrowser.delete(getUserOption());\n\t\t\tSystem.out.println(\"Removed!!\");\n\t\t\tbreak;\n\t\t case(7):\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.print(\"Please enter the number of the category/image you wish to rename: \");\n\t\t\tuserOption = getUserOption();\n\t\t\tSystem.out.print(\"Please enter the new name (do not include .jpg): \");\n\t\t\tuserText = getUserText();\n\t\t\tif(browser.get(userOption) != null)\n\t\t\t {\n\t\t\t\tOrganized.rename(OrganizedCategory.get(browser.getCurrent(), userOption), userOption, userText);\n\t\t\t }\n\t\t\telse\n\t\t\t {\n\t\t\t\tSystem.out.println(\"That was not a valid option, please try again:\");\n\t\t\t }\n\t\t\tSystem.out.println(\"Renamed!!\");\n\t\t\tbreak;\n\t\t case(8):\n\t\t\tbackToMain = true;\n\t\t\tbreak;\n\t\t default:\n\t\t\tSystem.out.println(\"That was not a valid option, please try again:\");\n\t\t }\n\t }\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tJFileChooser jfc=new JFileChooser();\n\t\t\n\t\t//显示文件和目录\n\t\tjfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES );\n\t\tjfc.showDialog(new JLabel(), \"选择\");\n\t\tFile file=jfc.getSelectedFile();\n\t\t\n\t\t//file.getAbsolutePath()获取到的绝对路径。\n\t\tif(file.isDirectory()){\n\t\t\tSystem.out.println(\"文件夹:\"+file.getAbsolutePath());\n\t\t}else if(file.isFile()){\n\t\t\tSystem.out.println(\"文件:\"+file.getAbsolutePath());\n\t\t}\n\t\t\n\t\t//jfc.getSelectedFile().getName() 获取到文件的名称、文件名。\n\t\tSystem.out.println(jfc.getSelectedFile().getName());\n\t\t\n\t}", "public Categories1(Controller controller, LeapListener listener, String dos) {\n initComponents();\n this.listener = listener;\n this.controller = controller;\n doss = dos;\n File repertoire = new File(\"Images\\\\\"+doss);\n File[] files=repertoire.listFiles();\n for(int i=0; i<files.length;i++){\n \n if(files[i].getName().split(\"\\\\.\")[1].equals(\"jpg\")||files[i].getName().split(\"\\\\.\")[1].equals(\"png\")){\n System.out.println(files[i].getName());\n names.add(\"Images/\"+doss+\"/\"+files[i].getName());\n }\n }\n \n \n /* names.add(\"src/guibuilder/newpackage/PIG\");\n names.add(\"src/guibuilder/newpackage/PIG - Copie\");\n names.add(\"src/guibuilder/newpackage/PIG - Copie (2)\");*/\n // n = -1; \n n = 0;\n }", "public static void main(String[] args){\n File f = new File(System.getProperty(\"user.dir\"));\n if(os){\n path = f.toString()+\"\\\\YuuTubevideos\";\n }else{\n path = f.toString()+\"/YuuTubevideos\";\n }\n start_page();\n }", "public static void viewDirectory(String inputDirectory) {\n File directory = new File(inputDirectory);\n //check if it is a directory \n if (directory.isDirectory()) {\n //check if the directory has children \n if (directory.listFiles().length == 0) {\n System.out.println(\"Sorry, directory is empty!\");\n } //separate files and print [Folder] or [File]\n else {\n String listFiles[] = directory.list();\n System.out.println(\"Following are files in the directory \" + inputDirectory + \" :\\n \");\n for (String listFile : listFiles) {\n File allFiles = new File(listFile);\n System.out.println(\"-> \" + allFiles);\n }\n }\n } else {\n System.out.println(\"Invalid directory or path\");\n }\n }", "@Override\n public void handle(ActionEvent event)\n {\n DirectoryChooser dc = new DirectoryChooser();\n dc.setTitle(\"Choose output directory\");\n \n // Put the DirectoryChooser into a new Stage and get the file (=directory)\n Stage openFileStage = new Stage();\n openFileStage.setAlwaysOnTop(true);\n File directory = dc.showDialog(openFileStage);\n \n // set the output directory of the fileHandler\n fileHandler.setOutDir(directory);\n \n // tell the controller to save everything (convert to YAML and write to file(s))\n this.controller.saveCwlTools();\n }", "void setDirectory(File dir);", "private void openPathButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_openPathButtonActionPerformed\n\tFile savePath = PlatypusGUI.getInstance().getLastSavePath();\n\tif (savePath.isDirectory()) {\n\t try {\n\t\tDesktop.getDesktop().open(savePath);\n\t } catch (IOException ex) {\n\t\tex.printStackTrace();\n\t }\n\t}\n }", "public static Path selectDirectory(String title, String initialPath) {\n if (SystemUtils.IS_OS_MAC) {\n try {\n // open directory chooser\n return openDirectoryDialog(title, initialPath);\n }\n catch (Exception | Error e) {\n LOGGER.warn(\"cannot open AWT directory chooser: {}\", e.getMessage());\n }\n finally {\n // reset system property\n System.setProperty(\"apple.awt.fileDialogForDirectories\", \"false\");\n }\n }\n else {\n // try to open with NFD\n try {\n\n PointerBuffer outPath = MemoryUtil.memAllocPointer(1);\n\n // check if the initialPath is accessible\n if (StringUtils.isBlank(initialPath) || !Files.exists(Paths.get(initialPath))) {\n initialPath = System.getProperty(\"user.home\");\n }\n\n try {\n int result = NativeFileDialog.NFD_PickFolder(initialPath, outPath);\n if (result == NativeFileDialog.NFD_OKAY) {\n Path path = Paths.get(outPath.getStringUTF8());\n NativeFileDialog.nNFD_Free(outPath.get(0));\n return path;\n }\n else if (result == NativeFileDialog.NFD_CANCEL) {\n return null;\n }\n else {\n LOGGER.warn(\"NFD result was ERROR for path {}; trying JFileChooser\", initialPath);\n }\n }\n finally {\n MemoryUtil.memFree(outPath);\n }\n\n }\n catch (Exception | Error e) {\n LOGGER.error(\"could not call nfd - {}\", e.getMessage());\n }\n }\n\n // open JFileChooser\n return openJFileChooser(JFileChooser.DIRECTORIES_ONLY, title, initialPath, true, null, null);\n }", "private static File loadFile(){\n\t\t//make the window\n\t\tJFrame window=new JFrame();\n\t\ttry{\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\t\t}catch(Exception ex){}\n\t\tUIManager.put(\"FileChooser.readOnly\",Boolean.TRUE);\n\t\tJFileChooser fc=new JFileChooser();\n\t\tfc.setCurrentDirectory(new File(System.getProperty(\"user.dir\")+\"//examples\"));\n\t\t\n\t\t//get the file\n\t\tint result=fc.showOpenDialog(window);\n\t\tFile f;\n\t\tif(result==JFileChooser.APPROVE_OPTION){\n\t\t\tf=fc.getSelectedFile();\n\t\t}else{\n\t\t\tSystem.exit(0);\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t//close window and return\n\t\twindow.dispose();\n\t\treturn f;\n\t}", "private static JMenuItem getDirInEditor(){\n return new JMenuItem(NcStrGUILabel.DIR_IN_INDEX.getStr());\n }", "public void seleccionarArchivo(){\n JFileChooser j= new JFileChooser();\r\n FileNameExtensionFilter fi= new FileNameExtensionFilter(\"pdf\",\"pdf\");\r\n j.setFileFilter(fi);\r\n int se = j.showOpenDialog(this);\r\n if(se==0){\r\n this.txtCurriculum.setText(\"\"+j.getSelectedFile().getName());\r\n ruta_archivo=j.getSelectedFile().getAbsolutePath();\r\n }else{}\r\n }", "public void onMenuOpen() {\n String initialDirectory = getInitialDirectory();\n System.out.println(initialDirectory);\n File file = FileChooserHelper.showOpenDialog(initialDirectory, this);\n\n if (file == null || !file.exists() || !file.isFile()) {\n return;\n }\n\n handleMenuOpen(file.getAbsolutePath());\n }", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n \r\n System.out.println(\"Enter dirpath:\");\r\n String dirpath=br.readLine();\r\n System.out.println(\"Enter the dirname\");\r\n String dname=br.readLine();\r\n \r\n //create File object with dirpath and dname\r\n File f = new File(dirpath, dname);\r\n \r\n // File folder = new File(\"your/path\");\r\n File[] listOfFiles = f.listFiles();\r\n\r\n for (int i = 0; i < listOfFiles.length; i++) {\r\n if (listOfFiles[i].isFile()) {\r\n System.out.println(\"File \" + listOfFiles[i].getName());\r\n } else if (listOfFiles[i].isDirectory()) {\r\n System.out.println(\"Directory \" + listOfFiles[i].getName());\r\n }\r\n }\r\n }", "@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tdirChoose = new DirectoryChooser();\r\n\t\t\t\tfolder = dirChoose.showDialog(window);\r\n\t\t\t\t\r\n\t\t\t\tif(folder != null) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tnext();\r\n\t\t\t\t\t\tpos = 0;\r\n\t\t\t\t\t} catch(Exception e){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfiles = new ArrayList<>();\r\n\t\t\t\t\t//gets the folder and files in it\r\n\t\t\t\t\tfolder.getAbsolutePath();\r\n\t\t\t\t\tfiles = new ArrayList<String>(Arrays.asList(folder.list(new FilenameFilter(){\r\n\t\t\t\t @Override\r\n\t\t\t\t public boolean accept(File dir, String name) {\r\n\t\t\t\t return name.endsWith(\".mp3\") || name.endsWith(\".mp4\") || name.endsWith(\".wav\");\r\n\t\t\t\t }\r\n\t\t\t\t\t})));\r\n\t\t\t\t\t\r\n\t\t\t\t\tquerry = new ArrayList<>(files);\r\n\t\t\t\t\t//sets the path into something that the media will recognize\r\n\t\t\t\t\tfor (int i = 0; i < files.toArray().length; i++) {\r\n\t\t\t\t\t\tquerry.set(i,(\"file:\\\\\\\\\\\\\" + folder.getPath() + \"\\\\\" + files.get(i)).replace(\"\\\\\", \"/\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsongs = FXCollections.observableArrayList(files);\r\n\t\t\t\t\tlist.setItems(songs);\r\n\t\t\t\t list.setOnMouseClicked(new EventHandler<MouseEvent>() {\r\n\r\n\t\t\t\t @Override\r\n\t\t\t\t public void handle(MouseEvent event) {\r\n\t\t\t\t pos = list.getSelectionModel().getSelectedIndex() - 1;\r\n\t\t\t\t next();\r\n\t\t\t\t }\r\n\t\t\t\t });\r\n\t\t\t\t\tsetPlayer(querry);\r\n\t\t\t\t}\r\n\t\t\t}", "private void openFile() {\n\t\tJDialog fileDialog = new JDialog(this, \"Select File\", true);\n\t\tFileDialog filePanel = new FileDialog(this, this, false, false, false);\n\t\tfileDialog.getContentPane().add(filePanel);\n\t\tfileDialog.pack();\n\n\t\t// set the location.\n\t\tPoint p1 = this.getLocation();\n\t\tDimension d1 = this.getSize();\n\t\tDimension d2 = fileDialog.getSize();\n\t\tfileDialog.setLocation((p1.x + (d1.width / 2)) - (d2.width / 2),\n\t\t\t\t(p1.y + (d1.height / 2)) - (d2.height / 2));\n\n\t\tfilePanel.setCurrentDirectory(Config.getInstance().getBaseHarvestDir());\n\t\tfileDialog.show();\n\t}", "@Override\n public void onClick(View v) \n {\n DirectoryChooserDialog directoryChooserDialog = \n new DirectoryChooserDialog(getActivity(), \n new DirectoryChooserDialog.ChosenDirectoryListener() \n {\n @Override\n public void onChosenDir(String chosenDir) \n {\n m_chosenDir = chosenDir;\n Utils.getModel(CurrentPlaylistFragment.this).saveTracksFromDir(chosenDir);\n ((MainActivity) getActivity()).goToCurrentPlaylist();\n }\n }); \n // Toggle new folder button enabling\n directoryChooserDialog.setNewFolderEnabled(m_newFolderEnabled);\n // Load directory chooser dialog for initial 'm_chosenDir' directory.\n // The registered callback will be called upon final directory selection.\n directoryChooserDialog.chooseDirectory(m_chosenDir);\n m_newFolderEnabled = ! m_newFolderEnabled;\n }", "private void openFolder(String dest) {\n\t\tDesktop desktop = Desktop.getDesktop();\n\t\tFile dirToOpen = null;\n\t\ttry {\n\t\t\tdirToOpen = new File(dest);\n\t\t\tdesktop.open(dirToOpen);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void chooseDatasetDescriptionFile() {\n JFileChooser fileChooser = new JFileChooser(\n new java.io.File(defaultDirectory));\n fileChooser.setDialogTitle(NbBundle.getMessage(\n SessionTopComponent.class, \"ChooseDatasetDescriptionFile\"));\n fileChooser.setFileSelectionMode(\n JFileChooser.FILES_AND_DIRECTORIES);\n FileNameExtensionFilter fileFilter = new FileNameExtensionFilter(\n \"XML-filer\", \"xml\");\n fileChooser.setFileFilter(fileFilter);\n int returnVal = fileChooser.showOpenDialog(this);\n\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n datasetDescriptionFile = fileChooser.getSelectedFile();\n\n datasetDescriptionFileTextField.setText(\n datasetDescriptionFile.getAbsolutePath());\n defaultDirectory = datasetDescriptionFile.getPath();\n }\n enableStartButton();\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tJFileChooser chooser;\n\t\t\tif (currentPath == null) {\n\t\t\t\tchooser = new JFileChooser(System.getProperty(\"user.dir\"));\n\t\t\t} else {\n\t\t\t\tchooser = new JFileChooser(currentPath);\n\t\t\t}\n\t\t\tchooser.setFileFilter(new SvgFileFilter());\n\t\t\tint retval = chooser.showOpenDialog(canvas);\n\t\t\tif (retval == JFileChooser.APPROVE_OPTION) {\n\t\t\t\tFile f = chooser.getSelectedFile();\n\t\t\t\tcurrentPath = f.getPath();\n\t\t\t\tSystem.out.println(f.getAbsolutePath());\n\t\t\t\tloadNewDocument(f.getAbsolutePath());\n\t\t\t}\n\t\t}", "public void selectedImageButtonPushed(ActionEvent event) throws IOException {\n // get the Stage to open a new window\n Stage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"open Image\");\n //filter for .jpg and .png\n FileChooser.ExtensionFilter imageFilter = new FileChooser.ExtensionFilter(\"Image Files\",\"*.jpg\",\"*.png\");\n fileChooser.getExtensionFilters().add(imageFilter);\n // set the start directory\n String userDirectoryString = System.getProperty(\"user.home\")+\"\\\\Pictures\";\n File userDirectory = new File(userDirectoryString);\n // confirm that system can reach the directory\n if (!userDirectory.canRead())\n userDirectory = new File(System.getProperty(\"user.home\"));\n //set the file chooser to select initial directory\n fileChooser.setInitialDirectory(userDirectory);\n File imageFile = fileChooser.showOpenDialog(stage);\n if (imageFile != null && imageFile.isFile())\n {\n selectImage.setImage(new Image(imageFile.toURI().toString()));\n }\n }", "public void addDirectory(View view){\n\t\tif(count <= 5){\n\t\t\tswitch(count){\n\t\t\tcase 2:{\n\t\t\t\tLinearLayout layout = (LinearLayout) findViewById(R.id.linear_layout2);\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 3:{\n\t\t\t\tLinearLayout layout = (LinearLayout) findViewById(R.id.linear_layout3);\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 4:{\n\t\t\t\tLinearLayout layout = (LinearLayout) findViewById(R.id.linear_layout4);\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 5:{\n\t\t\t\tLinearLayout layout = (LinearLayout) findViewById(R.id.linear_layout5);\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tToast.makeText(\n\t\t\t\t\tHomeActivity.this, \"Maximum Number of Directories Chosen!\", Toast.LENGTH_LONG).show();\n\t\t}\n\n\t\tcount++;\n\t}", "private void browseOutputFilePath()\n\t{\n\t\tString filedirectory = \"\";\n\t\tString filepath = \"\";\n\t\ttry\n\t\t{\n\t\t\tJFileChooser fc = new JFileChooser(\".\");\n\t\t\tfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); //select directories or files\n\t\t\tfc.setDialogTitle(\"Please choose a directory to save the converted file(s)\");\n\n\t\t\tFileNameExtensionFilter sifdata = new FileNameExtensionFilter(\"SIF\", \"sif\");\n\t\t\tfc.addChoosableFileFilter(sifdata);\n\n\t\t\tint returnVal = fc.showOpenDialog(this); // shows the dialog of the file browser\n\t\t\t// get name und path\n\t\t\tif(returnVal == JFileChooser.APPROVE_OPTION)\n\t\t\t{\n\t\t\t\tmainframe.setOutputTextfieldText(fc.getSelectedFile().getAbsolutePath());\n\t\t\t}\n\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tJOptionPane\n\t\t\t\t\t.showMessageDialog(new JFrame(),\n\t\t\t\t\t\t\t\"Problem when trying to choose an output : \" + e.toString(),\n\t\t\t\t\t\t\t\"Warning\", JOptionPane.WARNING_MESSAGE);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static List<String> getSlides(String startDir, Object... varargs) {\n\t\t// setting the default values when arguments' values are omitted\n\t\tString sessionID = null;\n\t\t// we can either choose to have a non recursive call, a complete recursive call\n\t\t// or a recursive call to a certain depth, in the last case we use an integer to\n\t\t// define\n\t\t// depth\n\t\t// the following three variables intend to implement this\n\t\tString booleanOrInteger = \"\";\n\t\tBoolean recursive = false;\n\t\tInteger integerRecursive = 0;\n\t\tif (varargs.length > 0) {\n\t\t\tif (!(varargs[0] instanceof String) && varargs[0] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getSlides() : Invalid argument\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"...\");\n\t\t\t}\n\t\t\tsessionID = (String) varargs[0];\n\t\t}\n\t\tif (varargs.length > 1) {\n\t\t\tif ((!(varargs[1] instanceof Integer) && !(varargs[1] instanceof Boolean)) && (varargs[1] != null)) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getSlides() : Invalid argument\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"...\");\n\t\t\t}\n\t\t\tif (varargs[1] instanceof Boolean) {\n\t\t\t\trecursive = (Boolean) varargs[1];\n\t\t\t\tbooleanOrInteger = \"boolean\";\n\t\t\t}\n\t\t\tif (varargs[1] instanceof Integer) {\n\t\t\t\tintegerRecursive = (Integer) varargs[1];\n\t\t\t\trecursive = ((Integer) varargs[1]) > 0 ? true : false;\n\t\t\t\tbooleanOrInteger = \"integer\";\n\t\t\t}\n\t\t}\n\n\t\t// Return a list of slides available to sessionID in the startDir directory\n\t\tsessionID = sessionId(sessionID);\n\t\tif (startDir.startsWith(\"/\")) {\n\t\t\tstartDir = startDir.substring(1);\n\t\t}\n\t\tString url = apiUrl(sessionID, false) + \"GetFiles?sessionID=\" + PMA.pmaQ(sessionID) + \"&path=\"\n\t\t\t\t+ PMA.pmaQ(startDir);\n\t\ttry {\n\t\t\tURL urlResource = new URL(url);\n\t\t\tHttpURLConnection con;\n\t\t\tif (url.startsWith(\"https\")) {\n\t\t\t\tcon = (HttpsURLConnection) urlResource.openConnection();\n\t\t\t} else {\n\t\t\t\tcon = (HttpURLConnection) urlResource.openConnection();\n\t\t\t}\n\t\t\tcon.setRequestMethod(\"GET\");\n\t\t\tString jsonString = PMA.getJSONAsStringBuffer(con).toString();\n\t\t\tList<String> slides;\n\t\t\tif (PMA.isJSONObject(jsonString)) {\n\t\t\t\tJSONObject jsonResponse = PMA.getJSONObjectResponse(jsonString);\n\t\t\t\tpmaAmountOfDataDownloaded.put(sessionID,\n\t\t\t\t\t\tpmaAmountOfDataDownloaded.get(sessionID) + jsonResponse.length());\n\t\t\t\tif (jsonResponse.has(\"Code\")) {\n\t\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\t\tPMA.logger.severe(\"get_slides from \" + startDir + \" resulted in: \" + jsonResponse.get(\"Message\")\n\t\t\t\t\t\t\t\t+ \" (keep in mind that startDir is case sensitive!)\");\n\t\t\t\t\t}\n\t\t\t\t\tthrow new Exception(\"get_slides from \" + startDir + \" resulted in: \" + jsonResponse.get(\"Message\")\n\t\t\t\t\t\t\t+ \" (keep in mind that startDir is case sensitive!)\");\n\t\t\t\t} else if (jsonResponse.has(\"d\")) {\n\t\t\t\t\tJSONArray array = jsonResponse.getJSONArray(\"d\");\n\t\t\t\t\tslides = new ArrayList<>();\n\t\t\t\t\tfor (int i = 0; i < array.length(); i++) {\n\t\t\t\t\t\tslides.add(array.optString(i));\n\t\t\t\t\t}\n\t\t\t\t\t// return slides;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tJSONArray jsonResponse = PMA.getJSONArrayResponse(jsonString);\n\t\t\t\tpmaAmountOfDataDownloaded.put(sessionID,\n\t\t\t\t\t\tpmaAmountOfDataDownloaded.get(sessionID) + jsonResponse.length());\n\t\t\t\tslides = new ArrayList<>();\n\t\t\t\tfor (int i = 0; i < jsonResponse.length(); i++) {\n\t\t\t\t\tslides.add(jsonResponse.optString(i));\n\t\t\t\t}\n\t\t\t\t// return slides;\n\t\t\t}\n\n\t\t\t// we test if call is recursive, and if yes to which depth\n\t\t\tif (recursive) {\n\t\t\t\tfor (String dir : getDirectories(startDir, sessionID)) {\n\t\t\t\t\tif (booleanOrInteger.equals(\"boolean\")) {\n\t\t\t\t\t\tslides.addAll(getSlides(dir, sessionID, recursive));\n\t\t\t\t\t}\n\t\t\t\t\tif (booleanOrInteger.equals(\"integer\")) {\n\t\t\t\t\t\tslides.addAll(getSlides(dir, sessionID, integerRecursive - 1));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn slides;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}", "private void getFileOrDirectory() {\r\n // display file dialog, so user can choose file or directory to open\r\n JFileChooser fileChooser = new JFileChooser();\r\n\t fileChooser.setCurrentDirectory(new File(System.getProperty(\"user.dir\")));\r\n fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES );\r\n\r\n int result = fileChooser.showOpenDialog(this);\r\n\r\n // if user clicked Cancel button on dialog, return\r\n if (result == JFileChooser.CANCEL_OPTION )\r\n System.exit( 1 );\r\n\r\n File name = fileChooser.getSelectedFile(); // get File\r\n\r\n // display error if invalid\r\n if ((name == null) || (name.getName().equals( \"\" ))){\r\n JOptionPane.showMessageDialog(this, \"Invalid Name\",\r\n \"Invalid Name\", JOptionPane.ERROR_MESSAGE );\r\n System.exit( 1 );\r\n } // end if\r\n\t \r\n\t filename = name.getPath();\r\n }", "private void makeAPlayListPressed() {\n\t\t// get all the selected options and their file paths and then store them in the file with a each file and its path \n\t\t// seperated from the next one by a a newline character so they can be split at that point.\n\n\t\tplaylist = allMedia.getSelectedValuesList();\n\n\t\t// get all the paths of the selected items and put them in a list and make sure that they are not zero\n\t\tif(playlist.size() != 0){\n\n\t\t\tJOptionPane.showMessageDialog(null,\"The making og the playlist takes couple of minutes! Please let it run in the back!\");\n\t\t\t// now open up a jfile chooser and make the user pick a directory and make a folder\n\t\t\t// with the name of the playlist.. The name of the text file is the location chosen and \n\t\t\t// the name of the playlist\n\t\t\t// open up a option pane and get the name of a playlist.\n\t\t\tplaylistName.setVisible(true);\n\t\t\tfor(Object o : playlist){\n\t\t\t\tallPathPlaylist.add(paths.get(o.toString()));\n\t\t\t}\n\t\t\twriteToFile();\n\t\t}\n\n\t}", "void loadPreset(String absolutePath);", "private void setPathToRootOfPostVersionLists() {\n if (postBlockTypeToInvestigate == PostBlockTypeToInvestigate.Text) {\n pathToSelectedRootOfPostVersionLists = Paths.get(\"testdata\", \"files to investigate\", \"text\");\n } else if (postBlockTypeToInvestigate == PostBlockTypeToInvestigate.Code) {\n pathToSelectedRootOfPostVersionLists = Paths.get(\"testdata\", \"files to investigate\", \"code\");\n }\n }" ]
[ "0.61806065", "0.6037908", "0.60127246", "0.59716445", "0.5965534", "0.5924761", "0.58868265", "0.5851761", "0.5840536", "0.58166873", "0.58151084", "0.5812434", "0.5779322", "0.5770815", "0.5764809", "0.5748541", "0.57484686", "0.57130337", "0.56890154", "0.5660816", "0.5652908", "0.56321573", "0.55865026", "0.55716616", "0.55667233", "0.5530226", "0.55168027", "0.55097365", "0.55040765", "0.5483975", "0.54793", "0.54769206", "0.5443447", "0.5438499", "0.543166", "0.5415996", "0.5411199", "0.5394667", "0.53809667", "0.5361173", "0.5345794", "0.534523", "0.5340183", "0.5325852", "0.53155637", "0.5312393", "0.53122056", "0.5279882", "0.5277599", "0.5272311", "0.5245338", "0.5242588", "0.52077687", "0.5205419", "0.52041084", "0.52001065", "0.5193081", "0.5191987", "0.51611555", "0.51359683", "0.5134726", "0.51345366", "0.51291555", "0.512892", "0.5128206", "0.51234424", "0.5123364", "0.5103611", "0.5100451", "0.5100149", "0.5096067", "0.50755364", "0.50750065", "0.50543296", "0.5047382", "0.5043239", "0.5042113", "0.50333625", "0.50259817", "0.5024981", "0.5021562", "0.5019004", "0.5009798", "0.5009676", "0.50048053", "0.50032187", "0.49845228", "0.4980482", "0.49795896", "0.49729282", "0.4970358", "0.49696782", "0.49607557", "0.4957819", "0.4955889", "0.49526048", "0.49507564", "0.49472138", "0.49365082", "0.4933654" ]
0.7141142
0
This function returns the instance of SlideshowPlayer. If no instance exists, then one is created.
public static SlideshowEditor getInstance() { if (instance == null) { instance = new SlideshowEditor(); } return instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static synchronized Player getInstance(){\n if(Player.player == null){\n Player.player = new Player();\n }\n return Player.player;\n }", "public static MuzikoExoPlayer Instance() {\n if (instance == null) {\n instance = new MuzikoExoPlayer();\n }\n return instance;\n }", "public static MusicPlayer getInstance()\n {\n return INSTANCE;\n }", "public static MyPlayerAdapter getInstance() {\n if (playerAdapter == null) {\n synchronized (MyPlayerAdapter.class) {\n if (playerAdapter == null) playerAdapter = new MyPlayerAdapter();\n }\n }\n return playerAdapter;\n }", "Player getPlayer();", "Player createPlayer();", "public static VideoPlayers createVideoPlayers(){\n return new VideoPlayers();\n }", "public void createPlayer() {\n mainHandler = new Handler();\n videoTrackSelectionFactory = new AdaptiveTrackSelection.Factory(bandwidthMeter);\n trackSelector = new DefaultTrackSelector(videoTrackSelectionFactory);\n player = ExoPlayerFactory.newSimpleInstance(this, trackSelector);\n }", "public static ButtonJPanel getInstance(){\n if(instance == null){//if one does not exist, it makes one\n instance = new ButtonJPanel();\n }\n return instance; \n }", "public static AlertDialogPlay newInstance() {\n AlertDialogPlay frag = new AlertDialogPlay();\n Bundle args = new Bundle();\n frag.setArguments(args);\n return frag;\n }", "@CoverageIgnore\n public static HeadlessMediaPlayer newPlayer()\n {\n \n // Usage with the atLeast directive is taken from VLC's own media player \n // factory. The 2.1.0 version appears to correspond to a watershed release \n // that added critical functionality, so we keep it as is. For more info,\n // see: http://git.io/pV0u\n final LibVlc lib = LibVlcFactory.factory().atLeast(\"2.1.0\").create(); \n final String[] libvlcArgs = new String[]{\"\"};\n final libvlc_instance_t instance = lib.libvlc_new(libvlcArgs.length, libvlcArgs);\n return new DefaultHeadlessMediaPlayer(lib, instance);\n }", "Player getDormantPlayer();", "public Slide getSlide(int slideNumber, boolean mobile);", "public static PausePane getPausePane() {\n\t\tif (pausePane == null) {\n\t\t\tinitScene();\n\t\t}\n\t\treturn pausePane;\n\t}", "public Slide() {\r\n\t\tthis.title = \"NewSlide\";\r\n\t\tthis.imageFileName = \"\";\r\n\t\tthis.slideType = SlideType.NORMAL;\r\n\t\tthis.actionChoices = new ArrayList<>();\r\n\t\tthis.gameText = \"\";\r\n\t\tgameOver = false;\r\n\t}", "<P> LabyModPlayerService<P> getLabyPlayerService();", "public AudioPlayer getAudioPlayer() {\n if (audioPlayer == null) {\n try {\n audioPlayer = getDefaultAudioPlayer();\n } catch (InstantiationException e) {\n e.printStackTrace();\n }\n }\n\treturn audioPlayer;\n }", "public Slide getSlide(int number) {\n\t\tif (number < 0 || number >= getSize()){\n\t\t\treturn null;\n\t }\n\t\t\treturn (Slide)showList.get(number);\n\t}", "public PrePareLivePresenter createPresenter() {\n return new PrePareLivePresenter(this.mContext, this);\n }", "Presentation getPresentation();", "private MultiPlayer getPlayer() {\n try {\n\n java.net.URL.setURLStreamHandlerFactory(new java.net.URLStreamHandlerFactory() {\n\n public java.net.URLStreamHandler createURLStreamHandler(String protocol) {\n Log.d(\"LOG\", \"Asking for stream handler for protocol: '\" + protocol + \"'\");\n if (\"icy\".equals(protocol))\n return new com.spoledge.aacdecoder.IcyURLStreamHandler();\n return null;\n }\n });\n } catch (Throwable t) {\n Log.w(\"LOG\", \"Cannot set the ICY URLStreamHandler - maybe already set ? - \" + t);\n }\n\n if (mRadioPlayer == null) {\n mRadioPlayer = new MultiPlayer(this, AUDIO_BUFFER_CAPACITY_MS, AUDIO_DECODE_CAPACITY_MS);\n mRadioPlayer.setResponseCodeCheckEnabled(false);\n mRadioPlayer.setPlayerCallback(this);\n }\n return mRadioPlayer;\n }", "public Player getPlayer();", "public Player getPlayer();", "public Slide getSlide() {\n\t\treturn slide;\n\t}", "public static synchronized DBPresenter getInstance() {\r\n if (instance == null || !instance.getDbPath().equals(PropertiesLoader.getInstance().getDbLocation())\r\n || !instance.getDbHost().equals(PropertiesLoader.getInstance().getDbHost())\r\n || !instance.getDbPort().equals(PropertiesLoader.getInstance().getDbPort())) {\r\n instance = new DBPresenter(PropertiesLoader.getInstance().getDbLocation(), PropertiesLoader.getInstance()\r\n .getDbHost(),\r\n PropertiesLoader.getInstance().getDbPort());\r\n DBReaderWriter.createDatabasePresenter();\r\n }\r\n return instance;\r\n }", "public static ProjectPluginSession instance() {\n return (ProjectPluginSession)getInstance( ProjectPluginSession.class );\n }", "Slide getSlide(int slideNumber){\n return slides.get(slideNumber);\n }", "Player currentPlayer();", "private PlayerManager.PlayerInstance getPlayerInstance(int chunkX, int chunkZ, boolean createIfAbsent)\r\n {\r\n long var4 = (long)chunkX + 2147483647L | (long)chunkZ + 2147483647L << 32;\r\n PlayerManager.PlayerInstance var6 = (PlayerManager.PlayerInstance)this.playerInstances.getValueByKey(var4);\r\n\r\n if (var6 == null && createIfAbsent)\r\n {\r\n var6 = new PlayerManager.PlayerInstance(chunkX, chunkZ);\r\n this.playerInstances.add(var4, var6);\r\n this.playerInstanceList.add(var6);\r\n }\r\n\r\n return var6;\r\n }", "private MyPlayerAdapter(){\n if (playerAdapter != null){\n throw new RuntimeException(\n \"Use getInstance() method to get the single instance of this class.\"\n );\n }\n if (mContext == null) {\n mContext = MyApplication.context();\n }\n if( mSession == null ) {\n initMediaSession();\n }\n\n\n mPlayer = getMediaPlayer();\n }", "Player getCurrentPlayer();", "Player getCurrentPlayer();", "public Player getPlayer() {\n return p;\n }", "public static Parser<Plays> instance() {\r\n if (INSTANCE == null) {\r\n INSTANCE = new PlaysParser();\r\n }\r\n return INSTANCE;\r\n }", "public static VideoChunkProviderFactory getInstance()\r\n {\r\n return ourInstance;\r\n }", "protected Player getPlayer() {\n return getGame().getPlayers().get(0);\n }", "public Slide getCurrentSlide() {\n\t\treturn getSlide(currentSlideNumber);\n\t}", "Instance createInstance();", "public static Game getInstance() {\n\t\tif (game == null)\n\t\t\tgame = new Game();\n\t\treturn game;\n\t}", "private void setPlayer() {\n player = Player.getInstance();\n }", "public @Nullable\n ExoPlayer getMediaPlayer() {\n return mediaPlayer;\n }", "public AudioPlayer getDefaultAudioPlayer() throws InstantiationException {\n if (defaultAudioPlayer != null) {\n return defaultAudioPlayer;\n }\n \n String className = Utilities.getProperty(\n DEFAULT_AUDIO_PLAYER, DEFAULT_AUDIO_PLAYER_DEFAULT);\n\n try {\n Class cls = Class.forName(className);\n defaultAudioPlayer = (AudioPlayer) cls.newInstance();\n return defaultAudioPlayer;\n } catch (ClassNotFoundException e) {\n throw new InstantiationException(\"Can't find class \" + className);\n } catch (IllegalAccessException e) {\n throw new InstantiationException(\"Can't find class \" + className);\n } catch (ClassCastException e) {\n throw new InstantiationException(className + \" cannot be cast \"\n + \"to AudioPlayer\");\n }\n }", "public static final PikaxProcessor getInstance() {\n\t\tif (instance == null) {\n\t\t\treturn newInstance();\n\t\t}\n\t\treturn instance;\n\t}", "public static SlideShowFragment newInstance(int position) {\n SlideShowFragment fragment = new SlideShowFragment();\n //Create bundle\n Bundle args = new Bundle();\n //put Current Position in the bundle\n args.putInt(ARG_CURRENT_POSITION, position);\n //set arguments of SlideShowFragment\n fragment.setArguments(args);\n //return fragment instance\n return fragment;\n }", "public static SlideShowFragment newInstance(int position) {\n SlideShowFragment fragment = new SlideShowFragment();\n //Create bundle\n Bundle args = new Bundle();\n //put Current Position in the bundle\n args.putInt(ARG_CURRENT_POSITION, position);\n //set arguments of SlideShowFragment\n fragment.setArguments(args);\n //return fragment instance\n return fragment;\n }", "public Presentation getPresentation() {\n return presentation;\n }", "public Player getCurrentPlayer(){\n String playerId = getUser().get_playerId();\n\n Player player = null;\n\n try {\n player = getCurrentGame().getPlayer(playerId);\n } catch(InvalidGameException e) {\n e.printStackTrace();\n System.out.println(\"This is the real Error\");\n }\n\n return player;\n }", "public static Partie getInstance() {\r\n\t\tif(instance==null) {\r\n\t\t\tinitInstance(2, 2);\r\n\t\t}\r\n\t\treturn instance;\r\n\t}", "public ViewerManager2 getPlayer() {\n return this.player;\n }", "protected CameraInstance createCameraInstance() {\n CameraInstance cameraInstance = new CameraInstance(getContext());\n cameraInstance.setCameraSettings(cameraSettings);\n return cameraInstance;\n }", "public static Camera getInstance() {\r\n return instance;\r\n }", "public static SPSSDialog getCurrentInstance()\n\t{\n\t\treturn instance;\n\t}", "public PlayerInterface createPlayer(String godName, PlayerInterface p) {\n God god = find(godName);\n p = addEffects(p, god.getEffects());\n return p;\n }", "@Override\n public T getInstance() {\n return instance;\n }", "public boolean createSlide() {\n\t\treturn false;\n\t}", "public static Fragment newInstance() {\n\t\treturn new ScreenSlidePageFragment();\n\t}", "@Bean\n public MediaPlayer anotherCDPlayer() {\n return new CDPlayer(sgtPeppers());\n }", "protected Player getPlayer() { return player; }", "public Presentation getPresentation()\r\n\t{\r\n\t\treturn this.presentation;\r\n\t}", "public static SoundController getInstance() {\n\t\tif (controller == null) {\n\t\t\tcontroller = new SoundController();\n\t\t}\n\t\treturn controller;\n\t}", "public Player getPlayer(String name, Integer number, String type){\n if(type.equalsIgnoreCase(\"SOCCER\")) {\n return new SoccerPlayer(name, number);\n }\n else if(type.equalsIgnoreCase(\"TENNIS\")){\n return new TennisPlayer(name, number);\n }\n // Type doesn't exist, TODO Throw exception?\n return null;\n }", "private static Propiedades getInstance() {\n if (instance == null) {\n instance = new Propiedades();\n }\n return instance;\n }", "private MusicPlayer()\n {\n panel = new JFXPanel();\n }", "private static PDP getPDPNewInstance(){\n\n PDPConfig pdpConfig = balana.getPdpConfig();\n return new PDP(pdpConfig);\n }", "public Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }", "public static Camera getInstance() {\n return INSTANCE;\n }", "private void createPlayer() {\r\n try {\r\n mRadioPlayer = new RadioPlayer(getApplication(), mDeezerConnect,\r\n new WifiAndMobileNetworkStateChecker());\r\n mRadioPlayer.addPlayerListener(this);\r\n setAttachedPlayer(mRadioPlayer);\r\n } catch (DeezerError e) {\r\n handleError(e);\r\n } catch (TooManyPlayersExceptions e) {\r\n handleError(e);\r\n }\r\n }", "public static Camera open() { \n return new Camera(); \n }", "void createPlayer(Player player);", "public static RockboxWidgetProvider getInstance()\n {\n return mInstance;\n }", "@SuppressWarnings(\"unused\")\n public static IHubParkourPlayer getPlayer(Player player) throws NullPointerException {\n if (player == null) {\n throw new NullPointerException(\"Player cannot be null\");\n }\n return CacheManager.getPlayer(player);\n }", "public static Player getSimplePlayer(URL url) throws NoPlayerException, IOException {\r\n return Manager.createPlayer(url);\r\n }", "public Player getPlayer() {\r\n return player;\r\n }", "public Player getPlayer() {\n return me;\n }", "public static Game getGame()\n\t{\n\t\tif(instance == null)\n\t\t\tinstance = new Game();\n\t\treturn instance;\n\t}", "public PlayerView getPlayerView() {\n return playerView;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n return player;\n }", "public Player getPlayer() {\n\t\treturn p;\n\t}", "public static MusicManager getInstance() {\n\t\tif (musicManager == null)\n\t\t\tmusicManager = new MusicManager();\n\t\t\n\t\treturn musicManager;\n\t}", "public Player getPlayer(int idx) {\n\t\ttry {\n\t\t\tPlayer p = players.get(idx);\n\t\t\treturn p;\n\t\t} catch(Exception e) {\n\t\t\treturn null;\n\t\t}\n\t\n\t}", "public static GraphicHandler getInstance(){\n if( instance == null ){\n instance = new GraphicHandler() ;\n }\n\n return instance ;\n }", "public Player getPlayer()\r\n {\r\n return player;\r\n }", "public static GalleryPager newInstance() {\n GalleryPager fragment = new GalleryPager();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public static final PS3 create(int index){\n if( !libraryLoaded() ){\n System.out.println(\"PS3-ERROR: cannot create camera, dll not loaded\");\n return null;\n }\n \n PS3_Library.GUID guid = LIBRARY.CLEyeGetCameraUUID( index );\n if( guid.Data1 == 0){\n System.out.println(\"PS3-ERROR: index(\"+index+\") is not valid\");\n return null;\n }\n return new PS3(index, guid);\n }", "public static SingletonTextureFactory getInstance(){\n\t\treturn instance;\n\t}", "public static MainPanel getInstance ( String selectedSkin ) {\n\t\t\n\t\tif( singleton == null ) {\n\t\t\t\n\t\t\tsingleton = new MainPanel ( selectedSkin );\n\t\t\t\n\t\t}\n\t\t\n\t\treturn singleton;\n\t\t\n\t}", "public T getInstance() {\n return instance;\n }", "public static StackPane getGamePane() {\n\t\tif (gamePane == null) {\n\t\t\tinitScene();\n\t\t}\n\t\treturn gamePane;\n\t}", "public static GameManager getInstance() {\n return ourInstance;\n }", "public static PhoneticsFragment newInstance(Slide slide) {\n PhoneticsFragment fragment = new PhoneticsFragment();\n Bundle args = new Bundle();\n args.putParcelable(LessonActivity.ARG_NAME_SLIDE, slide);\n fragment.setArguments(args);\n return fragment;\n }", "public int getNumberOfSlides();", "public interface PlayerFactory {\r\n Player create(GUI gui);\r\n}", "@Override\n\t\tpublic Object getInstance() {\n\t\t\treturn null;\n\t\t}", "public static synchronized ActorPopup getInstance() {\n\t\tif (instance == null) {instance = new ActorPopup();}\n\t\treturn instance;\n\t}", "public MediaPlayerService getService() {\n return MediaPlayerService.this;\n }", "Instance getInstance(String id);" ]
[ "0.6490951", "0.6443656", "0.63846636", "0.62273157", "0.59648335", "0.5853318", "0.58299327", "0.57942474", "0.57582587", "0.57582223", "0.5720068", "0.56876653", "0.5674476", "0.56697893", "0.56497586", "0.5607873", "0.55822575", "0.55796623", "0.55669296", "0.55398023", "0.5528409", "0.55188394", "0.55188394", "0.54985464", "0.5492971", "0.53920615", "0.53908145", "0.5384652", "0.5376665", "0.53746843", "0.5372254", "0.5372254", "0.536324", "0.5360899", "0.53435755", "0.532701", "0.5326335", "0.53149384", "0.53127486", "0.5300713", "0.52976996", "0.5278963", "0.5278936", "0.5241715", "0.5241715", "0.523688", "0.5229711", "0.5218331", "0.52144086", "0.51984257", "0.51923186", "0.5180683", "0.5167685", "0.51569766", "0.51552427", "0.51345885", "0.5129164", "0.51259863", "0.5125406", "0.51253504", "0.51228446", "0.5120484", "0.5118536", "0.511777", "0.51036644", "0.50989616", "0.50865805", "0.5085256", "0.5073563", "0.50646657", "0.5055326", "0.50550795", "0.50531614", "0.50518143", "0.5051153", "0.5048843", "0.5048153", "0.5048153", "0.5048153", "0.5048153", "0.5048153", "0.5047437", "0.5044632", "0.5034653", "0.5033207", "0.5031507", "0.50275475", "0.50263184", "0.502594", "0.50234026", "0.5019025", "0.5016149", "0.50153404", "0.50132513", "0.5001643", "0.500049", "0.50000745", "0.4997032", "0.49883452", "0.49826384" ]
0.6933566
0
Don't zoom to current location if a user is manually entering points
private void onGpsLocationReady(MapFragment map) { if (getWindow().isActive() && (!inputActive || recordingEnabled)) { map.zoomToPoint(map.getGpsLocation(), true); } updateUi(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean allowZoom();", "@Override\n public void onDoubleTap(SKScreenPoint point) {\n mapView.zoomInAt(point);\n }", "private static void verifyViewPoint() {\n if (viewPoint.x < 0)\n viewPoint.x = 0;\n if (viewPoint.y < 0)\n viewPoint.y = 0;\n if (viewPoint.x > map.WIDTH - GAME_WIDTH * zoom)\n viewPoint.x = map.WIDTH - ((int) (GAME_WIDTH * zoom));\n if (viewPoint.y > map.HEIGHT - GAME_HEIGHT * zoom)\n viewPoint.y = map.HEIGHT - ((int) (GAME_HEIGHT * zoom));\n }", "private void enableMyLocation() {\n // [START maps_check_location_permission]\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n if (map != null) {\n map.setMyLocationEnabled(true);\n }\n } else {\n // Permission to access the location is missing. Show rationale and request permission\n PermissionUtils.requestPermission(this, LOCATION_PERMISSION_REQUEST_CODE,\n Manifest.permission.ACCESS_FINE_LOCATION, true);\n }\n zoom = true;\n // [END maps_check_location_permission]\n }", "@Override\n public void onLocationChanged(Location location) {\n locationLast = location;\n LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());\n //move camera at same pace as user moving\n googleMap.animateCamera(CameraUpdateFactory.zoomTo(11));\n\n //stop map from re-orientating. allows user to zoom in and move camera around\n if(!oriented){\n\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n oriented = true;\n }\n\n }", "public void zoomOnAddress(){\n adjustZoomLvl(16000);\n adjustZoomFactor();\n }", "public void zoomIn() {\n\t\tif (this.zoom + DELTA_ZOOM <= MAX_ZOOM)\n\t\t\tthis.setZoom(this.zoom + DELTA_ZOOM);\n\t}", "@Override\n public void onLocationChanged(Location location) {\n if (location.getProvider().equals(\"gps\")){\n\n locationManager.removeUpdates(this);\n }\n LatLng user_location = new LatLng(location.getLatitude(), location.getLongitude());\n m1.setPosition(user_location);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(user_location, 16));\n\n }", "@Override\n public void onLocationChange(Location loc) {\n user.setRelativePosition(loc.getX(), loc.getY());\n map.addStep(new PointF(loc.getX(), loc.getY()));\n //messageHandler.sendEmptyMessage(MESSAGE_REFRESH);\n }", "static void setViewPointRelevantTo(Point point) {\n point.translate(-1 * viewPoint.x, -1 * viewPoint.y);\n point.x /= Map.zoom;\n point.y /= Map.zoom;\n point.translate(viewPoint.x, viewPoint.y);\n viewPoint.setLocation(point.x - GAME_WIDTH / 2, point.y - GAME_HEIGHT / 2);\n verifyViewPoint();\n }", "public void zoomIn() {\n\tsetZoom(getNextZoomLevel());\n}", "public void zoomIn() {\n if (zoom > 0) {\n zoom--;\n spielPanel.setZoom(zoom);\n }\n }", "@Override\n public void onMapViewSingleTapped(MapView mapView, MapPoint MapPoint) {\n settingZoomMarkMap(mapView);\n }", "public void zoomIn() { zoomIn(1); }", "public void zoomIn() {\n if (scale < 0.8) {\n double scaleFactor = (scale + 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - viewPortHeight / 2) + viewPortHeight / 2;\n scale += 0.03;\n\n selectionChanged = true;\n gameChanged = true;\n }\n\n }", "public void zoomIn() {\n \t\tzoom(1);\n \t}", "private void updateUserPosition()\n {\n LatLng current = new LatLng(mCurrentLocation.getLatitude(), mCurrentLocation.getLongitude());\n circle.setCenter(current);\n Log.i(\"ZOOM:\", \" \" + mMap.getCameraPosition().zoom);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(current));//move map to the user's position\n updateMap();\n }", "@Override\r\n\tpublic void setMinCoordinates() {\n\t\t\r\n\t}", "private void onChange() {\n startTime = -1L;\n endTime = -1L;\n minLat = Double.NaN;\n maxLat = Double.NaN;\n minLon = Double.NaN;\n maxLon = Double.NaN;\n }", "@Override\n public void onLocationChanged(Location location) {\n if(location != null){\n originLocation = location;\n setCameraPosition(location);\n\n LatLng point = new LatLng();\n point.setLongitude(finalLon);\n point.setLatitude(finalLat);\n onMapClick(point);\n\n startButton.setVisibility(View.VISIBLE);\n\n\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "@Override\n\tpublic void onLocationChanged(android.location.Location arg0) {\n\t\tif(gmapFlag == true){\n\t\t\tmyLocation = new LatLng(arg0.getLatitude(), arg0.getLongitude());\n\t\t}\n\t\t\n\t\t\n\t}", "private void checkForZoomIn(){\n if(checkIn == 1){\n zoomLevel++;\n adjustZoomFactor();\n checkOut = 1;\n checkIn = 0;\n } else{\n checkOut = 0;\n checkIn = 1;\n }\n\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "public void focusMapOnUser()\n {\n if(mapFragment==null)\n {\n mapFragment = (SupportMapFragment)(getChildFragmentManager().findFragmentById(R.id.map));\n }\n map = mapFragment.getMap();\n\n\n MapsInitializer.initialize(getActivity());\n\n\n map.setMyLocationEnabled(true);\n LocationManager locationManager = (LocationManager)getActivity().getSystemService(Context.LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n mlocation = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));\n\n\n\n //set the location of the user\n\n if(mlocation != null)\n {\n //move the camera to the users location with a suitable zoom level\n map.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(mlocation.getLatitude(), mlocation.getLongitude()),13));\n CameraPosition cameraPosition = new CameraPosition.Builder().target(new LatLng(mlocation.getLatitude(), mlocation.getLongitude())).zoom(15).bearing(0).tilt(0).build();\n map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n }\n\n }", "protected void zoomToPast(){\n //zoom out\n int maxTimeSpread = widgg.timeorg.lastShortTimeDateInCurve - widgg.timeorg.firstShortTimeDateInCurve;\n if(xpCursor1 >=0){\n ixDataCursor1 = ixDataShown[xpCursor1];\n }\n if(xpCursor2 >=0){\n ixDataCursor2 = ixDataShown[xpCursor2];\n }\n xpCursor1New = xpCursor2New = cmdSetCursor; \n if(widgg.timeorg.timeSpread < 0x3fffffff) { widgg.timeorg.timeSpread *=2; }\n else { widgg.timeorg.timeSpread = 0x7fffffff; }\n bPaintAllCmd = true;\n widgg.redraw(100, 200);\n \n }", "@Override\n public void onLocationChanged(Location location) {\n //Log.i(TAG, \"New Location: \" + location.getLatitude() + \" \" + location.getLongitude());\n if (isDrawing) {\n //We are drawing so add a point and move the camera accordingly\n currentDrawing.addPoint(new LatLng(location.getLatitude(), location.getLongitude()), currentColor);\n LatLng userLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(userLocation, 20));\n }\n }", "@Override\r\n\tpublic void onLocationChange(Location loc) {\n\t\tuser.setRelativePosition(loc.getX(), loc.getY());\r\n\t\tmap.addStep(new PointF(loc.getX(),loc.getY()));\r\n\t\tmessageHandler.sendEmptyMessage(MESSAGE_REFRESH);\r\n\t}", "private void updateLocationUI() {\n if (map == null) {\n return;\n }\n try {\n if (locationPermissionGranted) {\n map.setMyLocationEnabled(true);\n map.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n map.setMyLocationEnabled(false);\n map.getUiSettings().setMyLocationButtonEnabled(false);\n lastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "protected abstract void handleZoom();", "@Override\n\tpublic void onZoomChanged(GeoPoint center, double diagonal) {\n\t}", "@Override\n public void onLocationChanged(Location location) {\n Log.d(\"GeoPost Location\", \"Location update received: \" + location.toString());\n\n mMap.clear();\n\n latitudine = location.getLatitude();\n longitudine = location.getLongitude();\n myPosition = new LatLng(latitudine, longitudine);\n mMap.addMarker(new MarkerOptions().position(myPosition).title(\"Marker in myPosition\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myPosition, 15));\n Log.d(\"GeoPost Location\", \"lat: \"+latitudine+\" longi: \"+longitudine);\n\n }", "@Override\r\n public boolean onTap(GeoPoint arg0, MapView arg1) {\n if(getMyLocation()!=null){\r\n int size = 30;\r\n Point out=new Point();\r\n mMapView.getProjection().toPixels(getMyLocation(), out); \r\n Rect rect = new Rect(out.x-size,out.y-size,out.x+size,out.y+size);\r\n mMapView.getProjection().toPixels(arg0, out);\r\n if(rect.contains(out.x, out.y)){\r\n //Log.e(\"MyLocation\", \"click my location \");\r\n mPopView.setVisibility(View.GONE);\r\n MapView.LayoutParams params = (MapView.LayoutParams) mPopView.getLayoutParams();\r\n params.x = 0;// Y轴偏移\r\n params.y = -5;// Y轴偏移\r\n GeoPoint point = getMyLocation().e();\r\n params.point = point;\r\n //mMapCtrl.animateTo(point);\r\n mMapView.updateViewLayout(mPopView, params);\r\n mPopView.setVisibility(View.VISIBLE);\r\n }else{\r\n mPopView.setVisibility(View.GONE) ; \r\n }\r\n }\r\n return super.onTap(arg0, arg1);\r\n }", "@Override\n public void Zoom(double zoomNo, boolean setZoom) {\n\t \n }", "void startZoom() {\n\t\t// this boolean tells the system that it needs to \n\t\t// initialize itself before trying to zoom\n\t\t// This is cleaner than duplicating code\n\t\t// see processZoom\n\t\tmZoomEstablished=false;\n\t}", "public void myLocationClick() {\n\n //Set the initial camera position to the current location\n GridPoint gridPoint = myGridPoint();\n float mpp = 1;\n\n if (gridPoint != null) {\n\n CameraPosition cameraPosition = new CameraPosition(gridPoint, mpp);\n mMap.moveCamera(cameraPosition, true);\n\n } else {\n\n //If GPS is off, notify the user to turn it on\n Toast.makeText(MainActivity.this,\"Turn on GPS.\",Toast.LENGTH_SHORT).show();\n\n }\n\n }", "void onZoom() {\n\t\tmZoomPending=true;\n\t}", "public void setZoom(){\n\t\tactive.setZoom();\n\t}", "@Override\n \t\tpublic void onLocationChanged(Location location) {\n \t\t\tmobileLocation = location;\n \t\t\tif(!wasZoomed)\n \t\t\t{\n \t\t\tGeoPoint newPos = new GeoPoint(\n \t\t\t\t\t(int)(mobileLocation.getLatitude() * 1e6),\n \t\t\t\t\t(int)(mobileLocation.getLongitude() * 1e6));\n \t\t\t\n \t\t\tdouble latitudeSpan = Math.round(Math.abs(mobileLocation.getLatitude()*1e6- \n \t grave.getLatitudeE6()));\n \t\t\tdouble longitudeSpan = Math.round(Math.abs(mobileLocation.getLongitude()*1e6 - \n \t grave.getLongitudeE6()));\n \t\t\t\n \t\t\tmc.zoomToSpan((int)(latitudeSpan*2), (int)(longitudeSpan*2)); \n \t\t\t\t\t\n \t\t\tmc.animateTo(new GeoPoint\n \t\t\t\t\t((grave.getLatitudeE6()+newPos.getLatitudeE6())/2, \n \t\t\t \t\t\t(grave.getLongitudeE6()+newPos.getLongitudeE6())/2));\n \t\t\t\n \t\t\tmapView.invalidate();\n \t\t\twasZoomed = true;\n \t\t\t}\n \t\t\tLog.i(\"LOCATION\",\"LONG: \"+location.getLongitude()+ \" LAT:\"+location.getLatitude());\n \t\t}", "public void zoomIn() {\n if (currentViewableRange.getLength() > 1) {\n zoomToLength(currentViewableRange.getLength() / 2);\n }\n }", "protected void zoomToPresent(){\n if(xpCursor1 >=0){\n ixDataCursor1 = ixDataShown[xpCursor1];\n }\n if(xpCursor2 >=0){\n ixDataCursor2 = ixDataShown[xpCursor2];\n }\n xpCursor1New = xpCursor2New = cmdSetCursor; \n if(widgg.timeorg.timeSpread > 100) { widgg.timeorg.timeSpread /=2; }\n else { widgg.timeorg.timeSpread = 100; }\n bPaintAllCmd = true;\n widgg.redraw(100, 200);\n }", "@Override\n public void onCameraChange(CameraPosition cameraPosition) {\n if (cameraPosition.zoom >= MINIMUM_ZOOM_LEVEL_FOR_DATA) {\n refreshVisibleNDBCStations();\n } else {\n Toast.makeText(getActivity().getApplicationContext(),\n R.string.divesite_map_zoom_view_data,\n Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n LatLng posicio = new LatLng(location.getLatitude(),location.getLongitude());\n //Afegir la camera amb el punt generat abans i un nivell de zoom\n CameraUpdate camera = CameraUpdateFactory.newLatLngZoom(posicio,13);\n //Desplacem la camera al nou punt\n mMap.moveCamera(camera);\n posicioActual = posicio;\n\n }", "void setStartPoint(Location location, boolean persistPoints);", "public void zoomToAreaOfInterest() {\n Envelope aoe = context.getViewport().getBounds();\n if (aoe.getWidth() == 0) {\n aoe.expandBy(.001, 0);\n }\n\n if (aoe.getHeight() == 0) {\n aoe.expandBy(0, .001);\n }\n Rectangle2D rect = new Rectangle2D.Double(aoe.getMinX(), aoe.getMinY(),\n aoe.getWidth(), aoe.getHeight());\n getCamera().animateViewToCenterBounds(rect, true, 0);\n }", "private void updateLocationUi() {\n if (mMap == null) {\n return;\n }\n try {\n if (mPermissionCheck.locationPermissionGranted()) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n drawUserMarker(location);\n }", "public void setUserLocation(double lat, double lon) {\n\tuserLocation = new Point2D.Double(lon,lat);\n }", "void checkMyLocationVisibility() {\n if (settings.getReturnToMyLocation() || presenter.isTracking())\n showMyLocation();\n }", "@Override\n public void onWindowFocusChanged(boolean hasFocus) {\n p = new Point();\n p.x = 200;\n p.y = 500;\n Log.d(\"Location ag\",String.valueOf(p.x));\n Log.d(\"Location ag\",String.valueOf(p.y));\n }", "private void checkForZoomOut(){\n if(checkOut == 1){\n zoomLevel--;\n adjustZoomFactor();\n checkOut = 0;\n checkIn = 1;\n } else{\n checkOut = 1;\n checkIn = 0;\n }\n }", "public void zoomCheck(float x, float y) {\n if (y<=470 && y>=430) {\n if (x<=720 && x>=680) {\n game.changeZoom(1);\n } else if (x<=780 && x>=740) {\n game.changeZoom(0);\n }\n }\n }", "private void enableLocationTracking() {\n map.getTrackingSettings().setDismissAllTrackingOnGesture(false);\n\n // Enable location and bearing tracking\n map.getTrackingSettings().setMyLocationTrackingMode(MyLocationTracking.TRACKING_FOLLOW);\n map.getTrackingSettings().setMyBearingTrackingMode(MyBearingTracking.COMPASS);\n }", "public void zoomIn() {\r\n \t\tgraph.setScale(graph.getScale() * 1.25);\r\n \t}", "private void unsafeSetInitialZoom() {\n if (hic.isInPearsonsMode()) {\n initialZoom = hic.getMatrix().getFirstPearsonZoomData(HiC.Unit.BP).getZoom();\n } else if (HiCFileTools.isAllChromosome(hic.getXContext().getChromosome())) {\n mainViewPanel.getResolutionSlider().setEnabled(false);\n initialZoom = hic.getMatrix().getFirstZoomData(HiC.Unit.BP).getZoom();\n } else {\n mainViewPanel.getResolutionSlider().setEnabled(true);\n\n HiC.Unit currentUnit = hic.getZoom().getUnit();\n\n List<HiCZoom> zooms = (currentUnit == HiC.Unit.BP ? hic.getDataset().getBpZooms() :\n hic.getDataset().getFragZooms());\n\n\n// Find right zoom level\n\n int pixels = mainViewPanel.getHeatmapPanel().getMinimumDimension();\n int len;\n if (currentUnit == HiC.Unit.BP) {\n len = (Math.max(hic.getXContext().getChrLength(), hic.getYContext().getChrLength()));\n } else {\n len = Math.max(hic.getDataset().getFragmentCounts().get(hic.getXContext().getChromosome().getName()),\n hic.getDataset().getFragmentCounts().get(hic.getYContext().getChromosome().getName()));\n }\n\n int maxNBins = pixels / HiCGlobals.BIN_PIXEL_WIDTH;\n int bp_bin = len / maxNBins;\n initialZoom = zooms.get(zooms.size() - 1);\n for (int z = 1; z < zooms.size(); z++) {\n if (zooms.get(z).getBinSize() < bp_bin) {\n initialZoom = zooms.get(z - 1);\n break;\n }\n }\n\n }\n hic.unsafeActuallySetZoomAndLocation(\"\", \"\", initialZoom, 0, 0, -1, true, HiC.ZoomCallType.INITIAL, true);\n }", "private void setMyLatLong() {\n }", "private void handleLatLonWidgetChange() {\n try {\n double lat = latLonWidget.getLat();\n double lon = latLonWidget.getLon();\n double[] xyz = earthToBox(makeEarthLocation(lat, lon, 0));\n setProbePosition(xyz[0], xyz[1]);\n\n } catch (Exception exc) {\n logException(\"Error setting lat/lon\", exc);\n }\n\n }", "@Override\r\n\t\tpublic boolean onTouchEvent(MotionEvent e, MapView m) {\n\t\t\tif(e.getAction()==MotionEvent.ACTION_DOWN){\r\n\t\t\t\tstart=e.getEventTime();\r\n\t\t\t\tx= (int)e.getX();\r\n\t\t\t\ty= (int)e.getY();\r\n\t\t\t\t touchedPoint = map.getProjection().fromPixels(x, y);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(e.getAction()==MotionEvent.ACTION_UP){\r\n\t\t\t\tstop=e.getEventTime();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(stop-start > 1500){\r\n\t\t\t\t//perform action\r\n\t\t\t\t\r\n\t\t\t\talert.setTitle(\"Pick an Option\");\r\n\t\t\t\talert.setMessage(\"Select An Option\");\r\n\t\t\t\t\r\n\t\t\r\n alert.setButton2(\"Toogle View \", new DialogInterface.OnClickListener() {\r\n\t\t\t\t\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\tif(map.isSatellite()){\r\n\t\t\t\t\t\tmap.setSatellite(false);\r\n\t\t\t\t\t\tmap.setStreetView(true);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tmap.setSatellite(true);\r\n\t\t\t\t\t\tmap.setStreetView(false);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n alert.show();\r\n return true;\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}", "@Override\n public void onLocationChanged(Location location) {\n mMap.clear();\n\n // To hold location\n LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());\n\n // To create marker in map\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.title(\"My Location\");\n\n // Add marker to the map\n mMap.addMarker(markerOptions);\n\n // Opening position with some zoom level in the map\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 17.0f));\n }", "public boolean canZoomIn() {\n\treturn getZoom() < getMaxZoom();\n}", "@Override\n public void Zoom(double zoomNo) {\n\t \n }", "public void wheelZoom(MouseWheelEvent e) {\n try {\n int wheelRotation = e.getWheelRotation();\n Insets x = getInsets(); //Top bar space of the application\n Point p = e.getPoint();\n p.setLocation(p.getX() , p.getY()-x.top + x.bottom);\n if (wheelRotation > 0 && zoomLevel != 0) {\n //point2d before zoom\n Point2D p1 = transformPoint(p);\n transform.scale(1 / 1.2, 1 / 1.2);\n //point after zoom\n Point2D p2 = transformPoint(p);\n transform.translate(p2.getX() - p1.getX(), p2.getY() - p1.getY()); //Pan towards mouse\n checkForZoomOut();\n repaint();\n\n } else if (wheelRotation < 0 && zoomLevel != 20) {\n Point2D p1 = transformPoint(p);\n transform.scale(1.2, 1.2);\n Point2D p2 = transformPoint(p);\n transform.translate(p2.getX() - p1.getX(), p2.getY() - p1.getY()); //Pan towards mouse\n checkForZoomIn();\n repaint();\n }\n } catch (NoninvertibleTransformException ex) {\n ex.printStackTrace();\n }\n\n }", "@Override\n\t\tpublic void onLocationChanged(Location location) {\n\t\t\tif (location != null)\n\t\t\t{\n\t\t\t\tdouble mLat = location.getLatitude();\n\t\t\t\tdouble mLng = location.getLongitude();\n\t\t\t\tLog.i(\"Geo Test: \", Double.toString(mLng) + Double.toString(mLat));\n\t\t\t\tParseGeoPoint point = new ParseGeoPoint(mLat, mLng);\n\t\t\t\tuser.put(\"lastKnownLocation\", point);\n\t\t\t\tuser.saveInBackground();\n\t\t\t\t\n\t lm.removeUpdates(this);\n\t\t\t}\n\t\t}", "@Override\n public void onMapViewDoubleTapped(MapView mapView, MapPoint MapPoint) {\n }", "@Override\n public void onLocationUpdated(Location location) {\n fromPosition = new LatLng(location.getLatitude(), location.getLongitude());\n btn1.setVisibility(View.VISIBLE);\n moveCamera(new LatLng(location.getLatitude(), location.getLongitude()),\n DEFAULT_ZOOM, \"My Location\");\n }", "@Override\n public void onCameraIdle() {\n double CameraLat = GMap.getCameraPosition().target.latitude;\n double CameraLong = GMap.getCameraPosition().target.longitude;\n if (CameraLat <= 13.647080 || CameraLat >= 13.655056) {\n GMap.animateCamera(CameraUpdateFactory.newLatLng(mapbounds.getCenter()));\n }\n if (CameraLong <= 100.490774 || CameraLong >= 100.497254) {\n GMap.animateCamera(CameraUpdateFactory.newLatLng(mapbounds.getCenter()));\n }\n\n }", "@Override\n public boolean onMyLocationButtonClick() {\n return false;\n }", "public void zoomOut() {\n if (scale > 0.05) {\n double scaleFactor = (scale - 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - viewPortHeight / 2) + viewPortHeight / 2;\n scale -= 0.03;\n\n selectionChanged = true;\n gameChanged = true;\n }\n }", "private void showCurrentLocation() {\n if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n LocationRequest locationRequest = LocationRequest.create();\n locationRequest.setInterval(10000);\n locationRequest.setFastestInterval(5000);\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n\n LocationCallback mLocationCallback = new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n if (locationResult == null) {\n return;\n }\n for (Location location : locationResult.getLocations()) {\n if (location != null) {\n LatLng current = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(current, 18));\n if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n }\n\n }\n }\n }\n };\n\n LocationServices.getFusedLocationProviderClient(this).requestLocationUpdates(locationRequest, mLocationCallback, null);\n\n } else { // Show default location\n requestLocationPermission();\n\n LatLng current = new LatLng(34.180972800611016, -117.32337489724159);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(current, 18));\n }\n }", "public void zoomToBounds(double ulLon, double ulLat, double lrLon, double lrLat)\n/* 116: */ {\n/* 117:182 */ int x_min = 2147483647;\n/* 118:183 */ int y_min = 2147483647;\n/* 119:184 */ int x_max = -2147483648;\n/* 120:185 */ int y_max = -2147483648;\n/* 121:186 */ int mapZoomMax = 20;\n/* 122: */\n/* 123:188 */ x_max = Math.max(x_max, MercatorProj.LonToX(lrLon, mapZoomMax));\n/* 124:189 */ x_max = Math.max(x_max, MercatorProj.LonToX(ulLon, mapZoomMax));\n/* 125:190 */ y_max = Math.max(y_max, MercatorProj.LatToY(ulLat, mapZoomMax));\n/* 126:191 */ y_max = Math.max(y_max, MercatorProj.LatToY(lrLat, mapZoomMax));\n/* 127:192 */ x_min = Math.min(x_min, MercatorProj.LonToX(ulLon, mapZoomMax));\n/* 128:193 */ x_min = Math.min(x_min, MercatorProj.LonToX(lrLon, mapZoomMax));\n/* 129:194 */ y_min = Math.min(y_min, MercatorProj.LatToY(ulLat, mapZoomMax));\n/* 130:195 */ y_min = Math.min(y_min, MercatorProj.LatToY(lrLat, mapZoomMax));\n/* 131: */\n/* 132: */\n/* 133: */\n/* 134:199 */ int height = Math.max(0, this.mapPanel.getHeight());\n/* 135:200 */ int width = Math.max(0, this.mapPanel.getWidth());\n/* 136:201 */ int newZoom = mapZoomMax;\n/* 137:202 */ int x = x_max - x_min;\n/* 138:203 */ int y = y_max - y_min;\n/* 139:204 */ while ((x > width) || (y > height))\n/* 140: */ {\n/* 141:205 */ newZoom--;\n/* 142:206 */ x >>= 1;\n/* 143:207 */ y >>= 1;\n/* 144: */ }\n/* 145:209 */ x = x_min + (x_max - x_min) / 2;\n/* 146:210 */ y = y_min + (y_max - y_min) / 2;\n/* 147:211 */ int z = 1 << mapZoomMax - newZoom;\n/* 148:212 */ x /= z;\n/* 149:213 */ y /= z;\n/* 150:214 */ this.mapPanel.setZoom(new Point(x, y), newZoom);\n/* 151: */ }", "@Override\n public void onTouch() {\n mScrollView.requestDisallowInterceptTouchEvent(true);\n\n\n map.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng location) {\n\n\n Toast.makeText(DoctorRegistration.this, \"\"+location, Toast.LENGTH_SHORT).show();\n if(marker!=null)\n {\n marker.remove();\n map.clear();\n }\n marker=map.addMarker(new MarkerOptions().position(location));\n\n new_lat=location.latitude;\n new_log=location.longitude;\n }\n });\n\n }", "@Override\n protected void onPause(){\n super.onPause();\n if(map != null){\n map.setMyLocationEnabled(false);\n }\n }", "private void clampZoom()\n\t{\n\t\tif (zoom < ZOOM_MINIMUM)\n\t\t{\n\t\t\tzoom = ZOOM_MINIMUM;\n\t\t}\n\t\telse if (zoom > ZOOM_MAXIMUM)\n\t\t{\n\t\t\tzoom = ZOOM_MAXIMUM;\n\t\t}\n\t}", "@Override\n public void onLocationChanged(Location location) {\n double latitude = location.getLatitude();\n\n // Getting longitude of the current location\n double longitude = location.getLongitude();\n\n // Creating a LatLng object for the current location\n LatLng latLng = new LatLng(latitude, longitude);\n\n // Showing the current location in Google Map\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n\n // Zoom in the Google Map\n googleMap.animateCamera(CameraUpdateFactory.zoomTo(15));\n\n }", "@Override\n public void setZoom(double zoom)\n {\n super.setZoom(zoom);\n delayedRepainting.requestRepaint(ZOOM_REPAINT);\n }", "protected void primSetZoom(double zoom) {\n\tPoint p1 = getViewport().getClientArea().getCenter();\n\tPoint p2 = p1.getCopy();\n\tPoint p = getViewport().getViewLocation();\n\tdouble prevZoom = this.zoom;\n\tthis.zoom = zoom;\n\tpane.setScale(zoom);\n\tfireZoomChanged();\n\tgetViewport().validate();\n\t\n\tp2.scale(zoom / prevZoom);\n\tDimension dif = p2.getDifference(p1);\n\tp.x += dif.width;\n\tp.y += dif.height;\n\tsetViewLocation(p);\t\n}", "public void zoomIn()\n {\n zoomIn(1, width >> 1, height >> 1);\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n\n // Display the user selected map type\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n MapStyleOptions style = MapStyleOptions.loadRawResourceStyle(mContext, R.raw.map_style_night);\n mMap.setMapStyle(style);\n\n // Don't want to display the default location button because\n // we are already displaying using a FAB\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n\n mMap.setOnMyLocationClickListener(this);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void userInput(){\n if(mousePressed){\n rX -= (mouseY - pmouseY) * 0.002f;//map(mouseY,0,height,-PI,PI);\n rY -= (mouseX - pmouseX) * 0.002f;// map(mouseX,0,width,PI,-PI);\n }\n rotateX(rX);\n rotateY(rY);\n\n if(keyPressed){\n if(keyCode == UP){\n zoom += 0.01f;\n }\n if(keyCode == DOWN){\n zoom -= 0.01f;\n }\n }\n }", "public void setLocation(){\n //Check if user come from notification\n if (getIntent().hasExtra(EXTRA_PARAM_LAT) && getIntent().hasExtra(EXTRA_PARAM_LON)){\n Log.d(TAG, \"Proviene del servicio, lat: \" + getIntent().getExtras().getDouble(EXTRA_PARAM_LAT) + \" - lon: \" + getIntent().getExtras().getDouble(EXTRA_PARAM_LON));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(getIntent().getExtras().getDouble(EXTRA_PARAM_LAT), getIntent().getExtras().getDouble(EXTRA_PARAM_LON)), 18));\n NotificationManager mNM = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n mNM.cancel(1);\n } else{\n if (bestLocation!=null){\n Log.d(TAG, \"Posicion actual -> LAT: \"+ bestLocation.getLatitude() + \" LON: \" + bestLocation.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(bestLocation.getLatitude(), bestLocation.getLongitude()), 16));\n } else{\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(41.651981, -4.728561), 16));\n }\n }\n }", "void pointCheck(LatLng point, boolean valid);", "private void enableMyLocationIfPermitted() {\n if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION,\n android.Manifest.permission.ACCESS_FINE_LOCATION},\n LOCATION_PERMISSION_REQUEST_CODE);\n } else if (mGoogleMap != null) {\n mGoogleMap.setMyLocationEnabled(true);\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n currLatLng = new LatLng(location.getLatitude(), location.getLongitude());\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(currLatLng).zoom(15).build();\n\n mGoogleMap.animateCamera(CameraUpdateFactory\n .newCameraPosition(cameraPosition));\n\n //If you only need one location, unregister the listener\n LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, this);\n\n }", "@Override\n public void onLocationChanged(Location location) {\n Toast.makeText(MapsActivity.this, \"\" + location, Toast.LENGTH_SHORT).show();\n //mMap.clear();\n// longi = location.getLongitude();\n// lat = location.getLatitude();\n//\n// mLastLocation.set(location);\n\n\n mLastLocation = location;\n longi = mLastLocation.getLongitude();\n lat = mLastLocation.getLatitude();\n LatLng lt = new LatLng(lat,longi);\n Log.d(\"cxcxcx\",longi+\"\");\n mMap.addMarker(new MarkerOptions().position(lt).title(longi + \"\" + lat));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(lt, 8));\n\n\n }", "@Override\n public void onLocationChanged(Location location) {\n mMap.clear();\n\n // To hold location\n LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());\n\n // To create marker in map\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.title(\"My Location\");\n\n // Add marker to the map\n mMap.addMarker(markerOptions);\n\n // Opening position with some zoom level in the map\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));\n }", "@Override\r\n public void onGlobalLayout() {\r\n LatLngBounds bounds = new LatLngBounds.Builder()\r\n .include(origi)\r\n .include(desti)\r\n .build();\r\n\r\n\r\n map.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 50));\r\n }", "private void phoneLocationChecked() {\n if (phoneLocation == null)\n return;\n phoneLocation.setShouldShowMarker(true);\n if (phoneLocation.latLon != null && !(phoneLocation.latLon.lat == 0 && phoneLocation.latLon.lon == 0)) {\n phoneLocation.showMarker();\n }\n\n if (kidLocation != null && !kidLocation.isLocating) {\n kidLocation.hideAddressCard();\n }\n phoneLocation.hideAddressCard();\n\n if (kidLocation != null) {\n kidLocation.showMarker();\n }\n\n boundKidAndPhoneMarkers();\n }", "@Override\n public void OnLocationReceived(Location location) {\n if(location.getAccuracy() <= minAccuracy){\n minAccuracy = location.getAccuracy();\n activity.getOutput().setText(\"Accuracy: \"+location.getAccuracy());\n me.setPosition(new LatLng(location.getLatitude(), location.getLongitude()));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(me.getPosition(), 18));\n }\n }", "@Override\n public boolean zoom(float initialDistance, float distance) {\n cameraDistance += (initialDistance - distance) * zoomSpeed;\n\n //Makes sure the user can't zoom too far or too close\n if(cameraDistance < minCameraDistance)\n cameraDistance = minCameraDistance;\n else if(cameraDistance > maxCameraDistance)\n cameraDistance = maxCameraDistance;\n\n //camera needs to be set again\n resize(800, 480);\n return false;\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n }\n }", "private void setView( boolean reset_zoom )\n {\n float azimuth = getAzimuthAngle();\n float altitude = getAltitudeAngle();\n float distance = getDistance();\n\n float r = (float)(distance * Math.cos( altitude * Math.PI/180.0 ));\n\n float x = (float)(r * Math.cos( azimuth * Math.PI/180.0 ));\n float y = (float)(r * Math.sin( azimuth * Math.PI/180.0 ));\n float z = (float)(distance * Math.sin( altitude * Math.PI/180.0 ));\n\n float vrp[] = getVRP().get();\n \n setCOP( new Vector3D( x + vrp[0], y + vrp[1], z + vrp[2] ) );\n\n apply( reset_zoom );\n }", "@Override\n\tpublic void onLocationChanged(Location arg0) {\n\t\t Location myLocation =mMap.getMyLocation();\n if( myLocation != null ){\n logger.debug( \"Latitude: \" + myLocation.getLatitude() + \"\\nLongitude: \" + myLocation.getLongitude() );\n } \n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setOnMapLongClickListener(this);\n// registerLauncher();\n\n binding.saveButton.setEnabled(false);\n\n locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n locationListener = new LocationListener() {\n @Override\n public void onLocationChanged(@NonNull Location location) {\n info = sharedPreferences.getBoolean(\"info\",false);\n if(!info) {\n LatLng userLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(userLocation, 10));\n sharedPreferences.edit().putBoolean(\"info\",true).apply();\n }\n }\n\n\n };\n\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n //request permission\n\n if(ActivityCompat.shouldShowRequestPermissionRationale(this,Manifest.permission.ACCESS_FINE_LOCATION)){\n Snackbar.make(binding.getRoot(),\"Permission needed for maps\",Snackbar.LENGTH_INDEFINITE).setAction(\"Give Permission\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //request permission\n permissionLauncher.launch(Manifest.permission.ACCESS_FINE_LOCATION);\n }\n }).show();\n }else{\n permissionLauncher.launch(Manifest.permission.ACCESS_FINE_LOCATION);\n }\n }else{\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,1000,10,locationListener);\n Location lastlocation = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if(lastlocation != null){\n LatLng lastUserLocation = new LatLng(lastlocation.getLatitude(),lastlocation.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(lastUserLocation,10));\n }\n\n mMap.setMyLocationEnabled(true);\n }\n\n\n }", "@Override\n public void onLocationChanged(Location location) {\n mLastLocation = location;\n\n\n }", "@Override\n public void onCameraMove() {\n zoom = GMap.getCameraPosition().zoom;\n if(zoom >= 17.2f){\n map_label.setVisible(true);\n mapOverlay.setVisible(false);\n }\n else{\n map_label.setVisible(false);\n mapOverlay.setVisible(true);\n }\n\n }", "@Override\n \tprotected void onPause() {\n \t\tsuper.onPause();\n \t\tuserLocationOverlay.disableCompass();\n \t\tuserLocationOverlay.disableMyLocation();\n \t}", "public void zoomToFit() { zoomToFit(null); }", "private void enableMyLocation() {\n if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n // Permission to access the location is missing.\n PermissionUtils.requestPermission(this, LOCATION_PERMISSION_REQUEST_CODE,\n android.Manifest.permission.ACCESS_FINE_LOCATION, true);\n } else if (currentMap != null) {\n // Access to the location has been granted to the app.\n currentMap.setMyLocationEnabled(true);\n }\n }" ]
[ "0.65542173", "0.6403388", "0.6295518", "0.615148", "0.612926", "0.6101497", "0.6089792", "0.6083628", "0.60208267", "0.60057807", "0.59998155", "0.5993947", "0.5968698", "0.5942951", "0.5941809", "0.5929606", "0.5925394", "0.5893786", "0.58927536", "0.58833617", "0.5852956", "0.5844203", "0.5840821", "0.58401895", "0.58401895", "0.58401895", "0.58193284", "0.58089197", "0.58049434", "0.57894695", "0.57889664", "0.57794476", "0.57720107", "0.57697314", "0.5741497", "0.5739964", "0.57378477", "0.57369816", "0.5725645", "0.57192993", "0.5714673", "0.56967264", "0.5693731", "0.56929326", "0.568478", "0.56485623", "0.5645844", "0.5642306", "0.56375676", "0.5627918", "0.56255424", "0.56191623", "0.56157094", "0.56117797", "0.5608361", "0.5606892", "0.5604953", "0.5600259", "0.5600161", "0.55965346", "0.55837744", "0.5577076", "0.5575622", "0.5573261", "0.557237", "0.5571958", "0.5570565", "0.5567397", "0.556378", "0.555849", "0.55449784", "0.5522976", "0.5522294", "0.55212104", "0.5499268", "0.54975414", "0.5495613", "0.54925764", "0.5484289", "0.5478103", "0.5475005", "0.547217", "0.54678047", "0.5459177", "0.54506224", "0.54504", "0.5449693", "0.5449033", "0.54485774", "0.5446797", "0.54448795", "0.5435524", "0.54342866", "0.5431588", "0.5429314", "0.5429309", "0.5429036", "0.54286534", "0.5422287", "0.5421192" ]
0.5785958
31
Updates the state of various UI widgets to reflect internal state.
private void updateUi() { final int numPoints = map.getPolyLinePoints(featureId).size(); final MapPoint location = map.getGpsLocation(); // Visibility state playButton.setVisibility(inputActive ? View.GONE : View.VISIBLE); pauseButton.setVisibility(inputActive ? View.VISIBLE : View.GONE); recordButton.setVisibility(inputActive && recordingEnabled && !recordingAutomatic ? View.VISIBLE : View.GONE); // Enabled state zoomButton.setEnabled(location != null); backspaceButton.setEnabled(numPoints > 0); clearButton.setEnabled(!inputActive && numPoints > 0); settingsView.findViewById(R.id.manual_mode).setEnabled(location != null); settingsView.findViewById(R.id.automatic_mode).setEnabled(location != null); if (intentReadOnly) { playButton.setEnabled(false); backspaceButton.setEnabled(false); clearButton.setEnabled(false); } // Settings dialog // GPS status boolean usingThreshold = isAccuracyThresholdActive(); boolean acceptable = location != null && isLocationAcceptable(location); int seconds = INTERVAL_OPTIONS[intervalIndex]; int minutes = seconds / 60; int meters = ACCURACY_THRESHOLD_OPTIONS[accuracyThresholdIndex]; locationStatus.setText( location == null ? getString(org.odk.collect.strings.R.string.location_status_searching) : !usingThreshold ? getString(org.odk.collect.strings.R.string.location_status_accuracy, location.accuracy) : acceptable ? getString(org.odk.collect.strings.R.string.location_status_acceptable, location.accuracy) : getString(org.odk.collect.strings.R.string.location_status_unacceptable, location.accuracy) ); locationStatus.setBackgroundColor( location == null ? getThemeAttributeValue(this, com.google.android.material.R.attr.colorPrimary) : acceptable ? getThemeAttributeValue(this, com.google.android.material.R.attr.colorPrimary) : getThemeAttributeValue(this, com.google.android.material.R.attr.colorError) ); collectionStatus.setText( !inputActive ? getString(org.odk.collect.strings.R.string.collection_status_paused, numPoints) : !recordingEnabled ? getString(org.odk.collect.strings.R.string.collection_status_placement, numPoints) : !recordingAutomatic ? getString(org.odk.collect.strings.R.string.collection_status_manual, numPoints) : !usingThreshold ? ( minutes > 0 ? getString(org.odk.collect.strings.R.string.collection_status_auto_minutes, numPoints, minutes) : getString(org.odk.collect.strings.R.string.collection_status_auto_seconds, numPoints, seconds) ) : ( minutes > 0 ? getString(org.odk.collect.strings.R.string.collection_status_auto_minutes_accuracy, numPoints, minutes, meters) : getString(org.odk.collect.strings.R.string.collection_status_auto_seconds_accuracy, numPoints, seconds, meters) ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateUI(){}", "@Override\r\n public void updateUI() {\r\n }", "protected void _updateWidgets()\n\t{\n\t\t// Show the title\n\t\tString title = _spItem.getTitleAttr() ;\n\t\tif( title != null )\n\t\t\t_obsTitle.setText( title ) ;\n\t\telse\n\t\t\t_obsTitle.setText( \"\" ) ;\n\n\t\tString state = _avTab.get( \"state\" ) ;\n\t\tif( state == null )\n\t\t\t_obsState.setText( \"Not in Active Database\" ) ;\n\t\telse\n\t\t\t_obsState.setText( state ) ;\n\n\t\tignoreActions = true ; // MFO\n\n\t\tSpObs obs = ( SpObs )_spItem ;\n\t\t\n\t\t// Set the priority\n\t\tint pri = obs.getPriority() ;\n\t\t_w.jComboBox1.setSelectedIndex( pri - 1 ) ;\n\n\t\t// Set whether or not this is a standard\n\t\t_w.standard.setSelected( obs.getIsStandard() ) ;\n\n\t\t// Added for OMP (MFO, 7 August 2001)\n\t\t_w.optional.setValue( obs.isOptional() ) ;\n\n\t\tint numberRemaining = obs.getNumberRemaining();\n\t\t_w.setRemainingCount(numberRemaining);\n\n\t\t_w.unSuspendCB.addActionListener( this ) ;\n\n\t\tignoreActions = false ;\n\n\t\t_w.estimatedTime.setText( OracUtilities.secsToHHMMSS( obs.getElapsedTime() , 1 ) ) ;\n\n\t\t_updateMsbDisplay() ;\n\t}", "public void updateUI() {\n if (ui != null) {\n removeKeymap(ui.getClass().getName());\n }\n setUI(UIManager.getUI(this));\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "public void update()\n {\n for (Container container : containers)\n container.update(false);\n\n Gui.update(BanksGUI.class);\n Gui.update(BankGUI.class);\n Gui.update(ItemsGroupsGUI.class);\n }", "public void updateUI() {\n\t setUI( LinkButtonUI.createUI( this));\n\t}", "void updateControls();", "public void updateUiState() {\n if (meetingJoined) {\n this.joinMeetingButton.setText(R.string.leave_meeting);\n } else {\n this.joinMeetingButton.setText(R.string.join_meeting);\n }\n }", "public void updateUi() {\n\t\t// // update the car color to reflect premium status or lack thereof\n\t\t// ((ImageView)findViewById(R.id.free_or_premium)).setImageResource(mIsPremium\n\t\t// ? R.drawable.premium : R.drawable.free);\n\t\t//\n\t\t// // \"Upgrade\" button is only visible if the user is not premium\n\t\t// findViewById(R.id.upgrade_button).setVisibility(mIsPremium ?\n\t\t// View.GONE : View.VISIBLE);\n\t\t//\n\t\t// // \"Get infinite gas\" button is only visible if the user is not\n\t\t// subscribed yet\n\t\t// findViewById(R.id.infinite_gas_button).setVisibility(mSubscribedToInfiniteGas\n\t\t// ?\n\t\t// View.GONE : View.VISIBLE);\n\t\t//\n\t\t// // update gas gauge to reflect tank status\n\t\t// if (mSubscribedToInfiniteGas) {\n\t\t// ((ImageView)findViewById(R.id.gas_gauge)).setImageResource(R.drawable.gas_inf);\n\t\t// }\n\t\t// else {\n\t\t// int index = mTank >= TANK_RES_IDS.length ? TANK_RES_IDS.length - 1 :\n\t\t// mTank;\n\t\t// ((ImageView)findViewById(R.id.gas_gauge)).setImageResource(TANK_RES_IDS[index]);\n\t\t// }\n\t}", "public void updateAllButtons(){\n updateStartButton();\n updateResetButton();\n }", "public void updateWidgets() {\n int i;\n if (this.mTransitionHelper.isTransitioning()) {\n this.mTransitionHelper.pendingUpdateWidgets();\n return;\n }\n int i2 = 0;\n int selectedZen = getSelectedZen(0);\n boolean z = true;\n boolean z2 = selectedZen == 1;\n boolean z3 = selectedZen == 2;\n boolean z4 = selectedZen == 3;\n if ((!z2 || this.mPrefs.mConfirmedPriorityIntroduction) && ((!z3 || this.mPrefs.mConfirmedSilenceIntroduction) && (!z4 || this.mPrefs.mConfirmedAlarmIntroduction))) {\n z = false;\n }\n this.mZenButtons.setVisibility(this.mHidden ? 8 : 0);\n this.mZenIntroduction.setVisibility(z ? 0 : 8);\n if (z) {\n if (z2) {\n i = R$string.zen_priority_introduction;\n } else if (z4) {\n i = R$string.zen_alarms_introduction;\n } else if (this.mVoiceCapable) {\n i = R$string.zen_silence_introduction_voice;\n } else {\n i = R$string.zen_silence_introduction;\n }\n this.mConfigurableTexts.add(this.mZenIntroductionMessage, i);\n this.mConfigurableTexts.update();\n this.mZenIntroductionCustomize.setVisibility(z2 ? 0 : 8);\n }\n String computeAlarmWarningText = computeAlarmWarningText(z3);\n TextView textView = this.mZenAlarmWarning;\n if (computeAlarmWarningText == null) {\n i2 = 8;\n }\n textView.setVisibility(i2);\n this.mZenAlarmWarning.setText(computeAlarmWarningText);\n }", "private void updateUI() {\n mUser.weight.sortListByDate();\n mUser.bloodPressure.sortListsByDate();\n updateText();\n updateChart();\n }", "public void updateState() {\n\t\tfloat uptime = .05f;\t\t\t// Amount of Time the up animation is performed\n\t\tfloat downtime = .35f;\t\t\t// Amount of Time the down animation is performed\n\t\tColor colorUp = Color.YELLOW;\t// Color for when a value is increased\n\t\tColor colorDown = Color.RED;\t// Color for when a value is decreased\n\t\tColor color2 = Color.WHITE;\t\t// Color to return to (Default Color. Its White btw)\n\t\t\n\t\t// Check to see if the Time has changed and we are not initializing the label\n\t\tif(!time.getText().toString().equals(Integer.toString(screen.getState().getHour()) + \":00\") && !level.getText().toString().equals(\"\")) {\n\t\t\t// Set the time label and add the animation\n\t\t\ttime.setText(Integer.toString(screen.getState().getHour()) + \":00\");\n\t\t\ttime.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t} else if(time.getText().toString().equals(\"\")) {\n\t\t\t// First time setting the label, dont add the animation\n\t\t\ttime.setText(Integer.toString(screen.getState().getHour()) + \":00\");\n\t\t}\n\t\t\n\t\t// Check to see if the Level has changed and we are not initializing the label\n\t\tif(!level.getText().toString().equals(screen.getState().getTitle()) && !level.getText().toString().equals(\"\")) {\n\t\t\tlevel.setText(\"Level: \" + screen.getState().getTitle());\n\t\t\tlevel.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t} else if(level.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the level label\n\t\t\tlevel.setText(\"Level: \" + screen.getState().getTitle());\n\t\t}\n\t\t\n\t\t// Check to see if the XP has changed and we are not initializing the label\n\t\tif(!xp.getText().toString().equals(\"XP: \" + Integer.toString(screen.getState().getXp())) && !xp.getText().toString().equals(\"\")) {\n\t\t\txp.setText(\"XP: \" + Integer.toString(screen.getState().getXp()));\n\t\t\txp.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t} else if(xp.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the XP label\n\t\t\txp.setText(\"XP: \" + Integer.toString(screen.getState().getXp()));\n\t\t}\n\t\t\n\t\t// Check to see if the Money has changed and we are not initializing the label\n\t\tif(!money.getText().toString().equals(\"$\" + Double.toString(screen.getState().getMoney()) + \"0\") && !money.getText().toString().equals(\"\")) {\n\t\t\t\n\t\t\t// Check to see if the player's money went up. This is a mess but it works\n\t\t\t// Makes the change animation Yellow or Green depending on the change in money\n\t\t\tif(Double.parseDouble(money.getText().substring(1).toString()) <= screen.getState().getMoney())\n\t\t\t\tmoney.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t\telse\n\t\t\t\tmoney.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorDown)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t\t\n\t\t\t// Set the label to the new money\n\t\t\tmoney.setText(\"$\" + Double.toString(screen.getState().getMoney()) + \"0\");\n\t\t\t\n\t\t} else if(money.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the Money Label\n\t\t\tmoney.setText(\"$\" + Double.toString(screen.getState().getMoney()) + \"0\");\n\t\t}\n\t\t\n\t\t// Check to see if the Energy has changed and we are not initializing the label\n\t\tif(!energy.getText().toString().equals(\"E: \" + Integer.toString(screen.getState().getEnergy()) + \"/100\") && !energy.getText().toString().equals(\"\")) {\n\t\t\t\n\t\t\t// Changes the animation to Yellow or Red depending on the change in the energy value\n\t\t\tif(Integer.parseInt(energy.getText().substring(3).split(\"/\")[0].toString()) < screen.getState().getEnergy())\n\t\t\t\tenergy.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t\telse\n\t\t\t\tenergy.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorDown)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t\t\n\t\t\t// Set the energy label\n\t\t\tenergy.setText(\"E: \" + Integer.toString(screen.getState().getEnergy()) + \"/100\");\n\t\t} else if(energy.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the energy label if it isnt set\n\t\t\tenergy.setText(\"E: \" + Integer.toString(screen.getState().getEnergy()) + \"/100\");\n\t\t}\n\t\t\n\t\t// Get the current date.\n\t\tint[] curDate = screen.getState().getDate();\n\t\t\t\n\t\t// Check to see if the Date has changed and we are not initializing the label\n\t\tif(!date.getText().toString().equals(\"\" + curDate[2] + \"/\" + curDate[1] + \"/\" + curDate[0]) && !date.getText().toString().equals(\"\")) {\n\t\t\t// Set the date label and add the change animation\n\t\t\tdate.setText(\"\" + curDate[2] + \"/\" + curDate[1] + \"/\" + curDate[0]);\n\t\t\tdate.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t} else if(date.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the date label\n\t\t\tdate.setText(\"\" + curDate[2] + \"/\" + curDate[1] + \"/\" + curDate[0]);\n\t\t}\n\t\t\n\t\t// Set the log text\n\t\tlogLabel.setText(screen.getState().getLog());\n\t\t\n\t\t// Update the stats\n\t\tState state = screen.getState();\n\t\tstatsLabel.setText(\"XP: \" + state.getXp() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Level: \" + state.getLevel() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Title: \" + state.getTitle() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Popularity: \" + state.getPopularity() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Year \" + state.getDate()[0] + \" Month \" + state.getDate()[1] + \" Day \" + state.getDate()[2] + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Hour: \" + state.getHour() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Energy: \" + state.getEnergy() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Current Funds: \" + state.getMoney() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Money Earned: \" + state.getEarned_money() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Money Spent: \" + state.getSpent_money());\n\t}", "@Override\n public void updateUI() {\n setUI(new RangeSliderUI(this));\n // Update UI for slider labels. This must be called after updating the\n // UI of the slider. Refer to JSlider.updateUI().\n updateLabelUIs();\n }", "private void updateGUIStatus() {\r\n\r\n }", "private void updateUIAfterTick(){ \n //turn counter\n this.turnClock.setText(\"Turn: \" + this.village.getTurnCountAsString());\n \n //population\n this.populationAmount.setText(\"Population: \" + Integer.toString(this.village.getPopulation().getPopulationAmount()) );\n this.populationGrowthrate.setText(\"Growthrate: \" + Float.toString(this.village.getPopulation().getGrowthrate()));\n\n //buildings:\n this.constructedBuildingsArea.setText(this.getConstructedBuildingsAsList());\n \n //event\n this.eventText.setText(this.currentEvent.getEventText());\n this.eventOption1Btn.setText(this.currentEvent.getOption1Text());\n this.eventOption2Btn.setText(this.currentEvent.getOption2Text());\n this.eventOption3Btn.setText(this.currentEvent.getOption3Text());\n this.eventOption4Btn.setText(this.currentEvent.getOption4Text());\n \n }", "public void updateUI(){\n\t\t\n\t\ttimeTV.setText(\"\"+String.format(\"\" + gameClock%10));\n\t\ttimeTV2.setText(\"\"+ gameClock/10+\".\");\n\t\tif (currentGameEngine!=null) {\n\t\t\tmultLeft.setText(\"multiplier: \"+currentGameEngine.getMultiplier()+\"X\");\n\t\t\tscoreTV.setText(\"\"+currentGameEngine.getScore());\n\t\t} else {\n\t\t\tscoreTV.setText(\"0\");\n\t\t}\n\n\t\t//errorTV.setText(\"\"+mFrameNum);\n\t\t\n\t\t\n\t}", "private void updateUI() {\n if (mAccount != null) {\n signInButton.setEnabled(false);\n signOutButton.setEnabled(true);\n callGraphApiInteractiveButton.setEnabled(true);\n callGraphApiSilentButton.setEnabled(true);\n currentUserTextView.setText(mAccount.getUsername());\n } else {\n signInButton.setEnabled(true);\n signOutButton.setEnabled(false);\n callGraphApiInteractiveButton.setEnabled(false);\n callGraphApiSilentButton.setEnabled(false);\n currentUserTextView.setText(\"None\");\n }\n\n deviceModeTextView.setText(mSingleAccountApp.isSharedDevice() ? \"Shared\" : \"Non-shared\");\n }", "private void updateUi() {\n this.tabDetail.setDisable(false);\n this.lblDisplayName.setText(this.currentChild.getDisplayName());\n this.lblPersonalId.setText(String.format(\"(%s)\", this.currentChild.getPersonalId()));\n this.lblPrice.setText(String.format(\"%.2f\", this.currentChild.getPrice()));\n this.lblAge.setText(String.valueOf(this.currentChild.getAge()));\n this.dtBirthDate.setValue(this.currentChild\n .getBirthDate()\n .toInstant()\n .atZone(ZoneId.systemDefault())\n .toLocalDate());\n this.lblWeight.setText(String.format(\"%.1f kg\", this.currentChild.getWeight()));\n this.sldWeight.setValue(this.currentChild.getWeight());\n this.checkboxTrueRace.setSelected(!this.currentChild.isRace());\n this.imgChildProfile.setImage(this.currentChild.getAvatar());\n if (this.currentChild.getGender().equals(GenderType.MALE)){\n this.imgSex.setImage(FileUtils.loadImage(\"assets/image/gender/boy.png\"));\n this.lblSex.setText(\"Male\");\n }\n else {\n this.imgSex.setImage(FileUtils.loadImage(\"assets/image/gender/girl.png\"));\n this.lblSex.setText(\"Female\");\n }\n if (this.currentChild.isVirginity()){\n this.imgVirginity.setImage(FileUtils.loadImage(\"assets/image/virginity/virgin.png\"));\n this.lblVirginity.setText(\"Virgin\");\n }\n else {\n this.imgVirginity.setImage(FileUtils.loadImage(\"assets/image/virginity/not-virgin.png\"));\n this.lblVirginity.setText(\"Not Virgin\");\n }\n\n // TODO [assignment2] nastavit obrazek/avatar ditete v karte detailu\n // TODO [assignment2] nastavit spravny obrazek pohlavi v karte detailu\n // TODO [assignment2] nastavit spravny obrazek virginity atribut v v karte detailu\n }", "public void updateUI() {\n\t\tgetLoaderManager().restartLoader(0, null, this);\n\t}", "@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}", "@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}", "private void setCurrentState(StateEnum state)\n {\n m_CurrentState = state;\n m_DoneInit = false;\n switch(m_CurrentState)\n {\n case QB:\n m_A1Label.setText( \"PS\");\n m_A2Label.setText( \"PC\");\n m_A3Label.setText( \"ACC\");\n m_A4Label.setText( \"APB\");\n m_Sim1Label.setText( \"Sim Run\");\n m_Sim2Label.setText( \"Sim Pass\");\n m_Sim3Label.setText( \"Sim Pocket\");\n m_Sim4Label.setText( \"\");\n m_Sim1UpDown.setEnabled( true);\n m_Sim2UpDown.setEnabled( true);\n m_Sim3UpDown.setEnabled( true);\n m_Sim4UpDown.setEnabled( false);\n \n m_Sim1UpDown.setModel(new SpinnerNumberModel(0, 0, 15, 1));\n m_Sim2UpDown.setModel(new SpinnerNumberModel(0, 0, 15, 1));\n m_Sim3UpDown.setModel(new SpinnerNumberModel(0, 0, 15, 1));\n m_Sim4UpDown.setModel(new SpinnerNumberModel(0, 0, 15, 1));\n m_PS_BC_PI_KABox.setEnabled( true);\n m_PC_REC_QU_KABox.setEnabled( true);\n m_ACCBox.setEnabled( true);\n m_APBBox.setEnabled( true);\n break;\n case SKILL:\n m_A1Label.setText( \"BC\");\n m_A2Label.setText( \"REC\");\n m_A3Label.setText( \"\");\n m_A4Label.setText( \"\");\n m_Sim1Label.setText( \"Sim Rush\");\n m_Sim2Label.setText( \"Sim Catch\");\n m_Sim3Label.setText( \"<HTML> Sim Punt<br>return</HTML>\");\n m_Sim4Label.setText( \"<HTML> Sim Kick<br>return</HTML>\");\n m_Sim1UpDown.setEnabled( true);\n m_Sim2UpDown.setEnabled( true);\n m_Sim3UpDown.setEnabled( true);\n m_Sim4UpDown.setEnabled( true);\n m_Sim1UpDown.setModel(new SpinnerNumberModel(0, 0, 15, 1));\n m_Sim2UpDown.setModel(new SpinnerNumberModel(0, 0, 15, 1));\n m_Sim3UpDown.setModel(new SpinnerNumberModel(0, 0, 15, 1));\n m_Sim4UpDown.setModel(new SpinnerNumberModel(0, 0, 15, 1));\n m_PS_BC_PI_KABox.setEnabled( true);\n m_PC_REC_QU_KABox.setEnabled( true);\n m_ACCBox.setEnabled( false);\n m_APBBox.setEnabled( false);\n break;\n case OLINE:\n m_A1Label.setText( \"\");\n m_A2Label.setText( \"\");\n m_A3Label.setText( \"\");\n m_A4Label.setText( \"\");\n m_Sim1Label.setText( \"\");\n m_Sim2Label.setText( \"\");\n m_Sim3Label.setText( \"\");\n m_Sim4Label.setText( \"\");\n m_Sim1UpDown.setEnabled( false);\n m_Sim2UpDown.setEnabled( false);\n m_Sim3UpDown.setEnabled( false);\n m_Sim4UpDown.setEnabled( false);\n m_PS_BC_PI_KABox.setEnabled( false);\n m_PC_REC_QU_KABox.setEnabled( false);\n m_ACCBox.setEnabled( false);\n m_APBBox.setEnabled( false);\n break;\n case DEFENSE:\n m_A1Label.setText( \"PI\");\n m_A2Label.setText( \"QU\");\n m_A3Label.setText( \"\");\n m_A4Label.setText( \"\");\n m_Sim1Label.setText( \"<HTML> Sim Pass<br>rush </HTML>\");\n m_Sim2Label.setText( \"Sim Coverage\");\n m_Sim3Label.setText( \"\");\n m_Sim4Label.setText( \"\");\n m_Sim1UpDown.setEnabled( true);\n m_Sim2UpDown.setEnabled( true);\n m_Sim3UpDown.setEnabled( false);\n m_Sim4UpDown.setEnabled( false);\n m_Sim1UpDown.setModel(new SpinnerNumberModel(0, 0, 255, 1));\n m_Sim2UpDown.setModel(new SpinnerNumberModel(0, 0, 255, 1));\n m_Sim3UpDown.setModel(new SpinnerNumberModel(0, 0, 255, 1));\n m_Sim4UpDown.setModel(new SpinnerNumberModel(0, 0, 255, 1));\n m_PS_BC_PI_KABox.setEnabled( true);\n m_PC_REC_QU_KABox.setEnabled( true);\n m_ACCBox.setEnabled( false);\n m_APBBox.setEnabled( false);\n break;\n case KICKER:\n m_A1Label.setText( \"KA\");\n m_A2Label.setText( \"AKB\");\n m_A3Label.setText( \"\");\n m_A4Label.setText( \"\");\n m_Sim1Label.setText( \"Sim KA\");\n m_Sim2Label.setText( \"\");\n m_Sim3Label.setText( \"\");\n m_Sim4Label.setText( \"\");\n m_Sim1UpDown.setEnabled( true);\n m_Sim2UpDown.setEnabled( false);\n m_Sim3UpDown.setEnabled( false);\n m_Sim4UpDown.setEnabled( false);\n m_Sim1UpDown.setModel(new SpinnerNumberModel(0, 0, 15, 1));\n m_Sim2UpDown.setModel(new SpinnerNumberModel(0, 0, 15, 1));\n m_Sim3UpDown.setModel(new SpinnerNumberModel(0, 0, 15, 1));\n m_Sim4UpDown.setModel(new SpinnerNumberModel(0, 0, 15, 1));\n m_PS_BC_PI_KABox.setEnabled( true);\n m_PC_REC_QU_KABox.setEnabled( true);\n m_ACCBox.setEnabled( false);\n m_APBBox.setEnabled( false);\n break;\n }\n m_DoneInit = true;\n }", "public void updateState();", "protected void updateWidgets() {\n if (!isVisible()) {\n return;\n }\n if (myTopPanel != null) {\n // if we have a top panel, then we have a grid display there\n boolean gridOn = viewer.getGridVisible();\n GLGridPlane grid = viewer.getGrid();\n if ((myGridDisplay != null) != gridOn) {\n if (gridOn) {\n myGridDisplay =\n GridDisplay.createAndAdd (\n grid, myTopPanel, myGridDisplayIndex);\n }\n else {\n GridDisplay.removeAndDispose (\n myGridDisplay, myTopPanel, myGridDisplayIndex);\n myGridDisplay = null;\n }\n }\n if (myGridDisplay != null) {\n myGridDisplay.updateWidgets();\n }\n }\n }", "public void updateUI()\n\t{\n\t\tif( isRunning() == false) \n\t\t{\n\t\t\tupdateButton(\"Run\");\n\t\t\tbutton.setClickable(true);\n\t\t\tupdateTextView(Feedback.getMessage(Feedback.TYPE.NEW_TEST, null));\n\t\t}else\n\t\t{\n\t\t\tbutton.setClickable(true);\n\t\t\tupdateButton( \"Stop\" );\n\t\t\tupdateTextView(\"Tests are running.\");\n\n\t\t}\n\t}", "protected void updateUI() {\n this.runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n // TODO Auto-generated method stub\n xWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro X:\\n\"\n + mWakeupUncalibratedGyroData[0]);\n yWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro Y:\\n\"\n + mWakeupUncalibratedGyroData[1]);\n zWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro Z:\\n\"\n + mWakeupUncalibratedGyroData[2]);\n }\n });\n }", "public void update() {\r\n\r\n // update attributes\r\n finishIcon.setColored(isDirty());\r\n cancelIcon.setColored(isDirty());\r\n finishButton.repaint();\r\n cancelButton.repaint();\r\n\r\n }", "public void updateUI() {\n/* 393 */ setUI((ScrollPaneUI)UIManager.getUI(this));\n/* */ }", "protected void setCurrentState(State newState) {\n\n if (currentState == newState) {\n return;\n }\n\n currentState = checkNotNull(newState);\n\n display.setNewButtonEnabled(currentState.isNewButtonEnabled());\n display.setOpenButtonEnabled(currentState.isOpenButtonEnabled());\n display.setSaveButtonEnabled(currentState.isSaveButtonEnabled());\n display.setCopyButtonEnabled(currentState.isCopyButtonEnabled());\n display.setVersionsButtonEnabled(currentState.isVersionsButtonEnabled());\n display.setDeleteButtonEnabled(currentState.isDeleteButtonEnabled());\n display.setShareButtonEnabled(currentState.isShareButtonEnabled());\n display.setUndoButtonEnabled(currentState.isUndoButtonEnabled());\n display.setRedoButtonEnabled(currentState.isRedoButtonEnabled());\n display.setPrintButtonEnabled(currentState.isPrintButtonEnabled());\n display.setSimulateButtonEnabled(currentState.isSimulateButtonEnabled());\n display.setSimulateButtonDown(currentState.isSimulateButtonDown());\n\n display.setSchematicPanelEditable(currentState.isSchematicPanelEditable());\n\n display.clearPrintSettingsList();\n if (currentState.getPrintSettingsList() != null) {\n for (DownloadFormat item : currentState.getPrintSettingsList()) {\n display.addToPrintSettingsList(item.getExtension(), item);\n }\n }\n\n display.hideDialogs();\n if (currentState.isFileChooserVisible()) {\n display.clearFileList();\n if (currentState.getFileChooserList() != null) {\n for (Map.Entry<VersionMetadata, Optional<Image>> item : currentState.getFileChooserList().entrySet()) {\n display.addToFileList(item.getKey(), item.getValue().orNull());\n }\n }\n display.showFileChooserPanel();\n } else if (currentState.isVersionChooserVisible()) {\n display.clearVersionList();\n if (currentState.getVersionChooserList() != null) {\n for (VersionMetadata item : currentState.getVersionChooserList()) {\n display.addToVersionList(item);\n }\n }\n display.showVersionChooserPanel();\n } else if (currentState.isShareChooserVisible()) {\n display.showShareChooserPanel();\n display.setShareChooserFileVisibility(currentState.getShareChooserFileVisibility(),\n currentState.getShareChooserIsSimulate());\n }\n\n if (currentState.isDialogBackPaneVisible()) {\n display.showDialogBackPane();\n }\n\n if (currentState.doHidePanels()) {\n display.hidePanels();\n }\n if (currentState.isDevicePanelVisible()) {\n display.showDevicePanel();\n } else if (currentState.isGraphPanelVisible()) {\n display.showGraphPanel();\n }\n\n if (currentState.getURLState() != null) {\n currentState.getURLState().fire();\n }\n\n currentState.enter();\n }", "public void refreshUI(){\n\n // disable/endable certain UI elements depending on mode\n this.setModeUI();\n\n if (this.inManualMode == false){ this.automaticModeChecks(); }\n\n /**\n * @bug When selected a train from a TCDispatchedTrainsFrame, a NullPointerException is thrown.\n *\n */\n if (this.isUtilityFailure()){ this.vitalsButton.setForeground(Color.red); } // change to red\n else if (this.isUtilityFailure() == false){this.vitalsButton.setForeground(new Color(0,0,0));}\n\n // checks so that the doors can't open doors if moving..\n if (this.canOpenDoors()){ this.enableOpeningDoors(); }\n\n else{ // shut the doors if moving\n this.disableOpeningDoors();\n if (this.selectedTrain.getLeftDoor() != -1){ this.selectedTrain.setLeftDoor(0); }\n if (this.selectedTrain.getRightDoor() != -1){ this.selectedTrain.setRightDoor(0); }\n }\n\n // set utility stuff based on train information\n this.refreshAC();\n this.refreshHeat();\n this.refreshLights();\n this.refreshLeftDoors();\n this.refreshRightDoors();\n }", "private void updateUI() {\n Log.i(DEBUG.TAG, \"BTDevicesActivity - updateUI - start\");\n\n btnBTScan.setEnabled(btAdapter.isEnabled() && !btAdapter.isDiscovering());\n\n if (btAdapter.isDiscovering())\n btnBTScan.setText(R.string.btn_bt_devices_scan_running_text);\n else\n btnBTScan.setText(R.string.btn_bt_devices_scan_text);\n tglBTToggle.setChecked(btAdapter.isEnabled());\n\n // remove all found (if any) devices when BT is disabled\n if (!btAdapter.isEnabled())\n lvAdapter.clear();\n\n if (lvAdapter.getCount() > 0)\n tvHeader.setText(R.string.tv_bt_devices_header_text_devices_found);\n else\n tvHeader.setText(R.string.tv_bt_devices_header_text_no_devices);\n\n Log.i(DEBUG.TAG, \"BTDevicesActivity - updateUI - finish\");\n }", "@Override\n public void updateUI() {\n setUI(SubstanceRibbonGalleryUI.createUI(this));\n }", "private void updateAllWidgets(){\n AppWidgetManager widgetManager = AppWidgetManager.getInstance(this);\n int[] appWidgetIds = widgetManager.getAppWidgetIds(new ComponentName(this,EasyBakeWidget.class));\n for (int i: appWidgetIds){\n widgetManager.notifyAppWidgetViewDataChanged(i,R.id.widget_ingredients_list);\n EasyBakeWidget.updateAppWidget(this,widgetManager,i);\n }\n }", "private void updatePanels() // updatePanels method start\n\t{\n\t\tbalanceOutput.setText(log.balanceReport());\n\t\tlogOutput.setText(log.logReport());\n\t\tATBOutput.setText(log.adjustedTrialBalance());\n\t\tISOutput.setText(log.incomeStatement());\n\t\tRESOutput.setText(log.retainedEarningsStatement());\n\t\tBSOutput.setText(log.balanceSheet());\n\t}", "public void forceUpdateUI() {\n\t\tupdateUI();\n\t}", "abstract public void updateState();", "private void updateUI() {\n Bite bite = BiteLab.get(getActivity()).getBite(mBiteId);\n\n mPlacementTextView.setText(bite.getPlacement());\n\n Calendar c = bite.getCalendar();\n int year = c.get(Calendar.YEAR);\n int month = c.get(Calendar.MONTH)+1;\n int day = c.get(Calendar.DAY_OF_MONTH);\n mDateTextView.setText(getString(R.string.show_date, day, month, year));\n\n mDaysSinceBiteTextView.setText(getString(R.string.days_since_bite\n , bite.getDaysSinceBite()));\n\n mStageTextView.setText(getString(R.string.show_stage, bite.getStage()));\n }", "public void updateUi() {\n updateTextView(R.id.blindword, gameInstance.getBlindWord(), EditMode.ADDSPACING);\n updateTextView(R.id.guessedletters, gameInstance.getGuessedSoFar(), EditMode.ADDSPACING);\n\n int livesTotal = settings.getInt(\"lives\", 7);\n int livesLeft = gameInstance.getLives();\n StringBuilder healthbar = new StringBuilder();\n for(int i=0;i<livesLeft;i++) {\n healthbar.append('\\u2764'); //black heart\n }\n\n for(int i=0;i<(livesTotal - livesLeft);i++) {\n healthbar.append('\\u2661'); //white heart\n }\n\n updateTextView(R.id.healthbar, healthbar.toString(), EditMode.NONE);\n\n gameOverListener();\n\n }", "@Override\r\n\tpublic void update() {\r\n\t\t// get the first element and set the values according to its\r\n\t\t// information\r\n\t\tIqmDataBox iqmDataBox = (IqmDataBox) this.workPackage.getSources().get(0);\r\n\t\tPlanarImage pi = iqmDataBox.getImage();\r\n\r\n\t\tjFormattedTextFieldOldWidth.setValue(pi.getWidth());\r\n\t\tjFormattedTextFieldOldHeight.setValue(pi.getHeight());\r\n\r\n\t\tint left = ((Number) jSpinnerLeft.getValue()).intValue();\r\n\t\tint right = ((Number) jSpinnerRight.getValue()).intValue();\r\n\t\tint top = ((Number) jSpinnerTop.getValue()).intValue();\r\n\t\tint bottom = ((Number) jSpinnerBottom.getValue()).intValue();\r\n\r\n\t\t// Set image dependent initial values;\r\n\t\tjSpinnerNewWidth.removeChangeListener(this);\r\n\t\tjSpinnerNewWidth.setValue(pi.getWidth() + left + right);\r\n\t\tjSpinnerNewWidth.addChangeListener(this);\r\n\t\tjSpinnerNewHeight.removeChangeListener(this);\r\n\t\tjSpinnerNewHeight.setValue(pi.getHeight() + top + bottom);\r\n\t\tjSpinnerNewHeight.addChangeListener(this);\r\n\t\t\r\n\t\tif (buttConst.isSelected()){\r\n\t\t\ttbConst.setTitleColor(Color.BLACK);\r\n\t\t\tjLabelConst.setEnabled(true);\r\n\t\t\tjSpinnerConst.setEnabled(true);\r\n\t\t} else {\r\n\t\t\ttbConst.setTitleColor(Color.GRAY);\r\n\t\t\tjLabelConst.setEnabled(false);\r\n\t\t\tjSpinnerConst.setEnabled(false);\r\n\t\t}\r\n\t\tthis.repaint(); //because of tb TitledBorder cahnge of color\r\n\t\t\r\n\r\n\t\tthis.updateParameterBlock();\r\n\t\tthis.setParameterValuesToGUI();\r\n\t}", "@Override\n\tprotected void UpdateUI() {\n\t\tFineModulationDisplay(FineModulation);\n\t\tAutoGreaseDisplay(AutoGrease);\n\t\tQuickcouplerDisplay(Quickcoupler);\n\t\tRideControlDisplay(RideControl);\n\t\tBeaconLampDisplay(BeaconLamp);\n\t\tMirrorHeatDisplay(MirrorHeat);\n//\t\tFNKeyDisplay(ParentActivity.LockEntertainment);\n\t}", "protected void updatePanelContent() {\n updating = true;\n jTextFieldName.setText(bulb.getName());\n jTextFieldName.setToolTipText(bulb.getType());\n jSlider1.setValue(bulb.getIntensity());\n jToggleButton1.setSelected(bulb.isOn());\n if (bulb.getColor() != null) {\n jRadioCold.setEnabled(true);\n jRadioNormal.setEnabled(true);\n jRadioWarm.setEnabled(true);\n switch(bulb.getColor()) {\n case TradfriConstants.COLOR_NORMAL: jRadioNormal.setSelected(true); break;\n case TradfriConstants.COLOR_WARM: jRadioWarm.setSelected(true); break;\n case TradfriConstants.COLOR_COLD: jRadioCold.setSelected(true); break;\n }\n }\n else {\n jRadioCold.setEnabled(false);\n jRadioNormal.setEnabled(false);\n jRadioWarm.setEnabled(false);\n }\n \n \n if (bulb.isOnline()) {\n jToggleButton1.setEnabled(true);\n jRadioCold.setEnabled(true);\n jRadioNormal.setEnabled(true);\n jRadioWarm.setEnabled(true);\n jSlider1.setEnabled(true);\n jLabelDates.setText(\"Installed: \"+bulb.getDateInstalled()+\" - Last seen: \"+bulb.getDateLastSeen()+\" - Firmware: \" + bulb.getFirmware() + \" [online]\");\n }\n else {\n jToggleButton1.setEnabled(false);\n jRadioCold.setEnabled(false);\n jRadioNormal.setEnabled(false);\n jRadioWarm.setEnabled(false);\n jSlider1.setEnabled(false);\n jLabelDates.setText(\"Installed: \"+bulb.getDateInstalled()+\" - Last seen: \"+bulb.getDateLastSeen()+\" - Firmware: \" + bulb.getFirmware() + \" [offline]\");\n }\n \n updating = false;\n }", "@Override\n\tpublic void handleUpdateUI(String text, int code) {\n\t\t\n\t}", "protected void updateButtonStates()\n\t{\n\t\tboolean isLastStep = isLastStep(currentStep);\n\t\tboolean isFirstStep = isFirstStep(currentStep);\n\t\t// Check whether current step data is valid or not\n\t\tboolean isValid = currentStep.onAdvance();\n\t\tthis.getCancelButton().setVisible(!isLastStep);\n\t\tthis.getCancelButton().setEnabled(!isLastStep);\n\t\t\n\t\tthis.getBackButton().setVisible(!isLastStep);\n\t\tthis.getBackButton().setEnabled(!isFirstStep && !isLastStep);\n\n\t\tthis.getNextButton().setVisible(!isLastStep);\n\t\tthis.getNextButton().setEnabled(!isLastStep && isValid);\n\n\t\tthis.getFinishButton().setEnabled(isLastStep);\n\t\tthis.getFinishButton().setVisible(isLastStep);\n\t}", "private void updateUI() {\n updateTrackDetails();\n //Disable Prev or Next or both button based on the current Index and number of tracks available\n if (mPlayingIndex == 0) {\n mPlayPrevBtn.setClickable(false);\n }\n if (mPlayingIndex == mTracks.size() - 1) {\n mPlayNextBtn.setClickable(false);\n }\n if (mPlayingIndex > 0 && mPlayingIndex < mTracks.size() - 1) {\n mPlayNextBtn.setClickable(true);\n mPlayPrevBtn.setClickable(true);\n }\n }", "protected void updateEnabled() {\n\t\tFieldGroup control = getUIControl();\n\t\tif (control != null) {\n\t\t\tCollection<? extends IRidget> ridgets = getRidgets();\n\t\t\tfor (IRidget ridget : ridgets) {\n\t\t\t\tridget.setEnabled(isEnabled());\n\t\t\t}\n\t\t\tcontrol.setEnabled(isEnabled());\n\t\t}\n\t}", "private void refreshControls() {\n\t// Scrollbars are upside-down from real sliders.\n\tint scrollValue = caeliScroll.getMaximum() - caeliScroll.getValue();\n\tcaeliValueLabel.setText( \"\"+(scrollValue / 100.0 ) );\n\tparent.setCaeliDensity( scrollValue / 100.0 );\n\n\t// Scrollbars are upside-down from real sliders.\n\tscrollValue = planetScroll.getMaximum() - planetScroll.getValue();\n\tplanetValueLabel.setText( \"\"+scrollValue );\n\tparent.setPlanetCount( scrollValue );\n\n\t// Scrollbars are upside-down from real sliders.\n\tscrollValue = triSizeScroll.getMaximum() - triSizeScroll.getValue()\n\t + triFineSizeScroll.getMaximum() - triFineSizeScroll.getValue();\n\t \n\ttriSizeValueLabel.setText( \"\"+(triSizeScroll.getMaximum() - triSizeScroll.getValue()) );\n\ttriFineSizeValueLabel.setText( \"\"+(triFineSizeScroll.getMaximum() - triFineSizeScroll.getValue()) );\n\tparent.setDustTrianglesThreshold( scrollValue );\n\n\t// Scrollbars are upside-down from real sliders.\n\tint strnScrollValue = attStrengthScroll.getMaximum() - attStrengthScroll.getValue();\n\tint distScrollValue = attDistanceScroll.getMaximum() - attDistanceScroll.getValue();\n\n\tattStrnValueLabel.setText( \"\"+strnScrollValue );\n\tattDistValueLabel.setText( \"\"+distScrollValue );\n\n\tparent.setAttraction( distScrollValue, strnScrollValue );\n\n\n\t// Refresh iPad display values\n\tosc.send( new OscMessage( \"/faders\", new Object[] { sliderFloatValue( caeliScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( planetScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( triSizeScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( triFineSizeScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( attDistanceScroll ),\n\t\t\t\t\t\t\t sliderFloatValue( attStrengthScroll ) } ),\n\t new NetAddress( ipadAddress, OSC_PORT_SEND ) );\n }", "public void doChanges0() {\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 436, 300));\n compBounds.put(\"jTextField1\", new Rectangle(10, 11, 216, 20));\n baselinePosition.put(\"jTextField1-216-20\", new Integer(14));\n compBounds.put(\"jToggleButton2\", new Rectangle(10, 118, 105, 23));\n baselinePosition.put(\"jToggleButton2-105-23\", new Integer(15));\n compBounds.put(\"jToggleButton3\", new Rectangle(121, 118, 105, 23));\n baselinePosition.put(\"jToggleButton3-105-23\", new Integer(15));\n compBounds.put(\"jTextField2\", new Rectangle(10, 37, 216, 20));\n baselinePosition.put(\"jTextField2-216-20\", new Integer(14));\n compBounds.put(\"jScrollPane1\", new Rectangle(232, 11, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n prefPadding.put(\"jTextField2-jToggleButton2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton2-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton2-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton2-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton3-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton3-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton3-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPaddingInParent.put(\"Form-jScrollPane1-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jToggleButton2-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jToggleButton3-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n contInterior.put(\"Form\", new Rectangle(0, 0, 436, 300));\n compBounds.put(\"jTextField1\", new Rectangle(10, 11, 216, 20));\n baselinePosition.put(\"jTextField1-216-20\", new Integer(14));\n compBounds.put(\"jToggleButton2\", new Rectangle(10, 118, 105, 23));\n baselinePosition.put(\"jToggleButton2-105-23\", new Integer(15));\n compBounds.put(\"jToggleButton3\", new Rectangle(121, 118, 105, 23));\n baselinePosition.put(\"jToggleButton3-105-23\", new Integer(15));\n compBounds.put(\"jTextField2\", new Rectangle(10, 37, 216, 20));\n baselinePosition.put(\"jTextField2-216-20\", new Integer(14));\n compBounds.put(\"jScrollPane1\", new Rectangle(232, 11, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n prefPadding.put(\"jTextField2-jToggleButton2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton2-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton2-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton2-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton3-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton3-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton3-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPaddingInParent.put(\"Form-jToggleButton2-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jToggleButton3-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n // parentId-compId-dimension-compAlignment\n lm.removeComponent(\"jScrollPane1\", true);\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 436, 300));\n compBounds.put(\"jTextField1\", new Rectangle(10, 11, 216, 20));\n baselinePosition.put(\"jTextField1-216-20\", new Integer(14));\n compBounds.put(\"jToggleButton2\", new Rectangle(10, 118, 105, 23));\n baselinePosition.put(\"jToggleButton2-105-23\", new Integer(15));\n compBounds.put(\"jToggleButton3\", new Rectangle(121, 118, 105, 23));\n baselinePosition.put(\"jToggleButton3-105-23\", new Integer(15));\n compBounds.put(\"jTextField2\", new Rectangle(10, 37, 216, 20));\n baselinePosition.put(\"jTextField2-216-20\", new Integer(14));\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n prefPadding.put(\"jTextField2-jToggleButton2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton2-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton2-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton2-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton3-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton3-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jToggleButton3-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPaddingInParent.put(\"Form-jToggleButton2-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jToggleButton3-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n contInterior.put(\"Form\", new Rectangle(0, 0, 436, 300));\n compBounds.put(\"jTextField1\", new Rectangle(10, 11, 216, 20));\n baselinePosition.put(\"jTextField1-216-20\", new Integer(14));\n compBounds.put(\"jToggleButton2\", new Rectangle(10, 118, 105, 23));\n baselinePosition.put(\"jToggleButton2-105-23\", new Integer(15));\n compBounds.put(\"jToggleButton3\", new Rectangle(121, 118, 105, 23));\n baselinePosition.put(\"jToggleButton3-105-23\", new Integer(15));\n compBounds.put(\"jTextField2\", new Rectangle(10, 37, 216, 20));\n baselinePosition.put(\"jTextField2-216-20\", new Integer(14));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n }", "public void setStateInternal(int i) {\n int i2 = this.state;\n if (i2 != i) {\n this.state = i;\n WeakReference<V> weakReference = this.viewRef;\n if (weakReference != null) {\n View view = (View) weakReference.get();\n if (view != null) {\n if (i == 6 || i == 3) {\n updateImportantForAccessibility(true);\n } else if (i == 5 || i == 4) {\n updateImportantForAccessibility(false);\n }\n ViewCompat.setImportantForAccessibility(view, 1);\n view.sendAccessibilityEvent(32);\n updateDrawableOnStateChange(i, i2);\n BottomSheetCallback bottomSheetCallback = this.callback;\n if (bottomSheetCallback != null) {\n bottomSheetCallback.onStateChanged(view, i);\n }\n }\n }\n }\n }", "private void refresh(int width, int height) {\n Integer numUnexposed = mainField.numUnexposed();\n nonminesLabel.setText(numUnexposed.toString());\n Integer numMarked = mainField.numMarked();\n if (numMarked < 0) {\n cellsUnmarked.setText(\"Too Many Marked!\");\n }\n else {\n cellsUnmarked.setText(numMarked.toString());\n }\n // iterate through all the buttons and update the text if it's an exposed cell\n for (int i = 0;i < width;i++) {\n for (int j = 0;j < height;j++) {\n int cellState = mainField.getCellState(i,j);\n if (cellState == mainField.EXPOSED) {\n Integer numValue = mainField.getValue(i,j);\n if (numValue == -1) {\n btArray[i][j].setText(\"B\");\n btArray[i][j].setStyle(\"-fx-background-color: #FF0000;\");\n }\n else if (numValue == 0) {\n btArray[i][j].setStyle(\"-fx-background-color: #CCCCCC;\");\n }\n else {\n btArray[i][j].setText(numValue.toString());\n btArray[i][j].setStyle(\"-fx-background-color: #CCCCCC;\");\n }\n }\n }\n }\n }", "private void updateState() {\n \t\tfor (Map.Entry<FunctionParameter, Pair<Text, Button>> entry : inputFields.entries())\n \t\t\tif (entry.getKey().getValidator() != null\n \t\t\t\t\t&& entry.getKey().getValidator().validate(entry.getValue().getFirst().getText()) != null) {\n \t\t\t\tsetPageComplete(false);\n \t\t\t\treturn;\n \t\t\t}\n \t\tsetPageComplete(true);\n \t}", "private void updateUI() {\n if(mChoice == Keys.CHOICE_WAITING) {\n mInstructionView.setText(\"Choose your weapon...\");\n mChoiceView.setImageResource(R.drawable.unknown);\n mRockButton.setEnabled(true);\n mPaperButton.setEnabled(true);\n mScissorsButton.setEnabled(true);\n } else {\n // A mChoice has been made\n mRockButton.setEnabled(false);\n mPaperButton.setEnabled(false);\n mScissorsButton.setEnabled(false);\n\n mInstructionView.setText(\"Waiting for opponent...\");\n\n switch(mChoice) {\n case Keys.CHOICE_ROCK:\n mChoiceView.setImageResource(R.drawable.rock);\n break;\n case Keys.CHOICE_PAPER:\n mChoiceView.setImageResource(R.drawable.paper);\n break;\n case Keys.CHOICE_SCISSORS:\n mChoiceView.setImageResource(R.drawable.scissors);\n break;\n }\n }\n\n // Check Pebble player response has arrived first\n if(mChoice != Keys.CHOICE_WAITING && mP2Choice != Keys.CHOICE_WAITING) {\n doMatch();\n }\n }", "private void refreshUI(){\r\n\t\t//update text fields\r\n\t\tConfiguration conf = m_Categorizer.Configuration();\r\n\t\tm_MCSTf.setText(String.valueOf(conf.getMCSScore()));\r\n\t\tm_RelScoreTf.setText(String.valueOf(conf.getRelevanceWeight()));\r\n\t\tm_CohScoreTf.setText(String.valueOf(conf.getCoherenceWeight()));\r\n\t\tm_KeyTf.setText(String.valueOf(conf.getKeywordsWeight()));\r\n\t\tm_CatConfTf.setText(String.valueOf(conf.getCategoryConfidenceWeight()));\r\n\t\tm_RepeatTf.setText(String.valueOf(conf.getRepeatedConceptWeight()));\r\n\t\tm_MinCatsTf.setText(String.valueOf(conf.getMinOutputCategories()));\r\n\t\tm_MaxCatsTf.setText(String.valueOf(conf.getMaxOutputCategories()));\r\n\t\tm_MinCatScoreTf.setText(String.valueOf(conf.getMinScore()));\r\n\t\t//refresh tables\r\n\t\tm_DatasetTable.refresh();\r\n\t\tm_ConceptTable.refresh();\r\n\t\t//refresh statistics window\r\n\t\tm_StatisticsWindow.refresh();\r\n\t\t//refresh filter choicebox\r\n\t\tupdateFilterChoiceBox();\r\n\t}", "protected void updateUi() {\n final boolean canInput = mSaveAndFinishWorker == null;\n byte[] password = LockPatternUtils.charSequenceToByteArray(mPasswordEntry.getText());\n final int length = password.length;\n if (mUiStage == Stage.Introduction) {\n mPasswordRestrictionView.setVisibility(View.VISIBLE);\n final int errorCode = validatePassword(password);\n String[] messages = convertErrorCodeToMessages(errorCode);\n // Update the fulfillment of requirements.\n mPasswordRequirementAdapter.setRequirements(messages);\n // Enable/Disable the next button accordingly.\n setNextEnabled(errorCode == NO_ERROR);\n } else {\n // Hide password requirement view when we are just asking user to confirm the pw.\n mPasswordRestrictionView.setVisibility(View.GONE);\n setHeaderText(getString(mUiStage.getHint(mIsAlphaMode, getStageType())));\n setNextEnabled(canInput && length >= mPasswordMinLength);\n mSkipOrClearButton.setVisibility(toVisibility(canInput && length > 0));\n }\n int message = mUiStage.getMessage(mIsAlphaMode, getStageType());\n if (message != 0) {\n mMessage.setVisibility(View.VISIBLE);\n mMessage.setText(message);\n } else {\n mMessage.setVisibility(View.INVISIBLE);\n }\n\n setNextText(mUiStage.buttonText);\n mPasswordEntryInputDisabler.setInputEnabled(canInput);\n Arrays.fill(password, (byte) 0);\n }", "private void setUIState(UIState state) {\n mUIState = state;\n\n if (mUIState == UIState.DISCONNECTED) {\n // Not connected to a channel.\n mCallBtn.setImageResource(R.drawable.btn_startcall);\n mRemoteShareContainerSplit.setVisibility(View.GONE);\n mRemoteCameraContainer.setVisibility(View.GONE);\n mChannelText.setEnabled(true);\n\n // Hide the buttons\n mMuteBtn.setVisibility(View.GONE);\n mShowCameraBtn.setVisibility(View.GONE);\n } else {\n // Connected to a channel.\n mCallBtn.setImageResource(R.drawable.btn_endcall);\n mShowCameraBtn.setImageResource(R.drawable.btn_camera_show);\n mChannelText.setEnabled(false);\n\n // Show the buttons\n mMuteBtn.setVisibility(View.VISIBLE);\n mShowCameraBtn.setVisibility(View.VISIBLE);\n\n if (mUIState == UIState.CONNECTED_SPLITSCREEN) {\n mRemoteShareContainerSplit.setVisibility(View.VISIBLE);\n mRemoteCameraContainer.setVisibility(View.VISIBLE);\n mShowCameraBtn.setImageResource(R.drawable.btn_camera_show);\n } else {\n mRemoteShareContainerSplit.setVisibility(View.GONE);\n mRemoteCameraContainer.setVisibility(View.GONE);\n mShowCameraBtn.setImageResource(R.drawable.btn_camera_hide);\n }\n }\n }", "private void updateGUI() {\n\t\tsfrDlg.readSFRTableFromCPU();\n\t\tsourceCodeDlg.updateRowSelection(cpu.PC);\n\t\tsourceCodeDlg.getCyclesLabel().setText(\"Cycles count : \" + cpu.getCyclesCount());\n\t\tdataMemDlg.fillDataMemory();\n\t\t//ioPortsDlg.fillIOPorts();\t\t\n\t\tIterator iter = seg7DlgList.iterator();\n\t\twhile(iter.hasNext())\n\t\t\t((GUI_7SegDisplay)iter.next()).drawSeg();\n\t}", "private void m125717l() {\n mo69207a(this.f88312j, (StateListener) null);\n for (StatefulButton statefulButton : this.f90232y) {\n statefulButton.updateStatus(FollowStatusUtils.m82614a(this.f90217G.mo110110f()), false);\n }\n }", "private void updateButtonsState() {\r\n ISelection sel = mTableViewerPackages.getSelection();\r\n boolean hasSelection = sel != null && !sel.isEmpty();\r\n\r\n mUpdateButton.setEnabled(mTablePackages.getItemCount() > 0);\r\n mDeleteButton.setEnabled(hasSelection);\r\n mRefreshButton.setEnabled(true);\r\n }", "public abstract void update(UIReader event);", "@Override\n\t\t\tpublic void stateChanged() {\n\t\t\t\tupdateUi();\n\t\t\t\tmakeUserContentPanel(panel);\n\t\t\t}", "public void updateUIControls(Composite parent) {\n \n \t\tif (!checkPropertyUpdateView()) {\n \t\t\treturn;\n \t\t}\n \n \t\tControl[] controls = parent.getChildren();\n \t\tfor (Control uiControl : controls) {\n \n \t\t\tupdateUIControl(uiControl);\n \n \t\t\tif (uiControl instanceof Composite) {\n \t\t\t\tupdateUIControls((Composite) uiControl);\n \t\t\t}\n \n \t\t}\n \n \t}", "private void initUI() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\trenderer = new LWJGLRenderer();\n\t\t\tgui = new GUI(stateWidget, renderer);\n\t\t\tthemeManager = ThemeManager.createThemeManager(StateWidget.class.getResource(\"gameui.xml\"), renderer);\n\t\t\tgui.applyTheme(themeManager);\n\t\t\t\n\t\t} catch (LWJGLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void updateControls() {\n updateBadge();\n etExtUsrId.setEnabled(isPushRegistrationAvailable() && !isUserPersonalizedWithExternalUserId());\n btnPersonalize.setEnabled(!isUserPersonalizedWithExternalUserId());\n btnDepersonalize.setEnabled(isUserPersonalizedWithExternalUserId());\n btnToInbox.setEnabled(isUserPersonalizedWithExternalUserId());\n }", "public void updateOnScreen() {\n\t\tscreen.updateBox();\n\n\t}", "private void updateUi() {\n mBuyButton = (Button) findViewById(R.id.but_purchase);\n mMessageText = (TextView)findViewById(R.id.txt_purchase);\n }", "private void setGUI()\r\n\t{\r\n\t\tbubblePB = setProgressBar(bubblePB);\r\n\t\tinsertionPB = setProgressBar(insertionPB);\r\n\t\tmergePB = setProgressBar(mergePB);\r\n\t\tquickPB = setProgressBar(quickPB);\r\n\t\tradixPB = setProgressBar(radixPB);\r\n\t\t\r\n\t\tsetLabels();\r\n\t\tsetPanel();\r\n\t\tsetLabels();\r\n\t\tsetFrame();\r\n\t}", "void updateState() {\n String[] players = client.getPlayers();\n System.out.println(Arrays.toString(players));\n\n if(oldPlayerNum != players.length){\n oldPlayerNum = players.length;\n updateComboBox();\n }\n\n playersListModel.clear();\n\n for (int i = 0; i < players.length; i++) {\n playersListModel.add(i, players[i]);\n }\n\n // SECOND check if player holding the ball / update GUI accordingly\n String[] playerBall = client.whoIsBall();\n boolean serverSideBall = Integer.parseInt(playerBall[1]) == client.getId();\n\n if (client.hasBall != serverSideBall) { // If the server says something different\n client.hasBall = serverSideBall;\n ballState(serverSideBall, playerBall[0]);\n }\n // THIRD if you are holding the ball update gui so that ball is throwable\n\n }", "@Override\n public void update() {\n if ((mLikesDialog != null) && (mLikesDialog.isVisible())) {\n return;\n }\n\n if ((mCommentariesDialog != null) && (mCommentariesDialog.isVisible())) {\n return;\n }\n\n if (!getUserVisibleHint()) {\n return;\n }\n\n updateUI();\n }", "public void stateChanged() {\r\n if (nextBigStepButton != null) {\r\n nextBigStepButton.setEnabled(!automata.isAtEnd());\r\n }\r\n if (prevBigStepButton != null) {\r\n prevBigStepButton.setEnabled(!automata.isAtStart());\r\n }\r\n\r\n nextStepButton.setEnabled(!automata.isAtEnd());\r\n prevStepButton.setEnabled(!automata.isAtStart());\r\n restartButton.setEnabled(!automata.isAtStart());\r\n\r\n autoButton.setState(controller.getExecutionMode());\r\n autoButton.setEnabled(!automata.isAtEnd());\r\n }", "public void refresh() {\r\n\t\tneeds.setText(needs());\r\n\t\tproduction.setText(production());\r\n\t\tjobs.setText(jobs());\r\n\t\tmarketPrices.setText(marketPrices());\r\n\t\tmarketSellAmounts.setText(marketSellAmounts());\r\n\t\tmarketBuyAmounts.setText(marketBuyAmounts());\r\n\t\tcompanies.setText(companies());\r\n\t\tmoney.setText(money());\r\n\t\ttileProduction.setText(tileProduction());\r\n\t\tcapital.setText(capital());\r\n\t\thappiness.setText(happiness());\r\n\t\tland.setText(land());\r\n\t\t//ArrayList of Agents sorted from lowest to highest in money is retrieved from Tile\r\n\t\tagents=tile.getAgentsByMoney();\r\n\t\tgui3.refresh();\r\n\t\tsliderPerson.setText(\"\"+agents.get(slider.getValue()).getMoney());\r\n\t\ttick.setText(tick());\r\n\t\tthis.pack();\r\n\t}", "private void update()\n {\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n //System.out.println(\"UPDATE\");\n updateHumanPlayerMoney();\n updateListViewDoctorItems();\n updateListViewHospitalItems();\n updateListViewLogWindow();\n updateListViewComputerPlayer();\n load_figure();\n updateComputerPlayerMoney();\n }\n });\n }", "public void update()\n {\n if (sashButton != null) {\n Rectangle r = sashButton.getBounds();\n\n if (topGridSash.isVisible()) {\n topGridSash.resetBounds(r);\n }\n\n if (leftGridSash.isVisible()) {\n leftGridSash.resetBounds(r);\n }\n }\n }", "private void initComponents() {\n\t\tlabel11 = new JLabel();\n\t\tlabel12 = new JLabel();\n\t\tlabel32 = new JLabel();\n\t\tlabel5 = new JLabel();\n\t\tlabel7 = new JLabel();\n\t\tlabel6 = new JLabel();\n\t\tlabel8 = new JLabel();\n\t\tlabel13 = new JLabel();\n\t\tlabel14 = new JLabel();\n\t\tlabel15 = new JLabel();\n\t\tlabel16 = new JLabel();\n\t\tlabel9 = new JLabel();\n\t\tlabel33 = new JLabel();\n\t\tlabel1 = new JLabel();\n\t\ttestStateButton1 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton7 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton4 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton10 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateToggleButton1 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton5 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton9 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton12 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateButton15 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton19 = new FlatComponentStateTest.TestStateButton();\n\t\tlabel2 = new JLabel();\n\t\ttestStateButton2 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton8 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton5 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton11 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateToggleButton2 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton6 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton10 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton13 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateButton16 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton20 = new FlatComponentStateTest.TestStateButton();\n\t\tlabel3 = new JLabel();\n\t\ttestStateButton3 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton9 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton6 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton12 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateToggleButton3 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton7 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton11 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton14 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateButton17 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton21 = new FlatComponentStateTest.TestStateButton();\n\t\tlabel4 = new JLabel();\n\t\ttestStateButton13 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton14 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateToggleButton4 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton8 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateButton18 = new FlatComponentStateTest.TestStateButton();\n\t\tlabel10 = new JLabel();\n\t\tbutton1 = new JButton();\n\t\ttestDefaultButton1 = new FlatComponentStateTest.TestDefaultButton();\n\t\ttoggleButton1 = new JToggleButton();\n\t\ttoggleButton2 = new JToggleButton();\n\t\tbutton2 = new JButton();\n\t\tseparator1 = new JSeparator();\n\t\tlabel22 = new JLabel();\n\t\tlabel27 = new JLabel();\n\t\tlabel23 = new JLabel();\n\t\tlabel28 = new JLabel();\n\t\tlabel24 = new JLabel();\n\t\tlabel29 = new JLabel();\n\t\tlabel25 = new JLabel();\n\t\tlabel30 = new JLabel();\n\t\tlabel26 = new JLabel();\n\t\tlabel31 = new JLabel();\n\t\tlabel17 = new JLabel();\n\t\ttestStateCheckBox1 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox8 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox5 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox12 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateRadioButton1 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton8 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton5 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton9 = new FlatComponentStateTest.TestStateRadioButton();\n\t\tlabel18 = new JLabel();\n\t\ttestStateCheckBox2 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox9 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox6 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox13 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateRadioButton2 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton10 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton6 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton11 = new FlatComponentStateTest.TestStateRadioButton();\n\t\tlabel19 = new JLabel();\n\t\ttestStateCheckBox3 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox10 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox7 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox14 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateRadioButton3 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton12 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton7 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton13 = new FlatComponentStateTest.TestStateRadioButton();\n\t\tlabel20 = new JLabel();\n\t\ttestStateCheckBox4 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox11 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateRadioButton4 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton14 = new FlatComponentStateTest.TestStateRadioButton();\n\t\tlabel21 = new JLabel();\n\t\tcheckBox1 = new JCheckBox();\n\t\tcheckBox2 = new JCheckBox();\n\t\tradioButton1 = new JRadioButton();\n\t\tradioButton2 = new JRadioButton();\n\t\tseparator2 = new JSeparator();\n\t\tlabel35 = new JLabel();\n\t\ttextField1 = new JTextField();\n\t\ttextField2 = new JTextField();\n\t\tlabel38 = new JLabel();\n\t\tcomboBox1 = new JComboBox<>();\n\t\tcomboBox2 = new JComboBox<>();\n\n\t\t//======== this ========\n\t\tsetLayout(new MigLayout(\n\t\t\t\"insets dialog,hidemode 3\",\n\t\t\t// columns\n\t\t\t\"[fill]\" +\n\t\t\t\"[fill]\" +\n\t\t\t\"[fill]para\" +\n\t\t\t\"[fill]\" +\n\t\t\t\"[fill]para\" +\n\t\t\t\"[fill]\" +\n\t\t\t\"[fill]para\" +\n\t\t\t\"[fill]\" +\n\t\t\t\"[fill]para\" +\n\t\t\t\"[fill]\" +\n\t\t\t\"[fill]\",\n\t\t\t// rows\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]para\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]para\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\"));\n\n\t\t//---- label11 ----\n\t\tlabel11.setText(\"JButton\");\n\t\tlabel11.putClientProperty(\"FlatLaf.styleClass\", \"h3\");\n\t\tadd(label11, \"cell 1 0 2 1\");\n\n\t\t//---- label12 ----\n\t\tlabel12.setText(\"JToggleButton\");\n\t\tlabel12.putClientProperty(\"FlatLaf.styleClass\", \"h3\");\n\t\tadd(label12, \"cell 5 0 3 1\");\n\n\t\t//---- label32 ----\n\t\tlabel32.setText(\"Help Button\");\n\t\tlabel32.putClientProperty(\"FlatLaf.styleClass\", \"h3\");\n\t\tadd(label32, \"cell 9 0 2 1\");\n\n\t\t//---- label5 ----\n\t\tlabel5.setText(\"regular\");\n\t\tadd(label5, \"cell 1 1\");\n\n\t\t//---- label7 ----\n\t\tlabel7.setText(\"default\");\n\t\tadd(label7, \"cell 2 1\");\n\n\t\t//---- label6 ----\n\t\tlabel6.setText(\"focused\");\n\t\tadd(label6, \"cell 3 1\");\n\n\t\t//---- label8 ----\n\t\tlabel8.setText(\"default\");\n\t\tadd(label8, \"cell 4 1\");\n\n\t\t//---- label13 ----\n\t\tlabel13.setText(\"unsel.\");\n\t\tadd(label13, \"cell 5 1\");\n\n\t\t//---- label14 ----\n\t\tlabel14.setText(\"selected\");\n\t\tadd(label14, \"cell 6 1\");\n\n\t\t//---- label15 ----\n\t\tlabel15.setText(\"focused\");\n\t\tadd(label15, \"cell 7 1\");\n\n\t\t//---- label16 ----\n\t\tlabel16.setText(\"selected\");\n\t\tadd(label16, \"cell 8 1\");\n\n\t\t//---- label9 ----\n\t\tlabel9.setText(\"regular\");\n\t\tadd(label9, \"cell 9 1\");\n\n\t\t//---- label33 ----\n\t\tlabel33.setText(\"focused\");\n\t\tadd(label33, \"cell 10 1\");\n\n\t\t//---- label1 ----\n\t\tlabel1.setText(\"none\");\n\t\tadd(label1, \"cell 0 2\");\n\n\t\t//---- testStateButton1 ----\n\t\ttestStateButton1.setText(\"text\");\n\t\ttestStateButton1.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton1, \"cell 1 2\");\n\n\t\t//---- testStateButton7 ----\n\t\ttestStateButton7.setText(\"text\");\n\t\ttestStateButton7.setStateDefault(true);\n\t\ttestStateButton7.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton7, \"cell 2 2\");\n\n\t\t//---- testStateButton4 ----\n\t\ttestStateButton4.setText(\"text\");\n\t\ttestStateButton4.setStateFocused(true);\n\t\ttestStateButton4.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton4, \"cell 3 2\");\n\n\t\t//---- testStateButton10 ----\n\t\ttestStateButton10.setText(\"text\");\n\t\ttestStateButton10.setStateFocused(true);\n\t\ttestStateButton10.setStateDefault(true);\n\t\ttestStateButton10.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton10, \"cell 4 2\");\n\n\t\t//---- testStateToggleButton1 ----\n\t\ttestStateToggleButton1.setText(\"text\");\n\t\tadd(testStateToggleButton1, \"cell 5 2\");\n\n\t\t//---- testStateToggleButton5 ----\n\t\ttestStateToggleButton5.setText(\"text\");\n\t\ttestStateToggleButton5.setStateSelected(true);\n\t\tadd(testStateToggleButton5, \"cell 6 2\");\n\n\t\t//---- testStateToggleButton9 ----\n\t\ttestStateToggleButton9.setText(\"text\");\n\t\ttestStateToggleButton9.setStateFocused(true);\n\t\tadd(testStateToggleButton9, \"cell 7 2\");\n\n\t\t//---- testStateToggleButton12 ----\n\t\ttestStateToggleButton12.setText(\"text\");\n\t\ttestStateToggleButton12.setStateSelected(true);\n\t\ttestStateToggleButton12.setStateFocused(true);\n\t\tadd(testStateToggleButton12, \"cell 8 2\");\n\n\t\t//---- testStateButton15 ----\n\t\ttestStateButton15.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\ttestStateButton15.putClientProperty(\"JButton.buttonType\", \"help\");\n\t\tadd(testStateButton15, \"cell 9 2\");\n\n\t\t//---- testStateButton19 ----\n\t\ttestStateButton19.setStateFocused(true);\n\t\ttestStateButton19.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\ttestStateButton19.putClientProperty(\"JButton.buttonType\", \"help\");\n\t\tadd(testStateButton19, \"cell 10 2\");\n\n\t\t//---- label2 ----\n\t\tlabel2.setText(\"hover\");\n\t\tadd(label2, \"cell 0 3\");\n\n\t\t//---- testStateButton2 ----\n\t\ttestStateButton2.setText(\"text\");\n\t\ttestStateButton2.setStateHover(true);\n\t\ttestStateButton2.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton2, \"cell 1 3\");\n\n\t\t//---- testStateButton8 ----\n\t\ttestStateButton8.setText(\"text\");\n\t\ttestStateButton8.setStateHover(true);\n\t\ttestStateButton8.setStateDefault(true);\n\t\ttestStateButton8.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton8, \"cell 2 3\");\n\n\t\t//---- testStateButton5 ----\n\t\ttestStateButton5.setText(\"text\");\n\t\ttestStateButton5.setStateHover(true);\n\t\ttestStateButton5.setStateFocused(true);\n\t\ttestStateButton5.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton5, \"cell 3 3\");\n\n\t\t//---- testStateButton11 ----\n\t\ttestStateButton11.setText(\"text\");\n\t\ttestStateButton11.setStateHover(true);\n\t\ttestStateButton11.setStateFocused(true);\n\t\ttestStateButton11.setStateDefault(true);\n\t\ttestStateButton11.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton11, \"cell 4 3\");\n\n\t\t//---- testStateToggleButton2 ----\n\t\ttestStateToggleButton2.setText(\"text\");\n\t\ttestStateToggleButton2.setStateHover(true);\n\t\tadd(testStateToggleButton2, \"cell 5 3\");\n\n\t\t//---- testStateToggleButton6 ----\n\t\ttestStateToggleButton6.setText(\"text\");\n\t\ttestStateToggleButton6.setStateHover(true);\n\t\ttestStateToggleButton6.setStateSelected(true);\n\t\tadd(testStateToggleButton6, \"cell 6 3\");\n\n\t\t//---- testStateToggleButton10 ----\n\t\ttestStateToggleButton10.setText(\"text\");\n\t\ttestStateToggleButton10.setStateHover(true);\n\t\ttestStateToggleButton10.setStateFocused(true);\n\t\tadd(testStateToggleButton10, \"cell 7 3\");\n\n\t\t//---- testStateToggleButton13 ----\n\t\ttestStateToggleButton13.setText(\"text\");\n\t\ttestStateToggleButton13.setStateHover(true);\n\t\ttestStateToggleButton13.setStateSelected(true);\n\t\ttestStateToggleButton13.setStateFocused(true);\n\t\tadd(testStateToggleButton13, \"cell 8 3\");\n\n\t\t//---- testStateButton16 ----\n\t\ttestStateButton16.setStateHover(true);\n\t\ttestStateButton16.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\ttestStateButton16.putClientProperty(\"JButton.buttonType\", \"help\");\n\t\tadd(testStateButton16, \"cell 9 3\");\n\n\t\t//---- testStateButton20 ----\n\t\ttestStateButton20.setStateHover(true);\n\t\ttestStateButton20.setStateFocused(true);\n\t\ttestStateButton20.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\ttestStateButton20.putClientProperty(\"JButton.buttonType\", \"help\");\n\t\tadd(testStateButton20, \"cell 10 3\");\n\n\t\t//---- label3 ----\n\t\tlabel3.setText(\"pressed\");\n\t\tadd(label3, \"cell 0 4\");\n\n\t\t//---- testStateButton3 ----\n\t\ttestStateButton3.setText(\"text\");\n\t\ttestStateButton3.setStatePressed(true);\n\t\ttestStateButton3.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton3, \"cell 1 4\");\n\n\t\t//---- testStateButton9 ----\n\t\ttestStateButton9.setText(\"text\");\n\t\ttestStateButton9.setStatePressed(true);\n\t\ttestStateButton9.setStateDefault(true);\n\t\ttestStateButton9.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton9, \"cell 2 4\");\n\n\t\t//---- testStateButton6 ----\n\t\ttestStateButton6.setText(\"text\");\n\t\ttestStateButton6.setStatePressed(true);\n\t\ttestStateButton6.setStateFocused(true);\n\t\ttestStateButton6.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton6, \"cell 3 4\");\n\n\t\t//---- testStateButton12 ----\n\t\ttestStateButton12.setText(\"text\");\n\t\ttestStateButton12.setStatePressed(true);\n\t\ttestStateButton12.setStateFocused(true);\n\t\ttestStateButton12.setStateDefault(true);\n\t\ttestStateButton12.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton12, \"cell 4 4\");\n\n\t\t//---- testStateToggleButton3 ----\n\t\ttestStateToggleButton3.setText(\"text\");\n\t\ttestStateToggleButton3.setStatePressed(true);\n\t\tadd(testStateToggleButton3, \"cell 5 4\");\n\n\t\t//---- testStateToggleButton7 ----\n\t\ttestStateToggleButton7.setText(\"text\");\n\t\ttestStateToggleButton7.setStatePressed(true);\n\t\ttestStateToggleButton7.setStateSelected(true);\n\t\tadd(testStateToggleButton7, \"cell 6 4\");\n\n\t\t//---- testStateToggleButton11 ----\n\t\ttestStateToggleButton11.setText(\"text\");\n\t\ttestStateToggleButton11.setStatePressed(true);\n\t\ttestStateToggleButton11.setStateFocused(true);\n\t\tadd(testStateToggleButton11, \"cell 7 4\");\n\n\t\t//---- testStateToggleButton14 ----\n\t\ttestStateToggleButton14.setText(\"text\");\n\t\ttestStateToggleButton14.setStatePressed(true);\n\t\ttestStateToggleButton14.setStateSelected(true);\n\t\ttestStateToggleButton14.setStateFocused(true);\n\t\tadd(testStateToggleButton14, \"cell 8 4\");\n\n\t\t//---- testStateButton17 ----\n\t\ttestStateButton17.setStatePressed(true);\n\t\ttestStateButton17.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\ttestStateButton17.putClientProperty(\"JButton.buttonType\", \"help\");\n\t\tadd(testStateButton17, \"cell 9 4\");\n\n\t\t//---- testStateButton21 ----\n\t\ttestStateButton21.setStatePressed(true);\n\t\ttestStateButton21.setStateFocused(true);\n\t\ttestStateButton21.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\ttestStateButton21.putClientProperty(\"JButton.buttonType\", \"help\");\n\t\tadd(testStateButton21, \"cell 10 4\");\n\n\t\t//---- label4 ----\n\t\tlabel4.setText(\"disabled\");\n\t\tadd(label4, \"cell 0 5\");\n\n\t\t//---- testStateButton13 ----\n\t\ttestStateButton13.setText(\"text\");\n\t\ttestStateButton13.setEnabled(false);\n\t\ttestStateButton13.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton13, \"cell 1 5\");\n\n\t\t//---- testStateButton14 ----\n\t\ttestStateButton14.setText(\"text\");\n\t\ttestStateButton14.setEnabled(false);\n\t\ttestStateButton14.setStateDefault(true);\n\t\ttestStateButton14.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton14, \"cell 2 5\");\n\n\t\t//---- testStateToggleButton4 ----\n\t\ttestStateToggleButton4.setText(\"text\");\n\t\ttestStateToggleButton4.setEnabled(false);\n\t\tadd(testStateToggleButton4, \"cell 5 5\");\n\n\t\t//---- testStateToggleButton8 ----\n\t\ttestStateToggleButton8.setText(\"text\");\n\t\ttestStateToggleButton8.setEnabled(false);\n\t\ttestStateToggleButton8.setStateSelected(true);\n\t\tadd(testStateToggleButton8, \"cell 6 5\");\n\n\t\t//---- testStateButton18 ----\n\t\ttestStateButton18.setEnabled(false);\n\t\ttestStateButton18.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\ttestStateButton18.putClientProperty(\"JButton.buttonType\", \"help\");\n\t\tadd(testStateButton18, \"cell 9 5\");\n\n\t\t//---- label10 ----\n\t\tlabel10.setText(\"raw\");\n\t\tadd(label10, \"cell 0 6\");\n\n\t\t//---- button1 ----\n\t\tbutton1.setText(\"text\");\n\t\tbutton1.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(button1, \"cell 1 6\");\n\n\t\t//---- testDefaultButton1 ----\n\t\ttestDefaultButton1.setText(\"text\");\n\t\ttestDefaultButton1.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testDefaultButton1, \"cell 2 6\");\n\n\t\t//---- toggleButton1 ----\n\t\ttoggleButton1.setText(\"text\");\n\t\tadd(toggleButton1, \"cell 5 6\");\n\n\t\t//---- toggleButton2 ----\n\t\ttoggleButton2.setText(\"text\");\n\t\ttoggleButton2.setSelected(true);\n\t\tadd(toggleButton2, \"cell 6 6\");\n\n\t\t//---- button2 ----\n\t\tbutton2.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tbutton2.putClientProperty(\"JButton.buttonType\", \"help\");\n\t\tadd(button2, \"cell 9 6\");\n\t\tadd(separator1, \"cell 0 7 11 1\");\n\n\t\t//---- label22 ----\n\t\tlabel22.setText(\"JCheckBox\");\n\t\tlabel22.putClientProperty(\"FlatLaf.styleClass\", \"h3\");\n\t\tadd(label22, \"cell 1 8 2 1\");\n\n\t\t//---- label27 ----\n\t\tlabel27.setText(\"JRadioButton\");\n\t\tlabel27.putClientProperty(\"FlatLaf.styleClass\", \"h3\");\n\t\tadd(label27, \"cell 5 8 2 1\");\n\n\t\t//---- label23 ----\n\t\tlabel23.setText(\"unsel.\");\n\t\tadd(label23, \"cell 1 9\");\n\n\t\t//---- label28 ----\n\t\tlabel28.setText(\"selected\");\n\t\tadd(label28, \"cell 2 9\");\n\n\t\t//---- label24 ----\n\t\tlabel24.setText(\"focused\");\n\t\tadd(label24, \"cell 3 9\");\n\n\t\t//---- label29 ----\n\t\tlabel29.setText(\"selected\");\n\t\tadd(label29, \"cell 4 9\");\n\n\t\t//---- label25 ----\n\t\tlabel25.setText(\"unsel.\");\n\t\tadd(label25, \"cell 5 9\");\n\n\t\t//---- label30 ----\n\t\tlabel30.setText(\"selected\");\n\t\tadd(label30, \"cell 6 9\");\n\n\t\t//---- label26 ----\n\t\tlabel26.setText(\"focused\");\n\t\tadd(label26, \"cell 7 9\");\n\n\t\t//---- label31 ----\n\t\tlabel31.setText(\"selected\");\n\t\tadd(label31, \"cell 8 9\");\n\n\t\t//---- label17 ----\n\t\tlabel17.setText(\"none\");\n\t\tadd(label17, \"cell 0 10\");\n\n\t\t//---- testStateCheckBox1 ----\n\t\ttestStateCheckBox1.setText(\"text\");\n\t\tadd(testStateCheckBox1, \"cell 1 10\");\n\n\t\t//---- testStateCheckBox8 ----\n\t\ttestStateCheckBox8.setText(\"text\");\n\t\ttestStateCheckBox8.setStateSelected(true);\n\t\tadd(testStateCheckBox8, \"cell 2 10\");\n\n\t\t//---- testStateCheckBox5 ----\n\t\ttestStateCheckBox5.setText(\"text\");\n\t\ttestStateCheckBox5.setStateFocused(true);\n\t\tadd(testStateCheckBox5, \"cell 3 10\");\n\n\t\t//---- testStateCheckBox12 ----\n\t\ttestStateCheckBox12.setText(\"text\");\n\t\ttestStateCheckBox12.setStateFocused(true);\n\t\ttestStateCheckBox12.setStateSelected(true);\n\t\tadd(testStateCheckBox12, \"cell 4 10\");\n\n\t\t//---- testStateRadioButton1 ----\n\t\ttestStateRadioButton1.setText(\"text\");\n\t\tadd(testStateRadioButton1, \"cell 5 10\");\n\n\t\t//---- testStateRadioButton8 ----\n\t\ttestStateRadioButton8.setText(\"text\");\n\t\ttestStateRadioButton8.setStateSelected(true);\n\t\tadd(testStateRadioButton8, \"cell 6 10\");\n\n\t\t//---- testStateRadioButton5 ----\n\t\ttestStateRadioButton5.setText(\"text\");\n\t\ttestStateRadioButton5.setStateFocused(true);\n\t\tadd(testStateRadioButton5, \"cell 7 10\");\n\n\t\t//---- testStateRadioButton9 ----\n\t\ttestStateRadioButton9.setText(\"text\");\n\t\ttestStateRadioButton9.setStateFocused(true);\n\t\ttestStateRadioButton9.setStateSelected(true);\n\t\tadd(testStateRadioButton9, \"cell 8 10\");\n\n\t\t//---- label18 ----\n\t\tlabel18.setText(\"hover\");\n\t\tadd(label18, \"cell 0 11\");\n\n\t\t//---- testStateCheckBox2 ----\n\t\ttestStateCheckBox2.setText(\"text\");\n\t\ttestStateCheckBox2.setStateHover(true);\n\t\tadd(testStateCheckBox2, \"cell 1 11\");\n\n\t\t//---- testStateCheckBox9 ----\n\t\ttestStateCheckBox9.setText(\"text\");\n\t\ttestStateCheckBox9.setStateHover(true);\n\t\ttestStateCheckBox9.setStateSelected(true);\n\t\tadd(testStateCheckBox9, \"cell 2 11\");\n\n\t\t//---- testStateCheckBox6 ----\n\t\ttestStateCheckBox6.setText(\"text\");\n\t\ttestStateCheckBox6.setStateFocused(true);\n\t\ttestStateCheckBox6.setStateHover(true);\n\t\tadd(testStateCheckBox6, \"cell 3 11\");\n\n\t\t//---- testStateCheckBox13 ----\n\t\ttestStateCheckBox13.setText(\"text\");\n\t\ttestStateCheckBox13.setStateFocused(true);\n\t\ttestStateCheckBox13.setStateHover(true);\n\t\ttestStateCheckBox13.setStateSelected(true);\n\t\tadd(testStateCheckBox13, \"cell 4 11\");\n\n\t\t//---- testStateRadioButton2 ----\n\t\ttestStateRadioButton2.setText(\"text\");\n\t\ttestStateRadioButton2.setStateHover(true);\n\t\tadd(testStateRadioButton2, \"cell 5 11\");\n\n\t\t//---- testStateRadioButton10 ----\n\t\ttestStateRadioButton10.setText(\"text\");\n\t\ttestStateRadioButton10.setStateHover(true);\n\t\ttestStateRadioButton10.setStateSelected(true);\n\t\tadd(testStateRadioButton10, \"cell 6 11\");\n\n\t\t//---- testStateRadioButton6 ----\n\t\ttestStateRadioButton6.setText(\"text\");\n\t\ttestStateRadioButton6.setStateFocused(true);\n\t\ttestStateRadioButton6.setStateHover(true);\n\t\tadd(testStateRadioButton6, \"cell 7 11\");\n\n\t\t//---- testStateRadioButton11 ----\n\t\ttestStateRadioButton11.setText(\"text\");\n\t\ttestStateRadioButton11.setStateFocused(true);\n\t\ttestStateRadioButton11.setStateHover(true);\n\t\ttestStateRadioButton11.setStateSelected(true);\n\t\tadd(testStateRadioButton11, \"cell 8 11\");\n\n\t\t//---- label19 ----\n\t\tlabel19.setText(\"pressed\");\n\t\tadd(label19, \"cell 0 12\");\n\n\t\t//---- testStateCheckBox3 ----\n\t\ttestStateCheckBox3.setText(\"text\");\n\t\ttestStateCheckBox3.setStatePressed(true);\n\t\tadd(testStateCheckBox3, \"cell 1 12\");\n\n\t\t//---- testStateCheckBox10 ----\n\t\ttestStateCheckBox10.setText(\"text\");\n\t\ttestStateCheckBox10.setStatePressed(true);\n\t\ttestStateCheckBox10.setStateSelected(true);\n\t\tadd(testStateCheckBox10, \"cell 2 12\");\n\n\t\t//---- testStateCheckBox7 ----\n\t\ttestStateCheckBox7.setText(\"text\");\n\t\ttestStateCheckBox7.setStateFocused(true);\n\t\ttestStateCheckBox7.setStatePressed(true);\n\t\tadd(testStateCheckBox7, \"cell 3 12\");\n\n\t\t//---- testStateCheckBox14 ----\n\t\ttestStateCheckBox14.setText(\"text\");\n\t\ttestStateCheckBox14.setStateFocused(true);\n\t\ttestStateCheckBox14.setStatePressed(true);\n\t\ttestStateCheckBox14.setStateSelected(true);\n\t\tadd(testStateCheckBox14, \"cell 4 12\");\n\n\t\t//---- testStateRadioButton3 ----\n\t\ttestStateRadioButton3.setText(\"text\");\n\t\ttestStateRadioButton3.setStatePressed(true);\n\t\tadd(testStateRadioButton3, \"cell 5 12\");\n\n\t\t//---- testStateRadioButton12 ----\n\t\ttestStateRadioButton12.setText(\"text\");\n\t\ttestStateRadioButton12.setStatePressed(true);\n\t\ttestStateRadioButton12.setStateSelected(true);\n\t\tadd(testStateRadioButton12, \"cell 6 12\");\n\n\t\t//---- testStateRadioButton7 ----\n\t\ttestStateRadioButton7.setText(\"text\");\n\t\ttestStateRadioButton7.setStateFocused(true);\n\t\ttestStateRadioButton7.setStatePressed(true);\n\t\tadd(testStateRadioButton7, \"cell 7 12\");\n\n\t\t//---- testStateRadioButton13 ----\n\t\ttestStateRadioButton13.setText(\"text\");\n\t\ttestStateRadioButton13.setStateFocused(true);\n\t\ttestStateRadioButton13.setStatePressed(true);\n\t\ttestStateRadioButton13.setStateSelected(true);\n\t\tadd(testStateRadioButton13, \"cell 8 12\");\n\n\t\t//---- label20 ----\n\t\tlabel20.setText(\"disabled\");\n\t\tadd(label20, \"cell 0 13\");\n\n\t\t//---- testStateCheckBox4 ----\n\t\ttestStateCheckBox4.setText(\"text\");\n\t\ttestStateCheckBox4.setEnabled(false);\n\t\tadd(testStateCheckBox4, \"cell 1 13\");\n\n\t\t//---- testStateCheckBox11 ----\n\t\ttestStateCheckBox11.setText(\"text\");\n\t\ttestStateCheckBox11.setEnabled(false);\n\t\ttestStateCheckBox11.setStateSelected(true);\n\t\tadd(testStateCheckBox11, \"cell 2 13\");\n\n\t\t//---- testStateRadioButton4 ----\n\t\ttestStateRadioButton4.setText(\"text\");\n\t\ttestStateRadioButton4.setEnabled(false);\n\t\tadd(testStateRadioButton4, \"cell 5 13\");\n\n\t\t//---- testStateRadioButton14 ----\n\t\ttestStateRadioButton14.setText(\"text\");\n\t\ttestStateRadioButton14.setEnabled(false);\n\t\ttestStateRadioButton14.setStateSelected(true);\n\t\tadd(testStateRadioButton14, \"cell 6 13\");\n\n\t\t//---- label21 ----\n\t\tlabel21.setText(\"raw\");\n\t\tadd(label21, \"cell 0 14\");\n\n\t\t//---- checkBox1 ----\n\t\tcheckBox1.setText(\"text\");\n\t\tadd(checkBox1, \"cell 1 14\");\n\n\t\t//---- checkBox2 ----\n\t\tcheckBox2.setText(\"text\");\n\t\tcheckBox2.setSelected(true);\n\t\tadd(checkBox2, \"cell 2 14\");\n\n\t\t//---- radioButton1 ----\n\t\tradioButton1.setText(\"text\");\n\t\tadd(radioButton1, \"cell 5 14\");\n\n\t\t//---- radioButton2 ----\n\t\tradioButton2.setText(\"text\");\n\t\tradioButton2.setSelected(true);\n\t\tadd(radioButton2, \"cell 6 14\");\n\t\tadd(separator2, \"cell 0 15 11 1\");\n\n\t\t//---- label35 ----\n\t\tlabel35.setText(\"JTextField\");\n\t\tadd(label35, \"cell 0 16\");\n\t\tadd(textField1, \"cell 1 16 2 1\");\n\t\tadd(textField2, \"cell 3 16 2 1\");\n\n\t\t//---- label38 ----\n\t\tlabel38.setText(\"JComboBox\");\n\t\tadd(label38, \"cell 0 17\");\n\t\tadd(comboBox1, \"cell 1 17 2 1\");\n\t\tadd(comboBox2, \"cell 3 17 2 1\");\n\t\t// JFormDesigner - End of component initialization //GEN-END:initComponents\n\t}", "public void doChanges2() {\n lm.undo(changeMark, lm.getChangeMark());\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 113, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(41, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n lc = new LayoutComponent(\"jLabel4\", false);\n // > START ADDING\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n {\n LayoutComponent[] comps = new LayoutComponent[]{lc};\n Rectangle[] bounds = new Rectangle[]{new Rectangle(0, 0, 34, 14)};\n String defaultContId = null;\n Point hotspot = new Point(13, 7);\n ld.startAdding(comps, bounds, hotspot, defaultContId);\n }\n // < START ADDING\n prefPaddingInParent.put(\"Form-jLabel4-1-0\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel4-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jTextField1-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField1-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField1-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField1-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton1-jLabel4-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jRadioButton1-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton2-jLabel4-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jRadioButton2-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel1-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPaddingInParent.put(\"Form-jLabel4-0-0\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel4-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jScrollPane1-jLabel4-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jScrollPane1-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jScrollPane1-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jScrollPane1-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jScrollPane1-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField2-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel4-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(59, 120);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(39, 116, 34, 14)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n prefPaddingInParent.put(\"Form-jLabel4-1-0\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel4-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jTextField1-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField1-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField1-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField1-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton1-jLabel4-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jRadioButton1-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton2-jLabel4-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jRadioButton2-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel1-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPaddingInParent.put(\"Form-jLabel4-0-0\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel4-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jScrollPane1-jLabel4-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jScrollPane1-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jScrollPane1-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jScrollPane1-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jScrollPane1-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel4-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jTextField2-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel4-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(60, 120);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(41, 116, 34, 14)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n // > END MOVING\n compPrefSize.put(\"jLabel4\", new Dimension(34, 14));\n ld.endMoving(true);\n // < END MOVING\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(77, 113, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n prefPaddingInParent.put(\"Form-jRadioButton1-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jRadioButton2-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel3-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jRadioButton1\", new Dimension(93, 23));\n compPrefSize.put(\"jRadioButton2\", new Dimension(93, 23));\n compPrefSize.put(\"jScrollPane1\", new Dimension(35, 130));\n compPrefSize.put(\"jLabel1\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel2\", new Dimension(34, 14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n compPrefSize.put(\"jLabel3\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel4\", new Dimension(34, 14));\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(77, 113, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n changeMark = lm.getChangeMark();\n // > START RESIZING\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n {\n String[] compIds = new String[]{\"jTextField2\"};\n Rectangle[] bounds = new Rectangle[]{new Rectangle(77, 113, 59, 20)};\n Point hotspot = new Point(135, 120);\n int[] resizeEdges = new int[]{1, -1};\n boolean inLayout = true;\n ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout);\n }\n // < START RESIZING\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(397, 141);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(77, 113, 323, 20)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(398, 141);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(77, 113, 323, 20)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n // > END MOVING\n ld.endMoving(true);\n // < END MOVING\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(77, 113, 323, 20));\n baselinePosition.put(\"jTextField2-323-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n prefPaddingInParent.put(\"Form-jRadioButton1-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jRadioButton2-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jRadioButton1\", new Dimension(93, 23));\n compPrefSize.put(\"jRadioButton2\", new Dimension(93, 23));\n compPrefSize.put(\"jScrollPane1\", new Dimension(35, 130));\n compPrefSize.put(\"jLabel1\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel2\", new Dimension(34, 14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n compPrefSize.put(\"jLabel3\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel4\", new Dimension(34, 14));\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(77, 113, 323, 20));\n baselinePosition.put(\"jTextField2-323-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n }", "public void doChanges3() {\n lm.undo(changeMark, lm.getChangeMark());\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(77, 113, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n lc = new LayoutComponent(\"jLabel5\", false);\n // > START ADDING\n baselinePosition.put(\"jLabel5-34-14\", new Integer(11));\n {\n LayoutComponent[] comps = new LayoutComponent[]{lc};\n Rectangle[] bounds = new Rectangle[]{new Rectangle(0, 0, 34, 14)};\n String defaultContId = null;\n Point hotspot = new Point(13, 7);\n ld.startAdding(comps, bounds, hotspot, defaultContId);\n }\n // < START ADDING\n prefPaddingInParent.put(\"Form-jLabel5-1-0\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel5-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jTextField1-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField1-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField1-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField1-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton1-jLabel5-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jRadioButton1-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton2-jLabel5-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jRadioButton2-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel1-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPaddingInParent.put(\"Form-jLabel5-0-0\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel5-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jScrollPane1-jLabel5-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jScrollPane1-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jScrollPane1-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jScrollPane1-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jScrollPane1-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel4-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField2-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel5-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(72, 125);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(59, 116, 34, 14)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n prefPaddingInParent.put(\"Form-jLabel5-1-0\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel5-1-1\", new Integer(11)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jTextField1-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField1-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField1-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField1-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton1-jLabel5-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jRadioButton1-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jRadioButton2-jLabel5-1-0-0\", new Integer(2)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jRadioButton2-1-0-1\", new Integer(7)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel1-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel2-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel1-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel3-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-1-0-1\", new Integer(11)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-1-0-2\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-1-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField2-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel4-1-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPaddingInParent.put(\"Form-jLabel5-0-0\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel5-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPadding.put(\"jScrollPane1-jLabel5-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jScrollPane1-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jScrollPane1-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jScrollPane1-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jScrollPane1-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel4-jLabel5-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jLabel4-0-0-0\", new Integer(6)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-0-0-1\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jTextField2-jLabel5-0-0-3\", new Integer(18)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel5-jTextField2-0-0-0\", new Integer(4)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n prefPadding.put(\"jLabel3-jLabel5-0-0-2\", new Integer(10)); // comp1Id-comp2Id-dimension-comp2Alignment-paddingType\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(73, 125);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(60, 116, 34, 14)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n // > END MOVING\n compPrefSize.put(\"jLabel5\", new Dimension(34, 14));\n ld.endMoving(true);\n // < END MOVING\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(117, 113, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n compBounds.put(\"jLabel5\", new Rectangle(79, 116, 34, 14));\n baselinePosition.put(\"jLabel5-34-14\", new Integer(11));\n prefPaddingInParent.put(\"Form-jRadioButton1-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jRadioButton2-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel3-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jLabel2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jRadioButton1\", new Dimension(93, 23));\n compPrefSize.put(\"jRadioButton2\", new Dimension(93, 23));\n compPrefSize.put(\"jScrollPane1\", new Dimension(35, 130));\n compPrefSize.put(\"jLabel1\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel2\", new Dimension(34, 14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n compPrefSize.put(\"jLabel3\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel4\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel5\", new Dimension(34, 14));\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(117, 113, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n compBounds.put(\"jLabel5\", new Rectangle(79, 116, 34, 14));\n baselinePosition.put(\"jLabel5-34-14\", new Integer(11));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n // > START RESIZING\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n {\n String[] compIds = new String[]{\"jTextField2\"};\n Rectangle[] bounds = new Rectangle[]{new Rectangle(117, 113, 59, 20)};\n Point hotspot = new Point(175, 125);\n int[] resizeEdges = new int[]{1, -1};\n boolean inLayout = true;\n ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout);\n }\n // < START RESIZING\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(398, 137);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(117, 113, 283, 20)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(399, 137);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(117, 113, 283, 20)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n // > END MOVING\n ld.endMoving(true);\n // < END MOVING\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(117, 113, 283, 20));\n baselinePosition.put(\"jTextField2-283-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n compBounds.put(\"jLabel5\", new Rectangle(79, 116, 34, 14));\n baselinePosition.put(\"jLabel5-34-14\", new Integer(11));\n prefPaddingInParent.put(\"Form-jRadioButton1-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jRadioButton2-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jRadioButton1\", new Dimension(93, 23));\n compPrefSize.put(\"jRadioButton2\", new Dimension(93, 23));\n compPrefSize.put(\"jScrollPane1\", new Dimension(35, 130));\n compPrefSize.put(\"jLabel1\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel2\", new Dimension(34, 14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n compPrefSize.put(\"jLabel3\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel4\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel5\", new Dimension(34, 14));\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(39, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(79, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(117, 113, 283, 20));\n baselinePosition.put(\"jTextField2-283-20\", new Integer(14));\n compBounds.put(\"jLabel3\", new Rectangle(39, 93, 34, 14));\n baselinePosition.put(\"jLabel3-34-14\", new Integer(11));\n compBounds.put(\"jLabel4\", new Rectangle(39, 116, 34, 14));\n baselinePosition.put(\"jLabel4-34-14\", new Integer(11));\n compBounds.put(\"jLabel5\", new Rectangle(79, 116, 34, 14));\n baselinePosition.put(\"jLabel5-34-14\", new Integer(11));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n }", "@Override\n\tpublic void stateChanged() {\n\t\t\n\t}", "@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tupdateUI();\n\t\t\t\t\t\t}", "private void setUIFields(){\n setImage();\n setTitle();\n setLocation();\n setRatingBar();\n setDate();\n setISBN();\n setDescription();\n setPageCount();\n setNumRatings();\n }", "private void updateUi(final BoxItem sharedItem){\n if (!checkIfHasRequiredFields(sharedItem)){\n refreshShareItemInfo();\n return;\n }\n if (getMainItem().getId().equals(sharedItem.getId())) {\n setMainItem(sharedItem);\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n setupUi();\n }\n });\n }\n }", "public void refreshState() {\n if (this.currentPost != null) {\n postId = this.currentPost.getId();\n this.currentPost = ctrl.getPost(postId);\n }\n if (this.currentUser != null) {\n username = this.currentUser.getUsername();\n this.currentUser = ctrl.getSystemUser(username);\n }\n this.postList = ctrl.getPostList();\n this.userList = ctrl.getUserList();\n\n inputTextNumber = 0;\n //ctrl.refreshState();\n }", "public void update()\n\t{\n\t\tGViewMapManager gViewMapManager = this.guiController.getCurrentStyleMapManager();\n\t\tLayout layout = gViewMapManager.getLayout();\n\n\t\tswitch (layout)\n\t\t{\n\t\t\tcase LINEAR:\n\t\t\t\tthis.linear.setSelected(true);\n\t\t\t\tbreak;\n\t\t\tcase CIRCULAR:\n\t\t\t\tthis.circular.setSelected(true);\n\t\t\t\tbreak;\n default:\n break;\n\t\t}\n\t}", "public void UpdateCommandsUI(){\n Button B;\n try{\n for (int i = 0; i < f.getNumComp(); i++) {\n B = (Button) findViewById(300000 + i); //Buy Button\n if(dayOpen & (p.getMoney()>0)) {\n B.setEnabled(true);\n B.setTextColor(0xffffffff);\n } else if(dayOpen & (p.getLevel()>= 4)){\n B.setEnabled(true);\n B.setTextColor(0xffff0000);\n } else {\n B.setEnabled(false);\n B.setTextColor(0xff000000);\n }\n\n B = (Button) findViewById(400000 + i); //Sell Button\n if (dayOpen & (f.getSharesOwned(i) > 0)) {\n B.setEnabled(true);\n B.setTextColor(0xffffffff);\n } else if(p.getLevel()>=4 & !f.isShorted(i) & dayOpen){\n B.setEnabled(true);\n B.setTextColor(0xffff0000); //Red Color for short positions\n } else {\n B.setEnabled(false);\n B.setTextColor(0xff000000);\n }\n }\n } catch (Exception e){\n e.printStackTrace();\n }\n }", "private void updateSubModeSpinnerTexts() {\n\n }", "private void updateUI() {\n// if (mCurrentLocation != null) {\n// mLatitudeTextView.setText(String.valueOf(mCurrentLocation.getLatitude()));\n// mLongitudeTextView.setText(String.valueOf(mCurrentLocation.getLongitude()));\n// mLastUpdateTimeTextView.setText(mLastUpdateTime);\n// }\n }", "@Override\r\n\tpublic void update() {\n\t\tif (globalState != null) globalState.update(owner);\r\n\t\t\r\n\t\t// Execute the current state (if any)\r\n\t\tif (currentState != null && newStateEntered) currentState.update(owner);\r\n\t}", "private void update()\n {\n // update the grid square panels\n Component[] components = pnlIsland.getComponents();\n for ( Component c : components )\n {\n // all components in the panel are GridSquarePanels,\n // so we can safely cast\n GridSquarePanel gsp = (GridSquarePanel) c;\n gsp.update();\n }\n \n // update player information\n int[] playerValues = game.getPlayerValues();\n txtPlayerName.setText(game.getPlayerName());\n progPlayerStamina.setMaximum(playerValues[Game.MAXSTAMINA_INDEX]);\n progPlayerStamina.setValue(playerValues[Game.STAMINA_INDEX]);\n progBackpackWeight.setMaximum(playerValues[Game.MAXWEIGHT_INDEX]);\n progBackpackWeight.setValue(playerValues[Game.WEIGHT_INDEX]);\n progBackpackSize.setMaximum(playerValues[Game.MAXSIZE_INDEX]);\n progBackpackSize.setValue(playerValues[Game.SIZE_INDEX]);\n \n //Update Kiwi and Predator information\n txtKiwisCounted.setText(Integer.toString(game.getKiwiCount()) );\n txtPredatorsLeft.setText(Integer.toString(game.getPredatorsRemaining()));\n \n // update inventory list\n listInventory.setListData(game.getPlayerInventory());\n listInventory.clearSelection();\n listInventory.setToolTipText(null);\n btnUse.setEnabled(false);\n btnDrop.setEnabled(false);\n \n // update list of visible objects\n listObjects.setListData(game.getOccupantsPlayerPosition());\n listObjects.clearSelection();\n listObjects.setToolTipText(null);\n btnCollect.setEnabled(false);\n btnCount.setEnabled(false);\n \n // update movement buttons\n btnMoveNorth.setEnabled(game.isPlayerMovePossible(MoveDirection.NORTH));\n btnMoveEast.setEnabled( game.isPlayerMovePossible(MoveDirection.EAST));\n btnMoveSouth.setEnabled(game.isPlayerMovePossible(MoveDirection.SOUTH));\n btnMoveWest.setEnabled( game.isPlayerMovePossible(MoveDirection.WEST));\n }", "@Override\n\t\t\tpublic void stateChanged() {\n\t\t\t\tclearUi();\n\t\t\t\tmakeUserContentPanel(panel);\n\t\t\t\t\n\t\t\t}", "private void initializeProblemState()\r\n {\r\n\r\n problemState = new JTextArea(problem.getCurrentState().toString());\r\n problemState.setFont(new Font(Font.MONOSPACED, Font.BOLD, 24));\r\n finalProblemState = new JTextArea(problem.getFinalState().toString());\r\n finalProblemState.setFont(problemState.getFont());\r\n finalStateLabel.setBorder(new TitledBorder(\"Final State\"));\r\n finalStateLabel.setLayout(new FlowLayout());\r\n stateLabel.setBorder(new TitledBorder(\"Current State\"));\r\n stateLabel.setLayout(new FlowLayout());\r\n\r\n if (canvas != null)\r\n {\r\n stateLabel.add(canvas);\r\n canvas.render();\r\n stateLabel.setPreferredSize(new Dimension(canvas.getPreferredSize().width\r\n + DEFAULT_BUTTON_SPACING * 5,\r\n canvas.getPreferredSize().height + DEFAULT_BUTTON_SPACING * 5\r\n ));\r\n } else\r\n {\r\n stateLabel.add(problemState);\r\n stateLabel.setPreferredSize(new Dimension(problemState.getPreferredSize().width\r\n + (problemState.getFont().getSize() / 2),\r\n problemState.getPreferredSize().height + problemState.getFont().getSize() * 5 / 4));\r\n }\r\n if (finalStateCanvas != null)\r\n {\r\n finalStateLabel.add(finalStateCanvas);\r\n finalStateCanvas.render();\r\n finalStateLabel.setPreferredSize(stateLabel.getPreferredSize());\r\n } else\r\n {\r\n finalStateLabel.add(finalProblemState);\r\n finalStateLabel.setPreferredSize(stateLabel.getPreferredSize());\r\n }\r\n }", "private void updateStateUiAfterSelection() {\n stageManager.updateStateUi();\n eventBus.publish(EventTopic.DEFAULT, EventType.SELECTED_OBJECT_CHANGED);\n eventManager.fireEvent(EngineEventType.SELECTED_OBJECT_CHANGED);\n }", "@Override\n\tprotected void setValueOnUi() {\n\n\t}", "public void doChanges0() {\n lm.setChangeRecording(true);\n changeMark = lm.getChangeMark();\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 93, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jRadioButton1\", new Dimension(93, 23));\n compPrefSize.put(\"jRadioButton2\", new Dimension(93, 23));\n compPrefSize.put(\"jScrollPane1\", new Dimension(35, 130));\n compPrefSize.put(\"jLabel1\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel2\", new Dimension(34, 14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 93, 59, 20));\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n // > START RESIZING\n baselinePosition.put(\"jTextField2-59-20\", new Integer(14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n {\n String[] compIds = new String[]{\"jTextField2\"};\n Rectangle[] bounds = new Rectangle[]{new Rectangle(41, 93, 59, 20)};\n Point hotspot = new Point(102, 106);\n int[] resizeEdges = new int[]{1, -1};\n boolean inLayout = true;\n ld.startResizing(compIds, bounds, hotspot, resizeEdges, inLayout);\n }\n // < START RESIZING\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(399, 128);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(41, 93, 359, 20)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n prefPaddingInParent.put(\"Form-jTextField2-0-1\", new Integer(10)); // parentId-compId-dimension-compAlignment\n // > MOVE\n // > MOVE\n // > MOVE\n {\n Point p = new Point(400, 128);\n String containerId = \"Form\";\n boolean autoPositioning = true;\n boolean lockDimension = false;\n Rectangle[] bounds = new Rectangle[]{new Rectangle(41, 93, 359, 20)};\n ld.move(p, containerId, autoPositioning, lockDimension, bounds);\n }\n // < MOVE\n // > END MOVING\n ld.endMoving(true);\n // < END MOVING\n ld.externalSizeChangeHappened();\n // > UPDATE CURRENT STATE\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 93, 359, 20));\n baselinePosition.put(\"jTextField2-359-20\", new Integer(14));\n prefPaddingInParent.put(\"Form-jRadioButton1-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n prefPaddingInParent.put(\"Form-jRadioButton2-0-1\", new Integer(6)); // parentId-compId-dimension-compAlignment\n compPrefSize.put(\"jTextField1\", new Dimension(59, 20));\n compPrefSize.put(\"jRadioButton1\", new Dimension(93, 23));\n compPrefSize.put(\"jRadioButton2\", new Dimension(93, 23));\n compPrefSize.put(\"jScrollPane1\", new Dimension(35, 130));\n compPrefSize.put(\"jLabel1\", new Dimension(34, 14));\n compPrefSize.put(\"jLabel2\", new Dimension(34, 14));\n compPrefSize.put(\"jTextField2\", new Dimension(59, 20));\n contInterior.put(\"Form\", new Rectangle(0, 0, 400, 300));\n compBounds.put(\"jTextField1\", new Rectangle(0, 0, 400, 20));\n baselinePosition.put(\"jTextField1-400-20\", new Integer(14));\n compBounds.put(\"jRadioButton1\", new Rectangle(0, 22, 93, 23));\n baselinePosition.put(\"jRadioButton1-93-23\", new Integer(15));\n compBounds.put(\"jRadioButton2\", new Rectangle(0, 48, 93, 23));\n baselinePosition.put(\"jRadioButton2-93-23\", new Integer(15));\n compBounds.put(\"jScrollPane1\", new Rectangle(0, 73, 35, 130));\n baselinePosition.put(\"jScrollPane1-35-130\", new Integer(0));\n compBounds.put(\"jLabel1\", new Rectangle(41, 73, 34, 14));\n baselinePosition.put(\"jLabel1-34-14\", new Integer(11));\n compBounds.put(\"jLabel2\", new Rectangle(81, 73, 34, 14));\n baselinePosition.put(\"jLabel2-34-14\", new Integer(11));\n compBounds.put(\"jTextField2\", new Rectangle(41, 93, 359, 20));\n baselinePosition.put(\"jTextField2-359-20\", new Integer(14));\n ld.updateCurrentState();\n // < UPDATE CURRENT STATE\n }", "public void refreshState(){\n\t\tswitch(state){\n\t\tcase LOGINID:\n\t\t\tloginMenu();\n\t\t\tbreak;\n\t\tcase LOGINPIN:\n\t\t\tloginPin();\n\t\t\tbreak;\n\t\tcase TRANSACTION:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase DEPOSIT:\n\t\t\tdepositMenu();\n\t\t\tbreak;\n\t\tcase DEPOSITNOTIFICATION:\n\t\t\tdepositMenu();\n\t\t\tbreak;\n\t\tcase WITHDRAW:\n\t\t\twithdrawalMenu();\n\t\t\tbreak;\n\t\tcase BALANCE:\n\t\t\tbalanceMenu();\n\t\t\tbreak;\n\t\tcase WITHDRAWALNOTIFICATION:\n\t\t\tbalanceMenu();\n\t\t\tbreak;\n\t\t}\n\t}", "public void UI_Refresh ()\r\n\t{\r\n\t\tUI_RefreshSensorData ();\r\n\t\tUI_RefreshConnStatus ();\r\n\t}", "private void initUI() {\r\n\t\tthis.form = new XdevGridLayout();\r\n\t\tthis.comboBoxState = new XdevComboBox<>();\r\n\t\tthis.lblSbxValidFrom = new XdevLabel();\r\n\t\tthis.dateSbxValidFrom = new XdevPopupDateField();\r\n\t\tthis.lblSbxAgeStartYear = new XdevLabel();\r\n\t\tthis.txtSbxAgeStartYear = new XdevTextField();\r\n\t\tthis.lblSbxCompany = new XdevLabel();\r\n\t\tthis.txtSbxCompany = new XdevTextField();\r\n\t\tthis.lblSbxWorker = new XdevLabel();\r\n\t\tthis.txtSbxWorker = new XdevTextField();\r\n\t\tthis.lblSbxState = new XdevLabel();\r\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\r\n\t\tthis.cmdSave = new XdevButton();\r\n\t\tthis.cmdClose = new XdevButton();\r\n\t\tthis.fieldGroup = new XdevFieldGroup<>(SalaryBvgBaseLine.class);\r\n\t\r\n\t\tthis.lblSbxValidFrom.setValue(\"Gültig ab\");\r\n\t\tthis.dateSbxValidFrom.setTabIndex(2);\r\n\t\tthis.lblSbxAgeStartYear.setValue(\"Alter ab\");\r\n\t\tthis.txtSbxAgeStartYear.setTabIndex(3);\r\n\t\tthis.lblSbxCompany.setValue(\"Arbeitgeber %\");\r\n\t\tthis.txtSbxCompany.setConverter(ConverterBuilder.stringToDouble().build());\r\n\t\tthis.txtSbxCompany.setTabIndex(4);\r\n\t\tthis.lblSbxWorker.setValue(\"Arbeitnehmer %\");\r\n\t\tthis.txtSbxWorker.setConverter(ConverterBuilder.stringToDouble().build());\r\n\t\tthis.txtSbxWorker.setTabIndex(5);\r\n\t\tthis.lblSbxState.setValue(\"Status\");\r\n\t\tthis.horizontalLayout.setMargin(new MarginInfo(false));\r\n\t\tthis.cmdSave.setIcon(FontAwesome.SAVE);\r\n\t\tthis.cmdSave.setCaption(\"Speichern\");\r\n\t\tthis.cmdSave.setTabIndex(8);\r\n\t\tthis.cmdSave.setClickShortcut(ShortcutAction.KeyCode.ENTER);\r\n\t\tthis.cmdClose.setIcon(FontAwesome.CLOSE);\r\n\t\tthis.cmdClose.setCaption(\"Schliessen\");\r\n\t\tthis.cmdClose.setClickShortcut(ShortcutAction.KeyCode.ESCAPE);\r\n\t\tthis.fieldGroup.bind(this.dateSbxValidFrom, SalaryBvgBaseLine_.sbxValidFrom.getName());\r\n\t\tthis.fieldGroup.bind(this.txtSbxAgeStartYear, SalaryBvgBaseLine_.sbxAgeStartYear.getName());\r\n\t\tthis.fieldGroup.bind(this.txtSbxCompany, SalaryBvgBaseLine_.sbxCompany.getName());\r\n\t\tthis.fieldGroup.bind(this.txtSbxWorker, SalaryBvgBaseLine_.sbxWorker.getName());\r\n\t\tthis.fieldGroup.bind(this.comboBoxState, SalaryBvgBaseLine_.sbxState.getName());\r\n\t\r\n\t\tthis.cmdSave.setSizeUndefined();\r\n\t\tthis.horizontalLayout.addComponent(this.cmdSave);\r\n\t\tthis.horizontalLayout.setComponentAlignment(this.cmdSave, Alignment.MIDDLE_LEFT);\r\n\t\tthis.cmdClose.setSizeUndefined();\r\n\t\tthis.horizontalLayout.addComponent(this.cmdClose);\r\n\t\tthis.horizontalLayout.setComponentAlignment(this.cmdClose, Alignment.MIDDLE_LEFT);\r\n\t\tthis.form.setColumns(2);\r\n\t\tthis.form.setRows(7);\r\n\t\tthis.comboBoxState.setSizeUndefined();\r\n\t\tthis.form.addComponent(this.comboBoxState, 1, 4);\r\n\t\tthis.lblSbxValidFrom.setSizeUndefined();\r\n\t\tthis.form.addComponent(this.lblSbxValidFrom, 0, 0);\r\n\t\tthis.dateSbxValidFrom.setSizeUndefined();\r\n\t\tthis.form.addComponent(this.dateSbxValidFrom, 1, 0);\r\n\t\tthis.lblSbxAgeStartYear.setSizeUndefined();\r\n\t\tthis.form.addComponent(this.lblSbxAgeStartYear, 0, 1);\r\n\t\tthis.txtSbxAgeStartYear.setWidth(100, Unit.PERCENTAGE);\r\n\t\tthis.txtSbxAgeStartYear.setHeight(-1, Unit.PIXELS);\r\n\t\tthis.form.addComponent(this.txtSbxAgeStartYear, 1, 1);\r\n\t\tthis.lblSbxCompany.setSizeUndefined();\r\n\t\tthis.form.addComponent(this.lblSbxCompany, 0, 2);\r\n\t\tthis.txtSbxCompany.setWidth(100, Unit.PERCENTAGE);\r\n\t\tthis.txtSbxCompany.setHeight(-1, Unit.PIXELS);\r\n\t\tthis.form.addComponent(this.txtSbxCompany, 1, 2);\r\n\t\tthis.lblSbxWorker.setSizeUndefined();\r\n\t\tthis.form.addComponent(this.lblSbxWorker, 0, 3);\r\n\t\tthis.txtSbxWorker.setWidth(100, Unit.PERCENTAGE);\r\n\t\tthis.txtSbxWorker.setHeight(-1, Unit.PIXELS);\r\n\t\tthis.form.addComponent(this.txtSbxWorker, 1, 3);\r\n\t\tthis.lblSbxState.setSizeUndefined();\r\n\t\tthis.form.addComponent(this.lblSbxState, 0, 4);\r\n\t\tthis.horizontalLayout.setSizeUndefined();\r\n\t\tthis.form.addComponent(this.horizontalLayout, 0, 5, 1, 5);\r\n\t\tthis.form.setComponentAlignment(this.horizontalLayout, Alignment.TOP_CENTER);\r\n\t\tthis.form.setColumnExpandRatio(1, 100.0F);\r\n\t\tfinal CustomComponent form_vSpacer = new CustomComponent();\r\n\t\tform_vSpacer.setSizeFull();\r\n\t\tthis.form.addComponent(form_vSpacer, 0, 6, 1, 6);\r\n\t\tthis.form.setRowExpandRatio(6, 1.0F);\r\n\t\tthis.form.setSizeFull();\r\n\t\tthis.setContent(this.form);\r\n\t\tthis.setSizeFull();\r\n\t\r\n\t\tthis.cmdSave.addClickListener(event -> this.cmdSave_buttonClick(event));\r\n\t\tthis.cmdClose.addClickListener(event -> this.cmdClose_buttonClick(event));\r\n\t}", "public X updateUI() {\n component.updateUI();\n return (X) this;\n }", "private void initGUI() {\n statusLabel = new JLabel();\n add(statusLabel);\n updateStatus();\n }", "public void updateView()\n {\n int selectionCount = selection.getElementSelectionCount();\n\n // If only one item selected, enable & update the\n // text boxes and pull downs with values.\n if (selectionCount == 1) {\n // preserve selected state if a whole text field is selected\n Text text = WindowUtil.getFocusedText();\n boolean restoreSel = false;\n if ((text != null) &&\n (text.getSelectionCount() == text.getCharCount()))\n {\n restoreSel = true;\n }\n\n // get the selected item\n Iterator<FrameElement> iter =\n selection.getSelectedElementsIterator();\n\n // For each selected object, which there is only one.\n FrameElement elt = iter.next();\n\n if (elt instanceof IWidget) {\n IWidget widget = (IWidget) elt;\n\n view.useParameters(FrameEditorView.USE_SINGLE_SELECT);\n view.updateWidgetProperties(widget);\n }\n else if (elt instanceof FrameElementGroup) {\n FrameElementGroup eltGroup = (FrameElementGroup) elt;\n\n view.useParameters(FrameEditorView.USE_GROUP_SELECT);\n view.updateEltGroupProperties(eltGroup);\n }\n\n // Restore the selection state\n if (restoreSel) {\n text.selectAll();\n }\n }\n else if (selectionCount > 1) {\n // TODO: on multi selection, some values are left enabled\n // We need to set these to something or disable them.\n view.useParameters(FrameEditorView.USE_MULTI_SELECT);\n }\n else {\n view.useParameters(FrameEditorView.USE_NONE);\n view.updateFrameProperties(frame, false);\n }\n }" ]
[ "0.720449", "0.71186393", "0.6978083", "0.6890965", "0.68653595", "0.68653595", "0.68653595", "0.68523324", "0.6681079", "0.6597969", "0.6571417", "0.6538615", "0.6382723", "0.6373803", "0.63229746", "0.63046634", "0.62973523", "0.6293828", "0.62801373", "0.6279188", "0.62768024", "0.62723905", "0.62695616", "0.62669986", "0.62669986", "0.62615174", "0.62565243", "0.62505144", "0.6236172", "0.6166119", "0.61569864", "0.6146162", "0.6138837", "0.6093393", "0.6076729", "0.6046464", "0.60299253", "0.6022849", "0.60155827", "0.60036445", "0.5999951", "0.5988651", "0.59880644", "0.59767956", "0.5960412", "0.59427935", "0.5929469", "0.5916043", "0.5882389", "0.5880825", "0.5870254", "0.5866445", "0.5854443", "0.5844938", "0.5844629", "0.58426553", "0.5839817", "0.582564", "0.5823756", "0.58031046", "0.57879317", "0.5786018", "0.577727", "0.5773014", "0.5770685", "0.5759718", "0.574661", "0.57403064", "0.5732265", "0.5729875", "0.5726236", "0.5722526", "0.5719291", "0.57065195", "0.5698278", "0.56952745", "0.5691063", "0.56639814", "0.56616515", "0.56614435", "0.56599665", "0.5655009", "0.5650572", "0.5647311", "0.56453073", "0.5636312", "0.5622427", "0.56202364", "0.56139266", "0.5610972", "0.5602828", "0.56007284", "0.55894375", "0.5588081", "0.5586846", "0.5580922", "0.5579639", "0.55746686", "0.5573923", "0.5568048" ]
0.58114475
59
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPACES);\n }", "private String toIndentedString(Object o)\n/* */ {\n/* 128 */ if (o == null) {\n/* 129 */ return \"null\";\n/* */ }\n/* 131 */ return o.toString().replace(\"\\n\", \"\\n \");\n/* */ }", "private String toIndentedString( Object o )\n {\n if ( o == null )\n {\n return \"null\";\n }\n return o.toString().replace( \"\\n\", \"\\n \" );\n }" ]
[ "0.7886073", "0.75506985", "0.74986166" ]
0.7462953
87
Validates the JSON Object and throws an exception if issues found
public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { if (RoyaltyEntity.openapiRequiredFields.isEmpty()) { return; } else { // has required fields throw new IllegalArgumentException(String.format("The required field(s) %s in RoyaltyEntity is not found in the empty JSON string", RoyaltyEntity.openapiRequiredFields.toString())); } } Set<Entry<String, JsonElement>> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry<String, JsonElement> entry : entries) { if (!RoyaltyEntity.openapiFields.contains(entry.getKey())) { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RoyaltyEntity` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `account` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account").toString())); } if (jsonObj.get("account_open_id") != null && !jsonObj.get("account_open_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `account_open_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("account_open_id").toString())); } if (jsonObj.get("bind_login_name") != null && !jsonObj.get("bind_login_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `bind_login_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bind_login_name").toString())); } if (jsonObj.get("login_name") != null && !jsonObj.get("login_name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `login_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("login_name").toString())); } if (jsonObj.get("memo") != null && !jsonObj.get("memo").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memo").toString())); } if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void validateJson();", "public static void validateJsonObject(JsonObject jsonObj) throws IOException {\n if (jsonObj == null) {\n if (VoucherPackageSalesInfo.openapiRequiredFields.isEmpty()) {\n return;\n } else { // has required fields\n throw new IllegalArgumentException(String.format(\"The required field(s) %s in VoucherPackageSalesInfo is not found in the empty JSON string\", VoucherPackageSalesInfo.openapiRequiredFields.toString()));\n }\n }\n\n Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();\n // check to see if the JSON string contains additional fields\n for (Entry<String, JsonElement> entry : entries) {\n if (!VoucherPackageSalesInfo.openapiFields.contains(entry.getKey())) {\n throw new IllegalArgumentException(String.format(\"The field `%s` in the JSON string is not defined in the `VoucherPackageSalesInfo` properties. JSON: %s\", entry.getKey(), jsonObj.toString()));\n }\n }\n if (jsonObj.get(\"pay_channel\") != null && !jsonObj.get(\"pay_channel\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `pay_channel` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"pay_channel\").toString()));\n }\n if (jsonObj.get(\"purchase_url\") != null && !jsonObj.get(\"purchase_url\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `purchase_url` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"purchase_url\").toString()));\n }\n if (jsonObj.get(\"sale_period_limit\") != null && !jsonObj.get(\"sale_period_limit\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `sale_period_limit` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"sale_period_limit\").toString()));\n }\n if (jsonObj.get(\"sale_price\") != null && !jsonObj.get(\"sale_price\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `sale_price` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"sale_price\").toString()));\n }\n }", "public static void validateJsonObject(JsonObject jsonObj) throws IOException {\n if (jsonObj == null) {\n if (BoxBusinessDistrictInfo.openapiRequiredFields.isEmpty()) {\n return;\n } else { // has required fields\n throw new IllegalArgumentException(String.format(\"The required field(s) %s in BoxBusinessDistrictInfo is not found in the empty JSON string\", BoxBusinessDistrictInfo.openapiRequiredFields.toString()));\n }\n }\n\n Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();\n // check to see if the JSON string contains additional fields\n for (Entry<String, JsonElement> entry : entries) {\n if (!BoxBusinessDistrictInfo.openapiFields.contains(entry.getKey())) {\n throw new IllegalArgumentException(String.format(\"The field `%s` in the JSON string is not defined in the `BoxBusinessDistrictInfo` properties. JSON: %s\", entry.getKey(), jsonObj.toString()));\n }\n }\n if (jsonObj.get(\"app_name\") != null && !jsonObj.get(\"app_name\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `app_name` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"app_name\").toString()));\n }\n if (jsonObj.get(\"business_district_id\") != null && !jsonObj.get(\"business_district_id\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `business_district_id` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"business_district_id\").toString()));\n }\n if (jsonObj.get(\"business_district_name\") != null && !jsonObj.get(\"business_district_name\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `business_district_name` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"business_district_name\").toString()));\n }\n if (jsonObj.get(\"relate_appid\") != null && !jsonObj.get(\"relate_appid\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `relate_appid` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"relate_appid\").toString()));\n }\n if (jsonObj.get(\"service_code\") != null && !jsonObj.get(\"service_code\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `service_code` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"service_code\").toString()));\n }\n }", "public static void validateJsonObject(JsonObject jsonObj) throws IOException {\n if (jsonObj == null) {\n if (ScheduleTerminalActionsResponse.openapiRequiredFields.isEmpty()) {\n return;\n } else { // has required fields\n throw new IllegalArgumentException(String.format(\"The required field(s) %s in ScheduleTerminalActionsResponse is not found in the empty JSON string\", ScheduleTerminalActionsResponse.openapiRequiredFields.toString()));\n }\n }\n\n Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();\n // check to see if the JSON string contains additional fields\n for (Entry<String, JsonElement> entry : entries) {\n if (!ScheduleTerminalActionsResponse.openapiFields.contains(entry.getKey())) {\n throw new IllegalArgumentException(String.format(\"The field `%s` in the JSON string is not defined in the `ScheduleTerminalActionsResponse` properties. JSON: %s\", entry.getKey(), jsonObj.toString()));\n }\n }\n // validate the optional field `actionDetails`\n if (jsonObj.getAsJsonObject(\"actionDetails\") != null) {\n ScheduleTerminalActionsRequestActionDetails.validateJsonObject(jsonObj.getAsJsonObject(\"actionDetails\"));\n }\n JsonArray jsonArrayitems = jsonObj.getAsJsonArray(\"items\");\n if (jsonArrayitems != null) {\n // ensure the json data is an array\n if (!jsonObj.get(\"items\").isJsonArray()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `items` to be an array in the JSON string but got `%s`\", jsonObj.get(\"items\").toString()));\n }\n\n // validate the optional field `items` (array)\n for (int i = 0; i < jsonArrayitems.size(); i++) {\n TerminalActionScheduleDetail.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject());\n };\n }\n // validate the optional field scheduledAt\n if (jsonObj.get(\"scheduledAt\") != null && !jsonObj.get(\"scheduledAt\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `scheduledAt` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"scheduledAt\").toString()));\n }\n // validate the optional field storeId\n if (jsonObj.get(\"storeId\") != null && !jsonObj.get(\"storeId\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `storeId` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"storeId\").toString()));\n }\n // ensure the json data is an array\n if (jsonObj.get(\"terminalIds\") != null && !jsonObj.get(\"terminalIds\").isJsonArray()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `terminalIds` to be an array in the JSON string but got `%s`\", jsonObj.get(\"terminalIds\").toString()));\n }\n }", "public InvalidJsonException() {\n\t\tsuper();\n\t}", "public static void validateJsonObject(JsonObject jsonObj) throws IOException {\n if (jsonObj == null) {\n if (BankAccount.openapiRequiredFields.isEmpty()) {\n return;\n } else { // has required fields\n throw new IllegalArgumentException(String.format(\"The required field(s) %s in BankAccount is not found in the empty JSON string\", BankAccount.openapiRequiredFields.toString()));\n }\n }\n\n Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();\n // check to see if the JSON string contains additional fields\n for (Entry<String, JsonElement> entry : entries) {\n if (!BankAccount.openapiFields.contains(entry.getKey())) {\n throw new IllegalArgumentException(String.format(\"The field `%s` in the JSON string is not defined in the `BankAccount` properties. JSON: %s\", entry.getKey(), jsonObj.toString()));\n }\n }\n // validate the optional field bankAccountNumber\n if (jsonObj.get(\"bankAccountNumber\") != null && !jsonObj.get(\"bankAccountNumber\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `bankAccountNumber` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"bankAccountNumber\").toString()));\n }\n // validate the optional field bankCity\n if (jsonObj.get(\"bankCity\") != null && !jsonObj.get(\"bankCity\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `bankCity` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"bankCity\").toString()));\n }\n // validate the optional field bankLocationId\n if (jsonObj.get(\"bankLocationId\") != null && !jsonObj.get(\"bankLocationId\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `bankLocationId` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"bankLocationId\").toString()));\n }\n // validate the optional field bankName\n if (jsonObj.get(\"bankName\") != null && !jsonObj.get(\"bankName\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `bankName` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"bankName\").toString()));\n }\n // validate the optional field bic\n if (jsonObj.get(\"bic\") != null && !jsonObj.get(\"bic\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `bic` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"bic\").toString()));\n }\n // validate the optional field countryCode\n if (jsonObj.get(\"countryCode\") != null && !jsonObj.get(\"countryCode\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"countryCode\").toString()));\n }\n // validate the optional field iban\n if (jsonObj.get(\"iban\") != null && !jsonObj.get(\"iban\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `iban` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"iban\").toString()));\n }\n // validate the optional field ownerName\n if (jsonObj.get(\"ownerName\") != null && !jsonObj.get(\"ownerName\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `ownerName` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"ownerName\").toString()));\n }\n // validate the optional field taxId\n if (jsonObj.get(\"taxId\") != null && !jsonObj.get(\"taxId\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `taxId` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"taxId\").toString()));\n }\n }", "public static void validateJsonObject(JsonObject jsonObj) throws IOException {\n if (jsonObj == null) {\n if (ArticleInfo.openapiRequiredFields.isEmpty()) {\n return;\n } else { // has required fields\n throw new IllegalArgumentException(String.format(\"The required field(s) %s in ArticleInfo is not found in the empty JSON string\", ArticleInfo.openapiRequiredFields.toString()));\n }\n }\n\n Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();\n // check to see if the JSON string contains additional fields\n for (Entry<String, JsonElement> entry : entries) {\n if (!ArticleInfo.openapiFields.contains(entry.getKey())) {\n throw new IllegalArgumentException(String.format(\"The field `%s` in the JSON string is not defined in the `ArticleInfo` properties. JSON: %s\", entry.getKey(), jsonObj.toString()));\n }\n }\n JsonArray jsonArrayattachments = jsonObj.getAsJsonArray(\"attachments\");\n if (jsonArrayattachments != null) {\n // ensure the json data is an array\n if (!jsonObj.get(\"attachments\").isJsonArray()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `attachments` to be an array in the JSON string but got `%s`\", jsonObj.get(\"attachments\").toString()));\n }\n\n // validate the optional field `attachments` (array)\n for (int i = 0; i < jsonArrayattachments.size(); i++) {\n ArticleAttachmentInfo.validateJsonObject(jsonArrayattachments.get(i).getAsJsonObject());\n };\n }\n if (jsonObj.get(\"category_name_path\") != null && !jsonObj.get(\"category_name_path\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `category_name_path` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"category_name_path\").toString()));\n }\n JsonArray jsonArraycategoryPath = jsonObj.getAsJsonArray(\"category_path\");\n if (jsonArraycategoryPath != null) {\n // ensure the json data is an array\n if (!jsonObj.get(\"category_path\").isJsonArray()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `category_path` to be an array in the JSON string but got `%s`\", jsonObj.get(\"category_path\").toString()));\n }\n\n // validate the optional field `category_path` (array)\n for (int i = 0; i < jsonArraycategoryPath.size(); i++) {\n ArticleCategoryInfo.validateJsonObject(jsonArraycategoryPath.get(i).getAsJsonObject());\n };\n }\n if (jsonObj.get(\"content\") != null && !jsonObj.get(\"content\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `content` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"content\").toString()));\n }\n if (jsonObj.get(\"create_time\") != null && !jsonObj.get(\"create_time\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `create_time` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"create_time\").toString()));\n }\n if (jsonObj.get(\"creator_id\") != null && !jsonObj.get(\"creator_id\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `creator_id` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"creator_id\").toString()));\n }\n // ensure the json data is an array\n if (jsonObj.get(\"extend_titles\") != null && !jsonObj.get(\"extend_titles\").isJsonArray()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `extend_titles` to be an array in the JSON string but got `%s`\", jsonObj.get(\"extend_titles\").toString()));\n }\n // ensure the json data is an array\n if (jsonObj.get(\"keywords\") != null && !jsonObj.get(\"keywords\").isJsonArray()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `keywords` to be an array in the JSON string but got `%s`\", jsonObj.get(\"keywords\").toString()));\n }\n JsonArray jsonArraypictures = jsonObj.getAsJsonArray(\"pictures\");\n if (jsonArraypictures != null) {\n // ensure the json data is an array\n if (!jsonObj.get(\"pictures\").isJsonArray()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `pictures` to be an array in the JSON string but got `%s`\", jsonObj.get(\"pictures\").toString()));\n }\n\n // validate the optional field `pictures` (array)\n for (int i = 0; i < jsonArraypictures.size(); i++) {\n ArticleAttachmentInfo.validateJsonObject(jsonArraypictures.get(i).getAsJsonObject());\n };\n }\n if (jsonObj.get(\"publish_end\") != null && !jsonObj.get(\"publish_end\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `publish_end` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"publish_end\").toString()));\n }\n if (jsonObj.get(\"publish_start\") != null && !jsonObj.get(\"publish_start\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `publish_start` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"publish_start\").toString()));\n }\n // ensure the json data is an array\n if (jsonObj.get(\"scene_codes\") != null && !jsonObj.get(\"scene_codes\").isJsonArray()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `scene_codes` to be an array in the JSON string but got `%s`\", jsonObj.get(\"scene_codes\").toString()));\n }\n if (jsonObj.get(\"source\") != null && !jsonObj.get(\"source\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `source` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"source\").toString()));\n }\n if (jsonObj.get(\"status\") != null && !jsonObj.get(\"status\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `status` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"status\").toString()));\n }\n if (jsonObj.get(\"status_code\") != null && !jsonObj.get(\"status_code\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `status_code` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"status_code\").toString()));\n }\n if (jsonObj.get(\"title\") != null && !jsonObj.get(\"title\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `title` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"title\").toString()));\n }\n if (jsonObj.get(\"update_time\") != null && !jsonObj.get(\"update_time\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `update_time` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"update_time\").toString()));\n }\n if (jsonObj.get(\"updater_id\") != null && !jsonObj.get(\"updater_id\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `updater_id` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"updater_id\").toString()));\n }\n if (jsonObj.get(\"updater_name\") != null && !jsonObj.get(\"updater_name\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `updater_name` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"updater_name\").toString()));\n }\n }", "public static void validateJsonObject(JsonObject jsonObj) throws IOException {\n if (jsonObj == null) {\n if (IndirectFinancialOrgInfo.openapiRequiredFields.isEmpty()) {\n return;\n } else { // has required fields\n throw new IllegalArgumentException(String.format(\"The required field(s) %s in IndirectFinancialOrgInfo is not found in the empty JSON string\", IndirectFinancialOrgInfo.openapiRequiredFields.toString()));\n }\n }\n\n Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();\n // check to see if the JSON string contains additional fields\n for (Entry<String, JsonElement> entry : entries) {\n if (!IndirectFinancialOrgInfo.openapiFields.contains(entry.getKey())) {\n throw new IllegalArgumentException(String.format(\"The field `%s` in the JSON string is not defined in the `IndirectFinancialOrgInfo` properties. JSON: %s\", entry.getKey(), jsonObj.toString()));\n }\n }\n // ensure the json data is an array\n if (jsonObj.get(\"financial_org_cert_img\") != null && !jsonObj.get(\"financial_org_cert_img\").isJsonArray()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `financial_org_cert_img` to be an array in the JSON string but got `%s`\", jsonObj.get(\"financial_org_cert_img\").toString()));\n }\n if (jsonObj.get(\"financial_org_type\") != null && !jsonObj.get(\"financial_org_type\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `financial_org_type` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"financial_org_type\").toString()));\n }\n }", "public static void validateJsonObject(JsonObject jsonObj) throws IOException {\n if (jsonObj == null) {\n if (JinyouTestOne.openapiRequiredFields.isEmpty()) {\n return;\n } else { // has required fields\n throw new IllegalArgumentException(String.format(\"The required field(s) %s in JinyouTestOne is not found in the empty JSON string\", JinyouTestOne.openapiRequiredFields.toString()));\n }\n }\n\n Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();\n // check to see if the JSON string contains additional fields\n for (Entry<String, JsonElement> entry : entries) {\n if (!JinyouTestOne.openapiFields.contains(entry.getKey())) {\n throw new IllegalArgumentException(String.format(\"The field `%s` in the JSON string is not defined in the `JinyouTestOne` properties. JSON: %s\", entry.getKey(), jsonObj.toString()));\n }\n }\n if (jsonObj.get(\"o_1_n\") != null && !jsonObj.get(\"o_1_n\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `o_1_n` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"o_1_n\").toString()));\n }\n if (jsonObj.get(\"o_2_openid\") != null && !jsonObj.get(\"o_2_openid\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `o_2_openid` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"o_2_openid\").toString()));\n }\n if (jsonObj.get(\"o_2_y\") != null && !jsonObj.get(\"o_2_y\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `o_2_y` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"o_2_y\").toString()));\n }\n if (jsonObj.get(\"o_3_openid\") != null && !jsonObj.get(\"o_3_openid\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `o_3_openid` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"o_3_openid\").toString()));\n }\n }", "private static boolean isJSONValid(String jsonInString){\n\n\t\ttry {\n\t\t\tfinal ObjectMapper mapper = new ObjectMapper();\n\t\t\tmapper.readTree(jsonInString);\n\t\t\treturn true;\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"INVALID JSON-LD SYNTAX\");\n\t\t\treturn false;\n\t\t}\n\n\t}", "public static Spot validateJSONData(JSONObject json) {\r\n\t\tint id, lot_id;\r\n\t\tdouble lat, lng;\r\n\t\tString status;\r\n\t\t\r\n\t\tLog.i(\"Spot JSON\", json.toString());\r\n\t\t\r\n\t\t// Begin the disgusting wall of try-catches\r\n\t\ttry {\r\n\t\t\tid = json.getInt(RestContract.SPOT_ID);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tid = -1;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tlot_id = json.getInt(RestContract.SPOT_LOT_ID);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tlot_id = -1;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tlat = json.getDouble(RestContract.SPOT_LATITUDE);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tlat = 0;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tlng = json.getDouble(RestContract.SPOT_LONGITUDE);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tlng = 0;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tstatus = json.getString(RestContract.SPOT_STATUS);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tstatus = \"\";\r\n\t\t}\r\n\t\t\r\n\t\treturn new Spot(id, lot_id, lat, lng, status);\r\n\t}", "public static void validateJsonObject(JsonObject jsonObj) throws IOException {\n if (jsonObj == null) {\n if (AlipayMobilePublicFollowListResponseModel.openapiRequiredFields.isEmpty()) {\n return;\n } else { // has required fields\n throw new IllegalArgumentException(String.format(\"The required field(s) %s in AlipayMobilePublicFollowListResponseModel is not found in the empty JSON string\", AlipayMobilePublicFollowListResponseModel.openapiRequiredFields.toString()));\n }\n }\n\n Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();\n // check to see if the JSON string contains additional fields\n for (Entry<String, JsonElement> entry : entries) {\n if (!AlipayMobilePublicFollowListResponseModel.openapiFields.contains(entry.getKey())) {\n throw new IllegalArgumentException(String.format(\"The field `%s` in the JSON string is not defined in the `AlipayMobilePublicFollowListResponseModel` properties. JSON: %s\", entry.getKey(), jsonObj.toString()));\n }\n }\n if (jsonObj.get(\"count\") != null && !jsonObj.get(\"count\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `count` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"count\").toString()));\n }\n // validate the optional field `data`\n if (jsonObj.getAsJsonObject(\"data\") != null) {\n Data.validateJsonObject(jsonObj.getAsJsonObject(\"data\"));\n }\n if (jsonObj.get(\"next_alipay_user_id\") != null && !jsonObj.get(\"next_alipay_user_id\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `next_alipay_user_id` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"next_alipay_user_id\").toString()));\n }\n if (jsonObj.get(\"next_user_id\") != null && !jsonObj.get(\"next_user_id\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `next_user_id` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"next_user_id\").toString()));\n }\n }", "public JsonObject validate(JsonObject json) throws RequestValidationException {\r\n\r\n for (String field : json.fieldNames()) {\r\n for (ParserSettings validator : settings.get().getValidators().values()) {\r\n\r\n if (json.getValue(field) instanceof JsonObject) {\r\n validate(json.getJsonObject(field), field);\r\n } else {\r\n if (validator.keys.contains(field)) {\r\n json.put(field, validate(validator, json.getValue(field)));\r\n }\r\n }\r\n }\r\n }\r\n return json;\r\n }", "@Test\n\tpublic void testValidation() throws Exception {\n\t\tSchema schema = factory.create(basicSchema);\n\t\tschema.validate(parser.read(basicJson));\n\t}", "@Test\n void getAndFormatJson() {\n g.getJsonFromGitHub();\n String json = g.getJsonString();\n\n boolean isValid;\n try {\n new Gson().fromJson(json, Object.class);\n isValid = true;\n } catch(com.google.gson.JsonSyntaxException ex) {\n isValid = false;\n }\n assertTrue(isValid, \"Invalid JSON\");\n }", "private void validate(JsonObject json, String fieldName) throws RequestValidationException {\r\n for (String field : json.fieldNames()) {\r\n if (json.getValue(field) instanceof JsonObject) {\r\n validate(json, fieldName + \".\" + field);\r\n } else {\r\n for (ParserSettings validator : settings.get().getValidators().values()) {\r\n if (validator.keys.contains(fieldName + \".\" + field)) {\r\n json.put(field, validate(validator, json.getValue(field)));\r\n }\r\n }\r\n }\r\n }\r\n }", "public ValidationEntity validateJsonService(ValidationEntity validationEntity) {\n try {\n String indentedJson = (new JSONObject(validationEntity.getInputMessage())).toString(4);\n log.debug(\"JSON Value obtained successfully: {}\", indentedJson);\n validationEntity.setValid(true);\n validationEntity.setValidationMessage(\"Valid JSON!!!\");\n } catch (JSONException e) {\n validationEntity.setValidationMessage(e.getMessage());\n log.error(EXCEPTION_IN_VALIDATION_MESSAGE, e);\n if (e.getMessage().contains(LINE_WITH_SPACE)) {\n validationEntity.setLineNumber(getNumberFromRegexPattern(LINE_WITH_SPACE, \"]\", e.getMessage()));\n validationEntity.setColumnNumber(getNumberFromRegexPattern(\"[character \", \" line\", e.getMessage()));\n }\n }\n return validationEntity;\n }", "protected boolean isJSONValid(String callReoprtResponse2) {\n try {\n new JSONObject(callReoprtResponse2);\n } catch (JSONException ex) {\n // edited, to include @Arthur's comment\n // e.g. in case JSONArray is valid as well...\n try {\n new JSONArray(callReoprtResponse2);\n } catch (JSONException ex1) {\n return false;\n }\n }\n return true;\n }", "@Test\n public void validateWithSchema(){\n\n Schema schema = SchemaLoader.load(getSchemaJson());\n String jsonString=\"{bankInfo:{\\\"accountHolderName\\\":\\\"Way L\\\", \\\"institution\\\":\\\"TD\\\", \\\"transitNumber\\\":101, \\\"accountNumber\\\":123456789},\\\"email\\\":\\\"[email protected]\\\", \\\"phone\\\":\\\"416-336-6689\\\"}\";\n\n JSONObject json=null;\n try {\n json = new JSONObject(jsonString);\n }catch (Exception e){\n e.printStackTrace();\n }\n schema.validate(json);\n\n }", "boolean isValid(JsonMessage message);", "private Set<ValidationMessage> validateInternal(final JsonNode schemaJson, final JsonNode objectJson) {\n Preconditions.checkNotNull(schemaJson);\n Preconditions.checkNotNull(objectJson);\n\n final JsonSchema schema = getSchemaValidator(schemaJson);\n return schema.validate(objectJson);\n }", "public static void main(String[] args) {\n\r\n\tSystem.out.println(\"please input your json String: \");\r\n\tScanner in = new Scanner(System.in);\r\n\r\n\tString jsonValue = in.nextLine();\r\n\r\n\tSystem.out.println(\"please input your json Schema: \");\r\n\r\n\tString jsonSchema = in.nextLine();\r\n\r\n\tBoolean isValidated = validate(jsonValue, jsonSchema);\r\n\r\n\tif (!isValidated) {\r\n\t System.out.println(\"sorry,your jsonString failed\");\r\n\t} else {\r\n\t System.out.println(\"No errors found. JSON validates against the schema\");\r\n\t}\r\n\r\n }", "@Override\n public boolean isValid(JsonElement el) {\n return doValidate(el, null);\n }", "@Override\n\tprotected void validateParameters() throws Exception {\n\t\tthis.dataList = json.getJSONArray(JsonInfoField.DATA_LIST);\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "private void asertPresentJSON(String json, String fieldName) throws Exception {\n\n ObjectMapper objectMapper = new ObjectMapper();\n\n try {\n\n JsonNode rootNode = objectMapper.readTree(json);\n String value = rootNode.path(fieldName).asText();\n assertNotNull(\"Expected for field <\" + fieldName + \"> value\", value);\n\n } catch (JsonParseException e) {\n System.out.println(\"Trouble trying to check \" + e.getMessage()); // TODO better message \n throw e;\n }\n\n }", "public static void validateNull(JsonObject inputObject, String value) throws ValidatorException {\n if (value != null && !(value.equals(\"null\") || value.equals(\"\\\"null\\\"\"))) {\n ValidatorException exception = new ValidatorException(\"Expected a null but found a value\");\n logger.error(\"Received not null input\" + value + \" to be validated with : \" + inputObject\n .toString(), exception);\n throw exception;\n }\n }", "default boolean checkJsonResp(JsonElement response) {\n return false;\n }", "public void validate() throws org.apache.thrift.TException {\n if (object != null) {\n object.validate();\n }\n }", "public boolean test(final JsonNode schemaJson, final JsonNode objectJson) {\n final Set<ValidationMessage> validationMessages = validateInternal(schemaJson, objectJson);\n\n if (!validationMessages.isEmpty()) {\n LOGGER.info(\"JSON schema validation failed. \\nerrors: {}\", Strings.join(validationMessages, \", \"));\n }\n\n return validationMessages.isEmpty();\n }", "@Override\n protected void validate(final OperationIF oper) throws Exception {\n String METHOD = Thread.currentThread().getStackTrace()[1].getMethodName();\n JSONObject jsonInput = null;\n\n _logger.entering(CLASS, METHOD);\n\n if (oper == null) {\n throw new Exception(\"Operation object is null\");\n }\n\n jsonInput = oper.getJSON();\n if (jsonInput == null || jsonInput.isEmpty()) {\n throw new Exception(\"JSON Input is null or empty\");\n }\n\n switch (oper.getType()) {\n case READ: {\n this.checkAttr(jsonInput, ConstantsIF.UID);\n break;\n }\n case REPLACE: {\n this.checkAttr(jsonInput, ConstantsIF.UID);\n this.checkMeta(jsonInput);\n break;\n }\n case DELETE: {\n this.checkAttr(jsonInput, ConstantsIF.UID);\n break;\n }\n default:\n break;\n }\n\n _logger.exiting(CLASS, METHOD);\n\n return;\n }", "public interface FieldValidator {\n static boolean validateStringIfPresent(Object o, int len) {\n return o == null || o instanceof String && !((String) o).isEmpty() && ((String) o).length() < len;\n }\n\n static boolean validateString(Object o, int len) {\n return !(o == null || !(o instanceof String) || ((String) o).isEmpty() || (((String) o).length() > len));\n }\n\n static boolean validateInteger(Object o) {\n if (o == null) {\n return false;\n }\n try {\n Integer.valueOf(o.toString());\n } catch (NumberFormatException e) {\n return false;\n }\n return true;\n }\n\n static boolean validateDateWithFormat(Object o, DateTimeFormatter formatter, boolean allowedInPast) {\n if (o == null) {\n return false;\n }\n try {\n LocalDate date = LocalDate.parse(o.toString(), formatter);\n if (!allowedInPast) {\n return date.isAfter(LocalDate.now());\n }\n } catch (DateTimeParseException e) {\n return false;\n }\n return true;\n }\n\n static boolean validateJsonIfPresent(Object o) {\n return o == null || o instanceof JsonObject && !((JsonObject) o).isEmpty();\n }\n\n static boolean validateJson(Object o) {\n return !(o == null || !(o instanceof JsonObject) || ((JsonObject) o).isEmpty());\n }\n\n static boolean validateJsonArrayIfPresent(Object o) {\n return o == null || o instanceof JsonArray && !((JsonArray) o).isEmpty();\n }\n\n static boolean validateJsonArray(Object o) {\n return !(o == null || !(o instanceof JsonArray) || ((JsonArray) o).isEmpty());\n }\n\n static boolean validateDeepJsonArrayIfPresent(Object o, FieldValidator fv) {\n if (o == null) {\n return true;\n } else if (!(o instanceof JsonArray) || ((JsonArray) o).isEmpty()) {\n return false;\n } else {\n JsonArray array = (JsonArray) o;\n for (Object element : array) {\n if (!fv.validateField(element)) {\n return false;\n }\n }\n }\n return true;\n }\n\n static boolean validateDeepJsonArray(Object o, FieldValidator fv) {\n if (o == null || !(o instanceof JsonArray) || ((JsonArray) o).isEmpty()) {\n return false;\n }\n JsonArray array = (JsonArray) o;\n for (Object element : array) {\n if (!fv.validateField(element)) {\n return false;\n }\n }\n return true;\n }\n\n static boolean validateBoolean(Object o) {\n return o != null && o instanceof Boolean;\n }\n\n static boolean validateBooleanIfPresent(Object o) {\n return o == null || o instanceof Boolean;\n }\n\n static boolean validateUuid(Object o) {\n try {\n UUID uuid = UUID.fromString((String) o);\n return true;\n } catch (IllegalArgumentException e) {\n return false;\n }\n }\n\n static boolean validateUuidIfPresent(String o) {\n return o == null || validateUuid(o);\n }\n\n boolean validateField(Object value);\n\n Pattern EMAIL_PATTERN =\n Pattern.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");\n\n static boolean validateEmail(Object o) {\n Matcher matcher = EMAIL_PATTERN.matcher((String) o);\n return matcher.matches();\n }\n}", "public List<JsonNode> validate(JsonNode _schema, String _json) \n\t{\t\t\n\t\tJsonNode json = null;\n\t\t\n\t\ttry {\n\t\t\tjson = JsonLoader.fromResource(_json);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println();\n\t\t}\n\t\t\n\t\treturn validate(_schema, json);\n\t}", "private void validateData() {\n }", "@Test\n public void testToFromObjectinvalid() throws GeoportalException, JsonHelperException {\n\n GeoportalRequestObject requestObject = new GeoportalRequestDataObject(random.nextDouble(), random.nextDouble());\n String jsonObject = JsonHelper.toJson(requestObject);\n assertNotNull(jsonObject);\n\n for (int i = 0; i < 9; i++) {\n if (jsonObject.contains(\"\" + i)) {\n jsonObject = jsonObject.replace(\"\" + i, \"\" + (i + 1));\n break;\n }\n }\n GeoportalRequestObject restoredObject = JsonHelper.fromJson(jsonObject, GeoportalRequestDataObject.class);\n assertFalse(requestObject.equals(restoredObject));\n }", "@org.chromium.protocolReader.JsonOptionalField\n boolean wasThrown();", "@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}", "public String validateRequest(JSONObject json) {\n\t\t\r\n\t\tString empty = RomeJSONUtils.findEmptyJson(json, \"username\", \"password\", \"host\", \"port\");\r\n\t\tif (empty != null) {\r\n\t\t\treturn empty;\r\n\t\t} \r\n\t\treturn empty;\r\n\t}", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n JSONTokener jSONTokener0 = new JSONTokener(\"{\");\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must end with '}' at character 1 of {\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }", "public void validate() throws Exception {\n }", "public InvalidJsonException(Throwable cause) {\n\t\tsuper(cause);\n\t}", "@Override\n\tpublic void jsonParseError() {\n\t\tMyDialog.showInfoDialog(this, R.string.tips, R.string.response_data_error);\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (statusCode == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'statusCode' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public List<JsonNode> validate(String _schema, String _json)\n\t{\t\t\n\t\tJsonNode schema = null;\n\t\tJsonNode json = null;\n\t\t\n\t\ttry {\n\t\t\tschema = JsonLoader.fromResource(_schema);\n\t\t\tjson = JsonLoader.fromResource(_json);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println();\n\t\t}\n\t\t\n\t\treturn validate(schema, json);\n\t}", "@Test\n\t@Override\n\tpublic void testUpdateObjectNotFoundJson() throws Exception {\n\t}", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n JSONObject.testValidity((Object) null);\n }", "ValidationResponse validate();", "public List<JsonNode> validate(JsonNode _schema, JsonNode _json) \n\t{\n\t\tJsonSchemaFactory factory = doFactory();\n\t\t\n\t\tJsonSchema schema = null;\n\t\t\n\t\tif (factory != null)\n\t\t{\n\t\t\ttry {\n\t\t\t\tschema = factory.getJsonSchema(_schema);\n\t\t\t} catch (ProcessingException e) {\n\t\t\t\tSystem.err.println();\n\t\t\t}\n\t\t}\n\n\t\tProcessingReport report = null;\n\t\t\n\t\tif (schema != null)\n\t\t{\n\t\t\ttry {\n\t\t\t\treport = schema.validate(_json, true);\n\t\t\t} catch (ProcessingException e) {\n\t\t\t\tSystem.err.println();\n\t\t\t}\n\t\t}\n\n\t\tList<ProcessingMessage> messages = Lists.newArrayList();\n\t\t\n\t\tif (report != null)\n\t\t{\n\t\t\tmessages = Lists.newArrayList(report);\n\t\t}\n\t\t\n\t\tconvertMessageToJson(messages); \n\t\t\n\t\treturn errors;\n\t}", "@Override\n public boolean validate(JsonElement el, StringBuilder sb) {\n return doValidate(el, sb);\n }", "@Test(expected = JsonException.class)\n public void testParseInvalidType() throws JsonException {\n JsonMap triggerJson = JsonMap.newBuilder()\n .put(\"type\", \"what\")\n .put(\"goal\", 100)\n .build();\n\n Trigger.fromJson(triggerJson.toJsonValue());\n }", "private void validateUserObject(User user) {\n }", "@Override\n\tpublic boolean validObject() {\n\t\treturn valid;\n\t}", "@Override\r\n\tpublic boolean validate(Object object) {\n\t\treturn this.validate(object);\r\n\t}", "private void validateUserObject(User user) {\n\t }", "@Override\n public boolean validateObject(MongoTemplate obj) {\n return true;\n }", "public void validate() throws org.apache.thrift.TException {\n if (version == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'version' was not present! Struct: \" + toString());\n }\n if (am_handle == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'am_handle' was not present! Struct: \" + toString());\n }\n if (user == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'user' was not present! Struct: \" + toString());\n }\n if (resources == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resources' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'gang' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n if (am_handle != null) {\n am_handle.validate();\n }\n if (reservation_id != null) {\n reservation_id.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (functionName == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'functionName' was not present! Struct: \" + toString());\n }\n if (className == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'className' was not present! Struct: \" + toString());\n }\n if (resources == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resources' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public List<JsonNode> validate(String _schema, JsonNode _json) \n\t{\t\t\n\t\tJsonNode schema = null;\n\t\t\n\t\ttry {\n\t\t\tschema = JsonLoader.fromResource(_schema);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println();\n\t\t}\n\t\t\n\t\treturn validate(schema, _json);\n\t}", "private void validateUserObject(User user) {\n }", "@Test\n void deserialize_test_with_invalid_value() {\n assertThatThrownBy(\n () -> jsonConverter.readValue(\"{\\\"transport\\\": -1}\", TestDTO.class)\n ).isInstanceOf(DataConversionException.class);\n }", "@Test\n\tpublic void testValidationTrace() throws Exception {\n\t\ttry {\n\t\t\tSchema schema = factory.create(basicSchema);\n\t\t\tschema.validate(parser.read(basicJsonError));\n\t\t} catch (ValidationException e) {\n\t\t\tassertEquals(\"model.members[1].size\", e.toString());\n\t\t}\n\t}", "@Test\n public void testFromJSON() {\n System.out.println(\"fromJSON\");\n String json = \"\";\n Resource expResult = null;\n Resource result = Resource.fromJSON(json);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "protected void assertValidJsonRpcResult(final JsonObject json, final Object id) {\n final Set<String> fieldNames = json.fieldNames();\n assertThat(fieldNames.size()).isEqualTo(3);\n assertThat(fieldNames.contains(\"id\")).isTrue();\n assertThat(fieldNames.contains(\"jsonrpc\")).isTrue();\n assertThat(fieldNames.contains(\"result\")).isTrue();\n\n // Check standard field values\n assertIdMatches(json, id);\n assertThat(json.getString(\"jsonrpc\")).isEqualTo(\"2.0\");\n }", "void shouldParseTheJsonPostData() {\n }", "@Test @Ignore\n public void testDecodeObjectWithInvalidNumberLeading0() throws Exception {\n try {\n JSONDecoder.decode(\"{ \\\"myValue\\\": 0123456 }\");\n fail(\"Expected NumberFormatException\");\n } catch (Exception e) {\n assertEquals(NumberFormatException.class, findRootCause(e).getClass());\n }\n }", "private boolean validateObjectForDB() {\n\t\tboolean l_ret = true;\n\t\tif (m_country_name.equals(\"\")) {\n\t\t\tm_error_string = \"Unable to add the country. Country name is required.\";\n\t\t\tl_ret = false;\n\t\t}\n\t\treturn (l_ret);\n\t}", "@Test\n public final void testCreateUserInJSONUserAlreadyExists() {\n \n try {\n \tUserAPI fixture = new UserAPI();\n String input = \"{\\\"userName\\\":\\\"Txuso\\\", \\\"password\\\": \\\"213\\\"}\";\n \tfixture.createUserInJSON(input);\n } catch (WebApplicationException e) {\n \tassertNotNull(Response.Status.NOT_ACCEPTABLE.getStatusCode());\n }\n }", "@Override\n\tprotected void check() throws SiDCException, Exception {\n\t\tif (entity == null) {\n\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"illegal of request.\");\n\t\t}\n\t\tif (StringUtils.isBlank(entity.getStatus())) {\n\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"illegal of status.\");\n\t\t}\n\t\tif (StringUtils.isBlank(entity.getLangcode())) {\n\t\t\tthrow new SiDCException(APIStatus.ILLEGAL_ARGUMENT, \"illegal of lang code.\");\n\t\t}\n\t}", "public void ensureInitializedSchema(final String schemaName, final JsonNode objectNode) throws JsonValidationException {\n final var schema = schemaToValidators.get(schemaName);\n Preconditions.checkNotNull(schema, schemaName + \" needs to be initialised before calling this method\");\n\n final Set<ValidationMessage> validationMessages = schema.validate(objectNode);\n if (validationMessages.isEmpty()) {\n return;\n }\n\n throw new JsonValidationException(\n String.format(\n \"json schema validation failed when comparing the data to the json schema. \\nErrors: %s \\nSchema: \\n%s\", Strings.join(validationMessages,\n \", \"),\n schemaName));\n }", "@Test(expected = InvalidJsonException.class)\r\n\tpublic void getCompanyNameInvalidJsonExceptionTest() throws Exception {\r\n\t\tString comapanyName = \"ABC\";\r\n\t\tString uriString = \"http://localhost:8080/sample/url\";\r\n\t\tURI uri = new URI(uriString);\r\n\t\tString json = \"{\\\"query\\\":{\\\"count\\\":1,\\\"created\\\":\\\"2016-11-23T09:55:57Z\\\",\\\"lang\\\":\\\"en-US\\\",\\\"results\\\":{\\\"quote\\\":{}}}}\";\r\n\r\n\t\tPowerMockito.whenNew(RestTemplate.class).withNoArguments().thenReturn(restTemplate);\r\n\t\tPowerMockito.doReturn(json).when(restTemplate).getForObject(uri, String.class);\r\n\t\tMockito.when(uriGeneratorService.getStockRestURI(comapanyName)).thenReturn(uri);\r\n\t\tcompanyDetailsServiceImpl.getCompanyName(comapanyName);\r\n\t}", "@Override\n @JsonIgnore\n public void validateRequest(Map<String, Object> map) throws EntityError {\n }", "public InvalidJsonException(String message) {\n\t\tsuper(message);\n\t}", "@Override\n\tpublic Boolean validate(Object obj) throws BusinessException {\n\t\treturn null;\n\t}", "public void checkValid(ObjectEntity object) {\n if (object == null) {\n throw new SgtBackendRequirementException(\"No se ha especificado un tipo de objeto\");\n }\n\n if (object.getRepository() == null) {\n throw new SgtBackendRequirementException(\"No hay ninguna entidad asociada\");\n }\n\n if (!objectEntityRepository.existsById(object.getCode())) {\n throw new SgtBackendRequirementException(\"La entidad objeto \" + object.getCode() + \" no existe\");\n }\n }", "protected void validateEntity() {\n super.validateEntity();\n }", "private JsonValidate convertFromJson(String result) {\n JsonValidate jv = null;\n if (result != null && result.length() > 0) {\n try {\n Gson gson = new Gson();\n jv = gson.fromJson(result, JsonValidate.class);\n } catch (Exception ex) {\n Log.v(Constants.LOG_TAG, \"Error: \" + ex.getMessage());\n }\n }\n return jv;\n }", "@Test\n public void badInputs() throws Exception {\n // null account metadata\n TestUtils.assertException(IllegalArgumentException.class, () -> Account.Account.fromJson(null), null);\n // account metadata in wrong format\n JSONObject badMetadata1 = new JSONObject().put(\"badKey\", \"badValue\");\n TestUtils.assertException(JSONException.class, () -> Account.Account.fromJson(badMetadata1), null);\n // required fields are missing in the metadata\n JSONObject badMetadata2 = AccountContainerTest.deepCopy(refAccountJson);\n badMetadata2.remove(ACCOUNT_ID_KEY);\n TestUtils.assertException(JSONException.class, () -> Account.Account.fromJson(badMetadata2), null);\n // unsupported account json version\n JSONObject badMetadata3 = AccountContainerTest.deepCopy(refAccountJson).put(JSON_VERSION_KEY, 2);\n TestUtils.assertException(IllegalStateException.class, () -> Account.Account.fromJson(badMetadata3), null);\n // invalid account status\n JSONObject badMetadata4 = AccountContainerTest.deepCopy(refAccountJson).put(STATUS_KEY, \"invalidAccountStatus\");\n TestUtils.assertException(IllegalArgumentException.class, () -> Account.Account.fromJson(badMetadata4), null);\n // null container metadata\n TestUtils.assertException(IllegalArgumentException.class, () -> Container.Container.fromJson(null, refAccountId), null);\n // invalid container status\n JSONObject badMetadata5 = AccountContainerTest.deepCopy(containerJsonList.get(0)).put(Container.STATUS_KEY, \"invalidContainerStatus\");\n TestUtils.assertException(IllegalArgumentException.class, () -> Container.Container.fromJson(badMetadata5, refAccountId), null);\n // required fields are missing.\n JSONObject badMetadata6 = AccountContainerTest.deepCopy(containerJsonList.get(0));\n badMetadata6.remove(CONTAINER_ID_KEY);\n TestUtils.assertException(JSONException.class, () -> Container.Container.fromJson(badMetadata6, refAccountId), null);\n // unsupported container json version\n JSONObject badMetadata7 = AccountContainerTest.deepCopy(containerJsonList.get(0)).put(Container.JSON_VERSION_KEY, ((AccountContainerTest.LATEST_CONTAINER_JSON_VERSION) + 1));\n TestUtils.assertException(IllegalStateException.class, () -> Container.Container.fromJson(badMetadata7, refAccountId), null);\n }", "@Test\n\t@Override\n\tpublic void testDeleteObjectNotFoundJson() throws Exception {\n\t}", "public void validate(Object obj, Errors errors) {\n\t\t\n\t\tBooking booking = (Booking) obj;\n\t\t\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(errors, \"aptNo\", \"error.invalid.aptNo\", \"Apartment Number Required\");\n ValidationUtils.rejectIfEmptyOrWhitespace(errors, \"street\", \"error.invalid.street\", \"Street Required\");\n ValidationUtils.rejectIfEmptyOrWhitespace(errors, \"city\", \"error.invalid.city\", \"City Required\");\n ValidationUtils.rejectIfEmptyOrWhitespace(errors, \"state\", \"error.invalid.state\", \"State Required\");\n ValidationUtils.rejectIfEmptyOrWhitespace(errors, \"zipCode\", \"error.invalid.zipCode\", \"Zipcode Required\");\n \n\t}", "public void validate() {}", "public void validate() throws org.apache.thrift.TException {\n if (institutionID == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'institutionID' was not present! Struct: \" + toString());\n }\n if (productids == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'productids' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "void validate(T object);", "protected void verificarEstructuraJson(JSONObject node){\n Set<String> keys = node.keySet();\n \n for( String key : keys ){\n if( key.contentEquals(NODE_TYPE_STR) || key.contentEquals(REQUEST_SCOPE_STR) || key.contentEquals(REQUEST_IDENTITY_STR) ||\n key.contentEquals(REQUEST_META_STR) || key.contentEquals(REQUEST_ID_STR) || key.contentEquals(REQUEST_DATA_STR)){ \n }\n else{\n throw new RuntimeException(Mensajes.ERR_SIN_FORMATO_JSON);\n }\n }\n }", "public InvalidJSONException(String msg)\n\t{\n\t\tsuper(msg);\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (!is_set_status()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'status' is unset! Struct:\" + toString());\n }\n\n if (!is_set_data()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'data' is unset! Struct:\" + toString());\n }\n\n if (!is_set_feature()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'feature' is unset! Struct:\" + toString());\n }\n\n if (!is_set_predictResult()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'predictResult' is unset! Struct:\" + toString());\n }\n\n if (!is_set_msg()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'msg' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n if (feature != null) {\n feature.validate();\n }\n }", "public EserialInvalidJsonException(String msg) {\n super(String.format(\"%s\", msg));\n }", "public void validate() throws org.apache.thrift.TException {\n if (!isSetUserProfileId()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'userProfileId' is unset! Struct:\" + toString());\n }\n\n if (!isSetEntityId()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'entityId' is unset! Struct:\" + toString());\n }\n\n if (!isSetEntityType()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'entityType' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "@Test(expected = JsonException.class)\n public void testParseEmptyJson() throws JsonException {\n Trigger.fromJson(JsonValue.NULL);\n }", "@Test\n public void testDecodeObjectWithInvalidNumberTrailingE() throws Exception {\n try {\n JSONDecoder.decode(\"{ \\\"myValue\\\": 123456e }\");\n fail(\"Expected NumberFormatException\");\n } catch (Exception e) {\n assertEquals(NumberFormatException.class, findRootCause(e).getClass());\n }\n }", "@Test\n public final void testCreateUserInJSONNullPassword() {\n try {\n String input = \"{\\\"userName\\\":\\\"Rodolfo\\\", \\\"password\\\": \\\"\\\"}\";\n \tUserAPI fixture = new UserAPI();\n \tfixture.createUserInJSON(input);\n } catch (WebApplicationException e) {\n \tassertNotNull(Response.Status.NOT_ACCEPTABLE.getStatusCode());\n }\n }", "@Test\n public final void testCreateUserInJSONNullUsername() {\n\t try {\n\t String input = \"{\\\"userName\\\":\\\"\\\", \\\"password\\\": \\\"123\\\"}\";\n\t \tUserAPI fixture = new UserAPI();\n\t \tfixture.createUserInJSON(input);\n\t } catch (WebApplicationException e) {\n\t \tassertNotNull(Response.Status.NOT_ACCEPTABLE.getStatusCode());\n\t }\n }", "@Override\n public String validate(JsonElement el) {\n StringBuilder sb = new StringBuilder();\n doValidate(el, sb);\n return sb.toString();\n }", "public void validate() throws org.apache.thrift.TException {\n if (emailId == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'emailId' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "@Test\n @SmallTest\n public void testReadFromJsonString() throws Throwable {\n final String jsonObjectString =\n \"{'crash-local-id':'123456abc','crash-capture-time':1234567890,\"\n + \"'crash-keys':{'app-package-name':'org.test.package'}}\";\n\n CrashInfo parsed = CrashInfo.readFromJsonString(jsonObjectString);\n CrashInfo expected =\n createCrashInfo(\"123456abc\", 1234567890, null, -1, \"org.test.package\", null);\n Assert.assertThat(parsed, equalsTo(expected));\n }", "@Override\n\tprotected ResponseEntity<Object> handleMethodArgumentNotValid(MethodArgumentNotValidException ex, HttpHeaders headers, HttpStatus status, WebRequest request) {\n\t\tErrorsWrapper errors = new ErrorsWrapper();\n\t\tfor (FieldError fieldError: ex.getBindingResult().getFieldErrors()) {\n\t\t\terrors.add(new ErrorModel(fieldError));\n\t\t}\n\t\treturn new ResponseEntity<Object>(errors, HttpStatus.BAD_REQUEST);\n\t}", "public void validateObject(Object object) throws AppointmentInvalidInputException {\r\n\t\ttry {\r\n\t\t\tobject.toString();\r\n\t\t}catch(NullPointerException exception) {\r\n\t\t\tthrow new AppointmentNotFoundException(String.format(AppointmentConstants.INVALID_INPUT, object), exception);\r\n\t\t}\r\n\t}", "protected MatchStrength hasJSONFormat(InputAccessor acc)\n/* */ throws IOException\n/* */ {\n/* 507 */ return ByteSourceJsonBootstrapper.hasJSONFormat(acc);\n/* */ }", "public boolean validate(Object o){\r\n\t\treturn false;\r\n\t}" ]
[ "0.8203461", "0.6949332", "0.6945078", "0.6726519", "0.6705012", "0.6679645", "0.6679158", "0.6663173", "0.6658404", "0.6605915", "0.6580855", "0.6536906", "0.6438707", "0.6415284", "0.63061184", "0.6246508", "0.62255776", "0.61933446", "0.6192022", "0.61842835", "0.616118", "0.61121434", "0.60453844", "0.6025554", "0.600804", "0.600804", "0.600804", "0.6005115", "0.59953964", "0.5986326", "0.596344", "0.59135866", "0.59026814", "0.5831862", "0.58155453", "0.5810661", "0.5803752", "0.5803275", "0.5797316", "0.5794558", "0.57429147", "0.57325685", "0.57314724", "0.56483227", "0.56299853", "0.5607803", "0.5604489", "0.5603223", "0.55888164", "0.5565389", "0.5565336", "0.556261", "0.5549555", "0.5542627", "0.5534324", "0.55131567", "0.55110407", "0.5510999", "0.55097336", "0.55071247", "0.550018", "0.5496602", "0.5482582", "0.548144", "0.5458587", "0.54498947", "0.5448096", "0.5441828", "0.54392517", "0.5431978", "0.54126066", "0.5411234", "0.5400137", "0.53932154", "0.5392832", "0.53849864", "0.53658444", "0.53600425", "0.5350916", "0.53483886", "0.5341073", "0.5327378", "0.5323771", "0.53189313", "0.53157234", "0.5315373", "0.5314808", "0.53142476", "0.53114414", "0.53051084", "0.53033787", "0.5300601", "0.5290937", "0.5289759", "0.5286284", "0.52825344", "0.52809167", "0.527914", "0.5276413", "0.5272966" ]
0.703993
1
Create an instance of RoyaltyEntity given an JSON string
public static RoyaltyEntity fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, RoyaltyEntity.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "<T> T fromJson(String json, Class<T> type);", "<T> T fromJson(String source, Class<T> type);", "public <ENTITY extends IDomainResource> ENTITY parse(final String jsonString, final Class<ENTITY> targetClass)\n throws WebApplicationException\n {\n ENTITY entity = parseWithoutValidation(jsonString, targetClass);\n validate(entity);\n\n return entity;\n }", "<T> T fromJson(String source, JavaType type);", "T fromJson(Object source);", "public static <T> T fromJson(String json, Class<T> type)\n {\n return g.fromJson(json, type);\n }", "protected <T> Object fromJson(String jsonString, Class<T> classInstance) {\n\n\t\tSystem.out.println(\"jsonString = \" + jsonString);\n\t\treturn gson.fromJson(jsonString, classInstance);\n\n\t}", "public <T> T fromJson(String json, Class<T> clazz) {\n return getGson().fromJson(json, clazz);\n }", "public <ENTITY extends IDomainResource> ENTITY parseWithoutValidation(final String jsonString, final Class<ENTITY> targetClass)\n throws WebApplicationException\n {\n ENTITY entity = null;\n Response response = null;\n\n if (!jsonString.isEmpty())\n {\n try\n {\n entity = jsonToEntity(jsonString, targetClass);\n } catch (JsonParseException e)\n {\n LOG.warn(\"Unable to parse JSON Input: \" + e.getMessage());\n response = Response.status(Response.Status.BAD_REQUEST)\n .type(MediaType.APPLICATION_JSON_TYPE)\n .entity(ResponseEntity.toJson(Result.ERR_PARSE_ERROR))\n .build();\n } catch (JsonMappingException e)\n {\n LOG.warn(e.getMessage());\n if (e instanceof InvalidFormatException)\n {\n InvalidFormatException invalidFormatException = (InvalidFormatException) e;\n\n if (invalidFormatException.getTargetType().equals(EntityReferenceType.class))\n {\n response = Response.status(Response.Status.BAD_REQUEST)\n .type(MediaType.APPLICATION_JSON_TYPE)\n .entity(ResponseEntity.toJson(Result.ERR_UNKNOWN_ENTITY_TYPE, invalidFormatException.getValue()))\n .build();\n }\n }\n\n if (response == null)\n {\n response = VALIDATION_FAILURE;\n }\n } catch (IOException e)\n {\n LOG.warn(e.getMessage());\n response = VALIDATION_FAILURE;\n }\n } else\n {\n response = EMPTY_REQUEST_BODY;\n }\n\n if (response != null)\n {\n throw new WebApplicationException(response);\n }\n\n return entity;\n }", "public <T> T fromJson(String json, Type type) {\n return getGson().fromJson(json, type);\n }", "public abstract void fromJson(JSONObject jsonObject);", "@Override\n public X fromJson(EntityManager em, JSONValue jsonValue) {\n final ErraiEntityManager eem = (ErraiEntityManager) em;\n\n Key<X, ?> key = keyFromJson(jsonValue);\n\n X entity = eem.getPartiallyConstructedEntity(key);\n if (entity != null) {\n return entity;\n }\n\n entity = newInstance();\n try {\n eem.putPartiallyConstructedEntity(key, entity);\n for (Attribute<? super X, ?> a : getAttributes()) {\n ErraiAttribute<? super X, ?> attr = (ErraiAttribute<? super X, ?>) a;\n JSONValue attrJsonValue = jsonValue.isObject().get(attr.getName());\n\n // this attribute did not exist when the entity was originally persisted; skip it.\n if (attrJsonValue == null) continue;\n\n switch (attr.getPersistentAttributeType()) {\n case ELEMENT_COLLECTION:\n case EMBEDDED:\n case BASIC:\n parseInlineJson(entity, attr, attrJsonValue, eem);\n break;\n\n case MANY_TO_MANY:\n case MANY_TO_ONE:\n case ONE_TO_MANY:\n case ONE_TO_ONE:\n if (attr instanceof ErraiSingularAttribute) {\n parseSingularJsonReference(entity, (ErraiSingularAttribute<? super X, ?>) attr, attrJsonValue, eem);\n }\n else if (attr instanceof ErraiPluralAttribute) {\n parsePluralJsonReference(entity, (ErraiPluralAttribute<? super X, ?, ?>) attr, attrJsonValue.isArray(), eem);\n }\n else {\n throw new PersistenceException(\"Unknown attribute type \" + attr);\n }\n }\n }\n return entity;\n } finally {\n eem.removePartiallyConstructedEntity(key);\n }\n }", "public static <T> T fromJSON(final String json, final Class<T> clazz) {\n return gson.fromJson(json, clazz);\n }", "private <T> HttpEntity createHttpEntityForJson(T body) {\r\n\t\tString dataForEntity;\r\n\t\tif (!(body instanceof String)) {\r\n\t\t\tdataForEntity = gson.toJson(body);\r\n\t\t} else {\r\n\t\t\tdataForEntity = (String) body;\r\n\t\t}\r\n\t\t// try {\r\n\t\treturn new StringEntity(dataForEntity, Charset.forName(\"utf-8\"));\r\n\t\t// } catch (UnsupportedEncodingException e) {\r\n\t\t// e.printStackTrace();\r\n\t\t// }\r\n\t\t// return null;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static<T> T createObjectFromJSON(final JSONObject json) throws JSONException {\n\t\tif(json.has(\"type\")) {\n\t\t\treturn (T) Helper.createItemFromJSON(json);\n\t\t} else if(json.has(\"triple_pattern\")) {\n\t\t\treturn (T) Helper.createTriplePatternFromJSON(json);\n\t\t} else if(json.has(\"histogram\")) {\n\t\t\treturn (T) Helper.createVarBucketFromJSON(json);\n\t\t} else {\n\t\t\tSystem.err.println(\"lupos.distributed.operator.format.Helper.createObjectFromJSON(...): Unknown type stored in JSON object, returning null!\");\n\t\t\treturn null;\n\t\t}\n\t}", "Entity createEntity();", "public @Nullable <T> T fromJson(@Nullable String jsonString, @NonNull Class<T> clazz) {\n return gson.fromJson(jsonString, clazz);\n }", "GistUser deserializeUserFromJson(String json);", "static <T extends JSONSerializable> T deserialize(String json, Class<T> type) throws Exception {\n T result = type.newInstance();\n result.jsonDeserialize(json);\n return result;\n }", "public static <T> T fromJson(final String jsonString, final Class<T> clazz) {\n\t\treturn gson.fromJson(jsonString, clazz);\n\t}", "Gist deserializeGistFromJson(String json);", "public void fromJSON(String json) throws JSONException;", "public static SenseiRequest fromJSON(JSONObject json)\n throws Exception\n {\n return fromJSON(json, null);\n }", "public static <T> T jsonToEntity(String jsonTxt, Class<T> resultClass, ObjectMapper objectMapper)\n\t\t\tthrows IOException {\n\t\tT resultObject = objectMapper.readValue(jsonTxt, resultClass);\n\t\tif (resultObject == null) {\n\t\t\tthrow new IllegalArgumentException(\"null resultObject after JSON to Object conversion\");\n\t\t}\n\t\treturn resultObject;\n\t}", "public static DayTraining newInstance(String json) {\n try {\n JSONObject root = new JSONObject(json);\n return new DayTraining.Builder()\n .setRunning( root.optInt(\"t1\"), root.optInt(\"t2\"), root.optInt(\"t3\"), root.optInt(\"t2_3\"), root.optInt(\"t1_3\"), root.optInt(\"ta\"), root.optInt(\"tt\"))\n .setBreathing(root.optInt(\"gx\"), root.optInt(\"gp\"),root.optInt(\"gd\"))\n .setTrainingInfo(root.optInt(\"id_athlete\"), root.optString(\"date\"), filterJsonTotalInput(root.optString(\"description\")), root.optInt(\"texniki\"), root.optInt(\"drastiriotita\"), root.optInt(\"time\"), root.optInt(\"number\"), root.optInt(\"id_race\"))\n .build();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }", "public void createFromJSONString(String jsonData) throws JSONException {\n JSONObject placeJSON = new JSONObject(jsonData);\n\n // set id of place object\n this.setId(placeJSON.getString(\"_id\"));\n // set title of place object\n this.setTitle(placeJSON.getString(\"title\"));\n // set lat of place object\n this.setLat(placeJSON.getString(\"lat\"));\n // set lon of place object\n this.setLon(placeJSON.getString(\"lon\"));\n }", "public ProvisioningEntity parseJsonCacheEntity(String json) {\n if (StringUtils.isBlank(json)) {\n return null;\n }\n ProvisioningEntity provisioningEntity = this.cacheJsonToProvisioningEntity.get(json);\n \n if (provisioningEntity != null) {\n return provisioningEntity;\n }\n \n try {\n provisioningEntity = new ProvisioningEntity();\n provisioningEntity.fromJsonForCache(json);\n \n } catch (Exception e) {\n LOG.error(\"Problem parsing json '\" + json + \"'\", e);\n provisioningEntity = null;\n }\n \n this.cacheJsonToProvisioningEntity.put(json, provisioningEntity);\n return provisioningEntity;\n \n }", "RentalObject createRentalObject();", "public static NFT fromJSONString(final String data) {\n final JSONObject json = new JSONObject(data);\n final NFT nft =\n new NFT(\n json.getString(\"tokenId\"),\n json.getString(\"owner\"),\n json.getString(\"tokenURI\"),\n json.getString(\"approved\"));\n\n return nft;\n }", "static TodoItem fromJsonObject(JsonObject json) {\n TodoItem item = new TodoItem();\n item.setId(json.get(\"id\") == null ? -1 : json.getInt(\"id\"));\n item.setDescription(json.get(\"description\") == null ? null : json.getString(\"description\"));\n item.setCreatedAt(json.get(\"createdAt\") == null ? null : OffsetDateTime.parse(json.getString(\"createdAt\")));\n item.setDone(json.get(\"done\") == null ? false : json.getBoolean(\"done\"));\n LOGGER.fine(()->\"fromJsonObject returns:\"+item);\n return item;\n }", "<T> T toJsonPOJO(String jsonString, Class<T> classType);", "@BodyParser.Of(play.mvc.BodyParser.Json.class)\n public static Result create() throws JsonParseException, JsonMappingException, IOException {\n JsonNode json = request().body().asJson();\n Thing thing = mapper.treeToValue(json, Thing.class);\n thing.save();\n return ok(mapper.valueToTree(thing));\n }", "public static ArticleInfo fromJson(String jsonString) throws IOException {\n return JSON.getGson().fromJson(jsonString, ArticleInfo.class);\n }", "public static <T> T json2pojo(String jsonStr, Class<T> clazz)\n throws Exception {\n return objectMapper.readValue(jsonStr, clazz);\n }", "private void testJsonObject(String jsonString, Citation entity) {\n JSONObject testObject = new JSONObject(jsonString);\n\n String pid = testObject.getString(\"pid\");\n String url = testObject.getString(\"url\");\n String erc = testObject.getString(\"erc\");\n String who = testObject.getString(\"who\");\n String what = testObject.getString(\"what\");\n String time = testObject.getString(\"date\");\n\n Assert.assertEquals(entity.getPurl(), pid);\n Assert.assertEquals(entity.getUrl(), url);\n Assert.assertEquals(entity.getErc(), erc);\n Assert.assertEquals(entity.getWho(), who);\n Assert.assertEquals(entity.getWhat(), what);\n Assert.assertEquals(entity.getDate(), time);\n }", "public static JinyouTestOne fromJson(String jsonString) throws IOException {\n return JSON.getGson().fromJson(jsonString, JinyouTestOne.class);\n }", "Person addPerson(JSONObject person);", "<T> T parseToObject(Object json, Class<T> classObject);", "@Test\n public void readUserClassPatient() throws UnsupportedEncodingException, IOException {\n testJson = gson.toJson(Factory.createUser(\"Patient\"));\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n IUser actual = DataHandler.readUserClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Patient properly\", Factory.createUser(\"Patient\").getClass(), actual.getClass());\n }", "protected abstract E createEntity(String line);", "public Metadata(String _JSONString) {\n mJSONObject = new JSONObject();\n mJSONObject = (JSONObject) JSONValue.parse(_JSONString);\n\n // TODO: Maybe raise a 'malformed json string exception'\n if (mJSONObject == null) {\n \tLOGGER.info(\"Invalid JSON String received. new object was created, but its NULL.\");\n }\n }", "T createEntity();", "public static Game createGameFromJSON(String json) {\n JSONObject gameJSONObject = new JSONObject(json);\n List<String> agents = parseAgents(gameJSONObject);\n String[][] actions = parseActions(gameJSONObject);\n int[][][] values = parseValues(gameJSONObject);\n\n return new Game(agents, actions, values);\n }", "void fromJson(JsonStaxParser parser) throws SyntaxException, IOException;", "public static Item createItemFromJSON(final JSONObject itemJson) throws JSONException {\n\t\tif (itemJson.getString(\"type\").equals(\"variable\")) {\n\t\t\treturn Helper.createVariableFromJSON(itemJson);\n\t\t} else {\n\t\t\treturn Helper.createLiteralFromJSON(itemJson);\n\t\t}\n\t}", "public static ResponseWrapper fromJson(String json)\n\t{ \n\t\tResponseWrapper response = new ResponseWrapper();\n\t\tresponse.fromJsonCore(json, \"response\", (type) -> type.getResponseContentType()); \n\t\treturn response;\n\t}", "Entity make(Map<String,String> status) throws FactoryException;", "public static Personagem fromJson(JSONObject json){\n Personagem personagem = new Personagem(\n json.getString(\"nome\"),\n json.getString(\"raca\"),\n json.getString(\"profissao\"),\n json.getInt(\"mana\"),\n json.getInt(\"ataque\"),\n json.getInt(\"ataqueMagico\"),\n json.getInt(\"defesa\"),\n json.getInt(\"defesaMagica\"),\n json.getInt(\"velocidade\"),\n json.getInt(\"destreza\"),\n json.getInt(\"experiencia\"),\n json.getInt(\"nivel\")\n\n );\n return personagem;\n }", "public static Object converFromJson(String src, Class cls) {\n\n String[] lines = src\n .replaceAll(\",\", \"\")\n .replaceAll(\"\\\"\", \"\")\n .split(\"\\n\");\n\n Map<String, String> keyValues = new HashMap<>();\n\n for (int i = 1; i < lines.length - 1; i++) {\n String[] keyAndValue = lines[i].trim().split(\":\");\n keyValues.put(keyAndValue[0], keyAndValue[1]);\n }\n\n try {\n Object obj = cls.newInstance();\n\n for (Field field : cls.getDeclaredFields()) {\n if (field.isAnnotationPresent(MyField.class)) {\n Type type = field.getType();\n if (type == double.class) {\n field.set(obj, Double.parseDouble(keyValues.get((field.getName()))));\n } else if (type == int.class) {\n field.set(obj, Integer.parseInt(keyValues.get((field.getName()))));\n } else if (type == boolean.class) {\n field.set(obj, Boolean.valueOf(keyValues.get((field.getName()))));\n } else {\n field.set(obj, keyValues.get((field.getName())));\n }\n }\n }\n\n return obj;\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "@Test\n public void readUserClassSecretary() throws UnsupportedEncodingException, IOException {\n testJson = gson.toJson(Factory.createUser(\"Secretary\"));\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n IUser actual = DataHandler.readUserClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Secretary properly\", Factory.createUser(\"Secretary\").getClass(), actual.getClass());\n }", "public static Tweet fromJSON(JSONObject jsonObject) throws JSONException{\n Tweet tweet = new Tweet();\n\n //extract the values from JSON\n tweet.body = jsonObject.getString(\"text\");\n tweet.uid = jsonObject.getLong(\"id\");\n tweet.createdAt = jsonObject.getString(\"created_at\");\n tweet.user = User.fromJSON(jsonObject.getJSONObject(\"user\"));\n tweet.tweetId = Long.parseLong(jsonObject.getString(\"id_str\"));\n //tweet.extendedEntities = ExtendedEntities.fromJSON\n return tweet;\n\n }", "@Test\n public void readUserClassDoctor() throws UnsupportedEncodingException, IOException {\n testJson = gson.toJson(Factory.createUser(\"Doctor\"));\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n IUser actual = DataHandler.readUserClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Doctor properly\", Factory.createUser(\"Doctor\").getClass(), actual.getClass());\n }", "protected CategoryModel createFromJSON(JSONObject json, boolean useServer) throws JSONException {\n\t\treturn CategoryModel.fromJSON(json, useServer);\n\t}", "public static <T> T getTestObject(String rs, Class<T> clazz) throws Exception {\n return JSON.parseObject(readSourceFile(rs), clazz);\n }", "T newTagEntity(String tag);", "@Test\n public void fromJson() throws VirgilException, WebAuthnException {\n AuthenticatorMakeCredentialOptions options = AuthenticatorMakeCredentialOptions.fromJSON(MAKE_CREDENTIAL_JSON);\n AttestationObject attObj = authenticator.makeCredential(options);\n }", "public @Nullable <T> T fromJson(@NonNull Reader reader, @NonNull Class<T> clazz) {\n return gson.fromJson(reader, clazz);\n }", "public Organization(String jsonString) throws JSONException\n\t{\n\t\tthis(new JSONObject(jsonString));\n\t}", "E create(E entity);", "E create(E entity);", "public Dungeon load() {\n int width = json.getInt(\"width\");\n int height = json.getInt(\"height\");\n\n Dungeon dungeon = new Dungeon(width, height);\n\n JSONArray jsonEntities = json.getJSONArray(\"entities\");\n Map<String, List<Entity>> entitiesMap = loadEntities(dungeon, jsonEntities);\n\n // Only try and greate a goal condition if it is specified in json.\n if (json.has(\"goal-condition\")) {\n JSONObject goals = json.getJSONObject(\"goal-condition\");\n Goal mainGoal = loadGoals(entitiesMap, dungeon, goals);\n dungeon.setMainGoal(mainGoal);\n }\n\n return dungeon;\n }", "protected abstract ENTITY createEntity();", "void create(T entity);", "private Field(String jsonString) {\n this.jsonString = jsonString;\n }", "public static TestWebhookRequest fromJson(String jsonString) throws JsonProcessingException {\n return JSON.getMapper().readValue(jsonString, TestWebhookRequest.class);\n }", "TestEntity buildEntity () {\n TestEntity testEntity = new TestEntity();\n testEntity.setName(\"Test name\");\n testEntity.setCheck(true);\n testEntity.setDateCreated(new Date(System.currentTimeMillis()));\n testEntity.setDescription(\"description\");\n\n Specialization specialization = new Specialization();\n specialization.setName(\"Frontend\");\n specialization.setLevel(\"Senior\");\n specialization.setYears(10);\n\n testEntity.setSpecialization(specialization);\n\n return testEntity;\n }", "@Test\n public void readSystemObjectClassAccCrRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AccountCreationRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AccountCreationRequest properly\", object.getClass(), actual.getClass());\n }", "@Test\n public void readSystemObjectClassAppointmentRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AppointmentRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AppointmentRequest properly\", object.getClass(), actual.getClass());\n }", "@Test\n public void testCreateIssueEntityFromJson() throws Exception {\n String json = \"\"\n + \"{\\n\"\n + \" \\\"issues_in_text\\\": {\\n\"\n + \" \\\"context\\\": \\\"vimger test context\\\",\\n\"\n + \" \\\"k12n\\\": \\\"000\\\",\\n\"\n + \" \\\"subject\\\": \\\"000\\\",\\n\"\n + \" \\\"dod\\\": 60,\\n\"\n + \" \\\"type\\\": \\\"000\\\",\\n\"\n + \" \\\"qas\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"question\\\": \\\"which one is right?\\\",\\n\"\n + \" \\\"options\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"option\\\": \\\"A. 1+1=1\\\",\\n\"\n + \" \\\"answer\\\": \\\"1\\\"\\n\"\n + \" },\\n\"\n + \" {\\n\"\n + \" \\\"option\\\": \\\"B. 1+1=2\\\",\\n\"\n + \" \\\"answer\\\": \\\"0\\\"\\n\"\n + \" },\\n\"\n + \" {\\n\"\n + \" \\\"option\\\": \\\"C. 2+2=2\\\",\\n\"\n + \" \\\"answer\\\": \\\"1\\\"\\n\"\n + \" },\\n\"\n + \" {\\n\"\n + \" \\\"option\\\": \\\"D. 2+2=2\\\",\\n\"\n + \" \\\"answer\\\": \\\"0\\\"\\n\"\n + \" }\\n\"\n + \" ]\\n\"\n + \" }\\n\"\n + \" ]\\n\"\n + \" }\\n\"\n + \"}\";\n \n IssueEntity issue = converter.createIssueEntityFromJson(json);\n \n assertEquals(\"vimger test context\", issue.getContext());\n assertEquals(\"000\", issue.getK12n());\n assertEquals(\"000\", issue.getSubject());\n assertEquals(60, issue.getDod(), 0.1);\n assertEquals(\"000\", issue.getType());\n }", "@Test\n public void readUserClassAdmin() throws UnsupportedEncodingException, IOException {\n testJson = gson.toJson(Factory.createUser(\"Administrator\"));\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n IUser actual = DataHandler.readUserClass(reader);\n\n //compare results \n assertEquals(\"Fails to return user class properly\", Factory.createUser(\"Administrator\").getClass(), actual.getClass());\n }", "@Test\n\tpublic void testCreate(){\n\t\t\n\t\tString jsonStr = \"{'companyName':'Lejia', 'companyNameLocal':'Lejia', 'companyAddress':'Guangdong', 'txtEmail':'[email protected]', 'telephone':'17721217320', 'contactPerson':'Molly'}\";\n\t\tcreateUser.createUserMain(jsonStr);\n\t\t\n\t}", "public JSONModel(final String json) throws JSONException {\n jo = new JSONObject(json);\n }", "private Recipe mapToRecipeObject(RecipeEntity recipeEntity) {\n\t\tRecipe recipe = new Recipe();\n\t\t//Map primitive fields\n\t\trecipe.setId(recipeEntity.getId());\n\t\trecipe.setName(recipeEntity.getName());\n\t\trecipe.setType(recipeEntity.getType());\n\t\trecipe.setServingCapacity(recipeEntity.getServingCapacity());\n\t\t\n\t\t//Format creation date time to required format\n\t\tif(recipeEntity.getCreationDateTime() != null)\n\t\t\trecipe.setCDateTimeString(Util.formatDateTime(recipeEntity.getCreationDateTime()));\n\t\trecipe.setCreationDateTime(recipeEntity.getCreationDateTime());\n\t\t\n\t\t//Convert ingredients string into list and set to recipe object \n\t\tlog.debug(\"Ingredients String from DB: \"+recipeEntity.getIngredients());\n\t\tList<Ingredient> ingredientsList = Util.convertJSONStringToIngredientsList(recipeEntity.getIngredients());\n\t\tlog.debug(\"Ingredients List size after conversion: \"+ingredientsList.size());\n\t\trecipe.setIngredientsList(ingredientsList);\n\n\t\trecipe.setInstructions(recipeEntity.getInstructions());\n\n\t\treturn recipe;\n\t}", "@Test\n public void testFromJSON() {\n System.out.println(\"fromJSON\");\n String json = \"\";\n Resource expResult = null;\n Resource result = Resource.fromJSON(json);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void readSystemObjectClassAppointment() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"Appointment\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Appointment properly\", object.getClass(), actual.getClass());\n }", "public static BankAccount fromJson(String jsonString) throws IOException {\n return JSON.getGson().fromJson(jsonString, BankAccount.class);\n }", "public UpdateEntity(String json) throws JSONException {\n\n JSONObject jso = new JSONObject(json);\n JSONObject jsonObject = jso.getJSONObject(\"data\");\n String code = jsonObject.getString(\"versionCode\");\n if (!StringUtils.isStringNull(code)) {\n\t\t\tthis.versionCode = Integer.valueOf(code);\n\t\t}else{\n\t\t\tthis.versionCode = 0;\n\t\t}\n this.versionName = jsonObject.getString(\"versionName\");\n this.isForceUpdate = jsonObject.getString(\"isForceUpdate\");\n this.downUrl = jsonObject.getString(\"downUrl\");\n this.preBaselineCode = jsonObject.getString(\"preBaselineCode\");\n this.updateLog = jsonObject.getString(\"updateLog\");\n// this.md5 = jsonObject.getString(\"md5\");\n\n }", "private <T> T convert(String json, Type resultObject) {\n\t\tGson gson = new GsonBuilder().create();\n\t\treturn gson.fromJson(json, resultObject);\n\t}", "public static <T> T mapJsonToObject(String json, Class<T> classType) {\n\t\tT obj = null;\n\t\tif (StringUtils.isBlank(json)) {\n\t\t\treturn null;\n\t\t}\n\t\ttry {\n\t\t\tobj = jsonMapper.readValue(json, classType);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"error mapJsonToObject: \" + e.getMessage());\n\t\t}\n\t\treturn obj;\n\t}", "@Test\n @SmallTest\n public void testReadFromJsonString() throws Throwable {\n final String jsonObjectString =\n \"{'crash-local-id':'123456abc','crash-capture-time':1234567890,\"\n + \"'crash-keys':{'app-package-name':'org.test.package'}}\";\n\n CrashInfo parsed = CrashInfo.readFromJsonString(jsonObjectString);\n CrashInfo expected =\n createCrashInfo(\"123456abc\", 1234567890, null, -1, \"org.test.package\", null);\n Assert.assertThat(parsed, equalsTo(expected));\n }", "public static <T> T loadJson(String content, Class<T> valueType){\n return (T)JsonMapper.fromJsonString(content, valueType);\n }", "public static <T> T pasarAObjeto(String json, Class<T> tipo) {\r\n try {\r\n ObjectMapper mapper = getBuilder().build();\r\n return mapper.readValue(json, tipo);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }", "void create(T entity) throws Exception;", "public static <RN extends GenRn, E extends Entity> RN newInstance(Class<E> entity) {\n final StringBuilder classPath = new StringBuilder(\"br.com.rn.\");\r\n classPath.append(entity.getSimpleName());\r\n classPath.append(\"Rn\");\r\n\r\n try {\r\n\r\n // Carrega a classe da Rn especifia da classe passada\r\n final Class rnClass = GenDao.class.getClassLoader().loadClass(classPath.toString());\r\n\r\n // Cria uma instância da Rn\r\n return (RN) rnClass.newInstance();\r\n\r\n } catch (ClassNotFoundException | IllegalAccessException | \r\n IllegalArgumentException | InstantiationException | SecurityException ignore) {\r\n \r\n // Como não foi encontrada uma Rn específica retorna uma genérica\r\n return (RN) new GenRn();\r\n \r\n }\r\n\r\n }", "public Patient (String JSONString) {\n try {\n JSONObject n = new JSONObject(JSONString);\n name = n.get(\"name\").toString();\n fathersName = n.get(\"fathersName\").toString();\n mothersName = n.get(\"mothersName\").toString();\n SimpleDateFormat parser = new SimpleDateFormat(\"dd/MM/yyyy\");\n birthDate = parser.parse(n.get(\"birthDate\").toString());\n sex = n.get(\"sex\").toString();\n pid = n.get(\"pid\").toString();\n doctype = Integer.valueOf(n.get(\"doctype\").toString());\n enrolledSchema = new Schema(n.get(\"enrolledProject\").toString());\n /*JSONArray arry = new JSONArray(n.get(\"enrolledProjects\").toString());\n for (int i = 0; i < arry.length(); i++){\n enrolledProjects.add(new Project(arry.getString(i)));\n }*/\n nationalID = n.get(\"nationalID\").toString();\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n catch (ParseException e){\n e.printStackTrace();\n }\n }", "protected abstract EntityBase createEntity() throws Exception;", "public static <T> T loadJson(String input, Class<T> classOfT) {\n Gson gson = new GsonBuilder().create();\n return gson.fromJson(input, classOfT);\n }", "public Object parseJsonToObject(String response, Class<?> modelClass) {\n\n try {\n return gson.fromJson(response, modelClass);\n } catch (Exception ex) {\n ex.printStackTrace();\n return null;\n }\n }", "public static TwingoTweet fromJson(String inputJson) {\n return new Gson().fromJson(inputJson, TwingoTweet.class);\n }", "public native Object parse( Object json, String texturePath );", "private static User getUserFromJson(String userJson) throws Exception {\n verifyJsonFormatting(userJson);\n ObjectMapper objectMapper = new ObjectMapper();\n return objectMapper.readValue(userJson, User.class);\n }", "public static Spell createSpellFromJsonString(String spellJsonString, String name) throws JSONException {\n JSONArray jsonArray = null;\n try {\n jsonArray = new JSONArray(spellJsonString);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n for (int i = 0; i < jsonArray.length(); i++) {\n try {\n JSONObject jsonObj = jsonArray.getJSONObject(i);\n if (jsonObj.getString(\"spell\").equals(name)) {\n setSpell(jsonObj);\n break;\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n return spell;\n }", "@Test\n public void readSystemObjectClassDoctorFeedback() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"DoctorFeedback\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return DoctorFeedback properly\", object.getClass(), actual.getClass());\n }", "public static Anuncio fromJson(String json) throws JsonParseException{\n Gson gson = new Gson();\n return gson.fromJson(json, Anuncio.class);\n }", "@JsonCreator\n public static DataType fromString(String name) {\n return fromString(name, DataType.class);\n }", "@Override\n @SuppressWarnings(\"PMD.LawOfDemeter\")\n public O apply(final String json) {\n return JsonPath\n .parse(json)\n .read(expression, clazz);\n }", "GistComment deserializeCommentFromJson(String json);", "public ExpenseEntity parse(String line);", "public static <T> T string2Object(String source, Class<T> type){\n\t\treturn JSON.parseObject(source, type);\n\t}", "E create(Resource data);" ]
[ "0.6723152", "0.65252554", "0.6454739", "0.6272999", "0.6159504", "0.6157141", "0.6134517", "0.5968286", "0.5963455", "0.59563273", "0.5892227", "0.58585006", "0.58485216", "0.58478504", "0.5812986", "0.579768", "0.57882595", "0.5778314", "0.5770127", "0.57645005", "0.57236844", "0.572156", "0.572063", "0.5719685", "0.57162464", "0.5700564", "0.5687669", "0.5651302", "0.563345", "0.5633407", "0.5577547", "0.5533657", "0.552332", "0.5486838", "0.54780895", "0.5471367", "0.54697543", "0.54682857", "0.5443226", "0.5434033", "0.5425926", "0.54137635", "0.5376945", "0.5376901", "0.53684866", "0.5357115", "0.53392416", "0.53362185", "0.53340113", "0.53259575", "0.531435", "0.530372", "0.5293541", "0.52890295", "0.5252651", "0.52196693", "0.52179843", "0.52170867", "0.5194232", "0.5194232", "0.51803136", "0.5180302", "0.51781094", "0.5173604", "0.51620865", "0.5160033", "0.5159819", "0.5143024", "0.5139442", "0.51393396", "0.51354843", "0.5134113", "0.51198906", "0.51198035", "0.51039606", "0.5094806", "0.50875634", "0.50851643", "0.50709", "0.5070502", "0.50693333", "0.50617224", "0.50542927", "0.5044546", "0.5044339", "0.5034754", "0.5034697", "0.5033196", "0.50328267", "0.5028707", "0.5028058", "0.502473", "0.5020087", "0.50194216", "0.5017797", "0.50119466", "0.5009961", "0.49997744", "0.49965504", "0.49930358" ]
0.83104694
0
Convert an instance of RoyaltyEntity to an JSON string
public String toJson() { return JSON.getGson().toJson(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String toJsonString();", "public abstract String toJson();", "public abstract Object toJson();", "public String toJson() { return new Gson().toJson(this); }", "public static <T> String serizalize(T entity) {\n\t\t\n\t\tif (entity != null) {\n\t\t\tGson gson = new GsonBuilder()\n\t\t\t\t\t// .setPrettyPrinting() // uncomment this line to turn on debugging\n\t\t\t\t\t.registerTypeAdapterFactory(new EnumAdapterFactory())\n\t\t\t\t\t.registerTypeAdapter(Date.class, new JSONDateTypeAdapter())\n\t\t\t\t\t.create();\n\n\t\t\treturn gson.toJson(entity);\n\t\t}\n\n\t\treturn null;\n\t}", "public String jsonify() {\n return gson.toJson(this);\n }", "String toJSON();", "public String toJSON(){\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "public String toJsonString() {\n return JsonUtils.getGson().toJson(toJson());\n }", "public String toJson() {\n try{\n return new JsonSerializer().getObjectMapper().writeValueAsString(this);\n } catch (IOException e){\n throw new RuntimeException(e);\n }\n }", "public String toJson() {\r\n\r\n\treturn new Gson().toJson(this);\r\n }", "@Override\n\tpublic String toJSON()\n\t{\n\t\tStringJoiner json = new StringJoiner(\", \", \"{\", \"}\")\n\t\t.add(\"\\\"name\\\": \\\"\" + this.name + \"\\\"\")\n\t\t.add(\"\\\"id\\\": \" + this.getId());\n\t\tString locationJSON = \"\"; \n\t\tif(this.getLocation() == null)\n\t\t{\n\t\t\tlocationJSON = null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlocationJSON = this.getLocation().toJSON(); \n\t\t}\n\t\tjson.add(\"\\\"location\\\": \" + locationJSON);\n\t\tStringJoiner carsJSON = new StringJoiner(\", \", \"[\", \"]\");\n\t\tfor(Object r : cars)\n\t\t{\n\t\t\tcarsJSON.add(((RollingStock) r).toJSON());\n\t\t}\n\t\tjson.add(\"\\\"cars\\\": \" + carsJSON.toString());\n\t\treturn json.toString(); \n\t}", "@Override\n public String encode() {\n JsonObject tmp = new JsonObject();\n addIfSet(tmp, \"id\", id);\n addIfSet(tmp, \"courseId\", courseId);\n addIfSet(tmp, \"sheetId\", sheetId);\n addIfSet(tmp, \"maxPoints\", maxPoints);\n addIfSet(tmp, \"type\", type);\n addIfSet(tmp, \"link\", link);\n addIfSet(tmp, \"bonus\", bonus);\n addIfSet(tmp, \"linkName\", linkName);\n addIfSet(tmp, \"submittable\", submittable);\n addIfSet(tmp, \"resultVisibility\", resultVisibility);\n tmp = super.encodeToObject(tmp);\n return tmp.toString();\n }", "@Override\n\tprotected String toJSON()\n\t{\n\t\treturn getJSON(null);\n\t}", "public static String entityToJson(Object obj, ObjectMapper objectMapper) throws IOException {\n\t\tString jsonString;\n\t\tobjectMapper.enable(SerializationFeature.INDENT_OUTPUT);\n\t\tjsonString = objectMapper.writeValueAsString(obj);\n\t\treturn jsonString;\n\t}", "public String toJson() {\n Gson gson = new Gson();\n TurretServer ta = cast(this);\n return gson.toJson(ta);\n }", "public String serializeJSON () {\n ObjectMapper mapper = new ObjectMapper();\n String jsonString = null;\n \n try {\n jsonString = mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n return jsonString;\n }", "public String toJSON() {\n return new Gson().toJson(this);\n }", "public String toJsonString() {\n\t\tString json = null;\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.setSerializationInclusion(Include.NON_NULL);\n\t\tmapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);\n\t\ttry {\n\t\t\tjson = mapper.writeValueAsString(this);\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn json;\n\t}", "public String toJson() throws JsonProcessingException {\n return JSON.getMapper().writeValueAsString(this);\n }", "public String toJson() throws JsonProcessingException {\n return JSON.getMapper().writeValueAsString(this);\n }", "@Override\n protected String bodyAsJsonString() {\n return gson.toJson(draft);\n }", "public String toJson(Object obj){\n return new Gson().toJson(obj);\n }", "@Override\n public String toString() {\n return jsonString;\n }", "@JsonIgnore\n\tpublic String getAsJSON() {\n\t\ttry {\n\t\t\treturn TransportService.mapper.writeValueAsString(this); // thread-safe\n\t\t} catch (JsonGenerationException e) {\n\t\t\tlog.error(e, \"JSON Generation failed\");\n\t\t} catch (JsonMappingException e) {\n\t\t\tlog.error(e, \"Mapping from Object to JSON String failed\");\n\t\t} catch (IOException e) {\n\t\t\tlog.error(e, \"IO failed\");\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn toJSON().toString();\n\t}", "public String toJSON() throws JSONException;", "public String toJson() {\n\n final StringBuilder jsonRepresentation = new StringBuilder();\n\n jsonRepresentation.append(\"[\");\n\n final Iterator<TrackingDataEntry> entriesIter = getEntries().iterator();\n while (entriesIter.hasNext()) {\n\n final TrackingDataEntry entry = entriesIter.next();\n\n serializeTrackingDataVariables(jsonRepresentation, entry.getVars());\n\n if (null != entry.getName()) {\n jsonRepresentation.append(\",\\\"name\\\":\\\"\").append(entry.getName()).append(\"\\\"\");\n }\n if (null != entry.getId()) {\n jsonRepresentation.append(\",\\\"id\\\":\\\"\").append(entry.getId()).append(\"\\\"\");\n }\n if (null != entry.getType()) {\n jsonRepresentation.append(\",\\\"type\\\":\\\"\").append(entry.getType()).append(\"\\\"\");\n }\n if (null != entry.getUrl()) {\n jsonRepresentation.append(\",\\\"url\\\":\\\"\").append(entry.getUrl()).append(\"\\\"\");\n }\n jsonRepresentation.append(\"}\");\n if (entriesIter.hasNext()) {\n jsonRepresentation.append(\",\");\n }\n }\n\n jsonRepresentation.append(\"]\");\n\n return jsonRepresentation.toString();\n }", "@Override\n\tpublic String toString() {\n\t\treturn Json.pretty( this );\n\t}", "public String getAsJson() {\n StringBuffer sb = new StringBuffer();\n sb.append(\"{\\\"code\\\": \\\"\").append(this.code).append(\"\\\", \");\n sb.append(\"\\\"color\\\": \\\"\").append(this.color).append(\"\\\", \");\n\n /* Append a size only if the product has a Size */\n if (this.size.getClass() != NoSize.class) {\n sb.append(\"\\\"size\\\": \\\"\").append(this.size).append(\"\\\", \");\n }\n\n sb.append(\"\\\"price\\\": \").append(this.price).append(\", \");\n sb.append(\"\\\"currency\\\": \\\"\").append(this.currency).append(\"\\\"}, \");\n\n return sb.toString();\n }", "String toJSONString(Object data);", "@Override\r\n\tpublic String toJsonString() {\n\t\treturn null;\r\n\t}", "public String toJsonString() {\n String str;\n String str2;\n try {\n if (this.lifetime == null) {\n str = \"null\";\n } else {\n str = \"\\\"\" + this.lifetime.toString() + \"\\\"\";\n }\n if (this.frequency == null) {\n str2 = \"\";\n } else {\n str2 = \",\\\"frequency\\\":\" + this.frequency;\n }\n return \"{\\\"enabled\\\":\" + this.enabled + str2 + \",\\\"lifetime\\\":\" + str + \"}\";\n } catch (Exception e) {\n C3490e3.m663c(e.getMessage());\n return \"\";\n }\n }", "@Override\n\tpublic String toJSON() {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}", "@Override\n public String toJsonString() {\n GsonBuilder gsonBuilder = new GsonBuilder();\n gsonBuilder.registerTypeAdapter(TransferOperation.class, new TransferSerializer());\n return gsonBuilder.create().toJson(this);\n }", "public String toJson() {\n return this.toJson(SerializationFormattingPolicy.None);\n }", "public String toJson()\n\t{\n\t\tJsonStringEncoder encoder = JsonStringEncoder.getInstance();\n\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append('{');\n\n\t\tboolean needComma = true;\n\t\tif (m_Message != null)\n\t\t{\n\t\t\tchar [] message = encoder.quoteAsString(m_Message.toString());\n\t\t\tbuilder.append(\"\\n \\\"message\\\" : \\\"\").append(message).append('\"').append(',');\n\t\t\tneedComma = false;\n\t\t}\n\n\t\tif (m_ErrorCode != null)\n\t\t{\n\t\t\tbuilder.append(\"\\n \\\"errorCode\\\" : \").append(m_ErrorCode.getValueString());\n\t\t\tneedComma = true;\n\t\t}\n\n\t\tif (m_Cause != null)\n\t\t{\n\t\t\tif (needComma)\n\t\t\t{\n\t\t\t\tbuilder.append(',');\n\t\t\t}\n\t\t\tchar [] cause = encoder.quoteAsString(m_Cause.toString());\n\t\t\tbuilder.append(\"\\n \\\"cause\\\" : \\\"\").append(cause).append('\"');\n\t\t}\n\n\t\tbuilder.append(\"\\n}\\n\");\n\n\t\treturn builder.toString();\n\t}", "@Override\n public String toString() {\n Gson gson = new Gson();\n\n String json = gson.toJson(this);\n System.out.println(\"json \\n\" + json);\n return json;\n }", "@Override\n public String toString() {\n return gson.toJson(this);\n }", "JSONObject toJson();", "JSONObject toJson();", "@SuppressWarnings({\"hiding\", \"static-access\"})\n @Override\n public RavenJObject toJson() {\n RavenJObject ret = new RavenJObject();\n ret.add(\"Key\", new RavenJValue(key));\n ret.add(\"Method\", RavenJValue.fromObject(getMethod().name()));\n\n RavenJObject patch = new RavenJObject();\n patch.add(\"Script\", new RavenJValue(this.patch.getScript()));\n patch.add(\"Values\", RavenJObject.fromObject(this.patch.getValues()));\n\n ret.add(\"Patch\", patch);\n ret.add(\"DebugMode\", new RavenJValue(debugMode));\n ret.add(\"AdditionalData\", additionalData);\n ret.add(\"Metadata\", metadata);\n\n if (etag != null) {\n ret.add(\"Etag\", new RavenJValue(etag.toString()));\n }\n if (patchIfMissing != null) {\n RavenJObject patchIfMissing = new RavenJObject();\n patchIfMissing.add(\"Script\", new RavenJValue(this.patchIfMissing.getScript()));\n patchIfMissing.add(\"Values\", RavenJObject.fromObject(this.patchIfMissing.getValues()));\n ret.add(\"PatchIfMissing\", patchIfMissing);\n }\n return ret;\n }", "public static <T> String object2String(T obj){\n\t\treturn JSON.toJSONString(obj);\n\t}", "public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "public String toJsonData() {\n\t\treturn new Gson().toJson(this);\n\t}", "@Override\n public String toString() {\n return new JSONSerializer().serialize(this);\n }", "public final native String toJson() /*-{\n // Safari 4.0.5 appears not to honor the replacer argument, so we can't do this:\n \n // var replacer = function(key, value) {\n // if (key == '__key') {\n // return;\n // }\n // return value;\n // }\n // return $wnd.JSON.stringify(this, replacer);\n \n var key = this.__key;\n delete this.__key;\n var rf = this.__rf;\n delete this.__rf;\n var gwt = this.__gwt_ObjectId;\n delete this.__gwt_ObjectId;\n // TODO verify that the stringify() from json2.js works on IE\n var rtn = $wnd.JSON.stringify(this);\n this.__key = key;\n this.__rf = rf;\n this.__gwt_ObjectId = gwt;\n return rtn;\n }-*/;", "public String getJson();", "@Override\r\n\tpublic String toString() {\n\t\treturn JSONObject.toJSONString(this);\r\n\t}", "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }", "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }", "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }", "public String toJson() throws Exception {\n\t\treturn WebAccess.mapper.writeValueAsString(this);\n\t}", "@Override\n\tpublic JSONObject toJson() throws JSONException {\n\t\tJSONObject result = super.toJson();\n\t\treturn result;\n\t}", "public static String toJson(Object obj, boolean withId, boolean withClass) {\n\t\ttry {\n\t\t\treturn JSONSerializer.toString(obj, withId, withClass, false);\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(\"Exception serializing \" + obj, e);\n\t\t}\n\t}", "@Override\r\n public String toString() {\r\n return JsonSerializer.SerializeObject(this);\r\n }", "public JSONObject toJson() {\n }", "String toJson() throws IOException;", "<T> String toJson(T source);", "private String convertToJson(Users user) throws JsonProcessingException{\n\t ObjectMapper objectMapper = new ObjectMapper();\n\t return objectMapper.writeValueAsString(user); \n\t}", "private static String asJsonString(final Object obj) {\n try {\n return new ObjectMapper().writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "@Override\n public String toString() {\n ObjectMapper mapper = new ObjectMapper();\n try {\n return mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n return null;\n }\n }", "private static String asJsonString(final Object obj) {\n try {\n ObjectMapper objectToJsonMapper = new ObjectMapper();\n objectToJsonMapper.registerModule(new JavaTimeModule());\n objectToJsonMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);\n return objectToJsonMapper.writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public String toJson() throws Exception {\r\n\t\treturn SimpleJson.HashMapToText(getJsonToken());\r\n\t}", "public JsonObject toJson();", "@Override\n public Object toJson() {\n JSONObject json = (JSONObject)super.toJson();\n json.put(\"name\", name);\n json.put(\"reason\", reason);\n return json;\n }", "@Transactional(propagation = Propagation.REQUIRED)\n\tpublic String getEmployeeListJSON(){\n\t\tGson gson = new GsonBuilder()\n\t\t\t\t\t\t.setDateFormat(\"dd/MM/yyyy\")\n\t\t\t\t\t\t.create();\n\t\t String rtnString = gson.toJson(daoImpl.getEmployees());\n\t\t \n\t\t return rtnString;\n\t}", "protected String getJSON() {\n/*Generated! Do not modify!*/ return gson.toJson(replyDTO);\n/*Generated! Do not modify!*/ }", "@Override\r\n\tpublic JSONObject toJSON() {\n\t\treturn null;\r\n\t}", "public static <T> JsonObject toJson(final T entity) {\n return To.toJObject(entity, \"\");\n }", "public static String toJSON (Object obj) throws AndroidAgentException {\n\t\ttry {\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\treturn mapper.writeValueAsString(obj);\n\t\t} catch (JsonMappingException e) {\n\t\t\tthrow new AndroidAgentException(\"Error occurred while mapping class to json\", e);\n\t\t} catch (JsonGenerationException e) {\n\t\t\tthrow new AndroidAgentException(\"Error occurred while generating json\", e);\n\t\t} catch (IOException e) {\n\t\t\tthrow new AndroidAgentException(\"Error occurred while reading the stream\", e);\n\t\t}\n\t}", "@Override\n\tpublic JSONObject toJson() {\n\t\treturn null;\n\t}", "private String convertToJson(Contacts contact) throws JsonProcessingException{\n\t ObjectMapper objectMapper = new ObjectMapper();\n\t return objectMapper.writeValueAsString(contact); \n\t}", "public static String asJsonString(VoteSession voteSession) {\n try {\n ObjectMapper objectMapper = new ObjectMapper();\n objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);\n objectMapper.registerModules(new JavaTimeModule());\n\n return objectMapper.writeValueAsString(voteSession);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "@Override\r\n public JSONObject toJSON() {\r\n return this.studente.toJSON();\r\n }", "@Override\r\n\tpublic String toString() {\r\n\t\tJsonObject jo = new JsonObject();\r\n\t\t\r\n\t\tjo.addProperty(\"IssuerInfo\", issuerInfo.toString());\r\n\t\tjo.addProperty(\"SubjectInfo\", subjectInfo.toString());\r\n\t\tjo.addProperty(\"AccessRights\", accessRights.toString());\r\n\t\tjo.addProperty(\"ResourceID\", resourceId);\r\n\t\tjo.addProperty(\"ValidityCondition\", validityCondition.toString());\r\n\t\tjo.addProperty(\"RevocationURL\", revocationUrl);\r\n\t\tString sig = \"\";\r\n\t\tfor(byte b : digitalSignature){\r\n\t\t\tsig = sig + Integer.toHexString(0xFF & b);\r\n\t\t}\r\n\t\tjo.addProperty(\"DigitalSignature\", sig);\r\n\t\t\r\n\t\treturn jo.toString();\r\n\t}", "public String CriteriatoJson() {\n\t\t\tJsonb jsonb = JsonbBuilder.create((new JsonbConfig().withFormatting(true)));\n\t\t \tString json = jsonb.toJson(criteria);\n\t\t\treturn json;\n\n\t }", "private String convertToJSON(Object o) throws JsonProcessingException {\n return new ObjectMapper().writeValueAsString(o);\n }", "public Object toPojo(Entity entity) {\n return ofy().load().fromEntity(entity);\n }", "private String converttoJson(Object followUpDietStatusInfo) throws JsonProcessingException {\n ObjectMapper objectMapper = new ObjectMapper();\n return objectMapper.writeValueAsString(followUpDietStatusInfo);\n }", "private String converttoJson(Object medicine) throws JsonProcessingException {\r\n ObjectMapper objectMapper = new ObjectMapper();\r\n return objectMapper.writeValueAsString(medicine);\r\n }", "public final static String toJson(final Object src) {\n\t\treturn gson.toJson(src);\n\t}", "public static String convertObjToString(Object clsObj) {\n String jsonSender = new Gson().toJson(clsObj, new TypeToken<Object>() {\n }.getType());\n return jsonSender;\n }", "public String toJson(Object src) {\n return getGson().toJson(src);\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getAccountId() != null)\n sb.append(\"AccountId: \").append(getAccountId()).append(\",\");\n if (getCreatedBy() != null)\n sb.append(\"CreatedBy: \").append(getCreatedBy()).append(\",\");\n if (getCreateDate() != null)\n sb.append(\"CreateDate: \").append(getCreateDate()).append(\",\");\n if (getName() != null)\n sb.append(\"Name: \").append(getName()).append(\",\");\n if (getFormat() != null)\n sb.append(\"Format: \").append(getFormat()).append(\",\");\n if (getFormatOptions() != null)\n sb.append(\"FormatOptions: \").append(getFormatOptions()).append(\",\");\n if (getInput() != null)\n sb.append(\"Input: \").append(getInput()).append(\",\");\n if (getLastModifiedDate() != null)\n sb.append(\"LastModifiedDate: \").append(getLastModifiedDate()).append(\",\");\n if (getLastModifiedBy() != null)\n sb.append(\"LastModifiedBy: \").append(getLastModifiedBy()).append(\",\");\n if (getSource() != null)\n sb.append(\"Source: \").append(getSource()).append(\",\");\n if (getPathOptions() != null)\n sb.append(\"PathOptions: \").append(getPathOptions()).append(\",\");\n if (getTags() != null)\n sb.append(\"Tags: \").append(getTags()).append(\",\");\n if (getResourceArn() != null)\n sb.append(\"ResourceArn: \").append(getResourceArn());\n sb.append(\"}\");\n return sb.toString();\n }", "public void toEntity(){\n\n }", "public String toJSON(){\n Map<String, Object> foo = new HashMap<String, Object>();\n foo.put(\"message\", \"Audit message generated\");\n foo.put(\"eventIndex\", index);\n foo.put(\"eventTimestamp\", Instant.now().toEpochMilli());\n try {\n // Convert the Map to JSON and send the raw JSON as the message.\n // The Audit appender formatter picks that json up and pubishes just the JSON to the topic\n return new ObjectMapper().writeValueAsString(foo);\n } catch (JsonProcessingException e) {\n // should never happen in this example\n throw new RuntimeException(\"impossible error \", e);\n }\n\n }", "public static String toJson(Object obj) {\n\t\treturn toJson(obj, true, true);\n\t}", "public <T> String toString(EntityType<T> source, MediaType targetType, Object entity) {\n try {\n StringWriter stringWriter = new StringWriter();\n toRepresentation(WritableContext.wrap(stringWriter, targetType), source, entity);\n return stringWriter.toString();\n } catch (RestException | IOException e) {\n throw new UnsupportedOperationException(e);\n }\n }", "protected abstract Serializable getEntity();" ]
[ "0.6943867", "0.6891794", "0.68673605", "0.6666249", "0.66629815", "0.6589793", "0.657596", "0.6490578", "0.6479957", "0.6457148", "0.6426226", "0.6397826", "0.6382273", "0.63595206", "0.63550234", "0.6327845", "0.62474436", "0.624052", "0.62077206", "0.6187451", "0.6187451", "0.61598045", "0.61572886", "0.61522686", "0.614595", "0.6109677", "0.6093546", "0.6092853", "0.60905063", "0.60777915", "0.6077167", "0.6064953", "0.6052571", "0.6050927", "0.60492104", "0.6046673", "0.60261536", "0.6016044", "0.6010892", "0.6007809", "0.6007809", "0.59645444", "0.5943853", "0.59419495", "0.59419495", "0.5895366", "0.5890908", "0.5890485", "0.5888312", "0.5882734", "0.5880905", "0.5880905", "0.5880905", "0.58702886", "0.58685696", "0.5856845", "0.5844308", "0.5795855", "0.57838625", "0.57807916", "0.57790625", "0.57734907", "0.5772034", "0.5763274", "0.5759262", "0.57510716", "0.57510096", "0.57369506", "0.5735662", "0.5704807", "0.57005024", "0.56964254", "0.5694344", "0.568574", "0.5680593", "0.5679704", "0.5668824", "0.565683", "0.56472003", "0.5643838", "0.56378686", "0.5636021", "0.56355655", "0.5632484", "0.56308675", "0.56286263", "0.5624749", "0.56201524", "0.56022453", "0.55972594", "0.55808496" ]
0.6622827
13
make constructor private for single instance control
private MyAlbumList() { albums = new ArrayList<Album>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "private Instantiation(){}", "private SingleTon() {\n\t}", "private TMCourse() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "private UI()\n {\n this(null, null);\n }", "private MApi() {}", "private GuiUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "private Supervisor() {\r\n\t}", "private InstanceUtil() {\n }", "Reproducible newInstance();", "private Singleton()\n\t\t{\n\t\t}", "private SingleObject()\r\n {\r\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "public ControlClass(String expID){\r\n \tinitialize(expID,null,null,null); \t\r\n }", "public Climber(){\n\t\tinst = this;\n\t}", "private Singleton() {\n\t}", "private ChatUI()\n\t{\n\t}", "public ControlFactoryImpl() {\n\t\tsuper();\n\t}", "private Marinator() {\n }", "private Marinator() {\n }", "Constructor() {\r\n\t\t \r\n\t }", "private Validate(){\n //private empty constructor to prevent object initiation\n }", "private SingleObject(){\n }", "private ChainingMethods() {\n // private constructor\n\n }", "private Reactive() {\r\n\t\t// utility class\r\n\t}", "public Constructor(){\n\t\t\n\t}", "private SingleObject(){}", "private SingletonObject() {\n\n\t}", "private Utils()\n {\n // Private constructor to prevent instantiation\n }", "private LOCFacade() {\r\n\r\n\t}", "private Singleton2A(){\n\t\tif(instance != null){\n\t\t\tthrow new RuntimeException(\"One instance already created cant create other\");\n\t\t}\t\t\n\t\tSystem.out.println(\"I am private constructor\");\n\t}", "private Service() {}", "private Cat() {\n\t\t\n\t}", "private ControlloFile() {\n\t}", "public Instance() {\n }", "private FactoryCacheValet() {\n\t\tsuper();\n\t}", "private SystemInfo() {\r\n // forbid object construction \r\n }", "private TetrisMain() {\r\n //prevents instantiation\r\n }", "private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}", "private Singleton() { }", "private Help() {\n // hidden constructor\n }", "private Composite() {\n }", "private ServiceListingList() {\n //This Exists to defeat instantiation\n super();\n }", "private ClientController() {\n }", "protected Approche() {\n }", "private Util()\n {\n // Empty default ctor, defined to override access scope.\n }", "private Singleton(){}", "private TetrisMain() {\r\n //ensure uninstantiability\r\n }", "private void __sep__Constructors__() {}", "private AccessorModels() {\n // Private constructor to prevent instantiation\n }", "private Settings() {}", "private Utility() {\n\t}", "private AccessList() {\r\n\r\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "public DriverControl(){\n super(0);\n }", "private SearchUI()\n\t{\n\t}", "private QcTestRunner()\n\t{\n\t\t// To prevent external instantiation of this class\n\t}", "public MovimientoControl() {\n }", "private TSLManager() {\n\t\tsuper();\n\t}", "private Foo() {\n\t\tSystem.out.println(\"Private Constructor.\");\n\t}", "private Security() { }", "private Settings()\n {}", "protected abstract void construct();", "private FlowExecutorUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "private A(){\n System.out.println(\"Instance created\");\n }", "private SingletonSigar(){}", "private InterpreterDependencyChecks() {\r\n\t\t// Hides default constructor\r\n\t}", "private TechniqueStatesModels() {\n // Private constructor to prevent instantiation\n }", "private UsineJoueur() {}", "public Ctacliente() {\n\t}", "private Settings() { }", "private Driver(){\n }", "private ScriptInstanceManager() {\n\t\tsuper();\n\t}", "public Curso() {\r\n }", "private Helper() {\r\n // do nothing\r\n }", "private Dialogs () {\r\n\t}", "public GeneralViewControl() {\r\n }", "private SubjectManagement() {\n\n\t}", "private BusquedaMaker() {\n\t\tinit();\n\t}", "private ControleurAcceuil(){ }", "private Singleton(){\n }", "private Selector() { }", "private Selector() { }", "private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private SingletonSample() {}", "private MulticastInputUI()\n\t{\n\t}", "public BatchControl() {\n super();\n }", "protected void _init(){}", "private Server()\n\t{\n\t}", "protected Doodler() {\n\t}", "private Public() {\n super(\"public\", null);\n }", "private Log()\n {\n //Hides implicit constructor.\n }", "private Example() {\n\t\tthrow new Error(\"no instantiation is permitted\");\n\t}", "private ClientLoader() {\r\n }", "private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }", "private Template() {\r\n\r\n }", "private Mgr(){\r\n\t}", "public CyanSus() {\n\n }" ]
[ "0.7326067", "0.7291705", "0.7241665", "0.7221598", "0.70936656", "0.7060179", "0.70038307", "0.6994371", "0.69702005", "0.6955097", "0.695126", "0.6905326", "0.68797904", "0.68397194", "0.67971075", "0.6794462", "0.6773234", "0.67712796", "0.676483", "0.6759978", "0.6759978", "0.67452615", "0.67387587", "0.6726966", "0.67216337", "0.67047733", "0.670328", "0.6688195", "0.66876817", "0.6686773", "0.6674879", "0.6665047", "0.66645557", "0.66631836", "0.66497856", "0.6647686", "0.6646474", "0.6625273", "0.661088", "0.6610126", "0.66013", "0.6594303", "0.6582657", "0.6580924", "0.65794575", "0.657203", "0.65623236", "0.6558825", "0.6547366", "0.65442747", "0.654173", "0.65384537", "0.65376145", "0.65357345", "0.6535148", "0.6535148", "0.6532823", "0.6529409", "0.65281636", "0.65238076", "0.65176976", "0.65138614", "0.65071964", "0.6499754", "0.6487429", "0.6486598", "0.64837605", "0.6481981", "0.6477837", "0.6453798", "0.6449082", "0.6446478", "0.6441558", "0.64357334", "0.64290607", "0.6425333", "0.6424815", "0.6424131", "0.64227146", "0.6417486", "0.64163077", "0.64148533", "0.64088464", "0.6408557", "0.6408557", "0.6405667", "0.6404037", "0.63996655", "0.6398632", "0.6397181", "0.63836664", "0.6383328", "0.63794535", "0.6368885", "0.63658524", "0.63585854", "0.6358156", "0.6357068", "0.6355373", "0.63453054", "0.6345063" ]
0.0
-1
deal out the singleton
public static MyAlbumList getInstance(Context ctx) throws IOException { if (albumList == null) { albumList = new MyAlbumList(); albumList.context = ctx; albumList.load(); } return albumList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private SingletonDoubleCheck() {}", "private SingletonSigar(){}", "private SingletonEager(){\n \n }", "private Singleton(){}", "private Singleton()\n\t\t{\n\t\t}", "private Singleton() {\n\t}", "private SingletonSample() {}", "@Override\n\t\tpublic Object getInstance() {\n\t\t\treturn null;\n\t\t}", "private Singleton() { }", "private Singleton(){\n }", "private EagerInitializedSingleton() {\n\t}", "private EagerInitializedSingleton() {\n\t}", "static void useSingleton(){\n\t\tSingleton singleton = Singleton.getInstance();\n\t\tprint(\"singleton\", singleton);\n\t}", "public static SingleObject getInstance(){\n return instance;\n }", "public static utilitys getInstance(){\n\r\n\t\treturn instance;\r\n\t}", "private SingletonObject() {\n\n\t}", "private J2_Singleton() {}", "@VisibleForTesting\n static void resetInstance() {\n sInstance = null;\n }", "private MySingleton() {\r\n\t\tSystem.out.println(\"Only 1 object will be created\");\r\n\t}", "synchronized static PersistenceHandler getInstance() {\n return singleInstance;\n }", "public static SingleObject getInstance(){\n\t\treturn instance;\n\t}", "private LazySingleton(){}", "synchronized public static SampletypeManager getInstance()\n {\n return singleton;\n }", "@Override\n public boolean isSingleton() {\n return false;\n }", "private SparkeyServiceSingleton(){}", "public static void resetInstance() {\n\t\tinstance = null;\n\t}", "private EagerlySinleton()\n\t{\n\t}", "@Override\n public T getInstance() {\n return instance;\n }", "protected Object readResolve(){\n return singletonInstance;\n }", "private EagerInitializationSingleton() {\n\t}", "private SingletonLectorPropiedades() {\n\t}", "public void freeInstance()\n {\n }", "public void freeInstance()\n {\n }", "public static Singleton getInstance() {\n return mSing;\n }", "private Singleton() {\n if (instance != null){\n throw new RuntimeException(\"Use getInstance() to create Singleton\");\n }\n }", "public static SingleObject getInstance()\r\n {\r\n return instance;\r\n }", "public static final void onExit() {\r\n isShutdown = true;\r\n if (instance != null) {\r\n if (instance.logBase.isInfoEnabled()) {\r\n instance.logBase.info(\"LogUtil.onExit : free singleton : \" + SingletonSupport.getSingletonLogName(instance));\r\n }\r\n\r\n // After the Log4J shutdown, Loggers are no more usable :\r\n\r\n // Release Log4J resources :\r\n Log4JCleaner.shutdown();\r\n\r\n // Classloader unload problem with commons-logging :\r\n LogFactory.release(Thread.currentThread().getContextClassLoader());\r\n // force GC :\r\n instance.log = null;\r\n instance.logBase = null;\r\n instance.logDev = null;\r\n instance.logs.clear();\r\n\r\n // free singleton :\r\n instance = null;\r\n }\r\n\r\n // clean up custom logger instances associated with eclipseLink :\r\n CommonsLoggingSessionLog.onExit();\r\n }", "private SingletonH() {\n System.out.println(Thread.currentThread().getName()\n + \": creating SingletonH\");\n }", "public static void destruct() {\n\t\tinstance = null;\n\t}", "public static Empty getInstance() {\n return instance;\n }", "public static Singleton getInstance( ) {\n return singleton;\n }", "private SingletonAR() {\n System.out.println(Thread.currentThread().getName()\n + \": creating SingletonAR\");\n }", "public static void clear(){\r\n instance = null;\r\n }", "private SingletonClass() {\n objects = new ArrayList<>();\n }", "void destroy() {\n INSTANCE = null;\n }", "private LoggerSingleton() {\n\n }", "private InstanceUtil() {\n }", "public static SingletonEager get_instance(){\n }", "public static Singleton getInstance( ) {\n return singleton;\n }", "protected static void demoMethod( ) {\n System.out.println(\"demoMethod for singleton\");\n }", "private void initInstance() {\n init$Instance(true);\n }", "private SingletonSyncBlock() {}", "public static Singleton instance() {\n return Holder.instance;\n }", "@Around(\"singletonsScope()\")\n \tpublic Object aroundSingletons(ProceedingJoinPoint jp) throws Throwable {\n\n Class<?> singClass = jp.getSignature().getDeclaringType();\n logger.info(\"Creating singleton for class: {}\", singClass);\n\n Object singObj = this.singletons.get(singClass);\n if (singObj == null) {\n logger.info(\"First time singleton creation, adding to map\");\n singObj = jp.proceed();\n this.singletons.put(singClass, singObj);\n }\n logger.debug(\"Object: \" + singObj);\n return singObj;\n }", "private static void createSingletonObject() {\n\t\tSingleton s1 = Singleton.getInstance();\n\t\tSingleton s2 = Singleton.getInstance();\n\n\t\tprint(\"S1\", s1);\n\t\tprint(\"S2\", s2);\n\t}", "protected static KShingler getInstance() {\n return ShinglerSingleton.INSTANCE;\n }", "private Object readResolve() {\n\t\treturn singletonObj;\n\t}", "public DPSingletonLazyLoading getInstance(){ //not synchronize whole method. Instance oluşmuş olsa bile sürekli burada bekleme olur.\r\n\t\tif (instance == null){//check\r\n\t\t\tsynchronized(DPSingletonLazyLoading.class){ //critical section code NOT SYNCRONIZED(this) !!\r\n\t\t\t\tif (instance == null){ //double check\r\n\t\t\t\t\tinstance = new DPSingletonLazyLoading();//We are creating instance lazily at the time of the first request comes.\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn instance;\r\n\t}", "public static void delInstance() {\n \tINSTANCE = null;\n \tcloseConnection();\n }", "private Singleton2A(){\n\t\tif(instance != null){\n\t\t\tthrow new RuntimeException(\"One instance already created cant create other\");\n\t\t}\t\t\n\t\tSystem.out.println(\"I am private constructor\");\n\t}", "@Test\n\tpublic void testSingleton()\n\t{\n\t\tChatManager cm1 = ChatManager.getSingleton();\n\t\tassertSame(cm1, ChatManager.getSingleton());\n\t\tChatManager.resetSingleton();\n\t\tassertNotSame(cm1, ChatManager.getSingleton());\n\t}", "public static RCProxy instance(){\n\t\treturn SingletonHolder.INSTANCE;\n\t}", "public static void reInitialize() {\r\n\t\tThread houseKeeperTemp = theInstance.houseKeeper;\r\n\t\ttheInstance.houseKeeper = null;\t\t// shuts down the housekeeper thread\r\n\t\thouseKeeperTemp.interrupt();\r\n\t\ttheInstance = new GroupManager();\t\t\r\n\t}", "private InnerClassSingleton(){}", "private static Session getInstance() {\n return SingletonHolder.INSTANCE;\n }", "public static void deleteInstance()\r\n\t{\r\n\t\tlightManager = null;\r\n\t}", "public JobManagerHolder() {\n this.instance = null;\n }", "public static MySingleTon getInstance(){\n if(myObj == null){\n myObj = new MySingleTon();\n }\n return myObj;\n }", "T getInstance();", "private SingleTon() {\n\t}", "public static SingletonTextureFactory getInstance(){\n\t\treturn instance;\n\t}", "public static class_config getinstance(){\n\t\tif (instance==null){\n\t\t\tinstance = new class_config();\n\t\t\t\n singleton.mongo=new Mongo_DB();\n singleton.nom_bd=singleton.mongo.getNom_bd();\n singleton.nom_table=singleton.mongo.getNom_table();\n singleton.client = Mongo_DB.connect();\n if (singleton.client != null) {\n singleton.db = singleton.mongo.getDb();\n singleton.collection = singleton.mongo.getCollection();\n }\n \n\t\t\tsingleton_admin.admin= new ArrayList<admin_class>();\n\t\t\tsingleton_client.client= new ArrayList<client_class>();\n\t\t\tsingleton_reg.reg= new ArrayList<reg_user_class>();\n\t\t\t\n// A_auto_json.auto_openjson_admin();\n// C_auto_json.auto_openjson_client();\n R_auto_json.auto_openjson_reg();\n //funtions_files.auto_open();\n\t\t\tauto_config.auto_openconfig();\n //class_language.getinstance();\n\t\t\tsingleton_config.lang=new class_language();\n \n connectionDB.init_BasicDataSourceFactory();\n \n\t\t}\n\t\treturn instance;\n\t}", "void releaseInstance();", "private LazySingleton() {\n if (null != INSTANCE) {\n throw new InstantiationError(\"Instance creation not allowed\");\n }\n }", "public static void resetInstance() {\n DataSQLiteOpenHelper.resetInstance();\n if (sInstance != null) {\n sInstance.close();\n sInstance = null;\n }\n }", "public boolean isSingleton() {\n\t\treturn false;\r\n\t}", "public T getInstance() {\n return instance;\n }", "private static LogUtil getInstance() {\r\n if (instance == null) {\r\n final LogUtil l = new LogUtil();\r\n l.init();\r\n if (isShutdown) {\r\n // should not be possible :\r\n if (l.log.isErrorEnabled()) {\r\n l.log.error(\"LogUtil.getInstance : shutdown detected : \", new Throwable());\r\n }\r\n return l;\r\n }\r\n instance = l;\r\n\r\n if (instance.logBase.isInfoEnabled()) {\r\n instance.logBase.info(\"LogUtil.getInstance : new singleton : \" + instance);\r\n }\r\n }\r\n\r\n return instance;\r\n }", "public SingletonVerifier() {\n }", "public boolean isSingleton() {\n\t\treturn false;\n\t}", "public static Main getInstance() {\r\n return instance;\r\n }", "public ReleaseInstance() { }", "public static void shutdown()\n\t{\n\t\tinstance = null;\n\t}", "private void initSingletons() {\n\t\tModel.getInstance();\n\t\tSocialManager.getInstance();\n\t\tMensaDataSource.getInstance();\n\t}", "private FeedRegistry() {\n // no-op for singleton pattern\n }", "private SingletonStatementGenerator() {\n\t}", "public void tearDown() {\n instance = null;\n }", "private ScriptInstanceManager() {\n\t\tsuper();\n\t}", "public void displaySingleton() {\r\n Log.logInfo(\"Singleton object was already created for {0}\",\r\n Thread.currentThread().getStackTrace()[1].getClassName());\r\n }", "public static SingletonEager getInstance()\n {\n return instance;\n }", "public static Singleton doubleCheckLocking(){\n if(instance != null){\n return instance;\n }\n synchronized (key){\n if(instance == null){\n instance = new Singleton();\n }\n return instance;\n }\n }", "ResponseHandler getInstance() {\n \t\treturn this;\n \t}", "protected void postInstantiate() {}", "@AfterClass\r\n public static void tearDown() throws Exception {\r\n instance = null;\r\n }", "public void run() {\n\t\tSystem.out.println(Singleton.getInstance());\n\t}", "Shared shared();", "public static Main getInstance() {\n return instance;\n }", "public static Gadget getInstance(){\r\n\t\t\treturn instance;\r\n\t\t}", "synchronized public static void setInstance(SampletypeManager instance)\n {\n singleton = instance;\n }", "private RequestManager() {\n\t // no instances\n\t}", "public static CZSZApplication_bak getInstance() {\n return theSingletonInstance;\n }" ]
[ "0.7151822", "0.71054226", "0.704859", "0.70464283", "0.6920779", "0.68960845", "0.68664825", "0.6864157", "0.6792876", "0.6768103", "0.66980517", "0.66980517", "0.6679994", "0.6635296", "0.6607824", "0.66060597", "0.65049905", "0.64986193", "0.64787483", "0.6468542", "0.64371884", "0.64180976", "0.6413719", "0.6405784", "0.6403144", "0.63808423", "0.63761234", "0.6363841", "0.63613915", "0.63398355", "0.63012165", "0.62842625", "0.62842625", "0.62749374", "0.62742156", "0.6270884", "0.6260925", "0.6244261", "0.62417257", "0.6236415", "0.6231823", "0.62312204", "0.6229639", "0.62258613", "0.62102884", "0.62002087", "0.6193201", "0.6174511", "0.61738074", "0.61619985", "0.61589587", "0.61564416", "0.61562765", "0.61523336", "0.6149052", "0.6135225", "0.61312443", "0.610803", "0.60718966", "0.6060606", "0.6046232", "0.60460633", "0.6044424", "0.60375166", "0.60331476", "0.60329306", "0.6028518", "0.60180753", "0.6017587", "0.60160595", "0.6005292", "0.6002524", "0.6000816", "0.59904116", "0.5990172", "0.5987442", "0.59695715", "0.5949241", "0.593161", "0.59263265", "0.5925707", "0.5915586", "0.5915553", "0.5908028", "0.5902964", "0.5901323", "0.5887219", "0.5885453", "0.5877463", "0.58755314", "0.58526325", "0.5844992", "0.58418214", "0.584179", "0.58416456", "0.5824235", "0.5821659", "0.5815819", "0.58139336", "0.5811491", "0.5803251" ]
0.0
-1
name and artist are mandatory
public Album add(String name) { if (name == null) { throw new IllegalArgumentException("Album name is mandatory"); } // create Album object Album album = new Album(name); // if this is the first add, it's easy if (albums.size() == 0) { albums.add(album); try { store(); } catch (IOException e) { Toast.makeText(context, "Could not store albums to file", Toast.LENGTH_LONG).show(); } return album; } albums.add(album); // write through try { store(); return album; } catch (IOException e) { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setArtist(String artist) {\n this.artist = artist;\n }", "public void setArtist(String artist) {\n this.artist = artist;\n }", "public void setArtist(String artist){\n\t\tthis.artist = artist;\n\t}", "public Song(String title, String artist) {\r\n this.title = title;\r\n this.artist = artist;\r\n }", "public void setName(String artistName) {\n this.artistName = artistName;\n }", "void create(Artist artist);", "public boolean isArtist(){return isArtist;}", "public Artist(String name, Genre mainGenre) {\n this.name = name;\n this.cataloue = new ArrayList<Record>();\n this.mainGenre = mainGenre;\n }", "public String getArtist(){\n\t\treturn artist;\n\t}", "public String getArtist() {\n return artist;\n }", "public String getArtist() {\n return artist;\n }", "private void setDefaultSongNameAndArtist(){\r\n\t\tString[] songLocation = getLocation().split(\"/\");\r\n\t\tString[] songFragment = songLocation[songLocation.length - 1].split(\"[.]\");\r\n\t\tsetSongName(songFragment[0]);\r\n\t\t\r\n\t\tsetAlbum(songLocation[songLocation.length - 2] + \"?\");\r\n\t\tsetArtist(songLocation[songLocation.length - 3] + \"?\");\r\n\t\t\r\n\t}", "public void testGetArtistName()\r\n {\r\n assertTrue(artistName.equals(song.\r\n getArtistName()));\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Artist : \"+this.artistName+\"\\n\";\n\t}", "public Song(String name, String artist, String album, String year) {\n this.name = name;\n this.artist = artist;\n this.album = album;\n this.year = year;\n }", "@Override\n\tpublic String getType() {\n\t\treturn \"Artist\";\n\t}", "private void getRequest() {\n System.out.print(\"Enter song: \");\n ar.setSong(scanner.nextLine());\n //if the artist was correct but the song title wasn't we don't need to ask for the artist again\n if(wrongSong)\n return;\n System.out.print(\"Enter artist: \");\n ar.setArtist(scanner.nextLine());\n }", "Album findAlbumByNameAndArtisteName(String albumName, String artisteName);", "public String getArtist() {\r\n\t\treturn artist;\r\n\t}", "public Song(String t, String alb, String art, String y){\n title = t;\n album = alb;\n artist = art;\n year = y; \n }", "public String getArtist() {\n\t\treturn artist;\r\n\t}", "public String getArtistName() {\n return mArtistName;\n }", "public String getArtistName() {\n return mArtistName;\n }", "public String getArtist() {\n\t\treturn this.artist;\n\t}", "public Artist getByName(String name);", "public Song(String artist, String title) { \r\n\t\tthis.artist = artist;\r\n\t\tthis.title = title;\r\n\t\tthis.minutes = 0;\r\n\t\tthis.seconds = 0;\r\n\t}", "public Song(String title, String artist, String genre) {\n\t\tthis.setTitle(title);\n\t\tthis.setArtist(artist);\n\t\tthis.setGenre(genre);\n\t}", "public SimpleStringProperty artistProperty(){\r\n\t\treturn artist;\r\n\t}", "private String addMusic() {\n\t\t// One Parameter: MusicName\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|music:\" + parameters[0]);\n\t\treturn tag.toString();\n\n\t}", "public String getAlbumArtist() {\n return albumArtist;\n }", "public Art() {\n this.artist = \"Michelangelo\";\n this.timePeriod = 1510;\n this.aesthetic = \"High Renaissance\";\n this.size = \"Enormous\";\n }", "public static void main(String a[]) {\n\t\tArtistRegistry registry = new ArtistRegistry();\n\t\tArtist artist = registry.getPrototype(\"maleAnchor\");\n\n\t\t// Set his name\n\t\tartist.setName(\"Batista\");\n\n\t\t// display the custom artist made , client just had to set the name!\n\t\tSystem.out.println(artist);\n\n\t\t// Another example\n\t\t// Let's create a new prototype from existing prototype and add it to registry\n\n\t\tArtist femaleArtist = registry.getPrototype(\"femaleModelNoExperience\");\n\t\tfemaleArtist.setField(\"cinema\");\n\n\t\t// we have created a new prototype model who is female, has no experience and\n\t\t// tagged to cinema field\n\t\t// Now lets add this prototype to registry\n\t\t\n\t\tregistry.addPrototype(femaleArtist, \"femaleCinemaFresh\");\n\t\t\n\t\t\n\t\t//Now lets get the prototype again and assign a name and age \n\t\t\n\t\tArtist femaleCineArtist = registry.getPrototype(\"femaleCinemaFresh\");\n\t\t\n\t\tfemaleCineArtist.setAge(22);\n\t\tfemaleCineArtist.setName(\"Rithika\");\n\t\t\n\t\tSystem.out.println(femaleCineArtist);\n\t\t\n\n\t}", "public Artista(String nombreArtista) {\n this.nombreArtista = nombreArtista;\n }", "protected boolean existArtist(String s){\n\t\treturn this.artistName.matches(\"^.*(?i)\"+s+\".*$\");\n\t}", "public Artist(String firstName, String lastName, Date firstRelease) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.firstRelease = firstRelease;\n }", "private String getArtist(File mp3){\n\t\tString tempString = \"\";\n\t InputStream input;\n\t ContentHandler handler = new DefaultHandler();\n\t Metadata metadata = new Metadata();\n\t Parser parser = new Mp3Parser();\n\t ParseContext parseCtx = new ParseContext();\n\t \n\t\ttry {\n\t\t\tinput = new FileInputStream(mp3);\n\t\t\tparser.parse(input, handler, metadata, parseCtx);\n\t\t input.close();\n\t\t} \n\t\tcatch (IOException | SAXException | TikaException e) {\n\t\t\tSystem.out.println(\"Error with: \" + mp3.getPath());\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t tempString = metadata.get(\"xmpDM:artist\");\n\t\t\n\t\tif (tempString.isEmpty() || tempString.contentEquals(\" \")){\n\t\t\treturn \"Unknown\";\n\t\t}\n\t\treturn tempString;\n\t\t\n\t}", "@Override\n\tpublic List<Artist> findByName(String name) {\n\t\treturn null;\n\t}", "public static Player getArtist(){return artist;}", "public void addArtist(int id, String name, String image) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_ID, id);\n values.put(KEY_HOST, host);\n values.put(KEY_NAME, name);\n values.put(KEY_IMAGE, image);\n\n long insertedId = db.insert(TABLE_ARTIST, null, values);\n db.close(); // Closing database connection\n }", "@Override\n\tpublic String addGenre(Genre songName, Genre songArtist, Genre songBpm, Genre songGenre) {\n\t\treturn null;\n\t}", "public void addMusic(String musicname)\r\n\t{\r\n\t\tmyMusics.add(musicname);\r\n\t}", "public void createArtist(String name, String genre, int popularity) throws FileNotFoundException, IOException, ClassNotFoundException{\r\n\t\tgetOldFile();\r\n\t\tboolean artistTest = false;\r\n\t\tfor (int i = 0; i <artists.size();i++){\r\n\t\t\tif (name.equals(artists.get(i).getName())){\r\n\t\t\t\tartistTest = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (artistTest == true){\r\n\t\t\tmain.dubArtist();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\tartists.add(new Artist(name, genre, popularity));\r\n\t\t\t\t\tmain.noDubArtist();\r\n\t\t\t\t}\r\n\t\tupdate();\r\n\t}", "public String createArtist(String name, Curator curator) throws SQLException {\r\n \r\n Artist artist = getArtist(\"name = '\" + name + \"'\");\r\n if (artist != null) {\r\n return \"Artist already exists with name:\" + name;\r\n }\r\n \r\n Statement stmt = null;\r\n String dml = null;\r\n \ttry {\r\n\r\n int artistId = getMaxArtistId() + 1;\r\n \t\r\n stmt = DBUtil.getStatement(getConnection(), \"createArtist()\"); \r\n dml = \"insert into artist (id, name, active, curator_id)\" \r\n + \" values (\" + artistId\r\n + \", '\" + name + \"'\"\r\n + \", 1\"\r\n + \", \" + curator.getId()\r\n + \")\";\r\n\r\n \t stmt.executeUpdate(dml);\r\n \t s_log.debug(\"insertImage() 1 dml:\" + dml);\r\n \t artist = new Artist(artistId, name);\r\n return \"Created artist:\" + artist.getLink() + \".\";\r\n\t\t} catch (SQLException e) {\r\n\t\t\ts_log.error(\"createArtist() dml\" + dml + \" e:\" + e);\r\n return \"error:\" + e;\r\n\t\t} finally { \t\t\r\n\t\t\tDBUtil.close(stmt, \"createArtist()\");\r\n\t\t}\r\n }", "public Album setArtists(Set<String> artists) {\r\n this.artists = artists;\r\n return this;\r\n }", "public Playlist(String playListName){\n\tgenresList = new Genre[6];\n\tsongList = new Song[30];\n\tthis.playListName = playListName;\n\t}", "public frmNewArtist() {\n initComponents();\n lblID.setText(Controller.Agent.ManageController.getNewArtistID());\n lblGreeting.setText(\"Dear \"+iMuzaMusic.getLoggedUser().getFirstName()+\", please use the form below to add an artist to your ranks.\");\n \n }", "public FilesystemEntryBean(String artist, String album, String song){\n this.artist = artist;\n this.album = album;\n this.song = song;\n\n isSong = (song != null && !song.trim().isEmpty());\n isAlbum = !isSong && (album != null && !album.trim().isEmpty());\n isArtist = !isSong && !isAlbum && (artist != null && !artist.trim().isEmpty());\n\n if (isArtist) {\n playActionUrl = null;\n listActionUrl = LIST_BASE_URL + \"/\" + artist;\n name = artist;\n }\n if (isAlbum) {\n playActionUrl = PLAY_BASE_URL + \"/\" + artist + \"/\" + album;\n listActionUrl = LIST_BASE_URL + \"/\" +artist + \"/\" + album;\n name = album;\n }\n if (isSong) {\n playActionUrl = PLAY_BASE_URL + \"/\" + artist + \"/\" + album + \"/\" + song;\n listActionUrl = null;\n name = song;\n }\n }", "@Override\n public String toString()\n {\n return albumName + ' ' + artistName + ' ' + genre + '\\n';\n }", "public Song retrieveSongFromRequest(HttpServletRequest request) throws InvalidArtistNameException, InvalidSongNameException, InvalidFeaturedArtistsException, InvalidSongGenresException, TooLongOrEmptyLyricsException, InvalidYouTubeVideoIDException, InvalidFeaturedArtistNameException, LyricsParsingException {\n\n Song song = new Song();\n\n String songName = request.getParameter(RequestConstants.RequestParameters.SONG_NAME);\n String artistName = request.getParameter(RequestConstants.RequestParameters.SONG_ARTIST);\n String songFeaturedArtists = request.getParameter(RequestConstants.RequestParameters.FEATURED_ARTISTS);\n String songGenres = request.getParameter(RequestConstants.RequestParameters.SONG_GENRES);\n String songLyricsAsString = request.getParameter(RequestConstants.RequestParameters.SONG_LYRICS);\n String youTubeVideoID = request.getParameter(RequestConstants.RequestParameters.YOUTUBE_VIDEO_ID);\n\n if (!validateArtistName(artistName)) {\n throw new InvalidArtistNameException();\n }\n\n if (!validateSongName(songName)) {\n throw new InvalidSongNameException();\n }\n\n if (!validateFeaturedArtists(songFeaturedArtists)) {\n throw new InvalidFeaturedArtistsException();\n }\n\n if (!validateSongGenres(songGenres)) {\n throw new InvalidSongGenresException();\n }\n\n if (!validateLyrics(songLyricsAsString)) {\n throw new TooLongOrEmptyLyricsException();\n }\n\n if (!validateYouTubeVideoID(youTubeVideoID)) {\n throw new InvalidYouTubeVideoIDException();\n }\n\n song.setName(songName);\n song.setArtist(new Artist(artistName));\n song.setYouTubeVideoID(youTubeVideoID);\n\n if (songFeaturedArtists != null) {\n if (!songFeaturedArtists.trim().isEmpty()) {\n StringTokenizer stringTokenizer = new StringTokenizer(songFeaturedArtists, \";\");\n\n List<Artist> featuredArtists = new ArrayList<>();\n\n while (stringTokenizer.hasMoreTokens()) {\n String featuredArtistName = stringTokenizer.nextToken().trim();\n\n if (!validateArtistName(featuredArtistName)) {\n throw new InvalidFeaturedArtistNameException();\n }\n\n featuredArtists.add(new Artist(featuredArtistName));\n }\n\n song.setFeaturedArtists(featuredArtists);\n }\n }\n\n\n if (songGenres != null) {\n if (!songGenres.isEmpty()) {\n List<String> songGenresList = new ArrayList<>();\n\n StringTokenizer stringTokenizer = new StringTokenizer(songGenres, \";\");\n\n while (stringTokenizer.hasMoreTokens()) {\n songGenresList.add(stringTokenizer.nextToken().trim());\n }\n\n song.setGenres(songGenresList);\n }\n }\n\n\n LyricsParser lyricsParser = new LyricsParser();\n\n SongLyrics songLyrics = lyricsParser.parseLyrics(songLyricsAsString);\n\n song.setLyrics(songLyrics);\n\n return song;\n\n }", "boolean sameArtist(Artist that) {\r\n\t\treturn this.name.equals(that.name); \r\n\t\t// && this.painting.samePainting(that.painting);\r\n\t}", "public void addAlbum(int id, int artist_id, String name, String cover) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_ID, id);\n values.put(KEY_HOST, host);\n values.put(KEY_ARTIST_ID, artist_id);\n values.put(KEY_NAME, name);\n values.put(KEY_COVER, cover);\n\n long insertedId = db.insert(TABLE_ALBUM, null, values);\n db.close(); // Closing database connection\n }", "private MyArtist createArtist(Cursor cursor) {\n int idxArtistId = cursor.getColumnIndex(MyArtistColumns.ARTIST_ID);\n int idxArtistName = cursor.getColumnIndex(MyArtistColumns.ARTIST_NAME);\n int idxImageUrl = cursor.getColumnIndex(MyArtistColumns.IMAGE_URL);\n\n MyArtist artist = new MyArtist();\n\n if (idxArtistId > -1) {\n artist.id = cursor.getString(idxArtistId);\n }\n if (idxArtistName > -1) {\n artist.name = cursor.getString(idxArtistName);\n }\n if (idxImageUrl > -1) {\n artist.setImageUrl(cursor.getString(idxImageUrl));\n }\n\n return artist;\n }", "Set<Art> getArtByArtist(String artist);", "private String promptForAlbumName() {\n\t\treturn (String)\n\t\t JOptionPane.showInputDialog(\n\t\t\t\talbumTree, \n\t\t\t\t\"Album Name: \", \n\t\t\t\t\"Add Album\",\n\t\t\t\tJOptionPane.PLAIN_MESSAGE, \n\t\t\t\tnull, \n\t\t\t\tnull, \n\t\t\t\t\"\");\t\t\n\t}", "public void setSongName(String songTitle){\n\t\tthis.songName = songTitle;\n\t}", "static public void set_artist_data(){\n\t\t\n\t\tEdit_row_window.attrs = new String[]{\"artist name:\", \"rating:\", \"birth year:\"};\n\t\tEdit_row_window.attr_vals = new String[]\n\t\t\t\t{Edit_row_window.selected[0].getText(1), Edit_row_window.selected[0].getText(2), \n\t\t\t\tEdit_row_window.selected[0].getText(3)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\" select distinct c.id, c.name, c.num_links, c.year_made \" +\n\t\t\t\t\t\t\t\t\t\t\t\" from curr_music_creations c, \" +\n\t\t\t\t\t\t\t\t\t\t\t\" curr_music_artist_creation ac\" +\n\t\t\t\t\t\t\t\t\t\t\t\" where ac.creation_id=c.id and ac.artist_id=\"+Edit_row_window.id+\n\t\t\t\t\t\t\t\t\t\t\t\" order by num_links desc \";\n\t\t\n\t\t\n\t\tEdit_row_window.not_linked_query = \" select distinct c.id, c.name, c.num_links, c.year_made \" +\n\t\t\t\t\" from curr_music_creations c \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id\", \"creation name\", \"rating\", \"release year\"};\n\t\tEdit_row_window.label_min_parameter=\"min. release year:\";\n\t\tEdit_row_window.linked_category_name = \"CREATIONS\";\n\t}", "public void createArtist(View view){\n Artist artist = new Artist(databaseReference.push().getKey(), \"Maluma baby\", \"Reggeton\"); // PRIMER DATO SOLICITADO ES EL IDENTIFICADOR\n //.push().getKey() FUNCION DE FIRE PARA CREAR UN ID, HACE COMO QUE INSERTA ALGO ES EL IDENTIFICADOR\n databaseReference.child(ARTIST_NODE).child(artist.getId()).setValue(artist);// AQUI APUNTAMOS AL ARBOL DE LA BASE DE DATOS\n }", "@Override\n public void onClick(View v) {\n if (TextUtils.isEmpty(inputNote.getText().toString())) {\n Toast.makeText(ArtistInterface.this, \"Enter Name!\", Toast.LENGTH_SHORT).show();\n return;\n } else {\n alertDialog.dismiss();\n }\n\n // updating track name\n if ( mArtistTracksList != null) {\n // update track name by it's id\n updateTrackName(inputNote.getText().toString(), position);\n }\n }", "public SoundTrack(String title, String artist, String language){\n this.artist = artist; // assigns passed variable to instance variable\n this.language = language; // assigns passed variable to instance variable\n this.title = title; // assigns passed variable to instance variable\n }", "public void handleAddAlbumEvent(String title, String artists, String releaseDate,\n String nrOfSongs, String length, String genres){\n ArrayList<String> genre = new ArrayList<>();\n ArrayList<Artist> artist = new ArrayList<>();\n genre.add(genres);\n Artist a1 = new Artist(artists, \"British\");\n artist.add(a1);\n /////////////////////////////////////////////\n\n new Thread() {\n public void run(){\n try {\n ac.insertRecord(new Album(genre,title,artist,releaseDate,length,Integer.parseInt(nrOfSongs)));\n }\n catch (Exception e){\n javafx.application.Platform.runLater(\n new Runnable() {\n public void run() {\n Alert alert = new Alert(Alert.AlertType.INFORMATION, \"Wrong format. Example: ('title', 'name', 'yyyy-mm-dd', 10, 30, 'Rock' \");\n alert.setTitle(\"\");\n alert.setHeaderText(null);\n alert.showAndWait();\n }\n });\n }\n\n ArrayList<Album> albums = ac.getAllRecords();\n javafx.application.Platform.runLater(\n new Runnable() {\n public void run() {\n view.updateTextArea(albums);\n }\n });\n }\n }.start();\n }", "public void setArtistID(Long artistID)\r\n {\r\n this.artistID = artistID;\r\n }", "public Song(\n String title,\n String artist,\n String year,\n String genre,\n double heardPercentCS,\n double heardPercentMath,\n double heardPercentEng,\n double heardPercentOther,\n double heardPercentSE,\n double heardPercentNE,\n double heardPercentUS,\n double heardPercentOut,\n double heardPercentMusic,\n double heardPercentSports,\n double heardPercentReading,\n double heardPercentArt,\n double likePercentCS,\n double likePercentMath,\n double likePercentEng,\n double likePercentOther,\n double likePercentSE,\n double likePercentNE,\n double likePercentUS,\n double likePercentOut,\n double likePercentMusic,\n double likePercentSports,\n double likePercentReading,\n double likePercentArt) {\n this.title = title;\n this.artist = artist;\n this.year = year;\n this.genre = genre;\n this.heardPercentCS = heardPercentCS;\n this.heardPercentMath = heardPercentMath;\n this.heardPercentEng = heardPercentEng;\n this.heardPercentOther = heardPercentOther;\n this.heardPercentSE = heardPercentSE;\n this.heardPercentNE = heardPercentNE;\n this.heardPercentUS = heardPercentUS;\n this.heardPercentOut = heardPercentOut;\n this.heardPercentMusic = heardPercentMusic;\n this.heardPercentSports = heardPercentSports;\n this.heardPercentReading = heardPercentReading;\n this.heardPercentArt = heardPercentArt;\n this.likePercentCS = likePercentCS;\n this.likePercentMath = likePercentMath;\n this.likePercentEng = likePercentEng;\n this.likePercentOther = likePercentOther;\n this.likePercentSE = likePercentSE;\n this.likePercentNE = likePercentNE;\n this.likePercentUS = likePercentUS;\n this.likePercentOut = likePercentOut;\n this.likePercentMusic = likePercentMusic;\n this.likePercentSports = likePercentSports;\n this.likePercentReading = likePercentReading;\n this.likePercentArt = likePercentArt;\n }", "public List<Album> getAlbums(Artist artist);", "public void addSong(Song s) \r\n {\r\n \tSong mySong = s;\r\n \t\r\n \t//Adding to the first HashTable - the Title One\r\n \tmusicLibraryTitleKey.put(mySong.getTitle(), mySong);\r\n \t \r\n \t// Checking if we already have the artist\r\n \t if(musicLibraryArtistKey.get(mySong.getArtist()) != null)\r\n \t {\r\n \t\t //Basically saying that get the key (get Artist) and add mySong to it (i.e. the arraylist)\r\n \t\t musicLibraryArtistKey.get(mySong.getArtist()).add(mySong);\r\n \t }\r\n \t \r\n \t // If artist is not present, we add the artist and the song\r\n \t else\r\n \t {\r\n \t\t ArrayList<Song> arrayListOfSongs = new ArrayList<>();\r\n \t\t arrayListOfSongs.add(mySong);\r\n \t\t \r\n \t\t musicLibraryArtistKey.put(mySong.getArtist(), arrayListOfSongs);\r\n \t }\r\n \t \r\n \t// Checking if we already have the year\r\n \t if (musicLibraryYearKey.get(mySong.getYear()) != null)\r\n \t {\r\n \t \t musicLibraryYearKey.get(mySong.getYear()).add(mySong);\r\n \t }\r\n \t \r\n \t// If year is not present, we add the year and the song\r\n \t else\r\n \t {\r\n \t\t ArrayList<Song> arrayListOfSongs = new ArrayList<>();\r\n \t\t arrayListOfSongs.add(mySong);\r\n \t\t \r\n \t\t musicLibraryYearKey.put(mySong.getYear(), arrayListOfSongs);\r\n \t }\r\n\t\r\n }", "public void setArtistAlbums(List<Album> artistAlbums) {\n this.artistAlbums = artistAlbums;\n }", "private String getArtURL(String song, String artist, String album) {\n Uri.Builder builder = new Uri.Builder()\n .scheme(\"http\")\n .authority(\"album-art-engine.herokuapp.com\")\n .appendPath(\"getAA\");\n\n /* Check for not null parameters */\n if (song != null && artist != null) {\n builder.appendQueryParameter(\"song_name\", song);\n builder.appendQueryParameter(\"artist_name\", artist);\n }\n if (album != null)\n builder.appendQueryParameter(\"album_name\", album);\n\n return builder.build().toString();\n }", "public String toString() {\r\n return this.title + \" by \" + this.artist;\r\n }", "ArtistCommunitySearch getArtistSearch();", "private void populateArtists(){\n try{\n Connection conn = DriverManager.getConnection(\n \"jdbc:sqlite:\\\\D:\\\\Programming\\\\Java\\\\Assignments\\\\CIS_452\\\\Music_Library\\\\album_library.sqlite\");\n Statement stmnt = conn.createStatement();\n ResultSet results = stmnt.executeQuery(\"SELECT artist_name FROM artist ORDER BY artist_name\");\n\n while(results.next()){\n String artist = results.getString(1);\n artistList.add(artist);\n }\n conn.close();\n } catch(SQLException e) {\n System.out.println(\"Error connecting to database: \" + e.getMessage());\n }\n }", "public boolean isArtistIDEquals(String artistID){\n\n return _id.equalsIgnoreCase(artistID);\n }", "@GET\n @Path(\"/searchArtist/{searchName}\")\n public List<ArtistDTO> searchArtist(@PathParam(\"searchName\") String name) {\n return artistLogic.findByName(name);\n }", "@POST @PUT @Path(\"/id/{albumId}/songs/{songName}\")\n public void addSong(@PathParam(\"albumId\") String albumId,\n @PathParam(\"songName\") String songName) {\n return;\n }", "public void addLeadArtist(Contact value) {\r\n\t\tBase.add(this.model, this.getResource(), LEADARTIST, value);\r\n\t}", "public ArrayList<Song> searchByArtist(String artist) \r\n {\r\n \treturn musicLibraryArtistKey.get(artist);\r\n \t\r\n }", "public void addArtist(Artist artist) {\n\t\tif(!artists.containsKey(artist.id)) {\n\t\t\tartists.put(artist.id, artist);\n\t\t}\n\t}", "private void search(String query) {\n final List<Artist> foundartists = new ArrayList<Artist>();\n final String usrquery = query;\n\n spotifysvc.searchArtists(query, new Callback<ArtistsPager>() {\n @Override\n public void success(ArtistsPager artists, Response response) {\n List<Artist> artistlist = artists.artists.items;\n Log.d(LOG_TAG_API, \"found artists [\" + artistlist.size() + \"]: \" + artistlist.toString());\n datalist.clear();\n\n if (artistlist.size() > 0) {\n setListdata(artistlist);\n } else {\n Toast.makeText(getActivity(), \"no artists found by the name: \" + usrquery, Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n Log.e(LOG_TAG_API, \"failed to retrieve artists:\\n\" + error.toString());\n Toast.makeText(getActivity(), \"failed to retrieve artists. Possible network issues?: \", Toast.LENGTH_SHORT).show();\n }\n });\n }", "public Playlist(String name){\n this.name = name;\n this.duration = new Time(0, 0);\n this.playSongs = new Song[MAX_SONGS_PLAYLIST];\n \n }", "public String findArtist (String song)\n\t{\n\t\tArrayList <String> name = new ArrayList <String>(); \n\t\tfor (Song e: music)\n\t\t\tif (e.getName().equals(song))\n\t\t\t\tname.add(e.getArtist());\n\t\tString results = \"\";\n\t\tfor (int i = 0; i < name.size(); i++)\n\t\t{\n\t\t\tif (name.size()-1 == i)\n\t\t\t{\n\t\t\t\tresults += name.get(i) +\".\";\n\t\t\t}\n\t\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\tresults += name.get(i) + \", \"; \n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\treturn results; \n\t}", "public Song(String title, String artist, String year, String genre) {\n this.title = title;\n this.artist = artist;\n this.year = year;\n this.genre = genre;\n heardPercentCS = 0.;\n heardPercentMath = 0.;\n heardPercentEng = 0.;\n heardPercentOther = 0.;\n heardPercentSE = 0.;\n heardPercentNE = 0.;\n heardPercentUS = 0.;\n heardPercentOut = 0.;\n heardPercentMusic = 0.;\n heardPercentSports = 0.;\n heardPercentReading = 0.;\n heardPercentArt = 0.;\n }", "Artist getById(long id);", "public Album(String albumName, String bandName) { \n\t\ttitle = albumName;\n\t\tband = bandName;\n\t}", "@Override\r\n\tpublic String toString(){\r\n\t\treturn String.format(\"%s, %s, %s\", getSongName(), getArtist(), getAlbum());\r\n\t}", "private void onCreate_sub(String artistName, String songTitle) {\n getViewReferences();\n\n // Retrieve the songs database\n ArrayList<Song> songs = getSongsDatabase(this);\n\n // Find the song passed via Intent\n // (Assumes that artist name + song title can uniquely identify a song)\n thisSong = songs.stream()\n .filter(s -> s.getArtistName().equals(artistName) && s.getSongTitle().equals(songTitle))\n .collect(Collectors.toList()).get(0);\n\n // Find all songs on the same album\n // (simulating queue-like functionality to demonstrate previous/next buttons)\n thisAlbum = songs.stream()\n .filter(a -> a.getAlbumTitle().equals(thisSong.getAlbumTitle()))\n .collect(Collectors.toList());\n\n // Sort the album by track number\n thisAlbum.sort(Comparator.comparing(Song::getTrackNumber));\n\n // Set the user interface based on thisSong's properties\n setViewsForCurrentSong();\n\n // Add onClickListeners to the buttons\n setOnClickListeners();\n\n setStyle_ofTransportControls();\n }", "void addArt(Art art);", "public MusicCollection(String name,Song... songs)\n {\n this.songs = new ArrayList<Song>();\n for(Song tempSong : songs) {\n if ( !this.songs.contains(tempSong) )\n this.songs.add(tempSong);\n else\n System.out.println(\"this file is already in this collection.\");\n }\n player = new MusicPlayer();\n this.name = name;\n }", "public Value(String trackName,String artistName,String albumInfo,String genre,String path){\n this.musicFile = new MusicFile(trackName,artistName,albumInfo,genre, path);\n }", "public Album setName(Set<String> name) {\r\n this.name = name;\r\n return this;\r\n }", "@Override\n public void onClick(View view) {\n if (spotifyBroadcastReceiver.getAlbumName() == null ||\n spotifyBroadcastReceiver.getArtistName() == null ||\n spotifyBroadcastReceiver.getTrackName() == null) {\n Log.d(TAG, \"Song's Information Not Complete!\");\n } else {\n // search song\n getLyrics();\n }\n }", "public Playlist(String titel) {\n this.titel = titel;\n }", "public static void main(String[] args) {\n\t\tManageSongs ms = new ManageSongs();\n\t\tms.createSong(\"Kashmir\", 8.37, \"songs/kashmir.mp3\", \"1975-2-24\", \"1974-6-18\");\n\t\tms.updateSong(\"27e042c7-4382-4ab4-9ece-634342c42df9\", \"\", 0.0, \"\", \"\", \"1974-7-12\");\n\t\tms.deleteSong(\"27e042c7-4382-4ab4-9ece-634342c42df9\");\n\t\n\t//create, update, and delete new artist\n\t\tManageArtists mar = new ManageArtists();\n\t\tmar.createArtist(\"Jimmy\", \"Page\", \"Led Zeppelin\", \"\");\n\t\tmar.updateArtist(\"defeea52-4f12-4ccf-abc4-6c9b99046ade\", \"\", \"\", \"\", \"Guitarist from 1968-1980\");\n\t\tmar.deleteArtist(\"defeea52-4f12-4ccf-abc4-6c9b99046ade\");\n\t\t\n\t//create, update, and delete new album\n\t\tManageAlbums mal = new ManageAlbums();\n\t\tmal.createAlbum(\"Physical Graffiti\", \"1975-2-24\", \"Atlantic\", 2, \"mature\", 82.59);\n\t\tmal.updateAlbum(\"890e7d1d-fc61-45be-be6b-9f65a1d1811d\", \"\", \"\", \"\", 15, \"\", 0.0);\n\t\tmal.deleteAlbum(\"890e7d1d-fc61-45be-be6b-9f65a1d1811d\");\n\t}", "public void setAlbumName(String albumName)\n {\n this.albumName = albumName;\n }", "public void setAuthors(String _authors) { authors = _authors; }", "public static void main(String[] args) {\n\t\tMusic m=new Music();\r\n\t\tm.rank=1;\r\n\t\tm.icon='-';\r\n\t\tm.idcrement=0;\r\n\t\tm.artist=\"숀(SHAUN)\";\r\n\t\tm.title=\"습관 (Bad Habits)\";\r\n\r\n\t\t\r\n\t\t\r\n\t\tMusic2 m1=new Music2();\r\n\t\tm1.rank=1;\r\n\t\tm1.icon='-';\r\n\t\tm1.idcrement='0';\r\n\t\tm1.title=\"이 노래가 클럽에서 나온다면\";\r\n\t\tm1.artist=\"우디 (Woody)\";\r\n\t\tm1.album=\"이 노래가 클럽에서 나온다면\";\r\n\t\tm1.poster=\"http://cmsimg.mnet.com/clipimage/album/1024/003/230/3230259.jpg\";\r\n\t\t\r\n\t\tSystem.out.println(\"순위:\"+m.rank);\r\n\t\tSystem.out.println(\"제목:\"+m.title);\r\n\t\tSystem.out.println(\"가수:\"+m.artist);\r\n\t\t\r\n\t\tSystem.out.println(\"앨범:\"+m.album.equals(\" \".trim()));\r\n\t\tSystem.out.println(\"앨범:\"+m.album.equals(\" \"));\r\n\t\t/*\r\n\t\t * \r\n\t\t * int a; System.out.ptinln(a);\r\n\t\t * '' != ' '\r\n\t\t * \"\" != \" \"\r\n\t\t * \"\" != null\r\n\t\t * \r\n\t\t * \"\" => 자체가 String\r\n\t\t * \r\n\t\t */\r\n\t\tm=null; // 메모리 해제\r\n\t\t\r\n\t\tSystem.out.println(\"앨범:\"+m.poster.equals(\"\"));\r\n\t\tSystem.out.println(\"앨범:\"+m.album.charAt(0));\r\n\t\t//주소는 존재하고 값이 없는 상태\r\n\t\tSystem.out.println(m.poster.charAt(0));\r\n\t\t//주소값이 없는 상태\r\n\t\tSystem.out.println(\"==================================\");\r\n\t\tSystem.out.println(\"순위:\"+m1.rank);\r\n\t\tSystem.out.println(\"제목:\"+m1.title);\r\n\t\tSystem.out.println(\"가수:\"+m1.artist);\r\n\t\tSystem.out.println(\"앨범:\"+m1.album);\r\n\r\n\t}", "public Earthquake(String name, String latitude, String longitude, String year, int magnitude)\r\n {\r\n setName(name);\r\n setLatitude(latitude);\r\n setLongitude(longitude);\r\n setYear(year);\r\n setMagnitude(magnitude);\r\n }", "public Long getArtistID()\r\n {\r\n return artistID;\r\n }", "public void setMusic(Music music);", "public int getArtistID() {\n return artistID;\n }", "@PostMapping(\"/createArtist\")\n public ResponseEntity<Void> createArtist(@Valid @RequestBody Artist artist) {\n\n logger.info(\"creating artist profile\");\n\n if (artist.getUsername() == null) {\n return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();\n }\n if (artist.getPassword() == null) {\n return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();\n }\n\n try {\n if (artistService.saveArtist(artist) == false) {\n return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();\n } else {\n return ResponseEntity.status(HttpStatus.CREATED).build();\n }\n } catch (Exception e) {\n logger.error(\"Exception when creating a new artist\" + e);\n return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build();\n }\n }", "public Playlist(String titel, ArrayList<Nummer> albumNummers) {\n this.titel = titel;\n this.albumNummers = albumNummers;\n this.berekenDuur();\n }", "@Override\n public void searchArtists(String query) {\n mSpotifyInteractor.performArtistsSearch(query, this);\n }", "public void setIdentifier(String artist, String album, String track, String title, String remix) {\n\t\tsuper.setIdentifier(new SubmittedSong(artist, album, track, title, remix).getIdentifier());\n\t\tthis.release = album;\n\t\tthis.track = track;\n\t\tthis.title = title;\n\t\tthis.remix = remix;\n\t\tif (submittedRelease != null) {\n\t\t\tReleaseIdentifier releaseId = submittedRelease.getReleaseIdentifier();\n\t\t\treleaseId = new ReleaseIdentifier(((SongIdentifier)identifier).getArtistNames(), releaseId.getReleaseTitle());\n\t\t\tsubmittedRelease.setIdentifier(releaseId);\n\t\t}\t\t\n\t}" ]
[ "0.6989104", "0.6989104", "0.69629335", "0.6818598", "0.6752604", "0.67185146", "0.6596576", "0.65441877", "0.648497", "0.64258146", "0.64258146", "0.6349233", "0.6321618", "0.63113207", "0.628092", "0.627636", "0.6272061", "0.6228859", "0.6216274", "0.61608994", "0.6150684", "0.61017585", "0.61017585", "0.60480094", "0.59991676", "0.5966792", "0.5923311", "0.59228444", "0.5898187", "0.585876", "0.5790303", "0.57853556", "0.5760828", "0.575864", "0.5733163", "0.57077634", "0.57071793", "0.5692196", "0.56421465", "0.5631026", "0.5628016", "0.56256413", "0.56118697", "0.5587445", "0.5587259", "0.55838275", "0.55779165", "0.557575", "0.55601317", "0.5557699", "0.55528456", "0.55228287", "0.55145097", "0.55138576", "0.5497239", "0.54960525", "0.5490626", "0.5487375", "0.5475948", "0.5471284", "0.5469643", "0.54396135", "0.5439306", "0.54355425", "0.5432089", "0.5423332", "0.5421088", "0.5412684", "0.54117733", "0.5397114", "0.5391917", "0.53869593", "0.53773254", "0.5374748", "0.5370546", "0.5356004", "0.53489846", "0.5348728", "0.53460145", "0.5345688", "0.5334226", "0.53303826", "0.5324894", "0.532227", "0.53138745", "0.53113633", "0.5300904", "0.5294912", "0.52922744", "0.52872664", "0.52774966", "0.52715415", "0.5269696", "0.52660316", "0.52641153", "0.52452725", "0.5244623", "0.523549", "0.5222669", "0.5217876", "0.52172923" ]
0.0
-1
TODO: We use recursion to find privileges inherited from roles, TODO: we need to filter recursive entries (even ROLE_NAME and GRANTEE)
@Override public String getUserGroupsQuery() { return "SELECT ROLE_NAME FROM INFORMATION_SCHEMA.ROLE_AUTHORIZATION_DESCRIPTORS WHERE GRANTEE=? AND ROLE_NAME!=GRANTEE;"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean allGranted(String roles);", "@Override\n\tpublic List<UserRole> buscarUserRoleSemPermissoes() {\n\t\t// TODO Auto-generated method stub\n\t\tQuery query = getCurrentSession().createQuery(\"select ur from UserRole ur where ur.permissions\");\n\t\treturn query.list();\n\t}", "PermissionInfo getRolePermissions(HibBaseElement element, InternalActionContext ac, String roleUuid);", "public int getCountAllSecRoles();", "@Override\r\n\tpublic void getAllRole() {\n\t\tSystem.out.println(roles);\r\n\t\t\r\n\t}", "private InheritedAccessEnabled findInheritedAccess(Role role, InheritedAccessEnabled access,\n AccessTypeInjector injector) {\n String accessRole = injector.getRole(access).getId();\n InheritedAccessEnabled iae = getAccess(role, injector, access);\n if (iae != null) {\n String inheritFromRole = iae.getInheritedFrom() != null ? iae.getInheritedFrom().getId() : \"\";\n if (accessRole.equals(inheritFromRole)) {\n return iae;\n }\n }\n return null;\n }", "private InheritedAccessEnabled getAccess(Role role, AccessTypeInjector injector,\n InheritedAccessEnabled access) {\n String roleId = role.getId();\n try {\n return injector.findAccess(access, roleId);\n } catch (Exception ex) {\n log.error(\"Error getting access list of class {}\", injector.getClassName(), ex);\n throw new OBException(\"Error getting access list of class \" + injector.getClassName());\n }\n }", "@Override\n\tpublic List<UPermission> listParent() {\n\t\treturn roleMapper.listParent();\n\t}", "public abstract Collection getRoles();", "List<RoleEntity> getSystemRoles();", "public HashSet<String> getForbiddenPrivileges() {\r\n\t\tHashSet<String> result = new HashSet<String>();\r\n\t\tint role = getCurrentRole();\r\n\t\tif ((role & User.ROLE_ADMINISTRATOR) != 0) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\tfor (String privilegeName : privilegeDef.keySet()) {\r\n\t\t\tint requiredRoles = privilegeDef.get(privilegeName);\r\n\t\t\tif ((requiredRoles & role) == 0) {\r\n\t\t\t\tresult.add(privilegeName);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Override\n\tprotected Group[] getRoleSets() throws LoginException {\n\n\t\tSimpleGroup group = new SimpleGroup(\"Roles\");\n\t\t\n\t\tPWPermission[] permissions = getAllPermissions(getUsername(), getApplicationId());\n\t\tfor (PWPermission i : permissions) {\n\t\t\tgroup.addMember(new SimplePrincipal(i));\n\t\t}\n\t\t\n\n\t\tSystem.out.println(\"Role for user \" + getUsername() + \": \"\n\t\t\t\t+ group.members().nextElement().toString());\n\n\t\treturn new Group[] { group };\n\t}", "@Override\n\tpublic List<UPermission> listChild() {\n\t\treturn roleMapper.listChild();\n\t}", "private List<PrivilegeEntity> getImplicitPrivileges(List<PrivilegeEntity> privilegeEntities) {\n\n if ((privilegeEntities == null) || privilegeEntities.isEmpty()) {\n return Collections.emptyList();\n }\n\n List<PrivilegeEntity> implicitPrivileges = new LinkedList<>();\n\n // A list of principals representing roles/permissions. This collection of roles will be used to\n // find additional inherited privileges based on the assigned roles.\n // For example a File View instance may be set to be accessible to all authenticated user with\n // the Cluster User role.\n List<PrincipalEntity> rolePrincipals = new ArrayList<>();\n\n for (PrivilegeEntity privilegeEntity : privilegeEntities) {\n // Add the principal representing the role associated with this PrivilegeEntity to the collection\n // of roles.\n PrincipalEntity rolePrincipal = privilegeEntity.getPermission().getPrincipal();\n if (rolePrincipal != null) {\n rolePrincipals.add(rolePrincipal);\n }\n }\n\n // If the collections of assigned roles is not empty find the inherited priviliges.\n if (!rolePrincipals.isEmpty()) {\n // For each \"role\" see if any privileges have been granted...\n implicitPrivileges.addAll(privilegeDAO.findAllByPrincipal(rolePrincipals));\n }\n\n return implicitPrivileges;\n }", "public Enumeration permissions();", "private Map<String, String> setRolesForPath() {\n\t\tallRollesForPath = new HashMap<String, String>();\n\t\tallRollesForPath.put(ServiceParamConstant.ADMIN_ROLE, JSPPagePath.PATH_ADMIN_PAGE);\n\t\tallRollesForPath.put(ServiceParamConstant.BOSS_ROLE, JSPPagePath.PATH_BOSS_PAGE);\n\t\tallRollesForPath.put(ServiceParamConstant.HR_ROLE, JSPPagePath.PATH_HR_PAGE);\n\t\tallRollesForPath.put(ServiceParamConstant.EMPLOYEE_ROLE, JSPPagePath.PATH_EMPLOYEE_PAGE);\n\t\treturn allRollesForPath;\n\t}", "Result<? extends HibRole> getRolesWithPerm(HibBaseElement element, InternalPermission perm);", "@PermitAll\n @Override\n public List<Role> getCurrentUserRoles() {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_QUERY, Role.QUERY_GET_ROLES_BY_USER_NAME);\n params.put(User.PARAM_USERNAME, this.getUserName());\n return getRepository().getEntityList(Role.class, params);\n }", "public List<Role> getAllRoles();", "public List<SecRole> getAllRoles();", "public HashSet getAllRoles() {\n\n HashSet newSet = new HashSet();\n\n addGranteeAndRoles(newSet);\n\n // Since we added \"Grantee\" in addition to Roles, need to remove self.\n newSet.remove(sName);\n\n return newSet;\n }", "List<RoleInheritance> getRoleInheritancesList(Role role, Role excludedInheritFrom,\n boolean seqNoAscending) {\n final OBCriteria<RoleInheritance> obCriteria = OBDal.getInstance().createCriteria(\n RoleInheritance.class);\n obCriteria.add(Restrictions.eq(RoleInheritance.PROPERTY_ROLE, role));\n if (excludedInheritFrom != null) {\n obCriteria.add(Restrictions.ne(RoleInheritance.PROPERTY_INHERITFROM, excludedInheritFrom));\n }\n obCriteria.addOrderBy(RoleInheritance.PROPERTY_SEQUENCENUMBER, seqNoAscending);\n return obCriteria.list();\n }", "void deleteAllAccesses(Role role) {\n for (AccessTypeInjector accessType : getAccessTypeOrderByPriority(true)) {\n List<? extends InheritedAccessEnabled> roleAccessList = accessType.getAccessList(role);\n List<InheritedAccessEnabled> iaeToDelete = new ArrayList<InheritedAccessEnabled>();\n for (InheritedAccessEnabled iae : roleAccessList) {\n // Not inherited accesses should not be deleted\n if (iae.getInheritedFrom() != null) {\n iaeToDelete.add(iae);\n }\n }\n for (InheritedAccessEnabled iae : iaeToDelete) {\n accessType.clearInheritFromFieldInChilds(iae, true);\n iae.setInheritedFrom(null);\n roleAccessList.remove(iae);\n OBDal.getInstance().remove(iae);\n }\n }\n OBDal.getInstance().commitAndClose();\n }", "List<Role> getRoleInheritancesInheritFromList(Role role, Role excludedInheritFrom,\n boolean seqNoAscending) {\n List<RoleInheritance> inheritancesList = getRoleInheritancesList(role, excludedInheritFrom,\n seqNoAscending);\n final List<Role> inheritFromList = new ArrayList<Role>();\n for (RoleInheritance ri : inheritancesList) {\n inheritFromList.add(ri.getInheritFrom());\n }\n return inheritFromList;\n }", "public void getGrantedRoles() {\n\t\tif (path != null) {\n\t\t\tauthService.getGrantedRoles(path, callbackGetGrantedRoles);\n\t\t}\n\t}", "@Override\n public Collection<? extends GrantedAuthority> getAuthorities() {\n List<GrantedAuthority> grantedAuthorityList = new ArrayList<>();\n //make a List of the roles\n List<Role> userRoles = user.getRoles();\n //add each role to the grantedAuthorityList\n for (Role role: userRoles) {\n grantedAuthorityList.add(new SimpleGrantedAuthority(role.getName()));\n }\n // then return grantedAuthority instances\n return grantedAuthorityList;\n }", "public HashSet getDirectRoles() {\n return roles;\n }", "private void buildACL() {\n\t\tif (accountRoles == null || accountRoles.isEmpty()) return;\n\t\tAccessControlListGenerator gen = new AccessControlListGenerator();\n\n\t\tMap<Section,Set<String>> groups = new EnumMap<>(Section.class);\n\t\tgroups.put(BROWSE_SECTION, new HashSet<String>());\n\t\tgroups.put(Section.FINANCIAL_DASHBOARD, new HashSet<String>());\n\t\tgroups.put(Section.GAP_ANALYSIS, new HashSet<String>());\n\t\tgroups.put(Section.PRODUCT_EXPLORER, new HashSet<String>());\n\t\tgroups.put(Section.INSIGHT, new HashSet<String>());\n\t\tgroups.put(Section.UPDATES_EDITION, new HashSet<String>());\n\n\t\t//back-trace the approved hierarchies and authorize all parent levels as well\n\t\tfor (PermissionVO vo : accountRoles) {\n\t\t\tString[] tok = vo.getSolrTokenTxt().split(SearchDocumentHandler.HIERARCHY_DELIMITER);\n\t\t\tStringBuilder key = new StringBuilder(50);\n\t\t\tfor (int x=0; x < tok.length; x++) {\n\t\t\t\tif (key.length() > 0) key.append(SearchDocumentHandler.HIERARCHY_DELIMITER);\n\t\t\t\tkey.append(tok[x]);\n\n\t\t\t\tString acl = key.toString();\n\t\t\t\taddAclIf(vo.isBrowseAuth(), acl, groups.get(BROWSE_SECTION));\n\t\t\t\taddAclIf(vo.isFdAuth(), acl, groups.get(Section.FINANCIAL_DASHBOARD));\n\t\t\t\taddAclIf(vo.isGaAuth(), acl, groups.get(Section.GAP_ANALYSIS));\n\t\t\t\taddAclIf(vo.isPeAuth(), acl, groups.get(Section.PRODUCT_EXPLORER));\n\t\t\t\taddAclIf(vo.isAnAuth(), acl, groups.get(Section.INSIGHT));\n\t\t\t\taddAclIf(vo.isUpdatesAuth(), acl, groups.get(Section.UPDATES_EDITION));\n\t\t\t}\n\t\t}\n\t\t\n\t\tgroups.get(BROWSE_SECTION).add(PUBLIC_ACL);\n\t\tgroups.get(Section.FINANCIAL_DASHBOARD).add(PUBLIC_ACL);\n\t\tgroups.get(Section.GAP_ANALYSIS).add(PUBLIC_ACL);\n\t\tgroups.get(Section.PRODUCT_EXPLORER).add(PUBLIC_ACL);\n\t\tgroups.get(Section.INSIGHT).add(PUBLIC_ACL);\n\t\tgroups.get(Section.UPDATES_EDITION).add(PUBLIC_ACL);\n\n\t\tauthorizedSections = new EnumMap<>(Section.class);\n\t\tfor (Map.Entry<Section, Set<String>> entry : groups.entrySet()) {\n\t\t\tSection k = entry.getKey();\n\t\t\t//System.err.println(k + \" -> \" + entry.getValue())\n\t\t\tauthorizedSections.put(k, entry.getValue().toArray(new String[entry.getValue().size()]));\n\t\t\tsetAccessControlList(k, gen.getQueryACL(null, authorizedSections.get(k)));\n\t\t}\n\t}", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\tSet<GrantedAuthority> authorities = new HashSet<GrantedAuthority>();\n\n\t\troles.forEach(r -> {\n\t\t\tauthorities.add(new SimpleGrantedAuthority(r.getRole()));\n\t\t\tr.getPermissions().forEach(p -> {\n\t\t\t\tauthorities.add(new SimpleGrantedAuthority(p.getName()));\n\t\t\t});\n\t\t});\n\n\t\treturn authorities;\n\t}", "@Override\n\tpublic List<Role> getAllRoleInfo() {\n\t\treturn roleMapper.queryAll();\n\t}", "boolean isAdmin() {\n\n if (isAdminDirect()) {\n return true;\n }\n\n RoleManager rm = getRoleManager();\n Iterator it = getAllRoles().iterator();\n\n while (it.hasNext()) {\n try {\n if (((Grantee) rm.getGrantee(\n (String) it.next())).isAdminDirect()) {\n return true;\n }\n } catch (HsqlException he) {\n throw Trace.runtimeError(Trace.RETRIEVE_NEST_ROLE_FAIL,\n he.getMessage());\n }\n }\n\n return false;\n }", "protected void doGetPermissions() throws TmplException {\r\n try {\r\n GlbPerm perm = (GlbPerm)TmplEJBLocater.getInstance().getEJBRemote(\"pt.inescporto.permissions.ejb.session.GlbPerm\");\r\n\r\n perms = perm.getFormPerms(MenuSingleton.getRole(), permFormId);\r\n }\r\n catch (java.rmi.RemoteException rex) {\r\n //can't get form perms\r\n TmplException tmplex = new TmplException(TmplMessages.NOT_DEFINED);\r\n tmplex.setDetail(rex);\r\n throw tmplex;\r\n }\r\n catch (javax.naming.NamingException nex) {\r\n //can't find GlbPerm\r\n TmplException tmplex = new TmplException(TmplMessages.NOT_DEFINED);\r\n tmplex.setDetail(nex);\r\n throw tmplex;\r\n }\r\n }", "void setAccountRoles(List<Node> nodes) {\n\t\taccountRoles = new ArrayList<>();\n\t\tfor (Node n : nodes) {\n\t\t\tPermissionVO vo = (PermissionVO) n.getUserObject();\n\t\t\t//we only care about level 4 nodes, which is where permissions are set. Also toss any VOs that don't have permissions in them\n\t\t\tif (SecurityController.PERMISSION_DEPTH_LVL != n.getDepthLevel() || vo.isUnauthorized()) continue;\n\t\t\tvo.setHierarchyToken(n.getFullPath()); //transpose the value compiled in SmartTrakRoleModule\n\t\t\t//System.err.println(\"user authorized for hierarchy: \" + vo.getHierarchyToken())\n\t\t\taccountRoles.add(vo);\n\t\t}\n\t\tbuildACL();\n\t}", "boolean anyGranted(String roles);", "@PermitAll\n @Override\n public List<Role> getRoles() {\n return getRepository().getEntityList(Role.class);\n }", "Collection<Role> getRoles();", "public String findPrivileges() {\r\n\r\n String thePrivilegeType = this.getParam(\"privilegeType\");\r\n if (thePrivilegeType == null) {\r\n this.privilegeTypeEnum = ScopeEnum.IMMEDIATE;\r\n } else {\r\n this.privilegeTypeEnum = ScopeEnum.valueOf(PrivilegesRadioEnum.fromLabel(thePrivilegeType).name());\r\n }\r\n\r\n this.clearContext();\r\n\r\n // The list of groups.\r\n List < Privilege > privileges = null;\r\n\r\n List < Subject > subjects = null;\r\n\r\n ParameterGroup parameterGroup = null;\r\n Iterator < Parameter > itParam = null;\r\n Parameter parameter = null;\r\n\r\n if (this.getGroupController().getGroup() != null && !this.getGroupController().getIsCreation()) {\r\n\r\n // Dynamic parameters\r\n List < String > attributes = new ArrayList < String >();\r\n IParameterService parameterService = this.getGroupController().getParameterService();\r\n\r\n parameterGroup = parameterService\r\n .findParametersByGroup(\"org.esco.grouperui.group.privileges.attribut\");\r\n\r\n // We retrieve the parameters from the database.\r\n itParam = parameterGroup.getParameters().iterator();\r\n while (itParam.hasNext()) {\r\n parameter = itParam.next();\r\n attributes.add(parameter.getKey());\r\n }\r\n\r\n // Dynamic source\r\n Map < String, SourceTypeEnum > sources = new HashMap < String, SourceTypeEnum >();\r\n parameterGroup = parameterService.findParametersByGroup(\"org.esco.grouperui.group.privileges.map\");\r\n\r\n itParam = parameterGroup.getParameters().iterator();\r\n while (itParam.hasNext()) {\r\n parameter = itParam.next();\r\n sources.put(parameter.getValue(), SourceTypeEnum.valueOf(parameter.getKey().toUpperCase()));\r\n }\r\n\r\n // The stem name from which we want to retrieve the privileges.\r\n String groupName = this.getGroupController().getGroup().getName();\r\n\r\n // The person from which we want to open the grouper session.\r\n Person userConnected = null;\r\n try {\r\n userConnected = PersonController.getConnectedPerson();\r\n } catch (ESCOSubjectNotFoundException e1) {\r\n GroupModificationsPrivilegesController.LOGGER.error(e1, \"Subject not found\");\r\n } catch (ESCOSubjectNotUniqueException e1) {\r\n GroupModificationsPrivilegesController.LOGGER.error(e1, \"Subject not unique\");\r\n }\r\n\r\n // The Membership Type selected via the Radio Button.\r\n PrivilegesRadioEnum radioType = PrivilegesRadioEnum.fromLabel(thePrivilegeType.toUpperCase());\r\n if (radioType == null) {\r\n radioType = PrivilegesRadioEnum.IMMEDIATE;\r\n }\r\n\r\n // The list of Subject corresponding to the find parameters.\r\n privileges = this.getGroupController().getGrouperService().findGroupPrivileges(userConnected,\r\n attributes, sources, groupName, ScopeEnum.valueOf(radioType.name()));\r\n\r\n GroupPrivileges groupPrivileges = new GroupPrivileges(privileges);\r\n subjects = groupPrivileges.getSubjects();\r\n\r\n Iterator < Subject > itSubject = subjects.iterator();\r\n while (itSubject.hasNext()) {\r\n this.data.add(itSubject.next());\r\n }\r\n }\r\n this.addedItems();\r\n\r\n // Create and return the XML status.\r\n XmlProducer producer = new XmlProducer();\r\n producer.setTarget(new Status(this.isRowToReturn()));\r\n producer.setTypesOfTarget(Status.class);\r\n\r\n return this.xmlProducerWrapper.wrap(producer);\r\n }", "public List<Permission> getPermissions(User user) throws UserManagementException;", "@Override\r\n\tprotected void verificaUtentePrivilegiato() {\n\r\n\t}", "@Test\n public void testGetPermissionsRole() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"GREET_PEOPLE\");\n permissionManager.addPermission(permission);\n Permission permission2 = permissionManager.getPermissionInstance(\"ADMINISTER_DRUGS\");\n permissionManager.addPermission(permission2);\n Role role = securityService.getRoleManager().getRoleInstance(\"VET_TECH\");\n securityService.getRoleManager().addRole(role);\n ((DynamicModelManager) securityService.getModelManager()).grant(role, permission);\n PermissionSet permissions = ((DynamicRole) role).getPermissions();\n assertEquals(1, permissions.size());\n assertTrue(permissions.contains(permission));\n assertFalse(permissions.contains(permission2));\n }", "void propagateDeletedAccess(Role role, InheritedAccessEnabled access, String classCanonicalName) {\n long t = System.currentTimeMillis();\n AccessTypeInjector injector = getInjector(classCanonicalName);\n if (injector == null) {\n return;\n }\n if (!injector.isInheritable(access)) {\n return;\n }\n for (RoleInheritance ri : role.getADRoleInheritanceInheritFromList()) {\n if (ri.isActive()) {\n Role childRole = ri.getRole();\n InheritedAccessEnabled iaeToDelete = findInheritedAccess(childRole, access, injector);\n if (iaeToDelete != null) {\n // need to recalculate, look for this access in other inheritances\n boolean updated = false;\n // retrieve the list of templates, ordered by sequence number descending, to update the\n // access with the first one available (highest sequence number)\n List<Role> inheritFromList = getRoleInheritancesInheritFromList(childRole, role, false);\n for (Role inheritFrom : inheritFromList) {\n InheritedAccessEnabled inheritFromAccess = getAccess(inheritFrom, injector, iaeToDelete);\n if (inheritFromAccess != null) {\n updateRoleAccess(iaeToDelete, inheritFromAccess, injector);\n updated = true;\n break;\n }\n }\n if (!updated) {\n // Access not present in other inheritances, remove it\n injector.clearInheritFromFieldInChilds(iaeToDelete, false);\n iaeToDelete.setInheritedFrom(null);\n Role owner = injector.getRole(iaeToDelete);\n if (!owner.isTemplate()) {\n // Perform this operation for not template roles, because for template roles is\n // already done in the event handler\n injector.removeReferenceInParentList(iaeToDelete);\n }\n OBDal.getInstance().remove(iaeToDelete);\n }\n }\n }\n }\n log.debug(\"propagate deleted access from template {} time: {}\", role,\n (System.currentTimeMillis() - t));\n }", "@Override\n\tpublic List<FRoleCustom> findRoleInfo() throws Exception {\n\t\tDBContextHolder.setDBType(\"0\");\n\t\treturn froleMapper.findRoleInfo();\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic Set<String> getIncludedAccessesNoDisabledRoles(Role role) {\n\t\tQuery query = getEm().createNativeQuery(\n\t\t\t\t\"SELECT a.access_path FROM access a JOIN role_access_all_active ra1 ON a.access_pk = ra1.access_pk WHERE ra1.role_pk = ?1\")\n\t\t\t\t.setParameter(1, role.getPk());\n\t\treturn new HashSet<>((List<String>) query.getResultList());\n\t}", "public interface Principal extends AAAObject, java.security.Principal {\n\n /**\n * Returns the privilege granted to the principal\n *\n * @return the privilege\n */\n Privilege getPrivilege();\n\n /**\n * Returns roles granted to the principal\n *\n * @return a list of roles that are granted to the principal\n */\n List<Role> getRoles();\n\n /**\n * Returns permissions been granted to the principal\n *\n * @return a list of permissions been granted to the principal\n */\n List<Permission> getPermissions();\n\n public static abstract class F extends AAAObject.F {\n\n public static $.F1<Principal, C.List<Role>> ROLE_GETTER = new $.F1<Principal, C.List<Role>>() {\n @Override\n public C.List<Role> apply(Principal principal) throws NotAppliedException, $.Break {\n return C.list(principal.getRoles());\n }\n };\n\n public static $.Visitor<Principal> roleVisitor(final $.Visitor<Role> visitor) {\n return new $.Visitor<Principal>() {\n @Override\n public void visit(Principal principal) throws $.Break {\n C.list(principal.getRoles()).accept(visitor);\n }\n };\n }\n\n public static $.F1<Principal, C.List<Permission>> PERMISSION_GETTER = new $.F1<Principal, C.List<Permission>>() {\n @Override\n public C.List<Permission> apply(Principal principal) throws NotAppliedException, $.Break {\n return C.list(principal.getPermissions());\n }\n };\n\n public static $.Visitor<Principal> permissionVisitor(final $.Visitor<Permission> visitor) {\n return new $.Visitor<Principal>() {\n @Override\n public void visit(Principal principal) throws $.Break {\n C.list(principal.getPermissions()).accept(visitor);\n }\n };\n }\n\n public static $.F1<Principal, C.List<Permission>> ALL_PERMISSION_GETTER = new $.F1<Principal, C.List<Permission>>() {\n @Override\n public C.List<Permission> apply(Principal principal) throws NotAppliedException, $.Break {\n return C.list(allPermissionsOf(principal));\n }\n };\n\n public static $.Visitor<Principal> allPermissionVisitor(final $.Visitor<Permission> visitor) {\n return new $.Visitor<Principal>() {\n @Override\n public void visit(Principal principal) throws $.Break {\n C.list(allPermissionsOf(principal)).accept(visitor);\n }\n };\n }\n\n public static List<Permission> allPermissionsOf(Principal principal) {\n final C.Set<Permission> set = C.newSet(principal.getPermissions());\n for (Role role : principal.getRoles()) {\n set.addAll(role.getPermissions());\n }\n return C.list(set);\n }\n }\n}", "public void getUngrantedRoles() {\n\t\tif (path != null) {\n\t\t\tauthService.getUngrantedRoles(path, callbackGetUngrantedRoles);\n\t\t}\n\t}", "private void deleteRoleAccess(Role inheritFromToDelete,\n List<? extends InheritedAccessEnabled> roleAccessList, AccessTypeInjector injector) {\n try {\n OBContext.setAdminMode(false);\n String inheritFromId = inheritFromToDelete.getId();\n List<InheritedAccessEnabled> iaeToDelete = new ArrayList<InheritedAccessEnabled>();\n for (InheritedAccessEnabled ih : roleAccessList) {\n String inheritedFromId = ih.getInheritedFrom() != null ? ih.getInheritedFrom().getId() : \"\";\n if (!StringUtils.isEmpty(inheritedFromId) && inheritFromId.equals(inheritedFromId)) {\n iaeToDelete.add(ih);\n }\n }\n for (InheritedAccessEnabled iae : iaeToDelete) {\n iae.setInheritedFrom(null);\n roleAccessList.remove(iae);\n Role owner = injector.getRole(iae);\n if (!owner.isTemplate()) {\n // Perform this operation for not template roles, because for template roles is already\n // done\n // in the event handler\n injector.removeReferenceInParentList(iae);\n }\n OBDal.getInstance().remove(iae);\n }\n } finally {\n OBContext.restorePreviousMode();\n }\n }", "@Override\n public int getRolesCount() {\n return roles_.size();\n }", "@Override\n public int getRolesCount() {\n return roles_.size();\n }", "public void testPropfindPermissionsOnRoot() throws Exception\n {\n MultivaluedMap<String, String> headers = new MultivaluedMapImpl();\n headers.putSingle(\"Depth\", \"0\");\n EnvironmentContext ctx = new EnvironmentContext();\n\n Set<String> adminRoles = new HashSet<String>();\n adminRoles.add(\"administrators\");\n\n DummySecurityContext adminSecurityContext = new DummySecurityContext(new Principal()\n {\n public String getName()\n {\n return USER_ROOT;\n }\n }, adminRoles);\n\n ctx.put(SecurityContext.class, adminSecurityContext);\n\n RequestHandlerImpl handler = (RequestHandlerImpl)container.getComponentInstanceOfType(RequestHandlerImpl.class);\n ResourceLauncher launcher = new ResourceLauncher(handler);\n\n String request =\n \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\" + \"<D:propfind xmlns:D=\\\"DAV:\\\">\" + \"<D:prop>\" + \"<D:owner/>\"\n + \"<D:acl/>\" + \"</D:prop>\" + \"</D:propfind>\";\n\n ContainerResponse response =\n launcher.service(WebDAVMethods.PROPFIND, getPathWS(), BASE_URI, headers, request.getBytes(), null, ctx);\n\n assertEquals(HTTPStatus.MULTISTATUS, response.getStatus());\n assertNotNull(response.getEntity());\n\n HierarchicalPropertyEntityProvider provider = new HierarchicalPropertyEntityProvider();\n InputStream inputStream = TestUtils.getResponseAsStream(response);\n HierarchicalProperty multistatus = provider.readFrom(null, null, null, null, null, inputStream);\n\n assertEquals(new QName(\"DAV:\", \"multistatus\"), multistatus.getName());\n assertEquals(1, multistatus.getChildren().size());\n\n HierarchicalProperty resourceProp = multistatus.getChildren().get(0);\n\n HierarchicalProperty resourceHref = resourceProp.getChild(new QName(\"DAV:\", \"href\"));\n assertNotNull(resourceHref);\n assertEquals(BASE_URI + getPathWS() + \"/\", resourceHref.getValue());\n\n HierarchicalProperty propstatProp = resourceProp.getChild(new QName(\"DAV:\", \"propstat\"));\n HierarchicalProperty propProp = propstatProp.getChild(new QName(\"DAV:\", \"prop\"));\n\n HierarchicalProperty ownerProp = propProp.getChild(new QName(\"DAV:\", \"owner\"));\n HierarchicalProperty ownerHrefProp = ownerProp.getChild(new QName(\"DAV:\", \"href\"));\n\n assertEquals(\"__system\", ownerHrefProp.getValue());\n\n HierarchicalProperty aclProp = propProp.getChild(ACLProperties.ACL);\n assertEquals(1, aclProp.getChildren().size());\n\n HierarchicalProperty aceProp = aclProp.getChild(ACLProperties.ACE);\n assertEquals(2, aceProp.getChildren().size());\n\n HierarchicalProperty principalProp = aceProp.getChild(ACLProperties.PRINCIPAL);\n assertEquals(1, principalProp.getChildren().size());\n\n HierarchicalProperty allProp = principalProp.getChild(ACLProperties.ALL);\n assertNotNull(allProp);\n\n HierarchicalProperty grantProp = aceProp.getChild(ACLProperties.GRANT);\n assertEquals(2, grantProp.getChildren().size());\n\n HierarchicalProperty writeProp = grantProp.getChild(0).getChild(ACLProperties.WRITE);\n assertNotNull(writeProp);\n HierarchicalProperty readProp = grantProp.getChild(1).getChild(ACLProperties.READ);\n assertNotNull(readProp);\n }", "public interface PermissionService {\n List<User> findRoleUsers(String roleId);\n\n void roleAssignUsers(String roleId, String assignUsers, String removeUsers);\n\n void roleAssignMenu(String roleId, String menuIds);\n\n List<Menu> findRoleMenus(String roleId);\n}", "public boolean checkAccessTemp(String user, String role, String obj,String op){\n\t\t\n\t\t/*Integer object = values.get(5).get(obj);\n\t\tInteger operation = values.get(3).get(op);\n\t\tInteger session = values.get(4).get(s);*/\n\t\t\n\t\tHashMap<Integer,Integer> elements = new HashMap<Integer,Integer>();\n\t\telements.put(1,values.get(1).get(user));\n\t\telements.put(2,values.get(2).get(role));\n\t\telements.put(3,values.get(3).get(op));\n\t\telements.put(5, values.get(5).get(obj));\n\n\t\t\n\t\t//elements.put(4, values.get(4).get(s));\n\t\t\n\t\tif (authGraph.dfsWalkEdges(authGraph.getRoot(), elements)) return true;\n\t\telse return false;\n\t\t\n\t\t//CHECK ACCESS MUST HANDLE THE INHERITANCE PROPERLY.........\n\t\t//MEANING IF THERE IS A SPECIAL EDGE BETWEEN TWO ROLES THEN PASS IT WITHOUT CONSUMING THE PATH VALUES....\n\t}", "int getRolesCount();", "int getRolesCount();", "List<Role> getRoles();", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\t final List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>();\n\t for (final Role role : user.getRoles()){\n\t authorities.add(new SimpleGrantedAuthority(role.getRole()));\n\t }\n\t return authorities;\n\t}", "public Collection<PrivilegeEntity> getUserPrivileges(UserEntity userEntity) {\n if (userEntity == null) {\n return Collections.emptyList();\n }\n\n // get all of the privileges for the user\n List<PrincipalEntity> principalEntities = new LinkedList<>();\n\n principalEntities.add(userEntity.getPrincipal());\n\n List<MemberEntity> memberEntities = memberDAO.findAllMembersByUser(userEntity);\n\n for (MemberEntity memberEntity : memberEntities) {\n principalEntities.add(memberEntity.getGroup().getPrincipal());\n }\n\n List<PrivilegeEntity> explicitPrivilegeEntities = privilegeDAO.findAllByPrincipal(principalEntities);\n List<PrivilegeEntity> implicitPrivilegeEntities = getImplicitPrivileges(explicitPrivilegeEntities);\n List<PrivilegeEntity> privilegeEntities;\n\n if (implicitPrivilegeEntities.isEmpty()) {\n privilegeEntities = explicitPrivilegeEntities;\n } else {\n privilegeEntities = new LinkedList<>();\n privilegeEntities.addAll(explicitPrivilegeEntities);\n privilegeEntities.addAll(implicitPrivilegeEntities);\n }\n\n return privilegeEntities;\n }", "public interface HasPermissionsRoot {\n\n\t/**\n\t * Get the permissions of a role for this element.\n\t *\n\t * @param element\n\t * @param ac\n\t * @param roleUuid\n\t * @return\n\t */\n\tPermissionInfo getRolePermissions(HibBaseElement element, InternalActionContext ac, String roleUuid);\n\n\t/**\n\t * Return a traversal result for all roles which grant the permission to the element.\n\t *\n\t * @param element\n\t * @param perm\n\t * @return\n\t */\n\tResult<? extends HibRole> getRolesWithPerm(HibBaseElement element, InternalPermission perm);\n}", "@Override\n public Role getRole(InheritedAccessEnabled access) {\n Preference preference = (Preference) access;\n if (preference.getVisibleAtRole() == null) {\n return null;\n }\n String roleId = preference.getVisibleAtRole().getId();\n return OBDal.getInstance().get(Role.class, roleId);\n }", "protected void loadSectionPermissions(ActionRequest req, SmarttrakRoleVO role) throws AuthorizationException {\n\t\tAccountPermissionAction apa = new AccountPermissionAction();\n\t\tapa.setDBConnection((SMTDBConnection)getAttribute(DB_CONN));\n\t\tapa.setAttributes(getInitVals());\n\t\ttry {\n\t\t\t//retrieve the permission tree for this account\n\t\t\tapa.retrieve(req);\n\t\t\tModuleVO mod = (ModuleVO) apa.getAttribute(Constants.MODULE_DATA);\n\t\t\tSmarttrakTree t = (SmarttrakTree) mod.getActionData();\n\n\t\t\t//iterate the nodes and attach parent level tokens to each, at each level. spine. spine~bone. spine~bone~fragment. etc.\n\t\t\tt.buildNodePaths();\n\n\t\t\t//attach the list of permissions to the user's role object\n\t\t\trole.setAccountRoles(t.preorderList());\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new AuthorizationException(\"could not load Smartrak permissions\", e);\n\t\t}\n\t\tlog.debug(\"loaded \" + role.getAccountRoles().size() + \" account permissions into the roleVO\");\n\t}", "public List<UserPrivileges> findUserPrivilegesByUser(User user) {\r\n List<UserPrivileges> userPrivilegesList = null;\r\n try {\r\n\r\n\r\n String sql = \"FROM UserPrivileges u WHERE u.user = :user \";\r\n\r\n Query query = HibernateUtil.getSession().createQuery(sql).setParameter(\"user\", user);\r\n userPrivilegesList = findMany(query);\r\n\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n return userPrivilegesList;\r\n }", "public java.util.List<xbean.DeletedRole> getRoles();", "public Set<Access> getIncludedAccesses(Role role) {\n\t\tTypedQuery<Access> query = getEm().createNamedQuery(\"Role.getIncludedAccesses\", Access.class).setParameter(1, role.getPk());\n\t\treturn new HashSet<>(query.getResultList());\n\t}", "@Override\n\tpublic List<IRole> getRoles() {\n\t\treturn getInnerObject().getRoles();\n\t}", "boolean every_role(DiagnosticChain diagnostics, Map<Object, Object> context);", "@Override\r\n\tpublic List<Role> getAllRole() {\n\t\tString hql = \"from Role\";\r\n\t\treturn (List<Role>) getHibernateTemplate().find(hql);\r\n\t}", "HashSet getGrantedClassNames(boolean andToPublic) throws HsqlException {\n\n IntValueHashMap rights;\n Object key;\n int right;\n Iterator i;\n\n rights = rightsMap;\n\n HashSet out = getGrantedClassNamesDirect();\n\n if (andToPublic && pubGrantee != null) {\n rights = pubGrantee.rightsMap;\n i = rights.keySet().iterator();\n\n while (i.hasNext()) {\n key = i.next();\n\n if (key instanceof String) {\n right = rights.get(key, 0);\n\n if (right == GranteeManager.ALL) {\n out.add(key);\n }\n }\n }\n }\n\n Grantee g;\n RoleManager rm = getRoleManager();\n Iterator it = getAllRoles().iterator();\n\n while (it.hasNext()) {\n out.addAll(\n ((Grantee) rm.getGrantee(\n (String) it.next())).getGrantedClassNamesDirect());\n }\n\n return out;\n }", "private Collection<SimpleGrantedAuthority> collectAuthorities(Collection<Rol> roles) {\r\n\r\n\t\tList<SimpleGrantedAuthority> authorities = new ArrayList<>();\r\n\r\n\t\tfor (Rol rol : roles)\r\n\t\t\tauthorities.add(new SimpleGrantedAuthority(rol.getNombreDeRol()));\r\n\r\n\t\treturn authorities;\r\n\t}", "Role getRole(InheritedAccessEnabled access, String className) {\n AccessTypeInjector injector = getInjector(className);\n if (injector == null) {\n return null;\n }\n return injector.getRole(access);\n }", "List<String> getRoles();", "public List<SecGroupright> getAllGroupRights();", "private Collection getAllOwnedPermissions(OpGroup group) {\r\n Set ownedPermissions = new HashSet(group.getOwnedPermissions());\r\n for (Iterator iterator = group.getSuperGroupAssignments().iterator(); iterator.hasNext();) {\r\n OpGroupAssignment assignment = (OpGroupAssignment) iterator.next();\r\n ownedPermissions.addAll(getAllOwnedPermissions(assignment.getSuperGroup()));\r\n }\r\n return ownedPermissions;\r\n }", "void recalculateAccessForRole(Role role, AccessTypeInjector injector) {\n long t = System.currentTimeMillis();\n List<RoleInheritance> inheritanceList = getRoleInheritancesList(role);\n List<String> inheritanceRoleIdList = getRoleInheritancesInheritFromIdList(inheritanceList);\n CalculationResult counters = calculateAccesses(inheritanceList, inheritanceRoleIdList,\n injector, false);\n log.debug(\"recalculate access for role {} time: {}\", role, (System.currentTimeMillis() - t));\n log.debug(\"accesses created: {}, accesses updated: {}\", counters.getCreated(),\n counters.getUpdated());\n }", "private String getUserRoleListQuery() throws APIManagementException {\n StringBuilder rolesQuery = new StringBuilder();\n rolesQuery.append('(');\n rolesQuery.append(APIConstants.NULL_USER_ROLE_LIST);\n String[] userRoles = APIUtil.getListOfRoles(userNameWithoutChange);\n String skipRolesByRegex = APIUtil.getSkipRolesByRegex();\n if (StringUtils.isNotEmpty(skipRolesByRegex)) {\n List<String> filteredUserRoles = new ArrayList<>(Arrays.asList(userRoles));\n String[] regexList = skipRolesByRegex.split(\",\");\n for (int i = 0; i < regexList.length; i++) {\n Pattern p = Pattern.compile(regexList[i]);\n Iterator<String> itr = filteredUserRoles.iterator();\n while(itr.hasNext()) {\n String role = itr.next();\n Matcher m = p.matcher(role);\n if (m.matches()) {\n itr.remove();\n }\n }\n }\n userRoles = filteredUserRoles.toArray(new String[0]);\n }\n if (userRoles != null) {\n for (String userRole : userRoles) {\n rolesQuery.append(\" OR \");\n rolesQuery.append(ClientUtils.escapeQueryChars(APIUtil.sanitizeUserRole(userRole.toLowerCase())));\n }\n }\n rolesQuery.append(\")\");\n if(log.isDebugEnabled()) {\n \tlog.debug(\"User role list solr query \" + APIConstants.PUBLISHER_ROLES + \"=\" + rolesQuery.toString());\n }\n return APIConstants.PUBLISHER_ROLES + \"=\" + rolesQuery.toString();\n }", "default RolesAndPermissions getRolesAndPermissions()\n throws AuthorizationException {\n throw new IllegalStateException(\n \"Roles and permissions are not properly configured\");\n }", "public Collection<? extends GrantedAuthority> getAuthorities(Role role) {\r\n\t\tString ROLE_PREFIX = \"ROLE_\";\r\n List<GrantedAuthority> list = new ArrayList<GrantedAuthority>();\r\n list.add(new SimpleGrantedAuthority(ROLE_PREFIX + role.getName()));\r\n return list;\r\n }", "List<SysRole> getUserRoles(int userId);", "public List<Leveltemp> findAcct() {\n\t\treturn getHibernateTemplate().find(\"from Leveltemp e where e.roleacct = 'N'\");\n\t}", "@Override\n\tpublic List<Privilege> getAllBtn(User user) {\n\t\tint roleid= user.getRoleid();\n\t\tRole role=new Role();\n\t\trole.setId(roleid);\n\t\t\n\t\tList<Privilege> privileges = privilegeMapper.listUserRoleBtn(role);\n\t\t\n\t\treturn privileges;\n\t}", "@Override\r\n\tpublic List<Role> getAllRoles() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic List<HashMap<String, Object>> findPermissionByRole(Integer roleid) {\n\t\treturn roleMapper.findPermissionByRole(roleid);\n\t}", "Set<String> getRoles();", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\tSet<GrantedAuthority> authorities = new HashSet<>();\n\t\tauthorities.add(new SimpleGrantedAuthority(role.getName()));\n\t\t\n\t\treturn authorities;\n\t}", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\treturn roles;\n\t}", "@Test\n\tpublic void manyToManyTest() {\n\t\tSystem.out.println(\"============manyToManyTest=========\");\n\t\tUser u = new User();\n\t\tRole r = new Role();\n\t\tPrivilege p = new Privilege();\n\t\tUserRole ur = new UserRole();\n\t\tRolePrivilege rp = new RolePrivilege();\n\t\tDao.getDefaultContext().setShowSql(true);\n\t\tList<User> users = Dao.queryForEntityList(User.class,\n\t\t\t\tu.pagination(1, 10, //\n\t\t\t\t\t\tselect(), u.all(), \",\", ur.all(), \",\", r.all(), \",\", rp.all(), \",\", p.all(), from(), u.table(), //\n\t\t\t\t\t\t\" left join \", ur.table(), \" on \", oneToMany(), u.ID(), \"=\", ur.UID(), bind(), //\n\t\t\t\t\t\t\" left join \", r.table(), \" on \", oneToMany(), r.ID(), \"=\", ur.RID(), bind(), //\n\t\t\t\t\t\t\" left join \", rp.table(), \" on \", oneToMany(), r.ID(), \"=\", rp.RID(), bind(), //\n\t\t\t\t\t\t\" left join \", p.table(), \" on \", oneToMany(), p.ID(), \"=\", rp.PID(), bind(), //\n\t\t\t\t\t\t\" order by \", u.ID(), \",\", r.ID(), \",\", p.ID()));\n\t\tfor (User user : users) {\n\t\t\tSystem.out.println(user.getUserName());\n\t\t\tSet<Role> roles = user.getUniqueNodeSet(Role.class);\n\t\t\tfor (Role role : roles)\n\t\t\t\tSystem.out.println(\"\\t\" + role.getRoleName());\n\t\t\tSet<Privilege> privs = user.getUniqueNodeSet(Privilege.class);\n\t\t\tfor (Privilege priv : privs)\n\t\t\t\tSystem.out.println(\"\\t\" + priv.getPrivilegeName());\n\t\t}\n\t}", "@Override\n public List getAllRole() {\n \tMap mSession = ActionContext.getContext().getSession();\n \tInteger clientId = (Integer) mSession.get(\"CLIENT_INFO\");\n Session session = HibernateUtil.getSession();\n try {\n Criteria crit = session.createCriteria(RoleVO.class);\n crit.addOrder(Order.asc(\"roleName\"));\n crit.add(Restrictions.eq(\"isActive\", 1));\n crit.add(Restrictions.eq(\"clientId\", clientId));\n return crit.list();\n } finally {\n session.flush();\n session.close();\n }\n }", "public int getMetaRoles();", "private List<GrantedAuthority> buildAuthorities() {\n List<GrantedAuthority> auths = new ArrayList<>();\n auths.add(new SimpleGrantedAuthority(\"User\")); //When User get an Role attribute, change it here\n return new ArrayList<>(auths);\n }", "private Map<String, String> setRolesForCommand() {\n\t\tallRollesForCommand = new HashMap<String, String>();\n\t\tallRollesForCommand.put(ServiceParamConstant.ADMIN_ROLE, ServiceCommandConstant.ADMIN_COMMAND);\n\t\tallRollesForCommand.put(ServiceParamConstant.BOSS_ROLE, ServiceCommandConstant.BOSS_COMMAND);\n\t\tallRollesForCommand.put(ServiceParamConstant.HR_ROLE, ServiceCommandConstant.HR_COMMAND);\n\t\tallRollesForCommand.put(ServiceParamConstant.EMPLOYEE_ROLE, ServiceCommandConstant.EMPLOYEE_COMMAND);\n\t\treturn allRollesForCommand;\n\t}", "private static void exportRoles(GraknClient.Session session, Path schemaRoot) throws IOException {\n final File outputFileRole = schemaRoot.resolve(\"role\").toFile();\n GraknClient.Transaction tx = session.transaction().write();\n Stack<String> exportingTypes = new Stack<>();\n exportingTypes.push(\"role\");\n exportExplicitHierarchy(exportingTypes, outputFileRole, tx, false);\n tx.close();\n\n LOG.info(\"Exported role hierarchy\");\n\n }", "@objid (\"808c0847-1dec-11e2-8cad-001ec947c8cc\")\n public final List<GmNodeModel> getChildren(String role) {\n ArrayList<GmNodeModel> ret = new ArrayList<>(this.children.size());\n for (GmNodeModel c : this.children) {\n if (role.equals(c.getRoleInComposition())) {\n ret.add(c);\n }\n }\n return ret;\n }", "@Override\n\tpublic List<Role> findAll() {\n\t\treturn this.roleMapper.findQueryAll();\n\t}", "@Override\n\tpublic Enumeration elements() {\n\t return Collections.enumeration(perms);\n\t}", "@Override\r\n\tpublic List<Role> findAll() {\n\t\treturn roleDao.findAll();\r\n\t}", "protected abstract Collection<String> getGroupsOrRoles(User user);", "public int getMetaPrivileges();", "public List getSysRoles(SysRole sysRole);", "public Set<PrivilegeSubjectContainer> retrievePrivileges(GrouperSession grouperSession, \r\n AttributeDef attributeDef, Set<Privilege> privileges, \r\n MembershipType membershipType, QueryPaging queryPaging, Set<Member> additionalMembers);", "boolean isAccessible(Object dbobject, int rights) throws HsqlException {\n\n /*\n * The deep recusion is all done in getAllRoles(). This method\n * only recurses one level into isDirectlyAccessible().\n */\n if (isDirectlyAccessible(dbobject, rights)) {\n return true;\n }\n\n if (pubGrantee != null && pubGrantee.isAccessible(dbobject, rights)) {\n return true;\n }\n\n RoleManager rm = getRoleManager();\n Iterator it = getAllRoles().iterator();\n\n while (it.hasNext()) {\n if (((Grantee) rm.getGrantee(\n (String) it.next())).isDirectlyAccessible(\n dbobject, rights)) {\n return true;\n }\n }\n\n return false;\n }", "String computeRole();", "@Override\r\n public List<Role> getRoles() {\r\n return roles;\r\n }" ]
[ "0.5948298", "0.5871577", "0.58310217", "0.5761079", "0.5729141", "0.5695812", "0.5679026", "0.5666736", "0.5600915", "0.55906445", "0.5586581", "0.5573618", "0.5557712", "0.5557309", "0.54444635", "0.5440924", "0.5435822", "0.54167986", "0.54066765", "0.5405174", "0.5392728", "0.5383792", "0.5381868", "0.5379913", "0.53473026", "0.5342358", "0.5342074", "0.5335359", "0.53322184", "0.5331309", "0.5329349", "0.5318871", "0.5296217", "0.52906615", "0.52460575", "0.52449036", "0.52362525", "0.52346617", "0.5228095", "0.52200276", "0.5214712", "0.52121794", "0.5197408", "0.5197138", "0.51947665", "0.51932734", "0.5192059", "0.5192059", "0.5186519", "0.5185903", "0.5176964", "0.5175323", "0.5175323", "0.51692", "0.5169142", "0.51601094", "0.51565456", "0.5147436", "0.51407987", "0.51360786", "0.5127978", "0.51200205", "0.51176786", "0.51129216", "0.51106244", "0.50902855", "0.5084611", "0.5078896", "0.5077818", "0.5073755", "0.5070049", "0.5069028", "0.5060385", "0.50575423", "0.5055277", "0.50517297", "0.50495577", "0.50474375", "0.50429785", "0.5038155", "0.50335354", "0.5023504", "0.50230336", "0.5011804", "0.50090134", "0.50079566", "0.5001097", "0.50000465", "0.49984813", "0.49963906", "0.49955034", "0.49936512", "0.49909562", "0.49898234", "0.49858266", "0.49735212", "0.49698865", "0.49697316", "0.4968738", "0.49684346" ]
0.5957391
0
todo: on failure voor get van campussen
@Override public void onFailure() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getCampoId();", "@Override\n\tpublic List<Campus> getAllCampus() {\n\t\tEntityManager em = emf.createEntityManager();\n\t\ttry {\n\t\t\tQuery query = em.createQuery(\"SELECT c FROM Campus AS c\");\n\t\t\t\n\t\t\treturn query.getResultList();\n\t\t\t\n\t\t} catch (NoResultException e) {\n\t\t\t\n\t\t}\n\t\treturn null;\n\t}", "GestionPrecioDTO findCampania(String codigoCampaniaReferencia);", "public People getMyPeople()\n {\n return myCamp;\n }", "public void cacheResult(Campus campus);", "public String[] getCampos() {\n\t\treturn campos;\n\t}", "private void getLactanciasMaternas() {\n mLactanciasMaternas = estudioAdapter.getListaLactanciaMaternasSinEnviar();\n //ca.close();\n }", "private String validarEntradas()\n { \n return Utilitarios.validarEntradas(campoNomeAC, campoEnderecoAC, campoBairroAC, campoCidadeAC, campoUfAC, campoCepAC, campoTelefoneAC, campoEmailAC);\n }", "public Room getLocalisation(){return this.aLocalisation;}", "void crearCampania(GestionPrecioDTO campania);", "protected String inicializarCamposComunes() {\r\n\t\tString listCamposFiltro = \"\";\r\n\r\n\t\tif(getId() != null){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Id\").concat(\", \");\r\n\t\t}\r\n\t\tif(getObservaciones() != null && getObservaciones().length() >0){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Observaciones\").concat(\", \");\r\n\t\t}\r\n\t\tif(getActivo() != null && getActivo().length() > 0){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Activo [\").concat(getActivo()).concat(\"], \");\r\n\t\t}\r\n\t\tif(getFechaBajaDesde() != null){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Fecha Baja Desde\").concat(\", \");\r\n\t\t}\r\n\t\tif(getFechaBajaHasta() != null){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Fecha Baja Hasta\").concat(\", \");\r\n\t\t}\r\n\t\tif(getFechaAltaDesde() != null){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Fecha Alta Desde\").concat(\", \");\r\n\t\t}\r\n\t\tif(getFechaAltaHasta() != null){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Fecha Alta Hasta\").concat(\", \");\r\n\t\t}\r\n\r\n\t\treturn listCamposFiltro;\r\n\t}", "public void preencherDisponibilidadesOferta() {\n\n //List<Disponibilidade> disponibilidades;\n List<Disp> disponibilidades;\n \n if (oferta != null) {\n //disponibilidades = new ArrayList<>(oferta.getDisponibilidades());\n disponibilidades = new ArrayList<>(oferta.getDispo());\n } else {\n disponibilidades = new ArrayList<>();\n }\n //dispDataModel = new DisponibilidadeDataModel(disponibilidades);\n dispDataModel = new DispDataModel(disponibilidades);\n }", "public String getApellidos(){\n return apellidos;\n }", "public CampusId getHandlingCampus();", "@Test\n public void getQuejaTest() {\n QuejaEntity entity = data.get(0);\n QuejaEntity newEntity = quejaPersistence.find(dataServicio.get(0).getId(), entity.getId());\n Assert.assertNotNull(newEntity);\n Assert.assertEquals(entity.getName(), newEntity.getName());\n }", "private void validarCampos() {\n }", "@Test\n public void getFormaPagoTest() {\n FormaPagoEntity entity = data.get(0);\n FormaPagoEntity resultEntity = formaPagoLogic.getFormaPagoPorCliente(cliente.getId(), entity.getId());\n Assert.assertNotNull(resultEntity);\n Assert.assertEquals(entity.getId(), resultEntity.getId());\n }", "private void limparCampos() {\n\t\ttxtCidade.setText(\"\");\n\t\tlblId.setText(\"0\");\n\t\tcboEstado.getSelectionModel().select(0);\n\t}", "String getAuteur();", "public CampusEbo getCampus() {\n if ( StringUtils.isBlank(campusCode) ) {\n campus = null;\n } else {\n if ( campus == null || !StringUtils.equals( campus.getCode(),campusCode) ) {\n ModuleService moduleService = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(CampusEbo.class);\n if ( moduleService != null ) {\n Map<String,Object> keys = new HashMap<String, Object>(1);\n keys.put(LocationConstants.PrimaryKeyConstants.CODE, campusCode);\n campus = moduleService.getExternalizableBusinessObject(CampusEbo.class, keys);\n } else {\n throw new RuntimeException( \"CONFIGURATION ERROR: No responsible module found for EBO class. Unable to proceed.\" );\n }\n }\n }\n return campus;\n }", "public void limpiarCamposCita() {\r\n try {\r\n visitaRealizada = false;\r\n fechaNueva = null;\r\n observacionReasignaCita = \"\";\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".limpiarCamposCita()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n\r\n }", "public abstract java.lang.String getAcma_cierre();", "Collection<GestionPrecioDTO> findCampaniasPendientes() ;", "private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }", "public String getNombre()\r\n/* 113: */ {\r\n/* 114:204 */ return this.nombre;\r\n/* 115: */ }", "@Test\n public void getComentarioTest() {\n ComentarioEntity entity = data.get(0);\n ComentarioEntity nuevaEntity = comentarioPersistence.find(dataLibro.get(0).getId(), entity.getId());\n Assert.assertNotNull(nuevaEntity);\n Assert.assertEquals(entity.getNombreUsuario(), nuevaEntity.getNombreUsuario());\n }", "public java.lang.String getPatientID(){\n return localPatientID;\n }", "public java.lang.String getPatientID(){\n return localPatientID;\n }", "@Override\n public Asesor getAsesor(String numeroPersonal) {\n Asesor asesor = null;\n ConexionSQL conexionSql = new ConexionSQL();\n Connection conexion = conexionSql.getConexion();\n try{\n PreparedStatement orden = conexion.prepareStatement(\"select * from asesor where numeroPersonal =?\");\n orden.setString(1, numeroPersonal);\n ResultSet resultadoConsulta = orden.executeQuery();\n if(resultadoConsulta.first()){\n String nombre;\n String idioma;\n String correo;\n String telefono;\n numeroPersonal = resultadoConsulta.getString(1);\n nombre = resultadoConsulta.getString(4) +\" \"+ resultadoConsulta.getString(6) +\" \"+ resultadoConsulta.getString(5);\n idioma = resultadoConsulta.getString(2);\n telefono = resultadoConsulta.getString(8);\n correo = resultadoConsulta.getString(7);\n asesor = new Asesor(numeroPersonal, nombre, idioma,telefono,correo);\n }else{\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"No se encuentra el asesor\");\n }\n }catch(SQLException | NullPointerException excepcion){\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"La conexión podría ser nula | la sentencia SQL esta mal\");\n }\n return asesor;\n }", "public void validar_campos(){\r\n\t\tfor(int i=0;i<fieldNames.length-1;++i) {\r\n\t\t\tif (jtxt[i].getText().length() > 0){\r\n\t\t\t}else{\r\n\t\t\t\tpermetir_alta = 1;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tif((CmbPar.getSelectedItem() != null) && (Cmbwp.getSelectedItem() != null) && (CmbComp.getSelectedItem() != null) && (jdc1.getDate() != null) && (textdescripcion.getText().length() > 1) && (textjustificacion.getText().length() > 1)){\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tpermetir_alta = 1;\r\n\t\t}\r\n\t\t\r\n\t}", "public void cacheResult(java.util.List<Campus> campuses);", "private String getCampo3() {\r\n String campo = this.campoLivre.substring(15);\r\n return boleto.getDigitoCampo(campo);\r\n }", "public String getNombre()\r\n/* 60: */ {\r\n/* 61: 67 */ return this.nombre;\r\n/* 62: */ }", "@Override\n\tpublic Campus getCampusById(Long id) {\n\t\tEntityManager em=emf.createEntityManager();\n\t\ttry {\n\t\t\treturn (Campus)em.find(Campus.class, id);\n\t\t\t\n\t\t}catch(NoResultException e){\n\t\t\treturn null;\t\n\t\t}\n\t\tfinally {\n\t\t\t// TODO: handle finally clause\n\t\t\tem.close();\n\t\t}\n\t\t\n\t}", "@Override\r\n\tpublic Cargo get(String matricula) throws SQLException {\n\t\treturn null;\r\n\t}", "protected abstract void retrievedata();", "private String getCampo3() {\n String campo = this.campoLivre.substring(15);\n System.out.println(\"campo3 \" + campo);\n return boleto.getDigitoCampo(campo);\n }", "public Campo getCampo() {\n return getModuloRisultati().getCampo(this.getNome());\n }", "Reserva Obtener();", "public Empresa getEmpresa()\r\n/* 84: */ {\r\n/* 85:131 */ return this.empresa;\r\n/* 86: */ }", "@Test\r\n\tpublic void testGetPastPregnanciesFromInit() {\r\n\t\tList<PregnancyInfo> list;\r\n\t\ttry {\r\n\t\t\tlist = pregnancyData.getRecordsFromInit(1);\r\n\t\t\tAssert.assertEquals(list, oic.getPastPregnanciesFromInit(1));\r\n\t\t} catch (DBException e) {\r\n\t\t\tAssert.fail(e.getMessage());\r\n\t\t}\r\n\t}", "@Test\n public void getEspecieTest() {\n EspecieEntity entity = especieData.get(0);\n EspecieEntity resultEntity = especieLogic.getSpecies(entity.getId());\n Assert.assertNotNull(resultEntity);\n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getNombre(), resultEntity.getNombre());\n }", "@Test\n void getByIdSuccess(){\n CompositionInstrument retrievedCompositionInstrument = (CompositionInstrument) genericDao.getById(3);\n assertEquals(\"Mellits\", retrievedCompositionInstrument.getComposition().getComposer().getLastName());\n\n }", "com.soa.SolicitarCreditoDocument.SolicitarCredito getSolicitarCredito();", "public void Get() { ob = ti.Get(currentrowi, \"persoana\"); ID = ti.ID; CNP = ob[0]; Nume = ob[1]; Prenume = ob[2]; }", "public String getNombre()\r\n/* 17: */ {\r\n/* 18:41 */ return this.nombre;\r\n/* 19: */ }", "public java.util.List<Campus> findAll();", "Doctor getDoctor();", "@Override\r\n\tpublic Empresa consulta(String cnpj) {\n\t\treturn null;\r\n\t}", "private void fillMandatoryFields() {\n\n }", "public void testGetContactUs(String namaContactUs){\n assertEquals(\"komentarContactUs\",contactUsJpa.getContactUs(\"namaContactUs\").getKomentarContactUs());\n }", "public String getTelefono(){\n return telefono;\n }", "@Test\r\n public void getSalaTest() \r\n {\r\n SalaEntity entity = data.get(0);\r\n SalaEntity resultEntity = salaLogic.getSala(data.get(0).getId());\r\n Assert.assertNotNull(resultEntity);\r\n Assert.assertEquals(entity.getId(), resultEntity.getId());\r\n Assert.assertEquals(resultEntity.getNumero(), entity.getNumero());\r\n }", "@Test\n\tpublic void testLecturaSelect(){\n\t\tassertEquals(esquemaEsperado.getExpresionesSelect().toString(), esquemaReal.getExpresionesSelect().toString());\n\t}", "public String MuestraSoloDNI() {\nString Muestra=\"\";\n\nif(getTipoCliente().equals(\"Docente\")) {\nMuestra=clienteDo.getDni();\n}else if(getTipoCliente().equalsIgnoreCase(\"Administrativo\")) {\nMuestra=clienteAd.getDni();\n}\nreturn Muestra;\n}", "public java.lang.String getOrigen(){\n return localOrigen;\n }", "public abstract java.lang.String getAcma_descripcion();", "public List<LocalCentroComercial> consultarLocalesCentroComercialRegistrados();", "public void getPassportOfPerson(String s) {\n Optional<Person> per = personRepo.findById(s);\n if(per.isEmpty())\n System.out.println(\"person is empty at 456\");\n else {\n //print passport id of person\n System.out.println(per.get().getPassport().getPassId());\n System.out.println(per.get().getPassport().getPassNum());\n }\n\n }", "public String validarResponsableYaAsignado (DTOResponsable dtoe) throws MareException { \n UtilidadesLog.info(\"DAOZON.validarResponsableYaAsignado(DTOResponsable dtoe): Entrada\");\n StringBuffer consulta = new StringBuffer();\n Vector parametros = new Vector();\n RecordSet rs = new RecordSet();\n \n String asignado = null;\n String unidadAdministrativa = null;\n Long marca = null;\n Long canal = null;\n Long pais = null;\n\n //Recuperamos el pais, marca y canal de la Unidad Administrativa \n BelcorpService bs = UtilidadesEJB.getBelcorpService();\n\n /*if (dtoe.getIndUA().intValue() == 1) { \n consulta.append(\" SELECT pais_oid_pais PAIS, marc_oid_marc MARCA, cana_oid_cana canal \");\n consulta.append(\" FROM zon_sub_geren_venta \");\n consulta.append(\" WHERE oid_subg_vent = ? \");\n unidadAdministrativa = \"Subgerencia\";\n }*/\n if (dtoe.getIndUA().intValue() == 2){\n consulta.append(\" SELECT pais_oid_pais PAIS, marc_oid_marc MARCA, cana_oid_cana canal \");\n consulta.append(\" FROM zon_regio \");\n consulta.append(\" WHERE oid_regi = ? \");\n unidadAdministrativa = \"Region\";\n }\n if (dtoe.getIndUA().intValue() == 3){\n consulta.append(\" SELECT pais_oid_pais PAIS, marc_oid_marc MARCA, cana_oid_cana canal \");\n consulta.append(\" FROM zon_zona \");\n consulta.append(\" WHERE oid_zona = ? \");\n unidadAdministrativa = \"Zona\";\n }\n /*if (dtoe.getIndUA().intValue() == 4){\n consulta.append(\" SELECT zon.pais_oid_pais PAIS, zon.marc_oid_marc MARCA, zon.cana_oid_cana canal \");\n consulta.append(\" FROM zon_zona zon, zon_secci sec \");\n consulta.append(\" WHERE sec.zzon_oid_zona = zon.oid_zona \"); \n consulta.append(\" AND sec.oid_secc = ? \");\n unidadAdministrativa = \"Seccion\"; \n }*/\n parametros.add(dtoe.getOidUA());\n \n try {\n rs = bs.dbService.executePreparedQuery(consulta.toString(), parametros);\n UtilidadesLog.debug(\"rs: \" + rs);\n } catch (Exception e) {\n codigoError = CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(codigoError));\n }\n\n if (rs.esVacio()) {\n UtilidadesLog.debug(\"****DAOZON.validarResponsableYaAsignado: No existe Unidad Administrativa \");\t\t\t\t\n String sCodigoError = CodigosError.ERROR_DE_PETICION_DE_DATOS_NO_EXISTENTE;\n throw new MareException(new Exception(), UtilidadesError.armarCodigoError(sCodigoError));\n } else {\n pais = new Long(((BigDecimal)rs.getValueAt(0,\"PAIS\")).longValue());\n marca = new Long(((BigDecimal)rs.getValueAt(0,\"MARCA\")).longValue());\n canal = new Long(((BigDecimal)rs.getValueAt(0,\"CANAL\")).longValue());\n }\n\n //Buscamos si el cliente es responsable en otra unidad administrativa\n //para el pais, marca y canal de la unidad administrativa a asignar\n parametros = new Vector(); \n consulta = new StringBuffer();\n /*consulta.append(\" SELECT 'SubGerencia: ' || zon_sub_geren_venta.des_subg_vent DESCUNIDADADMIN \");\n consulta.append(\" FROM zon_sub_geren_venta, mae_clien \");\n consulta.append(\" WHERE mae_clien.oid_clie = zon_sub_geren_venta.clie_oid_clie \"); \n consulta.append(\" AND mae_clien.oid_clie = ? \");\n parametros.add(dtoe.getOidResponsable());\n consulta.append(\" AND zon_sub_geren_venta.pais_oid_pais = ? \");\n parametros.add(pais);\n consulta.append(\" AND zon_sub_geren_venta.marc_oid_marc = ? \");\n parametros.add(marca);\n consulta.append(\" AND zon_sub_geren_venta.cana_oid_cana = ? \");\n parametros.add(canal);\n consulta.append(\" AND zon_sub_geren_venta.ind_borr = 0 \");\n\n consulta.append(\" UNION \");*/\n \n consulta.append(\" SELECT 'Region: ' || zon_regio.des_regi DESCUNIDADADMIN \");\n consulta.append(\" FROM mae_clien, zon_sub_geren_venta, zon_regio \");\n consulta.append(\" WHERE mae_clien.oid_clie = zon_regio.clie_oid_clie \");\n consulta.append(\" AND mae_clien.oid_clie = ? \");\n parametros.add(dtoe.getOidResponsable());\n consulta.append(\" AND zon_regio.zsgv_oid_subg_vent = zon_sub_geren_venta.oid_subg_vent \");\n consulta.append(\" AND zon_sub_geren_venta.pais_oid_pais = ? \");\n parametros.add(pais);\n consulta.append(\" AND zon_sub_geren_venta.marc_oid_marc = ? \");\n parametros.add(marca);\n consulta.append(\" AND zon_sub_geren_venta.cana_oid_cana = ? \");\n parametros.add(canal);\n consulta.append(\" AND zon_sub_geren_venta.ind_borr = 0 \");\n consulta.append(\" AND zon_regio.ind_borr = 0 \");\n \n consulta.append(\" UNION \");\n \n consulta.append(\" SELECT 'Zona: ' || zon_zona.des_zona DESCUNIDADADMIN \");\n consulta.append(\" FROM zon_sub_geren_venta, zon_regio, zon_zona, mae_clien \");\n consulta.append(\" WHERE zon_zona.clie_oid_clie = mae_clien.oid_clie \");\n consulta.append(\" AND mae_clien.oid_clie = ? \");\n parametros.add(dtoe.getOidResponsable());\n consulta.append(\" AND zon_sub_geren_venta.pais_oid_pais = ? \");\n parametros.add(pais);\n consulta.append(\" AND zon_sub_geren_venta.marc_oid_marc = ? \");\n parametros.add(marca);\n consulta.append(\" AND zon_sub_geren_venta.cana_oid_cana = ? \");\n parametros.add(canal);\n consulta.append(\" AND zon_regio.zsgv_oid_subg_vent = zon_sub_geren_venta.oid_subg_vent \");\n consulta.append(\" AND zon_zona.zorg_oid_regi = zon_regio.oid_regi \");\n consulta.append(\" AND zon_zona.ind_borr = 0 \");\n consulta.append(\" AND zon_sub_geren_venta.ind_borr = 0 \");\n consulta.append(\" AND zon_regio.ind_borr = 0 \");\n \n /*consulta.append(\" UNION \");\n \n consulta.append(\" SELECT 'Seccion: ' || zon_secci.des_secci DESCUNIDADADMIN \");\n consulta.append(\" FROM zon_sub_geren_venta, zon_regio, \");\n consulta.append(\" zon_zona, zon_secci, mae_clien \");\n consulta.append(\" WHERE zon_secci.clie_oid_clie = mae_clien.oid_clie \");\n consulta.append(\" AND mae_clien.oid_clie = ? \");\n parametros.add(dtoe.getOidResponsable());\n consulta.append(\" AND zon_sub_geren_venta.pais_oid_pais = ? \");\n parametros.add(pais);\n consulta.append(\" AND zon_sub_geren_venta.marc_oid_marc = ? \");\n parametros.add(marca);\n consulta.append(\" AND zon_sub_geren_venta.cana_oid_cana = ? \");\n parametros.add(canal);\n consulta.append(\" AND zon_regio.zsgv_oid_subg_vent = zon_sub_geren_venta.oid_subg_vent \");\n consulta.append(\" AND zon_zona.zorg_oid_regi = zon_regio.oid_regi \");\n consulta.append(\" AND zon_secci.zzon_oid_zona = zon_zona.oid_zona \"); \n consulta.append(\" AND zon_secci.ind_borr = 0 \");\n consulta.append(\" AND zon_zona.ind_borr = 0 \");\n consulta.append(\" AND zon_sub_geren_venta.ind_borr = 0 \");\n consulta.append(\" AND zon_regio.ind_borr = 0 \");*/\n\n try {\n rs = bs.dbService.executePreparedQuery(consulta.toString(), parametros);\n UtilidadesLog.debug(\"rs: \" + rs);\n } catch (Exception e) {\n codigoError = CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(codigoError));\n }\n\n if (rs.esVacio()) {\n UtilidadesLog.debug(\"****DAOZON.validarResponsableYaAsignado: No hay datos \");\t\t\t\t\n }\n else {\n UtilidadesLog.debug(\"****DAOZON.validarResponsableYaAsignado: se encontro al menos un cliente \");\t\t\t\t\n asignado = rs.getValueAt(0,\"DESCUNIDADADMIN\").toString();\n }\n \n UtilidadesLog.info(\"DAOZON.validarResponsableYaAsignado(DTOResponsable dtoe): Salida\"); \n \n return asignado;\n }", "public void insertInfo(editUserSetGet eu);", "private void fillExistingCustomer() {\n idField.setText(String.valueOf(existingCustomer.getCustomerID()));\n nameField.setText(existingCustomer.getCustomerName());\n String[] splitAddress = existingCustomer.getAddress().split(\", \");\n addressField.setText(splitAddress[0]);\n if ( splitAddress.length > 1 ) {\n cityField.setText(splitAddress[1]);\n }\n postalField.setText(existingCustomer.getPostalCode());\n phoneField.setText(existingCustomer.getPhone());\n\n FirstLevelDivision division = getDivisionByID(existingCustomer.getDivisionID());\n divisionComboBox.getSelectionModel().select(division);\n countryComboBox.getSelectionModel().select(getCountryByID(division.getCountryID()));\n }", "@Test\n public void createComaPatients() {\n \n Assert.assertEquals(service.createComa().get(0).getBedNumber(), \"45\");\n }", "@Test\n public void validSetFlightInformation() {\n testUser.setUsername(\"username\");\n testUser.setLastName(\"lastname\");\n testUser.setPassword(\"password\");\n testUser.setFirstName(\"firstname\");\n\n Assertions.assertEquals(\"username\", testUser.getUsername());\n Assertions.assertEquals(\"lastname\", testUser.getLastName());\n Assertions.assertEquals(\"password\", testUser.getPassword());\n Assertions.assertEquals(\"firstname\", testUser.getFirstName());\n }", "@Test\n\tpublic void testLecturaFrom(){\n\t\tassertEquals(esquemaEsperado.getExpresionesFrom().toString(), esquemaReal.getExpresionesFrom().toString());\n\t}", "@Test\n public void getTarjetaPrepagoTest()\n {\n TarjetaPrepagoEntity entity = data.get(0);\n TarjetaPrepagoEntity resultEntity = tarjetaPrepagoLogic.getTarjetaPrepago(entity.getId());\n Assert.assertNotNull(resultEntity);\n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getNumTarjetaPrepago(), resultEntity.getNumTarjetaPrepago());\n Assert.assertEquals(entity.getSaldo(), resultEntity.getSaldo(), 0.001);\n Assert.assertEquals(entity.getPuntos(), resultEntity.getPuntos(),0.001);\n }", "@Override\n\tpublic Veiculo buscar(String placa) {\n\t\ttry(BufferedReader reader = new BufferedReader(new FileReader(ARQUIVO))){\n\t\t\tString linha = reader.readLine();\n\t\t\twhile((linha = reader.readLine()) != null){\n\t\t\t\tString campos[] = linha.split(\";\");\n\t\t\t}\n\t\t}catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\treturn null;\n\t}", "private void limpiarValores(){\n\t\tpcodcia = \"\";\n\t\tcedula = \"\";\n\t\tcoduser = \"\";\n\t\tcluser = \"\";\n\t\tmail = \"\";\n\t\taudit = \"\";\n\t\tnbr = \"\";\n\t\trol = \"\";\n\t}", "@Test\n public void getPerroTest() {\n \n PerroEntity entity = Perrodata.get(0);\n PerroEntity resultEntity = perroLogic.getPerro(entity.getId());\n Assert.assertNotNull(resultEntity);\n \n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getIdPerro(), resultEntity.getIdPerro());\n Assert.assertEquals(entity.getNombre(), resultEntity.getNombre());\n Assert.assertEquals(entity.getEdad(), resultEntity.getEdad());\n Assert.assertEquals(entity.getRaza(), resultEntity.getRaza());\n }", "@Test\n public void test_get_3() throws Exception {\n User user1 = createUser(1, false);\n\n User res = instance.get(user1.getId());\n\n assertEquals(\"'get' should be correct.\", user1.getUsername(), res.getUsername());\n assertEquals(\"'get' should be correct.\", user1.getDefaultTab(), res.getDefaultTab());\n assertEquals(\"'get' should be correct.\", user1.getNetworkId(), res.getNetworkId());\n assertEquals(\"'get' should be correct.\", user1.getRole().getId(), res.getRole().getId());\n assertEquals(\"'get' should be correct.\", user1.getFirstName(), res.getFirstName());\n assertEquals(\"'get' should be correct.\", user1.getLastName(), res.getLastName());\n assertEquals(\"'get' should be correct.\", user1.getEmail(), res.getEmail());\n assertEquals(\"'get' should be correct.\", user1.getTelephone(), res.getTelephone());\n assertEquals(\"'get' should be correct.\", user1.getStatus().getId(), res.getStatus().getId());\n }", "@Test\n public void getEmpleadoTest() {\n EmpleadoEntity entity = data.get(0);\n EmpleadoEntity resultEntity = empleadoLogic.getEmpleado(entity.getId());\n Assert.assertNotNull(resultEntity);\n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getNombreEmpleado(), resultEntity.getNombreEmpleado());\n Assert.assertEquals(entity.getNombreUsuario(), resultEntity.getNombreUsuario());\n }", "public Mes getMesSeleccionado()\r\n/* 172: */ {\r\n/* 173:217 */ return this.mesSeleccionado;\r\n/* 174: */ }", "public String getAutorizacion()\r\n/* 134: */ {\r\n/* 135:226 */ return this.autorizacion;\r\n/* 136: */ }", "public String validarAsociacion(String nombre, String dpi, String codigo_cuenta, String codigo_cliente) {\n String mensaje = \"\";\n DM_Cliente dmcli = new DM_Cliente();\n DM_Solicitud dmsol = new DM_Solicitud();\n try {\n Cliente cliente = dmcli.validarCliente(nombre, dpi);\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT * FROM Cuenta WHERE Codigo = ?\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cuenta);\n if (cliente != null) {\n rs = PrSt.executeQuery();\n if (rs.next()) {\n java.util.Date d = new java.util.Date();\n java.sql.Date fecha = new java.sql.Date(d.getTime());\n Solicitud solicitud = new Solicitud();\n solicitud.setEmisor(codigo_cliente);\n solicitud.setReceptor(cliente.getCodigo());\n solicitud.setCodigo_cuenta(codigo_cuenta);\n solicitud.setEstado(\"Pendiente\");\n solicitud.setFecha(fecha);\n mensaje = dmsol.agregarSolicitud(solicitud);\n } else {\n mensaje = \"La cuenta no existe\";\n }\n } else {\n mensaje = \"El dueño de la cuenta no existe\";\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return mensaje;\n }", "public void queryLimitedAttributes() {\r\n\t\tFile file = null;\r\n\t\tSystem.out.println(\"select from the options\");\r\n\t\tSystem.out.println(\"1. query only name and mobile number\\n2. query only name and email\");\r\n\t\tint choice = Integer.parseInt(scanner.nextLine());\r\n\t\t\r\n\t\t \r\n\t\tList<Contact> contactList = service.getContactList();\r\n\t\tMap<String, String[]> transformedContacts = service.getMappedTranform(contactList, choice);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"1. show in console\\n2. write to a file\");\r\n\t\tint option = Integer.parseInt(scanner.nextLine());\r\n\t\tif(option==1) {\r\n\t\t\tshowTransformedContacts(transformedContacts);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif(choice==1) {\r\n\t\t\t\tfile = new File(\"nameNumber.txt\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tfile = new File(\"nameEmail.txt\");\r\n\t\t\t}\r\n\t\t\tservice.writeTransformedContacts(transformedContacts,file);\r\n\t\t\tSystem.out.println(\"contacts written to a file\");\r\n\t\t}\r\n\t}", "public String getMunicipio(){\n return municipio;\n }", "public String getApellidos() { return (this.apellidos == null) ? \"\" : this.apellidos; }", "public void recupera() {\n Cliente clienteActual;\n clienteActual=clienteDAO.buscaId(c.getId());\n if (clienteActual!=null) {\n c=clienteActual;\n } else {\n c=new Cliente();\n }\n }", "String validateCampo (String name, String email, String password){\n String campos;\n campos = name !=null && name.trim().length()>0? \"\" : \"\\n\" + campoName.getHint() + \"\\n\";\n campos += email !=null && email.trim().length()>0? \"\" :campoEmail.getHint() + \"\\n\";\n campos += password !=null && password.trim().length()>0?\"\" : campoPassword.getHint() + \"\\n\";\n campos += bitmaphoto !=null?\"\":\"Imagen\";\n return campos;\n }", "private void restore(XmlDoc.Element meta) throws Throwable {\n\t\t\n\t\t// It could be that only a subset of DICOM elements are provided\n\t\t_uid = meta.value(\"uid\");\n\t\t_id = meta.value(\"id\");\n\t\t_desc = meta.value(\"description\");\n\t\t_date = meta.element(\"date\").hasValue() ? meta.dateValue(\"date\") : null;\n\t\t_modality = meta.value(\"modality\");\n\t\t_rpn = meta.value(\"dicom/rpn\");\n\t\t_institution = meta.value(\"institution\");\n\t\t_station = meta.value(\"station\");\n\t\t_manufacturer = meta.value (\"manufacturer\");\n\t\t//\n\t\tXmlDoc.Element subject = meta.element(\"subject\");\n\t\tif (subject!=null) {\n\t\t\t_patientSex = subject.value(\"sex\");\n\t\t\t_patientAge = meta.element(\"age\")!=null ? meta.doubleValue(\"age\") : -1;\n\t\t\t_patientWeight = meta.element(\"weight\")!=null ? meta.doubleValue(\"weight\") : -1;\n\t\t\t_patientLength = meta.element(\"size\")!=null ? meta.doubleValue(\"size\") : -1;\n\t\t\t_patientID = subject.value(\"id\");\t\n\t\t\tString t = subject.value(\"name\");\n\t\t\tif (t!=null) {\n\t\t\t\t_patientName = new DicomPersonName(t, null, null, null, null, null);\n\t\t\t} else {\n\t\t\t\t_patientName = null;\n\t\t\t}\n\t\t\t_dob = meta.element(\"dob\")!=null ? meta.dateValue(\"dob\") : null;\n\t\t}\n\t}", "public String getMarca(){\n return marca;\n }", "public String getCampusCode() {\n return campusCode;\n }", "private void populateBasicLists() {\n // TODO chathuranga change following\n districtList = districtDAO.getDistrictNames(language, user);\n // TODO chathuranga when search by all district option\n /* if (districtId == 0) {\n if (!districtList.isEmpty()) {\n districtId = districtList.keySet().iterator().next();\n logger.debug(\"first allowed district in the list {} was set\", districtId);\n }\n }*/\n dsDivisionList = dsDivisionDAO.getDSDivisionNames(districtId, language, user);\n mrDivisionList = mrDivisionDAO.getMRDivisionNames(dsDivisionId, language, user);\n }", "public void setar_campos()\n {\n int setar = tblCliNome.getSelectedRow();\n txtCliId.setText(tblCliNome.getModel().getValueAt(setar, 0).toString());\n txtCliNome.setText(tblCliNome.getModel().getValueAt(setar, 1).toString());\n txtCliRua.setText(tblCliNome.getModel().getValueAt(setar, 2).toString());\n txtCliNumero.setText(tblCliNome.getModel().getValueAt(setar, 3).toString());\n txtCliComplemento.setText(tblCliNome.getModel().getValueAt(setar, 4).toString());\n txtCliBairro.setText(tblCliNome.getModel().getValueAt(setar, 5).toString());\n txtCliCidade.setText(tblCliNome.getModel().getValueAt(setar, 6).toString());\n txtCliUf.setText(tblCliNome.getModel().getValueAt(setar, 7).toString());\n txtCliFixo.setText(tblCliNome.getModel().getValueAt(setar, 8).toString());\n txtCliCel.setText(tblCliNome.getModel().getValueAt(setar, 9).toString());\n txtCliMail.setText(tblCliNome.getModel().getValueAt(setar, 10).toString());\n txtCliCep.setText(tblCliNome.getModel().getValueAt(setar, 11).toString());\n \n // A LINHA ABAIXO DESABILITA O BOTÃO ADICIONAR PARA QUE O CADASTRO NÃO SEJA DUPLICADO\n btnAdicionar.setEnabled(true);\n \n }", "public CuentaContable getCuentaContable()\r\n/* 299: */ {\r\n/* 300:367 */ return this.cuentaContable;\r\n/* 301: */ }", "java.lang.String getField1025();", "@Test\n public void cargarMateria_Materias(){\n List<Materia> materias;\n Materia materia;\n \n mt=contAgre.AgregarMateria(imagen, puntos, materiaNombre); \n \n materias= contCons.cargarMateria();\n materia=materias.get(materias.size()-1);\n assertNotNull(materia);\n \n assertEquals(mt.getHijoURL(),materia.getHijoURL());\n assertEquals(mt.getImagenURL(),materia.getImagenURL());\n assertEquals(mt.getNivel(),materia.getNivel());\n assertEquals(mt.getNombre(),materia.getNombre());\n assertEquals(mt.getRepaso(),materia.getRepaso());\n assertEquals(mt.getAsignaturas(),materia.getAsignaturas());\n \n }", "public Usuarios(String Cedula){ //método que retorna atributos asociados con la cedula que recibamos\n conexion = base.GetConnection();\n PreparedStatement select;\n try {\n select = conexion.prepareStatement(\"select * from usuarios where Cedula = ?\");\n select.setString(1, Cedula);\n boolean consulta = select.execute();\n if(consulta){\n ResultSet resultado = select.getResultSet();\n if(resultado.next()){\n this.Cedula= resultado.getString(1);\n this.Nombres= resultado.getString(2);\n \n this.Sexo= resultado.getString(3);\n this.Edad= resultado.getInt(4);\n this.Direccion= resultado.getString(5);\n this.Ciudad=resultado.getString(6);\n this.Contrasena=resultado.getString(7);\n this.Estrato=resultado.getInt(8);\n this.Rol=resultado.getString(9);\n }\n resultado.close();\n }\n conexion.close();\n } catch (SQLException ex) {\n System.err.println(\"Ocurrió un error: \"+ex.getMessage().toString());\n }\n}", "String getProvincia();", "public DTOSalida obtenerAccesosPlantilla(DTOOID dto) throws MareException\n { \n UtilidadesLog.info(\"DAOGestionComisiones.obtenerAccesosPlantilla(DTOOID dto): Entrada\"); \n StringBuffer query = new StringBuffer();\n RecordSet rs = new RecordSet(); \n DTOSalida dtos = new DTOSalida();\n BelcorpService bs = UtilidadesEJB.getBelcorpService(); \n query.append(\" SELECT DISTINCT A.ACCE_OID_ACCE OID, B.VAL_I18N DESCRIPCION \");\n query.append(\" FROM COM_PLANT_COMIS_ACCES A, V_GEN_I18N_SICC B, COM_PLANT_COMIS C \"); \n query.append(\" WHERE \");\n if(dto.getOid() != null) {\n query.append(\" A.PLCO_OID_PLAN_COMI = \" + dto.getOid() + \" AND \");\n }\n query.append(\" A.PLCO_OID_PLAN_COMI = C.OID_PLAN_COMI AND \"); \n query.append(\" C.CEST_OID_ESTA = \" + ConstantesCOM.ESTADO_ACTIVO + \" AND \"); \n \n query.append(\" B.ATTR_ENTI = 'SEG_ACCES' AND \"); \n query.append(\" B.ATTR_NUM_ATRI = 1 AND \");\n query.append(\" B.IDIO_OID_IDIO = \" + dto.getOidIdioma() + \" AND \");\n query.append(\" B.VAL_OID = A.ACCE_OID_ACCE \");\n query.append(\" ORDER BY DESCRIPCION \"); \n UtilidadesLog.debug(query.toString()); \n try {\n rs = bs.dbService.executeStaticQuery(query.toString());\n if(rs != null)\n dtos.setResultado(rs);\n }catch (Exception e) {\n UtilidadesLog.error(e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n } \n UtilidadesLog.info(\"DAOGestionComisiones.obtenerAccesosPlantilla(DTOOID dto): Salida\"); \n return dtos;\n }", "@Test\r\n public void getCarritoDeComprasTest() {\r\n System.out.println(\"g entra\"+data);\r\n CarritoDeComprasEntity entity = data.get(0);\r\n CarritoDeComprasEntity newEntity = carritoDeComprasPersistence.find(entity.getId());\r\n Assert.assertNotNull(newEntity);\r\n Assert.assertEquals(entity.getTotalCostDeCarritoCompras(), newEntity.getTotalCostDeCarritoCompras());\r\n System.out.println(\"g voy\"+data);\r\n }", "List<Plaza> consultarPlazas();", "public String getPhone()\r\n/* 41: */ {\r\n/* 42:54 */ return this.phone;\r\n/* 43: */ }", "@Test\r\n\tpublic void testGetPastPregnancies() {\r\n\t\ttry {\r\n\t\t\tList<PregnancyInfo> list = pregnancyData.getRecords(1);\r\n\t\t\tAssert.assertEquals(list, oic.getPastPregnancies());\r\n\t\t} catch (DBException e) {\r\n\t\t\tAssert.fail(e.getMessage());\r\n\t\t}\r\n\t}", "Collection<GestionPrecioDTO> findCampaniasFiltros (GestionPrecioDTO gestionPrecio,String estadoCobro);", "@Override\n protected Map<String, String> getParams()\n {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"fullname\", fullName);\n\n\n\n\n return params;\n }", "@Test\n public void getViajeroTest() {\n ViajeroEntity entity = data.get(0);\n ViajeroEntity newEntity = vp.find(entity.getId());\n Assert.assertNotNull(newEntity);\n Assert.assertEquals(entity.getId(), newEntity.getId());\n }", "public void getDadosDosCampos2() {\n EditText campoModeloCelular = findViewById(R.id.CampoModeloCelular);\n RadioButton campoNumeroChip1 = findViewById(R.id.radioButtonNumChip1);\n RadioButton campoNumeroChip2 = findViewById(R.id.radioButtonNumChip2);\n EditText numeroDoChip1 = findViewById(R.id.EditTextNumChip1);\n EditText numeroDoChip2 = findViewById(R.id.EditTextNumChip2);\n EditText campoIMEI1 = findViewById(R.id.campoIMEI1);\n EditText campoIMEI2 = findViewById(R.id.campoIMEI2);\n\n //instanciando o celular\n Celular novoCelular = new Celular();\n\n novoCelular.setModelo(campoModeloCelular.getText().toString());\n novoCelular.setChip1(campoNumeroChip1.getText().toString());\n novoCelular.setChip2(campoNumeroChip2.getText().toString());\n novoCelular.setImei1(campoIMEI1.getText().toString());\n novoCelular.setImei2(campoIMEI2.getText().toString());\n\n CelularDAO daoC = new CelularDAO();\n\n CelularDAO.Cel_cadastrado = novoCelular;\n\n UsuarioDAO.user_cadastrado.setCelularP(novoCelular);\n\n UsuarioDAO.dao.inserir(UsuarioDAO.user_cadastrado);\n\n\n\n }", "private boolean camposValidos() {\n boolean valido = false;\n\n if (txtInfectados.getText().equals(\"\")\n || txtFecha.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Rellene todos los campos\");\n } else {\n valido = true;\n }\n\n return valido;\n }", "@Test\n public void cidade_valida_retornar_valores(){\n for(int cidade=0;cidade<cidadesdisponiveis.size();cidade++){\n assertThat(cache.getAirQualityByCity(cidadesdisponiveis.get(cidade))).isEqualTo(airquality);\n }\n }", "public String getIdentificacion()\r\n/* 123: */ {\r\n/* 124:223 */ return this.identificacion;\r\n/* 125: */ }" ]
[ "0.55711216", "0.5530367", "0.5510023", "0.54878867", "0.5399955", "0.53996915", "0.5398687", "0.53323734", "0.53138745", "0.5313703", "0.52996296", "0.52893513", "0.52735627", "0.5265187", "0.5260087", "0.5254531", "0.5234016", "0.52286685", "0.5226613", "0.5219545", "0.52151823", "0.52141875", "0.5201075", "0.52001935", "0.5198218", "0.51967096", "0.5196621", "0.5196621", "0.51953673", "0.5194034", "0.518505", "0.5166442", "0.5162755", "0.51623017", "0.51618063", "0.51557", "0.5152699", "0.51510537", "0.51452893", "0.51416904", "0.51365566", "0.51042676", "0.5091569", "0.5084694", "0.50766546", "0.5063782", "0.506048", "0.5057922", "0.5049978", "0.5048412", "0.5035888", "0.5035309", "0.50347334", "0.5033355", "0.5027287", "0.502432", "0.5022968", "0.501906", "0.50167865", "0.5016225", "0.5015034", "0.50134146", "0.5006504", "0.50038517", "0.49957392", "0.4994998", "0.49921829", "0.49863684", "0.49813116", "0.49687517", "0.49674028", "0.49651715", "0.4963586", "0.49558017", "0.49554616", "0.49536052", "0.4951634", "0.49508682", "0.49453792", "0.49451742", "0.49434865", "0.4941423", "0.49413392", "0.4936639", "0.49291041", "0.49282804", "0.49279192", "0.49273735", "0.4921003", "0.49172318", "0.49142346", "0.49132544", "0.49045748", "0.48964757", "0.48929325", "0.4891932", "0.48912618", "0.48886353", "0.4885555", "0.48833212", "0.48823008" ]
0.0
-1
public static final String TABLE_Book = "book"; public static final String TABLE_Student = "student"; public static final String TABLE_Issue_Book = "issue_book";
public DBHandler(Context context) { super(context, DB_NAME, null, DB_VERSION); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SqlTables(String tableName){\n\t\t\t this.tableName = tableName; \n\t\t}", "public void createTable(){\r\n String tableStudent = \"CREATE TABLE tableStudent (\"+\r\n \"studentId INT primary key,\"+\"studentName TEXT,\"+\r\n \"className TEXT)\";\r\n db.execSQL(tableStudent);\r\n }", "String getTableName();", "@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}", "String getBaseTable();", "public void setDbTable(String v) {this.dbTable = v;}", "public interface Constants {\n\n public String CATEGORIES_DELIMITER =\"$%^\";\n public boolean IS_RETURNED = true;\n public boolean IS_ISSUED = false;\n\n public int RESULT_YES = 1;\n\n public interface Folders\n {\n public String FOLDER_KILKAARI = \"Kilkaari\";\n\n }\n\n public interface Table\n {\n public String TABLE_USER = \"_User\";\n public String TABLE_BOOKS = \"Books\";\n public String TABLE_AVAILABILITY = \"Availability\";\n public String TABLE_RATING = \"Rating\";\n public String TABLE_ISSUE = \"Issue\";\n public String TABLE_READ = \"Read\";\n public String TABLE_REQUEST_QUEUE = \"RequestQueue\";\n public String TABLE_SAVED_PAGES = \"SavedPages\";\n public String TABLE_CATEGORIES = \"Categories\";\n\n\n }\n\n public interface DataColumns\n {\n public String BOOKS_DONATED_BY = \"donatedBy\";\n public String BOOKS_ADDED_ON = \"addedOn\";\n public String BOOKS_PAGE_COUNT = \"pageCount\";\n public String BOOKS_DESCRIPTION = \"description\";\n public String BOOKS_CATEGORY = \"category\";\n public String BOOKS_LANGUAGE = \"language\";\n public String BOOKS_PUBLISHER = \"publisher\";\n public String BOOKS_PUBLICATION_YEAR = \"publicationYear\";\n public String BOOKS_QUANTITY = \"quantity\";\n public String BOOKS_NAME = \"name\";\n public String BOOKS_AUTHOR = \"author\";\n public String BOOKS_PHOTO = \"photo\";\n\n public String CATEGORIES_CATEGORY = \"category\";\n public String CATEGORIES_PHOTO = \"photo\";\n\n public String AVAILABLE_AVAILABLE = \"available\";\n public String AVAILABLE_BOOK_ID = \"bookId\";\n public String AVAILABLE_BOOK = \"book\";\n public String AVAILABLE_BOOK_POINT = \"bookPoint\";\n public String AVAILABLE_QUANTITY = \"quantity\";\n\n public String SAVED_PAGES_TITLE = \"title\";\n public String SAVED_PAGES_LINK = \"link\";\n public String SAVED_PAGES_TIMESTAMP = \"timestamp\";\n\n public String USER_EMAIL = \"email\";\n public String USER_NAME = \"name\";\n public String USER_FACEBOOK_DATA = \"facebookData\";\n public String USER_IS_LIBRARIAN = \"isLibrarian\";\n public String USER_PHONE = \"phone\";\n public String USER_ADDRESS = \"address\";\n public String USER_GENDER = \"gender\";\n\n public String REQUEST_QUEUE_TIMESTAMP = \"timestamp\";\n public String REQUEST_QUEUE_BOOK = \"book\";\n public String REQUEST_QUEUE_USER = \"user\";\n public String REQUEST_QUEUE_TIME_PERIOD = \"timePeriod\";\n\n public String ISSUE_ISSUE_TIMESTAMP = \"issueTimestamp\";\n public String ISSUE_BOOK = \"book\";\n public String ISSUE_USER = \"user\";\n public String ISSUE_IS_RETURNED = \"isReturned\";\n public String ISSUE_TIME_PERIOD = \"timePeriod\";\n public String ISSUE_RETURN_TIMESTAMP = \"returnTimestamp\";\n public String ISSUE_FEES = \"fees\";\n\n public String RATING_BOOK = \"book\";\n public String RATING_NET_RATING = \"netRating\";\n public String RATING_RATING_ARRAY = \"ratingArray\";\n\n\n\n\n }\n public interface EXTRAS\n {\n public String EXTRAS_SELECTED_CATEGORY = \"selectedCategory\";\n public String EXTRAS_OBJECT_ID = \"objectId\";\n public String EXTRAS_SELECTED_BOOK_INDEX = \"selectedBookIndex\";\n public String EXTRAS_BOOK_IS_EDIT = \"isEdit\";\n\n public String EXTRAS_ALERT_TITLE = \"alert.title\";\n public String EXTRAS_ALERT_OK_TEXT = \"alert.OkText\";\n public String EXTRAS_ALERT_MSSG = \"alert.Message\";\n public String EXTRAS_ALERT_CANCEL_TEXT = \"alert.CancelText\";\n public String EXTRAS_ALERT_ICON_RESOURCE = \"alert.resourceIcon\";\n\n\n\n }\n\n public interface REQUEST_CODE\n {\n public static int REQUEST_OPEN_ALERT = 111;\n public static int REQUEST_LIBRARY_CODE = 112;\n }\n}", "public String getTableDbName() { return \"t_trxtypes\"; }", "public interface DBName {\n final static String DB = \"menu.db\";\n final static String Coffee = \"Menu\";\n final static String Ade = \"Ade\";\n final static String Basket = \"Basket\";\n final static String OrderList = \"OrderList\";\n}", "public String getNomTable();", "String getTableName(String name);", "@Override\r\n\tpublic String getTableName(String[] sql) {\n\t\treturn sql[2];\r\n\t}", "public static String tableName() {\r\n return \"TB_UPP_CHECK_STORE_DIVERGENCE\";\r\n }", "public interface DatabaseOperations {\n\n public static final String DATABASE_NAME = \"ghost_database\";\n\n public static final String TABLE_SIGHTINGS = \"SIGHTINGS\";\n\n public static final String ROW_ID = \"_id\";\n\n public static final String TITLE = \"title\";\n public static final String DESCRIPTION = \"DESCRIPTION\";\n public static final String LATITUDE = \"lat\";\n public static final String LONGITUDE = \"lon\";\n public static final String RATING = \"rating\";\n}", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "public String getConstantTableName(){\n return CONSTANT_TABLE_NAME;\n }", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "public String getDbTable() {return dbTable;}", "public DatabaseTable(String tableName) {\n this.tableName = tableName;\n }", "public String getTableDbName() {\r\n return \"enterprise_offer\";\r\n }", "@Override\n public void onCreate(SQLiteDatabase db) {\n String CREATE_CONTACT_TABLE = \"CREATE TABLE \" + TABLE_CONTACT + \" ( \" +\n \t\tKEY_CONTACT_ID + \" INTEGER PRIMARY KEY AUTOINCREMENT, \" +\n KEY_CONTACT_ADDRESS + \" TEXT, \"+\n KEY_CONTACT_NAME + \" TEXT, \" +\n KEY_CONTACT_MEMBERS + \" TEXT, \" +\n KEY_CONTACT_LASTACT + \" INTEGER, \" +\n KEY_CONTACT_TYPE + \" INTEGER, \" +\n KEY_CONTACT_KEYSTAT + \" INTEGER, \" +\n KEY_CONTACT_UNREAD + \" INTEGER, \" +\n KEY_CONTACT_GROUP + \" INTEGER \"+ \" )\";\n \n // create books table\n db.execSQL(CREATE_CONTACT_TABLE);\n\n String CREATE_MESSAGES_TABLE = \"CREATE TABLE \"+TABLE_MESSAGES+\" ( \" +\n \t\tKEY_MESSAGES_ID + \" INTEGER, \" +\n \t\tKEY_MESSAGES_FROM + \" INTEGER, \"+\n KEY_MESSAGES_TIME + \" INTEGER, \"+\n KEY_MESSAGES_TEXT + \" TEXT, \" + \n KEY_MESSAGES_URI + \" TEXT \" + \" )\";\n \n // create books table\n db.execSQL(CREATE_MESSAGES_TABLE);\n}", "public void setTableName(String tableName) {\n this.tableName = tableName;\n }", "public void setTableName(String tableName) {\n this.tableName = tableName;\n }", "public void setTableName(String tableName) {\n this.tableName = tableName;\n }", "@Override\n public void onCreate(SQLiteDatabase db) {\n String SQL_CREATE_BOOKS_TABLE = \"CREATE TABLE \" + TBOOKS\n + \"(\"\n + _IDB + \" INTEGER PRIMARY KEY AUTOINCREMENT, \"\n + LibraryEntry.COL_TITLE + \" TEXT_NOT_NULL, \"\n + LibraryEntry.COL_AUTHOR + \" TEXT, \"\n + LibraryEntry.COL_YEAR_PUBLISHED + \" INTEGER, \"\n + LibraryEntry.COL_STATUS + \" TEXT);\";\n // + LibraryEntry.COL_CHECKED_OUT + \" BOOLEAN;\";\n\n String SQL_CREATE_PYTHONISTAS_TABLE = \"CREATE TABLE \" + TPYTHONISTAS\n + \"(\"\n + _IDP + \" INTEGER PRIMARY KEY AUTOINCREMENT, \"\n + COL_F_NAME + \" TEXT_NOT_NULL, \"\n + LibraryEntry.COL_L_NAME + \" TEXT_NOT_NULL, \"\n + LibraryEntry.COL_PHONE + \" TEXT, \"\n + LibraryEntry.COL_EMAIL + \" TEXT);\";\n\n // Table generates a default loan_date from inside SQLite\n String SQL_CREATE_LOAN_TABLE = \"CREATE TABLE \" + TLOANED\n + \"(\"\n + _IDL + \" INTEGER PRIMARY KEY AUTOINCREMENT, \"\n + COL_TITLE_ID + \" INTEGER NOT NULL, \"\n + COL_NAME_ID + \" IMTEGER NOT NULL, \"\n + COL_LOAN_DATE + \" DATE NOT NULL default current_date, \"\n + COL_RETURN_DATE + \" DATE);\";\n\n\n db.execSQL(SQL_CREATE_BOOKS_TABLE);\n db.execSQL(SQL_CREATE_PYTHONISTAS_TABLE);\n db.execSQL(SQL_CREATE_LOAN_TABLE);\n }", "public interface TableConfig {//表头\n String MODULE_NUMBER=\"ModuleNumer\";//模块编号\n String MODULE_NAME=\"ModuleName\";//模块名称\n String IS_CREATE=\"isCreate\";//是否创建\n String CLASS_NAME=\"ClassName\";//测试类名\n String CLASS_PACKAGE_NAME=\"ClassPackageName\";//所在包名\n String INTENT_EXTRA=\"Intent\";//Intent值\n String SHAREDPREFERENCES_NAME=\"SharedPreferencesName\";//本地存储名称\n String SHAREDPREFERENCES=\"SharedPreferences\";//本地存储\n String PREMISSIONS=\"Premissions\";//所需权限\n String CASE_NUMBER=\"CaseNumber\";//用例编号\n String CASE_NAME=\"CaseName\";//用例名称\n String IS_EXECUTE =\"isExecute\";//是否执行\n String TESTING_PROCEDURE=\"TestingProcedure\";//测试步骤\n String VIEW_TYPE=\"ViewType\";//操作类型\n String ACTION =\"Action\";//操作类型\n String PARAM =\"param\";//参数 参数index为 [action+1,param]\n //module头部名称\n String[] MODULE_HEADERS={MODULE_NUMBER,MODULE_NAME,IS_CREATE,CLASS_NAME,CLASS_PACKAGE_NAME,INTENT_EXTRA,SHAREDPREFERENCES_NAME,SHAREDPREFERENCES,PREMISSIONS};\n //测试用例头部名称\n String[] CASE_HEADERS ={CASE_NUMBER\n ,CASE_NAME, IS_EXECUTE,TESTING_PROCEDURE,VIEW_TYPE, ACTION,\n PARAM};\n //数据存储/传值格式\n String PUT_STRING=\"putString\";\n String PUT_INT=\"putInt\";\n String PUT_BOOLEAN=\"putBoolean\";\n String PUT_FLOAT=\"putFloat\";\n String PUT_LONG=\"putLong\";\n}", "String tableName2Name(String name);", "public interface Constants {\n\n String KEY_BOOK_INFO = \"key_book_info\";\n\n}", "void gen_table_names(Connection c, PreparedStatement pst ) throws ClassNotFoundException, SQLException\n\t{\n\t String lambda_term_query = \"select subgoal_names from view2subgoals where view = '\"+ name +\"'\";\n\n\t\t\n\t pst = c.prepareStatement(lambda_term_query);\n\t \n\t ResultSet rs = pst.executeQuery();\n\t \n\t if(!rs.wasNull())\n\t {\n\t \twhile(rs.next())\n\t\t {\n\t\t \t\t \t\n\t\t \ttable_names.add(rs.getString(1));\n\t\t }\n\t }\n\t \n\t else\n\t {\n\t \tlambda_term_query = \"select subgoal from web_view_table where renamed_view = '\"+ name +\"'\";\n\n\t\t\t\n\t\t pst = c.prepareStatement(lambda_term_query);\n\t\t \n\t\t ResultSet r = pst.executeQuery();\n\n\t\t while(r.next())\n\t\t {\n\t\t \t\t \t\n\t\t \ttable_names.add(r.getString(1));\n\t\t }\n\t }\n\t \n\t \n\t \n\n\t}", "public void scandb_book_info(String table_name) {\n sql = \" SELECT * from \" + table_name + \";\";\n\n try {\n result = statement.executeQuery(sql);\n while (result.next()) {\n set_book_info(result.getInt(\"id\"), result.getString(\"name\"), result.getString(\"url\"));\n\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public String getTable()\n {\n return table;\n }", "String getTableDefines();", "public void formDatabaseTable() {\n }", "private void createDataTable() {\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoEditors.TABLE + \" (ID INT IDENTITY PRIMARY KEY, NAME VARCHAR(150) NOT NULL UNIQUE)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.TABLE + \" (ID INT IDENTITY PRIMARY KEY, TITLE VARCHAR(150) NOT NULL UNIQUE, YEAR INT, ISBN10 VARCHAR(20), ISBN13 VARCHAR(13), NOTE INT, PAGES_NUMBER INT, RESUME VARCHAR(2000), THE_EDITOR_FK INT, THE_KIND_FK INT, THE_LANGUAGE_FK INT, THE_LENDING_FK INT, THE_SAGA_FK INT, THE_TYPE_FK INT)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.BOOKS_AUTHOR_TABLE + \" (THE_BOOK_FK INT NOT NULL, THE_AUTHOR_FK INT NOT NULL)\");\n\n jdbcTemplate.update(\"CREATE INDEX BOOK_EDITOR_IDX ON \" + IDaoEditors.TABLE + \"(ID)\");\n jdbcTemplate.update(\"CREATE INDEX BOOKS_IDX ON \" + IDaoBooks.TABLE + \"(ID)\");\n }", "public String getTableName() {\n return tableName; \n }", "String getTabela();", "public interface SQL_CONSTANTS {\n\t\tstatic final String JDBC_DRIVER = \"com.mysql.jdbc.Driver\";\n\t\tstatic final String DB_URL = \"jdbc:mysql://localhost/EMP\";\n\t\tstatic final String USER = \"username\";\n\t\tstatic final String PASSWORD = \"password\";\n\t}", "private void createTables() {\n\n\t\tAutoDao.createTable(db, true);\n\t\tAutoKepDao.createTable(db, true);\n\t\tMunkaDao.createTable(db, true);\n\t\tMunkaEszkozDao.createTable(db, true);\n\t\tMunkaKepDao.createTable(db, true);\n\t\tMunkaTipusDao.createTable(db, true);\n\t\tPartnerDao.createTable(db, true);\n\t\tPartnerKepDao.createTable(db, true);\n\t\tProfilKepDao.createTable(db, true);\n\t\tSoforDao.createTable(db, true);\n\t\tTelephelyDao.createTable(db, true);\n\t\tPushMessageDao.createTable(db, true);\n\n\t}", "public abstract String[] createTablesStatementStrings();", "@Override\n public String getTableName() {\n return getFreeTextDocTablename(conf);\n }", "Tablero consultarTablero();", "public abstract String getDatabaseTableName(String entityName);", "public TwoTieredTable(String name) \n\t{\n\t\tthis.name = name;\n\t}", "Table getTable();", "public interface DatabaseContract extends BaseColumns{\n\n String DATABASE_NAME = \"ShopApp.db\";\n String TABLE_NAME_USERS = \"TABLE_NAME_USERS\";\n String TABLE_NAME_PRODUCTS = \"TABLE_NAME_USERS\";\n\n String COL_1_USERS = \"USERNAME\";\n String COL_2_USERS = \"PASSWORD\";\n String CREATE_DATABASE_USERS_QUERY = \"CREATE TABLE \" + TABLE_NAME_USERS\n + \" (\"\n + COL_1_USERS + \" TEXT PRIMARY KEY, \"\n + COL_2_USERS + \" TEXT\"\n + \")\";\n\n String COL_1_PRODUCTS = \"ID\";\n String COL_2_PRODUCTS = \"NAME\";\n String COL_3_PRODUCTS = \"PRICE\";\n String COL_4_PRODUCTS = \"IMAGE\";\n String CREATE_DATABASE_PRODUCTS_QUERY = \"CREATE TABLE \" + TABLE_NAME_USERS\n + \" (\"\n + COL_1_PRODUCTS + \" INTEGER PRIMARY KEY, \"\n + COL_2_PRODUCTS + \" TEXT, \"\n + COL_3_PRODUCTS + \" INTEGER, \"\n + COL_4_PRODUCTS + \" TEXT\"\n + \")\";\n\n\n\n}", "@Override\n public void onCreate(SQLiteDatabase db){\n db.execSQL(create_User_Table);\n db.execSQL(create_Budget_Table);\n\n\n\n\n }", "public void setTableName(String tableName) {\r\n\t\tthis.tableName = tableName;\r\n\t}", "public void setTableName(String tableName) {\r\n\t\tthis.tableName = tableName;\r\n\t}", "tbls createtbls();", "public interface CommonColumns extends BaseColumns {\r\n public static final String KEY_CHAT_ID = \"chat_id\";\r\n public static final String KEY_ID = _ID;\r\n}", "@Override\n\tpublic String getTableName() { \n\t\treturn tableName;\n\t}", "public String table() {\n return tableName;\n }", "public String table() {\n return tableName;\n }", "public void createTableIfAbsent() {\n try (Statement statement = connection.createStatement()) {\n\n statement.executeUpdate(\"CREATE TABLE IF NOT EXISTS `BookReview`(\" +\n \" id INTEGER PRIMARY KEY AUTOINCREMENT,\" +\n \" title VARCHAR(100),\" +\n \" author_id INTEGER,\" +\n \" FOREIGN KEY (`author_id`) REFERENCES `authors`(`id`)\" +\n \")\");\n\n } catch (SQLException e) {\n throw new BookDaoException(e);\n }\n }", "List<TABLE41> selectByExample(TABLE41Example example);", "public void createTableMain() {\n db.execSQL(\"create table if not exists \" + MAIN_TABLE_NAME + \" (\"\n + KEY_ROWID_MAIN + \" integer primary key autoincrement, \"\n + KEY_TABLE_NAME_MAIN + \" string not null, \"\n + KEY_MAIN_LANGUAGE_1 + \" integer not null, \"\n + KEY_MAIN_LANGUAGE_2 + \" integer not null);\");\n }", "public String getTableNameString() {\n return tableName;\n }", "public String getTableName() {\n return tableName;\n }", "public String getTableName() {\n return tableName;\n }", "@Override\n public void onCreate(SQLiteDatabase db) {\n//\n// db.execSQL(\"CREATE TABLE \" +TABLE_R_MENU_NAME+ \" (\" +\n// MENUNAME_COLUMN_R_TYPE + \" INTEGER NOT NULL, \" +\n// MENUNAME_COLUMN_TAP_TYPE+ \" INTEGER NOT NULL,\" +\n// MENUNAME_COLUMN_MENU_TYPE+\" INTEGER NOT NULL,\" +\n// MENUNAME_COLUMN_MENU_SEQ+\" INTEGER NOT NULL,\" +\n// MENUNAME_COLUMN_FIELD_NAME+\" CHAR(20),\" +\n// \"PRIMARY KEY (\" + MENUNAME_COLUMN_R_TYPE + \",\"+MENUNAME_COLUMN_TAP_TYPE+\",\"+MENUNAME_COLUMN_MENU_TYPE+\",\"+MENUNAME_COLUMN_MENU_SEQ+\")\"\n// );\n }", "public interface SqlQueries {\n\n /**\n * The constant QUOTATION.\n */\n String QUOTATION = \"'\";\n\n /**\n * The constant SELECT_ALL_CARS.\n */\n String SELECT_ALL_CARS = \"SELECT * FROM Car\";\n\n /**\n * The constant SELECT_ALL_USERS.\n */\n String SELECT_ALL_USERS = \"SELECT * FROM Users\";\n\n /**\n * The constant FIND_CAR_BY_ID.\n */\n String FIND_CAR_BY_ID = \"Select * from Car Where id = \";\n\n /**\n * The constant CREATE_A_CAR.\n */\n String CREATE_A_CAR = \"insert into car values({0},{1}, {2}, {3}, {4})\";\n\n}", "public interface PoliticalPartyTableSchema {\n\n\tString POLITICAL_PARTY_TABLE = \"political_parties\";\n\t\n\tString POLITICAL_PARTY_ID_COL = \"political_party_id\";\n\tString POLITICAL_PARTY_NAME_COL = \"political_party_name\";\n}", "protected String getSqlTable() {\n\t\treturn \"Project\";\n\t}", "TABLE createTABLE();", "public interface Constants {\n\n String CURRENT_SCORE = \"CURRENT_SCORE\";\n\n String HIGH_SCORES = \"HIGH_SCORES\";\n\n String DB_WRITER = \"DB_WRITER\";\n\n String DB_READER = \"DB_READER\";\n\n String DB_HELPER = \"DB_HELPER\";\n\n\n}", "@Override\n\tpublic String getTableName(int arg0) throws SQLException {\n\t\treturn tMeta[0].tableName();\n\t}", "public void createTable(String tableName) {\n db.execSQL(\"create table if not exists '\" + tableName.replaceAll(\"\\\\s\", \"_\") + \"' (\"\n + KEY_ROWID + \" integer primary key autoincrement, \"\n + KEY_QUESTION + \" string not null, \"\n + KEY_ANSWER + \" string not null);\");\n }", "private Tables() {\n\t\tsuper(\"TABLES\", org.jooq.util.mysql.information_schema.InformationSchema.INFORMATION_SCHEMA);\n\t}", "private static void createTablesInDatabase (Statement statement) throws SQLException {\n //Создание таблиц в БД\n statement.execute(\"CREATE TABLE role ( ID INT(11) NOT NULL AUTO_INCREMENT COMMENT 'Primary Key' , \" +\n \"Role VARCHAR(50) NOT NULL , PRIMARY KEY (ID)) ENGINE = InnoDB CHARACTER set UTF8 COLLATE UTF8_general_ci;\");\n statement.execute(\"CREATE TABLE users ( ID INT(11) NOT NULL AUTO_INCREMENT , First_Name VARCHAR(20) NOT NULL, \" +\n \"Middle_Name VARCHAR(20) NOT NULL , Last_Name VARCHAR(20) NOT NULL , Passport VARCHAR(100) NOT NULL, \" +\n \"Address VARCHAR(100) NOT NULL , Phone VARCHAR(13) NOT NULL, Login VARCHAR(50) NOT NULL , \" +\n \"Password VARCHAR(50) NOT NULL , Email VARCHAR(100) NOT NULL , FK_Role INT(11) NOT NULL , PRIMARY KEY (ID), \" +\n \"Foreign Key (FK_Role) REFERENCES role(ID)) ENGINE = InnoDB CHARACTER set UTF8 COLLATE UTF8_general_ci;\");\n statement.execute(\"CREATE TABLE account (ID INT(11) NOT NULL AUTO_INCREMENT, Balans DECIMAL(50) NOT NULL, \" +\n \"State ENUM('Working','Lock') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, \" +\n \"FK_Users INT(11) NOT NULL, PRIMARY KEY (ID), Foreign Key (FK_Users) REFERENCES users(ID)) \" +\n \"ENGINE = InnoDB CHARACTER set UTF8 COLLATE UTF8_general_ci;\");\n statement.execute(\"CREATE TABLE payment ( ID INT(11) NOT NULL AUTO_INCREMENT, FK_Account_Source INT(11) NOT NULL, \" +\n \"FK_Account_Destination INT(11) NOT NULL , Description VARCHAR(200) NOT NULL , Amount DECIMAL(50) NOT NULL , \" +\n \"Paydate Date NOT NULL , PRIMARY KEY (ID), Foreign Key (FK_Account_Source) REFERENCES account(ID), \" +\n \"Foreign Key (FK_Account_Destination) REFERENCES account(ID)) ENGINE = InnoDB \" +\n \"CHARACTER set UTF8 COLLATE UTF8_general_ci;\");\n }", "@Override\n public void onCreate(SQLiteDatabase db) {\n String CREATE_BANKS_TABLE = \"CREATE TABLE \" + TABLE_BANKS +\n \"(\" +\n KEY_BANK_ID + \" INTEGER PRIMARY KEY,\" +\n KEY_BANK_OBJECT_ID + \" INTEGER,\" +\n KEY_BANK_NAME + \" TEXT,\" +\n KEY_BANK_IMAGE + \" TEXT,\" +\n KEY_BANK_ADDRESS + \" TEXT,\" +\n KEY_BANK_SWIFT_CODE + \" TEXT,\" +\n KEY_BANK_STOCK_CODE + \" TEXT,\" +\n KEY_BANK_DESCRIPTION + \" TEXT,\" +\n KEY_BANK_ESTABLISHED + \" TEXT,\" +\n KEY_BANK_CONTACTS + \" TEXT,\" +\n KEY_BANK_TYPE + \" TEXT,\" +\n KEY_BANK_STATUS + \" TEXT,\" +\n KEY_BANK_SUMMARY + \" TEXT,\" +\n KEY_BANK_PRODUCTS + \" TEXT,\" +\n KEY_BANK_WEBSITE + \" TEXT\" +\n \")\";\n String CREATE_INSURANCE_TABLE = \"CREATE TABLE \" + TABLE_INSURANCE +\n \"(\" +\n KEY_INSURANCE_ID + \" INTEGER PRIMARY KEY,\" +\n KEY_INSURANCE_OBJECT_ID + \" INTEGER,\" +\n KEY_INSURANCE_NAME + \" TEXT,\" +\n KEY_INSURANCE_IMAGE + \" TEXT,\" +\n KEY_INSURANCE_ADDRESS + \" TEXT,\" +\n KEY_INSURANCE_SWIFT_CODE + \" TEXT,\" +\n KEY_INSURANCE_STOCK_CODE + \" TEXT,\" +\n KEY_INSURANCE_DESCRIPTION + \" TEXT,\" +\n KEY_INSURANCE_ESTABLISHED + \" TEXT,\" +\n KEY_INSURANCE_CONTACTS + \" TEXT,\" +\n KEY_INSURANCE_TYPE + \" TEXT,\" +\n KEY_INSURANCE_STATUS + \" TEXT,\" +\n KEY_INSURANCE_SUMMARY + \" TEXT,\" +\n KEY_INSURANCE_WEBSITE + \" TEXT\" +\n \")\";\n\n String CREATE_MICRO_FINANCE_TABLE = \"CREATE TABLE \" + TABLE_MICRO_FINANCE +\n \"(\" +\n KEY_MICRO_FINANCE_ID + \" INTEGER PRIMARY KEY,\" +\n KEY_MICRO_FINANCE_OBJECT_ID + \" INTEGER,\" +\n KEY_MICRO_FINANCE_NAME + \" TEXT,\" +\n KEY_MICRO_FINANCE_IMAGE + \" TEXT,\" +\n KEY_MICRO_FINANCE_ADDRESS + \" TEXT,\" +\n KEY_MICRO_FINANCE_SWIFT_CODE + \" TEXT,\" +\n KEY_MICRO_FINANCE_STOCK_CODE + \" TEXT,\" +\n KEY_MICRO_FINANCE_DESCRIPTION + \" TEXT,\" +\n KEY_MICRO_FINANCE_ESTABLISHED + \" TEXT,\" +\n KEY_MICRO_FINANCE_CONTACTS + \" TEXT,\" +\n KEY_MICRO_FINANCE_TYPE + \" TEXT,\" +\n KEY_MICRO_FINANCE_STATUS + \" TEXT,\" +\n KEY_MICRO_FINANCE_SUMMARY + \" TEXT,\" +\n KEY_MICRO_FINANCE_WEBSITE + \" TEXT\" +\n \")\";\n\n String CREATE_FOREX_BUREAUS_TABLE = \"CREATE TABLE \" + TABLE_FOREX_BUREAUS +\n \"(\" +\n KEY_FOREX_BUREAU_ID + \" INTEGER PRIMARY KEY,\" +\n KEY_FOREX_BUREAU_OBJECT_ID + \" INTEGER,\" +\n KEY_FOREX_BUREAU_NAME + \" TEXT,\" +\n KEY_FOREX_BUREAU_IMAGE + \" TEXT,\" +\n KEY_FOREX_BUREAU_ADDRESS + \" TEXT,\" +\n KEY_FOREX_BUREAU_SWIFT_CODE + \" TEXT,\" +\n KEY_FOREX_BUREAU_STOCK_CODE + \" TEXT,\" +\n KEY_FOREX_BUREAU_DESCRIPTION + \" TEXT,\" +\n KEY_FOREX_BUREAU_ESTABLISHED + \" TEXT,\" +\n KEY_FOREX_BUREAU_CONTACTS + \" TEXT,\" +\n KEY_FOREX_BUREAU_TYPE + \" TEXT,\" +\n KEY_FOREX_BUREAU_STATUS + \" TEXT,\" +\n KEY_FOREX_BUREAU_SUMMARY + \" TEXT,\" +\n KEY_FOREX_BUREAU_WEBSITE + \" TEXT\" +\n \")\";\n\n String CREATE_INVESTMENT_BANKS_TABLE = \"CREATE TABLE \" + TABLE_INVESTMENT_BANKS +\n \"(\" +\n KEY_INVESTMENT_BANK_ID + \" INTEGER PRIMARY KEY,\" +\n KEY_INVESTMENT_BANK_OBJECT_ID + \" INTEGER,\" +\n KEY_INVESTMENT_BANK_NAME + \" TEXT,\" +\n KEY_INVESTMENT_BANK_IMAGE + \" TEXT,\" +\n KEY_INVESTMENT_BANK_ADDRESS + \" TEXT,\" +\n KEY_INVESTMENT_BANK_SWIFT_CODE + \" TEXT,\" +\n KEY_INVESTMENT_BANK_STOCK_CODE + \" TEXT,\" +\n KEY_INVESTMENT_BANK_DESCRIPTION + \" TEXT,\" +\n KEY_INVESTMENT_BANK_ESTABLISHED + \" TEXT,\" +\n KEY_INVESTMENT_BANK_CONTACTS + \" TEXT,\" +\n KEY_INVESTMENT_BANK_TYPE + \" TEXT,\" +\n KEY_INVESTMENT_BANK_STATUS + \" TEXT,\" +\n KEY_INVESTMENT_BANK_SUMMARY + \" TEXT,\" +\n KEY_INVESTMENT_BANK_WEBSITE + \" TEXT\" +\n \")\";\n String CREATE_INTERNATIONAL_BANKS_TABLE = \"CREATE TABLE \" + TABLE_INTERNATIONAL_BANKS +\n \"(\" +\n KEY_INTERNATIONAL_BANK_ID + \" INTEGER PRIMARY KEY,\" +\n KEY_INTERNATIONAL_BANK_OBJECT_ID + \" INTEGER,\" +\n KEY_INTERNATIONAL_BANK_NAME + \" TEXT,\" +\n KEY_INTERNATIONAL_BANK_IMAGE + \" TEXT,\" +\n KEY_INTERNATIONAL_BANK_ADDRESS + \" TEXT,\" +\n KEY_INTERNATIONAL_BANK_SWIFT_CODE + \" TEXT,\" +\n KEY_INTERNATIONAL_BANK_STOCK_CODE + \" TEXT,\" +\n KEY_INTERNATIONAL_BANK_DESCRIPTION + \" TEXT,\" +\n KEY_INTERNATIONAL_BANK_ESTABLISHED + \" TEXT,\" +\n KEY_INTERNATIONAL_BANK_CONTACTS + \" TEXT,\" +\n KEY_INTERNATIONAL_BANK_TYPE + \" TEXT,\" +\n KEY_INTERNATIONAL_BANK_STATUS + \" TEXT,\" +\n KEY_INTERNATIONAL_BANK_SUMMARY + \" TEXT,\" +\n KEY_INTERNATIONAL_BANK_WEBSITE + \" TEXT\" +\n \")\";\n String CREATE_CAPITAL_MARKETS_TABLE = \"CREATE TABLE \" + TABLE_CAPITAL_MARKETS +\n \"(\" +\n KEY_COMPANY_ID + \" INTEGER PRIMARY KEY,\" +\n KEY_COMPANY_OBJECT_ID + \" INTEGER,\" +\n KEY_COMPANY_NAME + \" TEXT,\" +\n KEY_COMPANY_IMAGE + \" TEXT,\" +\n KEY_COMPANY_ADDRESS + \" TEXT,\" +\n KEY_COMPANY_STOCK_CODE + \" TEXT,\" +\n KEY_COMPANY_DESCRIPTION + \" TEXT,\" +\n KEY_COMPANY_ESTABLISHED + \" TEXT,\" +\n KEY_COMPANY_CONTACTS + \" TEXT,\" +\n KEY_COMPANY_INDUSTRY + \" TEXT,\" +\n KEY_COMPANY_STATUS + \" TEXT,\" +\n KEY_COMPANY_SUMMARY + \" TEXT,\" +\n KEY_COMPANY_WEBSITE + \" TEXT\" +\n \")\";\n db.execSQL(CREATE_BANKS_TABLE);\n db.execSQL(CREATE_INSURANCE_TABLE);\n db.execSQL(CREATE_MICRO_FINANCE_TABLE);\n db.execSQL(CREATE_FOREX_BUREAUS_TABLE);\n db.execSQL(CREATE_INVESTMENT_BANKS_TABLE);\n db.execSQL(CREATE_INTERNATIONAL_BANKS_TABLE);\n db.execSQL(CREATE_CAPITAL_MARKETS_TABLE);\n\n }", "private String getStatusTableName(String studyId) {\n return studyId + \"-status\";\n }", "@attribute(value = \"\", required = true)\t\r\n\tpublic void setTable(String table) {\r\n\t\tthis.table = table;\r\n\t}", "public String getTablename() {\n return tablename;\n }", "protected String getTableName()\n {\n return immutableGetTableName();\n }", "private SCSongDatabaseTable(Context context) {\n\t\tsuper(context, DATABASE_NAME, null, DATABASE_VERSION);\n\t\t\n\t\t\n\t\t\n\t}", "public interface DatabaseColumns extends BaseColumns {\n String CANDIDATES = \"Candidates\";\n String NAME = \"CandidateName\";\n String NUMBER = \"VotesNumber\";\n}", "public TableName name();", "private static String [] getColumnName(){\r\n\t\tString [] columnNames = { DBSAResourceBundle.res.getString(\"no\"), DBSAResourceBundle.res.getString(\"title\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"authors\"), DBSAResourceBundle.res.getString(\"link\"),\r\n\t\t\t\tDBSAResourceBundle.res.getString(\"year\"),DBSAResourceBundle.res.getString(\"abstract\"), \r\n\t\t\t\tDBSAResourceBundle.res.getString(\"publisher\"),(\"X\"), \r\n\t\t\t\t(\"duplicate\"), \"id\"};\r\n\t\t\t\r\n\t\treturn columnNames;\r\n\t}", "String jobTableName();", "public String getTableName() \n\t{\n\t return tableName ;\n\t}", "protected String[] getStringTable() {\n/* 199 */ return myStringTable;\n/* */ }", "public void createTableComplaintsData()\n\t\t{\n\t\t\ttry {\n\t\t\t\tDatabaseMetaData d=con.getMetaData();\n\t\t\t\tResultSet rs=d.getTables(null,null,\"ComplaintsData\",null);\n\t\t\t\tif(rs.next())\n\t\t\t\t{\n\t//\t\t\t\tJOptionPane.showMessageDialog(null,\"ComplaintsData table exist\");\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tString Create_Table=\"create table ComplaintsData(Customer_Name varchar(100),Address varchar(100),Contact varchar(30),Product varchar(100),Serial_No varchar(50),Module_No varchar(50),Complaint_No varchar(50),Category varchar(30))\";\n\t\t\t\t\tPreparedStatement ps=con.prepareStatement(Create_Table);\n\t\t\t\t\tps.executeUpdate();\n\t//\t\t\t\tJOptionPane.showMessageDialog(null,\"ComplaintsData created successfully!\");\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}", "@Override\n public void onCreate (SQLiteDatabase sqLiteDatabase){\n sqLiteDatabase.execSQL(\"create table if not exists \"+nama_table+\" (judul varchar(50) primary key, deskripsi varchar(50), priority varchar(50)) \");\n }", "public interface PaperDbConstants {\n String UNIVERSAL_TYPE = \"universal_flavor_type\";\n String PAPER_ACCESS_TOKEN = \"paper_access_token\";\n\n\n String LIVE = \"LIVE\";\n String DEV = \"DEV\";\n\n String LOGIN_CREDENTIALS = \"logininfo\";\n\n}", "public void setTableName(String name) {\n this.tableName = name;\n }", "public String getTableDbName() {\r\n return \"t_package\";\r\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n manager = (EntityManager) Persistence.createEntityManagerFactory(\"FelixDadeboPU\").createEntityManager();\n //database reference: \"IntroJavaFXPU\"\n\n \n StudentName.setCellValueFactory(new PropertyValueFactory<>(\"Name\"));\n StudentFollowers.setCellValueFactory(new PropertyValueFactory<>(\"Followers\"));\n\n StudentActivity.setCellValueFactory(new PropertyValueFactory<>(\"Activity\"));\n\n //enable row selection\n //(SelectionMode.MULTIPLE);\n UserTable.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);\n \n }", "public void createTables(){\n Map<String, String> name_type_map = new HashMap<>();\n List<String> primaryKey = new ArrayList<>();\n try {\n name_type_map.put(KEY_SINK_NAME, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_SINK_ADDRESS, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_SINK_DETAIL, MyDatabase.TYPE_VARCHAR);\n primaryKey.add(KEY_SINK_ADDRESS);\n myDatabase.createTable(TABLE_SINK, name_type_map, primaryKey, null);\n }catch (MySQLException e){ //数据表已存在\n e.print();\n }\n try {\n name_type_map.clear();\n name_type_map.put(KEY_NODE_NAME, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_PARENT, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_DETAIL, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_ADDRESS,MyDatabase.TYPE_VARCHAR);\n primaryKey.clear();\n primaryKey.add(KEY_NODE_PARENT);\n primaryKey.add(KEY_NODE_ADDRESS);\n myDatabase.createTable(TABLE_NODE, name_type_map, primaryKey, null);\n }catch (MySQLException e){\n e.print();\n }\n\n try {\n name_type_map.clear();\n name_type_map.put(KEY_NODE_ADDRESS, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_PARENT, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_DATA_TIME, MyDatabase.TYPE_TIMESTAMP);\n name_type_map.put(KEY_DATA_VAL, MyDatabase.TYPE_FLOAT);\n primaryKey.clear();\n primaryKey.add(KEY_DATA_TIME);\n primaryKey.add(KEY_NODE_ADDRESS);\n primaryKey.add(KEY_NODE_PARENT);\n myDatabase.createTable(TABLE_DATA, name_type_map, primaryKey, null);\n }catch (MySQLException e) {\n e.print();\n }\n }", "private static void mapDbNames()\r\n { \r\n if (dbMap == null) {\r\n dbMap = new HashMap<String, String>();\r\n dbMap.put(\"tuition\", \"tuition\");\r\n dbMap.put(\"utilities\", \"utilities\");\r\n dbMap.put(\"fuel\", \"gas\");\r\n dbMap.put(\"registration\", \"Vehicle Registration\");\r\n dbMap.put(\"repair\", \"car repair\");\r\n dbMap.put(\"clothing\", \"clothing\");\r\n // maps asst types to the way they're currently in the database\r\n // used in the where clause for where tcf_assistance.description = ?\r\n }\r\n }", "@Test\n\tpublic void testGetTableNameByEntity(){\n\t\t;\n\t}", "private void refTable() {\n try {\n String s = \"select * from stock\";\n pstm = con.prepareStatement(s);\n res = pstm.executeQuery(s);\n table.setModel(DbUtils.resultSetToTableModel(res));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"There Is No Data In Server\");\n }\n }", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "public interface IDBPOI {\n\t/** Name of the database */\n static final String DB_NAME = \"discoveryRallye\";\n \n /** Name of the table */\n static final String DB_TABLE_POIS = \"pois\";\n \n /** version number of the database */\n static final int DB_VERSION \t\t= 1;\n \n /** name of the id column */\n static final String ATTR_ID = \"_id\";\n \n /** name of the name column */\n static final String ATTR_NAME = \"name\";\n \n /** name of the longitude column */\n static final String ATTR_LON = \"longitude\";\n \n /** name of the latitude column */\n static final String ATTR_LAT = \"latitude\";\n}", "String pvTableName();", "public interface TableDefinition extends BaseColumns {\n\n String tableName();\n\n String createStatement();\n\n String dropStatement();\n \n}", "private void CreatTable() {\n String sql = \"CREATE TABLE IF NOT EXISTS \" + TABLE_NAME\n + \" (name varchar(30) primary key,password varchar(30));\";\n try{\n db.execSQL(sql);\n }catch(SQLException ex){}\n }", "public interface JDBCConnectionInfo {\n\tstatic final String CONNECTIONINFO = \"jdbc:mysql://sql9.freemysqlhosting.net:3306/sql9378764?useSSL=false\";\n\tstatic final String LOGIN = \"sql9378764\";\n\tstatic final String PASSWORD = \"rrXgstV3nB\";\n\n\tstatic final String MOVIETABLE = \"MOVIE\";\n\tstatic final String REGISTEREDUSERTABLE = \"REGISTEREDUSER\";\n\tstatic final String SHOWTIMETABLE = \"SHOWTIME\";\n\tstatic final String TICKETTABLE = \"TICKET\";\n\tstatic final String VOUCHERTABLE = \"VOUCHER\";\n\tstatic final String THEATRETABLE = \"THEATRE\";\n}", "public abstract String [] listTables();", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\" WHERE \");\n String string0 = SQLUtil.typeAndName(defaultDBTable0);\n assertEquals(\"table WHERE \", string0);\n }", "public String getTableDbName() {\r\n return \"t_testplans\";\r\n }" ]
[ "0.6396001", "0.6207996", "0.617171", "0.6141718", "0.5950985", "0.58583885", "0.5840544", "0.58299446", "0.5812275", "0.5799318", "0.5785284", "0.5765465", "0.5752271", "0.57516605", "0.57133824", "0.57118416", "0.57009435", "0.569471", "0.5650939", "0.56027657", "0.5591365", "0.55897725", "0.55897725", "0.55897725", "0.558852", "0.55545557", "0.5544058", "0.55284023", "0.5527869", "0.55072695", "0.54975176", "0.5487749", "0.54841566", "0.54756194", "0.5468018", "0.546383", "0.54601985", "0.5456665", "0.54504746", "0.5450442", "0.54356176", "0.54337555", "0.54283166", "0.5418799", "0.5415922", "0.5406745", "0.5406639", "0.5406639", "0.53900963", "0.5389692", "0.5388421", "0.5385381", "0.5385381", "0.5383883", "0.53756523", "0.5374455", "0.5366067", "0.5354217", "0.5354217", "0.5342489", "0.5341096", "0.53388673", "0.53383625", "0.53340685", "0.53311986", "0.5310025", "0.53089374", "0.53045565", "0.52918965", "0.52916944", "0.52885383", "0.52876866", "0.52822506", "0.52800655", "0.5269165", "0.5267664", "0.52651787", "0.5251147", "0.52488536", "0.52481985", "0.5246951", "0.5245321", "0.52407926", "0.5232778", "0.5226218", "0.52222437", "0.5216766", "0.5213131", "0.52064633", "0.5204253", "0.52002186", "0.51989806", "0.51989806", "0.51957446", "0.5194203", "0.5193497", "0.5188325", "0.51831174", "0.518059", "0.51797515", "0.5171445" ]
0.0
-1
Public methods used by CardIOActivity
public void setGuideAndRotation(Rect rect, int rotation) { mRotation = rotation; mGuide = rect; invalidate(); Point topEdgeUIOffset; if (mRotation % 180 != 0) { topEdgeUIOffset = new Point((int) (40 * mScale), (int) (60 * mScale)); mRotationFlip = -1; } else { topEdgeUIOffset = new Point((int) (60 * mScale), (int) (40 * mScale)); mRotationFlip = 1; } if (mCameraPreviewRect != null) { Point torchPoint = new Point(mCameraPreviewRect.left + topEdgeUIOffset.x, mCameraPreviewRect.top + topEdgeUIOffset.y); // mTorchRect used only for touch lookup, not layout mTorchRect = Util.rectGivenCenter(torchPoint, (int) (TORCH_WIDTH * mScale), (int) (TORCH_HEIGHT * mScale)); // mLogoRect used only for touch lookup, not layout Point logoPoint = new Point(mCameraPreviewRect.right - topEdgeUIOffset.x, mCameraPreviewRect.top + topEdgeUIOffset.y); mLogoRect = Util.rectGivenCenter(logoPoint, (int) (LOGO_MAX_WIDTH * mScale), (int) (LOGO_MAX_HEIGHT * mScale)); int[] gradientColors = { Color.WHITE, Color.BLACK }; GradientDrawable.Orientation gradientOrientation = GRADIENT_ORIENTATIONS[(mRotation / 90) % 4]; mGradientDrawable = new GradientDrawable(gradientOrientation, gradientColors); mGradientDrawable.setGradientType(GradientDrawable.LINEAR_GRADIENT); mGradientDrawable.setBounds(mGuide); mGradientDrawable.setAlpha(50); mLockedBackgroundPath = new Path(); mLockedBackgroundPath.addRect(new RectF(mCameraPreviewRect), Path.Direction.CW); mLockedBackgroundPath.addRect(new RectF(mGuide), Path.Direction.CCW); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ActonCard() {\n\t}", "protected CardCommandAPDU() {\n }", "public abstract void queryRemoteCardInfo();", "private void cards() {\n newUserCard();\n editTypeCard();\n changePasswordCard();\n }", "public abstract void open(CaptchalogueCard card, OpenReason reason);", "void parseCardData(ICardContext context);", "public void run() {\n try {\n Class pcscterminal\n = Class.forName(\"sun.security.smartcardio.PCSCTerminals\");\n Field contextId = pcscterminal.getDeclaredField(\"contextId\");\n contextId.setAccessible(true);\n\n if (contextId.getLong(pcscterminal) != 0L) {\n Class pcsc\n = Class.forName(\"sun.security.smartcardio.PCSC\");\n\n Method SCardEstablishContext = pcsc.getDeclaredMethod(\n \"SCardEstablishContext\", new Class[]{Integer.TYPE});\n SCardEstablishContext.setAccessible(true);\n\n Field SCARD_SCOPE_USER\n = pcsc.getDeclaredField(\"SCARD_SCOPE_USER\");\n SCARD_SCOPE_USER.setAccessible(true);\n\n long newId = ((Long) SCardEstablishContext.invoke(pcsc, new Object[]{Integer.valueOf(SCARD_SCOPE_USER.getInt(pcsc))})).longValue();\n contextId.setLong(pcscterminal, newId);\n }\n } catch (Exception ex) {\n }\n ///////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n TerminalFactory factory = null;\n List<CardTerminal> terminals = null;\n try {\n factory = TerminalFactory.getDefault();\n\n terminals = factory.terminals().list();\n } catch (Exception ex) { //\n Logger.getLogger(NFC_Test.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n if (factory != null && factory.terminals() != null && terminals\n != null && terminals.size() > 0) {\n try {\n CardTerminal terminal = terminals.get(0);\n\n if (terminal != null) {\n\n System.out.println(terminal);\n if (terminal.isCardPresent()) {\n System.out.println(\"Card|\"+terminal.getName()+\"|\"+terminal.hashCode()+\"|\");\n } else {\n System.out.println(\"No Card\");\n }\n\n } else {\n System.out.println(\"No terminal\");\n }\n\n terminal = null;\n } catch (Exception e) {\n Logger.getLogger(NFC_Test.class.getName()).log(Level.SEVERE, null, e);\n }\n factory = null;\n\n terminals = null;\n\n Runtime.getRuntime().gc();\n\n } else {\n System.out.println(\"No terminal\");\n }\n\n }", "@Override\r\n\tpublic void playMonumentCard() {\n\t\t\r\n\t}", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public final void onStart() {\n super.onStart();\n asjl.m74236a(this, \"Add New Card\");\n AccountInfo accountInfo = mo59436a().f90210a;\n if (accountInfo != null) {\n new atam(new askf(accountInfo, askc.m74272b(), this)).mo49748a(getContainerActivity().getClass().getCanonicalName());\n }\n }", "@Override\n\tpublic void onCardSucess() {\n\t\tLoggerUtils.d(\"onCardSucess Start!!!\");\n\t\tonSucess();\n\t}", "public interface CardboardViewApi\n{\n\n public abstract void setRenderer(GvrView.Renderer renderer);\n\n public abstract void setRenderer(GvrView.StereoRenderer stereorenderer);\n\n public abstract void getCurrentEyeParams(HeadTransform headtransform, Eye eye, Eye eye1, Eye eye2, Eye eye3, Eye eye4);\n\n public abstract void setStereoModeEnabled(boolean flag);\n\n public abstract boolean getStereoModeEnabled();\n\n public abstract boolean setAsyncReprojectionEnabled(boolean flag);\n\n public abstract boolean getAsyncReprojectionEnabled();\n\n public abstract void setOnCloseButtonListener(Runnable runnable);\n\n public abstract HeadMountedDisplay getHeadMountedDisplay();\n\n public abstract void setNeckModelEnabled(boolean flag);\n\n public abstract float getNeckModelFactor();\n\n public abstract void setNeckModelFactor(float f);\n\n public abstract void resetHeadTracker();\n\n public abstract void recenterHeadTracker();\n\n public abstract void updateGvrViewerParams(GvrViewerParams gvrviewerparams);\n\n public abstract GvrViewerParams getGvrViewerParams();\n\n public abstract void updateScreenParams(ScreenParams screenparams);\n\n public abstract ScreenParams getScreenParams();\n\n public abstract float getInterpupillaryDistance();\n\n public abstract void setDistortionCorrectionEnabled(boolean flag);\n\n public abstract boolean getDistortionCorrectionEnabled();\n\n public abstract void undistortTexture(int i);\n\n public abstract void setDistortionCorrectionScale(float f);\n\n public abstract void setMultisampling(int i);\n\n public abstract void setDepthStencilFormat(int i);\n\n public abstract void onResume();\n\n public abstract void onPause();\n\n public abstract void shutdown();\n\n public abstract boolean onTouchEvent(MotionEvent motionevent);\n\n public abstract void setOnCardboardBackListener(Runnable runnable);\n\n public abstract void setOnCardboardTriggerListener(Runnable runnable);\n\n public abstract void enableCardboardTriggerEmulation();\n\n public abstract void setTransitionViewEnabled(boolean flag);\n\n public abstract void setOnTransitionViewDoneListener(Runnable runnable);\n\n public abstract View getRootView();\n\n public abstract GvrSurfaceView getGvrSurfaceView();\n}", "Symbol getActiveCard();", "@Override\n protected void initialCardGeneration() {\n Intent intent = getIntent();\n if(intent != null)\n {\n if(intent.getBooleanExtra(\"cardPoolIntent\", false))\n {\n // Store card pools loaded in from elsewhere.\n Bundle bundle = intent.getExtras();\n openedCardPool = bundle.getParcelableArrayList(\"openedCardPool\");\n selectedCardPool = bundle.getParcelableArrayList(\"selectedCardPool\");\n\n // Gets the deck ID and stores it in case this was passed from MyDeckActivity.\n deckId = bundle.getInt(\"deckId\");\n\n // Update card counter button according to passed in selected card pool (deck).\n btnCardsInDeck.setText(selectedCardPool.size() + SEALED_DECK_NUM);\n }\n else\n {\n // Generate new cards according to Sealed rules, using the database. (6 boosters.)\n generateNewCards();\n }\n }\n else\n {\n // Generate new cards according to Sealed rules, using the database. (6 boosters.)\n generateNewCards();\n }\n }", "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "void beginVCard();", "void onOtherInfoToolCard(int id, Match match);", "private static void showDeckInfo() {\n }", "@Override\r\n\t\t\tpublic Object construct() {\n\t\t\t\ttextArea_1.setText(\"\\n Now Capturing on Interface \"+index+ \".... \"+\"\\n --------------------------------------------\"+\r\n\t\t\t\t\t\t\"---------------------------------------------\\n\\n \");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tCAP=JpcapCaptor.openDevice(NETWORK_INTERFACES[index], 65535, true, 20);\r\n\t\t\t\t\twhile(captureState)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tCAP.processPacket(1, new PkPirate_packetContents());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tCAP.close();\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\tSystem.out.println(e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\treturn 0;\r\n\t\t\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public boolean canUseCard(){\n return false;\n }", "@Override\n\tpublic void playCard() {\n\t\t\n\t}", "private static void showMatchedDeckInfo() {\n }", "public interface mCard {\n\nint getCardType();\nvoid onBindView(CardView cardView);\n\n}", "@Override\n\t\t\tpublic void writeToParcel(Parcel arg0, int arg1) {\n\t\t\t\t\n\t\t\t}", "public abstract String requestCard(byte[] messageRec) throws IOException;", "public abstract String getCvAccession();", "ICard deal();", "public interface CardQueryContact {\n\n int MODE_QUERY_CARD = 0x01;\n int MODE_QUERY_CARD_LOG = 0x02;\n\n\n interface ICardQueryView {\n\n /**\n * update query cards list\n *\n * @param data cardEntity list\n */\n void updateCards(List<CardEntity> data);\n\n /**\n * update card logs list\n *\n * @param data CardLog list\n */\n void updateCardLogs(List<CardLog> data);\n\n /**\n * SocketTimeOutException deal\n *\n * @param methodFlag int method flag\n */\n void requestTimeOut(Throwable throwable, int methodFlag);\n\n /**\n * Added by wangshuai 2017-04-26\n * the method when request data happen exception call\n *\n * @param throwable Throwable exception\n */\n void updateCardLogsFailed(Throwable throwable);\n\n }\n\n interface ICardQueryPresenter {\n /**\n * search all card\n *\n * @param cardName card name or query key\n */\n void queryCards(String cardName);\n\n /**\n * query card's logs\n *\n * @param cardType card type\n * @param cardNo card number\n * @param merName merchant name or query key\n * @param page int page\n * @param pageSize int page count\n */\n void queryCardLogs(int cardType, String cardNo, String merName, int page, int pageSize);\n }\n}", "@Override\n public String getDescription() {\n return \"Asset transfer\";\n }", "public PlayingCard(){\n\t\tsuper();\n\t}", "@Override\r\n public void onDeviceDescription(GenericDevice dev, PDeviceHolder devh,\r\n String desc) {\n\r\n }", "private static void showPlayerDeckInfo() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "protected abstract boolean isCardActivatable(Card card);", "public void doPermissionGrantedStuffs() {\n TelephonyManager tm =(TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);\n //Get IMEI Number of Phone //////////////// for this example i only need the IMEI\n String IMEINumber=tm.getDeviceId();\n\n // Now read the desired content to a textview.\n addImeiCard.setVisibility(View.GONE);\n asset_serial.setText(IMEINumber);\n }", "public void ownRead();", "protected void OUTProcess(byte[] dataCamera)\n {\n if(oldIDOut.length()==8 && oldIDOut.equals(prop.nfcCardID)==true)\n return;\n //region OUT\n Bitmap bmp;\n prop.timeScan = new Date();\n //1.Get image from camera\n //BitmapFactory.Options o = new BitmapFactory.Options();\n //o.inSampleSize = 2;\n //bmp = BitmapFactory.decodeByteArray(dataCamera, 0, dataCamera.length, o);\n //bmp = ImageFunc.ResizedBitmap(bmp, 400, 400);\n //prop.imgBitmap =bmp;\n // prop.imgBitmap = ImageFunc.FixBitmapfromCamera(dataCamera);\n //2.Get Digit from image with ipss\n //prop.ipssDigit= IPSS.getDigit(prop.imgBitmap,this);\n prop.ipssDigit= \"0000\";\n prop.in_FileName = prop.nfcCardID +\"_\"+ Convert.imageDateFormat.format(prop.timeScan).toString()+\"_\"+prop.ipssDigit+\"_3.jpg\";\n //Bitmap imgSaveSucces=ImageFunc.SaveImage(prop.imgBitmap,sdRoot,dir, prop.in_FileName);\n //Bitmap imgSaveSucces=new Bitmap();\n if(1==1) {\n\n //data MCar\n Car mCar=new Car();\n mCar.setSmartCardCode(prop.nfcCardID);\n mCar.setTimeEnd(prop.timeScan);\n mCar.setDigit(prop.ipssDigit);\n mCar.setImages3(prop.in_FileName);\n mCar.setImages4(prop.in_FileName);\n //using CarAPI.ScanOut\n carAPI=new APICar(myContext);\n carAPI.ScanCarOut(mCar);\n inOutTask =new InOutTask(myContext,myActivity,carAPI,prop);\n inOutTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n oldIDOut=prop.nfcCardID;\n }else {\n InOut_tv_InfoInOut.setText(\"Lỗi lưu hình\");\n return;\n }\n //endregion OUT\n }", "abstract void output(Card cd);", "@Override\n public void onCardClick(String p) {\n }", "private void reDrowStatusCard() {\n \t\tint currentInstance= Storage_access.getCurrentProjectInstanceBDDID() ;\n \t\t\n \t\tdispatcher.execute(new GetActivityStateAction(currentInstance), new AsyncCallback<GetActivityStateActionResult>() {\n \n \t\n \n \t\t\t@Override public void onFailure(Throwable arg0) {\n \t\t\t\tSystem.out.println(\"!!!!!!!!!!!!!!!!!!!!!**** failed to get activities status\");\n \n \t\t\t}\n \n \t\t\t@Override public void onSuccess(GetActivityStateActionResult result) {\n \t\t\t\tfor (int i=0; i< Storage_access.getNumberOfCard(); i++) {\n \t\t\t\t\tString card = Storage_access.getCard(i);\n \t\t\t\t\tActivityState_dto a = result.getActivitiesState().get(\"\"+Storage_access.getBddIdCard(card));\n \t\t\t\t\tif (a == null) \n \t\t\t\t\t\tStorage_access.revoveFromSlot(i);\t\n \t\t\t\t\telse \n \t\t\t\t\t\tStorage_access.setSlotCard(i, a.getDay(), a.getPeriod());\t\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t\teventBus.fireEvent( \n \t\t\t\t\t\tnew BoardViewChangedEvent(getView().getCombo_viewChoice1().getSelectedIndex(),\n \t\t\t\t\t\t\t\t\t\t\t\t getView().getCombo_viewChoice2().getSelectedIndex())\n \t\t\t\t\t\t);\n \t\t\t\t//Storage_access.printStorage();\n \t\t\t}\n \n \t\t\t});\n \n \t\t\n \t}", "void playCurrentStationCard();", "public interface CardListener {\n void callback(CardInfo cardInfo);\n}", "@Override\r\n\tpublic void readResult(IDCardItem arg0) {\n\t\tmHandler.obtainMessage(200, arg0).sendToTarget();\r\n\t}", "private void scanCard() {\n\n Intent intent = new ScanCardIntent.Builder(getActivity()).build();\n startActivityForResult(intent, Constant.REQUEST_CODE_SCAN_CARD);\n }", "@Override\n\tpublic void RacialInit(CharactherComponent cc) {\n\n\t}", "@Override\n\tprotected void GetDataFromNative() {\n\t\tAutoGrease = CAN1Comm.Get_AutoGreaseOperationStatus_3449_PGN65527();\n\t\tQuickcoupler = CAN1Comm.Get_QuickCouplerOperationStatus_3448_PGN65527();\n\t\tRideControl = CAN1Comm.Get_RideControlOperationStatus_3447_PGN65527();\n\t\tBeaconLamp = CAN1Comm.Get_BeaconLampOperationStatus_3444_PGN65527();\n\t\tMirrorHeat = CAN1Comm.Get_MirrorHeatOperationStatus_3450_PGN65527();\n\t\tFineModulation = CAN1Comm.Get_ComponentCode_1699_PGN65330_EHCU();\n\t}", "@Override public java.lang.String getUserAvaibility(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.lang.String _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getUserAvaibility, _data, _reply, 0);\n_reply.readException();\n_result = _reply.readString();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}", "public DevCard giveDevCard(){\n \n return null;\n }", "@Test\r\n\tpublic void testReadMethods() {\r\n\t\t\r\n\t\tVOControllingAdapter desc = getControllingAdaptor(10, 0);\r\n\t\t\r\n\t\tassertEquals(\"\", desc.getDescription());\r\n\t\tassertEquals(10, desc.getControllingCharacterId());\r\n\t\tassertEquals(1, desc.getStates().size());\r\n\t\tassertTrue(desc.getStates().contains(2));\r\n\t\tassertEquals(1, desc.getDependentCharacterIds().size());\r\n\t\tassertTrue(desc.getDependentCharacterIds().contains(11));\r\n\t}", "public abstract void expose(Card c);", "@Override\n\tpublic void receiveSessionInfo(Camera camera, int resultCode) {\n\t\t\n\t}", "private void getAI(){\n\n }", "public CardInfo[] getCardInfo() {\n return cardInfo;\n }", "void bytetest() {\n byte[] myByteArray = new byte[256];\n for (int i = 0; i < 256; ++i) {\n myByteArray[i] = (byte)i;\n }\n\n Intent writeIntent = new Intent(BGXpressService.ACTION_WRITE_SERIAL_BIN_DATA);\n writeIntent.putExtra(\"value\", myByteArray);\n writeIntent.setClass(mContext, BGXpressService.class);\n writeIntent.putExtra(\"DeviceAddress\", mDeviceAddress);\n startService(writeIntent);\n }", "public void mo68520e() {\n super.mo68520e();\n C26780aa.m87959a(this.itemView, mo75290r(), this.f77546j);\n C24942al.m81837c(mo75261ab(), this.f89221bo);\n C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"otherclick\").mo65283e(\"video\").mo65270a(mo75261ab());\n }", "public void onImageAvailable(android.media.ImageReader r15) {\n /*\n r14 = this;\n com.android.camera.imageprocessor.FrameProcessor r0 = com.android.camera.imageprocessor.FrameProcessor.this\n java.lang.Object r0 = r0.mAllocationLock\n monitor-enter(r0)\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0172 }\n android.renderscript.Allocation r1 = r1.mOutputAllocation // Catch:{ all -> 0x0172 }\n if (r1 != 0) goto L_0x0011\n monitor-exit(r0) // Catch:{ all -> 0x0172 }\n return\n L_0x0011:\n android.media.Image r15 = r15.acquireLatestImage() // Catch:{ IllegalStateException -> 0x0170 }\n if (r15 != 0) goto L_0x0019\n monitor-exit(r0) // Catch:{ all -> 0x0172 }\n return\n L_0x0019:\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n boolean r1 = r1.mIsActive // Catch:{ IllegalStateException -> 0x0170 }\n if (r1 != 0) goto L_0x0026\n r15.close() // Catch:{ IllegalStateException -> 0x0170 }\n monitor-exit(r0) // Catch:{ all -> 0x0172 }\n return\n L_0x0026:\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n r2 = 1\n r1.mIsAllocationEverUsed = r2 // Catch:{ IllegalStateException -> 0x0170 }\n android.media.Image$Plane[] r1 = r15.getPlanes() // Catch:{ IllegalStateException -> 0x0170 }\n r3 = 0\n r1 = r1[r3] // Catch:{ IllegalStateException -> 0x0170 }\n java.nio.ByteBuffer r1 = r1.getBuffer() // Catch:{ IllegalStateException -> 0x0170 }\n android.media.Image$Plane[] r4 = r15.getPlanes() // Catch:{ IllegalStateException -> 0x0170 }\n r5 = 2\n r4 = r4[r5] // Catch:{ IllegalStateException -> 0x0170 }\n java.nio.ByteBuffer r11 = r4.getBuffer() // Catch:{ IllegalStateException -> 0x0170 }\n byte[] r4 = r14.yvuBytes // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == 0) goto L_0x0062\n int r4 = r14.width // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r6 = r6.getWidth() // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 != r6) goto L_0x0062\n int r4 = r14.height // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r6 = r6.getHeight() // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == r6) goto L_0x009e\n L_0x0062:\n android.media.Image$Plane[] r4 = r15.getPlanes() // Catch:{ IllegalStateException -> 0x0170 }\n r4 = r4[r3] // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4.getRowStride() // Catch:{ IllegalStateException -> 0x0170 }\n r14.stride = r4 // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r4 = r4.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4.getWidth() // Catch:{ IllegalStateException -> 0x0170 }\n r14.width = r4 // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r4 = r4.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4.getHeight() // Catch:{ IllegalStateException -> 0x0170 }\n r14.height = r4 // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r14.stride // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r6 = r6.getHeight() // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4 * r6\n r14.ySize = r4 // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r14.ySize // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4 * 3\n int r4 = r4 / r5\n byte[] r4 = new byte[r4] // Catch:{ IllegalStateException -> 0x0170 }\n r14.yvuBytes = r4 // Catch:{ IllegalStateException -> 0x0170 }\n L_0x009e:\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n java.util.ArrayList r4 = r4.mPreviewFilters // Catch:{ IllegalStateException -> 0x0170 }\n java.util.Iterator r12 = r4.iterator() // Catch:{ IllegalStateException -> 0x0170 }\n r13 = r3\n L_0x00a9:\n boolean r4 = r12.hasNext() // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == 0) goto L_0x0128\n java.lang.Object r4 = r12.next() // Catch:{ IllegalStateException -> 0x0170 }\n r5 = r4\n com.android.camera.imageprocessor.filter.ImageFilter r5 = (com.android.camera.imageprocessor.filter.ImageFilter) r5 // Catch:{ IllegalStateException -> 0x0170 }\n boolean r4 = r5.isFrameListener() // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == 0) goto L_0x00f0\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor$ListeningTask r4 = r4.mListeningTask // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r8 = r6.getWidth() // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r9 = r6.getHeight() // Catch:{ IllegalStateException -> 0x0170 }\n int r10 = r14.stride // Catch:{ IllegalStateException -> 0x0170 }\n r6 = r1\n r7 = r11\n boolean r4 = r4.setParam(r5, r6, r7, r8, r9, r10) // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == 0) goto L_0x0121\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.os.Handler r4 = r4.mListeningHandler // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r5 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor$ListeningTask r5 = r5.mListeningTask // Catch:{ IllegalStateException -> 0x0170 }\n r4.post(r5) // Catch:{ IllegalStateException -> 0x0170 }\n goto L_0x0121\n L_0x00f0:\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r4 = r4.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4.getWidth() // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r6 = r6.getHeight() // Catch:{ IllegalStateException -> 0x0170 }\n int r7 = r14.stride // Catch:{ IllegalStateException -> 0x0170 }\n int r8 = r14.stride // Catch:{ IllegalStateException -> 0x0170 }\n r5.init(r4, r6, r7, r8) // Catch:{ IllegalStateException -> 0x0170 }\n boolean r4 = r5 instanceof com.android.camera.imageprocessor.filter.BeautificationFilter // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == 0) goto L_0x0118\n java.lang.Boolean r4 = new java.lang.Boolean // Catch:{ IllegalStateException -> 0x0170 }\n r4.<init>(r3) // Catch:{ IllegalStateException -> 0x0170 }\n r5.addImage(r1, r11, r3, r4) // Catch:{ IllegalStateException -> 0x0170 }\n goto L_0x0120\n L_0x0118:\n java.lang.Boolean r4 = new java.lang.Boolean // Catch:{ IllegalStateException -> 0x0170 }\n r4.<init>(r2) // Catch:{ IllegalStateException -> 0x0170 }\n r5.addImage(r1, r11, r3, r4) // Catch:{ IllegalStateException -> 0x0170 }\n L_0x0120:\n r13 = r2\n L_0x0121:\n r1.rewind() // Catch:{ IllegalStateException -> 0x0170 }\n r11.rewind() // Catch:{ IllegalStateException -> 0x0170 }\n goto L_0x00a9\n L_0x0128:\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n boolean r2 = r2.mIsFirstIn // Catch:{ IllegalStateException -> 0x0170 }\n if (r2 == 0) goto L_0x014e\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n boolean r2 = r2.mIsVideoOn // Catch:{ IllegalStateException -> 0x0170 }\n if (r2 == 0) goto L_0x014e\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n boolean r2 = r2.isFrameListnerEnabled() // Catch:{ IllegalStateException -> 0x0170 }\n if (r2 == 0) goto L_0x014e\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n r2.mIsFirstIn = r3 // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.CaptureModule r2 = r2.mModule // Catch:{ IllegalStateException -> 0x0170 }\n r2.startMediaRecording() // Catch:{ IllegalStateException -> 0x0170 }\n L_0x014e:\n if (r13 == 0) goto L_0x016d\n byte[] r2 = r14.yvuBytes // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r1.remaining() // Catch:{ IllegalStateException -> 0x0170 }\n r1.get(r2, r3, r4) // Catch:{ IllegalStateException -> 0x0170 }\n byte[] r1 = r14.yvuBytes // Catch:{ IllegalStateException -> 0x0170 }\n int r2 = r14.ySize // Catch:{ IllegalStateException -> 0x0170 }\n int r3 = r11.remaining() // Catch:{ IllegalStateException -> 0x0170 }\n r11.get(r1, r2, r3) // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.os.Handler r1 = r1.mOutingHandler // Catch:{ IllegalStateException -> 0x0170 }\n r1.post(r14) // Catch:{ IllegalStateException -> 0x0170 }\n L_0x016d:\n r15.close() // Catch:{ IllegalStateException -> 0x0170 }\n L_0x0170:\n monitor-exit(r0) // Catch:{ all -> 0x0172 }\n return\n L_0x0172:\n r14 = move-exception\n monitor-exit(r0) // Catch:{ all -> 0x0172 }\n throw r14\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.camera.imageprocessor.FrameProcessor.ProcessingTask.onImageAvailable(android.media.ImageReader):void\");\n }", "private void addCard() {\n Intent intent = new Intent(this, NewCard.class);\n intent.putExtra(\"cardSetId\", cardSetId);\n startActivity(intent);\n }", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "private DisplayDevice(){\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void buyCard() {\n\t\t\r\n\t}", "private void processOpsAccessRequested(String remoteAddr,String remoteName, byte opCode,\n String fileName,String pType,int mimeType, int fileSize) {\n\n\n boolean handover = BluetoothOppManager.getInstance(this).isWhitelisted(remoteAddr);\n\n if(V){\n Log.v(TAG, \"processOpsAccessRequested\");\n Log.v(TAG, \"remoteAddr is : \" + remoteAddr);\n Log.v(TAG, \"remoteName is : \" + remoteName);\n Log.v(TAG, \"fileName is : \" + fileName);\n Log.v(TAG, \"mimeType = \" + mimeType + \" fileSize = \" +fileSize);\n }\n\n if (opCode == OPP_OPER_PUSH) {\n\n ContentValues values = new ContentValues();\n values.put(BluetoothShare.FILENAME_HINT, fileName);\n values.put(BluetoothShare.TOTAL_BYTES, fileSize);\n values.put(BluetoothShare.DESTINATION, remoteAddr);\n values.put(BluetoothShare.DIRECTION, BluetoothShare.DIRECTION_INBOUND);\n values.put(BluetoothShare.TIMESTAMP, mTimestamp);\n\n /*This case is hit for multiple incoming shares*/\n if(mOpsObj && !mOpsClose){\n if(V) Log.d(TAG, \"Handling multiple incoming shares\");\n if(!handover){\n OppReceiveFileInfo recieveFileInfo =\n OppReceiveFileInfo.genAbsPathAndMime(fileName,fileSize);\n if(recieveFileInfo.mStatus == 0){\n values.put(BluetoothShare._DATA, recieveFileInfo.mAbsFileName);\n values.put(BluetoothShare.MIMETYPE, recieveFileInfo.mMimeType);\n values.put(BluetoothShare.USER_CONFIRMATION,\n BluetoothShare.USER_CONFIRMATION_AUTO_CONFIRMED);\n }else{\n Log.e(TAG,\n \"fileSystem err occured during multple incoming shares \");\n OpsAccessRsp((byte)OPP_OPER_PUSH ,\n false ,\n fileName);\n }\n }\n }\n\n if(handover){\n Log.d(TAG, \"The device is whitelisted for NFC Transfer\");\n OppReceiveFileInfo recieveFileInfo =\n OppReceiveFileInfo.genAbsPathAndMime(fileName,fileSize);\n if(recieveFileInfo.mStatus == 0){\n values.put(BluetoothShare._DATA, recieveFileInfo.mAbsFileName);\n values.put(BluetoothShare.MIMETYPE, recieveFileInfo.mMimeType);\n values.put(BluetoothShare.USER_CONFIRMATION,\n BluetoothShare.USER_CONFIRMATION_HANDOVER_CONFIRMED);\n OpsAccessRsp((byte)OPP_OPER_PUSH ,\n true ,\n recieveFileInfo.mAbsFileName);\n handover = true;\n }else{\n Log.e(TAG,\"During Nfc handover fileSystem error occured\");\n OpsAccessRsp((byte)OPP_OPER_PUSH ,\n false ,\n fileName);\n return;\n }\n\n }\n Uri contentUri =\n this.getContentResolver().insert(BluetoothShare.CONTENT_URI, values);\n\n /*if more than one file is a part of a incoming batch , we have to auto confirm\n with out calling the incomingFileConfirm activity\n Below is the Logic :\n For multiple incoming files , we recieve the stack events as followsadb reb\n OPS_OPEN>> OPS_ACCESS>> OPS_PROG>>OPS_OBJ>>OPS_ACESS>>OPS_OBj>>OPS_CLOSE\n so by checking if we get ACESS request after OBJ ,then it means the\n incoming file is for the same batch*/\n if(V){\n Log.v(TAG, \"Current value of mOpsclose = \" + mOpsClose);\n Log.v(TAG, \"Current value of mOpsObj = \" + mOpsObj);\n }\n if(mOpsClose && !mOpsObj && !handover)\n {\n if(V) Log.v(TAG, \"Calling incomingFileConfirmActivity\");\n Intent in =\n new Intent(BluetoothShare.INCOMING_FILE_CONFIRMATION_REQUEST_ACTION);\n in.setClassName(Constants.THIS_PACKAGE_NAME,\n BluetoothOppReceiver.class.getName());\n this.sendBroadcast(in);\n }\n\n int localShareInfoId = Integer.parseInt(contentUri.getPathSegments().get(1));\n if(V)Log.v(TAG, \"insert contentUri: \" + contentUri);\n if(V)Log.v(TAG, \"mLocalShareInfoId = \" + localShareInfoId);\n\n } else if (opCode == OPP_OPER_PULL) {\n\n Log.e(TAG, \"Currently we dont support pull\");\n\n }\n\n }", "@Override\n\tprotected void getDataFromUCF() {\n\n\t}", "@Override\n\tpublic void onCardTimeOut() {\n\t\tLoggerUtils.d(\"onCardTimeOut Start!!!\");\n\t\tonTimeOut();\n\t}", "private void remplirFabricantData() {\n\t}", "@Override\n\t\t\tpublic void run () {\n\n\t\t\t\trfComm = new Rfcomm(uiservice.getRootActivity(), secureUUID, unsecureUUID, new Handler() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handleMessage (android.os.Message msg) {\n\t\t\t\t\t\tswitch (msg.what) {\n\t\t\t\t\t\t\tcase Rfcomm.MESSAGE_STATE_CHANGE:\n\t\t\t\t\t\t\t\tswitch (msg.arg1) {\n\t\t\t\t\t\t\t\t\tcase Rfcomm.STATE_CONNECTED:\n\t\t\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), \"STATE_CONNECTED\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase Rfcomm.STATE_CONNECTING:\n\t\t\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), \"STATE_CONNECTING\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase Rfcomm.STATE_LISTEN:\n\t\t\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), \"STATE_LISTEN\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase Rfcomm.STATE_NONE:\n\t\t\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), \"STATE_NONE\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase Rfcomm.MESSAGE_READ:\n\t\t\t\t\t\t\t\tbyte[] readBuf = (byte[]) msg.obj;\n\t\t\t\t\t\t\t\t// construct a string from the valid bytes in the buffer\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tByteArrayInputStream bis = new ByteArrayInputStream(readBuf);\n\t\t\t\t\t\t\t\t\tLog.i(TAG, \"DRE DRE DRE DRE ?\");\n\t\t\t\t\t\t\t\t\tObjectInputStream ois = new ObjectInputStream(bis) {\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tprotected Class<?> resolveClass (ObjectStreamClass objectStreamClass) throws IOException, ClassNotFoundException {\n\t\t\t\t\t\t\t\t\t\t\tClass c = null;\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tif (c == null) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tc = resolver.resolve(objectStreamClass.getName());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tif (c == null) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tc = super.resolveClass(objectStreamClass);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tif (c == null) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tc = Class.forName(objectStreamClass.getName());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\treturn c;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\t\tMessage mess = (Message) ois.readObject();\n\t\t\t\t\t\t\t\t\tbis.close();\n\t\t\t\t\t\t\t\t\tois.close();\n\t\t\t\t\t\t\t\t\tif (D) Log.i(TAG, \"MESSAGE_READ: \" + mess.getContent().toString());\n\t\t\t\t\t\t\t\t\tremoteDispatch(mess);\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\tLog.e(TAG, \"Failed to deserialize the message\");\n\n\t\t\t\t\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t\t\t\t\tLog.e(TAG, \"Unable to cast the deserialized object\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase Rfcomm.MESSAGE_DEVICE_NAME:\n\t\t\t\t\t\t\t\t// save the connected device's name\n\t\t\t\t\t\t\t\tconnectedDeviceName = msg.getData().getString(Rfcomm.DEVICE_NAME);\n\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), \"Connected to \"\n\t\t\t\t\t\t\t\t\t\t\t+ connectedDeviceName, Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase Rfcomm.MESSAGE_TOAST:\n\t\t\t\t\t\t\t\tif (D) {\n\t\t\t\t\t\t\t\t\tToast.makeText(uiservice.getRootActivity(), msg.getData().getString(Rfcomm.TOAST),\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, timeoutAccept);\n\t\t\t\tmanager = new MessageManager(rfComm);\n\n\t\t\t\trfComm.addEventListener(BluetoothChannel.this);\n\t\t\t\trfComm.setName(getNodeName());\n\t\t\t\tif (discoverableTime > 0) rfComm.setDiscoverable(discoverableTime);\n\t\t\t\trfComm.start();\n\t\t\t\trfComm.discovering();\n\t\t\t\tif (D) Log.i(TAG, \"Bluetooth channel started\");\n\t\t\t}", "public interface ICards {\n /**\n *\n * @return a describing string of the card\n */\n public String getDisplayText();\n\n /**\n *\n * @return a simple card name that the server can easily read\n */\n public String getSimpleCardName();\n\n public int getPrio();\n\n}", "public void visitPointCardRW( DevCat devCat ) {}", "public void InitData() {\n this.mItemTitleIds = new int[]{R.string.can_vehi_status, R.string.can_csxx, R.string.can_car_drive_info, R.string.can_tyres_tpms, R.string.can_car_set, R.string.can_battery_infos, R.string.can_dtxx, R.string.can_dczxx, R.string.can_bmsgzxx, R.string.can_can_iap};\n this.mItemTypes = new CanScrollCarInfoView.Item[]{CanScrollCarInfoView.Item.TEXT, CanScrollCarInfoView.Item.ICON, CanScrollCarInfoView.Item.ICON, CanScrollCarInfoView.Item.ICON, CanScrollCarInfoView.Item.ICON, CanScrollCarInfoView.Item.TEXT, CanScrollCarInfoView.Item.ICON, CanScrollCarInfoView.Item.ICON, CanScrollCarInfoView.Item.ICON, CanScrollCarInfoView.Item.ICON};\n this.mItemIcons = new int[]{255, R.drawable.can_icon_light, R.drawable.can_icon_tpms, R.drawable.can_golf_icon14, R.drawable.can_icon_setup, 255, R.drawable.can_icon_units, R.drawable.can_icon_hybrid, R.drawable.can_icon_tpms_set, R.drawable.can_icon_factory};\n if (CanJni.GetSubType() != 2) {\n this.mItemVisibles[4] = 0;\n }\n }", "private void setOnClickListener() {\n /*\n * Update onClick listener.\n */\n\n /* Clear UI text. */\n mClear.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n clearResponseUi();\n }\n });\n\n /* Authentication function, authenticate the connected card reader. */\n mAuthentication.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n if (mBluetoothReader == null) {\n mTxtAuthentication.setText(R.string.card_reader_not_ready);\n return;\n }\n Log.d(\"Blue_auth\",mBluetoothReader.toString());\n Log.d(\"Blue_auth\",mEditMasterKey.toString());\n\n /* Retrieve master key from edit box. */\n byte masterKey[] = Utils.getEditTextinHexBytes(mEditMasterKey);\n Log.d(\"Blue_auth\",masterKey.toString());\n\n if (masterKey != null && masterKey.length > 0) {\n /* Clear response field for the result of authentication. */\n mTxtAuthentication.setText(R.string.noData);\n\n /* Start authentication. */\n if (!mBluetoothReader.authenticate(masterKey)) {\n mTxtAuthentication\n .setText(R.string.card_reader_not_ready);\n } else {\n mTxtAuthentication.setText(\"Authenticating...\");\n }\n } else {\n mTxtAuthentication.setText(\"Character format error!\");\n }\n }\n });\n\n /* Start polling card. */\n mStartPolling.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n if (mBluetoothReader == null) {\n mTxtATR.setText(R.string.card_reader_not_ready);\n return;\n }\n if (!mBluetoothReader.transmitEscapeCommand(AUTO_POLLING_START)) {\n mTxtATR.setText(R.string.card_reader_not_ready);\n }\n }\n });\n\n /* Stop polling card. */\n mStopPolling.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n if (mBluetoothReader == null) {\n mTxtATR.setText(R.string.card_reader_not_ready);\n return;\n }\n if (!mBluetoothReader.transmitEscapeCommand(AUTO_POLLING_STOP)) {\n mTxtATR.setText(R.string.card_reader_not_ready);\n }\n }\n });\n\n /* Transmit ADPU. */\n mTransmitApdu.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n /* Check for detected reader. */\n if (mBluetoothReader == null) {\n mTxtResponseApdu.setText(R.string.card_reader_not_ready);\n return;\n }\n\n /* Retrieve APDU command from edit box. */\n\n byte apduCommand[] = Utils.getEditTextinHexBytes(mEditApdu);\n\n if (apduCommand != null && apduCommand.length > 0) {\n /* Clear response field for result of APDU. */\n mTxtResponseApdu.setText(R.string.noData);\n\n /* Transmit APDU command. */\n if (!mBluetoothReader.transmitApdu(apduCommand)) {\n mTxtResponseApdu\n .setText(R.string.card_reader_not_ready);\n }\n } else {\n mTxtResponseApdu.setText(\"Character format error!\");\n }\n }\n});\n\n /* Transmit escape command. */\n mTransmitEscape.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n /* Check for detected reader. */\n if (mBluetoothReader == null) {\n mTxtEscapeResponse.setText(R.string.card_reader_not_ready);\n return;\n }\n\n /* Retrieve escape command from edit box. */\n byte escapeCommand[] = Utils.getEditTextinHexBytes(mEditEscape);\n\n if (escapeCommand != null && escapeCommand.length > 0) {\n /* Clear response field for result of escape command. */\n mTxtEscapeResponse.setText(R.string.noData);\n\n /* Transmit escape command. */\n if (!mBluetoothReader.transmitEscapeCommand(escapeCommand)) {\n mTxtEscapeResponse\n .setText(R.string.card_reader_not_ready);\n }\n } else {\n mTxtEscapeResponse.setText(\"Character format error!\");\n }\n }\n });\n\n }", "@Override\n\tpublic void receiveFrameData(Camera camera, int avChannel, Bitmap bmp) {\n\t}", "@Override\n \t\t\tpublic void onSuccess(GetCardsResult result) {\n \n \t\t\t\tStorage_access.populateStorage(project_num,result);\n \t\t\t\t\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tprint_da_page();\n \t\t\t\t// getView().getContent().setText(result.getActivities().toString());\n \t\t\t\t//Storage_access.printStorage();\n \n \t\t\t}", "void pushCard(ICard card);", "@Override\r\n protected ReturnCode_t onInitialize() {\r\n addOutPort(\"Octet\", m_OctetOut);\r\n addOutPort(\"Short\", m_ShortOut);\r\n addOutPort(\"Long\", m_LongOut);\r\n addOutPort(\"Float\", m_FloatOut);\r\n addOutPort(\"Double\", m_DoubleOut);\r\n addOutPort(\"OctetSeq\", m_OctetSeqOut);\r\n addOutPort(\"ShortSeq\", m_ShortSeqOut);\r\n addOutPort(\"LongSeq\", m_LongSeqOut);\r\n addOutPort(\"FloatSeq\", m_FloatSeqOut);\r\n addOutPort(\"DoubleSeq\", m_DoubleSeqOut);\r\n seqOutView.init(\"SeqOut\");\r\n return super.onInitialize();\r\n }", "public void mo8819c() {\n C3720a.this._cameraUtil.mo6032a((Runnable) new Runnable() {\n public void run() {\n C2331d.m10100a((Activity) C3720a.this);\n C2331d.m10114a((Activity) C3720a.this, C2328a.ON_DISCONNECT_NO_FINISH, (Bundle) null);\n }\n });\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n nfcAdapter = NfcAdapter.getDefaultAdapter(this);\n cardManager = new NFCCardManager();\n //cardManager = new LedgerBLEManager(this);\n cardManager.setCardListener(new CardListener() {\n @Override\n public void onConnected(CardChannel cardChannel) {\n try {\n // Applet-specific code\n KeycardCommandSet cmdSet = new KeycardCommandSet(cardChannel);\n\n Log.i(TAG, \"Applet selection successful\");\n\n // First thing to do is selecting the applet on the card.\n ApplicationInfo info = new ApplicationInfo(cmdSet.select().checkOK().getData());\n\n // If the card is not initialized, the INIT apdu must be sent. The actual PIN, PUK and pairing password values\n // can be either generated or chosen by the user. Using fixed values is highly discouraged.\n if (!info.isInitializedCard()) {\n Log.i(TAG, \"Initializing card with test secrets\");\n cmdSet.init(\"000000\", \"123456789012\", \"KeycardTest\").checkOK();\n info = new ApplicationInfo(cmdSet.select().checkOK().getData());\n }\n\n Log.i(TAG, \"Instance UID: \" + Hex.toHexString(info.getInstanceUID()));\n Log.i(TAG, \"Secure channel public key: \" + Hex.toHexString(info.getSecureChannelPubKey()));\n Log.i(TAG, \"Application version: \" + info.getAppVersionString());\n Log.i(TAG, \"Free pairing slots: \" + info.getFreePairingSlots());\n if (info.hasMasterKey()) {\n Log.i(TAG, \"Key UID: \" + Hex.toHexString(info.getKeyUID()));\n } else {\n Log.i(TAG, \"The card has no master key\");\n }\n Log.i(TAG, String.format(\"Capabilities: %02X\", info.getCapabilities()));\n Log.i(TAG, \"Has Secure Channel: \" + info.hasSecureChannelCapability());\n Log.i(TAG, \"Has Key Management: \" + info.hasKeyManagementCapability());\n Log.i(TAG, \"Has Credentials Management: \" + info.hasCredentialsManagementCapability());\n Log.i(TAG, \"Has NDEF capability: \" + info.hasNDEFCapability());\n\n if (info.hasSecureChannelCapability()) {\n // In real projects, the pairing key should be saved and used for all new sessions.\n cmdSet.autoPair(\"KeycardTest\");\n Pairing pairing = cmdSet.getPairing();\n\n // Never log the pairing key in a real application!\n Log.i(TAG, \"Pairing with card is done.\");\n Log.i(TAG, \"Pairing index: \" + pairing.getPairingIndex());\n Log.i(TAG, \"Pairing key: \" + Hex.toHexString(pairing.getPairingKey()));\n\n // Opening a Secure Channel is needed for all other applet commands\n cmdSet.autoOpenSecureChannel();\n\n Log.i(TAG, \"Secure channel opened. Getting applet status.\");\n }\n\n // We send a GET STATUS command, which does not require PIN authentication\n ApplicationStatus status = new ApplicationStatus(cmdSet.getStatus(KeycardCommandSet.GET_STATUS_P1_APPLICATION).checkOK().getData());\n\n Log.i(TAG, \"PIN retry counter: \" + status.getPINRetryCount());\n Log.i(TAG, \"PUK retry counter: \" + status.getPUKRetryCount());\n Log.i(TAG, \"Has master key: \" + status.hasMasterKey());\n\n if (info.hasKeyManagementCapability()) {\n // A mnemonic can be generated before PIN authentication. Generating a mnemonic does not create keys on the\n // card. a subsequent loadKey step must be performed after PIN authentication. In this example we will only\n // show how to convert the output of the card to a usable format but won't actually load the key\n Mnemonic mnemonic = new Mnemonic(cmdSet.generateMnemonic(KeycardCommandSet.GENERATE_MNEMONIC_12_WORDS).checkOK().getData());\n\n // We need to set a wordlist if we plan using this object to derive the binary seed. If we just need the word\n // indexes we can skip this step and call mnemonic.getIndexes() instead.\n mnemonic.fetchBIP39EnglishWordlist();\n\n Log.i(TAG, \"Generated mnemonic phrase: \" + mnemonic.toMnemonicPhrase());\n Log.i(TAG, \"Binary seed: \" + Hex.toHexString(mnemonic.toBinarySeed()));\n }\n\n if (info.hasCredentialsManagementCapability()) {\n // PIN authentication allows execution of privileged commands\n cmdSet.verifyPIN(\"000000\").checkAuthOK();\n\n Log.i(TAG, \"Pin Verified.\");\n }\n\n // If the card has no keys, we generate a new set. Keys can also be loaded on the card starting from a binary\n // seed generated from a mnemonic phrase. In alternative, we could load the generated keypair as shown in the\n // commented line of code.\n if (!status.hasMasterKey() && info.hasKeyManagementCapability()) {\n cmdSet.generateKey();\n //cmdSet.loadKey(mnemonic.toBIP32KeyPair());\n }\n\n // Get the current key path using GET STATUS\n KeyPath currentPath = new KeyPath(cmdSet.getStatus(KeycardCommandSet.GET_STATUS_P1_KEY_PATH).checkOK().getData());\n Log.i(TAG, \"Current key path: \" + currentPath);\n\n if (!currentPath.toString().equals(\"m/44'/0'/0'/0/0\")) {\n // Key derivation is needed to select the desired key. The derived key remains current until a new derive\n // command is sent (it is not lost on power loss).\n cmdSet.deriveKey(\"m/44'/0'/0'/0/0\").checkOK();\n Log.i(TAG, \"Derived m/44'/0'/0'/0/0\");\n }\n\n // We retrieve the wallet public key\n BIP32KeyPair walletPublicKey = BIP32KeyPair.fromTLV(cmdSet.exportCurrentKey(true).checkOK().getData());\n\n Log.i(TAG, \"Wallet public key: \" + Hex.toHexString(walletPublicKey.getPublicKey()));\n Log.i(TAG, \"Wallet address: \" + Hex.toHexString(walletPublicKey.toEthereumAddress()));\n\n byte[] hash = \"thiscouldbeahashintheorysoitisok\".getBytes();\n\n RecoverableSignature signature = new RecoverableSignature(hash, cmdSet.sign(hash).checkOK().getData());\n\n Log.i(TAG, \"Signed hash: \" + Hex.toHexString(hash));\n Log.i(TAG, \"Recovery ID: \" + signature.getRecId());\n Log.i(TAG, \"R: \" + Hex.toHexString(signature.getR()));\n Log.i(TAG, \"S: \" + Hex.toHexString(signature.getS()));\n\n if (info.hasSecureChannelCapability()) {\n // Cleanup, in a real application you would not unpair and instead keep the pairing key for successive interactions.\n // We also remove all other pairings so that we do not fill all slots with failing runs. Again in real application\n // this would be a very bad idea to do.\n cmdSet.unpairOthers();\n cmdSet.autoUnpair();\n\n Log.i(TAG, \"Unpaired.\");\n }\n } catch (Exception e) {\n Log.e(TAG, e.getMessage());\n }\n\n }\n\n @Override\n public void onDisconnected() {\n Log.i(TAG, \"Card disconnected.\");\n }\n });\n cardManager.start();\n /*connected = false;\n cardManager.startScan(new BluetoothAdapter.LeScanCallback() {\n @Override\n public void onLeScan(BluetoothDevice device, int rssi, byte[] scanRecord) {\n if (connected) {\n return;\n }\n\n connected = true;\n cardManager.stopScan(this);\n cardManager.connectDevice(device);\n }\n });*/\n }", "@Override\r\n\tpublic void playRoadBuildingCard() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "public int onAction(int r11, int r12, int r13) {\n /*\n r10 = this;\n r9 = 9;\n r8 = 4;\n r7 = 3;\n r6 = 1;\n r5 = 0;\n r2 = \"InputSourceClient\";\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"mCBMActionListener onAction Start command: \";\n r3 = r3.append(r4);\n r3 = r3.append(r11);\n r4 = \" cmdAttr: \";\n r3 = r3.append(r4);\n r3 = r3.append(r12);\n r4 = \" priority: \";\n r3 = r3.append(r4);\n r3 = r3.append(r13);\n r3 = r3.toString();\n android.util.Log.i(r2, r3);\n r1 = 1;\n switch(r12) {\n case 1: goto L_0x005d;\n case 2: goto L_0x005f;\n case 3: goto L_0x0061;\n default: goto L_0x0036;\n };\n L_0x0036:\n r2 = \"InputSourceClient\";\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"mCBMActionListener onAction cmdAttr invalid :!!!\";\n r3 = r3.append(r4);\n r3 = r3.append(r12);\n r3 = r3.toString();\n android.util.Log.e(r2, r3);\n L_0x004e:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r0 = r2.mDestType;\n switch(r11) {\n case 3: goto L_0x01e5;\n case 4: goto L_0x0063;\n case 5: goto L_0x0063;\n case 6: goto L_0x01e5;\n default: goto L_0x0055;\n };\n L_0x0055:\n r2 = \"InputSourceClient\";\n r3 = \"mCBMActionListener Unknown CMD!\";\n android.util.Log.i(r2, r3);\n L_0x005c:\n return r5;\n L_0x005d:\n r1 = 1;\n goto L_0x004e;\n L_0x005f:\n r1 = 2;\n goto L_0x004e;\n L_0x0061:\n r1 = 3;\n goto L_0x004e;\n L_0x0063:\n r2 = \"InputSourceClient\";\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"mCBMActionListener: CBM_STOP!\";\n r3 = r3.append(r4);\n r4 = com.autochips.inputsource.InputSourceClient.this;\n r4 = r4.mSrcType;\n r3 = r3.append(r4);\n r4 = \", mDestType:\";\n r3 = r3.append(r4);\n r4 = com.autochips.inputsource.InputSourceClient.this;\n r4 = r4.mDestType;\n r3 = r3.append(r4);\n r3 = r3.toString();\n android.util.Log.i(r2, r3);\n r2 = r1 ^ -1;\n r0 = r0 & r2;\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mDestType;\n if (r2 == 0) goto L_0x00a8;\n L_0x0096:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mDestType;\n if (r0 != r2) goto L_0x00a8;\n L_0x009c:\n r2 = \"InputSourceClient\";\n r3 = \"mCBMActionListener: CBM_STOP, do nothing mDestType == destDir!\";\n android.util.Log.i(r2, r3);\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2.mCbmCtlStatus = r6;\n goto L_0x005c;\n L_0x00a8:\n if (r0 != 0) goto L_0x00f7;\n L_0x00aa:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mCbmCtlStatus;\n if (r2 != r6) goto L_0x00cd;\n L_0x00b0:\n r2 = \"InputSourceClient\";\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"mCBMActionListener CBM_STOP Already Stoped mDestType:\";\n r3 = r3.append(r4);\n r4 = com.autochips.inputsource.InputSourceClient.this;\n r4 = r4.mDestType;\n r3 = r3.append(r4);\n r3 = r3.toString();\n android.util.Log.i(r2, r3);\n goto L_0x005c;\n L_0x00cd:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mCurrentStatus;\n if (r2 != r6) goto L_0x00e0;\n L_0x00d3:\n r2 = \"InputSourceClient\";\n r3 = \"mCBMActionListener CBM_STOP Already been stoped because there is other activity in front\";\n android.util.Log.i(r2, r3);\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2.mCbmCtlStatus = r6;\n goto L_0x005c;\n L_0x00e0:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2._stop();\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2.mCbmCtlStatus = r6;\n L_0x00e9:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2.notifymsg(r8, r5, r1);\n L_0x00ee:\n r2 = \"InputSourceClient\";\n r3 = \"mCBMActionListener onAction End!!!\";\n android.util.Log.d(r2, r3);\n goto L_0x005c;\n L_0x00f7:\n if (r6 != r1) goto L_0x016e;\n L_0x00f9:\n r2 = \"InputSourceClient\";\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"mCBMActionListener CBM_STOP All mDestType:\";\n r3 = r3.append(r4);\n r4 = com.autochips.inputsource.InputSourceClient.this;\n r4 = r4.mDestType;\n r3 = r3.append(r4);\n r3 = r3.toString();\n android.util.Log.i(r2, r3);\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mCbmCtlStatus;\n if (r2 != r7) goto L_0x0139;\n L_0x011b:\n r2 = \"InputSourceClient\";\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"mCBMActionListener Already STOP_FRONT mDestType:\";\n r3 = r3.append(r4);\n r4 = com.autochips.inputsource.InputSourceClient.this;\n r4 = r4.mDestType;\n r3 = r3.append(r4);\n r3 = r3.toString();\n android.util.Log.i(r2, r3);\n goto L_0x005c;\n L_0x0139:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mSrcType;\n r3 = com.autochips.inputsource.InputSourceClient.this;\n r3 = r3.mCBM;\n if (r2 != r9) goto L_0x014e;\n L_0x0143:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r3 = 2;\n r2.setDestination(r3);\n L_0x0149:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2.mCbmCtlStatus = r7;\n goto L_0x00e9;\n L_0x014e:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mSrcType;\n r3 = com.autochips.inputsource.InputSourceClient.this;\n r3 = r3.mCBM;\n r3 = 10;\n if (r2 != r3) goto L_0x0167;\n L_0x015a:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r3 = 2;\n r2.setDestination(r3);\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r3 = 0;\n r2.setDisplay(r3);\n goto L_0x0149;\n L_0x0167:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r3 = 0;\n r2.setDisplay(r3);\n goto L_0x0149;\n L_0x016e:\n r2 = 2;\n if (r2 != r1) goto L_0x00e9;\n L_0x0171:\n r2 = \"InputSourceClient\";\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"mCBMActionListener CBM_STOP All mDestType:\";\n r3 = r3.append(r4);\n r4 = com.autochips.inputsource.InputSourceClient.this;\n r4 = r4.mDestType;\n r3 = r3.append(r4);\n r3 = r3.toString();\n android.util.Log.i(r2, r3);\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mCbmCtlStatus;\n if (r2 != r8) goto L_0x01b1;\n L_0x0193:\n r2 = \"InputSourceClient\";\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"mCBMActionListener Already STOP_REAR mDestType:\";\n r3 = r3.append(r4);\n r4 = com.autochips.inputsource.InputSourceClient.this;\n r4 = r4.mDestType;\n r3 = r3.append(r4);\n r3 = r3.toString();\n android.util.Log.i(r2, r3);\n goto L_0x005c;\n L_0x01b1:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mSrcType;\n r3 = com.autochips.inputsource.InputSourceClient.this;\n r3 = r3.mCBM;\n if (r2 != r9) goto L_0x01c6;\n L_0x01bb:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2.setDestination(r6);\n L_0x01c0:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2.mCbmCtlStatus = r8;\n goto L_0x00e9;\n L_0x01c6:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mSrcType;\n r3 = com.autochips.inputsource.InputSourceClient.this;\n r3 = r3.mCBM;\n r3 = 10;\n if (r2 != r3) goto L_0x01de;\n L_0x01d2:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2.setDestination(r6);\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r3 = 0;\n r2.setRearDisplay(r3);\n goto L_0x01c0;\n L_0x01de:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r3 = 0;\n r2.setRearDisplay(r3);\n goto L_0x01c0;\n L_0x01e5:\n r2 = \"InputSourceClient\";\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"mCBMActionListener CBM_START mSrcType is !\";\n r3 = r3.append(r4);\n r4 = com.autochips.inputsource.InputSourceClient.this;\n r4 = r4.mSrcType;\n r3 = r3.append(r4);\n r3 = r3.toString();\n android.util.Log.i(r2, r3);\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mCbmCtlStatus;\n if (r2 != 0) goto L_0x0225;\n L_0x0207:\n r2 = \"InputSourceClient\";\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"mCBMActionListener Already Started mDestType:\";\n r3 = r3.append(r4);\n r4 = com.autochips.inputsource.InputSourceClient.this;\n r4 = r4.mDestType;\n r3 = r3.append(r4);\n r3 = r3.toString();\n android.util.Log.i(r2, r3);\n goto L_0x005c;\n L_0x0225:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mCurrentStatus;\n if (r2 != r6) goto L_0x0238;\n L_0x022b:\n r2 = \"InputSourceClient\";\n r3 = \"mCBMActionListener CBM_START been stoped by other activity in front just return resource\";\n android.util.Log.i(r2, r3);\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2.mCbmCtlStatus = r5;\n goto L_0x005c;\n L_0x0238:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mCbmCtlStatus;\n if (r2 != r6) goto L_0x024e;\n L_0x023e:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2._play();\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2.mCbmCtlStatus = r5;\n L_0x0247:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2.notifymsg(r8, r6, r1);\n goto L_0x00ee;\n L_0x024e:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mCbmCtlStatus;\n if (r2 != r7) goto L_0x0274;\n L_0x0254:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mSrcType;\n r3 = com.autochips.inputsource.InputSourceClient.this;\n r3 = r3.mCBM;\n if (r2 == r9) goto L_0x026a;\n L_0x025e:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mSrcType;\n r3 = com.autochips.inputsource.InputSourceClient.this;\n r3 = r3.mCBM;\n r3 = 10;\n if (r2 != r3) goto L_0x026f;\n L_0x026a:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2.setDestination(r7);\n L_0x026f:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2.mCbmCtlStatus = r5;\n goto L_0x0247;\n L_0x0274:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mCbmCtlStatus;\n if (r2 != r8) goto L_0x0247;\n L_0x027a:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mSrcType;\n r3 = com.autochips.inputsource.InputSourceClient.this;\n r3 = r3.mCBM;\n if (r2 == r9) goto L_0x0290;\n L_0x0284:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2 = r2.mSrcType;\n r3 = com.autochips.inputsource.InputSourceClient.this;\n r3 = r3.mCBM;\n r3 = 10;\n if (r2 != r3) goto L_0x0295;\n L_0x0290:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2.setDestination(r7);\n L_0x0295:\n r2 = com.autochips.inputsource.InputSourceClient.this;\n r2.mCbmCtlStatus = r5;\n goto L_0x0247;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.autochips.inputsource.InputSourceClient.1.onAction(int, int, int):int\");\n }", "@Override\r\n\tpublic void read() {\n\r\n\t}", "void onCardTypeChange(String type);", "private void comerComestible(Celda c) {\n // TODO implement here\n }", "private void m6597N() {\n C0938a.m5002a(\"SR/SoundRecorder\", \"<popClearDialogBox>\");\n String lowerCase = this.f5399S.mo6173f().getAbsolutePath().toLowerCase();\n if (this.f5419h) {\n C1492b.m7431a((Context) this, (CharSequence) getResources().getString(R.string.phone_mtp_space_expired_smartkey), 1).show();\n this.f5419h = false;\n }\n Intent intent = new Intent(\"com.iqoo.secure.LOW_MEMORY_WARNING\");\n intent.addFlags(268435456);\n intent.putExtra(\"require_size\", 5242880);\n intent.putExtra(\"pkg_name\", getPackageName());\n intent.putExtra(\"extra_loc\", 1);\n intent.putExtra(\"tips_title\", getResources().getString(R.string.manager_title));\n intent.putExtra(\"tips_title_all\", getResources().getString(R.string.unable_to_record));\n try {\n startActivity(intent);\n } catch (Exception unused) {\n Intent intent2 = new Intent();\n intent2.putExtra(\"BBKPhoneCardName\", lowerCase);\n intent2.setComponent(new ComponentName(\"com.android.filemanager\", \"com.android.filemanager.FileManagerActivity\"));\n startActivity(intent2);\n }\n }", "public void credit(){\r\n\t\tSystem.out.println(\"HSBC-- Credit method called from Interface USBank \");\r\n\t}", "@Override\n protected void receiveInfo(GameInfo info) {\n if (!(info instanceof PalaceGameState)) {\n return;\n }\n PalaceGameState state = new PalaceGameState((PalaceGameState) info);\n PalaceSelectCardAction selectCardAction;\n if (state.getTurn() != this.playerNum) {\n return;\n } else {\n sleep(1000); // make the computer \"think\"\n boolean isBigger = false;// variable to check if they have a valid card\n\n //determines if the cards are valid\n if (!(state.getP2Hand().isEmpty()) && !state.getPlayPilePalaceCards().isEmpty()) {\n for (int i = 0; i < state.getP2Hand().size(); i++) {\n if (state.getP2Hand().get(i).getRank() > state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank()) {\n isBigger = true;\n }\n }\n }\n\n //takes pile if they have no hand cards to play\n if (isBigger == false && !(state.getP2Hand().isEmpty())) {\n PalaceTakePileAction take = new PalaceTakePileAction(this);\n Log.d(\"compPlayer\", \"took the pile\");\n this.game.sendAction(take);\n }\n\n //begins searching for a card to select\n PalaceCard cardToSelect = null;\n\n // check in the case when the play pile and their hand are both not empty\n if (!(state.getPlayPilePalaceCards().isEmpty()) && (!(state.getP2Hand().isEmpty()))) {\n\n // while they haven't selected a card or the card they selected is less than the top card\n // another card is selected at random from their hand\n while (cardToSelect == null ||\n (cardToSelect.getRank() <\n (state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank()) &&\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank() >=0)) {\n cardToSelect =\n state.getP2Hand().get((int) (Math.random() * state.getP2Hand().size()));\n }\n\n // selects a card when they are playing from their top cards\n } else if (state.getP2Hand().isEmpty() && (!(state.getP2TopPalaceCards().isEmpty()))) {\n\n //pick any random card if the play pile is empty\n if (state.getPlayPilePalaceCards().isEmpty()) {\n cardToSelect =\n state.getP2TopPalaceCards().\n get((int) (Math.random() * state.getP2TopPalaceCards().size()));\n }\n\n //play pile is not empty so find a valid card\n else {\n\n //checks to see if there is a valid card\n for (int i = 0; i < state.getP2TopPalaceCards().size(); i++) {\n if (state.getP2TopPalaceCards().get(i).getRank() >\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank() &&\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank() >= 0) {\n isBigger = true;\n }\n }\n\n //finds a random valid card because there is one that is valid\n if (isBigger) {\n while (cardToSelect == null ||\n (cardToSelect.getRank() <\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).\n getRank() &&\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).\n getRank() >= 0)) {\n cardToSelect =\n state.getP2TopPalaceCards().\n get((int) (Math.random() * state.\n getP2TopPalaceCards().size()));\n }\n }\n\n //no card to be played so take the pile\n else {\n PalaceTakePileAction take = new PalaceTakePileAction(this);\n Log.d(\"compPlayer\", \"took the pile\");\n this.game.sendAction(take);\n }\n }\n }\n\n //they only have bottom cards left, all are valid to be played so pick a random one\n else if (state.getP2TopPalaceCards().isEmpty()&&state.getP2Hand().isEmpty()) {\n cardToSelect =\n state.getP2BottomPalaceCards().\n get((int) (Math.random() * state.getP2BottomPalaceCards().size()));\n }\n\n //the play pile is empty and they only have hand cards, pick one at random\n else {\n cardToSelect =\n state.getP2Hand().get((int) (Math.random() * state.getP2Hand().size()));\n }\n\n //create and send the select card action with the selected card\n selectCardAction = new PalaceSelectCardAction(this, cardToSelect,\n state.getSelectedPalaceCards());\n this.game.sendAction(selectCardAction);\n\n //rerun selectCardAction if there are multiple of the same card\n if (!state.getP2Hand().isEmpty()) {\n for (int i = 0; i < state.getP2Hand().size(); i++) {\n if (state.getP2Hand().get(i).getRank() == cardToSelect.getRank() &&\n !cardToSelect.equals(state.getP2Hand().get(i))) {\n selectCardAction = new PalaceSelectCardAction(this, state.getP2Hand().get(i),\n state.getSelectedPalaceCards());\n this.game.sendAction(selectCardAction);\n }\n }\n }\n else if (state.getP2Hand().isEmpty() && !state.getP2TopPalaceCards().isEmpty()) {\n for (int i = 0; i < state.getP2Hand().size(); i++) {\n if (state.getP2Hand().get(i).getRank() == cardToSelect.getRank() &&\n !cardToSelect.equals(state.getP2TopPalaceCards().get(i))) {\n selectCardAction = new PalaceSelectCardAction(this, state.getP2TopPalaceCards().get(i),\n state.getSelectedPalaceCards());\n this.game.sendAction(selectCardAction);\n }\n }\n }\n\n //creates and sends the playCardAction\n PalacePlayCardAction playCardAction = new PalacePlayCardAction(this);\n this.game.sendAction(playCardAction);\n }\n\n\n }", "@Override\r\n public void onDeviceConnecting(GenericDevice mDeviceHolder,\r\n PDeviceHolder innerDevice) {\n\r\n }", "public void onRead(BarcodeData barcodeData) {\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_card_info);\n\n initViews();\n\n readCard();\n }", "@Override\n\t\t\t\tpublic void onClick() {\n\t\t\t\t\tP2PHandler.getInstance().setSdFormat(contact.contactId, contact.contactPassword, sdId);\n\t\t\t\t\tLog.e(\"SDcardId\", \"SDcardId\"+SDcardId);\n\t\t\t\t}", "private void setListener2(BluetoothReader reader) {\n mBluetoothReader2\n .setOnAuthenticationCompleteListener(new OnAuthenticationCompleteListener() {\n\n @Override\n public void onAuthenticationComplete(\n BluetoothReader bluetoothReader, final int errorCode) {\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (errorCode == BluetoothReader.ERROR_SUCCESS) {\n mTxtAuthentication\n .setText(\"Authentication Success!\");\n mEditApdu.setText(\"FF CA 00 00 00\");\n mAuthentication.setEnabled(false);\n } else {\n mTxtAuthentication\n .setText(\"Authentication Failed!\");\n }\n }\n });\n }\n\n });\n\n /* Wait for receiving ATR string. */\n mBluetoothReader2\n .setOnAtrAvailableListener(new OnAtrAvailableListener() {\n\n @Override\n public void onAtrAvailable(BluetoothReader bluetoothReader,\n final byte[] atr, final int errorCode) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (atr == null) {\n mTxtATR.setText(getErrorString(errorCode));\n } else {\n mTxtATR.setText(Utils.toHexString(atr));\n }\n }\n });\n }\n\n });\n\n /* Wait for power off response. */\n mBluetoothReader2\n .setOnCardPowerOffCompleteListener(new OnCardPowerOffCompleteListener() {\n\n @Override\n public void onCardPowerOffComplete(\n BluetoothReader bluetoothReader, final int result) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mTxtATR.setText(getErrorString(result));\n }\n });\n }\n\n });\n\n /* Wait for response APDU. */\n mBluetoothReader2\n .setOnResponseApduAvailableListener(new OnResponseApduAvailableListener() {\n\n @Override\n public void onResponseApduAvailable(\n BluetoothReader bluetoothReader, final byte[] apdu,\n final int errorCode) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mTxtResponseApdu.setText(getResponseString(\n apdu, errorCode));\n // InnerTes(\"tes\");\n }\n });\n }\n\n });\n mBluetoothReader2\n .setOnResponseApduAvailableListener(new OnResponseApduAvailableListener() {\n\n @Override\n public void onResponseApduAvailable(\n BluetoothReader bluetoothReader, final byte[] apdu,\n final int errorCode) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mTxtScan.setText(getResponseString(\n apdu, errorCode));\n String uid = mTxtScan.getText().toString();\n uid_final= uid;\n final String uid2=mTxtScan.getText().toString();\n /*** Kirim Variabel String uid ke ChildviewHolder **/\n /** code start here **/\n Tes tes = new Tes() {\n\n\n @Override\n public String onClickTes(String uid) {\n return null;\n }\n\n @Override\n public String getUid() {\n return mTxtScan.getText().toString();\n\n }\n };\n tes.onClickTes(uid);\n uid_final = tes.getUid();\n Log.d(\"uidFinal_listener\",\" \"+uid_final);\n requestUid(tes);\n\n\n //uid_final=\"tes\";\n // InnerTes(\"tes\");\n// rvTxtScan.setText(getResponseString(\n// apdu, errorCode));\n getInfoCard(uid);\n }\n\n\n });\n\n\n\n }\n\n });\n\n\n /* Wait for escape command response. */\n mBluetoothReader2\n .setOnEscapeResponseAvailableListener(new OnEscapeResponseAvailableListener() {\n\n @Override\n public void onEscapeResponseAvailable(\n BluetoothReader bluetoothReader,\n final byte[] response, final int errorCode) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mTxtEscapeResponse.setText(getResponseString(\n response, errorCode));\n }\n });\n }\n\n });\n\n /* Wait for device info available. */\n mBluetoothReader2\n .setOnDeviceInfoAvailableListener(new OnDeviceInfoAvailableListener() {\n\n @Override\n public void onDeviceInfoAvailable(\n BluetoothReader bluetoothReader, final int infoId,\n final Object o, final int status) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (status != BluetoothGatt.GATT_SUCCESS) {\n Toast.makeText(ReaderActivity.this,\n \"Failed to read device info!\",\n Toast.LENGTH_SHORT).show();\n return;\n }\n switch (infoId) {\n case BluetoothReader.DEVICE_INFO_SYSTEM_ID: {\n // mTxtSystemId.setText(Utils.toHexString((byte[]) o));\n }\n break;\n case BluetoothReader.DEVICE_INFO_MODEL_NUMBER_STRING:\n // mTxtModelNo.setText((String) o);\n break;\n case BluetoothReader.DEVICE_INFO_SERIAL_NUMBER_STRING:\n // mTxtSerialNo.setText((String) o);\n break;\n case BluetoothReader.DEVICE_INFO_FIRMWARE_REVISION_STRING:\n // mTxtFirmwareRev.setText((String) o);\n break;\n case BluetoothReader.DEVICE_INFO_HARDWARE_REVISION_STRING:\n // mTxtHardwareRev.setText((String) o);\n break;\n case BluetoothReader.DEVICE_INFO_MANUFACTURER_NAME_STRING:\n //mTxtManufacturerName.setText((String) o);\n break;\n default:\n break;\n }\n }\n });\n }\n\n });\n\n /* Wait for battery level available. */\n if (mBluetoothReader2 instanceof Acr1255uj1Reader) {\n ((Acr1255uj1Reader) mBluetoothReader2)\n .setOnBatteryLevelAvailableListener(new OnBatteryLevelAvailableListener() {\n\n @Override\n public void onBatteryLevelAvailable(\n BluetoothReader bluetoothReader,\n final int batteryLevel, int status) {\n Log.i(TAG, \"mBatteryLevelListener data: \" + batteryLevel);\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n // mTxtBatteryLevel2.setText(getBatteryLevelString(batteryLevel));\n }\n });\n\n }\n\n });\n }\n\n /* Handle on battery status available. */\n if (mBluetoothReader2 instanceof Acr3901us1Reader) {\n ((Acr3901us1Reader) mBluetoothReader2)\n .setOnBatteryStatusAvailableListener(new OnBatteryStatusAvailableListener() {\n\n @Override\n public void onBatteryStatusAvailable(\n BluetoothReader bluetoothReader,\n final int batteryStatus, int status) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n // mTxtBatteryStatus2.setText(getBatteryStatusString(batteryStatus));\n }\n });\n }\n\n });\n }\n\n /* Handle on slot status available. */\n mBluetoothReader2\n .setOnCardStatusAvailableListener(new OnCardStatusAvailableListener() {\n\n @Override\n public void onCardStatusAvailable(\n BluetoothReader bluetoothReader,\n final int cardStatus, final int errorCode) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (errorCode != BluetoothReader.ERROR_SUCCESS) {\n mTxtSlotStatus\n .setText(getErrorString(errorCode));\n } else {\n mTxtSlotStatus\n .setText(getCardStatusString(cardStatus));\n }\n }\n });\n }\n\n });\n\n mBluetoothReader2\n .setOnEnableNotificationCompleteListener(new OnEnableNotificationCompleteListener() {\n\n @Override\n public void onEnableNotificationComplete(\n BluetoothReader bluetoothReader, final int result) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (result != BluetoothGatt.GATT_SUCCESS) {\n /* Fail */\n Toast.makeText(\n ReaderActivity.this,\n \"The device is unable to set notification!\",\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(ReaderActivity.this,\n \"The device is ready to use!\",\n Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n\n });\n }", "@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent intent) {\n\n if (resultCode == RESULT_CANCELED) {\n Toast.makeText(this, \"Cancelled\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n Map<String, Object> data = null;\n if (requestCode == QR_CODE_SCAN_REQUEST_CODE) {\n IntentResult scanResult = IntentIntegrator.parseActivityResult(\n requestCode, resultCode, intent);\n if (scanResult != null && scanResult.getContents() != null) {\n Yaml yaml = new Yaml();\n String scanned_data = scanResult.getContents().toString();\n data = (Map<String, Object>) yaml.load(scanned_data);\n }\n }\n else if (requestCode == NFC_TAG_SCAN_REQUEST_CODE && resultCode == RESULT_OK) {\n if (intent.hasExtra(\"tag_data\")) {\n data = (Map<String, Object>) intent.getExtras().getSerializable(\"tag_data\");\n }\n }\n else {\n Log.w(\"Remocon\", \"Unknown activity request code: \" + requestCode);\n return;\n }\n\n if (data == null) {\n Toast.makeText(this, \"Scan failed\", Toast.LENGTH_SHORT).show();\n }\n else {\n try {\n Log.d(\"Remocon\", \"master chooser OBJECT: \" + data.toString());\n addMaster(new MasterId(data), false);\n } catch (Exception e) {\n Toast.makeText(this, \"invalid rocon master description: \" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n }", "private void getIntentData() {\n\t\ttry{\n\t\t\tIN_CATEGORYID = getIntent().getStringExtra(CATEGORY_ID) == null ? \"0\" : getIntent().getStringExtra(CATEGORY_ID);\n\t\t\tIN_ARTICLENAME = getIntent().getStringExtra(ARTICLENAME) == null ? \"\" : getIntent().getStringExtra(ARTICLENAME) ;\n\t\t\tIN_ARTICLEID = getIntent().getStringExtra(ARTICLEID) == null ? \"\" : getIntent().getStringExtra(ARTICLEID);\n\t\t}catch(Exception e){\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}", "public void carDetails() {\n\t\t\r\n\t}", "public CardRequest() {\r\n card = new MSRData(); // an empty one\r\n }", "private void readCardForSubStation() {\n\t\tif(!link.hasNextLine()) {\n\t\t\tcontroller.printError(\"Errore di Comunicazione\", \"Il seggio ausiliario \"+ip.getHostAddress()+\" non ha inviato il numero della card.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tMessage request, response = new Message();\n\t\tString card;\n\t\tPerson voter = null;\n\t\ttry {\n\t\t\trequest = (Message) Message.fromB64(link.read(), \"seggio ausiliario\");\n\t\t\t\n\t\t\tString[] required = {\"card\"};\n\t\t\tClass<?>[] types = {String.class};\n\t\t\trequest.verifyMessage(Protocol.processCardReq, required, types, \"seggio ausiliario\");\n\t\t\tcard = request.getElement(\"card\");\n\t\t\t\n\t\t\t//Si recupera la postazione associata alla card, se esiste\n\t\t\tint postIdx = ((Controller) controller).getPostIdx(card);\n\t\t\t\n\t\t\t//Si verifica se il badge era già associato ad una postazione o se sta venendo usato per crearne una nuova\n\t\t\tif (postIdx == -1) {\n\t\t\t\trequired = new String[]{\"card\", \"voter\"};\n\t\t\t\ttypes = new Class<?>[]{String.class, Person.class};\n\t\t\t\t\n\t\t\t\trequest.verifyMessage(Protocol.processCardReq, required, types, \"seggio ausiliario\");\n\t\t\t\tvoter = request.getElement(\"voter\");\n\t\t\t}\n\t\t\t\n\t\t\tresponse = ((Controller) controller).readCardForSubStation(card, voter);\n\t\t\t\n\t\t} catch (PEException e) {\n\t\t\tresponse.setValue(Protocol.processCardNack);\n\t\t\tresponse.addError(e.getMessage());\n\t\t}\n\t\t\n\t\tlink.write(response.toB64());\n\t}", "@Override\n public void onChange(boolean selfChange) {\n super.onChange(selfChange);\n int[] bytesAndStatus = getBytesAndStatus(tag_id);\n if (bytesAndStatus[0] == -1 || bytesAndStatus[1] == -1) {\n hdHandler.sendMessage(hdHandler.obtainMessage(0, 0,\n -1));\n } else {\n hdHandler.sendMessage(hdHandler.obtainMessage(0,\n bytesAndStatus[0], bytesAndStatus[1]));\n }\n }", "public Card getCard() {\n return this.card;\n }", "void playMonumentCard();" ]
[ "0.62345886", "0.61164933", "0.58031", "0.579511", "0.579365", "0.5755046", "0.5727988", "0.56007326", "0.5598741", "0.55706125", "0.55188394", "0.54928774", "0.54592013", "0.54276115", "0.54265904", "0.5417064", "0.5412473", "0.5391149", "0.53835154", "0.5381555", "0.53811437", "0.53772974", "0.5376", "0.53637725", "0.53590894", "0.53507197", "0.53434575", "0.5337251", "0.53359693", "0.53350693", "0.53349036", "0.5327689", "0.53179663", "0.53170145", "0.53048015", "0.5298313", "0.5295021", "0.52917224", "0.528112", "0.5279262", "0.52735263", "0.52707887", "0.52683914", "0.5257026", "0.52512145", "0.5240021", "0.5238461", "0.52374905", "0.5224853", "0.5222967", "0.52178067", "0.52177995", "0.5216887", "0.5215637", "0.5212625", "0.52087754", "0.5204692", "0.52039427", "0.51998925", "0.5196286", "0.5196286", "0.5195661", "0.5189052", "0.51853466", "0.5185271", "0.5183279", "0.5182286", "0.5180411", "0.51775515", "0.5176893", "0.5175902", "0.5174421", "0.51644284", "0.51613057", "0.51585275", "0.5144511", "0.51413906", "0.51409453", "0.51397425", "0.51392365", "0.51361305", "0.51337004", "0.5132778", "0.51265234", "0.5120559", "0.511977", "0.5117315", "0.51064223", "0.5105955", "0.5105441", "0.50979817", "0.50969946", "0.50957054", "0.5087237", "0.5086611", "0.5084971", "0.50834835", "0.5081709", "0.50773704", "0.5076556", "0.50761247" ]
0.0
-1
/ create the card image with inside a rounded rect
private void decorateBitmap() { RectF roundedRect = new RectF(2, 2, mBitmap.getWidth() - 2, mBitmap.getHeight() - 2); float cornerRadius = mBitmap.getHeight() * CORNER_RADIUS_SIZE; // Alpha canvas with white rounded rect Bitmap maskBitmap = Bitmap.createBitmap(mBitmap.getWidth(), mBitmap.getHeight(), Bitmap.Config.ARGB_8888); Canvas maskCanvas = new Canvas(maskBitmap); maskCanvas.drawColor(Color.TRANSPARENT); Paint maskPaint = new Paint(Paint.ANTI_ALIAS_FLAG); maskPaint.setColor(Color.BLACK); maskPaint.setStyle(Paint.Style.FILL); maskCanvas.drawRoundRect(roundedRect, cornerRadius, cornerRadius, maskPaint); Paint paint = new Paint(); paint.setFilterBitmap(false); // Draw mask onto mBitmap Canvas canvas = new Canvas(mBitmap); paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN)); canvas.drawBitmap(maskBitmap, 0, 0, paint); // Now re-use the above bitmap to do a shadow. paint.setXfermode(null); maskBitmap.recycle(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "for (Card c : humanPlayerHand.getAllCards) {\n StackPane cardGrouping = new StackPane; // used to center the rectangle and text\n Rectangle card = new Rectangle(width, height); // where width and height are defined elsewhere\n card.setArcWidth(arcSize); // where arcSize is defined elsewhere\n card.setArcHeight(arcSize);\n card.setFill(c.getSuit); // color will be based on suit but implementation will differ slightly - different method will pull the colors matched to suits from data file\n cardGrouping.add(card);\n Text cardText = new Text();\n\n if (c.getValue < 10) {\n cardText.setText(c.getValue);\n }\n // also need cases for special cards\n cardGrouping.add(cardText);\n\n HBox.add(cardGrouping);\n }", "public HBox createRoomCard(Room r) {\n try {\n // load the 'skeleton of a new card\n FXMLLoader loader = new FXMLLoader();\n URL xmlUrl = getClass().getResource(\"/RoomCard.fxml\");\n loader.setLocation(xmlUrl);\n\n HBox newCard = loader.load();\n\n Image roomImage = null;\n try {\n // get the room image\n roomImage = new Image(\"images/\" + r.getRoomPhoto().get());\n } catch (Exception e) {\n logger.log(Level.SEVERE, e.toString());\n // load placeholder instead\n roomImage = new Image(\"images/placeholder.png\");\n }\n\n\n // use lookup to retrieve Nodes by their id and set their content\n ImageView image = ((ImageView) newCard.lookup(\"#image\"));\n image.setImage(roomImage);\n // set the correct width\n image.setFitWidth(300);\n\n Building b = buildingList.stream()\n .filter(x -> x.getBuildingId().get() == r.getRoomBuilding().get())\n .collect(Collectors.toList()).get(0);\n\n ((Text) newCard.lookup(\"#idText\")).setText(String.valueOf(r.getRoomId().get()));\n ((Text) newCard.lookup(\"#titleText\")).setText(r.getRoomName().get());\n ((Text) newCard.lookup(\"#buildingText\")).setText(\"Building: \" + b.getBuildingName().get());\n ((Text) newCard.lookup(\"#capacityText\")).setText(\"Capacity: \" + r.getRoomCapacity().get());\n ((Text) newCard.lookup(\"#descriptionText\")).setText(\"Description: \" + r.getRoomDescription().get());\n\n // set mouse clicked event on card (to redirect to room view)\n newCard.setOnMouseClicked(event -> {\n try {\n cardClicked(event);\n } catch (Exception e) {\n e.printStackTrace();\n }\n });\n\n // set space between the cards\n VBox.setMargin(newCard, new Insets(0, 0, 70, 0));\n\n return newCard;\n } catch (Exception e) {\n logger.log(Level.SEVERE, e.toString());\n }\n return null;\n }", "private void drawCard(String path, Card card, Graphics g, int x, int y) throws IOException{\n\t\t ImageIcon img;\n\t\t\t img = new ImageIcon(ImageIO.read(new File(path+card.toString()+\".png\")));\n\t\t\t Image card1 = img.getImage();\n\t\t\t Image card1New = card1.getScaledInstance(45, 65, java.awt.Image.SCALE_SMOOTH);\n\t\t\t ImageIcon card1Icon = new ImageIcon(card1New);\n\t\t\t card1Icon.paintIcon(this, g, x, y);\n\t }", "public CardFigure() {\n setAlpha(30);\n setBorder(new MarginBorder(1));\n setBackgroundColor(ColorConstants.lightGray);\n setOpaque(false);\n }", "public void roundedRect(ShapeRenderer sr, float x, float y, float width, float height, float radius) {\n if(radius <= 0) {\n sr.rect(x, y, width, height);\n } else {\n // Central rectangle\n sr.rect(x + radius, y + radius, width - 2 * radius, height - 2 * radius);\n\n // Four side rectangles, in clockwise order\n sr.rect(x + radius, y, width - 2 * radius, radius);\n sr.rect(x + width - radius, y + radius, radius, height - 2 * radius);\n sr.rect(x + radius, y + height - radius, width - 2 * radius, radius);\n sr.rect(x, y + radius, radius, height - 2 * radius);\n\n // Four arches, clockwise too\n sr.arc(x + radius, y + radius, radius, 180f, 90f);\n sr.arc(x + width - radius, y + radius, radius, 270f, 90f);\n sr.arc(x + width - radius, y + height - radius, radius, 0f, 90f);\n sr.arc(x + radius, y + height - radius, radius, 90f, 90f);\n }\n }", "private void paintTheImage() {\n SPainter bruhmoment = new SPainter(\"Kanizsa Square\" ,400,400);\n\n SCircle dot = new SCircle(75);\n paintBlueCircle(bruhmoment,dot);\n paintRedCircle(bruhmoment,dot);\n paintGreenCircles(bruhmoment,dot);\n\n SSquare square= new SSquare(200);\n paintWhiteSquare(bruhmoment,square);\n\n\n }", "private void createCardDeck(FrameLayout deckPos) {\n // create drawables for normal cards BLUE\n /*Drawable blue_0 = this.appContext.getResources().getDrawable(R.drawable.blue_0);\n Drawable blue_1 = this.appContext.getResources().getDrawable(R.drawable.blue_1);\n Drawable blue_2 = this.appContext.getResources().getDrawable(R.drawable.blue_2);\n Drawable blue_3 = this.appContext.getResources().getDrawable(R.drawable.blue_3);\n Drawable blue_4 = this.appContext.getResources().getDrawable(R.drawable.blue_4);\n Drawable blue_5 = this.appContext.getResources().getDrawable(R.drawable.blue_5);\n Drawable blue_6 = this.appContext.getResources().getDrawable(R.drawable.blue_6);\n Drawable blue_7 = this.appContext.getResources().getDrawable(R.drawable.blue_7);\n Drawable blue_8 = this.appContext.getResources().getDrawable(R.drawable.blue_8);\n Drawable blue_9 = this.appContext.getResources().getDrawable(R.drawable.blue_9);\n // create drawables for special cards BLUE\n Drawable blue_skip = this.appContext.getResources().getDrawable(R.drawable.blue_skip);\n Drawable blue_plus2 = this.appContext.getResources().getDrawable(R.drawable.blue_plus2);\n Drawable blue_turn = this.appContext.getResources().getDrawable(R.drawable.blue_turn);\n\n // create drawables for normal cards RED\n Drawable red_0 = this.appContext.getResources().getDrawable(R.drawable.red_0);\n Drawable red_1 = this.appContext.getResources().getDrawable(R.drawable.red_1);\n Drawable red_2 = this.appContext.getResources().getDrawable(R.drawable.red_2);\n Drawable red_3 = this.appContext.getResources().getDrawable(R.drawable.red_3);\n Drawable red_4 = this.appContext.getResources().getDrawable(R.drawable.red_4);\n Drawable red_5 = this.appContext.getResources().getDrawable(R.drawable.red_5);\n Drawable red_6 = this.appContext.getResources().getDrawable(R.drawable.red_6);\n Drawable red_7 = this.appContext.getResources().getDrawable(R.drawable.red_7);\n Drawable red_8 = this.appContext.getResources().getDrawable(R.drawable.red_8);\n Drawable red_9 = this.appContext.getResources().getDrawable(R.drawable.red_9);\n // create drawables for special cards red\n Drawable red_skip = this.appContext.getResources().getDrawable(R.drawable.red_skip);\n Drawable red_plus2 = this.appContext.getResources().getDrawable(R.drawable.red_plus2);\n Drawable red_turn = this.appContext.getResources().getDrawable(R.drawable.red_turn);\n\n // create drawables for normal cards GREEN\n Drawable green_0 = this.appContext.getResources().getDrawable(R.drawable.green_0);\n Drawable green_1 = this.appContext.getResources().getDrawable(R.drawable.green_1);\n Drawable green_2 = this.appContext.getResources().getDrawable(R.drawable.green_2);\n Drawable green_3 = this.appContext.getResources().getDrawable(R.drawable.green_3);\n Drawable green_4 = this.appContext.getResources().getDrawable(R.drawable.green_4);\n Drawable green_5 = this.appContext.getResources().getDrawable(R.drawable.green_5);\n Drawable green_6 = this.appContext.getResources().getDrawable(R.drawable.green_6);\n Drawable green_7 = this.appContext.getResources().getDrawable(R.drawable.green_7);\n Drawable green_8 = this.appContext.getResources().getDrawable(R.drawable.green_8);\n Drawable green_9 = this.appContext.getResources().getDrawable(R.drawable.green_9);\n // create drawables for special cards GREEN\n Drawable green_skip = this.appContext.getResources().getDrawable(R.drawable.green_skip);\n Drawable green_plus2 = this.appContext.getResources().getDrawable(R.drawable.green_plus2);\n Drawable green_turn = this.appContext.getResources().getDrawable(R.drawable.green_turn);\n\n // create drawables for normal cards YELLOW\n Drawable yellow_0 = this.appContext.getResources().getDrawable(R.drawable.yellow_0);\n Drawable yellow_1 = this.appContext.getResources().getDrawable(R.drawable.yellow_1);\n Drawable yellow_2 = this.appContext.getResources().getDrawable(R.drawable.yellow_2);\n Drawable yellow_3 = this.appContext.getResources().getDrawable(R.drawable.yellow_3);\n Drawable yellow_4 = this.appContext.getResources().getDrawable(R.drawable.yellow_4);\n Drawable yellow_5 = this.appContext.getResources().getDrawable(R.drawable.yellow_5);\n Drawable yellow_6 = this.appContext.getResources().getDrawable(R.drawable.yellow_6);\n Drawable yellow_7 = this.appContext.getResources().getDrawable(R.drawable.yellow_7);\n Drawable yellow_8 = this.appContext.getResources().getDrawable(R.drawable.yellow_8);\n Drawable yellow_9 = this.appContext.getResources().getDrawable(R.drawable.yellow_9);\n // create drawables for special cards YELLOW\n Drawable yellow_skip = this.appContext.getResources().getDrawable(R.drawable.yellow_skip);\n Drawable yellow_plus2 = this.appContext.getResources().getDrawable(R.drawable.yellow_plus2);\n Drawable yellow_turn = this.appContext.getResources().getDrawable(R.drawable.yellow_turn);\n\n // create drawables for special cards & backside\n Drawable color_change = this.appContext.getResources().getDrawable(R.drawable.color_change);\n Drawable color_change_plus4 = this.appContext.getResources().getDrawable(R.drawable.color_change_plus4);*/\n Drawable card_back = this.appContext.getResources().getDrawable(R.drawable.card_back);\n\n\n // blue\n // 0 only once\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_0), card_back, \"Blue 0\", \"\", \"0\", \"Blue\"));\n for (int twice = 0; twice < 2; twice++) {\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_1), card_back, \"Blue 1\", \"\", \"1\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_2), card_back, \"Blue 2\", \"\", \"2\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_3), card_back, \"Blue 3\", \"\", \"3\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_4), card_back, \"Blue 4\", \"\", \"4\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_5), card_back, \"Blue 5\", \"\", \"5\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_6), card_back, \"Blue 6\", \"\", \"6\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_7), card_back, \"Blue 7\", \"\", \"7\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_8), card_back, \"Blue 8\", \"\", \"8\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_9), card_back, \"Blue 9\", \"\", \"9\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_skip), card_back, \"Blue Skip\", \"\", \"SKIP\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_turn), card_back, \"Blue Turn\", \"\", \"TURN\", \"Blue\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.blue_plus2), card_back, \"Blue Plus 2\", \"\", \"PLUS 2\", \"Blue\"));\n }\n\n // red\n // 0 only once\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_0), card_back, \"red 0\", \"\", \"0\", \"Red\"));\n for (int twice = 0; twice < 2; twice++) {\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_1), card_back, \"Red 1\", \"\", \"1\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_2), card_back, \"Red 2\", \"\", \"2\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_3), card_back, \"Red 3\", \"\", \"3\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_4), card_back, \"Red 4\", \"\", \"4\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_5), card_back, \"Red 5\", \"\", \"5\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_6), card_back, \"Red 6\", \"\", \"6\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_7), card_back, \"Red 7\", \"\", \"7\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_8), card_back, \"Red 8\", \"\", \"8\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_9), card_back, \"Red 9\", \"\", \"9\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_skip), card_back, \"Red Skip\", \"\", \"SKIP\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_turn), card_back, \"Red Turn\", \"\", \"TURN\", \"Red\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.red_plus2), card_back, \"Red Plus 2\", \"\", \"PLUS 2\", \"Red\"));\n }\n\n // green\n // 0 only once\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_0), card_back, \"Green 0\", \"\", \"0\", \"Green\"));\n for (int twice = 0; twice < 2; twice++) {\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_1), card_back, \"Green 1\", \"\", \"1\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_2), card_back, \"Green 2\", \"\", \"2\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_3), card_back, \"Green 3\", \"\", \"3\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_4), card_back, \"Green 4\", \"\", \"4\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_5), card_back, \"Green 5\", \"\", \"5\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_6), card_back, \"Green 6\", \"\", \"6\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_7), card_back, \"Green 7\", \"\", \"7\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_8), card_back, \"Green 8\", \"\", \"8\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_9), card_back, \"Green 9\", \"\", \"9\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_skip), card_back, \"Green Skip\", \"\", \"SKIP\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_turn), card_back, \"Green Turn\", \"\", \"TURN\", \"Green\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.green_plus2), card_back, \"Green Plus 2\", \"\", \"PLUS 2\", \"Green\"));\n }\n\n // yellow\n // 0 only once\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_0), card_back, \"Yellow 0\", \"\", \"0\", \"Yellow\"));\n for (int twice = 0; twice < 2; twice++) {\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_1), card_back, \"Yellow 1\", \"\", \"1\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_2), card_back, \"Yellow 2\", \"\", \"2\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_3), card_back, \"Yellow 3\", \"\", \"3\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_4), card_back, \"Yellow 4\", \"\", \"4\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_5), card_back, \"Yellow 5\", \"\", \"5\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_6), card_back, \"Yellow 6\", \"\", \"6\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_7), card_back, \"Yellow 7\", \"\", \"7\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_8), card_back, \"Yellow 8\", \"\", \"8\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_9), card_back, \"Yellow 9\", \"\", \"9\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_skip), card_back, \"Yellow Skip\", \"\", \"SKIP\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_turn), card_back, \"Yellow Turn\", \"\", \"TURN\", \"Yellow\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.yellow_plus2), card_back, \"Yellow Plus 2\", \"\", \"PLUS 2\", \"Yellow\"));\n }\n\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.color_change), card_back, \"Color Change\", \"\", \"COLOR CHANGE\", \"COLOR CHANGE\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.color_change), card_back, \"Color Change\", \"\", \"COLOR CHANGE\", \"COLOR CHANGE\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.color_change), card_back, \"Color Change\", \"\", \"COLOR CHANGE\", \"COLOR CHANGE\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.color_change), card_back, \"Color Change\", \"\", \"COLOR CHANGE\", \"COLOR CHANGE\"));\n\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.color_change_plus4), card_back, \"Color Change Plus 4\", \"\", \"COLOR CHANGE PLUS 4\", \"COLOR CHANGE PLUS 4\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.color_change_plus4), card_back, \"Color Change Plus 4\", \"\", \"COLOR CHANGE PLUS 4\", \"COLOR CHANGE PLUS 4\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.color_change_plus4), card_back, \"Color Change Plus 4\", \"\", \"COLOR CHANGE PLUS 4\", \"COLOR CHANGE PLUS 4\"));\n this.cards.add(new UnoCard(this.appContext, deckPos, new Point(20, 20), this.appContext.getResources().getDrawable(R.drawable.color_change_plus4), card_back, \"Color Change Plus 4\", \"\", \"COLOR CHANGE PLUS 4\", \"COLOR CHANGE PLUS 4\"));\n\n // LOGGING ONLY\n Toast.makeText(this.appContext, \"CardDeck created. Size=\" + this.cards.size(), Toast.LENGTH_LONG).show();\n this.mixDeck();\n // mix it !\n Tools.showToast(\"CardDeck mixed.\", Toast.LENGTH_SHORT);\n }", "public void generateCardImage() {\r\n\t\tString i1 = \"lib/card/\" + cardSuit + \"/\" + cardSuit + \" \"\r\n\t\t\t\t+ cardValue + \".PNG\";\r\n\t\tString i2 = \"lib/card/back2.PNG\";\r\n\t\t\r\n\t\tFile f1 = new File(i1);\r\n\t\tFile f2 = new File(i2);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tcardImage = ImageIO.read(f1);\r\n\t\t\tcardBack = ImageIO.read(f2);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(cardValue);\r\n\t\t\tSystem.out.println(cardSuit);\r\n\t\t}\r\n\t}", "public void drawCard();", "public Image getCardCroupier2() {\n Random rand3 = new Random();\r\n randomNum3 = rand3.nextInt((52 - 1) + 1) + 1;\r\n Image c2 = new Image(\"/Images/cards/Card\" + randomNum3 + \".png\");\r\n return c2;\r\n }", "private void paintTheImage() {\n SPainter klee = new SPainter(\"Red Cross\", 600,600);\n SRectangle rectangle = new SRectangle(500, 100);\n klee.setColor(Color.RED);\n klee.paint(rectangle);\n klee.tl();\n klee.paint(rectangle);\n }", "private Image getCardImage(Card card) {\n return getImage(\"playing-cards/\" + card + \".png\");\n }", "public GreetingCardCanvas(){\n array = new ArrayList<>();\n //Winter background\n array.add(new Square(0, 0, 256, 768,new Color(123, 165, 248)));\n array.add(new Square(0, 700, 256, 68, new Color(255,250,250)));\n //Autumn background\n array.add(new Square(256, 0, 256, 768,new Color(162, 163, 3)));\n array.add(new Square(256, 700, 256, 68, new Color(218,165,32)));\n //Spring background\n array.add(new Square(512, 0, 256, 768,new Color(0, 255, 127)));\n array.add(new Square(512, 700, 256, 68, new Color(124, 252, 0)));\n //Summer background\n array.add(new Square(768, 0, 256, 768,new Color(202,238,249)));\n array.add(new Square(768, 700, 256, 68, new Color(249, 209, 153)));\n //Sun\n array.add(new Sun (974, -50, 100, new Color(255, 170, 0),new Color(255, 195, 77)));\n //Winter Trunk\n array.add(new Trunk(120, 720, new Color(160, 82, 45)));\n //Autumm Trunk\n array.add(new Trunk(376, 720, new Color(160, 82, 45)));\n //Spring Trunk\n array.add(new Trunk(632, 720, new Color(160, 82, 45)));\n //Summer Trunk\n array.add(new Trunk(888, 720, new Color(160, 82, 45)));\n //Summer Leaves\n array.add(new Leaves(968, 600, Color.GREEN));\n //Spring Leaves\n array.add(new Leaves(712, 600, new Color(255, 183, 197)));\n //Autumn Leaves\n array.add(new Leaves(456, 600, new Color(218, 120, 27)));\n //Falling Autumn Leaves\n array.add(new Leaf(440, 650, new Color(218, 120, 27)));\n array.add(new Leaf(456, 700, new Color(218, 120, 27)));\n array.add(new Leaf(300, 680, new Color(218, 120, 27)));\n array.add(new Leaf(356, 710, new Color(218, 120, 27)));\n array.add(new Leaf(330, 650, new Color(218, 120, 27)));\n //Winter Snow\n array.add(new Snow(50, 50, 10, Color.WHITE));\n array.add(new Snow(123, 400, 10, Color.WHITE));\n array.add(new Snow(90, 90, 10, Color.WHITE));\n array.add(new Snow(100, 340, 10, Color.WHITE));\n array.add(new Snow(200, 200, 10, Color.WHITE));\n array.add(new Snow(140, 100, 10, Color.WHITE));\n array.add(new Snow(80, 200, 10, Color.WHITE));\n array.add(new Snow(60, 250, 10, Color.WHITE));\n array.add(new Snow(210, 250, 10, Color.WHITE));\n //Summer Clouds\n array.add(new Cloud(800, 20, 50, Color.WHITE));\n array.add(new Cloud(850, 120, 50, Color.WHITE));\n //Summer Birds\n array.add(new Bird(800, 100, 20, new Color(64,224,208), new Color(224,255,255)));\n array.add(new Bird(900, 70, 30, new Color(218,165,32), new Color(204,204,0)));\n //Beach ball\n array.add(new BeachBall(800, 710, 40));\n //Spring Flowers\n array.add(new Flowers(570, 720, 10, new Color(255, 183, 197)));\n array.add(new Flowers(610, 740, 10, new Color(255, 183, 197)));\n array.add(new Flowers(670, 720, 10, new Color(255, 183, 197)));\n array.add(new Flowers(720, 730, 10, new Color(255, 183, 197)));\n array.add(new Flowers(570, 520, 10, new Color(255, 183, 197)));\n array.add(new Flowers(610, 500, 10, new Color(255, 183, 197)));\n array.add(new Flowers(670, 530, 10, new Color(255, 183, 197)));\n array.add(new Flowers(720, 540, 10, new Color(255, 183, 197)));\n //More Winter Snow\n array.add(new Snow(123, 0, 10, Color.WHITE));\n array.add(new Snow(90, -310, 10, Color.WHITE));\n array.add(new Snow(100, -60, 10, Color.WHITE));\n array.add(new Snow(200, -200, 10, Color.WHITE));\n array.add(new Snow(140, -300, 10, Color.WHITE));\n array.add(new Snow(80, -200, 10, Color.WHITE));\n array.add(new Snow(60, -250, 10, Color.WHITE));\n array.add(new Snow(210, -250, 10, Color.WHITE));\n //The displayed text\n array.add(new Fonts());\n //Spring Clouds\n array.add(new Cloud(544, 20, 50, new Color(239,238,237)));\n array.add(new Cloud(594, 120, 50, new Color(239,238,237)));\n //Autumn Clouds\n array.add(new Cloud(288, 20, 50, new Color(224,223,221)));\n array.add(new Cloud(338, 120, 50, new Color(224,223,221)));\n //Winter Clouds\n array.add(new Cloud(32, 20, 50, new Color(168,167,165)));\n array.add(new Cloud(82, 120, 50, new Color(168,167,165)));\n //Autumn Flowers\n array.add(new AutumnLeaf(314, 720, 20, new Color(176, 101, 75)));\n array.add(new AutumnLeaf(354, 740, 20, new Color(176, 101, 75)));\n array.add(new AutumnLeaf(414, 720, 20, new Color(176, 101, 75)));\n array.add(new AutumnLeaf(464, 730, 20, new Color(176, 101, 75)));\n setPreferredSize(new Dimension(1024, 768));\n \n }", "@Override\n\t\tpublic void drawRoundRect(@NonNull Canvas canvas, @Nullable RectF rect, float rx, float ry,\n\t\t @Nullable Paint paint) {\n\t\t\tif (rect != null) {\n\t\t\t\tfinal float twoRx = rx * 2;\n\t\t\t\tfinal float twoRy = ry * 2;\n\t\t\t\tfinal float innerWidth = rect.width() - twoRx;\n\t\t\t\tfinal float innerHeight = rect.height() - twoRy;\n\t\t\t\tmCornerRect.set(rect.left, rect.top, rect.left + twoRx, rect.top + twoRy);\n\n\t\t\t\tcanvas.drawArc(mCornerRect, 180, 90, true, paint);\n\t\t\t\tmCornerRect.offset(innerWidth, 0);\n\t\t\t\tcanvas.drawArc(mCornerRect, 270, 90, true, paint);\n\t\t\t\tmCornerRect.offset(0, innerHeight);\n\t\t\t\tcanvas.drawArc(mCornerRect, 0, 90, true, paint);\n\t\t\t\tmCornerRect.offset(-innerWidth, 0);\n\t\t\t\tcanvas.drawArc(mCornerRect, 90, 90, true, paint);\n\n\t\t\t\t//draw top and bottom pieces\n\t\t\t\tcanvas.drawRect(rect.left + rx, rect.top, rect.right - rx, rect.top + ry, paint);\n\t\t\t\tcanvas.drawRect(rect.left + rx, rect.bottom - ry, rect.right - rx, rect.bottom,\n\t\t\t\t\t\tpaint);\n\n\t\t\t\t//center\n\t\t\t\tcanvas.drawRect(rect.left, (float) Math.floor(rect.top + ry), rect.right,\n\t\t\t\t\t\t(float) Math.ceil(rect.bottom - ry), paint);\n\t\t\t}\n\t\t}", "public OFImage apply(OFImage image)\r\n {\r\n int dist =image.getWidth()/20;\r\n //int ctr=0;\r\n \tGraphics g2d = image.createGraphics();\r\n g2d.fillRect(image.getWidth() ,image.getHeight(), image.getWidth(), image.getHeight());\r\n g2d.setColor(Color.BLACK);\r\n BasicStroke bs = new BasicStroke(dist);\r\n ((Graphics2D) g2d).setStroke(bs);\r\n for(int i=0;i<image.getWidth(); i+=2*dist){\r\n\r\n g2d.fillRect(i, 0, dist, image.getHeight());\r\n\r\n }\r\n\t\treturn image;\r\n\r\n \r\n }", "public Image getCardCroupier1() {\n Random rand2 = new Random();\r\n randomNum2 = rand2.nextInt((52 - 1) + 1) + 1;\r\n Image c1 = new Image(\"/Images/cards/Card\" + randomNum2 + \".png\");\r\n return c1;\r\n }", "public ImageIcon getTopCardImage() {\r\n return new ImageIcon(validColor + \"_\" + validValue + \".png\");\r\n }", "public void initialize()\r\n {\r\n game = new Blackjack();\r\n \r\n dealerCardList = new ArrayList<ImageShape>(8);\r\n playerCardList = new ArrayList<ImageShape>(8);\r\n \r\n setBackgroundColor(Color.green);\r\n height = getHeight();\r\n width = getWidth();\r\n cardWidth = 72;\r\n cardHeight = 96;\r\n \r\n for (float i = 0; i < 2 * cardHeight; i = i + cardHeight)\r\n {\r\n for (float j = 0; j < cardWidth*4; j = j + cardWidth)\r\n {\r\n RectF rect = new RectF(0.0f, 0.0f, cardWidth, cardHeight);\r\n ImageShape topCardSpace = new ImageShape(\"cardspace\", rect);\r\n topCardSpace.setPosition(j, i);\r\n dealerCardList.add(topCardSpace);\r\n add(topCardSpace);\r\n }\r\n }\r\n \r\n for (float i = height - 2*cardHeight; i < height; i = i + cardHeight)\r\n {\r\n for (float j = 0; j <cardWidth*4; j = j + cardWidth)\r\n {\r\n RectF rect = new RectF(0.0f, 0.0f, cardWidth, cardHeight);\r\n ImageShape bottomCardSpace = new ImageShape(\"cardspace\", rect);\r\n bottomCardSpace.setPosition(j, i);\r\n playerCardList.add(bottomCardSpace);\r\n add(bottomCardSpace);\r\n }\r\n }\r\n }", "void buildRectangles(){\n background(255);\n for(int i=0;i<arr.length;i++){\n noStroke();\n Rect r=new Rect(40+i*80,400,75,-arr[i]*20,color1);\n createRectangle(r,color1);\n }\n }", "private RoundImage img(String imgAddress) {\n return new RoundImage(\"frontend/src/images/books.png\",\"64px\",\"64px\");\n }", "@Override\r\n public final void draw(final Circle s, final BufferedImage paper) {\n\r\n int xc = s.getX();\r\n int yc = s.getY();\r\n int r = s.getRaza();\r\n int x = 0, y = r;\r\n final int trei = 3;\r\n int doi = 2;\r\n int d = trei - doi * r;\r\n while (y >= x) {\r\n if (checkBorder(xc + x, yc + y, paper)) {\r\n paper.setRGB(xc + x, yc + y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - x, yc + y, paper)) {\r\n paper.setRGB(xc - x, yc + y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + x, yc - y, paper)) {\r\n paper.setRGB(xc + x, yc - y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - x, yc - y, paper)) {\r\n paper.setRGB(xc - x, yc - y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + y, yc + x, paper)) {\r\n paper.setRGB(xc + y, yc + x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + y, yc - x, paper)) {\r\n paper.setRGB(xc + y, yc - x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - y, yc + x, paper)) {\r\n paper.setRGB(xc - y, yc + x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - y, yc - x, paper)) {\r\n paper.setRGB(xc - y, yc - x, s.getBorderColor().getRGB());\r\n }\r\n\r\n x++;\r\n if (d > 0) {\r\n y--;\r\n final int patru = 4;\r\n final int zece = 10;\r\n d = d + patru * (x - y) + zece;\r\n } else {\r\n final int patru = 4;\r\n final int sase = 6;\r\n d = d + patru * x + sase;\r\n }\r\n if (checkBorder(xc + x, yc + y, paper)) {\r\n paper.setRGB(xc + x, yc + y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - x, yc + y, paper)) {\r\n paper.setRGB(xc - x, yc + y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + x, yc - y, paper)) {\r\n paper.setRGB(xc + x, yc - y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - x, yc - y, paper)) {\r\n paper.setRGB(xc - x, yc - y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + y, yc + x, paper)) {\r\n paper.setRGB(xc + y, yc + x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + y, yc - x, paper)) {\r\n paper.setRGB(xc + y, yc - x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - y, yc + x, paper)) {\r\n paper.setRGB(xc - y, yc + x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - y, yc - x, paper)) {\r\n paper.setRGB(xc - y, yc - x, s.getBorderColor().getRGB());\r\n }\r\n\r\n }\r\n floodFill(xc, yc, s.getFillColor(), s.getBorderColor(), paper);\r\n }", "public CircularImageView(Context context, AttributeSet attrs, int defStyle) {\n\n super(context, attrs, defStyle);\n setup();\n }", "public void fillRoundRectangle(RectangleShape rectangle, int radius);", "public Image getCardCroupier3() {\n Random rand9 = new Random();\r\n randomNum9 = rand9.nextInt((52 - 1) + 1) + 1;\r\n Image c3 = new Image(\"/Images/cards/Card\" + randomNum9 + \".png\");\r\n return c3;\r\n }", "public TransportationCard(Color c,String imagePath){\n color = c;\n this.imagePath = imagePath;\n }", "@Override\n\tpublic void drawOn(Canvas g, RectF where, boolean cardType) {\t\t\n\t\t// create the paint object\n\n \tPaint p = new Paint();\n \tp.setColor(Color.BLACK);\n \t\n \t//draw appropriate orientation for card based on specified player\n \tBitmap imageToDraw;\n \tif (cardType) imageToDraw = cardImage1;\n \telse imageToDraw = cardImage2;\n \t\n \t// create the source rectangle\n\t\tRect r = new Rect(0,0,imageToDraw.getWidth(),imageToDraw.getHeight());\n\t\t\n\t\t// draw the bitmap into the target rectangle\n\t\tg.drawBitmap(imageToDraw, r, where, p);\n\t}", "public void setRoundedRectangleClip(int x, int y, int width, int height, int radius);", "public void fillRoundRectangle(int x, int y, int width, int height, int radius);", "private void paintCard(Graphics2D g, Card card, int x, int y) {\n if (card != null) {\n g.drawImage(getCardImage(card), x, y,\n CARD_WIDTH, CARD_HEIGHT, null);\n }\n }", "public Image createBrush(double radius, Color color) {\n\n RadialGradient gradient1 = null;\n\n Shape brush = null;\n if (getSelectedTool() == 0) {\n brush = new Circle(radius);\n gradient1 = new RadialGradient(0, 0, 0, 0, radius, false, CycleMethod.NO_CYCLE, new Stop(0, color.deriveColor(1, 1, 1, 1)), new Stop(1, color.deriveColor(1, 0.1, 1, 0)));\n brush.setFill(gradient1);\n\n } else if (getSelectedTool() == 1) {\n brush = new Circle(radius);\n gradient1 = new RadialGradient(0, 0, 0, 0, radius, false, CycleMethod.NO_CYCLE, new Stop(0, color.deriveColor(1, 1, 1, 0.3)), new Stop(1, color.deriveColor(1, 1, 1, 0)));\n brush.setFill(gradient1);\n } else if (getSelectedTool() == 2) {\n brush = new Rectangle(2 * radius, 2 * radius);\n LinearGradient rect = new LinearGradient(mouseLocation.getX() - radius, mouseLocation.getY() - radius, mouseLocation.getX() + radius, mouseLocation.getY() + radius, false, CycleMethod.NO_CYCLE, new Stop(0, color.deriveColor(1, 1, 1, 0.3)), new Stop(1, color.deriveColor(1, 1, 1, 0)));\n brush.setFill(rect);\n } else if (getSelectedTool() == 3) {\n brush = new Circle(radius);\n color = Color.WHITE;\n gradient1 = new RadialGradient(0, 0, 0, 0, radius, true, CycleMethod.NO_CYCLE, new Stop(0, color.deriveColor(1, 1, 1, 1)), new Stop(1, color.deriveColor(1, 1, 1, 0)));\n brush.setFill(gradient1);\n } else {\n System.out.println(\"Error: no Tool selected\");\n }\n\n brush.setOpacity(opacity);\n\n\n // create image\n return createImage(brush);\n\n }", "protected void createRect()\r\n\t{\r\n\t\trect = new Rectangle(getX(),getY(),width,height);\r\n\t}", "private Image createPlaceHolderArt(Display display, int width,\r\n int height, Color color) {\r\n Image img = new Image(display, width, height);\r\n GC gc = new GC(img);\r\n gc.setForeground(color);\r\n gc.drawLine(0, 0, width, height);\r\n gc.drawLine(0, height - 1, width, -1);\r\n gc.dispose();\r\n return img;\r\n }", "private void generateNewRect() {\n\t\t\n\t\tif(rectengleList.size() < getLevel()){\n\t\tRandom mRandom = new Random();\n\t\tint height = getHeight();\n\t\tint width = getWidth();\n\n\t\tint cx = (int) ((mRandom.nextInt() % (width * 0.8)) + (width * 0.1));\n\t\tint cy = (int) ((mRandom.nextInt() % (height * 0.8)) + (height * 0.1));\n\t\tint hw = (int) (mRandom.nextInt() % (width * 0.4) + width * 0.2) / 2;\n\t\tint hh = (int) (mRandom.nextInt() % (height * 0.4) + height * 0.2) / 2;\n\n\t\tint color = (0x00252525 | mRandom.nextInt()) & 0x00FFFFFF | 0x77000000;\n\t\t\n\t\t\n\t\trectengleList.add(new ColoredRect(color, cx - hw, cy - hh, cx + hw, cy\n\t\t\t\t+ hh));\n\t\t}\n\t\telse{\n\t\t\trectengleList.clear();\t\t\t\n\t\t}\n\t}", "void createRectangles();", "private Card getRandomCard(final int position,String company,String desciptionParam,String picUrl) {\n String description = desciptionParam;\n final CardProvider provider = new Card.Builder(getActivity())\n .setTag(\"\"+position)\n .setDismissible()\n .withProvider(new CardProvider())\n .setLayout(R.layout.material_image_with_buttons_card)\n // .setTitle(title)\n .setDescription(company)\n .setDrawable(picUrl)\n .addAction(R.id.left_text_button, new TextViewAction(getActivity())\n .setText(description)\n .setTextResourceColor(R.color.black_button))\n .addAction(R.id.right_text_button, new TextViewAction(getActivity())\n .setText(\"Apply\")\n .setTextResourceColor(R.color.accent_material_dark)\n .setListener(new OnActionClickListener() {\n @Override\n public void onActionClicked(View view, Card card) {\n // Toast.makeText(mContext, position, Toast.LENGTH_SHORT).show();\n }\n }));\n\n\n if (position % 2 == 0) {\n provider.setDividerVisible(true);\n }\n\n return provider.endConfig().build();\n }", "private Card(Color c, Rank r) {\n this.nbCard = pack(c,r);\n }", "@Override\n public void fillRoundRectangle(Rectangle rect, int arcWidth, int arcHeight) {\n RoundRectangle2D roundRect = new RoundRectangle2D.Float(rect.x + transX, rect.y + transY, rect.width - 1, rect.height - 1, arcWidth,\n arcHeight);\n\n checkState();\n getGraphics2D().setPaint(getColor(getSWTGraphics().getBackgroundColor()));\n getGraphics2D().fill(roundRect);\n }", "public Image drawOnImage(Mat binary, Mat image) {\n Raster binaryRaster = toBufferedImage(binary).getData();\n int radius = 6;\n int diameter = radius * 2;\n\n BufferedImage imageBI = toBufferedImage(image);\n int width = imageBI.getWidth();\n int height = imageBI.getHeight();\n Graphics2D g2d = (Graphics2D) imageBI.getGraphics();\n g2d.setColor(Color.WHITE);\n\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n int v = binaryRaster.getSample(x, y, 0);\n if (v == 0) {\n g2d.draw(new Ellipse2D.Double(x - radius, y - radius, diameter, diameter));\n }\n }\n }\n\n return imageBI;\n }", "public static void main(String[] args){\n\tImage test = new Image(700,700);\n\t//addRectangle(test, 0, 0, 600, 600, -1, -1, -1);\n\t//test.display();\n\taddCircle(test, 300, 300, 100, 255, 255, 255);\n\taddCircle(test, 500, 300, 100, 255, 255, 255);\n\taddCircle(test, 400, 400, 150, 255, 255, 255);\n\taddCircle(test, 350, 350, 25, 0, 0, 0);\n\taddCircle(test, 450, 350, 25, 0, 0, 0);\n\taddCircle(test, 350, 350, 24, 255, 255, 255);\n\taddCircle(test, 450, 350, 24, 255, 255, 255);\n\taddCircle(test, 350, 350, 10, 0, 0, 0);\n\taddCircle(test, 450, 350, 10, 0, 0, 0);\n\taddRectangle(test, 325, 475, 150, 20, 0, 0, 0);\n\ttest.setPixel(0,0,255,255,255);\n\ttest.display();\n\tencrypt(test, \"PerfektDokumentation\");\n\ttest.display();\n\tdecrypt(test, \"PerfektDokumentation\");\n\t\n\ttest.display();\n\t}", "private static void addShaped()\n {}", "public void addImg(){\n // Add other bg images\n Image board = new Image(\"sample/img/board.jpg\");\n ImageView boardImg = new ImageView();\n boardImg.setImage(board);\n boardImg.setFitHeight((tileSize* dimension)+ (tileSize*2) );\n boardImg.setFitWidth( (tileSize* dimension)+ (tileSize*2) );\n\n Tile infoTile = new Tile(getTileSize(), getTileSize()*7);\n infoTile.setTranslateX(getTileSize()*3);\n infoTile.setTranslateY(getTileSize()*6);\n\n tileGroup.getChildren().addAll(boardImg, infoTile);\n\n }", "public void draw(){\n\t\t int startRX = 100;\r\n\t\t int startRY = 100;\r\n\t\t int widthR = 300;\r\n\t\t int hightR = 300;\r\n\t\t \r\n\t\t \r\n\t\t // start points on Rectangle, from the startRX and startRY\r\n\t\t int x1 = 0;\r\n\t\t int y1 = 100;\r\n\t\t int x2 = 200;\r\n\t\t int y2 = hightR;\r\n\t\t \r\n //direction L - false or R - true\r\n\t\t \r\n\t\t boolean direction = true;\r\n\t\t \t\r\n\t\t\r\n\t\t //size of shape\r\n\t\t int dotD = 15;\r\n\t\t //distance between shapes\r\n\t int distance = 30;\r\n\t\t \r\n\t rect(startRX, startRY, widthR, hightR);\r\n\t \r\n\t drawStripesInRectangle ( startRX, startRY, widthR, hightR,\r\n\t \t\t x1, y1, x2, y2, dotD, distance, direction) ;\r\n\t\t \r\n\t\t super.draw();\r\n\t\t}", "public void draw()\n {\n Rectangle hatbox = new Rectangle(x, y, 20, 20);\n hatbox.fill();\n Rectangle brim = new Rectangle(x-10, y+20, 40, 0);\n brim.draw();\n Ellipse circle = new Ellipse (x, y+20, 20, 20);\n circle.draw();\n Ellipse circle2 = new Ellipse (x-10, y+40, 40, 40);\n circle2.draw();\n Ellipse circle3 = new Ellipse (x-20, y+80, 60, 60);\n circle3.draw();\n \n }", "public Rectangle getRect() {\n return new Rectangle(x,y,(imageWeight-50),(imageHeight-50));\n }", "private void drawThumbnail()\n\t{\n\t\t int wCurrentWidth = mBackImage.getWidth();\n\t\t int wCurrentHeight = mBackImage.getHeight();\n\t\t \n \n float scaleWidth = ((float) mThumbnailWidth) / wCurrentWidth;\n float scaleHeight = ((float) mThumbnailHeight) / wCurrentHeight;\n Matrix matrix = new Matrix();\n matrix.postScale(scaleWidth, scaleHeight);\n // create the new Bitmap object\n Bitmap resizedBitmap = Bitmap.createBitmap(mBackImage, 0, 0 , wCurrentWidth, wCurrentHeight, matrix, true);\n \n Bitmap output = Bitmap.createBitmap(resizedBitmap.getWidth()+(2*cmColorPadding+2*cmBorderPadding), resizedBitmap.getHeight()+(2*cmColorPadding+2*cmBorderPadding), Config.ARGB_8888);\n Canvas canvas = new Canvas(output);\n \n final int wRectBorderLeft = 0;\n final int wRectColorLeft = wRectBorderLeft + cmBorderPadding;\n final int wRectThumbnailLeft = wRectColorLeft + cmColorPadding;\n final int wRectBorderTop = 0;\n final int wRectColorTop = wRectBorderTop + cmBorderPadding;\n final int wRectThumbnailTop = wRectColorTop + cmColorPadding;\n\n final int wRectThumbnailRight = wRectThumbnailLeft + resizedBitmap.getWidth();\t \n final int wRectColorRight = wRectThumbnailRight + cmColorPadding;\n final int wRectBorderRight = wRectColorRight + cmBorderPadding;\n final int wRectThumbnailBottom = wRectThumbnailTop + resizedBitmap.getHeight();\t \n final int wRectColorBottom = wRectThumbnailBottom + cmColorPadding;\n final int wRectBorderBottom = wRectColorBottom + cmBorderPadding;\n \n \n final int wThumbColor = 0xff424242;\n final int wBorderColor = 0xffBBBBBB;\n final Paint paint = new Paint();\n final Rect wThumbRectangle = new Rect(wRectThumbnailLeft, wRectThumbnailTop, wRectThumbnailRight, wRectThumbnailBottom);\n final Rect wColorRectangle = new Rect(wRectColorLeft, wRectColorTop, wRectColorRight, wRectColorBottom);\n final Rect wBorderRectangle = new Rect(wRectBorderLeft, wRectBorderTop, wRectBorderRight, wRectBorderBottom);\n final RectF wThumbRoundRectangle = new RectF(wThumbRectangle);\n final RectF wColorRoundRectangle = new RectF(wColorRectangle);\n final RectF wBorderRoundRectangle = new RectF(wBorderRectangle);\n final float roundPx = 3.0f;\n\n paint.setAntiAlias(true);\n canvas.drawARGB(0, 0, 0, 0);\n paint.setColor(wBorderColor);\n canvas.drawRoundRect(wBorderRoundRectangle, roundPx, roundPx, paint);\n paint.setColor(getLevelColor());\n canvas.drawRoundRect(wColorRoundRectangle, roundPx, roundPx, paint);\n paint.setColor(wThumbColor);\n canvas.drawRoundRect(wThumbRoundRectangle, roundPx, roundPx, paint);\n\n paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));\n canvas.drawBitmap(resizedBitmap, null, wThumbRectangle, paint);\n \n BitmapDrawable bmd = new BitmapDrawable(output);\n \n\t\t mCurrentImage.setImageDrawable(bmd);\n\t}", "private PImage createBG() {\n\t\tPImage image = new PImage(64, 64);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tl\"), 0, 0, 16, 16, 0, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tm\"), 0, 0, 16, 16, 16, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tm\"), 0, 0, 16, 16, 32, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tr\"), 0, 0, 16, 16, 48, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_ml\"), 0, 0, 16, 16, 0, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 16, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 32, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mr\"), 0, 0, 16, 16, 48, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_ml\"), 0, 0, 16, 16, 0, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 16, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 32, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mr\"), 0, 0, 16, 16, 48, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_bl\"), 0, 0, 16, 16, 0, 48, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_bm\"), 0, 0, 16, 16, 16, 48, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_bm\"), 0, 0, 16, 16, 32, 48, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_br\"), 0, 0, 16, 16, 48, 48, 16, 16);\n\t\treturn image;\t\t\n\t}", "public RoundedColorDrawable(){\n super();\n }", "public Image()\r\n {\r\n super();\r\n setBounds( 0, 0, 10, 10 );\r\n }", "public Bitmap getShapesImage();", "public ImageIcon getCardPicture()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************** Start getCardPicture Method *****************/\n\n // Return card picture\n return picture;\n\n }", "private Drawable createCircleDrawable(int n, float f) {\n void var4_6;\n int n2 = Color.alpha((int)n);\n n = this.opaque(n);\n ShapeDrawable shapeDrawable = new ShapeDrawable((Shape)new OvalShape());\n Drawable[] arrdrawable = shapeDrawable.getPaint();\n arrdrawable.setAntiAlias(true);\n arrdrawable.setColor(n);\n arrdrawable = new Drawable[]{shapeDrawable, this.createInnerStrokesDrawable(n, f)};\n if (n2 == 255 || !this.mStrokeVisible) {\n LayerDrawable layerDrawable = new LayerDrawable(arrdrawable);\n } else {\n TranslucentLayerDrawable translucentLayerDrawable = new TranslucentLayerDrawable(n2, arrdrawable);\n }\n n = (int)(f / 2.0f);\n var4_6.setLayerInset(1, n, n, n, n);\n return var4_6;\n }", "public DrawableCard(Context context, AttributeSet attrs) {\n super(context, attrs);\n\n //initially the card is not selected\n this.selected = -1;\n init();\n }", "public GCardImage(int rank, int suit, double x, double y) {\n\t\tthis(rank, suit);\n\t\tthis.setLocation(x,y);\n\t}", "private void makeCards() {\n //make number cards(76 cards)\n for (int i = 0; i < 10; i++) {\n String s = i + \"\";\n cards.add(new NumberCard(s, Color.RED, i));\n cards.add(new NumberCard(s, Color.GREEN, i));\n cards.add(new NumberCard(s, Color.BLUE, i));\n cards.add(new NumberCard(s, Color.YELLOW, i));\n if(i > 0) {\n cards.add(new NumberCard(s, Color.RED, i));\n cards.add(new NumberCard(s, Color.GREEN, i));\n cards.add(new NumberCard(s, Color.BLUE, i));\n cards.add(new NumberCard(s, Color.YELLOW, i));\n }\n }\n\n //make wild cards(8 cards)⨁\n for (int i = 0; i < 4; i++) {\n cards.add(new WildCard(\"W\", Color.BLACK));\n cards.add(new WildDrawCard(\"W+4\", Color.BLACK));\n }\n\n //make reverse cards(8 cards)⤤⤦\n for (int i = 0; i < 2; i++) {\n cards.add(new ReverseCard(\"Rev\", Color.RED));\n cards.add(new ReverseCard(\"Rev\", Color.GREEN));\n cards.add(new ReverseCard(\"Rev\", Color.BLUE));\n cards.add(new ReverseCard(\"Rev\", Color.YELLOW));\n }\n\n //make draw cards(8 cards)⧉\n for (int i = 0; i < 2; i++) {\n cards.add(new Draw2Card(\"D+2\", Color.RED));\n cards.add(new Draw2Card(\"D+2\", Color.GREEN));\n cards.add(new Draw2Card(\"D+2\", Color.BLUE));\n cards.add(new Draw2Card(\"D+2\", Color.YELLOW));\n }\n\n //make skip cards(8 cards)🚫\n for (int i = 0; i < 2; i++) {\n cards.add(new SkipCard(\"Ski\", Color.RED));\n cards.add(new SkipCard(\"Ski\", Color.GREEN));\n cards.add(new SkipCard(\"Ski\", Color.BLUE));\n cards.add(new SkipCard(\"Ski\", Color.YELLOW));\n }\n //Shuffling cards list\n Collections.shuffle(cards);\n }", "public Bitmap getRoundedShape(Bitmap scaleBitmapImage) {\n int targetWidth = 200;\n int targetHeight = 200;\n Bitmap targetBitmap = Bitmap.createBitmap(targetWidth,\n targetHeight,Bitmap.Config.ARGB_8888);\n\n Canvas canvas = new Canvas(targetBitmap);\n Path path = new Path();\n path.addCircle(((float) targetWidth - 1) / 2,\n ((float) targetHeight - 1) / 2,\n (Math.min(((float) targetWidth),\n ((float) targetHeight)) / 2),\n Path.Direction.CCW);\n\n canvas.clipPath(path);\n Bitmap sourceBitmap = scaleBitmapImage;\n canvas.drawBitmap(sourceBitmap,\n new Rect(0, 0, sourceBitmap.getWidth(),\n sourceBitmap.getHeight()),\n new Rect(0, 0, targetWidth, targetHeight), null);\n return targetBitmap;\n }", "public CircularImageView(Context context) {\n\n super(context);\n setup();\n }", "@Override\n public void paintComponent(Graphics g){\n // Paint the well\n g.setColor(Color.DARK_GRAY);\n g.fillRoundRect(0, 0, 338, 546, 8, 8);\n\n for (int i = 1; i < 21; i++){\n for (int j = 1; j < 13; j++){\n g.setColor(Color.BLACK);\n g.fillRoundRect(26 * j - 13, 26 * i - 13, 25, 25, 2, 2);\n }\n }\n\n drawPiece(g);\n }", "public Node renderCardBack(State.Hero h){\n this.belongsTo = h;\n Rectangle card = new Rectangle();\n card.setHeight(152);\n card.setWidth(106.4);\n ImagePattern p = new ImagePattern(new Image(\"vendor/assets/card_back.png\"));\n card.setFill(p);\n\n return card;\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Card createCard();", "public void drawCard(Graphics2D g,int xpos,int ypos,double xscale,double yscale,int value, Suite suite, boolean faceUp)\n\t{\n \tg.translate(xpos,ypos);\n \tg.scale( xscale , yscale );\n \t\n if(faceUp)\n {\n if(suite == Suite.HEARTS || suite == Suite.DIAMONDS)\n {\n g.setColor(Color.white);\n g.fillRoundRect(0, 0, 15, 20,2,2);\n g.setColor(Color.black);\n \n }\n else if(suite == Suite.SPADES || suite == Suite.CLUBS)\n {\n g.setColor(Color.white);\n g.fillRoundRect(0, 0, 15, 20,2,2);\n g.setColor(Color.red);\n \n \n }\n else if(faceUp && suite == Suite.SPECIAL)\n {\n g.setColor(Color.white);\n g.fillRoundRect(0, 0, 15, 20,2,2);\n \n \n \n \n \n drawJester(g,7.5,10,180,.4,.4);\n \n g.setColor(Color.black);\n g.setFont(new Font(\"Impact\",Font.BOLD,7));\n g.drawString(\"?\", 11, 6);\n g.drawString(\"¿\" , 0, 19);\n }\n\n\n \t\n \n g.setColor(Color.red);\n if(suite == Suite.DIAMONDS)\n drawDiamond(g,7.5,6,45,.5,.5);\n else if(suite == Suite.HEARTS)\n drawHeart(g,7.5,11,180,.5,0.5);\n \n else if(suite == Suite.SPADES)\n {\n g.setColor(Color.black);\n\n drawSpade(g,7.5,8,0,.5,.5);\n }\n else if(suite == Suite.CLUBS)\n { \n g.setColor(Color.black);\n\n drawClub(g,7.5,12,180,.5,.5);\n }\n if(suite!=Suite.SPECIAL)\n {\n g.setFont(new Font(\"Impact\",Font.BOLD,6));\n if(value==10)\n {\n g.drawString(\"\" + value, 9, 5);\n g.drawString(\"\" + value, 0, 20);\n }\n else if(value == 1)\n {\n g.drawString(\"A\", 11, 6);\n g.drawString(\"A\" , 1, 19);\n }\n else if(value == 11)\n {\n g.drawString(\"J\", 12, 6);\n g.drawString(\"J\" , 1, 19);\n }\n else if(value == 12)\n {\n g.drawString(\"Q\", 11, 5);\n g.drawString(\"Q\", 0, 19);\n }\n else if(value == 13)\n {\n g.drawString(\"K\", 11, 5);\n g.drawString(\"K\", 0, 19);\n }\n else if(value >=2 && value <=9)\n {\n g.drawString(\"\" + value, 11, 5);\n g.drawString(\"\" + value, 0, 19);\n }\n }\n \n \n }\n else\n {\n g.setColor(new Color(217,197,137));\n g.fillRoundRect(0, 0, 15, 20,2,2);\n }\n \n \tg.scale( 1.0/xscale,1.0/yscale );\n \tg.translate(-xpos,-ypos);\n\t}", "public void addCard() {\n for (int i = 0; i < 4; i++) {\n cards.add(new Wild());\n cards.add(new WildDrawFour());\n }\n for (Color color : Color.values())\n cards.add(new NumberCard(color.name(),0));\n for (Color color : Color.values()) {\n for (int i = 0; i < 2; i++) {\n for (int j = 1; j < 10; j++)\n cards.add(new NumberCard(color.name(),j));\n cards.add(new DrawTwo(color.name()));\n cards.add(new Reverse(color.name()));\n cards.add(new Skip(color.name()));\n }\n }\n }", "private void createAreaWithoutBorder(){\n image.setColor(backgroundColor);\n image.fillRect(0, 0, fieldWidth, fieldHeight);\n }", "@NonNull\n @Override\n public Object instantiateItem(@NonNull ViewGroup container, int position) {\n\n final SimpleDraweeView imageView = new SimpleDraweeView(MainActivity.this);\n imageView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,\n ViewGroup.LayoutParams.WRAP_CONTENT));\n\n imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);\n// Uri uri = Uri.parse(bannerList.get(position).getImagePath());\n// imageView.setImageURI(uri);\n imageView.setActualImageResource(bannerImageList.get(position).getImageId());\n\n\n container.addView(imageView);\n return imageView;\n\n }", "public void getclothbox(List<Image> ImgList){\n\n ImgStackView=new ImageView(ImgList.get(0));\n ImgStackView.setFitHeight(imgsize);\n ImgStackView.setPreserveRatio(true);\n\n ImgStack =new StackPane(ImgStackView);\n ImgStack.setPadding(new Insets(20,0,20,0));\n // ImgStack.setPrefWidth(imgsize);\n\n\n\n\n uparrow= new ImageView();\n uparrow.setImage(uparrowImg);\n uparrow.setPreserveRatio(true);\n uparrow.setFitWidth(150);\n Button triangleup= new Button(\"\",uparrow);\n triangleup.setStyle(\"-fx-background-insets:0.0;\"+\"-fx-background-color: transparent;\");\n\n\n downarrow= new ImageView();\n downarrow.setImage(downarrowImg);\n downarrow.setPreserveRatio(true);\n downarrow.setFitWidth(150);\n Button triangledown= new Button(\"\",downarrow);\n triangledown.setStyle(\"-fx-background-insets:0.0;\"+\"-fx-background-color: transparent;\");\n\n this.getChildren().addAll(triangleup,ImgStack,triangledown);\n }", "public Image getCardPlayer2() {\n Random rand1 = new Random();\r\n randomNum1 = rand1.nextInt((52 - 1) + 1) + 1;\r\n Image p2 = new Image(\"/Images/cards/Card\" + randomNum1 + \".png\");\r\n return p2;\r\n }", "public Image getCardPlayer1() {\n Random rand = new Random();\r\n randomNum = rand.nextInt((52 - 1) + 1) + 1;\r\n Image p1 = new Image(\"/Images/cards/Card\" + randomNum + \".png\");\r\n return p1;\r\n }", "public void createCard(Player p) {\r\n\t\tJPanel panel = new JPanel();\r\n\t\tGridBagLayout layout = new GridBagLayout();\r\n\t\tpanel.setLayout(layout);\r\n\r\n\t\tGridBagConstraints lim = new GridBagConstraints();\r\n\t\tlim.fill = GridBagConstraints.BOTH;// grandezza componenti nei riquadri\r\n\t\t\t\t\t\t\t\t\t\t\t// (both= tutto pieno)\r\n\t\tlim.anchor = GridBagConstraints.CENTER;// posizione componenti nei\r\n\t\t\t\t\t\t\t\t\t\t\t\t// riquadri\r\n\r\n\t\tList<BusinessPermitTile> bpt = p.getUsedBusinessPermit();// carte\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// permesso\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// costrucione\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// giocatore\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// usate\r\n\t\tif (bpt.isEmpty()) {// non ci sono carte permesso usate\r\n\r\n\t\t\t// ----------no card----------\r\n\t\t\tJLabel noCardLabel = new JLabel(\"No used business permit tiles\");// aggiungo\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// l'immagine\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// alla\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// label\r\n\t\t\tnoCardLabel.setFont(new Font(\"Calibre\", Font.PLAIN, 20));\r\n\r\n\t\t\tlim.gridx = 0;// posizione componenti nella griglia\r\n\t\t\tlim.gridy = 0;\r\n\t\t\tlim.weightx = 1;// espansione in verticale e orizzontale\r\n\t\t\tlim.weighty = 1;\r\n\t\t\tlim.gridheight = 1;// grandezza del riquadro\r\n\t\t\tlim.gridwidth = 1;\r\n\r\n\t\t\tlayout.setConstraints(noCardLabel, lim);\r\n\t\t\tpanel.add(noCardLabel);\r\n\r\n\t\t} else {// ci sono carte permesso usate\r\n\r\n\t\t\t// ----------costruction card usate disponibili----------\r\n\t\t\tJLabel yesCardLabel = new JLabel(\"Used business permit tiles\");// aggiungo\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// l'immagine\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// alla\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// label\r\n\t\t\tyesCardLabel.setFont(new Font(\"Calibre\", Font.PLAIN, 20));\r\n\r\n\t\t\tlim.gridx = 0;// posizione componenti nella griglia\r\n\t\t\tlim.gridy = 0;\r\n\t\t\tlim.weightx = 1;// espansione in verticale e orizzontale\r\n\t\t\tlim.weighty = 1;\r\n\t\t\tlim.gridheight = 1;// grandezza del riquadro\r\n\t\t\tlim.gridwidth = 5;\r\n\r\n\t\t\tlayout.setConstraints(yesCardLabel, lim);\r\n\t\t\tpanel.add(yesCardLabel);\r\n\r\n\t\t\tint q = 0;// posizione griglia orizzonatale (larghezza)\r\n\t\t\tint r = 1;// posizione griglia verticale (altezza)\r\n\t\t\tfor (int i = 0; i < bpt.size(); i++) {\r\n\t\t\t\tJLabel costructionCard = ccp.oldCostructionWB(bpt.get(i));// aggiungo\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// l'immagine\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// alla\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// label\r\n\r\n\t\t\t\tlim.gridx = q;// posizione componenti nella griglia\r\n\t\t\t\tlim.gridy = r;\r\n\t\t\t\tlim.weightx = 1;// espansione in verticale e orizzontale\r\n\t\t\t\tlim.weighty = 1;\r\n\t\t\t\tlim.gridheight = 1;// grandezza del riquadro\r\n\t\t\t\tlim.gridwidth = 1;\r\n\r\n\t\t\t\tlayout.setConstraints(costructionCard, lim);\r\n\t\t\t\tpanel.add(costructionCard);\r\n\t\t\t\tfinal int k = i;\r\n\t\t\t\tcostructionCard.addMouseListener(new MouseListener() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\t\t\t/** empty, not erasable */\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\r\n\t\t\t\t\t\t/** empty, not erasable */\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\tccp.writeArea(bpt.get(k));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void mouseExited(MouseEvent e) {\r\n\t\t\t\t\t\t/** empty, not erasable */\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\t\t\t/** empty, not erasable */\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tq++;\r\n\t\t\t\tif (q % 5 == 0) {// metto al massino 5 carte costruzione per\r\n\t\t\t\t\t\t\t\t\t// riga\r\n\t\t\t\t\tq = 0;\r\n\t\t\t\t\tr++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tcontentPane.add(panel);\r\n\t}", "private Card init_proof_card() {\n\t\t\n\t\tProofCard card = new ProofCard(getActivity());\n\t\t\n\t\tCardExpand expand = new CardExpand(getActivity());\n\t\tcard.addCardExpand(expand);\n\t\tcard.setBackgroundResource(getResources().getDrawable(R.drawable.card_back));\n\t\treturn card;\n\t}", "private void drawPlayerDetailBox(Graphics g, int x, int y) throws IOException{\n\t\t ImageIcon bg;\n\t\t bg = new ImageIcon(ImageIO.read(new File(relativePath + \"playerDetailBox.png\")));\n\t\t bg.paintIcon(this, g, x, y);\n\t }", "@Override\n public void draw( Graphics g )\n {\n g.setFont(new Font(\"Times New Roman\", Font.BOLD, 20));\n g.setColor( Color.BLUE );\n g.fillOval( baseX, baseY, myWidth, myHeight );\n g.setColor( Color.BLACK );\n g.drawString( card, baseX + 7, baseY + 20 ); }", "public void compose() {\n\t\tg2d.setBackground(bgColor);\n\t\tg2d.clearRect(0, 0, width, height);\n\t\tboolean drawed=g2d.drawImage(gridImg, gridImgX, gridImgY, null);\n\t\tdrawed=g2d.drawImage(colorCodeImg, colorCodeImgX, colorCodeImgY, null);\n\t\tdrawed=g2d.drawImage(celestialObjectTextImg, celestialObjectTextImgX, celestialObjectTextImgY, null);\n\t\tdrawed=g2d.drawImage(observationTextImg, observationTextImgX, observationTextImgY, null);\n\t\tdrawed=g2d.drawImage(maserImg, maserImgX, maserImgY, null);\n\t}", "private BufferedImage makeSquare(BufferedImage photo) {\n int width = photo.getWidth();\n int height = photo.getHeight();\n int size = Math.min(width, height);\n\n return photo.getSubimage((width/2) - (size/2), (height/2) - (size/2), size, size);\n }", "private static void addStripes() {\n double stripeHeight = FLAG_HEIGHT / 13;\n for (int i = 12; i >= 0; i--) {\n PPRect stripe = new PPRect(x0, y0 + i * stripeHeight,\n FLAG_WIDTH, stripeHeight);\n stripe.setColor((i % 2 == 0) ? Color.RED : Color.WHITE);\n slide.add(stripe);\n }\n }", "Image createImage();", "public ScoreBoard()\r\n {\r\n super();\r\n int boardWidth = 200;\r\n int boardHeight = 30;\r\n \r\n board = new GreenfootImage(boardWidth,boardHeight);\r\n board.setColor(Color.green); \r\n //&& Color.blue);\r\n board.fillRect(0, 0, boardWidth,boardHeight);\r\n this.setImage(board);\r\n \r\n //draw it\r\n update();\r\n }", "public void addBox()\n {\n if(Student.sittingRia==false) {\n box = new BoxRia(\"chalkboard.png\",4,2);\n addObject(box,box.myRow,box.mySeat);\n chalk = new BoxRia(\"chalk.png\",0,0);\n addObject(chalk,2,3);\n }\n }", "private static RenderedImage ownerImage(RegionReport rr) {\n BufferedImage bufferedImage = new BufferedImage(MAP_SIZE, MAP_SIZE,\n BufferedImage.TYPE_INT_RGB) ;\n // Create a graphics contents on the buffered image\n Graphics2D g2d = bufferedImage.createGraphics() ;\n g2d.setColor(Color.white);\n //TODO need to set default overflow to something other than black,\n // or set this default background to something else. colors colors colors.\n g2d.fillRect(0, 0, MAP_SIZE, MAP_SIZE);\n \n String family = \"Sans-Serif\";\n int style = Font.PLAIN;\n int size = 12;\n Font font = new Font(family, style, size);\n g2d.setFont(font);\n\n ArrayList owners = rr.getOwnerMap() ;\n System.out.println(owners.size() + \" owners.\") ;\n int yy = 20 ;\n int boxX = 14 ;\n int nameX = boxX + 26 ; ;\n\n for (Iterator all = owners.iterator(); all.hasNext();) {\n Owner owner = (Owner) all.next() ;\n int ownerNum = owner.getNumber() ;\n Color cc = OwnerColors.getOwnerColor(ownerNum) ;\n g2d.setColor(cc) ;\n g2d.fillRect(boxX, yy, 16, 16) ;\n String ownerName = owner.getName() ;\n int spot = ownerName.indexOf(\"-\") ;\n if (spot > 0) {\n ownerName = ownerName.substring(0,8) ;\n }\n g2d.drawString(ownerName, nameX, yy+13) ;\n yy += 24 ;\n \n if (yy+48 > MAP_SIZE) {\n yy = 20 ;\n boxX = boxX + MAP_SIZE/2 ;\n nameX = boxX + 26 ;\n \n }\n }\n \n/*\n // trial of svg\n // <rect x=\"0\" y=\"8\" width=\"512\" height=\"8\"\n // style=\"fill:rgb(255,255,255)\"/>\n char q = '\"' ;\n System.out.println(\n \"<rect x=\" + q + xx + q + \" y=\" + q + yy + q +\n \" width=\" + q + finishRow + q + \" height=\" + q + \"1\" + q +\n \" style=\" + q + \"fill:rgb(\" + \n cc.getRed() + \",\" + cc.getGreen() + \",\" + cc.getBlue() \n + \")\" + q + \"/>\") ;\n */\n \n // Graphics context no longer needed so dispose it\n g2d.dispose() ;\n\n return bufferedImage ;\n }", "public CircularImageView(Context context, AttributeSet attrs) {\n\n super(context, attrs);\n setup();\n }", "private View createIcon() {\r\n\t\tImageView img = new ImageView(getContext());\r\n\t\tLayoutParams imglp = new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT);\r\n\t\timglp.gravity = Gravity.CENTER_VERTICAL;\r\n\t\timglp.rightMargin = 5;\r\n\t\timg.setLayoutParams(imglp);\r\n\r\n\t\timg.setBackgroundDrawable(getContext().getResources().getDrawable(R.drawable.account));\r\n\t\treturn img;\r\n\t}", "private Rect createRect(final Camera.Size size, final IdAreaField idAreaField) {\n final int offsetWidth = (int) (size.width * 0.2);\n final int idCardWidth = (int) (size.width * 0.6);\n final int idCardHeight = (int) (idCardWidth / 1.58);\n final int topIdCardHeight = idCardWidth / 2 - idCardHeight / 2;\n final int bottomIdCardHeight = idCardWidth / 2 + idCardHeight / 2;\n final Rect parentRect = new Rect(offsetWidth, topIdCardHeight, size.width - offsetWidth, bottomIdCardHeight);\n final int left = parentRect.left + idAreaField.getPercentageFromParentLeft() * parentRect.width() / 100;\n final int top = parentRect.top + idAreaField.getPercentageFromParentTop() * parentRect.height() / 100;\n final int right = left + idAreaField.getPercentageWidth() * parentRect.width() / 100;\n final int bottom = top + idAreaField.getPercentageHeight() * parentRect.height() / 100;\n return new Rect(left, top, right, bottom);\n }", "private View crearImageView(Drawable d, int w, int h) {\n Drawable clone = d.getConstantState().newDrawable();\n clone.setBounds(0, 0, w, h);\n\n ImageView imBkg = new ImageView(getApplicationContext());\n imBkg.setBackground(clone);\n\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(w, h);\n imBkg.setLayoutParams(layoutParams);\n\n imBkg.setBackground(clone);\n\n imBkg.setOnTouchListener(crearListener());\n//\n// imBkg.setMaxWidth(,fotoBase.getWidth(),fotoBase.getHeight()));\n return imBkg;\n\n }", "@Override\r\n\tpublic Card createCard(Color color, Value label) {\r\n\t\tCard newCard = new Card(color, label);\r\n\t\treturn newCard;\r\n\t}", "private void createImage()\n {\n GreenfootImage image = new GreenfootImage(width, height);\n setImage(\"Player.png\");\n }", "private void createCircleImages(){\n offScreenCircles = new Image[8];\n try {\n offScreenCircles[0] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleDown.png\"));\n offScreenCircles[1] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleLeftDown.png\"));\n offScreenCircles[2] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleLeft.png\"));\n offScreenCircles[3] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleLeftUp.png\"));\n offScreenCircles[4] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleUp.png\"));\n offScreenCircles[5] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleRightUp.png\"));\n offScreenCircles[6] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleRight.png\"));\n offScreenCircles[7] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleRightDown.png\"));\n } catch (IOException ex) {\n System.out.println(\"Bild konnte nicht geladen werden!\");\n }\n activeOffScreenCircle = offScreenCircles[0];\n }", "private void createRectangles() {\r\n rectangles.clear();\r\n for (int i = 0; i < gridSize * gridSize; i++) {\r\n Rectangle r = new Rectangle(rectangleSize, rectangleSize, Color.BLUE);\r\n r.setStroke(Color.BLACK);\r\n rectangles.add(r);\r\n }\r\n }", "public void strokeRoundRectangle(int x, int y, int width, int height, int radius);", "public BigAlbumArt(Composite parent) {\n\t\tsuper(parent, SWT.DOUBLE_BUFFERED);\n\t\tthis.imageAlpha = 0;\n\t\tthis.oldImageAlpha = 0;\n\n\t\tthis.addPaintListener(new PaintListener() {\n\t\t\t@Override\n\t\t\tpublic void paintControl(PaintEvent e) {\n\t\t\t\tGC gc = e.gc;\n\t\t\t\tgc.setAntialias(SWT.ON);\n\n\t\t\t\tint w = getBounds().width;\n\t\t\t\tint h = getBounds().height;\n\n\t\t\t\tColor fill = new Color(e.display, 192, 192, 192);\n\t\t\t\tgc.setBackground(fill);\n\t\t\t\t// TODO: fill round rectangle once SWT supports per-pixel\n\t\t\t\t// translucency\n\t\t\t\tgc.fillRectangle(0, 0, w, h);\n\t\t\t\tfill.dispose();\n\n\t\t\t\tif (oldImageAlpha > 0) {\n\t\t\t\t\tgc.setAlpha(oldImageAlpha);\n\t\t\t\t\tif (oldImage != null) {\n\t\t\t\t\t\t// draw the original image\n\t\t\t\t\t\tgc.drawImage(oldImage, INSETS\n\t\t\t\t\t\t\t\t+ (w - oldImage.getImageData().width) / 2,\n\t\t\t\t\t\t\t\tINSETS\n\t\t\t\t\t\t\t\t\t\t+ (ALBUM_ART_DIM - oldImage\n\t\t\t\t\t\t\t\t\t\t\t\t.getImageData().height) / 2);\n\t\t\t\t\t}\n\t\t\t\t\tgc.setAlpha(255);\n\t\t\t\t}\n\n\t\t\t\tif (imageAlpha > 0) {\n\t\t\t\t\tgc.setAlpha(imageAlpha);\n\t\t\t\t\tif (image != null) {\n\t\t\t\t\t\t// draw the original image\n\t\t\t\t\t\tgc.drawImage(image, INSETS\n\t\t\t\t\t\t\t\t+ (w - image.getImageData().width) / 2, INSETS\n\t\t\t\t\t\t\t\t+ (ALBUM_ART_DIM - image.getImageData().height)\n\t\t\t\t\t\t\t\t/ 2);\n\t\t\t\t\t}\n\t\t\t\t\tgc.setAlpha(255);\n\t\t\t\t}\n\n\t\t\t\tgc.setForeground(e.display.getSystemColor(SWT.COLOR_WHITE));\n\t\t\t\tgc.setLineAttributes(new LineAttributes(2.0f));\n\t\t\t\tgc.drawRoundRectangle(1, 1, w - 2, h - 2, 3, 3);\n\n\t\t\t\tColor outer = new Color(e.display, 192, 192, 192);\n\t\t\t\tgc.setForeground(outer);\n\t\t\t\tgc.setLineAttributes(new LineAttributes(1.0f));\n\t\t\t\tgc.drawRoundRectangle(0, 0, w - 1, h - 1, 4, 4);\n\t\t\t\touter.dispose();\n\t\t\t}\n\t\t});\n\t}", "public void generateShape() {\n\n //TODO for tetris game - copy added to Tetris\n Shape newShape = null;\n //if(GAME_TO_TEST==GameEnum.TETRIS){\n //newShape = TetrisShapeFactory.getRandomShape(this.board);\n //} else if (GAME_TO_TEST== GameEnum.DRMARIO){\n //newShape = DrMarioShapeFactory.getRandomShape(this.board);\n //}\n\n //Temporary\n //-------------------------------------//\n Image image = null;\n try {\n image = new Image(new FileInputStream(\"resources/BlockPurple.png\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n int spawnColIndex = 0;\n int spawnRowIndex = 0;\n int tileSize = 0;\n boolean setColor = false;\n boolean setTileBorder = false; //toggle to add boarder to tile\n boolean setImage = true;\n spawnColIndex = (board.gridWidth-1)/2; //half of board width\n spawnRowIndex = 0;\n tileSize = board.tileSize;\n\n Tile tile1 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 0 , Direction.DOWN); //Center Tile\n Tile tile2 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex,1 , Direction.RIGHT);\n Tile tile3 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.LEFT);\n Tile tile4 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.DOWN);\n\n List<Tile> tiles = new ArrayList<Tile>();\n tiles.add(tile1);\n tiles.add(tile2);\n tiles.add(tile3);\n tiles.add(tile4);\n newShape = new Shape(tiles);\n\n //set newly created shape as the currently active shape\n this.currentActiveShape = newShape;\n\n //check if spawn area is occupied\n boolean isOccupied =false;\n for (Tile newTile : this.currentActiveShape.tiles) {\n if(this.board.getTile(newTile.columnIndex,newTile.rowIndex)!=null){\n isOccupied = true;\n }\n }\n\n //TODO\n //check if shape reaches top\n if(!isOccupied){\n //add tiles to board\n for (Tile newTile : this.currentActiveShape.tiles) {\n this.board.placeTile(newTile);\n }\n } else {\n //TODO later add Game Over JavaFx message\n System.out.println(\"GAME OVER\");\n\n //TODO Finishlater\n //Text gameoverText = new Text(10,20,\"GAME OVER\");\n //gameoverText.setFill(Color.RED);\n //gameoverText.setX( 100/*( ((board.gridWidth-1)*tileSize)/2)*/ );\n //gameoverText.setY( 100/*( ((board.gridHeight-1)*tileSize)/2)*/ );\n //gameoverText.setStyle(\"-fx-font: 70 arial;\");\n //this.group.getChildren().add(gameoverText);\n\n //Text t = new Text();\n //t.setX(20.0f);\n //t.setY(65.0f);\n //t.setX(100);\n //t.setY(200);\n //t.setText(\"Perspective\");\n //t.setFill(Color.YELLOW);\n //t.setFont(Font.font(null, FontWeight.BOLD, 36));\n //this.group.getChildren().add(t);\n //this.pane.getChildren().add(t);\n\n //System.exit(0);\n }\n\n }", "Card(String n, int ps[], int pr[], int y, ImageIcon i){\r\n\t\tname = n;\r\n\t\tprereqSkill = ps;\r\n\t\tprereqRoom = pr;\r\n\t\tyear = y;\r\n\t\timg = i;\r\n\t\tretCA = CardAction.NONE;\t\t\r\n\t}", "private StackPane buildWall(Wall wall) {\n double x_offset = wall.getPosition().getX() * TILE_WIDTH;\n double y_offset = wall.getPosition().getY() * TILE_HEIGHT - 8;\n if (wall.getOrientation() == WallOrientation.VERTICAL) {\n x_offset -= 8;\n y_offset += 8;\n }\n ImageView imageView = getWallTextureFor(wall);\n StackPane stackPane = new StackPane();\n stackPane.setLayoutX(x_offset);\n stackPane.setLayoutY(y_offset);\n stackPane.setDisable(true);\n stackPane.getChildren().add(imageView);\n return stackPane;\n }", "public CircularImageView(Context context) {\n super(context);\n }", "private LayerDrawable buildPinIcon(String iconPath, int iconColor) {\n\n LayerDrawable result = null;\n\n BitmapFactory.Options myOptions = new BitmapFactory.Options();\n myOptions.inDither = true;\n myOptions.inScaled = false;\n myOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;// important\n myOptions.inPurgeable = true;\n\n Bitmap bitmap = null;\n try {\n bitmap = BitmapFactory.decodeStream(container.getContext().getAssets().open(iconPath), null, myOptions);\n\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }catch (Exception e) {\n //Crashlytics.logException(e);\n\n }\n\n\n Bitmap workingBitmap = Bitmap.createBitmap(100, 100, bitmap.getConfig()); //Bitmap.createBitmap(bitmap);\n Bitmap mutableBitmap = workingBitmap.copy(Bitmap.Config.ARGB_8888, true);\n\n\n Paint paint = new Paint();\n paint.setAntiAlias(true);\n paint.setDither(false);\n\n paint.setColor(iconColor);\n\n Canvas canvas = new Canvas(mutableBitmap);\n canvas.drawCircle(bitmap.getWidth()/2 + 10, bitmap.getHeight()/2 + 10, 32, paint);\n\n //\t canvas.drawBitmap(bitmap, 10, 10, null);\n\n if (!iconPath.isEmpty()) {\n\n try {\n result = new LayerDrawable(\n new Drawable[] {\n\t\t\t\t\t\t\t\t/*pincolor*/ new BitmapDrawable(mutableBitmap),\n new BitmapDrawable(BitmapFactory.decodeStream(container.getContext().getAssets().open(iconPath)))});\n\n } catch (Resources.NotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n\n\n\n return result;\n\n }", "public Card build() {\n return new Card(frontFace, backFace);\n }", "private Card init_fulfilled_card() {\n\t\t\n\t\tFulfilledCard card = new FulfilledCard(getActivity());\n\t\t\n\t\tCardExpand expand = new CardExpand(getActivity());\n\t\tcard.addCardExpand(expand);\n\t\tcard.setBackgroundResource(getResources().getDrawable(R.drawable.card_back));\n\t\treturn card;\n\t}", "public void createImage() {\n\t\tBufferedImage crab1ststep = null;\n\t\tBufferedImage crab2ndstep = null;\n\t\tBufferedImage crabhalf = null;\n\t\tBufferedImage crabfull = null;\n\t\tBufferedImage eye6 = null;\n\t\tBufferedImage eye5 = null;\n\t\tBufferedImage eye4 = null;\n\t\tBufferedImage eye3 = null;\n\t\tBufferedImage eye2 = null;\n\t\tBufferedImage eye1 = null;\n\t\tBufferedImage eyeClosed = null;\n\t\ttry {\n\t\t crabImage = ImageIO.read(new File(\"src/images/crab.png\"));\n\t\t crab1ststep = ImageIO.read(new File(\"src/images/crab1ststep.png\"));\n\t\t crab2ndstep = ImageIO.read(new File(\"src/images/crab2ndstep.png\"));\n\t\t crabhalf = ImageIO.read(new File(\"src/images/crabhalf.png\"));\n\t\t crabfull = ImageIO.read(new File(\"src/images/crabfull.png\"));\n\t\t crabWin = ImageIO.read(new File(\"src/images/crabwin.png\"));\n\t\t crabLose = ImageIO.read(new File(\"src/images/crablose.png\"));\n\t\t eye6 = ImageIO.read(new File(\"src/images/crab_eye6.png\"));\n\t\t eye5 = ImageIO.read(new File(\"src/images/crab_eye5.png\"));\n\t\t eye4 = ImageIO.read(new File(\"src/images/crab_eye4.png\"));\n\t\t eye3 = ImageIO.read(new File(\"src/images/crab_eye3.png\"));\n\t\t eye2 = ImageIO.read(new File(\"src/images/crab_eye2.png\"));\n\t\t eye1 = ImageIO.read(new File(\"src/images/crab_eye1.png\"));\n\t\t eyeClosed = ImageIO.read(new File(\"src/images/eyes_closed.png\"));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"bad\");\n\t\t}\n//\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n//\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n//\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n//\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\t\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\t\n\t\tblink.add(eye6);\n\t\tblink.add(eye6);\n//\t\tblink.add(eye5);\n//\t\tblink.add(eye5);\n\t\tblink.add(eye4);\n\t\tblink.add(eye4);\n//\t\tblink.add(eye3);\n//\t\tblink.add(eye3);\n\t\tblink.add(eye2);\n\t\tblink.add(eye2);\n//\t\tblink.add(eye1);\n//\t\tblink.add(eye1);\n\t\tblink.add(eyeClosed);\n\t\tblink.add(eyeClosed);\n\t\tblink.add(eyeClosed);\n\t\tblink.add(eyeClosed);\n//\t\tblink.add(eye1);\n//\t\tblink.add(eye1);\n\t\tblink.add(eye2);\n\t\tblink.add(eye2);\n//\t\tblink.add(eye3);\n//\t\tblink.add(eye3);\n\t\tblink.add(eye4);\n\t\tblink.add(eye4);\n//\t\tblink.add(eye5);\n//\t\tblink.add(eye5);\n\t\tblink.add(eye6);\n\t\tblink.add(eye6);\n\t}", "protected BufferedImage drawBoard(BufferedImage img) {\n myGame.initTiles();\n Graphics2D g2d = img.createGraphics();\n \n //player one\n g2d.setColor(Color.RED);\n int posx1 = myGame.posX(myGame.playerPos(1));\n int posy1 = myGame.posY(myGame.playerPos(1));\n g2d.fill(new Rectangle(posx1, posy1, 20, 20));\n \n //player two\n g2d.setColor(Color.BLUE);\n int posx2 = myGame.posX(myGame.playerPos(2)) + 20;\n int posy2 = myGame.posY(myGame.playerPos(2)) + 20;\n g2d.fill(new Rectangle(posx2, posy2, 20, 20));\n \n g2d.dispose();\n return img;\n }", "@Override\n\tpublic String toString() {\n\t\treturn (\"rect(\" + corner.x + \", \" + corner.y + \", \" + size.x + \", \"\n\t\t\t\t+ size.y + \")\");\n\t}", "public Image getCardPlayer3() {\n Random rand5 = new Random();\r\n randomNum5 = rand5.nextInt((52 - 1) + 1) + 1;\r\n Image p3 = new Image(\"/Images/cards/Card\" + randomNum5 + \".png\");\r\n return p3;\r\n }", "private void drawIntoRect(Graphics2D g2, BufferedImage image, Rectangle rect) {\r\n\t\tfor (int j = rect.y; j < rect.y + rect.height; j++) {\r\n\t\t\tfor (int k = rect.x; k < rect.x + rect.width; k++) {\r\n\t\t\t\tint x = xoff + Tile.toScreenX(k, j); \r\n\t\t\t\tint y = yoff + Tile.toScreenY(k, j); \r\n\t\t\t\tg2.drawImage(image, x - 1, y - image.getHeight(), null);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n protected void paintComponent(Graphics g) {\n\n Graphics2D g2d = (Graphics2D) g.create();\n g2d.setRenderingHint(\n RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setComposite(AlphaComposite.getInstance(\n AlphaComposite.SRC_OVER, opa));\n g2d.setColor(color);\n if (!round) {\n g2d.fillRect(0, 0, getWidth(), getHeight());\n } else {\n g2d.fillRoundRect(0, 0, getWidth(), getHeight(), corner, corner);\n }\n }", "protected void onDraw(Canvas canvas) {\n mRectSquare2.left = 0; //x = 0\n mRectSquare2.top = 0; //y = 0\n mRectSquare2.right = 470 + mRectSquare2.left; //x = 470\n mRectSquare2.bottom = mRectSquare2.top + 610; //y = 610\n\n //below are coordinate points for corners of the grey square\n\n mRectSquare.left = 50; // x = 50\n mRectSquare.top = 50; // y = 50\n mRectSquare.right = 380 + mRectSquare.left-10; // x = 430\n mRectSquare.bottom = mRectSquare.top + 510; // y = 560\n\n //below are coordinate points for corners of the green square\n\n mRectSquare1.left = 110; // x = 110\n mRectSquare1.top = 110; // y = 110\n mRectSquare1.right = 330 + mRectSquare.left-20; // x = 360\n mRectSquare1.bottom = mRectSquare.top + 450; // y = 500\n\n mPaintSquare2.setColor(Color.BLACK);\n\n mPaintSquare.setColor(Color.GRAY);\n\n mPaintSquare1.setColor(Color.GREEN);\n\n\n canvas.drawRect(mRectSquare2, mPaintSquare2);\n\n canvas.drawRect(mRectSquare, mPaintSquare);\n\n canvas.drawRect(mRectSquare1, mPaintSquare1);\n\n car_bm = BitmapFactory.decodeResource(getResources(), R.drawable.car);\n car_bm1 = BitmapFactory.decodeResource(getResources(), R.drawable.car);\n\n BitmapFactory.Options option = new BitmapFactory.Options(); //how dimensions of image is found\n option.inJustDecodeBounds = true;\n BitmapFactory.decodeResource(getResources(), R.drawable.car, option);\n carHeight = option.outHeight;\n carWidth = option.outWidth;\n\n// ImageView img1 = (ImageView)findViewById(R.drawable.car);\n// matrix.postRotate(-90);\n// Bitmap rotatedBitmap = Bitmap.createBitmap(car_bm, 0, 0, carWidth, carHeight, matrix, true );\n\n\n Matrix matrix = new Matrix();\n matrix.postRotate(90);\n Bitmap bmpBowRotated = Bitmap.createBitmap(car_bm, 0, 0, car_bm.getWidth(), car_bm.getHeight(), matrix, false);\n\nif(choose==0) {\n\n\n if(car_x>= 470)\n {\n //restart();\n }\n\n if(car_x<=0)\n {\n //restart();\n }\n if(car_y>=610)\n {\n //restart();\n }\n if(car_y<=0)\n {\n //restart();\n }\n\n\n if(car_x>=50 && car_x<110) //\n {\n\n\n if(car_y<=(110) && car_y>50) //\n {\n canvas.drawBitmap(bmpBowRotated, car_x, car_y, null);\n car_x = car_x + x_dir;\n\n }\n\n else if(car_y>(110-carHeight) && car_y<500+carHeight)\n {\n canvas.drawBitmap(car_bm, car_x, car_y, null);\n car_y = car_y - y_dir;\n\n }\n\n else if(car_y>=500+carHeight && car_y<560) //Upper left //commented\n {\n\n canvas.drawBitmap(car_bm, car_x, car_y, null);\n car_y = car_y - y_dir;\n\n }\n\n\n\n\n }\n\n if(car_x>110-carHeight && car_x<=(360)) //Upper right lane\n {\n if(car_y<=110+carHeight && car_y>=50) {\n\n canvas.drawBitmap(bmpBowRotated, car_x, car_y, null);\n car_x = car_x + x_dir;\n }\n else if (car_y>=500+carHeight && car_y<560)\n {\n canvas.drawBitmap(bmpBowRotated, car_x, car_y, null);\n car_x = car_x - x_dir;\n\n }\n\n }\n\n\n if(car_x>360 && carHeight<420) //Going Down\n {\n if(car_y<110 && car_y>=50) {\n\n canvas.drawBitmap(car_bm, car_x, car_y, null);\n car_y = car_y + y_dir;\n }\n\n else if(car_y>=110 && car_y<500+carHeight)\n {\n canvas.drawBitmap(car_bm, car_x, car_y, null);\n car_y = car_y + y_dir;\n\n }\n\n\n else if(car_y>=500 && car_y<560)\n {\n canvas.drawBitmap(bmpBowRotated, car_x, car_y, null);\n car_x = car_x - x_dir;\n\n }\n }\n\n\n\n\n}\n if(decide==0) {\n //Log.d(\"tag1\",\"inside decide 0\");\n\n invalidate(); //allows us to draw the Bitmap map again and again\n //clears everything is done in this method at the very end, Android then repeats itself\n //the x and y coordinates remember there values so they can be incremented\n }\n }" ]
[ "0.60895044", "0.59526604", "0.5926959", "0.5870881", "0.5855277", "0.5707544", "0.5700358", "0.56980085", "0.56771415", "0.5672512", "0.56688446", "0.5667702", "0.5610951", "0.5606824", "0.5586799", "0.555803", "0.55253935", "0.5514462", "0.55039245", "0.5501868", "0.5488161", "0.54573566", "0.54381573", "0.5418771", "0.54160666", "0.5395824", "0.53860176", "0.53797925", "0.53782773", "0.5363774", "0.53471833", "0.53446734", "0.5341157", "0.5337275", "0.5326415", "0.5325656", "0.53232515", "0.53215796", "0.53148544", "0.53136563", "0.53086895", "0.5285739", "0.5283937", "0.5279765", "0.5275176", "0.5267572", "0.52639353", "0.5259615", "0.5253173", "0.5250302", "0.52418554", "0.52353996", "0.5221879", "0.5220376", "0.52148736", "0.52118593", "0.52094334", "0.5205587", "0.5201205", "0.5198301", "0.51880604", "0.5187662", "0.51828444", "0.51760787", "0.51736766", "0.5168686", "0.5166977", "0.5165946", "0.51513565", "0.51418996", "0.5134589", "0.5134584", "0.51272005", "0.51247525", "0.5119591", "0.51139957", "0.5100403", "0.5093521", "0.50881886", "0.50879246", "0.5075426", "0.5074948", "0.50690913", "0.50686216", "0.5065639", "0.50586", "0.5057572", "0.5056978", "0.5056429", "0.5052748", "0.50506926", "0.5048402", "0.5046545", "0.5043431", "0.50414294", "0.50400615", "0.503814", "0.50346845", "0.50331706", "0.5032622", "0.5031756" ]
0.0
-1
TODO move this into RequestTask, so we just get back a card image ready to go
public boolean isAnimating() { return (mState != 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Image getCardImage(Card card) {\n return getImage(\"playing-cards/\" + card + \".png\");\n }", "public void retrieveDetailedImage(){\n //Build request for raw JSON data\n ImageRequest imageRequest = new ImageRequest(currentBook.thumbnail, new Response.Listener<Bitmap>() {\n @Override\n public void onResponse(Bitmap image) {\n //Image is returned\n mBackgroundImage.setImageBitmap(image);\n mBookImage.setImageBitmap(image); // Sets cover in case book was called from context where no cover provided\n }\n }, 5000, 5000, ImageView.ScaleType.CENTER, Bitmap.Config.RGB_565,\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n //Print error\n ErrorUtils.errorDialog(BookDetailsActivity.this, \"Could not connect to the server\", \"Could not connect to the server at this time, please try again later.\");\n }\n });\n //Start the JSON request\n queue.add(imageRequest);\n }", "public void generateCardImage() {\r\n\t\tString i1 = \"lib/card/\" + cardSuit + \"/\" + cardSuit + \" \"\r\n\t\t\t\t+ cardValue + \".PNG\";\r\n\t\tString i2 = \"lib/card/back2.PNG\";\r\n\t\t\r\n\t\tFile f1 = new File(i1);\r\n\t\tFile f2 = new File(i2);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tcardImage = ImageIO.read(f1);\r\n\t\t\tcardBack = ImageIO.read(f2);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(cardValue);\r\n\t\t\tSystem.out.println(cardSuit);\r\n\t\t}\r\n\t}", "public ImageIcon getCardPicture()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************** Start getCardPicture Method *****************/\n\n // Return card picture\n return picture;\n\n }", "@Override\n protected String getRequestedImage(HttpServletRequest req) {\n\treturn null;\n }", "public String getCardImageUrl(String cardName) {\n String fileName = cardName.replaceAll(\"\\\\s+\", \"\") + \".jpg\";\n URL url = getClass().getClassLoader().getResource(BASE + \"view/gui/images/cards/\" + fileName);\n if (url == null)\n return \"\";\n return url.toString();\n }", "private static Bitmap downloadImageTask(String src) {\n try {\n URL url = new URL(src);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap myBitmap = BitmapFactory.decodeStream(input);\n Log.i(LOG_TAG, \"won: \" + myBitmap);\n return myBitmap;\n } catch (IOException e) {\n Log.e(LOG_TAG, \"error while making book cover\", e);\n e.printStackTrace();\n return null;\n }\n }", "public Image getCardPlayer1() {\n Random rand = new Random();\r\n randomNum = rand.nextInt((52 - 1) + 1) + 1;\r\n Image p1 = new Image(\"/Images/cards/Card\" + randomNum + \".png\");\r\n return p1;\r\n }", "@Override\n\tprotected Card doInBackground(Void... params) {\n\t\t// TODO Auto-generated method stub\n\t\tcard=new Card();\n\t\t//API call\n\t\tresponse=apiHandler.makeServiceCall(url);\n\t\t\n\t\ttry {\n\t\t\tif(!response.equalsIgnoreCase(ApiConstants.BASE_URL_NOT_SET_WARNING_MSG)){ //base url and api secret is valid \n\t\t\t\tcardJsonObject= new JSONObject(response);\n\n\t\t\t\tString session=cardJsonObject.getString(ApiConstants.SESSION_TAG);\n\n\t\t\t\tif(session.equalsIgnoreCase(ApiConstants.SESSION_ACTIVE_VALUE)){ //Session active\n\t\t\t\t\t\n\t\t\t\t\tString isCardExist=cardJsonObject.getString(ApiConstants.EXIST_TAG);\n\t\t\t\t\t\n\t\t\t\t\tif(isCardExist.equalsIgnoreCase(ApiConstants.EXIST_VALUE)){ //card exist in server.\n\t\t\t\t\t\t\n\t\t\t\t\t\tcard.setCardID(cardJsonObject.getString(ApiConstants.CARD_ID_TAG));\n\t\t\t\t\t\tcard.setCardProjectID(cardJsonObject.getString(ApiConstants.PROJECT_ID_TAG));\n\t\t\t\t\t\tcard.setCardTitle(cardJsonObject.getString(ApiConstants.CARD_TITLE_TAG));\n\t\t\t\t\t\tcard.setCardTwitterSearch(cardJsonObject.getString(ApiConstants.CARD_TWITTER_TAG));\n\t\t\t\t\t\tcard.setCardContent(cardJsonObject.getString(ApiConstants.CARD_CONTENT_TAG));\n\t\t\t\t\t\tcard.setWarningMSG(cardJsonObject.getString(ApiConstants.EXIST_TAG));\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(isCardExist.equalsIgnoreCase(ApiConstants.NOT_EXIST_VALUE)){ //card not exist in server.\n\t\t\t\t\t\t\n\t\t\t\t\t\tisCardEmpty=true;\n\t\t\t\t\t}\n\t\t\t\t}else{ //session not active.\n\t\t\t\t\tisSessionExpired=true;\n\t\t\t\t\tcard.setWarningMSG(ApiConstants.SESSION_INACTIVE_VALUE);\n\t\t\t\t\tSystem.out.println(\"Session Expired on GetCard!!!\");\n\t\t\t\t}\n\n\t\t\t}else{ //base url and api secret is not valid\n\t\t\t\tcard.setWarningMSG(response);\n\t\t\t}\n\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"EXCEPTION AT GETCARD ASYNC TASK\");\n\t\t}\n\n\t\treturn card;\n\t}", "String getItemImage();", "public abstract String requestCard(byte[] messageRec) throws IOException;", "public Image getCardCroupier1() {\n Random rand2 = new Random();\r\n randomNum2 = rand2.nextInt((52 - 1) + 1) + 1;\r\n Image c1 = new Image(\"/Images/cards/Card\" + randomNum2 + \".png\");\r\n return c1;\r\n }", "private void extractCards() {\n String fileSeparator = System.getProperty(\"file.separator\");\n String path = System.getProperty(\"user.dir\");\n path = path + fileSeparator + \"Client\" + fileSeparator + \"src\" + fileSeparator + \"Images\" + fileSeparator;\n System.out.println(path);\n\n for (Picture p : cardlist) {\n BufferedImage image = null;\n try {\n image = javax.imageio.ImageIO.read(new ByteArrayInputStream(p.getStream()));\n File outputfile = new File(path + p.getName());\n ImageIO.write(image, \"png\", outputfile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "private byte[] getImage(){\n byte image[] = null;\n try {\n if(isImageGiven()) {\n image = getImageBytes();\n }\n }catch (IOException e){\n Toast.makeText(this,\"Error in Creating the image \"+e, Toast.LENGTH_SHORT).show();\n }\n return image;\n }", "@Override\n\t\t\tprotected void deliverResponse(Bitmap response) {\n\n\t\t\t}", "public void submitCard() {\n String description = cardDescription.getText().toString();\n String tag = LTAPIConstants.NAME_TO_TAG.get(cardTag.getSelectedItem().toString());\n String locationText = autoCompView.getText().toString();\n String CardAuthor = author.getText().toString();\n boolean test = photoFile == null;\n LTLog.debug(LOG_TAG, \"danjie: \" + test);\n String emptyComplain = buildSubmitEmptyComplain(\n Utils.isEmptyString(description), \"-1\".equals(tag),\n Utils.isEmptyString(locationText), photoFile == null,\n Utils.isEmptyString(CardAuthor));\n if (!Utils.isEmptyString(emptyComplain)) {\n ShowToast(emptyComplain);\n return;\n }\n TripCard tCard = ((NewTripCardActivity) getActivity()).getCurrentTripCard();\n if (Utils.isEnglishchar(description.trim().charAt(0))) {\n tCard.setDescriptionLang(\"en\");\n } else {\n tCard.setDescriptionLang(\"zh\");\n }\n// tCard.setTitle(cardTitle.getText().toString());\n tCard.setDescription(cardDescription.getText().toString());\n tCard.setCountry(location.getCountryCode());\n tCard.setCardAuthor(CardAuthor);\n tCard.setLocationFullName(locationText);\n tCard.setStatus(1);\n tCard.setGooglelocationid(location.getLocationId());\n // Associate the meal with the current user\n tCard.setAuthor(ParseUser.getCurrentUser());\n\n // Add the rating\n tCard.setTag(LTAPIConstants.NAME_TO_TAG.get(cardTag.getSelectedItem().toString()));\n\n // If the user added a photo, that data will be\n // added in the CameraFragment\n\n // Save the meal and return\n tCard.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e == null) {\n getActivity().setResult(Activity.RESULT_OK);\n getActivity().finish();\n } else {\n debugShowToast(\"Error saving: \" + e.getMessage());\n }\n }\n });\n }", "@GetMapping(\"{cardId}\")\n public Card getCardById(@PathVariable String cardId){\n return cardService.getCardById(cardId);\n // To service guy, grab the card object first, then iterate the \"finishedUsersId\"\n }", "public void loadCard(String cid) {\n\t\tmDisplayedCard = BitmapFactory.decodeResource(this.getResources(), R.drawable.card_base);\r\n\t\t\r\n\t}", "public Image getSemibreveRest();", "@Override\n public void run() {\n MotionEyeHelper helper = new MotionEyeHelper();\n helper.setUsername(device.getUser().getUsername());\n try {\n helper.setPasswordHash(device.getUser().getPassword());\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n\n String cameraId = camera.getId();\n String serverurl;\n if (device.getDdnsURL().length() > 5) {\n if ((Utils.getNetworkType(mContext)) == NETWORK_MOBILE) {\n serverurl = device.getDDNSUrlCombo();\n } else if (device.getWlan().networkId == Utils.getCurrentWifiNetworkId(mContext)) {\n serverurl = device.getDeviceUrlCombo();\n\n } else {\n serverurl = device.getDDNSUrlCombo();\n\n }\n } else {\n serverurl = device.getDeviceUrlCombo();\n\n }\n String baseurl;\n if (!serverurl.contains(\"://\"))\n baseurl = removeSlash(\"http://\" + serverurl);\n else\n baseurl = removeSlash(serverurl);\n\n String url = baseurl + \"/picture/\" + cameraId + \"/current?_=\" + new Date().getTime();\n url = helper.addAuthParams(\"GET\", url, \"\");\n String finalUrl = url;\n\n new DownloadImageFromInternet(holder, camera, this, time, loaded).execute(finalUrl);\n\n\n }", "Card getCard(UUID cardId);", "public Card(){\n this.name = \"\";\n this.description = \"\";\n this.element = null;\n this.img = \"\";\n }", "private void getProfilePic()\n {\n String url= LoginActivity.base_url+\"src/users/\"+String.format(\"%s/profilepics/prof_pic\",makeName(Integer.parseInt(userInfo[4])))+\".jpg\";\n ImageRequest request=new ImageRequest(\n url,\n new Response.Listener<Bitmap>()\n {\n @Override\n public void onResponse(Bitmap response)\n {\n ((ImageView)findViewById(R.id.image)).setImageBitmap(response);\n //imageView.setImageBitmap(response);\n Log.d(\"volley\",\"succesful\");\n }\n }, 0, 0, null,\n new Response.ErrorListener()\n {\n @Override\n public void onErrorResponse(VolleyError e)\n {\n Log.e(\"voley\",\"\"+e.getMessage()+e.toString());\n }\n });\n RequestQueue request2 = Volley.newRequestQueue(getBaseContext());\n request2.add(request);\n }", "public static Bitmap GetCardSoruceBitmap()\r\n\t{\r\n\t\tBitmap image = null;\r\n\t\tif(CGameHelper.m_GameContext != null)\r\n\t\t{\r\n\t\t\tResources res = CGameHelper.m_GameContext.getResources();\r\n\t\t\tif(res == null)\r\n\t\t\t\treturn image; \r\n\r\n\t\t\tif(IsPortraitMode())\r\n\t\t\t{\r\n\t\t\t\tif(m_CardBitmapProtrait == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tm_CardBitmapProtrait = BitmapFactory.decodeResource(res, R.drawable.card);\r\n\t\t\t\t}\r\n\t\t\t\timage = m_CardBitmapProtrait;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(m_CardBitmapLandscape == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tm_CardBitmapLandscape = BitmapFactory.decodeResource(res, R.drawable.card2);\r\n\t\t\t\t}\r\n\t\t\t\timage = m_CardBitmapLandscape;\r\n\t\t\t}\r\n\t\t} \r\n\t\treturn image;\r\n\t}", "public Image getCardPlayer2() {\n Random rand1 = new Random();\r\n randomNum1 = rand1.nextInt((52 - 1) + 1) + 1;\r\n Image p2 = new Image(\"/Images/cards/Card\" + randomNum1 + \".png\");\r\n return p2;\r\n }", "byte[] getRecipeImage(CharSequence query);", "public Image getCardCroupier2() {\n Random rand3 = new Random();\r\n randomNum3 = rand3.nextInt((52 - 1) + 1) + 1;\r\n Image c2 = new Image(\"/Images/cards/Card\" + randomNum3 + \".png\");\r\n return c2;\r\n }", "private Card aiRequestLogic()\n {\n Random randomCard = new Random(); // A placeholder is set aside for generating a random integer.\n return hand.get(randomCard.nextInt(hand.size())); // A card at a randomized index will be returned.\n }", "private void generateFirstCard() {\n List<MutableImage> images = new ArrayList<>();\n for (int i = 0; i < order; i++) {\n for (int j = 0; j < order; j++) {\n ImageImpl image = new ImageImpl(i * order + j);\n images.add(image);\n }\n ImageImpl image = new ImageImpl(order * order);\n images.add(image);\n arrayOfCardsInit.push(cardGenerator.generate(images));\n images.clear();\n }\n }", "@Override\n public void run() {\n ImageService.uploadProductImage(sequentialClient, gtin, imagePath, new\n PLYCompletion<ProductImage>() {\n @Override\n public void onSuccess(ProductImage result) {\n Log.d(\"UploadPImageCallback\", \"New image for product with GTIN \" + gtin + \" \" +\n \"uploaded\");\n LoadingIndicator.hide();\n if (isNewProduct) {\n SnackbarUtil.make(getActivity(), getView(), R.string.image_uploaded_more_info,\n Snackbar.LENGTH_LONG).show();\n } else {\n SnackbarUtil.make(getActivity(), getView(), R.string.image_uploaded, Snackbar\n .LENGTH_LONG).show();\n }\n DataChangeListener.imageCreate(result);\n }\n\n @Override\n public void onPostSuccess(ProductImage result) {\n loadProductImage(imagePath, productImage);\n }\n\n @Override\n public void onError(PLYAndroid.QueryError error) {\n Log.d(\"UploadPImageCallback\", error.getMessage());\n LoadingIndicator.hide();\n SnackbarUtil.make(getActivity(), getView(), error.getMessage(), Snackbar\n .LENGTH_LONG).show();\n }\n });\n }", "@Override\n\t\t\tpublic void onBizSuccess(String responseDescription, JSONObject data, String flag) {\n\t\t\t\ttry {\n\t\t\t\t\tString image_url = data.getString(\"image_url\");\n\t\t\t\t\tImageUtil.drawImageFromUri(image_url, img);\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "private void doNetGetImg() {\n\t\tString url = UploadUtils.PATIENTAPP_FILE_URL + CommonUtils.getTokenParam(activity) +\"&patientId=\"+orderMoreDetails.getPatientId()+\"&reportType=mr\";\n\t\tQJNetUICallback2 callback = new QJNetUICallback2<QjResult<HashMap<String,List<ImgQiNiuEntity>>>>(activity) {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(QjResult<HashMap<String,List<ImgQiNiuEntity>>> result) {\n\t\t\t\tif (result != null\n\t\t\t\t\t\t&& result.getResults() != null) {\n\t\t\t\t\tList<ImgQiNiuEntity> list = result.getResults().get(\"files\");\n\t\t\t\t\tif (list != null) {\n\n\t\t\t\t\t\tif (list.size()>=9) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbtn_upcase.setVisibility(View.GONE);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tbtn_upcase.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int i = 0; i < list.size(); i ++){\n\t\t\t\t\t\t\tImageItem item = new ImageItem();\n\t\t\t\t\t\t\titem.imagePath = list.get(i).getThumbnailUrl();\n\t\t\t\t\t\t\titem.upImagePath = list.get(i).getAbsFileUrl();\n\t\t\t\t\t\t\tdataChoosed.add(item);\n\t\t\t\t\t\t\tnoScrollgridview.setAdapter(adapter);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic void onError(Exception e, QjResult<HashMap<String,List<ImgQiNiuEntity>>> result) {\n\t\t\t\tsuper.onError(e, result);\n\t\t\t\tToastUtil.showToast(activity, \"获取失败!\",Toast.LENGTH_LONG);\n\t\t\t}\n\n\t\t\tpublic void onCompleted(Exception e, QjResult<HashMap<String,List<ImgQiNiuEntity>>> result) {\n\t\t\t\tsuper.onCompleted(e, result);\n\t\t\t}\n\t\t};\n\t\tNetOld.with(activity).fetch( url ,null, new TypeToken<QjResult<HashMap<String,List<ImgQiNiuEntity>>>>() {}, callback);\n\t}", "@Override\n protected Bitmap doInBackground(Void... params) {\n\n try {\n final String USER_IMAGE_URL = Network.forDeploymentIp + \"meetmeup/uploads/users/\" + this.filename;\n\n Log.d(\"Image\", USER_IMAGE_URL);\n\n URLConnection connection = new URL(USER_IMAGE_URL).openConnection();\n connection.setConnectTimeout(1000 * 30);\n\n return BitmapFactory.decodeStream((InputStream) connection.getContent(), null, null);\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void shuffleDeck() {\n JsonObjectRequest arrReq = new JsonObjectRequest(\n Request.Method.GET,\n url_shuffle,\n null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n currentDeckId = response.getString(\"deck_id\");\n card.setText(currentDeckId);\n\n } catch (Exception e) {\n\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n }\n\n );\n // Add the request we just defined to our request queue.\n // The request queue will automatically handle the request as soon as it can.\n requestQueue.add(arrReq);\n }", "public void requestImage(final ImageRequest request) {\n\n // If the request has no URL, abandon it\n if(request.mUrl==null){\n return;\n }\n\n // Create the image download runnable\n final ImageDownloadThread imageDownloadThread = new ImageDownloadThread(){\n\n public void run() {\n\n // Sleep the request for the specified time\n if(request!=null && request.mLoadDelay>0){\n try {\n Thread.sleep(request.mLoadDelay);\n } catch (InterruptedException e){\n if(ImageManager.DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n File file = null;\n\n // If the URL is not a local reseource, grab the file\n if(!getUrl().startsWith(\"content://\")){\n\n // Grab a link to the file\n file = new File(getFullCacheFileName(mContext, getUrl()));\n\n // If the file doesn't exist, grab it from the network\n if (!file.exists()){\n cacheImage( file, request);\n } \n\n // Otherwise let the callback know the image is cached\n else if(request!=null){\n request.sendCachedCallback(getUrl(), true);\n }\n\n // Check if the file is a gif\n boolean isGif = isGif(getUrl());\n\n // If the file downloaded was a gif, tell all the callbacks\n if( isGif && request!=null ){\n request.sendGifCallback(getUrl());\n }\n }\n\n // Check if we should cache the image and the dimens\n boolean shouldCache = false;\n int maxWidth = MAX_WIDTH;\n int maxHeight = MAX_HEIGHT;\n if(request!=null){\n maxWidth = request.mMaxWidth;\n maxHeight = request.mMaxHeight;\n shouldCache = request.mCacheImage;\n }\n\n // If any of the callbacks request the image should be cached, cache it\n if(shouldCache && \n (request!=null&&request.mContext!=null)||request==null){\n\n // First check the image isn't actually in the cache\n Bitmap bitmap = get(getUrl());\n\n // If the bitmap isn't in the cache, try to grab it\n // Or the bitmap was in the cache, but is of no use\n if(bitmap == null){\n\n if(!getUrl().startsWith(\"content://\")){\n bitmap = decodeBitmap(file, maxWidth, maxHeight);\n }else{\n Uri uri = Uri.parse(getUrl());\n try{\n InputStream input = mContext.getContentResolver().openInputStream(uri);\n bitmap = BitmapFactory.decodeStream(input);\n input.close();\n }catch(FileNotFoundException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }catch(IOException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n // If we grabbed the image ok, add to the cache\n if(bitmap!=null){\n addEntry(getUrl(), bitmap);\n }\n }\n\n // Send the cached callback\n if(request!=null){\n request.sendCallback(getUrl(), bitmap);\n }\n }\n }\n };\n\n // Set the url of the request\n imageDownloadThread.setUrl(request.mUrl);\n\n // Set the creation time of the request\n imageDownloadThread.setCreated(request.mCreated);\n\n // Assign a priority to the request\n if(request.mImageListener==null){\n // If there is no image listener, assign it background priority\n imageDownloadThread.setPriority(BACKGROUND_PRIORITY);\n }else{\n // If there is an image listener, assign it UI priority\n imageDownloadThread.setPriority(UI_PRIORITY);\n }\n\n // If the new request is not a duplicate of an entry of the active and \n // task queues, add the request to the task queue\n if(!mTaskQueue.contains(imageDownloadThread) && \n !mActiveTasks.contains(imageDownloadThread)){\n mThreadPool.execute(imageDownloadThread);\n }\n\n // If the request is a duplicate, add it to the blocked tasks queue\n else{\n mBlockedTasks.add(imageDownloadThread);\n }\n }", "public static Bitmap GetBasicCardNumberBitmap()\r\n\t{\r\n\t\tBitmap image = null;\r\n\t\tif(CGameHelper.m_GameContext != null)\r\n\t\t{\r\n\t\t\tResources res = CGameHelper.m_GameContext.getResources();\r\n\t\t\tif(res == null)\r\n\t\t\t\treturn image; \r\n\r\n\t\t\tif(m_BasicCardNumberBitmap == null)\r\n\t\t\t{\r\n\t\t\t\tm_BasicCardNumberBitmap = BitmapFactory.decodeResource(res, R.drawable.number);\r\n\t\t\t}\r\n\t image = m_BasicCardNumberBitmap;\r\n\t\t} \r\n\t\treturn image;\r\n\t}", "@Override\n protected String doInBackground(Void... voids) {\n Requesthandler requestHandler = new Requesthandler();\n calendar = Calendar.getInstance();\n imageData = imageToString(bitmap);\n dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n date = dateFormat.format(calendar.getTime());\n\n //creating request parameters\n HashMap<String, String> params = new HashMap<>();\n params.put(\"username\", username);\n params.put(\"email\", email);\n params.put(\"password\", password);\n params.put(\"gender\", gender);\n params.put(\"since\", date);\n params.put(\"avatar\", imageData);\n\n //returing the response\n return requestHandler.sendPostRequest(URLs.URL_REGISTER, params);\n }", "public static ImageIcon[] getCardImage(){\n\t\treturn cardImage;\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n //everything processed successfully\n if (requestCode == Image_Gallery_Request) {\n //image gallery correctly responds\n Uri imageUri = data.getData(); //address of image on SD Card\n InputStream inputStream; //declaring stream to read data from SD card\n try {\n inputStream = getContentResolver().openInputStream(imageUri);\n Bitmap imagebtmp = BitmapFactory.decodeStream(inputStream); //Puts stream data into bitmap format\n Profile_Picture.setImageBitmap(imagebtmp); //Loads Image to ImageView\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n //error message if image is unavailable\n Toast.makeText(this, \"Unable to open image\", Toast.LENGTH_LONG).show();\n }\n }\n }\n }", "private void addCard() {\n Intent intent = new Intent(this, NewCard.class);\n intent.putExtra(\"cardSetId\", cardSetId);\n startActivity(intent);\n }", "private void getDoctorImageRequest(String imageLink, final ImageView imageView) {\n ImageRequest request = new ImageRequest(AppConfig.LIVE_IMAGE_DOCTOR_API_LINK + imageLink,\n new Response.Listener<Bitmap>() {\n @Override\n public void onResponse(Bitmap bitmap) {\n imageView.setImageBitmap(bitmap);\n// pDialog.hide();\n }\n }, 0, 0, null,\n new Response.ErrorListener() {\n public void onErrorResponse(VolleyError error) {\n imageView.setImageResource(R.drawable.ic_doctor);\n// pDialog.hide();\n }\n });\n // Access the RequestQueue through your singleton class.\n AppController.getInstance().addToRequestQueue(request);\n }", "@Override\n protected void initialCardGeneration() {\n Intent intent = getIntent();\n if(intent != null)\n {\n if(intent.getBooleanExtra(\"cardPoolIntent\", false))\n {\n // Store card pools loaded in from elsewhere.\n Bundle bundle = intent.getExtras();\n openedCardPool = bundle.getParcelableArrayList(\"openedCardPool\");\n selectedCardPool = bundle.getParcelableArrayList(\"selectedCardPool\");\n\n // Gets the deck ID and stores it in case this was passed from MyDeckActivity.\n deckId = bundle.getInt(\"deckId\");\n\n // Update card counter button according to passed in selected card pool (deck).\n btnCardsInDeck.setText(selectedCardPool.size() + SEALED_DECK_NUM);\n }\n else\n {\n // Generate new cards according to Sealed rules, using the database. (6 boosters.)\n generateNewCards();\n }\n }\n else\n {\n // Generate new cards according to Sealed rules, using the database. (6 boosters.)\n generateNewCards();\n }\n }", "public void run() {\n if(request!=null && request.mLoadDelay>0){\n try {\n Thread.sleep(request.mLoadDelay);\n } catch (InterruptedException e){\n if(ImageManager.DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n File file = null;\n\n // If the URL is not a local reseource, grab the file\n if(!getUrl().startsWith(\"content://\")){\n\n // Grab a link to the file\n file = new File(getFullCacheFileName(mContext, getUrl()));\n\n // If the file doesn't exist, grab it from the network\n if (!file.exists()){\n cacheImage( file, request);\n } \n\n // Otherwise let the callback know the image is cached\n else if(request!=null){\n request.sendCachedCallback(getUrl(), true);\n }\n\n // Check if the file is a gif\n boolean isGif = isGif(getUrl());\n\n // If the file downloaded was a gif, tell all the callbacks\n if( isGif && request!=null ){\n request.sendGifCallback(getUrl());\n }\n }\n\n // Check if we should cache the image and the dimens\n boolean shouldCache = false;\n int maxWidth = MAX_WIDTH;\n int maxHeight = MAX_HEIGHT;\n if(request!=null){\n maxWidth = request.mMaxWidth;\n maxHeight = request.mMaxHeight;\n shouldCache = request.mCacheImage;\n }\n\n // If any of the callbacks request the image should be cached, cache it\n if(shouldCache && \n (request!=null&&request.mContext!=null)||request==null){\n\n // First check the image isn't actually in the cache\n Bitmap bitmap = get(getUrl());\n\n // If the bitmap isn't in the cache, try to grab it\n // Or the bitmap was in the cache, but is of no use\n if(bitmap == null){\n\n if(!getUrl().startsWith(\"content://\")){\n bitmap = decodeBitmap(file, maxWidth, maxHeight);\n }else{\n Uri uri = Uri.parse(getUrl());\n try{\n InputStream input = mContext.getContentResolver().openInputStream(uri);\n bitmap = BitmapFactory.decodeStream(input);\n input.close();\n }catch(FileNotFoundException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }catch(IOException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n // If we grabbed the image ok, add to the cache\n if(bitmap!=null){\n addEntry(getUrl(), bitmap);\n }\n }\n\n // Send the cached callback\n if(request!=null){\n request.sendCallback(getUrl(), bitmap);\n }\n }\n }", "private void getImage()\n {\n Log.d(TAG, \"initImageBitmaps: preparing bitmaps.\");\n db.collection(\"item\")\n .whereEqualTo(\"sellerID\", uid)\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n for (QueryDocumentSnapshot document : task.getResult()) {\n Log.d(TAG, document.getId() + \" => \" + document.getString(\"name\"));\n if (!document.getBoolean(\"soldStatus\")) {\n if (document.getString(\"image1\") != null) {\n urls.add(document.getString(\"image1\"));\n } else {\n urls.add(\"https://firebasestorage.googleapis.com/v0/b/we-sell-491.appspot.com/o/itemImages%2Fdefault.png?alt=media&token=d4cb0d3c-7888-42d5-940f-d5586a4e0a4a\");\n }\n String name = document.getString(\"name\");\n Double price = document.getDouble(\"price\");\n names.add(name);\n prices.add(price);\n id.add(document.getId());\n }\n }\n initRecyclerView();\n } else {\n Log.d(TAG, \"Error getting documents: \", task.getException());\n }\n }\n });\n }", "public CardRequest() {\r\n card = new MSRData(); // an empty one\r\n }", "@Override\r\n public Bitmap doInBackground(String... params) {\r\n\t\t\t// FIXME you need to actually do whatever with your errors\r\n\t\t\tInetAddress serverAddr;\r\n\t\t\tBitmap decodedImage = null;\r\n\t\t\ttry {\r\n serverAddr = InetAddress.getByName(SERVER_IP);\r\n\t\t\t\tSocket socket = new Socket(serverAddr,SERVER_PORT);\r\n\t\t\t\tPrintWriter printWriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())),true);\r\n\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));\r\n\t\t\t\t// Send librarycard\r\n\t\t\t\tString librarycard = params[0];\r\n\t\t\t\tprintWriter.println(librarycard);\r\n\t\t\t\t// FIXME I wasn't super sure what exactly was going on here, but you\r\n\t\t\t\t// need to return decodedImage when it is all good\r\n\t\t\t\tString line = null;\r\n\t\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\t\tfinal String strReceived = line;\r\n\t\t\t\t\tbyte[] imageBytes = Base64.decode(strReceived, Base64.DEFAULT);\r\n\t\t\t\t\tdecodedImage = BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n // FIXME handle error however you want\r\n\t\t\t}\r\n\t\t\t// return decodedImage here\r\n\t\t\treturn decodedImage;\r\n\t\t}", "@Override\n\tpublic void run() {\n\t\ttry {\n\n\n\t\t\tBitmap result = ImageService.getImage(ac,urlparams);\n\t\t\tLog.i(\"tan8\",\"url\"+urlparams);\n\t\t\tMessage ms = Message.obtain();\n\t\t\tms.what = what;\n\t\t\tms.obj = result;\n\t\t\tif (handler != null) {\n\t\t\t\thandler.sendMessage(ms);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n public void onSuccess(Uri uri) {\n ImageView imgProfile=(ImageView)findViewById(R.id.img_header_bg);\n Glide.with(MainActivity.this).load(uri)\n .crossFade()\n .thumbnail(0.5f)\n .bitmapTransform(new CircleTransform(MainActivity.this))\n .diskCacheStrategy(DiskCacheStrategy.ALL)\n .into(imgProfile);\n\n\n }", "@Override\n public void onSuccess(Uri uri) {\n item.setImage(uri.toString());\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == CAMERA_CAPTURE_IMAGE_REQUEST_CODE) {\n if (resultCode == RESULT_OK) {\n // successfully captured the image\n // display it in image view\n Utils.previewCapturedImage(this, realm, Integer.valueOf(station.getId()));\n //Toast.makeText(getApplicationContext(),intent.getStringExtra(\"id_station\"), Toast.LENGTH_SHORT).show();\n } else if (resultCode == RESULT_CANCELED) {\n // user cancelled Image capture\n Toast.makeText(getApplicationContext(),\n \"User cancelled image capture\", Toast.LENGTH_SHORT)\n .show();\n } else {\n // failed to capture image\n Toast.makeText(getApplicationContext(),\n \"Sorry! Failed to capture image\", Toast.LENGTH_SHORT)\n .show();\n }\n }\n }", "public ImageContainer getImage(String username, String imageName) {\r\n\t\tImageContainer ic;\r\n\t\tPoint p = StaticFunctions.hashToPoint(username, imageName);\r\n\t\t//If the image is saved on the bootstrap, loadImageContainer, otherwise start routing to the destinationPeer \r\n\t\tif(lookup(p)) {\r\n\t\t\ttry {\r\n\t\t\t\tic = loadImageContainer(username, imageName);\r\n\t\t\t\treturn ic;\r\n\t\t\t} catch (ClassNotFoundException | IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tString destinationPeerIP = routing(p).getIp_adresse();\r\n\t\t\tImage img = new PeerClient().getImage(destinationPeerIP, username, imageName);\r\n\t\t if(img != null) {\r\n\t\t \t ic = RestUtils.convertImgToIc(img);\r\n\t\t \t return ic;\r\n\t\t }\r\n\t\t}\r\n\t\treturn null;\r\n\t\t\r\n\t}", "public String getImage() { return image; }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t\tUri uri = dataContract.SOURCE_CONTENT_URI;\n\t\t\t\tif (catergory.equals(\"thumbnail\"))\n\t\t\t\t{\n\t\t\t\t\turi = dataContract.THUMBNAIL_CONTENT_URI;\n\t\t\t\t}\n\t\t\t\tUri dataUri = uri.buildUpon()\n\t\t\t\t\t\t\t.appendPath(giftId).build();\n\t\t\t\t\n\t\t\t\tbyte data[] = null;\n\t\t\t\tint dataRead = 0;\n\t\t\t\tint tdatalen = 0;\n\t\t\t\tint buffer_size = 2048;\n\t\t\t\ttry {\n\t\t\t\t\tInputStream in = resolver.openInputStream(dataUri);\n\t\t\t\t\tdata = new byte[buffer_size];\n\t\t\t\t\tdo {\n\t\t\t\t\t\tdataRead = in.read(data, tdatalen, buffer_size);\n\t\t\t\t\t\tif (dataRead != -1) {\n\t\t\t\t\t\t\tbyte tmp[] = new byte[data.length + buffer_size];\n\t\t\t\t\t\t\tSystem.arraycopy(data, 0, tmp, 0, data.length);\n\t\t\t\t\t\t\ttdatalen += dataRead;\n\t\t\t\t\t\t\tdata = tmp;\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (dataRead != -1);\n\t\t\t\t\tin.close();\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\tcatch (FileNotFoundException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tcatch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tMessage msg = Message.obtain(handler, PotlatchMsg.GET_DATA.getVal());\n\t\t\t\tBundle b = new Bundle();\n\t\t\t\tb.putByteArray(PotlatchConst.get_data, data);\n\t\t\t\tmsg.setData(b);\n\t\t\t\thandler.sendMessage(msg);\n\t\n\t\t\t}", "private Response<Bitmap> doParse(NetworkResponse response) {\n byte[] data = response.data;\n Bitmap bitmap;\n bitmap = ImageUtils.zipBitmap(data, mMaxWidth, mMaxHeight, mScaleType, mDecodeConfig);\n\n if (bitmap == null) {\n return Response.error(new ParseError(response));\n } else {\n return Response.success(bitmap, HttpHeaderParser.parseCacheHeaders(response));\n }\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();", "@Override\n protected Bitmap doInBackground(String... params) {\n Bitmap b = getImageBitmap(params[0]);\n return b;\n }", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();", "private void getUserImage(){\r\n \t//setProgressBarIndeterminateVisibility(true);\r\n \t\r\n \tusername=null;\r\n \tfor(int i=0; i<senderList.size(); i++) {\t// kovetkezo felhasznalo kepe\r\n \t\tString str=senderList.get(i);\r\n \t\tif (!userImage.containsKey(str)) {\r\n \t\t\tusername=str;\r\n \t\t\tbreak;\r\n \t\t}\r\n \t}\r\n \t\r\n \tif (username==null) return;\r\n \t\r\n\t String url = \"ImageDownload?size=medium&username=\" + username +\r\n\t \t\t\t\t\t\t \"&ssid=\" + UserInfo.getSSID();\r\n\t downloadUserImage = new HttpGetByteConnection(url, mHandler, TASK_GETUSERIMAGE);\r\n\t downloadUserImage.start();\r\n }", "public BufferedImage createImage(int taskId, Connection con, String imageName) throws SQLException, ServletException {\n return null;\n }", "@Override\n public void onResponse(final ImageLoader.ImageContainer response, boolean isImmediate) {\n if (circleImageView.getTag() != null && !circleImageView.getTag().equals(url))\n return;\n\n if (isImmediate && response.getBitmap() == null)\n {\n circleImageView.setImageResource(R.drawable.ic_profile);\n return;\n }\n\n if (response.getBitmap() != null)\n {\n if (!isScrolling)\n {\n circleImageView.setImageBitmap(response.getBitmap());\n }\n else\n {\n animateSides(circleImageView, !sender, new Animation.AnimationListener() {\n @Override\n public void onAnimationStart(Animation animation) {\n circleImageView.setImageBitmap(response.getBitmap());\n }\n\n @Override\n public void onAnimationEnd(Animation animation) {\n\n }\n\n @Override\n public void onAnimationRepeat(Animation animation) {\n\n }\n });\n\n circleImageView.getAnimation().start();\n }\n }\n }", "@Override\n\tpublic void requestImageReceived(CatchoomImage image)\n\t{\n\t\t\n//\t\tstartActivity(new Intent(RecognitionOnlyActivity.this, MainActivityVedio.class));\n\t\t\n\t\tBitmap bitmap = image.toBitmap();\n\t\t\n\t\tBitmap bitmapone = getBitmapFromAsset(\"accendo_logo.png\");\n\t\t\n\t\t/*if (bitmap.getWidth() == bitmapone.getWidth() && bitmap.getHeight() == bitmapone.getHeight())\n\t\t{*/\n\t int[] pixels1 = new int[bitmap.getWidth() * bitmap.getHeight()];\n\t int[] pixels2 = new int[bitmapone.getWidth() * bitmapone.getHeight()];\n\t bitmap.getPixels(pixels1, 0, bitmap.getWidth(), 0, 0, bitmap.getWidth(), bitmap.getHeight());\n\t bitmapone.getPixels(pixels2, 0, bitmapone.getWidth(), 0, 0, bitmapone.getWidth(), bitmapone.getHeight());\n\t if (!Arrays.equals(pixels1, pixels2)) \n\t {\n\t resultUrl=\"http://www.accendotechnologies.com/\";\n\t startActivity(new Intent(RecognitionOnlyActivity.this, VideoActivity.class));\n\t }\n\t else \n\t {\n\t \tresultUrl=\"\";\n\t }\n//\t } else\n//\t {\n//\t \tresultUrl=\"\";\n//\t }\n//\t\t\n\t\t\n\t\n\t\t\n//\t\tString imageName = image.toString();\n//\t\tString[] splitName = imageName.split(\"@\", imageName.length());\n//\t\tToast.makeText(getApplicationContext(), \"Image Name is \"+splitName[1], Toast.LENGTH_LONG).show();\n//\t\tf = new File(Environment.getExternalStorageDirectory()+\"/\"+splitName[1]+\".jpg\");\n//\t\ttry\n//\t\t{\n//\t\t\tFileOutputStream fout = new FileOutputStream(f);\n//\t\t\tbitmap.compress(Bitmap.CompressFormat.JPEG, 100, fout); \n//\t\t\tfout.flush();\n//\t\t\tfout.close();\n//\t\t}catch(Exception e)\n//\t\t{\n//\t\t\te.printStackTrace();\n//\t\t}\n//\t\t\n//\t\tImageAsync imasc = new ImageAsync();\n//\t\timasc.execute(f.toString());\n//\t\t\n//\t\tbitmap.recycle();\n//\t\t\n\t\t\n\t\t\n\n\t\t\n//\t\tmCloudRecognition.searchWithImage(COLLECTION_TOKEN,image);\n//\t\tstartActivity(new Intent(RecognitionOnlyActivity.this, MainActivityVedio.class));\n\t\t/**\n\t\t * chary\n\t\t * Need to write service code to send image.\n\t\t */\n\t\t\n\t}", "@Override\n public void onClick(View arg0) {\n if (questionEditText.getText().toString().trim().length() != 0 && answerEditText.getText().toString().trim().length() != 0\n && imageView.getVisibility() == View.VISIBLE){\n ContentValues cardValues = new ContentValues();\n cardValues.put(FlashProvider.CARDS_COLUMN_ROWID, rowID);\n cardValues.put(FlashProvider.CARDS_COLUMN_QUESTION, questionEditText.getText().toString());\n cardValues.put(FlashProvider.CARDS_COLUMN_ANSWER, answerEditText.getText().toString());\n cardValues.put(FlashProvider.CARDS_CLASSES_COLUMN, class_rowID);\n\n cROW_ID = class_rowID;\n\n Uri uri = getActivity().getContentResolver().insert(FlashProvider.CARDS_CONTENT_URI, cardValues);\n rowID = ContentUris.parseId(uri);\n\n ContentValues withImage;\n withImage = addImage(rowID, bitmap);\n\n getActivity().getContentResolver().update(\n ContentUris.withAppendedId(FlashProvider.CARDS_IMAGE_CONTENT_URI, rowID), withImage, null, null);\n\n listener.onAddEditCardSuccess(rowID);\n }\n\n else {\n\n if (questionEditText.getText().toString().trim().length() < 7){\n questionEditText.setError(\"Question is too short\");\n }\n\n else if (answerEditText.getText().toString().trim().length() == 0) {\n answerEditText.setError(\"Answer cannot be Empty\");\n }\n\n else if (imageView.getVisibility() != View.VISIBLE) {\n DialogFragment errorSavingCard = new DialogFragment() {\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n //declare the AlertDialog\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.error_message_image);\n builder.setPositiveButton(R.string.ok, null);\n return builder.create();\n }\n };\n errorSavingCard.show(getFragmentManager(), \"Error saving Card\");\n }\n\n }\n\n }", "@Override\r\n public void onResponse(String response) {\n loadImageInGUI(response);\r\n Utility.writeOnPreferences(activity, \"image\", response);\r\n Utility.reloadActivity(activity);\r\n\r\n }", "private void storeImage(Boolean hasImage){\n if (hasImage) {\r\n RequestQueue queue = Volley.newRequestQueue(getBaseContext());\r\n final String command = getString(R.string.server_address) + \"/\" + getString(R.string.get_image_server)\r\n + \"username=\" + username;\r\n// Request a string response from the provided URL.\r\n StringRequest stringRequest = new StringRequest(Request.Method.GET, command,\r\n new Response.Listener<String>() {\r\n @Override\r\n public void onResponse(String response) {\r\n // Display the first 500 characters of the response string.\r\n //Log.d(\"ddd\", \"command :\" + command);\r\n //Log.d(\"ddd\", \"writing :\" + response);\r\n loadImageInGUI(response);\r\n Utility.writeOnPreferences(activity, \"image\", response);\r\n Utility.reloadActivity(activity);\r\n\r\n }\r\n }, new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n //Log.d(\"aaa\", error.toString());\r\n }\r\n\r\n });\r\n\r\n// Add the request to the RequestQueue.\r\n queue.add(stringRequest);\r\n }\r\n }", "@Override\n public void run() {\n try {\n Drawable drawable = Drawable.createFromStream(new URL(image_path).openStream(), \"\");\n\n Message message = Message.obtain();\n message.obj = drawable;\n handler.sendMessage(message);\n } catch (MalformedURLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "private void onCreateCardSuccess(Response response) throws IOException {\n Gson gson = new Gson();\n Type type = new TypeToken<Map<String, Object>>(){}.getType();\n\n Map<String, Object> responseMap = gson.fromJson(\n Objects.requireNonNull(response.body()).string(), type\n );\n\n\n paymentMethodId = Objects.requireNonNull(responseMap.get(\"id\")).toString();\n\n //Create new payment method for Parse\n PaymentMethods pay = new PaymentMethods();\n pay.setStripeId(paymentMethodId);\n pay.setBrand(card.getBrand().toString());\n pay.setExpMonth(card.getExpMonth());\n pay.setExpYear(card.getExpYear());\n pay.setLast4(card.getLast4());\n pay.setUser(ParseUser.getCurrentUser());\n pay.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if(e == null) {\n Toast.makeText(getApplicationContext(), \"New Card Added.\", Toast.LENGTH_LONG).show();\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(i);\n }\n else\n {\n Toast.makeText(getApplicationContext(), \"Card Failed to add to database.\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n }\n });\n\n }", "@Override\n public void onResponse(ImageLoader.ImageContainer response, boolean isImmediate) {\n if(response.getBitmap() != null){\n image.setImageBitmap(response.getBitmap());\n }\n }", "java.lang.String getProfileImage();", "@Override\n protected Bitmap doInBackground(String... params) {\n try {\n contacted_Image = ImageLoaderAPI.AzureImageDownloader(params[0]);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n Log.d(\"AsyncLoadImage\", e.getMessage());\n }\n\n return contacted_Image;\n }", "public Image getCardCroupier3() {\n Random rand9 = new Random();\r\n randomNum9 = rand9.nextInt((52 - 1) + 1) + 1;\r\n Image c3 = new Image(\"/Images/cards/Card\" + randomNum9 + \".png\");\r\n return c3;\r\n }", "protected abstract LoadBitmapImageTask<Entity> createNewLoadBitmapImageTask();", "public void ImageCreate(){\n Picasso.get().load(url).into(imageView);\n }", "private void getNewImage() {\n try {\n URL imageUrl = new URL(path);\n URLConnection uc = imageUrl.openConnection();\n\n InputStream is = uc.getInputStream();\n BufferedInputStream bis = new BufferedInputStream(is);\n\n ByteArrayOutputStream buffer = new ByteArrayOutputStream();\n int current;\n while ((current = bis.read()) != -1) {\n buffer.write((byte) current);\n }\n final byte[] data = buffer.toByteArray();\n // enqueue UI update as a priority\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n public void run() {\n view.setImageBitmap(BitmapFactory.decodeByteArray(\n data, 0, data.length));\n }\n });\n // update database while that is queueing\n ContentValues values = new ContentValues();\n values.put(MovieEntry.COLUMN_POSTER, data);\n context.getContentResolver().update(MovieEntry.buildMovieUriWithId(movieId),\n values, null, null);\n } catch (Exception E) {\n Log.i(TAG, E.toString());\n E.printStackTrace();\n }\n }", "@Override\n protected String doInBackground(String... params) {\n bitmap = DownloadImageBitmap(url);\n return null;\n }", "public Image getCardPlayer3() {\n Random rand5 = new Random();\r\n randomNum5 = rand5.nextInt((52 - 1) + 1) + 1;\r\n Image p3 = new Image(\"/Images/cards/Card\" + randomNum5 + \".png\");\r\n return p3;\r\n }", "protected BufferedImage createImage() throws InterruptedException {\r\n try {\r\n // block until thread comes back.\r\n if (futureTask != null) {\r\n image = futureTask.get();\r\n }\r\n if (image == null) {\r\n image = call();\r\n }\r\n } catch (InterruptedException e) {\r\n Thread.currentThread().interrupt();\r\n logger.fine(\"Image loading interrupted\");\r\n throw new InterruptedException(e.getMessage());\r\n } catch (Exception e) {\r\n logger.log(Level.WARNING, \"Image loading execution exception\", e);\r\n }\r\n return image;\r\n }", "public UnoCard getCardByName(String cardName){\n Drawable color_change_plus4 = this.appContext.getResources().getDrawable(R.drawable.color_change_plus4);\n Drawable card_back = this.appContext.getResources().getDrawable(R.drawable.card_back);\n UnoCard card = new UnoCard(this.appContext, deckPos, new Point(20, 20), color_change_plus4, card_back, \"Color Change Plus 4\", \"\", \"COLOR CHANGE PLUS 4\", \"COLOR CHANGE PLUS 4\");\n for (UnoCard c : this.cards){\n if (c.getName().equals(cardName)){\n card = c;\n break;\n }\n }\n return card;\n }", "private Card init_fulfilled_card() {\n\t\t\n\t\tFulfilledCard card = new FulfilledCard(getActivity());\n\t\t\n\t\tCardExpand expand = new CardExpand(getActivity());\n\t\tcard.addCardExpand(expand);\n\t\tcard.setBackgroundResource(getResources().getDrawable(R.drawable.card_back));\n\t\treturn card;\n\t}", "byte[] getProfileImage();", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch (requestCode) {\n case PICK_FROM_GALLERY_REQUEST_CODE:\n if (resultCode == RESULT_OK) {\n Uri targetUri = data.getData();\n String path = ImageFilePath.getPath(this, data.getData());\n Bitmap bitmap;\n try {\n bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), targetUri);\n Bitmap finalBitmap = BitmapMods.modifyOrientation(bitmap, path);\n mImages.add(BitmapMods.getResizedBitmap(finalBitmap, 400));\n initializeRecyclerView();\n } catch (Exception e) {\n onPhotoError();\n e.printStackTrace();\n }\n }\n break;\n\n case PICK_FROM_CAMERA_REQUEST_CODE:\n if (resultCode == RESULT_OK) {\n try {\n @SuppressWarnings(\"ConstantConditions\") Bitmap photo = (Bitmap) data.getExtras().get(\"data\");\n mImages.add(photo);\n initializeRecyclerView();\n } catch (Exception e) {\n onPhotoError();\n e.printStackTrace();\n }\n }\n }\n }", "@Override\n public ResponseEntity<CardInformation> getDetails(final String cardId) {\n\n RestTemplate restTemplate = new RestTemplate();\n String resourceUrl = thridPartyURL.concat(cardId);\n\n CardInformation cardInfo;\n ResponseEntity<CardInformation> response;\n\n try {\n cardInfo = restTemplate.getForObject(resourceUrl, CardInformation.class);\n response = new ResponseEntity<>(cardInfo, HttpStatus.OK);\n } catch (Exception e) {\n response = new ResponseEntity<>(HttpStatus.NOT_FOUND);\n return response;\n }\n\n updateHitCount(cardId);\n return response;\n\n }", "private void cards() {\n newUserCard();\n editTypeCard();\n changePasswordCard();\n }", "@Override\r\n\tpublic int requestCard (ArrayList<Card> cardsAlreadyRequested) {\n\t\treturn (int)(Math.random() * 13);\r\n\t}", "public static void loadCircleImage(Context context, ParseFile image, ImageView slot){\n RequestOptions circleProp = new RequestOptions();\n circleProp = circleProp.transform(new CircleCrop());\n Glide.with(context)\n .load(image != null ? image.getUrl() : R.drawable.profile_image_empty)\n .placeholder(R.drawable.profile_image_empty)\n .apply(circleProp)\n .into(slot);\n }", "@GET\n\t@Produces(MediaType.TEXT_PLAIN)\n\tpublic byte[] returnPicture(){\n \t return ContainerPicture.picture;\n \t}", "public void createCard(final WebsiteInterface.WebsiteResult verification){\n Response.Listener<JSONObject> createCard = setResponse(verification);\n //start the network request\n NetworkRequest networkRequest = new NetworkRequest(this.appContext);\n //Set the api endpoint\n String api = WebsiteInterface.CREATE_CARD;\n //set method to be POST request\n int method = networkRequest.getMethod(\"POST\");\n try {\n //set the body of the json post request\n JSONObject toPost = new JSONObject(\n \"{\\\"id\\\": \"+ id + \", \\\"front\\\": \"+ question + \", \\\"back\\\": \"+ answer + \"}\"\n );\n //send the network request to the Volley queue\n networkRequest.addToRequestQueue(new JsonObjectRequest(\n method,\n api,\n toPost,\n createCard,\n error\n ));\n } catch (JSONException e) {\n Log.e(\"FlashCard insertcard\", e.getMessage());\n }\n }", "@Override\n public void onSuccess(Uri uri){\n Glide.with(getActivity()).load(uri.toString()).placeholder(R.drawable.round_account_circle_24).dontAnimate().into(profilepic);\n }", "void imageChooser() {\n\n // create an instance of the\n // intent of the type image\n Intent i = new Intent();\n i.setType(\"image/*\");\n i.setAction(Intent.ACTION_GET_CONTENT);\n\n\n // pass the constant to compare it\n // with the returned requestCode\n startActivityForResult(Intent.createChooser(i, \"Select Picture\"), SELECT_PICTURE);\n }", "@Override\n public void run() {\n Bitmap bmp = getURLimage(imageUrl);\n Message msg = new Message();\n msg.what = 0;\n msg.obj = bmp;\n handle.sendMessage(msg);\n }", "private void getTransferDataFromActivity() {\n Gson gson = new Gson();\n manageRest_manageDish = getIntent();\n transferData = manageRest_manageDish.getExtras();\n\n rest_id = transferData.getInt(\"restID\");\n String dishJSON = transferData.getString(\"dishJSON\");\n dish = gson.fromJson(dishJSON, Dish.class);\n\n // Check null pointer and shut down activity\n if (dish == null) {\n Toast.makeText(this,\n \"Dish object is null. Are you forgot to create it?\",\n Toast.LENGTH_LONG).show();\n finish();\n }\n\n if (!dish.getUrlImage().isEmpty())\n imagesUri.add(Uri.parse(dish.getUrlImage()));\n }", "@GET\n @Path(\"image\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response voidImage() {\n return Response.status(Response.Status.NOT_FOUND).build();\n }", "@Override\n protected void onPostExecute(Bitmap bitmap) {\n // Check that the list and bitmap are not null.\n if (mDroidCardsReference != null && bitmap != null) {\n // Create a new DroidCard.\n mDroidCards.add(new DroidCard(droid, bitmap));\n }\n }", "@Override\n\t\t\tprotected Response<Bitmap> parseNetworkResponse(\n\t\t\t\t\tNetworkResponse response) {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\r\n\tprotected String doInBackground(Integer... arg0) {\n\t\tmData.loadSpecificImage(mImageName, mImageView);\r\n\t\treturn null;\r\n\t}", "@GetMapping(\"/card/{num}\")\n StarbucksCard getOne(@PathVariable String num, HttpServletResponse response) {\n StarbucksCard card = repository.findByCardNumber(num);\n if (card == null) {\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"Error--Card not found\");\n }\n return card;\n }", "com.google.protobuf.ByteString getCards();", "public interface FaroProfileImageDo {\n URL getPublicUrl();\n ImageProvider getImageProvider();\n boolean isThumbnail();\n}", "java.lang.String getImage();", "@Override\n public Void call() throws Exception {\n ContractDetailFragment.this.contract = contract;\n verifyIdentity = contract.getVerifyIdentity().get();\n state = contract.getState().get();\n seller = contract.getSeller().get();\n\n //check if the local content matches the remote content hash (used for light contracts only)\n final boolean contentVerified = contract.verifyContent().get();\n\n final String description = contract.getDescription().get();\n final String title = contract.getTitle().get();\n final List<String> imageSignatures = contract.getImageSignatures().get();\n\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n if(verifyIdentity && contract.getUserProfile().getVCard() == null)\n {\n //hide interaction view and display notification if identity verification is required\n contractInteractionView.setVisibility(View.GONE);\n appContext.getMessageService().showMessage(\"You must first scan the user profile of the other party to interact with this contract!\");\n }\n\n if(!contentVerified)\n {\n //notify the user that the local and remote content do not match (only for light contracts)\n //This can happen when the user scanned the contract by QR-Code and the contract contains images...\n appContext.getMessageService().showMessage(\"The content for this local contract could not be verified.\\n Please try to import the contract again.\");\n }\n\n //create a bitmap image that contains a QR code with all the details of the contract\n Bitmap bm = QRCode.from(contract.toJson()).withSize(250, 250).bitmap();\n qrImageView.setImageBitmap(bm);\n\n //init text views\n stateView.setText(state.toString());\n titleView.setText(title);\n descriptionView.setText(description);\n addressView.setText(contract.getContractAddress());\n\n //add images to container\n imageContainer.removeAllViews();\n images.clear();\n\n if(imageSignatures != null)\n {\n for(String sig : imageSignatures)\n {\n addImage(contract.getImages().get(sig));\n }\n }\n }\n });\n\n return null;\n }", "public static ImageIcon getCardImage(Card card) {\r\n // Use image order, which is different from value order.\r\n String CardImageFileName = card.getCardImg();\r\n String path = String.format(IMAGE_PATH_FORMAT, CardImageFileName);\r\n return getIcon(path);\r\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tswitch (requestCode) {\n\t\tcase PICK_IMAGE:\n\t\t\tif (resultCode == Activity.RESULT_OK) {\n\t\t\t\ttry {\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"activity result called for catalog webview class\");\n\t\t\t\t\t// new accesstheimagesfromUri().execute();\n\t\t\t\t\tSystem.out.println(\"Catalog list size is\"\n\t\t\t\t\t\t\t+ queueItemforApproval.size());\n\t\t\t\t\tindex = queueItemforApproval.size();\n\t\t\t\t\tcallbitmapmethod();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}" ]
[ "0.68208784", "0.65054077", "0.6224112", "0.5937966", "0.5880058", "0.58254474", "0.5816917", "0.57290286", "0.5728182", "0.56986207", "0.5682678", "0.567147", "0.5655051", "0.56291807", "0.5588423", "0.5585652", "0.5584911", "0.5581786", "0.5571461", "0.55660635", "0.55660176", "0.555306", "0.55324346", "0.552397", "0.55071455", "0.5494507", "0.54902864", "0.5483932", "0.5476716", "0.5462313", "0.5454793", "0.54536897", "0.54309213", "0.5420059", "0.5419589", "0.5407916", "0.54065275", "0.5404078", "0.54021823", "0.54014295", "0.53987175", "0.53948206", "0.5393325", "0.53921235", "0.53884834", "0.53882277", "0.5380337", "0.5363071", "0.53624105", "0.53432363", "0.5338837", "0.53363365", "0.53354555", "0.5329161", "0.5324358", "0.53141564", "0.5309586", "0.5301743", "0.52989393", "0.52989036", "0.52960634", "0.52935255", "0.5285028", "0.52825487", "0.5265947", "0.5265568", "0.52604777", "0.52585053", "0.52499354", "0.5246511", "0.52429086", "0.5241254", "0.5239682", "0.52379173", "0.5222942", "0.5217356", "0.521685", "0.52164817", "0.52138346", "0.521146", "0.5206173", "0.5204156", "0.51998633", "0.5197213", "0.5186346", "0.5186087", "0.51844066", "0.5181281", "0.5179644", "0.51777923", "0.51740986", "0.51725984", "0.51722276", "0.51561046", "0.515556", "0.51554817", "0.5154261", "0.5151804", "0.5145521", "0.514339", "0.5140989" ]
0.0
-1
This method returns this object's policy context identifier.
public String getContextID() throws PolicyContextException { checkSetPolicyPermission(); return this.CONTEXT_ID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getContextId();", "public String getContextId() {\n return contextId;\n }", "public int getContextId() {\n return contextId;\n }", "public java.lang.CharSequence getContextId() {\n return contextId;\n }", "public java.lang.CharSequence getContextId() {\n return contextId;\n }", "String currentProduct() {\n if (PageFlowContext.getPolicy() != null && PageFlowContext.getPolicy().getProductTypeId() != null) {\n return PageFlowContext.getPolicy().getProductTypeId();\n } else {\n return \"\";\n }\n }", "public String getPolicyName() {\n \t\treturn policyName;\n \t}", "protected java.security.Policy getPolicy(){\n\tif (stateIs(INSERVICE_STATE)) {\n\t return this.policy;\n\t} \n\tif (logger.isLoggable(Level.FINEST)) {\n\t logger.finest(\"JACC Policy Provider: getPolicy (\"+CONTEXT_ID+\") is NOT in service\");\n\t}\n\treturn null;\n }", "public java.lang.String getPolicyNo() {\n return policyNo;\n }", "public java.lang.String getPolicyNo() {\n return policyNo;\n }", "public String getHandleIdentifier() {\n \t\tif (contexts.values().size() == 1) {\n \t\t\treturn contexts.keySet().iterator().next();\n \t\t} else {\n \t\t\treturn null;\n \t\t}\n \t}", "@java.lang.Override public int getContextValue() {\n return context_;\n }", "@Nullable\n default String getContext() {\n String contextName =\n String.valueOf(execute(DriverCommand.GET_CURRENT_CONTEXT_HANDLE).getValue());\n return \"null\".equalsIgnoreCase(contextName) ? null : contextName;\n }", "@java.lang.Override public int getContextValue() {\n return context_;\n }", "public java.lang.String getOuterContextId() {\n java.lang.Object ref = outerContextId_;\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 outerContextId_ = s;\n return s;\n }\n }", "public java.lang.String getOuterContextId() {\n java.lang.Object ref = outerContextId_;\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 outerContextId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getContext() {\n\t\treturn this.getClass().getSimpleName();\n\t}", "public Long getReturnpolicyId() {\r\n return returnpolicyId;\r\n }", "@Override\n public Exp getBasePolicyCode() {\n return null;\n }", "Policy _get_policy(int policy_type);", "public String getContext() {\r\n\t\treturn context;\r\n\t}", "public com.vmware.converter.DVSPolicy getPolicy() {\r\n return policy;\r\n }", "public String getContext() { return context; }", "public String getContext() {\n\t\treturn context;\n\t}", "public String getContext() {\n return context;\n }", "public String getContext() {\n return context;\n }", "public String getContext() {\n return context;\n }", "long getProposalId();", "public java.lang.String getPolicyURL() {\n return policyURL;\n }", "public com.google.protobuf.ByteString\n getOuterContextIdBytes() {\n java.lang.Object ref = outerContextId_;\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 outerContextId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getContextProperty() {\n return _contextProperty;\n }", "public String getPolicyGroupName() \n {\n return policyGroupName;\n }", "long getCurrentContext();", "public java.lang.String getContext() {\n java.lang.Object ref = context_;\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 context_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getContextIdentifier(HttpServletRequest httpServletRequest) {\n return null;\n }", "public static String getTransId() {\n\n return MDC.get(MDC_KEY_REQUEST_ID);\n }", "@Attribute(order = 100, validators = { RequiredValueValidator.class })\n\t\tString policyName();", "public String getID(){\n return this.getKey().getTenantId(this.getTenantName());\n }", "public String getPId() {\n return (String)getAttributeInternal(PID);\n }", "public static String getPolicyString(short policy) {\n\t\treturn POLICY_STRINGS[policy];\n\t}", "public String getAuthTemplateId() {\n return getProperty(Property.AUTH_TEMPLATE_ID);\n }", "public com.google.protobuf.ByteString\n getOuterContextIdBytes() {\n java.lang.Object ref = outerContextId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n outerContextId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String currentKeyIdentifier() {\n return this.currentKeyIdentifier;\n }", "public String getId()\n\t{\n\t\treturn getId( getSession().getSessionContext() );\n\t}", "public static int getCurrentId() {\n return currentId;\n }", "public int getPolicyID(int policy_id) {\n int id = 0;\n try {\n checkPolicyID.setInt(1, policy_id);\n ResultSet resultset = checkPolicyID.executeQuery();\n while (resultset.next()) {\n id = resultset.getInt(\"policy_id\");\n System.out.println(\"Policy ID: \" + id);\n }\n resultset.close();\n }\n catch (SQLException exception) {\n System.out.println(\"Invalid Input!\");\n }\n return id;\n }", "java.lang.String getLinkedContext();", "public String getContextString();", "public String getAbyssPolicy()\n {\n return m_AbyssPolicy;\n }", "public final String getResourceId(\n ExecutionContext context,\n ExecutionScript script) throws InterruptedException, IOException {\n return resourceId;\n }", "@Override\n public String getIdentifier() {\n return myIdentity.getIdentifier();\n }", "protected Integer getCurrentUtilityId() {\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\n AuthenticatedUser user = null;\n\n if (auth.getPrincipal() instanceof AuthenticatedUser) {\n user = (AuthenticatedUser) auth.getPrincipal();\n }\n\n if (user != null) {\n return user.getUtilityId();\n }\n\n return null;\n }", "public PolicyIDImpl() {\n super();\n }", "public Element getSelectedPolicyElement() {\n Element selectedPolicyElement = null;\n IStructuredSelection categoriesCompositeSelection =\n (IStructuredSelection) getTreeViewer().getSelection();\n\n if (!categoriesCompositeSelection.isEmpty()) {\n Element selectedElement = (Element)\n categoriesCompositeSelection.getFirstElement();\n\n if (selectedElement.getName().\n equals(DeviceRepositorySchemaConstants.\n POLICY_ELEMENT_NAME)) {\n selectedPolicyElement = selectedElement;\n }\n }\n return selectedPolicyElement;\n }", "public String getTraceContextString() {\n Map<String, String> traceInfo = getTraceContext();\n if (traceInfo == null) {\n DDLogger.getLoggerImpl().debug(\"No Trace/Log correlation IDs returned\");\n return \"\";\n }\n\n String traceID = traceInfo.get(this.tracing.TRACE_ID_KEY);\n String spanID = traceInfo.get(this.tracing.SPAN_ID_KEY);\n return formatTraceContext(this.tracing.TRACE_ID_KEY, traceID, this.tracing.SPAN_ID_KEY, spanID);\n }", "public String getOid() {\n return getProperty(Property.OID);\n }", "public java.lang.String getContext() {\n java.lang.Object ref = context_;\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 context_ = s;\n return s;\n }\n }", "@Override\n public Response throttlingPoliciesApplicationPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy appPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, appPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n ApplicationThrottlePolicyDTO policyDTO =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyToDTO(appPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while retrieving Application level policy: \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "String serviceId(RequestContext ctx) {\n\n String serviceId = (String) ctx.get(SERVICE_ID);\n if (serviceId == null) {\n log.info(\"No service id found in request context {}\", ctx);\n }\n return serviceId;\n }", "public String getPolicy() {\r\n String policy = \"\";\r\n if (!policyRules.isEmpty()) {\r\n policy += policyRules.get(0).getRule().trim();\r\n for (int i = 1; i < policyRules.size(); i++) {\r\n policy += \",\" + policyRules.get(i).getRule().trim();\r\n }\r\n }\r\n\r\n return policy.trim();\r\n }", "public int getIdentifier()\n {\n return identifier;\n }", "public Object getIdentifier() {\n return identifier;\n }", "public String getCurrentRequestId()\n\t{\n\t\tString reqID = (String) MDC.get(REQUEST_ID);\n\t\tif (reqID == null || \"\".equals(reqID))\n\t\t{\n\t\t\treqID = \"RID_\" + UUID.randomUUID().toString();\n\t\t\tMDC.put(REQUEST_ID, reqID);\n\t\t}\n\t\treturn reqID;\n\t}", "public String getContextId(String contextName) throws Exception {\n return getContextInfo(contextName).getValue(\"id\").toString();\n }", "public String getKeyId() {\n return getProperty(KEY_ID);\n }", "public String getIdentifier()\n {\n return identifier;\n }", "java.lang.String getContext();", "Context getContext();", "@ApiAudience.Public\[email protected]\[email protected]\npublic interface PolicyContext {\n\n /**\n * Get the KijiDataRequest which triggered this freshness check.\n *\n * @return The KijiDataRequest issued by the client for this.\n */\n KijiDataRequest getClientRequest();\n\n /**\n * Get the name of the column to which the freshness policy is attached.\n *\n * @return The name of the column to which the freshness policy is attached.\n */\n KijiColumnName getAttachedColumn();\n\n /**\n * Get the Configuration associated with the Kiji instance for this context.\n *\n * @return The Configuration associated with the Kiji instance for this context.\n */\n Configuration getConfiguration();\n\n /**\n * Opens a KeyValueStore associated with storeName for read-access.\n *\n * <p>The user does not need to call <code>close()</code> on KeyValueStoreReaders returned by\n * this method; any open KeyValueStoreReaders will be closed automatically by the\n * KijiProducer/Gatherer/BulkImporter associated with this Context.</p>\n *\n * <p>Calling getStore() multiple times on the same name will reuse the same\n * reader unless it is closed.</p>\n *\n * @param <K> The key type for the KeyValueStore.\n * @param <V> The value type for the KeyValueStore.\n * @param storeName the name of the KeyValueStore to open.\n * @return A KeyValueStoreReader associated with this storeName, or null\n * if there is no such KeyValueStore available.\n * @throws IOException if there is an error opening the underlying storage resource.\n */\n <K, V> KeyValueStoreReader<K, V> getStore(String storeName) throws IOException;\n}", "@Override\r\n\tpublic Policy getById(Integer pid) {\n\t\tPolicy policy =dao.getById(pid);\r\n return policy;\r\n\t}", "public java.lang.String getPolicyNbr() {\n return policyNbr;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getProviderID() {\n return PROVIDER_ID;\n }", "public Long getOid() {\n return tid;\n }", "public String getIdentifier() {\n return identifier;\n }", "public Long getProductCertificateId() {\r\n return productCertificateId;\r\n }", "public String getPolicyArn() {\n return this.policyArn;\n }", "java.lang.String getPoolId();", "java.lang.String getSignatureProviderId();", "public String getClientId() {\r\n ExtentReporter.logger.log(LogStatus.INFO,\r\n \"Click on the Policyholder Name: Note (and save for later input) the Client ID: Click [Close]\");\r\n clickButton(driver, policyHolderNameLink, \"Policy Holder Name\");\r\n switchToFrameUsingElement(driver, entityMiniPopupFrameId);\r\n getPageTitle(driver, \"Entity Mini Popup\");\r\n String getClientIdValue = clientId.getAttribute(\"innerHTML\");\r\n // TODO - need to store above value in Excel sheet.\r\n clickButton(driver, entityMiniPopupCloseBtn, \"Entity Mini Popup Close\");\r\n switchToParentWindowfromframe(driver);\r\n return getClientIdValue;\r\n }", "public PolicyPermission getPolicyPermission()\n {\n return this.perm;\n }", "public String policyNo() {\r\n sleep(2000);\r\n String profileNoLable = pageHeaderForPolicyFolder.getAttribute(\"innerHTML\");\r\n String[] portfolioNo = profileNoLable.split(\" \", 3);\r\n return portfolioNo[2];\r\n }", "public Object getCorrelationId()\n {\n return getUnderlyingId(false);\n }", "java.lang.String getIdentifier();", "public java.lang.Object getServiceLevelAgreementID() {\n return serviceLevelAgreementID;\n }", "public String getIdentifier() {\n\t\treturn identifier;\n\t}", "@XmlElement(name = \"identifier\", namespace = Namespaces.SRV)\n final String getIdentifier() {\n if (LEGACY_XML) {\n final ScopedName name = getScopedName();\n if (name != null) {\n return name.tip().toString();\n }\n }\n return null;\n }", "public String workloadIdentityPoolId() {\n return this.workloadIdentityPoolId;\n }", "@NonNull String identifier();", "public String getAgentContext() {\n return (String)getAttributeInternal(AGENTCONTEXT);\n }", "public String getIdKey(EdaContext xContext) {\n\t\treturn String.valueOf(getId());\n\n\t}", "public Policy _get_policy(int policy_type) {\n throw new NO_IMPLEMENT(reason);\n }", "public String getIdentifier();" ]
[ "0.68085027", "0.6760872", "0.67587066", "0.66171587", "0.66162556", "0.6464189", "0.6246302", "0.6187375", "0.6172981", "0.6172981", "0.61314386", "0.61219954", "0.6096446", "0.6066049", "0.60081303", "0.6005797", "0.59257346", "0.5861586", "0.58226734", "0.5710324", "0.566956", "0.56636107", "0.5644979", "0.5628968", "0.5600739", "0.5600739", "0.5600739", "0.5557836", "0.55413246", "0.5539972", "0.5539736", "0.5537114", "0.5531699", "0.55110186", "0.5505562", "0.5502197", "0.5498722", "0.5495885", "0.5487832", "0.54872596", "0.5483174", "0.54757017", "0.5466924", "0.54626775", "0.54612994", "0.545152", "0.54497343", "0.54495424", "0.5449249", "0.54415077", "0.5435304", "0.54269475", "0.54245067", "0.5415917", "0.5412746", "0.541113", "0.54066974", "0.5390826", "0.5373099", "0.5368834", "0.53475684", "0.53445053", "0.53397423", "0.533299", "0.53294176", "0.5328419", "0.5328041", "0.53224224", "0.5321027", "0.5317612", "0.53125167", "0.5301399", "0.5301399", "0.5301399", "0.5301399", "0.5301399", "0.5301399", "0.5301399", "0.5301399", "0.52931905", "0.52928925", "0.5291705", "0.52828884", "0.5282725", "0.5273913", "0.5272149", "0.5258237", "0.52561486", "0.52547085", "0.52529734", "0.5250699", "0.5243162", "0.5241667", "0.5239766", "0.52368224", "0.52340454", "0.52302355", "0.52278954", "0.5227604", "0.5218443" ]
0.83524466
0
Used to add permissions to a named role in this PolicyConfiguration. If the named Role does not exist in the PolicyConfiguration, it is created as a result of the call to this function. It is the job of the Policy provider to ensure that all the permissions added to a role are granted to principals "mapped to the role".
public void addToRole(String roleName, PermissionCollection permissions) throws PolicyContextException { assertStateIsOpen(); assert roleName != null; assert permissions != null; if (roleName != null && permissions != null) { checkSetPolicyPermission(); for(Enumeration e = permissions.elements(); e.hasMoreElements();) { this.getRolePermissions(roleName).add((Permission)e.nextElement()); writeOnCommit = true; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToRole(String roleName, Permission permission)\n\tthrows PolicyContextException {\n\n assertStateIsOpen();\n\n\tassert permission != null;\n\tassert roleName != null;\n\t\n\tif (roleName != null && permission != null) {\n\t checkSetPolicyPermission();\n\t this.getRolePermissions(roleName).add(permission);\n\t writeOnCommit = true;\n\t}\n }", "public void addRole(String roleName) throws UnsupportedOperationException;", "@Override\n\tpublic void addRole(Role r) {\n\t\t\n\t}", "public void addRole(String roleName) throws UnsupportedOperationException {\r\n log.debug(\"No roles can be attached to user [ Anonymous ]\");\r\n }", "@Override\n public void populateAndCreateNewRole(final String roleName, final String roleDescription,\n final String unAssignedPermission) {\n\n DriverConfig.setLogString(\"Processing a new role creation with required fields.\", true);\n\n WaitUtil.waitUntil(200);\n\n final WebElement roleManagement = retrieveElementByAttributeValue(DriverConfig.getDriver(),\n TAG_ANCHOR, ATTR_TITLE, roleConfig.get(ROLE_MANAGEMENT_VAL));\n roleManagement.click();\n logger.info(\"check if create new role is displayed.\");\n isDisplayedByLinkText(DriverConfig.getDriver(), roleConfig.get(CREATE_NEW_ROLE_VAL),\n MEDIUM_TIMEOUT);\n DriverConfig.setLogString(\"select create new role link.\", true);\n final WebElement createNewRole = retrieveElementByLinkText(DriverConfig.getDriver(),\n roleConfig.get(CREATE_NEW_ROLE_VAL), MEDIUM_TIMEOUT);\n createNewRole.click();\n DriverConfig.setLogString(\"enter details in create role form.\", true);\n sendRoleDetails(DriverConfig.getDriver(), roleDescription);\n DriverConfig.setLogString(\"select permissions for the role.\", true);\n sendPermissions(DriverConfig.getDriver(), unAssignedPermission);\n DriverConfig.setLogString(\"save & verify the role access.\", true);\n saveAndVerifyRole(DriverConfig.getDriver(), roleName);\n }", "public synchronized void addUserToRole(String userName, String roleName)\n {\n HashSet userSet = (HashSet)_roles.get(roleName);\n if (userSet==null)\n {\n userSet=new HashSet(11);\n _roles.put(roleName,userSet);\n }\n userSet.add(userName);\n }", "public void addRole(Role role) {\n this.roles.add(role);\n }", "public void addRole(Role role) {\n getRoles().add(role);\n }", "public void addRole(String username, String role) throws UserNotExistsException ;", "private void onAddRole() {\n\t\troleProxy.addRoleToUser(user, selectedRole);\n\t}", "@Override\r\n\tpublic int addRole(Role role) {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void addRole(Role role) {\n\t\troleDao.addRole(role);\r\n\t}", "public void addRole(AppRole role) {\n this.roles.add(role);\n }", "public void addRole(Role theRole) {\r\n\t\tthis.roles.add(theRole);\r\n\t\ttheRole.getUsers().add(this);\r\n\t}", "public void setNamedRole(ApplicationRole namedRole) {\n if (namedRole == null) {\n throw new AtbashIllegalActionException(\"(OCT-DEV-008) namedRole can't be null\"); // FIXME See how this can be null (used from Extension)\n }\n if (permission != null) {\n throw new AtbashIllegalActionException(\"(OCT-DEV-009) SimpleNamedRole already set and not allowed to change it.\");\n }\n\n permission = new RolePermission(namedRole.name());\n }", "@Override\r\n\tpublic void addRole(Role role) {\n\t\tgetHibernateTemplate().save(role);\r\n\t}", "public void addRole(String role) {\n StringBuffer rolesStringBuffer = new StringBuffer(this.roles);\n rolesStringBuffer.append(\",\").append(role);\n this.roles = rolesStringBuffer.toString();\n }", "@Override\r\n\tpublic int insertRolePermission(RolePermission rolePermission) {\n\t\treturn rolePermissionMapper.insertSelective(rolePermission);\r\n\t}", "@Override\n\tpublic void addRole(Role role) {\n\t\tSnowflakeIdWorker idWorker = new SnowflakeIdWorker(0, 0);\n\t\tlong id = idWorker.nextId();\n\t\trole.setRoleid(Long.toString(id));\n\t\troleMapper.addRole(role);\n\t}", "public void add(Role role) throws QuestionBankSystemException,\n\t\t\tQuestionBankException;", "void addRoleToUser(int userID,int roleID);", "@Override\n public void createNewRole(final String roleName, final String roleDescription,\n final String unAssignedPermission, final int partnerType) {\n\n DriverConfig.setLogString(\"Processing a new role creation with required fields.\", true);\n\n WaitUtil.waitUntil(200);\n\n final WebElement roleManagement = retrieveElementByAttributeValue(DriverConfig.getDriver(),\n TAG_ANCHOR, ATTR_TITLE, roleConfig.get(ROLE_MANAGEMENT_VAL));\n roleManagement.click();\n logger.info(\"check if create new role is displayed.\");\n isDisplayedByLinkText(DriverConfig.getDriver(), roleConfig.get(CREATE_NEW_ROLE_VAL),\n MEDIUM_TIMEOUT);\n DriverConfig.setLogString(\"select create new role link.\", true);\n final WebElement createNewRole = retrieveElementByLinkText(DriverConfig.getDriver(),\n roleConfig.get(CREATE_NEW_ROLE_VAL), MEDIUM_TIMEOUT);\n createNewRole.click();\n DriverConfig.setLogString(\"enter details in create role form.\", true);\n final String dynamicRoleName = enterRoleName(roleName);\n selectPartnerType(partnerType);\n enterRoleDescription(roleDescription);\n DriverConfig.setLogString(\"select permissions for the role.\", true);\n sendPermissions(DriverConfig.getDriver(), unAssignedPermission);\n DriverConfig.setLogString(\"save & verify the role access.\", true);\n saveAndVerifyRole(DriverConfig.getDriver(), dynamicRoleName);\n }", "protected synchronized void addRoleProvider(RoleProvider roleProvider) {\n logger.debug(\"Adding {} to the list of role providers\", roleProvider);\n roleProviders.add(roleProvider);\n }", "@Override\r\n\tpublic int addRoleAuth(RRoleAuth rRoleAuth) {\n\t\treturn rerationMapper.addRoleAuth(rRoleAuth);\r\n\t}", "@Override\n public void setRole(String roleName) {\n this.role = roleName;\n }", "public PsecRole createOrUpdateRole(String name, boolean defaultRole, String... permissions) {\r\n PsecRole result = server.find(PsecRole.class).\r\n where().eq(\"name\", name).findUnique();\r\n if (result == null) {\r\n result = new PsecRole();\r\n result.setName(name);\r\n }\r\n if (!result.getAutoUpdatesForbidden()) {\r\n final List<PsecPermission> permissionObjects = server.find(PsecPermission.class).\r\n where().in(\"name\", (Object[])permissions).findList();\r\n result.setPsecPermissions(permissionObjects);\r\n result.setDefaultRole(defaultRole);\r\n } else {\r\n System.out.println(\"Can't update Role \" + name);\r\n }\r\n server.save(result);\r\n server.saveManyToManyAssociations(result, \"psecPermissions\");\r\n return result;\r\n }", "public GraphNode addRole(String role){\n\t\tInteger intValue = addElement(role, 2);\n\t\t//System.out.println(role + \" Added with : \" + intValue);\n\t\tGraphNode roleVar = new GraphNode(intValue, 2);\n\t\tauthGraph.addVertex(roleVar);\n\t\treturn roleVar;\n\t}", "@Override\r\n\tpublic void addCredential(String role) {\n\r\n\t}", "public void grantRole(String roleName, User user) throws UserManagementException;", "public synchronized void setRole(final Role newValue) {\n checkWritePermission();\n role = newValue;\n }", "@Override\n\tpublic void saveRole(Role role) {\n\t\tthis.roleMapper.insert(role);\n\t}", "void setRole(final SecurityRole role);", "@Override\n\tpublic Integer add(Role role) {\n\t\treturn roleDao.add(role);\n\t}", "public final void addRole(RepoUserRole role){\n if(!rolesAsEnum.contains(role)){\n try{\n rolesAsEnum.add(role);\n } catch(UnsupportedOperationException ex){\n LOGGER.warn(\"Adding roles is not supported for this instance of RepoUser with roles {}. Probably, the user is inactive.\", rolesAsEnum);\n }\n }\n }", "public void removeRole(String roleName)\n\tthrows PolicyContextException{\n\n assertStateIsOpen();\n\n\tassert roleName != null;\n\n\tif(roleName != null && rolePermissionsTable != null) {\n\t checkSetPolicyPermission();\n\t if (rolePermissionsTable.remove(roleName) != null) {\n\t\tif (rolePermissionsTable.isEmpty()) {\n\t\t rolePermissionsTable = null;\n\t\t}\n\t\twriteOnCommit = true;\n\t } else if (roleName.equals(\"*\")) {\n\t\tboolean wasEmpty = rolePermissionsTable.isEmpty();\n\t\tif (!wasEmpty) {\n\t\t rolePermissionsTable.clear();\n\t\t}\n\t\trolePermissionsTable = null;\n\t\tif (!wasEmpty) {\n\t\t writeOnCommit = true;\n\t\t}\n\t }\n\t}\n }", "public void grantPermission(Permission permission, Role role) {\n List<Role> roles = new ArrayList<>();\n roles.add(role);\n if (hasPermission(roles, permission)) {\n return;\n }\n\n Connection conn = null;\n PreparedStatement ps = null;\n String uuid = PermissionUtil.createPermissionID(permission);\n String query = null;\n try {\n conn = getConnection();\n query = queryManager.getQuery(conn, QueryManager.GRANT_PERMISSION_QUERY);\n conn.setAutoCommit(false);\n ps = conn.prepareStatement(query);\n ps.setString(1, uuid);\n ps.setString(2, permission.getAppName());\n ps.setString(3, permission.getPermissionString());\n ps.setString(4, role.getId());\n ps.executeUpdate();\n conn.commit();\n } catch (SQLException e) {\n log.debug(\"Failed to execute SQL query {}\", query);\n throw new PermissionException(\"Unable to grant permission.\", e);\n } finally {\n closeConnection(conn, ps, null);\n }\n }", "public void addPermissions(IPermission[] permissions) throws AuthorizationException;", "public void setRole( String role )\n {\n if ( roles == null )\n {\n roles = new TreeSet<>( String.CASE_INSENSITIVE_ORDER );\n }\n\n this.roles.add( role );\n }", "@Override\n\tpublic int addUserRole(UserRole userRole) {\n\t\treturn userRoleMapper.insert(userRole);\n\t}", "long addUserRole(UserRole userRole);", "public void addSubRole(Role role) {\n\t\t// pruefe ob eine Schleife entsteht\n\t\tRole current = role.parentRole;\n\t\twhile (current != null) {\n\t\t\tif (current.name.equals(name))\n\t\t\t\tthrow new RuntimeException(\n\t\t\t\t \"Zirkulaere Zuordnungen zwischen Rollen sind nicht erlaubt.\");\n\t\t\tcurrent = current.parentRole;\n\t\t}\n\t\t// Umhaengen\n\t\tif (role.parentRole != null)\n\t\t\trole.parentRole.subRoles.remove(role);\n\t\tsubRoles.add(role);\n\t\trole.parentRole = this;\n\t}", "public boolean addUserRole(String userName, String roleName) {\n boolean addResult = false;\n\tString sql = \"INSERT INTO users_roles\"\n + \"(user_name, role_name) VALUES\"\n + \"(? , ?)\";\n \ttry {\t\t\t\n this.statement = connection.prepareStatement(sql);\n this.statement.setString(1, userName);\n this.statement.setString(2, roleName);\n this.statement.executeUpdate();\n addResult = true;\n this.statement.close();\n\t}\n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return addResult; \n }", "public boolean hasRole(String roleName);", "public RunAsType<T> setRoleName(String roleName)\n {\n childNode.getOrCreate(\"role-name\").text(roleName);\n return this;\n }", "public void setRoleName(java.lang.String _roleName)\n {\n roleName = _roleName;\n }", "public void setRoleName(String roleName) {\n this.roleName = roleName;\n }", "ResourceRole createResourceRole();", "public boolean addPermission(Permission permission);", "@Test(groups = \"role\", priority = 1)\n public void testRoleAdd() throws ExecutionException, InterruptedException {\n this.authDisabledAuthClient.roleAdd(rootRole).get();\n this.authDisabledAuthClient.roleAdd(userRole).get();\n }", "ISModifyProvidedRole createISModifyProvidedRole();", "public void setRole(java.lang.String value) {\n this.role = value;\n }", "public void addPermission(String messageBoxId, PermissionLabel permissionLabel)\n throws MessageBoxException {\n try {\n AuthorizationManager authorizationManager = Utils.getUserRelam().getAuthorizationManager();\n\n String messageBoxPath = MessageBoxConstants.MB_MESSAGE_BOX_STORAGE_PATH + \"/\" +\n messageBoxId;\n\n for (String sharedUser : permissionLabel.getSharedUsers()) {\n // if there is no role with this role add the role and assign the role to the user\n UserStoreManager userStoreManager = Utils.getUserRelam().getUserStoreManager();\n if (!userStoreManager.isExistingRole(sharedUser)) {\n userStoreManager.addRole(sharedUser, new String[]{sharedUser}, new Permission[0]);\n }\n for (String operation : permissionLabel.getOperations()) {\n authorizationManager.authorizeRole(sharedUser, messageBoxPath, operation);\n }\n }\n } catch (UserStoreException e) {\n String error = \"Failed to add permissions to \" + messageBoxId + \" with permission label \"\n + permissionLabel.getLabelName();\n log.error(error);\n throw new MessageBoxException(error, e);\n }\n }", "public void setRoleName(String paramRole) {\n\tstrRoleName = paramRole;\n }", "@Override\n\tpublic int saveRolePermission(Integer roleid, Integer permissionid) {\n\t\treturn roleMapper.saveRolePermission(roleid, permissionid);\n\t}", "@Override\n public AddPermissionResult addPermission(AddPermissionRequest request) {\n request = beforeClientExecution(request);\n return executeAddPermission(request);\n }", "public boolean addSupportRole(Role ... r) {\n\t\tif (getGuild() == null || r == null) { return false; }\n\t\tfor (Role role : r) { if (role.getGuild().equals(getGuild())) supportRoles.add(role); }\n\t\tconfig.save();\n\t\tif (!config.isLoading()) { TMEventManager.departmentChange(this, ChangeType.Dept.ROLES); }\n\t\treturn true;\n\t}", "public ConfigurationImpl addSecurityRole(String match, RoleSet roles) {\n securitySettings.put(match, roles);\n return this;\n }", "public void setRole(String role) {\r\n this.role = role;\r\n }", "private void addApplicationsPermissionsToRegistry() throws APIManagementException {\n Registry tenantGovReg = getRegistry();\n String permissionResourcePath = CarbonConstants.UI_PERMISSION_NAME + RegistryConstants.PATH_SEPARATOR + APPLICATION_ROOT_PERMISSION;\n try {\n if (!tenantGovReg.resourceExists(permissionResourcePath)) {\n String loggedInUser = CarbonContext.getThreadLocalCarbonContext().getUsername();\n UserRealm realm = (UserRealm) CarbonContext.getThreadLocalCarbonContext().getUserRealm();\n // Logged in user is not authorized to create the permission.\n // Temporarily change the user to the admin for creating the permission\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(realm.getRealmConfiguration().getAdminUserName());\n tenantGovReg = CarbonContext.getThreadLocalCarbonContext().getRegistry(RegistryType.USER_GOVERNANCE);\n Collection appRootNode = tenantGovReg.newCollection();\n appRootNode.setProperty(\"name\", \"Applications\");\n tenantGovReg.put(permissionResourcePath, appRootNode);\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(loggedInUser);\n }\n } catch (org.wso2.carbon.user.core.UserStoreException e) {\n throw new APIManagementException(\"Error while reading user store information.\", e);\n } catch (org.wso2.carbon.registry.api.RegistryException e) {\n throw new APIManagementException(\"Error while creating new permission in registry\", e);\n }\n }", "@Override\r\n\tpublic int insertRole(AdminRole role) {\n\t\treturn adminRoleDao.insert(role);\r\n\t}", "public void setRole(String role) {\n this.role = role;\n }", "public void setRole(String role)\n {\n _role=role;\n }", "public void setRole(String role) {\r\n this.role = role;\r\n }", "public void setRole(String role)\n \t\tthrows ParameterException, SignatureException {\n \t\tif (this.signed) {\n \t\t\tthrow new SignatureException(\"Attributes cannot be modified after document is signed\");\n \t\t}\n \n \t\tif (roleFAA.equals(role) || \n \t\t roleBORROWER.equals(role) ||\n \t\t roleAPCSR.equals(role) ||\n \t\t roleLENDER.equals(role)) {\n \t\t\t\n \t\t\tattributes.put(\"Role\", role);\n \t\t} else {\n \t\t\tthrow new ParameterException(\"Invalid Role: \" + role);\n \t\t}\n \t}", "@Override\r\n\tpublic int updRole(Role role) {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void insertRole(Role role) {\n\t\tlogger.debug(\"RoleServiceImpl::insertRole Role = {}\", role.toString());\n\t\troleMapper.insertRole(role);\n\t\tlogger.debug(\"RoleServiceImpl::insertRole id = {}\", role.getId());\n\t}", "@Override\r\n\tpublic void saveRole(Integer uid) {\n\t\tum.saveRole(uid);\r\n\t}", "@Override\n public ResponseEntity<ResponseMessage> addRole(String roleName, String email) {\n logger.info(STARTING_METHOD_EXECUTION);\n ResponseMessage responseMessage = new ResponseMessage();\n RoleModel roleModel=roleRepo.findByRole(roleName);\n if (roleModel == null) {\n RoleModel obj = new RoleModel();\n obj.setRole(roleName);\n obj.setCreatedOn(System.currentTimeMillis());\n obj.setCreatedBy(userRepo.getUserIdByUserEmail(email));\n roleRepo.save(obj);\n logger.debug(\"Role saved : {}\",roleName);\n responseMessage.setMessage(ROLE_ADDED);\n responseMessage.setStatusCode(HttpStatus.CREATED.value());\n logger.info(EXITING_METHOD_EXECUTION);\n return new ResponseEntity<>(responseMessage, HttpStatus.CREATED);\n }\n responseMessage.setMessage(ROLE_ALREADY_EXIST);\n responseMessage.setStatusCode(HttpStatus.CONFLICT.value());\n logger.debug(\"Role {} already exits\",roleName);\n logger.info(EXITING_METHOD_EXECUTION);\n return new ResponseEntity<>(responseMessage, HttpStatus.CONFLICT);\n }", "@Test(dependsOnMethods = \"testRoleAdd\", groups = \"role\", priority = 1)\n public void testRoleGrantPermission() throws ExecutionException, InterruptedException {\n this.authDisabledAuthClient\n .roleGrantPermission(rootRole, rootRolekeyRangeBegin, rootkeyRangeEnd,\n Permission.Type.READWRITE).get();\n this.authDisabledAuthClient\n .roleGrantPermission(userRole, userRolekeyRangeBegin, userRolekeyRangeEnd, Type.READWRITE)\n .get();\n }", "public void setRoleName(final String roleNameValue) {\n this.roleName = roleNameValue;\n }", "public void setRoleName(final String roleNameValue) {\n this.roleName = roleNameValue;\n }", "@Override\n\tpublic synchronized void add(Permission p) {\n\t if (isReadOnly())\n\t\tthrow new SecurityException(\"Collection cannot be modified.\");\n\n\t if (perms.indexOf(p) < 0)\n\t\tperms.add(p);\n\t}", "public void removeRole(String roleName) throws UnsupportedOperationException;", "private Map<ClaimMapping, String> setRoleAsUserAttributes(String role, AuthenticationContext context) {\n Map<ClaimMapping, String> userAttributes =\n context.getSequenceConfig().getAuthenticatedUser().getUserAttributes();\n Map<String, String> roles = new HashMap<>();\n //String roleClaimUri = \"dynamic_role\";\n roles.put(roleClaimURI, role);\n if (log.isDebugEnabled()) {\n log.debug(String.format(\"Setting role %s as user role with claimURI %s\", role, roleClaimURI));\n }\n Map<ClaimMapping, String> rolesClaims = FrameworkUtils.buildClaimMappings(roles);\n\n // Add the role claim from XACML policy\n for (Map.Entry<ClaimMapping, String> entry : rolesClaims.entrySet()) {\n log.info(entry.getKey() + \" = \" + entry.getValue());\n userAttributes.put(entry.getKey(), entry.getValue());\n }\n\n context.getSequenceConfig().getAuthenticatedUser().setUserAttributes(userAttributes);\n return userAttributes;\n }", "public IBusinessObject addToRole(IIID useriid, IIID roleiid, int ordernum, boolean recurse)\n throws OculusException;", "public void grantOper2Role(final Role role, final String operId);", "public void setRole(String role) {\r\n\t\tthis.role = role;\r\n\t}", "public void insertRolePermission(int roleId, List<Integer> permissionIdList, Timestamp createTime, Timestamp updateTime){\n for (int permissionId : permissionIdList) {\r\n rolePermissionDao.insertRolePermission(roleId, permissionId, createTime, updateTime);\r\n }\r\n }", "@PostMapping( value = {\"/add\", \"/update\"} )\n public String addRole(@Valid @ModelAttribute Role role, BindingResult result, Model model\n , RedirectAttributes redirectAttributes) {\n\n if ( result.hasErrors() && role.getId() == null ) {\n model.addAttribute(\"addStatus\", true);\n model.addAttribute(\"role\", role);\n return \"role/addRole\";\n }\n\n try {\n roleService.persist(role);\n return \"redirect:/role\";\n } catch ( Exception e ) {\n ObjectError error = new ObjectError(\"role\",\n \"This role is already in the System <br/>System message -->\" + e.toString());\n result.addError(error);\n model.addAttribute(\"addStatus\", false);\n model.addAttribute(\"role\", role);\n return \"role/addRole\";\n }\n\n }", "public void setRoleName(String roleName) {\n\t\tthis.roleName = roleName;\n\t}", "@Transactional(propagation = Propagation.REQUIRED)\n public void addGrant(Integer roleId, Integer[] mIds) {\n Integer count = permissionMapper.countPermissionByRoleId(roleId);\n // 2. if permission exists, delete the permission records of this role\n if (count > 0) {\n permissionMapper.deletePermissionByRoleId(roleId);\n }\n // 3. if permission exists, add permission records\n if (mIds != null && mIds.length > 0) {\n // define Permission list\n List<Permission> permissionList = new ArrayList<>();\n\n for(Integer mId: mIds) {\n Permission permission = new Permission();\n permission.setModuleId(mId);\n permission.setRoleId(roleId);\n permission.setAclValue(moduleMapper.selectByPrimaryKey(mId).getOptValue());\n permission.setCreateDate(new Date());\n permission.setUpdateDate(new Date());\n permissionList.add(permission);\n }\n\n // Batch Update operation performed,verify affected records\n AssertUtil.isTrue(permissionMapper.insertBatch(permissionList) != permissionList.size(), \"AddGrant failed!\");\n }\n }", "public void addUsedPermission(final String name) {\n // If we don't find existing elements, just add at the start (Android\n // docs list uses-permission first). Also use a 4-space indent as a\n // default when we can't do better.\n int insertIndex = 0;\n String indentString = \"\\n \";\n\n final List<Element> existingElements = manifestElement.getChildren(ELEMENT_USES_PERMISSION);\n if (!existingElements.isEmpty()) {\n final Element lastExistingElement = existingElements.get(existingElements.size() - 1);\n insertIndex = manifestElement.nodeIndexOf(lastExistingElement) + 1;\n\n final Text prefix = findPrefix(lastExistingElement);\n if (prefix != null) {\n indentString = prefix.getText();\n // Note a newline must exist for us to have a prefix.\n final int lastNewlineIndex = indentString.lastIndexOf('\\n');\n indentString = indentString.substring(lastNewlineIndex);\n }\n }\n\n final Element elementToAdd = new Element(ELEMENT_USES_PERMISSION);\n elementToAdd.addAttribute(new Attribute(ATTRIBUTE_NAME, name));\n manifestElement.addNodes(insertIndex, new Text(indentString), elementToAdd);\n }", "public void setRole(String role) {\n\t\tthis.role = role;\n\t}", "public MetaRole createMetaRole(String sName, String sAdmin) throws IOException;", "@Override\n\tpublic void save(Role role) {\n\t\tjdbcTemplate.update(\"insert into role(name, description) values(?,?)\",\n\t\t\t\trole.getName(),role.getDescription());\n\t\n\t}", "public CreateRoleConstantOperation(String roleName) {\n \tSpliceLogUtils.trace(LOG, \"CreateRoleConstantOperation with role name {%s}\",roleName);\n this.roleName = roleName;\n }", "@Override\r\n\tpublic int editRolePermission(RolePermission rolePermission) {\n\t\treturn rolePermissionMapper.updateByPrimaryKeySelective(rolePermission);\r\n\t}", "void addIsPerformOf(Role newIsPerformOf);", "public void addPrivileges(int privilege, String... roleList) {\r\n\t\tif (null != roleList) {\r\n\t\t\tif (null == privileges)\r\n\t\t\t\tprivileges = new HashMap<Integer, Set<String>>();\r\n\t\t\tSet<String> roles = privileges.get(privilege);\r\n\t\t\tif (null == roles) {\r\n\t\t\t\troles = new HashSet<String>();\r\n\t\t\t\tprivileges.put(privilege, roles);\r\n\t\t\t}\r\n\t\t\tfor (String role : roleList)\r\n\t\t\t\troles.add(role);\r\n\t\t}\r\n\t}", "public void add(Role e) {\r\n \tsubordinates.addElement(e);\r\n }", "void insertRole(Role role) throws DataException;", "public Integer addUserRole(UserRole userRole) throws ClassNotFoundException, SQLException {\n\t\treturn saveWithPK(\"insert into user_role (id, name) VALUES(?, ?)\",\n\t\t\t\tnew Object[] { userRole.getId(), userRole.getName() });\n\t}", "@Override\r\n\tpublic void updateRole(Role role) {\n\t\troleDao.updateRole(role);\r\n\t}", "public void setRole(String role) {\n\t\t\tthis.role = role;\n\t\t}", "LoggedUser changeRole(String roleId) throws IOException;", "public NetworkFunctionUserConfiguration withRoleName(String roleName) {\n this.roleName = roleName;\n return this;\n }", "public void addPermission(T object, Permission permission);", "ISModifyRequiredRole createISModifyRequiredRole();", "public static void addMemberPermission(String username, String permission)\r\n throws ObjectNotFoundException, CreateException, DatabaseException, ForeignKeyNotFoundException {\r\n \r\n MemberXML.addMemberPermission(username, permission);\r\n }", "public void setRoleId(String roleId) {\n this.roleId = roleId;\n }" ]
[ "0.73312044", "0.70227665", "0.6522288", "0.6520796", "0.6146486", "0.6125406", "0.61203223", "0.6106831", "0.61062115", "0.6046437", "0.60300905", "0.6021905", "0.6017411", "0.598818", "0.5942952", "0.59392226", "0.58313274", "0.5830057", "0.58170515", "0.57236767", "0.5709673", "0.5667795", "0.56478333", "0.5641325", "0.56222016", "0.55593044", "0.55543786", "0.5524534", "0.5524126", "0.54685426", "0.5408967", "0.54053795", "0.5388638", "0.532884", "0.5260697", "0.524802", "0.5247061", "0.5242138", "0.52406394", "0.5223854", "0.52010745", "0.5178756", "0.5173302", "0.5172245", "0.516299", "0.5136614", "0.51326025", "0.51207876", "0.51092964", "0.5104362", "0.5100904", "0.5089081", "0.5074731", "0.50678444", "0.50342685", "0.5009933", "0.50080705", "0.49985012", "0.49788335", "0.49668705", "0.49619183", "0.49610484", "0.495913", "0.4954108", "0.49429405", "0.49279875", "0.4927926", "0.49173632", "0.49170336", "0.49132276", "0.49132276", "0.4906539", "0.48876786", "0.487725", "0.48759133", "0.48680967", "0.48514283", "0.4847179", "0.48451245", "0.48449785", "0.4838802", "0.48299852", "0.4820112", "0.48077223", "0.48050448", "0.4790463", "0.47837824", "0.47776353", "0.47755697", "0.47748807", "0.47715244", "0.4764757", "0.4753777", "0.4750923", "0.47373796", "0.47360045", "0.471185", "0.47050285", "0.46744215", "0.46653354" ]
0.72136027
1
Used to add a single permission to a named role in this PolicyConfiguration. If the named Role does not exist in the PolicyConfiguration, it is created as a result of the call to this function. It is the job of the Policy provider to ensure that all the permissions added to a role are granted to principals "mapped to the role".
public void addToRole(String roleName, Permission permission) throws PolicyContextException { assertStateIsOpen(); assert permission != null; assert roleName != null; if (roleName != null && permission != null) { checkSetPolicyPermission(); this.getRolePermissions(roleName).add(permission); writeOnCommit = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToRole(String roleName, PermissionCollection permissions)\n\tthrows PolicyContextException\n {\n assertStateIsOpen();\n\n\tassert roleName != null;\n\tassert permissions != null;\n\t\n\tif (roleName != null && permissions != null) {\n\t checkSetPolicyPermission();\n\t for(Enumeration e = permissions.elements(); e.hasMoreElements();) {\n\t\tthis.getRolePermissions(roleName).add((Permission)e.nextElement());\n\t\twriteOnCommit = true;\n\t }\n\t}\n }", "public void addRole(String roleName) throws UnsupportedOperationException;", "@Override\r\n\tpublic int insertRolePermission(RolePermission rolePermission) {\n\t\treturn rolePermissionMapper.insertSelective(rolePermission);\r\n\t}", "@Override\n\tpublic void addRole(Role r) {\n\t\t\n\t}", "public void addRole(String roleName) throws UnsupportedOperationException {\r\n log.debug(\"No roles can be attached to user [ Anonymous ]\");\r\n }", "@Override\r\n\tpublic int addRole(Role role) {\n\t\treturn 0;\r\n\t}", "public boolean addPermission(Permission permission);", "public void setNamedRole(ApplicationRole namedRole) {\n if (namedRole == null) {\n throw new AtbashIllegalActionException(\"(OCT-DEV-008) namedRole can't be null\"); // FIXME See how this can be null (used from Extension)\n }\n if (permission != null) {\n throw new AtbashIllegalActionException(\"(OCT-DEV-009) SimpleNamedRole already set and not allowed to change it.\");\n }\n\n permission = new RolePermission(namedRole.name());\n }", "@Override\r\n\tpublic void addRole(Role role) {\n\t\troleDao.addRole(role);\r\n\t}", "public void addRole(Role theRole) {\r\n\t\tthis.roles.add(theRole);\r\n\t\ttheRole.getUsers().add(this);\r\n\t}", "public void addRole(Role role) {\n this.roles.add(role);\n }", "public void addRole(Role role) {\n getRoles().add(role);\n }", "public synchronized void addUserToRole(String userName, String roleName)\n {\n HashSet userSet = (HashSet)_roles.get(roleName);\n if (userSet==null)\n {\n userSet=new HashSet(11);\n _roles.put(roleName,userSet);\n }\n userSet.add(userName);\n }", "public void addRole(String username, String role) throws UserNotExistsException ;", "@Override\n public AddPermissionResult addPermission(AddPermissionRequest request) {\n request = beforeClientExecution(request);\n return executeAddPermission(request);\n }", "private void onAddRole() {\n\t\troleProxy.addRoleToUser(user, selectedRole);\n\t}", "@Override\r\n\tpublic void addRole(Role role) {\n\t\tgetHibernateTemplate().save(role);\r\n\t}", "@Override\n public void populateAndCreateNewRole(final String roleName, final String roleDescription,\n final String unAssignedPermission) {\n\n DriverConfig.setLogString(\"Processing a new role creation with required fields.\", true);\n\n WaitUtil.waitUntil(200);\n\n final WebElement roleManagement = retrieveElementByAttributeValue(DriverConfig.getDriver(),\n TAG_ANCHOR, ATTR_TITLE, roleConfig.get(ROLE_MANAGEMENT_VAL));\n roleManagement.click();\n logger.info(\"check if create new role is displayed.\");\n isDisplayedByLinkText(DriverConfig.getDriver(), roleConfig.get(CREATE_NEW_ROLE_VAL),\n MEDIUM_TIMEOUT);\n DriverConfig.setLogString(\"select create new role link.\", true);\n final WebElement createNewRole = retrieveElementByLinkText(DriverConfig.getDriver(),\n roleConfig.get(CREATE_NEW_ROLE_VAL), MEDIUM_TIMEOUT);\n createNewRole.click();\n DriverConfig.setLogString(\"enter details in create role form.\", true);\n sendRoleDetails(DriverConfig.getDriver(), roleDescription);\n DriverConfig.setLogString(\"select permissions for the role.\", true);\n sendPermissions(DriverConfig.getDriver(), unAssignedPermission);\n DriverConfig.setLogString(\"save & verify the role access.\", true);\n saveAndVerifyRole(DriverConfig.getDriver(), roleName);\n }", "public void addRole(AppRole role) {\n this.roles.add(role);\n }", "@Override\n\tpublic void addRole(Role role) {\n\t\tSnowflakeIdWorker idWorker = new SnowflakeIdWorker(0, 0);\n\t\tlong id = idWorker.nextId();\n\t\trole.setRoleid(Long.toString(id));\n\t\troleMapper.addRole(role);\n\t}", "public void grantPermission(Permission permission, Role role) {\n List<Role> roles = new ArrayList<>();\n roles.add(role);\n if (hasPermission(roles, permission)) {\n return;\n }\n\n Connection conn = null;\n PreparedStatement ps = null;\n String uuid = PermissionUtil.createPermissionID(permission);\n String query = null;\n try {\n conn = getConnection();\n query = queryManager.getQuery(conn, QueryManager.GRANT_PERMISSION_QUERY);\n conn.setAutoCommit(false);\n ps = conn.prepareStatement(query);\n ps.setString(1, uuid);\n ps.setString(2, permission.getAppName());\n ps.setString(3, permission.getPermissionString());\n ps.setString(4, role.getId());\n ps.executeUpdate();\n conn.commit();\n } catch (SQLException e) {\n log.debug(\"Failed to execute SQL query {}\", query);\n throw new PermissionException(\"Unable to grant permission.\", e);\n } finally {\n closeConnection(conn, ps, null);\n }\n }", "void addRoleToUser(int userID,int roleID);", "@Override\r\n\tpublic int addRoleAuth(RRoleAuth rRoleAuth) {\n\t\treturn rerationMapper.addRoleAuth(rRoleAuth);\r\n\t}", "@Override\n\tpublic Integer add(Role role) {\n\t\treturn roleDao.add(role);\n\t}", "public void add(Role role) throws QuestionBankSystemException,\n\t\t\tQuestionBankException;", "@Override\n\tpublic int saveRolePermission(Integer roleid, Integer permissionid) {\n\t\treturn roleMapper.saveRolePermission(roleid, permissionid);\n\t}", "public GraphNode addRole(String role){\n\t\tInteger intValue = addElement(role, 2);\n\t\t//System.out.println(role + \" Added with : \" + intValue);\n\t\tGraphNode roleVar = new GraphNode(intValue, 2);\n\t\tauthGraph.addVertex(roleVar);\n\t\treturn roleVar;\n\t}", "public void addRole(String role) {\n StringBuffer rolesStringBuffer = new StringBuffer(this.roles);\n rolesStringBuffer.append(\",\").append(role);\n this.roles = rolesStringBuffer.toString();\n }", "@Override\r\n\tpublic void addCredential(String role) {\n\r\n\t}", "public void addPermission(T object, Permission permission);", "@Override\n public void createNewRole(final String roleName, final String roleDescription,\n final String unAssignedPermission, final int partnerType) {\n\n DriverConfig.setLogString(\"Processing a new role creation with required fields.\", true);\n\n WaitUtil.waitUntil(200);\n\n final WebElement roleManagement = retrieveElementByAttributeValue(DriverConfig.getDriver(),\n TAG_ANCHOR, ATTR_TITLE, roleConfig.get(ROLE_MANAGEMENT_VAL));\n roleManagement.click();\n logger.info(\"check if create new role is displayed.\");\n isDisplayedByLinkText(DriverConfig.getDriver(), roleConfig.get(CREATE_NEW_ROLE_VAL),\n MEDIUM_TIMEOUT);\n DriverConfig.setLogString(\"select create new role link.\", true);\n final WebElement createNewRole = retrieveElementByLinkText(DriverConfig.getDriver(),\n roleConfig.get(CREATE_NEW_ROLE_VAL), MEDIUM_TIMEOUT);\n createNewRole.click();\n DriverConfig.setLogString(\"enter details in create role form.\", true);\n final String dynamicRoleName = enterRoleName(roleName);\n selectPartnerType(partnerType);\n enterRoleDescription(roleDescription);\n DriverConfig.setLogString(\"select permissions for the role.\", true);\n sendPermissions(DriverConfig.getDriver(), unAssignedPermission);\n DriverConfig.setLogString(\"save & verify the role access.\", true);\n saveAndVerifyRole(DriverConfig.getDriver(), dynamicRoleName);\n }", "@Override\r\n\tpublic int editRolePermission(RolePermission rolePermission) {\n\t\treturn rolePermissionMapper.updateByPrimaryKeySelective(rolePermission);\r\n\t}", "@Override\n\tpublic synchronized void add(Permission p) {\n\t if (isReadOnly())\n\t\tthrow new SecurityException(\"Collection cannot be modified.\");\n\n\t if (perms.indexOf(p) < 0)\n\t\tperms.add(p);\n\t}", "public void grantRole(String roleName, User user) throws UserManagementException;", "@Override\n\tpublic void saveRole(Role role) {\n\t\tthis.roleMapper.insert(role);\n\t}", "@Override\n public void setRole(String roleName) {\n this.role = roleName;\n }", "@Override\n\tpublic int addUserRole(UserRole userRole) {\n\t\treturn userRoleMapper.insert(userRole);\n\t}", "public PsecRole createOrUpdateRole(String name, boolean defaultRole, String... permissions) {\r\n PsecRole result = server.find(PsecRole.class).\r\n where().eq(\"name\", name).findUnique();\r\n if (result == null) {\r\n result = new PsecRole();\r\n result.setName(name);\r\n }\r\n if (!result.getAutoUpdatesForbidden()) {\r\n final List<PsecPermission> permissionObjects = server.find(PsecPermission.class).\r\n where().in(\"name\", (Object[])permissions).findList();\r\n result.setPsecPermissions(permissionObjects);\r\n result.setDefaultRole(defaultRole);\r\n } else {\r\n System.out.println(\"Can't update Role \" + name);\r\n }\r\n server.save(result);\r\n server.saveManyToManyAssociations(result, \"psecPermissions\");\r\n return result;\r\n }", "public void addPermission(String messageBoxId, PermissionLabel permissionLabel)\n throws MessageBoxException {\n try {\n AuthorizationManager authorizationManager = Utils.getUserRelam().getAuthorizationManager();\n\n String messageBoxPath = MessageBoxConstants.MB_MESSAGE_BOX_STORAGE_PATH + \"/\" +\n messageBoxId;\n\n for (String sharedUser : permissionLabel.getSharedUsers()) {\n // if there is no role with this role add the role and assign the role to the user\n UserStoreManager userStoreManager = Utils.getUserRelam().getUserStoreManager();\n if (!userStoreManager.isExistingRole(sharedUser)) {\n userStoreManager.addRole(sharedUser, new String[]{sharedUser}, new Permission[0]);\n }\n for (String operation : permissionLabel.getOperations()) {\n authorizationManager.authorizeRole(sharedUser, messageBoxPath, operation);\n }\n }\n } catch (UserStoreException e) {\n String error = \"Failed to add permissions to \" + messageBoxId + \" with permission label \"\n + permissionLabel.getLabelName();\n log.error(error);\n throw new MessageBoxException(error, e);\n }\n }", "public synchronized void setRole(final Role newValue) {\n checkWritePermission();\n role = newValue;\n }", "public void addPermission(T object, Permission permission, User user);", "long addUserRole(UserRole userRole);", "public static void addMemberPermission(String username, String permission)\r\n throws ObjectNotFoundException, CreateException, DatabaseException, ForeignKeyNotFoundException {\r\n \r\n MemberXML.addMemberPermission(username, permission);\r\n }", "protected synchronized void addRoleProvider(RoleProvider roleProvider) {\n logger.debug(\"Adding {} to the list of role providers\", roleProvider);\n roleProviders.add(roleProvider);\n }", "public final void addRole(RepoUserRole role){\n if(!rolesAsEnum.contains(role)){\n try{\n rolesAsEnum.add(role);\n } catch(UnsupportedOperationException ex){\n LOGGER.warn(\"Adding roles is not supported for this instance of RepoUser with roles {}. Probably, the user is inactive.\", rolesAsEnum);\n }\n }\n }", "@Test(dependsOnMethods = \"testRoleAdd\", groups = \"role\", priority = 1)\n public void testRoleGrantPermission() throws ExecutionException, InterruptedException {\n this.authDisabledAuthClient\n .roleGrantPermission(rootRole, rootRolekeyRangeBegin, rootkeyRangeEnd,\n Permission.Type.READWRITE).get();\n this.authDisabledAuthClient\n .roleGrantPermission(userRole, userRolekeyRangeBegin, userRolekeyRangeEnd, Type.READWRITE)\n .get();\n }", "public void removeRole(String roleName)\n\tthrows PolicyContextException{\n\n assertStateIsOpen();\n\n\tassert roleName != null;\n\n\tif(roleName != null && rolePermissionsTable != null) {\n\t checkSetPolicyPermission();\n\t if (rolePermissionsTable.remove(roleName) != null) {\n\t\tif (rolePermissionsTable.isEmpty()) {\n\t\t rolePermissionsTable = null;\n\t\t}\n\t\twriteOnCommit = true;\n\t } else if (roleName.equals(\"*\")) {\n\t\tboolean wasEmpty = rolePermissionsTable.isEmpty();\n\t\tif (!wasEmpty) {\n\t\t rolePermissionsTable.clear();\n\t\t}\n\t\trolePermissionsTable = null;\n\t\tif (!wasEmpty) {\n\t\t writeOnCommit = true;\n\t\t}\n\t }\n\t}\n }", "public void addPermissions(IPermission[] permissions) throws AuthorizationException;", "@Override\r\n\tpublic int insertRole(AdminRole role) {\n\t\treturn adminRoleDao.insert(role);\r\n\t}", "void setRole(final SecurityRole role);", "public void add( Permission permission )\n {\n if ( !( permission instanceof WrapperEventPermission ) )\n {\n throw new IllegalArgumentException( \"invalid permission: \" + permission );\n }\n \n if ( isReadOnly() )\n {\n throw new SecurityException( \"Collection is read-only.\");\n }\n \n m_permissions.add( permission );\n }", "ResourceRole createResourceRole();", "public void addSubRole(Role role) {\n\t\t// pruefe ob eine Schleife entsteht\n\t\tRole current = role.parentRole;\n\t\twhile (current != null) {\n\t\t\tif (current.name.equals(name))\n\t\t\t\tthrow new RuntimeException(\n\t\t\t\t \"Zirkulaere Zuordnungen zwischen Rollen sind nicht erlaubt.\");\n\t\t\tcurrent = current.parentRole;\n\t\t}\n\t\t// Umhaengen\n\t\tif (role.parentRole != null)\n\t\t\trole.parentRole.subRoles.remove(role);\n\t\tsubRoles.add(role);\n\t\trole.parentRole = this;\n\t}", "public boolean addUserRole(String userName, String roleName) {\n boolean addResult = false;\n\tString sql = \"INSERT INTO users_roles\"\n + \"(user_name, role_name) VALUES\"\n + \"(? , ?)\";\n \ttry {\t\t\t\n this.statement = connection.prepareStatement(sql);\n this.statement.setString(1, userName);\n this.statement.setString(2, roleName);\n this.statement.executeUpdate();\n addResult = true;\n this.statement.close();\n\t}\n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return addResult; \n }", "@Override\n\t@TriggersRemove(cacheName=\"baseCache\",when=When.AFTER_METHOD_INVOCATION,removeAll=true)\n\tpublic int insert(PermissionRole record) {\n\t\treturn permissionRoleMapper.insert(record);\n\t}", "@Override\n public void addPermission(Class<? extends AeroCommandBase<?>> command, String permission) {\n\n Set<String> requires = permissions.get(command);\n\n if (requires == null) {\n requires = new HashSet<String>();\n }\n\n requires.add(permission.toLowerCase());\n permissions.put(command, requires);\n }", "public boolean hasRole(String roleName);", "@Transactional(propagation = Propagation.REQUIRED)\n public void addGrant(Integer roleId, Integer[] mIds) {\n Integer count = permissionMapper.countPermissionByRoleId(roleId);\n // 2. if permission exists, delete the permission records of this role\n if (count > 0) {\n permissionMapper.deletePermissionByRoleId(roleId);\n }\n // 3. if permission exists, add permission records\n if (mIds != null && mIds.length > 0) {\n // define Permission list\n List<Permission> permissionList = new ArrayList<>();\n\n for(Integer mId: mIds) {\n Permission permission = new Permission();\n permission.setModuleId(mId);\n permission.setRoleId(roleId);\n permission.setAclValue(moduleMapper.selectByPrimaryKey(mId).getOptValue());\n permission.setCreateDate(new Date());\n permission.setUpdateDate(new Date());\n permissionList.add(permission);\n }\n\n // Batch Update operation performed,verify affected records\n AssertUtil.isTrue(permissionMapper.insertBatch(permissionList) != permissionList.size(), \"AddGrant failed!\");\n }\n }", "public void setRole(java.lang.String value) {\n this.role = value;\n }", "public void addUsedPermission(final String name) {\n // If we don't find existing elements, just add at the start (Android\n // docs list uses-permission first). Also use a 4-space indent as a\n // default when we can't do better.\n int insertIndex = 0;\n String indentString = \"\\n \";\n\n final List<Element> existingElements = manifestElement.getChildren(ELEMENT_USES_PERMISSION);\n if (!existingElements.isEmpty()) {\n final Element lastExistingElement = existingElements.get(existingElements.size() - 1);\n insertIndex = manifestElement.nodeIndexOf(lastExistingElement) + 1;\n\n final Text prefix = findPrefix(lastExistingElement);\n if (prefix != null) {\n indentString = prefix.getText();\n // Note a newline must exist for us to have a prefix.\n final int lastNewlineIndex = indentString.lastIndexOf('\\n');\n indentString = indentString.substring(lastNewlineIndex);\n }\n }\n\n final Element elementToAdd = new Element(ELEMENT_USES_PERMISSION);\n elementToAdd.addAttribute(new Attribute(ATTRIBUTE_NAME, name));\n manifestElement.addNodes(insertIndex, new Text(indentString), elementToAdd);\n }", "ISModifyProvidedRole createISModifyProvidedRole();", "@Override\n public ResponseEntity<ResponseMessage> addRole(String roleName, String email) {\n logger.info(STARTING_METHOD_EXECUTION);\n ResponseMessage responseMessage = new ResponseMessage();\n RoleModel roleModel=roleRepo.findByRole(roleName);\n if (roleModel == null) {\n RoleModel obj = new RoleModel();\n obj.setRole(roleName);\n obj.setCreatedOn(System.currentTimeMillis());\n obj.setCreatedBy(userRepo.getUserIdByUserEmail(email));\n roleRepo.save(obj);\n logger.debug(\"Role saved : {}\",roleName);\n responseMessage.setMessage(ROLE_ADDED);\n responseMessage.setStatusCode(HttpStatus.CREATED.value());\n logger.info(EXITING_METHOD_EXECUTION);\n return new ResponseEntity<>(responseMessage, HttpStatus.CREATED);\n }\n responseMessage.setMessage(ROLE_ALREADY_EXIST);\n responseMessage.setStatusCode(HttpStatus.CONFLICT.value());\n logger.debug(\"Role {} already exits\",roleName);\n logger.info(EXITING_METHOD_EXECUTION);\n return new ResponseEntity<>(responseMessage, HttpStatus.CONFLICT);\n }", "@Override\r\n\tpublic int updRole(Role role) {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void saveRole(Integer uid) {\n\t\tum.saveRole(uid);\r\n\t}", "public static void addRegisteredMembersGroupPermission(String permission)\r\n throws CreateException, DatabaseException, DuplicateKeyException, ForeignKeyNotFoundException {\r\n \r\n GroupXML.addRegisteredMembersGroupPermission(permission);\r\n }", "@PostMapping( value = {\"/add\", \"/update\"} )\n public String addRole(@Valid @ModelAttribute Role role, BindingResult result, Model model\n , RedirectAttributes redirectAttributes) {\n\n if ( result.hasErrors() && role.getId() == null ) {\n model.addAttribute(\"addStatus\", true);\n model.addAttribute(\"role\", role);\n return \"role/addRole\";\n }\n\n try {\n roleService.persist(role);\n return \"redirect:/role\";\n } catch ( Exception e ) {\n ObjectError error = new ObjectError(\"role\",\n \"This role is already in the System <br/>System message -->\" + e.toString());\n result.addError(error);\n model.addAttribute(\"addStatus\", false);\n model.addAttribute(\"role\", role);\n return \"role/addRole\";\n }\n\n }", "@Test(groups = \"role\", priority = 1)\n public void testRoleAdd() throws ExecutionException, InterruptedException {\n this.authDisabledAuthClient.roleAdd(rootRole).get();\n this.authDisabledAuthClient.roleAdd(userRole).get();\n }", "@Override\n\tpublic void insertRole(Role role) {\n\t\tlogger.debug(\"RoleServiceImpl::insertRole Role = {}\", role.toString());\n\t\troleMapper.insertRole(role);\n\t\tlogger.debug(\"RoleServiceImpl::insertRole id = {}\", role.getId());\n\t}", "public RunAsType<T> setRoleName(String roleName)\n {\n childNode.getOrCreate(\"role-name\").text(roleName);\n return this;\n }", "void setPermission(String perm, boolean add);", "public void setRole( String role )\n {\n if ( roles == null )\n {\n roles = new TreeSet<>( String.CASE_INSENSITIVE_ORDER );\n }\n\n this.roles.add( role );\n }", "public static GenericRoleVoter createInstance(RolePermission namedRole) {\n // Never null (called from be.atbash.ee.security.octopus.provider.NamedRoleProducer#getVoter()\n\n GenericRoleVoter result = new GenericRoleVoter();\n result.subject = CDIUtils.retrieveInstance(Subject.class);\n result.permission = namedRole;\n return result;\n }", "public static void addGroupPermission(String groupname, String permission)\r\n throws CreateException, DatabaseException, DuplicateKeyException, ForeignKeyNotFoundException, ObjectNotFoundException {\r\n \r\n GroupXML.addGroupPermission(groupname, permission);\r\n }", "@Override\n\tpublic boolean insert(Role Role) {\n\t\tif(checkRole(Role)){\n\t\t if(this.RoleDao.insert(Role))\n\t\t\treturn true;\n\t\t else\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\treturn false;\n\t}", "public void setRole(String role) {\r\n this.role = role;\r\n }", "@Override\n\tpublic void grant(User subject, Permission permission)\n\t{\n\t\t//TODO figure out how to implement since we're using role based permissions\n\t}", "public void setRole(String role) {\n this.role = role;\n }", "public CreateRoleConstantOperation(String roleName) {\n \tSpliceLogUtils.trace(LOG, \"CreateRoleConstantOperation with role name {%s}\",roleName);\n this.roleName = roleName;\n }", "int insert(RolePermission record);", "public void removeRole(String roleName) throws UnsupportedOperationException;", "private void addApplicationsPermissionsToRegistry() throws APIManagementException {\n Registry tenantGovReg = getRegistry();\n String permissionResourcePath = CarbonConstants.UI_PERMISSION_NAME + RegistryConstants.PATH_SEPARATOR + APPLICATION_ROOT_PERMISSION;\n try {\n if (!tenantGovReg.resourceExists(permissionResourcePath)) {\n String loggedInUser = CarbonContext.getThreadLocalCarbonContext().getUsername();\n UserRealm realm = (UserRealm) CarbonContext.getThreadLocalCarbonContext().getUserRealm();\n // Logged in user is not authorized to create the permission.\n // Temporarily change the user to the admin for creating the permission\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(realm.getRealmConfiguration().getAdminUserName());\n tenantGovReg = CarbonContext.getThreadLocalCarbonContext().getRegistry(RegistryType.USER_GOVERNANCE);\n Collection appRootNode = tenantGovReg.newCollection();\n appRootNode.setProperty(\"name\", \"Applications\");\n tenantGovReg.put(permissionResourcePath, appRootNode);\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(loggedInUser);\n }\n } catch (org.wso2.carbon.user.core.UserStoreException e) {\n throw new APIManagementException(\"Error while reading user store information.\", e);\n } catch (org.wso2.carbon.registry.api.RegistryException e) {\n throw new APIManagementException(\"Error while creating new permission in registry\", e);\n }\n }", "public void setRole(String role)\n {\n _role=role;\n }", "public void setRoleName(java.lang.String _roleName)\n {\n roleName = _roleName;\n }", "void addIsPerformOf(Role newIsPerformOf);", "public void setRole(String role) {\r\n this.role = role;\r\n }", "public void insertRolePermission(int roleId, List<Integer> permissionIdList, Timestamp createTime, Timestamp updateTime){\n for (int permissionId : permissionIdList) {\r\n rolePermissionDao.insertRolePermission(roleId, permissionId, createTime, updateTime);\r\n }\r\n }", "public boolean addSupportRole(Role ... r) {\n\t\tif (getGuild() == null || r == null) { return false; }\n\t\tfor (Role role : r) { if (role.getGuild().equals(getGuild())) supportRoles.add(role); }\n\t\tconfig.save();\n\t\tif (!config.isLoading()) { TMEventManager.departmentChange(this, ChangeType.Dept.ROLES); }\n\t\treturn true;\n\t}", "public void grantOper2Role(final Role role, final String operId);", "public static GenericRoleVoter createInstance(ApplicationRole namedRole) {\n if (namedRole == null) {\n throw new AtbashIllegalActionException(\"(OCT-DEV-008) namedRole can't be null\");\n }\n\n GenericRoleVoter result = new GenericRoleVoter();\n result.subject = CDIUtils.retrieveInstance(Subject.class);\n result.permission = new RolePermission(namedRole.name());\n return result;\n }", "public void setRoleName(String roleName) {\n this.roleName = roleName;\n }", "public Integer addUserRole(UserRole userRole) throws ClassNotFoundException, SQLException {\n\t\treturn saveWithPK(\"insert into user_role (id, name) VALUES(?, ?)\",\n\t\t\t\tnew Object[] { userRole.getId(), userRole.getName() });\n\t}", "public void setRoleName(String paramRole) {\n\tstrRoleName = paramRole;\n }", "public void addToUncheckedPolicy(Permission permission)\n\tthrows PolicyContextException{\n\t\n assertStateIsOpen();\n\n\tassert permission != null;\n\n\tif (permission != null) {\n\t checkSetPolicyPermission();\n\t this.getUncheckedPermissions().add(permission);\n\t writeOnCommit = true;\n\t}\n }", "public void add(Role e) {\r\n \tsubordinates.addElement(e);\r\n }", "ISModifyRequiredRole createISModifyRequiredRole();", "@Override\n\tpublic void addRole_Activity(Integer rid, Integer aid) {\n\t\tlogger.debug(\"RoleServiceImpl::addRole_Activity rid = {},aid = {}\", rid, aid);\n\t\troleMapper.addRole_Activity(rid, aid);\n\t}", "int insertSelective(RolePermission record);", "public void setRole(String role) {\r\n\t\tthis.role = role;\r\n\t}", "@Test\n public void testGetPermissionsRole() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"GREET_PEOPLE\");\n permissionManager.addPermission(permission);\n Permission permission2 = permissionManager.getPermissionInstance(\"ADMINISTER_DRUGS\");\n permissionManager.addPermission(permission2);\n Role role = securityService.getRoleManager().getRoleInstance(\"VET_TECH\");\n securityService.getRoleManager().addRole(role);\n ((DynamicModelManager) securityService.getModelManager()).grant(role, permission);\n PermissionSet permissions = ((DynamicRole) role).getPermissions();\n assertEquals(1, permissions.size());\n assertTrue(permissions.contains(permission));\n assertFalse(permissions.contains(permission2));\n }", "public void setRole(String role)\n \t\tthrows ParameterException, SignatureException {\n \t\tif (this.signed) {\n \t\t\tthrow new SignatureException(\"Attributes cannot be modified after document is signed\");\n \t\t}\n \n \t\tif (roleFAA.equals(role) || \n \t\t roleBORROWER.equals(role) ||\n \t\t roleAPCSR.equals(role) ||\n \t\t roleLENDER.equals(role)) {\n \t\t\t\n \t\t\tattributes.put(\"Role\", role);\n \t\t} else {\n \t\t\tthrow new ParameterException(\"Invalid Role: \" + role);\n \t\t}\n \t}" ]
[ "0.68329275", "0.68295443", "0.6490082", "0.63750255", "0.63507646", "0.6068636", "0.60109913", "0.60012203", "0.59811515", "0.59511346", "0.5927327", "0.59099776", "0.5853835", "0.58448565", "0.5840928", "0.58326924", "0.58123726", "0.580588", "0.57994586", "0.5799033", "0.57767886", "0.5708144", "0.569626", "0.5687543", "0.56869084", "0.5657516", "0.55716914", "0.55393213", "0.55375206", "0.5486061", "0.5474825", "0.54688215", "0.54460794", "0.53904766", "0.53891945", "0.53707236", "0.53450286", "0.5295733", "0.52835983", "0.5283456", "0.5249558", "0.5227338", "0.52063644", "0.5203325", "0.51736426", "0.5167341", "0.51636815", "0.51621735", "0.513847", "0.51328105", "0.51322424", "0.5101962", "0.50953704", "0.50864255", "0.50860155", "0.5075438", "0.5073043", "0.5056355", "0.5036511", "0.50342673", "0.5032547", "0.5014776", "0.5004706", "0.4990784", "0.4985757", "0.49854878", "0.49796107", "0.49790907", "0.49750367", "0.49547982", "0.49384758", "0.49369848", "0.49369565", "0.492361", "0.48994374", "0.48781696", "0.48605874", "0.48589647", "0.4858482", "0.485829", "0.48545828", "0.48545238", "0.48539123", "0.4852752", "0.4849593", "0.4848775", "0.48316148", "0.4824059", "0.47952846", "0.4791803", "0.4791713", "0.47870162", "0.47763735", "0.477216", "0.47662696", "0.4765884", "0.4763851", "0.47515485", "0.4747665", "0.47353086" ]
0.75538975
0
Used to add unchecked policy statements to this PolicyConfiguration.
public void addToUncheckedPolicy(PermissionCollection permissions) throws PolicyContextException { assertStateIsOpen(); assert permissions != null; if (permissions != null) { checkSetPolicyPermission(); for(Enumeration e = permissions.elements(); e.hasMoreElements();){ this.getUncheckedPermissions().add((Permission) e.nextElement()); writeOnCommit = true; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeUncheckedPolicy()\n\tthrows PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\t\n\n\tif (uncheckedPermissions != null) {\n\t uncheckedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "void clearPolicy() {\n policy = new Policy();\n }", "public void addToUncheckedPolicy(Permission permission)\n\tthrows PolicyContextException{\n\t\n assertStateIsOpen();\n\n\tassert permission != null;\n\n\tif (permission != null) {\n\t checkSetPolicyPermission();\n\t this.getUncheckedPermissions().add(permission);\n\t writeOnCommit = true;\n\t}\n }", "public void addPolicy(Policy policy) throws APIManagementException {\n\n if (policy instanceof APIPolicy) {\n APIPolicy apiPolicy = (APIPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getAPIPolicy(userNameWithoutChange, apiPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Advanced Policy with name \" + apiPolicy.getPolicyName() + \" already exists\");\n }\n apiPolicy.setUserLevel(PolicyConstants.ACROSS_ALL);\n apiPolicy = apiMgtDAO.addAPIPolicy(apiPolicy);\n List<Integer> addedConditionGroupIds = new ArrayList<>();\n for (Pipeline pipeline : apiPolicy.getPipelines()) {\n addedConditionGroupIds.add(pipeline.getId());\n }\n APIPolicyEvent apiPolicyEvent = new APIPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n apiPolicy.getTenantDomain(), apiPolicy.getPolicyId(), apiPolicy.getPolicyName(),\n apiPolicy.getDefaultQuotaPolicy().getType(), addedConditionGroupIds, null);\n APIUtil.sendNotification(apiPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof ApplicationPolicy) {\n ApplicationPolicy appPolicy = (ApplicationPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getApplicationPolicy(userNameWithoutChange, appPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Application Policy with name \" + appPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addApplicationPolicy(appPolicy);\n //policy id is not set. retrieving policy to get the id.\n ApplicationPolicy retrievedPolicy = apiMgtDAO.getApplicationPolicy(appPolicy.getPolicyName(), tenantId);\n ApplicationPolicyEvent applicationPolicyEvent = new ApplicationPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n appPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(), appPolicy.getPolicyName(),\n appPolicy.getDefaultQuotaPolicy().getType());\n APIUtil.sendNotification(applicationPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof SubscriptionPolicy) {\n SubscriptionPolicy subPolicy = (SubscriptionPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getSubscriptionPolicy(userNameWithoutChange, subPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Subscription Policy with name \" + subPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addSubscriptionPolicy(subPolicy);\n String monetizationPlan = subPolicy.getMonetizationPlan();\n Map<String, String> monetizationPlanProperties = subPolicy.getMonetizationPlanProperties();\n if (StringUtils.isNotBlank(monetizationPlan) && MapUtils.isNotEmpty(monetizationPlanProperties)) {\n createMonetizationPlan(subPolicy);\n }\n //policy id is not set. retrieving policy to get the id.\n SubscriptionPolicy retrievedPolicy = apiMgtDAO.getSubscriptionPolicy(subPolicy.getPolicyName(), tenantId);\n SubscriptionPolicyEvent subscriptionPolicyEvent = new SubscriptionPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId, subPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n subPolicy.getPolicyName(), subPolicy.getDefaultQuotaPolicy().getType(),\n subPolicy.getRateLimitCount(),subPolicy.getRateLimitTimeUnit(), subPolicy.isStopOnQuotaReach(),\n subPolicy.getGraphQLMaxDepth(),subPolicy.getGraphQLMaxComplexity(),subPolicy.getSubscriberCount());\n APIUtil.sendNotification(subscriptionPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof GlobalPolicy) {\n GlobalPolicy globalPolicy = (GlobalPolicy) policy;\n\n // checking if policy already exist\n Policy existingPolicy = getGlobalPolicy(globalPolicy.getPolicyName());\n if (existingPolicy != null) {\n throw new APIManagementException(\"Policy name already exists\");\n }\n\n apiMgtDAO.addGlobalPolicy(globalPolicy);\n\n KeyTemplateEvent keyTemplateEvent = new KeyTemplateEvent(UUID.randomUUID().toString(), System.currentTimeMillis(),\n APIConstants.EventType.CUSTOM_POLICY_ADD.name(), tenantId, tenantDomain,\n \"add\", globalPolicy.getKeyTemplate());\n APIUtil.sendNotification(keyTemplateEvent, APIConstants.NotifierType.KEY_TEMPLATE.name());\n\n GlobalPolicy retrievedPolicy = apiMgtDAO.getGlobalPolicy(globalPolicy.getPolicyName());\n GlobalPolicyEvent globalPolicyEvent = new GlobalPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n globalPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n globalPolicy.getPolicyName());\n APIUtil.sendNotification(globalPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else {\n String msg = \"Policy type \" + policy.getClass().getName() + \" is not supported\";\n log.error(msg);\n throw new UnsupportedPolicyTypeException(msg);\n }\n }", "public void addPolicy(Policy policy) throws PolicyException {\n\n // Add BlueprintPolicy\n if (policy instanceof BlueprintPolicy) {\n if (erectors.get(policy.getTarget()) == null) {\n throw new PolicyException(\"Blueprint does not exist for BlueprintPolicy target: \" + policy.getTarget());\n }\n\n List<BlueprintPolicy> policies = blueprintPolicies.get(policy.getTarget());\n if (policies == null) {\n policies = new ArrayList<BlueprintPolicy>();\n }\n\n policies.add((BlueprintPolicy) policy);\n\n logger.info(\"Setting BlueprintPolicy {} for {}\", policy, policy.getTarget());\n\n blueprintPolicies.put(policy.getTarget(), policies);\n\n // Add FieldPolicy\n } else if (policy instanceof FieldPolicy) {\n\n // XXX: force FieldPolicy's to be mapped to a blueprint? Limits their scope, but enables validation\n if (erectors.get(policy.getTarget()) == null) {\n throw new PolicyException(\"Blueprint does not exist for FieldPolicy target: \" + policy.getTarget());\n }\n\n List<FieldPolicy> policies = fieldPolicies.get(policy.getTarget());\n if (policies == null) {\n policies = new ArrayList<FieldPolicy>();\n }\n\n policies.add((FieldPolicy) policy);\n\n logger.info(\"Setting FieldPolicy {} for {}\", policy, policy.getTarget());\n\n fieldPolicies.put(policy.getTarget(), policies);\n }\n }", "public void warningPermit();", "public void negateUnxepectedTagPenalty() {\n\t\tnegateUnxepectedTagPenalty = true;\n\t}", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "public void addWarnings(@Nonnull Collection<Warning> w) {\r\n warnings.addAll(w);\r\n }", "public void suppress() {\r\n\t\tsuppressed = true;\r\n\t}", "public void suppress() {\r\n\t\tsuppressed = true;\r\n\t}", "public void addProgenyBlacklist(Class...clazz);", "public void setPolicy(String policy) {\r\n if (policy != null && !policy.equals(\"\")) {\r\n String[] rules = policy.trim().split(\",\");\r\n if (rules != null && rules.length > 0) {\r\n emptyPolicy();\r\n \r\n for (String s : rules) {\r\n addRule(new AccessRule(s));\r\n }\r\n }\r\n }\r\n }", "public DefaultPolicyFilter()\n\t{\n\t\tthis.compiler = new StackMachineCompiler();\n\t\tthis.executionEngine = new StackMachine();\n\t}", "private void setDictionaryImplications() {\n if (usingDictionary) {\n usingDictionaryValue = \"Yes\";\n } else {\n usingDictionaryValue = \"No\";\n }\n textMergeScript.recordScriptAction\n (ScriptConstants.OUTPUT_MODULE,\n ScriptConstants.SET_ACTION,\n ScriptConstants.NO_MODIFIER,\n ScriptConstants.USING_DICTIONARY_OBJECT,\n String.valueOf(usingDictionary));\n }", "public void setDefaultRestrictions() {\n addPolicy(DISABLE_EXIT);\n addPolicy(DISABLE_ANY_FILE_MATCHER);\n addPolicy(DISABLE_SECURITYMANAGER_CHANGE);\n //addPolicy(DISABLE_REFLECTION_UNTRUSTED);\n addPolicy(DISABLE_EXECUTION);\n addPolicy(DISABLE_TEST_SNIFFING);\n addPolicy(DISABLE_REFLECTION_SELECTIVE);\n addPolicy(DISABLE_SOCKETS);\n\n InterceptorBuilder.installAgent();\n InterceptorBuilder.initDefaultTransformations();\n }", "public void setConditionalPolicies (Vector conditionalPolicies)\n {\n openTransaction();\n Iterator it = query(conditionalPolicyMsgPredicate).iterator();\n while (it.hasNext()) {\n publishRemove(it.next());\n }\n \n // add new ConditionalPolicyMsgs\n for (int i=0; i<conditionalPolicies.size(); i++) {\n ConditionalPolicyMsg condPol = (ConditionalPolicyMsg) conditionalPolicies.elementAt(i);\n UnexpandedConditionalPolicyMsg ucpm = new UnexpandedConditionalPolicyMsg(condPol);\n publishAdd(ucpm);\n }\n closeTransaction();\n }", "@Override\n\tpublic void suppress() {\n\n\t}", "public void setIgnoredReasons(List<AXProperty> ignoredReasons) {\n this.ignoredReasons = ignoredReasons;\n }", "@Override\n public Exp getBasePolicyCode() {\n return null;\n }", "public void addButcheryBlacklist(Class...clazz);", "public void addToExcludedPolicy(PermissionCollection permissions)\n\tthrows PolicyContextException {\n\n assertStateIsOpen();\n\n\tassert permissions != null;\n\n\tif (permissions != null) {\n\t checkSetPolicyPermission();\n\t for(Enumeration e = permissions.elements(); e.hasMoreElements();){\n\t\tthis.getExcludedPermissions().add((Permission) e.nextElement());\n\t\twriteOnCommit = true;\n\t }\n\t}\n }", "@Override\n public void applyDdlStatements(Connection connection,\n List<String> statements) throws SQLException {\n try {\n super.applyDdlStatements(connection, statements);\n } catch (SQLException e) {\n if (!e.getMessage().contains(HYPERTABLE_WARNING)) {\n throw e;\n }\n }\n }", "protected void setPolicy(LinkedHashMap<String, Vector<String>> policy) {\r\n\r\n\t\t// get all the parameters from config file\r\n\t\tVector<String> policyFrom = parameters.get(\"/Domains/POLICY/@from\");\r\n\t\tVector<String> policyTo = parameters.get(\"/Domains/POLICY/@to\");\r\n\t\tVector<String> policyBy = parameters.get(\"/Domains/POLICY/@by\");\r\n\r\n\t\tfor (int i = 0; i < policyFrom.size(); i++) {\r\n\t\t\tVector<String> temp = new Vector<String>();\r\n\t\t\t// if the policy entry has a comma (,), there`s a multiple possible\r\n\t\t\t// transit domain\r\n\t\t\tif (policyBy.get(i).contains(\",\")) {\r\n\t\t\t\tString[] policyHop = policyBy.get(i).split(\",\");\r\n\t\t\t\tfor (int p = 0; p < policyHop.length; p++) {\r\n\t\t\t\t\ttemp.add(policyHop[p]);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// otherwise, just add the hop in the config file\r\n\t\t\t\t// All the policies with only one path, will apply this\r\n\t\t\t\ttemp.add(policyBy.get(i));\r\n\t\t\t}\r\n\t\t\tpolicy.put(policyFrom.get(i) + \"-\" + policyTo.get(i), temp);\r\n\t\t}\r\n\r\n\t}", "private void loadBypassAndTrailChecks() {\n bypassChecks.add(new BypassPermissionCheck());\n // Spectator Check\n SpectatorModeCheck spectatorModeCheck = new SpectatorModeCheck();\n bypassChecks.add(spectatorModeCheck);\n noTrailChecks.add(spectatorModeCheck);\n // Vanish Checks\n HashSet<Check> vanishChecks = new HashSet<>();\n\n if (pluginLoading(\"PremiumVanish\") || pluginLoading(\"SuperVanish\")) {\n vanishChecks.add(new PremiumSuperVanishCheck());\n } else if (pluginLoading(\"Essentials\")) {\n vanishChecks.add(new EssentialsVanishCheck());\n }\n\n if (!vanishChecks.isEmpty() && pl.getConfManager().isVanishBypass()) {\n bypassChecks.addAll(vanishChecks);\n noTrailChecks.addAll(vanishChecks);\n }\n // Invisibility potion Check\n noTrailChecks.add(new InvisibilityPotionCheck());\n /* DISABLE EMPTY */\n }", "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "public static CustomPolicy createDefaultCustomPolicy() {\n CustomPolicy customPolicy = new CustomPolicy(SAMPLE_CUSTOM_RULE);\n customPolicy.setKeyTemplate(\"$userId\");\n String siddhiQuery = \"FROM RequestStream SELECT userId, ( userId == '[email protected]' ) AS isEligible , \"\n + \"str:concat('[email protected]','') as throttleKey INSERT INTO EligibilityStream;\"\n + \"FROM EligibilityStream[isEligible==true]#throttler:timeBatch(1 min) SELECT throttleKey, \"\n + \"(count(userId) >= 5 as isThrottled, expiryTimeStamp group by throttleKey INSERT ALL EVENTS into \"\n + \"ResultStream;\";\n\n customPolicy.setSiddhiQuery(siddhiQuery);\n customPolicy.setDescription(\"Sample custom policy\");\n return customPolicy;\n }", "private boolean setAllPolicy(String webMethodName, String opName, String toPermit) \r\n\t{\r\n\t NAASIntegration naas = new NAASIntegration(Phrase.AdministrationLoggerName);\r\n\t boolean ret = true;\r\n\t if(toPermit.equalsIgnoreCase(\"Y\")){\r\n\t \tret = naas.setAllPolicy(webMethodName, opName, NAASRequestor.ACTION_DENY);\r\n\t }else{\r\n\t \tString isExit = verifyPolicy(webMethodName, opName);\r\n\t \tif(isExit!= null && isExit.equalsIgnoreCase(\"deny\")){\r\n\t\t \tret = naas.setAllPolicy(webMethodName, opName, \"\");\t \t\t \t\t\r\n\t \t}\r\n\t }\r\n\t return ret;\r\n\t}", "public void addToExcludedPolicy(Permission permission)\n\tthrows PolicyContextException{\n\n assertStateIsOpen();\n\n\tassert permission != null;\n\n\tif (permission != null) {\n\t checkSetPolicyPermission();\n\t this.getExcludedPermissions().add(permission);\n\t writeOnCommit = true;\n\t}\n }", "protected void createIgnoreAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/2007/ImpactAnalysis/Ignore\";\t\n\t\taddAnnotation\n\t\t (architectureAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceImplementationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceUseEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (providedInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (requiredInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (actorCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\n\t}", "private List<String> listPolicyExemptAppsUnchecked() {\n String[] core = mContext.getResources().getStringArray(R.array.policy_exempt_apps);\n String[] vendor = mContext.getResources().getStringArray(R.array.vendor_policy_exempt_apps);\n\n int size = core.length + vendor.length;\n Set<String> apps = new ArraySet<>(size);\n for (String app : core) {\n apps.add(app);\n }\n for (String app : vendor) {\n apps.add(app);\n }\n\n return new ArrayList<>(apps);\n }", "protected Permissions getExcludedPolicy(){\n\treturn stateIs(INSERVICE_STATE) ? this.excludedPermissions : null;\n }", "public void setPolicyLine(java.lang.String value);", "public DistributionPolicyInternal() {}", "public SecurityHandler skipAudit() {\n return builder(this).audit(false).build();\n }", "private void loadPolicy() {\n loadSavedGlobalSetting();\n loadDefaultPolicy();\n loadSavedSetting();\n saveSetting();\n }", "@Deprecated\n void setEvictionPolicy(Policy policy);", "PolicyHolder addPolicyHolder(Integer agentId , PolicyHolder pHolder);", "public void setPolicyURL(java.lang.String policyURL) {\n this.policyURL = policyURL;\n }", "@Override\r\n public void forbidShape (Shape shape)\r\n {\r\n if (forbiddenShapes == null) {\r\n forbiddenShapes = new HashSet<>();\r\n }\r\n\r\n forbiddenShapes.add(shape);\r\n }", "public synchronized void setEvictionPolicy(EvictionPolicy policy)\n {\n int nType = (policy == null ? EVICTION_POLICY_HYBRID\n : EVICTION_POLICY_EXTERNAL);\n configureEviction(nType, policy);\n }", "public ReviewPhaseHandler() throws ConfigurationException {\r\n super(DEFAULT_NAMESPACE, false);\r\n }", "private void addWhitelistEntries(VDDHash whitelist) {\n for (Object entry: whitelist.values()) {\n this.whitelist.add(new TextFinder((String)entry));\n }\n }", "@Override\n public void replaceAllBitstreamPolicies(Context context, Item item, List<ResourcePolicy> newpolicies)\n throws SQLException, AuthorizeException\n {\n // remove all policies from bundles, add new ones\n // Remove bundles\n List<Bundle> bunds = item.getBundles();\n\n for (Bundle mybundle : bunds) {\n bundleService.replaceAllBitstreamPolicies(context, mybundle, newpolicies);\n }\n }", "@Override\n\tpublic Policy addPolicy(Policy policy) {\n\t\t// TODO Auto-generated method stub\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "public static void hideWarnings() {\n\t\tenableWarn = false;\n\t}", "protected void handleWarnings(Statement statement) throws SQLWarningException,\n\tSQLException {\n\t\tif (ignoreWarnings) {\n\t\t\tif (log.isDebugEnabled()) {\n\t\t\t\tSQLWarning warningToLog = statement.getWarnings();\n\t\t\t\twhile (warningToLog != null) {\n\t\t\t\t\tlog.debug(\"SQLWarning ignored: SQL state '\" + warningToLog.getSQLState() + \"', error code '\"\n\t\t\t\t\t\t\t+ warningToLog.getErrorCode() + \"', message [\" + warningToLog.getMessage() + \"]\");\n\t\t\t\t\twarningToLog = warningToLog.getNextWarning();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tSQLWarning warnings = statement.getWarnings();\n\t\t\tif (warnings != null) {\n\t\t\t\tthrow new SQLWarningException(\"Warning not ignored\", warnings);\n\t\t\t}\n\t\t}\n\t}", "public void addToPolicyTransactions(entity.AppCritPolicyTransaction element);", "@ZAttr(id=1073)\n public void addPrefSpellIgnoreWord(String zimbraPrefSpellIgnoreWord) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"+\" + Provisioning.A_zimbraPrefSpellIgnoreWord, zimbraPrefSpellIgnoreWord);\n getProvisioning().modifyAttrs(this, attrs);\n }", "public ExecutionPolicy not()\n\t{\n\t\treturn new NotRule(this);\n\t}", "private void configureConnectionPerms() throws ConfigurationException\n {\n boolean hasAllows= false, hasDenies= false;\n\n String[] allows= cfg.getAll (\"allow\");\n if (allows != null && allows.length > 0) {\n hasAllows= true;\n\n for (String allowIP : allows) {\n allowIP= allowIP.trim();\n\n if (allowIP.indexOf('*') == -1) { // specific IP with no wildcards\n specificIPPerms.put(allowIP, true);\n } else { // there's a wildcard\n wildcardAllow= (wildcardAllow == null) ? new ArrayList<>() : wildcardAllow;\n String[] parts= allowIP.split(\"[*]\");\n wildcardAllow.add(parts[0]); // keep only the first part\n }\n }\n }\n\n String[] denies= cfg.getAll (\"deny\");\n if (denies != null && denies.length > 0) {\n hasDenies= true;\n\n for (String denyIP : denies) {\n boolean conflict= false; // used for a little sanity check\n\n denyIP= denyIP.trim();\n if (denyIP.indexOf('*') == -1) { // specific IP with no wildcards\n Boolean oldVal= specificIPPerms.put(denyIP, false);\n conflict= (oldVal == Boolean.TRUE);\n } else { // there's a wildcard\n wildcardDeny= (wildcardDeny == null) ? new ArrayList<>() : wildcardDeny;\n String[] parts= denyIP.split(\"[*]\");\n if (wildcardAllow != null && wildcardAllow.contains(parts[0]))\n conflict= true;\n else\n wildcardDeny.add(parts[0]); // keep only the first part\n }\n\n if (conflict) {\n throw new ConfigurationException(\n \"Conflicting IP permission in '\"+getName()+\"' configuration: 'deny' \"\n +denyIP+\" while having an identical previous 'allow'.\");\n }\n }\n }\n\n // sum up permission policy and logging type\n ipPermLogPolicy= (!hasAllows && !hasDenies) ? PermLogPolicy.ALLOW_NOLOG : // default when no permissions specified\n ( hasAllows && !hasDenies) ? PermLogPolicy.DENY_LOG :\n (!hasAllows && hasDenies) ? PermLogPolicy.ALLOW_LOG :\n PermLogPolicy.DENY_LOGWARNING; // mixed allows & denies, if nothing matches we'll DENY and log a warning\n }", "static void ignore() {\n }", "public SyntaxWarningRule() {\n super(KEY);\n }", "public SampledPolicy() {\r\n super(ExecutablePolicyType.SAMPLED);\r\n }", "public AttributeBooleanType buildUnchecked() {\n return new AttributeBooleanTypeImpl();\n }", "@Override\r\n\tpublic void savePolicy(Policy policy) {\n\t\tdao.savePolicy(policy);\r\n\t}", "public void allowUnaligned(MemoryArea.Type memType) {\n unalignedAreaTypes.add(memType);\n }", "public void addExemptionPermanently(CheckType check) {\n exemptions.put(check, -1L);\n }", "public void sendPolicy() throws Exception{\n\t\tIterator<ASServer> iam = manager.getASServers().values().iterator();\n\t\t\n\t\twhile(iam.hasNext()){\n\t\t\t\n\t\t\tASServer serId = iam.next();\n\t\t\tsendASPolicy(serId.currentPolicy, serId.serverId);\n\t\t\t\n\t\t}\n\t\t\n\t\t// send LB policies\n\t\t\n\t\tsendLBPolicy(currentLBPolicy, manager.props.getProperty(StatisticsManager.LBSERVER));\n\t\t\n\t}", "@Override\n public void clearWarnings() throws SQLException {\n }", "@Override\r\n\tpublic boolean insert(Policy policy) {\n\t\tdao.insert(policy);\r\n\t\treturn true;\r\n\t}", "public void addPoolableElement(P poolable) throws MalformedDilutionException;", "public void setPolicy(short policy) {\n\t\t_policy = policy;\n\t}", "public void addWarning(ShadowException exception) {\n if (Loggers.warningsAreErrors()) addError(exception);\n else if (exception != null) warningList.add(exception);\n }", "public void removeExcludedPolicy()\n throws PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\n\n\tif (excludedPermissions != null) {\n\t excludedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "public HashMap<List<Integer>, List<Integer>> genEmptyPolicy() {\n\t\tHashMap<List<Integer>, List<Integer>> emptyPolicy = new \n\t\t\t\tHashMap<List<Integer>, List<Integer>>();\n\t\tif(ventureManager.getNumVentures() == 2) {\n\t\t\tList<Integer> nil = new ArrayList<Integer>();\n\t\t\tnil.add(0);\n\t\t\tnil.add(0);\n\t\t\tfor(List<Integer> s : states) \n\t\t\t\temptyPolicy.put(s, nil);\n\t\t}\n\t\telse {\n\t\t\tList<Integer> nil = new ArrayList<Integer>();\n\t\t\tnil.add(0);\n\t\t\tnil.add(0);\n\t\t\tnil.add(0);\n\t\t\tfor(List<Integer> s: states)\n\t\t\t\temptyPolicy.put(s, nil);\n\t\t}\n\t\treturn emptyPolicy;\n\t}", "public void onPowerSaveUnwhitelisted(AppStateTracker sender) {\n updateAllJobs();\n unblockAllUnrestrictedAlarms();\n }", "@Override\n public <E> void configurePermissibleValues(List<E> values, Class<E> type)\n {\n }", "public ReviewRatingSetMessage buildUnchecked() {\n return new ReviewRatingSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy,\n sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, oldRating, newRating,\n includedInStatistics, target);\n }", "public EditPolicy() {\r\n super();\r\n }", "private void setPolicyPermissionsToDTO(SubscriptionThrottlePolicyDTO policyDTO) throws APIManagementException {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n TierPermissionDTO addedPolicyPermission =\n (TierPermissionDTO) apiProvider.getThrottleTierPermission(policyDTO.getPolicyName());\n if (addedPolicyPermission != null) {\n SubscriptionThrottlePolicyPermissionDTO addedPolicyPermissionDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyPermissionToDTO(addedPolicyPermission);\n policyDTO.setPermissions(addedPolicyPermissionDTO);\n }\n }", "void clearWarnings() throws SQLException;", "@ZAttr(id=1073)\n public Map<String,Object> addPrefSpellIgnoreWord(String zimbraPrefSpellIgnoreWord, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"+\" + Provisioning.A_zimbraPrefSpellIgnoreWord, zimbraPrefSpellIgnoreWord);\n return attrs;\n }", "public NotRule(ExecutionPolicy rule)\n\t\t{\n\t\t\tthis.rule = rule;\n\t\t}", "public void check_not_in_allowed_statement(boolean on){\r\n this.e_not_in_allowed_statement = on;\r\n }", "@Override\r\n\t\tpublic void clearWarnings() throws SQLException {\n\t\t\t\r\n\t\t}", "public void addWarning(@Nonnull Warning w) {\r\n warnings.add(w);\r\n }", "public XorRule(ExecutionPolicy...rules)\n\t\t{\n\t\t\tsuper(rules);\n\t\t}", "protected AbstractGeneratedPrefsTransform() {\n\t\tsuper(false);\n\t}", "public static void disableWarning() {\n try {\n Field theUnsafe = Unsafe.class.getDeclaredField(\"theUnsafe\");\n theUnsafe.setAccessible(true);\n Unsafe u = (Unsafe) theUnsafe.get(null);\n\n Class<?> c = Class.forName(\"jdk.internal.module.IllegalAccessLogger\");\n Field logger = c.getDeclaredField(\"logger\");\n u.putObjectVolatile(c, u.staticFieldOffset(logger), null);\n } catch (ClassNotFoundException e) {\n // do nothing\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void validatePolicyPermissions(SubscriptionThrottlePolicyDTO body) throws APIManagementException {\n SubscriptionThrottlePolicyPermissionDTO policyPermissions = body.getPermissions();\n if (policyPermissions != null && policyPermissions.getRoles().size() == 0) {\n throw new APIManagementException(ExceptionCodes.ROLES_CANNOT_BE_EMPTY);\n }\n }", "List<DropOverload> getDropPolicies() {\n return Collections.unmodifiableList(dropPolicies);\n }", "protected void addRecordWithoutChecks(final AbstractRecord record) {\n\t\trecords.add(record);\n\t}", "public void setIgnoreWarnings(boolean ignoreWarnings) {\n\t\tthis.ignoreWarnings = ignoreWarnings;\n\t}", "private List<Throwable> exceptions(Object swallowing) {\n return Collections.emptyList();\n }", "void register(PolicyDefinition policyDefinition);", "private void updatePolicyPermissions(SubscriptionThrottlePolicyDTO body) throws APIManagementException {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n SubscriptionThrottlePolicyPermissionDTO policyPermissions = body.getPermissions();\n if (policyPermissions != null) {\n if (policyPermissions.getRoles().size() > 0) {\n String roles = StringUtils.join(policyPermissions.getRoles(), \",\");\n String permissionType;\n if (policyPermissions.getPermissionType() ==\n SubscriptionThrottlePolicyPermissionDTO.PermissionTypeEnum.ALLOW) {\n permissionType = APIConstants.TIER_PERMISSION_ALLOW;\n } else {\n permissionType = APIConstants.TIER_PERMISSION_DENY;\n }\n apiProvider.updateThrottleTierPermissions(body.getPolicyName(), permissionType, roles);\n } else {\n throw new APIManagementException(ExceptionCodes.ROLES_CANNOT_BE_EMPTY);\n }\n } else {\n apiProvider.deleteTierPermissions(body.getPolicyName());\n }\n }", "public static void removeRestrictions() {\n\t\ttry {\n\t\t\tClass<?> jceSecurityClass = Class.forName(\"javax.crypto.JceSecurity\");\n\t\t\tClass<?> cryptoPermissionsClass = Class.forName(\"javax.crypto.CryptoPermissions\");\n\t\t\tClass<?> cryptoAllPermissionClass = Class.forName(\"javax.crypto.CryptoAllPermission\");\n\n\t\t\tField isRestrictedField = jceSecurityClass.getDeclaredField(\"isRestricted\");\n\t\t\tisRestrictedField.setAccessible(true);\n\t\t\tisRestrictedField.set(null, false);\n\n\t\t\tField defaultPolicyField = jceSecurityClass.getDeclaredField(\"defaultPolicy\");\n\t\t\tdefaultPolicyField.setAccessible(true);\n\t\t\tPermissionCollection defaultPolicy = (PermissionCollection) defaultPolicyField.get(null);\n\n\t\t\tField permsField = cryptoPermissionsClass.getDeclaredField(\"perms\");\n\t\t\tpermsField.setAccessible(true);\n\t\t\t((Map<?, ?>) permsField.get(defaultPolicy)).clear();\n\n\t\t\tField cryptoAllPermissionInstanceField = cryptoAllPermissionClass.getDeclaredField(\"INSTANCE\");\n\t\t\tcryptoAllPermissionInstanceField.setAccessible(true);\n\t\t\tdefaultPolicy.add((Permission) cryptoAllPermissionInstanceField.get(null));\n\t\t} catch (Exception e) {\n\t\t\t// ignore\n\t\t}\n }", "AgentPolicyBuilder clear();", "private static void setRTTTransmissionPolicy() {\n\n /*\n * Set the transmission policy for each of the JChord event types\n */\n TransmissionPolicyManager.setClassPolicy(Event.class.getName(),\n PolicyType.BY_VALUE, true);\n TransmissionPolicyManager.setClassPolicy(HashMap.class.getName(),\n PolicyType.BY_VALUE, true);\n\n /*\n * Set the transmission policy for KeyImpl, JChordNextHopResult and\n * SuccessorList objects\n */\n TransmissionPolicyManager.setClassPolicy(JChordNextHopResult.class\n .getName(), PolicyType.BY_VALUE, true);\n TransmissionPolicyManager.setClassPolicy(KeyImpl.class.getName(),\n PolicyType.BY_VALUE, true);\n\n// RafdaRunTime.registerCustomSerializer(SuccessorList.class,\n// new jchord_impl_SuccessorList());\n// TransmissionPolicyManager.setClassPolicy(SuccessorList.class.getName(),\n// PolicyType.BY_VALUE, true);\n \n// TransmissionPolicyManager.setReturnValuePolicy(JChordNodeImpl.class\n// .getName(), \"getSuccessorList\", PolicyType.BY_VALUE, true);\n\n /*\n * Set the transmission policy for the 'node_rep' fields of\n * JChordNodeImpl objects\n */\n String JChordNodeImplName = JChordNodeImpl.class.getName();\n TransmissionPolicyManager.setFieldToBeCached(JChordNodeImplName,\n \"hostAddress\");\n TransmissionPolicyManager.setFieldToBeCached(JChordNodeImplName, \"key\");\n }", "org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);", "public ApplicationDeltaHealthPolicy() {\n }", "public void addWarning(String warning);", "public InboundSecurityRules() {\n }", "public final void synpred5_InternalSafetyParser_fragment() throws RecognitionException { \n // InternalSafetyParser.g:3010:5: ( ( () When ( ( ruleExpr ) ) Holds ) )\n // InternalSafetyParser.g:3010:6: ( () When ( ( ruleExpr ) ) Holds )\n {\n // InternalSafetyParser.g:3010:6: ( () When ( ( ruleExpr ) ) Holds )\n // InternalSafetyParser.g:3011:6: () When ( ( ruleExpr ) ) Holds\n {\n // InternalSafetyParser.g:3011:6: ()\n // InternalSafetyParser.g:3012:6: \n {\n }\n\n match(input,When,FollowSets000.FOLLOW_21); if (state.failed) return ;\n // InternalSafetyParser.g:3014:6: ( ( ruleExpr ) )\n // InternalSafetyParser.g:3015:7: ( ruleExpr )\n {\n // InternalSafetyParser.g:3015:7: ( ruleExpr )\n // InternalSafetyParser.g:3016:8: ruleExpr\n {\n pushFollow(FollowSets000.FOLLOW_38);\n ruleExpr();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n\n }\n\n match(input,Holds,FollowSets000.FOLLOW_2); if (state.failed) return ;\n\n }\n\n\n }\n }", "@Override\n public void replaceAllItemPolicies(Context context, Item item, List<ResourcePolicy> newpolicies) throws SQLException,\n AuthorizeException\n {\n // remove all our policies, add new ones\n authorizeService.removeAllPolicies(context, item);\n authorizeService.addPolicies(context, newpolicies, item);\n }", "public MicrosoftGraphStsPolicy() {\n }", "private void addAttacks(){\n while(!attacksToAdd.isEmpty()){\n attacks.add(attacksToAdd.remove());\n }\n }" ]
[ "0.5818856", "0.51956475", "0.51926225", "0.5030085", "0.49150318", "0.48530084", "0.48418474", "0.483471", "0.483471", "0.483471", "0.47920302", "0.478574", "0.478574", "0.47137764", "0.46688762", "0.46172866", "0.46159956", "0.45977435", "0.4597593", "0.4597327", "0.45897946", "0.45789155", "0.45466208", "0.45447943", "0.4524463", "0.44930857", "0.4486972", "0.44838604", "0.44777572", "0.4474868", "0.44270304", "0.4426573", "0.4359992", "0.4357925", "0.43530968", "0.43342322", "0.4314084", "0.4305754", "0.4302348", "0.4275443", "0.42691624", "0.4267106", "0.42601287", "0.42471328", "0.42350566", "0.42329982", "0.42316097", "0.422385", "0.42185372", "0.42150566", "0.4184461", "0.41768157", "0.4172138", "0.41644728", "0.4161423", "0.41518366", "0.41426024", "0.4136745", "0.4135108", "0.41266885", "0.4124469", "0.4119863", "0.41148582", "0.4112469", "0.4111327", "0.40943807", "0.40919644", "0.408864", "0.40875426", "0.40871853", "0.40847287", "0.40804926", "0.4079883", "0.40733197", "0.40724418", "0.40682402", "0.40657854", "0.4059863", "0.40491146", "0.40360782", "0.40327454", "0.4031408", "0.40310663", "0.4023428", "0.40202802", "0.40194938", "0.40170017", "0.4015719", "0.4015129", "0.4009314", "0.40074706", "0.40040478", "0.39980224", "0.39891627", "0.39872685", "0.39839402", "0.39824966", "0.39807615", "0.39791214", "0.39645728" ]
0.53394574
1
Used to add a single unchecked policy statement to this PolicyConfiguration.
public void addToUncheckedPolicy(Permission permission) throws PolicyContextException{ assertStateIsOpen(); assert permission != null; if (permission != null) { checkSetPolicyPermission(); this.getUncheckedPermissions().add(permission); writeOnCommit = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeUncheckedPolicy()\n\tthrows PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\t\n\n\tif (uncheckedPermissions != null) {\n\t uncheckedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "@Override\n\tpublic Policy addPolicy(Policy policy) {\n\t\t// TODO Auto-generated method stub\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "public void addPolicy(Policy policy) throws APIManagementException {\n\n if (policy instanceof APIPolicy) {\n APIPolicy apiPolicy = (APIPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getAPIPolicy(userNameWithoutChange, apiPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Advanced Policy with name \" + apiPolicy.getPolicyName() + \" already exists\");\n }\n apiPolicy.setUserLevel(PolicyConstants.ACROSS_ALL);\n apiPolicy = apiMgtDAO.addAPIPolicy(apiPolicy);\n List<Integer> addedConditionGroupIds = new ArrayList<>();\n for (Pipeline pipeline : apiPolicy.getPipelines()) {\n addedConditionGroupIds.add(pipeline.getId());\n }\n APIPolicyEvent apiPolicyEvent = new APIPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n apiPolicy.getTenantDomain(), apiPolicy.getPolicyId(), apiPolicy.getPolicyName(),\n apiPolicy.getDefaultQuotaPolicy().getType(), addedConditionGroupIds, null);\n APIUtil.sendNotification(apiPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof ApplicationPolicy) {\n ApplicationPolicy appPolicy = (ApplicationPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getApplicationPolicy(userNameWithoutChange, appPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Application Policy with name \" + appPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addApplicationPolicy(appPolicy);\n //policy id is not set. retrieving policy to get the id.\n ApplicationPolicy retrievedPolicy = apiMgtDAO.getApplicationPolicy(appPolicy.getPolicyName(), tenantId);\n ApplicationPolicyEvent applicationPolicyEvent = new ApplicationPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n appPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(), appPolicy.getPolicyName(),\n appPolicy.getDefaultQuotaPolicy().getType());\n APIUtil.sendNotification(applicationPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof SubscriptionPolicy) {\n SubscriptionPolicy subPolicy = (SubscriptionPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getSubscriptionPolicy(userNameWithoutChange, subPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Subscription Policy with name \" + subPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addSubscriptionPolicy(subPolicy);\n String monetizationPlan = subPolicy.getMonetizationPlan();\n Map<String, String> monetizationPlanProperties = subPolicy.getMonetizationPlanProperties();\n if (StringUtils.isNotBlank(monetizationPlan) && MapUtils.isNotEmpty(monetizationPlanProperties)) {\n createMonetizationPlan(subPolicy);\n }\n //policy id is not set. retrieving policy to get the id.\n SubscriptionPolicy retrievedPolicy = apiMgtDAO.getSubscriptionPolicy(subPolicy.getPolicyName(), tenantId);\n SubscriptionPolicyEvent subscriptionPolicyEvent = new SubscriptionPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId, subPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n subPolicy.getPolicyName(), subPolicy.getDefaultQuotaPolicy().getType(),\n subPolicy.getRateLimitCount(),subPolicy.getRateLimitTimeUnit(), subPolicy.isStopOnQuotaReach(),\n subPolicy.getGraphQLMaxDepth(),subPolicy.getGraphQLMaxComplexity(),subPolicy.getSubscriberCount());\n APIUtil.sendNotification(subscriptionPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof GlobalPolicy) {\n GlobalPolicy globalPolicy = (GlobalPolicy) policy;\n\n // checking if policy already exist\n Policy existingPolicy = getGlobalPolicy(globalPolicy.getPolicyName());\n if (existingPolicy != null) {\n throw new APIManagementException(\"Policy name already exists\");\n }\n\n apiMgtDAO.addGlobalPolicy(globalPolicy);\n\n KeyTemplateEvent keyTemplateEvent = new KeyTemplateEvent(UUID.randomUUID().toString(), System.currentTimeMillis(),\n APIConstants.EventType.CUSTOM_POLICY_ADD.name(), tenantId, tenantDomain,\n \"add\", globalPolicy.getKeyTemplate());\n APIUtil.sendNotification(keyTemplateEvent, APIConstants.NotifierType.KEY_TEMPLATE.name());\n\n GlobalPolicy retrievedPolicy = apiMgtDAO.getGlobalPolicy(globalPolicy.getPolicyName());\n GlobalPolicyEvent globalPolicyEvent = new GlobalPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n globalPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n globalPolicy.getPolicyName());\n APIUtil.sendNotification(globalPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else {\n String msg = \"Policy type \" + policy.getClass().getName() + \" is not supported\";\n log.error(msg);\n throw new UnsupportedPolicyTypeException(msg);\n }\n }", "public void addPolicy(Policy policy) throws PolicyException {\n\n // Add BlueprintPolicy\n if (policy instanceof BlueprintPolicy) {\n if (erectors.get(policy.getTarget()) == null) {\n throw new PolicyException(\"Blueprint does not exist for BlueprintPolicy target: \" + policy.getTarget());\n }\n\n List<BlueprintPolicy> policies = blueprintPolicies.get(policy.getTarget());\n if (policies == null) {\n policies = new ArrayList<BlueprintPolicy>();\n }\n\n policies.add((BlueprintPolicy) policy);\n\n logger.info(\"Setting BlueprintPolicy {} for {}\", policy, policy.getTarget());\n\n blueprintPolicies.put(policy.getTarget(), policies);\n\n // Add FieldPolicy\n } else if (policy instanceof FieldPolicy) {\n\n // XXX: force FieldPolicy's to be mapped to a blueprint? Limits their scope, but enables validation\n if (erectors.get(policy.getTarget()) == null) {\n throw new PolicyException(\"Blueprint does not exist for FieldPolicy target: \" + policy.getTarget());\n }\n\n List<FieldPolicy> policies = fieldPolicies.get(policy.getTarget());\n if (policies == null) {\n policies = new ArrayList<FieldPolicy>();\n }\n\n policies.add((FieldPolicy) policy);\n\n logger.info(\"Setting FieldPolicy {} for {}\", policy, policy.getTarget());\n\n fieldPolicies.put(policy.getTarget(), policies);\n }\n }", "public void addToUncheckedPolicy(PermissionCollection permissions)\n\tthrows PolicyContextException {\t\n\n assertStateIsOpen();\n\n\tassert permissions != null;\n\t\n\tif (permissions != null) {\n\t checkSetPolicyPermission();\n\t for(Enumeration e = permissions.elements(); e.hasMoreElements();){\n\t\tthis.getUncheckedPermissions().add((Permission) e.nextElement());\n\t\twriteOnCommit = true;\n\t }\n\t}\n }", "void clearPolicy() {\n policy = new Policy();\n }", "PolicyHolder addPolicyHolder(Integer agentId , PolicyHolder pHolder);", "@Override\r\n\tpublic boolean insert(Policy policy) {\n\t\tdao.insert(policy);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic void savePolicy(Policy policy) {\n\t\tdao.savePolicy(policy);\r\n\t}", "public void addToExcludedPolicy(Permission permission)\n\tthrows PolicyContextException{\n\n assertStateIsOpen();\n\n\tassert permission != null;\n\n\tif (permission != null) {\n\t checkSetPolicyPermission();\n\t this.getExcludedPermissions().add(permission);\n\t writeOnCommit = true;\n\t}\n }", "public void setPolicyLine(java.lang.String value);", "public void setPolicy(short policy) {\n\t\t_policy = policy;\n\t}", "public static CustomPolicy createDefaultCustomPolicy() {\n CustomPolicy customPolicy = new CustomPolicy(SAMPLE_CUSTOM_RULE);\n customPolicy.setKeyTemplate(\"$userId\");\n String siddhiQuery = \"FROM RequestStream SELECT userId, ( userId == '[email protected]' ) AS isEligible , \"\n + \"str:concat('[email protected]','') as throttleKey INSERT INTO EligibilityStream;\"\n + \"FROM EligibilityStream[isEligible==true]#throttler:timeBatch(1 min) SELECT throttleKey, \"\n + \"(count(userId) >= 5 as isThrottled, expiryTimeStamp group by throttleKey INSERT ALL EVENTS into \"\n + \"ResultStream;\";\n\n customPolicy.setSiddhiQuery(siddhiQuery);\n customPolicy.setDescription(\"Sample custom policy\");\n return customPolicy;\n }", "public void setPolicy(String policy) {\r\n if (policy != null && !policy.equals(\"\")) {\r\n String[] rules = policy.trim().split(\",\");\r\n if (rules != null && rules.length > 0) {\r\n emptyPolicy();\r\n \r\n for (String s : rules) {\r\n addRule(new AccessRule(s));\r\n }\r\n }\r\n }\r\n }", "public void addToPolicyTransactions(entity.AppCritPolicyTransaction element);", "@Override\r\n\tpublic void updatePolicy(Policy policy) {\n\t\tdao.updatePolicy(policy);\r\n\t\t\r\n\t}", "void register(PolicyDefinition policyDefinition);", "public void setPolicyNo(java.lang.String policyNo) {\n this.policyNo = policyNo;\n }", "public void setPolicyNo(java.lang.String policyNo) {\n this.policyNo = policyNo;\n }", "public void insert(ChargePolicy chargePolicy);", "@Override\n public Exp getBasePolicyCode() {\n return null;\n }", "@ZAttr(id=1073)\n public void addPrefSpellIgnoreWord(String zimbraPrefSpellIgnoreWord) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"+\" + Provisioning.A_zimbraPrefSpellIgnoreWord, zimbraPrefSpellIgnoreWord);\n getProvisioning().modifyAttrs(this, attrs);\n }", "@Override\n public PutResourcePolicyResult putResourcePolicy(PutResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executePutResourcePolicy(request);\n }", "public void warningPermit();", "public ExecutionPolicy not()\n\t{\n\t\treturn new NotRule(this);\n\t}", "public NotRule(ExecutionPolicy rule)\n\t\t{\n\t\t\tthis.rule = rule;\n\t\t}", "public int insertPolicy(CompanyPolicy cPolicy) {\n\t\tint response = 0;\n\t\tint policyNo = cPolicy.getPolicyNo();\n\t\tCompanyPolicy cP = getPolicy(policyNo);\t\t\n\t\tif (cP == null){\n\t\t\tTransaction tx = session.beginTransaction();\n\t\t\ttry {\n\t\t\t\tpolicyNo = (int) this.session.save(cPolicy);\n\t\t\t\ttx.commit();\n\t\t\t}catch (Exception e) {\n\t\t\t\t//Error in Policy addition as formating error\n\t\t\t\tresponse = -1;\t\t\t\t\n\t\t\t}\n\t\t} else {\n\t\t\t//Policy is already exists in database \n\t\t\tresponse = -2;\n\t\t}\n\t\treturn response;\n\t}", "public FractalTrace setAbyssPolicy(String value)\n {\n\t\n m_AbyssPolicy = value;\n setProperty(\"abyss-policy\", value);\n return this;\n }", "public long a(PolicyResponseData policyResponseData) {\n b.d(\"PolicyDao\", \"addOrUpdatePolicies()\");\n if (policyResponseData == null || policyResponseData.getId() == null || policyResponseData.getVersion() == null || policyResponseData.getPolicy() == null) {\n return -1L;\n }\n ContentValues contentValues = new ContentValues();\n try {\n j.a(policyResponseData.getPolicyObject());\n contentValues.put(\"policyid\", \"ALL_POLICIES\");\n contentValues.put(\"version\", policyResponseData.getVersion());\n contentValues.put(\"content\", policyResponseData.toJson().getBytes());\n long l2 = this.GC.c(\"policies\", contentValues);\n if (l2 < 0L) {\n b.e(\"PolicyDao\", \"cannot add policy\");\n }\n contentValues.clear();\n return l2;\n }\n catch (Exception exception) {\n b.c(\"PolicyDao\", \"add policy exception\", exception);\n return -1L;\n }\n }", "protected void setPolicy(LinkedHashMap<String, Vector<String>> policy) {\r\n\r\n\t\t// get all the parameters from config file\r\n\t\tVector<String> policyFrom = parameters.get(\"/Domains/POLICY/@from\");\r\n\t\tVector<String> policyTo = parameters.get(\"/Domains/POLICY/@to\");\r\n\t\tVector<String> policyBy = parameters.get(\"/Domains/POLICY/@by\");\r\n\r\n\t\tfor (int i = 0; i < policyFrom.size(); i++) {\r\n\t\t\tVector<String> temp = new Vector<String>();\r\n\t\t\t// if the policy entry has a comma (,), there`s a multiple possible\r\n\t\t\t// transit domain\r\n\t\t\tif (policyBy.get(i).contains(\",\")) {\r\n\t\t\t\tString[] policyHop = policyBy.get(i).split(\",\");\r\n\t\t\t\tfor (int p = 0; p < policyHop.length; p++) {\r\n\t\t\t\t\ttemp.add(policyHop[p]);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// otherwise, just add the hop in the config file\r\n\t\t\t\t// All the policies with only one path, will apply this\r\n\t\t\t\ttemp.add(policyBy.get(i));\r\n\t\t\t}\r\n\t\t\tpolicy.put(policyFrom.get(i) + \"-\" + policyTo.get(i), temp);\r\n\t\t}\r\n\r\n\t}", "public void setPolicyURL(java.lang.String policyURL) {\n this.policyURL = policyURL;\n }", "public SampledPolicy() {\r\n super(ExecutablePolicyType.SAMPLED);\r\n }", "public synchronized void setEvictionPolicy(EvictionPolicy policy)\n {\n int nType = (policy == null ? EVICTION_POLICY_HYBRID\n : EVICTION_POLICY_EXTERNAL);\n configureEviction(nType, policy);\n }", "void registerStatement(EPStatement statement) {\r\n\t\tepnStatements.add(statement);\r\n\t}", "public void addWarning(String warning);", "public void negateUnxepectedTagPenalty() {\n\t\tnegateUnxepectedTagPenalty = true;\n\t}", "public void insertSelective(UserPermission record) {\n\t\tgetSqlMapClientTemplate().insert(\"userpermission.insertSelective\",\n\t\t\t\trecord);\n\t}", "public void add(Statement element) {\n ensureSize(size + 1);\n arr[size++] = element;\n }", "public void enableStatement(ESqlStatementType sqltype){\r\n this.enabledStatements.add(sqltype);\r\n }", "void updatePolicyHOlder(int policyHolderId , PolicyHolder policyHolder);", "public Policy _get_policy(int policy_type) {\n throw new NO_IMPLEMENT(reason);\n }", "public void addPoolableElement(P poolable) throws MalformedDilutionException;", "public void setPolicy(com.vmware.converter.DVSPolicy policy) {\r\n this.policy = policy;\r\n }", "Policy _get_policy(int policy_type);", "public SyntaxWarningRule() {\n super(KEY);\n }", "@Deprecated\n void setEvictionPolicy(Policy policy);", "int insertSelective(PolicyGroup record);", "public CancellationPolicy addCancellationPolicy(CancellationPolicy newPolicy) throws Exception {\n List<ExpediaRules> expediaRules = newPolicy.getRules();\n expediaRules.forEach((rule) -> {\n rule.setPolicy(newPolicy);\n });\n newPolicy.setRules(expediaRules);\n newPolicy.setPolicyUpdatedOn();\n newPolicy.setPolicyUpdatedBy(\"Tester\");\n CancellationPolicy addedPolicy = cancellationPolicyRepository.save(newPolicy);\n return addedPolicy;\n }", "public void addToExcludedPolicy(PermissionCollection permissions)\n\tthrows PolicyContextException {\n\n assertStateIsOpen();\n\n\tassert permissions != null;\n\n\tif (permissions != null) {\n\t checkSetPolicyPermission();\n\t for(Enumeration e = permissions.elements(); e.hasMoreElements();){\n\t\tthis.getExcludedPermissions().add((Permission) e.nextElement());\n\t\twriteOnCommit = true;\n\t }\n\t}\n }", "public final void mT__83() throws RecognitionException {\n try {\n int _type = T__83;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:83:7: ( 'policy' )\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:83:9: 'policy'\n {\n match(\"policy\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public void setNamedInsured(entity.PolicyNamedInsured value);", "public void addWarning(@Nonnull Warning w) {\r\n warnings.add(w);\r\n }", "protected Permissions getExcludedPolicy(){\n\treturn stateIs(INSERVICE_STATE) ? this.excludedPermissions : null;\n }", "@Override\r\n public void forbidShape (Shape shape)\r\n {\r\n if (forbiddenShapes == null) {\r\n forbiddenShapes = new HashSet<>();\r\n }\r\n\r\n forbiddenShapes.add(shape);\r\n }", "public void addExemptionPermanently(CheckType check) {\n exemptions.put(check, -1L);\n }", "public SharedActivationPolicyPermission(String policy) {\n\tthis(policy, init(policy));\n }", "public void disableStatement(ESqlStatementType sqltype){\r\n for(int i=this.enabledStatements.size()-1;i>=0;i--){\r\n if (this.enabledStatements.get(i) == sqltype){\r\n this.enabledStatements.remove(i);\r\n }\r\n }\r\n }", "public void addWarning(ShadowException exception) {\n if (Loggers.warningsAreErrors()) addError(exception);\n else if (exception != null) warningList.add(exception);\n }", "public void insert_penalty(String state_key, double pnlty){\n\t\t//convert penalty\n\t\tdouble[] penalty = new double[1];\n\t\tpenalty[0] = pnlty;\n\t\t\n\t\t//add into buffer\n\t\tpenalty_buffer.put(state_key, penalty);\n\t}", "public String getAbyssPolicy()\n {\n return m_AbyssPolicy;\n }", "public void setConditionalPolicies (Vector conditionalPolicies)\n {\n openTransaction();\n Iterator it = query(conditionalPolicyMsgPredicate).iterator();\n while (it.hasNext()) {\n publishRemove(it.next());\n }\n \n // add new ConditionalPolicyMsgs\n for (int i=0; i<conditionalPolicies.size(); i++) {\n ConditionalPolicyMsg condPol = (ConditionalPolicyMsg) conditionalPolicies.elementAt(i);\n UnexpandedConditionalPolicyMsg ucpm = new UnexpandedConditionalPolicyMsg(condPol);\n publishAdd(ucpm);\n }\n closeTransaction();\n }", "public DistributionPolicyInternal() {}", "public SecurityHandler skipAudit() {\n return builder(this).audit(false).build();\n }", "org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);", "public void removeFromPolicyTransactions(entity.AppCritPolicyTransaction element);", "public void add(Statement followingStatement, List<Statement> newStatements) {\n\n\t\t\n\t\tlog(\"add statements of \" + element.getWord() + \": \" + getStatementsString(newStatements));\n\n\t\t//synchronized (ontology) {\n\t\t\tif (statements.contains(followingStatement)) {\n\t\t\t\tstatements.addAll(statements.indexOf(followingStatement), newStatements);\n\t\t\t} else {\n\t\t\t\tif (followingStatement != null) {\n\t\t\t\t\tlog(\"error: statement is not around anymore\");\n\t\t\t\t}\n\t\t\t\tstatements.addAll(newStatements);\n\t\t\t}\n\t\t\tif (ontology != null) {\n\t\t\t\tfor (Statement s : newStatements) {\n\t\t\t\t\tif (s instanceof Sentence) {\n\t\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\t\t//ym\n\t\t\t\t\t\t\n\t\t\t\t\t\t//ontology.commitSentence((Sentence) s);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tontology.getStorage().save(element);\n\t\t\t}\n\t\t//}\n\t}", "@Override\n public void applyDdlStatements(Connection connection,\n List<String> statements) throws SQLException {\n try {\n super.applyDdlStatements(connection, statements);\n } catch (SQLException e) {\n if (!e.getMessage().contains(HYPERTABLE_WARNING)) {\n throw e;\n }\n }\n }", "public String getPolicy() {\r\n String policy = \"\";\r\n if (!policyRules.isEmpty()) {\r\n policy += policyRules.get(0).getRule().trim();\r\n for (int i = 1; i < policyRules.size(); i++) {\r\n policy += \",\" + policyRules.get(i).getRule().trim();\r\n }\r\n }\r\n\r\n return policy.trim();\r\n }", "private void manageDeniedPacket(MeetingPacket packet) {\n Console.comment(\"=> Denied packet from \" + packet.getSourceAddress()) ;\n\n if(this.callbackOnDenied != null) {\n this.callbackOnDenied.denied() ;\n }\n }", "public EditPolicy() {\r\n super();\r\n }", "@Override\n\tprotected void addInstanceByPolicy(IEventInstance candidate, Operand operand) {\n\t\taddCandidateFirst(candidate, operand);\n\t}", "public void evel_thresholdcross_alertid_add(String alertid)\r\n\t{\r\n\t EVEL_ENTER();\r\n\r\n\t /***************************************************************************/\r\n\t /* Check preconditions. */\r\n\t /***************************************************************************/\r\n\t assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_THRESHOLD_CROSSING);\r\n\t assert(alertid != null);\r\n\t \r\n\t if( alertidList == null )\r\n\t {\r\n\t\t alertidList = new ArrayList<String>();\r\n\t }\r\n\r\n\t LOGGER.debug(MessageFormat.format(\"Adding alertid={0}\", alertid));\r\n\r\n\t alertidList.add(new String(alertid));\r\n\r\n\t EVEL_EXIT();\r\n\t}", "public ReviewRatingSetMessage buildUnchecked() {\n return new ReviewRatingSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy,\n sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, oldRating, newRating,\n includedInStatistics, target);\n }", "private void setDictionaryImplications() {\n if (usingDictionary) {\n usingDictionaryValue = \"Yes\";\n } else {\n usingDictionaryValue = \"No\";\n }\n textMergeScript.recordScriptAction\n (ScriptConstants.OUTPUT_MODULE,\n ScriptConstants.SET_ACTION,\n ScriptConstants.NO_MODIFIER,\n ScriptConstants.USING_DICTIONARY_OBJECT,\n String.valueOf(usingDictionary));\n }", "@Override\n\t\t\t\tpublic Resource apply(Statement t) {\n\t\t\t\t\treturn null;\n\t\t\t\t}", "@Override\n\tpublic Policy updatePolicy(Policy policy) throws PolicyNotFoundException {\n\t\t// TODO Auto-generated method stub\n\t\tif(!policyDao.existsById(policy.getPolicyId()))\n\t\t\tthrow new PolicyNotFoundException(\"policy not found\");\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "private void removeStatement(){\n\t\tsynchronized(m_viz){\n\t\t\tTuple firstTuple;\n\t\t\tsynchronized(statementList){\n\t\t\t\tfirstTuple = statementList.getFirst();\n\t\t\t}\n\n\t\t\t// Remove action is synchronized to prevent PreFuse from drawing at the same time\n\t\t\tremoveMessage(firstTuple);\n\t\t\tm_statements.removeTuple(firstTuple);\n\t\t\tstatementList.removeFirst();\t\t\t\n\t\t}\n\t}", "protected void handleWarnings(Statement statement) throws SQLWarningException,\n\tSQLException {\n\t\tif (ignoreWarnings) {\n\t\t\tif (log.isDebugEnabled()) {\n\t\t\t\tSQLWarning warningToLog = statement.getWarnings();\n\t\t\t\twhile (warningToLog != null) {\n\t\t\t\t\tlog.debug(\"SQLWarning ignored: SQL state '\" + warningToLog.getSQLState() + \"', error code '\"\n\t\t\t\t\t\t\t+ warningToLog.getErrorCode() + \"', message [\" + warningToLog.getMessage() + \"]\");\n\t\t\t\t\twarningToLog = warningToLog.getNextWarning();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tSQLWarning warnings = statement.getWarnings();\n\t\t\tif (warnings != null) {\n\t\t\t\tthrow new SQLWarningException(\"Warning not ignored\", warnings);\n\t\t\t}\n\t\t}\n\t}", "public void addProgenyBlacklist(Class...clazz);", "@Override\n public Response throttlingPoliciesApplicationPolicyIdPut(String policyId, String contentType,\n ApplicationThrottlePolicyDTO body, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy existingPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n //overridden properties\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n //update the policy\n ApplicationPolicy appPolicy =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyDTOToModel(body);\n apiProvider.updatePolicy(appPolicy);\n\n //retrieve the new policy and send back as the response\n ApplicationPolicy newAppPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n ApplicationThrottlePolicyDTO policyDTO =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyToDTO(newAppPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while updating Application level policy: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "public void remove(Statement statement) {\n\t\tsynchronized (ontology) {\n\t\t\tif (statements.contains(statement)) {\n\t\t\t\tlog(\"remove statement: \" + statement.getText(getDefaultLanguage()));\n\t\t\t\tstatements.remove(statement);\n\t\t\t}\n\t\t\tif (ontology != null) {\n\t\t\t\tif (statement instanceof Sentence) {\n\t\t\t\t\tontology.retractSentence((Sentence) statement);\n\t\t\t\t}\n\t\t\t\tontology.getStorage().save(element);\n\t\t\t}\n\t\t}\n\t}", "protected void addRule(BinaryRule rule) {\n\t\tif (rule.getPurity() >= mMinimumPurity)\n\t\t\tthis.mBinaryRules.add(rule);\n\t}", "protected /*override*/ void InsertItem(int index, Condition item)\r\n { \r\n CheckSealed();\r\n ConditionValidation(item); \r\n super.InsertItem(index, item); \r\n }", "public PolicyDetailsRecord() {\n\t\tsuper(PolicyDetails.POLICY_DETAILS);\n\t}", "private boolean setAllPolicy(String webMethodName, String opName, String toPermit) \r\n\t{\r\n\t NAASIntegration naas = new NAASIntegration(Phrase.AdministrationLoggerName);\r\n\t boolean ret = true;\r\n\t if(toPermit.equalsIgnoreCase(\"Y\")){\r\n\t \tret = naas.setAllPolicy(webMethodName, opName, NAASRequestor.ACTION_DENY);\r\n\t }else{\r\n\t \tString isExit = verifyPolicy(webMethodName, opName);\r\n\t \tif(isExit!= null && isExit.equalsIgnoreCase(\"deny\")){\r\n\t\t \tret = naas.setAllPolicy(webMethodName, opName, \"\");\t \t\t \t\t\r\n\t \t}\r\n\t }\r\n\t return ret;\r\n\t}", "public void setStatementType(Class<? extends Statement> statementType)\r\n/* 25: */ {\r\n/* 26: 71 */ this.statementType = statementType;\r\n/* 27: */ }", "public void setStatementNodeOnFalse(StatementNode statement);", "private void addQuestion() {\n if (modifiable()) {\n try {\n this.questions.add(Question.fromInput(gradeable()));\n } catch (UserInputException e) {\n System.err.println(e.getMessage());\n }\n } else {\n System.err.println(\"Can not modify this by add a question.\");\n }\n }", "public void addButcheryBlacklist(Class...clazz);", "public void sendPolicy() throws Exception{\n\t\tIterator<ASServer> iam = manager.getASServers().values().iterator();\n\t\t\n\t\twhile(iam.hasNext()){\n\t\t\t\n\t\t\tASServer serId = iam.next();\n\t\t\tsendASPolicy(serId.currentPolicy, serId.serverId);\n\t\t\t\n\t\t}\n\t\t\n\t\t// send LB policies\n\t\t\n\t\tsendLBPolicy(currentLBPolicy, manager.props.getProperty(StatisticsManager.LBSERVER));\n\t\t\n\t}", "private void setPolicyPermissionsToDTO(SubscriptionThrottlePolicyDTO policyDTO) throws APIManagementException {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n TierPermissionDTO addedPolicyPermission =\n (TierPermissionDTO) apiProvider.getThrottleTierPermission(policyDTO.getPolicyName());\n if (addedPolicyPermission != null) {\n SubscriptionThrottlePolicyPermissionDTO addedPolicyPermissionDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyPermissionToDTO(addedPolicyPermission);\n policyDTO.setPermissions(addedPolicyPermissionDTO);\n }\n }", "public void addWarnings(@Nonnull Collection<Warning> w) {\r\n warnings.addAll(w);\r\n }", "public Object\n _set_policy_override(Policy[] policies,\n SetOverrideType set_add) {\n throw new NO_IMPLEMENT(reason);\n }", "@Override\n public Response throttlingDenyPoliciesPost(String contentType, BlockingConditionDTO body,\n MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n //Add the block condition. It will throw BlockConditionAlreadyExistsException if the condition already\n // exists in the system\n String uuid = null;\n if (ConditionTypeEnum.API.equals(body.getConditionType()) ||\n ConditionTypeEnum.APPLICATION.equals(body.getConditionType()) ||\n ConditionTypeEnum.USER.equals(body.getConditionType())) {\n uuid = apiProvider.addBlockCondition(body.getConditionType().toString(),\n (String) body.getConditionValue(), body.isConditionStatus());\n } else if (ConditionTypeEnum.IP.equals(body.getConditionType()) ||\n ConditionTypeEnum.IPRANGE.equals(body.getConditionType())) {\n if (body.getConditionValue() instanceof Map) {\n JSONObject jsonObject = new JSONObject();\n jsonObject.putAll((Map) body.getConditionValue());\n\n if (ConditionTypeEnum.IP.equals(body.getConditionType())) {\n RestApiAdminUtils.validateIPAddress(jsonObject.get(\"fixedIp\").toString());\n }\n if (ConditionTypeEnum.IPRANGE.equals(body.getConditionType())) {\n RestApiAdminUtils.validateIPAddress(jsonObject.get(\"startingIp\").toString());\n RestApiAdminUtils.validateIPAddress(jsonObject.get(\"endingIp\").toString());\n }\n uuid = apiProvider.addBlockCondition(body.getConditionType().toString(),\n jsonObject.toJSONString(), body.isConditionStatus());\n }\n }\n\n //retrieve the new blocking condition and send back as the response\n BlockConditionsDTO newBlockingCondition = apiProvider.getBlockConditionByUUID(uuid);\n BlockingConditionDTO dto = BlockingConditionMappingUtil.fromBlockingConditionToDTO(newBlockingCondition);\n return Response.created(new URI(RestApiConstants.RESOURCE_PATH_THROTTLING_BLOCK_CONDITIONS + \"/\"\n + uuid)).entity(dto).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceAlreadyExists(e)) {\n RestApiUtil.handleResourceAlreadyExistsError(\"A black list item with type: \"\n + body.getConditionType() + \", value: \" + body.getConditionValue() + \" already exists\", e, log);\n } else {\n String errorMessage = \"Error while adding Blocking Condition. Condition type: \"\n + body.getConditionType() + \", \" + \"value: \" + body.getConditionValue() + \". \" + e.getMessage();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n } catch (URISyntaxException | ParseException e) {\n String errorMessage = \"Error while retrieving Blocking Condition resource location: Condition type: \"\n + body.getConditionType() + \", \" + \"value: \" + body.getConditionValue() + \". \" + e.getMessage();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n return null;\n }", "@NotNull\n/* 42 */ public PolicyType getType() { return this.myType; }", "public Tuple addStatement(Statement statement){\n\t\tsynchronized(m_viz){\n\t\t\tint historyLimit = ApplicationSettings.getHistoryLimit();\n\t\t\t\n\t\t\tif(historyLimit > 0){\n\t\t\t\twhile (m_statements.getRowCount() >= historyLimit){\n\t\t\t\t\tremoveStatement();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tTuple stmTuple = m_statements.addTuple(statement); \n\t\n\t\t\tsynchronized(statementList){\n\t\t\t\tstatementList.add(stmTuple);\n\t\t\t}\n\t\t\treturn stmTuple;\n\t\t}\n\t}", "@Override\n public Response throttlingPoliciesSubscriptionPolicyIdPut(String policyId, String contentType,\n SubscriptionThrottlePolicyDTO body, MessageContext messageContext) throws APIManagementException{\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n SubscriptionPolicy existingPolicy = apiProvider.getSubscriptionPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, log);\n }\n\n //overridden properties\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n // validate if permission info exists and halt the execution in case of an error\n validatePolicyPermissions(body);\n\n //update the policy\n SubscriptionPolicy subscriptionPolicy =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyDTOToModel(body);\n apiProvider.updatePolicy(subscriptionPolicy);\n\n //update policy permissions\n updatePolicyPermissions(body);\n\n //retrieve the new policy and send back as the response\n SubscriptionPolicy newSubscriptionPolicy = apiProvider.getSubscriptionPolicy(username,\n body.getPolicyName());\n SubscriptionThrottlePolicyDTO policyDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyToDTO(newSubscriptionPolicy);\n //setting policy permissions\n setPolicyPermissionsToDTO(policyDTO);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException | ParseException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, e,\n log);\n } else {\n String errorMessage = \"Error while updating Subscription level policy: \" + body.getPolicyName();\n throw new APIManagementException(errorMessage, e);\n }\n }\n return null;\n }", "public MicrosoftGraphStsPolicy() {\n }", "public void addStatement(final Resource subj, final URI pred, final Value obj,\n final Resource... contexts) throws SailException {\n baseSailConnection.addStatement(subj, pred, obj, contexts);\n }" ]
[ "0.5417293", "0.5211767", "0.5166962", "0.5127057", "0.4968829", "0.496331", "0.49550167", "0.4937243", "0.48943636", "0.48131704", "0.4657341", "0.46410626", "0.45903072", "0.45847452", "0.44893792", "0.4485589", "0.4480615", "0.44619888", "0.44619888", "0.44176602", "0.4401768", "0.4382723", "0.4376984", "0.43606475", "0.43606472", "0.43588564", "0.4328877", "0.4296246", "0.42960647", "0.42689115", "0.42627215", "0.4248521", "0.42282742", "0.42026502", "0.41945377", "0.41916707", "0.41737568", "0.41729063", "0.41535977", "0.41476658", "0.41442662", "0.41405016", "0.41319528", "0.41276905", "0.41113687", "0.40960237", "0.408745", "0.40854034", "0.40703252", "0.40682852", "0.40663907", "0.40601254", "0.40590218", "0.40505904", "0.40404058", "0.40368116", "0.40247515", "0.40227997", "0.4020356", "0.40187195", "0.40083754", "0.3998149", "0.39739525", "0.39724234", "0.3966479", "0.39483485", "0.3938764", "0.39384767", "0.3927303", "0.39231476", "0.39226133", "0.3889448", "0.38878325", "0.38837466", "0.38821495", "0.38808003", "0.3871338", "0.38626543", "0.38603014", "0.38594896", "0.38588375", "0.385567", "0.38535914", "0.38453612", "0.38412672", "0.38398555", "0.3836129", "0.38355926", "0.3834736", "0.38293353", "0.38270667", "0.38262537", "0.3824603", "0.38170132", "0.38164225", "0.3816379", "0.38076597", "0.37940833", "0.37922114", "0.3787785" ]
0.5667337
0
Used to add excluded policy statements to this PolicyConfiguration.
public void addToExcludedPolicy(PermissionCollection permissions) throws PolicyContextException { assertStateIsOpen(); assert permissions != null; if (permissions != null) { checkSetPolicyPermission(); for(Enumeration e = permissions.elements(); e.hasMoreElements();){ this.getExcludedPermissions().add((Permission) e.nextElement()); writeOnCommit = true; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setExcludes(String excludes)\n {\n this.excludes = excludes;\n }", "protected Permissions getExcludedPolicy(){\n\treturn stateIs(INSERVICE_STATE) ? this.excludedPermissions : null;\n }", "public void removeExcludedPolicy()\n throws PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\n\n\tif (excludedPermissions != null) {\n\t excludedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "public void addDefaultExcludes()\n {\n int excludesLength = excludes == null ? 0 : excludes.length;\n String[] newExcludes;\n newExcludes = new String[ excludesLength + DEFAULTEXCLUDES.length ];\n if( excludesLength > 0 )\n {\n System.arraycopy( excludes, 0, newExcludes, 0, excludesLength );\n }\n for( int i = 0; i < DEFAULTEXCLUDES.length; i++ )\n {\n newExcludes[ i + excludesLength ] = DEFAULTEXCLUDES[ i ].replace( '/', File.separatorChar ).replace( '\\\\', File.separatorChar );\n }\n excludes = newExcludes;\n }", "public void setExcludes( List<ExcludeClasses> excludes )\n {\n this.excludes = excludes;\n }", "public void setNewExcludedExtensions(List<String> excludedExtenions) {\n\t\tthis.filter = new Filter(excludedExtenions);\n\t}", "public void setExcludeUrls(String[] excludeUrls) {\n this.excludeUrls = excludeUrls;\n }", "public ExecutionPolicy not()\n\t{\n\t\treturn new NotRule(this);\n\t}", "public void setExcludedPattern(String excludedPattern)\n/* */ {\n/* 101 */ setExcludedPatterns(new String[] { excludedPattern });\n/* */ }", "@Override\n\tpublic String[] OnExclusions() {\n\t\treturn new String[] {\"sqlid\", \"item\"};\n\t}", "public void excludedValues(BooleanExpression excluded) {\n\t\tthis.setOperator(new DBPermittedValuesOperator(excluded));\n\t\tnegateOperator();\n\t}", "public void negateUnxepectedTagPenalty() {\n\t\tnegateUnxepectedTagPenalty = true;\n\t}", "protected void createIgnoreAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/2007/ImpactAnalysis/Ignore\";\t\n\t\taddAnnotation\n\t\t (architectureAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceImplementationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceUseEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (providedInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (requiredInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (actorCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\n\t}", "public void setExcludes( String[] excludes )\n {\n if( excludes == null )\n {\n this.excludes = null;\n }\n else\n {\n this.excludes = new String[ excludes.length ];\n for( int i = 0; i < excludes.length; i++ )\n {\n String pattern;\n pattern = excludes[ i ].replace( '/', File.separatorChar ).replace( '\\\\', File.separatorChar );\n if( pattern.endsWith( File.separator ) )\n {\n pattern += \"**\";\n }\n this.excludes[ i ] = pattern;\n }\n }\n }", "public void excludedValues(Boolean excluded) {\n\t\tthis.setOperator(new DBPermittedValuesOperator(excluded));\n\t\tnegateOperator();\n\t}", "public void addToExcludedPolicy(Permission permission)\n\tthrows PolicyContextException{\n\n assertStateIsOpen();\n\n\tassert permission != null;\n\n\tif (permission != null) {\n\t checkSetPolicyPermission();\n\t this.getExcludedPermissions().add(permission);\n\t writeOnCommit = true;\n\t}\n }", "public void registerExcluded(List<String> excludedFiles) {\n excluded.addAll(excludedFiles);\n }", "public StringConf exclude(String value) { \n excludes.add(value); \n return this;\n }", "public AdverseReactionsImpl(Coded exclusionStatement) {\n super(exclusionStatement);\n }", "public void setIgnoredReasons(List<AXProperty> ignoredReasons) {\n this.ignoredReasons = ignoredReasons;\n }", "public void setExcludeList(List<WafExcludeListEntry> excludeList) {\n this.excludeList = excludeList;\n }", "public void addExcludedSourceFilePattern(String pattern) {\n\t\ttry {\n\t\t\tPattern regex = Pattern.compile(pattern);\n\t\t\texcludedSourceFileList.add(regex);\n\t\t} catch (PatternSyntaxException e) {\n\t\t\tgetLog().warn(\n\t\t\t\t\t\"Could not compile source file exclusion pattern \"\n\t\t\t\t\t\t\t+ pattern, e);\n\t\t}\n\t}", "public List<ExcludeClasses> getExcludes()\n {\n return excludes;\n }", "public String[] getExcludes()\n {\n return m_excludes;\n }", "public WafRuleOverrides addExcludeListItem(WafExcludeListEntry excludeListItem) {\n if (this.excludeList == null) {\n this.excludeList = new ArrayList<WafExcludeListEntry>();\n }\n this.excludeList.add(excludeListItem);\n return this;\n }", "void setExcludeList(SynchronizationRequest req, Zipper zipper) {\n\n try { \n String serverName = req.getServerName();\n List list = (List)_excludeCache.get(serverName);\n if (list == null) {\n Properties env = req.getEnvironmentProperties();\n // admin config context\n ConfigContext ctx = _ctx.getConfigContext();\n Domain domain = (Domain) ctx.getRootConfigBean();\n Server server = domain.getServers().getServerByName(serverName);\n if (server != null) {\n ServerDirector director=new ServerDirector(ctx, serverName);\n List excludes = director.constructExcludes();\n list = new ArrayList();\n int size = excludes.size();\n for (int i=0; i<size; i++) {\n String path = (String) excludes.get(i);\n String tPath = \n TextProcess.tokenizeConfig(path, serverName, env);\n list.add(tPath);\n }\n // add the list to the cache\n _excludeCache.put(serverName, list);\n }\n }\n _logger.log(Level.FINE, \"Excluded List \" + list);\n zipper.addToExcludeList(list);\n } catch (Exception e) {\n _logger.log(Level.FINE, \"Excluded List can not be set\", e);\n }\n }", "StatementChain not(ProfileStatement... statements);", "public final void mEXCLUDING() throws RecognitionException {\n try {\n int _type = EXCLUDING;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2829:3: ( 'excluding' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2830:3: 'excluding'\n {\n match(\"excluding\"); if (state.failed) return ;\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public void setEXCLUDE_PROFIT_AMOUNT(BigDecimal EXCLUDE_PROFIT_AMOUNT) {\r\n this.EXCLUDE_PROFIT_AMOUNT = EXCLUDE_PROFIT_AMOUNT;\r\n }", "public SecurityHandler skipAudit() {\n return builder(this).audit(false).build();\n }", "@Nonnull protected Predicate<String> getIncludeExcludePredicate(@Nonnull final CriteriaSet criteria) {\n final EncryptionConfigurationCriterion criterion = criteria.get(EncryptionConfigurationCriterion.class);\n assert criterion != null;\n\n return resolveIncludeExcludePredicate(criteria, criterion.getConfigurations());\n }", "public void setDefaultRestrictions() {\n addPolicy(DISABLE_EXIT);\n addPolicy(DISABLE_ANY_FILE_MATCHER);\n addPolicy(DISABLE_SECURITYMANAGER_CHANGE);\n //addPolicy(DISABLE_REFLECTION_UNTRUSTED);\n addPolicy(DISABLE_EXECUTION);\n addPolicy(DISABLE_TEST_SNIFFING);\n addPolicy(DISABLE_REFLECTION_SELECTIVE);\n addPolicy(DISABLE_SOCKETS);\n\n InterceptorBuilder.installAgent();\n InterceptorBuilder.initDefaultTransformations();\n }", "ExcludeType createExcludeType();", "public void setExcludedPatterns(String... excludedPatterns)\n/* */ {\n/* 110 */ Assert.notEmpty(excludedPatterns, \"'excludedPatterns' must not be empty\");\n/* 111 */ this.excludedPatterns = new String[excludedPatterns.length];\n/* 112 */ for (int i = 0; i < excludedPatterns.length; i++) {\n/* 113 */ this.excludedPatterns[i] = StringUtils.trimWhitespace(excludedPatterns[i]);\n/* */ }\n/* 115 */ initExcludedPatternRepresentation(this.excludedPatterns);\n/* */ }", "public void setIgnore() {\n\t\t\tignore = true;\n\t\t}", "public void addProgenyBlacklist(Class...clazz);", "public void setExcludedRules(java.util.Collection<ExcludedRule> excludedRules) {\n if (excludedRules == null) {\n this.excludedRules = null;\n return;\n }\n\n this.excludedRules = new java.util.ArrayList<ExcludedRule>(excludedRules);\n }", "public void registerExcluded(String excludedFile) {\n excluded.add(excludedFile);\n }", "@Override\n protected ArrayList<String> generateExclusions()\n {\n ArrayList<String> retVal = new ArrayList<>();\n switch (monsterList.get(monsterList.size() - 1))\n {\n case \"Spheric Guardian\":\n retVal.add(\"Sentry and Sphere\");\n break;\n case \"3 Byrds\":\n retVal.add(\"Chosen and Byrds\");\n break;\n case \"Chosen\":\n retVal.add(\"Chosen and Byrds\");\n retVal.add(\"Cultist and Chosen\");\n break;\n }\n return retVal;\n }", "public List<WafExcludeListEntry> getExcludeList() {\n return excludeList;\n }", "public GlobFileSet setExcludePattern(String pattern)\n\t\t{\n\t\tm_excPattern = Pattern.compile(pattern);\n\t\treturn (this);\n\t\t}", "static void exclude(User user, String content, MessageChannel chan) {\n if(!content.toLowerCase().startsWith(\"!exclude \"))\n return;\n\n ArrayList<String> tagList = new ArrayList<>(Arrays.asList(\n content.substring(\"!exclude \".length()).split(\" \")));\n ArrayList<String> excludeList = new ArrayList<>(Arrays.asList(\n excludeMap.getOrDefault(user.getIdLong(), \"\").split(\" \")));\n boolean changed = false;\n\n for(String tag : tagList){\n tag = tag.replaceAll(\"\\\\s\",\" \");\n if(!tag.startsWith(\"-\")){\n tag = \"-\" + tag;\n }\n if(!excludeList.contains(tag)){\n excludeList.add(tag);\n changed = true;\n }\n }\n\n if(changed){\n StringBuilder sb = new StringBuilder();\n for(String exclude : excludeList)\n sb.append(exclude).append(\" \");\n\n // will update list\n excludeMap.put(user.getIdLong(), sb.toString().trim());\n if(!saveMap(excludeMap, Config.exclude_data_filename)){\n chan.sendMessage(\"Couldn't save your exclude list, probably due to me being in test mode.\" +\n \" Sorry!\").queue();\n }\n else {\n chan.sendMessage(\"Ok. Exclude list is now: \" + sb).queue();\n }\n }\n else {\n chan.sendMessage(\"Exclude list is unchanged: \" + excludeMap.get(user.getIdLong())).queue();\n }\n\n }", "private void addPermExcludedWorkerForMicrotask( Key<Microtask> microtaskKey, String excludedWorkerID)\n\t{\n\t\t// retrieve the current permanently excluded workers for the microtask\n\t\tHashSet<String> permExcludedForMicrotask = permanentlyExcludedWorkers.get( Microtask.keyToString(microtaskKey) );\n\n\t\t// if there aren't permanently excluded workers\n\t\tif (permExcludedForMicrotask == null){\n\n\t\t\t// create a new hash set\n\t\t\tpermExcludedForMicrotask = new HashSet<String>();\n\t\t\tpermanentlyExcludedWorkers.put( Microtask.keyToString(microtaskKey) , permExcludedForMicrotask );\n\t\t}\n\n\t\t// add the worker to the permanently excluded workers for this microtask\n\t\tpermExcludedForMicrotask.add(excludedWorkerID);\n\n\t\t// add the worker to the actual excluded\n\t\taddExcludedWorkerForMicrotask( microtaskKey , excludedWorkerID );\n\t}", "public void setExempt(boolean exempt);", "public List<AXProperty> getIgnoredReasons() {\n return ignoredReasons;\n }", "public Set getExcludeMethods() {\n return mExcludeMethods;\n }", "public GlobFileSet setExcludeDirPattern(String pattern)\n\t\t{\n\t\tm_excDirPattern = Pattern.compile(pattern);\n\t\treturn (this);\n\t\t}", "private void configureConnectionPerms() throws ConfigurationException\n {\n boolean hasAllows= false, hasDenies= false;\n\n String[] allows= cfg.getAll (\"allow\");\n if (allows != null && allows.length > 0) {\n hasAllows= true;\n\n for (String allowIP : allows) {\n allowIP= allowIP.trim();\n\n if (allowIP.indexOf('*') == -1) { // specific IP with no wildcards\n specificIPPerms.put(allowIP, true);\n } else { // there's a wildcard\n wildcardAllow= (wildcardAllow == null) ? new ArrayList<>() : wildcardAllow;\n String[] parts= allowIP.split(\"[*]\");\n wildcardAllow.add(parts[0]); // keep only the first part\n }\n }\n }\n\n String[] denies= cfg.getAll (\"deny\");\n if (denies != null && denies.length > 0) {\n hasDenies= true;\n\n for (String denyIP : denies) {\n boolean conflict= false; // used for a little sanity check\n\n denyIP= denyIP.trim();\n if (denyIP.indexOf('*') == -1) { // specific IP with no wildcards\n Boolean oldVal= specificIPPerms.put(denyIP, false);\n conflict= (oldVal == Boolean.TRUE);\n } else { // there's a wildcard\n wildcardDeny= (wildcardDeny == null) ? new ArrayList<>() : wildcardDeny;\n String[] parts= denyIP.split(\"[*]\");\n if (wildcardAllow != null && wildcardAllow.contains(parts[0]))\n conflict= true;\n else\n wildcardDeny.add(parts[0]); // keep only the first part\n }\n\n if (conflict) {\n throw new ConfigurationException(\n \"Conflicting IP permission in '\"+getName()+\"' configuration: 'deny' \"\n +denyIP+\" while having an identical previous 'allow'.\");\n }\n }\n }\n\n // sum up permission policy and logging type\n ipPermLogPolicy= (!hasAllows && !hasDenies) ? PermLogPolicy.ALLOW_NOLOG : // default when no permissions specified\n ( hasAllows && !hasDenies) ? PermLogPolicy.DENY_LOG :\n (!hasAllows && hasDenies) ? PermLogPolicy.ALLOW_LOG :\n PermLogPolicy.DENY_LOGWARNING; // mixed allows & denies, if nothing matches we'll DENY and log a warning\n }", "static void ignore() {\n }", "public void suppress() {\r\n\t\tsuppressed = true;\r\n\t}", "public void suppress() {\r\n\t\tsuppressed = true;\r\n\t}", "public void setExcludedQualifiers(String excludedQualifiers) {\r\n this.excludedQualifiers = excludedQualifiers;\r\n }", "public String[] getExcludedPatterns()\n/* */ {\n/* 122 */ return this.excludedPatterns;\n/* */ }", "public void addExcludedTransportType(Integer excludedTransportType);", "public void setExcludePackages(final String... packageNames) {\n excludePackages = transformToUnique(packageNames);\n }", "private void denyAccessWithRoleCondition(boolean negateOutput) {\n final String flowAlias = \"browser-deny\";\n final String userWithRole = \"test-user@localhost\";\n final String userWithoutRole = \"john-doh@localhost\";\n final String role = \"offline_access\";\n final String errorMessage = \"Your account doesn't have the required role\";\n\n Map<String, String> config = new HashMap<>();\n config.put(ConditionalRoleAuthenticatorFactory.CONDITIONAL_USER_ROLE, role);\n config.put(ConditionalRoleAuthenticatorFactory.CONF_NEGATE, Boolean.toString(negateOutput));\n\n Map<String, String> denyConfig = new HashMap<>();\n denyConfig.put(DenyAccessAuthenticatorFactory.ERROR_MESSAGE, errorMessage);\n\n configureBrowserFlowWithDenyAccessInConditionalFlow(flowAlias, ConditionalRoleAuthenticatorFactory.PROVIDER_ID, config, denyConfig);\n\n denyAccessInConditionalFlow(flowAlias,\n negateOutput ? userWithoutRole : userWithRole,\n negateOutput ? userWithRole : userWithoutRole,\n errorMessage\n );\n }", "private void applyExclusionToSelectedNodeRecords( final boolean exclusion ) {\n\t\tfinal int[] selectedRows = getSelectedNodeRecordRows();\n\t\tfinal List<NodeRecord> records = getNodeRecords( selectedRows );\n\t\tfor ( final NodeRecord record : records ) {\n\t\t\trecord.setExclude( exclusion );\n\t\t}\n\t\trefreshRows( selectedRows );\n\t\tsetHasChanges( true );\n\t}", "private void excludeFromWarPackaging() {\n getLog().info(\"excludeFromWarPackaging\");\n String pluginGroupId = \"org.apache.maven.plugins\";\n String pluginArtifactId = \"maven-war-plugin\";\n if (project.getBuildPlugins() != null) {\n for (Object o : project.getBuildPlugins()) {\n Plugin plugin = (Plugin) o;\n\n if (pluginGroupId.equals(plugin.getGroupId()) && pluginArtifactId.equals(plugin.getArtifactId())) {\n Xpp3Dom dom = (Xpp3Dom) plugin.getConfiguration();\n if (dom == null) {\n dom = new Xpp3Dom(\"configuration\");\n plugin.setConfiguration(dom);\n }\n Xpp3Dom excludes = dom.getChild(\"packagingExcludes\");\n if (excludes == null) {\n excludes = new Xpp3Dom(\"packagingExcludes\");\n dom.addChild(excludes);\n excludes.setValue(\"\");\n } else if (excludes.getValue().trim().length() > 0) {\n excludes.setValue(excludes.getValue() + \",\");\n }\n\n Set<Artifact> dependencies = getArtifacts();\n getLog().debug(\"Size of getArtifacts: \" + dependencies.size());\n String additionalExcludes = \"\";\n for (Artifact dependency : dependencies) {\n getLog().debug(\"Dependency: \" + dependency.getGroupId() + \":\" + dependency.getArtifactId() + \"type: \" + dependency.getType());\n if (!dependency.isOptional() && Types.JANGAROO_TYPE.equals(dependency.getType())) {\n getLog().debug(\"Excluding jangaroo dependency form war plugin [\" + dependency.toString() + \"]\");\n // Add two excludes. The first one is effective when no name clash occurs\n additionalExcludes += \"WEB-INF\" + File.separator + \"lib\" + File.separator + dependency.getArtifactId() + \"-\" + dependency.getVersion() + \".jar,\";\n // the second when a name clash occurs (artifact will hav groupId prepended before copying it into the lib dir)\n additionalExcludes += \"WEB-INF\" + File.separator + \"lib\" + File.separator + dependency.getGroupId() + \"-\" + dependency.getArtifactId() + \"-\" + dependency.getVersion() + \".jar,\";\n }\n }\n excludes.setValue(excludes.getValue() + additionalExcludes);\n }\n }\n }\n }", "public void setAllowAddsWhileDeprovisionedString(String allowAddsWhileDeprovisionedString1) {\r\n this.allowAddsWhileDeprovisionedString = allowAddsWhileDeprovisionedString1;\r\n }", "boolean isExcluded();", "public void setExclusionPatterns(java.util.Collection<String> exclusionPatterns) {\n if (exclusionPatterns == null) {\n this.exclusionPatterns = null;\n return;\n }\n\n this.exclusionPatterns = new java.util.ArrayList<String>(exclusionPatterns);\n }", "@Nonnull protected Predicate<String> getIncludeExcludePredicate(@Nonnull final CriteriaSet criteria) {\n \n final SignatureSigningConfigurationCriterion criterion =\n criteria.get(SignatureSigningConfigurationCriterion.class);\n assert criterion != null;\n \n return resolveIncludeExcludePredicate(criteria, criterion.getConfigurations());\n }", "public void addPolicy(Policy policy) throws APIManagementException {\n\n if (policy instanceof APIPolicy) {\n APIPolicy apiPolicy = (APIPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getAPIPolicy(userNameWithoutChange, apiPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Advanced Policy with name \" + apiPolicy.getPolicyName() + \" already exists\");\n }\n apiPolicy.setUserLevel(PolicyConstants.ACROSS_ALL);\n apiPolicy = apiMgtDAO.addAPIPolicy(apiPolicy);\n List<Integer> addedConditionGroupIds = new ArrayList<>();\n for (Pipeline pipeline : apiPolicy.getPipelines()) {\n addedConditionGroupIds.add(pipeline.getId());\n }\n APIPolicyEvent apiPolicyEvent = new APIPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n apiPolicy.getTenantDomain(), apiPolicy.getPolicyId(), apiPolicy.getPolicyName(),\n apiPolicy.getDefaultQuotaPolicy().getType(), addedConditionGroupIds, null);\n APIUtil.sendNotification(apiPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof ApplicationPolicy) {\n ApplicationPolicy appPolicy = (ApplicationPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getApplicationPolicy(userNameWithoutChange, appPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Application Policy with name \" + appPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addApplicationPolicy(appPolicy);\n //policy id is not set. retrieving policy to get the id.\n ApplicationPolicy retrievedPolicy = apiMgtDAO.getApplicationPolicy(appPolicy.getPolicyName(), tenantId);\n ApplicationPolicyEvent applicationPolicyEvent = new ApplicationPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n appPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(), appPolicy.getPolicyName(),\n appPolicy.getDefaultQuotaPolicy().getType());\n APIUtil.sendNotification(applicationPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof SubscriptionPolicy) {\n SubscriptionPolicy subPolicy = (SubscriptionPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getSubscriptionPolicy(userNameWithoutChange, subPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Subscription Policy with name \" + subPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addSubscriptionPolicy(subPolicy);\n String monetizationPlan = subPolicy.getMonetizationPlan();\n Map<String, String> monetizationPlanProperties = subPolicy.getMonetizationPlanProperties();\n if (StringUtils.isNotBlank(monetizationPlan) && MapUtils.isNotEmpty(monetizationPlanProperties)) {\n createMonetizationPlan(subPolicy);\n }\n //policy id is not set. retrieving policy to get the id.\n SubscriptionPolicy retrievedPolicy = apiMgtDAO.getSubscriptionPolicy(subPolicy.getPolicyName(), tenantId);\n SubscriptionPolicyEvent subscriptionPolicyEvent = new SubscriptionPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId, subPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n subPolicy.getPolicyName(), subPolicy.getDefaultQuotaPolicy().getType(),\n subPolicy.getRateLimitCount(),subPolicy.getRateLimitTimeUnit(), subPolicy.isStopOnQuotaReach(),\n subPolicy.getGraphQLMaxDepth(),subPolicy.getGraphQLMaxComplexity(),subPolicy.getSubscriberCount());\n APIUtil.sendNotification(subscriptionPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof GlobalPolicy) {\n GlobalPolicy globalPolicy = (GlobalPolicy) policy;\n\n // checking if policy already exist\n Policy existingPolicy = getGlobalPolicy(globalPolicy.getPolicyName());\n if (existingPolicy != null) {\n throw new APIManagementException(\"Policy name already exists\");\n }\n\n apiMgtDAO.addGlobalPolicy(globalPolicy);\n\n KeyTemplateEvent keyTemplateEvent = new KeyTemplateEvent(UUID.randomUUID().toString(), System.currentTimeMillis(),\n APIConstants.EventType.CUSTOM_POLICY_ADD.name(), tenantId, tenantDomain,\n \"add\", globalPolicy.getKeyTemplate());\n APIUtil.sendNotification(keyTemplateEvent, APIConstants.NotifierType.KEY_TEMPLATE.name());\n\n GlobalPolicy retrievedPolicy = apiMgtDAO.getGlobalPolicy(globalPolicy.getPolicyName());\n GlobalPolicyEvent globalPolicyEvent = new GlobalPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n globalPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n globalPolicy.getPolicyName());\n APIUtil.sendNotification(globalPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else {\n String msg = \"Policy type \" + policy.getClass().getName() + \" is not supported\";\n log.error(msg);\n throw new UnsupportedPolicyTypeException(msg);\n }\n }", "Collection<String> getExcludeExceptions();", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "boolean exclude(V1Secret secret);", "public synchronized void blacklist( IpNetwork network ) {\n server.addToACL( network, false );\n if ( Log.isLogging( Log.DEBUG_EVENTS ) ) {\n Log.append( HTTPD.EVENT, \"Blacklisted \" + network.toString() );\n Log.append( HTTPD.EVENT, \"ACL: \" + server.getIpAcl().toString() );\n }\n }", "public void setWhitelistEnabled(Boolean whitelistEnabled) {\n this.whitelistEnabled = whitelistEnabled;\n }", "String getDefaultDisabledByPolicyContent();", "public static CustomPolicy createDefaultCustomPolicy() {\n CustomPolicy customPolicy = new CustomPolicy(SAMPLE_CUSTOM_RULE);\n customPolicy.setKeyTemplate(\"$userId\");\n String siddhiQuery = \"FROM RequestStream SELECT userId, ( userId == '[email protected]' ) AS isEligible , \"\n + \"str:concat('[email protected]','') as throttleKey INSERT INTO EligibilityStream;\"\n + \"FROM EligibilityStream[isEligible==true]#throttler:timeBatch(1 min) SELECT throttleKey, \"\n + \"(count(userId) >= 5 as isThrottled, expiryTimeStamp group by throttleKey INSERT ALL EVENTS into \"\n + \"ResultStream;\";\n\n customPolicy.setSiddhiQuery(siddhiQuery);\n customPolicy.setDescription(\"Sample custom policy\");\n return customPolicy;\n }", "@Override\n protected Set<InjectionPoint> getConfigPropertyInjectionPoints() {\n return super.getConfigPropertyInjectionPoints().stream().sorted((o1, o2) -> {\n if (o1.getMember().getName().equals(\"skip\")) {\n return -1;\n }\n return 0;\n }).collect(Collectors.toCollection(LinkedHashSet::new));\n }", "public java.util.List<ExcludedRule> getExcludedRules() {\n return excludedRules;\n }", "@Nonnull protected Predicate<String> getWhitelistBlacklistPredicate(@Nonnull final CriteriaSet criteria) {\n return resolveWhitelistBlacklistPredicate(criteria, \n criteria.get(EncryptionConfigurationCriterion.class).getConfigurations());\n }", "protected void onDisabled() {\n // Do nothing.\n }", "public void executeNot() {\n\t\tBitString destBS = mIR.substring(4, 3);\n\t\tBitString sourceBS = mIR.substring(7, 3);\n\t\tmRegisters[destBS.getValue()] = mRegisters[sourceBS.getValue()].copy();\n\t\tmRegisters[destBS.getValue()].invert();\n\n\t\tBitString notVal = mRegisters[destBS.getValue()];\n\t\tsetConditionalCode(notVal);\n\t}", "private void setDictionaryImplications() {\n if (usingDictionary) {\n usingDictionaryValue = \"Yes\";\n } else {\n usingDictionaryValue = \"No\";\n }\n textMergeScript.recordScriptAction\n (ScriptConstants.OUTPUT_MODULE,\n ScriptConstants.SET_ACTION,\n ScriptConstants.NO_MODIFIER,\n ScriptConstants.USING_DICTIONARY_OBJECT,\n String.valueOf(usingDictionary));\n }", "@Disabled\n void ignoredTestMethod() {\n }", "private void setExcludeUnlistedClasses(String value) {\n if (!_excludeUnlistedSet) {\n BigDecimal version = getPersistenceVersion();\n boolean excludeUnlisted;\n if (version.compareTo(VERSION_1_0) > 0) {\n excludeUnlisted = !(\"false\".equalsIgnoreCase(value));\n } else {\n excludeUnlisted = \"true\".equalsIgnoreCase(value);\n }\n _info.setExcludeUnlistedClasses(excludeUnlisted);\n _excludeUnlistedSet = true;\n }\n }", "public Builder setExcludeAttributes(boolean exclude) {\n this.excludeAttributes = exclude;\n return this;\n }", "static void excludes(User user, String content, MessageChannel chan) {\n if(content.toLowerCase().equals(\"!excludes\")){\n String excludes = excludeMap.get(user.getIdLong());\n if(excludes == null){\n chan.sendMessage(\"None given.\").queue();\n return;\n }\n chan.sendMessage(\"Your exclude tags: \" + excludes).queue();\n }\n else if(content.toLowerCase().equals(\"!excludes clear\")){\n excludeMap.remove(user.getIdLong());\n saveMap(excludeMap, Config.exclude_data_filename);\n chan.sendMessage(\"Ok, removed all excludes.\").queue();\n }\n }", "AggregationBuilder buildExcludeFilteredAggregation(Set<String> excludeNames);", "public void warningPermit();", "@Ignore\r\n\tpublic void ignoreTest() {\r\n\t\tSystem.out.println(\"in ignore test\");\r\n\t}", "void clearPolicy() {\n policy = new Policy();\n }", "@Test(groups = {\"ignoreDirective\"})\n\tpublic void testIgnoreDirectiveShouldApplyToLinesLexedDuringLookaheadOperations()\n\t{\n\t\tString[] code = {\n\t\t\t\"void [function () {\",\n\t\t \" /* jshint ignore:start */\",\n\t\t \" ?\",\n\t\t \" /* jshint ignore:end */\",\n\t\t \"}];\"\n\t\t};\n\t\t\n\t\tth.test(code);\n\t\t\n\t\tcode = new String[] {\n\t\t\t\"(function () {\",\n\t\t \" /* jshint ignore:start */\",\n\t\t \" ?\",\n\t\t \" /* jshint ignore:end */\",\n\t\t \"}());\"\n\t\t};\n\t\t\n\t\tth.test(code);\n\t}", "public void setFilterExcludeProperties(List<String> filterExcludeProperties) {\n\n\t\tthis.filterExcludeProperties = filterExcludeProperties;\n\t}", "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "private void configureBrowserFlowWithDenyAccessInConditionalFlow(String newFlowAlias, String conditionProviderId, Map<String, String> conditionConfig, Map<String, String> denyConfig) {\n testingClient.server(\"test\").run(session -> FlowUtil.inCurrentRealm(session).copyBrowserFlow(newFlowAlias));\n testingClient.server(\"test\").run(session -> FlowUtil.inCurrentRealm(session)\n .selectFlow(newFlowAlias)\n .inForms(forms -> forms\n .clear()\n .addAuthenticatorExecution(AuthenticationExecutionModel.Requirement.REQUIRED, UsernameFormFactory.PROVIDER_ID)\n .addSubFlowExecution(AuthenticationExecutionModel.Requirement.CONDITIONAL, subflow -> subflow\n .addAuthenticatorExecution(AuthenticationExecutionModel.Requirement.REQUIRED, conditionProviderId, config -> config.setConfig(conditionConfig))\n .addAuthenticatorExecution(AuthenticationExecutionModel.Requirement.REQUIRED, DenyAccessAuthenticatorFactory.PROVIDER_ID, config -> config.setConfig(denyConfig))\n )\n .addAuthenticatorExecution(AuthenticationExecutionModel.Requirement.REQUIRED, PasswordFormFactory.PROVIDER_ID)\n )\n .defineAsBrowserFlow() // Activate this new flow\n );\n }", "private void disableIfDissatisfied() {\n \t\tif ( !this.satisfiesPolygon() ) {\n \t\t\tthis.area.setEnabled( false );\n \t\t}\n \t}", "@Override\r\n public void onDisable() {\r\n \tBukkit.getLogger().info(\"[VoteHeads] Plugin Disabled.\");\r\n\r\n }", "@Override\r\n\tvoid setExcludedMenu() {\n\t\tthis.setMenuExclusion(OLBaseTabActivity.RANKINGS_ID);\r\n\t}", "private List<String> listPolicyExemptAppsUnchecked() {\n String[] core = mContext.getResources().getStringArray(R.array.policy_exempt_apps);\n String[] vendor = mContext.getResources().getStringArray(R.array.vendor_policy_exempt_apps);\n\n int size = core.length + vendor.length;\n Set<String> apps = new ArraySet<>(size);\n for (String app : core) {\n apps.add(app);\n }\n for (String app : vendor) {\n apps.add(app);\n }\n\n return new ArrayList<>(apps);\n }", "public void ignore(File ignoreFile) throws IOException {\n Scanner ignoreScanner = new Scanner(ignoreFile);\n// ignoreScanner.useDelimiter(\"[^A-Za-z]+\");\n ignoreScanner.useDelimiter(\"(?!')[^A-Za-z]+\");\n\n while (ignoreScanner.hasNext()) {\n ignoreWords.add(ignoreScanner.next());\n }\n ignoreScanner.close(); // Close underlying file.\n }", "private boolean setAllPolicy(String webMethodName, String opName, String toPermit) \r\n\t{\r\n\t NAASIntegration naas = new NAASIntegration(Phrase.AdministrationLoggerName);\r\n\t boolean ret = true;\r\n\t if(toPermit.equalsIgnoreCase(\"Y\")){\r\n\t \tret = naas.setAllPolicy(webMethodName, opName, NAASRequestor.ACTION_DENY);\r\n\t }else{\r\n\t \tString isExit = verifyPolicy(webMethodName, opName);\r\n\t \tif(isExit!= null && isExit.equalsIgnoreCase(\"deny\")){\r\n\t\t \tret = naas.setAllPolicy(webMethodName, opName, \"\");\t \t\t \t\t\r\n\t \t}\r\n\t }\r\n\t return ret;\r\n\t}", "public static void hideWarnings() {\n\t\tenableWarn = false;\n\t}", "public Agg exclude(Object value) {\n attrList.put(\"exclude\", value);\n return this;\n }", "public Boolean suppressionEnabled() {\n return this.innerProperties() == null ? null : this.innerProperties().suppressionEnabled();\n }", "public SamFilterParamsBuilder excludeUnmated(final boolean val) {\n mExcludeUnmated = val;\n return this;\n }" ]
[ "0.58538514", "0.5770055", "0.5635156", "0.5477326", "0.5432563", "0.5423106", "0.5331602", "0.5303609", "0.5285232", "0.5272496", "0.5209557", "0.5155565", "0.5155143", "0.5111595", "0.5106956", "0.5077196", "0.5064408", "0.5046724", "0.5042576", "0.5034487", "0.50300324", "0.49915272", "0.4933116", "0.49101245", "0.48559526", "0.48526525", "0.48233476", "0.48207012", "0.4807053", "0.47939745", "0.47683457", "0.46901643", "0.46733403", "0.46724847", "0.4658099", "0.46558794", "0.4655359", "0.4643159", "0.46317026", "0.4619065", "0.46176302", "0.4615685", "0.45974326", "0.45872942", "0.4584804", "0.45704687", "0.45677456", "0.4567452", "0.45521545", "0.45351076", "0.45351076", "0.4527179", "0.4505013", "0.45014292", "0.44974336", "0.44947958", "0.44868144", "0.44708386", "0.4470146", "0.44567448", "0.4449358", "0.4449225", "0.44389158", "0.44353676", "0.44207227", "0.44207227", "0.44207227", "0.4420559", "0.44111314", "0.4394979", "0.4392751", "0.4377528", "0.4371938", "0.4368858", "0.4366724", "0.43551165", "0.4355075", "0.43533435", "0.43452254", "0.4339614", "0.43350667", "0.43303612", "0.43252575", "0.43145555", "0.43122682", "0.43083853", "0.42969856", "0.42930436", "0.4292869", "0.42827976", "0.42824876", "0.42749017", "0.42735747", "0.42727703", "0.42606017", "0.42570788", "0.42505604", "0.42454708", "0.42447585", "0.4242685" ]
0.5187529
11
Used to add a single excluded policy statement to this PolicyConfiguration.
public void addToExcludedPolicy(Permission permission) throws PolicyContextException{ assertStateIsOpen(); assert permission != null; if (permission != null) { checkSetPolicyPermission(); this.getExcludedPermissions().add(permission); writeOnCommit = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Permissions getExcludedPolicy(){\n\treturn stateIs(INSERVICE_STATE) ? this.excludedPermissions : null;\n }", "public ExecutionPolicy not()\n\t{\n\t\treturn new NotRule(this);\n\t}", "public void removeExcludedPolicy()\n throws PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\n\n\tif (excludedPermissions != null) {\n\t excludedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "public WafRuleOverrides addExcludeListItem(WafExcludeListEntry excludeListItem) {\n if (this.excludeList == null) {\n this.excludeList = new ArrayList<WafExcludeListEntry>();\n }\n this.excludeList.add(excludeListItem);\n return this;\n }", "public AdverseReactionsImpl(Coded exclusionStatement) {\n super(exclusionStatement);\n }", "public StringConf exclude(String value) { \n excludes.add(value); \n return this;\n }", "public void setExcludes(String excludes)\n {\n this.excludes = excludes;\n }", "ExcludeType createExcludeType();", "public void addExcludedTransportType(Integer excludedTransportType);", "public void setExcludedPattern(String excludedPattern)\n/* */ {\n/* 101 */ setExcludedPatterns(new String[] { excludedPattern });\n/* */ }", "public void addToExcludedPolicy(PermissionCollection permissions)\n\tthrows PolicyContextException {\n\n assertStateIsOpen();\n\n\tassert permissions != null;\n\n\tif (permissions != null) {\n\t checkSetPolicyPermission();\n\t for(Enumeration e = permissions.elements(); e.hasMoreElements();){\n\t\tthis.getExcludedPermissions().add((Permission) e.nextElement());\n\t\twriteOnCommit = true;\n\t }\n\t}\n }", "public void negateUnxepectedTagPenalty() {\n\t\tnegateUnxepectedTagPenalty = true;\n\t}", "private void addPermExcludedWorkerForMicrotask( Key<Microtask> microtaskKey, String excludedWorkerID)\n\t{\n\t\t// retrieve the current permanently excluded workers for the microtask\n\t\tHashSet<String> permExcludedForMicrotask = permanentlyExcludedWorkers.get( Microtask.keyToString(microtaskKey) );\n\n\t\t// if there aren't permanently excluded workers\n\t\tif (permExcludedForMicrotask == null){\n\n\t\t\t// create a new hash set\n\t\t\tpermExcludedForMicrotask = new HashSet<String>();\n\t\t\tpermanentlyExcludedWorkers.put( Microtask.keyToString(microtaskKey) , permExcludedForMicrotask );\n\t\t}\n\n\t\t// add the worker to the permanently excluded workers for this microtask\n\t\tpermExcludedForMicrotask.add(excludedWorkerID);\n\n\t\t// add the worker to the actual excluded\n\t\taddExcludedWorkerForMicrotask( microtaskKey , excludedWorkerID );\n\t}", "public void excludedValues(BooleanExpression excluded) {\n\t\tthis.setOperator(new DBPermittedValuesOperator(excluded));\n\t\tnegateOperator();\n\t}", "public GlobFileSet setExcludePattern(String pattern)\n\t\t{\n\t\tm_excPattern = Pattern.compile(pattern);\n\t\treturn (this);\n\t\t}", "public void setAllowAddsWhileDeprovisionedString(String allowAddsWhileDeprovisionedString1) {\r\n this.allowAddsWhileDeprovisionedString = allowAddsWhileDeprovisionedString1;\r\n }", "public void addExcludedSourceFilePattern(String pattern) {\n\t\ttry {\n\t\t\tPattern regex = Pattern.compile(pattern);\n\t\t\texcludedSourceFileList.add(regex);\n\t\t} catch (PatternSyntaxException e) {\n\t\t\tgetLog().warn(\n\t\t\t\t\t\"Could not compile source file exclusion pattern \"\n\t\t\t\t\t\t\t+ pattern, e);\n\t\t}\n\t}", "public void setExcludeUrls(String[] excludeUrls) {\n this.excludeUrls = excludeUrls;\n }", "public void addDefaultExcludes()\n {\n int excludesLength = excludes == null ? 0 : excludes.length;\n String[] newExcludes;\n newExcludes = new String[ excludesLength + DEFAULTEXCLUDES.length ];\n if( excludesLength > 0 )\n {\n System.arraycopy( excludes, 0, newExcludes, 0, excludesLength );\n }\n for( int i = 0; i < DEFAULTEXCLUDES.length; i++ )\n {\n newExcludes[ i + excludesLength ] = DEFAULTEXCLUDES[ i ].replace( '/', File.separatorChar ).replace( '\\\\', File.separatorChar );\n }\n excludes = newExcludes;\n }", "public void excludedValues(Boolean excluded) {\n\t\tthis.setOperator(new DBPermittedValuesOperator(excluded));\n\t\tnegateOperator();\n\t}", "public void setExempt(boolean exempt);", "public SecurityHandler skipAudit() {\n return builder(this).audit(false).build();\n }", "public void setNewExcludedExtensions(List<String> excludedExtenions) {\n\t\tthis.filter = new Filter(excludedExtenions);\n\t}", "public GlobFileSet setExcludeDirPattern(String pattern)\n\t\t{\n\t\tm_excDirPattern = Pattern.compile(pattern);\n\t\treturn (this);\n\t\t}", "public void setEXCLUDE_PROFIT_AMOUNT(BigDecimal EXCLUDE_PROFIT_AMOUNT) {\r\n this.EXCLUDE_PROFIT_AMOUNT = EXCLUDE_PROFIT_AMOUNT;\r\n }", "@ZAttr(id=1073)\n public void addPrefSpellIgnoreWord(String zimbraPrefSpellIgnoreWord) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"+\" + Provisioning.A_zimbraPrefSpellIgnoreWord, zimbraPrefSpellIgnoreWord);\n getProvisioning().modifyAttrs(this, attrs);\n }", "@Override\n\tpublic String[] OnExclusions() {\n\t\treturn new String[] {\"sqlid\", \"item\"};\n\t}", "private void denyAccessWithRoleCondition(boolean negateOutput) {\n final String flowAlias = \"browser-deny\";\n final String userWithRole = \"test-user@localhost\";\n final String userWithoutRole = \"john-doh@localhost\";\n final String role = \"offline_access\";\n final String errorMessage = \"Your account doesn't have the required role\";\n\n Map<String, String> config = new HashMap<>();\n config.put(ConditionalRoleAuthenticatorFactory.CONDITIONAL_USER_ROLE, role);\n config.put(ConditionalRoleAuthenticatorFactory.CONF_NEGATE, Boolean.toString(negateOutput));\n\n Map<String, String> denyConfig = new HashMap<>();\n denyConfig.put(DenyAccessAuthenticatorFactory.ERROR_MESSAGE, errorMessage);\n\n configureBrowserFlowWithDenyAccessInConditionalFlow(flowAlias, ConditionalRoleAuthenticatorFactory.PROVIDER_ID, config, denyConfig);\n\n denyAccessInConditionalFlow(flowAlias,\n negateOutput ? userWithoutRole : userWithRole,\n negateOutput ? userWithRole : userWithoutRole,\n errorMessage\n );\n }", "public NotRule(ExecutionPolicy rule)\n\t\t{\n\t\t\tthis.rule = rule;\n\t\t}", "public void registerExcluded(String excludedFile) {\n excluded.add(excludedFile);\n }", "void setDefeatCondition(String conditionIdentifier);", "public void addPolicy(Policy policy) throws APIManagementException {\n\n if (policy instanceof APIPolicy) {\n APIPolicy apiPolicy = (APIPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getAPIPolicy(userNameWithoutChange, apiPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Advanced Policy with name \" + apiPolicy.getPolicyName() + \" already exists\");\n }\n apiPolicy.setUserLevel(PolicyConstants.ACROSS_ALL);\n apiPolicy = apiMgtDAO.addAPIPolicy(apiPolicy);\n List<Integer> addedConditionGroupIds = new ArrayList<>();\n for (Pipeline pipeline : apiPolicy.getPipelines()) {\n addedConditionGroupIds.add(pipeline.getId());\n }\n APIPolicyEvent apiPolicyEvent = new APIPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n apiPolicy.getTenantDomain(), apiPolicy.getPolicyId(), apiPolicy.getPolicyName(),\n apiPolicy.getDefaultQuotaPolicy().getType(), addedConditionGroupIds, null);\n APIUtil.sendNotification(apiPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof ApplicationPolicy) {\n ApplicationPolicy appPolicy = (ApplicationPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getApplicationPolicy(userNameWithoutChange, appPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Application Policy with name \" + appPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addApplicationPolicy(appPolicy);\n //policy id is not set. retrieving policy to get the id.\n ApplicationPolicy retrievedPolicy = apiMgtDAO.getApplicationPolicy(appPolicy.getPolicyName(), tenantId);\n ApplicationPolicyEvent applicationPolicyEvent = new ApplicationPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n appPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(), appPolicy.getPolicyName(),\n appPolicy.getDefaultQuotaPolicy().getType());\n APIUtil.sendNotification(applicationPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof SubscriptionPolicy) {\n SubscriptionPolicy subPolicy = (SubscriptionPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getSubscriptionPolicy(userNameWithoutChange, subPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Subscription Policy with name \" + subPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addSubscriptionPolicy(subPolicy);\n String monetizationPlan = subPolicy.getMonetizationPlan();\n Map<String, String> monetizationPlanProperties = subPolicy.getMonetizationPlanProperties();\n if (StringUtils.isNotBlank(monetizationPlan) && MapUtils.isNotEmpty(monetizationPlanProperties)) {\n createMonetizationPlan(subPolicy);\n }\n //policy id is not set. retrieving policy to get the id.\n SubscriptionPolicy retrievedPolicy = apiMgtDAO.getSubscriptionPolicy(subPolicy.getPolicyName(), tenantId);\n SubscriptionPolicyEvent subscriptionPolicyEvent = new SubscriptionPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId, subPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n subPolicy.getPolicyName(), subPolicy.getDefaultQuotaPolicy().getType(),\n subPolicy.getRateLimitCount(),subPolicy.getRateLimitTimeUnit(), subPolicy.isStopOnQuotaReach(),\n subPolicy.getGraphQLMaxDepth(),subPolicy.getGraphQLMaxComplexity(),subPolicy.getSubscriberCount());\n APIUtil.sendNotification(subscriptionPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof GlobalPolicy) {\n GlobalPolicy globalPolicy = (GlobalPolicy) policy;\n\n // checking if policy already exist\n Policy existingPolicy = getGlobalPolicy(globalPolicy.getPolicyName());\n if (existingPolicy != null) {\n throw new APIManagementException(\"Policy name already exists\");\n }\n\n apiMgtDAO.addGlobalPolicy(globalPolicy);\n\n KeyTemplateEvent keyTemplateEvent = new KeyTemplateEvent(UUID.randomUUID().toString(), System.currentTimeMillis(),\n APIConstants.EventType.CUSTOM_POLICY_ADD.name(), tenantId, tenantDomain,\n \"add\", globalPolicy.getKeyTemplate());\n APIUtil.sendNotification(keyTemplateEvent, APIConstants.NotifierType.KEY_TEMPLATE.name());\n\n GlobalPolicy retrievedPolicy = apiMgtDAO.getGlobalPolicy(globalPolicy.getPolicyName());\n GlobalPolicyEvent globalPolicyEvent = new GlobalPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n globalPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n globalPolicy.getPolicyName());\n APIUtil.sendNotification(globalPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else {\n String msg = \"Policy type \" + policy.getClass().getName() + \" is not supported\";\n log.error(msg);\n throw new UnsupportedPolicyTypeException(msg);\n }\n }", "StatementChain not(ProfileStatement... statements);", "public final void mEXCLUDING() throws RecognitionException {\n try {\n int _type = EXCLUDING;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2829:3: ( 'excluding' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2830:3: 'excluding'\n {\n match(\"excluding\"); if (state.failed) return ;\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public void setExcludes( List<ExcludeClasses> excludes )\n {\n this.excludes = excludes;\n }", "public void setExcludeList(List<WafExcludeListEntry> excludeList) {\n this.excludeList = excludeList;\n }", "public JsStatement disable()\n\t{\n\t\treturn new JsQuery(getComponent()).$().chain(\"draggable\", \"'disable'\");\n\t}", "public void setExcludes( String[] excludes )\n {\n if( excludes == null )\n {\n this.excludes = null;\n }\n else\n {\n this.excludes = new String[ excludes.length ];\n for( int i = 0; i < excludes.length; i++ )\n {\n String pattern;\n pattern = excludes[ i ].replace( '/', File.separatorChar ).replace( '\\\\', File.separatorChar );\n if( pattern.endsWith( File.separator ) )\n {\n pattern += \"**\";\n }\n this.excludes[ i ] = pattern;\n }\n }\n }", "@Override\n public Literal not() {\n if (negation == null) {\n negation = new NotBoolVar(this);\n }\n return negation;\n }", "String getDefaultDisabledByPolicyContent();", "public void disableStatement(ESqlStatementType sqltype){\r\n for(int i=this.enabledStatements.size()-1;i>=0;i--){\r\n if (this.enabledStatements.get(i) == sqltype){\r\n this.enabledStatements.remove(i);\r\n }\r\n }\r\n }", "public void addPolicy(Policy policy) throws PolicyException {\n\n // Add BlueprintPolicy\n if (policy instanceof BlueprintPolicy) {\n if (erectors.get(policy.getTarget()) == null) {\n throw new PolicyException(\"Blueprint does not exist for BlueprintPolicy target: \" + policy.getTarget());\n }\n\n List<BlueprintPolicy> policies = blueprintPolicies.get(policy.getTarget());\n if (policies == null) {\n policies = new ArrayList<BlueprintPolicy>();\n }\n\n policies.add((BlueprintPolicy) policy);\n\n logger.info(\"Setting BlueprintPolicy {} for {}\", policy, policy.getTarget());\n\n blueprintPolicies.put(policy.getTarget(), policies);\n\n // Add FieldPolicy\n } else if (policy instanceof FieldPolicy) {\n\n // XXX: force FieldPolicy's to be mapped to a blueprint? Limits their scope, but enables validation\n if (erectors.get(policy.getTarget()) == null) {\n throw new PolicyException(\"Blueprint does not exist for FieldPolicy target: \" + policy.getTarget());\n }\n\n List<FieldPolicy> policies = fieldPolicies.get(policy.getTarget());\n if (policies == null) {\n policies = new ArrayList<FieldPolicy>();\n }\n\n policies.add((FieldPolicy) policy);\n\n logger.info(\"Setting FieldPolicy {} for {}\", policy, policy.getTarget());\n\n fieldPolicies.put(policy.getTarget(), policies);\n }\n }", "public Agg exclude(Object value) {\n attrList.put(\"exclude\", value);\n return this;\n }", "public Builder setMissingStatement(boolean value) {\n \n missingStatement_ = value;\n onChanged();\n return this;\n }", "public Builder setMissingStatement(boolean value) {\n \n missingStatement_ = value;\n onChanged();\n return this;\n }", "public Builder setMissingStatement(boolean value) {\n \n missingStatement_ = value;\n onChanged();\n return this;\n }", "public Builder setMissingStatement(boolean value) {\n \n missingStatement_ = value;\n onChanged();\n return this;\n }", "boolean exclude(V1Secret secret);", "public static CustomPolicy createDefaultCustomPolicy() {\n CustomPolicy customPolicy = new CustomPolicy(SAMPLE_CUSTOM_RULE);\n customPolicy.setKeyTemplate(\"$userId\");\n String siddhiQuery = \"FROM RequestStream SELECT userId, ( userId == '[email protected]' ) AS isEligible , \"\n + \"str:concat('[email protected]','') as throttleKey INSERT INTO EligibilityStream;\"\n + \"FROM EligibilityStream[isEligible==true]#throttler:timeBatch(1 min) SELECT throttleKey, \"\n + \"(count(userId) >= 5 as isThrottled, expiryTimeStamp group by throttleKey INSERT ALL EVENTS into \"\n + \"ResultStream;\";\n\n customPolicy.setSiddhiQuery(siddhiQuery);\n customPolicy.setDescription(\"Sample custom policy\");\n return customPolicy;\n }", "public void negateIf(final boolean cond, final Statement f) {\n this.negateIf(x -> x == cond, f);\n }", "private void removeStatement(){\n\t\tsynchronized(m_viz){\n\t\t\tTuple firstTuple;\n\t\t\tsynchronized(statementList){\n\t\t\t\tfirstTuple = statementList.getFirst();\n\t\t\t}\n\n\t\t\t// Remove action is synchronized to prevent PreFuse from drawing at the same time\n\t\t\tremoveMessage(firstTuple);\n\t\t\tm_statements.removeTuple(firstTuple);\n\t\t\tstatementList.removeFirst();\t\t\t\n\t\t}\n\t}", "@Override\n\tpublic Policy addPolicy(Policy policy) {\n\t\t// TODO Auto-generated method stub\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "public ConditionItem not(ConditionItem constraint) {\n\t\treturn blockCondition(ConditionType.NOT, constraint);\n\t}", "public SampledPolicy() {\r\n super(ExecutablePolicyType.SAMPLED);\r\n }", "PolicyHolder addPolicyHolder(Integer agentId , PolicyHolder pHolder);", "void setExcludeList(SynchronizationRequest req, Zipper zipper) {\n\n try { \n String serverName = req.getServerName();\n List list = (List)_excludeCache.get(serverName);\n if (list == null) {\n Properties env = req.getEnvironmentProperties();\n // admin config context\n ConfigContext ctx = _ctx.getConfigContext();\n Domain domain = (Domain) ctx.getRootConfigBean();\n Server server = domain.getServers().getServerByName(serverName);\n if (server != null) {\n ServerDirector director=new ServerDirector(ctx, serverName);\n List excludes = director.constructExcludes();\n list = new ArrayList();\n int size = excludes.size();\n for (int i=0; i<size; i++) {\n String path = (String) excludes.get(i);\n String tPath = \n TextProcess.tokenizeConfig(path, serverName, env);\n list.add(tPath);\n }\n // add the list to the cache\n _excludeCache.put(serverName, list);\n }\n }\n _logger.log(Level.FINE, \"Excluded List \" + list);\n zipper.addToExcludeList(list);\n } catch (Exception e) {\n _logger.log(Level.FINE, \"Excluded List can not be set\", e);\n }\n }", "public DepreciatingPolicy(float amount, float rate){\r\n super(amount);\r\n this.rate = rate*100;\r\n }", "public void registerExcluded(List<String> excludedFiles) {\n excluded.addAll(excludedFiles);\n }", "public DISCARD addIgnoreMember(Address sender) {ignoredMembers.add(sender); return this;}", "public void setIgnore() {\n\t\t\tignore = true;\n\t\t}", "public CancellationPolicy addCancellationPolicy(CancellationPolicy newPolicy) throws Exception {\n List<ExpediaRules> expediaRules = newPolicy.getRules();\n expediaRules.forEach((rule) -> {\n rule.setPolicy(newPolicy);\n });\n newPolicy.setRules(expediaRules);\n newPolicy.setPolicyUpdatedOn();\n newPolicy.setPolicyUpdatedBy(\"Tester\");\n CancellationPolicy addedPolicy = cancellationPolicyRepository.save(newPolicy);\n return addedPolicy;\n }", "public void setIgnoredReasons(List<AXProperty> ignoredReasons) {\n this.ignoredReasons = ignoredReasons;\n }", "public void setPolicyNo(java.lang.String policyNo) {\n this.policyNo = policyNo;\n }", "public void setPolicyNo(java.lang.String policyNo) {\n this.policyNo = policyNo;\n }", "SkipStatement createSkipStatement();", "@ZAttr(id=1073)\n public Map<String,Object> addPrefSpellIgnoreWord(String zimbraPrefSpellIgnoreWord, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"+\" + Provisioning.A_zimbraPrefSpellIgnoreWord, zimbraPrefSpellIgnoreWord);\n return attrs;\n }", "void removeStatement(Statement statement) throws ModelRuntimeException;", "private void disableIfDissatisfied() {\n \t\tif ( !this.satisfiesPolygon() ) {\n \t\t\tthis.area.setEnabled( false );\n \t\t}\n \t}", "public String getAllowAddsWhileDeprovisionedString() {\r\n return this.allowAddsWhileDeprovisionedString;\r\n }", "public void disableChat(Reason denyReason);", "public NotCondition() {\r\n\t\tsuper();\r\n\t}", "boolean getMissingStatement();", "boolean getMissingStatement();", "boolean getMissingStatement();", "boolean getMissingStatement();", "public void warningPermit();", "void registerStatement(EPStatement statement) {\r\n\t\tepnStatements.add(statement);\r\n\t}", "@Nonnull protected Predicate<String> getIncludeExcludePredicate(@Nonnull final CriteriaSet criteria) {\n final EncryptionConfigurationCriterion criterion = criteria.get(EncryptionConfigurationCriterion.class);\n assert criterion != null;\n\n return resolveIncludeExcludePredicate(criteria, criterion.getConfigurations());\n }", "public void setOmitDeclaration(boolean omitDeclaration) {\r\n this.omitDeclaration = omitDeclaration;\r\n }", "String getDefaultDisabledByPolicyTitle();", "protected void createIgnoreAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/2007/ImpactAnalysis/Ignore\";\t\n\t\taddAnnotation\n\t\t (architectureAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceImplementationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceUseEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (providedInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (requiredInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (actorCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\n\t}", "private void manageDeniedPacket(MeetingPacket packet) {\n Console.comment(\"=> Denied packet from \" + packet.getSourceAddress()) ;\n\n if(this.callbackOnDenied != null) {\n this.callbackOnDenied.denied() ;\n }\n }", "public DeleteInfrastructure propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "private void configureBrowserFlowWithDenyAccessInConditionalFlow(String newFlowAlias, String conditionProviderId, Map<String, String> conditionConfig, Map<String, String> denyConfig) {\n testingClient.server(\"test\").run(session -> FlowUtil.inCurrentRealm(session).copyBrowserFlow(newFlowAlias));\n testingClient.server(\"test\").run(session -> FlowUtil.inCurrentRealm(session)\n .selectFlow(newFlowAlias)\n .inForms(forms -> forms\n .clear()\n .addAuthenticatorExecution(AuthenticationExecutionModel.Requirement.REQUIRED, UsernameFormFactory.PROVIDER_ID)\n .addSubFlowExecution(AuthenticationExecutionModel.Requirement.CONDITIONAL, subflow -> subflow\n .addAuthenticatorExecution(AuthenticationExecutionModel.Requirement.REQUIRED, conditionProviderId, config -> config.setConfig(conditionConfig))\n .addAuthenticatorExecution(AuthenticationExecutionModel.Requirement.REQUIRED, DenyAccessAuthenticatorFactory.PROVIDER_ID, config -> config.setConfig(denyConfig))\n )\n .addAuthenticatorExecution(AuthenticationExecutionModel.Requirement.REQUIRED, PasswordFormFactory.PROVIDER_ID)\n )\n .defineAsBrowserFlow() // Activate this new flow\n );\n }", "void clearPolicy() {\n policy = new Policy();\n }", "public DisableEmuBreakpointActionItem planDisableEmu(TraceBreakpoint bpt) {\n\t\tDisableEmuBreakpointActionItem action = new DisableEmuBreakpointActionItem(bpt);\n\t\tadd(action);\n\t\treturn action;\n\t}", "public String[] getExcludes()\n {\n return m_excludes;\n }", "public void setExempt(boolean exempt) {\n isExempt = exempt;\n }", "public DeleteFeatureGate propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "public OriginRequestPolicyConfig withComment(String comment) {\n setComment(comment);\n return this;\n }", "public ApiResponse setExcludeFromSpider(String url) {\n try {\n return api.spider.excludeFromScan(Pattern.quote(Pattern.compile(url).pattern()) + \".*\");\n } catch (Exception e) {\n LogManager.suitLogger.error(\"Failed to add regex to exclude from spider scan !\", e);\n }\n return null;\n }", "public boolean getExempt();", "public void addProgenyBlacklist(Class...clazz);", "public List<WafExcludeListEntry> getExcludeList() {\n return excludeList;\n }", "public MicrosoftGraphStsPolicy withDefinition(List<String> definition) {\n this.definition = definition;\n return this;\n }", "public void executeNot() {\n\t\tBitString destBS = mIR.substring(4, 3);\n\t\tBitString sourceBS = mIR.substring(7, 3);\n\t\tmRegisters[destBS.getValue()] = mRegisters[sourceBS.getValue()].copy();\n\t\tmRegisters[destBS.getValue()].invert();\n\n\t\tBitString notVal = mRegisters[destBS.getValue()];\n\t\tsetConditionalCode(notVal);\n\t}", "public int getForbidCondition() {\n\t\t\treturn forbidCondition;\n\t\t}", "public void addTagToIgnore(String tag)\r\n\t{\r\n\t\ttagsToIgnore.add(tag);\r\n\t}", "public boolean getMissingStatement() {\n return missingStatement_;\n }", "public boolean getMissingStatement() {\n return missingStatement_;\n }" ]
[ "0.56500316", "0.55197966", "0.53543216", "0.51101893", "0.50530887", "0.5033694", "0.49494672", "0.4935229", "0.49071467", "0.48860204", "0.48090115", "0.47928354", "0.47208565", "0.4690128", "0.4671541", "0.46523535", "0.46489754", "0.4641644", "0.45927837", "0.45916227", "0.45705816", "0.45612875", "0.454758", "0.45345905", "0.45222318", "0.4519349", "0.4514483", "0.45064366", "0.45024002", "0.45020595", "0.4471755", "0.44665354", "0.4448164", "0.4434823", "0.4428925", "0.44173595", "0.44140893", "0.44126257", "0.4410302", "0.4401704", "0.4390126", "0.43730897", "0.4353354", "0.43171364", "0.43171364", "0.43171364", "0.43171364", "0.43136886", "0.43074682", "0.4293431", "0.42802227", "0.42708012", "0.4257692", "0.42463964", "0.42313397", "0.4225333", "0.42185947", "0.42125094", "0.41925982", "0.41901776", "0.4182983", "0.41768602", "0.4160397", "0.4160397", "0.41588783", "0.41451272", "0.4138032", "0.4132849", "0.41195926", "0.41195464", "0.41027454", "0.41011974", "0.41011974", "0.41011974", "0.41011974", "0.41010293", "0.41002333", "0.40943465", "0.4085783", "0.4070671", "0.4063091", "0.40618888", "0.4050149", "0.40477034", "0.40474975", "0.4045387", "0.40450156", "0.40412492", "0.4036925", "0.40366325", "0.40286374", "0.40250954", "0.40181655", "0.4015782", "0.40140873", "0.400989", "0.40043846", "0.40039244", "0.400181", "0.400181" ]
0.55284756
1
Used to remove a role and all its permissions from this PolicyConfiguration.
public void removeRole(String roleName) throws PolicyContextException{ assertStateIsOpen(); assert roleName != null; if(roleName != null && rolePermissionsTable != null) { checkSetPolicyPermission(); if (rolePermissionsTable.remove(roleName) != null) { if (rolePermissionsTable.isEmpty()) { rolePermissionsTable = null; } writeOnCommit = true; } else if (roleName.equals("*")) { boolean wasEmpty = rolePermissionsTable.isEmpty(); if (!wasEmpty) { rolePermissionsTable.clear(); } rolePermissionsTable = null; if (!wasEmpty) { writeOnCommit = true; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeAdminRole()\r\n {\r\n getSemanticObject().removeProperty(swpres_adminRole);\r\n }", "public void removeRole(String roleName) throws UnsupportedOperationException;", "public void delRole( String role )\n {\n if ( this.roles != null )\n {\n this.roles.remove( role );\n }\n }", "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "public void removeRole(Role role) {\n if (this.roles.contains(role)) {\n this.roles.remove(role);\n }\n }", "public void removeSysRole(final Long roleId);", "private void onRemoveRole() {\n\t\troleProxy.removeRoleFromUser(user, selectedRole);\n\t}", "public void removeRole(Role role) {\n\t\tif (role.parentRole != null) {\n\t\t\trole.parentRole.subRoles.remove(role);\n\t\t\trole.parentRole = null;\n\t\t}\n\t}", "void deleteRole(UserRole role) {\n\t\tuserRoleRepository.delete(role.getId());\n\t}", "public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearRole() {\n role = null;\n fieldSetFlags()[6] = false;\n return this;\n }", "public void revokePermission(Permission permission, Role role) {\n Connection conn = null;\n PreparedStatement ps = null;\n String query = null;\n try {\n conn = getConnection();\n query = queryManager.getQuery(conn, QueryManager.REVOKE_PERMISSION_BY_ROLE_QUERY);\n conn.setAutoCommit(false);\n ps = conn.prepareStatement(query);\n ps.setString(1, permission.getAppName());\n ps.setString(2, permission.getPermissionString());\n ps.setString(3, role.getId());\n ps.execute();\n conn.commit();\n } catch (SQLException e) {\n log.debug(\"Failed to execute SQL query {}\", query);\n throw new PermissionException(\"Unable to revoke permission.\", e);\n } finally {\n closeConnection(conn, ps, null);\n }\n }", "@Override\r\n\tpublic void deleteRole(Role role) {\n\t\tgetHibernateTemplate().delete(role);\r\n\t}", "public void revoke(String role) throws HsqlException {\n Trace.check(hasRoleDirect(role), Trace.DONT_HAVE_ROLE, role);\n roles.remove(role);\n }", "public void deletRole(int id) {\n\trolesDao.deleteById(id);\n\t}", "void removeRole(String id) throws DataException;", "public Builder clearRole() {\n if (roleBuilder_ == null) {\n role_ = null;\n onChanged();\n } else {\n roleBuilder_.clear();\n }\n bitField0_ = (bitField0_ & ~0x00000002);\n return this;\n }", "@Override\n\tpublic void delRole(String roleid) {\n\t\troleMapper.delRole(roleid);\n\t}", "@Override\n\tpublic void deleteRole(int id) {\n\t\tthis.roleMapper.deleteByPrimaryKey(id);\n\t}", "public void revokeRole(String roleName, User user) throws UserManagementException;", "@Override\r\n\tpublic int deleteRolePermission(int id) {\n\t\treturn rolePermissionMapper.deleteByPrimaryKey(id);\r\n\t}", "@Override\r\n\tpublic int delRole(int id) {\n\t\treturn 0;\r\n\t}", "public void removeViewRole()\r\n {\r\n getSemanticObject().removeProperty(swpres_viewRole);\r\n }", "@Override\n\tpublic void deleteRole(long id) {\n\t\t\n\t}", "protected synchronized void removeRoleProvider(RoleProvider roleProvider) {\n logger.debug(\"Removing {} from the list of role providers\", roleProvider);\n roleProviders.remove(roleProvider);\n }", "public void revokeRole(String role, boolean recursive) {\n\t\tif (path != null) {\n\t\t\tMain.get().securityPopup.status.setFlag_update();\n\t\t\tauthService.revokeRole(path, role, recursive, callbackRevokeRole);\n\t\t}\n\t}", "private void deleteRoleAccess(Role inheritFromToDelete,\n List<? extends InheritedAccessEnabled> roleAccessList, AccessTypeInjector injector) {\n try {\n OBContext.setAdminMode(false);\n String inheritFromId = inheritFromToDelete.getId();\n List<InheritedAccessEnabled> iaeToDelete = new ArrayList<InheritedAccessEnabled>();\n for (InheritedAccessEnabled ih : roleAccessList) {\n String inheritedFromId = ih.getInheritedFrom() != null ? ih.getInheritedFrom().getId() : \"\";\n if (!StringUtils.isEmpty(inheritedFromId) && inheritFromId.equals(inheritedFromId)) {\n iaeToDelete.add(ih);\n }\n }\n for (InheritedAccessEnabled iae : iaeToDelete) {\n iae.setInheritedFrom(null);\n roleAccessList.remove(iae);\n Role owner = injector.getRole(iae);\n if (!owner.isTemplate()) {\n // Perform this operation for not template roles, because for template roles is already\n // done\n // in the event handler\n injector.removeReferenceInParentList(iae);\n }\n OBDal.getInstance().remove(iae);\n }\n } finally {\n OBContext.restorePreviousMode();\n }\n }", "@Override\r\n\tpublic boolean deleteRole(Long id) {\n\t\tdeleteById(id);\r\n\t\treturn true;\r\n\t}", "@Override\n\t@TriggersRemove(cacheName=\"baseCache\",when=When.AFTER_METHOD_INVOCATION,removeAll=true)\n\tpublic int deleteByRole(Integer roleid) {\n\t\treturn permissionRoleMapper.deleteByRole(roleid);\n\t}", "public void removePermissions(IPermission[] permissions) throws AuthorizationException;", "public void deleteRoleData() throws DataLayerException\r\n\t{\r\n\t\troleDao.deleteAll();\r\n\t}", "public void removeDocumenterRole()\r\n {\r\n getSemanticObject().removeProperty(swpres_documenterRole);\r\n }", "public static void removeRoleInListOf(Keycloak keycloak, KeycloakAdminClientConfig keycloakAdminClientConfig, String role, String compositeRole) {\n\n final String clientUuid = keycloak.realm(keycloakAdminClientConfig.getRealm()).clients().findByClientId(keycloakAdminClientConfig.getClientId()).get(0).getId();\n\n final RolesResource rolesResource = keycloak.realm(keycloakAdminClientConfig.getRealm()).clients().get(clientUuid).roles();\n\n final RoleResource compositeRoleResource = rolesResource.get(compositeRole);\n\n try {\n final RoleRepresentation roleToDelete = rolesResource.get(role).toRepresentation();\n compositeRoleResource.getRoleComposites().remove(roleToDelete);\n\n } catch (NotFoundException e) {\n log.warn(\"Role {} does not exists!\", role);\n }\n }", "@Override\n\tpublic void deleteRole(Integer id) {\n\t\tlogger.debug(\"RoleServiceImpl::deleteRole id = {}\", id);\n\t\troleMapper.deleteRole(id);\n\t}", "public void clearSupportRoles() {\n\t\tsupportRoles.clear();\n\t\tconfig.save();\n\t\tif (!config.isLoading()) { TMEventManager.departmentChange(this, ChangeType.Dept.ROLES); }\n\t}", "@Override\n public RemovePermissionResult removePermission(RemovePermissionRequest request) {\n request = beforeClientExecution(request);\n return executeRemovePermission(request);\n }", "@POST\n @Path(\"DeleteAllRolePermissions/{roleId : [1-9][0-9]*}/{gameModelId}\")\n public boolean deleteAllRolePermissions(@PathParam(\"roleId\") Long roleId,\n @PathParam(\"gameModelId\") String id) {\n\n checkGmOrGPermission(id, \"GameModel:Edit:\", \"Game:Edit:\");\n\n return this.userFacade.deleteRolePermissionsByIdAndInstance(roleId, id);\n }", "public void removeRole(String roleName) throws UnsupportedOperationException {\r\n log.debug(\"User [ Anonymous ] has no roles\");\r\n }", "public boolean removeSupportRole(Role ... r) {\n\t\tif (getGuild() == null || r == null) { return false; }\n\t\tfor (Role role : r) { if (role.getGuild().equals(getGuild())) supportRoles.remove(role); }\n\t\tconfig.save();\n\t\tif (!config.isLoading()) { TMEventManager.departmentChange(this, ChangeType.Dept.ROLES); }\n\t\treturn true;\n\t}", "@Override\n\tpublic void deleteRole(MaintenanceDTO dto) {\n\t\tmd.deleteRole(dto);\n\t}", "public Builder clearRoles() {\n if (rolesBuilder_ == null) {\n roles_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n rolesBuilder_.clear();\n }\n return this;\n }", "@POST\n @Path(\"DeleteAllRolePermissions/{roleName}/{gameModelId}\")\n public boolean deleteAllRolePermissions(@PathParam(\"roleName\") String roleName,\n @PathParam(\"gameModelId\") String id) {\n try {\n return this.deleteAllRolePermissions(roleFacade.findByName(roleName).getId(), id);\n } catch (WegasNoResultException ex) {\n throw WegasErrorMessage.error(\"Role \\\"\" + roleName + \"\\\" does not exists\");\n }\n }", "public Builder clearRoles() {\n if (rolesBuilder_ == null) {\n roles_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n rolesBuilder_.clear();\n }\n return this;\n }", "public RevokeRoleResponse revokeRole(RevokeRoleRequest request) throws GPUdbException {\n RevokeRoleResponse actualResponse_ = new RevokeRoleResponse();\n submitRequest(\"/revoke/role\", request, actualResponse_, false);\n return actualResponse_;\n }", "public boolean removePermission(Permission permission);", "public void supprimerRole(Long idRoUt);", "public static void removeRoleDocuments(Role role) {\n getService().removeRoleDocuments(role);\n }", "protected void unconfigureAbilityModifiers(Ability ability) {\n int count = ability.getLimitationCount();\n for (int i = 0; i < count; i++) {\n //if ( ability.getIndexedBooleanValue(i, \"Limitation\", \"FRAMEWORKLIMITATION\") ) {\n Limitation lim = ability.getLimitation(i);\n if (lim.isAddedByFramework()) {\n ability.removeLimitation(i);\n count--;\n }\n }\n }", "public DeleteRoleResponse deleteRole(DeleteRoleRequest request) throws GPUdbException {\n DeleteRoleResponse actualResponse_ = new DeleteRoleResponse();\n submitRequest(\"/delete/role\", request, actualResponse_, false);\n return actualResponse_;\n }", "public void delete(SecRole entity);", "@Override\r\n\tpublic int delUserRole(long urId) {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int deleteRole(int roleid) {\n\t\treturn adminRoleDao.deleteByPrimaryKey(roleid);\r\n\t}", "@Override\r\n\tpublic int deleteRoleandPermission(int roleid, int permissionid) {\n\t\treturn adminRoleandpermissionDao.deleteByPrimaryKey(roleid, permissionid);\r\n\t}", "@Override\r\n\tpublic int delRoleAuth(long raId) {\n\t\treturn 0;\r\n\t}", "public void deleteUserRole(UserRole userRole) throws ClassNotFoundException, SQLException {\n\t\tsave(\"delete from user_role where id = ?\", new Object[] { userRole.getId() });\n\t}", "public void removeEditorRoleFromIndividualAcl(Individual i);", "@Override\n\tpublic void revoke(User subject, Permission permission)\n\t{\n\t\t//TODO figure out how to implement since we're using role based permissions\n\t}", "public Builder removeRoles(int index) {\n if (rolesBuilder_ == null) {\n ensureRolesIsMutable();\n roles_.remove(index);\n onChanged();\n } else {\n rolesBuilder_.remove(index);\n }\n return this;\n }", "public Builder removeRoles(int index) {\n if (rolesBuilder_ == null) {\n ensureRolesIsMutable();\n roles_.remove(index);\n onChanged();\n } else {\n rolesBuilder_.remove(index);\n }\n return this;\n }", "public void removeExcludedPolicy()\n throws PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\n\n\tif (excludedPermissions != null) {\n\t excludedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "@Test\n public void removeRole() throws Exception {\n\n doReturn(role).when(roleRepository).findOne(anyLong());\n doAnswer(invocationOnMock -> users).when(userRepository).findUsersByRolesContains(any(Role.class));\n doAnswer(invocationOnMock -> users).when(userRepository).save(any(List.class));\n doNothing().when(roleRepository).delete(any(Role.class));\n\n boolean result = roleService.removeRole(anyLong());\n\n Assert.assertTrue(\"Remove role failed\", result);\n }", "@PreRemove\n private void removeRolesFromUsers() {\n for (User user : users) {\n user.getRoles().remove(this);\n }\n }", "@Override\n\tpublic void deleteUserRole(UserDto userDto, RoleDto role) {\n\t\t\n\t}", "@RequestMapping(value = \"/roles/{roleId}/delete\", method = RequestMethod.POST)\n public String deleteRole(@PathVariable Long roleId) {\n // TODO: Delete role whose id is roleId\n\n // TODO: Redirect browser to /roles\n return null;\n }", "public void onGuildMemberRoleRemove(GuildMemberRoleRemoveEvent e) {\n\t\tif(e.getMember().getUser().isBot() == false) {\n\t\t\tFunctions funcao = new Functions(e);\n\t\t\ttry {\n\t\t\tfuncao.cargoRemovido();\n\t\t\t}catch(StringIndexOutOfBoundsException exception) {\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public IBusinessObject removeFromRole(IIID useriid, IIID roleiid, boolean recurse)\n throws OculusException;", "public void delete(int roleId) throws QuestionBankSystemException,\n\t\t\tQuestionBankException;", "void clearPrivileges() {\n\n roles.clear();\n rightsMap.clear();\n\n isAdministrator = false;\n }", "@Override\r\n\tpublic void deleteRolePermissions(int[] ids) {\n\t\tfor(int i=0;i<ids.length;i++){\r\n\t\t\trolePermissionMapper.deleteByPrimaryKey(ids[i]);\r\n\t\t}\r\n\t}", "public PeerRole planToRemoveChannelPeerRoleListWithChannel(PeerRole peerRole, String channelId, Map<String,Object> options)throws Exception;", "void removePolicyController(PolicyController controller);", "@Override\n\tpublic void deleteRolemenuByRoleId(Integer roleid) {\n\t\tjdbcTemplate.update(\"delete from menurole where roleid=?\",roleid);\n\t}", "Integer deleteByRoleAndPermission(@Param(\"roleId\") Integer roleId,\n @Param(\"permissionId\") Integer permissionId);", "@Override\n\tpublic void removeGameRoomManagementRights(RevocableToken adminToken,\n\t\t\tGameUId gameuid, AccountUId accountuid)\n\t\t\tthrows RevokedTokenException, InvalidAccountUIdException,\n\t\t\tRightsManagementException {\n\n\t}", "public void removePermission(T object, Permission permission, User user);", "void removePolicyController(String name);", "@GetMapping( value = \"/remove/{id}\")\n public String removeRole(@PathVariable( \"id\" ) Long id) {\n roleService.delete(id);\n return \"redirect:/role\";\n }", "public static int removeRoleFromDb(String roleName)\n\t{\t\t\n\t\t//Remove user data from table BSM_USER\n\t\tString sql = String.format(\"DELETE FROM BSM_ROLE WHERE ROLE_NAME='%s'\", roleName);\n\t\tint ret = DBUtil.executeSQL(sql);\n\t\treturn ret;\n\t}", "public Boolean deleteRole(Role role) {\n if (log.isDebugEnabled()) {\n log.debug(\"RoleService deleteRole method calling.\");\n }\n Boolean saveStatus = false;\n if (log.isDebugEnabled()) {\n log.debug(\"RoleService deleteRole method delete role to the database.\");\n }\n roleRepository.delete(role);\n saveStatus = true;\n return saveStatus;\n }", "public static List<RoleRepresentation> removeRoleInList(List<RoleRepresentation> listOfRoleRepresentation, RoleRepresentation roleToBeRemove) {\n\n listOfRoleRepresentation.remove(roleToBeRemove);\n\n List<RoleRepresentation> updatedListRoleRepresentation = new ArrayList<>();\n for (RoleRepresentation roleRepresentationItem : listOfRoleRepresentation) {\n if (!roleToBeRemove.getName().equalsIgnoreCase(roleRepresentationItem.getName())) {\n updatedListRoleRepresentation.add(roleRepresentationItem);\n }\n }\n\n return updatedListRoleRepresentation;\n }", "void unregister(String policyId);", "@POST\n @Path(\"DeletePermission/{roleId : [1-9][0-9]*}/{permission}\")\n public boolean deletePermissionByInstance(@PathParam(value = \"roleId\") Long roleId, @PathParam(value = \"permission\") String permission) {\n\n String splitedPermission[] = permission.split(\":\");\n\n checkGmOrGPermission(splitedPermission[2], \"GameModel:Edit:\", \"Game:Edit:\");\n\n return this.userFacade.deleteRolePermission(roleId, permission);\n }", "public IBusinessObject removeFromRole(IIID useriid, IIID roleiid)\n throws OculusException;", "private static void remove(final String username, final Role role, final String relPath)\n\t{\n\t\tif (username != null && username2accesses.containsKey(username))\n\t\t{\n\t\t\tfinal List<Access> accesses = username2accesses.get(username);\n\t\t\tfor (int i = 0; i < accesses.size(); i++)\n\t\t\t{\n\t\t\t\tfinal String dbUsername = accesses.get(i).getUsername();\n\t\t\t\tfinal Role dbRole = accesses.get(i).getRole();\n\t\t\t\tfinal String dbRelPath = accesses.get(i).getRelPath();\n\t\t\t\tif (dbUsername.equals(username) && dbRole.equals(role) && dbRelPath.equals(relPath))\n\t\t\t\t{\n\t\t\t\t\taccesses.remove(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//--- if accesses length is zero, the username (key) can be removed from the hash map ---//\n\t\t\tif (accesses.size() > 0) username2accesses.replace(username, accesses);\n\t\t\telse username2accesses.remove(username);\n\t\t}\n\t}", "@Override\n\tpublic void delete(Integer roleid) {\n\t\tjdbcTemplate.update(\"delete from role where id=?\",roleid);\n\t}", "public void revokePermission(Permission permission) {\n Connection conn = null;\n PreparedStatement ps = null;\n String query = null;\n try {\n conn = getConnection();\n query = queryManager.getQuery(conn, QueryManager.REVOKE_PERMISSION_QUERY);\n conn.setAutoCommit(false);\n ps = conn.prepareStatement(query);\n ps.setString(1, permission.getAppName());\n ps.setString(2, permission.getPermissionString());\n ps.execute();\n conn.commit();\n } catch (SQLException e) {\n log.debug(\"Failed to execute SQL query {}\", query);\n throw new PermissionException(\"Unable to revoke permission.\", e);\n } finally {\n closeConnection(conn, ps, null);\n }\n }", "public DeleteRoleResponse deleteRole(String name, Map<String, String> options) throws GPUdbException {\n DeleteRoleRequest actualRequest_ = new DeleteRoleRequest(name, options);\n DeleteRoleResponse actualResponse_ = new DeleteRoleResponse();\n submitRequest(\"/delete/role\", actualRequest_, actualResponse_, false);\n return actualResponse_;\n }", "int deleteByPrimaryKey(Integer roleId);", "int deleteByPrimaryKey(Integer roleId);", "@Override\n public void clearPermissions() {\n permissions.clear();\n }", "public SecurityIdentityType<T> removeRunAs()\n {\n childNode.remove(\"run-as\");\n return this;\n }", "void setRole(final SecurityRole role);", "public Role() {\r\n\t\tpermissions = new ArrayList<Permission>();\r\n\t}", "@Override\n\tpublic void delete(UserRole vo) {\n\n\t}", "@Override\n\tpublic void removeGamePlayRights(RevocableToken adminToken,\n\t\t\tGameUId gameuid, AccountUId accountuid)\n\t\t\tthrows RevokedTokenException, InvalidAccountUIdException,\n\t\t\tRightsManagementException {\n\n\t}", "public void removePermission(String messageBoxId, PermissionLabel permissionLabel)\n throws MessageBoxException {\n try {\n AuthorizationManager authorizationManager = Utils.getUserRelam().getAuthorizationManager();\n\n String messageBoxPath = MessageBoxConstants.MB_MESSAGE_BOX_STORAGE_PATH + \"/\" +\n messageBoxId;\n\n for (String sharedUser : permissionLabel.getSharedUsers()) {\n for (String operation : permissionLabel.getOperations()) {\n authorizationManager.clearUserAuthorization(sharedUser, messageBoxPath, operation);\n }\n }\n } catch (UserStoreException e) {\n String error = \"Failed to clear permissions authorized for \" + messageBoxId +\n \" with permission label \" + permissionLabel.getLabelName();\n log.error(error);\n throw new MessageBoxException(error, e);\n }\n }", "public void revoke() {\n WebsitePreferenceBridge.nativeRevokeUsbPermission(mOrigin, mEmbedder, mObject);\n }", "@Override\n\tpublic void deleteRoleUtilisateur(Integer idR) {\n\t\troleUtilisateurDAO.deleteRoleUtilsiateur(idR);\n\t}", "public PeerRole planToRemoveChannelPeerRoleListWithNode(PeerRole peerRole, String nodeId, Map<String,Object> options)throws Exception;", "@Override\n\t@Transactional\n\tpublic void delete(Role role) {\n\t\t\n\t}", "public void removeUncheckedPolicy()\n\tthrows PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\t\n\n\tif (uncheckedPermissions != null) {\n\t uncheckedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }" ]
[ "0.67745394", "0.67529136", "0.6635501", "0.65272987", "0.64893264", "0.6398914", "0.63744086", "0.62204903", "0.6195259", "0.6178093", "0.61306983", "0.61218834", "0.6054692", "0.6034195", "0.60300726", "0.6028641", "0.6024097", "0.59869266", "0.59430707", "0.5919725", "0.5895752", "0.5885174", "0.5881978", "0.5860528", "0.585556", "0.5844616", "0.57128817", "0.57082677", "0.5694417", "0.5689157", "0.5635272", "0.56240475", "0.55958736", "0.55911785", "0.55901915", "0.55894333", "0.5584005", "0.5554002", "0.5544419", "0.5518671", "0.5509328", "0.5491213", "0.5476129", "0.547374", "0.54338586", "0.54318404", "0.5428809", "0.54228485", "0.54140705", "0.5413645", "0.5412608", "0.5400947", "0.53567916", "0.5352164", "0.53499186", "0.53401875", "0.53299737", "0.53299737", "0.5316701", "0.53021425", "0.52901053", "0.52866536", "0.5286508", "0.52812326", "0.5199392", "0.51985574", "0.51795274", "0.51752424", "0.5157549", "0.5151175", "0.5150772", "0.5149879", "0.51402193", "0.51379097", "0.51005495", "0.50937235", "0.5092433", "0.50634986", "0.5054378", "0.5040217", "0.50188553", "0.5014585", "0.50135744", "0.50075984", "0.4988659", "0.49871695", "0.4980712", "0.4980712", "0.49802652", "0.49718347", "0.49712318", "0.4945226", "0.49409595", "0.49231339", "0.4919926", "0.4919699", "0.49062943", "0.49041164", "0.48923326", "0.48918334" ]
0.6879168
0
Used to remove any unchecked policy statements from this PolicyConfiguration.
public void removeUncheckedPolicy() throws PolicyContextException{ assertStateIsOpen(); checkSetPolicyPermission(); if (uncheckedPermissions != null) { uncheckedPermissions = null; writeOnCommit = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "void clearPolicy() {\n policy = new Policy();\n }", "public void removeExcludedPolicy()\n throws PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\n\n\tif (excludedPermissions != null) {\n\t excludedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "public void suppress() {\r\n\t\tsuppressed = true;\r\n\t}", "public void suppress() {\r\n\t\tsuppressed = true;\r\n\t}", "public void removeAllConditions()\r\n\t{\r\n\t\tconditions.clear();\r\n\t}", "public void unsetRules()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(RULES$26);\n }\n }", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "@Override\n\tpublic void suppress() {\n\n\t}", "AgentPolicyBuilder clear();", "public static void removeRestrictions() {\n\t\ttry {\n\t\t\tClass<?> jceSecurityClass = Class.forName(\"javax.crypto.JceSecurity\");\n\t\t\tClass<?> cryptoPermissionsClass = Class.forName(\"javax.crypto.CryptoPermissions\");\n\t\t\tClass<?> cryptoAllPermissionClass = Class.forName(\"javax.crypto.CryptoAllPermission\");\n\n\t\t\tField isRestrictedField = jceSecurityClass.getDeclaredField(\"isRestricted\");\n\t\t\tisRestrictedField.setAccessible(true);\n\t\t\tisRestrictedField.set(null, false);\n\n\t\t\tField defaultPolicyField = jceSecurityClass.getDeclaredField(\"defaultPolicy\");\n\t\t\tdefaultPolicyField.setAccessible(true);\n\t\t\tPermissionCollection defaultPolicy = (PermissionCollection) defaultPolicyField.get(null);\n\n\t\t\tField permsField = cryptoPermissionsClass.getDeclaredField(\"perms\");\n\t\t\tpermsField.setAccessible(true);\n\t\t\t((Map<?, ?>) permsField.get(defaultPolicy)).clear();\n\n\t\t\tField cryptoAllPermissionInstanceField = cryptoAllPermissionClass.getDeclaredField(\"INSTANCE\");\n\t\t\tcryptoAllPermissionInstanceField.setAccessible(true);\n\t\t\tdefaultPolicy.add((Permission) cryptoAllPermissionInstanceField.get(null));\n\t\t} catch (Exception e) {\n\t\t\t// ignore\n\t\t}\n }", "public void clear() {\n synchronized (unchecked) {\n unchecked.clear();\n }\n }", "public void clearRules() {\n this.rules_ = emptyProtobufList();\n }", "public void clearFinal() {\n\t\t// Avoid concurrent modification exceptions.\n\t\tfinal ArrayList<ConfigurationButton> list = new ArrayList<>();\n\t\tlist.addAll(configurationToButtonMap.values());\n\t\tfinal Iterator<ConfigurationButton> it = list.iterator();\n\n\t\twhile (it.hasNext()) {\n\t\t\tfinal ConfigurationButton button = it.next();\n\t\t\tif (button.state == ConfigurationButton.ACCEPT || button.state == ConfigurationButton.REJECT) {\n\t\t\t\tremove(button.getConfiguration());\n\t\t\t}\n\t\t}\n\t}", "void unsetConstraints();", "void unregister(String policyId);", "public void removeAllAlarms() {\n synchronized (mLock) {\n mAlarmPriorityQueue.clear();\n setNextAlarmLocked(0);\n }\n }", "public void unsetSwissprot()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(SWISSPROT$14, 0);\r\n }\r\n }", "public void removeFromPolicyTransactions(entity.AppCritPolicyTransaction element);", "@Override\r\n\t\tpublic void clearWarnings() throws SQLException {\n\t\t\t\r\n\t\t}", "void unsetComplianceCheckResult();", "public void unsetReplyManagementRuleSet()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(REPLYMANAGEMENTRULESET$30, 0);\n }\n }", "public void clearThawed() {\n\t\t// Avoid concurrent modification exceptions.\n\t\tfinal ArrayList<ConfigurationButton> list = new ArrayList<>();\n\t\tlist.addAll(configurationToButtonMap.values());\n\t\tfinal Iterator<ConfigurationButton> it = list.iterator();\n\n\t\twhile (it.hasNext()) {\n\t\t\tfinal ConfigurationButton button = it.next();\n\t\t\tif (button.state != ConfigurationButton.FREEZE) {\n\t\t\t\tremove(button.getConfiguration());\n\t\t\t}\n\t\t}\n\t}", "void unsetProbables();", "public void negateUnxepectedTagPenalty() {\n\t\tnegateUnxepectedTagPenalty = true;\n\t}", "void unsetInterpretation();", "public void resetAll() {\n triggered = false;\n classBlacklist.clear();\n policies.clear();\n protectedFiles.clear();\n System.setSecurityManager(defaultSecurityManager);\n }", "private static void removeUnwantedPropertyValues( Set<String> allowed, Resource S, Property P ) {\n \tboolean hasLanguagedObjects = false;\n \tList<Statement> removes = new ArrayList<Statement>();\n List<Statement> plains = new ArrayList<Statement>();\n for (StmtIterator it = S.listProperties( P ); it.hasNext();) {\n \tStatement s = it.next();\n RDFNode mo = s.getObject();\n Node o = mo.asNode();\n if (isStringLiteral(o)) {\n String lang = o.getLiteralLanguage();\n if (allowed.contains( lang )) hasLanguagedObjects = true; \n else if (lang.equals( \"\" )) plains.add( s ); \n else removes.add( s );\n }\n }\n Model m = S.getModel();\n\t\tif (hasLanguagedObjects) m.remove( plains );\n m.remove( removes ); \n }", "protected void unconfigureAbilityModifiers(Ability ability) {\n int count = ability.getLimitationCount();\n for (int i = 0; i < count; i++) {\n //if ( ability.getIndexedBooleanValue(i, \"Limitation\", \"FRAMEWORKLIMITATION\") ) {\n Limitation lim = ability.getLimitation(i);\n if (lim.isAddedByFramework()) {\n ability.removeLimitation(i);\n count--;\n }\n }\n }", "void discard(T1XTemplateTag tag) {\n final int listLength = methodStatusList.size();\n MethodStatus ms = methodStatusList.get(listLength - 1);\n // ok to destroy ms.asSet\n ms.atSet.retainAll(generating);\n // throw it away if we generated advice type that was not wanted.\n if (ms.atSet.isEmpty()) {\n ms.output = false;\n // Checkstyle: resume Indentation check\n int index = listLength - 2;\n while (index >= 0) {\n ms = methodStatusList.get(index);\n if (ms.tag == null) {\n ms.output = false;\n } else if (ms.tag != tag) {\n return;\n }\n index--;\n }\n }\n }", "public void unsetContructionType()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(CONTRUCTIONTYPE$24);\r\n }\r\n }", "public void clearFilter() {\r\n\t\tignoredAttKeys.clear();\r\n\t\tignorePathKeys = false;\r\n\t}", "public void clearEvidence() {\n evidenceList.clear();\n }", "void unsetAppointmentsToIgnore();", "void unsetScoreAnalysis();", "public static void clear() {\r\n for (ConfigurationOption<?> opt : OPTIONS.values()) {\r\n opt.clear();\r\n }\r\n }", "private void removeStatement(){\n\t\tsynchronized(m_viz){\n\t\t\tTuple firstTuple;\n\t\t\tsynchronized(statementList){\n\t\t\t\tfirstTuple = statementList.getFirst();\n\t\t\t}\n\n\t\t\t// Remove action is synchronized to prevent PreFuse from drawing at the same time\n\t\t\tremoveMessage(firstTuple);\n\t\t\tm_statements.removeTuple(firstTuple);\n\t\t\tstatementList.removeFirst();\t\t\t\n\t\t}\n\t}", "@Override\n public void clearWarnings() throws SQLException {\n }", "void unsetServiceConfigurationList();", "private void clearUserPoliciesLocked(int userId) {\n final DevicePolicyData policy = getUserData(userId);\n policy.mPermissionPolicy = DevicePolicyManager.PERMISSION_POLICY_PROMPT;\n // Clear delegations.\n policy.mDelegationMap.clear();\n policy.mStatusBarDisabled = false;\n policy.mSecondaryLockscreenEnabled = false;\n policy.mUserProvisioningState = DevicePolicyManager.STATE_USER_UNMANAGED;\n policy.mAffiliationIds.clear();\n policy.mLockTaskPackages.clear();\n updateLockTaskPackagesLocked(policy.mLockTaskPackages, userId);\n policy.mLockTaskFeatures = DevicePolicyManager.LOCK_TASK_FEATURE_NONE;\n saveSettingsLocked(userId);\n\n try {\n mIPermissionManager.updatePermissionFlagsForAllApps(\n PackageManager.FLAG_PERMISSION_POLICY_FIXED,\n 0 /* flagValues */, userId);\n pushUserRestrictions(userId);\n } catch (RemoteException re) {\n // Shouldn't happen.\n }\n }", "public void performSuppression() {\n \n for (int row = 0; row < dataOutput.getNumRows(); row++) {\n if (privacyModelDefinesSubset == null || privacyModelDefinesSubset.contains(row)) {\n final int hash = dataOutput.hashCode(row);\n final int index = hash & (hashTableBuckets.length - 1);\n HashGroupifyEntry m = hashTableBuckets[index];\n while ((m != null) && ((m.hashcode != hash) || !dataOutput.equalsIgnoringOutliers(row, m.row))) {\n m = m.next;\n }\n if (m == null) {\n throw new RuntimeException(\"Invalid state! Group the data before suppressing records!\");\n }\n if (!m.isNotOutlier || this.isCompletelyGeneralized(m)) {\n dataOutput.or(row, Data.OUTLIER_MASK);\n m.isNotOutlier = false;\n }\n } else {\n dataOutput.or(row, Data.OUTLIER_MASK);\n }\n }\n }", "void clearWarnings() throws SQLException;", "public void removeContainerAndProtocolFilters()\n {\n clearConditions(CONTAINER_FIELD_KEY);\n clearConditions(PROTOCOL_FIELD_KEY);\n _dontNeedFilterContainer = true;\n }", "public void removeAllRuleRef();", "public void clearWarnings() throws SQLException {\n currentPreparedStatement.clearWarnings();\n }", "public void removeAllAnnotationTypes() {\n \t\tfConfiguredAnnotationTypes.clear();\n \t\tfAllowedAnnotationTypes.clear();\n \t\tfConfiguredHighlightAnnotationTypes.clear();\n \t\tfAllowedHighlightAnnotationTypes.clear();\n \t\tif (fTextInputListener != null) {\n \t\t\tfSourceViewer.removeTextInputListener(fTextInputListener);\n \t\t\tfTextInputListener= null;\n \t\t}\n \t}", "protected Permissions getExcludedPolicy(){\n\treturn stateIs(INSERVICE_STATE) ? this.excludedPermissions : null;\n }", "public PolicyVariables clearRuleVariablesEntries() {\n this.ruleVariables = null;\n return this;\n }", "public void reject(){\n ArrayList<User> u1 = new ArrayList<User>();\n u1.addAll(Application.getApplication().getNonValidatedUsers());\n u1.remove(this);\n\n Application.getApplication().setNonValidatedUsers(u1);\n }", "public void removeSkills()\r\n\t{\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5491, 1), false);\r\n\t\t// Cancel Gatekeeper Transformation\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(8248, 1), false);\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5656, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5657, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5658, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5659, 1), false, false);//Update by rocknow\r\n\r\n\t\tgetPlayer().setTransformAllowedSkills(EMPTY_ARRAY);\r\n\t}", "public void unsetXmlLang()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(XMLLANG$26);\n }\n }", "public static void removeAllRegisteredTemplateElements() {\n availableTemplateElements.clear();\n }", "public \n void clearWarnings() throws ResourceException;", "public void removeAllFilters() {\n fileFiltersMap.clear();\n\n // everything should be new inferred\n inferePeptides.clear();\n }", "public void removeAllInterpretedBy() {\r\n\t\tBase.removeAll(this.model, this.getResource(), INTERPRETEDBY);\r\n\t}", "public void clearRemovalTag() {\n\t levelOfRemoval = 0;\n\t}", "public void clearWarnings() throws SQLException {\n\r\n }", "public void unsetVerStmt()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(VERSTMT$22, 0);\n }\n }", "public void removeIneffectiveDeclarations()\n\t{\n\t\t_declarations.removeIf((p) -> !p.isIgnored() && !p.isEffective());\n\t}", "void removePolicyController(String name);", "@SuppressWarnings(\"unused\")\n public void removeAllListeners() {\n eventHandlerList.clear();\n }", "void removePolicyController(PolicyController controller);", "public baconhep.TTau.Builder clearRawMuonRejection() {\n fieldSetFlags()[11] = false;\n return this;\n }", "public void onPowerSaveUnwhitelisted(AppStateTracker sender) {\n updateAllJobs();\n unblockAllUnrestrictedAlarms();\n }", "public void unsetMemberTypes()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(MEMBERTYPES$2);\n }\n }", "public synchronized void removeAll() {\r\n\t\tif (trackedResources == null)\r\n\t\t\treturn;\r\n\t\tPair<IPath, IResourceChangeHandler>[] entries = (Pair<IPath, IResourceChangeHandler>[]) trackedResources.toArray(new Pair[trackedResources.size()]);\r\n\t\tfor (Pair<IPath, IResourceChangeHandler> entry : entries) {\r\n\t\t\tremoveResource(entry.first, entry.second);\r\n\t\t}\r\n\t}", "public void unsetSldAll()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SLDALL$6, 0);\n }\n }", "public void removeFromSilkBag() {\r\n silkBag.remove(0);\r\n }", "@Override\n public boolean dropConstraints() {\n return false;\n }", "void removeAllRawLicenses();", "@Override\n public void removeAllValues() {\n Map<String, ?> map = preferences.getAll();\n Iterator<String> iterator = map.keySet().iterator();\n while (iterator.hasNext()) {\n removeValue(iterator.next());\n }\n }", "public void clear()\n {\n for (final Rule rule : this.rules)\n {\n rule.clear();\n }\n\n this.rules.clear();\n }", "public com.example.DNSLog.Builder clearRejected() {\n fieldSetFlags()[19] = false;\n return this;\n }", "public void securityOff()\n {\n m_bSecurity = false;\n }", "private void clearOrgOwnedProfileOwnerDeviceWidePolicies(@UserIdInt int parentId) {\n Slogf.i(LOG_TAG, \"Cleaning up device-wide policies left over from org-owned profile...\");\n // Lockscreen message\n mLockPatternUtils.setDeviceOwnerInfo(null);\n // Wifi config lockdown\n mInjector.settingsGlobalPutInt(Global.WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN, 0);\n // Security logging\n if (mInjector.securityLogGetLoggingEnabledProperty()) {\n mSecurityLogMonitor.stop();\n mInjector.securityLogSetLoggingEnabledProperty(false);\n }\n // Network logging\n setNetworkLoggingActiveInternal(false);\n\n // System update policy.\n final boolean hasSystemUpdatePolicy;\n synchronized (getLockObject()) {\n hasSystemUpdatePolicy = mOwners.getSystemUpdatePolicy() != null;\n if (hasSystemUpdatePolicy) {\n mOwners.clearSystemUpdatePolicy();\n mOwners.writeDeviceOwner();\n }\n }\n if (hasSystemUpdatePolicy) {\n mContext.sendBroadcastAsUser(\n new Intent(ACTION_SYSTEM_UPDATE_POLICY_CHANGED), UserHandle.SYSTEM);\n }\n\n // Unsuspend personal apps if needed.\n suspendPersonalAppsInternal(parentId, false);\n\n // Notify FRP agent, LSS and WindowManager to ensure they don't hold on to stale policies.\n final int frpAgentUid = getFrpManagementAgentUid();\n if (frpAgentUid > 0) {\n notifyResetProtectionPolicyChanged(frpAgentUid);\n }\n mLockSettingsInternal.refreshStrongAuthTimeout(parentId);\n\n Slogf.i(LOG_TAG, \"Cleaning up device-wide policies done.\");\n }", "public void removeAllPaymentURL() {\r\n\t\tBase.removeAll(this.model, this.getResource(), PAYMENTURL);\r\n\t}", "public void unsetAntEfficiency() {\n this.antEfficiency = null;\n }", "public void clearStatement() {\n // Only clear the statement if it is an expression query, otherwise the statement may still be needed.\n if (isExpressionQueryMechanism()) {\n setSQLStatement(null);\n setSQLStatements(null);\n }\n }", "public void unsetPrf()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(PRF$26, 0);\r\n }\r\n }", "public void setConditionalPolicies (Vector conditionalPolicies)\n {\n openTransaction();\n Iterator it = query(conditionalPolicyMsgPredicate).iterator();\n while (it.hasNext()) {\n publishRemove(it.next());\n }\n \n // add new ConditionalPolicyMsgs\n for (int i=0; i<conditionalPolicies.size(); i++) {\n ConditionalPolicyMsg condPol = (ConditionalPolicyMsg) conditionalPolicies.elementAt(i);\n UnexpandedConditionalPolicyMsg ucpm = new UnexpandedConditionalPolicyMsg(condPol);\n publishAdd(ucpm);\n }\n closeTransaction();\n }", "void unsetAppliesPeriod();", "void unsetObjectives();", "public void removeAllActionBlocks() {\n List<AccountingLineViewField> fieldsToRemove = new ArrayList<AccountingLineViewField>();\n for (AccountingLineViewField field : fields) {\n if (field.isActionBlock()) {\n fieldsToRemove.add(field);\n } else {\n field.removeAllActionBlocks();\n }\n }\n fields.removeAll(fieldsToRemove);\n }", "@ZAttr(id=1073)\n public Map<String,Object> unsetPrefSpellIgnoreWord(Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraPrefSpellIgnoreWord, \"\");\n return attrs;\n }", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (ScienceAppExecute scienceAppExecute : findAll()) {\n\t\t\tremove(scienceAppExecute);\n\t\t}\n\t}", "public void clearPolymorphismSite() {\n // Override in proxy if lazily loaded; otherwise does nothing\n }", "private void removePolicyFile(boolean granted){\n\tString fileName = getPolicyFileName(granted);\n\tFile f = new File(fileName);\n\tif(f.exists()){\n\t if (!f.delete()) {\n String defMsg = \"Failure removing policy file: \"+fileName; \n String msg=localStrings.getLocalString(\"pc.file_delete_error\", defMsg,new Object []{ fileName} );\n\t\tlogger.log(Level.SEVERE,msg);\n\t\tthrow new RuntimeException(defMsg);\n\t } else if(logger.isLoggable(Level.FINE)){\n\t\tlogger.fine(\"JACC Policy Provider: Policy file removed: \"+fileName);\n\t }\n\t}\n }", "public void removeAllRatioListeners()\r\n {\r\n ratioListeners.clear();\r\n }", "@Override\n\tpublic void removeAll() {\n\t\tfor (PhatVay phatVay : findAll()) {\n\t\t\tremove(phatVay);\n\t\t}\n\t}", "@Override\r\n\tpublic void deletePolicy(Integer pid) {\n\t\tdao.deletePolicy(pid);\r\n\t\t\r\n\t}", "@ZAttr(id=1073)\n public void unsetPrefSpellIgnoreWord() throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraPrefSpellIgnoreWord, \"\");\n getProvisioning().modifyAttrs(this, attrs);\n }", "public static void unsetWeblogicProtocolHandler()\n {\n if ( \"weblogic.utils\".equals(System.getProperty(\"java.protocol.handler.pkgs\") ) )\n {\n System.clearProperty( \"java.protocol.handler.pkgs\" );\n }\n }", "public void disableStatement(ESqlStatementType sqltype){\r\n for(int i=this.enabledStatements.size()-1;i>=0;i--){\r\n if (this.enabledStatements.get(i) == sqltype){\r\n this.enabledStatements.remove(i);\r\n }\r\n }\r\n }", "public void unsetIsComparation()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(ISCOMPARATION$2);\n }\n }", "public void clearPolymorphismType() {\n // Override in proxy if lazily loaded; otherwise does nothing\n }", "@Override\n public void purgeFlows() {\n setOfFlowsToAdd.clear();\n setOfFlowsToDelete.clear();\n }", "private void deleteAttacks(){\n while(!attacksToDelete.isEmpty()){\n attacks.remove(attacksToDelete.remove());\n }\n }", "@Override\n\tpublic void removeAll() {\n\t\tfor (UserStatistics userStatistics : findAll()) {\n\t\t\tremove(userStatistics);\n\t\t}\n\t}" ]
[ "0.6625087", "0.652838", "0.58711755", "0.5609224", "0.5609224", "0.5444998", "0.5394449", "0.5389656", "0.5389656", "0.5389656", "0.5275579", "0.52260476", "0.52219194", "0.5219346", "0.51223445", "0.5100713", "0.50829864", "0.5060322", "0.5015812", "0.50124", "0.49785826", "0.49763623", "0.49719375", "0.49664566", "0.49547565", "0.49503374", "0.49422094", "0.49018326", "0.48815045", "0.48769686", "0.48643553", "0.4858685", "0.48563308", "0.48371336", "0.4834942", "0.48294702", "0.48036712", "0.4803019", "0.47990006", "0.4790693", "0.476988", "0.47698316", "0.47525442", "0.47518027", "0.47485304", "0.4745307", "0.4743558", "0.4742937", "0.47355807", "0.47350124", "0.47283554", "0.47222582", "0.46937904", "0.46840933", "0.46806055", "0.46604788", "0.46567366", "0.46403873", "0.46224865", "0.4620549", "0.46058425", "0.460048", "0.4592979", "0.4591968", "0.45880675", "0.45877033", "0.45780012", "0.45774078", "0.45770708", "0.45759818", "0.45667472", "0.45614386", "0.45590946", "0.45537704", "0.45494333", "0.45492873", "0.45481315", "0.45433182", "0.45416936", "0.45403773", "0.45393118", "0.45376047", "0.45303217", "0.4525122", "0.45164928", "0.45106402", "0.45084998", "0.44926322", "0.4489419", "0.44890434", "0.4483487", "0.44792032", "0.4474482", "0.44728446", "0.44726375", "0.44721657", "0.44692272", "0.4460829", "0.4457723", "0.44545573" ]
0.7252007
0
Used to remove any excluded policy statements from this PolicyConfiguration.
public void removeExcludedPolicy() throws PolicyContextException{ assertStateIsOpen(); checkSetPolicyPermission(); if (excludedPermissions != null) { excludedPermissions = null; writeOnCommit = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "protected Permissions getExcludedPolicy(){\n\treturn stateIs(INSERVICE_STATE) ? this.excludedPermissions : null;\n }", "void clearPolicy() {\n policy = new Policy();\n }", "public void removeUncheckedPolicy()\n\tthrows PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\t\n\n\tif (uncheckedPermissions != null) {\n\t uncheckedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "public void removeAllConditions()\r\n\t{\r\n\t\tconditions.clear();\r\n\t}", "public void negateUnxepectedTagPenalty() {\n\t\tnegateUnxepectedTagPenalty = true;\n\t}", "public void suppress() {\r\n\t\tsuppressed = true;\r\n\t}", "public void suppress() {\r\n\t\tsuppressed = true;\r\n\t}", "private void removeStatement(){\n\t\tsynchronized(m_viz){\n\t\t\tTuple firstTuple;\n\t\t\tsynchronized(statementList){\n\t\t\t\tfirstTuple = statementList.getFirst();\n\t\t\t}\n\n\t\t\t// Remove action is synchronized to prevent PreFuse from drawing at the same time\n\t\t\tremoveMessage(firstTuple);\n\t\t\tm_statements.removeTuple(firstTuple);\n\t\t\tstatementList.removeFirst();\t\t\t\n\t\t}\n\t}", "public void setExcludes(String excludes)\n {\n this.excludes = excludes;\n }", "private static void removeUnwantedPropertyValues( Set<String> allowed, Resource S, Property P ) {\n \tboolean hasLanguagedObjects = false;\n \tList<Statement> removes = new ArrayList<Statement>();\n List<Statement> plains = new ArrayList<Statement>();\n for (StmtIterator it = S.listProperties( P ); it.hasNext();) {\n \tStatement s = it.next();\n RDFNode mo = s.getObject();\n Node o = mo.asNode();\n if (isStringLiteral(o)) {\n String lang = o.getLiteralLanguage();\n if (allowed.contains( lang )) hasLanguagedObjects = true; \n else if (lang.equals( \"\" )) plains.add( s ); \n else removes.add( s );\n }\n }\n Model m = S.getModel();\n\t\tif (hasLanguagedObjects) m.remove( plains );\n m.remove( removes ); \n }", "protected void unconfigureAbilityModifiers(Ability ability) {\n int count = ability.getLimitationCount();\n for (int i = 0; i < count; i++) {\n //if ( ability.getIndexedBooleanValue(i, \"Limitation\", \"FRAMEWORKLIMITATION\") ) {\n Limitation lim = ability.getLimitation(i);\n if (lim.isAddedByFramework()) {\n ability.removeLimitation(i);\n count--;\n }\n }\n }", "public void removeIneffectiveDeclarations()\n\t{\n\t\t_declarations.removeIf((p) -> !p.isIgnored() && !p.isEffective());\n\t}", "public final void mEXCLUDING() throws RecognitionException {\n try {\n int _type = EXCLUDING;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2829:3: ( 'excluding' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2830:3: 'excluding'\n {\n match(\"excluding\"); if (state.failed) return ;\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public ExecutionPolicy not()\n\t{\n\t\treturn new NotRule(this);\n\t}", "void unsetAppointmentsToIgnore();", "public void setExcludes( List<ExcludeClasses> excludes )\n {\n this.excludes = excludes;\n }", "public void setEXCLUDE_PROFIT_AMOUNT(BigDecimal EXCLUDE_PROFIT_AMOUNT) {\r\n this.EXCLUDE_PROFIT_AMOUNT = EXCLUDE_PROFIT_AMOUNT;\r\n }", "public void excludedValues(BooleanExpression excluded) {\n\t\tthis.setOperator(new DBPermittedValuesOperator(excluded));\n\t\tnegateOperator();\n\t}", "void unregister(String policyId);", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "void removePolicyController(String name);", "public PolicyVariables clearRuleVariablesEntries() {\n this.ruleVariables = null;\n return this;\n }", "public static void removeRestrictions() {\n\t\ttry {\n\t\t\tClass<?> jceSecurityClass = Class.forName(\"javax.crypto.JceSecurity\");\n\t\t\tClass<?> cryptoPermissionsClass = Class.forName(\"javax.crypto.CryptoPermissions\");\n\t\t\tClass<?> cryptoAllPermissionClass = Class.forName(\"javax.crypto.CryptoAllPermission\");\n\n\t\t\tField isRestrictedField = jceSecurityClass.getDeclaredField(\"isRestricted\");\n\t\t\tisRestrictedField.setAccessible(true);\n\t\t\tisRestrictedField.set(null, false);\n\n\t\t\tField defaultPolicyField = jceSecurityClass.getDeclaredField(\"defaultPolicy\");\n\t\t\tdefaultPolicyField.setAccessible(true);\n\t\t\tPermissionCollection defaultPolicy = (PermissionCollection) defaultPolicyField.get(null);\n\n\t\t\tField permsField = cryptoPermissionsClass.getDeclaredField(\"perms\");\n\t\t\tpermsField.setAccessible(true);\n\t\t\t((Map<?, ?>) permsField.get(defaultPolicy)).clear();\n\n\t\t\tField cryptoAllPermissionInstanceField = cryptoAllPermissionClass.getDeclaredField(\"INSTANCE\");\n\t\t\tcryptoAllPermissionInstanceField.setAccessible(true);\n\t\t\tdefaultPolicy.add((Permission) cryptoAllPermissionInstanceField.get(null));\n\t\t} catch (Exception e) {\n\t\t\t// ignore\n\t\t}\n }", "@Override\n public ResponseEntity<PdpGroupDeployResponse> deletePolicy(String policyName, UUID requestId) {\n return doUndeployOperation(requestId,\n () -> provider.undeploy(new ToscaConceptIdentifierOptVersion(policyName, null), getPrincipal()));\n }", "public List<ExcludeClasses> getExcludes()\n {\n return excludes;\n }", "public void clearThawed() {\n\t\t// Avoid concurrent modification exceptions.\n\t\tfinal ArrayList<ConfigurationButton> list = new ArrayList<>();\n\t\tlist.addAll(configurationToButtonMap.values());\n\t\tfinal Iterator<ConfigurationButton> it = list.iterator();\n\n\t\twhile (it.hasNext()) {\n\t\t\tfinal ConfigurationButton button = it.next();\n\t\t\tif (button.state != ConfigurationButton.FREEZE) {\n\t\t\t\tremove(button.getConfiguration());\n\t\t\t}\n\t\t}\n\t}", "public void performSuppression() {\n \n for (int row = 0; row < dataOutput.getNumRows(); row++) {\n if (privacyModelDefinesSubset == null || privacyModelDefinesSubset.contains(row)) {\n final int hash = dataOutput.hashCode(row);\n final int index = hash & (hashTableBuckets.length - 1);\n HashGroupifyEntry m = hashTableBuckets[index];\n while ((m != null) && ((m.hashcode != hash) || !dataOutput.equalsIgnoringOutliers(row, m.row))) {\n m = m.next;\n }\n if (m == null) {\n throw new RuntimeException(\"Invalid state! Group the data before suppressing records!\");\n }\n if (!m.isNotOutlier || this.isCompletelyGeneralized(m)) {\n dataOutput.or(row, Data.OUTLIER_MASK);\n m.isNotOutlier = false;\n }\n } else {\n dataOutput.or(row, Data.OUTLIER_MASK);\n }\n }\n }", "public void removeAllPaymentURL() {\r\n\t\tBase.removeAll(this.model, this.getResource(), PAYMENTURL);\r\n\t}", "void unsetServiceConfigurationList();", "public void excludedValues(Boolean excluded) {\n\t\tthis.setOperator(new DBPermittedValuesOperator(excluded));\n\t\tnegateOperator();\n\t}", "public void clearFinal() {\n\t\t// Avoid concurrent modification exceptions.\n\t\tfinal ArrayList<ConfigurationButton> list = new ArrayList<>();\n\t\tlist.addAll(configurationToButtonMap.values());\n\t\tfinal Iterator<ConfigurationButton> it = list.iterator();\n\n\t\twhile (it.hasNext()) {\n\t\t\tfinal ConfigurationButton button = it.next();\n\t\t\tif (button.state == ConfigurationButton.ACCEPT || button.state == ConfigurationButton.REJECT) {\n\t\t\t\tremove(button.getConfiguration());\n\t\t\t}\n\t\t}\n\t}", "public Builder clearIncludedPermissions() {\n includedPermissions_ = com.google.protobuf.LazyStringArrayList.emptyList();\n bitField0_ = (bitField0_ & ~0x00000008);\n ;\n onChanged();\n return this;\n }", "public void preRemove(Configuration configuration) {\r\n preRemove();\r\n\r\n }", "public void removeAllComments() {\r\n\t\tBase.removeAll(this.model, this.getResource(), COMMENTS);\r\n\t}", "public void removeAllInterpretedBy() {\r\n\t\tBase.removeAll(this.model, this.getResource(), INTERPRETEDBY);\r\n\t}", "public void removeContainerAndProtocolFilters()\n {\n clearConditions(CONTAINER_FIELD_KEY);\n clearConditions(PROTOCOL_FIELD_KEY);\n _dontNeedFilterContainer = true;\n }", "public java.util.List<ExcludedRule> getExcludedRules() {\n return excludedRules;\n }", "public void unsetRules()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(RULES$26);\n }\n }", "public void setExcludeList(List<WafExcludeListEntry> excludeList) {\n this.excludeList = excludeList;\n }", "AgentPolicyBuilder clear();", "public void setExcludedRules(java.util.Collection<ExcludedRule> excludedRules) {\n if (excludedRules == null) {\n this.excludedRules = null;\n return;\n }\n\n this.excludedRules = new java.util.ArrayList<ExcludedRule>(excludedRules);\n }", "public void setExcludedPattern(String excludedPattern)\n/* */ {\n/* 101 */ setExcludedPatterns(new String[] { excludedPattern });\n/* */ }", "public StringConf exclude(String value) { \n excludes.add(value); \n return this;\n }", "void removePolicyController(PolicyController controller);", "public String[] getExcludes()\n {\n return m_excludes;\n }", "private void excludeFromWarPackaging() {\n getLog().info(\"excludeFromWarPackaging\");\n String pluginGroupId = \"org.apache.maven.plugins\";\n String pluginArtifactId = \"maven-war-plugin\";\n if (project.getBuildPlugins() != null) {\n for (Object o : project.getBuildPlugins()) {\n Plugin plugin = (Plugin) o;\n\n if (pluginGroupId.equals(plugin.getGroupId()) && pluginArtifactId.equals(plugin.getArtifactId())) {\n Xpp3Dom dom = (Xpp3Dom) plugin.getConfiguration();\n if (dom == null) {\n dom = new Xpp3Dom(\"configuration\");\n plugin.setConfiguration(dom);\n }\n Xpp3Dom excludes = dom.getChild(\"packagingExcludes\");\n if (excludes == null) {\n excludes = new Xpp3Dom(\"packagingExcludes\");\n dom.addChild(excludes);\n excludes.setValue(\"\");\n } else if (excludes.getValue().trim().length() > 0) {\n excludes.setValue(excludes.getValue() + \",\");\n }\n\n Set<Artifact> dependencies = getArtifacts();\n getLog().debug(\"Size of getArtifacts: \" + dependencies.size());\n String additionalExcludes = \"\";\n for (Artifact dependency : dependencies) {\n getLog().debug(\"Dependency: \" + dependency.getGroupId() + \":\" + dependency.getArtifactId() + \"type: \" + dependency.getType());\n if (!dependency.isOptional() && Types.JANGAROO_TYPE.equals(dependency.getType())) {\n getLog().debug(\"Excluding jangaroo dependency form war plugin [\" + dependency.toString() + \"]\");\n // Add two excludes. The first one is effective when no name clash occurs\n additionalExcludes += \"WEB-INF\" + File.separator + \"lib\" + File.separator + dependency.getArtifactId() + \"-\" + dependency.getVersion() + \".jar,\";\n // the second when a name clash occurs (artifact will hav groupId prepended before copying it into the lib dir)\n additionalExcludes += \"WEB-INF\" + File.separator + \"lib\" + File.separator + dependency.getGroupId() + \"-\" + dependency.getArtifactId() + \"-\" + dependency.getVersion() + \".jar,\";\n }\n }\n excludes.setValue(excludes.getValue() + additionalExcludes);\n }\n }\n }\n }", "@Override\n\tpublic void suppress() {\n\n\t}", "public SecurityHandler skipAudit() {\n return builder(this).audit(false).build();\n }", "public void removeFromPolicyTransactions(entity.AppCritPolicyTransaction element);", "void unsetAppliesPeriod();", "public void setExcludeUrls(String[] excludeUrls) {\n this.excludeUrls = excludeUrls;\n }", "void discard(T1XTemplateTag tag) {\n final int listLength = methodStatusList.size();\n MethodStatus ms = methodStatusList.get(listLength - 1);\n // ok to destroy ms.asSet\n ms.atSet.retainAll(generating);\n // throw it away if we generated advice type that was not wanted.\n if (ms.atSet.isEmpty()) {\n ms.output = false;\n // Checkstyle: resume Indentation check\n int index = listLength - 2;\n while (index >= 0) {\n ms = methodStatusList.get(index);\n if (ms.tag == null) {\n ms.output = false;\n } else if (ms.tag != tag) {\n return;\n }\n index--;\n }\n }\n }", "public void pruneCooldowns() {\n HashMap<String, Long> cooldownsTempList = new HashMap<>();\n cooldownsList.keySet().forEach(key -> {\n long timeRemaining = cooldownDuration - (System.currentTimeMillis() - cooldownsList.get(key));\n if(timeRemaining > 0) {\n cooldownsTempList.put(key, cooldownsList.get(key));\n }\n });\n cooldownsList.clear();\n cooldownsList.putAll(cooldownsTempList);\n }", "@Override\n\tpublic String[] OnExclusions() {\n\t\treturn new String[] {\"sqlid\", \"item\"};\n\t}", "public DeleteNamespacedConfiguration propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "public void removeAllActionBlocks() {\n List<AccountingLineViewField> fieldsToRemove = new ArrayList<AccountingLineViewField>();\n for (AccountingLineViewField field : fields) {\n if (field.isActionBlock()) {\n fieldsToRemove.add(field);\n } else {\n field.removeAllActionBlocks();\n }\n }\n fields.removeAll(fieldsToRemove);\n }", "public DeleteInfrastructure propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "public void removeAllFilters() {\n fileFiltersMap.clear();\n\n // everything should be new inferred\n inferePeptides.clear();\n }", "public void setNewExcludedExtensions(List<String> excludedExtenions) {\n\t\tthis.filter = new Filter(excludedExtenions);\n\t}", "StatementChain not(ProfileStatement... statements);", "@Nonnull protected Predicate<String> getIncludeExcludePredicate(@Nonnull final CriteriaSet criteria) {\n final EncryptionConfigurationCriterion criterion = criteria.get(EncryptionConfigurationCriterion.class);\n assert criterion != null;\n\n return resolveIncludeExcludePredicate(criteria, criterion.getConfigurations());\n }", "public Builder clearDisabledReason() {\n disabledReason_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x08000000);\n onChanged();\n return this;\n }", "public void removeAllAlarms() {\n synchronized (mLock) {\n mAlarmPriorityQueue.clear();\n setNextAlarmLocked(0);\n }\n }", "@Test public void excludeWithoutInclude() throws Exception {\n Schema schema = new RepoBuilder()\n .add(\"service.proto\", \"\"\n + \"message MessageA {\\n\"\n + \" optional string b = 1;\\n\"\n + \" optional string c = 2;\\n\"\n + \"}\\n\")\n .schema();\n Schema pruned = schema.prune(new IdentifierSet.Builder()\n .exclude(\"MessageA#c\")\n .build());\n assertThat(((MessageType) pruned.getType(\"MessageA\")).field(\"b\")).isNotNull();\n assertThat(((MessageType) pruned.getType(\"MessageA\")).field(\"c\")).isNull();\n }", "void removeStatement(Statement statement) throws ModelRuntimeException;", "public void disableStatement(ESqlStatementType sqltype){\r\n for(int i=this.enabledStatements.size()-1;i>=0;i--){\r\n if (this.enabledStatements.get(i) == sqltype){\r\n this.enabledStatements.remove(i);\r\n }\r\n }\r\n }", "public void delete() {\n mapping.getFieldOrFieldExclude().remove(field);\n }", "public void clearFilter() {\r\n\t\tignoredAttKeys.clear();\r\n\t\tignorePathKeys = false;\r\n\t}", "public void reject(){\n ArrayList<User> u1 = new ArrayList<User>();\n u1.addAll(Application.getApplication().getNonValidatedUsers());\n u1.remove(this);\n\n Application.getApplication().setNonValidatedUsers(u1);\n }", "public String getPolicy() {\r\n String policy = \"\";\r\n if (!policyRules.isEmpty()) {\r\n policy += policyRules.get(0).getRule().trim();\r\n for (int i = 1; i < policyRules.size(); i++) {\r\n policy += \",\" + policyRules.get(i).getRule().trim();\r\n }\r\n }\r\n\r\n return policy.trim();\r\n }", "public void removeSkills()\r\n\t{\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5491, 1), false);\r\n\t\t// Cancel Gatekeeper Transformation\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(8248, 1), false);\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5656, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5657, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5658, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5659, 1), false, false);//Update by rocknow\r\n\r\n\t\tgetPlayer().setTransformAllowedSkills(EMPTY_ARRAY);\r\n\t}", "void unsetComments();", "public void setExcludes( String[] excludes )\n {\n if( excludes == null )\n {\n this.excludes = null;\n }\n else\n {\n this.excludes = new String[ excludes.length ];\n for( int i = 0; i < excludes.length; i++ )\n {\n String pattern;\n pattern = excludes[ i ].replace( '/', File.separatorChar ).replace( '\\\\', File.separatorChar );\n if( pattern.endsWith( File.separator ) )\n {\n pattern += \"**\";\n }\n this.excludes[ i ] = pattern;\n }\n }\n }", "public void setExcludedQualifiers(String excludedQualifiers) {\r\n this.excludedQualifiers = excludedQualifiers;\r\n }", "public Set getExcludeMethods() {\n return mExcludeMethods;\n }", "public Builder clearMissingStatement() {\n \n missingStatement_ = false;\n onChanged();\n return this;\n }", "public Builder clearMissingStatement() {\n \n missingStatement_ = false;\n onChanged();\n return this;\n }", "public Builder clearMissingStatement() {\n \n missingStatement_ = false;\n onChanged();\n return this;\n }", "public Builder clearMissingStatement() {\n \n missingStatement_ = false;\n onChanged();\n return this;\n }", "public void removeEPN() {\r\n\r\n\t\tfor (EPStatement statement : epnStatements) {\r\n\t\t\tstatement.destroy();\r\n\t\t}\r\n\r\n\t}", "@Bean\n\t\tpublic IntegrationFlow discardFlow() {\n\t\t\treturn IntegrationFlows.from(sourceDirectory(), \n\t\t\t\t\tc -> c.poller(Pollers.fixedDelay(1000)))\n\t\t\t\t\t.filter(onlyTxt(),\n\t\t\t\t\t\t\tnotTxt -> notTxt\n\t\t\t\t\t\t\t.discardFlow(flow -> flow\n\t\t\t\t\t\t\t\t\t.filter(onlyXml(),\n\t\t\t\t\t\t\t\t\t\t\tnotXml -> notXml\n\t\t\t\t\t\t\t\t\t\t\t.discardChannel(sqlSource()))\n\t\t\t\t\t\t\t\t\t.channel(xmlSource())))\n\t\t\t\t\t.channel(txtSource())\n\t\t\t\t\t.get();\t\n\t\t}", "public List<WafExcludeListEntry> getExcludeList() {\n return excludeList;\n }", "public SamFilterParamsBuilder excludeUnmated(final boolean val) {\n mExcludeUnmated = val;\n return this;\n }", "protected void discardExtraAccommodationOfferings(final List<String> returnedAccommodationOfferings,\n\t\t\tfinal List<PropertyData> properties)\n\t{\n\t\tfinal List<String> propertyCodes = properties.stream()\n\t\t\t\t.map(PropertyData::getAccommodationOfferingCode).collect(Collectors.toList());\n\n\t\tfinal Collection<String> propertyCodeIntersection = CollectionUtils.intersection(propertyCodes, returnedAccommodationOfferings);\n\n\t\tfinal List<PropertyData> accommodationOfferingToRemove = properties.stream().filter(\n\t\t\t\taccommodationOffering -> BooleanUtils.isNotTrue(accommodationOffering.isIgnoreRules()) && !propertyCodeIntersection\n\t\t\t\t\t\t.contains(accommodationOffering.getAccommodationOfferingCode())).collect(Collectors.toList());\n\t\tproperties.removeAll(accommodationOfferingToRemove);\n\t}", "public final GetHTTP removeRedirectCookiePolicy() {\n properties.remove(REDIRECT_COOKIE_POLICY_PROPERTY);\n return this;\n }", "public void discardLastWeight() {\n this.weights.remove(this.weights.size() - 1);\n // meanwhile flip the accepting flag\n acceptWeight = true;\n }", "public AdverseReactionsImpl(Coded exclusionStatement) {\n super(exclusionStatement);\n }", "public void doElimination() {\n IR ir;\n\tIR defCode;\n\tIR useCode;\n int i, j, countOperand;\n JavaVariable v1, v2;\n short shortOpcode;\n short shortOpcode2;\n boolean singleDefCondition;\n BitSet[] reachingDef = cfg.getReachingDef();\n\n Iterator it = cfg.iterator();\n\twhile(it.hasNext()) {\n ir = (IR) it.next();\n //System.out.println(ir);\n countOperand = ir.getNumOfOperands();\n if (ir.hasAttribute(IRAttribute.ELIMINATED)) {\n // Removed code can't remove other code\n continue; \n }\n // eliminate single def. single use. (aload)\n for (i = 0; i < countOperand; i++) {\n if (ir.getNumOfDefs(i) ==1 && ir.getShortOpcode() != OpcodeConst.opc_areturn) { // single def\n defCode = cfg.getIRAtBpc (ir.getDefOfOperand(i, 0));\n if (defCode.hasAttribute(IRAttribute.ELIMINATED)) {\n // Eliminated code can't remove other codes\n continue;\n } \n\t shortOpcode= defCode.getShortOpcode();\n if (shortOpcode == OpcodeConst.opc_aload ||\n (shortOpcode >= OpcodeConst.opc_aload_0 && shortOpcode <= OpcodeConst.opc_aload_3)) {\n singleDefCondition = false;\n for (j = 0; j < defCode.getNumOfUses(0); j++) {\n singleDefCondition = true;\n // if the def is the only def for every the uses it can reach\n useCode = cfg.getIRAtBpc(defCode.getUseOfTarget(0, j));\n if (useCode.getNumOfDefs(defCode.getTarget(0)) != 1) {\n singleDefCondition = false;\n break;\n }\n if (cfg.getIRAtBpc(useCode.getDefOfOperand(defCode.getTarget(0), 0)).compareTo(defCode) != 0) {\n singleDefCondition = false;\n break;\n }\n // For dup\n // The Reaching Def of the operand of the copy and the Reaching Def of the operand of the useCode\n // should be the same.\n int reachToCopyCode, reachToUseCode;\n reachToCopyCode = getUniqueReachOfVariable(reachingDef[defCode.getBpc()], defCode.getOperand(0));\n reachToUseCode = getUniqueReachOfVariable(reachingDef[useCode.getBpc()], defCode.getOperand(0));\n if (reachToCopyCode != reachToUseCode) {\n singleDefCondition = false;\n break;\n }\n }\n if (singleDefCondition == true) {\n for (j = 0; j < defCode.getNumOfUses(0); j++) {\n useCode = cfg.getIRAtBpc(defCode.getUseOfTarget(0, j));\n if (useCode.hasAttribute(IRAttribute.ELIMINATED) \n /*|| defCode.hasAttribute(IRAttribute.ELIMINATED)*/) {\n continue;\n }\n //System.out.println(\"useCode:\" + useCode + \" defCode:\" + defCode);\n //System.out.println(\"Try to change usecode's operand from \" + defCode.getTarget(0) +\n // \" to \" + defCode.getOperand(0));\n useCode.changeOperand(defCode.getTarget(0), defCode.getOperand(0));\n defCode.setAttribute(IRAttribute.ELIMINATED);\n defCode.addDebugInfoString(\"Eliminated by BPC:\" + ir.getBpc());\n }\n }\n }\n }\n }\n\n // elimination of single use. single def. (astore)\n if (ir.getNumOfTargets() == 1) {\n if (ir.getNumOfUses(0) == 1) {\n v1 = ir.getTarget(0);\n useCode = cfg.getIRAtBpc(ir.getUseOfTarget(0, 0));\n if (useCode.hasAttribute(IRAttribute.ELIMINATED)) {\n // Removed code can't remove other code\n continue; \n }\n countOperand = useCode.getNumOfOperands();\n for (i = 0; i < countOperand; i++) {\n v2 = useCode.getOperand(i);\n if ((v1.compareTo(v2) == 0) && (useCode.getNumOfDefs(i) == 1)) {\n\t //shortOpcode=CFG.makeShortVal((byte)0,useCode.getBytecode().getOpcode());\n shortOpcode = useCode.getShortOpcode();\n if (shortOpcode == OpcodeConst.opc_astore\n || (shortOpcode >= OpcodeConst.opc_astore_0 && shortOpcode <= OpcodeConst.opc_astore_3)) {\n //System.out.println(useCode + \" can be absorbed by \" + ir);\n // 1. substitute the target of bytecode for the target of astore.\n ir.changeTarget(0, useCode.getTarget(0));\n // 2. and remove the astore operation\n useCode.setAttribute(IRAttribute.ELIMINATED);\n useCode.addDebugInfoString(\"Eliminated by BPC:\" + ir.getBpc());\n }\n }\n }\n }\n } \n }\n\n }", "public void addDefaultExcludes()\n {\n int excludesLength = excludes == null ? 0 : excludes.length;\n String[] newExcludes;\n newExcludes = new String[ excludesLength + DEFAULTEXCLUDES.length ];\n if( excludesLength > 0 )\n {\n System.arraycopy( excludes, 0, newExcludes, 0, excludesLength );\n }\n for( int i = 0; i < DEFAULTEXCLUDES.length; i++ )\n {\n newExcludes[ i + excludesLength ] = DEFAULTEXCLUDES[ i ].replace( '/', File.separatorChar ).replace( '\\\\', File.separatorChar );\n }\n excludes = newExcludes;\n }", "public boolean excludeUnmated() {\n return mExcludeUnmated;\n }", "private void removePolicyFile(boolean granted){\n\tString fileName = getPolicyFileName(granted);\n\tFile f = new File(fileName);\n\tif(f.exists()){\n\t if (!f.delete()) {\n String defMsg = \"Failure removing policy file: \"+fileName; \n String msg=localStrings.getLocalString(\"pc.file_delete_error\", defMsg,new Object []{ fileName} );\n\t\tlogger.log(Level.SEVERE,msg);\n\t\tthrow new RuntimeException(defMsg);\n\t } else if(logger.isLoggable(Level.FINE)){\n\t\tlogger.fine(\"JACC Policy Provider: Policy file removed: \"+fileName);\n\t }\n\t}\n }", "public void prune() {\n this.getTree().prune();\n }", "@Override\n public Response throttlingPoliciesApplicationPolicyIdDelete(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy existingPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n if (apiProvider.hasAttachments(username, existingPolicy.getPolicyName(),\n PolicyConstants.POLICY_LEVEL_APP)) {\n String message = \"Policy \" + policyId + \" already attached to an application\";\n log.error(message);\n throw new APIManagementException(message);\n }\n apiProvider.deletePolicy(username, PolicyConstants.POLICY_LEVEL_APP, existingPolicy.getPolicyName());\n return Response.ok().build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while deleting Application level policy : \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "public Builder clearOwnStatement() {\n \n ownStatement_ = false;\n onChanged();\n return this;\n }", "protected void createIgnoreAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/2007/ImpactAnalysis/Ignore\";\t\n\t\taddAnnotation\n\t\t (architectureAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceImplementationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceUseEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (providedInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (requiredInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (actorCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\n\t}", "public DeleteOAuth propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "public void unsetRequires()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(REQUIRES$28);\r\n }\r\n }" ]
[ "0.61639076", "0.5693763", "0.55316305", "0.5452113", "0.5451786", "0.5076334", "0.50254047", "0.50254047", "0.4959095", "0.49585602", "0.4958545", "0.49279064", "0.4914757", "0.48842147", "0.48663098", "0.48332813", "0.48214936", "0.47981176", "0.47247025", "0.46891052", "0.46887338", "0.46887338", "0.46887338", "0.4684126", "0.4657769", "0.4654258", "0.46492767", "0.46396458", "0.46345997", "0.4619762", "0.46176597", "0.4609691", "0.4603784", "0.45945412", "0.4592708", "0.4590796", "0.45852014", "0.45818385", "0.45768216", "0.45707938", "0.4569354", "0.4566594", "0.45597988", "0.4555263", "0.4548114", "0.454138", "0.45343027", "0.4527893", "0.45166656", "0.45140538", "0.45013708", "0.44910762", "0.44716397", "0.44696504", "0.44588724", "0.44331878", "0.44318748", "0.44294426", "0.4428425", "0.44200438", "0.44142783", "0.4410392", "0.44071147", "0.4402856", "0.4400552", "0.43946373", "0.43851542", "0.437929", "0.43792713", "0.43780798", "0.43661612", "0.43653563", "0.43622175", "0.43620828", "0.4361055", "0.4358259", "0.43540213", "0.43490362", "0.43305886", "0.43305886", "0.43305886", "0.43305886", "0.43296632", "0.43295038", "0.43293914", "0.43272567", "0.4327144", "0.4326446", "0.43158448", "0.4310302", "0.43084008", "0.43004817", "0.4283588", "0.42823812", "0.4280912", "0.4275262", "0.42728662", "0.42705354", "0.42686534", "0.42648897" ]
0.7172936
0
This method is used to set to "inService" the state of the policy context whose interface is this PolicyConfiguration Object. Only those policy contexts whose state is "inService" will be included in the policy contexts processed by the Policy.refresh method. A policy context whose state is "inService" may be returned to the "open" state by calling the getPolicyConfiguration method of the PolicyConfiguration factory with the policy context identifier of the policy context. When the state of a policy context is "inService", calling any method other than commit, delete, getContextID, or inService on its PolicyConfiguration Object will cause an UnsupportedOperationException to be thrown.
public void commit() throws PolicyContextException{ synchronized(refreshLock) { if(stateIs(DELETED_STATE)){ String defMsg="Cannot perform Operation on a deleted PolicyConfiguration"; String msg=localStrings.getLocalString("pc.invalid_op_for_state_delete",defMsg); logger.log(Level.WARNING,msg); throw new UnsupportedOperationException(defMsg); } else { try { checkSetPolicyPermission(); if (stateIs(OPEN_STATE)) { generatePermissions(); setState(INSERVICE_STATE); } } catch(Exception e){ String defMsg="commit fail for contextod "+CONTEXT_ID; String msg=localStrings.getLocalString("pc.commit_failure",defMsg,new Object[]{CONTEXT_ID,e}); logger.log(Level.SEVERE,msg); throw new PolicyContextException(e); } if (logger.isLoggable(Level.FINE)){ logger.fine("JACC Policy Provider: PC.commit "+CONTEXT_ID); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean inService() throws PolicyContextException{\n\tcheckSetPolicyPermission();\t\n\tboolean rvalue = stateIs(INSERVICE_STATE);\n \n if (logger.isLoggable(Level.FINE)) {\n logger.fine(\"JACC Policy Provider: inService: \" +\n (rvalue ? \"true \" : \"false \") +\n CONTEXT_ID);\n }\n \n return rvalue;\n }", "protected void setConfigurationContextService(ConfigurationContextService service) {\n if (log.isDebugEnabled()) {\n log.debug(\"carbon-registry deployment synchronizer component bound to the configuration context service\");\n }\n RegistryServiceReferenceHolder.setConfigurationContextService(service);\n }", "PolicyController updatePolicyController(ControllerConfiguration configuration);", "private boolean stateIs(int stateValue) {\n\tboolean inState = _stateIs(stateValue);\n\tif (stateValue == INSERVICE_STATE && !inState) {\n\t if (fileArrived(true) || fileArrived(false)) {\n \n if (logger.isLoggable(Level.FINE)){\n logger.fine(\"JACC Policy Provider: file arrived transition to inService: \" +\n \" state: \" + (this.state == OPEN_STATE ? \"open \" : \"deleted \") +\n CONTEXT_ID);\n }\n \n\t\t// initialize(!open,!remove,fromFile) \n initialize(false,false,true);\n\t }\n\t inState = _stateIs(INSERVICE_STATE);\n\t} \n \n\treturn inState;\n }", "public void setConfigurationContext(org.apache.axis2.context.xsd.ConfigurationContext param){\n localConfigurationContextTracker = true;\n \n this.localConfigurationContext=param;\n \n\n }", "protected java.security.Policy getPolicy(){\n\tif (stateIs(INSERVICE_STATE)) {\n\t return this.policy;\n\t} \n\tif (logger.isLoggable(Level.FINEST)) {\n\t logger.finest(\"JACC Policy Provider: getPolicy (\"+CONTEXT_ID+\") is NOT in service\");\n\t}\n\treturn null;\n }", "public abstract void updatePendingConfiguration(Configuration config);", "public abstract void setEnabled(Context context, boolean enabled);", "@Override\r\n\tpublic void updatePolicy(Policy policy) {\n\t\tdao.updatePolicy(policy);\r\n\t\t\r\n\t}", "protected void initialize(boolean open, boolean remove, boolean fromFile) {\n\tsynchronized(refreshLock) {\n\t String name = getPolicyFileName(true);\n\t if (open || remove) {\n\t\tsetState(OPEN_STATE);\n\t } else {\n\t\tsetState(INSERVICE_STATE);\n\t }\n\t try {\n\t\tif (remove) {\n\t\t removePolicy();\n\t\t}\n\n\t\tpolicyUrlValue = \n\t\t sun.net.www.ParseUtil.fileToEncodedURL(new File(name)).toString();\n\t\tif (fromFile && !remove) {\n uncheckedPermissions = null;\n rolePermissionsTable = null;\n\t\t excludedPermissions = loadExcludedPolicy();\n initLinkTable();\n captureFileTime(true);\n\t\t writeOnCommit = false;\n\t\t}\n\t\twasRefreshed = false;\n\t } catch (java.net.MalformedURLException mue) {\n String defMsg=\"Unable to convert Policy file Name to URL: \"+name;\n String msg=localStrings.getLocalString(\"pc.file_to_url\",defMsg, new Object[]{name,mue});\n\t\tlogger.log(Level.SEVERE,msg);\n\t\tthrow new RuntimeException(defMsg);\n\t }\n\t}\n }", "protected void refresh(boolean force){\n\n\tsynchronized(refreshLock){\n\t if (stateIs(INSERVICE_STATE) && \n\t\t(wasRefreshed == false || force || filesChanged())) {\n\n\t\t// find open policy.url\n\t\tint i = 0;\n\t\tString value = null;\n\t\tString urlKey = null;\n\t\twhile (true) {\n\t\t urlKey = PROVIDER_URL+(++i);\n\t\t value = java.security.Security.getProperty(urlKey);\n\t\t if (value == null || value.equals(\"\")) {\n\t\t\tbreak;\n\t\t }\n\t\t}\n\n\t\ttry {\n\t\t java.security.Security.setProperty(urlKey,policyUrlValue);\n\n\t\t if (fileChanged(false)) {\n\t\t\texcludedPermissions = loadExcludedPolicy();\n\t\t }\n\n\t\t // capture time before load, to ensure that we\n\t\t // have a time that precedes load\n\t\t captureFileTime(true);\n\n\t\t if (policy == null) {\n\t\t\tpolicy = getNewPolicy();\n\t\t } else {\n\t\t\tpolicy.refresh();\n\t\t\tif (logger.isLoggable(Level.FINE)){\n\t\t\t logger.fine(\"JACC Policy Provider: Called Policy.refresh on contextId: \"+CONTEXT_ID+\" policyUrlValue was \"+policyUrlValue);\n\t\t\t}\n\t\t }\n\t\t wasRefreshed = true;\n\t\t} finally {\n\t\t // can't setProperty back to null, workaround is to \n\t\t // use empty string\n\t\t java.security.Security.setProperty(urlKey,\"\");\n\t\t}\n\t }\n\t}\n }", "CustomerServiceProviderConfiguration updateConfiguration(String serviceProviderId, ServiceProviderConfigurationUpdateRequest configuration);", "ManagementLockObject refresh(Context context);", "public void setServiceContext(org.apache.axis2.context.xsd.ServiceContext param){\n localServiceContextTracker = true;\n \n this.localServiceContext=param;\n \n\n }", "public interface ServiceEndpointPolicies {\n /**\n * Deletes the specified service endpoint policy.\n *\n * @param resourceGroupName The name of the resource group.\n * @param serviceEndpointPolicyName The name of the service endpoint policy.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteByResourceGroup(String resourceGroupName, String serviceEndpointPolicyName);\n\n /**\n * Deletes the specified service endpoint policy.\n *\n * @param resourceGroupName The name of the resource group.\n * @param serviceEndpointPolicyName The name of the service endpoint policy.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String serviceEndpointPolicyName, Context context);\n\n /**\n * Gets the specified service Endpoint Policies in a specified resource group.\n *\n * @param resourceGroupName The name of the resource group.\n * @param serviceEndpointPolicyName The name of the service endpoint policy.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the specified service Endpoint Policies in a specified resource group.\n */\n ServiceEndpointPolicy getByResourceGroup(String resourceGroupName, String serviceEndpointPolicyName);\n\n /**\n * Gets the specified service Endpoint Policies in a specified resource group.\n *\n * @param resourceGroupName The name of the resource group.\n * @param serviceEndpointPolicyName The name of the service endpoint policy.\n * @param expand Expands referenced resources.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the specified service Endpoint Policies in a specified resource group.\n */\n Response<ServiceEndpointPolicy> getByResourceGroupWithResponse(\n String resourceGroupName, String serviceEndpointPolicyName, String expand, Context context);\n\n /**\n * Gets all the service endpoint policies in a subscription.\n *\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return all the service endpoint policies in a subscription.\n */\n PagedIterable<ServiceEndpointPolicy> list();\n\n /**\n * Gets all the service endpoint policies in a subscription.\n *\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return all the service endpoint policies in a subscription.\n */\n PagedIterable<ServiceEndpointPolicy> list(Context context);\n\n /**\n * Gets all service endpoint Policies in a resource group.\n *\n * @param resourceGroupName The name of the resource group.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return all service endpoint Policies in a resource group.\n */\n PagedIterable<ServiceEndpointPolicy> listByResourceGroup(String resourceGroupName);\n\n /**\n * Gets all service endpoint Policies in a resource group.\n *\n * @param resourceGroupName The name of the resource group.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return all service endpoint Policies in a resource group.\n */\n PagedIterable<ServiceEndpointPolicy> listByResourceGroup(String resourceGroupName, Context context);\n\n /**\n * Gets the specified service Endpoint Policies in a specified resource group.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the specified service Endpoint Policies in a specified resource group.\n */\n ServiceEndpointPolicy getById(String id);\n\n /**\n * Gets the specified service Endpoint Policies in a specified resource group.\n *\n * @param id the resource ID.\n * @param expand Expands referenced resources.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the specified service Endpoint Policies in a specified resource group.\n */\n Response<ServiceEndpointPolicy> getByIdWithResponse(String id, String expand, Context context);\n\n /**\n * Deletes the specified service endpoint policy.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteById(String id);\n\n /**\n * Deletes the specified service endpoint policy.\n *\n * @param id the resource ID.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteByIdWithResponse(String id, Context context);\n\n /**\n * Begins definition for a new ServiceEndpointPolicy resource.\n *\n * @param name resource name.\n * @return the first stage of the new ServiceEndpointPolicy definition.\n */\n ServiceEndpointPolicy.DefinitionStages.Blank define(String name);\n}", "@ApiAudience.Public\[email protected]\[email protected]\npublic interface PolicyContext {\n\n /**\n * Get the KijiDataRequest which triggered this freshness check.\n *\n * @return The KijiDataRequest issued by the client for this.\n */\n KijiDataRequest getClientRequest();\n\n /**\n * Get the name of the column to which the freshness policy is attached.\n *\n * @return The name of the column to which the freshness policy is attached.\n */\n KijiColumnName getAttachedColumn();\n\n /**\n * Get the Configuration associated with the Kiji instance for this context.\n *\n * @return The Configuration associated with the Kiji instance for this context.\n */\n Configuration getConfiguration();\n\n /**\n * Opens a KeyValueStore associated with storeName for read-access.\n *\n * <p>The user does not need to call <code>close()</code> on KeyValueStoreReaders returned by\n * this method; any open KeyValueStoreReaders will be closed automatically by the\n * KijiProducer/Gatherer/BulkImporter associated with this Context.</p>\n *\n * <p>Calling getStore() multiple times on the same name will reuse the same\n * reader unless it is closed.</p>\n *\n * @param <K> The key type for the KeyValueStore.\n * @param <V> The value type for the KeyValueStore.\n * @param storeName the name of the KeyValueStore to open.\n * @return A KeyValueStoreReader associated with this storeName, or null\n * if there is no such KeyValueStore available.\n * @throws IOException if there is an error opening the underlying storage resource.\n */\n <K, V> KeyValueStoreReader<K, V> getStore(String storeName) throws IOException;\n}", "public void setApplicationContext(final ApplicationContext inApplicationContext)\n {\n ctx = inApplicationContext;\n }", "public void linkConfiguration(PolicyConfiguration link) throws PolicyContextException {\n\n assertStateIsOpen();\n\n\tString linkId = link.getContextID();\n\tif (this.CONTEXT_ID == linkId) {\n String defMsg=\"Operation attempted to link PolicyConfiguration to itself.\";\n String msg=localStrings.getLocalString(\"pc.unsupported_link_operation\",defMsg);\n\t logger.log(Level.WARNING,msg);\n\t throw new IllegalArgumentException(defMsg);\n\t}\n\n\tcheckSetPolicyPermission();\n\n\tupdateLinkTable(linkId);\n\n }", "public interface ConfigurationService {\n\n Configuration findById(Long id);\n\n double getDiscount(String userName);\n\n double getShippingRate(String name, double orderTotal);\n\n Configuration update(Configuration configuration);\n\n}", "@Override\n protected void reconfigureService() {\n }", "public org.apache.axis2.context.xsd.ConfigurationContext getConfigurationContext(){\n return localConfigurationContext;\n }", "@Override\r\n\tpublic void config() {\n\t\tinter.setState(inter.getConfig());\r\n\t}", "private void updateNotificationStatus(final boolean isNotificationOn) {\n showProgressDialog();\n IApiClient client = ApiClient.getApiClient();\n Call<ResUpdateProfile> resUpdateProfileCall = client.updateSettingsWithoutImage(RequestBody.create(MediaType.parse(ServiceConstants.TYPE_MULTIPART), MethodFactory.UPDATE_SETTINGS.getMethod()),\n RequestBody.create(MediaType.parse(ServiceConstants.TYPE_MULTIPART), mAppSharedPreference.getString(PreferenceKeys.KEY_SERVICE_KEY, ServiceConstants.SERVICE_KEY)),\n RequestBody.create(MediaType.parse(ServiceConstants.TYPE_MULTIPART), mAppSharedPreference.getString(PreferenceKeys.KEY_USER_ID, \"\")),\n RequestBody.create(MediaType.parse(ServiceConstants.TYPE_MULTIPART), \"\"),\n RequestBody.create(MediaType.parse(ServiceConstants.TYPE_MULTIPART), isNotificationOn ? \"1\" : \"0\"),\n RequestBody.create(MediaType.parse(ServiceConstants.TYPE_MULTIPART), \"\"),\n RequestBody.create(MediaType.parse(ServiceConstants.TYPE_MULTIPART), \"\"));\n resUpdateProfileCall.enqueue(new Callback<ResUpdateProfile>() {\n @Override\n public void onResponse(Call<ResUpdateProfile> call, Response<ResUpdateProfile> response) {\n dismissProgressDialog();\n ResUpdateProfile resUpdateProfile = response.body();\n if (resUpdateProfile != null) {\n if (resUpdateProfile.getSuccess() == ServiceConstants.SUCCESS) {\n mAppSharedPreference.setBoolean(PreferenceKeys.KEY_NOTIFICATION_ON, isNotificationOn);\n } else {\n ToastUtils.showShortToast(SettingsActivity.this, resUpdateProfile.getErrstr());\n }\n } else {\n ToastUtils.showShortToast(SettingsActivity.this, R.string.err_network_connection);\n }\n }\n\n @Override\n public void onFailure(Call<ResUpdateProfile> call, Throwable t) {\n dismissProgressDialog();\n ToastUtils.showShortToast(SettingsActivity.this, R.string.err_network_connection);\n }\n });\n }", "public synchronized void changeServiceStatus() {\n\t\tthis.serviced = true;\n\t}", "boolean isSetServiceConfigurationList();", "PagedIterable<ServiceEndpointPolicy> list(Context context);", "public void setPreOperation(OperationConf oc) {\n preOperation = oc;\n }", "@Nullable\n public ManagedAppPolicy patch(@Nonnull final ManagedAppPolicy sourceManagedAppPolicy) throws ClientException {\n return send(HttpMethod.PATCH, sourceManagedAppPolicy);\n }", "public InitialConfiguration inbound(Boolean inbound) {\n this.inbound = inbound;\n return this;\n }", "public abstract void setIncSubscribePolicy(SubscribePolicy paramSubscribePolicy);", "public void doConfigure_update(RunData data, Context context)\n\t{\n\t\t// access the portlet element id to find our state\n\t\tString peid = ((JetspeedRunData)data).getJs_peid();\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState(peid);\n\n\t\t// we are done with customization... back to the main (browse) mode\n\t\tstate.setAttribute(STATE_MODE, MODE_LIST);\n\n\t\t// commit the change\n\t\t// saveOptions();\n\t\tcancelOptions();\n\n\t}", "Observable<CustomerServiceProviderConfiguration> updateConfigurationAsync(String serviceProviderId, ServiceProviderConfigurationUpdateRequest configuration);", "public void setContextEnabled(Boolean contextEnabled) {\n this.contextEnabled = contextEnabled;\n }", "public void setOpenContext(final ChannelHandlerContext ctx) {\n while (true) {\n final ChannelHandlerContext oldCtx = openCtx.get();\n if (openCtx.compareAndSet(oldCtx, ctx)) {\n return;\n }\n }\n }", "public interface ServiceContext {\r\n /**\r\n * @return configuration for the service.\r\n */\r\n ServiceConfigurable service();\r\n}", "@Autowired\n\tpublic void setConfigService(ConfigService configService) {\n\t\tthis.configService = configService;\n\t}", "@Override\n public void reinstate(Context context, Item item) throws SQLException, AuthorizeException\n {\n // check authorization\n AuthorizeUtil.authorizeReinstateItem(context, item);\n\n String timestamp = DCDate.getCurrent().toString();\n\n // Check permission. User must have ADD on all collections.\n // Build some provenance data while we're at it.\n List<Collection> colls = item.getCollections();\n\n // Add suitable provenance - includes user, date, collections +\n // bitstream checksums\n EPerson e = context.getCurrentUser();\n StringBuilder prov = new StringBuilder();\n prov.append(\"Item reinstated by \").append(e.getFullName()).append(\" (\")\n .append(e.getEmail()).append(\") on \").append(timestamp).append(\"\\n\")\n .append(\"Item was in collections:\\n\");\n\n for (Collection coll : colls) {\n prov.append(coll.getName()).append(\" (ID: \").append(coll.getID()).append(\")\\n\");\n }\n \n // Clear withdrawn flag\n item.setWithdrawn(false);\n\n // in_archive flag is now true\n item.setInArchive(true);\n\n // Add suitable provenance - includes user, date, collections +\n // bitstream checksums\n prov.append(installItemService.getBitstreamProvenanceMessage(item));\n\n addMetadata(context, item, MetadataSchema.DC_SCHEMA, \"description\", \"provenance\", \"en\", prov.toString());\n\n // Update item in DB\n update(context, item);\n\n context.addEvent(new Event(Event.MODIFY, Constants.ITEM, item.getID(), \"REINSTATE\"));\n\n // authorization policies\n if (colls.size() > 0)\n {\n // FIXME: not multiple inclusion friendly - just apply access\n // policies from first collection\n // remove the item's policies and replace them with\n // the defaults from the collection\n inheritCollectionDefaultPolicies(context, item, colls.iterator().next());\n }\n\n // Write log\n log.info(LogManager.getHeader(context, \"reinstate_item\", \"user=\"\n + e.getEmail() + \",item_id=\" + item.getID()));\n }", "@Override\n\tpublic void onEnabled(Context context) {\n\t\tsuper.onEnabled(context);\n\t\tIntent intent = new Intent(context, UpdateWidgetService.class);\n\t\tcontext.startService(intent);\n\t}", "void setContainerStatusInProgress(RuleContextContainer rccContext)\r\n throws StorageProviderException;", "public Optional<CancellationPolicy> updatePolicy(long policyId, CancellationPolicy editedPolicy) throws Exception{\n Optional<CancellationPolicy> updatedPolicy = cancellationPolicyRepository.findById(policyId).map((selectedPolicy) -> {\n selectedPolicy.getRules().clear();\n selectedPolicy.getRules().addAll(editedPolicy.getRules());\n selectedPolicy.getRules().forEach((rule) -> {\n rule.setPolicy(editedPolicy);\n });\n selectedPolicy.setPolicyId(editedPolicy.getPolicyId());\n selectedPolicy.setPolicyName(editedPolicy.getPolicyName());\n selectedPolicy.setPolicySource(editedPolicy.getPolicySource());\n selectedPolicy.setPolicyDescription(editedPolicy.getPolicyDescription());\n selectedPolicy.setPolicyUpdatedBy(editedPolicy.getPolicyUpdatedBy());\n selectedPolicy.setPolicyUpdatedOn();\n selectedPolicy.setPolicyCancelRestrictionDays(editedPolicy.getPolicyCancelRestrictionDays());\n selectedPolicy.setPolicyCancelRestrictionHours(editedPolicy.getPolicyCancelRestrictionHours());\n return cancellationPolicyRepository.save(selectedPolicy);\n });\n return updatedPolicy;\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n ServiceConfigurationResourceInner update(\n String resourceUri,\n String endpointName,\n String serviceConfigurationName,\n ServiceConfigurationResourcePatch serviceConfigurationResource);", "protected AbstractApplicationContext getServicesContext() {\r\n\t\treturn this.servicesContext;\r\n\t}", "public void updateContext() {\n LOG.debug(\"Updating context...\");\n List<Long> sids;\n try {\n sids = getOrderedListOfChainNodes(root, true);\n } catch (KeeperException | InterruptedException ignore) {\n LOG.error(\"Failed to update context.Exception: \", ignore);\n return;\n }\n // this should not be case on replica server\n if (sids.size() == 0) {\n // head = tail = -1 = chain empty :: used by TailChainClient\n headSid.set(-1);\n tailSid.set(-1);\n predecessorSid.set(-1);\n successorSid.set(-1);\n return;\n }\n headSid.set(sids.get(0));\n tailSid.set(sids.get(sids.size() - 1));\n // position of this replica in chain\n int myIndex = sids.indexOf(mySid);\n // if client is calling this method\n if (myIndex == -1) {\n return;\n }\n // except head replica all other nodes have predecessor replica\n if (myIndex == 0) {\n predecessorSid.set(-1); // -1 indicates no predecessor\n } else {\n predecessorSid.set(sids.get(myIndex - 1));\n }\n // except tail replica all other nodes have successor replica\n if (myIndex == sids.size() - 1) {\n successorSid.set(-1); // -1 indicates no successor\n } else {\n successorSid.set(sids.get(myIndex + 1));\n }\n }", "public void setStateContext(State s);", "void updatePolicyHOlder(int policyHolderId , PolicyHolder policyHolder);", "public void setAccessPolicyConfig(boolean value) {\n\t\tthis.accessPolicyConfig = value;\n\t}", "public void changeModeEvent(StoragePolicySatisfierMode newMode) {\n if (!storagePolicyEnabled) {\n LOG.info(\"Failed to change storage policy satisfier as {} set to {}.\",\n DFSConfigKeys.DFS_STORAGE_POLICY_ENABLED_KEY, storagePolicyEnabled);\n return;\n }\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Updating SPS service status, current mode:{}, new mode:{}\",\n mode, newMode);\n }\n\n switch (newMode) {\n case EXTERNAL:\n if (mode == newMode) {\n LOG.info(\"Storage policy satisfier is already in mode:{},\"\n + \" so ignoring change mode event.\", newMode);\n return;\n }\n spsService.stopGracefully();\n break;\n case NONE:\n if (mode == newMode) {\n LOG.info(\"Storage policy satisfier is already disabled, mode:{}\"\n + \" so ignoring change mode event.\", newMode);\n return;\n }\n LOG.info(\"Disabling StoragePolicySatisfier, mode:{}\", newMode);\n spsService.stop(true);\n clearPathIds();\n break;\n default:\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Given mode: {} is invalid\", newMode);\n }\n break;\n }\n\n // update sps mode\n mode = newMode;\n }", "protected AppsConfigService getAppsConfigService() {\r\n return this.service;\r\n }", "public interface UserPolicyService {\n\n /**\n * 查询散标策略总数\n */\n UserPolicyResult getUserPolicyCount(UserPolicyParam param);\n\n /**\n * 查询用户所有 散标策略\n */\n UserPolicyResult getLoanPolicy(Long id);\n\n /**\n * 查询用户主策略\n */\n List<UserMainPolicyVO> getUserMainPolicies(Long userId, String thirdUserUUID);\n\n /**\n * 查询用户主策略\n */\n List<UserMainPolicy> getUserMainPolicies(UserMainPolicy userMainPolicy);\n\n /**\n * 查唯一 isDeleted = false\n */\n UserMainPolicyVO getUserMainPolicy(Long userId, String thirdUserUUID, Long mainPolicyId);\n\n /**\n * 保存用户主策略\n */\n UserMainPolicy saveUserMainPolicy(UserMainPolicy userMainPolicy);\n\n /**\n * 删除用户主策略\n */\n UserPolicyResult removeUserMainPolicy(Long userId, String thirdUserUUID, Long mainPolicyId);\n\n /**\n * 查询所有散标策略\n */\n LoanPolicyResult getLoanPolicies(LoanPolicyParam param);\n\n /**\n * 批量添加用户第三方选择的散标策略\n */\n UserPolicyResult addUserPolicyBatch(Long userId, String thirdUserUUID, List<Long> policyIds);\n\n /**\n * 保存修改 用户选择的散标策略\n */\n Result modifyUserPolicy(UserPolicy userPolicy);\n\n /**\n * 删除散标策略 userId是操作人ID\n */\n Result delLoanPolicy(Long userId, Long policyId);\n\n /**\n * 删除散标策略\n */\n Result delLoanPolicy(Long userId, List<Long> policyIds);\n\n /**\n * 用户添加散标策略\n */\n LoanPolicyResult saveLoanPolicy(LoanPolicy loanPolicy);\n\n /**\n * 查询用户为第三方账号设置的所有散标策略\n */\n UserPolicyResult getUserPolicies(UserPolicyParam param);\n\n /**\n * 查询用户为第三方账号设置的所有散标策略 详情\n */\n UserPolicyResult getUserPolicyDetailList(UserPolicyParam param);\n\n /**\n * 查询未添加过该策略的第三方账号\n */\n List<String> getNoSelPolicyThirdUUIDList(Long userId, Long policyId, Short policyType, Long mainPolicyId);\n\n /**\n * 挂载用户第三方自定义散标策略\n */\n UserPolicyResult attachUserThirdLoanPolicy(Long userId, Long policyId, List<String> thirdUUIDList);\n\n /**\n * 删除用户为第三方账户选择的自定义散标策略\n */\n Result dettachUserThirdLoanPolicy(Long userId, List<Long> userPolicyIds);\n\n /**\n * 修改散标策略\n * @param loanPolicy\n * @return\n */\n Result modifyLoanPolicy(LoanPolicy loanPolicy);\n}", "private static Policy getInputOutputMessageEffectivePolicy(Definitions wsdl, QName service, String portName, String operationName, boolean isInput) throws PolicyException {\n Service srv = wsdl.getService(service);\n if (srv == null) {\n throw new IllegalArgumentException(\"Cannot find service with qname \" + service);\n }\n //obtain port\n Endpoint port = srv.getEndpoint(portName);\n if (port == null) {\n throw new IllegalArgumentException(\"Cannot find port with name '\" + portName + \"' in service with qname \" + service);\n }\n //obtain binding\n QName bQName = port.getBinding();\n Binding binding = wsdl.getBinding(bQName);\n AbstractOperation bOp = binding.getOperationByName(operationName);\n if (bOp == null) {\n throw new IllegalArgumentException(\"Cannot find binding operation with name '\" + operationName + \"' in binding \" + bQName);\n }\n \n QName intQName = binding.getInterface();\n Interface portType = wsdl.getInterface(intQName);\n Operation pOp = portType.getOperation(operationName);\n if (pOp == null) {\n throw new IllegalArgumentException(\"Cannot find portType operation with name '\" + operationName + \"' in portType \" + intQName);\n }\n \n Element wsdlEl = (Element) binding.getDomElement().getParentNode();\n\n try {\n ExtensionContext bOpExtCtx = null;\n ExtensionContext pOpExtCtx = null;\n ExtensionContext msgExtCtx = null;\n if (isInput) {\n bOpExtCtx = bOp.getInputExtensionContext();\n pOpExtCtx = pOp.getInputExtensionContext();\n //take msg extension context\n QName msgQName = QName.valueOf(pOpExtCtx.getProperty(WSDL11Constants.OPERATION_IN_MESSAGE_QNAME));\n msgExtCtx = wsdl.getMessageContext(msgQName);\n } else {\n bOpExtCtx = bOp.getOutputExtensionContext();\n pOpExtCtx = pOp.getOutputExtensionContext();\n //take msg extension context\n QName msgQName = QName.valueOf(pOpExtCtx.getProperty(WSDL11Constants.OPERATION_OUT_MESSAGE_QNAME));\n msgExtCtx = wsdl.getMessageContext(msgQName);\n }\n Policy bOpPolicy = ConfigurationBuilder.loadPolicies(bOpExtCtx, wsdlEl);\n Policy pOpPolicy = ConfigurationBuilder.loadPolicies(pOpExtCtx, wsdlEl);\n Policy msgPolicy = ConfigurationBuilder.loadPolicies(msgExtCtx, wsdlEl);\n \n Policy res = Policy.mergePolicies(new Policy[]{bOpPolicy, pOpPolicy, msgPolicy});\n return res;\n } catch (WSDLException wsE) {\n throw new PolicyException(wsE);\n }\n }", "public com.google.common.util.concurrent.ListenableFuture<lnrpc.Rpc.PolicyUpdateResponse> updateChannelPolicy(\n lnrpc.Rpc.PolicyUpdateRequest request) {\n return futureUnaryCall(\n getChannel().newCall(getUpdateChannelPolicyMethod(), getCallOptions()), request);\n }", "interface WithProvisioningState {\n /**\n * Specifies provisioningState.\n * @param provisioningState The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'\n * @return the next update stage\n */\n Update withProvisioningState(ProvisioningState provisioningState);\n }", "List<PolicyController> updatePolicyControllers(List<ControllerConfiguration> configuration);", "public lnrpc.Rpc.PolicyUpdateResponse updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request) {\n return blockingUnaryCall(\n getChannel(), getUpdateChannelPolicyMethod(), getCallOptions(), request);\n }", "public void setRootContext(org.apache.axis2.context.xsd.ConfigurationContext param){\n localRootContextTracker = true;\n \n this.localRootContext=param;\n \n\n }", "OperationalState operationalState();", "OperationalState operationalState();", "public PolicyServiceDelegate()\n {\n log.debug(\"\") ;\n log.debug(\"----\\\"----\") ;\n log.debug(\"PolicyServiceDelegate()\") ;\n try\n {\n service = getService(CommunityConfig.getServiceUrl());\n }\n catch(Exception e) {\n e.printStackTrace();\n service = null;\n }\n log.debug(\"----\\\"----\") ;\n log.debug(\"\") ;\n }", "public void setConfigurationService(ConfigurationService configurationService) {\n this.configurationService = configurationService;\n }", "public void updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.PolicyUpdateResponse> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getUpdateChannelPolicyMethod(), getCallOptions()), request, responseObserver);\n }", "private void modifyContext(final ContextModifier modifier) throws ConfigurationException {\n TomcatModuleConfiguration.<Context>modifyConfiguration(contextDataObject, new ConfigurationModifier<Context>() {\n\n @Override\n public void modify(Context configuration) {\n modifier.modify(configuration);\n }\n @Override\n public void finished(Context configuration) {\n synchronized (TomcatModuleConfiguration.this) {\n context = configuration;\n }\n }\n }, new ConfigurationFactory<Context>() {\n\n @Override\n public Context create(byte[] content) {\n return Context.createGraph(new ByteArrayInputStream(content));\n }\n }, new ConfigurationValue<Context>() {\n\n @Override\n public Context getValue() throws ConfigurationException {\n return getContext();\n }\n });\n }", "public synchronized static void setContext(Context con){\n\t\tcontext = con;\n\t}", "void setInvoiced(boolean invoiced);", "protected void setPolicy(LinkedHashMap<String, Vector<String>> policy) {\r\n\r\n\t\t// get all the parameters from config file\r\n\t\tVector<String> policyFrom = parameters.get(\"/Domains/POLICY/@from\");\r\n\t\tVector<String> policyTo = parameters.get(\"/Domains/POLICY/@to\");\r\n\t\tVector<String> policyBy = parameters.get(\"/Domains/POLICY/@by\");\r\n\r\n\t\tfor (int i = 0; i < policyFrom.size(); i++) {\r\n\t\t\tVector<String> temp = new Vector<String>();\r\n\t\t\t// if the policy entry has a comma (,), there`s a multiple possible\r\n\t\t\t// transit domain\r\n\t\t\tif (policyBy.get(i).contains(\",\")) {\r\n\t\t\t\tString[] policyHop = policyBy.get(i).split(\",\");\r\n\t\t\t\tfor (int p = 0; p < policyHop.length; p++) {\r\n\t\t\t\t\ttemp.add(policyHop[p]);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// otherwise, just add the hop in the config file\r\n\t\t\t\t// All the policies with only one path, will apply this\r\n\t\t\t\ttemp.add(policyBy.get(i));\r\n\t\t\t}\r\n\t\t\tpolicy.put(policyFrom.get(i) + \"-\" + policyTo.get(i), temp);\r\n\t\t}\r\n\r\n\t}", "public void updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.PolicyUpdateResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getUpdateChannelPolicyMethod(), responseObserver);\n }", "public void updatePolicy(CompanyPolicy cP ) {\n\t\tTransaction tx = session.beginTransaction();\n\t\tCompanyPolicy cPolicy = (CompanyPolicy)session.get(CompanyPolicy.class, cP.getPolicyNo());\n\t\t//Update fields which are allowed to modify\n\t\tcPolicy.setPolicyTag1(cP.getPolicyTag1());\n\t\tcPolicy.setPolicyTag2(cP.getPolicyTag2());\n\t\tcPolicy.setPolicyDesc(cP.getPolicyDesc());\n\t\tcPolicy.setPolicyDoc(cP.getPolicyDoc());\n\t\tsession.update(cPolicy); \n\t\ttx.commit();\n\t}", "public void setContextConductionInd(boolean contextConductionInd) {\n\t\tthis.contextConductionInd = contextConductionInd;\n\t}", "@Override\n public void modifiedService(ServiceReference<ManagedService> reference, ManagedService service) {\n }", "ManagementLockObject apply(Context context);", "ArooaContext honour(InstanceRuntime instanceRuntime, ArooaContext context) {\r\n\t\t\r\n\t\tObject proxy = instanceRuntime.getInstanceConfiguration().getObjectToSet();\r\n\t\t\r\n\t\thonourObligations(proxy, instanceRuntime, context);\r\n\t\t\r\n\t\tObject object = instanceRuntime.getInstanceConfiguration().getWrappedObject();\r\n\t\t\r\n\t\tif (object != proxy) {\r\n\t\t\thonourObligations(object, instanceRuntime, context);\r\n\t\t}\t\t\r\n\t\t\r\n\t\treturn context;\r\n\t}", "@ApiModelProperty(value = \"Boolean indicating whether OpenAM considers the policy active for evaluation purposes, defaults to false\")\n public Boolean isActive() {\n return active;\n }", "public interface HstMutableRequestContext extends HstRequestContext {\n\n public void setServletContext(ServletContext servletContext);\n\n public void setServletRequest(HttpServletRequest servletRequest);\n\n public void setServletResponse(HttpServletResponse servletResponse);\n\n public void setSession(Session session);\n\n public void setResolvedMount(ResolvedMount resolvedMount);\n\n public void setResolvedSiteMapItem(ResolvedSiteMapItem resolvedSiteMapItem);\n\n public void setBaseURL(HstContainerURL baseURL);\n\n public void setURLFactory(HstURLFactory urlFactory);\n\n public void setSiteMapMatcher(HstSiteMapMatcher siteMapMatcher);\n\n public void setLinkCreator(HstLinkCreator linkCreator);\n\n public void setParameterInfoProxyFactory(HstParameterInfoProxyFactory parameterInfoProxyFactory);\n\n public void setHstSiteMenus(HstSiteMenus siteMenus);\n\n public void setHstQueryManagerFactory(HstQueryManagerFactory hstQueryManagerFactory);\n\n public void setContainerConfiguration(ContainerConfiguration containerConfiguration);\n\n public void setSubject(Subject subject);\n\n /**\n * Sets the preferred locale associated with this request.\n *\n * @param locale The preferred locale associated with this request.\n */\n public void setPreferredLocale(Locale locale);\n\n /**\n * Sets the locales assocaited with this request.\n *\n * @param locales\n */\n public void setLocales(List<Locale> locales);\n\n /**\n * Sets the path suffix\n *\n * @param pathSuffix\n */\n public void setPathSuffix(String pathSuffix);\n\n\n /**\n * set the conditions that will trigger a component to be added to the component window hierarchy.\n *\n * @param conditions the {@link Set} of {@link String} conditions\n */\n void setComponentFilterTags(Set<String> conditions);\n\n /**\n * Adds the {@link HstComponentWindowFilter} to the {@link HstRequestContext}\n *\n * @param filter the {@link HstComponentWindowFilter} to be added to the {@link HstRequestContext#getComponentWindowFilters()}\n * @deprecated since 2.30.02 (CMS 10.0.2). Instead, use spring bean 'org.hippoecm.hst.core.container.HstComponentWindowFilter.list'\n * to add HstComponentWindowFilter items\n */\n @Deprecated\n void addComponentWindowFilter(HstComponentWindowFilter filter);\n\n /**\n * Sets the {@link HstComponentWindowFilter}s on the {@link HstRequestContext}\n *\n * @param filters the {@link HstComponentWindowFilter}s to be set for the {@link HstRequestContext#getComponentWindowFilters()}\n */\n void setComponentWindowFilters(List<HstComponentWindowFilter> filters);\n\n /**\n * @param fullyQualifiedURLs sets whether created URLs will be fully qualified\n */\n public void setFullyQualifiedURLs(boolean fullyQualifiedURLs);\n\n /**\n * Sets a specific render host. This can be used to render the request as if host <code>renderHost</code> was the\n * actual\n * used host in the request.\n *\n * @param renderHost the host to be used for rendering\n */\n public void setRenderHost(String renderHost);\n\n /**\n * @param cmsRequest when the request is a cmsRequest have this parameter equal to <code>true</code>\n * @see #isCmsRequest()\n */\n public void setCmsRequest(boolean cmsRequest);\n\n /**\n * Sets ContentBeansTool instance for this request context\n *\n * @param contentBeansTool\n */\n public void setContentBeansTool(ContentBeansTool contentBeansTool);\n\n public void setCachingObjectConverter(boolean enabled);\n\n public void clearObjectAndQueryManagers();\n\n /**\n * Dispose all the internal objects maintained for the current request processing state.\n * After disposed, this request context will be in an illegal state to use.\n */\n public void dispose();\n\n /**\n * Marks the {@link HstRequestContext} that its matching phase has been finished\n */\n public void matchingFinished();\n\n void setHstSiteMenusManager(HstSiteMenusManager siteMenusManager);\n}", "public void setStatusService(StatusService statusService) {\r\n this.statusService = statusService;\r\n }", "@Override\n\tpublic void setContext(Context pContext) {\n\n\t}", "public interface IAccessPolicy {\n\n\t/**\n\t * Indicating if the current session can do a register process\n\t * \n\t * @param session\n\t * To be checked\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canRegister(Session session);\n\n\t/**\n\t * Indicating if the current session can do a login process\n\t * \n\t * @param session\n\t * To be checked\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canLogin(Session session);\n\n\t/**\n\t * Indicating if the current session can do a search\n\t * \n\t * @param session\n\t * To be checked\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canSearch(Session session);\n\n\t/**\n\t * Indicating if the current session can do a register process\n\t * \n\t * @param session\n\t * To be checked\n\t * @param user\n\t * Data of this user should be changed\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canEditUserData(Session session, User user);\n\n\t/**\n\t * Inidicating if the given session can comment\n\t * \n\t * @param session\n\t * to be investigated\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canComment(Session session);\n\n\t/**\n\t * Indicating if the given session can edit a given comment.\n\t * \n\t * @param session\n\t * the call belongs to\n\t * @param comment\n\t * to be checked\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canEditComment(Session session, Comment comment);\n\n\t/**\n\t * Indicating if the current session can create a snippet in the given\n\t * category.\n\t * \n\t * @param session\n\t * To be checked\n\t * @param category\n\t * Category where the snippet should be created\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canCreateSnippet(Session session, Category category);\n\n\t/**\n\t * Indicating if the current session can do a register process\n\t * \n\t * @param session\n\t * To be checked\n\t * @param snippet\n\t * Concrete snippet that should be deleted\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canDeleteSnippet(Session session, Snippet snippet);\n\n\t/**\n\t * Indicating if the current session can do a register process\n\t * \n\t * @param session\n\t * To be checked\n\t * @param snippet\n\t * Concrete snippet, that should be edited\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canEditSnippet(Session session, Snippet snippet);\n\n\t/**\n\t * Indicating if the given session can tag the given snippet\n\t * \n\t * @param session\n\t * to be checked. Concrete, the user of the session will be\n\t * checked\n\t * @param snippet\n\t * to be tagged\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canTagSnippet(Session session, Snippet snippet);\n\n\t/**\n\t * Indicating if the given session is able to rate a snippet\n\t * \n\t * @param session\n\t * to be checked. Concrete, the user of the session will be\n\t * checked\n\t * @param snippet\n\t * to be tagged\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canRateSnippet(Session session, Snippet snippet);\n\n\t/**\n\t * Indicating if the given session can edit a given category.\n\t * \n\t * @param session\n\t * the call belongs to\n\t * @param category\n\t * to be checked\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canEditCategory(Session session, Category category);\n\n\t/**\n\t * Indicating if the given session can delete a given comment\n\t * \n\t * @param session\n\t * the call belongs to\n\t * @param comment\n\t * to be checked\n\t * @return if operation succeeds if denied false\n\t */\n\tpublic boolean canDeleteComment(Session session, Comment comment);\n}", "public MyPhoneStateListener (Context context) {\n\t\t\n\t\tsuper();\n\t\tif (ConfigAppValues.getContext() == null)\n\t\t\tConfigAppValues.setContext(context);\t\t\n\t}", "public void setUseGlobalService(boolean flag);", "interface WithPrivateLinkServiceConnectionState {\n /**\n * Specifies privateLinkServiceConnectionState.\n * @param privateLinkServiceConnectionState A collection of information about the state of the connection between service consumer and provider\n * @return the next update stage\n */\n Update withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState);\n }", "@Override\n public void modifiedService(ServiceReference<ManagedServiceFactory> reference,\n ManagedServiceFactory service) {\n }", "public void refreshServiceState(ServiceState serviceState, TransportType transport);", "@Override\n\tpublic void notifyContextAttached(ContextInfo ctx)\n\t{\n\t\t// Once the context is connected, load the list of available procedures\n\t\tm_models.obtainAvailableProcedures(true);\n\t\t// Build the list of remote procedure models\n\t\tm_models.obtainRemoteProcedures();\n\n\t\t// FIXME: this is still not possible since re-attached contexts\n\t\t// do not have control on procedures open in previous context instances\n\t\t// We shall enable any open model since we can control the SEE\n\t\t// counterpart again\n\t\t// m_models.enableProcedures();\n\t}", "public void addPolicy(Policy policy) throws APIManagementException {\n\n if (policy instanceof APIPolicy) {\n APIPolicy apiPolicy = (APIPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getAPIPolicy(userNameWithoutChange, apiPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Advanced Policy with name \" + apiPolicy.getPolicyName() + \" already exists\");\n }\n apiPolicy.setUserLevel(PolicyConstants.ACROSS_ALL);\n apiPolicy = apiMgtDAO.addAPIPolicy(apiPolicy);\n List<Integer> addedConditionGroupIds = new ArrayList<>();\n for (Pipeline pipeline : apiPolicy.getPipelines()) {\n addedConditionGroupIds.add(pipeline.getId());\n }\n APIPolicyEvent apiPolicyEvent = new APIPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n apiPolicy.getTenantDomain(), apiPolicy.getPolicyId(), apiPolicy.getPolicyName(),\n apiPolicy.getDefaultQuotaPolicy().getType(), addedConditionGroupIds, null);\n APIUtil.sendNotification(apiPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof ApplicationPolicy) {\n ApplicationPolicy appPolicy = (ApplicationPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getApplicationPolicy(userNameWithoutChange, appPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Application Policy with name \" + appPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addApplicationPolicy(appPolicy);\n //policy id is not set. retrieving policy to get the id.\n ApplicationPolicy retrievedPolicy = apiMgtDAO.getApplicationPolicy(appPolicy.getPolicyName(), tenantId);\n ApplicationPolicyEvent applicationPolicyEvent = new ApplicationPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n appPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(), appPolicy.getPolicyName(),\n appPolicy.getDefaultQuotaPolicy().getType());\n APIUtil.sendNotification(applicationPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof SubscriptionPolicy) {\n SubscriptionPolicy subPolicy = (SubscriptionPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getSubscriptionPolicy(userNameWithoutChange, subPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Subscription Policy with name \" + subPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addSubscriptionPolicy(subPolicy);\n String monetizationPlan = subPolicy.getMonetizationPlan();\n Map<String, String> monetizationPlanProperties = subPolicy.getMonetizationPlanProperties();\n if (StringUtils.isNotBlank(monetizationPlan) && MapUtils.isNotEmpty(monetizationPlanProperties)) {\n createMonetizationPlan(subPolicy);\n }\n //policy id is not set. retrieving policy to get the id.\n SubscriptionPolicy retrievedPolicy = apiMgtDAO.getSubscriptionPolicy(subPolicy.getPolicyName(), tenantId);\n SubscriptionPolicyEvent subscriptionPolicyEvent = new SubscriptionPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId, subPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n subPolicy.getPolicyName(), subPolicy.getDefaultQuotaPolicy().getType(),\n subPolicy.getRateLimitCount(),subPolicy.getRateLimitTimeUnit(), subPolicy.isStopOnQuotaReach(),\n subPolicy.getGraphQLMaxDepth(),subPolicy.getGraphQLMaxComplexity(),subPolicy.getSubscriberCount());\n APIUtil.sendNotification(subscriptionPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof GlobalPolicy) {\n GlobalPolicy globalPolicy = (GlobalPolicy) policy;\n\n // checking if policy already exist\n Policy existingPolicy = getGlobalPolicy(globalPolicy.getPolicyName());\n if (existingPolicy != null) {\n throw new APIManagementException(\"Policy name already exists\");\n }\n\n apiMgtDAO.addGlobalPolicy(globalPolicy);\n\n KeyTemplateEvent keyTemplateEvent = new KeyTemplateEvent(UUID.randomUUID().toString(), System.currentTimeMillis(),\n APIConstants.EventType.CUSTOM_POLICY_ADD.name(), tenantId, tenantDomain,\n \"add\", globalPolicy.getKeyTemplate());\n APIUtil.sendNotification(keyTemplateEvent, APIConstants.NotifierType.KEY_TEMPLATE.name());\n\n GlobalPolicy retrievedPolicy = apiMgtDAO.getGlobalPolicy(globalPolicy.getPolicyName());\n GlobalPolicyEvent globalPolicyEvent = new GlobalPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n globalPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n globalPolicy.getPolicyName());\n APIUtil.sendNotification(globalPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else {\n String msg = \"Policy type \" + policy.getClass().getName() + \" is not supported\";\n log.error(msg);\n throw new UnsupportedPolicyTypeException(msg);\n }\n }", "public final void setIncomingRequest_Service(com.mendix.systemwideinterfaces.core.IContext context, slm.proxies.Service incomingrequest_service)\r\n\t{\r\n\t\tif (incomingrequest_service == null)\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.IncomingRequest_Service.toString(), null);\r\n\t\telse\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.IncomingRequest_Service.toString(), incomingrequest_service.getMendixObject().getId());\r\n\t}", "public ConfigurationService getConfigurationService() {\n return configurationService;\n }", "public interface IServiceContext extends IDisposable, ILinkRuntimeExtendable, AutoCloseable {\n\n\t/**\n\t * Builds a set with all types where a bean instance is wired to in this context. This method does\n\t * not evaluate the content of parent contexts.\n\t *\n\t * @return A set containing all types where a bean instance is wired to in this context.\n\t */\n\tISet<Class<?>> collectAllTypeWiredServices();\n\n\t/**\n\t * Returns the name of the context\n\t *\n\t * @return The name of the context\n\t */\n\tString getName();\n\n\t/**\n\t * Checks if the context is already fully disposed. It is not the opposite of isRunning(). The\n\t * context also could be starting or in the process of being disposed.\n\t *\n\t * @return True if the context is disposed, otherwise false.\n\t */\n\tboolean isDisposed();\n\n\t/**\n\t * Checks if the context is in the process of being disposed. In this case {@link #isRunning()} is\n\t * still true but gives additionally the hint that some functionalities might not work completely\n\t * as expected any more. This flag will return to false (again) when the disposal is finished.\n\t *\n\t * @return True if - and only if - the context is in the process of being disposed, otherwise\n\t * false.\n\t */\n\tboolean isDisposing();\n\n\t/**\n\t * Checks if the context is running. It is not the opposite of isDisposed(). The context also\n\t * could be starting or in the process of being disposed.\n\t *\n\t * @return True if the context is running, otherwise false.\n\t */\n\tboolean isRunning();\n\n\t/**\n\t * Getter for the parent context of this context.\n\t *\n\t * @return Parent context or null if this is the root context.\n\t */\n\tIServiceContext getParent();\n\n\t/**\n\t * Getter for the root context.\n\t *\n\t * @return Root context or this if this is the root context.\n\t */\n\tIServiceContext getRoot();\n\n\t/**\n\t * Creates a child context of this context with the additional beans from the given initializing\n\t * modules.\n\t *\n\t * @param serviceModules\n\t * Initializing modules defining the content of the new context.\n\t * @return New IoC context.\n\t */\n\tIServiceContext createService(Class<?>... serviceModules);\n\n\t/**\n\t * Creates a child context of this context with the additional beans from the given initializing\n\t * modules.\n\t *\n\t * @param childContextName\n\t * The name of the childContext. This makes sense if the context hierarchy will be\n\t * monitored e.g. via JMX clients\n\t * @param serviceModules\n\t * Initializing modules defining the content of the new context.\n\t * @return New IoC context.\n\t */\n\tIServiceContext createService(String childContextName, Class<?>... serviceModules);\n\n\t/**\n\t * Creates a child context of this context with the additional beans from the given initializing\n\t * modules plus everything you do in the RegisterPhaseDelegate.\n\t *\n\t * @param registerPhaseDelegate\n\t * Similar to an already instantiated module.\n\t * @param serviceModules\n\t * Initializing modules defining the content of the new context.\n\t * @return New IoC context.\n\t */\n\tIServiceContext createService(\n\t\t\tIBackgroundWorkerParamDelegate<IBeanContextFactory> registerPhaseDelegate,\n\t\t\tClass<?>... serviceModules);\n\n\t/**\n\t * Creates a child context of this context with the additional beans from the given initializing\n\t * modules plus everything you do in the RegisterPhaseDelegate.\n\t *\n\t * @param childContextName\n\t * The name of the childContext. This makes sense if the context hierarchy will be\n\t * monitored e.g. via JMX clients\n\t * @param registerPhaseDelegate\n\t * Similar to an already instantiated module.\n\t * @param serviceModules\n\t * Initializing modules defining the content of the new context.\n\t * @return New IoC context.\n\t */\n\tIServiceContext createService(String childContextName,\n\t\t\tIBackgroundWorkerParamDelegate<IBeanContextFactory> registerPhaseDelegate,\n\t\t\tClass<?>... serviceModules);\n\n\t/**\n\t * For future feature of complex context hierarchies.\n\t *\n\t * @param autowiredBeanClass\n\t * Type the service bean is autowired to.\n\t * @return Lazy holder for the requested bean.\n\t */\n\t<V> IBeanContextHolder<V> createHolder(Class<V> autowiredBeanClass);\n\n\t/**\n\t * For future feature of complex context hierarchies.\n\t *\n\t * @param beanName\n\t * Name of the service bean to lookup.\n\t * @param expectedClass\n\t * Type the service bean is casted to.\n\t * @return Lazy holder for the requested bean.\n\t */\n\t<V> IBeanContextHolder<V> createHolder(String beanName, Class<V> expectedClass);\n\n\t/**\n\t * Service bean lookup by name. Identical to getService(serviceName, true).\n\t *\n\t * @param serviceName\n\t * Name of the service bean to lookup.\n\t * @return Requested service bean.\n\t */\n\tObject getService(String serviceName);\n\n\t/**\n\t * Service bean lookup by name that may return null.\n\t *\n\t * @param serviceName\n\t * Name of the service bean to lookup.\n\t * @param checkExistence\n\t * Flag if bean is required to exist.\n\t * @return Requested service bean or null if bean does not exist and existence is not checked.\n\t */\n\tObject getService(String serviceName, boolean checkExistence);\n\n\t/**\n\t * Service bean lookup by name with defined return type.\n\t *\n\t * @param serviceName\n\t * Name of the service bean to lookup.\n\t * @param targetType\n\t * Type the service bean is casted to.\n\t * @return Requested service bean.\n\t */\n\t<V> V getService(String serviceName, Class<V> targetType);\n\n\t/**\n\t * Service bean lookup by name with defined return type.\n\t *\n\t * @param serviceName\n\t * Name of the service bean to lookup.\n\t * @param targetType\n\t * Type the service bean is casted to.\n\t * @param checkExistence\n\t * Flag if bean is required to exist.\n\t * @return Requested service bean or null if bean does not exist and existence is not checked.\n\t */\n\t<V> V getService(String serviceName, Class<V> targetType, boolean checkExistence);\n\n\t/**\n\t * Service bean lookup by type. Identical to getService(autowiredType, true)\n\t *\n\t * @param type\n\t * Type the service bean is autowired to.\n\t * @return Requested service bean.\n\t */\n\t<T> T getService(Class<T> type);\n\n\t/**\n\t * Service bean lookup by type that may return null.\n\t *\n\t * @param type\n\t * Type the service bean is autowired to.\n\t * @param checkExistence\n\t * Flag if bean is required to exist.\n\t * @return Requested service bean or null if bean does not exist and existence is not checked.\n\t */\n\t<T> T getService(Class<T> type, boolean checkExistence);\n\n\t/**\n\t * Lookup for all beans assignable to a given type.\n\t *\n\t * @param type\n\t * Lookup type.\n\t * @return All beans assignable to a given type.\n\t */\n\t<T> IList<T> getObjects(Class<T> type);\n\n\t/**\n\t * Lookup for all beans annotated with a given annotation.\n\t *\n\t * @param type\n\t * Annotation type to look for.\n\t * @return Annotated beans.\n\t */\n\t<T extends Annotation> IList<Object> getAnnotatedObjects(Class<T> type);\n\n\t/**\n\t * Lookup for all beans implementing a given interface.\n\t *\n\t * @param interfaceType\n\t * Interface type to look for.\n\t * @return Implementing beans.\n\t */\n\t<T> IList<T> getImplementingObjects(Class<T> interfaceType);\n\n\t/**\n\t * Links an external bean instance to the contexts dispose life cycle hook.\n\t *\n\t * @param disposableBean\n\t * Bean instance to be disposed with this context.\n\t */\n\tvoid registerDisposable(IDisposableBean disposableBean);\n\n\t/**\n\t * Adds a callback to be executed during context shutdown.\n\t *\n\t * @param disposeCallback\n\t * Callback to be executed.\n\t */\n\tvoid registerDisposeHook(IBackgroundWorkerParamDelegate<IServiceContext> disposeCallback);\n\n\t/**\n\t * Adds an external bean to the context and links it to the contexts dispose life cycle hook.\n\t * Injections are done by the context.\n\t *\n\t * @param object\n\t * External bean instance.\n\t * @return IBeanRuntime to add things to the bean or finish the registration.\n\t */\n\t<V> IBeanRuntime<V> registerWithLifecycle(V object);\n\n\t/**\n\t * Adds an external bean to the context while the context is already running. No injections are\n\t * done by the context.\n\t *\n\t * @param externalBean\n\t * External bean instance.\n\t * @return IBeanRuntime to add things to the bean or finish the registration.\n\t */\n\t<V> IBeanRuntime<V> registerExternalBean(V externalBean);\n\n\t/**\n\t * Registers an anonymous bean while the context is already running.\n\t *\n\t * @param beanType\n\t * Class of the bean to be instantiated.\n\t * @return IBeanRuntime to add things to the bean or finish the registration.\n\t */\n\t<V> IBeanRuntime<V> registerAnonymousBean(Class<V> beanType);\n\n\t/**\n\t * Registers an anonymous bean while the context is already running.\n\t *\n\t * @param beanType\n\t * Class of the bean to be instantiated.\n\t * @return IBeanRuntime to add things to the bean or finish the registration.\n\t */\n\t<V> IBeanRuntime<V> registerBean(Class<V> beanType);\n\n\t/**\n\t * Finder for configuration of a named bean. Makes it possible to read and change the IoC\n\t * configuration of a bean during runtime.\n\t *\n\t * @param beanName\n\t * Name of the bean.\n\t * @return Configuration of a named bean.\n\t */\n\tIBeanConfiguration getBeanConfiguration(String beanName);\n\n\t/**\n\t * Disabled.\n\t *\n\t * @param sb\n\t * Target StringBuilder.\n\t */\n\tvoid printContent(StringBuilder sb);\n}", "protected void unsetConfigurationContextService(ConfigurationContextService service) {\n if (log.isDebugEnabled()) {\n log.debug(\n \"carbon-registry deployment synchronizer component unbound from the configuration context service\");\n }\n RegistryServiceReferenceHolder.setEventingService(null);\n }", "void setContext(Map<String, Object> context);", "public interface StatefulServiceInterface extends ServiceInterface {\n\n \n /**\n * Perform whatever passivation is possible or throw an exception.\n * A good passivation method will free up as much memory as\n * possible, most likely by storing it to disk. A call to\n * passivate should be safe even if the service is already\n * passivated.\n */\n void passivate();\n \n /**\n * Completely restore this service for active use from whatever\n * passivation it has implemented. A call to activate should be\n * safe even if the service is already activated.\n */\n void activate();\n\n /**\n * signals the end of the service lifecycle. Resources such as Sessions can\n * be released. All further calls will throw an exception.\n */\n void close();\n\n /**\n * Returns the current {@link IEventContext} for this instance. This is\n * useful for later identifying changes made by this {@link Event}.\n */\n IEventContext getCurrentEventContext();\n}", "public void setContextObject(Object co) {\n context = co;\n }", "ServiceEndpointPolicy.DefinitionStages.Blank define(String name);", "StatePacBuilder operationalState(OperationalState operationalState);", "private void loadPolicy() {\n loadSavedGlobalSetting();\n loadDefaultPolicy();\n loadSavedSetting();\n saveSetting();\n }", "public void active(CallerContext cc)\n {\n }", "public void start(BundleContext context) throws Exception {\n\t\tServiceReference<ConfigurationAdmin> serviceReference = context\n\t\t\t\t.getServiceReference(ConfigurationAdmin.class);\n\t\ttry {\n\t\t\tConfigurationAdmin cm = context\n\t\t\t\t\t.getService(serviceReference);\n\t\t\tConfiguration config = cm\n\t\t\t\t\t.getConfiguration(CMControl.PACKAGE\n\t\t\t\t\t+ \".tb2pid.\"\n\t\t\t\t\t+ ConfigurationListenerImpl.LISTENER_PID_SUFFIX);\n\t\t\tDictionary<String,Object> props = new Hashtable<>();\n\t\t\tprops.put(\"key\", \"value1\");\n\t\t\tconfig.update(props);\n\t\t\tconfig.delete();\n\t\t\tconfig = cm\n\t\t\t\t\t.createFactoryConfiguration(CMControl.PACKAGE\n\t\t\t\t\t+ \".tb2factorypid.\"\n\t\t\t\t\t+ ConfigurationListenerImpl.LISTENER_PID_SUFFIX);\n\t\t\tconfig.update(props);\n\t\t\tconfig.delete();\n\t\t}\n\t\tfinally {\n\t\t\tcontext.ungetService(serviceReference);\n\t\t}\n\t}", "public void setState(Context.ContextState state)\n\t{\n\t this.state = state;\n\t}", "private AuthService() {\n configureAccessTokens();\n configure();\n ConfigurationWatcher.registerListener(this, JOSSO_GATEWAY_CONFIGURATION.getAbsolutePath());\n ConfigurationWatcher.registerListener(this, FOUNDATION_CONFIGURATION.getAbsolutePath());\n log.debug(\"AuthService listening for changes to \" + JOSSO_GATEWAY_CONFIGURATION + \" and \" + FOUNDATION_CONFIGURATION);\n }", "public void enableUpdates(boolean state) {\n sEnableUpdate = state;\n }", "public void delete() throws PolicyContextException\n {\n\tcheckSetPolicyPermission();\n\tsynchronized(refreshLock) {\n\t try {\n\t\tremovePolicy();\n\t } finally {\n\t\tsetState(DELETED_STATE);\n\t }\n\t}\n }", "public void setPreference(HttpServletRequest request) throws Exception {\n\t\tString setPrefID = (String) ((request.getParameter(\"inptPrefID\") != null)?request.getParameter(\"inptPrefID\"):request.getAttribute(\"inptPrefID\"));\n\t\tpreparedStatement = connect.prepareStatement(\"UPDATE ch_preferences set status = '0' WHERE id <> \" + setPrefID);\n\t\tpreparedStatement.executeUpdate();\n\t\tpreparedStatement = connect.prepareStatement(\"UPDATE ch_preferences set status = '1' WHERE id = \" + setPrefID);\n\t\tpreparedStatement.executeUpdate();\n\t\t\n\t}", "public Map getServicesInUseMap() {\n \t\tsynchronized (contextLock) {\n \t\t\treturn servicesInUse;\n \t\t}\n \t}" ]
[ "0.62898225", "0.5159561", "0.50851935", "0.48832992", "0.48589656", "0.4800089", "0.47957882", "0.47924584", "0.4710724", "0.46954417", "0.46742126", "0.46533453", "0.4623091", "0.46117857", "0.455795", "0.45469528", "0.45047483", "0.4502832", "0.44927168", "0.44593742", "0.44542825", "0.44464612", "0.44390815", "0.4431174", "0.44283453", "0.44146377", "0.4398285", "0.4377401", "0.436421", "0.43602678", "0.43512806", "0.43395486", "0.43218642", "0.4319959", "0.43185252", "0.4313937", "0.4297268", "0.42952055", "0.4292091", "0.4289181", "0.42718723", "0.42673883", "0.42661652", "0.42616844", "0.4258412", "0.4252411", "0.4245837", "0.42432728", "0.42397955", "0.42371446", "0.42181808", "0.4212092", "0.4203009", "0.41977835", "0.41943488", "0.41895178", "0.41895178", "0.41814393", "0.41718912", "0.41693488", "0.41680223", "0.41658443", "0.41657597", "0.4162956", "0.41607714", "0.41574663", "0.41437903", "0.41425666", "0.41359058", "0.41332132", "0.41328752", "0.41315016", "0.41293436", "0.4127111", "0.41269067", "0.41238895", "0.4119635", "0.4116284", "0.4105145", "0.40933314", "0.40893698", "0.40845034", "0.40712443", "0.4069009", "0.40570906", "0.40521207", "0.40393874", "0.40389428", "0.40382966", "0.40340433", "0.40328065", "0.403065", "0.40302148", "0.4027256", "0.4027057", "0.4025852", "0.40209496", "0.40167177", "0.4013415", "0.40056372" ]
0.53479165
1
Creates a relationship between this configuration and another such that they share the same principaltorole mappings. PolicyConfigurations are linked to apply a common principaltorole mapping to multiple seperately manageable PolicyConfigurations, as is required when an application is composed of multiple modules. Note that the policy statements which comprise a role, or comprise the excluded or unchecked policy collections in a PolicyConfiguration are unaffected by the configuration being linked to another.
public void linkConfiguration(PolicyConfiguration link) throws PolicyContextException { assertStateIsOpen(); String linkId = link.getContextID(); if (this.CONTEXT_ID == linkId) { String defMsg="Operation attempted to link PolicyConfiguration to itself."; String msg=localStrings.getLocalString("pc.unsupported_link_operation",defMsg); logger.log(Level.WARNING,msg); throw new IllegalArgumentException(defMsg); } checkSetPolicyPermission(); updateLinkTable(linkId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createASPolicy(){\n\t\t\n\t\t// First create for replicated objects\n\t\t//System.out.println(\"Inside ObjectBasedAnalyzer: createASPolicy\");\n\t\t\n\t\tcreateReplicatedObjectsPolicy();\n\t\t\t\t\n\t\t// Now for rest of objects\n\t\t\n//\t\tcreateOnlyDistributedObjectsPolicy();\n\t\t\n\t\tIterator<String> iap = ASPolicyMap.keySet().iterator();\n\t\t\n\t\tSystem.out.println(\"---------------ASPolicy Start------------------\");\n//\t\t\n\t\twhile(iap.hasNext()){\n//\t\t\t\n//\t\t\t\n\t\t\tString serId = iap.next();\n\t\t\tSystem.out.println(\"AS Policy for:\" + serId);\n\t\t\tmanager.getASServer(serId).currentPolicy = ASPolicyMap.get(serId);\n\t\t\tSystem.out.println(\"No of policy entries for this server are:\" + manager.getASServer(serId).currentPolicy.policyMap.size());\n\t\t}\n//\t\t\n\t\tSystem.out.println(\"---------------ASPolicy End------------------\");\n\t\t\t\t\t\t\n\t}", "public void createReplicatedObjectsPolicy(){\n\t\t\n\t\tIterator<String> it = serverList.keySet().iterator();\n\t\twhile(it.hasNext()){\n\t\t\tString serverId = it.next();\n\t\t\t//System.out.println(\"Server ID: \" + serverId);\n\t\t\tASPolicyMap.put(serverId, new AppServerPolicy());\n\t\t}\n\t\t\n\t\tIterator<CacheObject> cit = candidateReplicationList.iterator();\n\t\t\n\t\twhile(cit.hasNext()){\n\t\t\t\n\t\t\tCacheObject ct = cit.next();\n\t\t\tIterator<String> itemp = serverList.keySet().iterator();\n\t\t\twhile(itemp.hasNext()){\n\t\t\t\tString serverId = itemp.next();\n\t\t\t\tRuleList rl = new RuleList(serverId, RuleList.REPLICATE, RuleList.STABLE_TTL, new ArrayList<String>(serverList.keySet()));\n\t\t\t\tListKey lk = new ListKey();\n\t\t\t\tlk.addtoListKey(ct.cacheKey);\n\t\t\t\tASPolicyMap.get(serverId).addNewPolicy(lk, rl);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void addImpliedRelationship(String parentTableName, String childTableName, String fkColumnName) {\n if (parentTableName.equalsIgnoreCase(childTableName)) {\n return;\n }\n \n // Don't create a relationship if one already exists in the config\n Iterator i = config.getRelationship().iterator();\n while (i.hasNext()) {\n Relationship r = (Relationship) i.next();\n if (r.getPrimaryKeyTable().equals(parentTableName) && r.getForeignKeyTable().equals(childTableName)) {\n return;\n }\n }\n \n Relationship r = FACTORY.createRelationship();\n r.setName(childTableName);\n r.setPrimaryKeyTable(parentTableName);\n r.setForeignKeyTable(childTableName);\n \n KeyPair pair = FACTORY.createKeyPair();\n pair.setPrimaryKeyColumn(\"ID\");\n pair.setForeignKeyColumn(fkColumnName);\n \n r.getKeyPair().add(pair);\n r.setMany(true);\n \n config.getRelationship().add(r);\n }", "public void addPolicy(Policy policy) throws APIManagementException {\n\n if (policy instanceof APIPolicy) {\n APIPolicy apiPolicy = (APIPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getAPIPolicy(userNameWithoutChange, apiPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Advanced Policy with name \" + apiPolicy.getPolicyName() + \" already exists\");\n }\n apiPolicy.setUserLevel(PolicyConstants.ACROSS_ALL);\n apiPolicy = apiMgtDAO.addAPIPolicy(apiPolicy);\n List<Integer> addedConditionGroupIds = new ArrayList<>();\n for (Pipeline pipeline : apiPolicy.getPipelines()) {\n addedConditionGroupIds.add(pipeline.getId());\n }\n APIPolicyEvent apiPolicyEvent = new APIPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n apiPolicy.getTenantDomain(), apiPolicy.getPolicyId(), apiPolicy.getPolicyName(),\n apiPolicy.getDefaultQuotaPolicy().getType(), addedConditionGroupIds, null);\n APIUtil.sendNotification(apiPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof ApplicationPolicy) {\n ApplicationPolicy appPolicy = (ApplicationPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getApplicationPolicy(userNameWithoutChange, appPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Application Policy with name \" + appPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addApplicationPolicy(appPolicy);\n //policy id is not set. retrieving policy to get the id.\n ApplicationPolicy retrievedPolicy = apiMgtDAO.getApplicationPolicy(appPolicy.getPolicyName(), tenantId);\n ApplicationPolicyEvent applicationPolicyEvent = new ApplicationPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n appPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(), appPolicy.getPolicyName(),\n appPolicy.getDefaultQuotaPolicy().getType());\n APIUtil.sendNotification(applicationPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof SubscriptionPolicy) {\n SubscriptionPolicy subPolicy = (SubscriptionPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getSubscriptionPolicy(userNameWithoutChange, subPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Subscription Policy with name \" + subPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addSubscriptionPolicy(subPolicy);\n String monetizationPlan = subPolicy.getMonetizationPlan();\n Map<String, String> monetizationPlanProperties = subPolicy.getMonetizationPlanProperties();\n if (StringUtils.isNotBlank(monetizationPlan) && MapUtils.isNotEmpty(monetizationPlanProperties)) {\n createMonetizationPlan(subPolicy);\n }\n //policy id is not set. retrieving policy to get the id.\n SubscriptionPolicy retrievedPolicy = apiMgtDAO.getSubscriptionPolicy(subPolicy.getPolicyName(), tenantId);\n SubscriptionPolicyEvent subscriptionPolicyEvent = new SubscriptionPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId, subPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n subPolicy.getPolicyName(), subPolicy.getDefaultQuotaPolicy().getType(),\n subPolicy.getRateLimitCount(),subPolicy.getRateLimitTimeUnit(), subPolicy.isStopOnQuotaReach(),\n subPolicy.getGraphQLMaxDepth(),subPolicy.getGraphQLMaxComplexity(),subPolicy.getSubscriberCount());\n APIUtil.sendNotification(subscriptionPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof GlobalPolicy) {\n GlobalPolicy globalPolicy = (GlobalPolicy) policy;\n\n // checking if policy already exist\n Policy existingPolicy = getGlobalPolicy(globalPolicy.getPolicyName());\n if (existingPolicy != null) {\n throw new APIManagementException(\"Policy name already exists\");\n }\n\n apiMgtDAO.addGlobalPolicy(globalPolicy);\n\n KeyTemplateEvent keyTemplateEvent = new KeyTemplateEvent(UUID.randomUUID().toString(), System.currentTimeMillis(),\n APIConstants.EventType.CUSTOM_POLICY_ADD.name(), tenantId, tenantDomain,\n \"add\", globalPolicy.getKeyTemplate());\n APIUtil.sendNotification(keyTemplateEvent, APIConstants.NotifierType.KEY_TEMPLATE.name());\n\n GlobalPolicy retrievedPolicy = apiMgtDAO.getGlobalPolicy(globalPolicy.getPolicyName());\n GlobalPolicyEvent globalPolicyEvent = new GlobalPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n globalPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n globalPolicy.getPolicyName());\n APIUtil.sendNotification(globalPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else {\n String msg = \"Policy type \" + policy.getClass().getName() + \" is not supported\";\n log.error(msg);\n throw new UnsupportedPolicyTypeException(msg);\n }\n }", "public interface AssociationClassConfiguration extends AssociationClass, ClassConfiguration, AssociationConfiguration {\n}", "private void setMigratedPolicyIdsToPolicies(API api, Map<String, String> clonedPoliciesMap,\n boolean updatePolicyMapping) throws APIManagementException {\n\n boolean policyUpdated = false;\n for (OperationPolicy policy : api.getApiPolicies()) {\n if (policy.getPolicyId() == null) {\n if (clonedPoliciesMap.containsKey(policy.getPolicyName())) {\n policy.setPolicyId(clonedPoliciesMap.get(policy.getPolicyName()));\n policyUpdated = true;\n }\n }\n }\n if (policyUpdated && updatePolicyMapping) {\n apiMgtDAO.addAPILevelPolicies(api.getApiPolicies(), api.getUuid(), null, tenantDomain);\n }\n }", "private void generatePermissions() \n\n\tthrows java.io.FileNotFoundException, java.io.IOException {\n\n\tif (!writeOnCommit) return;\n\n\t// otherwise proceed to write policy file\n\n\tMap roleToSubjectMap = null;\n SecurityRoleMapperFactory factory=SecurityRoleMapperFactoryGen.getSecurityRoleMapperFactory();\n\tif (rolePermissionsTable != null) {\n\t // Make sure a role to subject map has been defined for the Policy Context\n\t if (factory != null) {\n // the rolemapper is stored against the\n // appname, for a web app get the appname for this contextid\n SecurityRoleMapper srm = factory.getRoleMapper(CONTEXT_ID);\n\t\tif (srm != null) {\n\t\t roleToSubjectMap = srm.getRoleToSubjectMapping();\n\t\t}\n\t\tif (roleToSubjectMap != null) {\n\t\t // make sure all liked PC's have the same roleToSubjectMap\n\t\t Set linkSet = (Set) fact.getLinkTable().get(CONTEXT_ID);\n\t\t if (linkSet != null) {\n\t\t\tIterator it = linkSet.iterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t String contextId = (String)it.next();\n\t\t\t if (!CONTEXT_ID.equals(contextId)) {\n\t\t\t\tSecurityRoleMapper otherSrm = factory.getRoleMapper(contextId);\n\t\t\t\tMap otherRoleToSubjectMap = null;\n\n\t\t\t\tif (otherSrm != null) {\n\t\t\t\t otherRoleToSubjectMap = otherSrm.getRoleToSubjectMapping();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (otherRoleToSubjectMap != roleToSubjectMap) {\n String defMsg=\"Linked policy contexts have different roleToSubjectMaps (\"+CONTEXT_ID+\")<->(\"+contextId+\")\";\n String msg=localStrings.getLocalString(\"pc.linked_with_different_role_maps\",defMsg,new Object []{CONTEXT_ID,contextId});\n\t\t\t\t logger.log(Level.SEVERE,msg); \n\t\t\t\t throw new RuntimeException(defMsg);\n\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t}\n\n\tif (roleToSubjectMap == null && rolePermissionsTable != null) {\n String defMsg=\"This application has no role mapper factory defined\";\n String msg=localStrings.getLocalString(\"pc.role_map_not_defined_at_commit\",defMsg,new Object []{CONTEXT_ID});\n\t logger.log(Level.SEVERE,msg);\n\t throw new RuntimeException\n\t\t(localStrings.getLocalString\n\t\t (\"enterprise.deployment.deployment.norolemapperfactorydefine\",defMsg));\n\t}\n\n\tPolicyParser parser = new PolicyParser(false);\n\n\t// load unchecked grants in parser\n\tif (uncheckedPermissions != null) {\n\t Enumeration pEnum = uncheckedPermissions.elements();\n\t if (pEnum.hasMoreElements()) {\n\t\tGrantEntry grant = new GrantEntry();\n\t\twhile (pEnum.hasMoreElements()) {\n\t\t Permission p = (Permission) pEnum.nextElement();\n\t\t PermissionEntry entry = \n\t\t\tnew PermissionEntry(p.getClass().getName(),\n\t\t\t\t\t p.getName(),p.getActions());\n\t\t grant.add(entry);\n\t\t}\n\t\tparser.add(grant);\n\t }\n\t}\n\n\t// load role based grants in parser\n\tif (rolePermissionsTable != null) {\n\t Iterator roleIt = rolePermissionsTable.keySet().iterator();\n\t while (roleIt.hasNext()) {\n\t\tboolean withPrincipals = false;\n\t\tString roleName = (String) roleIt.next();\n\t\tPermissions rolePerms = getRolePermissions(roleName);\n\t\tSubject rolePrincipals = (Subject) roleToSubjectMap.get(roleName);\n\t\tif (rolePrincipals != null) {\n\t\t Iterator pit = rolePrincipals.getPrincipals().iterator();\n\t\t while (pit.hasNext()){\n\t\t\tPrincipal prin = (Principal) pit.next();\n\t\t\tassert prin instanceof java.security.Principal;\n\t\t\tif (prin instanceof java.security.Principal) {\n\t\t\t withPrincipals = true;\n\t\t\t PrincipalEntry prinEntry = \n\t\t\t\tnew PrincipalEntry(prin.getClass().getName(),\n\t\t\t\t\t\t escapeName(prin.getName()));\n\t\t\t GrantEntry grant = new GrantEntry();\n\t\t\t grant.principals.add(prinEntry);\n\t\t\t Enumeration pEnum = rolePerms.elements();\n\t\t\t while (pEnum.hasMoreElements()) {\n\t\t\t\tPermission perm = (Permission) pEnum.nextElement();\n\t\t\t\tPermissionEntry permEntry = \n\t\t\t\t new PermissionEntry(perm.getClass().getName(),\n\t\t\t\t\t\t\tperm.getName(),\n\t\t\t\t\t\t\tperm.getActions());\n\t\t\t\tgrant.add(permEntry);\n\t\t\t }\n\t\t\t parser.add(grant);\n\t\t\t}\n\t\t\telse {\n String msg = localStrings.getLocalString(\"pc.non_principal_mapped_to_role\",\n \"non principal mapped to role \"+roleName,new Object[]{prin,roleName});\n\t\t\t logger.log(Level.WARNING,msg);\n\t\t\t}\n\t\t }\n\t\t} \n\t\tif (!withPrincipals) {\n String msg = localStrings.getLocalString(\"pc.no_principals_mapped_to_role\",\n \"no principals mapped to role \"+roleName, new Object []{ roleName});\n\t\t logger.log(Level.WARNING,msg);\n\t\t}\n\t }\n\t}\n\n\twriteOnCommit = createPolicyFile(true,parser,writeOnCommit);\n\n\t// load excluded perms in excluded parser\n\tif (excludedPermissions != null) {\n\n\t PolicyParser excludedParser = new PolicyParser(false);\n\n\t Enumeration pEnum = excludedPermissions.elements();\n\t if (pEnum.hasMoreElements()) {\n\t\tGrantEntry grant = new GrantEntry();\n\t\twhile (pEnum.hasMoreElements()) {\n\t\t Permission p = (Permission) pEnum.nextElement();\n\t\t PermissionEntry entry = \n\t\t\tnew PermissionEntry(p.getClass().getName(),\n\t\t\t\t\t p.getName(),p.getActions());\n\t\t grant.add(entry);\n\t\t}\n\t\texcludedParser.add(grant);\n\t }\n\n\t writeOnCommit = createPolicyFile(false,excludedParser,writeOnCommit);\n\t} \n\n\tif (!writeOnCommit) wasRefreshed = false;\n }", "private RelationMapping createRelationMapping(RoleSchema role, EJB ejb, Table table, Table relatedTable) throws DeploymentException {\n Map columnNameMapping = role.getPkMapping();\n LinkedHashMap ejbFieldMappings = new LinkedHashMap();\n LinkedHashMap columnMappings = new LinkedHashMap();\n for (Iterator iterator = table.getPrimaryKeyFields().iterator(); iterator.hasNext();) {\n Column column = (Column) iterator.next();\n \n // -- column names\n String columnName = column.getPhysicalName();\n String relatedColumnName = (String) columnNameMapping.get(columnName);\n if (null == relatedColumnName) {\n throw new DeploymentException(\"Role \" + role + \" is misconfigured: primary key column [\" +\n columnName + \"] is not mapped to a foreign key.\");\n }\n \n // -- field Names\n String ejbFieldName = column.getName();\n String relatedEjbFieldName = relatedColumnName;\n for (Iterator iter = relatedTable.getAttributes().iterator(); iter.hasNext();) {\n Column relatedTableColumn = (Column) iter.next();\n if (relatedTableColumn.getPhysicalName().equals(relatedColumnName)) {\n relatedEjbFieldName = relatedTableColumn.getName();\n break;\n }\n }\n \n // -- create related ejb field\n FKField relatedEjbField = new FKField(relatedEjbFieldName, relatedColumnName, column.getType());\n ejbFieldMappings.put(ejb.getAttribute(ejbFieldName), relatedEjbField);\n \n \n // -- create related column\n FKColumn relatedcolumn = new FKColumn(relatedEjbFieldName, relatedColumnName, column.getType());\n if (column.isSQLTypeSet()) {\n relatedcolumn.setSQLType(column.getSQLType());\n }\n if (column.isTypeConverterSet()) {\n relatedcolumn.setTypeConverter(column.getTypeConverter());\n }\n columnMappings.put(column, relatedcolumn);\n }\n return new RelationMapping(ejbFieldMappings, columnMappings);\n }", "protected void setPolicy(LinkedHashMap<String, Vector<String>> policy) {\r\n\r\n\t\t// get all the parameters from config file\r\n\t\tVector<String> policyFrom = parameters.get(\"/Domains/POLICY/@from\");\r\n\t\tVector<String> policyTo = parameters.get(\"/Domains/POLICY/@to\");\r\n\t\tVector<String> policyBy = parameters.get(\"/Domains/POLICY/@by\");\r\n\r\n\t\tfor (int i = 0; i < policyFrom.size(); i++) {\r\n\t\t\tVector<String> temp = new Vector<String>();\r\n\t\t\t// if the policy entry has a comma (,), there`s a multiple possible\r\n\t\t\t// transit domain\r\n\t\t\tif (policyBy.get(i).contains(\",\")) {\r\n\t\t\t\tString[] policyHop = policyBy.get(i).split(\",\");\r\n\t\t\t\tfor (int p = 0; p < policyHop.length; p++) {\r\n\t\t\t\t\ttemp.add(policyHop[p]);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// otherwise, just add the hop in the config file\r\n\t\t\t\t// All the policies with only one path, will apply this\r\n\t\t\t\ttemp.add(policyBy.get(i));\r\n\t\t\t}\r\n\t\t\tpolicy.put(policyFrom.get(i) + \"-\" + policyTo.get(i), temp);\r\n\t\t}\r\n\r\n\t}", "public Association associate(Node otherNode, QName associationTypeQName, Directionality directionality);", "public void addPolicy(Policy policy) throws PolicyException {\n\n // Add BlueprintPolicy\n if (policy instanceof BlueprintPolicy) {\n if (erectors.get(policy.getTarget()) == null) {\n throw new PolicyException(\"Blueprint does not exist for BlueprintPolicy target: \" + policy.getTarget());\n }\n\n List<BlueprintPolicy> policies = blueprintPolicies.get(policy.getTarget());\n if (policies == null) {\n policies = new ArrayList<BlueprintPolicy>();\n }\n\n policies.add((BlueprintPolicy) policy);\n\n logger.info(\"Setting BlueprintPolicy {} for {}\", policy, policy.getTarget());\n\n blueprintPolicies.put(policy.getTarget(), policies);\n\n // Add FieldPolicy\n } else if (policy instanceof FieldPolicy) {\n\n // XXX: force FieldPolicy's to be mapped to a blueprint? Limits their scope, but enables validation\n if (erectors.get(policy.getTarget()) == null) {\n throw new PolicyException(\"Blueprint does not exist for FieldPolicy target: \" + policy.getTarget());\n }\n\n List<FieldPolicy> policies = fieldPolicies.get(policy.getTarget());\n if (policies == null) {\n policies = new ArrayList<FieldPolicy>();\n }\n\n policies.add((FieldPolicy) policy);\n\n logger.info(\"Setting FieldPolicy {} for {}\", policy, policy.getTarget());\n\n fieldPolicies.put(policy.getTarget(), policies);\n }\n }", "Relationship createRelationship();", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Configuration createConfiguration();", "public CancellationPolicy addCancellationPolicy(CancellationPolicy newPolicy) throws Exception {\n List<ExpediaRules> expediaRules = newPolicy.getRules();\n expediaRules.forEach((rule) -> {\n rule.setPolicy(newPolicy);\n });\n newPolicy.setRules(expediaRules);\n newPolicy.setPolicyUpdatedOn();\n newPolicy.setPolicyUpdatedBy(\"Tester\");\n CancellationPolicy addedPolicy = cancellationPolicyRepository.save(newPolicy);\n return addedPolicy;\n }", "private void configureConnectionPerms() throws ConfigurationException\n {\n boolean hasAllows= false, hasDenies= false;\n\n String[] allows= cfg.getAll (\"allow\");\n if (allows != null && allows.length > 0) {\n hasAllows= true;\n\n for (String allowIP : allows) {\n allowIP= allowIP.trim();\n\n if (allowIP.indexOf('*') == -1) { // specific IP with no wildcards\n specificIPPerms.put(allowIP, true);\n } else { // there's a wildcard\n wildcardAllow= (wildcardAllow == null) ? new ArrayList<>() : wildcardAllow;\n String[] parts= allowIP.split(\"[*]\");\n wildcardAllow.add(parts[0]); // keep only the first part\n }\n }\n }\n\n String[] denies= cfg.getAll (\"deny\");\n if (denies != null && denies.length > 0) {\n hasDenies= true;\n\n for (String denyIP : denies) {\n boolean conflict= false; // used for a little sanity check\n\n denyIP= denyIP.trim();\n if (denyIP.indexOf('*') == -1) { // specific IP with no wildcards\n Boolean oldVal= specificIPPerms.put(denyIP, false);\n conflict= (oldVal == Boolean.TRUE);\n } else { // there's a wildcard\n wildcardDeny= (wildcardDeny == null) ? new ArrayList<>() : wildcardDeny;\n String[] parts= denyIP.split(\"[*]\");\n if (wildcardAllow != null && wildcardAllow.contains(parts[0]))\n conflict= true;\n else\n wildcardDeny.add(parts[0]); // keep only the first part\n }\n\n if (conflict) {\n throw new ConfigurationException(\n \"Conflicting IP permission in '\"+getName()+\"' configuration: 'deny' \"\n +denyIP+\" while having an identical previous 'allow'.\");\n }\n }\n }\n\n // sum up permission policy and logging type\n ipPermLogPolicy= (!hasAllows && !hasDenies) ? PermLogPolicy.ALLOW_NOLOG : // default when no permissions specified\n ( hasAllows && !hasDenies) ? PermLogPolicy.DENY_LOG :\n (!hasAllows && hasDenies) ? PermLogPolicy.ALLOW_LOG :\n PermLogPolicy.DENY_LOGWARNING; // mixed allows & denies, if nothing matches we'll DENY and log a warning\n }", "@Override\n public Configuration createConfiguration(Connection connection, Configuration configuration) throws SQLException {\n PreparedStatement ps = null;\n try{\n String insertSQL = \"INSERT INTO Configuration (displayName, defaultType, defaultArg1, defaultArg2) VALUES (?, ?, ?, ?);\";\n ps = connection.prepareStatement(insertSQL, Statement.RETURN_GENERATED_KEYS);\n ps.setString(1, configuration.getDisplayName());\n ps.setString(2, configuration.getDefaultType());\n ps.setString(3, configuration.getDefaultArg1()); \n ps.setString(4, configuration.getDefaultArg2()); \n ps.executeUpdate();\n \n ResultSet fullConfiguration = ps.getGeneratedKeys();\n fullConfiguration.next();\n int genKey = fullConfiguration.getInt(1);\n configuration.setConfigurationID((long) genKey);\n \n return configuration;\n }\n catch(Exception ex){\n ex.printStackTrace();\n //System.out.println(\"Exception in ConfigurationDaoImpl.create(2 arg)\");\n if (ps != null && !ps.isClosed()){\n ps.close();\n }\n if (connection != null && !connection.isClosed()){\n connection.close();\n }\n }\n return configuration;\n }", "@NotNull public Builder boardingPolicy(@NotNull BoardingPolicyType boardingPolicyType) {\n putValue(\"boardingPolicy\", boardingPolicyType);\n return this;\n }", "public HostToGroupMapping(Configuration configuration) {\n \tthis.configurationRef = new SoftReference(configuration);\n }", "void create_relationship(EntityIdentifier id1, EntityIdentifier id2, String description) {\n //a relationship is defined as two entities (table, id) and a description\n\n //description is empty\n if (description.isEmpty()) {\n throw new RuntimeException(\"Description can not be empty.\");\n }\n\n LinkedList<String> attributes = new LinkedList<>();\n attributes.add(id1.toString());\n attributes.add(id2.toString());\n attributes.add(description);\n this.create_entity(\"relationship\", attributes);\n\n }", "@Test\n public void test11RelationshipConfigIdName() throws Exception\n {\n Collection<PSConfig> configs = ms_cms.findAllConfigs();\n assertTrue(configs.size() == 2);\n \n List<PSRelationshipConfigName> aaList = \n ms_cms.findRelationshipConfigNames(\"%Assembly%\");\n for (PSRelationshipConfigName cfg : aaList)\n {\n assertTrue(cfg.getName().contains(\"Assembly\"));\n }\n \n PSConfig cfg = ms_cms.findConfig(\n PSConfigurationFactory.RELATIONSHIPS_CFG);\n assertNotNull(cfg);\n \n PSRelationshipConfigSet relConfigSet = loadRelationshipConfigSet();\n\n //\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\\n // Negative testing various operations on SYSTEM relationship configs\n //\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\\n \n // modify an id of a system relationship config\n PSRelationshipConfig sysConfig = relConfigSet\n .getConfig(PSRelationshipConfig.TYPE_FOLDER_CONTENT);\n try\n {\n sysConfig.setId(100);\n // above line should fail, cannot set id to an object which already\n // has an assigned id.\n assertTrue(false); \n }\n catch (Exception e) {}\n sysConfig.resetId();\n sysConfig.setId(100); \n try\n {\n saveRelationshipConfigSet(relConfigSet, cfg);\n // above line should fail, id of a system config cannot be modified.\n assertTrue(false); \n }\n catch (Exception e) {}\n\n try\n {\n relConfigSet.deleteConfig(sysConfig.getName());\n // above line should fail, cannot delete a system config.\n assertTrue(false); \n }\n catch (Exception e) {}\n \n //\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\\n // Negative testing various operations on USER relationship configs\n //\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\\n \n relConfigSet = loadRelationshipConfigSet();\n PSRelationshipConfig userConfig = (PSRelationshipConfig) relConfigSet\n .getConfig(PSRelationshipConfig.TYPE_FOLDER_CONTENT).clone();\n userConfig.setType(PSRelationshipConfig.RS_TYPE_USER);\n userConfig.resetId();\n relConfigSet.add(userConfig);\n try\n {\n saveRelationshipConfigSet(relConfigSet, cfg);\n // above line should fail, cannot save with a user config with DUP-NAME.\n assertTrue(false); \n }\n catch (Exception e) {}\n\n userConfig.setName(\"myFolderContent\");\n userConfig.resetId();\n userConfig.setId(\n PSRelationshipConfig.SysConfigEnum.FOLDER_CONTENT.getId());\n try\n {\n saveRelationshipConfigSet(relConfigSet, cfg);\n // above line should fail, cannot save with a user config with DUP-ID.\n assertTrue(false); \n }\n catch (Exception e) {}\n \n }", "public void setupSchemaElementRelationship(String endOneGUID,\n String endTwoGUID,\n String relationshipTypeName,\n RelationshipProperties properties) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException\n {\n apiManagerClient.setupSchemaElementRelationship(userId, apiManagerGUID, apiManagerName, endOneGUID, endTwoGUID, relationshipTypeName, properties);\n }", "private PSRelationshipConfigSet loadRelationshipConfigSet()\n throws PSException\n {\n return new PSRelationshipConfigSet(PSConfigManager.getInstance()\n .getXMLConfig(PSConfigurationFactory.RELATIONSHIPS_CFG)\n .getDocumentElement(), null, null);\n }", "@Contribute(BuilderDirector.class)\n\tpublic static void addBuilders(MappedConfiguration<Class, Builder> configuration)\n\t{\n//\t\tconfiguration.add(org.tynamo.examples.recipe.model.Recipe.class, new RecipeBuilder());\n\t}", "public Policy combinePolicies(Policy p1, Policy p2,\n\t\t\tArrayList<Integer> trust_vals, ArrayList<Double> weights,\n\t\t\tString policy_id, String policy_entity, String data_stream_type,\n\t\t\tString entity_type) {\n\t\t\n\t\tPolicy downstreamPolicy = new Policy();\n\t\tdownstreamPolicy.policy_id = policy_id;\n\t\tdownstreamPolicy.data_stream_type = data_stream_type;\n\t\tdownstreamPolicy.data_entity = policy_entity;\n\t\tdownstreamPolicy.data_entity_type = entity_type;\n\t\t\n\t\tArrayList<String> policy_data = new ArrayList<String>();\n\t\t\n\t\t//Combining data windows together\n\t\tArrayList<String> data_windows = combineDataWindows(p1.data_window_prop_funcs, p2.data_window_prop_funcs);\n\t\tpolicy_data.addAll(data_windows);\n\t\t\n\t\t//Combining operations and intents together\n\t\tArrayList<String> data_ops_intents = combineDataOpsAndIntents(p1.data_ops_intents, p2.data_ops_intents);\n\t\tpolicy_data.addAll(data_ops_intents);\n\t\t\n\t\t//Read in the data for this entity\n\t\tdownstreamPolicy.readPolicy(policy_data);\n\t\t\n\t\t//Adding the data methods from the thresholding\n\t\tString data_method = getDataMethodFromThreshold(trust_vals, weights);\n\t\tArrayList<ArrayList<String>> data_method_params = new ArrayList<ArrayList<String>>();\n\t\tArrayList<String> data_method_param = new ArrayList<String>();\n\t\tdata_method_param.add(data_method);\n\t\tdata_method_params.add(data_method_param);\n\t\tdownstreamPolicy.data_methods.put(\"ALL\", data_method_params);\n\t\t\n//\t\tprintNewPolicy(data_windows, data_ops_intents, data_method, \n//\t\t\t\tpolicy_id, data_stream_type, policy_entity, entity_type);\n\t\t\n\t\treturn downstreamPolicy;\n\t}", "protected void migrateMediationPoliciesOfAPI(API api, String organization, boolean updatePolicyMapping)\n throws APIManagementException {\n\n Map<String, String> clonedPoliciesMap = new HashMap<>();\n String apiUUID = api.getUuid();\n\n loadMediationPoliciesToAPI(api, organization);\n\n if (APIUtil.isSequenceDefined(api.getInSequence())) {\n Mediation inSequenceMediation = api.getInSequenceMediation();\n OperationPolicyData existingPolicy = getAPISpecificOperationPolicyByPolicyName(\n inSequenceMediation.getName(), APIConstants.DEFAULT_POLICY_VERSION, api.getUuid(), null,\n organization, false);\n String inFlowPolicyId;\n if (existingPolicy == null) {\n OperationPolicyData inSeqPolicyData =\n APIUtil.getPolicyDataForMediationFlow(api, APIConstants.OPERATION_SEQUENCE_TYPE_REQUEST,\n organization);\n inFlowPolicyId = addAPISpecificOperationPolicy(apiUUID, inSeqPolicyData, organization);\n } else {\n inFlowPolicyId = existingPolicy.getPolicyId();\n }\n clonedPoliciesMap.put(inSequenceMediation.getName(), inFlowPolicyId);\n api.setInSequence(null);\n api.setInSequenceMediation(null);\n }\n\n if (APIUtil.isSequenceDefined(api.getOutSequence())) {\n Mediation outSequenceMediation = api.getOutSequenceMediation();\n OperationPolicyData existingPolicy = getAPISpecificOperationPolicyByPolicyName(\n outSequenceMediation.getName(), APIConstants.DEFAULT_POLICY_VERSION, api.getUuid(), null,\n organization, false);\n String outFlowPolicyId;\n if (existingPolicy == null) {\n OperationPolicyData outSeqPolicyData =\n APIUtil.getPolicyDataForMediationFlow(api, APIConstants.OPERATION_SEQUENCE_TYPE_RESPONSE,\n organization);\n outFlowPolicyId = addAPISpecificOperationPolicy(apiUUID, outSeqPolicyData, organization);\n } else {\n outFlowPolicyId = existingPolicy.getPolicyId();\n }\n clonedPoliciesMap.put(outSequenceMediation.getName(), outFlowPolicyId);\n api.setOutSequence(null);\n api.setOutSequenceMediation(null);\n }\n\n if (APIUtil.isSequenceDefined(api.getFaultSequence())) {\n Mediation faultSequenceMediation = api.getFaultSequenceMediation();\n OperationPolicyData existingPolicy = getAPISpecificOperationPolicyByPolicyName(\n faultSequenceMediation.getName(), APIConstants.DEFAULT_POLICY_VERSION, api.getUuid(), null,\n organization, false);\n String faultFlowPolicyId;\n if (existingPolicy == null) {\n OperationPolicyData faultSeqPolicyData =\n APIUtil.getPolicyDataForMediationFlow(api, APIConstants.OPERATION_SEQUENCE_TYPE_FAULT,\n organization);\n faultFlowPolicyId = addAPISpecificOperationPolicy(apiUUID, faultSeqPolicyData, organization);\n } else {\n faultFlowPolicyId = existingPolicy.getPolicyId();\n }\n\n clonedPoliciesMap.put(faultSequenceMediation.getName(), faultFlowPolicyId);\n api.setFaultSequence(null);\n api.setFaultSequenceMediation(null);\n }\n\n setMigratedPolicyIdsToPolicies(api, clonedPoliciesMap, updatePolicyMapping);\n }", "public static Function<Type, Association> createAssociation(final boolean end1IsNavigable, final AggregationKind end1Aggregation, final String end1Name, final int end1Lower, final int end1Upper, final Type end1Type, final boolean end2IsNavigable, final AggregationKind end2Aggregation, final String end2Name, final int end2Lower, final int end2Upper) {\n return new Function<Type, Association>() {\n public Association apply(Type s) {\n return s.createAssociation(end1IsNavigable, end1Aggregation, end1Name, end1Lower, end1Upper, end1Type, end2IsNavigable, end2Aggregation, end2Name, end2Lower, end2Upper);\n }\n };\n }", "private void setUpRelations() {\n g[0].getAuthorities().add(a[0]);\n g[1].getAuthorities().add(a[0]);\n g[1].getAuthorities().add(a[1]);\n g[2].getAuthorities().add(a[2]);\n\n u[0].getGroups().add(g[0]);\n u[0].getOwnAuthorities().add(a[2]);\n u[1].getGroups().add(g[1]);\n u[1].getOwnAuthorities().add(a[2]);\n u[2].getOwnAuthorities().add(a[2]);\n u[2].getOwnAuthorities().add(a[3]);\n u[3].getGroups().add(g[1]);\n u[3].getGroups().add(g[2]);\n merge();\n }", "public Association associate(Node otherNode, QName associationTypeQName, Directionality directionality, ObjectNode object);", "protected ModelMaker addConfigurationDecorators(ModelMaker sourceMM) {\n\t\t// Insure that these models are created here, and not in the Content.\n\t\tfor (String name : CONFIGURATION_MODELS) {\n\t\t\tsourceMM.getModel(name);\n\t\t}\n\t\treturn sourceMM;\n\t}", "@Test\n void check_combineMappingConfigWithExternal() {\n MappingConfig mappingConfig = new MappingConfig();\n mappingConfig.setPackageName(\"com.kobylynskyi.graphql.test1\");\n\n MappingConfig externalMappingConfig = new MappingConfig();\n externalMappingConfig.setPackageName(\"com.kobylynskyi.graphql.testconfig\");\n mappingConfig.combine(externalMappingConfig);\n assertEquals(mappingConfig.getPackageName(), externalMappingConfig.getPackageName());\n }", "public RelatedClassMap createRelatedClassMap(XMLName elementTypeName)\n throws XMLMiddlewareException\n {\n checkState();\n return super.createRelatedClassMap(elementTypeName);\n }", "private ConcentratorConf addConcentratorConfiguration(Session session,\n ConcentratorConf conf) {\n session.save(conf);\n int id = ((BigInteger) session.createSQLQuery(\"SELECT LAST_INSERT_ID()\")\n .uniqueResult()).intValue();\n conf.setIdConcentratorConf(id);\n return conf;\n }", "@Override\n\t\tpublic Relationship createRelationshipTo(Node otherNode, RelationshipType type) {\n\t\t\treturn null;\n\t\t}", "@Contribute(Neo4JEmbeddedService.class)\n\t@UserGraph\n\tpublic static void contributeTestUserGraph(\n\t\t\tMappedConfiguration<String, String> configuration) {\n\t\tconfiguration.add(\"propertiesFileLocation\", \"TestUserGraph.properties\");\n\t}", "public boolean is_congruent_to (RelayConfig other) {\n\t\tif (relay_mode == other.relay_mode\n\t\t\t&& configured_primary == other.configured_primary) {\n\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void addRelationship(String primaryNickName, String primaryAttribute, String secondaryNickName, String secondaryAttribute)\n {\n AttributeType att1;\n AttributeType att2;\n\n if (primaryAttribute.equals(\"horizontal\"))\n {\n att1=AttributeType.HORIZONTAL_CENTER;\n }\n else if (primaryAttribute.equals(\"vertical\"))\n {\n att1=AttributeType.VERTICAL_CENTER;\n }\n else\n {\n att1=AttributeType.HORIZONTAL_CENTER;\n }\n\n if (secondaryAttribute.equals(\"horizontal\"))\n {\n att2=AttributeType.HORIZONTAL_CENTER;\n }\n else if (secondaryAttribute.equals(\"vertical\"))\n {\n att2=AttributeType.VERTICAL_CENTER;\n }\n else\n {\n att2=AttributeType.HORIZONTAL_CENTER;\n }\n\n if (secondaryNickName.equals(\"container\"))\n {\n secondaryNickName=DependencyManager.ROOT_NAME;\n }\n\n addConstraint(primaryNickName, att1, new AttributeConstraint(secondaryNickName, att2));\n }", "@Override\n protected void configure(Configuration configuration) {\n configuration.addPackage(\"dao.entities\");\n super.configure(configuration);\n }", "@Override\n\tpublic Policy addPolicy(Policy policy) {\n\t\t// TODO Auto-generated method stub\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "@Override\n public void addRelationshipBetweenPhysicalAndPhysical(PhysicalObject physicalObjectA,\n PhysicalObject physicalObjectB, double weight) {\n assert false : \"shouldn't call this method\";\n }", "public Relationship createRelationshipTo( Node otherNode, \n \t\tRelationshipType type );", "@Mapper(componentModel = \"spring\", uses = {GovernorateMapper.class, DelegationMapper.class, UserMapper.class, })\npublic interface PolicyHolderMapper extends EntityMapper <PolicyHolderDTO, PolicyHolder> {\n\n @Mapping(source = \"governorate.id\", target = \"governorateId\")\n @Mapping(source = \"governorate.label\", target = \"governorateLabel\")\n\n @Mapping(source = \"delegation.id\", target = \"delegationId\")\n @Mapping(source = \"delegation.label\", target = \"delegationLabel\")\n\n @Mapping(source = \"creationUser.id\", target = \"creationUserId\")\n @Mapping(source = \"creationUser.login\", target = \"creationUserLogin\")\n\n @Mapping(source = \"updateUser.id\", target = \"updateUserId\")\n @Mapping(source = \"updateUser.login\", target = \"updateUserLogin\")\n PolicyHolderDTO toDto(PolicyHolder policyHolder); \n\n @Mapping(source = \"governorateId\", target = \"governorate\")\n\n @Mapping(source = \"delegationId\", target = \"delegation\")\n\n @Mapping(source = \"creationUserId\", target = \"creationUser\")\n\n @Mapping(source = \"updateUserId\", target = \"updateUser\")\n PolicyHolder toEntity(PolicyHolderDTO policyHolderDTO); \n default PolicyHolder fromId(Long id) {\n if (id == null) {\n return null;\n }\n PolicyHolder policyHolder = new PolicyHolder();\n policyHolder.setId(id);\n return policyHolder;\n }\n}", "PolicyController updatePolicyController(ControllerConfiguration configuration);", "private void createPresenterGinlink(final PsiClass parentModulePsiClass) {\n final PsiMethod configureMethod = findMethod(parentModulePsiClass, \"configure\");\n\n if (configureMethod == null) {\n warn(\"Wasn't able to findMethod Configure in unit: \" + parentModulePsiClass.getName());\n logger.severe(\"createPresenterGinLink() unit did not have configure implementation.\");\n return;\n }\n\n final PsiElementFactory factory = PsiElementFactory.SERVICE.getInstance(project);\n\n // created module import\n final PsiImportStatementModel importStatementModel = new PsiImportStatementModel();\n ApplicationManager.getApplication().invokeAndWait(new Runnable() {\n @Override\n public void run() {\n new WriteCommandAction<Void>(project) {\n @Override\n protected void run(@NotNull Result<Void> result) throws Throwable {\n PsiImportStatement importStatement = factory.createImportStatement(createdModulePsiClass);\n importStatementModel.set(importStatement);\n }\n }.execute();\n }\n }, ModalityState.NON_MODAL);\n\n // create configure method install(new Module());\n final String moduleName = createdModulePsiClass.getName() + \"()\";\n final String installModuleStatement = \"install(new \" + moduleName + \");\";\n\n PsiStatement installStatement = findStatement(configureMethod.getBody(), installModuleStatement, false);\n if (installStatement == null) {\n addIntallStatement(parentModulePsiClass, configureMethod, factory, importStatementModel,\n installModuleStatement);\n }\n\n navigateToClass(parentModulePsiClass);\n }", "public abstract HostToGroupMapping clone(Configuration configuration);", "public Dictionary copyToAnotherMeta(KylinConfig srcConfig, KylinConfig dstConfig) throws IOException {\n return this;\n }", "private void createApplications(){\n Application application;\n Person applicant;\n Role role = roleRepository.findByName(\"applicant\");\n Status status = statusRepository.findByName(\"UNHANDLED\");\n java.sql.Date date = new java.sql.Date(Calendar.getInstance().getTime().getTime());\n\n for (Map.Entry<Long, Long> person : person.entrySet()){\n applicant = personRepository.findById(person.getValue());\n if(applicant.getUser().getRoles().contains(role)){\n Set<CompetenceProfile> competenceProfiles = new HashSet<>();\n Set<Availability> availabilities = new HashSet<>();\n for (Map.Entry<Long, Long> competenceProfile : competenceProfile.entrySet()){\n if(Objects.equals(competenceProfile.getValue(), person.getKey())){\n competenceProfiles.add(competenceProfileRepository.findById(competenceProfile.getKey()));\n }\n }\n for (Map.Entry<Long, Long> availabilitys : availability.entrySet()){\n if(Objects.equals(availabilitys.getValue(), person.getKey())){\n availabilities.add(availabilityRepository.findById(availabilitys.getKey()));\n }\n }\n application = applicationRepository.save(new Application(applicant, null, null, status, date));\n\n application = applicationRepository.findById(application.getId()).get(); //without re-finding this, the we get an optimistic locking error cause version changed within transaction. now new transaction starts and were fine\n application.setAvailabilities(availabilities);\n application.setCompetenceProfiles(competenceProfiles);\n applicationRepository.save(application);\n }\n }\n\n }", "public PairRepresentation(DomainRepresentation left, DomainRepresentation right) {\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t}", "public void createConstraint(ConstraintConfig constraintConfig) throws ConfigurationException;", "public NatPolicy createNatPolicyFromConfig(String ref);", "List<PolicyController> updatePolicyControllers(List<ControllerConfiguration> configuration);", "public void createLBPolicy2(){\n\n\t\tIterator<ASServer> itm = manager.getASServers().values().iterator();\n\t\t\n\t\twhile(itm.hasNext()){\n\t\t\t\n\t\t\tASServer as = itm.next();\n\t\t\tAppServerPolicy ap = as.currentPolicy;\n\t\t\tIterator<ObjectKey> ik = ap.policyMap.keySet().iterator();\n\t\t\t\n\t\t\twhile(ik.hasNext()){\n\t\t\t\t\n\t\t\t\tObjectKey ot = ik.next();\n\t\t\t\t\n\t\t\t\tif(ot instanceof ListKey){\n\t\t\t\t\tListKey tlk = (ListKey) ot;\n\t\t\t\t\tString t = tlk.key;\n\t\t\t\t\t//System.out.println(\"Checking for mapping of :\" + t);\n\t\t\t\t\t\n\t\t\t\t\tif(((ResourceToRequestMap) as.getStruct((String)RequestResourceMappingLogProcessor.OBJ_REQ_MAP)).map.get(t) == null){\n\t\t\t\t\t\t//System.out.println(\"Mapping Map is NULL\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tArrayList<String> test = new ArrayList<String>(((ResourceToRequestMap) as.getStruct((String)RequestResourceMappingLogProcessor.OBJ_REQ_MAP)).map.get(t));\n\t\t\t\t\t\n\t\t\t\t\tIterator<String> itemp = test.iterator();\n\t\t\t\t\t\n\t\t\t\t\twhile(itemp.hasNext()){\n\t\t\t\t\t\n\t\t\t\t\t\tString url = itemp.next();\n\t\t\t\t\t\t\n\t\t\t\t\t\tint[] sc = LBPCreatorMap.get(url);\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(sc == null){\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsc = new int[NO_SERVERS];\n\t\t\t\t\t\t\tsc[as.serverNo]++;\n\t\t\t\t\t\t\tLBPCreatorMap.put(url, sc);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tsc[as.serverNo]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tIterator<String> iturl = LBPCreatorMap.keySet().iterator();\n\t\t\n\t\twhile(iturl.hasNext()){\n\t\t\t\n\t\t\tString url = iturl.next();\n\t\t\t\n\t\t\tint[] sc = LBPCreatorMap.get(url);\n\t\t\t\n\t\t\tint size = sc.length;\n\t\t\tint maxtemp=0;\n\t\t\tint maxindex=0;\n\t\t\tint val;\n\t\t\t\n\t\t\t\n\t\t\tfor(int i=0; i< size; i++){\n\t\t\t\t\n\t\t\t\tval = sc[i];\n\t\t\t\tif(val > maxtemp)\n\t\t\t\t{\n\t\t\t\t\tmaxtemp = val;\n\t\t\t\t\tmaxindex = i;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tString xyz = manager.getASServer(maxindex).serverId;\n\t\t\tthis.currentLBPolicy.mapUrlToServers(url, Analyser.resolveHost(xyz));\n\t\t\t\n\t\t\t\n//\t\t\tif(mLogger.isInfoEnabled()){\n//\t\t\t\tmLogger.log(Priority.INFO, \":\" + url + \": being assigned to: \" + xyz);\n//\t\t\t}\n\t\t\t\n\t\t\tInteger sId = LBDMap.get(xyz);\n\t\t\t\n\t\t\tif(sId == null){\n\t\t\t\tsId=new Integer(1);\n\t\t\t\tLBDMap.put(xyz, sId);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsId++;\n\t\t\t\tLBDMap.put(xyz, sId);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n//\t\tSystem.out.println(\"------------URL ServerCounter start---------------\");\n//\t\t\n//\t\tIterator<String> ilbp = LBPCreatorMap.keySet().iterator();\n//\t\t\n//\t\twhile(ilbp.hasNext()){\n//\t\t\t\n//\t\t\tString url = ilbp.next();\n//\t\t\tint[] pi = LBPCreatorMap.get(url);\n//\t\t\tSystem.out.println(\"url is:\" + url);\n//\t\t\tfor(int i=0; i< pi.length; i++){\n//\t\t\t\tSystem.out.print(\"Site:\"+ i + \":\" + pi[i]);\n//\t\t\t}\n//\t\t}\n//\t\t\n////\t\t//System.out.println(\"Number of entries corresponding to LBPolicy for localhost are: \" + currentLBPolicy.policyMap.values().size() );\n//\t\n//\t\tSystem.out.println(\"------------URL ServerCounter end-----------------\");\n\t\t\n\t\tSystem.out.println(\"------------LBPolicy start---------------\");\n//\t\tSystem.out.println(currentLBPolicy);\n//\t\t\n//\t\tSystem.out.println(\"Number of entries in LBPolicy are: \" + currentLBPolicy.policyMap.size() );\n\t\t\n\t\tIterator<String> itlb = LBDMap.keySet().iterator();\n\t\t\n\t\twhile(itlb.hasNext()){\n\t\t\tString serid = itlb.next();\n\t\t\t\n\t\t\tSystem.out.println(\"Server:\" + serid + \" has been allocated: \" + LBDMap.get(serid) + \" objects\");\n\t\t}\n\t\t\n//\t\n\t\tSystem.out.println(\"------------LBPolicy end-----------------\");\n\t\n\n\t\t\n\t}", "public void addExtHybridResourceRelationship(TaxonModel taxonModel, DwcaWriter dwcaWriter) throws IOException{\n\t\tMap<Term,String> recordValues = new HashMap<Term,String>();\t\t\n\t\tfor(TaxonModel currHybridParent : taxonModel.getHybridparents()){\n\t\t\trecordValues.put(DwcTerm.resourceID, taxonModel.getId().toString());\n\t\t\trecordValues.put(DwcTerm.relatedResourceID, currHybridParent.getId().toString());\n\t\t\trecordValues.put(DwcTerm.relationshipOfResource, HYBRID_PARENT_RELATIONSHIP);\n\t\t\trecordValues.put(DwcTerm.scientificName, currHybridParent.getLookup().getCalnameauthor());\n\t\t\tdwcaWriter.addExtensionRecord(DwcTerm.ResourceRelationship, recordValues);\n\t\t\trecordValues.clear();\n\t\t}\n\t}", "public long a(PolicyResponseData policyResponseData) {\n b.d(\"PolicyDao\", \"addOrUpdatePolicies()\");\n if (policyResponseData == null || policyResponseData.getId() == null || policyResponseData.getVersion() == null || policyResponseData.getPolicy() == null) {\n return -1L;\n }\n ContentValues contentValues = new ContentValues();\n try {\n j.a(policyResponseData.getPolicyObject());\n contentValues.put(\"policyid\", \"ALL_POLICIES\");\n contentValues.put(\"version\", policyResponseData.getVersion());\n contentValues.put(\"content\", policyResponseData.toJson().getBytes());\n long l2 = this.GC.c(\"policies\", contentValues);\n if (l2 < 0L) {\n b.e(\"PolicyDao\", \"cannot add policy\");\n }\n contentValues.clear();\n return l2;\n }\n catch (Exception exception) {\n b.c(\"PolicyDao\", \"add policy exception\", exception);\n return -1L;\n }\n }", "void register(PolicyDefinition policyDefinition);", "void applyConfiguration(Configuration configuration);", "protected void updateConfiguration(final Configuration newConfig) {\n this.privateConfig = new PrivateConfig(newConfig, this);\n }", "public void addRelation(AS otherAS, int myRelationToThem) {\n if (myRelationToThem == AS.PROVIDER_CODE) {\n this.customers.add(otherAS);\n otherAS.providers.add(this);\n } else if (myRelationToThem == AS.PEER_CODE) {\n this.peers.add(otherAS);\n otherAS.peers.add(this);\n } else if (myRelationToThem == AS.CUSTOMER_CODE) {\n this.providers.add(otherAS);\n otherAS.customers.add(this);\n } else if (myRelationToThem == 3) {\n // ignore\n } else {\n System.err.println(\"WTF bad relation: \" + myRelationToThem);\n System.exit(-1);\n }\n this.trafficOverNeighbors.put(otherAS.asn, 0.0);\n otherAS.trafficOverNeighbors.put(this.asn, 0.0);\n this.volatileTraffic.put(otherAS.asn, 0.0);\n otherAS.volatileTraffic.put(this.asn, 0.0);\n this.botTraffic.put(otherAS.asn, 0.0);\n otherAS.botTraffic.put(this.asn, 0.0);\n this.currentVolatileTraffic.put(otherAS.asn, 0.0);\n otherAS.currentVolatileTraffic.put(this.asn, 0.0);\n this.linkCapacities.put(otherAS.asn, new HashMap<Double, Double>());\n otherAS.linkCapacities.put(this.asn, new HashMap<Double, Double>());\n }", "@Test\n public void testToVendorConfiguration_generateNatPoolIpSpaces() {\n A10Configuration a10Configuration = new A10Configuration();\n a10Configuration.setHostname(\"c\");\n String poolName = \"pool\";\n a10Configuration\n .getNatPools()\n .put(poolName, new NatPool(poolName, Ip.parse(\"1.1.1.1\"), Ip.parse(\"1.1.1.10\"), 24));\n Configuration c =\n Iterables.getOnlyElement(a10Configuration.toVendorIndependentConfigurations());\n\n assertThat(\n c.getIpSpaces(),\n equalTo(\n ImmutableMap.of(\n ipSpaceNameForNatPool(poolName),\n IpRange.range(Ip.parse(\"1.1.1.1\"), Ip.parse(\"1.1.1.10\")))));\n }", "public void updateConfig() {\n conf.set(\"racetype\", raceType.name());\n conf.set(\"perkpoints\", perkpoints);\n conf.set(\"health\", getHealth());\n\n if (conf.isSet(\"binds\")) {\n conf.set(\"binds\", null);\n }\n\n if (!binds.getBinds().isEmpty()) {\n for (Bind b : binds.getBinds()) {\n String key = b.getItem().name().toLowerCase() + b.getData();\n conf.set(\"binds.\" + key + \".item\", b.getItem().name());\n conf.set(\"binds.\" + key + \".data\", b.getData());\n List<String> abilities = Lists.newArrayList();\n b.getAbilityTypes().stream().forEach(a -> abilities.add(a.name()));\n conf.set(\"binds.\" + key + \".abilities\", abilities);\n }\n }\n\n\n AbilityFileManager.saveAbilities(this);\n }", "@Test\n public void testSetPolicy2() throws Exception {\n setupPermission(PathUtils.ROOT_PATH, getTestUser().getPrincipal(), true, JCR_READ, JCR_READ_ACCESS_CONTROL, JCR_MODIFY_ACCESS_CONTROL);\n setupPermission(null, getTestUser().getPrincipal(), true, JCR_READ_ACCESS_CONTROL, JCR_MODIFY_ACCESS_CONTROL);\n\n setupPermission(getTestRoot(), null, EveryonePrincipal.getInstance(), false, JCR_NAMESPACE_MANAGEMENT);\n }", "Policy_Repository createPolicy_Repository();", "private void changingRelations(LosConfigDetails owner, LosConfigDetails owned, LosConfigDetails subsidary,\n\t\t\tString commercialSuffix, List<String> childIds, ParentEntityNode parent) {\n\t\tparent.setChildren(Arrays.asList());\n\t\tchildIds.add(parent.getChildId());\n\t\tLong relationId = getConfigId(parent);\n\t\tif ((long) relationId == LOSEntityConstants.OWNER && parent.getParentId().endsWith(commercialSuffix)\n\t\t\t\t&& parent.getChildId().endsWith(commercialSuffix)) {\n\t\t\tparent.setLosConfigDetails(subsidary);\n\t\t} else if ((long) relationId == LOSEntityConstants.OWNER) {\n\t\t\tparent.setLosConfigDetails(owned);\n\t\t} else if ((long) relationId == LOSEntityConstants.OWNED) {\n\t\t\tparent.setLosConfigDetails(owner);\n\t\t} else if ((long) relationId == LOSEntityConstants.SUBSIDIARY) {\n\t\t\tparent.setLosConfigDetails(owner);\n\t\t}\n\t}", "public void newConfig ()\n {\n Class<?> clazz = group.getRawConfigClasses().get(0);\n try {\n ManagedConfig cfg = (ManagedConfig)PreparedEditable.PREPARER.apply(\n clazz.newInstance());\n if (cfg instanceof DerivedConfig) {\n ((DerivedConfig)cfg).cclass = group.getConfigClass();\n }\n newNode(cfg);\n } catch (Exception e) {\n log.warning(\"Failed to instantiate config [class=\" + clazz + \"].\", e);\n }\n }", "private void CreatePIDelegationRules() throws isisicatclient.IcatException_Exception {\n Rule piAddExperimenters = new Rule();\r\n piAddExperimenters.crudFlags = \"C\";\r\n piAddExperimenters.what = \"InvestigationUser <-> Investigation <-> InvestigationUser [role = 'principal_experimenter'] <-> User [name = :user]\";\r\n port.create(sessionId, piAddExperimenters);\r\n }", "@Override\n public ReplicationPolicyEntry mapRow(ResultSet resultSet, int rowNumber)\n throws SQLException {\n ReplicationPolicyEntry replPolicyEntry = new ReplicationPolicyEntry();\n\n // add guid\n Identifier pid = new Identifier();\n pid.setValue(resultSet.getString(\"guid\"));\n replPolicyEntry.setPid(pid);\n\n // add policy type\n String policy = resultSet.getString(\"policy\");\n replPolicyEntry.setPolicy(policy);\n\n // add member node\n String nodeid = resultSet.getString(\"member_node\");\n NodeReference nodeRef = new NodeReference();\n nodeRef.setValue(nodeid);\n replPolicyEntry.setMemberNode(nodeRef);\n\n return replPolicyEntry;\n }", "public InHouseAppIdPolicyIdMapping[] getAssociations() {\r\n\t\treturn associations;\r\n\t}", "public NatPolicy createNatPolicy();", "protected void propagateConfigData() {\n\t\tList<MeshNode> potentialChildren = configData.getChildNodes();\n\t\tList<MeshNode> notChildren = new ArrayList<MeshNode>();\n\t\tList<MeshNode> realChildren = new ArrayList<MeshNode>();\n\t\tfor (MeshNode i : potentialChildren) {\n\t\t\tif (!meshNetwork.probe(this, i)) {\n\t\t\t\tnotChildren.add(i);\n\t\t\t} else {\n\t\t\t\trealChildren.add(i);\n\t\t\t}\n\t\t}\n\t\tint startNumberCnt = 1;\n\t\tfor (MeshNode i : realChildren) {\n\t\t\ti.setStartNumber((startNumberCnt++) + this.startNumber);\n\t\t\tConfigData forExport = new ConfigData(i, notChildren);\n\t\t\tforExport.addParent(this);\n\t\t\tforExport.removeChildNode(i);\n\t\t\tmeshNetwork.sendConfigData(i, this, forExport);\n\t\t\tconfigData.configAckMap.put(i, false);\n\t\t}\n\t\tconfigData.setChildNodes(realChildren);\n\t}", "public interface RelyingPartyConfigurationManager {\n\n /**\n * Gets the configuration for the given relying party.\n * \n * @param relyingPartyEntityID the entity of the relying part to get the configuration for\n * \n * @return configuration for the given relying party\n */\n public RelyingPartyConfiguration getRelyingPartyConfiguration(String relyingPartyEntityID);\n\n /**\n * Gets the registered relying party configurations indexed by relying party ID.\n * \n * @return the registered relying party configurations\n */\n public Map<String, RelyingPartyConfiguration> getRelyingPartyConfigurations();\n\n /**\n * Gets the default relying party configuration.\n * \n * @return the default relying party configuration\n */\n public RelyingPartyConfiguration getDefaultRelyingPartyConfiguration();\n\n /**\n * Gets the relying party configuration to use for anonymous parties.\n * \n * @return the relying party configuration to use for anonymous parties\n */\n public RelyingPartyConfiguration getAnonymousRelyingConfiguration();\n}", "@Override\n public Boolean mergeMsgConfiguration(Configuration configuration) {\n boolean result = isMsgConfigurationExist(configuration.getName());\n if ( !result ) {\n try {\n configurationDao.save(configuration);\n return true;\n } catch (Exception e) {\n logger.error(\"Error when saving configuration\", e);\n }\n }\n return false;\n }", "public static Criteria newAndCreateCriteria() {\n YoungSeckillPromotionProductRelationExample example = new YoungSeckillPromotionProductRelationExample();\n return example.createCriteria();\n }", "@Override\n public Response addCommonOperationPolicy(InputStream policySpecFileInputStream, Attachment policySpecFileDetail,\n InputStream synapsePolicyDefinitionFileInputStream,\n Attachment synapsePolicyDefinitionFileDetail,\n InputStream ccPolicyDefinitionFileInputStream,\n Attachment ccPolicyDefinitionFileDetail,\n MessageContext messageContext) throws APIManagementException {\n\n try {\n OperationPolicyDefinition ccPolicyDefinition = null;\n OperationPolicyDefinition synapseDefinition = null;\n OperationPolicySpecification policySpecification;\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String organization = RestApiUtil.getValidatedOrganization(messageContext);\n\n if (policySpecFileInputStream != null) {\n String jsonContent = \"\";\n jsonContent = RestApiPublisherUtils.readInputStream(policySpecFileInputStream, policySpecFileDetail);\n\n String fileName = policySpecFileDetail.getDataHandler().getName();\n String fileContentType = URLConnection.guessContentTypeFromName(fileName);\n if (org.apache.commons.lang3.StringUtils.isBlank(fileContentType)) {\n fileContentType = policySpecFileDetail.getContentType().toString();\n }\n if (APIConstants.YAML_CONTENT_TYPE.equals(fileContentType)) {\n jsonContent = CommonUtil.yamlToJson(jsonContent);\n }\n policySpecification = APIUtil.getValidatedOperationPolicySpecification(jsonContent);\n\n OperationPolicyData operationPolicyData = new OperationPolicyData();\n operationPolicyData.setOrganization(organization);\n operationPolicyData.setSpecification(policySpecification);\n\n if (synapsePolicyDefinitionFileInputStream != null) {\n String synapsePolicyDefinition =\n RestApiPublisherUtils.readInputStream(synapsePolicyDefinitionFileInputStream,\n synapsePolicyDefinitionFileDetail);\n synapseDefinition = new OperationPolicyDefinition();\n synapseDefinition.setContent(synapsePolicyDefinition);\n synapseDefinition.setGatewayType(OperationPolicyDefinition.GatewayType.Synapse);\n synapseDefinition.setMd5Hash(APIUtil.getMd5OfOperationPolicyDefinition(synapseDefinition));\n operationPolicyData.setSynapsePolicyDefinition(synapseDefinition);\n }\n\n if (ccPolicyDefinitionFileInputStream != null) {\n String choreoConnectPolicyDefinition = RestApiPublisherUtils\n .readInputStream(ccPolicyDefinitionFileInputStream, ccPolicyDefinitionFileDetail);\n ccPolicyDefinition = new OperationPolicyDefinition();\n ccPolicyDefinition.setContent(choreoConnectPolicyDefinition);\n ccPolicyDefinition.setGatewayType(OperationPolicyDefinition.GatewayType.ChoreoConnect);\n ccPolicyDefinition.setMd5Hash(APIUtil.getMd5OfOperationPolicyDefinition(ccPolicyDefinition));\n operationPolicyData.setCcPolicyDefinition(ccPolicyDefinition);\n }\n\n operationPolicyData.setMd5Hash(APIUtil.getMd5OfOperationPolicy(operationPolicyData));\n\n OperationPolicyData existingPolicy =\n apiProvider.getCommonOperationPolicyByPolicyName(policySpecification.getName(),\n policySpecification.getVersion(), organization, false);\n String policyID;\n if (existingPolicy == null) {\n policyID = apiProvider.addCommonOperationPolicy(operationPolicyData, organization);\n if (log.isDebugEnabled()) {\n log.debug(\"A common operation policy has been added with name \"\n + policySpecification.getName());\n }\n } else {\n throw new APIManagementException(\"Existing common operation policy found for the same name.\");\n }\n operationPolicyData.setPolicyId(policyID);\n OperationPolicyDataDTO createdPolicy = OperationPolicyMappingUtil\n .fromOperationPolicyDataToDTO(operationPolicyData);\n URI createdPolicyUri = new URI(RestApiConstants.REST_API_PUBLISHER_VERSION + \"/\"\n + RestApiConstants.RESOURCE_PATH_OPERATION_POLICIES + \"/\" + policyID);\n return Response.created(createdPolicyUri).entity(createdPolicy).build();\n }\n } catch (APIManagementException e) {\n String errorMessage = \"Error while adding a common operation policy.\" + e.getMessage();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n } catch (Exception e) {\n RestApiUtil.handleInternalServerError(\"An Error has occurred while adding common operation policy\",\n e, log);\n }\n return null;\n }", "boolean configure(PdpdConfiguration configuration);", "protected Entity addNewProductAssociation(final String[] nextLine, final PersistenceSession session, final String sourceProductCode) {\n\n\t\tif (!isEntityAlreadyImported(sourceProductCode)) {\n\t\t\t// Remove existing associations for the source product in the\n\t\t\t// destination catalog, before importing any new ones.\n\t\t\tgetImportGuidHelper().deleteProductAssociations(sourceProductCode, getImportJob().getCatalog().getCode());\n\t\t\trecordImportedEntityGuid(sourceProductCode);\n\t\t}\n\t\t\n\t\tEntity newEntity = createNewEntity(null);\n\t\tupdateContent(nextLine, newEntity);\n\t\t\n\t\tString combinedKey = getCombinedKey((ProductAssociation) newEntity);\n\t\t\n\t\tif (processedProductAssociationKey.contains(combinedKey)) {\n\t\t\treportDuplicateRow(nextLine);\n\t\t\treturn newEntity;\n\t\t} else {\n\t\t\tprocessedProductAssociationKey.add(combinedKey);\n\t\t\treturn saveEntity(session, newEntity, newEntity);\n\t\t} \n\t}", "AgentPolicyBuilder buildUpon(AgentPolicy agentPolicy);", "public boolean equivalent(Explanation<OWLAxiom> e1, Explanation<OWLAxiom> e2) throws OWLOntologyCreationException {\n if (e1.equals(e2)) {\n return true;\n }\n\n // check if they have the same size, same entailment types, same numbers of axiom types\n IsoUtil pre = new IsoUtil();\n if (!pre.passesPretest(e1, e2)) {\n \t//System.out.println(\"NOT THE SAME!\");\n return false;\n }\n \n //check the current datatypes used in the justifications. If they don't match, reject this.\n HashSet<OWLDatatype> dataTypes1 = new HashSet<OWLDatatype>();\n HashSet<OWLDatatype> dataTypes2 = new HashSet<OWLDatatype>();\n \n for(OWLAxiom ax:e1.getAxioms())\n {\n \t for(OWLDatatype dt:ax.getDatatypesInSignature())\n {\n \tif(dt.isBuiltIn())\n \t{\n \t\tdataTypes1.add(dt);\n \t}\n }\n }\n for(OWLAxiom ax:e2.getAxioms())\n {\n \t for(OWLDatatype dt:ax.getDatatypesInSignature())\n {\n \tif(dt.isBuiltIn())\n \t{\n \t\tdataTypes2.add(dt);\n \t}\n }\n } \n \n if(!dataTypes1.equals(dataTypes2))\n {\n \treturn false;\n }\n \n //check to see if both justifications are both real or fake w.r.t. reasoner\n /**\n OWLOntologyManager ontoman = OWLManager.createOWLOntologyManager();\n Boolean E1ENT = null;\n OWLReasoner j1 = rf.createReasoner(ontoman.createOntology(e1.getAxioms()));\n\t\tE1ENT = j1.isEntailed(e1.getEntailment());\n\t\tj1.flush();\n\t\tOWLReasoner j2;\n\t Boolean E2ENT = null;\n\t j2 = rf.createReasoner(ontoman.createOntology(e2.getAxioms()));\n\t\tE2ENT = j2.isEntailed(e2.getEntailment());\n\t\tj2.flush();\n\t\tSystem.out.println(e1.getEntailment().toString() + \": \" + E1ENT + \" \" + e2.getEntailment().toString() + \": \" + E2ENT);\n\t\tSystem.out.println(!((E1ENT && E2ENT) || (!E1ENT && !E2ENT)));\n\t\tif(!((E1ENT && E2ENT) || (!E1ENT && !E2ENT))) {\n\t\tSystem.out.println(\"Entailment check failed\");\n\t return false;\t\n\t\t}\n\t\t**/\n\t\t// otherwise do the full check\t\n AxiomTreeBuilder atb = new AxiomTreeBuilder();\n\n AxiomTreeNode et1 = atb.generateAxiomTree(e1.getEntailment());\n AxiomTreeNode et2 = atb.generateAxiomTree(e2.getEntailment());\n AxiomTreeNode jt1 = atb.generateExplanationTree(e1);\n AxiomTreeNode jt2 = atb.generateExplanationTree(e2);\n \n //for(AxiomTreeMapping atm:getMappingCandidates(et1,et2))\n //{\n \t//atm.printMapping();\n //}\n \n List<AxiomTreeMapping> candidates = getMappingCandidates(jt1, jt2);\n //System.out.println(candidates.size());\n /**\n for(AxiomTreeMapping c : candidates) {\n \t System.out.println(c.getVarsForTarget());\n \t System.out.println(c.getVarsForSource());\n \t System.out.println(isCorrectMapping(e1, et1, jt1, c.getVarsForSource(), e2, et2, jt2, c.getVarsForTarget()));\n }\n **/\n \n \n for (AxiomTreeMapping c : candidates) {\n //System.out.println(\"\\n--------------- MAPPING ---------------\\n\");\n if (isCorrectMapping(e1, et1, jt1, c.getVarsForSource(), e2, et2, jt2, c.getVarsForTarget())) {\n //c.printMapping();\n //System.out.println(\"TRUE MAPPING:\");\n //System.out.println(c.getVarsForTarget());\n //System.out.println(c.getVarsForSource());\n \t return true;\n }\n }\n \n //for(AxiomTreeMapping atm:candidates)\n //{\n \t//atm.printMapping();\n //}\n return false;\n }", "public void addAssociation(String mPackage, Class type, RefObject a, RefObject b) throws CreationException {\n\t\t\n\t\ttrace.addTrace(TraceType.CREATION, \"Create Association of type \" + type.getSimpleName() + \" in target model.\");\n\t\t\n\t\tRefPackage pkg = loadBasePackage(mPackage);\n\t\tCollection<RefAssociation> assos = pkg.refAllAssociations();\n\t\tfor(RefAssociation ass:assos) {\n\t\t\t/* \n\t\t\t * The return type of java.lang.Class.getInterfaces()\n\t\t\t * has changed in Java 1.6.\n\t\t\t * To compile this file using Java 1.6 or later, change the\n\t\t\t * generic of the List 'interfaces' from List<Class> to\n\t\t\t * List<Class<?>>. \n\t\t\t */\n\t\t\tList<Class> interfaces = Arrays.asList(ass.getClass().getInterfaces());\n\t\t\tif(interfaces.contains(type)) {\n\t\t\t\tMethod add = null;\n\t\t\t\tMethod[] methods = ass.getClass().getMethods();\n\t\t\t\tfor(Method m : methods) {\n\t\t\t\t\tif (m.getName().equals(\"add\")) {\n\t\t\t\t\t\tadd = m;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (add == null) {\n\t\t\t\t\tthrow new CreationException(ADD_METHOD_NOT_FOUND + type.getSimpleName());\n\t\t\t\t}\n\t\t\t\n\t\t\t\tObject[] parameters = {a,b};\n\t\t\t\ttry {\n\t\t\t\t\tadd.invoke(ass, parameters);\n\t\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\t\tthrow new CreationException(ERROR_ADD_ASS + type.getSimpleName());\n\t\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\t\tthrow new CreationException(ERROR_ADD_ASS + type.getSimpleName());\n\t\t\t\t} catch (InvocationTargetException e) {\n\t\t\t\t\tthrow new CreationException(ERROR_ADD_ASS + type.getSimpleName());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\t\n\t\n\t\t\n\t\t}", "public void CreateRelationship(Node node1, Node node2, myRelationships relation) {\r\n\t\tTransaction tx = _db.beginTx(); \r\n\t\ttry {\r\n\t\t\tnode1.createRelationshipTo(node2, relation);\r\n\t\t\ttx.success();\r\n\t\t} catch (Exception ex) {\r\n\t\t\ttx.failure();\r\n\t\t\tthrow ex;\r\n\t\t} finally {\r\n\t\t\ttx.finish();\r\n\t\t}\r\n\t\t\t\t\r\n\t}", "@Contribute(Neo4JEmbeddedService.class)\n\t@DataGraph\n\tpublic static void contributeTestDataGraph(\n\t\t\tMappedConfiguration<String, String> configuration) {\n\t\tconfiguration.add(\"propertiesFileLocation\", \"TestDataGraph.properties\");\n\t}", "public static void createAggregatedRelationship (AbstractStructureElement from, AbstractStructureElement to, ArrayList<KDMRelationship> relations) {\n\t\tif (from.getAggregated().size() > 0) {\r\n\t\t\t//System.out.println(\"MAIOR QUE 1, TODO\");\r\n\r\n\t\t\t//Andre - pega os aggragated que ja estão no from\r\n\t\t\tEList<AggregatedRelationship> aggregatedFROM = from.getAggregated();\t\t\r\n\r\n\t\t\t//Andre - começa um for nesses aggregated\r\n\t\t\tfor (int i = 0; i < aggregatedFROM.size(); i++) {\r\n\r\n\t\t\t\t//Andre - verifica se o aggregated que ja existe tem o mesmo destino que o que esta pra ser criado \r\n\t\t\t\tif (to.getName().equalsIgnoreCase(aggregatedFROM.get(i).getTo().getName())) {\r\n\r\n\t\t\t\t\t//Andre - se tiver o mesmo destino ele adiciona as relacoes novas e atualiza a densidade, depois disso ele pega e sai do for\r\n\t\t\t\t\t//ADICIONAR\r\n\r\n\t\t\t\t\taggregatedFROM.get(i).setDensity(aggregatedFROM.get(i).getDensity()+relations.size());\r\n\t\t\t\t\taggregatedFROM.get(i).getRelation().addAll(relations);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Andre - se for o ultimo aggregated do for e mesmo assim não encontrou o com o mesmo destino que esta pra ser criado \r\n\t\t\t\t//Andre - entao cria um novo aggregated para ser adicionado\r\n\t\t\t\t//se chegar no ultimo e nao encontrar\r\n\t\t\t\tif (i == (aggregatedFROM.size()-1)) {\r\n\r\n\t\t\t\t\tAggregatedRelationship newRelationship = CoreFactory.eINSTANCE.createAggregatedRelationship();\r\n\t\t\t\t\tnewRelationship.setDensity(relations.size());\r\n\t\t\t\t\tnewRelationship.setFrom(from);\r\n\t\t\t\t\tnewRelationship.setTo(to);\r\n\t\t\t\t\tnewRelationship.getRelation().addAll(relations);\r\n\t\t\t\t\tfrom.getAggregated().add(newRelationship);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t//Andre - se não tiver um agrregated na layer from adiciona um com as relacoes que podem entre duas layers\r\n\t\t\tAggregatedRelationship newRelationship = CoreFactory.eINSTANCE.createAggregatedRelationship();\r\n\t\t\tnewRelationship.setDensity(relations.size());\r\n\t\t\tnewRelationship.setFrom(from);\r\n\t\t\tnewRelationship.setTo(to);\r\n\t\t\tnewRelationship.getRelation().addAll(relations);\r\n\t\t\tfrom.getAggregated().add(newRelationship);\r\n\t\t}\r\n\r\n\t\t//Fernando - Limpando lista \r\n\t\trelations.clear();\r\n\t\tfrom = null;\r\n\t\tto = null;\r\n\r\n\r\n\t}", "@Override\n public void initialize(Map<String, String> configuration) {\n userToMap = configuration.get(\"UserToMap\");\n realmToMapTo = configuration.get(\"RealmToMapTo\");\n }", "LinkRelation createLinkRelation();", "private static List<Configuration> configure() {\n Map<String, Configuration> configurations = new HashMap<String, Configuration>();\n try {\n Enumeration<URL> resources = Thread.currentThread().getContextClassLoader().getResources(\"jorm.properties\");\n \n while (resources.hasMoreElements()) {\n URL url = resources.nextElement();\n \n Database.get().log.debug(\"Found jorm configuration @ \" + url.toString());\n \n Properties properties = new Properties();\n InputStream is = url.openStream();\n properties.load(is);\n is.close();\n \n String database = null;\n String destroyMethodName = null;\n String dataSourceClassName = null;\n Map<String, String> dataSourceProperties = new HashMap<String, String>();\n int priority = 0;\n \n for (Entry<String, String> property : new TreeMap<String, String>((Map) properties).entrySet()) {\n String[] parts = property.getKey().split(\"\\\\.\");\n if (parts.length < 3 || !parts[0].equals(\"database\")) {\n continue;\n }\n if (database != null && !parts[1].equals(database)) {\n try {\n Configuration conf = configurations.get(database);\n if (conf == null || conf.priority < priority) {\n conf = new Configuration(database, dataSourceClassName, dataSourceProperties, destroyMethodName, priority);\n configurations.put(database, conf);\n Database.get().log.debug(\"Configured \" + conf);\n }\n } catch (Exception ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage());\n }\n database = parts[1];\n destroyMethodName = null;\n dataSourceClassName = null;\n dataSourceProperties = new HashMap<String, String>();\n priority = 0;\n }\n\n if (parts.length == 3 && parts[2].equals(\"destroyMethod\")) {\n destroyMethodName = property.getValue();\n } else if (parts.length == 3 && parts[2].equals(\"priority\")) {\n try {\n priority = Integer.parseInt(property.getValue().trim());\n } catch (Exception ex) {\n \n }\n } else if (parts[2].equals(\"dataSource\")) {\n if (parts.length == 3) {\n dataSourceClassName = property.getValue();\n } else if (parts.length == 4) {\n dataSourceProperties.put(parts[3], property.getValue());\n } else {\n Database.get().log.warn(\"Invalid DataSource property '\" + property.getKey() + \"'\");\n }\n } else {\n Database.get().log.warn(\"Invalid property '\" + property.getKey() + \"'\");\n }\n }\n \n if (database != null) {\n try {\n Configuration conf = configurations.get(database);\n if (conf == null || conf.priority < priority) {\n conf = new Configuration(database, dataSourceClassName, dataSourceProperties, destroyMethodName, priority);\n configurations.put(database, conf);\n Database.get().log.debug(\"Configured \" + conf);\n }\n } catch (Exception ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage());\n }\n }\n }\n \n for (Entry<String, Configuration> entry : configurations.entrySet()) {\n entry.getValue().apply();\n Database.get().log.debug(\"Configured \" + configuration);\n }\n } catch (IOException ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage()); \n }\n \n return new ArrayList<Configuration>(configurations.values());\n }", "private OzoneConfiguration addNewOMToConfig(String omServiceId,\n String omNodeId) {\n\n OzoneConfiguration newConf = new OzoneConfiguration(getConf());\n configureOMPorts(newConf, omServiceId, omNodeId);\n\n String omNodesKey = ConfUtils.addKeySuffixes(\n OMConfigKeys.OZONE_OM_NODES_KEY, omServiceId);\n newConf.set(omNodesKey, newConf.get(omNodesKey) + \",\" + omNodeId);\n\n return newConf;\n }", "Mapper<T, T2> relate(Customizable customizable);", "private void addRelationship(String node1, String node2, String relation)\n {\n try (Session session = driver.session())\n {\n // Wrapping Cypher in an explicit transaction provides atomicity\n // and makes handling errors much easier.\n try (Transaction tx = session.beginTransaction())\n {\n tx.run(\"MATCH (j:Node {value: {x}})\\n\" +\n \"MATCH (k:Node {value: {y}})\\n\" +\n \"MERGE (j)-[r:\" + relation + \"]->(k)\", parameters(\"x\", node1, \"y\", node2));\n tx.success(); // Mark this write as successful.\n }\n }\n }", "void relationshipCreate( long id, int typeId, long startNodeId,\n long endNodeId );", "BaseRealm(RealmConfiguration realmConfiguration) {\n SharedRealm.SchemaVersionListener schemaVersionListener = null;\n this.threadId = Thread.currentThread().getId();\n this.configuration = realmConfiguration;\n this.realmCache = null;\n if (this instanceof Realm) {\n schemaVersionListener = new SharedRealm.SchemaVersionListener(){\n\n @Override\n public void onSchemaVersionChanged(long l) {\n if (BaseRealm.this.realmCache != null) {\n BaseRealm.this.realmCache.updateSchemaCache((Realm)BaseRealm.this);\n }\n }\n };\n }\n this.sharedRealm = SharedRealm.getInstance(realmConfiguration, schemaVersionListener, true);\n this.schema = new RealmSchema(this);\n }", "public HostToGroupMapping(Configuration configuration, String name) {\n \tthis.configurationRef = new SoftReference(configuration);\n \tthis.name = name;\n }", "public Association associate(Node targetNode, QName associationTypeQName);", "private void changeTheRelationDataOfOwnedCompanies(String entityId, LosConfigDetails affilated,\n\t\t\tList<EntityRelationshipType> affialiateDataList, CommercialEntity parentEntity,\n\t\t\tEntityRelationshipType changeRelation) {\n\t\tif (changeRelation.getEntityId1().equals(entityId)) {\n\t\t\tBeanUtils.copyProperties(changeRelation.getParentEntity(), parentEntity);\n\t\t}\n\t\tif (!changeRelation.getEntityId1().equals(entityId)\n\t\t\t\t&& changeRelation.getEntityId1().endsWith(LOSEntityConstants.COMMERCIAL_SUFFIX_CODE)\n\t\t\t\t&& getRelationTypeId(changeRelation).equals(LOSEntityConstants.OWNED)) {\n\t\t\tchangeRelation.setEntityId2(changeRelation.getEntityId1());\n\t\t\tchangeRelation.setChildEntity(changeRelation.getParentEntity());\n\t\t\tchangeRelation.setEntityId1(entityId);\n\t\t\tchangeRelation.setParentEntity(parentEntity);\n\t\t\tchangeRelation.setEntityRelationConfigDetail(affilated);\n\t\t\taffialiateDataList.add(changeRelation);\n\t\t}\n\t}", "private void configureMerge(EObject original) {\n DSEMergeConfigurator configurator = configuratorMapping.get(original.eClass().getEPackage().getNsURI());\n if (configurator != null) {\n configureMerge(configurator);\n } else {\n logger.error(\"Missing required configuration for \" + original.eClass().getEPackage().getNsURI()); \n }\n }", "protected void setAccessPolicies(Map<String, PolicyDocument> policies)\n {\n policies.put(\"GlueAthenaS3AccessPolicy\", getGlueAthenaS3AccessPolicy());\n policies.put(\"S3SpillBucketAccessPolicy\", getS3SpillBucketAccessPolicy());\n connectorAccessPolicy.ifPresent(policyDocument -> policies.put(\"ConnectorAccessPolicy\", policyDocument));\n }", "private void changeRelationshipListApi(List<EntityRelationshipType> relationList, LosConfigDetails owner,\n\t\t\tLosConfigDetails owned, LosConfigDetails subsidary, EntityRelationshipType changingRelation) {\n\t\tLong relationTypeId = getRelationTypeId(changingRelation);\n\t\tif (changingRelation.getEntityId1().endsWith(LOSEntityConstants.COMMERCIAL_SUFFIX_CODE)\n\t\t\t\t&& changingRelation.getEntityId1().endsWith(LOSEntityConstants.COMMERCIAL_SUFFIX_CODE)\n\t\t\t\t&& relationTypeId.equals(LOSEntityConstants.OWNER)) {\n\t\t\tchangingRelation.setEntityRelationConfigDetail(subsidary);\n\t\t} else if (relationTypeId.equals(LOSEntityConstants.OWNER)) {\n\t\t\tchangingRelation.setEntityRelationConfigDetail(owned);\n\t\t} else if (relationTypeId.equals(LOSEntityConstants.OWNED)) {\n\t\t\tchangingRelation.setEntityRelationConfigDetail(owner);\n\t\t} else if (relationTypeId.equals(LOSEntityConstants.SUBSIDIARY)) {\n\t\t\tchangingRelation.setEntityRelationConfigDetail(owner);\n\t\t}\n\t\trelationList.add(changingRelation);\n\t}", "default boolean compatibleWith(Conf other) { return equals(other); }", "public LcpConfigMap(LcpPacketFactory parent) {\n this.parent = parent;\n this.configFactories = new HashMap<Integer, ConfigFactory>();\n }", "@Override\n protected void mergeModel_Organization( Model target, Model source, boolean sourceDominant,\n Map<Object, Object> context )\n {\n Organization src = source.getOrganization();\n if ( source.getOrganization() != null )\n {\n Organization tgt = target.getOrganization();\n if ( tgt == null )\n {\n target.setOrganization( tgt = new Organization() );\n mergeOrganization( tgt, src, sourceDominant, context );\n }\n }\n }", "@Override\n public Configuration createConfigurationFT(Connection connection, Configuration configuration) throws SQLException {\n PreparedStatement ps = null;\n try{\n String insertSQL = \"INSERT INTO Configuration (configurationID, displayName, defaultType, defaultArg1, defaultArg2) VALUES (?, ?, ?, ?, ?);\";\n ps = connection.prepareStatement(insertSQL);\n ps.setString(1, configuration.getConfigurationID().toString());\n ps.setString(2, configuration.getDisplayName());\n ps.setString(3, configuration.getDefaultType());\n ps.setString(4, configuration.getDefaultArg1()); \n ps.setString(5, configuration.getDefaultArg2()); \n ps.executeUpdate();\n \n return configuration;\n }\n catch(Exception ex){\n ex.printStackTrace();\n //System.out.println(\"Exception in ConfigurationDaoImpl.create(2 arg)\");\n if (ps != null && !ps.isClosed()){\n ps.close();\n }\n if (connection != null && !connection.isClosed()){\n connection.close();\n }\n }\n return configuration;\n }", "public void setIsARelationship(Object endNode, BioRelTypes relType) {\n if (isARelationship == null) {\n isARelationship = new HashSet<BioRelation>();\n }\n BioRelation rel = new BioRelation(this, endNode, relType);\n isARelationship.add(rel);\n }", "void acknowledgeConfiguration() {\n // First ensure that both players have their correct color\n Player player0 = game.getPlayers().get(0);\n Player player1 = game.getPlayers().get(1);\n player1.setStone(player0.getStone() == Stone.BLACK ? 2 : 1);\n\n leader.acknowledgeConfig();\n opponent.acknowledgeConfig();\n }" ]
[ "0.4745534", "0.47151503", "0.46701923", "0.46360236", "0.45948339", "0.4554578", "0.4549489", "0.44932616", "0.44612122", "0.44500977", "0.43944058", "0.43874973", "0.43535364", "0.43492687", "0.43286335", "0.43155733", "0.4306514", "0.42862618", "0.4258264", "0.42449942", "0.42301962", "0.42232957", "0.41557512", "0.4154408", "0.41445637", "0.41411352", "0.4139275", "0.41305733", "0.41230667", "0.41177982", "0.411547", "0.4115228", "0.41056168", "0.4084389", "0.40768182", "0.40597215", "0.40533346", "0.40448722", "0.40400386", "0.40120322", "0.39998543", "0.3996761", "0.39892325", "0.39890647", "0.3981119", "0.39760485", "0.3972656", "0.3969668", "0.39637846", "0.3963047", "0.3957888", "0.39550704", "0.39515895", "0.3940416", "0.3934266", "0.393075", "0.39265767", "0.3923745", "0.3919255", "0.39161056", "0.3902995", "0.38961223", "0.38941422", "0.3893416", "0.38914207", "0.38618112", "0.38588056", "0.38570157", "0.38569388", "0.38514093", "0.38494697", "0.38479745", "0.38474515", "0.3833793", "0.38309273", "0.3818833", "0.38157782", "0.38141808", "0.3812483", "0.38053647", "0.3801618", "0.3787268", "0.3776962", "0.37753618", "0.3769196", "0.37674066", "0.37620682", "0.37593684", "0.3750777", "0.37468255", "0.37463313", "0.37444377", "0.37407157", "0.37403652", "0.37381393", "0.37380502", "0.37375575", "0.3733773", "0.37281764", "0.37265706" ]
0.5146705
0
Causes all policy statements to be deleted from this PolicyConfiguration and sets its internal state such that calling any method, other than delete, getContextID, or inService on the PolicyConfiguration will be rejected and cause an UnsupportedOperationException to be thrown. This operation has no affect on any linked PolicyConfigurations other than removing any links involving the deleted PolicyConfiguration.
public void delete() throws PolicyContextException { checkSetPolicyPermission(); synchronized(refreshLock) { try { removePolicy(); } finally { setState(DELETED_STATE); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "@Override\r\n\tpublic void deletePolicy(Integer pid) {\n\t\tdao.deletePolicy(pid);\r\n\t\t\r\n\t}", "public void deletePolicy(long policyId) throws Exception {\n cancellationPolicyRepository.deleteById(policyId);\n }", "public void removeExcludedPolicy()\n throws PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\n\n\tif (excludedPermissions != null) {\n\t excludedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "@Override\n public Response throttlingPoliciesApplicationPolicyIdDelete(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy existingPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n if (apiProvider.hasAttachments(username, existingPolicy.getPolicyName(),\n PolicyConstants.POLICY_LEVEL_APP)) {\n String message = \"Policy \" + policyId + \" already attached to an application\";\n log.error(message);\n throw new APIManagementException(message);\n }\n apiProvider.deletePolicy(username, PolicyConstants.POLICY_LEVEL_APP, existingPolicy.getPolicyName());\n return Response.ok().build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while deleting Application level policy : \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "@Nullable\n public ManagedAppPolicy delete() throws ClientException {\n return send(HttpMethod.DELETE, null);\n }", "protected void handleDelete(\n\t\t\tcom.soffid.iam.addons.xacml.common.PolicySet policySet) throws java.lang.Exception\n\t{\n\t\tgetPolicySetEntityDao().remove(policySet);\n\t\tupdateTimeStamp();\n\t}", "@Override\n public ResponseEntity<PdpGroupDeployResponse> deletePolicy(String policyName, UUID requestId) {\n return doUndeployOperation(requestId,\n () -> provider.undeploy(new ToscaConceptIdentifierOptVersion(policyName, null), getPrincipal()));\n }", "public void removeUncheckedPolicy()\n\tthrows PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\t\n\n\tif (uncheckedPermissions != null) {\n\t uncheckedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "@Override\n public Response throttlingPoliciesSubscriptionPolicyIdDelete(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n SubscriptionPolicy existingPolicy = apiProvider.getSubscriptionPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, log);\n }\n if (apiProvider.hasAttachments(username, existingPolicy.getPolicyName(),\n PolicyConstants.POLICY_LEVEL_SUB)) {\n String message = \"Policy \" + policyId + \" already has subscriptions\";\n log.error(message);\n throw new APIManagementException(message);\n }\n apiProvider.deletePolicy(username, PolicyConstants.POLICY_LEVEL_SUB, existingPolicy.getPolicyName());\n return Response.ok().build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, e,\n log);\n } else {\n String errorMessage = \"Error while deleting Subscription level policy : \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "void clearPolicy() {\n policy = new Policy();\n }", "AgentPolicyBuilder clear();", "public DeleteNamespacedConfiguration propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "public void deletePolicy(int policyNo) {\n\t\tTransaction tx = session.beginTransaction();\n\t\tCompanyPolicy cP = (CompanyPolicy)session.get(CompanyPolicy.class, policyNo);\n\t\tsession.delete(cP);\t\n\t\ttx.commit();\n }", "void unregister(String policyId);", "@Override\n\tpublic void delete(Policy obj) throws SQLException {\t\t\n\t\tString deletePolicy = \"DELETE FROM Policies WHERE pID = ?\";\n\t\ttry \n\t {\n\t\t\tPreparedStatement preparedStatement = DBConnection.GetDBConnection().prepareStatement(deletePolicy);\n\t\t\tpreparedStatement.setString(1, obj.pID);\n\t\t\tpreparedStatement.executeUpdate();\n\t\t} \n\t catch (SQLException e) \n\t {\n\t \tLogger.GetInstance().log(e.getMessage());\n\t\t\tLogger.GetInstance().log(\"Unable to delete the Following Policy:\\n\"\n\t\t\t\t\t+ \"First name: \"+ obj.firstName+\"\\n\"\n\t\t\t\t\t+ \"Last name: \"+obj.lastName+\"\\n\"\n\t\t\t\t\t+ \"ID: \"+obj.pID+\"\\n\"\n\t\t\t\t\t+ \"Insurance type: \"+obj.type+\"\\n\"\n\t\t\t\t\t+ \"Remarks: \"+obj.remarks+\"\\n\");\n\t\t}\n\n\t\tLogger.GetInstance().log(\"Successfully deleted the Following Policy:\\n\"\n\t\t\t\t+ \"Policy ID: \"+obj.pID+\"\\n\"\n\t\t\t\t+ \"First name: \"+ obj.firstName+\"\\n\"\n\t\t\t\t+ \"Last name: \"+obj.lastName+\"\\n\"\n\t\t\t\t+ \"Insurance type: \"+obj.type+\"\\n\"\n\t\t\t\t+ \"Remarks: \"+obj.remarks+\"\\n\");\n\n\t}", "public DeleteOAuth propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "public DeleteInfrastructure propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "public void commit() throws PolicyContextException{\n\n\tsynchronized(refreshLock) {\n\t if(stateIs(DELETED_STATE)){\n String defMsg=\"Cannot perform Operation on a deleted PolicyConfiguration\";\n String msg=localStrings.getLocalString(\"pc.invalid_op_for_state_delete\",defMsg);\n\t\tlogger.log(Level.WARNING,msg);\n\t\tthrow new UnsupportedOperationException(defMsg);\n\n\t } else {\n \n\t\ttry {\n\n\t\t checkSetPolicyPermission();\n\n\t\t if (stateIs(OPEN_STATE)) {\n\n\t\t\tgeneratePermissions();\n\n\t\t\tsetState(INSERVICE_STATE);\n\t\t }\n\t\t} catch(Exception e){\n String defMsg=\"commit fail for contextod \"+CONTEXT_ID;\n String msg=localStrings.getLocalString(\"pc.commit_failure\",defMsg,new Object[]{CONTEXT_ID,e});\n\t\t logger.log(Level.SEVERE,msg);\n\t\t throw new PolicyContextException(e);\n\t\t}\n\t\tif (logger.isLoggable(Level.FINE)){\n\t\t logger.fine(\"JACC Policy Provider: PC.commit \"+CONTEXT_ID);\n\t\t}\n\t }\n\t \n\t}\n }", "List<PolicyController> updatePolicyControllers(List<ControllerConfiguration> configuration);", "void unsetServiceConfigurationList();", "void removePolicyController(PolicyController controller);", "void removePolicyController(String name);", "@Transactional\n\t@Override\n\tpublic void deleteAll() {\n\t\tanchorKeywordsDAO.deleteAll();\n\t}", "public DeleteScheduler propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "public DeleteProxy propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "@Override\n public Response throttlingPoliciesAdvancedPolicyIdDelete(String policyId, MessageContext messageContext)\n throws APIManagementException {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n APIPolicy existingPolicy = null;\n try {\n existingPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n } catch (APIManagementException e) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, e, log);\n }\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, log);\n }\n if (apiProvider.hasAttachments(username, existingPolicy.getPolicyName(), PolicyConstants.POLICY_LEVEL_API)) {\n String message = \"Advanced Throttling Policy \" + existingPolicy.getPolicyName() + \": \" + policyId\n + \" already attached to API/Resource\";\n throw new APIManagementException(message, ExceptionCodes\n .from(ExceptionCodes.ALREADY_ASSIGNED_ADVANCED_POLICY_DELETE_ERROR,\n existingPolicy.getPolicyName()));\n }\n apiProvider.deletePolicy(username, PolicyConstants.POLICY_LEVEL_API, existingPolicy.getPolicyName());\n return Response.ok().build();\n }", "@Override\n public DeleteResourcePolicyResult deleteResourcePolicy(DeleteResourcePolicyRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteResourcePolicy(request);\n }", "public DeleteNamespacedSubscription propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "public DeleteBuild propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "public DeleteConsole propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "public DeleteAuthentication propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "public DeleteDNS propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "@Override\n public Response throttlingDenyPolicyConditionIdDelete(String conditionId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give BlockConditionNotFoundException if there's no block condition exists with UUID\n BlockConditionsDTO existingCondition = apiProvider.getBlockConditionByUUID(conditionId);\n if (!RestApiAdminUtils.isBlockConditionAccessibleToUser(username, existingCondition)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_BLOCK_CONDITION, conditionId, log);\n }\n apiProvider.deleteBlockConditionByUUID(conditionId);\n return Response.ok().build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_BLOCK_CONDITION, conditionId, e, log);\n } else {\n String errorMessage = \"Error while deleting Block Condition. Id : \" + conditionId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "public void preRemove(Configuration configuration) {\r\n preRemove();\r\n\r\n }", "@Override\n public Response deleteCommonOperationPolicyByPolicyId(String operationPolicyId, MessageContext messageContext) {\n\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String organization = RestApiUtil.getValidatedOrganization(messageContext);\n\n OperationPolicyData existingPolicy =\n apiProvider.getCommonOperationPolicyByPolicyId(operationPolicyId, organization, false);\n if (existingPolicy != null) {\n apiProvider.deleteOperationPolicyById(operationPolicyId, organization);\n if (log.isDebugEnabled()) {\n log.debug(\"The common operation policy \" + operationPolicyId + \" has been deleted\");\n }\n return Response.ok().build();\n } else {\n throw new APIMgtResourceNotFoundException(\"Couldn't retrieve an existing common policy with ID: \"\n + operationPolicyId, ExceptionCodes.from(ExceptionCodes.OPERATION_POLICY_NOT_FOUND,\n operationPolicyId));\n }\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_PATH_OPERATION_POLICIES,\n operationPolicyId, e, log);\n } else {\n String errorMessage = \"Error while deleting the common operation policy with ID: \" + operationPolicyId\n + \" \" + e.getMessage();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n } catch (Exception e) {\n RestApiUtil.handleInternalServerError(\"An Error has occurred while deleting the common operation policy + \"\n + operationPolicyId, e, log);\n }\n return null;\n }", "public void deleteTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;", "public DeleteAPIServer propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "void deleteAllPaymentTerms() throws CommonManagementException;", "void deleteAllRelatedContext(String contextMetaDataId);", "@Override\n\tpublic void deleteAll() throws Exception {\n\t\topcionRepository.deleteAll();\n\t}", "public DeleteNetwork propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "@Atomic\n\tpublic void delete(){\n\t\tfor(User u: getUserSet()){\n\t\t\tu.delete();\n\t\t}\n\t\tfor(Session s: getSessionSet()){\n\t\t\ts.delete();\n\t\t}\n\t\tsetRoot(null);\n\t\tdeleteDomainObject();\n\t}", "public DeleteIngress propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "public DeleteImage propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "public void removeFromPolicyTransactions(entity.AppCritPolicyTransaction element);", "public void deleteAll() {\n try (Connection connection = dataSource.getConnection();\n Statement statement = connection.createStatement()) {\n statement.execute(INIT.DELETE_ALL.toString());\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\n }", "@Override\n\tpublic void purge(final RdfCloudTripleStoreConfiguration configuration) {\n\n\t}", "@Override\n public Response throttlingPoliciesCustomRuleIdDelete(String ruleId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n\n //only super tenant is allowed to access global policies/custom rules\n checkTenantDomainForCustomRules();\n\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n GlobalPolicy existingPolicy = apiProvider.getGlobalPolicyByUUID(ruleId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_CUSTOM_RULE, ruleId, log);\n }\n apiProvider.deletePolicy(username, PolicyConstants.POLICY_LEVEL_GLOBAL, existingPolicy.getPolicyName());\n return Response.ok().build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_CUSTOM_RULE, ruleId, e, log);\n } else {\n String errorMessage = \"Error while deleting custom rule : \" + ruleId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "@Override\n public ResponseEntity<PdpGroupDeployResponse> deletePolicyVersion(\n String policyName,\n String version,\n UUID requestId) {\n return doUndeployOperation(requestId,\n () -> provider.undeploy(new ToscaConceptIdentifierOptVersion(policyName, version), getPrincipal()));\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void delete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n deleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "public DeleteNamespacedComponent propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "protected void applyPendingDeletes ()\n {\n while (!m_aDeleteStack.isEmpty ())\n removeMonitoredFile (m_aDeleteStack.pop ());\n }", "public void delete()\n throws ROSRSException {\n annotation.deletePropertyValues(subject, property, merge ? null : value);\n if (annotation.getStatements().isEmpty()) {\n annotation.delete();\n } else {\n annotation.update();\n }\n value = null;\n }", "@DeleteMapping(\"/view-policies/{id}\")\n @Timed\n public ResponseEntity<Void> deleteViewPolicy(@PathVariable Long id) {\n log.debug(\"REST request to delete ViewPolicy : {}\", id);\n viewPolicyService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@Override\n public void delete()\n {\n }", "public DeleteProject propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "public final void delete() {\n\t\tOllie.delete(this);\n\t\tOllie.removeEntity(this);\n\t\tnotifyChange();\n\t\tid = null;\n\t}", "@Override\n public Nary<Void> applyWithTransactionOn(TransactionContext transactionContext) {\n String deleteHql = \"DELETE FROM \" + persistentType.getName() + \" WHERE id = :deletedId\";\n Session session = transactionContext.getSession();\n Query deleteQuery = session.createQuery(deleteHql);\n deleteQuery.setParameter(\"deletedId\", deletedId);\n int affectedRows = deleteQuery.executeUpdate();\n if(affectedRows != 1){\n LOG.debug(\"Deletion of {}[{}] did not affect just 1 row: {}\", persistentType, deletedId, affectedRows);\n }\n // No result expected from this operation\n return Nary.empty();\n }", "@Override\n\tpublic void deleteAll() {\n\n\t}", "@Override\n\tpublic void deleteAll() {\n\n\t}", "@Override\n\tpublic void deleteAll() {\n\n\t}", "@Override\n\tpublic void delete(String parentLogDomain, boolean waitUntilDeleted) throws AdaptorException {\n\t\tLogger LOG = getLogger(parentLogDomain);\n\t\tif(!propType.getOHIcon().equals(\"none\")) {\n\t\t\tLOG.debug(\"Deleting property \" + getStandardID() + \"...\");\n\t\t\tfor(int i = 0; i < adaptors.length; i++) {\n\t\t\t\tadaptors[i].deleteProperty(this, waitUntilDeleted);\n\t\t\t}\n\t\t\tLOG.debug(\"Property \" + getStandardID() + \" deleted!\");\n\t\t}\n\t}", "@Override\n public CompletableFuture<Void> deleteForcefully() {\n return delete(true);\n }", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "public DeleteOperatorHub propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "@Nonnull\n public java.util.concurrent.CompletableFuture<ManagedAppPolicy> deleteAsync() {\n return sendAsync(HttpMethod.DELETE, null);\n }", "@Override\n\tpublic String removePolicy(int policyId) throws PolicyNotFoundException {\n\t\t// TODO Auto-generated method stub\n\t\tif(!policyDao.existsById(policyId))\n\t\t\tthrow new PolicyNotFoundException(\"policy not found\");\n\t\tpolicyDao.deleteById(policyId);\n\t\treturn \"Policy Deleted Successfully\";\n\t}", "private void removePolicyContextDirectory(){\n\tString directoryName = getContextDirectoryName();\n\tFile f = new File(directoryName);\n\tif(f.exists()){\n\n // WORKAROUND: due to existence of timestamp file in given directory\n // for SE/EE synchronization\n File[] files = f.listFiles();\n if (files != null && files.length > 0) {\n for (int i = 0; i < files.length; i++) {\n files[i].delete();\n }\n }\n //WORKAROUND: End \n\n\t if (!f.delete()) {\n String defMsg = \"Failure removing policy context directory: \"+directoryName;\n String msg=localStrings.getLocalString(\"pc.file_delete_error\", defMsg);\n\t\tlogger.log(Level.SEVERE,msg);\n\t\tthrow new RuntimeException(defMsg);\n\t } else if(logger.isLoggable(Level.FINE)){\n\t\tlogger.fine(\"JACC Policy Provider: Policy context directory removed: \"+directoryName);\n\t }\n\n File appDir = f.getParentFile();\n // WORKAROUND: due to existence of timestamp file in given directory\n // for SE/EE synchronization\n File[] fs = appDir.listFiles();\n if (fs != null && fs.length > 0) {\n boolean hasDir = false;\n for (int i = 0; i < fs.length; i++) {\n if (fs[i].isDirectory()) {\n hasDir = true;\n break;\n }\n }\n if (!hasDir) {\n for (int i = 0; i < fs.length; i++) {\n fs[i].delete();\n }\n }\n }\n //WORKAROUND: End \n\n File[] moduleDirs = appDir.listFiles();\n if (moduleDirs == null || moduleDirs.length == 0) {\n if (!appDir.delete()) {\n String defMsg = \"Failure removing policy context directory: \" + appDir;\n String msg = localStrings.getLocalString(\"pc.file_delete_error\", defMsg);\n\t\t logger.log(Level.SEVERE,msg);\n\t\t throw new RuntimeException(defMsg);\n }\n }\n\t}\n }", "public int deleteAllPermissions() throws DAOException;", "private void deleteRoleAccess(Role inheritFromToDelete,\n List<? extends InheritedAccessEnabled> roleAccessList, AccessTypeInjector injector) {\n try {\n OBContext.setAdminMode(false);\n String inheritFromId = inheritFromToDelete.getId();\n List<InheritedAccessEnabled> iaeToDelete = new ArrayList<InheritedAccessEnabled>();\n for (InheritedAccessEnabled ih : roleAccessList) {\n String inheritedFromId = ih.getInheritedFrom() != null ? ih.getInheritedFrom().getId() : \"\";\n if (!StringUtils.isEmpty(inheritedFromId) && inheritFromId.equals(inheritedFromId)) {\n iaeToDelete.add(ih);\n }\n }\n for (InheritedAccessEnabled iae : iaeToDelete) {\n iae.setInheritedFrom(null);\n roleAccessList.remove(iae);\n Role owner = injector.getRole(iae);\n if (!owner.isTemplate()) {\n // Perform this operation for not template roles, because for template roles is already\n // done\n // in the event handler\n injector.removeReferenceInParentList(iae);\n }\n OBDal.getInstance().remove(iae);\n }\n } finally {\n OBContext.restorePreviousMode();\n }\n }", "public DeleteFeatureGate propagationPolicy(String propagationPolicy) {\n put(\"propagationPolicy\", propagationPolicy);\n return this;\n }", "@Override\r\n\tpublic void deleteAll() {\n\r\n\t}", "@Override\n public void removeGroupPolicies(Context context, Item item, Group g) throws SQLException, AuthorizeException {\n // remove Group's policies from Item\n authorizeService.removeGroupPolicies(context, item, g);\n\n // remove all policies from bundles\n List<Bundle> bunds = item.getBundles();\n\n for (Bundle mybundle : bunds) {\n List<BundleBitstream> bs = mybundle.getBitstreams();\n\n for (BundleBitstream b : bs) {\n Bitstream bitstream = b.getBitstream();\n // remove bitstream policies\n authorizeService.removeGroupPolicies(context, bitstream, g);\n }\n\n // change bundle policies\n authorizeService.removeGroupPolicies(context, mybundle, g);\n }\n }", "@Override\n public void deleteAllPrivies() {\n }", "@Override\r\n\tpublic void delete() throws DeleteException {\n\t\t\r\n\t}", "@RequestMapping(value = \"/ocConfigurations/{id}\", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE)\n\t@Timed\n\tpublic void delete(@PathVariable Long id) {\n\t\tlog.debug(\"REST request to delete OcConfiguration : {}\", id);\n\t\tocConfigurationRepository.delete(id);\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic void deleteAll() {\n\t\ttopicContentDao.deleteAll();\r\n\t}", "public void delete() {\n\t\tcp.delete();\n\t}", "private void deleteConnections() {\n for (int i = 0; !this.sourceConnections.isEmpty(); ) {\n LinkElement wire = (LinkElement) this.sourceConnections.get(i);\n wire.detachSource();\n wire.detachTarget();\n this.graphElement.removeEdge(wire.getEdgeId(), wire);\n }\n\n for (int i = 0; !this.targetConnections.isEmpty(); ) {\n LinkElement wire = (LinkElement) this.targetConnections.get(i);\n wire.detachSource();\n wire.detachTarget();\n this.graphElement.removeEdge(wire.getEdgeId(), wire);\n }\n }", "@Override\n\tpublic void deleteAll() throws Exception {\n\t\t\n\t}", "void deleteRule(long ruleID, boolean dropPendingCmdlets) throws IOException;", "public void delete() {\r\n\t\t\tif (!isDeleted && handles.remove(this)) {\r\n\t\t\t\telementsUsed -= count;\r\n\t\t\t\tisDeleted = true;\r\n\t\t\t\tif (elementsUsed < numElements / 4) {\r\n\t\t\t\t\tcompact();\r\n\t\t\t\t\tnumElements = Math.max(10, elementsUsed * 2);\r\n\t\t\t\t}\r\n\t\t\t\tshapePeer.vboHandle = null;\r\n\t\t\t}\r\n\t\t}", "public void markOdbPsDelete() throws JNCException {\n markLeafDelete(\"odbPs\");\n }", "PolicyController updatePolicyController(ControllerConfiguration configuration);", "void unsetFurtherRelations();", "@Override\n\tpublic void deleteAll() {\n\t\tdao.deleteAll();\n\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n public void beginDelete(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) {\n beginDeleteAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName).block();\n }" ]
[ "0.65746444", "0.60479873", "0.6030811", "0.58469087", "0.58137566", "0.5684374", "0.5601103", "0.55794144", "0.5561671", "0.55127585", "0.54723054", "0.54489493", "0.532951", "0.5281718", "0.51748997", "0.51710045", "0.5142012", "0.5134449", "0.5131166", "0.5097928", "0.5082722", "0.50316876", "0.5017218", "0.49868503", "0.49696568", "0.49680957", "0.49598444", "0.49494907", "0.49459007", "0.49443355", "0.4943001", "0.4931913", "0.49160746", "0.48946708", "0.48626605", "0.48552635", "0.48483542", "0.4824644", "0.48213965", "0.48193166", "0.4817124", "0.4809671", "0.48003384", "0.4785202", "0.47643095", "0.47632292", "0.4758671", "0.47553176", "0.47487396", "0.47462302", "0.4735795", "0.4735488", "0.47297567", "0.47297567", "0.47297567", "0.47297567", "0.4722618", "0.47219512", "0.47011536", "0.46935847", "0.46833628", "0.46732128", "0.4667362", "0.46639794", "0.46633318", "0.46633318", "0.46633318", "0.46531653", "0.4648509", "0.46347854", "0.46347854", "0.46347854", "0.46347854", "0.46347854", "0.46347854", "0.46347854", "0.46347854", "0.46250927", "0.46190766", "0.46135813", "0.46099457", "0.46046647", "0.46000397", "0.45948717", "0.4594869", "0.4590814", "0.45905262", "0.45848185", "0.45830336", "0.45612496", "0.45592242", "0.45573786", "0.4556788", "0.45522326", "0.45446038", "0.45364428", "0.45294163", "0.45285589", "0.45225957", "0.45204732" ]
0.7273046
0
This method is used to determine if the policy context whose interface is this PolicyConfiguration Object is in the "inService" state.
public boolean inService() throws PolicyContextException{ checkSetPolicyPermission(); boolean rvalue = stateIs(INSERVICE_STATE); if (logger.isLoggable(Level.FINE)) { logger.fine("JACC Policy Provider: inService: " + (rvalue ? "true " : "false ") + CONTEXT_ID); } return rvalue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasService();", "boolean hasService();", "boolean hasService();", "boolean hasService();", "boolean hasService();", "private boolean stateIs(int stateValue) {\n\tboolean inState = _stateIs(stateValue);\n\tif (stateValue == INSERVICE_STATE && !inState) {\n\t if (fileArrived(true) || fileArrived(false)) {\n \n if (logger.isLoggable(Level.FINE)){\n logger.fine(\"JACC Policy Provider: file arrived transition to inService: \" +\n \" state: \" + (this.state == OPEN_STATE ? \"open \" : \"deleted \") +\n CONTEXT_ID);\n }\n \n\t\t// initialize(!open,!remove,fromFile) \n initialize(false,false,true);\n\t }\n\t inState = _stateIs(INSERVICE_STATE);\n\t} \n \n\treturn inState;\n }", "public boolean getIsServiceBound () ;", "public boolean isServiceRunning();", "public boolean hasService() {\n return service_ != null;\n }", "public boolean hasService() {\n return service_ != null;\n }", "public boolean hasService() {\n return service_ != null;\n }", "@java.lang.Override\n public boolean hasServiceList() {\n return endpointConfigCase_ == 3;\n }", "@java.lang.Override\n public boolean hasServiceList() {\n return endpointConfigCase_ == 3;\n }", "boolean hasServiceName();", "boolean hasServiceName();", "protected java.security.Policy getPolicy(){\n\tif (stateIs(INSERVICE_STATE)) {\n\t return this.policy;\n\t} \n\tif (logger.isLoggable(Level.FINEST)) {\n\t logger.finest(\"JACC Policy Provider: getPolicy (\"+CONTEXT_ID+\") is NOT in service\");\n\t}\n\treturn null;\n }", "public boolean isInCallServiceBinded() {\n HiLog.info(LOG_LABEL, \"isInCallServiceBinded: %{public}b\", new Object[]{Boolean.valueOf(this.mIsInCallServiceBinded)});\n return this.mIsInCallServiceBinded;\n }", "boolean isSetServiceConfigurationList();", "public boolean hasService() {\n return serviceBuilder_ != null || service_ != null;\n }", "public boolean hasService() {\n return serviceBuilder_ != null || service_ != null;\n }", "public boolean hasService() {\n return serviceBuilder_ != null || service_ != null;\n }", "private boolean isInService() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.isInService():boolean, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.isInService():boolean\");\n }", "boolean hasServiceList();", "boolean hasContext();", "boolean hasContext();", "public boolean isRunning() {\n return (service != null) && service.isMonitoring();\n }", "public synchronized static boolean isServiceRunning(){\n return prefs.getBoolean(IS_SERVICE_RUNNING, false);\n }", "public synchronized boolean wasServiced() {\n\t\treturn serviced;\n\t}", "public boolean hasService() {\n return fieldSetFlags()[1];\n }", "private OwnedState calculateIsRunningOnManagedProfile(Context context) {\n long startTime = SystemClock.elapsedRealtime();\n boolean hasProfileOwnerApp = false;\n boolean hasDeviceOwnerApp = false;\n PackageManager packageManager = context.getPackageManager();\n DevicePolicyManager devicePolicyManager =\n (DevicePolicyManager) context.getSystemService(\n Context.DEVICE_POLICY_SERVICE);\n\n for (PackageInfo pkg : packageManager.getInstalledPackages(/* flags= */ 0)) {\n assert devicePolicyManager != null;\n if (devicePolicyManager.isProfileOwnerApp(pkg.packageName)) {\n hasProfileOwnerApp = true;\n }\n if (devicePolicyManager.isDeviceOwnerApp(pkg.packageName)) {\n hasDeviceOwnerApp = true;\n }\n if (hasProfileOwnerApp && hasDeviceOwnerApp) break;\n }\n\n long endTime = SystemClock.elapsedRealtime();\n RecordHistogram.recordTimesHistogram(\n \"EnterpriseCheck.IsRunningOnManagedProfileDuration\",\n endTime - startTime);\n\n return new OwnedState(hasDeviceOwnerApp, hasProfileOwnerApp);\n }", "private boolean isMyServiceRunning() {\n\t ActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);\n\t for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {\n\t if (\"com.example.MyService\".equals(service.service.getClassName())) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t}", "boolean hasNetworkPolicyConfig();", "public static boolean isServiceRunning(Context ctx, Class<?> serviceClass) {\n ActivityManager manager = (ActivityManager) ctx.getSystemService(Context.ACTIVITY_SERVICE);\n for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {\n if (serviceClass.getName().equals(service.service.getClassName())) {\n return true;\n }\n }\n return false;\n }", "boolean hasServiceCmd();", "public boolean checkEndpointStatus() {\n\t\treturn getConnectionState().equals(TMIConnectionState.CONNECTED);\n\t}", "boolean isSetServiceId();", "public boolean hasServiceName() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasServiceName() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasServiceName() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasServiceName() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public static boolean isServiceRunning(Context context, Class<?> serviceClass) {\n ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\n for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {\n if (serviceClass.getName().equals(service.service.getClassName())) {\n return true;\n }\n }\n return false;\n }", "public boolean isSecureServiceRequest(HttpServletRequest req) {\n String requestURI = req.getRequestURI();\n String serviceName = requestURI.substring(requestURI.lastIndexOf(\"/\") + 1);\n serviceName = requestURI.substring(requestURI.lastIndexOf(\"/\") + 1);\n TBXService service = null;\n try {\n service = serviceManager.getService(serviceName);\n if (service == null) {\n String errorMsg = \"Unknown service: \" + serviceName;\n logger.error(errorMsg);\n return false;\n }\n } catch (ToolboxException ex) {\n return false;\n }\n return service.isWSSecurity();\n }", "boolean isInvoiced();", "public boolean isRunning()\n\t{\n\t\tif(mBoundService != null){\t// Service already started\n\t\t\tif(mBoundService.testThread != null && mBoundService.testThread.isAlive())\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}else{\n\t\t\tLog.v(\"4G Test\", \"mBoundService null not running\");\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean status() {\n return DecoratedController != null;\n }", "boolean hasServerState();", "private boolean checkServiceIsRunning(){\r\n if (CurrentLocationUtil.isRunning()){\r\n doBindService();\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "public boolean isContextConductionInd() {\n\t\treturn contextConductionInd;\n\t}", "public boolean isServiceReady();", "private boolean isMyServiceRunning(Class<?> serviceClass) {\n ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);\n\n for (ActivityManager.RunningServiceInfo serviceInfo : manager.getRunningServices(Integer.MAX_VALUE)) {\n if (serviceClass.getName().equals(serviceInfo.service.getClassName())) {\n return true;\n }\n }\n return false;\n }", "boolean hasEndpoint();", "public static boolean isServiceRunning(Class <? extends Service> service, Context context) {\n ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\n for ( ActivityManager.RunningServiceInfo runningServiceInfo : manager.getRunningServices(Integer.MAX_VALUE) ) {\n if ( service.getName().equals(runningServiceInfo.service.getClassName()) ) { return true; }\n }\n return false;\n }", "boolean hasConfiguration();", "public boolean isServiceExecutionCheckPointingRequired() {\r\n\t\treturn false;\r\n\t}", "boolean isSatisfiable(ConditionContext context);", "boolean isSetListOfServiceElements();", "public boolean isServiceConnected() {\r\n\t\treturn LeapJNI.Controller_isServiceConnected(this.swigCPtr, this);\r\n\t}", "@Override\n\tpublic boolean isStatus() {\n\t\treturn _candidate.isStatus();\n\t}", "boolean isServiceEnabled(AGServiceDescription service)\n throws IOException, SoapException;", "public boolean isServiceDone(){\n if(boundNewsService != null) {\n return boundNewsService.isServiceDone();\n }\n\n //if there is no bound service then an orientation change has occurred and the service should\n //already be executed and over\n return true;\n }", "private void CheckIfServiceIsRunning() {\n\t\tLog.i(\"Convert\", \"At isRunning?.\");\n\t\tif (eidService.isRunning()) {\n//\t\t\tLog.i(\"Convert\", \"is.\");\n\t\t\tdoBindService();\n\t\t} else {\n\t\t\tLog.i(\"Convert\", \"is not, start it\");\n\t\t\tstartService(new Intent(IDManagement.this, eidService.class));\n\t\t\tdoBindService();\n\t\t}\n\t\tLog.i(\"Convert\", \"Done isRunning.\");\n\t}", "boolean hasObjectTrackingConfig();", "public static boolean isRunning()\n {\n synchronized( Lifecycle.class ) {\n return context != null;\n }\n }", "public static boolean isServiceRunning(Context context, String serviceName) {\n ActivityManager activityManager = (ActivityManager) context\n .getSystemService(Context.ACTIVITY_SERVICE);\n List<ActivityManager.RunningServiceInfo> services = activityManager\n .getRunningServices(Integer.MAX_VALUE);\n\n if (services != null) {\n for (ActivityManager.RunningServiceInfo info : services) {\n if (info.service != null) {\n if (info.service.getClassName() != null && info.service.getClassName()\n .equalsIgnoreCase(serviceName)) {\n return true;\n }\n }\n }\n }\n\n return false;\n }", "private boolean isNotificationServiceEnabled(){\n String pkgName = getPackageName();\n final String flat = Settings.Secure.getString(getContentResolver(),\n ENABLED_NOTIFICATION_LISTENERS);\n if (!TextUtils.isEmpty(flat)) {\n final String[] names = flat.split(\":\");\n for (int i = 0; i < names.length; i++) {\n final ComponentName cn = ComponentName.unflattenFromString(names[i]);\n if (cn != null) {\n if (TextUtils.equals(pkgName, cn.getPackageName())) {\n return true;\n }\n }\n }\n }\n return false;\n }", "public boolean ctx_on(RTContainer n){\n\t\tif(n.getFulfillmentConditions().size()>0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public static boolean isServiceRunning(String serviceName, Context context) {\n ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\n for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {\n if (serviceName.equals(service.service.getClassName())) {\n return true;\n }\n }\n return false;\n }", "boolean hasHasMicroService();", "boolean isRunning( String profileId );", "public boolean isActive() {\n return !isSuspended() && !isExpired();\n }", "public boolean isAccessPolicyConfig() {\n\t\treturn accessPolicyConfig;\n\t}", "@Override\n public boolean isServiceSupported(String serviceName) {\n return serviceEndpoints.containsKey(serviceName);\n }", "public boolean isFromWSDL(String serviceName);", "boolean hasOperation();", "public static boolean isMyServiceRunning(Class<?> serviceClass, Context mContext) {\n ActivityManager manager = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);\n if (manager != null) {\n for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {\n if (serviceClass.getName().equals(service.service.getClassName())) {\n return true;\n }\n }\n }\n return false;\n }", "public boolean isNovice() {\n\t\treturn novice;\n\t}", "@Override\r\n\tpublic final boolean isAvailale(final String service) {\n\r\n\t\tMapAware mapAware = new MapAware() {\r\n\t\t\t@Override\r\n\t\t\tpublic Object getKey() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\treturn service;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic Object getValue() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn KxTopologyCacheContext.getSingleCacheContext().contains(ObjectHelper.CLASSKEY, ObjectHelper.CLASSVALUE,\r\n\t\t\t\tmapAware)\r\n\t\t\t\t|| KxTopologyCacheContext.getSingleCacheContext().contains(ObjectHelper.CLASSKEY,\r\n\t\t\t\t\t\tObjectHelper.WASTECLASS, mapAware);\r\n\t}", "public Boolean isProfileRunning() {\n return this.isProfileRunning;\n }", "boolean isSwitchingScope();", "public boolean servicingRequests() {\n return (isActive() && this.requests != 0) ? true : false;\n }", "public boolean checkIn(){\n return state.checkIn();\n }", "@Override\n public boolean hasServiceCmd() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "@Override\n public boolean hasServiceCmd() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "public boolean isActive() {\n/* 134 */ if (this.stub != null) {\n/* 135 */ return this.stub.isActive();\n/* */ }\n/* 137 */ return false;\n/* */ }", "protected boolean enterService()\n\t{\n\t\tsynchronized(enterMutex)\n\t\t{\n\t\t\tenterRequests++;\n\t\t\tif(enterRequests == 1)\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean isServicesDiSplayed() {\r\n\t\treturn isDisplayed(servicesTextLocator);\r\n\t}", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean readServiceInfo() {\n\t\tboolean flag = oTest.readServiceInfo();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "private boolean isServiceRunning(String strClassName) {\n boolean bRunning = false;\n\n try{\n ActivityManager am = (ActivityManager)mContext.getSystemService(Context.ACTIVITY_SERVICE);\n List<ActivityManager.RunningServiceInfo> servicesList = am.getRunningServices(Integer.MAX_VALUE);\n Iterator<ActivityManager.RunningServiceInfo> serviceList = servicesList.iterator();\n\n while(serviceList.hasNext()) {\n ActivityManager.RunningServiceInfo si = (ActivityManager.RunningServiceInfo)serviceList.next();\n if(strClassName.equals(si.service.getClassName()) == true) {\n bRunning = true;\n break;\n }\n }\n\n }catch (Exception e)\n {\n e.printStackTrace();\n }\n\n return bRunning;\n }", "private boolean isServiceAvailable() {\n if (mComponentName == null) {\n mComponentName = resolveAttentionService(mContext);\n }\n return mComponentName != null;\n }", "protected boolean isServiceRunning(final String serviceClassName) {\n\t\tif (StringUtils.isNullorEmpty(serviceClassName))\n\t\t\treturn false;\n\t\tActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);\n\t\tfor (RunningServiceInfo service : manager\n\t\t\t\t.getRunningServices(Integer.MAX_VALUE)) {\n\t\t\tif (serviceClassName.equalsIgnoreCase(service.service\n\t\t\t\t\t.getClassName())) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean canSendNotifications() {\n return serviceEnabled;\n }", "@Override\n public boolean containsContext(HttpServletRequest request) {\n return false;\n }", "boolean hasStartingConfig() {\n return startCfg_ != null;\n }", "private boolean isSupportedInternal() {\n boolean z = false;\n synchronized (this.mLock) {\n if (this.mServiceManager == null) {\n Log.e(TAG, \"isSupported: called but mServiceManager is null!?\");\n return false;\n }\n try {\n if (this.mServiceManager.getTransport(IWifi.kInterfaceName, HAL_INSTANCE_NAME) != (byte) 0) {\n z = true;\n }\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Exception while operating on IServiceManager: \" + e);\n return false;\n }\n }\n }", "public static boolean isOnBehalfOfRequest(ZimbraSoapContext zsc) throws ServiceException {\n if (!zsc.isDelegatedRequest())\n return false;\n return !AccountUtil.isZDesktopLocalAccount(zsc.getAuthtokenAccountId());\n }", "public boolean isHandled(StatusBean bean);", "boolean hasSecIdType();", "boolean hasInputConfig();", "boolean hasInputConfig();", "boolean hasInputConfig();" ]
[ "0.62023467", "0.62023467", "0.62023467", "0.62023467", "0.62023467", "0.61918724", "0.6091488", "0.60670614", "0.60481644", "0.60481644", "0.60481644", "0.60102993", "0.60057276", "0.59759", "0.59759", "0.59134716", "0.5900899", "0.5843916", "0.5816593", "0.5816593", "0.5816593", "0.5789701", "0.5786486", "0.56757104", "0.56757104", "0.5656291", "0.5653626", "0.5649818", "0.56354", "0.5610741", "0.5569909", "0.55492574", "0.55364084", "0.55266833", "0.5520284", "0.5511775", "0.5505293", "0.5505293", "0.54920155", "0.54920155", "0.5468978", "0.5463332", "0.5432448", "0.5415664", "0.54138136", "0.5408358", "0.54070896", "0.5388614", "0.5382793", "0.53658867", "0.5354849", "0.53540975", "0.5328422", "0.53233826", "0.5308887", "0.52993435", "0.5298079", "0.52912045", "0.5280134", "0.5276901", "0.5276864", "0.5275667", "0.5264904", "0.52487963", "0.52484983", "0.52459025", "0.5245318", "0.5239883", "0.52382433", "0.5236002", "0.5229971", "0.5224275", "0.52134484", "0.5195949", "0.5194652", "0.5182335", "0.51816624", "0.5175884", "0.51680475", "0.5167985", "0.5165349", "0.5159203", "0.5150557", "0.5149956", "0.51476955", "0.51446223", "0.513943", "0.51258886", "0.5121711", "0.51216614", "0.5116574", "0.51145625", "0.5109243", "0.5107099", "0.5103013", "0.51030093", "0.5092224", "0.5091301", "0.5091301", "0.5091301" ]
0.8085945
0
The following methods are implementation specific
protected void checkSetPolicyPermission() { SecurityManager sm = System.getSecurityManager(); if (sm != null) { if (setPolicyPermission == null) { setPolicyPermission = new java.security.SecurityPermission("setPolicy"); } sm.checkPermission(setPolicyPermission); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "protected abstract Set method_1559();", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public abstract void mo70713b();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public abstract void mo6549b();", "@Override\n\tprotected void logic() {\n\n\t}", "public void smell() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public abstract Object mo1771a();", "public abstract void mo27385c();", "public void method_4270() {}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public abstract Object mo26777y();", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "protected void mo6255a() {\n }", "public void designBasement() {\n\t\t\r\n\t}", "public abstract void mo27386d();", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public abstract Object mo1185b();", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "public abstract String mo118046b();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n protected void init() {\n }", "public abstract String mo13682d();", "public abstract String mo41079d();", "public abstract void mo30696a();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "public abstract void mo35054b();", "public void mo4359a() {\n }", "public abstract int mo9754s();", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public abstract void mo42329d();", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "public abstract String mo9752q();", "@Override\n\tpublic void accept(Visitor visitor) {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override public int describeContents() { return 0; }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tprotected void initData() {\n\r\n\t}" ]
[ "0.62937796", "0.6286669", "0.6238451", "0.61882234", "0.61791515", "0.61664283", "0.6108708", "0.61025655", "0.60979694", "0.6060829", "0.6037392", "0.60344034", "0.60292834", "0.5994675", "0.59404975", "0.59404975", "0.5920933", "0.5908916", "0.5908916", "0.5872685", "0.5857651", "0.5845477", "0.58218604", "0.5759436", "0.5732101", "0.57249105", "0.5723191", "0.5719232", "0.5712597", "0.570974", "0.5707565", "0.56962675", "0.56863064", "0.56850314", "0.5678937", "0.5661049", "0.5656307", "0.56559646", "0.56491554", "0.56426406", "0.56404626", "0.562984", "0.5628362", "0.5620562", "0.5612513", "0.5608008", "0.560745", "0.56066453", "0.5588393", "0.55716014", "0.5562557", "0.5562557", "0.5560802", "0.55566925", "0.5556617", "0.5553201", "0.5549779", "0.5548635", "0.5548003", "0.5542028", "0.5542028", "0.5542028", "0.5542028", "0.5542028", "0.5542028", "0.55417764", "0.55367947", "0.5532812", "0.55310583", "0.5529841", "0.5529841", "0.55197114", "0.5517092", "0.55141664", "0.55126405", "0.55093545", "0.55093545", "0.5505967", "0.5502116", "0.5501756", "0.5500089", "0.54919827", "0.5490993", "0.548661", "0.548661", "0.5485895", "0.54823434", "0.5476478", "0.54742354", "0.54711527", "0.54679173", "0.5466817", "0.5465848", "0.5453983", "0.5453983", "0.5453983", "0.5453983", "0.5453983", "0.5453983", "0.5453983", "0.545033" ]
0.0
-1
get the policy object
protected java.security.Policy getPolicy(){ if (stateIs(INSERVICE_STATE)) { return this.policy; } if (logger.isLoggable(Level.FINEST)) { logger.finest("JACC Policy Provider: getPolicy ("+CONTEXT_ID+") is NOT in service"); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Policy _get_policy(int policy_type);", "public Policy _get_policy(int policy_type) {\n throw new NO_IMPLEMENT(reason);\n }", "public com.vmware.converter.DVSPolicy getPolicy() {\r\n return policy;\r\n }", "public PolicyMap getPolicyMap();", "@Override\r\n\tpublic Policy getById(Integer pid) {\n\t\tPolicy policy =dao.getById(pid);\r\n return policy;\r\n\t}", "PolicyRecord findOne(Long id);", "PolicyDetail findPolicyByID(int policyId, int lenderId);", "PolicyDecision getDecision();", "public PolicyPermission getPolicyPermission()\n {\n return this.perm;\n }", "PolicyDetail findPolicyDetail(int policyId, Lender lender);", "Policy_Repository createPolicy_Repository();", "public CompanyPolicy getPolicy(int policyNo) {\n\t\tCompanyPolicy cPolicy = (CompanyPolicy)session.get(CompanyPolicy.class, policyNo); \n return cPolicy;\n\t}", "public String getAbyssPolicy()\n {\n return m_AbyssPolicy;\n }", "private PolicyDTO readPolicy(Resource resource) throws EntitlementException {\n \n String policy = null;\n AbstractPolicy absPolicy = null;\n PolicyDTO dto = null;\n\n try {\n policy = new String((byte[]) resource.getContent(), Charset.forName(\"UTF-8\"));\n absPolicy = PolicyReader.getInstance(null).getPolicy(policy);\n dto = new PolicyDTO();\n dto.setPolicyId(absPolicy.getId().toASCIIString());\n dto.setPolicy(policy);\n\n String policyOrder = resource.getProperty(\"policyOrder\");\n if(policyOrder != null){\n dto.setPolicyOrder(Integer.parseInt(policyOrder));\n } else {\n dto.setPolicyOrder(0);\n } // TODO policy refe IDs ???\n PolicyAttributeBuilder policyAttributeBuilder = new PolicyAttributeBuilder();\n dto.setAttributeDTOs(policyAttributeBuilder.\n getPolicyMetaDataFromRegistryProperties(resource.getProperties()));\n return dto;\n } catch (RegistryException e) {\n log.error(\"Error while loading entitlement policy\", e);\n throw new EntitlementException(\"Error while loading entitlement policy\", e);\n }\n }", "public abstract List<AbstractPolicy> getPolicies();", "private Resource getPolicyResource(String policyId) throws EntitlementException {\n String path = null;\n\n if (log.isDebugEnabled()) {\n log.debug(\"Retrieving entitlement policy\");\n }\n\n try {\n path = policyStorePath + policyId;\n\n if (!registry.resourceExists(path)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Trying to access an entitlement policy which does not exist\");\n }\n return null;\n }\n return registry.get(path);\n } catch (RegistryException e) {\n log.error(\"Error while retrieving entitlement policy : \" + policyId, e);\n throw new EntitlementException(\"Error while retrieving entitlement policy : \" + policyId, e);\n }\n }", "PolicyStatsManager getStats();", "@Override\r\n\tpublic List<Policy> getPolicies() {\n\t\tList<Policy> policy=dao.getPolicies();\r\n\t\treturn policy;\r\n\t}", "ServiceEndpointPolicy getById(String id);", "public java.lang.String getPolicyURL() {\n return policyURL;\n }", "public String getPolicy() {\r\n String policy = \"\";\r\n if (!policyRules.isEmpty()) {\r\n policy += policyRules.get(0).getRule().trim();\r\n for (int i = 1; i < policyRules.size(); i++) {\r\n policy += \",\" + policyRules.get(i).getRule().trim();\r\n }\r\n }\r\n\r\n return policy.trim();\r\n }", "StoragePolicyDecisionPoint getStoragePolicyDecisionPoint();", "public Element getSelectedPolicyElement() {\n Element selectedPolicyElement = null;\n IStructuredSelection categoriesCompositeSelection =\n (IStructuredSelection) getTreeViewer().getSelection();\n\n if (!categoriesCompositeSelection.isEmpty()) {\n Element selectedElement = (Element)\n categoriesCompositeSelection.getFirstElement();\n\n if (selectedElement.getName().\n equals(DeviceRepositorySchemaConstants.\n POLICY_ELEMENT_NAME)) {\n selectedPolicyElement = selectedElement;\n }\n }\n return selectedPolicyElement;\n }", "public String getPolicyName() {\n \t\treturn policyName;\n \t}", "public MergePolicy getMergePolicy() { \n\t\tif (mMergePolicy == null) throw new NullPointerException();\n\t\treturn mMergePolicy;\n\t}", "public interface PolicyService {\n\tpublic Policy findPolicy(String id);\n\n\t// Find policies by what role they have\n\tpublic Set<Policy> findPolicyByPerson(String id);\n\tpublic Set<Policy> findPolicyByPersons(Set<String> ids);\n\tpublic Set<Policy> findPolicyByPersonRole(String id, Class<? extends AbstractPolicyRole> role);\n\tpublic Set<Policy> findPolicyByPersonsRole(Set<String> ids, Class<? extends AbstractPolicyRole> role);\n}", "@Override\n public Response throttlingPoliciesApplicationPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy appPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, appPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n ApplicationThrottlePolicyDTO policyDTO =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyToDTO(appPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while retrieving Application level policy: \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "void clearPolicy() {\n policy = new Policy();\n }", "public NatPolicy getNatPolicy();", "public Set<Policy> findPolicyByPerson(String id);", "@Override\n public Response throttlingPoliciesSubscriptionPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n SubscriptionPolicy subscriptionPolicy = apiProvider.getSubscriptionPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, subscriptionPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, log);\n }\n SubscriptionThrottlePolicyDTO policyDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyToDTO(subscriptionPolicy);\n\n //setting policy permissions\n setPolicyPermissionsToDTO(policyDTO);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException | ParseException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, e,\n log);\n } else {\n String errorMessage = \"Error while retrieving Subscription level policy: \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "@Override\n\tpublic Optional<Policy> findPolicyById(int policyId) throws PolicyNotFoundException {\n\t\t// TODO Auto-generated method stub\n\t\tif(!policyDao.existsById(policyId))\n\t\t\tthrow new PolicyNotFoundException(\"policy not found\");\n\t\treturn policyDao.findById(policyId);\n\t}", "@Nullable\n public ManagedAppPolicy get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "@JsonIgnore public BoardingPolicyType getBoardingPolicy() {\n return (BoardingPolicyType) getValue(\"boardingPolicy\");\n }", "public PolicyDTO readPolicy(String policyId) throws EntitlementException {\n\n Resource resource = null;\n \n resource = getPolicyResource(policyId);\n\n if (resource == null) {\n return new PolicyDTO();\n }\n\n return readPolicy(resource);\n }", "public java.lang.String getPolicyNo() {\n return policyNo;\n }", "public java.lang.String getPolicyNo() {\n return policyNo;\n }", "public SigningPolicy getSigningPolicy(String subject) {\n \n if (this.policyDNMap == null) {\n return null;\n }\n\n return (SigningPolicy) this.policyDNMap.get(subject);\n }", "public static Policy getServiceEffectivePolicy(Definitions wsdl, QName serviceQName) throws PolicyException {\n Service srv = wsdl.getService(serviceQName);\n if (srv == null) {\n throw new IllegalArgumentException(\"Cannot find service with qname \" + serviceQName);\n }\n \n Element srvEl = srv.getDomElement();\n Element defsEl = (Element) srvEl.getParentNode();\n \n Policy res = ConfigurationBuilder.loadPolicies(srv, defsEl);\n return res;\n }", "@GetMapping(\"/view-policies/{id}\")\n @Timed\n public ResponseEntity<ViewPolicyDTO> getViewPolicy(@PathVariable Long id) {\n log.debug(\"REST request to get ViewPolicy : {}\", id);\n ViewPolicyDTO viewPolicyDTO = viewPolicyService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(viewPolicyDTO));\n }", "AllocationPolicy getAllocationPolicy(ReservationDAO reservations);", "@Override\n\tpublic Policy addPolicy(Policy policy) {\n\t\t// TODO Auto-generated method stub\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "String getBlockPolicy();", "private static String getBucketPolicyFromFile(String policy_file) {\r\n StringBuilder file_text = new StringBuilder();\r\n try {\r\n List<String> lines = Files.readAllLines(\r\n Paths.get(policy_file), Charset.forName(\"UTF-8\"));\r\n for (String line : lines) {\r\n file_text.append(line);\r\n }\r\n } catch (IOException e) {\r\n System.out.format(\"Problem reading file: \\\"%s\\\"\", policy_file);\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n // Verify the policy by trying to load it into a Policy object.\r\n Policy bucket_policy = null;\r\n try {\r\n bucket_policy = Policy.fromJson(file_text.toString());\r\n } catch (IllegalArgumentException e) {\r\n System.out.format(\"Invalid policy text in file: \\\"%s\\\"\",\r\n policy_file);\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n return bucket_policy.toJson();\r\n }", "private RoutingPolicy getExportPolicy() {\n\t String exportPolicyName = null;\n switch(this.getType()) {\n case BGP:\n // String constant from\n // org.batfish.representation.cisco.CiscoConfiguration.toBgpProcess\n exportPolicyName = \"~BGP_COMMON_EXPORT_POLICY:\" \n + this.getVrf().getName() + \"~\";\n break;\n case OSPF:\n exportPolicyName = this.ospfConfig.getExportPolicy();\n break;\n default:\n return null;\n }\n\n return this.getDevice().getRoutingPolicy(exportPolicyName);\n\t}", "@Test\n\tpublic void testGetPolicy() throws Exception {\n\t\tfail(\"testGetPolicy not implemented\");\n\t}", "String privacyPolicy();", "public Policy reference() throws DynamicParamException, AgentException, MatrixException, IOException, ClassNotFoundException {\n return new UpdateableBasicPolicy(executablePolicy.getExecutablePolicyType(), getFunctionEstimator().reference(), params);\n }", "public String getPolicyArn() {\n return this.policyArn;\n }", "public void setPolicy(short policy) {\n\t\t_policy = policy;\n\t}", "@XmlElement(name = \"source_policy\")\r\n public ProtectionSourcePolicy getSourcePolicy() {\r\n return sourcePolicy;\r\n }", "@Attribute(order = 100, validators = { RequiredValueValidator.class })\n\t\tString policyName();", "public Object getSalesProductAgreementPolicyTermRecord() {\n return salesProductAgreementPolicyTermRecord;\n }", "public static String getPolicyString(short policy) {\n\t\treturn POLICY_STRINGS[policy];\n\t}", "SimPolicy get(String resourceGroupName, String mobileNetworkName, String simPolicyName);", "public RegistryKeyProperty getPolicyKey();", "public ContainerPolicy getContainerPolicy() {\n return containerPolicy;\n }", "@Override\n public Exp getBasePolicyCode() {\n return null;\n }", "public com.amazon.s3.GetObjectAccessControlPolicyResponse getObjectAccessControlPolicy(com.amazon.s3.GetObjectAccessControlPolicy getObjectAccessControlPolicy);", "public NatPolicy createNatPolicy();", "@Override\n public Response throttlingPoliciesAdvancedPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n APIPolicy apiPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, apiPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, log);\n }\n AdvancedThrottlePolicyDTO policyDTO = AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyToDTO(apiPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while retrieving Advanced level policy : \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "private PolicyHeader loadPolicyHeader(HttpServletRequest request) {\r\n Logger l = LogUtils.enterLog(getClass(), \"loadPolicyHeader\", new Object[]{request});\r\n LogUtils.setPage(\"ActionClass:\"+getClass().getName());\r\n PolicyHeader policyHeader = null;\r\n String policyNo = \"\";\r\n //endorsement quote id used when policyViewMode=\"ENDQUOTE\"\r\n String endQuoteId = request.getParameter(\"endQuoteId\");\r\n if (\"null\".equalsIgnoreCase(endQuoteId)) {\r\n endQuoteId = \"\";\r\n }\r\n\r\n if (!StringUtils.isBlank(request.getParameter(RequestIds.POLICY_NO))) {\r\n policyNo = request.getParameter(RequestIds.POLICY_NO);\r\n }\r\n else {\r\n if (RequestStorageManager.getInstance().has(RequestStorageIds.POLICY_NO)) {\r\n policyNo = (String) RequestStorageManager.getInstance().get(RequestStorageIds.POLICY_NO);\r\n }\r\n }\r\n\r\n if (!StringUtils.isBlank(policyNo)) {\r\n\r\n //if the policyNo is changed, unlock previour held lock\r\n if (UserSessionManager.getInstance().getUserSession().has(UserSessionIds.POLICY_HEADER)) {\r\n\r\n PolicyHeader previousPolicyHeader =\r\n (PolicyHeader) UserSessionManager.getInstance().getUserSession().get(UserSessionIds.POLICY_HEADER);\r\n if (previousPolicyHeader != null && !previousPolicyHeader.getPolicyNo().equals(policyNo)) {\r\n if (getLockManager().unLockPreviouslyHeldLock()) {\r\n UserSessionManager.getInstance().getUserSession().remove(UserSessionIds.POLICY_HEADER);\r\n }\r\n else {\r\n l.logp(Level.WARNING, getClass().getName(), \"execute\", \"For policy number:'\"+policyNo+\"', \" +\r\n \"it could not release the locks possible due to another user acquiring the lock in the meantime when the lock expired!\");\r\n }\r\n }\r\n }\r\n\r\n String policyTermHistoryId = null;\r\n PolicyViewMode policyViewMode = PolicyViewMode.WIP;\r\n\r\n if (request.getParameter(RequestIds.POLICY_TERM_HISTORY_ID) != null) {\r\n if (!StringUtils.isBlank(request.getParameter(RequestIds.POLICY_TERM_HISTORY_ID)))\r\n policyTermHistoryId = request.getParameter(RequestIds.POLICY_TERM_HISTORY_ID);\r\n }\r\n else {\r\n // If there is an in progress workflow for this policyNo, system retrieves policyTermHistoryId from this workflow.\r\n WorkflowAgent wa = WorkflowAgentImpl.getInstance();\r\n if (wa.hasWorkflow(policyNo)) {\r\n policyTermHistoryId = (String) wa.getWorkflowAttribute(policyNo, RequestIds.POLICY_TERM_HISTORY_ID);\r\n }\r\n else if (RequestStorageManager.getInstance().has(RequestStorageIds.POLICY_TERM_HISTORY_ID)) {\r\n policyTermHistoryId = RequestStorageManager.getInstance().get(RequestStorageIds.POLICY_TERM_HISTORY_ID).toString();\r\n }\r\n }\r\n\r\n // If there is an in progress workflow for this policyNo, system retrieves endQuoteId & policyViewMode from this workflow.\r\n WorkflowAgent wa = WorkflowAgentImpl.getInstance();\r\n String polViewMode = \"\";\r\n if (wa.hasWorkflow(policyNo)) {\r\n if(StringUtils.isBlank(endQuoteId) && wa.hasWorkflowAttribute(policyNo, RequestIds.END_QUOTE_ID)) {\r\n endQuoteId = (String) wa.getWorkflowAttribute(policyNo, RequestIds.END_QUOTE_ID);\r\n if (wa.hasWorkflowAttribute(policyNo, RequestIds.POLICY_VIEW_MODE)) {\r\n polViewMode = (String) wa.getWorkflowAttribute(policyNo, RequestIds.POLICY_VIEW_MODE);\r\n }\r\n }\r\n }\r\n String viewMode = !StringUtils.isBlank(polViewMode)? polViewMode : request.getParameter(RequestIds.POLICY_VIEW_MODE);\r\n\r\n if (!StringUtils.isBlank(viewMode)) {\r\n if (viewMode.indexOf(PolicyViewMode.ENDQUOTE.getName()) > -1) {\r\n viewMode = PolicyViewMode.ENDQUOTE.getName();\r\n }\r\n policyViewMode = PolicyViewMode.getInstance(viewMode);\r\n }\r\n\r\n/* String policyLockId = \"\";\r\n if (request.getParameter(RequestIds.POLICY_LOCK_ID) != null) {\r\n policyLockId = request.getParameter(RequestIds.POLICY_LOCK_ID);\r\n }*/\r\n\r\n try {\r\n PolicyManager polMgr = getPolicyManager();\r\n String process = request.getParameter(\"process\");\r\n String requestId = getClass().getName() + \"&process=\" + process;\r\n boolean isMonitorPolicy = isMonitorPolicyProcess(process);\r\n if (request.getParameter(POLICY_PHASE_CODE) != null) {\r\n RequestStorageManager.getInstance().set(POLICY_PHASE_CODE, request.getParameter(POLICY_PHASE_CODE));\r\n }\r\n policyHeader = polMgr.loadPolicyHeader(policyNo, policyTermHistoryId, policyViewMode, endQuoteId, requestId, process, isMonitorPolicy);\r\n\r\n String activityDisplayInformation = MessageManager.getInstance().formatMessage(\r\n \"cs.policy.activityHistory.displayInformation\",\r\n new String[]{policyHeader.getPolicyHolderName()});\r\n\r\n getActivityHistoryManager().recordActivityHistory(\r\n ApplicationContext.getInstance().getProperty(\"applicationId\", \"Policy\"),\r\n \"POLICY\", policyHeader.getPolicyNo(), policyHeader.getPolicyId(),\r\n \"\", activityDisplayInformation, \"\");\r\n }\r\n catch (Exception e) {\r\n AppException ae = ExceptionHelper.getInstance().handleException(\"Unable to find policy information for : \" + policyNo, e);\r\n l.throwing(getClass().getName(), \"loadPolicyHeader\", ae);\r\n throw ae;\r\n }\r\n\r\n request.setAttribute(RequestIds.POLICY_HEADER, policyHeader);\r\n request.setAttribute(RequestIds.SELECTED_POLICY_VIEW_MODE, policyHeader.getPolicyIdentifier().getPolicyViewMode());\r\n request.setAttribute(RequestIds.IS_POLICY_VIEW_MODE_VISIBLE, YesNoFlag.getInstance(policyHeader.isShowViewMode()));\r\n //request.setAttribute(RequestIds.POLICY_LOCK_ID, policyHeader.getPolicyIdentifier().getPolicyLockId());\r\n }\r\n else {\r\n try {\r\n if (getLockManager().unLockPreviouslyHeldLock()) {\r\n UserSessionManager.getInstance().getUserSession().remove(UserSessionIds.POLICY_HEADER);\r\n }\r\n else {\r\n throw new AppException(\"Unable to unlock previously held lock.\");\r\n }\r\n UserCacheManager.getInstance().remove(UserCacheManager.POLICY_OASIS_FIELDS_CACHE);\r\n }\r\n catch (Exception e) {\r\n AppException ae = ExceptionHelper.getInstance().handleException(\"Unable to find policy information for : \" + policyNo, e);\r\n l.throwing(getClass().getName(), \"loadPolicyHeader\", ae);\r\n throw ae;\r\n }\r\n }\r\n\r\n if (policyHeader != null) {\r\n if (UserSessionManager.getInstance().getUserSession().has(RequestIds.PREVIOUS_POLICY_NO) &&\r\n policyHeader.getPolicyNo().equals(UserSessionManager.getInstance().getUserSession().get(RequestIds.PREVIOUS_POLICY_NO))) {\r\n request.setAttribute(RequestIds.IS_SAME_POLICY_B, \"Y\");\r\n }\r\n else {\r\n request.setAttribute(RequestIds.IS_SAME_POLICY_B, \"N\");\r\n }\r\n UserSessionManager.getInstance().getUserSession().set(RequestIds.PREVIOUS_POLICY_NO, policyHeader.getPolicyNo());\r\n }\r\n else {\r\n request.setAttribute(RequestIds.IS_SAME_POLICY_B, \"N\");\r\n }\r\n\r\n if (l.isLoggable(Level.FINER)) {\r\n l.exiting(getClass().getName(), \"loadPolicyHeader\", policyHeader);\r\n }\r\n return policyHeader;\r\n }", "List<PolicyDetail> viewpolicyDetail(int lenderId);", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-08-13 13:14:15.602 -0400\", hash_original_method = \"4B5496A79468DEC2FA84449A5CCBD295\", hash_generated_method = \"06016682917508DEF780A2C1DA1531D4\")\n \npublic PolicyNode getPolicyTree() {\n return policyTree;\n }", "public static short[] getPolicies() {\n\t\treturn POLICIES;\n\t}", "AgentPolicy build();", "Object getPerm(String name);", "public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getGetIamPolicyMethod(), getCallOptions(), request);\n }", "List<PolicyDAO> getAllPolicies();", "public void addPolicy(Policy policy) throws APIManagementException {\n\n if (policy instanceof APIPolicy) {\n APIPolicy apiPolicy = (APIPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getAPIPolicy(userNameWithoutChange, apiPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Advanced Policy with name \" + apiPolicy.getPolicyName() + \" already exists\");\n }\n apiPolicy.setUserLevel(PolicyConstants.ACROSS_ALL);\n apiPolicy = apiMgtDAO.addAPIPolicy(apiPolicy);\n List<Integer> addedConditionGroupIds = new ArrayList<>();\n for (Pipeline pipeline : apiPolicy.getPipelines()) {\n addedConditionGroupIds.add(pipeline.getId());\n }\n APIPolicyEvent apiPolicyEvent = new APIPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n apiPolicy.getTenantDomain(), apiPolicy.getPolicyId(), apiPolicy.getPolicyName(),\n apiPolicy.getDefaultQuotaPolicy().getType(), addedConditionGroupIds, null);\n APIUtil.sendNotification(apiPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof ApplicationPolicy) {\n ApplicationPolicy appPolicy = (ApplicationPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getApplicationPolicy(userNameWithoutChange, appPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Application Policy with name \" + appPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addApplicationPolicy(appPolicy);\n //policy id is not set. retrieving policy to get the id.\n ApplicationPolicy retrievedPolicy = apiMgtDAO.getApplicationPolicy(appPolicy.getPolicyName(), tenantId);\n ApplicationPolicyEvent applicationPolicyEvent = new ApplicationPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n appPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(), appPolicy.getPolicyName(),\n appPolicy.getDefaultQuotaPolicy().getType());\n APIUtil.sendNotification(applicationPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof SubscriptionPolicy) {\n SubscriptionPolicy subPolicy = (SubscriptionPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getSubscriptionPolicy(userNameWithoutChange, subPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Subscription Policy with name \" + subPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addSubscriptionPolicy(subPolicy);\n String monetizationPlan = subPolicy.getMonetizationPlan();\n Map<String, String> monetizationPlanProperties = subPolicy.getMonetizationPlanProperties();\n if (StringUtils.isNotBlank(monetizationPlan) && MapUtils.isNotEmpty(monetizationPlanProperties)) {\n createMonetizationPlan(subPolicy);\n }\n //policy id is not set. retrieving policy to get the id.\n SubscriptionPolicy retrievedPolicy = apiMgtDAO.getSubscriptionPolicy(subPolicy.getPolicyName(), tenantId);\n SubscriptionPolicyEvent subscriptionPolicyEvent = new SubscriptionPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId, subPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n subPolicy.getPolicyName(), subPolicy.getDefaultQuotaPolicy().getType(),\n subPolicy.getRateLimitCount(),subPolicy.getRateLimitTimeUnit(), subPolicy.isStopOnQuotaReach(),\n subPolicy.getGraphQLMaxDepth(),subPolicy.getGraphQLMaxComplexity(),subPolicy.getSubscriberCount());\n APIUtil.sendNotification(subscriptionPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof GlobalPolicy) {\n GlobalPolicy globalPolicy = (GlobalPolicy) policy;\n\n // checking if policy already exist\n Policy existingPolicy = getGlobalPolicy(globalPolicy.getPolicyName());\n if (existingPolicy != null) {\n throw new APIManagementException(\"Policy name already exists\");\n }\n\n apiMgtDAO.addGlobalPolicy(globalPolicy);\n\n KeyTemplateEvent keyTemplateEvent = new KeyTemplateEvent(UUID.randomUUID().toString(), System.currentTimeMillis(),\n APIConstants.EventType.CUSTOM_POLICY_ADD.name(), tenantId, tenantDomain,\n \"add\", globalPolicy.getKeyTemplate());\n APIUtil.sendNotification(keyTemplateEvent, APIConstants.NotifierType.KEY_TEMPLATE.name());\n\n GlobalPolicy retrievedPolicy = apiMgtDAO.getGlobalPolicy(globalPolicy.getPolicyName());\n GlobalPolicyEvent globalPolicyEvent = new GlobalPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n globalPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n globalPolicy.getPolicyName());\n APIUtil.sendNotification(globalPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else {\n String msg = \"Policy type \" + policy.getClass().getName() + \" is not supported\";\n log.error(msg);\n throw new UnsupportedPolicyTypeException(msg);\n }\n }", "public interface TilePolicy {\n\n\tpublic boolean getEnterableAt(Pair xy);\n\tpublic boolean getPassableAt(Pair xy);\n\tpublic boolean getJumpableAt(Pair xy);\n\t\n\tpublic boolean getWalkableAt(Pair xy, Player player);\n\tpublic boolean getEnterableAt(Pair xy, CellLogic ignore);\n\t\n\t/**\n\t * All policies must return a name so they can be enumerated\n\t * and a group of grunts all moving at once can share policies\n\t * if they have the same movement. Comparing getName is\n\t * equivalent to an equality test between policies.\n\t * \n\t * @return The name of the Policy\n\t */\n\tpublic String getName();\n\t\n}", "public int getPolicy(String appName, String apiName, Object... parameterType) {\n\n int policy = defaultPolicy;\n\n /** global rules */\n\n if (currentPolicy.containsKey(\"* \" + apiName)) {\n policy = currentPolicy.get(\"* \" + apiName).ctrlPolicy;\n }\n\n /** specific rules overwrites global ones */\n\n if (currentPolicy.containsKey(appName + \" \" + apiName)) {\n policy = currentPolicy.get(appName + \" \" + apiName).ctrlPolicy;\n }\n\n /** if no rules are defined, adopt default ones */\n\n return policy;\n }", "String getLbPolicy() {\n return lbPolicy;\n }", "public static CustomPolicy createDefaultCustomPolicy() {\n CustomPolicy customPolicy = new CustomPolicy(SAMPLE_CUSTOM_RULE);\n customPolicy.setKeyTemplate(\"$userId\");\n String siddhiQuery = \"FROM RequestStream SELECT userId, ( userId == '[email protected]' ) AS isEligible , \"\n + \"str:concat('[email protected]','') as throttleKey INSERT INTO EligibilityStream;\"\n + \"FROM EligibilityStream[isEligible==true]#throttler:timeBatch(1 min) SELECT throttleKey, \"\n + \"(count(userId) >= 5 as isThrottled, expiryTimeStamp group by throttleKey INSERT ALL EVENTS into \"\n + \"ResultStream;\";\n\n customPolicy.setSiddhiQuery(siddhiQuery);\n customPolicy.setDescription(\"Sample custom policy\");\n return customPolicy;\n }", "private void loadPolicy() {\n loadSavedGlobalSetting();\n loadDefaultPolicy();\n loadSavedSetting();\n saveSetting();\n }", "FirewallPolicyService firewallpolicy();", "public void createASPolicy(){\n\t\t\n\t\t// First create for replicated objects\n\t\t//System.out.println(\"Inside ObjectBasedAnalyzer: createASPolicy\");\n\t\t\n\t\tcreateReplicatedObjectsPolicy();\n\t\t\t\t\n\t\t// Now for rest of objects\n\t\t\n//\t\tcreateOnlyDistributedObjectsPolicy();\n\t\t\n\t\tIterator<String> iap = ASPolicyMap.keySet().iterator();\n\t\t\n\t\tSystem.out.println(\"---------------ASPolicy Start------------------\");\n//\t\t\n\t\twhile(iap.hasNext()){\n//\t\t\t\n//\t\t\t\n\t\t\tString serId = iap.next();\n\t\t\tSystem.out.println(\"AS Policy for:\" + serId);\n\t\t\tmanager.getASServer(serId).currentPolicy = ASPolicyMap.get(serId);\n\t\t\tSystem.out.println(\"No of policy entries for this server are:\" + manager.getASServer(serId).currentPolicy.policyMap.size());\n\t\t}\n//\t\t\n\t\tSystem.out.println(\"---------------ASPolicy End------------------\");\n\t\t\t\t\t\t\n\t}", "AccessPoliciesClient getAccessPolicies();", "public abstract boolean checkPolicy(User user);", "public ExceptionPolicyEntry GetPolicyEntry(Class<?> exceptionType)\n {\n if (policyEntries.containsKey(exceptionType))\n {\n return policyEntries.get(exceptionType);\n }\n return null;\n }", "public MicrosoftGraphStsPolicy() {\n }", "protected GuiTestObject html_refPolicyNumber() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"html_refPolicyNumber\"));\n\t}", "public ScalePolicy getScalePolicy() {\n\t\treturn null;\n\t}", "public DistributionPolicyInternal() {}", "protected Permissions getExcludedPolicy(){\n\treturn stateIs(INSERVICE_STATE) ? this.excludedPermissions : null;\n }", "public PolicyDTO[] readAllPolicies() throws EntitlementException {\n \n Resource[] resources = null;\n PolicyDTO[] policies = null;\n resources = getAllPolicyResource();\n\n if (resources == null) {\n return new PolicyDTO[0];\n }\n policies = new PolicyDTO[resources.length];\n\n List<PolicyDTO> policyDTOList = new ArrayList<PolicyDTO>();\n int[] policyOrder = new int[resources.length];\n\n for(int i = 0; i < resources.length; i++){\n PolicyDTO policyDTO = readPolicy(resources[i]);\n policyDTOList.add(policyDTO);\n policyOrder[i] = policyDTO.getPolicyOrder();\n }\n\n // sorting array TODO : with Comparator class\n int[] tempArray = new int[policyOrder.length];\n Arrays.sort(policyOrder);\n for (int i = 0; i < tempArray.length; i++) {\n int j = (policyOrder.length-1)-i;\n tempArray[j] = policyOrder[i];\n }\n policyOrder = tempArray;\n\n for (int i = 0; i < policyOrder.length; i++) {\n for(PolicyDTO policyDTO : policyDTOList){\n if(policyOrder[i] == policyDTO.getPolicyOrder()){\n policies[i] = policyDTO;\n }\n }\n }\n \n return policies;\n }", "List<PolicyController> getPolicyControllers();", "PolicyController createPolicyController(String name, Properties properties);", "private PolicyDocument getGlueAthenaS3AccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"glue:GetTableVersions\");\n statementActionsPolicy.add(\"glue:GetPartitions\");\n statementActionsPolicy.add(\"glue:GetTables\");\n statementActionsPolicy.add(\"glue:GetTableVersion\");\n statementActionsPolicy.add(\"glue:GetDatabases\");\n statementActionsPolicy.add(\"glue:GetTable\");\n statementActionsPolicy.add(\"glue:GetPartition\");\n statementActionsPolicy.add(\"glue:GetDatabase\");\n statementActionsPolicy.add(\"athena:GetQueryExecution\");\n statementActionsPolicy.add(\"s3:ListAllMyBuckets\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\"*\"))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "public ResourceReadPolicy getReadPolicy(Class<?> resourceClass, User user)\n\t{\n\t\tString resourceAlias = resourceClass.getSimpleName();\n\t\tresourceAlias = resourceAlias.substring(0, 1).toLowerCase() + resourceAlias.substring(1);\n\t\tString projectAlias = \"project\";\n\t\t\n\t\tif (this.getLogicOperator() == LogicOperator.AND)\n\t\t{\n\t\t\tResourceReadPolicy readPolicy = new ResourceReadPolicy();\n\n\t\t\tif (this.isEntityAccessGranted(user))\n\t\t\t{\n\t\t\t\treadPolicy.setReadGranted(true);\n\t\t\t\tString conditions = this.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user);\n\t\t\t\t\n\t\t\t\tfor (AbacPolicy subPolicy : this.getSubPolicies())\n\t\t\t\t{\n\t\t\t\t\tif (subPolicy.isEntityAccessGranted(user))\n\t\t\t\t\t{\n\t\t\t\t\t\tString groupConditions = subPolicy.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user);\n\t\t\t\t\t\tif (conditions.isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconditions = groupConditions;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (!groupConditions.isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconditions = conditions + \" \" + this.logicOperator + \" \" + groupConditions;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse // If subgroup entity access is not granted\n\t\t\t\t\t{\n\t\t\t\t\t\treadPolicy.setReadGranted(false);\n\t\t\t\t\t\treadPolicy.setReadConditions(null);\n\t\t\t\t\t\treturn readPolicy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treadPolicy.setReadConditions(conditions);\n\t\t\t\treturn readPolicy;\n\t\t\t}\n\t\t\telse // If group entity access is not granted\n\t\t\t{\n\t\t\t\treadPolicy.setReadGranted(false);\n\t\t\t\treturn readPolicy;\n\t\t\t}\n\t\t}\n\t\telse // If Logic Operator is OR \n\t\t{\n\t\t\tResourceReadPolicy resourceReadPolicy = new ResourceReadPolicy();\n\t\t\t\n\t\t\tif (this.isEntityAccessGranted(user))\n\t\t\t{\n\t\t\t\tresourceReadPolicy.setReadGranted(true);\n\t\t\t\tresourceReadPolicy.setReadConditions(this.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user));\t\t\t\t\n\t\t\t}\n\n\t\t\tfor (AbacPolicy subPolicy : this.getSubPolicies())\n\t\t\t{\n\t\t\t\tResourceReadPolicy groupReadPolicy = subPolicy.readGroupPolicy(resourceAlias, projectAlias, user);\n\t\t\t\tif (groupReadPolicy.isReadGranted())\n\t\t\t\t{\n\t\t\t\t\tresourceReadPolicy.setReadGranted(true);\n\t\t\t\t\t\n\t\t\t\t\tString conditions = resourceReadPolicy.getReadConditions();\n\t\t\t\t\tif (conditions.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tconditions = groupReadPolicy.getReadConditions();\n\t\t\t\t\t}\n\t\t\t\t\telse if (!groupReadPolicy.getReadConditions().isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tconditions += \" \" + this.logicOperator + \" \" + groupReadPolicy.getReadConditions();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tresourceReadPolicy.setReadConditions(conditions);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn resourceReadPolicy;\n\t\t}\n\t}", "public String getPolicyGroupName() \n {\n return policyGroupName;\n }", "public EditPolicy() {\r\n super();\r\n }", "public com.amazon.s3.GetBucketAccessControlPolicyResponse getBucketAccessControlPolicy(com.amazon.s3.GetBucketAccessControlPolicy getBucketAccessControlPolicy);", "public PolicyServiceDelegate()\n {\n log.debug(\"\") ;\n log.debug(\"----\\\"----\") ;\n log.debug(\"PolicyServiceDelegate()\") ;\n try\n {\n service = getService(CommunityConfig.getServiceUrl());\n }\n catch(Exception e) {\n e.printStackTrace();\n service = null;\n }\n log.debug(\"----\\\"----\") ;\n log.debug(\"\") ;\n }", "protected PolicySourceModel create(final Policy policy) {\n return PolicySourceModel.createPolicySourceModel(policy.getNamespaceVersion(),\n policy.getId(), policy.getName());\n }", "public CellPolicy\n getCellPolicy() \n {\n return pCellPolicy;\n }", "public static ProphetQueuing getInstance() {\r\n\t\tif (instance_ == null) {\r\n\t\t\tswitch (policy) {\r\n\t\t\tcase FIFO:\r\n\t\t\t\tinstance_ = (ProphetQueuing) new Fifo();\r\n\t\t\t\tbreak;\r\n\t\t\tcase MOFO:\r\n\t\t\t\tinstance_ = (ProphetQueuing) new Mofo();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tBPF.getInstance().getBPFLogger()\r\n\t\t\t\t\t\t.error(TAG, \"Wrong policy in prophet routing type\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn instance_;\r\n\t}", "public int getPolicyID(int policy_id) {\n int id = 0;\n try {\n checkPolicyID.setInt(1, policy_id);\n ResultSet resultset = checkPolicyID.executeQuery();\n while (resultset.next()) {\n id = resultset.getInt(\"policy_id\");\n System.out.println(\"Policy ID: \" + id);\n }\n resultset.close();\n }\n catch (SQLException exception) {\n System.out.println(\"Invalid Input!\");\n }\n return id;\n }", "public EvictionPolicy getEvictionPolicy()\n {\n return m_policy;\n }", "public PolicyIDImpl() {\n super();\n }" ]
[ "0.8114049", "0.7391775", "0.7025899", "0.69773865", "0.69632804", "0.6686403", "0.66320604", "0.6630122", "0.65724206", "0.65297765", "0.6528546", "0.64773864", "0.6452213", "0.63688993", "0.6298969", "0.6271056", "0.62303936", "0.62292606", "0.6211037", "0.6111656", "0.60651374", "0.6002254", "0.5982806", "0.59602857", "0.5950011", "0.59339505", "0.5895105", "0.589448", "0.58788437", "0.58768356", "0.58630204", "0.5861658", "0.5849337", "0.58444566", "0.5842598", "0.58396393", "0.58396393", "0.5836051", "0.5815763", "0.5800587", "0.57641494", "0.5758765", "0.5746622", "0.573647", "0.57341146", "0.5724297", "0.57160425", "0.5705138", "0.56999445", "0.56999", "0.56801057", "0.56712276", "0.56523097", "0.56466746", "0.5613606", "0.5606919", "0.5605633", "0.55990094", "0.5591714", "0.55702144", "0.5569083", "0.55524606", "0.55442643", "0.55366206", "0.5525801", "0.5524467", "0.548682", "0.5481371", "0.5477625", "0.5445784", "0.54443514", "0.54375124", "0.5436313", "0.5407421", "0.5396003", "0.53832036", "0.5377169", "0.53692335", "0.5346551", "0.53457785", "0.53439313", "0.5343402", "0.5339658", "0.53362554", "0.53194875", "0.53185624", "0.53183943", "0.53160715", "0.53158206", "0.52838486", "0.52799064", "0.5273406", "0.5264095", "0.52638793", "0.5262683", "0.5252969", "0.52482474", "0.5246118", "0.5239656", "0.5238472" ]
0.7550172
1
get the policy object
protected Permissions getExcludedPolicy(){ return stateIs(INSERVICE_STATE) ? this.excludedPermissions : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Policy _get_policy(int policy_type);", "protected java.security.Policy getPolicy(){\n\tif (stateIs(INSERVICE_STATE)) {\n\t return this.policy;\n\t} \n\tif (logger.isLoggable(Level.FINEST)) {\n\t logger.finest(\"JACC Policy Provider: getPolicy (\"+CONTEXT_ID+\") is NOT in service\");\n\t}\n\treturn null;\n }", "public Policy _get_policy(int policy_type) {\n throw new NO_IMPLEMENT(reason);\n }", "public com.vmware.converter.DVSPolicy getPolicy() {\r\n return policy;\r\n }", "public PolicyMap getPolicyMap();", "@Override\r\n\tpublic Policy getById(Integer pid) {\n\t\tPolicy policy =dao.getById(pid);\r\n return policy;\r\n\t}", "PolicyRecord findOne(Long id);", "PolicyDetail findPolicyByID(int policyId, int lenderId);", "PolicyDecision getDecision();", "public PolicyPermission getPolicyPermission()\n {\n return this.perm;\n }", "PolicyDetail findPolicyDetail(int policyId, Lender lender);", "Policy_Repository createPolicy_Repository();", "public CompanyPolicy getPolicy(int policyNo) {\n\t\tCompanyPolicy cPolicy = (CompanyPolicy)session.get(CompanyPolicy.class, policyNo); \n return cPolicy;\n\t}", "public String getAbyssPolicy()\n {\n return m_AbyssPolicy;\n }", "private PolicyDTO readPolicy(Resource resource) throws EntitlementException {\n \n String policy = null;\n AbstractPolicy absPolicy = null;\n PolicyDTO dto = null;\n\n try {\n policy = new String((byte[]) resource.getContent(), Charset.forName(\"UTF-8\"));\n absPolicy = PolicyReader.getInstance(null).getPolicy(policy);\n dto = new PolicyDTO();\n dto.setPolicyId(absPolicy.getId().toASCIIString());\n dto.setPolicy(policy);\n\n String policyOrder = resource.getProperty(\"policyOrder\");\n if(policyOrder != null){\n dto.setPolicyOrder(Integer.parseInt(policyOrder));\n } else {\n dto.setPolicyOrder(0);\n } // TODO policy refe IDs ???\n PolicyAttributeBuilder policyAttributeBuilder = new PolicyAttributeBuilder();\n dto.setAttributeDTOs(policyAttributeBuilder.\n getPolicyMetaDataFromRegistryProperties(resource.getProperties()));\n return dto;\n } catch (RegistryException e) {\n log.error(\"Error while loading entitlement policy\", e);\n throw new EntitlementException(\"Error while loading entitlement policy\", e);\n }\n }", "public abstract List<AbstractPolicy> getPolicies();", "private Resource getPolicyResource(String policyId) throws EntitlementException {\n String path = null;\n\n if (log.isDebugEnabled()) {\n log.debug(\"Retrieving entitlement policy\");\n }\n\n try {\n path = policyStorePath + policyId;\n\n if (!registry.resourceExists(path)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Trying to access an entitlement policy which does not exist\");\n }\n return null;\n }\n return registry.get(path);\n } catch (RegistryException e) {\n log.error(\"Error while retrieving entitlement policy : \" + policyId, e);\n throw new EntitlementException(\"Error while retrieving entitlement policy : \" + policyId, e);\n }\n }", "PolicyStatsManager getStats();", "@Override\r\n\tpublic List<Policy> getPolicies() {\n\t\tList<Policy> policy=dao.getPolicies();\r\n\t\treturn policy;\r\n\t}", "ServiceEndpointPolicy getById(String id);", "public java.lang.String getPolicyURL() {\n return policyURL;\n }", "public String getPolicy() {\r\n String policy = \"\";\r\n if (!policyRules.isEmpty()) {\r\n policy += policyRules.get(0).getRule().trim();\r\n for (int i = 1; i < policyRules.size(); i++) {\r\n policy += \",\" + policyRules.get(i).getRule().trim();\r\n }\r\n }\r\n\r\n return policy.trim();\r\n }", "StoragePolicyDecisionPoint getStoragePolicyDecisionPoint();", "public Element getSelectedPolicyElement() {\n Element selectedPolicyElement = null;\n IStructuredSelection categoriesCompositeSelection =\n (IStructuredSelection) getTreeViewer().getSelection();\n\n if (!categoriesCompositeSelection.isEmpty()) {\n Element selectedElement = (Element)\n categoriesCompositeSelection.getFirstElement();\n\n if (selectedElement.getName().\n equals(DeviceRepositorySchemaConstants.\n POLICY_ELEMENT_NAME)) {\n selectedPolicyElement = selectedElement;\n }\n }\n return selectedPolicyElement;\n }", "public String getPolicyName() {\n \t\treturn policyName;\n \t}", "public MergePolicy getMergePolicy() { \n\t\tif (mMergePolicy == null) throw new NullPointerException();\n\t\treturn mMergePolicy;\n\t}", "public interface PolicyService {\n\tpublic Policy findPolicy(String id);\n\n\t// Find policies by what role they have\n\tpublic Set<Policy> findPolicyByPerson(String id);\n\tpublic Set<Policy> findPolicyByPersons(Set<String> ids);\n\tpublic Set<Policy> findPolicyByPersonRole(String id, Class<? extends AbstractPolicyRole> role);\n\tpublic Set<Policy> findPolicyByPersonsRole(Set<String> ids, Class<? extends AbstractPolicyRole> role);\n}", "@Override\n public Response throttlingPoliciesApplicationPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy appPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, appPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n ApplicationThrottlePolicyDTO policyDTO =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyToDTO(appPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while retrieving Application level policy: \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "void clearPolicy() {\n policy = new Policy();\n }", "public NatPolicy getNatPolicy();", "public Set<Policy> findPolicyByPerson(String id);", "@Override\n public Response throttlingPoliciesSubscriptionPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n SubscriptionPolicy subscriptionPolicy = apiProvider.getSubscriptionPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, subscriptionPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, log);\n }\n SubscriptionThrottlePolicyDTO policyDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyToDTO(subscriptionPolicy);\n\n //setting policy permissions\n setPolicyPermissionsToDTO(policyDTO);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException | ParseException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, e,\n log);\n } else {\n String errorMessage = \"Error while retrieving Subscription level policy: \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "@Override\n\tpublic Optional<Policy> findPolicyById(int policyId) throws PolicyNotFoundException {\n\t\t// TODO Auto-generated method stub\n\t\tif(!policyDao.existsById(policyId))\n\t\t\tthrow new PolicyNotFoundException(\"policy not found\");\n\t\treturn policyDao.findById(policyId);\n\t}", "@Nullable\n public ManagedAppPolicy get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "@JsonIgnore public BoardingPolicyType getBoardingPolicy() {\n return (BoardingPolicyType) getValue(\"boardingPolicy\");\n }", "public PolicyDTO readPolicy(String policyId) throws EntitlementException {\n\n Resource resource = null;\n \n resource = getPolicyResource(policyId);\n\n if (resource == null) {\n return new PolicyDTO();\n }\n\n return readPolicy(resource);\n }", "public java.lang.String getPolicyNo() {\n return policyNo;\n }", "public java.lang.String getPolicyNo() {\n return policyNo;\n }", "public SigningPolicy getSigningPolicy(String subject) {\n \n if (this.policyDNMap == null) {\n return null;\n }\n\n return (SigningPolicy) this.policyDNMap.get(subject);\n }", "public static Policy getServiceEffectivePolicy(Definitions wsdl, QName serviceQName) throws PolicyException {\n Service srv = wsdl.getService(serviceQName);\n if (srv == null) {\n throw new IllegalArgumentException(\"Cannot find service with qname \" + serviceQName);\n }\n \n Element srvEl = srv.getDomElement();\n Element defsEl = (Element) srvEl.getParentNode();\n \n Policy res = ConfigurationBuilder.loadPolicies(srv, defsEl);\n return res;\n }", "@GetMapping(\"/view-policies/{id}\")\n @Timed\n public ResponseEntity<ViewPolicyDTO> getViewPolicy(@PathVariable Long id) {\n log.debug(\"REST request to get ViewPolicy : {}\", id);\n ViewPolicyDTO viewPolicyDTO = viewPolicyService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(viewPolicyDTO));\n }", "AllocationPolicy getAllocationPolicy(ReservationDAO reservations);", "@Override\n\tpublic Policy addPolicy(Policy policy) {\n\t\t// TODO Auto-generated method stub\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "String getBlockPolicy();", "private static String getBucketPolicyFromFile(String policy_file) {\r\n StringBuilder file_text = new StringBuilder();\r\n try {\r\n List<String> lines = Files.readAllLines(\r\n Paths.get(policy_file), Charset.forName(\"UTF-8\"));\r\n for (String line : lines) {\r\n file_text.append(line);\r\n }\r\n } catch (IOException e) {\r\n System.out.format(\"Problem reading file: \\\"%s\\\"\", policy_file);\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n // Verify the policy by trying to load it into a Policy object.\r\n Policy bucket_policy = null;\r\n try {\r\n bucket_policy = Policy.fromJson(file_text.toString());\r\n } catch (IllegalArgumentException e) {\r\n System.out.format(\"Invalid policy text in file: \\\"%s\\\"\",\r\n policy_file);\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n return bucket_policy.toJson();\r\n }", "private RoutingPolicy getExportPolicy() {\n\t String exportPolicyName = null;\n switch(this.getType()) {\n case BGP:\n // String constant from\n // org.batfish.representation.cisco.CiscoConfiguration.toBgpProcess\n exportPolicyName = \"~BGP_COMMON_EXPORT_POLICY:\" \n + this.getVrf().getName() + \"~\";\n break;\n case OSPF:\n exportPolicyName = this.ospfConfig.getExportPolicy();\n break;\n default:\n return null;\n }\n\n return this.getDevice().getRoutingPolicy(exportPolicyName);\n\t}", "@Test\n\tpublic void testGetPolicy() throws Exception {\n\t\tfail(\"testGetPolicy not implemented\");\n\t}", "String privacyPolicy();", "public Policy reference() throws DynamicParamException, AgentException, MatrixException, IOException, ClassNotFoundException {\n return new UpdateableBasicPolicy(executablePolicy.getExecutablePolicyType(), getFunctionEstimator().reference(), params);\n }", "public String getPolicyArn() {\n return this.policyArn;\n }", "public void setPolicy(short policy) {\n\t\t_policy = policy;\n\t}", "@XmlElement(name = \"source_policy\")\r\n public ProtectionSourcePolicy getSourcePolicy() {\r\n return sourcePolicy;\r\n }", "@Attribute(order = 100, validators = { RequiredValueValidator.class })\n\t\tString policyName();", "public Object getSalesProductAgreementPolicyTermRecord() {\n return salesProductAgreementPolicyTermRecord;\n }", "public static String getPolicyString(short policy) {\n\t\treturn POLICY_STRINGS[policy];\n\t}", "SimPolicy get(String resourceGroupName, String mobileNetworkName, String simPolicyName);", "public RegistryKeyProperty getPolicyKey();", "public ContainerPolicy getContainerPolicy() {\n return containerPolicy;\n }", "@Override\n public Exp getBasePolicyCode() {\n return null;\n }", "public com.amazon.s3.GetObjectAccessControlPolicyResponse getObjectAccessControlPolicy(com.amazon.s3.GetObjectAccessControlPolicy getObjectAccessControlPolicy);", "public NatPolicy createNatPolicy();", "@Override\n public Response throttlingPoliciesAdvancedPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n APIPolicy apiPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, apiPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, log);\n }\n AdvancedThrottlePolicyDTO policyDTO = AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyToDTO(apiPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while retrieving Advanced level policy : \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "private PolicyHeader loadPolicyHeader(HttpServletRequest request) {\r\n Logger l = LogUtils.enterLog(getClass(), \"loadPolicyHeader\", new Object[]{request});\r\n LogUtils.setPage(\"ActionClass:\"+getClass().getName());\r\n PolicyHeader policyHeader = null;\r\n String policyNo = \"\";\r\n //endorsement quote id used when policyViewMode=\"ENDQUOTE\"\r\n String endQuoteId = request.getParameter(\"endQuoteId\");\r\n if (\"null\".equalsIgnoreCase(endQuoteId)) {\r\n endQuoteId = \"\";\r\n }\r\n\r\n if (!StringUtils.isBlank(request.getParameter(RequestIds.POLICY_NO))) {\r\n policyNo = request.getParameter(RequestIds.POLICY_NO);\r\n }\r\n else {\r\n if (RequestStorageManager.getInstance().has(RequestStorageIds.POLICY_NO)) {\r\n policyNo = (String) RequestStorageManager.getInstance().get(RequestStorageIds.POLICY_NO);\r\n }\r\n }\r\n\r\n if (!StringUtils.isBlank(policyNo)) {\r\n\r\n //if the policyNo is changed, unlock previour held lock\r\n if (UserSessionManager.getInstance().getUserSession().has(UserSessionIds.POLICY_HEADER)) {\r\n\r\n PolicyHeader previousPolicyHeader =\r\n (PolicyHeader) UserSessionManager.getInstance().getUserSession().get(UserSessionIds.POLICY_HEADER);\r\n if (previousPolicyHeader != null && !previousPolicyHeader.getPolicyNo().equals(policyNo)) {\r\n if (getLockManager().unLockPreviouslyHeldLock()) {\r\n UserSessionManager.getInstance().getUserSession().remove(UserSessionIds.POLICY_HEADER);\r\n }\r\n else {\r\n l.logp(Level.WARNING, getClass().getName(), \"execute\", \"For policy number:'\"+policyNo+\"', \" +\r\n \"it could not release the locks possible due to another user acquiring the lock in the meantime when the lock expired!\");\r\n }\r\n }\r\n }\r\n\r\n String policyTermHistoryId = null;\r\n PolicyViewMode policyViewMode = PolicyViewMode.WIP;\r\n\r\n if (request.getParameter(RequestIds.POLICY_TERM_HISTORY_ID) != null) {\r\n if (!StringUtils.isBlank(request.getParameter(RequestIds.POLICY_TERM_HISTORY_ID)))\r\n policyTermHistoryId = request.getParameter(RequestIds.POLICY_TERM_HISTORY_ID);\r\n }\r\n else {\r\n // If there is an in progress workflow for this policyNo, system retrieves policyTermHistoryId from this workflow.\r\n WorkflowAgent wa = WorkflowAgentImpl.getInstance();\r\n if (wa.hasWorkflow(policyNo)) {\r\n policyTermHistoryId = (String) wa.getWorkflowAttribute(policyNo, RequestIds.POLICY_TERM_HISTORY_ID);\r\n }\r\n else if (RequestStorageManager.getInstance().has(RequestStorageIds.POLICY_TERM_HISTORY_ID)) {\r\n policyTermHistoryId = RequestStorageManager.getInstance().get(RequestStorageIds.POLICY_TERM_HISTORY_ID).toString();\r\n }\r\n }\r\n\r\n // If there is an in progress workflow for this policyNo, system retrieves endQuoteId & policyViewMode from this workflow.\r\n WorkflowAgent wa = WorkflowAgentImpl.getInstance();\r\n String polViewMode = \"\";\r\n if (wa.hasWorkflow(policyNo)) {\r\n if(StringUtils.isBlank(endQuoteId) && wa.hasWorkflowAttribute(policyNo, RequestIds.END_QUOTE_ID)) {\r\n endQuoteId = (String) wa.getWorkflowAttribute(policyNo, RequestIds.END_QUOTE_ID);\r\n if (wa.hasWorkflowAttribute(policyNo, RequestIds.POLICY_VIEW_MODE)) {\r\n polViewMode = (String) wa.getWorkflowAttribute(policyNo, RequestIds.POLICY_VIEW_MODE);\r\n }\r\n }\r\n }\r\n String viewMode = !StringUtils.isBlank(polViewMode)? polViewMode : request.getParameter(RequestIds.POLICY_VIEW_MODE);\r\n\r\n if (!StringUtils.isBlank(viewMode)) {\r\n if (viewMode.indexOf(PolicyViewMode.ENDQUOTE.getName()) > -1) {\r\n viewMode = PolicyViewMode.ENDQUOTE.getName();\r\n }\r\n policyViewMode = PolicyViewMode.getInstance(viewMode);\r\n }\r\n\r\n/* String policyLockId = \"\";\r\n if (request.getParameter(RequestIds.POLICY_LOCK_ID) != null) {\r\n policyLockId = request.getParameter(RequestIds.POLICY_LOCK_ID);\r\n }*/\r\n\r\n try {\r\n PolicyManager polMgr = getPolicyManager();\r\n String process = request.getParameter(\"process\");\r\n String requestId = getClass().getName() + \"&process=\" + process;\r\n boolean isMonitorPolicy = isMonitorPolicyProcess(process);\r\n if (request.getParameter(POLICY_PHASE_CODE) != null) {\r\n RequestStorageManager.getInstance().set(POLICY_PHASE_CODE, request.getParameter(POLICY_PHASE_CODE));\r\n }\r\n policyHeader = polMgr.loadPolicyHeader(policyNo, policyTermHistoryId, policyViewMode, endQuoteId, requestId, process, isMonitorPolicy);\r\n\r\n String activityDisplayInformation = MessageManager.getInstance().formatMessage(\r\n \"cs.policy.activityHistory.displayInformation\",\r\n new String[]{policyHeader.getPolicyHolderName()});\r\n\r\n getActivityHistoryManager().recordActivityHistory(\r\n ApplicationContext.getInstance().getProperty(\"applicationId\", \"Policy\"),\r\n \"POLICY\", policyHeader.getPolicyNo(), policyHeader.getPolicyId(),\r\n \"\", activityDisplayInformation, \"\");\r\n }\r\n catch (Exception e) {\r\n AppException ae = ExceptionHelper.getInstance().handleException(\"Unable to find policy information for : \" + policyNo, e);\r\n l.throwing(getClass().getName(), \"loadPolicyHeader\", ae);\r\n throw ae;\r\n }\r\n\r\n request.setAttribute(RequestIds.POLICY_HEADER, policyHeader);\r\n request.setAttribute(RequestIds.SELECTED_POLICY_VIEW_MODE, policyHeader.getPolicyIdentifier().getPolicyViewMode());\r\n request.setAttribute(RequestIds.IS_POLICY_VIEW_MODE_VISIBLE, YesNoFlag.getInstance(policyHeader.isShowViewMode()));\r\n //request.setAttribute(RequestIds.POLICY_LOCK_ID, policyHeader.getPolicyIdentifier().getPolicyLockId());\r\n }\r\n else {\r\n try {\r\n if (getLockManager().unLockPreviouslyHeldLock()) {\r\n UserSessionManager.getInstance().getUserSession().remove(UserSessionIds.POLICY_HEADER);\r\n }\r\n else {\r\n throw new AppException(\"Unable to unlock previously held lock.\");\r\n }\r\n UserCacheManager.getInstance().remove(UserCacheManager.POLICY_OASIS_FIELDS_CACHE);\r\n }\r\n catch (Exception e) {\r\n AppException ae = ExceptionHelper.getInstance().handleException(\"Unable to find policy information for : \" + policyNo, e);\r\n l.throwing(getClass().getName(), \"loadPolicyHeader\", ae);\r\n throw ae;\r\n }\r\n }\r\n\r\n if (policyHeader != null) {\r\n if (UserSessionManager.getInstance().getUserSession().has(RequestIds.PREVIOUS_POLICY_NO) &&\r\n policyHeader.getPolicyNo().equals(UserSessionManager.getInstance().getUserSession().get(RequestIds.PREVIOUS_POLICY_NO))) {\r\n request.setAttribute(RequestIds.IS_SAME_POLICY_B, \"Y\");\r\n }\r\n else {\r\n request.setAttribute(RequestIds.IS_SAME_POLICY_B, \"N\");\r\n }\r\n UserSessionManager.getInstance().getUserSession().set(RequestIds.PREVIOUS_POLICY_NO, policyHeader.getPolicyNo());\r\n }\r\n else {\r\n request.setAttribute(RequestIds.IS_SAME_POLICY_B, \"N\");\r\n }\r\n\r\n if (l.isLoggable(Level.FINER)) {\r\n l.exiting(getClass().getName(), \"loadPolicyHeader\", policyHeader);\r\n }\r\n return policyHeader;\r\n }", "List<PolicyDetail> viewpolicyDetail(int lenderId);", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-08-13 13:14:15.602 -0400\", hash_original_method = \"4B5496A79468DEC2FA84449A5CCBD295\", hash_generated_method = \"06016682917508DEF780A2C1DA1531D4\")\n \npublic PolicyNode getPolicyTree() {\n return policyTree;\n }", "public static short[] getPolicies() {\n\t\treturn POLICIES;\n\t}", "AgentPolicy build();", "Object getPerm(String name);", "public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getGetIamPolicyMethod(), getCallOptions(), request);\n }", "List<PolicyDAO> getAllPolicies();", "public void addPolicy(Policy policy) throws APIManagementException {\n\n if (policy instanceof APIPolicy) {\n APIPolicy apiPolicy = (APIPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getAPIPolicy(userNameWithoutChange, apiPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Advanced Policy with name \" + apiPolicy.getPolicyName() + \" already exists\");\n }\n apiPolicy.setUserLevel(PolicyConstants.ACROSS_ALL);\n apiPolicy = apiMgtDAO.addAPIPolicy(apiPolicy);\n List<Integer> addedConditionGroupIds = new ArrayList<>();\n for (Pipeline pipeline : apiPolicy.getPipelines()) {\n addedConditionGroupIds.add(pipeline.getId());\n }\n APIPolicyEvent apiPolicyEvent = new APIPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n apiPolicy.getTenantDomain(), apiPolicy.getPolicyId(), apiPolicy.getPolicyName(),\n apiPolicy.getDefaultQuotaPolicy().getType(), addedConditionGroupIds, null);\n APIUtil.sendNotification(apiPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof ApplicationPolicy) {\n ApplicationPolicy appPolicy = (ApplicationPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getApplicationPolicy(userNameWithoutChange, appPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Application Policy with name \" + appPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addApplicationPolicy(appPolicy);\n //policy id is not set. retrieving policy to get the id.\n ApplicationPolicy retrievedPolicy = apiMgtDAO.getApplicationPolicy(appPolicy.getPolicyName(), tenantId);\n ApplicationPolicyEvent applicationPolicyEvent = new ApplicationPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n appPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(), appPolicy.getPolicyName(),\n appPolicy.getDefaultQuotaPolicy().getType());\n APIUtil.sendNotification(applicationPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof SubscriptionPolicy) {\n SubscriptionPolicy subPolicy = (SubscriptionPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getSubscriptionPolicy(userNameWithoutChange, subPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Subscription Policy with name \" + subPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addSubscriptionPolicy(subPolicy);\n String monetizationPlan = subPolicy.getMonetizationPlan();\n Map<String, String> monetizationPlanProperties = subPolicy.getMonetizationPlanProperties();\n if (StringUtils.isNotBlank(monetizationPlan) && MapUtils.isNotEmpty(monetizationPlanProperties)) {\n createMonetizationPlan(subPolicy);\n }\n //policy id is not set. retrieving policy to get the id.\n SubscriptionPolicy retrievedPolicy = apiMgtDAO.getSubscriptionPolicy(subPolicy.getPolicyName(), tenantId);\n SubscriptionPolicyEvent subscriptionPolicyEvent = new SubscriptionPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId, subPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n subPolicy.getPolicyName(), subPolicy.getDefaultQuotaPolicy().getType(),\n subPolicy.getRateLimitCount(),subPolicy.getRateLimitTimeUnit(), subPolicy.isStopOnQuotaReach(),\n subPolicy.getGraphQLMaxDepth(),subPolicy.getGraphQLMaxComplexity(),subPolicy.getSubscriberCount());\n APIUtil.sendNotification(subscriptionPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof GlobalPolicy) {\n GlobalPolicy globalPolicy = (GlobalPolicy) policy;\n\n // checking if policy already exist\n Policy existingPolicy = getGlobalPolicy(globalPolicy.getPolicyName());\n if (existingPolicy != null) {\n throw new APIManagementException(\"Policy name already exists\");\n }\n\n apiMgtDAO.addGlobalPolicy(globalPolicy);\n\n KeyTemplateEvent keyTemplateEvent = new KeyTemplateEvent(UUID.randomUUID().toString(), System.currentTimeMillis(),\n APIConstants.EventType.CUSTOM_POLICY_ADD.name(), tenantId, tenantDomain,\n \"add\", globalPolicy.getKeyTemplate());\n APIUtil.sendNotification(keyTemplateEvent, APIConstants.NotifierType.KEY_TEMPLATE.name());\n\n GlobalPolicy retrievedPolicy = apiMgtDAO.getGlobalPolicy(globalPolicy.getPolicyName());\n GlobalPolicyEvent globalPolicyEvent = new GlobalPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n globalPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n globalPolicy.getPolicyName());\n APIUtil.sendNotification(globalPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else {\n String msg = \"Policy type \" + policy.getClass().getName() + \" is not supported\";\n log.error(msg);\n throw new UnsupportedPolicyTypeException(msg);\n }\n }", "public interface TilePolicy {\n\n\tpublic boolean getEnterableAt(Pair xy);\n\tpublic boolean getPassableAt(Pair xy);\n\tpublic boolean getJumpableAt(Pair xy);\n\t\n\tpublic boolean getWalkableAt(Pair xy, Player player);\n\tpublic boolean getEnterableAt(Pair xy, CellLogic ignore);\n\t\n\t/**\n\t * All policies must return a name so they can be enumerated\n\t * and a group of grunts all moving at once can share policies\n\t * if they have the same movement. Comparing getName is\n\t * equivalent to an equality test between policies.\n\t * \n\t * @return The name of the Policy\n\t */\n\tpublic String getName();\n\t\n}", "public int getPolicy(String appName, String apiName, Object... parameterType) {\n\n int policy = defaultPolicy;\n\n /** global rules */\n\n if (currentPolicy.containsKey(\"* \" + apiName)) {\n policy = currentPolicy.get(\"* \" + apiName).ctrlPolicy;\n }\n\n /** specific rules overwrites global ones */\n\n if (currentPolicy.containsKey(appName + \" \" + apiName)) {\n policy = currentPolicy.get(appName + \" \" + apiName).ctrlPolicy;\n }\n\n /** if no rules are defined, adopt default ones */\n\n return policy;\n }", "String getLbPolicy() {\n return lbPolicy;\n }", "public static CustomPolicy createDefaultCustomPolicy() {\n CustomPolicy customPolicy = new CustomPolicy(SAMPLE_CUSTOM_RULE);\n customPolicy.setKeyTemplate(\"$userId\");\n String siddhiQuery = \"FROM RequestStream SELECT userId, ( userId == '[email protected]' ) AS isEligible , \"\n + \"str:concat('[email protected]','') as throttleKey INSERT INTO EligibilityStream;\"\n + \"FROM EligibilityStream[isEligible==true]#throttler:timeBatch(1 min) SELECT throttleKey, \"\n + \"(count(userId) >= 5 as isThrottled, expiryTimeStamp group by throttleKey INSERT ALL EVENTS into \"\n + \"ResultStream;\";\n\n customPolicy.setSiddhiQuery(siddhiQuery);\n customPolicy.setDescription(\"Sample custom policy\");\n return customPolicy;\n }", "private void loadPolicy() {\n loadSavedGlobalSetting();\n loadDefaultPolicy();\n loadSavedSetting();\n saveSetting();\n }", "FirewallPolicyService firewallpolicy();", "public void createASPolicy(){\n\t\t\n\t\t// First create for replicated objects\n\t\t//System.out.println(\"Inside ObjectBasedAnalyzer: createASPolicy\");\n\t\t\n\t\tcreateReplicatedObjectsPolicy();\n\t\t\t\t\n\t\t// Now for rest of objects\n\t\t\n//\t\tcreateOnlyDistributedObjectsPolicy();\n\t\t\n\t\tIterator<String> iap = ASPolicyMap.keySet().iterator();\n\t\t\n\t\tSystem.out.println(\"---------------ASPolicy Start------------------\");\n//\t\t\n\t\twhile(iap.hasNext()){\n//\t\t\t\n//\t\t\t\n\t\t\tString serId = iap.next();\n\t\t\tSystem.out.println(\"AS Policy for:\" + serId);\n\t\t\tmanager.getASServer(serId).currentPolicy = ASPolicyMap.get(serId);\n\t\t\tSystem.out.println(\"No of policy entries for this server are:\" + manager.getASServer(serId).currentPolicy.policyMap.size());\n\t\t}\n//\t\t\n\t\tSystem.out.println(\"---------------ASPolicy End------------------\");\n\t\t\t\t\t\t\n\t}", "AccessPoliciesClient getAccessPolicies();", "public abstract boolean checkPolicy(User user);", "public ExceptionPolicyEntry GetPolicyEntry(Class<?> exceptionType)\n {\n if (policyEntries.containsKey(exceptionType))\n {\n return policyEntries.get(exceptionType);\n }\n return null;\n }", "public MicrosoftGraphStsPolicy() {\n }", "protected GuiTestObject html_refPolicyNumber() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"html_refPolicyNumber\"));\n\t}", "public ScalePolicy getScalePolicy() {\n\t\treturn null;\n\t}", "public DistributionPolicyInternal() {}", "public PolicyDTO[] readAllPolicies() throws EntitlementException {\n \n Resource[] resources = null;\n PolicyDTO[] policies = null;\n resources = getAllPolicyResource();\n\n if (resources == null) {\n return new PolicyDTO[0];\n }\n policies = new PolicyDTO[resources.length];\n\n List<PolicyDTO> policyDTOList = new ArrayList<PolicyDTO>();\n int[] policyOrder = new int[resources.length];\n\n for(int i = 0; i < resources.length; i++){\n PolicyDTO policyDTO = readPolicy(resources[i]);\n policyDTOList.add(policyDTO);\n policyOrder[i] = policyDTO.getPolicyOrder();\n }\n\n // sorting array TODO : with Comparator class\n int[] tempArray = new int[policyOrder.length];\n Arrays.sort(policyOrder);\n for (int i = 0; i < tempArray.length; i++) {\n int j = (policyOrder.length-1)-i;\n tempArray[j] = policyOrder[i];\n }\n policyOrder = tempArray;\n\n for (int i = 0; i < policyOrder.length; i++) {\n for(PolicyDTO policyDTO : policyDTOList){\n if(policyOrder[i] == policyDTO.getPolicyOrder()){\n policies[i] = policyDTO;\n }\n }\n }\n \n return policies;\n }", "List<PolicyController> getPolicyControllers();", "PolicyController createPolicyController(String name, Properties properties);", "private PolicyDocument getGlueAthenaS3AccessPolicy()\n {\n List<String> statementActionsPolicy = new ArrayList<>();\n statementActionsPolicy.add(\"glue:GetTableVersions\");\n statementActionsPolicy.add(\"glue:GetPartitions\");\n statementActionsPolicy.add(\"glue:GetTables\");\n statementActionsPolicy.add(\"glue:GetTableVersion\");\n statementActionsPolicy.add(\"glue:GetDatabases\");\n statementActionsPolicy.add(\"glue:GetTable\");\n statementActionsPolicy.add(\"glue:GetPartition\");\n statementActionsPolicy.add(\"glue:GetDatabase\");\n statementActionsPolicy.add(\"athena:GetQueryExecution\");\n statementActionsPolicy.add(\"s3:ListAllMyBuckets\");\n\n return PolicyDocument.Builder.create()\n .statements(ImmutableList.of(PolicyStatement.Builder.create()\n .actions(statementActionsPolicy)\n .resources(ImmutableList.of(\"*\"))\n .effect(Effect.ALLOW)\n .build()))\n .build();\n }", "public ResourceReadPolicy getReadPolicy(Class<?> resourceClass, User user)\n\t{\n\t\tString resourceAlias = resourceClass.getSimpleName();\n\t\tresourceAlias = resourceAlias.substring(0, 1).toLowerCase() + resourceAlias.substring(1);\n\t\tString projectAlias = \"project\";\n\t\t\n\t\tif (this.getLogicOperator() == LogicOperator.AND)\n\t\t{\n\t\t\tResourceReadPolicy readPolicy = new ResourceReadPolicy();\n\n\t\t\tif (this.isEntityAccessGranted(user))\n\t\t\t{\n\t\t\t\treadPolicy.setReadGranted(true);\n\t\t\t\tString conditions = this.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user);\n\t\t\t\t\n\t\t\t\tfor (AbacPolicy subPolicy : this.getSubPolicies())\n\t\t\t\t{\n\t\t\t\t\tif (subPolicy.isEntityAccessGranted(user))\n\t\t\t\t\t{\n\t\t\t\t\t\tString groupConditions = subPolicy.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user);\n\t\t\t\t\t\tif (conditions.isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconditions = groupConditions;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (!groupConditions.isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconditions = conditions + \" \" + this.logicOperator + \" \" + groupConditions;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse // If subgroup entity access is not granted\n\t\t\t\t\t{\n\t\t\t\t\t\treadPolicy.setReadGranted(false);\n\t\t\t\t\t\treadPolicy.setReadConditions(null);\n\t\t\t\t\t\treturn readPolicy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treadPolicy.setReadConditions(conditions);\n\t\t\t\treturn readPolicy;\n\t\t\t}\n\t\t\telse // If group entity access is not granted\n\t\t\t{\n\t\t\t\treadPolicy.setReadGranted(false);\n\t\t\t\treturn readPolicy;\n\t\t\t}\n\t\t}\n\t\telse // If Logic Operator is OR \n\t\t{\n\t\t\tResourceReadPolicy resourceReadPolicy = new ResourceReadPolicy();\n\t\t\t\n\t\t\tif (this.isEntityAccessGranted(user))\n\t\t\t{\n\t\t\t\tresourceReadPolicy.setReadGranted(true);\n\t\t\t\tresourceReadPolicy.setReadConditions(this.readAttributeAndFieldPolicies(resourceAlias, projectAlias, user));\t\t\t\t\n\t\t\t}\n\n\t\t\tfor (AbacPolicy subPolicy : this.getSubPolicies())\n\t\t\t{\n\t\t\t\tResourceReadPolicy groupReadPolicy = subPolicy.readGroupPolicy(resourceAlias, projectAlias, user);\n\t\t\t\tif (groupReadPolicy.isReadGranted())\n\t\t\t\t{\n\t\t\t\t\tresourceReadPolicy.setReadGranted(true);\n\t\t\t\t\t\n\t\t\t\t\tString conditions = resourceReadPolicy.getReadConditions();\n\t\t\t\t\tif (conditions.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tconditions = groupReadPolicy.getReadConditions();\n\t\t\t\t\t}\n\t\t\t\t\telse if (!groupReadPolicy.getReadConditions().isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tconditions += \" \" + this.logicOperator + \" \" + groupReadPolicy.getReadConditions();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tresourceReadPolicy.setReadConditions(conditions);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn resourceReadPolicy;\n\t\t}\n\t}", "public String getPolicyGroupName() \n {\n return policyGroupName;\n }", "public EditPolicy() {\r\n super();\r\n }", "public com.amazon.s3.GetBucketAccessControlPolicyResponse getBucketAccessControlPolicy(com.amazon.s3.GetBucketAccessControlPolicy getBucketAccessControlPolicy);", "public PolicyServiceDelegate()\n {\n log.debug(\"\") ;\n log.debug(\"----\\\"----\") ;\n log.debug(\"PolicyServiceDelegate()\") ;\n try\n {\n service = getService(CommunityConfig.getServiceUrl());\n }\n catch(Exception e) {\n e.printStackTrace();\n service = null;\n }\n log.debug(\"----\\\"----\") ;\n log.debug(\"\") ;\n }", "protected PolicySourceModel create(final Policy policy) {\n return PolicySourceModel.createPolicySourceModel(policy.getNamespaceVersion(),\n policy.getId(), policy.getName());\n }", "public CellPolicy\n getCellPolicy() \n {\n return pCellPolicy;\n }", "public static ProphetQueuing getInstance() {\r\n\t\tif (instance_ == null) {\r\n\t\t\tswitch (policy) {\r\n\t\t\tcase FIFO:\r\n\t\t\t\tinstance_ = (ProphetQueuing) new Fifo();\r\n\t\t\t\tbreak;\r\n\t\t\tcase MOFO:\r\n\t\t\t\tinstance_ = (ProphetQueuing) new Mofo();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tBPF.getInstance().getBPFLogger()\r\n\t\t\t\t\t\t.error(TAG, \"Wrong policy in prophet routing type\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn instance_;\r\n\t}", "public int getPolicyID(int policy_id) {\n int id = 0;\n try {\n checkPolicyID.setInt(1, policy_id);\n ResultSet resultset = checkPolicyID.executeQuery();\n while (resultset.next()) {\n id = resultset.getInt(\"policy_id\");\n System.out.println(\"Policy ID: \" + id);\n }\n resultset.close();\n }\n catch (SQLException exception) {\n System.out.println(\"Invalid Input!\");\n }\n return id;\n }", "public EvictionPolicy getEvictionPolicy()\n {\n return m_policy;\n }", "public PolicyIDImpl() {\n super();\n }" ]
[ "0.8114049", "0.7550172", "0.7391775", "0.7025899", "0.69773865", "0.69632804", "0.6686403", "0.66320604", "0.6630122", "0.65724206", "0.65297765", "0.6528546", "0.64773864", "0.6452213", "0.63688993", "0.6298969", "0.6271056", "0.62303936", "0.62292606", "0.6211037", "0.6111656", "0.60651374", "0.6002254", "0.5982806", "0.59602857", "0.5950011", "0.59339505", "0.5895105", "0.589448", "0.58788437", "0.58768356", "0.58630204", "0.5861658", "0.5849337", "0.58444566", "0.5842598", "0.58396393", "0.58396393", "0.5836051", "0.5815763", "0.5800587", "0.57641494", "0.5758765", "0.5746622", "0.573647", "0.57341146", "0.5724297", "0.57160425", "0.5705138", "0.56999445", "0.56999", "0.56801057", "0.56712276", "0.56523097", "0.56466746", "0.5613606", "0.5606919", "0.5605633", "0.55990094", "0.5591714", "0.55702144", "0.5569083", "0.55524606", "0.55442643", "0.55366206", "0.5525801", "0.5524467", "0.548682", "0.5481371", "0.5477625", "0.5445784", "0.54443514", "0.54375124", "0.5436313", "0.5407421", "0.5396003", "0.53832036", "0.5377169", "0.53692335", "0.5346551", "0.53457785", "0.53439313", "0.5343402", "0.5339658", "0.53362554", "0.53185624", "0.53183943", "0.53160715", "0.53158206", "0.52838486", "0.52799064", "0.5273406", "0.5264095", "0.52638793", "0.5262683", "0.5252969", "0.52482474", "0.5246118", "0.5239656", "0.5238472" ]
0.53194875
85
called by PolicyWrapper to refresh context specific policy object.
protected void refresh(boolean force){ synchronized(refreshLock){ if (stateIs(INSERVICE_STATE) && (wasRefreshed == false || force || filesChanged())) { // find open policy.url int i = 0; String value = null; String urlKey = null; while (true) { urlKey = PROVIDER_URL+(++i); value = java.security.Security.getProperty(urlKey); if (value == null || value.equals("")) { break; } } try { java.security.Security.setProperty(urlKey,policyUrlValue); if (fileChanged(false)) { excludedPermissions = loadExcludedPolicy(); } // capture time before load, to ensure that we // have a time that precedes load captureFileTime(true); if (policy == null) { policy = getNewPolicy(); } else { policy.refresh(); if (logger.isLoggable(Level.FINE)){ logger.fine("JACC Policy Provider: Called Policy.refresh on contextId: "+CONTEXT_ID+" policyUrlValue was "+policyUrlValue); } } wasRefreshed = true; } finally { // can't setProperty back to null, workaround is to // use empty string java.security.Security.setProperty(urlKey,""); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ManagementLockObject refresh(Context context);", "@Override\r\n\tpublic void updatePolicy(Policy policy) {\n\t\tdao.updatePolicy(policy);\r\n\t\t\r\n\t}", "void clearPolicy() {\n policy = new Policy();\n }", "void updatePolicyHOlder(int policyHolderId , PolicyHolder policyHolder);", "private void loadPolicy() {\n loadSavedGlobalSetting();\n loadDefaultPolicy();\n loadSavedSetting();\n saveSetting();\n }", "ManagementLockObject refresh();", "Snapshot refresh(Context context);", "PolicyController updatePolicyController(ControllerConfiguration configuration);", "public void delete() throws PolicyContextException\n {\n\tcheckSetPolicyPermission();\n\tsynchronized(refreshLock) {\n\t try {\n\t\tremovePolicy();\n\t } finally {\n\t\tsetState(DELETED_STATE);\n\t }\n\t}\n }", "Lab refresh(Context context);", "@Override\n protected void updated(LocalPolicySet before, LocalPolicySet after) {\n if (Objects.equals(before.getId(), after.getId())) {\n if (localPolicyCache.getIfPresent(before.getId()) != null) {\n localPolicyCache.invalidate(before.getId());\n Cache<String, Policy> cache = CacheBuilder.newBuilder().maximumSize(MAX_LOCAL_POLICY_INDIVIDUAL_CACHE).build();\n localPolicyCache.put(after.getId(), cache);\n for (PolicySet policy : after.getPolicySet()) {\n try {\n cache.put(policy.getId(), new Policy(policy.getName(), SlothPolicyParser.parsePolicy(policy.getContent())));\n } catch (IOException e) {\n LOG.error(\"local policy creation error, failed to parse policy: \" + policy.getContent());\n }\n }\n } else {\n LOG.error(\"failed to update local policy, policy not exist: \" + before.getId());\n }\n } else {\n LOG.error(\"failed to update local policy, before: \" + before.getId() + \", after: \" + after.getId());\n }\n }", "@Override\n public void replaceInstance(ThrottlePolicyProvider newTPP) {\n logger.info(\"Replacing ThrottlePolicyProvider with an instance of {}\", newTPP.getClass());\n newTPP.seedTPCLs(backingProvider.get().getAllTPCLs());\n backingProvider.set(newTPP);\n }", "TrustedIdProvider refresh(Context context);", "Account refresh(Context context);", "JobResponse refresh(Context context);", "@Override\n\tpublic void refresh(Object entity, LockModeType lockMode) {\n\t\t\n\t}", "@Override\r\n\t\t\tprotected void restoreContext() {\n\t\t\t\t\r\n\t\t\t}", "@ApiAudience.Public\[email protected]\[email protected]\npublic interface PolicyContext {\n\n /**\n * Get the KijiDataRequest which triggered this freshness check.\n *\n * @return The KijiDataRequest issued by the client for this.\n */\n KijiDataRequest getClientRequest();\n\n /**\n * Get the name of the column to which the freshness policy is attached.\n *\n * @return The name of the column to which the freshness policy is attached.\n */\n KijiColumnName getAttachedColumn();\n\n /**\n * Get the Configuration associated with the Kiji instance for this context.\n *\n * @return The Configuration associated with the Kiji instance for this context.\n */\n Configuration getConfiguration();\n\n /**\n * Opens a KeyValueStore associated with storeName for read-access.\n *\n * <p>The user does not need to call <code>close()</code> on KeyValueStoreReaders returned by\n * this method; any open KeyValueStoreReaders will be closed automatically by the\n * KijiProducer/Gatherer/BulkImporter associated with this Context.</p>\n *\n * <p>Calling getStore() multiple times on the same name will reuse the same\n * reader unless it is closed.</p>\n *\n * @param <K> The key type for the KeyValueStore.\n * @param <V> The value type for the KeyValueStore.\n * @param storeName the name of the KeyValueStore to open.\n * @return A KeyValueStoreReader associated with this storeName, or null\n * if there is no such KeyValueStore available.\n * @throws IOException if there is an error opening the underlying storage resource.\n */\n <K, V> KeyValueStoreReader<K, V> getStore(String storeName) throws IOException;\n}", "public void refresh() {\n\n odp.refresh();\n\n\n }", "public Policy reference() throws DynamicParamException, AgentException, MatrixException, IOException, ClassNotFoundException {\n return new UpdateableBasicPolicy(executablePolicy.getExecutablePolicyType(), getFunctionEstimator().reference(), params);\n }", "protected void refresh() {\n\t}", "public VersionLockingPolicy() {\r\n super();\r\n storeInCache();\r\n }", "@Override\n\tpublic void refresh(Object entity, LockModeType lockMode, Map<String, Object> properties) {\n\t\t\n\t}", "public void addPolicy(Policy policy) throws APIManagementException {\n\n if (policy instanceof APIPolicy) {\n APIPolicy apiPolicy = (APIPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getAPIPolicy(userNameWithoutChange, apiPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Advanced Policy with name \" + apiPolicy.getPolicyName() + \" already exists\");\n }\n apiPolicy.setUserLevel(PolicyConstants.ACROSS_ALL);\n apiPolicy = apiMgtDAO.addAPIPolicy(apiPolicy);\n List<Integer> addedConditionGroupIds = new ArrayList<>();\n for (Pipeline pipeline : apiPolicy.getPipelines()) {\n addedConditionGroupIds.add(pipeline.getId());\n }\n APIPolicyEvent apiPolicyEvent = new APIPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n apiPolicy.getTenantDomain(), apiPolicy.getPolicyId(), apiPolicy.getPolicyName(),\n apiPolicy.getDefaultQuotaPolicy().getType(), addedConditionGroupIds, null);\n APIUtil.sendNotification(apiPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof ApplicationPolicy) {\n ApplicationPolicy appPolicy = (ApplicationPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getApplicationPolicy(userNameWithoutChange, appPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Application Policy with name \" + appPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addApplicationPolicy(appPolicy);\n //policy id is not set. retrieving policy to get the id.\n ApplicationPolicy retrievedPolicy = apiMgtDAO.getApplicationPolicy(appPolicy.getPolicyName(), tenantId);\n ApplicationPolicyEvent applicationPolicyEvent = new ApplicationPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n appPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(), appPolicy.getPolicyName(),\n appPolicy.getDefaultQuotaPolicy().getType());\n APIUtil.sendNotification(applicationPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof SubscriptionPolicy) {\n SubscriptionPolicy subPolicy = (SubscriptionPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getSubscriptionPolicy(userNameWithoutChange, subPolicy.getPolicyName());\n if (existingPolicy != null) {\n handleException(\"Subscription Policy with name \" + subPolicy.getPolicyName() + \" already exists\");\n }\n apiMgtDAO.addSubscriptionPolicy(subPolicy);\n String monetizationPlan = subPolicy.getMonetizationPlan();\n Map<String, String> monetizationPlanProperties = subPolicy.getMonetizationPlanProperties();\n if (StringUtils.isNotBlank(monetizationPlan) && MapUtils.isNotEmpty(monetizationPlanProperties)) {\n createMonetizationPlan(subPolicy);\n }\n //policy id is not set. retrieving policy to get the id.\n SubscriptionPolicy retrievedPolicy = apiMgtDAO.getSubscriptionPolicy(subPolicy.getPolicyName(), tenantId);\n SubscriptionPolicyEvent subscriptionPolicyEvent = new SubscriptionPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId, subPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n subPolicy.getPolicyName(), subPolicy.getDefaultQuotaPolicy().getType(),\n subPolicy.getRateLimitCount(),subPolicy.getRateLimitTimeUnit(), subPolicy.isStopOnQuotaReach(),\n subPolicy.getGraphQLMaxDepth(),subPolicy.getGraphQLMaxComplexity(),subPolicy.getSubscriberCount());\n APIUtil.sendNotification(subscriptionPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else if (policy instanceof GlobalPolicy) {\n GlobalPolicy globalPolicy = (GlobalPolicy) policy;\n\n // checking if policy already exist\n Policy existingPolicy = getGlobalPolicy(globalPolicy.getPolicyName());\n if (existingPolicy != null) {\n throw new APIManagementException(\"Policy name already exists\");\n }\n\n apiMgtDAO.addGlobalPolicy(globalPolicy);\n\n KeyTemplateEvent keyTemplateEvent = new KeyTemplateEvent(UUID.randomUUID().toString(), System.currentTimeMillis(),\n APIConstants.EventType.CUSTOM_POLICY_ADD.name(), tenantId, tenantDomain,\n \"add\", globalPolicy.getKeyTemplate());\n APIUtil.sendNotification(keyTemplateEvent, APIConstants.NotifierType.KEY_TEMPLATE.name());\n\n GlobalPolicy retrievedPolicy = apiMgtDAO.getGlobalPolicy(globalPolicy.getPolicyName());\n GlobalPolicyEvent globalPolicyEvent = new GlobalPolicyEvent(UUID.randomUUID().toString(),\n System.currentTimeMillis(), APIConstants.EventType.POLICY_CREATE.name(), tenantId,\n globalPolicy.getTenantDomain(), retrievedPolicy.getPolicyId(),\n globalPolicy.getPolicyName());\n APIUtil.sendNotification(globalPolicyEvent, APIConstants.NotifierType.POLICY.name());\n } else {\n String msg = \"Policy type \" + policy.getClass().getName() + \" is not supported\";\n log.error(msg);\n throw new UnsupportedPolicyTypeException(msg);\n }\n }", "@Override\n public Response throttlingPoliciesSubscriptionPolicyIdPut(String policyId, String contentType,\n SubscriptionThrottlePolicyDTO body, MessageContext messageContext) throws APIManagementException{\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n SubscriptionPolicy existingPolicy = apiProvider.getSubscriptionPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, log);\n }\n\n //overridden properties\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n // validate if permission info exists and halt the execution in case of an error\n validatePolicyPermissions(body);\n\n //update the policy\n SubscriptionPolicy subscriptionPolicy =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyDTOToModel(body);\n apiProvider.updatePolicy(subscriptionPolicy);\n\n //update policy permissions\n updatePolicyPermissions(body);\n\n //retrieve the new policy and send back as the response\n SubscriptionPolicy newSubscriptionPolicy = apiProvider.getSubscriptionPolicy(username,\n body.getPolicyName());\n SubscriptionThrottlePolicyDTO policyDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyToDTO(newSubscriptionPolicy);\n //setting policy permissions\n setPolicyPermissionsToDTO(policyDTO);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException | ParseException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, e,\n log);\n } else {\n String errorMessage = \"Error while updating Subscription level policy: \" + body.getPolicyName();\n throw new APIManagementException(errorMessage, e);\n }\n }\n return null;\n }", "protected PolicyHeader reloadPolicyHeader(HttpServletRequest request) {\r\n Logger l = LogUtils.getLogger(getClass());\r\n if (l.isLoggable(Level.FINER)) {\r\n l.entering(getClass().getName(), \"reloadPolicyHeader\", new Object[]{request});\r\n }\r\n\r\n request.removeAttribute(RequestIds.POLICY_HEADER);\r\n RequestStorageManager.getInstance().remove(RequestStorageIds.POLICY_HEADER);\r\n PolicyHeader policyHeader = loadPolicyHeader(request);\r\n\r\n if (l.isLoggable(Level.FINER)) {\r\n l.exiting(getClass().getName(), \"reloadPolicyHeader\", policyHeader);\r\n }\r\n\r\n return policyHeader;\r\n }", "public void refresh()\n {\n PropertyManager.getInstance().refresh();\n init(this.path);\n }", "public void refreshPermissions()\n {\n if (mEngagementConfiguration != null)\n {\n final EngagementConfiguration configuration = mEngagementConfiguration;\n sendEngagementCommand(new Runnable()\n {\n @Override\n public void run()\n {\n try\n {\n mEngagementService.init(configuration);\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }\n });\n }\n }", "@Override\n\tpublic void refresh(Object entity) {\n\t\t\n\t}", "@Override\n\tpublic void updateContext(Context context) {\n\t}", "public void refresh(){\r\n\t \t//providerMap.clear();\r\n\t \trefresh(null);\r\n\t }", "@Override\n public void refresh() {\n }", "ManagementLockObject apply(Context context);", "@Override\n\tpublic void refreshAvailableProcedures()\n\t{\n\t\tm_models.obtainAvailableProcedures(true);\n\t}", "@Override\n\tpublic Policy updatePolicy(Policy policy) throws PolicyNotFoundException {\n\t\t// TODO Auto-generated method stub\n\t\tif(!policyDao.existsById(policy.getPolicyId()))\n\t\t\tthrow new PolicyNotFoundException(\"policy not found\");\n\t\tpolicyDao.save(policy);\n\t\treturn policy;\n\t}", "ArooaContext honour(InstanceRuntime instanceRuntime, ArooaContext context) {\r\n\t\t\r\n\t\tObject proxy = instanceRuntime.getInstanceConfiguration().getObjectToSet();\r\n\t\t\r\n\t\thonourObligations(proxy, instanceRuntime, context);\r\n\t\t\r\n\t\tObject object = instanceRuntime.getInstanceConfiguration().getWrappedObject();\r\n\t\t\r\n\t\tif (object != proxy) {\r\n\t\t\thonourObligations(object, instanceRuntime, context);\r\n\t\t}\t\t\r\n\t\t\r\n\t\treturn context;\r\n\t}", "public lnrpc.Rpc.PolicyUpdateResponse updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request) {\n return blockingUnaryCall(\n getChannel(), getUpdateChannelPolicyMethod(), getCallOptions(), request);\n }", "@Override\n public Response throttlingPoliciesAdvancedPolicyIdPut(String policyId, String contentType,\n AdvancedThrottlePolicyDTO body, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n APIPolicy existingPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, log);\n }\n\n //overridden parameters\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n //update the policy\n APIPolicy apiPolicy = AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyDTOToPolicy(body);\n apiProvider.updatePolicy(apiPolicy);\n\n //retrieve the new policy and send back as the response\n APIPolicy newApiPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n AdvancedThrottlePolicyDTO policyDTO =\n AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyToDTO(newApiPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while updating Advanced level policy: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "private void changeContext(){\n MainWorkflow.observeContexts(generateRandom(24,0));\n }", "public void refreshObjectCache();", "EventChannel refresh(Context context);", "@Override\n public Response throttlingPoliciesApplicationPolicyIdPut(String policyId, String contentType,\n ApplicationThrottlePolicyDTO body, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy existingPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n //overridden properties\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n //update the policy\n ApplicationPolicy appPolicy =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyDTOToModel(body);\n apiProvider.updatePolicy(appPolicy);\n\n //retrieve the new policy and send back as the response\n ApplicationPolicy newAppPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n ApplicationThrottlePolicyDTO policyDTO =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyToDTO(newAppPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while updating Application level policy: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "TrustedIdProvider refresh();", "public void updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.PolicyUpdateResponse> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(getUpdateChannelPolicyMethod(), getCallOptions()), request, responseObserver);\n }", "protected void refresh()\n {\n refresh(System.currentTimeMillis());\n }", "@Override\r\n\t\t\tpublic void onRefresh() {\n\t\t\t\tgetLichHoc();\r\n\t\t\t}", "@Override\n public void refreshResources() {\n\n }", "Snapshot refresh();", "@Override\n\tpublic void refresh() {\n\t\t\n\t}", "@Override\n\tpublic void refresh() {\n\t\t\n\t}", "private void refresh(ColumnContext c) {\n\t\t\tcontext = c;\n\t\t}", "@Override\n\tpublic void refresh() {\n\n\t}", "SourceControl refresh(Context context);", "public com.google.common.util.concurrent.ListenableFuture<lnrpc.Rpc.PolicyUpdateResponse> updateChannelPolicy(\n lnrpc.Rpc.PolicyUpdateRequest request) {\n return futureUnaryCall(\n getChannel().newCall(getUpdateChannelPolicyMethod(), getCallOptions()), request);\n }", "AgentPolicyBuilder clear();", "public void reload() throws HpcException {\n\tif(useSecretsManager) {\n\t\trefreshAwsSecret();\n\t}\n initSystemAccountsData();\n initDataTransferAccountsData();\n this.dataMgmtConfigLocator.reload();\n }", "public void refresh() {\r\n\t\tinit();\r\n\t}", "public void commit() throws PolicyContextException{\n\n\tsynchronized(refreshLock) {\n\t if(stateIs(DELETED_STATE)){\n String defMsg=\"Cannot perform Operation on a deleted PolicyConfiguration\";\n String msg=localStrings.getLocalString(\"pc.invalid_op_for_state_delete\",defMsg);\n\t\tlogger.log(Level.WARNING,msg);\n\t\tthrow new UnsupportedOperationException(defMsg);\n\n\t } else {\n \n\t\ttry {\n\n\t\t checkSetPolicyPermission();\n\n\t\t if (stateIs(OPEN_STATE)) {\n\n\t\t\tgeneratePermissions();\n\n\t\t\tsetState(INSERVICE_STATE);\n\t\t }\n\t\t} catch(Exception e){\n String defMsg=\"commit fail for contextod \"+CONTEXT_ID;\n String msg=localStrings.getLocalString(\"pc.commit_failure\",defMsg,new Object[]{CONTEXT_ID,e});\n\t\t logger.log(Level.SEVERE,msg);\n\t\t throw new PolicyContextException(e);\n\t\t}\n\t\tif (logger.isLoggable(Level.FINE)){\n\t\t logger.fine(\"JACC Policy Provider: PC.commit \"+CONTEXT_ID);\n\t\t}\n\t }\n\t \n\t}\n }", "public void refresh()\n {\n refresh( null );\n }", "<T> void refresh(T persistentObject);", "@Override\n public Response throttlingPoliciesAdvancedPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n APIPolicy apiPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, apiPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, log);\n }\n AdvancedThrottlePolicyDTO policyDTO = AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyToDTO(apiPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while retrieving Advanced level policy : \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "protected java.security.Policy getPolicy(){\n\tif (stateIs(INSERVICE_STATE)) {\n\t return this.policy;\n\t} \n\tif (logger.isLoggable(Level.FINEST)) {\n\t logger.finest(\"JACC Policy Provider: getPolicy (\"+CONTEXT_ID+\") is NOT in service\");\n\t}\n\treturn null;\n }", "public Optional<CancellationPolicy> updatePolicy(long policyId, CancellationPolicy editedPolicy) throws Exception{\n Optional<CancellationPolicy> updatedPolicy = cancellationPolicyRepository.findById(policyId).map((selectedPolicy) -> {\n selectedPolicy.getRules().clear();\n selectedPolicy.getRules().addAll(editedPolicy.getRules());\n selectedPolicy.getRules().forEach((rule) -> {\n rule.setPolicy(editedPolicy);\n });\n selectedPolicy.setPolicyId(editedPolicy.getPolicyId());\n selectedPolicy.setPolicyName(editedPolicy.getPolicyName());\n selectedPolicy.setPolicySource(editedPolicy.getPolicySource());\n selectedPolicy.setPolicyDescription(editedPolicy.getPolicyDescription());\n selectedPolicy.setPolicyUpdatedBy(editedPolicy.getPolicyUpdatedBy());\n selectedPolicy.setPolicyUpdatedOn();\n selectedPolicy.setPolicyCancelRestrictionDays(editedPolicy.getPolicyCancelRestrictionDays());\n selectedPolicy.setPolicyCancelRestrictionHours(editedPolicy.getPolicyCancelRestrictionHours());\n return cancellationPolicyRepository.save(selectedPolicy);\n });\n return updatedPolicy;\n }", "@Override\n public Response throttlingPoliciesSubscriptionPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n SubscriptionPolicy subscriptionPolicy = apiProvider.getSubscriptionPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, subscriptionPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, log);\n }\n SubscriptionThrottlePolicyDTO policyDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyToDTO(subscriptionPolicy);\n\n //setting policy permissions\n setPolicyPermissionsToDTO(policyDTO);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException | ParseException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, e,\n log);\n } else {\n String errorMessage = \"Error while retrieving Subscription level policy: \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "public void updateChannelPolicy(lnrpc.Rpc.PolicyUpdateRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.PolicyUpdateResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getUpdateChannelPolicyMethod(), responseObserver);\n }", "protected void refreshAll() {\n refreshProperties();\n\t}", "@Override\n public void replaceAllItemPolicies(Context context, Item item, List<ResourcePolicy> newpolicies) throws SQLException,\n AuthorizeException\n {\n // remove all our policies, add new ones\n authorizeService.removeAllPolicies(context, item);\n authorizeService.addPolicies(context, newpolicies, item);\n }", "@Nullable\n public ManagedAppPolicy patch(@Nonnull final ManagedAppPolicy sourceManagedAppPolicy) throws ClientException {\n return send(HttpMethod.PATCH, sourceManagedAppPolicy);\n }", "@Override\n\tpublic void refresh(Object... param) {\n\t\t\n\t}", "public void refresh() {\n }", "@Override\r\n\tpublic void refresh(Object userData) {\n\r\n\t}", "private void populateAPILevelPolicies(API api) throws APIManagementException {\n List<OperationPolicy> apiPolicyMapping = apiMgtDAO.getAPIPolicyMapping(api.getUuid(), null);\n if (!apiPolicyMapping.isEmpty()) {\n api.setApiPolicies(apiPolicyMapping);\n }\n }", "@Override\n public void refresh() {\n refresher.enqueueRefresh();\n }", "private synchronized void refresh() {\n \t\t\tlastChangeStamp = changeStamp;\n \t\t\tlastFeaturesChangeStamp = featuresChangeStamp;\n \t\t\tlastPluginsChangeStamp = pluginsChangeStamp;\n \t\t\tchangeStampIsValid = false;\n \t\t\tfeaturesChangeStampIsValid = false;\n \t\t\tpluginsChangeStampIsValid = false;\n \t\t\tfeatures = null;\n \t\t\tplugins = null;\n \t\t}", "@Override\r\n public PhoenixDriver refresh()\r\n {\n return null;\r\n }", "private void updatePolicyPermissions(SubscriptionThrottlePolicyDTO body) throws APIManagementException {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n SubscriptionThrottlePolicyPermissionDTO policyPermissions = body.getPermissions();\n if (policyPermissions != null) {\n if (policyPermissions.getRoles().size() > 0) {\n String roles = StringUtils.join(policyPermissions.getRoles(), \",\");\n String permissionType;\n if (policyPermissions.getPermissionType() ==\n SubscriptionThrottlePolicyPermissionDTO.PermissionTypeEnum.ALLOW) {\n permissionType = APIConstants.TIER_PERMISSION_ALLOW;\n } else {\n permissionType = APIConstants.TIER_PERMISSION_DENY;\n }\n apiProvider.updateThrottleTierPermissions(body.getPolicyName(), permissionType, roles);\n } else {\n throw new APIManagementException(ExceptionCodes.ROLES_CANNOT_BE_EMPTY);\n }\n } else {\n apiProvider.deleteTierPermissions(body.getPolicyName());\n }\n }", "public static void forceReload() {\n properties = null;\n getProperties();\n }", "public void init()\n {\n policyComponent.bindClassBehaviour(NodeServicePolicies.OnUpdatePropertiesPolicy.QNAME,\n WebSiteModel.TYPE_WEB_SITE, new JavaBehaviour(this, \"onUpdatePropertiesEveryEvent\"));\n }", "private synchronized void onUpdate() {\n if (pollingJob == null || pollingJob.isCancelled()) {\n int refresh;\n\n try {\n refresh = getConfig().as(OpenSprinklerConfig.class).refresh;\n } catch (Exception exp) {\n refresh = this.refreshInterval;\n }\n\n pollingJob = scheduler.scheduleWithFixedDelay(refreshService, DEFAULT_WAIT_BEFORE_INITIAL_REFRESH, refresh,\n TimeUnit.SECONDS);\n }\n }", "public void refresh(Object o) {\n}", "public void recalculatePermissions ( ) {\n\t\texecute ( handle -> handle.recalculatePermissions ( ) );\n\t}", "public void reInit()\r\n\t{ \r\n\t\tif (parent == null)\r\n\t\t\tthrow new DeepException(\"Cannot reinitialize this parameter: parent null\");\r\n\t\t((ParamComputeUnit) parent).reInit();\r\n\t}", "@Override\r\n\t\t\tpublic void invoke() {\n\t\t\t\trefresh();\r\n\t\t\t}", "@Override\r\n\tpublic void savePolicy(Policy policy) {\n\t\tdao.savePolicy(policy);\r\n\t}", "@Override\n\tpublic void refresh(Object entity, Map<String, Object> properties) {\n\t\t\n\t}", "private final Period reloadPeriod( Period period )\n {\n Session session = sessionManager.getCurrentSession();\n\n if ( session.contains( period ) )\n {\n return period; // Already in session, no reload needed\n }\n\n return periodStore.getPeriod( period.getStartDate(), period.getEndDate(), period.getPeriodType() );\n }", "Account refresh();", "public void reload(){\n Map<String,ExchangeRateProvider> newProviders = new ConcurrentHashMap<>();\n for(ExchangeRateProvider prov : Bootstrap.getServices(ExchangeRateProvider.class)){\n newProviders.put(prov.getProviderContext().getProvider(), prov);\n }\n this.conversionProviders = newProviders;\n }", "Policy _get_policy(int policy_type);", "@Override\n\tpublic void refresh(){\n\t\tgetLoaderManager().restartLoader(0, null, this);\n\t}", "@Override\n\tpublic void refresh(Object... param) {\n\n\t}", "public void refresh() {\r\n if (!(entity instanceof Player)) {\r\n return;\r\n }\r\n Player player = (Player) entity;\r\n for (int i = 0; i < 24; i++) {\r\n PacketRepository.send(SkillLevel.class, new SkillContext(player, i));\r\n }\r\n }", "protected void apply() {\n dispose();\n }", "private void refreshProfile() {\n if (profile == null) {\n Source source = getCacheSource();\n boolean useCache = source == Source.CACHE;\n if (!useCache)\n loadingBar.show();\n\n ProfileUtils.downloadProfile(userId, this::onProfileRefresh, this::onProfileRefreshFail,\n profileImage, this);\n } else {\n onProfileRefresh(profile);\n profile = null; // subsequent loads should refresh the profile\n }\n\n refreshWeeklyStats();\n }", "public void setPolicy(short policy) {\n\t\t_policy = policy;\n\t}", "@Override\r\n\tpublic void refresh(Object... param) {\n\r\n\t}", "@Override\n\tpublic void changeToReleaseRefresh() {\n\n\t}", "public void refresh(Env env) {\n\t\trefreshed = System.currentTimeMillis();\n\t}", "public void setPolicy(String policyName, TPPPolicy tppPolicy) throws VCertException {\n if (!policyName.startsWith(TppPolicyConstants.TPP_ROOT_PATH))\n policyName = TppPolicyConstants.TPP_ROOT_PATH + policyName;\n\n tppPolicy.policyName( policyName );\n\n //if the policy doesn't exist\n if(!TppConnectorUtils.dnExist(policyName, tppAPI)){\n\n //verifying that the policy's parent exists\n String parentName = tppPolicy.getParentName();\n if(!parentName.equals(TppPolicyConstants.TPP_ROOT_PATH) && !TppConnectorUtils.dnExist(parentName, tppAPI))\n throw new VCertException(String.format(\"The policy's parent %s doesn't exist\", parentName));\n\n //creating the policy\n TppConnectorUtils.createPolicy( policyName, tppAPI );\n } else\n TppConnectorUtils.resetAttributes(policyName, tppAPI);\n\n //creating policy's attributes.\n TppConnectorUtils.setPolicyAttributes(tppPolicy, tppAPI);\n }", "void refreshRealmOnChange(CachingRealm realm);" ]
[ "0.6552891", "0.6236189", "0.61143804", "0.60371137", "0.5862701", "0.5739332", "0.5737175", "0.5677933", "0.56716067", "0.56401056", "0.5538621", "0.5499891", "0.5419901", "0.5390179", "0.53524315", "0.53446084", "0.52953887", "0.5294698", "0.5281683", "0.52798563", "0.52762145", "0.523553", "0.5231061", "0.52096945", "0.52069664", "0.52047014", "0.5198373", "0.5185078", "0.51575416", "0.51532334", "0.5108807", "0.51044554", "0.5104074", "0.50991565", "0.5097791", "0.50818163", "0.5077646", "0.5064753", "0.5044446", "0.50440747", "0.5042824", "0.50313485", "0.50281584", "0.5014185", "0.49869642", "0.49858347", "0.49836653", "0.49743253", "0.4962219", "0.4962219", "0.49521863", "0.49488267", "0.49446395", "0.49368492", "0.49160215", "0.49140897", "0.49094012", "0.490775", "0.49033704", "0.49026945", "0.49025205", "0.4899703", "0.48875692", "0.488453", "0.48834094", "0.48663014", "0.4857969", "0.485691", "0.48558402", "0.48547304", "0.4854207", "0.48520896", "0.48466593", "0.48322344", "0.48284194", "0.48252392", "0.48246837", "0.482246", "0.48214126", "0.48167214", "0.4815627", "0.48132402", "0.4812206", "0.48111412", "0.48026142", "0.4798842", "0.47937635", "0.47869617", "0.4784545", "0.47754222", "0.47698805", "0.4768572", "0.4764658", "0.47606727", "0.47419912", "0.47403824", "0.47343636", "0.4731427", "0.47303054", "0.4725747" ]
0.6351349
1
tests if policy file has arrived (via synchronization system). if File exists, also checks last modified time, in case file was not deleted on transition out of inservice state. Called when context is not inService to determine if it was needs to be transitioned because of file distribution.
private boolean fileArrived(boolean granted) { String name = getPolicyFileName(granted); File f = new File(name); boolean rvalue = ( f.exists() && _fileChanged(granted,f) ); if (logger.isLoggable(Level.FINE)){ logger.fine("JACC Policy Provider: file arrival check" + " type: " + (granted? "granted " : "excluded ") + " arrived: " + rvalue + " exists: " + f.exists() + " lastModified: " + f.lastModified() + " storedTime: " + lastModTimes[(int) (granted ? 1 : 0)] + " state: " + (this.state == OPEN_STATE ? "open " : "deleted ") + CONTEXT_ID); } return rvalue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean fileExists(Context context, String filename)\r\n{\r\n File file = context.getFileStreamPath(filename);\r\n if(file == null || !file.exists())\r\n {\r\n return false;\r\n }\r\nreturn true;\r\n}", "FileState checkFileState(FsPath path);", "boolean hasRetrieveFile();", "private boolean checkLocalFile() throws IOException {\n\t\tPath localfile = Paths.get(userdir, filename);\n\t\tif (Files.exists(localfile, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\tthis.downloadStatus = DownloadEnum.ERROR;\n\t\t\tthis.message = \"same name file on download directory, download has stopped\";\n\t\t\treturn false;\n\t\t} else {\n\t\t\tlocalfiletmp = Paths.get(localfile.toAbsolutePath().toString() + \".tmp\");\n\t\t\tif (Files.exists(localfiletmp, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\t\tlocalFileSize = localfiletmp.toFile().length();\n\t\t\t} else {\n\t\t\t\tFiles.createFile(localfiletmp);\n\t\t\t}\n\t\t\tcfgpath = Paths.get(localfile.toAbsolutePath().toString() + \".pcd.dl.cfg\");// local cache of download file\n\t\t\tif (!Files.exists(cfgpath, new LinkOption[] { LinkOption.NOFOLLOW_LINKS })) {\n\t\t\t\tFiles.createFile(cfgpath);\n\t\t\t}\n\t\t\tFileWriter fw = new FileWriter(cfgpath.toFile());\n\t\t\tfw.write(url);\n\t\t\tfw.flush();\n\t\t\tfw.close();\n\t\t\treturn true;\n\t\t}\n\t}", "@Override\n public boolean exists(File file) {\n\treturn false;\n }", "boolean hasRetrieveFileResponse();", "private boolean checkTimeStamp(File file) {\n // uses sharedpreferences\n return (lastUpdate < file.getModifiedDate().getValue());\n }", "boolean hasUpdateInodeFile();", "private boolean wasTheFileReallyTransferred(SubmittedFile file)\n\t{\n\t\treturn Duration.between(file.getTimeStamp(), Instant.now()).toMillis() >= tailerDelayMillis; \n\t}", "@Override\n public FileStatus getFileStatus(File file) {\n\treturn null;\n }", "@Override\n\tpublic int getFileStatus() {\n\t\treturn 0;\n\t}", "public boolean exists() {\n return _file.exists();\n }", "@java.lang.Override\n public boolean hasFileInfo() {\n return fileInfo_ != null;\n }", "@java.lang.Override\n public boolean hasFileInfo() {\n return fileInfo_ != null;\n }", "Object getUptodatefile();", "boolean hasFilePath();", "@java.lang.Deprecated boolean hasFile();", "public boolean hasRetrieveFile() {\n return msgCase_ == 2;\n }", "private boolean deleteIfState(File file) {\n if (file.exists()) {\n Duration itemAge = Duration.ofMillis(file.lastModified());\n if (!itemAge.plus(duration).minusMillis(System.currentTimeMillis()).isNegative()) {\n return file.delete();\n }\n }\n\n return false;\n }", "public boolean hasRetrieveFile() {\n return msgCase_ == 2;\n }", "boolean hasFileInfo();", "boolean hasFileInfo();", "private void checkFileStatus() throws CustomException, IOException\n\t{\n\t\t//For all .mgf files\n\t\tfor (int i=0; i<mgfFiles.size(); i++)\n\t\t{\n\n\t\t\tString resultFileName = \n\t\t\t\t\tmgfFiles.get(i).substring(0,mgfFiles.get(i).lastIndexOf(\".\"))+\"_Results.csv\";\n\t\t\t//TODO: Cannot write files if checking for file. \n\t\t\t/*\n\t\t\tif (isFileUnlocked(resultFileName))\n\t\t\t\tthrow new CustomException(\"Please close \"+resultFileName, null);\n\t\t\t */\n\t\t}\n\n\t}", "public void checkIfXslCreated() {\n final File extStore = Environment.getExternalStorageDirectory();\n File myFile = new File(extStore.getAbsolutePath() + \"/backup/\" + fileName);\n\n if (myFile.exists()) {\n Log.d(\"YES\", \"YES\");\n } else {\n Log.d(\"NO\", \"NO\");\n }\n }", "@Override\n public boolean doCheck() {\n logger.debug(\" check if destination file exists: \" + strDestFile);\n if (strDestFile != null) {\n if (new File(strDestFile).exists()) {\n return true;\n }\n }\n return false;\n }", "boolean hasCompleteFile();", "public boolean isRemoteFile() {\n\t\tif (this.serverFileInfo == null)\n\t\t\tthis.fetchInfo();\n\t\treturn this.serverFileInfo != null && this.serverFileInfo.exists();\n\t}", "public boolean fileExistance(String fileName) {\n File file = getActivity().getFileStreamPath(fileName);\n return file.exists();\n }", "private boolean fileExists(Path p) {\n\t\treturn Files.exists(p);\n\t}", "public void checkIfFilesHaveChanged(NSNotification n) {\n int checkPeriod = checkFilesPeriod();\n \n if (!developmentMode && (checkPeriod == 0 || System.currentTimeMillis() - lastCheckMillis < 1000 * checkPeriod)) {\n return;\n }\n \n lastCheckMillis = System.currentTimeMillis();\n \n log.debug(\"Checking if files have changed\");\n for (Enumeration e = _lastModifiedByFilePath.keyEnumerator(); e.hasMoreElements();) {\n File file = new File((String)e.nextElement());\n if (file.exists() && hasFileChanged(file)) {\n fileHasChanged(file);\n }\n }\n }", "public final boolean fileExists() {\n\t if ( m_fileStatus == FileStatus.FileExists || m_fileStatus == FileStatus.DirectoryExists)\n\t return true;\n\t return false;\n\t}", "boolean hasDriveFile();", "boolean hasFileLoc();", "@Override\n\tpublic boolean isFileTransferred(String fileName) throws RemoteException, \n\t\tFileSubmittionFailedException {\n\t\tlogger.finer(\"********************* Rmi call for file: \" + fileName);\n\t\t\n\t\t// 10 attempts before a false answer\n\t\tfor(int i = 1; i <= 10; i++) {\n\t\t\t// File has allready been transferred\n\t\t\tif (transferredFilesMap.containsKey(fileName)){\n\t\t\t\tlogger.fine(\"file \" + fileName + \" was transferred. returning\");\n\t\t\t\t// purge map\n\t\t\t\ttransferredFilesMap.remove(fileName);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\t// File was created but not yet transferred. Wait for a couple of \n\t\t\t// seconds and check again.\n\t\t\tif (createdFilesMap.containsKey(fileName)){\n\t\t\t\tlogger.fine(\"file \" + fileName + \" is waiting for transfer. waiting: \" + i);\n\t\t\t\ttry {\n\t\t\t\t\tTimeUnit.SECONDS.sleep(5);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tlogger.finer(\"interrupted on sleep. ok\");\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// unknown file\n\t\t\t\tlogger.severe(\"file\" + fileName + \" doesn't exist!\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 10 Attempts were failed.\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean exists() {\n\t\treturn Files.exists(this.path);\n\t}", "public boolean cacheAvailable(Context context) {\n return this.fileCache && AQUtility.getExistedCacheByUrl(AQUtility.getCacheDir(context, this.policy), this.url) != null;\n }", "@java.lang.Override\n public boolean hasFilePath() {\n return instance.hasFilePath();\n }", "boolean hasFileLocation();", "boolean hasInodeFile();", "public boolean fileIsReady()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(notFound)\n\t\t\t{\n\t\t\t\tisReady = false;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tisReady = reader.ready();\n\t\t\t}\n\t\t\t\n\t\t} catch (IOException ioe)\n\t\t{\n\t\t\t//\n\t\t}\n\n\t\treturn isReady;\n\t}", "private boolean stateIs(int stateValue) {\n\tboolean inState = _stateIs(stateValue);\n\tif (stateValue == INSERVICE_STATE && !inState) {\n\t if (fileArrived(true) || fileArrived(false)) {\n \n if (logger.isLoggable(Level.FINE)){\n logger.fine(\"JACC Policy Provider: file arrived transition to inService: \" +\n \" state: \" + (this.state == OPEN_STATE ? \"open \" : \"deleted \") +\n CONTEXT_ID);\n }\n \n\t\t// initialize(!open,!remove,fromFile) \n initialize(false,false,true);\n\t }\n\t inState = _stateIs(INSERVICE_STATE);\n\t} \n \n\treturn inState;\n }", "public boolean hasRetrieveFileResponse() {\n return msgCase_ == 11;\n }", "public boolean hasRetrieveFileResponse() {\n return msgCase_ == 11;\n }", "private static boolean needsUpdate(File file, File oldFile, JsonObject old_manifest, JsonObject obj, long size, String hash) {\n try {\n boolean check1 = !oldFile.exists();\n if (check1) return true;\n boolean check2 = !file.exists();\n if (check2) return true;\n boolean check3 = file.length() != size;\n if (check3) return true;\n boolean check4 = old_manifest == null;\n if (check4) return true;\n boolean check5 = old_manifest.get(\"files\") == null;\n if (check5) return true;\n boolean check6 = getHashFromPath(old_manifest.get(\"files\").getAsJsonArray(), obj.get(\"path\").getAsString()) == null;\n if (check6) return true;\n boolean check7 = !getHashFromPath(old_manifest.get(\"files\").getAsJsonArray(), obj.get(\"path\").getAsString()).equals(hash);\n if (check7) return true;\n\n return false;\n } catch (Exception ex) {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n ex.printStackTrace(pw);\n log(sw.toString());\n return true;\n }\n }", "public boolean IsAvailable(File file){\n\n\t\tif(file==null) {\n\t\t\tnew Log (\"File EROOR: NULL\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif (file.exists()) {\n\t\t\tif (file.isFile() && file.canRead() && file.canWrite()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tnew Log(file.getPath() + \" is Not Available\");\n\t\treturn false;\n\t}", "private boolean existsFile(File testFile) {\n\t\tif (testFile.exists()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean checkFileExists(String fPath) {\n\t\tFile file = new File(fPath);\n\t\treturn file.exists();\n\t}", "private boolean canRead() {\n\t\treturn fileStatus;\n\t}", "protected boolean checkFileSystem() {\n if (this.fsOk && fs != null) {\n try {\n FSUtils.checkFileSystemAvailable(fs);\n } catch (IOException e) {\n LOG.fatal(\"Shutting down HRegionServer: file system not available\", e);\n abort();\n fsOk = false;\n }\n }\n return this.fsOk;\n }", "private static boolean doesPathExist(final Path path, final FileContext context) throws AccessControlException, UnsupportedFileSystemException, IOException {\n\t\ttry {\n\t\t\tFileStatus status = context.getFileStatus(path);\n\t\t\treturn status.isFile() || status.isDirectory();\n\t\t} catch (FileNotFoundException e) {\n\t\t\treturn false; \n\t\t}\t\t\n\t}", "boolean hasDeleteFile();", "private boolean touchFileExists() {\n File f = new File(touchFile);\n return f.exists();\n }", "boolean accept(FileStatus fileStatus);", "private boolean isFileAccessible() {\n\t\ttry {\n\t\t\tif (!new File(fileUpload.getFilePath()).exists())\n\t\t\t\treturn false;\n\t\t\treturn true;\n\t\t} catch (SecurityException e) {\n\t\t\treturn false;\n\t\t}\n\t}", "boolean doesFileExist(String date)\n throws FlooringMasteryPersistenceException;", "public boolean hasFileInfo() {\n return fileInfoBuilder_ != null || fileInfo_ != null;\n }", "public boolean hasFileInfo() {\n return fileInfoBuilder_ != null || fileInfo_ != null;\n }", "private static boolean fileExists(String filename) {\n return new File(filename).exists();\n }", "private boolean checkingIfTheFileIsCurrent(AmazonS3 s3, String file) {\n String eTag = gettingETagOfTheFile(file);\n if (eTag == null) return true;\n System.out.println(eTag);\n FileReader inputFile = null;\n BufferedReader bufferReader = null;\n String line = null;\n try{\n inputFile = new FileReader(\"/home/ubuntu/\" + file + \".etag\");\n bufferReader = new BufferedReader(inputFile);\n line = bufferReader.readLine();\n bufferReader.close();\n }catch(Exception e){\n System.out.println(\"Error while reading file line by line:\" + e.getMessage());\n }\n if( eTag.equals(line)){\n return true;\n }\n return false;\n }", "private int copyToTempFileAndSetPolicy(Context context, String fileName, String suffix, int policy) throws IOException {\n if (isMutualExclusivePolicy(context, fileName, policy)) {\n Log.e(LOG_TAG, \"copyToTempFileAndSetPolicy: isMutualExclusivePolicy failed!\");\n return -1;\n }\n File oldFile = new File(fileName);\n if (oldFile.exists()) {\n String tempFileName = fileName + BACKUP_SUFFIX;\n File tempFile = new File(tempFileName);\n if (!tempFile.createNewFile()) {\n Log.e(LOG_TAG, \"copyToTempFileAndSetPolicy: create file failed!\");\n return -1;\n }\n int result = setPolicyInner(context, tempFileName, policy);\n if (result != 0) {\n Log.e(LOG_TAG, \"copyToTempFileAndSetPolicy: setPolicyInner faild isDeleted = \" + tempFile.delete());\n return result;\n }\n try {\n FileOutputStream outputStream = new FileOutputStream(tempFile);\n FileInputStream inputStream = new FileInputStream(oldFile);\n copyFilePermission(fileName, tempFileName);\n byte[] bytes = new byte[4096];\n for (int len = inputStream.read(bytes); len > 0; len = inputStream.read(bytes)) {\n outputStream.write(bytes, 0, len);\n }\n oldFile.delete();\n boolean isOpSuccess = new File(tempFileName).renameTo(oldFile);\n inputStream.close();\n outputStream.close();\n Log.i(LOG_TAG, \"copy and setPolicy isOpSuccess \" + isOpSuccess);\n return result;\n } catch (IOException e) {\n if (tempFile.exists()) {\n tempFile.delete();\n }\n throw new IOException(\"copy to temp and set policy failed!\");\n }\n } else {\n Log.e(LOG_TAG, \"copyToTempFileAndSetPolicy: \" + fileName + \" not exist!\");\n throw new IOException(fileName + \" is not exists!\");\n }\n }", "private boolean kernelWakelockStatsExist() {\n try {\n return doesFileExist(WAKE_LOCK_FILE) || doesFileExist(WAKE_SOURCES_FILE);\n } catch(Exception e) {\n return false;\n }\n }", "public boolean checkCache(HttpServletRequest request, HttpServletResponse response, File file) throws IOException\n {\n String requestIfModifiedSince = request.getHeader(IF_MODIFIED_SINCE);\n Date lastModified = new Date(file.lastModified());\n try {\n if(requestIfModifiedSince!=null){\n Date requestDate = getDateFromHttpDate(requestIfModifiedSince);\n if (file != null)\n if (!requestDate.before(lastModified))\n { // Not modified since last time\n response.setHeader(LAST_MODIFIED, request.getHeader(IF_MODIFIED_SINCE));\n response.sendError(HttpServletResponse.SC_NOT_MODIFIED);\n return true; // Success - use your cached copy\n }\n }\n } catch (ParseException e) {\n // Fall through\n }\n // If they want it again, send them my cached copy\n if ((file == null) || (!file.exists()))\n return false; // Error - cache doesn't exist\n response.addHeader(LAST_MODIFIED, getHttpDate(lastModified));\n \n InputStream inStream = new FileInputStream(file);\n OutputStream writer = response.getOutputStream();\n copyStream(inStream, writer);\n inStream.close();\n writer.close();\n return true; // Success - I returned the cached copy\n }", "private boolean doesFileExist(String qualifiedFileName) throws FileNotFoundException {\n\t\t\n\t\t// First get a path object to where the file is.\n\t\t\n\t\tPath inWhichFolder = Paths.get(qualifiedFileName);\n\t\t\n\t\tboolean isFilePresent = (Files.exists(inWhichFolder) && Files.isReadable(inWhichFolder) && !Files.isDirectory(inWhichFolder));\n\t\t\n\t\tif (!isFilePresent) {\n\t\t\tthrow new FileNotFoundException(String.format(\"The file you specified '%s' does not exist or cannot be found!\", qualifiedFileName));\n\t\t\t\n\t\t}\n\t\t\n\t\t// If we're here then we should have a file that can be opened and read.\n\t\t\n\t\treturn isFilePresent;\n\t\t\n\t}", "public boolean fExists(){\n \n try(ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file))){\n \n }\n catch (FileNotFoundException e){\n System.out.println(\"File not found\");\n return false;\n }\n catch (IOException e){\n System.out.println(\"Another exception\");\n return false;\n }\n\n return true;\n }", "private AFile getFileToCheck() {\n\t\tif (fileListTblMdl != null && ((compareCount > 8 && compareCount % 4 == 0) || compareCount >= fileList.size())) {\n\t\t\tfileListTblMdl.fireTableDataChanged();\n\t\t}\n\t\tif (compareCount >= fileList.size()) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tsynchronized (fileList) {\n\t\t\t\treturn fileList.get(compareCount++);\n\t\t\t}\n\t\t}\n\t}", "private void checkValidity() throws FileSystemException {\n\t\tif ( invalidated || cachedCurrentDirectory == null ) {\n\t\t\t\n\t\t\tfillCache();\n\t\t\tinvalidated = false;\n\t\t} \n\t\t\n\t}", "protected void checkOpen() throws IOException {\n if (this.stopRequested.get() || this.abortRequested) {\n throw new IOException(\"Server not running\");\n }\n if (!fsOk) {\n throw new IOException(\"File system not available\");\n }\n }", "public boolean exists() {\r\n\t\t// Try file existence: can we find the file in the file system?\r\n\t\ttry {\r\n\t\t\treturn getFile().exists();\r\n\t\t}\r\n\t\tcatch (IOException ex) {\r\n\t\t\t// Fall back to stream existence: can we open the stream?\r\n\t\t\ttry {\r\n\t\t\t\tInputStream is = getInputStream();\r\n\t\t\t\tis.close();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tcatch (Throwable isEx) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic boolean checkExistFile(String aFilePath) {\n\t\treturn eDao.checkExistFile(aFilePath);\n\t}", "public final boolean isAlive() {\n\t\tboolean isAlive = (new File(getFileNamePath())).isFile();\n\n\t\tif (isAlive) {\n\t\t\ttry (Socket socket = new Socket()) {\n\t\t\t\t// this will throw an exception if the socket is in use/unavailable.\n\t\t\t\tsocket.bind(\n\t\t\t\t\t\tnew InetSocketAddress(InetAddress.getLoopbackAddress().getHostAddress(), getPublisherPort()));\n\t\t\t\tisAlive = false;\n\t\t\t} catch (IOException e) {\n\t\t\t\tisAlive = true;\n\t\t\t} catch (Exception e) {\n\t\t\t\tif (SystemUtils.isInDebugMode()) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!isAlive) {\n\t\t\t// we should try to delete the file; this may be left over from a crashed\n\t\t\t// process..\n\t\t\tFileUtils.safeDeleteFile(getFileNamePath());\n\t\t}\n\n\t\treturn isAlive;\n\t}", "boolean hasInodeLastModificationTime();", "boolean hasUpdateInodeDirectory();", "private boolean oldEnoughForCleanup(File file)\r\n {\r\n if (minFileAgeMillis == 0)\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n long now = System.currentTimeMillis();\r\n return (file.lastModified() < (now - minFileAgeMillis));\r\n }\r\n }", "public synchronized boolean isOpen() {\n return randomAccessFile != null;\n }", "public int fileExists(SrvSession sess, TreeConnection tree, String name) {\n\n // Access the JDBC context\n\n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n\n // Check if the path contains an NTFS stream name\n\n int fileSts = FileStatus.NotExist;\n \n if ( FileName.containsStreamName(name)) {\n \n // Split the path into directory, file and stream name components\n \n String[] paths = FileName.splitPathStream(name); \n\n // Get, or create, the file state for main file path\n \n String filePath = paths[0] + paths[1];\n FileState fstate = getFileState(filePath,dbCtx,true);\n\n // Check if the top level file exists\n \n if ( fstate != null && fstate.fileExists() == true) {\n \n // Get the top level file details\n \n DBFileInfo dbInfo = getFileDetails(name, dbCtx, fstate);\n \n if ( dbInfo != null) {\n\n // Checkif the streams list is cached\n \n StreamInfoList streams = (StreamInfoList) fstate.findAttribute(DBStreamList);\n \n // Get the list of available streams\n\n if ( streams == null) {\n \n // Load the streams list for the file\n \n streams = loadStreamList(fstate, dbInfo, dbCtx, true);\n \n // Cache the streams list\n \n if ( streams != null)\n fstate.addAttribute(DBStreamList, streams);\n }\n \n if ( streams != null && streams.numberOfStreams() > 0) {\n \n // Check if the required stream exists\n \n if ( streams.findStream(paths[2]) != null)\n fileSts = FileStatus.FileExists;\n }\n }\n }\n\n // Debug\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"DB fileExists() name=\" + filePath + \", stream=\" + paths[2] + \", fileSts=\" + FileStatus.asString(fileSts));\n }\n else {\n\n // Get, or create, the file state for the path\n \n FileState fstate = getFileState( name, dbCtx, true);\n \n // Check if the file exists status has been cached\n \n fileSts = fstate.getFileStatus();\n \n if ( fstate.getFileStatus() == FileStatus.Unknown) {\n \n // Get the file details\n \n DBFileInfo dbInfo = getFileDetails(name,dbCtx,fstate);\n if ( dbInfo != null) {\n if ( dbInfo.isDirectory() == true)\n fileSts = FileStatus.DirectoryExists;\n else\n fileSts = FileStatus.FileExists;\n }\n else {\n \n // Indicate that the file does not exist\n \n fstate.setFileStatus( FileStatus.NotExist);\n fileSts = FileStatus.NotExist;\n }\n \n // Debug\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"DB fileExists() name=\" + name + \", fileSts=\" + FileStatus.asString(fileSts));\n }\n else {\n \n // DEBUG\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"@@ Cache hit - fileExists() name=\" + name + \", fileSts=\" + FileStatus.asString(fileSts));\n }\n }\n \n // Return the file exists status\n \n return fileSts;\n }", "public boolean createNewFile(File file) throws IOException {\n if (\"/probes/.ready\".equals(file.getPath())) {\n return true;\n }\n return file.createNewFile();\n }", "@java.lang.Override\n public boolean hasFilePath() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "public boolean exists() {\n\t\t\n\t\tFile temp = new File(this.path);\n\t\treturn temp.exists();\n\t}", "public boolean isSettledFileGenerated(TsFileResource oldTsFileResource) {\n String oldFilePath = oldTsFileResource.getTsFilePath();\n return TsFileAndModSettleTool.getInstance().recoverSettleFileMap.containsKey(oldFilePath)\n && TsFileAndModSettleTool.getInstance().recoverSettleFileMap.get(oldFilePath)\n == SettleCheckStatus.AFTER_SETTLE_FILE.getCheckStatus();\n }", "private static boolean isProperNotification( final FilePath filePath )\r\n {\r\n String oldName = filePath.getName();\r\n String newName = (filePath.getVirtualFile() == null) ? \"\" : filePath.getVirtualFile().getName();\r\n String oldParent = filePath.getVirtualFileParent().getPath();\r\n String newParent = filePath.getPath().substring( 0, filePath.getPath().length() - oldName.length() - 1 );\r\n return (newParent.equals( oldParent ) && newName.equals( oldName ) );\r\n }", "@Override\n\tpublic boolean isLocked() { The lock file must be manually deleted.\n\t\t//\n\t\treturn lockFile.exists();\n\t}", "public boolean isSetFile() {\n return this.File != null;\n }", "private boolean isFileInProtectedFolder(AlfrescoAccount account, File f)\n {\n return (f.getPath().startsWith(\n AlfrescoStorageManager.getInstance(appContext).getDownloadFolder(account).getPath()) || f.getPath()\n .startsWith(SyncContentManager.getInstance(appContext).getSynchroFolder(account).getPath()));\n }", "public synchronized boolean checkFileCompletion()\n/* */ {\n/* 49 */ int totalsize = 0;\n/* */ \n/* 51 */ for (FileSubContent subContent : this.downloadManager.getSUB_CONTENTS())\n/* */ {\n/* 53 */ if ((subContent != null) && (subContent.isIsDownloaded()) && (subContent.getContent().length == this.downloadManager.getSUB_SIZE()))\n/* */ {\n/* 55 */ totalsize++;\n/* */ }\n/* */ }\n/* */ \n/* 59 */ if (totalsize == this.downloadManager.getSUB_CONTENTS().size())\n/* */ {\n/* 61 */ System.out.println(\"FileDownloadChecker: got all of the subParts.\");\n/* 62 */ return true;\n/* */ }\n/* */ \n/* */ \n/* 66 */ return false;\n/* */ }", "boolean hasSavedFile() {\n return currPlayer != -1 && getStat(saveStatus) == 1;\n }", "public boolean hasLoadedFile() {\n return isSuccessfulFileLoad;\n }", "@Override\n\t\t\tpublic boolean accept(File dir, String filename)\n\t\t\t{\n\t\t\t\tFile file = new File(path + \"/\" + filename);\n\t\t\t\tLong ago = file.lastModified();\n\t\t\t\tLong now = System.currentTimeMillis();\n\t\t\t\t// 如果最后一次修改时间超过一年:3153600秒\n\t\t\t\tif ((now - ago) > 31536000 / 12)\n\t\t\t\t{\n\t\t\t\t\tfile.delete();\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "boolean hasMediaFile();", "public static boolean isFileAvailable(String ID, DawnParser parser)\n {\n return (parser.getProperty(\"DAWN.IO#FILE.\" + ID) != null);\n }", "private boolean isEmptyFile(String filename) {\n try (InputStream in = IO.openFile(filename)) {\n int b = in.read();\n return (b == -1);\n } catch (IOException ex) {\n throw IOX.exception(ex);\n }\n }", "public boolean fileExists(String fileName){\n\t\t\tboolean exists = false;\n\t\t\ttry{\n\t \t FileInputStream fin = openFileInput(fileName);\n\t\t\t\tif(fin == null){\n\t\t\t\t\texists = false;\n\t\t\t\t}else{\n\t\t\t\t\texists = true;\n\t\t\t\t\tfin.close();\n\t\t\t\t}\n\t\t\t}catch (Exception je) {\n\t\t //Log.i(\"ZZ\", \"AppDelegate:fileExists ERROR: \" + je.getMessage()); \n\t\t exists = false;\n\t\t\t}\n\t\t\treturn exists;\n\t\t}", "@Override\n public void stageForCache_destination_exists() throws Exception {\n assumeTrue( !isWindows() );\n super.stageForCache_destination_exists();\n }", "private boolean isUpToDate(HttpServletRequest req, String path)\n {\n if (ignoreLastModified)\n {\n return false;\n }\n \n long modifiedSince = req.getDateHeader(HttpConstants.HEADER_IF_MODIFIED);\n if (modifiedSince != -1)\n {\n // Browsers are only accurate to the second\n modifiedSince -= modifiedSince % 1000;\n }\n String givenEtag = req.getHeader(HttpConstants.HEADER_IF_NONE);\n \n // Deal with missing etags\n if (givenEtag == null)\n {\n // There is no ETag, just go with If-Modified-Since\n if (modifiedSince > servletContainerStartTime)\n {\n if (log.isDebugEnabled())\n {\n log.debug(\"Sending 304 for \" + path + \" If-Modified-Since=\" + modifiedSince + \", Last-Modified=\" + servletContainerStartTime); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n }\n return true;\n }\n \n // There are no modified setttings, carry on\n return false;\n }\n \n // Deal with missing If-Modified-Since\n if (modifiedSince == -1)\n {\n if (!etag.equals(givenEtag))\n {\n // There is an ETag, but no If-Modified-Since\n if (log.isDebugEnabled())\n {\n log.debug(\"Sending 304 for \" + path + \" Old ETag=\" + givenEtag + \", New ETag=\" + etag); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n }\n return true;\n }\n \n // There are no modified setttings, carry on\n return false;\n }\n \n // Do both values indicate that we are in-date?\n if (etag.equals(givenEtag) && modifiedSince <= servletContainerStartTime)\n {\n if (log.isDebugEnabled())\n {\n log.debug(\"Sending 304 for \" + path); //$NON-NLS-1$\n }\n return true;\n }\n \n return false;\n }", "private boolean createPolicyFile\n\t(boolean granted, PolicyParser parser, boolean woc) throws java.io.IOException {\n\n\tboolean result = woc;\n\tcreatePolicyContextDirectory();\n\tremovePolicyFile(granted);\n\tString name = getPolicyFileName(granted);\n\tOutputStreamWriter writer = null;\n\ttry {\n\t if(logger.isLoggable (Level.FINE)){\n\t\tlogger.fine(\"JACC Policy Provider: Writing grant statements to policy file: \"+name);\n\t }\n\t writer = new OutputStreamWriter(new FileOutputStream(name), \"UTF-8\");\n\t parser.write(writer);\n\t result = false;\n\t} catch(java.io.FileNotFoundException fnfe) {\n String msg=localStrings.getLocalString(\"pc.file_error\",\"file not found \"+name,\n new Object []{name, fnfe});\n\t logger.log(Level.SEVERE,msg);\n\t throw fnfe;\n\t} catch(java.io.IOException ioe){\n String msg=localStrings.getLocalString(\"pc.file_write_error\",\"file IO error on file \"+name,\n new Object []{name,ioe});\n\t logger.log(Level.SEVERE,msg);\n\t throw ioe;\n\t} finally {\n\t if (writer != null) {\n\t\ttry {\n\t\t writer.close();\n\t\t captureFileTime(granted);\n\t\t} catch (Exception e) {\n String defMsg=\"Unable to close Policy file: \"+name;\n String msg=localStrings.getLocalString(\"pc.file_close_error\",defMsg,new Object []{name,e}); \n\t\t logger.log(Level.SEVERE,msg);\n\t\t throw new RuntimeException(defMsg);\n\t\t}\n\t }\n\t}\n\treturn result;\n }", "public boolean hasFile(final String file);", "private boolean isModified( File file ) {\r\n\t\tString dateFromClient = request.getHeaderFields().get( HeaderFields.IF_MODIFIED_SINCE );\r\n\t\tif ( dateFromClient == null )\r\n\t\t\treturn true;\r\n\t\t// Remove last three significant digits, because convert date from\r\n\t\t// String to long lose last three significant digits.\r\n\t\tlong lastModified = ( file.lastModified() / 1000L ) * 1000L;\r\n\t\ttry {\r\n\t\t\tDate clientDate = ( Date ) Utils.DATE_FORMATE.parse( dateFromClient );\r\n\t\t\treturn lastModified > clientDate.getTime();\r\n\t\t} catch ( Exception e ) {\r\n\t\t\t// If there is exception, assume file is modified\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "boolean hasFileName();", "boolean hasFileName();", "boolean safeIsFile(FsPath path);", "@RequestMapping(value = \"/checkFileAvailability\", method = RequestMethod.GET)\r\n\tpublic ModelAndView checkFileAvailability(HttpServletRequest req, HttpServletResponse res) throws IOException {\r\n\t\tlogger.log(IAppLogger.INFO, \"Enter: checkFileAvailability()\");\r\n\t\tString filePath = (String) req.getParameter(\"filePath\");\r\n\t\tFile file = new File(filePath);\r\n\t\tString status = \"Fail\";\r\n\t\ttry {\r\n\t\t\tbyte[] data = FileCopyUtils.copyToByteArray(file);\r\n\t\t\tstatus = \"Success\";\r\n\t\t\tres.setContentType(\"text/plain\");\r\n\t\t\tres.getWriter().write(\"{\\\"status\\\":\\\"\" + status + \"\\\"}\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.log(IAppLogger.ERROR, \"Error downloading Group File\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t\tres.setContentType(\"text/plain\");\r\n\t\t\tres.getWriter().write(\"{\\\"status\\\":\\\"\" + status + \"\\\"}\");\r\n\t\t}\r\n\t\tlogger.log(IAppLogger.INFO, \"Exit: checkFileAvailability()\");\r\n\t\treturn null;\r\n\t}" ]
[ "0.6124834", "0.5927674", "0.58621055", "0.57879347", "0.56682163", "0.5642706", "0.5605923", "0.5588554", "0.55580515", "0.5548718", "0.55344516", "0.5521065", "0.5520728", "0.55195796", "0.54982877", "0.5495907", "0.5481724", "0.54794353", "0.54764247", "0.54759985", "0.5474871", "0.5474871", "0.5469639", "0.5458967", "0.5439981", "0.5439385", "0.5431311", "0.54239005", "0.5413772", "0.5412931", "0.53786796", "0.5357326", "0.5345453", "0.5331251", "0.5330594", "0.532034", "0.5314783", "0.5303402", "0.5293627", "0.52935547", "0.5292487", "0.52693", "0.52648133", "0.52603304", "0.5259859", "0.5248269", "0.52386576", "0.5231627", "0.5223702", "0.5218715", "0.5214421", "0.52136034", "0.5185678", "0.5183194", "0.5181702", "0.5171325", "0.5171222", "0.5171203", "0.5154454", "0.51525444", "0.51435626", "0.5140157", "0.51380116", "0.5123542", "0.51232195", "0.5122863", "0.5115513", "0.51148236", "0.51054436", "0.5100047", "0.5098932", "0.5098056", "0.50946635", "0.50942695", "0.5091144", "0.50878286", "0.50819165", "0.5072079", "0.50698334", "0.5060285", "0.50503343", "0.50436074", "0.5028675", "0.50285804", "0.50275004", "0.50177383", "0.5016367", "0.5010282", "0.49987522", "0.49810782", "0.4975406", "0.49703836", "0.4962225", "0.49607196", "0.49588773", "0.49551737", "0.49513423", "0.49513423", "0.49453267", "0.49421912" ]
0.72298074
0
initilaize the internal data structures. if open, then mark state as open if remove, then remove any existing policy statements if fromFile (and not remove), then mark state as in service, and not requiring write on commit if fromFile (and remove), then remove and mark state as open
protected void initialize(boolean open, boolean remove, boolean fromFile) { synchronized(refreshLock) { String name = getPolicyFileName(true); if (open || remove) { setState(OPEN_STATE); } else { setState(INSERVICE_STATE); } try { if (remove) { removePolicy(); } policyUrlValue = sun.net.www.ParseUtil.fileToEncodedURL(new File(name)).toString(); if (fromFile && !remove) { uncheckedPermissions = null; rolePermissionsTable = null; excludedPermissions = loadExcludedPolicy(); initLinkTable(); captureFileTime(true); writeOnCommit = false; } wasRefreshed = false; } catch (java.net.MalformedURLException mue) { String defMsg="Unable to convert Policy file Name to URL: "+name; String msg=localStrings.getLocalString("pc.file_to_url",defMsg, new Object[]{name,mue}); logger.log(Level.SEVERE,msg); throw new RuntimeException(defMsg); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private FileManager()\n {\n bookFile.open(\"bookdata.txt\");\n hisFile.open(\"history.txt\");\n idFile.open(\"idpassword.txt\");\n createIDMap();\n createHisMap(Customer.getInstance());\n }", "public void resetStore() {\n try {\n db.close();\n uncommited = null;\n uncommitedDeletes = null;\n autoCommit = true;\n bloom = new BloomFilter();\n utxoCache = new LRUCache(openOutCache, 0.75f);\n } catch (IOException e) {\n log.error(\"Exception in resetStore.\", e);\n }\n\n File f = new File(filename);\n if (f.isDirectory()) {\n for (File c : f.listFiles())\n c.delete();\n }\n openDB();\n }", "private void initializeFileSystem() \r\n \t /*@ requires identityFile |-> _ &*& identityFileSignature |-> _ &*& addressFile |-> _ &*& addressFileSignature |-> _\r\n\t\t\t &*& caRoleIDFile |-> _ &*& preferencesFile |-> _ &*& idDirectory |-> _\r\n\t\t\t &*& certificateDirectoryFile |-> _ &*& privateKeyDirectoryFile |-> _ &*& authenticationObjectDirectoryFile |-> _ &*& objectDirectoryFile |-> _\r\n\t\t\t &*& tokenInfo |-> _ &*& belpicDirectory |-> _ &*& dirFile |-> _\r\n\t\t\t &*& masterFile |-> _ &*& selectedFile |-> _;\r\n\t @*/\r\n \t/*@ ensures dirFile |-> ?theDirFile &*& theDirFile.ElementaryFile(_, _, ?dirFileData, _, _, _) &*& theDirFile != null \r\n \t &*& dirFileData != null &*& dirFileData.length == 0x25\r\n\t &*& belpicDirectory |-> ?theBelpicDirectory &*& theBelpicDirectory.DedicatedFile(_, _, _, ?belpic_siblings, _) &*& theBelpicDirectory != null\r\n\t &*& tokenInfo |-> ?theTokenInfo &*& theTokenInfo.ElementaryFile(_, _, ?tokenInfoData, _, _, _) &*& theTokenInfo != null\r\n\t &*& tokenInfoData != null &*& tokenInfoData.length == 0x30\r\n\t &*& objectDirectoryFile |-> ?theObjectDirectoryFile &*& theObjectDirectoryFile.ElementaryFile(_, _, ?objectDirectoryFileData, _, _, _) &*& theObjectDirectoryFile != null\r\n\t &*& objectDirectoryFileData != null &*& objectDirectoryFileData.length == 40\r\n\t &*& authenticationObjectDirectoryFile |-> ?theAuthenticationObjectDirectoryFile &*& theAuthenticationObjectDirectoryFile.ElementaryFile(_, _, ?authenticationObjectDirectoryFileData, _, _, _) &*& theAuthenticationObjectDirectoryFile != null\r\n\t &*& authenticationObjectDirectoryFileData != null &*& authenticationObjectDirectoryFileData.length == 0x40\r\n\t &*& privateKeyDirectoryFile |-> ?thePrivateKeyDirectoryFile &*& thePrivateKeyDirectoryFile.ElementaryFile(_, _, ?privateKeyDirectoryFileData, _, _, _) &*& thePrivateKeyDirectoryFile != null\r\n\t &*& privateKeyDirectoryFileData != null &*& privateKeyDirectoryFileData.length == 0xB0\r\n\t &*& certificateDirectoryFile |-> ?theCertificateDirectoryFile &*& theCertificateDirectoryFile.ElementaryFile(_, _, ?certificateDirectoryFileData, _, _, _) &*& theCertificateDirectoryFile != null\r\n\t &*& certificateDirectoryFileData != null &*& certificateDirectoryFileData.length == 0xB0\r\n\t &*& idDirectory |-> ?theIdDirectory &*& theIdDirectory.DedicatedFile(_, _, _, ?idDirectory_siblings, _) &*& theIdDirectory != null\r\n\t &*& identityFile |-> ?theIdentityFile &*& theIdentityFile.ElementaryFile(_, _, ?identityData, _, _, _) &*& theIdentityFile != null\r\n\t &*& identityData != null &*& identityData.length == 0xD0\r\n\t &*& identityFileSignature |-> ?theIdentityFileSignature &*& theIdentityFileSignature.ElementaryFile(_, _, ?identitySignatureData, _, _, _) &*& theIdentityFileSignature != null\r\n\t &*& identitySignatureData != null &*& identitySignatureData.length == 0x80\r\n\t &*& addressFile |-> ?theAddressFile &*& theAddressFile.ElementaryFile(_, _, ?addressFileData, _, _, _) &*& theAddressFile != null\r\n\t &*& addressFileData != null &*& addressFileData.length == 117\r\n\t &*& addressFileSignature |-> ?theAddressFileSignature &*& theAddressFileSignature.ElementaryFile(_, _, ?addressFileSignatureData, _, _, _) &*& theAddressFileSignature != null\r\n\t &*& addressFileSignatureData != null &*& addressFileSignatureData.length == 128\r\n\t &*& caRoleIDFile |-> ?theCaRoleIDFile &*& theCaRoleIDFile.ElementaryFile(_, _, ?caRoldIDFileData, _, _, _) &*& theCaRoleIDFile != null\r\n\t &*& caRoldIDFileData != null &*& caRoldIDFileData.length == 0x20\r\n\t &*& preferencesFile |-> ?thePreferencesFile &*& thePreferencesFile.ElementaryFile(_, _, ?preferencesFileData, _, _, _) &*& thePreferencesFile != null\r\n\t &*& preferencesFileData != null &*& preferencesFileData.length == 100\r\n\t &*& masterFile |-> ?theMasterFile &*& theMasterFile.MasterFile(0x3F00, null, _, ?master_siblings, _) &*& theMasterFile != null\r\n\t &*& master_siblings == cons<File>(theDirFile, cons(theBelpicDirectory, cons(theIdDirectory, nil)))\r\n\t &*& belpic_siblings == cons<File>(theTokenInfo, cons(theObjectDirectoryFile, cons(theAuthenticationObjectDirectoryFile, cons(thePrivateKeyDirectoryFile, cons(theCertificateDirectoryFile,nil)))))\r\n\t &*& idDirectory_siblings == cons<File>(theIdentityFile, cons(theIdentityFileSignature, cons(theAddressFile, cons(theAddressFileSignature, cons(theCaRoleIDFile, cons(thePreferencesFile, nil))))))\r\n\t &*& selectedFile |-> theMasterFile &*& theBelpicDirectory.getClass() == DedicatedFile.class &*& theIdDirectory.getClass() == DedicatedFile.class;\r\n\t @*/\r\n\t{\r\n\t\tmasterFile = new MasterFile();\r\n\t\t/*\r\n\t\t * initialize PKCS#15 data structures see\r\n\t\t * \"5. PKCS#15 information details\" for more info\r\n\t\t */\r\n\t\t\r\n\t\t//@ masterFile.castMasterToDedicated();\r\n\t\t\r\n\t\tdirFile = new ElementaryFile(EF_DIR, masterFile, (short) 0x25);\r\n\t\tbelpicDirectory = new DedicatedFile(DF_BELPIC, masterFile);\r\n\t\ttokenInfo = new ElementaryFile(TOKENINFO, belpicDirectory, (short) 0x30);\r\n\t\tobjectDirectoryFile = new ElementaryFile(ODF, belpicDirectory, (short) 40);\r\n\t\tauthenticationObjectDirectoryFile = new ElementaryFile(AODF, belpicDirectory, (short) 0x40);\r\n\t\tprivateKeyDirectoryFile = new ElementaryFile(PRKDF, belpicDirectory, (short) 0xB0);\r\n\t\tcertificateDirectoryFile = new ElementaryFile(CDF, belpicDirectory, (short) 0xB0);\r\n\t\tidDirectory = new DedicatedFile(DF_ID, masterFile);\r\n\t\t/*\r\n\t\t * initialize all citizen data stored on the eID card copied from sample\r\n\t\t * eID card 000-0000861-85\r\n\t\t */\r\n\t\t// initialize ID#RN EF\r\n\t\tidentityFile = new ElementaryFile(IDENTITY, idDirectory, (short) 0xD0);\r\n\t\t// initialize SGN#RN EF\r\n\t\tidentityFileSignature = new ElementaryFile(SGN_IDENTITY, idDirectory, (short) 0x80);\r\n\t\t// initialize ID#Address EF\r\n\t\t// address is 117 bytes, and should be padded with zeros\r\n\t\taddressFile = new ElementaryFile(ADDRESS, idDirectory, (short) 117);\r\n\t\t// initialize SGN#Address EF\r\n\t\taddressFileSignature = new ElementaryFile(SGN_ADDRESS, idDirectory, (short) 128);\r\n\t\t// initialize PuK#7 ID (CA Role ID) EF\r\n\t\tcaRoleIDFile = new ElementaryFile(CA_ROLE_ID, idDirectory, (short) 0x20);\r\n\t\t// initialize Preferences EF to 100 zero bytes\r\n\t\tpreferencesFile = new ElementaryFile(PREFERENCES, idDirectory, (short) 100);\r\n\t\t\r\n\t\tselectedFile = masterFile;\r\n\t\t//@ masterFile.castDedicatedToMaster();\r\n\t}", "public void writeState() {\n Throwable th;\n String str;\n String str2;\n IOException e;\n IOException e2;\n List<AppOpsManager.PackageOps> allOps;\n Throwable th2;\n String lastPkg;\n List<AppOpsManager.PackageOps> allOps2;\n String lastPkg2;\n List<AppOpsManager.PackageOps> allOps3;\n String proxyPkg;\n synchronized (this.mFile) {\n try {\n FileOutputStream stream = this.mFile.startWrite();\n String str3 = null;\n List<AppOpsManager.PackageOps> allOps4 = getPackagesForOps(null);\n try {\n XmlSerializer out = new FastXmlSerializer();\n out.setOutput(stream, StandardCharsets.UTF_8.name());\n out.startDocument(null, true);\n out.startTag(null, \"app-ops\");\n out.attribute(null, \"v\", String.valueOf(1));\n synchronized (this) {\n try {\n int uidStateCount = this.mUidStates.size();\n for (int i = 0; i < uidStateCount; i++) {\n try {\n UidState uidState = this.mUidStates.valueAt(i);\n if (uidState.opModes != null && uidState.opModes.size() > 0) {\n out.startTag(null, WatchlistLoggingHandler.WatchlistEventKeys.UID);\n out.attribute(null, \"n\", Integer.toString(uidState.uid));\n SparseIntArray uidOpModes = uidState.opModes;\n int opCount = uidOpModes.size();\n for (int j = 0; j < opCount; j++) {\n int op = uidOpModes.keyAt(j);\n int mode = uidOpModes.valueAt(j);\n out.startTag(null, \"op\");\n out.attribute(null, \"n\", Integer.toString(op));\n out.attribute(null, \"m\", Integer.toString(mode));\n out.endTag(null, \"op\");\n }\n out.endTag(null, WatchlistLoggingHandler.WatchlistEventKeys.UID);\n }\n } catch (Throwable th3) {\n e2 = th3;\n while (true) {\n try {\n break;\n } catch (Throwable th4) {\n e2 = th4;\n }\n }\n throw e2;\n }\n }\n } catch (Throwable th5) {\n e2 = th5;\n while (true) {\n break;\n }\n throw e2;\n }\n }\n if (allOps4 != null) {\n String lastPkg3 = null;\n boolean z = false;\n int i2 = 0;\n while (i2 < allOps4.size()) {\n AppOpsManager.PackageOps pkg = allOps4.get(i2);\n if (pkg.getPackageName() == null) {\n allOps = allOps4;\n } else {\n if (!pkg.getPackageName().equals(lastPkg3)) {\n if (lastPkg3 != null) {\n try {\n out.endTag(str3, \"pkg\");\n } catch (IOException e3) {\n e = e3;\n try {\n Slog.w(TAG, \"Failed to write state, restoring backup.\", e);\n this.mFile.failWrite(stream);\n if (stream != null) {\n }\n } catch (Throwable th6) {\n th = th6;\n if (stream != null) {\n try {\n stream.close();\n } catch (IOException e4) {\n Slog.w(TAG, \"Failed to close stream: \" + e4.getMessage());\n }\n }\n throw th;\n }\n } catch (Throwable th7) {\n th = th7;\n if (stream != null) {\n }\n throw th;\n }\n }\n lastPkg3 = pkg.getPackageName();\n out.startTag(str3, \"pkg\");\n out.attribute(str3, \"n\", lastPkg3);\n }\n out.startTag(str3, WatchlistLoggingHandler.WatchlistEventKeys.UID);\n out.attribute(str3, \"n\", Integer.toString(pkg.getUid()));\n synchronized (this) {\n try {\n Ops ops = getOpsRawLocked(pkg.getUid(), pkg.getPackageName(), z, z);\n if (ops != null) {\n try {\n out.attribute(str3, \"p\", Boolean.toString(ops.isPrivileged));\n } catch (Throwable th8) {\n th2 = th8;\n }\n } else {\n out.attribute(str3, \"p\", Boolean.toString(z));\n }\n } catch (Throwable th9) {\n th2 = th9;\n while (true) {\n try {\n break;\n } catch (Throwable th10) {\n th2 = th10;\n }\n }\n throw th2;\n }\n }\n List<AppOpsManager.OpEntry> ops2 = pkg.getOps();\n int j2 = z;\n while (j2 < ops2.size()) {\n AppOpsManager.OpEntry op2 = ops2.get(j2 == true ? 1 : 0);\n out.startTag(str3, \"op\");\n out.attribute(str3, \"n\", Integer.toString(op2.getOp()));\n if (op2.getMode() != AppOpsManager.opToDefaultMode(op2.getOp())) {\n out.attribute(str3, \"m\", Integer.toString(op2.getMode()));\n }\n LongSparseArray keys = op2.collectKeys();\n if (keys == null) {\n allOps2 = allOps4;\n lastPkg = lastPkg3;\n } else if (keys.size() <= 0) {\n allOps2 = allOps4;\n lastPkg = lastPkg3;\n } else {\n int keyCount = keys.size();\n int k = 0;\n while (k < keyCount) {\n long key = keys.keyAt(k);\n int uidState2 = AppOpsManager.extractUidStateFromKey(key);\n int flags = AppOpsManager.extractFlagsFromKey(key);\n long accessTime = op2.getLastAccessTime(uidState2, uidState2, flags);\n long rejectTime = op2.getLastRejectTime(uidState2, uidState2, flags);\n long accessDuration = op2.getLastDuration(uidState2, uidState2, flags);\n String proxyPkg2 = op2.getProxyPackageName(uidState2, flags);\n int proxyUid = op2.getProxyUid(uidState2, flags);\n if (accessTime > 0 || rejectTime > 0 || accessDuration > 0) {\n proxyPkg = proxyPkg2;\n } else {\n proxyPkg = proxyPkg2;\n if (proxyPkg == null && proxyUid < 0) {\n allOps3 = allOps4;\n lastPkg2 = lastPkg3;\n k++;\n allOps4 = allOps3;\n lastPkg3 = lastPkg2;\n }\n }\n allOps3 = allOps4;\n lastPkg2 = lastPkg3;\n try {\n out.startTag(null, \"st\");\n out.attribute(null, \"n\", Long.toString(key));\n if (accessTime > 0) {\n out.attribute(null, \"t\", Long.toString(accessTime));\n }\n if (rejectTime > 0) {\n out.attribute(null, \"r\", Long.toString(rejectTime));\n }\n if (accessDuration > 0) {\n out.attribute(null, \"d\", Long.toString(accessDuration));\n }\n if (proxyPkg != null) {\n out.attribute(null, \"pp\", proxyPkg);\n }\n if (proxyUid >= 0) {\n out.attribute(null, \"pu\", Integer.toString(proxyUid));\n }\n out.endTag(null, \"st\");\n k++;\n allOps4 = allOps3;\n lastPkg3 = lastPkg2;\n } catch (IOException e5) {\n e = e5;\n Slog.w(TAG, \"Failed to write state, restoring backup.\", e);\n this.mFile.failWrite(stream);\n if (stream != null) {\n }\n }\n }\n allOps2 = allOps4;\n lastPkg = lastPkg3;\n out.endTag(null, \"op\");\n allOps4 = allOps2;\n lastPkg3 = lastPkg;\n str3 = null;\n j2++;\n }\n out.endTag(null, \"op\");\n allOps4 = allOps2;\n lastPkg3 = lastPkg;\n str3 = null;\n j2++;\n }\n allOps = allOps4;\n out.endTag(null, WatchlistLoggingHandler.WatchlistEventKeys.UID);\n lastPkg3 = lastPkg3;\n }\n i2++;\n allOps4 = allOps;\n str3 = null;\n z = false;\n }\n if (lastPkg3 != null) {\n out.endTag(null, \"pkg\");\n }\n }\n out.endTag(null, \"app-ops\");\n out.endDocument();\n this.mFile.finishWrite(stream);\n out.flush();\n if (stream != null) {\n try {\n stream.close();\n } catch (IOException e6) {\n str2 = TAG;\n str = \"Failed to close stream: \" + e6.getMessage();\n }\n }\n } catch (IOException e7) {\n e = e7;\n Slog.w(TAG, \"Failed to write state, restoring backup.\", e);\n this.mFile.failWrite(stream);\n if (stream != null) {\n try {\n stream.close();\n } catch (IOException e8) {\n str2 = TAG;\n str = \"Failed to close stream: \" + e8.getMessage();\n }\n }\n } catch (Throwable th11) {\n th = th11;\n if (stream != null) {\n }\n throw th;\n }\n } catch (IOException e9) {\n Slog.w(TAG, \"Failed to write state: \" + e9);\n return;\n }\n }\n Slog.w(str2, str);\n }", "protected void openFiles() {\n\t\tthis.container = fso.openFile(prefix+EXTENSIONS[CTR_FILE],\"rw\");\n\t\tthis.metaData = fso.openFile(prefix+EXTENSIONS[MTD_FILE], \"rw\");\n\t\tthis.reservedBitMap = fso.openFile(prefix+EXTENSIONS[RBM_FILE], \"rw\");\n\t\tthis.updatedBitMap = fso.openFile(prefix+EXTENSIONS[UBM_FILE], \"rw\");\n\t\tthis.freeList = fso.openFile(prefix+EXTENSIONS[FLT_FILE], \"rw\");\n\t}", "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "public static void status() {\n Set branchSet = commitPointers.readBranches().keySet();\n ArrayList<String> sortedBranches = (ArrayList) branchSet.stream().sorted().collect(Collectors.toList());\n String currBranch = commitPointers.readHeadCommit()[0];\n System.out.println(\"=== Branches ===\");\n for (String branch: sortedBranches) {\n if (currBranch.equals(branch)) {\n System.out.println(\"*\" + currBranch);\n } else {\n System.out.println(branch);\n }\n }\n stagingArea = Utils.readObject(STAGING_FILE, HashMap.class);\n\n ArrayList<String> sortedStaged = (ArrayList) stagingArea.keySet().stream().sorted().collect(Collectors.toList());\n System.out.println();\n System.out.println(\"=== Staged Files ===\");\n for (String staged : sortedStaged) {\n System.out.println(staged);\n }\n\n System.out.println();\n System.out.println(\"=== Removed Files ===\");\n stagingRemoveArea = Utils.readObject(STAGING_REMOVE_FILE, HashMap.class);\n ArrayList<String> sortedRemoved = (ArrayList) stagingRemoveArea.keySet().stream().sorted().collect(Collectors.toList());\n for (String removed : sortedRemoved) {\n System.out.println(removed);\n }\n System.out.println();\n\n System.out.println(\"=== Modifications Not Staged For Commit ===\");\n\n Commit Head = Utils.readObject(Utils.join(Commit.COMMIT_FOLDER, commitPointers.readHeadCommit()[1] + \".txt\"), Commit.class);\n //File blobs contains a SHAID + file name\n\n HashMap<String, String> modUntracked = new HashMap<>();\n\n //iterates through head Blobs\n for (HashMap.Entry<String, String> headfileBlob : Head.fileBlobs.entrySet()) {\n\n File cwdBFile = Utils.join(CWD, headfileBlob.getKey());\n\n if (!cwdBFile.exists() && !stagingRemoveArea.containsKey(headfileBlob.getKey())) {\n modUntracked.put(headfileBlob.getKey(), \"(deleted)\");\n }\n else if (cwdBFile.exists()){\n\n Blob tempBlob = new Blob(headfileBlob.getKey(), cwdBFile);\n String tempBlobId = Utils.sha1(Utils.serialize(tempBlob));\n\n\n if(!tempBlobId.equals(headfileBlob.getValue())) {\n //if not in staging area\n if (!stagingArea.containsKey(headfileBlob.getKey())) {\n modUntracked.put(headfileBlob.getKey(), \"(modified)\");\n }\n //TODO: IS THIS PART NECCESARY?\n else if (stagingArea.containsKey(headfileBlob.getKey()) && !stagingArea.get(headfileBlob.getKey()).equals(headfileBlob.getValue())) {\n modUntracked.put(headfileBlob.getKey(), \"(modified)\");\n }\n }\n }\n }\n\n ArrayList<String> sortedModNames = (ArrayList) modUntracked.keySet().stream().sorted().collect(Collectors.toList());\n for (String modFileName : sortedModNames){\n System.out.println(modFileName + \" \" + modUntracked.get(modFileName));\n }\n System.out.println();\n\n\n\n ArrayList<String> untracked = new ArrayList<>();\n System.out.println(\"=== Untracked Files ===\");\n for (String cwdfile : CWD.list()) {\n if(!cwdfile.equals(\".gitlet\")) {\n File currfile = Utils.join(CWD, cwdfile);\n if (currfile.exists() && !Head.fileBlobs.containsKey(cwdfile)) {\n untracked.add(cwdfile);\n }\n }\n }\n\n untracked = (ArrayList) untracked.stream().sorted().collect(Collectors.toList());\n\n for (String untrackedName : untracked){\n System.out.println(untrackedName);\n }\n }", "public void commitChanges(){\r\n try{\r\n //Record the state of unfinished set in unfinished.dat\r\n unfinishedFileOutputStream = new FileOutputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetOutputStream = new ObjectOutputStream(unfinishedFileOutputStream);\r\n unfinishedSetOutputStream.writeObject(unfinished);\r\n unfinishedSetOutputStream.close();\r\n unfinishedFileOutputStream.close();\r\n\r\n //Record the state of finished list in finished.dat\r\n finishedFileOutputStream = new FileOutputStream(FINISHED_FILE_PATH);\r\n finishedListOutputStream = new ObjectOutputStream(finishedFileOutputStream);\r\n finishedListOutputStream.writeObject(finished);\r\n finishedListOutputStream.close();\r\n finishedFileOutputStream.close();\r\n\r\n //Record the state of activities list in activities.dat\r\n activitiesFileOutputStream = new FileOutputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListOutputStream = new ObjectOutputStream(activitiesFileOutputStream);\r\n activitiesListOutputStream.writeObject(activities);\r\n activitiesListOutputStream.close();\r\n activitiesFileOutputStream.close();\r\n }\r\n catch(Exception e){\r\n System.out.println(\"Stress in commiting changes: \" + e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }", "public void init() {\n File file = new File(FILE);\n if (!file.exists()) {\n File file2 = new File(file.getParent());\n if (!file2.exists()) {\n file2.mkdirs();\n }\n }\n if (this.accessFile == null) {\n try {\n this.accessFile = new RandomAccessFile(FILE, \"rw\");\n } catch (FileNotFoundException unused) {\n }\n }\n }", "private IndexingManager() {\n Provider provider = new BouncyCastleProvider();\n Security.addProvider(provider);\n utility = Database_Utility.getInstance();\n conn = utility.getConnection();\n IMbuffer = IndexingManagerBuffer.getInstance();\n\n // This statement is to create purge table.\n\n boolean k = checkTable1(\"PurgeTable\");\n if (!k) {\n utility.createtable2(\"PurgeTable\");\n }\n boolean k1 = checkTable1(\"UserToCertMap\");\n if (!k1) {\n utility.createtable1();\n }\n\n // This statement is to run maintenance thread on loading of class to purge entries whose timer has expired.\n\n //maintenancethread();\n\n // This statement is to run maintenance thread on loading of class to ascertain root nodes.\n\n // maintenancethread1();\n\n // This statement is to run maintenance thread on loading of class to delete entries from purge table.\n\n // maintenancethread2();\n\n }", "public void readState() {\n FileInputStream stream;\n XmlPullParser parser;\n int type;\n int oldVersion = -1;\n synchronized (this.mFile) {\n synchronized (this) {\n try {\n stream = this.mFile.openRead();\n this.mUidStates.clear();\n try {\n parser = Xml.newPullParser();\n parser.setInput(stream, StandardCharsets.UTF_8.name());\n } catch (IllegalStateException e) {\n Slog.w(TAG, \"Failed parsing \" + e);\n if (0 == 0) {\n this.mUidStates.clear();\n }\n stream.close();\n } catch (NullPointerException e2) {\n Slog.w(TAG, \"Failed parsing \" + e2);\n if (0 == 0) {\n this.mUidStates.clear();\n }\n stream.close();\n } catch (NumberFormatException e3) {\n Slog.w(TAG, \"Failed parsing \" + e3);\n if (0 == 0) {\n this.mUidStates.clear();\n }\n stream.close();\n } catch (XmlPullParserException e4) {\n Slog.w(TAG, \"Failed parsing \" + e4);\n if (0 == 0) {\n this.mUidStates.clear();\n }\n stream.close();\n } catch (IOException e5) {\n Slog.w(TAG, \"Failed parsing \" + e5);\n if (0 == 0) {\n this.mUidStates.clear();\n }\n stream.close();\n } catch (IndexOutOfBoundsException e6) {\n Slog.w(TAG, \"Failed parsing \" + e6);\n if (0 == 0) {\n this.mUidStates.clear();\n }\n stream.close();\n } catch (Throwable th) {\n if (0 == 0) {\n this.mUidStates.clear();\n }\n try {\n stream.close();\n } catch (IOException e7) {\n }\n throw th;\n }\n } catch (FileNotFoundException e8) {\n Slog.i(TAG, \"No existing app ops \" + this.mFile.getBaseFile() + \"; starting empty\");\n return;\n }\n while (true) {\n type = parser.next();\n if (type == 2 || type == 1) {\n break;\n }\n }\n if (type == 2) {\n String versionString = parser.getAttributeValue(null, \"v\");\n if (versionString != null) {\n oldVersion = Integer.parseInt(versionString);\n }\n int outerDepth = parser.getDepth();\n while (true) {\n int type2 = parser.next();\n if (type2 == 1 || (type2 == 3 && parser.getDepth() <= outerDepth)) {\n break;\n } else if (type2 != 3) {\n if (type2 != 4) {\n String tagName = parser.getName();\n if (tagName.equals(\"pkg\")) {\n readPackage(parser);\n } else if (tagName.equals(WatchlistLoggingHandler.WatchlistEventKeys.UID)) {\n readUidOps(parser);\n } else {\n Slog.w(TAG, \"Unknown element under <app-ops>: \" + parser.getName());\n XmlUtils.skipCurrentTag(parser);\n }\n }\n }\n }\n if (1 == 0) {\n this.mUidStates.clear();\n }\n try {\n stream.close();\n } catch (IOException e9) {\n }\n } else {\n throw new IllegalStateException(\"no start tag found\");\n }\n }\n }\n synchronized (this) {\n upgradeLocked(oldVersion);\n }\n }", "public PoseurFileManager()\r\n {\r\n // NOTHING YET\r\n currentFile = null;\r\n currentFileName = null;\r\n saved = true;\r\n poseIO = new PoseIO();\r\n }", "private void initializeEmptyStore() throws IOException\r\n {\r\n this.keyHash.clear();\r\n\r\n if (!dataFile.isEmpty())\r\n {\r\n dataFile.reset();\r\n }\r\n }", "public DFS()\n {\n\n\n writeLock = lock.writeLock();\n readLock = lock.readLock();\n\n recoverINodes();\n\n createDir(\"/\"); // add a root if it does not exist .\n\n }", "private static void initDirectories() {\n String storeName = System.getProperty(USER_DIR)\n + File.separator\n + QVCSConstants.QVCS_META_DATA_DIRECTORY\n + File.separator\n + QVCSConstants.QVCS_FILEID_STORE_NAME\n + \".dat\";\n File storeFile = new File(storeName);\n if (storeFile.exists()) {\n storeFile.delete();\n }\n deleteAuthenticationStore();\n initAuthenticationStore();\n\n deleteRoleProjectViewStore();\n initRoleProjectViewStore();\n\n initProjectProperties();\n }", "private void importState() {\n SpeakerManager s = new SpeakerManager();\n this.speakerManager = s.importState();\n\n RoomManager r = new RoomManager();\n this.roomManager = r.importState();\n\n OrganizerManager o = new OrganizerManager();\n this.organizerManager = o.importState();\n\n EventManager e = new EventManager();\n this.eventManager = e.importState();\n\n ChatManager c = new ChatManager();\n this.chatManager = c.importState();\n\n AttendeeManager a = new AttendeeManager();\n this.attendeeManager = a.importState();\n\n\n }", "StmTransaction() {\n\n // Spin until we get a next rev number and put it in the queue of rev numbers in use w/o concurrent change.\n // (We avoid concurrent change because if another thread bumped the revisions in use, it might also have\n // cleaned up the revision before we said we were using it.)\n while ( true ) {\n long sourceRevNumber = lastCommittedRevisionNumber.get();\n sourceRevisionsInUse.add( sourceRevNumber );\n if ( sourceRevNumber == lastCommittedRevisionNumber.get() ) {\n this.sourceRevisionNumber = sourceRevNumber;\n break;\n }\n sourceRevisionsInUse.remove( sourceRevNumber );\n }\n\n // Use the next negative pending revision number to mark our writes.\n this.targetRevisionNumber = new AtomicLong( lastPendingRevisionNumber.decrementAndGet() );\n\n // Track the versioned items read and written by this transaction.\n this.versionedItemsRead = new HashSet<>();\n this.versionedItemsWritten = new HashSet<>();\n\n // Flag a write conflict as early as possible.\n this.newerRevisionSeen = false;\n\n // Establish a link for putting this transaction in a linked list of completed transactions.\n this.nextTransactionAwaitingCleanUp = new AtomicReference<>( null );\n\n }", "public void ensureOpenFiles()\n throws DataOrderingException;", "@Override\n public void resetStateOfSUT() {\n\n try {\n //FIXME: this fails due to locks on Neo4j. need way to reset it\n //deleteDir(new File(tmpFolder));\n if(!Files.exists(Path.of(tmpFolder))) {\n Files.createDirectories(Path.of(tmpFolder));\n }\n Files.copy(getClass().getClassLoader().getResourceAsStream(\"users.json\"), Path.of(tmpFolder,\"users.json\"), StandardCopyOption.REPLACE_EXISTING);\n Files.copy(getClass().getClassLoader().getResourceAsStream(\"logins.json\"), Path.of(tmpFolder,\"logins.json\"), StandardCopyOption.REPLACE_EXISTING);\n }catch (Exception e){\n throw new RuntimeException(e);\n }\n }", "@Override\n\t\tpublic void open() throws DbException, TransactionAbortedException {\n\t\t\ttplItr = tpls.iterator();\n\t\t}", "private void initialize()\r\n {\r\n this.workspace = null;\r\n this.currentUser = null;\r\n this.created = new Date();\r\n this.securityInfo = null;\r\n }", "public void init() throws IOException {\n setPersistance();\n Commit newCommit = new Commit(\"initial commit\", null);\n String newCommitCode = newCommit.getShaCode();\n File lol = new File(Main.ALL_COMMITS, newCommitCode);\n lol.createNewFile();\n if (lol.exists()) {\n Utils.writeObject(lol, newCommit);\n }\n Utils.writeObject(MASTERBRANCH, newCommitCode);\n Utils.writeObject(HEADFILE, newCommitCode);\n Utils.writeObject(HEADNAME, MASTERBRANCH.getName());\n }", "protected void open () {\n\t\tif (this.container==null)\n\t\t\ttry {\n\t\t\t\tmigrateOnDemand();\n\t\t\t\topenFiles();\n\t\t\t\tthis.blockSize = metaData.readInt();\n\t\t\t\tthis.size = metaData.readInt();\n\t\t\t}\n\t\t\tcatch (IOException ie) {\n\t\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t\t}\n\t}", "protected FileDepositorImpl() {\n\t}", "public ADisk(boolean format)\n { \n\t // build lock\n\t this.setFailureProb(0);\n ADisk_lock = new SimpleLock();\n waitLock = new SimpleLock();\n atranslist = new ActiveTransactionList();\n //initialize lists and logs\n wblist = new WriteBackList(this);\n commitDone = waitLock.newCondition();\n writebackDone = waitLock.newCondition();\n readDone = waitLock.newCondition();\n logReadDone = waitLock.newCondition();\n wbbarrier = waitLock.newCondition();\n commitBarrierSector = -1;\n commitBarrierTid = -1;\n writebackBarrierSector = -1;\n writebackBarrierTid = -1;\n readSector = -1;\n readTid = -1;\n logReadSector = -1;\n logReadTid = -1;\n wbbarrierSec = -1;\n wbbarrierTag = -1;\n \n\t d = null;\n\t try{\n\t d = new Disk(this);\n\t }\n\t catch(FileNotFoundException fnf){\n\t System.out.println(\"Unable to open disk file\");\n\t System.exit(-1);\n\t }\n\t \n\t //create writeback thread\n\t writebackthread = new WriteBackThread();\n try {\n\t if (format == true){\n\t \t lstatus = new LogStatus(this, false);\n\t \t \n\t \t ///wipe the disk\n\t \t /*byte[] blank = new byte[Disk.SECTOR_SIZE];\n\t \t for(int i = 0; i < Disk.SECTOR_SIZE; i++)\n\t \t \tblank[i] = 0x00;\n\t \t for(int i = 0; i < this.getNSectors(); i++){\n\t \t \tif(i == this.getNSectors() - 1){\n\t \t \t\tthis.commitBarrierSector = i;\n\t \t \t\tthis.commitBarrierTid = Disk.SECTOR_SIZE + 10;\n\t \t \t\td.addBarrier(); // must wait for the entire wipe write to be on disk\n\t \t \t}\n\t \t \td.startRequest(Disk.WRITE, Disk.SECTOR_SIZE+10, i, blank);\n\t \t }\n \t \tcommitWait();*/\n\t \t // We decided not to wipe the disk because the instructions were vague and it seems insanely inefficient to wipe the disk and there doesnt seem to be reason to wipe it. It also makes our tests run very slow. \n\t } \n\t else {\n\t \t //RECOVERY\n\t \t lstatus = new LogStatus(this, true);\n\t \t byte[] next = lstatus.recoverNext();\n\t while(next != null){\n\t \t Transaction temp = Transaction.parseLogBytesDebug(next, this);\n\t \t wblist.addCommitted(temp);\t \n\t \t next = lstatus.recoverNext();\n\t } \n\t }\n }\n catch(IOException e){\n\t\t\tSystem.out.println(\"IO exception\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n }\n catch(IllegalArgumentException e){\n\t\t\tSystem.out.println(\"Illegal Argument exception\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n }\n \n }", "private void clear_to_state () {\n\n\t\t// Structures not valid if we don't have a forecast\n\n\t\tif (modstate < MODSTATE_FORECAST) {\n\t\t\tgenericForecast = null;\n\t\t\tseqSpecForecast = null;\n\t\t\tbayesianForecast = null;\n\t\t}\n\n\t\t// Structures not valid if we don't have parameers\n\n\t\tif (modstate < MODSTATE_PARAMETERS) {\n\t\t\tcur_model = null;\n\t\t\tbayesianModel = null;\n\t\t}\n\n\t\t// Structures not valid if we don't have a catalog\n\n\t\tif (modstate < MODSTATE_CATALOG) {\n\t\t\tfcmain = null;\n\t\t\taafs_fcparams = null;\n\t\t\tfetch_fcparams = null;\n\t\t\tcustom_search_region = null;\n\t\t\tanalyst_inj_text = null;\n\t\t\thas_fetched_catalog = false;\n\n\t\t\tcur_mainshock = null;\n\t\t\tcur_aftershocks = null;\n\t\t\tgenericModel = null;\n\t\t\taftershockMND = null;\n\t\t\tmnd_mmaxc = 0.0;\n\t\t}\n\n\t\treturn;\n\t}", "@PreDestroy\n public void saveStates() {\n if(getShopId() != 0) {\n log.info(\"Interrupt matching for shop {} during phase {} at {} \", getShopId(), getPhase(), new Date());\n getRemainingStates().add(new State(getShopId(), getPhase(), getPictureIds()));\n }\n getMatcherStateRepository().saveAllStates(getRemainingStates());\n }", "void _preCloseFD(FD fd) {\n Seekable s = fd.seekable();\n if (s == null) return;\n\n try {\n for (int i=0; i < gs.locks.length; i++) {\n Seekable.Lock l = gs.locks[i];\n if (l == null) continue;\n if (s.equals(l.seekable()) && l.getOwner() == this) {\n l.release();\n gs.locks[i] = null;\n }\n }\n } catch (IOException e) { throw new RuntimeException(e); }\n }", "public static void init()\n\t{\n\t\tusername2accesses.clear();\n\t\t//--- adds info.json in ./Home/Administrator for the system admin ---//\n\t\tfinal String adminAccessPath = Hierarchies.getSectionDir() + \"/\" + Hierarchies.getInfoFileName() + \".\" + Directories.getFileExt();\n\t\tfinal File adminAccessFile = new File(adminAccessPath);\n\t\tif (!adminAccessFile.exists())\n\t\t{\n\t\t\tfinal Access[] accesses = new Access[1];\n\t\t\taccesses[0] = new Access(\"admin\", Role.ADMINISTRATOR, null);\n\t\t\tfinal HierarchyItem hierarchyItem = new HierarchyItem(null, null, null, accesses);\n\t\t\tfinal String hierarchyItemAsJson = new Gson().toJson(hierarchyItem);\n\t\t\tFileIO.writeToFile(adminAccessPath, hierarchyItemAsJson);\n\t\t}\n\t\t//--- reads all JSON files recursively in ./Home/Administrator ---//\n\t\t//--- contents of JSON files will be processed to be cached in hash map username2accesses ---//\n\t\tfinal File file = new File(Hierarchies.getSectionDir());\n\t\tfinal Collection<File> jsonFiles = FileUtils.listFiles(file, new String[]{Directories.getFileExt()}, true);\n\t\tfor (File infoFile : jsonFiles) manage(infoFile, Op.STORE);\n\t}", "private void setFileClosed() {\n \topenFiles.pop();\n \trelativeNames.pop();\n }", "private Client() {\n solution_set = new HashSet<>();\n contentsMap = new HashMap<>();\n current_state = new HashSet<>();\n next_state = new HashSet<>();\n }", "protected IBDS()\r\n {\r\n \tthis.modifyBuffer = new StringBuffer(300); // all update operations belong to this only\r\n this.nodeList = new ArrayList<int []>(50);\r\n this.lastUpdated = System.nanoTime();\r\n //this.objectArray = new ArrayList();\r\n }", "protected void initStorageDevices() throws OBStorageException, OBException {\r\n OBStorageConfig conf = new OBStorageConfig();\r\n conf.setTemp(false);\r\n conf.setDuplicates(false);\r\n conf.setBulkMode(! isFrozen());\r\n conf.setIndexType(IndexType.HASH);\r\n this.A = fact.createOBStoreLong(\"A\", conf );\r\n if (!this.isFrozen()) {\r\n conf = new OBStorageConfig();\r\n conf.setTemp(false);\r\n conf.setDuplicates(false);\r\n conf.setBulkMode(false);\r\n conf.setRecordSize(fixedRecordSize);\r\n if(fixedRecord){\r\n conf.setIndexType(IndexType.FIXED_RECORD);\r\n }\r\n this.preFreeze = fact.createOBStore(\"pre\", conf);\r\n }\r\n }", "private void initializeStoreFromPersistedData() throws IOException\r\n {\r\n loadKeys();\r\n\r\n if (keyHash.isEmpty())\r\n {\r\n dataFile.reset();\r\n }\r\n else\r\n {\r\n final boolean isOk = checkKeyDataConsistency(false);\r\n if (!isOk)\r\n {\r\n keyHash.clear();\r\n keyFile.reset();\r\n dataFile.reset();\r\n log.warn(\"{0}: Corruption detected. Resetting data and keys files.\", logCacheName);\r\n }\r\n else\r\n {\r\n synchronized (this)\r\n {\r\n startupSize = keyHash.size();\r\n }\r\n }\r\n }\r\n }", "@Override\n\tpublic synchronized void initialize() {\n\t\tFile[] files = mRootDirectory.listFiles();\n\t\tif (files == null) {\n\t\t\treturn;\n\t\t}\n\t\tfor (File file : files) {\n\t\t\tFileInputStream fis = null;\n\t\t\ttry {\n\t\t\t\tfis = new FileInputStream(file);\n\t\t\t\tCacheHeader entry = CacheHeader.readHeader(fis);\n\t\t\t\tentry.size = file.length();\n\t\t\t\tputEntry(entry.key, entry);\n\t\t\t} catch (IOException e) {\n\t\t\t\tif (file != null) {\n\t\t\t\t\tfile.delete();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (fis != null) {\n\t\t\t\t\t\tfis.close();\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ignored) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n protected void init()\n throws ReadWriteException\n {\n // 商品マスタ\n _ItemHandler = new ItemHandler(getConnection());\n _ItemKey = new ItemSearchKey();\n\n // 商品固定棚マスタ\n _fixedHandler = new FixedLocateInfoHandler(getConnection());\n _fixedKey = new FixedLocateInfoSearchKey();\n\n // 入荷予定情報\n _recHandler = new ReceivingPlanHandler(getConnection());\n _recKey = new ReceivingPlanSearchKey();\n\n // 入庫予定情報\n _stHandler = new StoragePlanHandler(getConnection());\n _stKey = new StoragePlanSearchKey();\n\n // 出庫予定情報\n _retHandler = new RetrievalPlanHandler(getConnection());\n _retKey = new RetrievalPlanSearchKey();\n\n // 入出庫作業情報\n _wIHandler = new WorkInfoHandler(getConnection());\n _wIKey = new WorkInfoSearchKey();\n\n // 出荷予定情報\n _shipHandler = new ShipPlanHandler(getConnection());\n _shipKey = new ShipPlanSearchKey();\n\n // 移動作業情報\n _moveHandler = new MoveWorkInfoHandler(getConnection());\n _moveKey = new MoveWorkInfoSearchKey();\n\n // 棚卸作業情報\n _invHandler = new InventWorkInfoHandler(getConnection());\n _invKey = new InventWorkInfoSearchKey();\n\n // 在庫情報\n _stkHandler = new StockHandler(getConnection());\n _stkKey = new StockSearchKey();\n\n // 作業単位数マスタ\n _wkUnitHandler = new WorkingUnitHandler(getConnection());\n _wkUnitKey = new WorkingUnitSearchKey();\n\n // AS/RSソフトゾーン情報\n _softHandler = new SoftZoneHandler(getConnection());\n _softKey = new SoftZoneSearchKey();\n }", "protected static void createFiles(SessionState state)\n\t{\n\t\tSet alerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n\t\tif(alerts == null)\n\t\t{\n\t\t\talerts = new HashSet();\n\t\t\tstate.setAttribute(STATE_CREATE_ALERTS, alerts);\n\t\t}\n\n\t\tMap current_stack_frame = peekAtStack(state);\n\n\t\tString collectionId = (String) current_stack_frame.get(STATE_STACK_CREATE_COLLECTION_ID);\n\t\tif(collectionId == null || collectionId.trim().length() == 0)\n\t\t{\n\t\t\tcollectionId = (String) state.getAttribute(STATE_CREATE_COLLECTION_ID);\n\t\t\tif(collectionId == null || collectionId.trim().length() == 0)\n\t\t\t{\n\t\t\t\tcollectionId = ContentHostingService.getSiteCollection(ToolManager.getCurrentPlacement().getContext());\n\t\t\t}\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_COLLECTION_ID, collectionId);\n\t\t}\n\n\t\tList new_items = (List) current_stack_frame.get(STATE_STACK_CREATE_ITEMS);\n\t\tif(new_items == null)\n\t\t{\n\t\t\tString defaultCopyrightStatus = (String) state.getAttribute(DEFAULT_COPYRIGHT);\n\t\t\tif(defaultCopyrightStatus == null || defaultCopyrightStatus.trim().equals(\"\"))\n\t\t\t{\n\t\t\t\tdefaultCopyrightStatus = ServerConfigurationService.getString(\"default.copyright\");\n\t\t\t\tstate.setAttribute(DEFAULT_COPYRIGHT, defaultCopyrightStatus);\n\t\t\t}\n\n\t\t\tString encoding = (String) state.getAttribute(STATE_ENCODING);\n\t\t\tBoolean preventPublicDisplay = (Boolean) state.getAttribute(STATE_PREVENT_PUBLIC_DISPLAY);\n\t\t\t\n\t\t\tTime defaultRetractDate = (Time) state.getAttribute(STATE_DEFAULT_RETRACT_TIME);\n\t\t\tif(defaultRetractDate == null)\n\t\t\t{\n\t\t\t\tdefaultRetractDate = TimeService.newTime();\n\t\t\t\tstate.setAttribute(STATE_DEFAULT_RETRACT_TIME, defaultRetractDate);\n\t\t\t}\n\n\t\t\tnew_items = newEditItems(collectionId, TYPE_FOLDER, encoding, defaultCopyrightStatus, preventPublicDisplay.booleanValue(), defaultRetractDate, CREATE_MAX_ITEMS);\n\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_ITEMS, new_items);\n\n\t\t}\n\t\tInteger number = (Integer) current_stack_frame.get(STATE_STACK_CREATE_NUMBER);\n\t\tif(number == null)\n\t\t{\n\t\t\tnumber = (Integer) state.getAttribute(STATE_CREATE_NUMBER);\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_NUMBER, number);\n\t\t}\n\t\tif(number == null)\n\t\t{\n\t\t\tnumber = new Integer(1);\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_NUMBER, number);\n\t\t}\n\n\t\tint numberOfItems = 1;\n\t\tnumberOfItems = number.intValue();\n\t\touterloop: for(int i = 0; i < numberOfItems; i++)\n\t\t{\n\t\t\tEditItem item = (EditItem) new_items.get(i);\n\t\t\tif(item.isBlank())\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tResourcePropertiesEdit resourceProperties = ContentHostingService.newResourceProperties ();\n\n\t\t\tresourceProperties.addProperty (ResourceProperties.PROP_DISPLAY_NAME, item.getName());\n\t\t\tresourceProperties.addProperty (ResourceProperties.PROP_DESCRIPTION, item.getDescription());\n\n\t\t\tresourceProperties.addProperty (ResourceProperties.PROP_COPYRIGHT, item.getCopyrightInfo());\n\t\t\tresourceProperties.addProperty(ResourceProperties.PROP_COPYRIGHT_CHOICE, item.getCopyrightStatus());\n\t\t\tif (item.hasCopyrightAlert())\n\t\t\t{\n\t\t\t\tresourceProperties.addProperty (ResourceProperties.PROP_COPYRIGHT_ALERT, Boolean.toString(item.hasCopyrightAlert()));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tresourceProperties.removeProperty (ResourceProperties.PROP_COPYRIGHT_ALERT);\n\t\t\t}\n\t\t\t\n\t\t\tBasicRightsAssignment rightsObj = item.getRights();\n\t\t\trightsObj.addResourceProperties(resourceProperties);\n\n\t\t\tresourceProperties.addProperty(ResourceProperties.PROP_IS_COLLECTION, Boolean.FALSE.toString());\n\t\t\tif(item.isHtml())\n\t\t\t{\n\t\t\t\tresourceProperties.addProperty(ResourceProperties.PROP_CONTENT_ENCODING, \"UTF-8\");\n\t\t\t}\n\t\t\tList metadataGroups = (List) state.getAttribute(STATE_METADATA_GROUPS);\n\t\t\tsaveMetadata(resourceProperties, metadataGroups, item);\n\t\t\tString filename = Validator.escapeResourceName(item.getFilename().trim());\n\t\t\tif(\"\".equals(filename))\n\t\t\t{\n\t\t\t\tfilename = Validator.escapeResourceName(item.getName().trim());\n\t\t\t}\n\n\n\t\t\tresourceProperties.addProperty(ResourceProperties.PROP_ORIGINAL_FILENAME, filename);\n\t\t\t\n\t\t\tSortedSet groups = new TreeSet(item.getEntityGroupRefs());\n\t\t\tgroups.retainAll(item.getAllowedAddGroupRefs());\n\t\t\t\n\t\t\tboolean hidden = false;\n\n\t\t\tTime releaseDate = null;\n\t\t\tTime retractDate = null;\n\t\t\t\n\t\t\tif(ContentHostingService.isAvailabilityEnabled())\n\t\t\t{\n\t\t\t\thidden = item.isHidden();\n\t\t\t\t\n\t\t\t\tif(item.useReleaseDate())\n\t\t\t\t{\n\t\t\t\t\treleaseDate = item.getReleaseDate();\n\t\t\t\t}\n\t\t\t\tif(item.useRetractDate())\n\t\t\t\t{\n\t\t\t\t\tretractDate = item.getRetractDate();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tContentResource resource = ContentHostingService.addResource (filename,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcollectionId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMAXIMUM_ATTEMPTS_FOR_UNIQUENESS,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\titem.getMimeType(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\titem.getContent(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tresourceProperties,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgroups,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thidden,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treleaseDate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tretractDate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\titem.getNotification());\n\n\t\t\t\titem.setAdded(true);\n\t\t\t\t\n\t\t\t\tBoolean preventPublicDisplay = (Boolean) state.getAttribute(STATE_PREVENT_PUBLIC_DISPLAY);\n\t\t\t\tif(preventPublicDisplay == null)\n\t\t\t\t{\n\t\t\t\t\tpreventPublicDisplay = Boolean.FALSE;\n\t\t\t\t\tstate.setAttribute(STATE_PREVENT_PUBLIC_DISPLAY, preventPublicDisplay);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!preventPublicDisplay.booleanValue() && item.isPubview())\n\t\t\t\t{\n\t\t\t\t\tContentHostingService.setPubView(resource.getId(), true);\n\t\t\t\t}\n\n\t\t\t\tString mode = (String) state.getAttribute(STATE_MODE);\n\t\t\t\tif(MODE_HELPER.equals(mode))\n\t\t\t\t{\n\t\t\t\t\tString helper_mode = (String) state.getAttribute(STATE_RESOURCES_HELPER_MODE);\n\t\t\t\t\tif(helper_mode != null && MODE_ATTACHMENT_NEW_ITEM_INIT.equals(helper_mode))\n\t\t\t\t\t{\n\t\t\t\t\t\t// add to the attachments vector\n\t\t\t\t\t\tList attachments = EntityManager.newReferenceList();\n\t\t\t\t\t\tReference ref = EntityManager.newReference(ContentHostingService.getReference(resource.getId()));\n\t\t\t\t\t\tattachments.add(ref);\n\t\t\t\t\t\tcleanupState(state);\n\t\t\t\t\t\tstate.setAttribute(STATE_ATTACHMENTS, attachments);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tObject attach_links = current_stack_frame.get(STATE_ATTACH_LINKS);\n\t\t\t\t\t\tif(attach_links == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tattach_links = state.getAttribute(STATE_ATTACH_LINKS);\n\t\t\t\t\t\t\tif(attach_links != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcurrent_stack_frame.put(STATE_ATTACH_LINKS, attach_links);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(attach_links == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tattachItem(resource.getId(), state);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tattachLink(resource.getId(), state);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(PermissionException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"notpermis12\"));\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(IdInvalidException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"title\") + \" \" + e.getMessage ());\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(IdLengthException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"toolong\") + \" \" + e.getMessage());\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(IdUniquenessException e)\n\t\t\t{\n\t\t\t\talerts.add(\"Could not add this item to this folder\");\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(InconsistentException e)\n\t\t\t{\n\t\t\t\talerts.add(RESOURCE_INVALID_TITLE_STRING);\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(OverQuotaException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"overquota\"));\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(ServerOverloadException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"failed\"));\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(RuntimeException e)\n\t\t\t{\n\t\t\t\tlogger.warn(\"ResourcesAction.createFiles ***** Unknown Exception ***** \" + e.getMessage());\n\t\t\t\talerts.add(rb.getString(\"failed\"));\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\n\t\t}\n\t\tSortedSet currentMap = (SortedSet) state.getAttribute(STATE_EXPANDED_COLLECTIONS);\n\t\tif(currentMap == null)\n\t\t{\n\t\t\tcurrentMap = new TreeSet();\n\t\t}\n\t\tcurrentMap.add(collectionId);\n\t\tstate.setAttribute(STATE_EXPANDED_COLLECTIONS, currentMap);\n\n\t\t// add this folder id into the set to be event-observed\n\t\taddObservingPattern(collectionId, state);\n\t\t\n\t\tstate.setAttribute(STATE_CREATE_ALERTS, alerts);\n\n\t}", "App () throws Exception {\n timelines = new LinkedList<>();\n deleteElements = new LinkedList<>();\n file.createNewFile();\n }", "static private void cleanupState(SessionState state)\n\t{\n\t\tstate.removeAttribute(STATE_FROM_TEXT);\n\t\tstate.removeAttribute(STATE_HAS_ATTACHMENT_BEFORE);\n\t\tstate.removeAttribute(STATE_ATTACH_SHOW_DROPBOXES);\n\t\tstate.removeAttribute(STATE_ATTACH_COLLECTION_ID);\n\n\t\tstate.removeAttribute(COPYRIGHT_FAIRUSE_URL);\n\t\tstate.removeAttribute(COPYRIGHT_NEW_COPYRIGHT);\n\t\tstate.removeAttribute(COPYRIGHT_SELF_COPYRIGHT);\n\t\tstate.removeAttribute(COPYRIGHT_TYPES);\n\t\tstate.removeAttribute(DEFAULT_COPYRIGHT_ALERT);\n\t\tstate.removeAttribute(DEFAULT_COPYRIGHT);\n\t\tstate.removeAttribute(STATE_EXPANDED_COLLECTIONS);\n\t\tstate.removeAttribute(STATE_EXPANDED_FOLDER_SORT_MAP);\n\t\tstate.removeAttribute(STATE_FILE_UPLOAD_MAX_SIZE);\n\t\tstate.removeAttribute(NEW_COPYRIGHT_INPUT);\n\t\tstate.removeAttribute(STATE_COLLECTION_ID);\n\t\tstate.removeAttribute(STATE_COLLECTION_PATH);\n\t\tstate.removeAttribute(STATE_CONTENT_SERVICE);\n\t\tstate.removeAttribute(STATE_CONTENT_TYPE_IMAGE_SERVICE);\n\t\t//state.removeAttribute(STATE_STACK_EDIT_INTENT);\n\t\tstate.removeAttribute(STATE_EXPAND_ALL_FLAG);\n\t\tstate.removeAttribute(STATE_HELPER_NEW_ITEMS);\n\t\tstate.removeAttribute(STATE_HELPER_CHANGED);\n\t\tstate.removeAttribute(STATE_HOME_COLLECTION_DISPLAY_NAME);\n\t\tstate.removeAttribute(STATE_HOME_COLLECTION_ID);\n\t\tstate.removeAttribute(STATE_LIST_SELECTIONS);\n\t\tstate.removeAttribute(STATE_MY_COPYRIGHT);\n\t\tstate.removeAttribute(STATE_NAVIGATION_ROOT);\n\t\tstate.removeAttribute(STATE_PASTE_ALLOWED_FLAG);\n\t\tstate.removeAttribute(STATE_SELECT_ALL_FLAG);\n\t\tstate.removeAttribute(STATE_SHOW_ALL_SITES);\n\t\tstate.removeAttribute(STATE_SITE_TITLE);\n\t\tstate.removeAttribute(STATE_SORT_ASC);\n\t\tstate.removeAttribute(STATE_SORT_BY);\n\t\tstate.removeAttribute(STATE_STACK_STRUCTOBJ_TYPE);\n\t\tstate.removeAttribute(STATE_STACK_STRUCTOBJ_TYPE_READONLY);\n\t\tstate.removeAttribute(STATE_INITIALIZED);\n\t\tstate.removeAttribute(VelocityPortletPaneledAction.STATE_HELPER);\n\n\t}", "@Override\n public void abortTx() {\n \tfor (VBox vbox : overwrittenAncestorWriteSet) {\n \t // revert the in-place entry that had overwritten\n \t vbox.inplace = vbox.inplace.next;\n \t}\n \n this.orec.version = OwnershipRecord.ABORTED;\n for (OwnershipRecord mergedLinear : linearNestedOrecs) {\n mergedLinear.version = OwnershipRecord.ABORTED;\n }\n \tfor (ParallelNestedTransaction mergedTx : mergedTxs) {\n \t mergedTx.orec.version = OwnershipRecord.ABORTED;\n \t}\n \t\n\t// give the read set arrays, which were used exclusively by this nested or its children, back to the thread pool\n\tCons<VBox[]> parentArrays = this.getRWParent().bodiesRead;\n\tCons<VBox[]> myArrays = this.bodiesRead;\n\twhile (myArrays != parentArrays) {\n\t returnToPool(myArrays.first());\n\t myArrays = myArrays.rest();\n\t}\n\t\n \tbodiesRead = null;\n \tboxesWritten = null;\n \tboxesWrittenInPlace = null;\n \tperTxValues = null;\n \toverwrittenAncestorWriteSet = null;\n \tmergedTxs = null;\n \tlinearNestedOrecs = null;\n \tcurrent.set(this.getParent());\n }", "private FileOperations() throws FileNotFoundException {\r\n\t\tbiddingPersistence = new BiddingPersistence(Constants.biddingsFilePath, \r\n\t\t\t\tConstants.indexBiddingsPath);\r\n\t\tusersPersistence = new UsersPersistence(Constants.usersFilePath,\r\n\t\t\t\tConstants.indexUsersPath);\t\t\r\n\t}", "public void postOpenInit() {\n logger = Logger.getLogger(Dataset.class);\n clear();\n for (DataPoint point : persistentData) {\n addPoint(point);\n }\n }", "private void serializeBeforeOpen() {\r\n sr.save(this.path);\r\n }", "private static void init()\n {\n try\n {\n ObjectInputStream ois = \n new ObjectInputStream(new FileInputStream(lexFile));\n lexDB = (HashMap)ois.readObject();\n ois.close();\n } catch (FileNotFoundException e) {\n System.err.println(\"File not found: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } catch (IOException e) {\n System.err.println(\"IO Exception: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } catch (ClassNotFoundException e) {\n System.err.println(\"Class Not Found Exception: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } // catch\n }", "private static void cleanUpGlobalStateAndFileStore() {\n FileUtils.deleteDirectory(Paths.get(GLOBAL_STATE_DIR));\n }", "public void init() {\n \t\n this.onContentPropertyUpdate = new JavaBehaviour(this, \"onContentPropertyUpdate\", Behaviour.NotificationFrequency.TRANSACTION_COMMIT);\n this.beforeDeleteNode = new JavaBehaviour(this, \"beforeDeleteNode\", Behaviour.NotificationFrequency.FIRST_EVENT);\n this.onMoveNode = new JavaBehaviour(this, \"onMoveNode\", Behaviour.NotificationFrequency.TRANSACTION_COMMIT);\n this.onAddAspect = new JavaBehaviour(this, \"onAddAspect\", Behaviour.NotificationFrequency.TRANSACTION_COMMIT);\n \n this.policyComponent.bindClassBehaviour(\n ContentServicePolicies.OnContentPropertyUpdatePolicy.QNAME,\n QName.createQName(\n NamespaceService.CONTENT_MODEL_1_0_URI,\n \"content\"),\n this.onContentPropertyUpdate);\n \n this.policyComponent.bindClassBehaviour(\n NodeServicePolicies.BeforeDeleteNodePolicy.QNAME,\n QName.createQName(\n NamespaceService.CONTENT_MODEL_1_0_URI,\n \"cmobject\"),\n this.beforeDeleteNode);\n \n this.policyComponent.bindClassBehaviour(\n NodeServicePolicies.OnMoveNodePolicy.QNAME,\n QName.createQName(\n NamespaceService.CONTENT_MODEL_1_0_URI,\n \"cmobject\"),\n this.onMoveNode);\n \n this.policyComponent.bindClassBehaviour(\n NodeServicePolicies.OnAddAspectPolicy.QNAME,\n FolderQuotaConstants.ASPECT_FQ_QUOTA,\n this.onAddAspect);\n \n //set up transaction listener to run code after transaction\n this.transactionListener = new FolderSizeTransactionListener();\n \n logger.info(\"[FolderQuota] - Bound FolderQuotaBehaviour\");\n\n }", "public static void init() {\r\n\t\twines = read();\r\n\t\tread_tasteNotes(wines);\r\n\t\tidSorted = duplicate(wines);\r\n\t}", "public void\ninit(SoState state)\n//\n////////////////////////////////////////////////////////////////////////\n{\n flags = 0;\n}", "public static void init() {\n File dir = new File(\".gitlet\");\n if (dir.exists()) {\n System.out.println(\"a gitlet version-control system already exists in the current directory.\");\n return;\n } else {\n dir.mkdir();\n File next = new File(\".gitlet/heads/master.ser\");\n File currentBranch = new File(\".gitlet/current\");\n File heads = new File(\".gitlet/heads\");\n File currentname = new File(\".gitlet/current/master.ser\");\n File staged = new File(\".gitlet/staged\");\n File commits = new File(\".gitlet/commits\");\n File unstaged = new File(\".gitlet/unstaged\");\n File blobs = new File(\".gitlet/blobs\");\n try {\n heads.mkdir();\n staged.mkdir();\n commits.mkdir();\n unstaged.mkdir();\n currentBranch.mkdir();\n blobs.mkdir();\n Commit initial = new Commit(\"initial commit\", null, null);\n FileOutputStream fileOut = new FileOutputStream(next);\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\n objectOut.writeObject(initial);\n Files.copy(next.toPath(), currentname.toPath());\n } catch (IOException e) {\n return;\n }\n }}", "public void init()\r\n {\n readFile(inputFile);\r\n writeInfoFile();\r\n }", "State(Main aMain) {\n\tmain = aMain;\n\tback = Integer.parseInt(main.myProps.getProperty(\"yesterdays\"));\n\tfront = Integer.parseInt(main.myProps.getProperty(\"tomorrows\"));\n\tmaps = new Hashtable();\n availWeath = new Hashtable();\n\n main.myFrw.listen(new MapListener(), ScaledMap.TYPE, null);\n main.myFrw.announce(this);\n stateDoc = Framework.parse(main.myPath + \"state.xml\", \"state\");\n availWeath = loadFromDoc();\n }", "@Override\n protected void doClose() {\n FileUtil.closeSilent(this.in);\n this.recordFactory = null;\n this.geometryFactory = null;\n this.in = null;\n this.recordDefinition = null;\n this.resource = null;\n }", "void removeAllLocks(){\r\n \tpageAccess = new ConcurrentHashMap<String, AccessDetailVO>();\r\n\r\n }", "protected void restoreLastState() {\n\t\tInteger ii = Accessors.INT_ACCESSOR.get(\"numberOfFiles\");\n\t\tif(ii == null)\n\t\t\tii = 0;\n\t\tint jj = 0;\n\t\t\n\t\tFile file;\n\t\twhile(jj < ii) {\n\t\t\tfile = new File(Preference.PREFERENCES_NODE.get(\"editSession\" + ++jj, \"\"));\n\t\t\topen(file);\n\t\t}\n\t}", "public void createDistributedObjectsPolicy(){\n\t\t\n\t\tint size = 0;\n\t\t\n\t\tIterator<CacheObject> cst = candidateStableOnlyList.iterator();\n\t\t\n\t\twhile(cst.hasNext()){\n\t\t\t\n\t\t\tCacheObject ct = cst.next();\n\t\t\t\n\t\t\tIterator<String> it1 = serverList.keySet().iterator();\n\t\t\t\n\t\t\twhile(it1.hasNext()){\n\t\t\t\t\n\t\t\t\tString serverId = it1.next();\n\t\t\t\tHashMap<String, CacheObject> htemp = individualMap.get(serverId); \n\t\t\t\t\n\t\t\t\tif(htemp.containsKey(ct.cacheKey)){\n\t\t\t\t\t\n\t\t\t\t\tInteger sz = serverList.get(serverId);\n\t\t\t\t\t\n\t\t\t\t\tif(sz.intValue() < STABLE_SIZE){\n\t\t\t\t\t\tArrayList<String> lt = new ArrayList<String>();\n\t\t\t\t\t\tlt.add(serverId);\n\t\t\t\t\t\tRuleList rl = new RuleList(serverId, RuleList.MOVE , RuleList.LONG_TTL, lt);\n\t\t\t\t\t\tListKey lk = new ListKey();\n\t\t\t\t\t\tlk.addtoListKey(ct.cacheKey);\n\t\t\t\t\t\tASPolicyMap.get(serverId).addNewPolicy(lk, rl);\n\t\t\t\t\t\tsz = sz + ct.size;\n\t\t\t\t\t\tsize += ct.size;\n\t\t\t\t\t\tserverList.put(serverId, sz);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tIterator<String> it2 = serverList.keySet().iterator();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile(it2.hasNext()){\n\t\t\t\t\t\t\tString serverId2 = it2.next();\n\t\t\t\t\t\t\tInteger sz2 = serverList.get(serverId2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(sz2.intValue() < STABLE_SIZE){\n\t\t\t\t\t\t\t\tArrayList<String> lt = new ArrayList<String>();\n\t\t\t\t\t\t\t\tlt.add(serverId2);\n\t\t\t\t\t\t\t\tRuleList rl = new RuleList(serverId2, RuleList.MOVE , RuleList.LONG_TTL, lt);\n\t\t\t\t\t\t\t\tListKey lk = new ListKey();\n\t\t\t\t\t\t\t\tlk.addtoListKey(ct.cacheKey);\n\t\t\t\t\t\t\t\tASPolicyMap.get(serverId2).addNewPolicy(lk, rl);\n\t\t\t\t\t\t\t\tsz2 = sz2 + ct.size;\n\t\t\t\t\t\t\t\tsize += ct.size;\n\t\t\t\t\t\t\t\tserverList.put(serverId2, sz2);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(size >= (STABLE_SIZE*NO_SERVERS) ){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "private void cleanupUserKeyRecords() {\n\t\tUserKeyRecord currentlyValid = null;\n\t\t//For all \"new\" entries: If there's another sandbox record (regardless of user)\n\t\t//which shares the sandbox ID, we can set the status of the new record to be\n\t\t//the same as the old record.\n\t\t\n\t\t//TODO: We dont' need to read these records, we can read the metadata straight.\n\t\tSqlStorage<UserKeyRecord> storage = app.getStorage(UserKeyRecord.class);\n\t\tfor(UserKeyRecord record : storage) {\n\t\t\tif(record.getType() == UserKeyRecord.TYPE_NORMAL) {\n\t\t\t\t\n\t\t\t\tif(record.getUsername().equals(username) && record.isCurrentlyValid() && record.isPasswordValid(password)) {\n\t\t\t\t\tif(currentlyValid == null) {\n\t\t\t\t\t\tcurrentlyValid = record;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLogger.log(AndroidLogger.TYPE_ERROR_ASSERTION, \"User \" + username + \" has more than one currently valid key record!!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if(record.getType() == UserKeyRecord.TYPE_NEW) {\n\t\t\t\t//See if we have another sandbox with this ID that is fully initialized.\n\t\t\t\tif(app.getStorage(UserKeyRecord.class).getIDsForValues(new String[] {UserKeyRecord.META_SANDBOX_ID, UserKeyRecord.META_KEY_STATUS}, new Object[] {record.getUuid(), UserKeyRecord.TYPE_NORMAL}).size() > 0) {\n\t\t\t\t\t\n\t\t\t\t\tLogger.log(AndroidLogger.TYPE_MAINTENANCE, \"Marking new sandbox \" + record.getUuid() + \" as initialized, since it's already in use on this device\");\n\t\t\t\t\t//If so, this sandbox _has_ to have already been initialized, and we should treat it as such.\n\t\t\t\t\trecord.setType(UserKeyRecord.TYPE_NORMAL);\n\t\t\t\t\tstorage.write(record);\n\t\t\t\t}\n\t\t\t} else if (record.getType() == UserKeyRecord.TYPE_PENDING_DELETE) {\n\t\t\t\tLogger.log(AndroidLogger.TYPE_MAINTENANCE, \"Cleaning up sandbox which is pending removal\");\n\t\t\t\t\n\t\t\t\t//See if there are more records in this sandbox. (If so, we can just wipe this record and move on) \n\t\t\t\tif(storage.getIDsForValue(UserKeyRecord.META_SANDBOX_ID, record.getUuid()).size() > 2) {\n\t\t\t\t\tLogger.log(AndroidLogger.TYPE_MAINTENANCE, \"Record for sandbox \" + record.getUuid() + \" has siblings. Removing record\");\n\t\t\t\t\t\n\t\t\t\t\t//TODO: Will this invalidate our iterator?\n\t\t\t\t\tstorage.remove(record);\n\t\t\t\t} else {\n\t\t\t\t\t//Otherwise, we should see if we can read the data, and if so, wipe it as well as the record.\n\t\t\t\t\tif(record.isPasswordValid(password)) {\n\t\t\t\t\t\tLogger.log(AndroidLogger.TYPE_MAINTENANCE, \"Current user has access to purgable sandbox \" + record.getUuid() + \". Wiping that sandbox\");\n\t\t\t\t\t\tUserSandboxUtils.purgeSandbox(this.getContext(), app, record,record.unWrapKey(password));\n\t\t\t\t\t}\n\t\t\t\t\t//Do we do anything here if we couldn't open the sandbox?\n\t\t\t\t}\n\t\t\t}\n\t\t\t//TODO: Specifically we should never have two sandboxes which can be opened by the same password (I think...)\n\t\t}\n\t}", "public void initialize() {\n\n\t\tthis.subNetGenes = getSubNetGenes(species, xmlFile);\n\t\tthis.subNetwork = getSubNetwork(subNetGenes, oriGraphFile);\n\t\tHPNUlilities.dumpLocalGraph(subNetwork, subNetFile);\n\t\t/* Create level file for the original graph */\n\t\tHPNUlilities.createLevelFile(codePath, oriGraphFile, oriLevel,\n\t\t\t\tglobalLevelFile, penaltyType, partitionSize);\n\n\t}", "public FileIOManager() {\n\t\tthis.reader = new Reader(this);\n\t\tthis.writer = new Writer(this);\n\t}", "public void doPreSaveActions() {\n\t\tcalculateBlockedPartitions();\n\t}", "private void reset()\r\n {\r\n log.info(\"{0}: Resetting cache\", logCacheName);\r\n\r\n try\r\n {\r\n storageLock.writeLock().lock();\r\n\r\n if (dataFile != null)\r\n {\r\n dataFile.close();\r\n }\r\n\r\n final File dataFileTemp = new File(rafDir, fileName + \".data\");\r\n Files.delete(dataFileTemp.toPath());\r\n\r\n if (keyFile != null)\r\n {\r\n keyFile.close();\r\n }\r\n final File keyFileTemp = new File(rafDir, fileName + \".key\");\r\n Files.delete(keyFileTemp.toPath());\r\n\r\n dataFile = new IndexedDisk(dataFileTemp, getElementSerializer());\r\n keyFile = new IndexedDisk(keyFileTemp, getElementSerializer());\r\n\r\n this.recycle.clear();\r\n this.keyHash.clear();\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Failure resetting state\", logCacheName, e);\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n }", "public static void main(String args[]) throws IOException {\n BufferedReader br = new BufferedReader(new FileReader(\"sample.txt\"));\n String st;\n /*Created LinkedHashMaps for transactions and locks for keeping the records of both*/\n HashMap<String, HashMap<String, Object>> transactions = new LinkedHashMap<>();\n HashMap<Character, HashMap<String, Object>> locks = new LinkedHashMap<>();\n\n /*Created HashMap for keeping the records for blocked operation with respect to the transactionId which blocks those operation*/\n HashMap<String, LinkedList<String>> blockedOp = new HashMap<>();\n int i = 1;\n ConcurrencyControl cc = new ConcurrencyControl();\n fw = new FileWriter(\"output.txt\");\n while ((st = br.readLine()) != null) {\n st = st.trim();\n int index = st.indexOf(';');\n fw.write(\"Input : \"+ st.substring(0, index) +\"\\n\");\n if (st.charAt(0) == 'b') {\n /* will just create record of current transaction with active state and timestamp */\n cc.beginTransaction(transactions, locks, st, i);\n i++;\n }\n else if (st.charAt(0) == 'r') {\n /* will perform read operation */\n cc.readTransaction(transactions, locks, st, blockedOp);\n }\n else if (st.charAt(0) == 'w') {\n /* will perform read operation */\n cc.writeTransaction(transactions, locks, st, blockedOp);\n }\n else {\n String key = \"T\"+st.charAt(1);\n /* If a transaction is aborted then it will not commit */\n if (!transactions.get(key).get(\"State\").equals(\"Aborted\"))\n cc.endOrAbort(transactions, locks, key, \"Commited\", blockedOp);\n }\n cc.printRecords(transactions, locks);\n }\n System.out.println(\"Output written in output.txt successfully !!\");\n fw.close();\n }", "protected void initialize() {\n // Attribute Load\n this.attributeMap.clear();\n this.attributeMap.putAll(this.loadAttribute());\n // RuleUnique Load\n this.unique = this.loadRule();\n // Marker Load\n this.marker = this.loadMarker();\n // Reference Load\n this.reference = this.loadReference();\n }", "private void generateMaps() {\r\n\t\tthis.tablesLocksMap = new LinkedHashMap<>();\r\n\t\tthis.blocksLocksMap = new LinkedHashMap<>();\r\n\t\tthis.rowsLocksMap = new LinkedHashMap<>();\r\n\t\tthis.waitMap = new LinkedHashMap<>();\r\n\t}", "private synchronized void saveData() throws RuntimeException {\r\n // if too much, serialize\r\n FileReader fr = null;\r\n BufferedReader br = null;\r\n // write out to the other file\r\n FileWriter fw = null;\r\n BufferedWriter bw = null;\r\n try {\r\n // read from the current toggle file\r\n fr = new FileReader(getToggleFile());\r\n br = new BufferedReader(fr);\r\n // change files\r\n toggle = !toggle;\r\n fw = new FileWriter(getToggleFile());\r\n bw = new BufferedWriter(fw);\r\n // sort the items\r\n ProjectFilePart[] pfps = (ProjectFilePart[]) buf.toArray(new ProjectFilePart[0]);\r\n Arrays.sort(pfps);\r\n int pfpsIndex = 0;\r\n // read/copy the lines\r\n for (String line = br.readLine(); line != null; line = br.readLine()) {\r\n // if it is empty, skip\r\n if (line.trim().equals(\"\")) {\r\n continue;\r\n // load the project file part\r\n }\r\n ProjectFilePart pfp = convertToProjectFilePart(line);\r\n // check which is less\r\n if (pfpsIndex >= pfps.length || pfp.compareTo(pfps[pfpsIndex]) <= 0) {\r\n bw.write(convertToStringLine(pfp));\r\n } else if (pfp.compareTo(pfps[pfpsIndex]) > 0) {\r\n // write all of the ones that are less\r\n while (pfpsIndex < pfps.length && pfp.compareTo(pfps[pfpsIndex]) > 0) {\r\n bw.write(convertToStringLine(pfps[pfpsIndex]));\r\n pfpsIndex++;\r\n }\r\n // write out the current entry\r\n bw.write(convertToStringLine(pfp));\r\n } else {\r\n System.out.println(\"Skipping \" + pfp.getRelativeName());\r\n }\r\n }\r\n // write the rest\r\n for (; pfpsIndex < pfps.length; pfpsIndex++) {\r\n bw.write(convertToStringLine(pfps[pfpsIndex]));\r\n }\r\n // clear the buffer\r\n buf.clear();\r\n } catch (Exception e) {\r\n throw new RuntimeException(e);\r\n } finally {\r\n // close the input\r\n IOUtil.safeClose(br);\r\n IOUtil.safeClose(fr);\r\n // flush the output\r\n try {\r\n bw.flush();\r\n } catch (Exception e) {\r\n }\r\n try {\r\n fw.flush();\r\n } catch (Exception e) {\r\n }\r\n // close the output\r\n IOUtil.safeClose(bw);\r\n IOUtil.safeClose(fw);\r\n }\r\n }", "private void loadRules() throws DataNormalizationException {\n\t\tloadRules(TableVersion.COMMITTED);\n\t}", "public void commitPendingDataToDisk() {\n /*\n r5 = this;\n monitor-enter(r5);\n r1 = r5.mPendingWrite;\t Catch:{ all -> 0x0039 }\n r3 = 0;\n r5.mPendingWrite = r3;\t Catch:{ all -> 0x0039 }\n if (r1 != 0) goto L_0x000a;\n L_0x0008:\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n L_0x0009:\n return;\n L_0x000a:\n r3 = r5.mWriteLock;\t Catch:{ all -> 0x0039 }\n r3.lock();\t Catch:{ all -> 0x0039 }\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n r2 = new java.io.FileOutputStream;\t Catch:{ IOException -> 0x003c }\n r3 = r5.mFile;\t Catch:{ IOException -> 0x003c }\n r3 = r3.chooseForWrite();\t Catch:{ IOException -> 0x003c }\n r2.<init>(r3);\t Catch:{ IOException -> 0x003c }\n r3 = r1.marshall();\t Catch:{ IOException -> 0x003c }\n r2.write(r3);\t Catch:{ IOException -> 0x003c }\n r2.flush();\t Catch:{ IOException -> 0x003c }\n android.os.FileUtils.sync(r2);\t Catch:{ IOException -> 0x003c }\n r2.close();\t Catch:{ IOException -> 0x003c }\n r3 = r5.mFile;\t Catch:{ IOException -> 0x003c }\n r3.commit();\t Catch:{ IOException -> 0x003c }\n r1.recycle();\n r3 = r5.mWriteLock;\n r3.unlock();\n goto L_0x0009;\n L_0x0039:\n r3 = move-exception;\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n throw r3;\n L_0x003c:\n r0 = move-exception;\n r3 = \"BatteryStats\";\n r4 = \"Error writing battery statistics\";\n android.util.Slog.w(r3, r4, r0);\t Catch:{ all -> 0x0052 }\n r3 = r5.mFile;\t Catch:{ all -> 0x0052 }\n r3.rollback();\t Catch:{ all -> 0x0052 }\n r1.recycle();\n r3 = r5.mWriteLock;\n r3.unlock();\n goto L_0x0009;\n L_0x0052:\n r3 = move-exception;\n r1.recycle();\n r4 = r5.mWriteLock;\n r4.unlock();\n throw r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.internal.os.BatteryStatsImpl.commitPendingDataToDisk():void\");\n }", "public void init() {\r\n BufferedReader in = null;\r\n String line;\r\n PreparedStatement iStmt;\r\n String insertStmt = \"INSERT INTO \" + schema + \"ULDSHAPE \"\r\n + \"(SHAPE, ALLHGHT, ALLLENG, ALLWDTH, BIGPIC, DESCR, INTERNALVOLUME, INTHGHT, INTLENG, INTWDTH, \"\r\n + \"MAXGROSSWGHT, RATING, TAREWGHT, THUMBNAIL, UPDATED, UPDTUSER, VERSION) VALUES \"\r\n + \"(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\r\n int count = 0;\r\n\r\n LOG.log(Level.INFO, \"Initialize basic Uldshapes in DB from file [{0}]\", path);\r\n\r\n try {\r\n in = new BufferedReader(new InputStreamReader(new FileInputStream(path), StandardCharsets.UTF_8));\r\n\r\n iStmt = conn.prepareStatement(insertStmt);\r\n\r\n while ((line = in.readLine()) != null) {\r\n LOG.finer(line);\r\n\r\n UldshapeVO uldshapeVO = parseUldshape(line);\r\n\r\n iStmt.setString(1, uldshapeVO.getShape());\r\n iStmt.setInt(2, uldshapeVO.getAllhght());\r\n iStmt.setInt(3, uldshapeVO.getAllleng());\r\n iStmt.setInt(4, uldshapeVO.getAllwdth());\r\n iStmt.setBytes(5, uldshapeVO.getBigpic());\r\n iStmt.setString(6, uldshapeVO.getDescr());\r\n iStmt.setInt(7, uldshapeVO.getInternalvolume());\r\n iStmt.setInt(8, uldshapeVO.getInthght());\r\n iStmt.setInt(9, uldshapeVO.getIntleng());\r\n iStmt.setInt(10, uldshapeVO.getIntwdth());\r\n iStmt.setInt(11, uldshapeVO.getMaxgrosswght());\r\n iStmt.setString(12, uldshapeVO.getRating());\r\n iStmt.setInt(13, uldshapeVO.getTarewght());\r\n iStmt.setBytes(14, uldshapeVO.getThumbnail());\r\n iStmt.setTimestamp(15, DbUtil.getCurrentTimeStamp());\r\n iStmt.setString(16, uldshapeVO.getUpdtuser());\r\n iStmt.setLong(17, 0);\r\n\r\n // execute insert SQL stetement\r\n iStmt.executeUpdate();\r\n\r\n ++count;\r\n }\r\n LOG.log(Level.INFO, \"Finished: [{0}] ULDSHAPES loaded\", count);\r\n\r\n DbUtil.cleanupJdbc();\r\n }\r\n catch (IOException ioex) {\r\n LOG.log(Level.SEVERE, \"An IO error occured. The error message is: {0}\", ioex.getMessage());\r\n }\r\n catch (SQLException ex) {\r\n LOG.log(Level.SEVERE, \"An SQL error occured. The error message is: {0}\", ex.getMessage());\r\n }\r\n finally {\r\n if (in != null) {\r\n try {\r\n in.close();\r\n }\r\n catch (IOException e) {\r\n }\r\n }\r\n }\r\n }", "private void actuallyWriteData() {\r\n\t\t// Get rid of old data. Getting rid of trips, trip patterns, and blocks\r\n\t\t// is a bit complicated. Need to delete them in proper order because\r\n\t\t// of the foreign keys. Because appear to need to use plain SQL\r\n\t\t// to do so successfully (without reading in objects and then\r\n\t\t// deleting them, which takes too much time and memory). Therefore\r\n\t\t// deleting of this data is done here before writing the data.\r\n\t\tlogger.info(\"Deleting old blocks and associated trips from database...\");\r\n\t\tBlock.deleteFromSandboxRev(session);\r\n\r\n\t\tlogger.info(\"Deleting old trips from database...\");\r\n\t\tTrip.deleteFromSandboxRev(session);\r\n\r\n\t\tlogger.info(\"Deleting old trip patterns from database...\");\r\n\t\tTripPattern.deleteFromSandboxRev(session);\r\n\t\t\r\n\t\t// Now write the data to the database.\r\n\t\t// First write the Blocks. This will also write the Trips, TripPatterns,\r\n\t\t// Paths, and TravelTimes since those all have been configured to be\r\n\t\t// cascade=CascadeType.ALL .\r\n\t\tlogger.info(\"Saving {} blocks (plus associated trips) to database...\", \r\n\t\t\t\tgtfsData.getBlocks().size());\r\n\t\tint c = 0;\r\n\t\tfor (Block block : gtfsData.getBlocks()) {\r\n\t\t\tlogger.debug(\"Saving block #{} with blockId={} serviceId={} blockId={}\",\r\n\t\t\t\t\t++c, block.getId(), block.getServiceId(), block.getId());\r\n\t\t\twriteObject(block);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving routes to database...\");\r\n\t\tRoute.deleteFromSandboxRev(session);\r\n\t\tfor (Route route : gtfsData.getRoutes()) {\r\n\t\t\twriteObject(route);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving stops to database...\");\r\n\t\tStop.deleteFromSandboxRev(session);\r\n\t\tfor (Stop stop : gtfsData.getStops()) {\r\n\t\t\twriteObject(stop);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving agencies to database...\");\r\n\t\tAgency.deleteFromSandboxRev(session);\r\n\t\tfor (Agency agency : gtfsData.getAgencies()) {\r\n\t\t\twriteObject(agency);\r\n\t\t}\r\n\r\n\t\tlogger.info(\"Saving calendars to database...\");\r\n\t\tCalendar.deleteFromSandboxRev(session);\r\n\t\tfor (Calendar calendar : gtfsData.getCalendars()) {\r\n\t\t\twriteObject(calendar);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving calendar dates to database...\");\r\n\t\tCalendarDate.deleteFromSandboxRev(session);\r\n\t\tfor (CalendarDate calendarDate : gtfsData.getCalendarDates()) {\r\n\t\t\twriteObject(calendarDate);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving fare rules to database...\");\r\n\t\tFareRule.deleteFromSandboxRev(session);\r\n\t\tfor (FareRule fareRule : gtfsData.getFareRules()) {\r\n\t\t\twriteObject(fareRule);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving fare attributes to database...\");\r\n\t\tFareAttribute.deleteFromSandboxRev(session);\r\n\t\tfor (FareAttribute fareAttribute : gtfsData.getFareAttributes()) {\r\n\t\t\twriteObject(fareAttribute);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving frequencies to database...\");\r\n\t\tFrequency.deleteFromSandboxRev(session);\r\n\t\tfor (Frequency frequency : gtfsData.getFrequencies()) {\r\n\t\t\twriteObject(frequency);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving transfers to database...\");\r\n\t\tTransfer.deleteFromSandboxRev(session);\r\n\t\tfor (Transfer transfer : gtfsData.getTransfers()) {\r\n\t\t\twriteObject(transfer);\r\n\t\t}\r\n\t}", "private void RecordStoreLockFactory() {\n }", "private void initializeEmptyLargeFiles() \r\n\t /*@ requires belpicDirectory |-> ?bpd &*& bpd != null &*& bpd.DedicatedFile(_, _, _, ?belpic_sibs, _) &*& \r\n\t \t\tlength(belpic_sibs) < 6 &*&\r\n\t \t\tidDirectory |-> ?idd &*& idd != null &*& idd.DedicatedFile(_, _, _, ?iddir_sibs, _) &*& \r\n\t \t\tlength(iddir_sibs) < 7 &*&\r\n\t \t\tcaCertificate |-> _ &*& rrnCertificate |-> _ &*& rootCaCertificate |-> _ &*& \r\n\t \t\tphotoFile |-> _ &*& authenticationCertificate |-> _ &*& nonRepudiationCertificate |-> _; @*/\r\n \t /*@ ensures belpicDirectory |-> bpd &*& \r\n\t \t\tidDirectory |-> idd &*&\r\n\t \t\tcaCertificate |-> ?cac &*& cac.ElementaryFile(CA_CERTIFICATE, bpd, ?d1, true, 0, _) &*& d1 != null &*& d1.length == 1200 &*&\r\n\t \t\trrnCertificate |-> ?rrnc &*& rrnc.ElementaryFile(RRN_CERTIFICATE, bpd, ?d2, true, 0, _) &*& d2 != null &*& d2.length == 1200 &*&\r\n\t \t\trootCaCertificate |-> ?rootcac &*& rootcac.ElementaryFile(ROOT_CA_CERTIFICATE, bpd, ?d3, true, 0, _) &*& d3 != null &*& d3.length == 1200 &*&\r\n\t \t\tphotoFile |-> ?pf &*& pf.ElementaryFile(PHOTO, idd, ?d4, true, 0, _) &*& d4 != null &*& d4.length == 3584 &*&\r\n\t \t\tauthenticationCertificate |-> ?ac &*& ac.ElementaryFile(AUTH_CERTIFICATE, bpd, ?d5, true, 0, _) &*& d5 != null &*& d5.length == 1200 &*&\r\n\t \t\tnonRepudiationCertificate |-> ?nrc &*& nrc.ElementaryFile(NONREP_CERTIFICATE, bpd, ?d6, true, 0, _) &*& d6 != null &*& d6.length == 1200 &*&\r\n\t \t\tidd.DedicatedFile(_, _, _, append(iddir_sibs, cons(pf, nil)), _) &*& \r\n\t \t\tbpd.DedicatedFile(_, _, _, append(append(append(append(append(belpic_sibs, cons(cac, nil)), cons(rrnc, nil)), cons(rootcac, nil)), cons(ac, nil)), cons(nrc, nil)), _); @*/\r\n\t{\r\n\t\t/*\r\n\t\t * these 3 certificates are the same for all sample eid card applets\r\n\t\t * therefor they are made static and the data is allocated only once\r\n\t\t */\r\n\t\tcaCertificate = new ElementaryFile(CA_CERTIFICATE, belpicDirectory, (short) 1200);\r\n\t\trrnCertificate = new ElementaryFile(RRN_CERTIFICATE, belpicDirectory, (short) 1200);\r\n\t\t\r\n\t\trootCaCertificate = new ElementaryFile(ROOT_CA_CERTIFICATE, belpicDirectory, (short) 1200);\r\n\t\t/*\r\n\t\t * to save some memory we only support 1 photo for all subclasses\r\n\t\t * ideally this should be applet specific and have max size 3584 (3.5K)\r\n\t\t */\r\n\t\tphotoFile = new ElementaryFile(PHOTO, idDirectory, (short) 3584);\r\n\t\t/*\r\n\t\t * certificate #2 and #3 are applet specific allocate enough memory\r\n\t\t */\r\n\t\tauthenticationCertificate = new ElementaryFile(AUTH_CERTIFICATE, belpicDirectory, (short) 1200);\r\n\t\tnonRepudiationCertificate = new ElementaryFile(NONREP_CERTIFICATE, belpicDirectory, (short) 1200);\r\n\t}", "public IronSyslogDrools() {\n this.mRuleFiles = new ArrayList<>();\n prepareRuleFiles();\n initialiseSession();\n }", "private SyncState() {}", "private void deferredInitialization() {\n HostInfo hostInfo = new HostInfo(repoInfo.host, repoInfo.namespace, repoInfo.secure);\n connection = ctx.newPersistentConnection(hostInfo, this);\n\n this.ctx\n .getAuthTokenProvider()\n .addTokenChangeListener(\n ((DefaultRunLoop) ctx.getRunLoop()).getExecutorService(),\n new TokenProvider.TokenChangeListener() {\n @Override\n public void onTokenChange() {\n operationLogger.debug(\"Auth token changed, triggering auth token refresh\");\n connection.refreshAuthToken();\n }\n\n @Override\n public void onTokenChange(String token) {\n operationLogger.debug(\"Auth token changed, triggering auth token refresh\");\n connection.refreshAuthToken(token);\n }\n });\n\n this.ctx\n .getAppCheckTokenProvider()\n .addTokenChangeListener(\n ((DefaultRunLoop) ctx.getRunLoop()).getExecutorService(),\n new TokenProvider.TokenChangeListener() {\n @Override\n public void onTokenChange() {\n operationLogger.debug(\n \"App check token changed, triggering app check token refresh\");\n connection.refreshAppCheckToken();\n }\n\n @Override\n public void onTokenChange(String token) {\n operationLogger.debug(\n \"App check token changed, triggering app check token refresh\");\n connection.refreshAppCheckToken(token);\n }\n });\n\n // Open connection now so that by the time we are connected the deferred init has run\n // This relies on the fact that all callbacks run on repo's runloop.\n connection.initialize();\n\n PersistenceManager persistenceManager = ctx.getPersistenceManager(repoInfo.host);\n\n infoData = new SnapshotHolder();\n onDisconnect = new SparseSnapshotTree();\n\n transactionQueueTree = new Tree<List<TransactionData>>();\n\n infoSyncTree =\n new SyncTree(\n ctx,\n new NoopPersistenceManager(),\n new SyncTree.ListenProvider() {\n @Override\n public void startListening(\n final QuerySpec query,\n Tag tag,\n final ListenHashProvider hash,\n final SyncTree.CompletionListener onComplete) {\n scheduleNow(\n new Runnable() {\n @Override\n public void run() {\n // This is possibly a hack, but we have different semantics for .info\n // endpoints. We don't raise null events on initial data...\n final Node node = infoData.getNode(query.getPath());\n if (!node.isEmpty()) {\n List<? extends Event> infoEvents =\n infoSyncTree.applyServerOverwrite(query.getPath(), node);\n postEvents(infoEvents);\n onComplete.onListenComplete(null);\n }\n }\n });\n }\n\n @Override\n public void stopListening(QuerySpec query, Tag tag) {}\n });\n\n serverSyncTree =\n new SyncTree(\n ctx,\n persistenceManager,\n new SyncTree.ListenProvider() {\n @Override\n public void startListening(\n QuerySpec query,\n Tag tag,\n ListenHashProvider hash,\n final SyncTree.CompletionListener onListenComplete) {\n connection.listen(\n query.getPath().asList(),\n query.getParams().getWireProtocolParams(),\n hash,\n tag != null ? tag.getTagNumber() : null,\n new RequestResultCallback() {\n @Override\n public void onRequestResult(String optErrorCode, String optErrorMessage) {\n DatabaseError error = fromErrorCode(optErrorCode, optErrorMessage);\n List<? extends Event> events = onListenComplete.onListenComplete(error);\n postEvents(events);\n }\n });\n }\n\n @Override\n public void stopListening(QuerySpec query, Tag tag) {\n connection.unlisten(\n query.getPath().asList(), query.getParams().getWireProtocolParams());\n }\n });\n\n restoreWrites(persistenceManager);\n\n updateInfo(Constants.DOT_INFO_AUTHENTICATED, false);\n updateInfo(Constants.DOT_INFO_CONNECTED, false);\n }", "private void reset() {\n\t\tfiles = new HashMap<>();\n\t\tparams = new HashMap<>();\n\t}", "private UndoManager() {\n undoList = new LinkedHashMap<RefactoringSession, LinkedList<UndoItem>>();\n redoList = new LinkedHashMap<RefactoringSession, LinkedList<UndoItem>>();\n descriptionMap = new IdentityHashMap<LinkedList, String>();\n }", "public void postRun() {\n if (manageFileSystem && fs != null) {\n try {\n fs.close();\n }\n catch (IOException e) {\n System.out.println(String.format(\"Failed to close AlluxioFileSystem: %s\", e.getMessage()));\n }\n }\n // only to close the FileOutputStream when manageRecordFile=true\n if (manageRecordFile && recordOutput != null) {\n try {\n recordOutput.close();\n }\n catch (IOException e) {\n System.out.println(String.format(\"Failed to close File %s: %s\", recordFileName, e.getMessage()));\n }\n }\n }", "public void process()\n\t{\n\t\tthis.layers = new ArrayList<Layer>();\n\t\t\n\t\t/**\n\t\t * list of layers to remove\n\t\t */\n\t\tthis.layersToRemove = new ArrayList<Layer>();\n\t\t\n\t\t/**\n\t\t * find all layers we need to process in the document\n\t\t */\n\t\tthis.allLayers();\n\t\t\n\t\t/**\n\t\t * we'll remove all layers which are unused in psd\n\t\t */\n\t\tthis.removeUnusedLayers();\n\t\t\n//\t\tthis.discoverMaximumLayerDepth();\n\t\t\n\t\t/*this.showLayersInformation(this.layers);\n\t\tSystem.exit(0)*/;\n\t}", "protected void applyPendingDeletes ()\n {\n while (!m_aDeleteStack.isEmpty ())\n removeMonitoredFile (m_aDeleteStack.pop ());\n }", "public void init() {\n\t\tlong startTime = System.currentTimeMillis();\n\t\t\n\t\tfor(BusinessCategoryList categoryList : BusinessCategoryList.values()) {\n\t\t\tString[] names = categoryList.getValues().split(\",\");\n\t\t\tfor(String name : names) {\n\t\t\t\tget(name);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlog.debug(\"Dirty hack completed in {} ms.\", System.currentTimeMillis() - startTime);\n\t}", "@SuppressWarnings(\"AccessingNonPublicFieldOfAnotherObject\")\n\t// Accessing final fields of a private inner class that is not exported\n\tprivate void processFile(boolean initial)\n\t{\n\t\tlog(Level.INFO, \"Processing MOTD file \" + f.getPath());\n\t\tBufferedReader in = null;\n\t\tMessage curr = null;\n\t\tfinal LinkedList<Message> stack = new LinkedList<Message>();\n\n\t\ttry\n\t\t{\n\t\t\tin = new BufferedReader(new FileReader(f));\n\n\t\t\twhile (in.ready())\n\t\t\t{\n\t\t\t\tString line = in.readLine().trim();\n\n\t\t\t\tif (line.charAt(0) == '#') continue;\n\t\t\t\tif (line.equals(\"[Message]\"))\n\t\t\t\t{\n\t\t\t\t\tif (curr != null) stack.push(curr);\n\t\t\t\t\tcurr = new Message();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (curr == null) continue;\n\t\t\t\tint div = line.indexOf('=');\n\t\t\t\tif (div == -1) continue;\n\n\t\t\t\tString field = line.substring(0,div).toLowerCase();\n\t\t\t\tString value = line.substring(div+1);\n\n\t\t\t\tif (field.equals(\"id\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.id = Integer.parseInt(value);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (initial) continue; // We only care for ids in initial pass\n\t\t\t\tif (field.equals(\"active\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.active = Boolean.valueOf(value);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"title\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.title = value;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"short\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.mshort = value;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"long\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.mlong = value;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"from\"))\n\t\t\t\t{\n//\t\t\t\t\tcurr.from = new Date(value).getTime();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"to\"))\n\t\t\t\t{\n//\t\t\t\t\tcurr.to = new Date(value).getTime();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"posterid\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.poster_uid = value;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"postername\"))\n\t\t\t\t{\n\t\t\t\t\tcurr.poster_name = value;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (field.equals(\"showunix\")) continue;\n\n\t\t\t\tlog(Level.WARNING, \"Unknown Field '\" + field + \"'\");\n\t\t\t}\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t\tlog(Level.WARNING, ex);\n\t\t}\n\t\tcatch (Throwable ex)\n\t\t{\n\t\t\tlog(Level.SEVERE, ex.getMessage());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tin.close();\n\t\t\t}\n\t\t\tcatch (IOException ex)\n\t\t\t{\n\t\t\t}\n\t\t}\n\n\t\tif (curr != null) stack.push(curr);\n\t\tlastModified = f.lastModified();\n\n\t\tif (initial)\n\t\t{\n\t\t\tif (stack.size() > 0) lastId = stack.getLast().id;\n\t\t\treturn;\n\t\t}\n\t\tfor (Message m : stack)\n\t\t{\n\t\t\tif (m.id > lastId)\n\t\t\t{\n\t\t\t\tlog(Level.INFO, \"Sending MOTD Notice #\" + m.id);\n\t\t\t\tgetInstance().message(channel, m.toString());\n\t\t\t\tlastId = m.id;\n\t\t\t}\n\t\t}\n\t}", "public ExternalFileMgrImpl()\r\n \t{\r\n \t\t\r\n \t}", "public void cleanUp() {\n logger.info(\"clean up...\");\n this.sequenceNo = calculateSequenceNumber();\n if (this.prevoteStore != null) {\n this.prevoteStore = this.prevoteStore.stream()\n .filter(i -> i.sequence_no >= this.sequenceNo)\n .collect(Collectors.toCollection(ArrayList::new));\n } else {\n this.prevoteStore = new ArrayList<>();\n }\n }", "public void initAfterUnpersistence() {\n //From a legacy bundle\n if (sources == null) {\n sources = Misc.newList(getName());\n }\n super.initAfterUnpersistence();\n openData();\n }", "private void initializeBuffers(){\n if(isDiskBufferEnabled){\n this.persistenceService = PersistenceService.getService();\n this.synonymyBuffer = persistenceService.getMapDatabase(WIKIDATA_SYNONYMY_BUFFER);\n this.hypernymyBuffer = persistenceService.getMapDatabase(WIKIDATA_HYPERNYMY_BUFFER);\n this.askBuffer = persistenceService.getMapDatabase(WIKIDATA_ASK_BUFFER);\n } else {\n this.synonymyBuffer = new ConcurrentHashMap<>();\n this.hypernymyBuffer = new ConcurrentHashMap<>();\n this.askBuffer = new ConcurrentHashMap<>();\n }\n }", "public void prepareForSnapshot() {\n if (readMap != null)\n return;\n\n readMap = new TreeMap<>();\n\n for (Map.Entry<GroupPartitionId, PagesAllocationRange> entry : writeMap.entrySet()) {\n if (!skippedParts.contains(entry.getKey()))\n readMap.put(entry.getKey(), entry.getValue());\n }\n\n skippedParts.clear();\n writeMap.clear();\n }", "void setUnused(){\n assert this.used == true;\n\n //let the parent pointer remain\n this.hf = 0;\n this.used = false;\n\n }", "@Override\n public void BeforeReConnect() {\n nCurrentDownloadNum = 0;\n nCurrentUpload = 0;\n mapDownload.clear();\n }", "public void reset()\n {\n \tthis.heapFiles.clear();\n }", "protected void clearOpen()\n {\n super.clearOpen();\n this.open_time = new HashMap<>();\n }", "public void init() {\n\t\t\tfor(int i=0; i<DBDef.getINSTANCE().getListeRelDef().size(); i++) {\n\t\t\t\tDBDef.getINSTANCE().getListeRelDef().get(i);\n\t\t\t\tHeapFile hp = new HeapFile(DBDef.getINSTANCE().getListeRelDef().get(i));\n\t\t\t\tthis.heapFiles.add(hp);\n\t\t\t}\n\t\t}", "private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}", "private void cleanupAfterCommit(\n final FSDataInputStream inputStream,\n final TaskAttemptContext context)\n throws IOException {\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (IOException e) {\n LOG.error(\"Could not close input stream\", e);\n throw e;\n }\n }\n cleanupResources(context);\n }", "public void prepare() {\n // make sure the user didn't hide the sketch folder\n ensureExistence();\n\n current.setProgram(editor.getText());\n\n // TODO record history here\n //current.history.record(program, SketchHistory.RUN);\n\n // if an external editor is being used, need to grab the\n // latest version of the code from the file.\n if (Preferences.getBoolean(\"editor.external\")) {\n // history gets screwed by the open..\n //String historySaved = history.lastRecorded;\n //handleOpen(sketch);\n //history.lastRecorded = historySaved;\n\n // set current to null so that the tab gets updated\n // http://dev.processing.org/bugs/show_bug.cgi?id=515\n current = null;\n // nuke previous files and settings, just get things loaded\n load();\n }\n\n // in case there were any boogers left behind\n // do this here instead of after exiting, since the exit\n // can happen so many different ways.. and this will be\n // better connected to the dataFolder stuff below.\n cleanup();\n\n// // handle preprocessing the main file's code\n// return build(tempBuildFolder.getAbsolutePath());\n }", "public static void initialize() {\r\n\t\tgraph = null;\r\n\t\tmseeObjectNames = new HashMap<String, String>();\r\n\t\tmseeEventTypes = new HashMap<String, String>();\r\n\t\tmodifiedIdentifiers = new HashMap<String, String>();\r\n\t}", "void allocate(ApexFile parent_file, int link_factor){\n assert this.used == false;\n\n //delete the block from parent file\n\n // CHECK THAT IF THE PARENT FILE IS NULL THEN DO NOT DO THE DELETE BLOCK STEP\n if(this.parentFile != null){\n this.parentFile.deleteBlock(this);\n }\n\n this.parentFile = parent_file;\n this.used = true;\n this.hf = 1;//reset\n this.uf = 1;//reset\n this.lf = link_factor;//binaries or non binaries\n }", "protected void optimizeFile()\r\n {\r\n final ElapsedTimer timer = new ElapsedTimer();\r\n timesOptimized++;\r\n log.info(\"{0}: Beginning Optimization #{1}\", logCacheName, timesOptimized);\r\n\r\n // CREATE SNAPSHOT\r\n Collection<IndexedDiskElementDescriptor> defragList = null;\r\n\r\n storageLock.writeLock().lock();\r\n\r\n try\r\n {\r\n queueInput = true;\r\n // shut off recycle while we're optimizing,\r\n doRecycle = false;\r\n defragList = createPositionSortedDescriptorList();\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n\r\n // Defrag the file outside of the write lock. This allows a move to be made,\r\n // and yet have the element still accessible for reading or writing.\r\n long expectedNextPos = defragFile(defragList, 0);\r\n\r\n // ADD THE QUEUED ITEMS to the end and then truncate\r\n storageLock.writeLock().lock();\r\n\r\n try\r\n {\r\n try\r\n {\r\n if (!queuedPutList.isEmpty())\r\n {\r\n // pack them at the end\r\n expectedNextPos = defragFile(queuedPutList, expectedNextPos);\r\n }\r\n // TRUNCATE THE FILE\r\n dataFile.truncate(expectedNextPos);\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Error optimizing queued puts.\", logCacheName, e);\r\n }\r\n\r\n // RESTORE NORMAL OPERATION\r\n removeCount = 0;\r\n resetBytesFree();\r\n this.recycle.clear();\r\n queuedPutList.clear();\r\n queueInput = false;\r\n // turn recycle back on.\r\n doRecycle = true;\r\n isOptimizing = false;\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n\r\n log.info(\"{0}: Finished #{1}, Optimization took {2}\",\r\n logCacheName, timesOptimized, timer.getElapsedTimeString());\r\n }", "void loadData() {\n\n // update if\n // station does not exist OR\n // the station exists and should be updated\n // don't update if the depth is rejected, regardless of the above 2\n\n String tmpStationId = \"\";\n if (dataType == CURRENTS) {\n tmpStationId = currents.getStationId(\"\");\n } else if (dataType == SEDIMENT) {\n tmpStationId = sedphy.getStationId(\"\");\n } else if ((dataType == WATER) || (dataType == WATERWOD)) {\n tmpStationId = watphy.getStationId(\"\");\n } // if (dataType == CURRENTS)\n if (dbg3) System.out.println(\"<br>loadData: tmpStationId = \" + tmpStationId);\n if (dbg3) System.out.println(\"<br>loadData: rejectDepth = \" + rejectDepth);\n if (dbg3) System.out.println(\"<br>loadData: stationExists = \" + stationExists);\n if (dbg3) System.out.println(\"<br>loadData: stationUpdated = \" + stationUpdated);\n if (dbg3) System.out.println(\"<br>loadData: dataExists = \" + dataExists);\n if (dbg3) System.out.println(\"<br>loadData: if = \" +\n (!\"\".equals(tmpStationId) && !rejectDepth &&\n (!stationExists || stationUpdated || !dataExists)));\n if (dbg3) System.out.println(\"<br>loadData: dataType = \" + dataType);\n\n//<br>loadData: tmpStationId = WOD007919212\n//<br>loadData: rejectDepth = false\n//<br>loadData: stationExists = true\n//<br>loadData: stationUpdated = false\n//<br>loadData: dataExists = true\n\n if (!\"\".equals(tmpStationId) && !rejectDepth &&\n (!stationExists || stationUpdated || !dataExists || (thisSubdesCount == 0))) {\n\n // was it a duplicate station with a different station-id?\n // as we can't update station-id's in oracle (used as FK elsewhere),\n // we have to update the watphy record's station id\n if (dbg4) System.out.println(\"<br>loadData: stationIDs = \" +\n station.getStationId(\"\") + \" \" + tmpStationId);\n //if (!station.getStationId(\"\").equals(watphy.getStationId(\"\"))) {\n if (!station.getStationId(\"\").equals(tmpStationId)) {\n if (dataType == CURRENTS) {\n currents.setStationId(station.getStationId(\"\"));\n } else if (dataType == SEDIMENT) {\n sedphy.setStationId(station.getStationId(\"\"));\n } else if ((dataType == WATER) || (dataType == WATERWOD)) {\n if (dbg4) System.out.println(\"<br>loadData: put watphy = \" + watphy);\n watphy.setStationId(station.getStationId(\"\"));\n if (dbg4) System.out.println(\"<br>loadData: put watphy = \" + watphy);\n } // if (dataType == CURRENTS)\n } // if (!station.getStationId(\"\").equals(tmpStationId))\n\n if (dataType == CURRENTS) {\n\n // insert the currents record\n if (dbg4) System.out.println(\"<br>loadData: put currents1 = \" +\n currents);\n try {\n currents.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put currents1 = \" + currents);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + currents.getInsStr());\n e.printStackTrace();\n } // try-catch\n\n //common2.DbAccessC.commit();\n if (dbg4) System.out.println(\"<br>loadData: put currents2 = \" +\n currents);\n //dataCodeEnd = currents.getCode();\n //if (dbg3) System.out.println(\"<br>loadData: put dataCodeEnd = \" + dataCodeEnd);\n currentsCount++;\n\n currents = new MrnCurrents();\n\n // set initial values for currents\n currents.setSpldattim(startDateTime);\n currents.setSubdes(subdes);\n\n } else if (dataType == SEDIMENT) {\n\n // set default values\n sedphy.setDeviceCode(1); // == unknown\n sedphy.setMethodCode(1); // == unknown\n sedphy.setStandardCode(1); // == unknown\n\n // insert the sedphy and child records\n if (dbg4) System.out.println(\"<br>loadData: put sedphy1 = \" + sedphy);\n try {\n sedphy.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put sedphy1 = \" + sedphy);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + sedphy.getInsStr());\n e.printStackTrace();\n } // try-catch\n\n //common2.DbAccessC.commit();\n if (dbg3) System.out.println(\"<br>loadData: put sedphy2 = \" + sedphy);\n dataCodeEnd = sedphy.getCode();\n if (dbg3) System.out.println(\"<br>loadData: put dataCodeEnd = \" + dataCodeEnd);\n\n //sedphyCount++;\n\n if (!sedchem1.isNullRecord()) {\n sedchem1.setSedphyCode(dataCodeEnd);\n try {\n sedchem1.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put sedchem1 = \" + sedchem1);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + sedchem1.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put sedchem1 = \" + sedchem1);\n sedchem1Count++;\n } // if (!sedchem1.isNullRecord()\n\n if (!sedchem2.isNullRecord()) {\n sedchem2.setSedphyCode(dataCodeEnd);\n try {\n sedchem2.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put sedchem2 = \" + sedchem2);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + sedchem2.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put sedchem2 = \" + sedchem2);\n sedchem2Count++;\n } // if (!sedchem2.isNullRecord()\n\n if (!sedpol1.isNullRecord()) {\n sedpol1.setSedphyCode(dataCodeEnd);\n try {\n sedpol1.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put sedpol1 = \" + sedpol1);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + sedpol1.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put sedpol1 = \" + sedpol1);\n sedpol1Count++;\n } // if (!sedpol1.isNullRecord()\n\n if (!sedpol2.isNullRecord()) {\n sedpol2.setSedphyCode(dataCodeEnd);\n try {\n sedpol2.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put sedpol2 = \" + sedpol2);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + sedpol2.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put sedpol2 = \" + sedpol2);\n sedpol2Count++;\n } // if (!sedpol2.isNullRecord()\n\n sedphy = new MrnSedphy();\n sedchem1 = new MrnSedchem1();\n sedchem2 = new MrnSedchem2();\n sedpol1 = new MrnSedpol1();\n sedpol2 = new MrnSedpol2();\n\n // set initial values for sedphy\n sedphy.setSpldattim(startDateTime);\n sedphy.setSubdes(subdes);\n\n } else if ((dataType == WATER) || (dataType == WATERWOD)) {\n\n // set default values\n watphy.setDeviceCode(1); // == unknown\n watphy.setMethodCode(1); // == unknown\n watphy.setStandardCode(1); // == unknown\n\n // insert the watphy and child records\n if (dbg4) System.out.println(\"<br>loadData: put watphy1 = \" + watphy);\n try {\n watphy.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watphy1 = \" + watphy);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watphy.getInsStr());\n e.printStackTrace();\n } // try-catch\n\n //common2.DbAccessC.commit();\n if (dbg3) System.out.println(\"<br>loadData: put watphy2 = \" + watphy);\n dataCodeEnd = watphy.getCode();\n if (dbg3) System.out.println(\"<br>loadData: put dataCodeEnd = \" + dataCodeEnd);\n\n watphyCount++;\n\n if (dbg4) System.out.println(\"<br>loadData: put watProfQC = \" + watProfQC);\n if (!watProfQC.isNullRecord()) {\n watProfQC.setStationId(station.getStationId(\"\"));\n watProfQC.setSubdes(watphy.getSubdes(\"\"));\n if (dbg4) System.out.println(\"<br>loadData: put watProfQC = \" + watProfQC);\n try {\n watProfQC.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watProfQC1 = \" + watProfQC);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watProfQC.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put watProfQC = \" + watProfQC);\n } // if (!watProfQC.isNullRecord()\n\n if (dbg4) System.out.println(\"<br>loadData: put watQC = \" + watQC);\n if (!watQC.isNullRecord()) {\n try {\n watQC.setWatphyCode(dataCodeEnd);\n watQC.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watQC = \" + watQC);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watQC.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put watQC = \" + watQC);\n } // if (!watQC.isNullRecord())\n\n if (!watchem1.isNullRecord()) {\n watchem1.setWatphyCode(dataCodeEnd);\n try {\n watchem1.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watchem1 = \" + watchem1);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watchem1.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put watchem1 = \" + watchem1);\n watchem1Count++;\n } // if (!watchem1.isNullRecord()\n\n if (!watchem2.isNullRecord()) {\n watchem2.setWatphyCode(dataCodeEnd);\n try {\n watchem2.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watchem2 = \" + watchem2);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watchem2.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put watchem2 = \" + watchem2);\n watchem2Count++;\n } // if (!watchem2.isNullRecord()\n\n if (!watchl.isNullRecord()) {\n watchl.setWatphyCode(dataCodeEnd);\n try {\n watchl.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watchl = \" + watchl);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watchl.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put watchl = \" + watchl);\n watchlCount++;\n } // if (!watchl.isNullRecord())\n\n if (!watnut.isNullRecord()) {\n watnut.setWatphyCode(dataCodeEnd);\n try {\n watnut.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watnut = \" + watnut);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watnut.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put watnut = \" + watnut);\n watnutCount++;\n } // if (!watnut.isNullRecord())\n\n if (!watpol1.isNullRecord()) {\n watpol1.setWatphyCode(dataCodeEnd);\n try {\n watpol1.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watpol1 = \" + watpol1);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watpol1.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put watpol1 = \" + watpol1);\n watpol1Count++;\n } // if (!watpol1.isNullRecord()\n\n if (!watpol2.isNullRecord()) {\n watpol2.setWatphyCode(dataCodeEnd);\n try {\n watpol2.put();\n } catch(Exception e) {\n System.err.println(\"loadData: put watpol2 = \" + watpol2);\n System.err.println(\"loadData: station = \" + station);\n System.err.println(\"loadData: put sql = \" + watpol2.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadData: put watpol2 = \" + watpol2);\n watpol2Count++;\n } // if (!watpol2.isNullRecord()\n\n watphy = new MrnWatphy();\n watchem1 = new MrnWatchem1();\n watchem2 = new MrnWatchem2();\n watchl = new MrnWatchl();\n watnut = new MrnWatnut();\n watpol1 = new MrnWatpol1();\n watpol2 = new MrnWatpol2();\n\n watProfQC = new MrnWatprofqc();\n watQC = new MrnWatqc();\n\n // set initial values for watphy\n watphy.setSpldattim(startDateTime);\n watphy.setSubdes(subdes);\n\n } // if (dataType == CURRENTS)\n\n } // if (!rejectDepth && (!stationExists || stationUpdated))\n }", "public Admin()\n {\n File f1 = new File(\"adm1.txt\");//checking whether file exists or not\n\t\tif(f1.exists())\n\t\t{\n try{\n \tadd_admin(\"1\", \"1\", \"1\", \"CO1\", 123, \"878451\",true,\"1\", \"1\");\n \tFileInputStream file = new FileInputStream(f1);\n BufferedInputStream b=new BufferedInputStream(file);\n b.mark(0);\n b.reset();\n ObjectInputStream obj = new ObjectInputStream(b);\n \n Admin e=null;\n e=(Admin) obj.readObject();//reading object from the file \n adm_list.insert(e);//inserting in the current linked list and appending the data in the file\n \n if(file.markSupported())//marking the pointer in the file to start the traversal\n file.reset();\n obj.close();//closing the streams\n file.close(); \n }\n catch(Exception e)//catching exceptions\n {\n \n }\n \n\t\t} \n }", "void handleStart()\n {\n // Release our interest in the sections previously matched\n // Note: References to the sections may live on beyond the life\n // of the filter that produced them.\n synchronized (sectionMonitor)\n {\n tableSections = null;\n haveReceivedSections = false;\n sentVersionChangeEvent = false;\n }\n }", "@Override\n public HashMap initFileSet()\n {\n return null;\n }" ]
[ "0.5846824", "0.56678206", "0.56345767", "0.5509233", "0.5455938", "0.54519165", "0.527171", "0.5238771", "0.5229935", "0.5189742", "0.5174236", "0.51568663", "0.5102136", "0.50985575", "0.50949645", "0.50906694", "0.5084344", "0.50088364", "0.49867103", "0.49861455", "0.49771526", "0.49759874", "0.4972707", "0.49575403", "0.49574938", "0.4946438", "0.49381462", "0.49308217", "0.49280122", "0.4927311", "0.49180555", "0.4912417", "0.49120402", "0.4904646", "0.49040353", "0.49021143", "0.48945248", "0.487367", "0.48724312", "0.48692706", "0.4863446", "0.48633412", "0.4860926", "0.48532632", "0.48500055", "0.48478234", "0.48267928", "0.48249453", "0.48211136", "0.48121092", "0.4801945", "0.47943458", "0.47908133", "0.4788561", "0.4784314", "0.4782703", "0.47785223", "0.47752404", "0.4767818", "0.475483", "0.47429088", "0.47415525", "0.47332555", "0.47260895", "0.47242758", "0.472381", "0.47059652", "0.4700299", "0.46993554", "0.46991965", "0.46971136", "0.46935084", "0.4691761", "0.46903938", "0.46823773", "0.4674751", "0.46658203", "0.46601474", "0.46588033", "0.46536583", "0.46510252", "0.46440062", "0.46427462", "0.46421203", "0.46377674", "0.4636997", "0.46325722", "0.46287867", "0.46279687", "0.46234548", "0.4620115", "0.46169144", "0.461376", "0.46133128", "0.4601931", "0.4596819", "0.45933235", "0.45926306", "0.45916885", "0.4590647" ]
0.5861793
0
remove the directory used ot hold the context's policy files
private void removePolicyContextDirectory(){ String directoryName = getContextDirectoryName(); File f = new File(directoryName); if(f.exists()){ // WORKAROUND: due to existence of timestamp file in given directory // for SE/EE synchronization File[] files = f.listFiles(); if (files != null && files.length > 0) { for (int i = 0; i < files.length; i++) { files[i].delete(); } } //WORKAROUND: End if (!f.delete()) { String defMsg = "Failure removing policy context directory: "+directoryName; String msg=localStrings.getLocalString("pc.file_delete_error", defMsg); logger.log(Level.SEVERE,msg); throw new RuntimeException(defMsg); } else if(logger.isLoggable(Level.FINE)){ logger.fine("JACC Policy Provider: Policy context directory removed: "+directoryName); } File appDir = f.getParentFile(); // WORKAROUND: due to existence of timestamp file in given directory // for SE/EE synchronization File[] fs = appDir.listFiles(); if (fs != null && fs.length > 0) { boolean hasDir = false; for (int i = 0; i < fs.length; i++) { if (fs[i].isDirectory()) { hasDir = true; break; } } if (!hasDir) { for (int i = 0; i < fs.length; i++) { fs[i].delete(); } } } //WORKAROUND: End File[] moduleDirs = appDir.listFiles(); if (moduleDirs == null || moduleDirs.length == 0) { if (!appDir.delete()) { String defMsg = "Failure removing policy context directory: " + appDir; String msg = localStrings.getLocalString("pc.file_delete_error", defMsg); logger.log(Level.SEVERE,msg); throw new RuntimeException(defMsg); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "private void removePolicyFile(boolean granted){\n\tString fileName = getPolicyFileName(granted);\n\tFile f = new File(fileName);\n\tif(f.exists()){\n\t if (!f.delete()) {\n String defMsg = \"Failure removing policy file: \"+fileName; \n String msg=localStrings.getLocalString(\"pc.file_delete_error\", defMsg,new Object []{ fileName} );\n\t\tlogger.log(Level.SEVERE,msg);\n\t\tthrow new RuntimeException(defMsg);\n\t } else if(logger.isLoggable(Level.FINE)){\n\t\tlogger.fine(\"JACC Policy Provider: Policy file removed: \"+fileName);\n\t }\n\t}\n }", "private void cleanupStagingDir() {\n if (getApplicationId() != null) {\n dagUtils.cleanMr3Dir(getStagingDir(), sessionConf);\n }\n sessionScratchDir = null;\n }", "void deleteTagDirectory() {\n\n try {\n\n Log.i(\"Deleting Tag Directory\", tag_directory.toString());\n FileUtils.deleteDirectory(tag_directory);\n } catch (IOException e) {\n\n }\n\n }", "void deleteStoryDirectory() {\n\n try {\n\n Log.i(\"Deleting StoryDirectory\", story_directory.toString());\n FileUtils.deleteDirectory(story_directory);\n } catch (IOException e) {\n\n }\n\n }", "@Override\r\n\tpublic void remDir(String path) {\n\t\t\r\n\t}", "private static void cleanUpGlobalStateAndFileStore() {\n FileUtils.deleteDirectory(Paths.get(GLOBAL_STATE_DIR));\n }", "private void clearClipsDirectory(){\n /* Citation : http://helpdesk.objects.com.au/java/how-to-delete-all-files-in-a-directory#:~:text=Use%20the%20listFiles()%20method,used%20to%20delete%20each%20file. */\n File directory = new File(Main.CREATED_CLIPS_DIRECTORY_PATH);\n File[] files = directory.listFiles();\n if(files != null){\n for(File file : files){\n if(!file.delete()) System.out.println(\"Failed to remove file \" + file.getName() + \" from \" + Main.CREATED_CLIPS_DIRECTORY_PATH);\n }\n }\n }", "private void deleteTempHTMLFile()\n {\n File file = new File(\"resources/tempHTML\" +Thread.currentThread().getName() +\".html\");\n file.delete();\n }", "protected static void cleanUpWorkingDir() {\n final Path testControllerPath =\n Paths.get(SystemPersistence.manager.getConfigurationPath().toString(), TEST_CONTROLLER_FILE);\n try {\n Files.deleteIfExists(testControllerPath);\n } catch (final Exception e) {\n logger.info(\"Problem cleaning {}\", testControllerPath, e);\n }\n\n final Path testControllerBakPath =\n Paths.get(SystemPersistence.manager.getConfigurationPath().toString(), TEST_CONTROLLER_FILE_BAK);\n try {\n Files.deleteIfExists(testControllerBakPath);\n } catch (final Exception e) {\n logger.info(\"Problem cleaning {}\", testControllerBakPath, e);\n }\n }", "public void removeExcludedPolicy()\n throws PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\n\n\tif (excludedPermissions != null) {\n\t excludedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "public void delete_File(){\n context.deleteFile(Constant.FILE_NAME);\n }", "void deleteCoverDirectory() {\n\n try {\n\n Log.i(\"Deleting Covr Directory\", cover_directory.toString());\n FileUtils.deleteDirectory(cover_directory);\n } catch (IOException e) {\n\n }\n\n }", "public void deleteGeneratedFiles();", "public synchronized void cleanup() {\n\t\tString[] children = mStorageDirectory.list();\n\t\tif (children != null) { // children will be null if the directory does\n\t\t\t\t\t\t\t\t// not exist.\n\t\t\tfor (int i = 0; i < children.length; i++) { // remove too small file\n\t\t\t\tFile child = new File(mStorageDirectory, children[i]);\n\t\t\t\tif (!child.equals(new File(mStorageDirectory, NOMEDIA))\n\t\t\t\t\t\t&& child.length() <= MIN_FILE_SIZE_IN_BYTES) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void clearFiles() {\r\n File file = new File(\"test_files/upload\");\r\n File[] files = file.listFiles();\r\n for (File delFile : files) {\r\n delFile.delete();\r\n }\r\n file = new File(\"test_files/stress.jar\");\r\n file.delete();\r\n }", "public void excludeAllFiles(){\n for(Map.Entry<String,File> entry : dataSourcesDirectories.entrySet()){\n \n //Get directory\n File dir = entry.getValue();\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete();\n \n //Delete directory\n dir.delete();\n \n }\n \n //For each directory created for each service\n for(Map.Entry<String,File> entry : servicesDirectories.entrySet()){\n \n //Get directory\n File dir = entry.getValue();\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete();\n \n //Delete directory\n dir.delete();\n \n }\n \n //Finally, delete sessionDirectory\n if(sessionDirectory != null)\n sessionDirectory.delete();\n \n }", "public static void clearApplicationData(Context context) {\r\n File cache = context.getCacheDir();\r\n File appDir = new File(cache.getParent());\r\n if (appDir.exists()) {\r\n String[] children = appDir.list();\r\n for (String s : children) {\r\n if (!s.equals(\"lib\")) {\r\n deleteDir(new File(appDir, s));\r\n }\r\n }\r\n }\r\n }", "private void cleanup() {\n File tmpdir = new File(System.getProperty(\"java.io.tmpdir\"));\n File[] backupDirs = tmpdir.listFiles(file -> file.getName().contains(BACKUP_TEMP_DIR_PREFIX));\n if (backupDirs != null) {\n for (File file : backupDirs) {\n try {\n FileUtils.deleteDirectory(file);\n log.info(\"removed temporary backup directory {}\", file.getAbsolutePath());\n } catch (IOException e) {\n log.error(\"failed to delete the temporary backup directory {}\", file.getAbsolutePath());\n }\n }\n }\n }", "public void removeExpiredFiles() {\n \t\n \tsetCurrentTimeNow();\n\n File dir = new File(fsResource.getPath());\n File[] list = dir.listFiles(this);\n for (File file : list) {\n \tlogger.info(\"Auto expire file removed: {}\", file.getName());\n \tfile.delete();\n }\n }", "void clearPolicy() {\n policy = new Policy();\n }", "public void cleanup() {\n try {\n Files.delete(path);\n } catch (final IOException e) {\n throw new StageAccessException(\"Unable to delete staged document!\", e);\n }\n }", "public void delete() throws PolicyContextException\n {\n\tcheckSetPolicyPermission();\n\tsynchronized(refreshLock) {\n\t try {\n\t\tremovePolicy();\n\t } finally {\n\t\tsetState(DELETED_STATE);\n\t }\n\t}\n }", "private void deleteConfigFile(File configFile) {\r\n String confDirectoryName = configFile.getParent();\r\n configFile.delete();\r\n File parentDirectory = new File(confDirectoryName);\r\n if (parentDirectory.exists()) {\r\n parentDirectory.delete();\r\n }\r\n }", "@Test\n\tpublic void removeUnneededDirectory() throws IOException {\n\t\tfinal Path targetDir = _temp.toPath().resolve(\"target\");\n\t\tfinal Path fsTargetDir = targetDir.resolve(DIR_FIRSTSPIRIT_5);\n\t\tfinal Path installerTar = new File(getClass().getResource(TEST_INSTALLER_TAR_GZ).getFile()).toPath();\n\t\tServerInstaller.decompressInstaller(targetDir, installerTar);\n\t\tassertTrue(fsTargetDir.toFile().exists(), DIR_FIRSTSPIRIT_5 + \" dir should exist\");\n\n\t\t// test\n\t\tServerInstaller.removeUnneededDirectory(targetDir);\n\n\t\t// verify\n\t\tassertFalse(fsTargetDir.toFile().exists(), DIR_FIRSTSPIRIT_5 + \" dir should have been deleted\");\n\t}", "public void removeUncheckedPolicy()\n\tthrows PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\t\n\n\tif (uncheckedPermissions != null) {\n\t uncheckedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "public static void deleteCache(Context context) {\n Glide.get(context).clearMemory();\n\n try {\n File dir = context.getCacheDir();\n deleteDir(dir);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }", "void removePolicyController(PolicyController controller);", "private void removeExpiryEntry(String lectid,javax.servlet.ServletContext context ){\n try {\n// ReflectorStatusManager.removeLoad_and_Sessionid_Peer(lectid);\n Criteria crit=new Criteria();\n crit.add(UrlConectionPeer.LECTUREID,Integer.parseInt(lectid));\n UrlConectionPeer.doDelete(crit);\n // ReflectorStatusManager.removeLoad_and_Sessionid_Peer(lectid);\n\t\t\tjava.io.File filepath=new java.io.File(context.getRealPath(lectid+\".xml\"));\n if(filepath.exists())\n \tfilepath.delete();\n \t} catch(Exception e){ ServerLog.log(\" Exceptio in ReflectorHandler.java \"+e.getMessage()); }\n\t}", "public void clean()\r\n {\r\n // DO NOT TOUCH\r\n // System.out.println(unzipedFilePath);\r\n\r\n // only clean if there was a successful unzipping\r\n if (success)\r\n {\r\n // only clean if the file path to remove matches the zipped file.\r\n if (unzippedFilePath.equals(zippedFilePath.substring(0,\r\n zippedFilePath.length() - 4)))\r\n {\r\n // System.out.println(\"to be implmented\");\r\n for (File c : outputDir.listFiles())\r\n {\r\n // System.out.println(c.toString());\r\n if (!c.delete())\r\n {\r\n System.out.println(\"failed to delete\" + c.toString());\r\n }\r\n }\r\n outputDir.delete();\r\n outputDir = null;\r\n }\r\n }\r\n }", "public static void deleteCache(Context context){\n File baseDir = getResourcesFolder(context);\n //basDir could be null if storage has not yet been selected (extreme cases where memory is too low)\n if(baseDir != null) {\n File[] content = baseDir.listFiles();\n if(content != null)\n for (File file : content)\n deleteRecursively(file);\n }\n }", "private void cleanupLocal() throws IOException {\n FileSystem lfs = FileSystem.getLocal(new Configuration());\n lfs.delete(new Path(\"build\"), true);\n System.setProperty(\"hadoop.log.dir\", \"logs\");\n }", "public void exit(Context context) {\n // clear cache\n deleteFile(context.getCacheDir());\n deleteFile(context.getFilesDir());\n }", "private void deleteCacheFiles() {\n\n\t\t// get the directory file\n\t\tFile cache = new File(Constants.CACHE_DIR_PATH);\n\n\t\t// check if we got the correct instance of that directory file.\n\t\tif (!cache.exists() || !cache.isDirectory())\n\t\t\treturn;\n\n\t\t// gets the list of files in the directory\n\t\tFile[] files = cache.listFiles();\n\t\t// deleting\n\n\t\tdeleteFiles(cache);\n\t\tfiles = null;\n\t\tcache = null;\n\n\t}", "@AfterClass\n public static void teardown() {\n logger.info(\"teardown: remove the temporary directory\");\n\n // the assumption is that we only have one level of temporary files\n for (File file : directory.listFiles()) {\n file.delete();\n }\n directory.delete();\n }", "private void removeTmpConfigFile() throws IOException {\n fileSystem.delete(tempConfigPath, true);\n LOG.info(\"delete temp configuration file: \" + tempConfigPath);\n }", "@AfterClass\n public static void cleanup() throws Exception {\n fs.delete(new Path(baseDir), true);\n }", "void removePolicyController(String name);", "private void deleteFile() {\n\t\tFile dir = getFilesDir();\n\t\tFile file = new File(dir, FILENAME);\n\t\tfile.delete();\n\t}", "public static void removeEmptyPathsOnClient() {\r\n\t\tfinal File libRoot = JSurePreferencesUtility.getJSureXMLDirectory();\r\n\t\tif (libRoot != null) {\r\n\t\t\tFileUtility.deleteEmptySubDirectories(libRoot);\r\n\t\t}\r\n\t}", "public static void remove() {\n contexts.remove();\n log.finest(\"FHIRRequestContext.remove invoked.\");\n }", "public static void cleanUpCustomTempDirectories(){\n\n\t\tif(tempDirectoryList != null){\n\t\t\tlog.info(\"Removing custom temp directories\");\n\t\t\ttry {\n\t\t\t\tfor(File tempFile : tempDirectoryList)\n\t\t\t\t\tif(tempFile.exists()){\n\t\t\t\t\t\tlog.info(\"Deleting : \" + tempFile.getCanonicalPath());\n\t\t\t\t\t\tdeleteDirectory(tempFile);\n\t\t\t\t\t}\n\t\t\t\t// also remove all file references from ArrayList\n\t\t\t\ttempDirectoryList.clear();\n\t\t\t} catch (IOException e) {e.printStackTrace();}\n\t\t}\n\t\telse\n\t\t\tlog.info(\"No custom temp directory created.\");\n\t\tlog.info(\"Finished removing custom temp directories\");\n\t}", "private static void removeFromWorking(String fileName) {\n for (File file : WORKING_DIR.listFiles()) {\n if (!file.isDirectory()) {\n if (file.getName().equals(fileName)) {\n file.delete();\n break;\n }\n }\n }\n }", "public static void deleteCache(Context context) {\n try {\n File dir = context.getCacheDir();\n deleteDir(dir);\n } catch (Exception e) {}\n }", "@Override public void cleanupTempCheckpointDirectory() throws IgniteCheckedException {\n try {\n try (DirectoryStream<Path> files = Files.newDirectoryStream(cpDir.toPath(), TMP_FILE_MATCHER::matches)) {\n for (Path path : files)\n Files.delete(path);\n }\n }\n catch (IOException e) {\n throw new IgniteCheckedException(\"Failed to cleanup checkpoint directory from temporary files: \" + cpDir, e);\n }\n }", "public void remFile(){\n ((MvwDefinitionDMO) core).remFile();\n }", "private void cleanTempFolder() {\n File tmpFolder = new File(getTmpPath());\n if (tmpFolder.isDirectory()) {\n String[] children = tmpFolder.list();\n for (int i = 0; i < children.length; i++) {\n if (children[i].startsWith(TMP_IMAGE_PREFIX)) {\n new File(tmpFolder, children[i]).delete();\n }\n }\n }\n }", "public void deleteTmpDirectory() {\n\t\tdeleteTmpDirectory(tmpDir);\n\t}", "private void tearDown() {\n if (tempDir != null) {\n OS.deleteDirectory(tempDir);\n tempFiles.clear();\n tempDir = null;\n }\n }", "private void clearPathIds(){\n synchronized (pathsToBeTraversed) {\n Iterator<Long> iterator = pathsToBeTraversed.iterator();\n while (iterator.hasNext()) {\n Long trackId = iterator.next();\n try {\n namesystem.removeXattr(trackId,\n HdfsServerConstants.XATTR_SATISFY_STORAGE_POLICY);\n } catch (IOException e) {\n LOG.debug(\"Failed to remove sps xattr!\", e);\n }\n iterator.remove();\n }\n }\n }", "private void unWatchDir(Path path) {\n watcher_service.deRegisterAll(path);\n }", "@Override\n public void clean(Path path) {\n }", "@Override\r\n\tpublic void remFile(String path) {\n\t\t\r\n\t}", "void deleteDirectories() {\n\n if (story_directory != null && !newStoryReady) {\n deleteStoryDirectory();\n }\n\n if (tag_directory != null && !newStoryReady) {\n deleteTagDirectory();\n }\n\n if (cover_directory != null && !newStoryReady) {\n deleteCoverDirectory();\n }\n }", "private Step deleteLocalWorkingDir() {\n return stepBuilderFactory.get(STEP_DELETE_LOCAL_WORK_DIR)\n .tasklet(deleteLocalWorkingDir)\n .build();\n }", "public void cleanUnusedResumeAndProfilePic(String addressBookXmlFilePath) {\n HashSet<String> usedFiles = new HashSet<String>();\n\n for (Person p: model.getAddressBook().getPersonList()) {\n if (p.getResume().value != null) {\n usedFiles.add(p.getResume().value.substring(5)); //\"data\\...\"\n }\n }\n for (Person p: model.getAddressBook().getPersonList()) {\n if (p.getProfileImage().value != null) {\n usedFiles.add(p.getProfileImage().value.substring(5)); //\"data\\...\"\n }\n }\n\n String userDir = System.getProperty(\"user.dir\");\n File dataDir = new File(userDir + File.separator + \"data\");\n File[] dataDirList = dataDir.listFiles();\n\n if (dataDirList == null) {\n return;\n }\n\n for (File child : dataDirList) {\n if (child.getName().lastIndexOf(\".\") == -1 && !usedFiles.contains(child.getName())) {\n child.delete();\n }\n }\n }", "public void deleteStorage() {\n deleteReportDir(reportDir_);\n reportDir_ = null;\n deleteReportDir(leftoverDir_);\n leftoverDir_ = null;\n }", "protected void tearDown()\n {\n super.tearDown();\n ClassLoader classLoader = getClass().getClassLoader();\n File folder = null;\n try\n {\n folder = new File(classLoader.getResource(\"levels\").toURI().getPath());\n } catch (URISyntaxException e)\n {\n e.printStackTrace();\n }\n File[] listOfFiles = folder.listFiles();\n\n for (File f : listOfFiles)\n {\n if (!f.getPath().contains(\"level1.txt\") && !f.getPath().contains(\"level2.txt\") &&\n !f.getPath().contains(\"level3.txt\"))\n {\n try\n {\n Files.delete(f.toPath());\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n }\n }", "public synchronized void purgeApplication(String appName) {\n File appDir = new File(appsDir, appName);\n if (!FilePathValidator.validateFile(appDir, appsDir)) {\n throw new ApplicationException(\"Application attempting to create files outside the apps directory\");\n }\n try {\n Tools.removeDirectory(appDir);\n } catch (IOException e) {\n throw new ApplicationException(\"Unable to purge application \" + appName, e);\n }\n if (appDir.exists()) {\n throw new ApplicationException(\"Unable to purge application \" + appName);\n }\n }", "private void removeOldFiles() {\n Set<File> existingFiles = new HashSet<File>();\n collectFiles(existingFiles);\n for (ResourceResponse r : cacheResponseProcessor.getResources()) {\n String remotePathId = r.pathId;\n String remotePath = localClasspathProcessor.getLocalClasspath().get(remotePathId);\n String localPath = localPathTranslation.get(remotePath);\n File localFile = new File(localPath);\n File file = new File(localFile, r.name);\n existingFiles.remove(file);\n }\n }", "static void logout() {\n\t\tserver.clearSharedFiles(username);\n\t\tserver.clearNotSharedFiles(username);\n\t}", "@Override\n\tpublic void delete()\n\t{\n\t\tcachedContent = null;\n\t\tFile outputFile = getStoreLocation();\n\t\tif ((outputFile != null) && outputFile.exists())\n\t\t{\n\t\t\tif (Files.remove(outputFile) == false)\n\t\t\t{\n\t\t\t\tlog.error(\"failed to delete file: \" + outputFile.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t}", "private void clean(Path path) throws IOException {\n if (Files.exists(path)) {\n Files.walkFileTree(path, new SimpleFileVisitor<>() {\n public FileVisitResult visitFile(Path path, BasicFileAttributes attributes) throws IOException {\n Files.delete(path);\n return FileVisitResult.CONTINUE;\n }\n\n public FileVisitResult postVisitDirectory(Path path, IOException exception) throws IOException {\n Files.delete(path);\n return FileVisitResult.CONTINUE;\n }\n });\n }\n }", "private void log_out() {\n File xx = new File(\"resource/data/staff_id_logedin.txt\");\n if(xx.isFile()){\n xx.delete();\n }\n this.dispose();\n }", "public static void deleteOutputDir(Configuration conf) throws IOException {\n Path outputPath = getOutputPath(conf);\n outputPath.getFileSystem(conf).delete(outputPath, true);\n }", "private void removeLocalDockerImageFiles(PluginPackages pluginPackage) {\n String versionPath = SystemUtils.getTempFolderPath() + pluginPackage.getName() + \"-\"\n + pluginPackage.getVersion() + \"/\";\n File versionDirectory = new File(versionPath);\n try {\n log.info(\"Delete directory: {}\", versionPath);\n FileUtils.deleteDirectory(versionDirectory);\n } catch (IOException e) {\n log.error(\"Remove plugin package file failed: {}\", e);\n throw new WecubeCoreException(\"3107\", \"Remove plugin package file failed.\");\n }\n }", "@PreAuthorize(\"hasRole('ROLE_ROOT')\")\n\tpublic void deleteFileUploads();", "@Override\n public void onRemoval(final RemovalNotification<String, Optional<File>> notification) {\n if (!notification.getKey().endsWith(\"/\") && tempDirectory != null && notification.getValue().isPresent())\n FileRemovals.delete(notification.getValue().get());\n }", "@AfterClass\n\tpublic static void cleanup() {\n\t\ttestDir.delete();\n\t\tfile.delete();\n\t}", "public void removePreviouslySavedFilesFromSDCard() {\n\t\tFile file = ctxt.getExternalFilesDir(Tattle_Config_Constants.SD_FOLDER_NAME + File.separator);\n\t\tif (file.exists()) {\n\t\t\tFile[] files = file.listFiles();\n\t\t\tfor (File f : files) {\n\t\t\t\tf.delete();\n\t\t\t}\n\t\t}\n\t\tfile.delete();\n\t}", "static void releaseConfigFiles() throws Exception {\r\n ConfigManager configManager = ConfigManager.getInstance();\r\n for (Iterator iterator = configManager.getAllNamespaces(); iterator.hasNext();) {\r\n configManager.removeNamespace((String) iterator.next());\r\n }\r\n }", "public void clean(){\n preprocessorActionsPerFile.clear();\n }", "@AfterClass\n\tpublic static void cleanUp() throws IOException {\n\t\tLpeFileUtils.removeDir(tempDir.getAbsolutePath());\n\t}", "public static void deleteCache(Context context) {\n try {\n File dir = context.getExternalCacheDir();\n deleteDir(dir);\n } catch (Exception e) { e.printStackTrace();}\n }", "private Step deleteHdfsWorkingDir() {\n return stepBuilderFactory.get(STEP_DELETE_HDFS_WORK_DIR)\n .tasklet(deleteHdfsWorkingDir)\n .build();\n }", "public static void deleteTempMapset() {\r\n if ((getGrassMapsetFolder() != null) && (getGrassMapsetFolder().length() > 2)) {\r\n String tmpFolder;\r\n tmpFolder = new String(getGrassMapsetFolder().substring(0, getGrassMapsetFolder().lastIndexOf(File.separator)));\r\n if (new File(tmpFolder).exists()) {\r\n deleteDirectory(new File(tmpFolder));\r\n }\r\n }\r\n }", "File prepareTempSourceDirectory() throws FileNotFoundException, IOException{\n\t\tFile tempfile = null;\n\t\tFile tempdir = null;\n\t\ttempfile = File.createTempFile(\"temp\", \"Delete\");\n\t\ttempdir = tempfile.getParentFile();\n\t\ttempfile.delete();\n\t\ttempdir = new File(tempdir, \"SAFS_UPDATE\");\n\t\ttempdir.mkdir();\n\n\t\tFile[] files = tempdir.listFiles();\n\t\tif(files != null && files.length > 0){\n\t\t\tfor(File file:files){\n\t\t\t\tif(file.isDirectory()) {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tFileUtilities.deleteDirectoryRecursively(file.getAbsolutePath(), false);\n\t\t\t\t\t}catch(Throwable x){\n\t\t\t\t\t\t// java.lang.NoClassDefFoundError\n\t\t\t\t\t\terrors.println(x.getClass().getName()+\": \"+x.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\ttry{\n\t\t\t\t\t\tfile.delete();\n\t\t\t\t\t}catch(Throwable x){\n\t\t\t\t\t\terrors.println(x.getClass().getName()+\": \"+x.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(tempdir==null || !tempdir.isDirectory()) throw new IOException(\"Cannot deduce a root source directory for HTTP extraction.\");\n\t\treturn tempdir;\n\t}", "void removeIndexDir(String indexDirPath) throws IOException {\n File indexDir = new File(indexDirPath);\n if (indexDir.exists())\n FileUtils.deleteDirectory(indexDir);\n }", "private void emptyTestDirectory() {\n // Delete the files in the /tmp/QVCSTestFiles directory.\n File tempDirectory = new File(TestHelper.buildTestDirectoryName(TEST_SUBDIRECTORY));\n File[] files = tempDirectory.listFiles();\n if (files != null) {\n for (File file : files) {\n if (file.isDirectory()) {\n File[] subFiles = file.listFiles();\n for (File subFile : subFiles) {\n if (subFile.isDirectory()) {\n File[] subSubFiles = subFile.listFiles();\n for (File subSubFile : subSubFiles) {\n subSubFile.delete();\n }\n }\n subFile.delete();\n }\n }\n file.delete();\n }\n }\n }", "void unsetRequiredResources();", "private void removeServiceDirectory(String serviceID){\n \n //If map \"servicesDirectories\" contains the serviceID\n if(servicesDirectories.containsKey(serviceID)){\n \n //Get directory associated to serviceID\n File dir = servicesDirectories.get(serviceID);\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete();\n \n //Delete directory\n dir.delete();\n \n //Remove directory from map \"servicesDirectories\"\n servicesDirectories.remove(serviceID);\n \n }\n \n }", "protected void deleteTmpDirectory(File file) {\n\t\tif (file.exists() && file.canWrite()) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tFile[] files = file.listFiles();\n\t\t\t\tfor (File child : files) {\n\t\t\t\t\tif (child.isDirectory()) {\n\t\t\t\t\t\tdeleteTmpDirectory(child);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfile.delete();\n\t\t}\n\t}", "private void cleanReporter(){\n File file = new File(\"test-report.html\");\n file.delete();\n\n }", "@TestFor(issues = \"TW-42737\")\n public void test_directory_remove() throws Exception {\n CommitPatchBuilder patchBuilder = myCommitSupport.getCommitPatchBuilder(myRoot);\n patchBuilder.createFile(\"dir/file\", new ByteArrayInputStream(\"content\".getBytes()));\n patchBuilder.createFile(\"dir2/file\", new ByteArrayInputStream(\"content\".getBytes()));\n patchBuilder.commit(new CommitSettingsImpl(\"user\", \"Create dir with file\"));\n patchBuilder.dispose();\n\n RepositoryStateData state1 = myGit.getCurrentState(myRoot);\n\n patchBuilder = myCommitSupport.getCommitPatchBuilder(myRoot);\n patchBuilder.deleteDirectory(\"dir\");\n patchBuilder.commit(new CommitSettingsImpl(\"user\", \"Delete dir\"));\n patchBuilder.dispose();\n\n RepositoryStateData state2 = myGit.getCurrentState(myRoot);\n\n List<ModificationData> changes = myGit.getCollectChangesPolicy().collectChanges(myRoot, state1, state2, CheckoutRules.DEFAULT);\n then(changes).hasSize(1);\n then(changes.get(0).getChanges()).extracting(\"fileName\", \"type\").containsOnly(Tuple.tuple(\"dir/file\", VcsChange.Type.REMOVED));\n }", "private static void deletePublicationDir(File pubDir) {\n System.out.println(\" Deleting contents of directory: \" + pubDir);\n for (File pubFile : pubDir.listFiles()) {\n if (pubFile.isFile()) {\n System.out.println(\" Deleting file: \" + pubFile);\n pubFile.delete();\n }\n }\n System.out.println(\" Now deleting directory: \" + pubDir);\n pubDir.delete();\n }", "public void deleteMoreFile() {\n\t\tFile outfile = new File(outFileString);\n\t\tFile files[] = outfile.listFiles();\n\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\tString name = files[i].getAbsolutePath();\n\t\t\tif ((!name.contains(\"SICG\")) && (!name.contains(\"AndroidManifest.xml\"))) {\n\t\t\t\tDirDelete delete = new DirDelete();\n\t\t\t\tdelete.deleteDir(files[i]);\n\t\t\t}\n\t\t}\n\t}", "private void deleteResidualFile()\n\t{\n\t\tFile[] trainingSetFileName = directoryHandler.getTrainingsetDir().listFiles();\n\t\ttry\n\t\t{\n\t\t\tfor (int i = 1; i < nu; i++) trainingSetFileName[i].delete();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "static void deleteIfExists(Configuration conf, String rel)\n throws IOException {\n FileSystem fs = FileSystem.get(conf);\n Path path = getOutputPath(conf, rel);\n if (fs.isDirectory(path) || fs.isFile(path)) {\n fs.delete(path, true);\n }\n }", "public void removeStoredCsvFile(HttpServletRequest request) {\n String filePath = (String) request.getSession().getAttribute(CSV_FILE_PATH_KEY);\n if (filePath == null) {\n return;\n }\n File csvFile = new File(filePath);\n if (csvFile.exists()) {\n csvFile.delete();\n }\n request.getSession().setAttribute(CSV_FILE_PATH_KEY, null);\n request.getSession().setAttribute(CSV_ORIGINAL_FILE_NAME_KEY, null);\n }", "public void cleanDirs() {\n\t\tfor (File f : files) {\n\t\t\tFileUtils.deleteDir(f.toString());\n\t\t}\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tFile dir = new File(\"src/reports\");\n\t\t\t\tfor (File file : dir.listFiles())\n\t\t\t\tif (!file.isDirectory())\n\t\t\t\tfile.delete();\n\t\t\t\t}", "private void deleteKeyFile() {\n final String methodName = \":deleteKeyFile\";\n final File keyFile = new File(mContext.getDir(mContext.getPackageName(),\n Context.MODE_PRIVATE), ADALKS);\n if (keyFile.exists()) {\n Logger.v(TAG + methodName, \"Delete KeyFile\");\n if (!keyFile.delete()) {\n Logger.v(TAG + methodName, \"Delete KeyFile failed\");\n }\n }\n }", "public void ungeneratePath() {\n path = oldPaths.pop();\n }", "public static void clearContext() {\n log.debug(\"Clearing the current HTTP Request Headers context\");\n context.remove();\n }", "protected static void deleteTrash() {\n\t\tArrays.stream(new File(\".\").listFiles())\n\t\t\t.filter(f -> f.getName().startsWith(\"_tmp.\"))\n\t\t\t.forEach(File::delete);\n\t}", "AgentPolicyBuilder clear();", "public void unsetFileName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FILENAME$0, 0);\n }\n }", "public Set<String> removeManagedDirectory(String managedDirectory) throws ConfigurationException {\n\t\tConfiguration config = this.currentConfiguration();\n\n\t\tSet<String> directories = Sets.newHashSet(config.getDirectories());\n\t\tdirectories.remove(managedDirectory);\n\t\tconfig.setDirectories(directories);\n\n\t\tsaveConfiguration(config);\n\t\treturn directories;\n\t}", "public void deleteLocal() {\n if (isLocal()) {\n deleteFileOrFolder(new File(getLocalOsPath()));\n }\n }", "public void deleteDir() throws Exception\n{\n if(_repo!=null) _repo.close(); _repo = null;\n _gdir.delete();\n _gdir.setProp(GitDir.class.getName(), null);\n}" ]
[ "0.7288538", "0.68208706", "0.6328023", "0.6068308", "0.6056553", "0.6022023", "0.6011502", "0.59609795", "0.59355575", "0.58667845", "0.5791924", "0.57890916", "0.57748926", "0.5754761", "0.5738609", "0.57046807", "0.5658921", "0.5652559", "0.56396556", "0.5631863", "0.5621848", "0.55436397", "0.55288196", "0.5524766", "0.55161685", "0.55144155", "0.5489623", "0.54887706", "0.5486063", "0.54814094", "0.5481004", "0.5477735", "0.54663944", "0.5446451", "0.5445428", "0.5442912", "0.5428438", "0.5426373", "0.54221344", "0.5410015", "0.5404022", "0.54025716", "0.5390447", "0.5387518", "0.53840953", "0.53737473", "0.5365645", "0.5359381", "0.53479964", "0.5336439", "0.5328011", "0.5324582", "0.53225094", "0.53131884", "0.5308184", "0.5303307", "0.5303062", "0.529243", "0.52840966", "0.5275316", "0.5274737", "0.5270275", "0.52696884", "0.5263657", "0.5254426", "0.5240994", "0.52298343", "0.5228707", "0.5220271", "0.5209455", "0.5203487", "0.51995224", "0.5184844", "0.517514", "0.5173629", "0.51672065", "0.51662815", "0.5151129", "0.51478773", "0.5130272", "0.51261294", "0.51228124", "0.5122176", "0.51188684", "0.5113068", "0.5111321", "0.5111059", "0.5109498", "0.5108716", "0.51051813", "0.5105106", "0.510383", "0.5102957", "0.5100604", "0.50920427", "0.5073864", "0.5067956", "0.50623965", "0.5058526", "0.5056661" ]
0.81378543
0
remove the external (file) policy statements.
private void removePolicyFile(boolean granted){ String fileName = getPolicyFileName(granted); File f = new File(fileName); if(f.exists()){ if (!f.delete()) { String defMsg = "Failure removing policy file: "+fileName; String msg=localStrings.getLocalString("pc.file_delete_error", defMsg,new Object []{ fileName} ); logger.log(Level.SEVERE,msg); throw new RuntimeException(defMsg); } else if(logger.isLoggable(Level.FINE)){ logger.fine("JACC Policy Provider: Policy file removed: "+fileName); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removePolicy(){\n\texcludedPermissions = null;\n\tuncheckedPermissions = null;\n\trolePermissionsTable = null;\n\tremovePolicyFile(true);\n\tremovePolicyFile(false);\n\tremovePolicyContextDirectory();\n\tinitLinkTable();\n\tpolicy = null;\n\twriteOnCommit = true;\n }", "public void unsetFilePlac()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FILEPLAC$12, 0);\n }\n }", "public void removeUncheckedPolicy()\n\tthrows PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\t\n\n\tif (uncheckedPermissions != null) {\n\t uncheckedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "void clearPolicy() {\n policy = new Policy();\n }", "public void removeAllOfficialFileWebpage() {\r\n\t\tBase.removeAll(this.model, this.getResource(), OFFICIALFILEWEBPAGE);\r\n\t}", "public void removeExcludedPolicy()\n throws PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\n\n\tif (excludedPermissions != null) {\n\t excludedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "void removePolicyController(String name);", "private void removePolicyContextDirectory(){\n\tString directoryName = getContextDirectoryName();\n\tFile f = new File(directoryName);\n\tif(f.exists()){\n\n // WORKAROUND: due to existence of timestamp file in given directory\n // for SE/EE synchronization\n File[] files = f.listFiles();\n if (files != null && files.length > 0) {\n for (int i = 0; i < files.length; i++) {\n files[i].delete();\n }\n }\n //WORKAROUND: End \n\n\t if (!f.delete()) {\n String defMsg = \"Failure removing policy context directory: \"+directoryName;\n String msg=localStrings.getLocalString(\"pc.file_delete_error\", defMsg);\n\t\tlogger.log(Level.SEVERE,msg);\n\t\tthrow new RuntimeException(defMsg);\n\t } else if(logger.isLoggable(Level.FINE)){\n\t\tlogger.fine(\"JACC Policy Provider: Policy context directory removed: \"+directoryName);\n\t }\n\n File appDir = f.getParentFile();\n // WORKAROUND: due to existence of timestamp file in given directory\n // for SE/EE synchronization\n File[] fs = appDir.listFiles();\n if (fs != null && fs.length > 0) {\n boolean hasDir = false;\n for (int i = 0; i < fs.length; i++) {\n if (fs[i].isDirectory()) {\n hasDir = true;\n break;\n }\n }\n if (!hasDir) {\n for (int i = 0; i < fs.length; i++) {\n fs[i].delete();\n }\n }\n }\n //WORKAROUND: End \n\n File[] moduleDirs = appDir.listFiles();\n if (moduleDirs == null || moduleDirs.length == 0) {\n if (!appDir.delete()) {\n String defMsg = \"Failure removing policy context directory: \" + appDir;\n String msg = localStrings.getLocalString(\"pc.file_delete_error\", defMsg);\n\t\t logger.log(Level.SEVERE,msg);\n\t\t throw new RuntimeException(defMsg);\n }\n }\n\t}\n }", "public void clean(){\n preprocessorActionsPerFile.clear();\n }", "void deleteChains() {\n\t\tif (!params.isDebug()) {\n\t\t\tfor (File deleteCandidate : toDelete) {\n\t\t\t\tdeleteCandidate.delete();\n\t\t\t\t\n\t\t\t\ttry (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(deleteCandidate.toPath())) {\n\t\t\t\t\tfor (Path path : directoryStream) {\n\t\t\t\t\t\tif (!path.getFileName().toString().endsWith(\"_SCWRLed.pdb\")) {\n\t\t\t\t\t\t\tpath.toFile().delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void removeIneffectiveDeclarations()\n\t{\n\t\t_declarations.removeIf((p) -> !p.isIgnored() && !p.isEffective());\n\t}", "public void unsetFileStrc()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FILESTRC$4, 0);\n }\n }", "public void unsetComparesource()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(COMPARESOURCE$2, 0);\r\n }\r\n }", "void cleanScript();", "private void removeOldFiles() {\n Set<File> existingFiles = new HashSet<File>();\n collectFiles(existingFiles);\n for (ResourceResponse r : cacheResponseProcessor.getResources()) {\n String remotePathId = r.pathId;\n String remotePath = localClasspathProcessor.getLocalClasspath().get(remotePathId);\n String localPath = localPathTranslation.get(remotePath);\n File localFile = new File(localPath);\n File file = new File(localFile, r.name);\n existingFiles.remove(file);\n }\n }", "void unsetRequiredResources();", "public void removeInvalidUndoDeclarations()\n\t{\n\t\t_declarations.removeIf((p) -> !p.isIgnored() && p.isInvalidUndo());\n\t}", "public void remFile(){\n ((MvwDefinitionDMO) core).remFile();\n }", "void removePolicyController(PolicyController controller);", "public void removeRlsSourceFile(IAstRlsSourceFile rlsFile);", "void deleteTranslatedFiles(InformationResourceFile irFile);", "public void unsetRules()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(RULES$26);\n }\n }", "void removeAllRawLicenses();", "private void removeStatement(){\n\t\tsynchronized(m_viz){\n\t\t\tTuple firstTuple;\n\t\t\tsynchronized(statementList){\n\t\t\t\tfirstTuple = statementList.getFirst();\n\t\t\t}\n\n\t\t\t// Remove action is synchronized to prevent PreFuse from drawing at the same time\n\t\t\tremoveMessage(firstTuple);\n\t\t\tm_statements.removeTuple(firstTuple);\n\t\t\tstatementList.removeFirst();\t\t\t\n\t\t}\n\t}", "private void del_file() {\n\t\tFormatter f;\n\t\ttry{\n\t\t\tf = new Formatter(url2); //deleting file content\n\t\t\tf.format(\"%s\", \"\");\n\t\t\tf.close();\t\t\t\n\t\t}catch(Exception e){}\n\t}", "public void deleteMoreFile() {\n\t\tFile outfile = new File(outFileString);\n\t\tFile files[] = outfile.listFiles();\n\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\tString name = files[i].getAbsolutePath();\n\t\t\tif ((!name.contains(\"SICG\")) && (!name.contains(\"AndroidManifest.xml\"))) {\n\t\t\t\tDirDelete delete = new DirDelete();\n\t\t\t\tdelete.deleteDir(files[i]);\n\t\t\t}\n\t\t}\n\t}", "private void deleteStylesheet() {\n\n// find start of the section\nString str = strBuf.toString();\nfinal int start = str.indexOf( SEC_START );\n\nif ( start == -1 ) {\n// section not contained, so just return ...\nreturn;\n}\n\n// find end of section\nfinal int end = str.indexOf( SEC_END, start );\n\n// delete section\nstrBuf.delete( start, end + 2 );\n}", "private void removeClutterAroundMainContent()\r\n \t{\n \r\n \t\tNodes mainContent = xPathQuery(XPath.NON_STANDARD_MAIN_CONTENT.query);\r\n \t\tif (mainContent.size() > 0)\r\n \t\t\thasStandardLayout = false;\r\n \t\telse {\r\n \t\t\tmainContent = xPathQuery(XPath.MAIN_CONTENT_1.query);\r\n \t\t\tif (mainContent.size() == 0)\r\n \t\t\t\tmainContent = xPathQuery(XPath.MAIN_CONTENT_2.query);\r\n \t\t}\r\n \t\tdeleteNodes(XPath.BODY_NODES.query);\r\n \t\tmoveNodesTo(mainContent, bodyTag);\r\n \t}", "public void deleteGeneratedFiles();", "public void removeScript() {\n scriptHistory = null;\n }", "private void deleteResidualFile()\n\t{\n\t\tFile[] trainingSetFileName = directoryHandler.getTrainingsetDir().listFiles();\n\t\ttry\n\t\t{\n\t\t\tfor (int i = 1; i < nu; i++) trainingSetFileName[i].delete();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void removeAllOriginalTextWriter() {\r\n\t\tBase.removeAll(this.model, this.getResource(), ORIGINALTEXTWRITER);\r\n\t}", "void removeStatement(Resource subject, URI predicate, String literal,\r\n\t\t\tString languageTag) throws ModelRuntimeException;", "void removeSWFURL(String toRemove);", "public static void removeRestrictions() {\n\t\ttry {\n\t\t\tClass<?> jceSecurityClass = Class.forName(\"javax.crypto.JceSecurity\");\n\t\t\tClass<?> cryptoPermissionsClass = Class.forName(\"javax.crypto.CryptoPermissions\");\n\t\t\tClass<?> cryptoAllPermissionClass = Class.forName(\"javax.crypto.CryptoAllPermission\");\n\n\t\t\tField isRestrictedField = jceSecurityClass.getDeclaredField(\"isRestricted\");\n\t\t\tisRestrictedField.setAccessible(true);\n\t\t\tisRestrictedField.set(null, false);\n\n\t\t\tField defaultPolicyField = jceSecurityClass.getDeclaredField(\"defaultPolicy\");\n\t\t\tdefaultPolicyField.setAccessible(true);\n\t\t\tPermissionCollection defaultPolicy = (PermissionCollection) defaultPolicyField.get(null);\n\n\t\t\tField permsField = cryptoPermissionsClass.getDeclaredField(\"perms\");\n\t\t\tpermsField.setAccessible(true);\n\t\t\t((Map<?, ?>) permsField.get(defaultPolicy)).clear();\n\n\t\t\tField cryptoAllPermissionInstanceField = cryptoAllPermissionClass.getDeclaredField(\"INSTANCE\");\n\t\t\tcryptoAllPermissionInstanceField.setAccessible(true);\n\t\t\tdefaultPolicy.add((Permission) cryptoAllPermissionInstanceField.get(null));\n\t\t} catch (Exception e) {\n\t\t\t// ignore\n\t\t}\n }", "public static void removePlurals(ArrayList<String> list){\r\n //Loop through the list\r\n for(i = 0; i < list.size(); i++){\r\n if(list.get(i).endsWith(\"s\") || list.get(i).endsWith(\"S\")){\r\n list.remove(i);\r\n i--;\r\n } \r\n }\r\n }", "@Override\n\tpublic void undo() {\n\t\tsecurity.off();\n\t}", "private void clearFiles() {\r\n File file = new File(\"test_files/upload\");\r\n File[] files = file.listFiles();\r\n for (File delFile : files) {\r\n delFile.delete();\r\n }\r\n file = new File(\"test_files/stress.jar\");\r\n file.delete();\r\n }", "public void cleanUp(){\n for(ShaderProgram sp : shaderlist){\n sp.cleanup();\n }\n }", "public void unsetVerStmt()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(VERSTMT$22, 0);\n }\n }", "private void removeContentsFromFile() {\n Log.d(\"debugMode\", \"deleting entire file contents...\");\n try {\n FileOutputStream openFileInput = openFileOutput(\"Locations.txt\", MODE_PRIVATE);\n PrintWriter printWriter = new PrintWriter(openFileInput);\n printWriter.print(\"\");\n printWriter.close();\n Log.d(\"debugMode\", \"deleting entire file contents successful\");\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "void removeStatement(String subjectURIString, URI predicate,\r\n\t\t\tString literal, String languageTag) throws ModelRuntimeException;", "public void removeEPN() {\r\n\r\n\t\tfor (EPStatement statement : epnStatements) {\r\n\t\t\tstatement.destroy();\r\n\t\t}\r\n\r\n\t}", "public void cleanup() {\n try {\n Files.delete(path);\n } catch (final IOException e) {\n throw new StageAccessException(\"Unable to delete staged document!\", e);\n }\n }", "void unsetComments();", "public void removeStatements(final Resource subj, final URI pred, final Value obj,\n final Resource... contexts) throws SailException {\n baseSailConnection.removeStatements(subj, pred, obj, contexts);\n }", "public void cleanUnusedResumeAndProfilePic(String addressBookXmlFilePath) {\n HashSet<String> usedFiles = new HashSet<String>();\n\n for (Person p: model.getAddressBook().getPersonList()) {\n if (p.getResume().value != null) {\n usedFiles.add(p.getResume().value.substring(5)); //\"data\\...\"\n }\n }\n for (Person p: model.getAddressBook().getPersonList()) {\n if (p.getProfileImage().value != null) {\n usedFiles.add(p.getProfileImage().value.substring(5)); //\"data\\...\"\n }\n }\n\n String userDir = System.getProperty(\"user.dir\");\n File dataDir = new File(userDir + File.separator + \"data\");\n File[] dataDirList = dataDir.listFiles();\n\n if (dataDirList == null) {\n return;\n }\n\n for (File child : dataDirList) {\n if (child.getName().lastIndexOf(\".\") == -1 && !usedFiles.contains(child.getName())) {\n child.delete();\n }\n }\n }", "public void removeXmlSchema(File file) {\n\t\tDocument doc = null;\n\t\ttry {\n\t\t\tSAXBuilder sax = new SAXBuilder();\n\t\t\tdoc = sax.build(file);\n\t\t} catch (JDOMException | IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(doc != null) {\n\t\t\tElement rootElement = doc.getRootElement();\n\t\t\trootElement.setNamespace(null);\n\t\t\trootElement.removeNamespaceDeclaration(bioNamespace);\n\t\t\trootElement.removeNamespaceDeclaration(xsiNamespace);\n\t\t\trootElement.removeAttribute(\"schemaLocation\", xsiNamespace);\n\t\t\ttry (FileOutputStream fileOutputStream = new FileOutputStream(file)) {\n\t\t\t\ttry {\n\t\t\t\t\tXMLOutputter xmlOutputter = new XMLOutputter(Format.getPrettyFormat());\n\t\t\t\t\txmlOutputter.output(doc, fileOutputStream);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void removeAllOriginalFilename() {\r\n\t\tBase.removeAll(this.model, this.getResource(), ORIGINALFILENAME);\r\n\t}", "public void removeFileInstance()\n {\n this.source = null;\n this.data = null;\n }", "public void unsetFileCont()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FILECONT$2, 0);\n }\n }", "void removeStatement(Resource subject, URI predicate, String literal,\r\n\t\t\tURI datatypeURI) throws ModelRuntimeException;", "public void removeAllRuleRef();", "void unsetIsManaged();", "public void removeFromPolicyTransactions(entity.AppCritPolicyTransaction element);", "private void removeExpiryEntry(String lectid,javax.servlet.ServletContext context ){\n try {\n// ReflectorStatusManager.removeLoad_and_Sessionid_Peer(lectid);\n Criteria crit=new Criteria();\n crit.add(UrlConectionPeer.LECTUREID,Integer.parseInt(lectid));\n UrlConectionPeer.doDelete(crit);\n // ReflectorStatusManager.removeLoad_and_Sessionid_Peer(lectid);\n\t\t\tjava.io.File filepath=new java.io.File(context.getRealPath(lectid+\".xml\"));\n if(filepath.exists())\n \tfilepath.delete();\n \t} catch(Exception e){ ServerLog.log(\" Exceptio in ReflectorHandler.java \"+e.getMessage()); }\n\t}", "public void removeAllOfficialAudioSourceWebpage() {\r\n\t\tBase.removeAll(this.model, this.getResource(), OFFICIALAUDIOSOURCEWEBPAGE);\r\n\t}", "void removeStatement(String subjectURIString, URI predicate,\r\n\t\t\tString literal, URI datatypeURI) throws ModelRuntimeException;", "public void removeExpiredFiles() {\n \t\n \tsetCurrentTimeNow();\n\n File dir = new File(fsResource.getPath());\n File[] list = dir.listFiles(this);\n for (File file : list) {\n \tlogger.info(\"Auto expire file removed: {}\", file.getName());\n \tfile.delete();\n }\n }", "private static void removeSSRs(File input){\n try(\n FileReader fRead = new FileReader(input+\".ssr\");\n BufferedReader bRead = new BufferedReader(fRead);\n FileReader fRead2 = new FileReader(input);\n BufferedReader bRead2 = new BufferedReader(fRead2)\n ){\n ArrayList<String> noSSRFilenames = new ArrayList<>();\n while (true){\n String line = bRead.readLine();\n if (line == null){\n break;\n }\n else{\n String [] nLine = line.split(\"\\t\");\n if (!nLine[0].equals(\"Name\")){\n if (!noSSRFilenames.contains(nLine[0])){\n noSSRFilenames.add(nLine[0]);\n }\n }\n }\n }\n boolean match = false;\n Sequence raw;\n String seqName = \"\";\n while (true) {\n String seqLine = bRead2.readLine();\n if (seqLine == null) {\n break;\n }\n else {\n if (seqLine.charAt(0) == '>') {\n match = false;\n for (String name : noSSRFilenames) {\n if (seqLine.equals(name)) {\n match = true;\n break;\n }\n }\n if (!match) {\n seqName = seqLine;\n }\n }\n //** Sequence objects are created and added to Metagenome\n else if(!match && seqLine.length() > DMMController.getIgnoreShortSeq() ){\n raw = new Sequence(seqName,seqLine,seqLine.length());\n sequences.add(raw);\n }\n }\n }\n }\n catch (Exception e){\n System.out.println(e.getMessage() + \"----------Remove SSRs issue\");\n }\n }", "private void removeJavascript(ServletContext scontext)\r\n {\r\n String webApp = scontext.getContextPath();\r\n javascriptService.remove(scontext);\r\n }", "public void removePrincipleLines() {\n removeFromPane(firstLineFirstPart);\n removeFromPane(firstLineSecondPart);\n removeFromPane(secondLine);\n removeFromPane(thirdLineFirstPart);\n removeFromPane(thirdLineSecondPart);\n removeFromPane(dottedLine1);\n removeFromPane(dottedLine2);\n removeFromPane(dottedLine3);\n }", "void unregister(String policyId);", "public void delete_File(){\n context.deleteFile(Constant.FILE_NAME);\n }", "AgentPolicyBuilder clear();", "void unsetComplianceCheckResult();", "public void desactivateFileMode() {\n logger.removeHandler(mFileHandler);\n }", "public static void doRemove(String fileName) {\n Stage fromSave = Utils.readObject(STAGED_FILES,\n Stage.class);\n HashSet<String> stagedFiles = fromSave.getStagedFiles();\n Commit currHead = Utils.readObject(TREE_DIR, Tree.class).\n getCurrHead();\n if (stagedFiles.contains(fileName) && currHead.getBlobs().\n containsKey(fileName)) {\n File stagedFile = Utils.join(STAGE_DIR, fileName);\n addToStageRemoval(fileName);\n removeFromWorking(fileName);\n stagedFile.delete();\n\n stagedFiles.remove(fileName);\n Stage.save(fromSave);\n } else if (stagedFiles.contains(fileName) && !currHead.getBlobs().\n containsKey(fileName)) {\n File stagedFile = Utils.join(STAGE_DIR, fileName);\n stagedFile.delete();\n\n stagedFiles.remove(fileName);\n Stage.save(fromSave);\n } else if (!stagedFiles.contains(fileName) && currHead.getBlobs().\n containsKey(fileName)) {\n if (!Utils.filesSet(WORKING_DIR).contains(fileName)) {\n File removedFile = Utils.join(STAGE_RM_DIR, fileName);\n try {\n removedFile.createNewFile();\n } catch (IOException ignored) {\n return;\n }\n String contents = currHead.getBlobs().get(fileName).\n getContents();\n Utils.writeContents(removedFile, contents);\n } else {\n addToStageRemoval(fileName);\n removeFromWorking(fileName);\n }\n } else {\n System.out.println(\"No reason to remove the file.\");\n System.exit(0);\n }\n }", "@Override\n public void removeGroupPolicies(Context context, Item item, Group g) throws SQLException, AuthorizeException {\n // remove Group's policies from Item\n authorizeService.removeGroupPolicies(context, item, g);\n\n // remove all policies from bundles\n List<Bundle> bunds = item.getBundles();\n\n for (Bundle mybundle : bunds) {\n List<BundleBitstream> bs = mybundle.getBitstreams();\n\n for (BundleBitstream b : bs) {\n Bitstream bitstream = b.getBitstream();\n // remove bitstream policies\n authorizeService.removeGroupPolicies(context, bitstream, g);\n }\n\n // change bundle policies\n authorizeService.removeGroupPolicies(context, mybundle, g);\n }\n }", "void unsetPurpose();", "void unsetSites();", "public \n void clearWarnings() throws ResourceException;", "private void clearPathIds(){\n synchronized (pathsToBeTraversed) {\n Iterator<Long> iterator = pathsToBeTraversed.iterator();\n while (iterator.hasNext()) {\n Long trackId = iterator.next();\n try {\n namesystem.removeXattr(trackId,\n HdfsServerConstants.XATTR_SATISFY_STORAGE_POLICY);\n } catch (IOException e) {\n LOG.debug(\"Failed to remove sps xattr!\", e);\n }\n iterator.remove();\n }\n }\n }", "private void removeSource(String sourceName) {\n\t\t\n\t}", "@Override\r\n\tpublic void deletePolicy(Integer pid) {\n\t\tdao.deletePolicy(pid);\r\n\t\t\r\n\t}", "@PreAuthorize(\"hasRole('ROLE_ROOT')\")\n\tpublic void deleteFileUploads();", "private void log_out() {\n File xx = new File(\"resource/data/staff_id_logedin.txt\");\n if(xx.isFile()){\n xx.delete();\n }\n this.dispose();\n }", "private void removeOrphanClasspaths() {\n Set<String> allRecordedRemotePaths = new HashSet<String>(localPathTranslation.keySet());\n for (String remotePath : localClasspathProcessor.getLocalClasspath().values()) {\n allRecordedRemotePaths.remove(remotePath);\n }\n localPathTranslation.keySet().removeAll(allRecordedRemotePaths);\n\n // Now add new translations\n for (String remotePath : localClasspathProcessor.getLocalClasspath().values()) {\n if (!localPathTranslation.containsKey(remotePath)) {\n localPathTranslation.put(remotePath, UNDEFINED);\n }\n }\n }", "public void Cleanup(Statement stat) {\r\n\tif (stat != null) {\r\n\t try {\r\n\t\tstat.close();\r\n\t } catch (Exception e) {\r\n\t\t// nothing todo here\r\n\t }\r\n\t}\r\n }", "private static void addToStageRemoval(String fileName) {\n File stagedFile = Utils.join(WORKING_DIR, fileName);\n File dest = Utils.join(STAGE_RM_DIR, fileName);\n Utils.copy(stagedFile, dest);\n }", "@Override\r\n\tpublic void remFile(String path) {\n\t\t\r\n\t}", "void delistResource(ExoResource xares) throws RollbackException, SystemException;", "public void unsetFileName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FILENAME$0, 0);\n }\n }", "public void removeAllInternationalStandardRecordingCode() {\r\n\t\tBase.removeAll(this.model, this.getResource(), INTERNATIONALSTANDARDRECORDINGCODE);\r\n\t}", "public synchronized void removeAll() {\r\n\t\tif (trackedResources == null)\r\n\t\t\treturn;\r\n\t\tPair<IPath, IResourceChangeHandler>[] entries = (Pair<IPath, IResourceChangeHandler>[]) trackedResources.toArray(new Pair[trackedResources.size()]);\r\n\t\tfor (Pair<IPath, IResourceChangeHandler> entry : entries) {\r\n\t\t\tremoveResource(entry.first, entry.second);\r\n\t\t}\r\n\t}", "public static void removeEleveOnSchema(Eleve e, Bdd d) {\n Session session = HibernateUtils.getSessionFactory().openSession();\r\n String SQLRequest = \"REVOKE all PRIVILEGES ON \" + d.getNom() + \".* from '\" + e.getAbreviation() + \"'@'%';\";\r\n session.beginTransaction();\r\n session.createSQLQuery(SQLRequest).executeUpdate();\r\n session.getTransaction().commit();\r\n session.close();\r\n\r\n }", "public void removeFiles(String filter)\n {\n for (String s : fileList) {\n if (!s.contains(filter)) {\n fileList.remove(s);\n }\n }\n }", "public void removeAllTextWriter() {\r\n\t\tBase.removeAll(this.model, this.getResource(), TEXTWRITER);\r\n\t}", "public void removeAllUniqueFileIdentifier() {\r\n\t\tBase.removeAll(this.model, this.getResource(), UNIQUEFILEIDENTIFIER);\r\n\t}", "public static void m85582a(File file) {\n try {\n if (!file.delete()) {\n file.deleteOnExit();\n }\n } catch (Exception unused) {\n }\n }", "@Override\n\tprotected void removeAction(HashSet<String> rmvSet){ \t\n\t\t// remove the 'deploymetSet'\n\t\tHashSet<File> delSet = new HashSet<File>();\n\t\tfor (File f: deploymentSet){\n\t\t\tif (rmvSet.contains(f.getName())){\n\t\t\t\tdelSet.add(f);\n\t\t\t}\n\t\t}\n\t\tdeploymentSet.removeAll(delSet);\n\t\n\t\t// delete mainMap\n\t\tfor (String rmvStr: rmvSet){\n\t\t\txmlMainClassInfoMap.remove(rmvStr);\n\t\t}\n\t\t\n\t\t// remove the relation and repository\n\t\t((AdaptDependencyManager)MiddleWareConfig.getInstance().getDepManager()).removeDeploymentNodeBySet(rmvSet);\n\t\t\n\t}", "public void cleanup(Appendable err) throws IOException {\n\n String[] toRemove = {\".data\", \".properties\", \".script\", \".tmp\", \".log\"};\n\n for (String aToRemove : toRemove) {\n String tmpFile = \"\" + Globals.DBname + aToRemove;\n File f = new File(tmpFile);\n if (f.exists()) {\n\n f.delete();\n err.append(\"Abacus disk clean up: removing \" + tmpFile + \"\\n\");\n\n }\n }\n err.append(\"\\n\");\n }", "private static void removeUnwantedPropertyValues( Set<String> allowed, Resource S, Property P ) {\n \tboolean hasLanguagedObjects = false;\n \tList<Statement> removes = new ArrayList<Statement>();\n List<Statement> plains = new ArrayList<Statement>();\n for (StmtIterator it = S.listProperties( P ); it.hasNext();) {\n \tStatement s = it.next();\n RDFNode mo = s.getObject();\n Node o = mo.asNode();\n if (isStringLiteral(o)) {\n String lang = o.getLiteralLanguage();\n if (allowed.contains( lang )) hasLanguagedObjects = true; \n else if (lang.equals( \"\" )) plains.add( s ); \n else removes.add( s );\n }\n }\n Model m = S.getModel();\n\t\tif (hasLanguagedObjects) m.remove( plains );\n m.remove( removes ); \n }", "public void clearStages() {\n List<String> addingStage = Utils.plainFilenamesIn(INDEX);\n List<String> deletingStage = Utils.plainFilenamesIn(REMOVAL);\n for (String fileName: addingStage) {\n File currFile = new File(INDEX, fileName);\n currFile.delete();\n }\n for (String fileName: deletingStage) {\n File currFile = new File(REMOVAL, fileName);\n currFile.delete();\n }\n }", "void unsetRequired();", "public void removed(IExtensionPoint[] extensionPoints) {\r\n\r\n\t\t// Do nothing\r\n\t}", "public void remove(File file) throws IOException {\n String fileName = file.getName();\n File realFile = new File(INDEX, fileName);\n boolean isStaged = realFile.exists();\n Commit curCommit = getHeadCommit();\n if (isStaged) {\n realFile.delete();\n }\n HashMap<String, Blob> filesInHeadCommit = curCommit.getFile();\n boolean trackedByCurrCommit = filesInHeadCommit.containsKey(fileName);\n if (trackedByCurrCommit) {\n if (file.exists()) {\n file.delete();\n }\n String content = filesInHeadCommit.get(fileName).getContent();\n File fileInRemovingStage = new File(REMOVAL, fileName);\n if (!fileInRemovingStage.exists()) {\n fileInRemovingStage.createNewFile();\n }\n Utils.writeContents(fileInRemovingStage, content);\n }\n if (!isStaged && !trackedByCurrCommit) {\n System.out.println(\"No reason to remove the file.\");\n System.exit(0);\n }\n\n }", "public void mo83565a(File file) {\n if (!file.delete()) {\n file.deleteOnExit();\n }\n }", "@Override\n\tpublic void excluir() {\n\t\t\n\t}", "private void removeResumeDataFile(final Hash hash) {\n deleteFile(\"rd_\" + hash.toString());\n dbHelper.removeResumeData(hash);\n }" ]
[ "0.7597148", "0.58375555", "0.580416", "0.5765959", "0.57202476", "0.5553409", "0.5541875", "0.54994076", "0.54849285", "0.5468867", "0.5441843", "0.5434851", "0.5424132", "0.5405062", "0.5380397", "0.53744227", "0.5352159", "0.5341338", "0.5306925", "0.5306851", "0.53021044", "0.5281051", "0.5272603", "0.52645713", "0.52377224", "0.5226993", "0.5211188", "0.5208161", "0.5201974", "0.52002764", "0.5197769", "0.5195195", "0.5166748", "0.5163153", "0.51546526", "0.5150364", "0.5129763", "0.5128675", "0.51133406", "0.50973964", "0.5069843", "0.5067276", "0.5052916", "0.5045326", "0.503203", "0.50275725", "0.50198215", "0.5017285", "0.5015262", "0.50107765", "0.5000936", "0.49993366", "0.49739215", "0.49720874", "0.49666455", "0.49602968", "0.49592844", "0.49449158", "0.49329984", "0.49306005", "0.49277768", "0.4913048", "0.490324", "0.48967916", "0.48859563", "0.48815146", "0.48771426", "0.48703215", "0.4866003", "0.48641595", "0.4863211", "0.48622674", "0.48524705", "0.4850928", "0.48503724", "0.48480576", "0.48459324", "0.48446274", "0.4832838", "0.48326913", "0.4829699", "0.48266533", "0.48174423", "0.48135766", "0.48126066", "0.4809294", "0.48076817", "0.48066148", "0.48056263", "0.48048607", "0.4801827", "0.47963792", "0.4783877", "0.47809166", "0.47733447", "0.47707114", "0.47686553", "0.47665948", "0.476441", "0.4763329" ]
0.659885
1
remove the internal and external (file) policy statements.
private void removePolicy(){ excludedPermissions = null; uncheckedPermissions = null; rolePermissionsTable = null; removePolicyFile(true); removePolicyFile(false); removePolicyContextDirectory(); initLinkTable(); policy = null; writeOnCommit = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removePolicyFile(boolean granted){\n\tString fileName = getPolicyFileName(granted);\n\tFile f = new File(fileName);\n\tif(f.exists()){\n\t if (!f.delete()) {\n String defMsg = \"Failure removing policy file: \"+fileName; \n String msg=localStrings.getLocalString(\"pc.file_delete_error\", defMsg,new Object []{ fileName} );\n\t\tlogger.log(Level.SEVERE,msg);\n\t\tthrow new RuntimeException(defMsg);\n\t } else if(logger.isLoggable(Level.FINE)){\n\t\tlogger.fine(\"JACC Policy Provider: Policy file removed: \"+fileName);\n\t }\n\t}\n }", "public void removeUncheckedPolicy()\n\tthrows PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\t\n\n\tif (uncheckedPermissions != null) {\n\t uncheckedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "void clearPolicy() {\n policy = new Policy();\n }", "void removePolicyController(String name);", "public void removeExcludedPolicy()\n throws PolicyContextException{\n\n assertStateIsOpen();\n\n\tcheckSetPolicyPermission();\n\n\tif (excludedPermissions != null) {\n\t excludedPermissions = null;\n\t writeOnCommit = true;\n\t}\n }", "public void removeIneffectiveDeclarations()\n\t{\n\t\t_declarations.removeIf((p) -> !p.isIgnored() && !p.isEffective());\n\t}", "public void clean(){\n preprocessorActionsPerFile.clear();\n }", "public void removeInvalidUndoDeclarations()\n\t{\n\t\t_declarations.removeIf((p) -> !p.isIgnored() && p.isInvalidUndo());\n\t}", "public void unsetFilePlac()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FILEPLAC$12, 0);\n }\n }", "private void removeStatement(){\n\t\tsynchronized(m_viz){\n\t\t\tTuple firstTuple;\n\t\t\tsynchronized(statementList){\n\t\t\t\tfirstTuple = statementList.getFirst();\n\t\t\t}\n\n\t\t\t// Remove action is synchronized to prevent PreFuse from drawing at the same time\n\t\t\tremoveMessage(firstTuple);\n\t\t\tm_statements.removeTuple(firstTuple);\n\t\t\tstatementList.removeFirst();\t\t\t\n\t\t}\n\t}", "void removePolicyController(PolicyController controller);", "void removeAllRawLicenses();", "public void removeAllOfficialFileWebpage() {\r\n\t\tBase.removeAll(this.model, this.getResource(), OFFICIALFILEWEBPAGE);\r\n\t}", "public static void removeRestrictions() {\n\t\ttry {\n\t\t\tClass<?> jceSecurityClass = Class.forName(\"javax.crypto.JceSecurity\");\n\t\t\tClass<?> cryptoPermissionsClass = Class.forName(\"javax.crypto.CryptoPermissions\");\n\t\t\tClass<?> cryptoAllPermissionClass = Class.forName(\"javax.crypto.CryptoAllPermission\");\n\n\t\t\tField isRestrictedField = jceSecurityClass.getDeclaredField(\"isRestricted\");\n\t\t\tisRestrictedField.setAccessible(true);\n\t\t\tisRestrictedField.set(null, false);\n\n\t\t\tField defaultPolicyField = jceSecurityClass.getDeclaredField(\"defaultPolicy\");\n\t\t\tdefaultPolicyField.setAccessible(true);\n\t\t\tPermissionCollection defaultPolicy = (PermissionCollection) defaultPolicyField.get(null);\n\n\t\t\tField permsField = cryptoPermissionsClass.getDeclaredField(\"perms\");\n\t\t\tpermsField.setAccessible(true);\n\t\t\t((Map<?, ?>) permsField.get(defaultPolicy)).clear();\n\n\t\t\tField cryptoAllPermissionInstanceField = cryptoAllPermissionClass.getDeclaredField(\"INSTANCE\");\n\t\t\tcryptoAllPermissionInstanceField.setAccessible(true);\n\t\t\tdefaultPolicy.add((Permission) cryptoAllPermissionInstanceField.get(null));\n\t\t} catch (Exception e) {\n\t\t\t// ignore\n\t\t}\n }", "void unsetRequiredResources();", "private void removePolicyContextDirectory(){\n\tString directoryName = getContextDirectoryName();\n\tFile f = new File(directoryName);\n\tif(f.exists()){\n\n // WORKAROUND: due to existence of timestamp file in given directory\n // for SE/EE synchronization\n File[] files = f.listFiles();\n if (files != null && files.length > 0) {\n for (int i = 0; i < files.length; i++) {\n files[i].delete();\n }\n }\n //WORKAROUND: End \n\n\t if (!f.delete()) {\n String defMsg = \"Failure removing policy context directory: \"+directoryName;\n String msg=localStrings.getLocalString(\"pc.file_delete_error\", defMsg);\n\t\tlogger.log(Level.SEVERE,msg);\n\t\tthrow new RuntimeException(defMsg);\n\t } else if(logger.isLoggable(Level.FINE)){\n\t\tlogger.fine(\"JACC Policy Provider: Policy context directory removed: \"+directoryName);\n\t }\n\n File appDir = f.getParentFile();\n // WORKAROUND: due to existence of timestamp file in given directory\n // for SE/EE synchronization\n File[] fs = appDir.listFiles();\n if (fs != null && fs.length > 0) {\n boolean hasDir = false;\n for (int i = 0; i < fs.length; i++) {\n if (fs[i].isDirectory()) {\n hasDir = true;\n break;\n }\n }\n if (!hasDir) {\n for (int i = 0; i < fs.length; i++) {\n fs[i].delete();\n }\n }\n }\n //WORKAROUND: End \n\n File[] moduleDirs = appDir.listFiles();\n if (moduleDirs == null || moduleDirs.length == 0) {\n if (!appDir.delete()) {\n String defMsg = \"Failure removing policy context directory: \" + appDir;\n String msg = localStrings.getLocalString(\"pc.file_delete_error\", defMsg);\n\t\t logger.log(Level.SEVERE,msg);\n\t\t throw new RuntimeException(defMsg);\n }\n }\n\t}\n }", "public void unsetVerStmt()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(VERSTMT$22, 0);\n }\n }", "public void removeAllOriginalTextWriter() {\r\n\t\tBase.removeAll(this.model, this.getResource(), ORIGINALTEXTWRITER);\r\n\t}", "public void unsetRules()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(RULES$26);\n }\n }", "void deleteChains() {\n\t\tif (!params.isDebug()) {\n\t\t\tfor (File deleteCandidate : toDelete) {\n\t\t\t\tdeleteCandidate.delete();\n\t\t\t\t\n\t\t\t\ttry (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(deleteCandidate.toPath())) {\n\t\t\t\t\tfor (Path path : directoryStream) {\n\t\t\t\t\t\tif (!path.getFileName().toString().endsWith(\"_SCWRLed.pdb\")) {\n\t\t\t\t\t\t\tpath.toFile().delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void unsetFileStrc()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FILESTRC$4, 0);\n }\n }", "@Override\n\tpublic void undo() {\n\t\tsecurity.off();\n\t}", "public void unsetComparesource()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(COMPARESOURCE$2, 0);\r\n }\r\n }", "private void removeClutterAroundMainContent()\r\n \t{\n \r\n \t\tNodes mainContent = xPathQuery(XPath.NON_STANDARD_MAIN_CONTENT.query);\r\n \t\tif (mainContent.size() > 0)\r\n \t\t\thasStandardLayout = false;\r\n \t\telse {\r\n \t\t\tmainContent = xPathQuery(XPath.MAIN_CONTENT_1.query);\r\n \t\t\tif (mainContent.size() == 0)\r\n \t\t\t\tmainContent = xPathQuery(XPath.MAIN_CONTENT_2.query);\r\n \t\t}\r\n \t\tdeleteNodes(XPath.BODY_NODES.query);\r\n \t\tmoveNodesTo(mainContent, bodyTag);\r\n \t}", "void unsetComments();", "void unsetPurpose();", "void cleanScript();", "@Override\n public void removeGroupPolicies(Context context, Item item, Group g) throws SQLException, AuthorizeException {\n // remove Group's policies from Item\n authorizeService.removeGroupPolicies(context, item, g);\n\n // remove all policies from bundles\n List<Bundle> bunds = item.getBundles();\n\n for (Bundle mybundle : bunds) {\n List<BundleBitstream> bs = mybundle.getBitstreams();\n\n for (BundleBitstream b : bs) {\n Bitstream bitstream = b.getBitstream();\n // remove bitstream policies\n authorizeService.removeGroupPolicies(context, bitstream, g);\n }\n\n // change bundle policies\n authorizeService.removeGroupPolicies(context, mybundle, g);\n }\n }", "void unsetIsManaged();", "public static void removePlurals(ArrayList<String> list){\r\n //Loop through the list\r\n for(i = 0; i < list.size(); i++){\r\n if(list.get(i).endsWith(\"s\") || list.get(i).endsWith(\"S\")){\r\n list.remove(i);\r\n i--;\r\n } \r\n }\r\n }", "public void removeStatements(final Resource subj, final URI pred, final Value obj,\n final Resource... contexts) throws SailException {\n baseSailConnection.removeStatements(subj, pred, obj, contexts);\n }", "void unregister(String policyId);", "public void remFile(){\n ((MvwDefinitionDMO) core).remFile();\n }", "private void deleteStylesheet() {\n\n// find start of the section\nString str = strBuf.toString();\nfinal int start = str.indexOf( SEC_START );\n\nif ( start == -1 ) {\n// section not contained, so just return ...\nreturn;\n}\n\n// find end of section\nfinal int end = str.indexOf( SEC_END, start );\n\n// delete section\nstrBuf.delete( start, end + 2 );\n}", "void deleteTranslatedFiles(InformationResourceFile irFile);", "public void removeFromPolicyTransactions(entity.AppCritPolicyTransaction element);", "public void removeEPN() {\r\n\r\n\t\tfor (EPStatement statement : epnStatements) {\r\n\t\t\tstatement.destroy();\r\n\t\t}\r\n\r\n\t}", "public \n void clearWarnings() throws ResourceException;", "public void removePrincipleLines() {\n removeFromPane(firstLineFirstPart);\n removeFromPane(firstLineSecondPart);\n removeFromPane(secondLine);\n removeFromPane(thirdLineFirstPart);\n removeFromPane(thirdLineSecondPart);\n removeFromPane(dottedLine1);\n removeFromPane(dottedLine2);\n removeFromPane(dottedLine3);\n }", "public void removeRlsSourceFile(IAstRlsSourceFile rlsFile);", "public void cleanUp(){\n for(ShaderProgram sp : shaderlist){\n sp.cleanup();\n }\n }", "public void removeAllTextWriter() {\r\n\t\tBase.removeAll(this.model, this.getResource(), TEXTWRITER);\r\n\t}", "void removeStatement(Resource subject, URI predicate, String literal,\r\n\t\t\tString languageTag) throws ModelRuntimeException;", "void unsetComplianceCheckResult();", "public void removeScript() {\n scriptHistory = null;\n }", "AgentPolicyBuilder clear();", "public void removeAllInternationalStandardRecordingCode() {\r\n\t\tBase.removeAll(this.model, this.getResource(), INTERNATIONALSTANDARDRECORDINGCODE);\r\n\t}", "@Test\r\n\tpublic void testRemoveStatements()\r\n\t\tthrows Exception\r\n\t{\r\n\t\ttestAdminCon.begin();\r\n\t\ttestAdminCon.add(john, lname, johnlname, dirgraph);\r\n\t\ttestAdminCon.add(john, fname, johnfname, dirgraph);\r\n\t\ttestAdminCon.add(john, email, johnemail, dirgraph);\r\n\t\ttestAdminCon.add(john, homeTel, johnhomeTel, dirgraph);\r\n\t\ttestAdminCon.add(micah, lname, micahlname);\r\n\t\ttestAdminCon.add(micah, fname, micahfname);\r\n\t\ttestAdminCon.add(micah, homeTel, micahhomeTel);\r\n\t\ttestAdminCon.commit();\r\n\t\t\r\n\t\ttestAdminCon.setDefaultRulesets(null);\r\n\t\tStatement st1 = vf.createStatement(john, fname, johnlname);\r\n\t\r\n\t\ttestAdminCon.remove(st1);\r\n\t\t\r\n\t\tAssert.assertEquals(\"There is no triple st1 in the repository, so it shouldn't be deleted\",7L, testAdminCon.size());\r\n\t\t\r\n\t\tStatement st2 = vf.createStatement(john, lname, johnlname);\r\n\t\tassertThat(testAdminCon.hasStatement(st2, false, dirgraph), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(st2, true, null, dirgraph), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(st2, true, null), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, lname, johnlname, true, null), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, lname, johnlname, true, (Resource)null, dirgraph, dirgraph1), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(st2, true), is(equalTo(true)));\r\n\t\ttestAdminCon.remove(st2, dirgraph);\r\n\t\tassertThat(testAdminCon.hasStatement(st2, true, null, dirgraph), is(equalTo(false)));\r\n\t\t\r\n\t\tAssert.assertEquals(6L, testAdminCon.size());\r\n\t\t\r\n\t\ttestAdminCon.remove(john,email, null);\r\n\t\tassertThat(testAdminCon.hasStatement(john, fname, johnfname, false, dirgraph), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, fname, johnfname, false), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, fname, johnfname, false, null), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, fname, johnfname, false, null, dirgraph), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, lname, johnlname, false, dirgraph), is(equalTo(false)));\r\n\t\ttestAdminCon.remove(john,null,null);\r\n\t\t\r\n\t\tassertThat(testAdminCon.hasStatement(john, lname, johnlname, false, dirgraph), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, fname, johnfname, false, dirgraph), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, fname, johnfname, false, null, dirgraph), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, lname, johnlname, false, (Resource)null, dirgraph), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(micah, homeTel, johnhomeTel, false, null), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(micah, homeTel, micahhomeTel, false, (Resource)null), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(micah, homeTel, micahhomeTel, false, null), is(equalTo(true)));\r\n\t\t\r\n\t\ttestAdminCon.remove((Resource)null, homeTel,(Value) null);\r\n\t\ttestAdminCon.remove((Resource)null, homeTel, (Value)null);\r\n\t\t\r\n\t\ttestAdminCon.remove(vf.createStatement(john, lname, johnlname), dirgraph);\r\n\t\tassertThat(testAdminCon.hasStatement(john, lname, johnlname, false), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, lname, johnlname, false, dirgraph), is(equalTo(false)));\r\n\t\ttestAdminCon.add(john, fname, johnfname, dirgraph);\r\n\r\n\t\tassertThat(testAdminCon.hasStatement(john, homeTel, johnhomeTel, false, dirgraph), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(micah, homeTel, micahhomeTel, false), is(equalTo(false)));\r\n\t\t\r\n\t\t\r\n\t\tassertThat(testAdminCon.hasStatement(john, fname, johnfname, false, dirgraph), is(equalTo(true)));\r\n\r\n\t\ttestAdminCon.remove(john, (URI)null, (Value)null);\r\n\t\tassertThat(testAdminCon.hasStatement(john, fname, johnfname, false, dirgraph), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.isEmpty(), is(equalTo(false)));\r\n\t\t\r\n\t\ttestAdminCon.remove(null, null, micahlname);\r\n\t\tassertThat(testAdminCon.hasStatement(micah, fname, micahfname, false), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(micah, fname, micahfname, false, null, dirgraph), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(null, null, null, false, null), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(null, null, null, false), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(null, null, null, false, dirgraph), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(micah, fname, micahfname, false, dirgraph1, dirgraph), is(equalTo(false)));\r\n\t\ttestAdminCon.remove((URI)null, null, null);\r\n\t\tassertThat(testAdminCon.isEmpty(), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement((URI)null, (URI)null, (Literal)null, false,(Resource) null), is(equalTo(false)));\r\n\t}", "void removeStatement(String subjectURIString, URI predicate,\r\n\t\t\tString literal, String languageTag) throws ModelRuntimeException;", "public void removeAllRuleRef();", "public void deleteGeneratedFiles();", "void unsetRequired();", "public void removeLevel()\r\n {\r\n if( tables.size()>1 )\r\n {\r\n tables.removeFirst();\r\n }\r\n if( counts.size()>1 )\r\n {\r\n counts.removeFirst();\r\n }\r\n }", "public void desactivateFileMode() {\n logger.removeHandler(mFileHandler);\n }", "private void removeOldFiles() {\n Set<File> existingFiles = new HashSet<File>();\n collectFiles(existingFiles);\n for (ResourceResponse r : cacheResponseProcessor.getResources()) {\n String remotePathId = r.pathId;\n String remotePath = localClasspathProcessor.getLocalClasspath().get(remotePathId);\n String localPath = localPathTranslation.get(remotePath);\n File localFile = new File(localPath);\n File file = new File(localFile, r.name);\n existingFiles.remove(file);\n }\n }", "public void unsetFileCont()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FILECONT$2, 0);\n }\n }", "void unsetHeader();", "void unsetObjectives();", "void removeStatement(Resource subject, URI predicate, String literal,\r\n\t\t\tURI datatypeURI) throws ModelRuntimeException;", "void removeStatement(String subjectURIString, URI predicate,\r\n\t\t\tString literal, URI datatypeURI) throws ModelRuntimeException;", "public void removeAllLicensee() {\r\n\t\tBase.removeAll(this.model, this.getResource(), LICENSEE);\r\n\t}", "private void unmarkForSecOp() {\n\t\tthis.secOpFlag = false;\n\t\tthis.secopDoc = null;\n\t}", "public void removeXmlSchema(File file) {\n\t\tDocument doc = null;\n\t\ttry {\n\t\t\tSAXBuilder sax = new SAXBuilder();\n\t\t\tdoc = sax.build(file);\n\t\t} catch (JDOMException | IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(doc != null) {\n\t\t\tElement rootElement = doc.getRootElement();\n\t\t\trootElement.setNamespace(null);\n\t\t\trootElement.removeNamespaceDeclaration(bioNamespace);\n\t\t\trootElement.removeNamespaceDeclaration(xsiNamespace);\n\t\t\trootElement.removeAttribute(\"schemaLocation\", xsiNamespace);\n\t\t\ttry (FileOutputStream fileOutputStream = new FileOutputStream(file)) {\n\t\t\t\ttry {\n\t\t\t\t\tXMLOutputter xmlOutputter = new XMLOutputter(Format.getPrettyFormat());\n\t\t\t\t\txmlOutputter.output(doc, fileOutputStream);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public synchronized void removeAll() {\r\n\t\tif (trackedResources == null)\r\n\t\t\treturn;\r\n\t\tPair<IPath, IResourceChangeHandler>[] entries = (Pair<IPath, IResourceChangeHandler>[]) trackedResources.toArray(new Pair[trackedResources.size()]);\r\n\t\tfor (Pair<IPath, IResourceChangeHandler> entry : entries) {\r\n\t\t\tremoveResource(entry.first, entry.second);\r\n\t\t}\r\n\t}", "void unsetFurtherRelations();", "public void removeFileInstance()\n {\n this.source = null;\n this.data = null;\n }", "void unsetCapitalInKind();", "protected void removeAccess(final String name) {\n if (!this.hasAccess(name, true)) return;\r\n \r\n // Find line with matching name.\r\n org.bukkit.block.Sign state = this.getSignBlock();\r\n Integer removeFrom = null;\r\n if (state.getLine(2) != null && state.getLine(2).equalsIgnoreCase(name)) removeFrom = 2;\r\n else if (state.getLine(3) != null && state.getLine(3).equalsIgnoreCase(name)) removeFrom = 3;\r\n \r\n if (removeFrom == null) return; \r\n \r\n state.setLine(removeFrom, \"\");\r\n }", "void unsetSites();", "private void removeModifiers(AttributeInstance ins) {\n\t\tfor (Iterator<AttributeModifier> iterator = ins.getModifiers().iterator(); iterator.hasNext();) {\n\t\t\tAttributeModifier attribute = iterator.next();\n\t\t\tif (attribute.getName().startsWith(\"mmolib.\") || attribute.getName().startsWith(\"mmoitems.\"))\n\t\t\t\tins.removeModifier(attribute);\n\t\t}\n\t}", "private void clearPathIds(){\n synchronized (pathsToBeTraversed) {\n Iterator<Long> iterator = pathsToBeTraversed.iterator();\n while (iterator.hasNext()) {\n Long trackId = iterator.next();\n try {\n namesystem.removeXattr(trackId,\n HdfsServerConstants.XATTR_SATISFY_STORAGE_POLICY);\n } catch (IOException e) {\n LOG.debug(\"Failed to remove sps xattr!\", e);\n }\n iterator.remove();\n }\n }\n }", "@Override\r\n\tpublic void deletePolicy(Integer pid) {\n\t\tdao.deletePolicy(pid);\r\n\t\t\r\n\t}", "public void Cleanup(Statement stat) {\r\n\tif (stat != null) {\r\n\t try {\r\n\t\tstat.close();\r\n\t } catch (Exception e) {\r\n\t\t// nothing todo here\r\n\t }\r\n\t}\r\n }", "public void removeDeclarations(List<MDeclaration> declarations)\n\t{\n\t\t_declarations.removeAll(declarations);\n\t}", "public void cleanup() {\n try {\n Files.delete(path);\n } catch (final IOException e) {\n throw new StageAccessException(\"Unable to delete staged document!\", e);\n }\n }", "void removeStatement(Statement statement) throws ModelRuntimeException;", "private void removeContentsFromFile() {\n Log.d(\"debugMode\", \"deleting entire file contents...\");\n try {\n FileOutputStream openFileInput = openFileOutput(\"Locations.txt\", MODE_PRIVATE);\n PrintWriter printWriter = new PrintWriter(openFileInput);\n printWriter.print(\"\");\n printWriter.close();\n Log.d(\"debugMode\", \"deleting entire file contents successful\");\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void dropTables() {\n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE REVISION\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE VCS_COMMIT\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE FILE\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE CODE_FRAGMENT\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE CLONE_SET\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE CODE_FRAGMENT_LINK\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE CLONE_SET_LINK\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE CLONE_GENEALOGY\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE CODE_FRAGMENT_GENEALOGY\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"DROP TABLE CRD\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \n \t\ttry {\n \t\t\tdbManager.executeUpdate(\"VACUUM\");\n \t\t} catch (Exception e) {\n \t\t\t// e.printStackTrace();\n \t\t}\n \t}", "void unsetAuditingCompany();", "public void clearStages() {\n List<String> addingStage = Utils.plainFilenamesIn(INDEX);\n List<String> deletingStage = Utils.plainFilenamesIn(REMOVAL);\n for (String fileName: addingStage) {\n File currFile = new File(INDEX, fileName);\n currFile.delete();\n }\n for (String fileName: deletingStage) {\n File currFile = new File(REMOVAL, fileName);\n currFile.delete();\n }\n }", "public void removed(IExtensionPoint[] extensionPoints) {\r\n\r\n\t\t// Do nothing\r\n\t}", "public void removeAllFilters() {\n fileFiltersMap.clear();\n\n // everything should be new inferred\n inferePeptides.clear();\n }", "private void clearFiles() {\r\n File file = new File(\"test_files/upload\");\r\n File[] files = file.listFiles();\r\n for (File delFile : files) {\r\n delFile.delete();\r\n }\r\n file = new File(\"test_files/stress.jar\");\r\n file.delete();\r\n }", "public static void removeEleveOnSchema(Eleve e, Bdd d) {\n Session session = HibernateUtils.getSessionFactory().openSession();\r\n String SQLRequest = \"REVOKE all PRIVILEGES ON \" + d.getNom() + \".* from '\" + e.getAbreviation() + \"'@'%';\";\r\n session.beginTransaction();\r\n session.createSQLQuery(SQLRequest).executeUpdate();\r\n session.getTransaction().commit();\r\n session.close();\r\n\r\n }", "@Override\n\tprotected void removeAction(HashSet<String> rmvSet){ \t\n\t\t// remove the 'deploymetSet'\n\t\tHashSet<File> delSet = new HashSet<File>();\n\t\tfor (File f: deploymentSet){\n\t\t\tif (rmvSet.contains(f.getName())){\n\t\t\t\tdelSet.add(f);\n\t\t\t}\n\t\t}\n\t\tdeploymentSet.removeAll(delSet);\n\t\n\t\t// delete mainMap\n\t\tfor (String rmvStr: rmvSet){\n\t\t\txmlMainClassInfoMap.remove(rmvStr);\n\t\t}\n\t\t\n\t\t// remove the relation and repository\n\t\t((AdaptDependencyManager)MiddleWareConfig.getInstance().getDepManager()).removeDeploymentNodeBySet(rmvSet);\n\t\t\n\t}", "void removeSWFURL(String toRemove);", "public void clear()\n {\n normalImports.clear();\n wildcardImports.clear();\n }", "public void removeSkills()\r\n\t{\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5491, 1), false);\r\n\t\t// Cancel Gatekeeper Transformation\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(8248, 1), false);\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5656, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5657, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5658, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5659, 1), false, false);//Update by rocknow\r\n\r\n\t\tgetPlayer().setTransformAllowedSkills(EMPTY_ARRAY);\r\n\t}", "public void deleteMoreFile() {\n\t\tFile outfile = new File(outFileString);\n\t\tFile files[] = outfile.listFiles();\n\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\tString name = files[i].getAbsolutePath();\n\t\t\tif ((!name.contains(\"SICG\")) && (!name.contains(\"AndroidManifest.xml\"))) {\n\t\t\t\tDirDelete delete = new DirDelete();\n\t\t\t\tdelete.deleteDir(files[i]);\n\t\t\t}\n\t\t}\n\t}", "private static void removeUnwantedPropertyValues( Set<String> allowed, Resource S, Property P ) {\n \tboolean hasLanguagedObjects = false;\n \tList<Statement> removes = new ArrayList<Statement>();\n List<Statement> plains = new ArrayList<Statement>();\n for (StmtIterator it = S.listProperties( P ); it.hasNext();) {\n \tStatement s = it.next();\n RDFNode mo = s.getObject();\n Node o = mo.asNode();\n if (isStringLiteral(o)) {\n String lang = o.getLiteralLanguage();\n if (allowed.contains( lang )) hasLanguagedObjects = true; \n else if (lang.equals( \"\" )) plains.add( s ); \n else removes.add( s );\n }\n }\n Model m = S.getModel();\n\t\tif (hasLanguagedObjects) m.remove( plains );\n m.remove( removes ); \n }", "public void doElimination() {\n IR ir;\n\tIR defCode;\n\tIR useCode;\n int i, j, countOperand;\n JavaVariable v1, v2;\n short shortOpcode;\n short shortOpcode2;\n boolean singleDefCondition;\n BitSet[] reachingDef = cfg.getReachingDef();\n\n Iterator it = cfg.iterator();\n\twhile(it.hasNext()) {\n ir = (IR) it.next();\n //System.out.println(ir);\n countOperand = ir.getNumOfOperands();\n if (ir.hasAttribute(IRAttribute.ELIMINATED)) {\n // Removed code can't remove other code\n continue; \n }\n // eliminate single def. single use. (aload)\n for (i = 0; i < countOperand; i++) {\n if (ir.getNumOfDefs(i) ==1 && ir.getShortOpcode() != OpcodeConst.opc_areturn) { // single def\n defCode = cfg.getIRAtBpc (ir.getDefOfOperand(i, 0));\n if (defCode.hasAttribute(IRAttribute.ELIMINATED)) {\n // Eliminated code can't remove other codes\n continue;\n } \n\t shortOpcode= defCode.getShortOpcode();\n if (shortOpcode == OpcodeConst.opc_aload ||\n (shortOpcode >= OpcodeConst.opc_aload_0 && shortOpcode <= OpcodeConst.opc_aload_3)) {\n singleDefCondition = false;\n for (j = 0; j < defCode.getNumOfUses(0); j++) {\n singleDefCondition = true;\n // if the def is the only def for every the uses it can reach\n useCode = cfg.getIRAtBpc(defCode.getUseOfTarget(0, j));\n if (useCode.getNumOfDefs(defCode.getTarget(0)) != 1) {\n singleDefCondition = false;\n break;\n }\n if (cfg.getIRAtBpc(useCode.getDefOfOperand(defCode.getTarget(0), 0)).compareTo(defCode) != 0) {\n singleDefCondition = false;\n break;\n }\n // For dup\n // The Reaching Def of the operand of the copy and the Reaching Def of the operand of the useCode\n // should be the same.\n int reachToCopyCode, reachToUseCode;\n reachToCopyCode = getUniqueReachOfVariable(reachingDef[defCode.getBpc()], defCode.getOperand(0));\n reachToUseCode = getUniqueReachOfVariable(reachingDef[useCode.getBpc()], defCode.getOperand(0));\n if (reachToCopyCode != reachToUseCode) {\n singleDefCondition = false;\n break;\n }\n }\n if (singleDefCondition == true) {\n for (j = 0; j < defCode.getNumOfUses(0); j++) {\n useCode = cfg.getIRAtBpc(defCode.getUseOfTarget(0, j));\n if (useCode.hasAttribute(IRAttribute.ELIMINATED) \n /*|| defCode.hasAttribute(IRAttribute.ELIMINATED)*/) {\n continue;\n }\n //System.out.println(\"useCode:\" + useCode + \" defCode:\" + defCode);\n //System.out.println(\"Try to change usecode's operand from \" + defCode.getTarget(0) +\n // \" to \" + defCode.getOperand(0));\n useCode.changeOperand(defCode.getTarget(0), defCode.getOperand(0));\n defCode.setAttribute(IRAttribute.ELIMINATED);\n defCode.addDebugInfoString(\"Eliminated by BPC:\" + ir.getBpc());\n }\n }\n }\n }\n }\n\n // elimination of single use. single def. (astore)\n if (ir.getNumOfTargets() == 1) {\n if (ir.getNumOfUses(0) == 1) {\n v1 = ir.getTarget(0);\n useCode = cfg.getIRAtBpc(ir.getUseOfTarget(0, 0));\n if (useCode.hasAttribute(IRAttribute.ELIMINATED)) {\n // Removed code can't remove other code\n continue; \n }\n countOperand = useCode.getNumOfOperands();\n for (i = 0; i < countOperand; i++) {\n v2 = useCode.getOperand(i);\n if ((v1.compareTo(v2) == 0) && (useCode.getNumOfDefs(i) == 1)) {\n\t //shortOpcode=CFG.makeShortVal((byte)0,useCode.getBytecode().getOpcode());\n shortOpcode = useCode.getShortOpcode();\n if (shortOpcode == OpcodeConst.opc_astore\n || (shortOpcode >= OpcodeConst.opc_astore_0 && shortOpcode <= OpcodeConst.opc_astore_3)) {\n //System.out.println(useCode + \" can be absorbed by \" + ir);\n // 1. substitute the target of bytecode for the target of astore.\n ir.changeTarget(0, useCode.getTarget(0));\n // 2. and remove the astore operation\n useCode.setAttribute(IRAttribute.ELIMINATED);\n useCode.addDebugInfoString(\"Eliminated by BPC:\" + ir.getBpc());\n }\n }\n }\n }\n } \n }\n\n }", "private void removeEffects(PlanGraphStep stepToRemove, int currentLevel) {\n\t\t\n\t\tremoveEffects(stepToRemove, currentLevel, true);\n\t}", "void unsetHasAuditingCompany();", "void removeExistingGlue() {\r\n\t\tfor (int i = outputStream.size() - 1; i >= 0; i--) {\r\n\t\t\tRTObject c = outputStream.get(i);\r\n\t\t\tif (c instanceof Glue) {\r\n\t\t\t\toutputStream.remove(i);\r\n\t\t\t} else if (c instanceof ControlCommand) { // e.g.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// BeginString\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\toutputStreamDirty();\r\n\t}", "public void removeTemplatesPage()\r\n {\r\n getSemanticObject().removeProperty(swpres_templatesPage);\r\n }", "void removeFinancialStatements(int i);", "public void unsetSwissprot()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(SWISSPROT$14, 0);\r\n }\r\n }", "private void cleanActionsTables() {\n getContentResolver().delete(\n ChatObjectContract.CONTENT_URI_ACTIONS_PUBLIC,\n null,\n null\n );\n getContentResolver().delete(\n ChatObjectContract.CONTENT_URI_ACTIONS_PRIVATE,\n BaseColumns.MSG_IN_QUEUE + \"=1\",\n null\n );\n }", "private static void dropTablesFromDatabase (Statement statement) throws SQLException {\n //Удаление таблиц из БД\n statement.execute(\"DROP TABLE IF EXISTS payment;\");\n statement.execute(\"DROP TABLE IF EXISTS account;\");\n statement.execute(\"DROP TABLE IF EXISTS users;\");\n statement.execute(\"DROP TABLE IF EXISTS role;\");\n }", "public void unsetReplyManagementRuleSet()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(REPLYMANAGEMENTRULESET$30, 0);\n }\n }" ]
[ "0.63597435", "0.603404", "0.59635115", "0.5706367", "0.57047856", "0.56646484", "0.5593844", "0.5513123", "0.5479585", "0.5478713", "0.54722166", "0.5451314", "0.5398186", "0.53827536", "0.5359774", "0.5343278", "0.53205776", "0.5287858", "0.5279761", "0.52673185", "0.5256082", "0.5247775", "0.5230274", "0.52300316", "0.5216617", "0.5195904", "0.5175347", "0.51436067", "0.51107764", "0.50885177", "0.50716263", "0.50665617", "0.5055831", "0.50510746", "0.504493", "0.5035775", "0.5031253", "0.50274014", "0.50225246", "0.50133526", "0.5013161", "0.50125986", "0.5009579", "0.5001655", "0.4997957", "0.49929073", "0.4975109", "0.49581897", "0.4951049", "0.4950984", "0.49499416", "0.4944863", "0.49380612", "0.49342525", "0.49225235", "0.49206975", "0.49178421", "0.49078193", "0.48752877", "0.48550567", "0.48526266", "0.4849587", "0.48481724", "0.484694", "0.48436832", "0.484163", "0.484023", "0.48390746", "0.48387852", "0.4835069", "0.48320088", "0.48298863", "0.48204997", "0.4814749", "0.48147124", "0.48135617", "0.4809105", "0.47939494", "0.47909087", "0.47745755", "0.47718048", "0.47671974", "0.47665545", "0.4762802", "0.47619525", "0.47565594", "0.47563103", "0.47547454", "0.47546715", "0.47464103", "0.47461137", "0.47451237", "0.47447166", "0.47420135", "0.47414297", "0.47376314", "0.4730266", "0.47285393", "0.4722739", "0.47210294" ]
0.77712715
0
checks if PolicyContex is in agrument state. Detects implicpit state changes resulting from distribution of policy files by synchronization system.
private boolean stateIs(int stateValue) { boolean inState = _stateIs(stateValue); if (stateValue == INSERVICE_STATE && !inState) { if (fileArrived(true) || fileArrived(false)) { if (logger.isLoggable(Level.FINE)){ logger.fine("JACC Policy Provider: file arrived transition to inService: " + " state: " + (this.state == OPEN_STATE ? "open " : "deleted ") + CONTEXT_ID); } // initialize(!open,!remove,fromFile) initialize(false,false,true); } inState = _stateIs(INSERVICE_STATE); } return inState; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean inService() throws PolicyContextException{\n\tcheckSetPolicyPermission();\t\n\tboolean rvalue = stateIs(INSERVICE_STATE);\n \n if (logger.isLoggable(Level.FINE)) {\n logger.fine(\"JACC Policy Provider: inService: \" +\n (rvalue ? \"true \" : \"false \") +\n CONTEXT_ID);\n }\n \n return rvalue;\n }", "private boolean isStateFullyDetermined() {\n switch (hasSubstance) {\n case No:\n case Unknown:\n return false;\n case Yes:\n // if already established has substance, continue checking only until\n // reach threshold\n return (substanceMin <= 0) ? true : substanceCnt >= substanceMin;\n }\n throw new ShouldNotHappenException();\n }", "private void checkState(byte state) {\r\n\t\tif (GPSystem.getCardContentState() != state)\r\n\t\t\tISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);\r\n\t}", "public static boolean inactivateStartGuide(){\n long inactivationTime = 1494536399000L;\r\n long currentTime = System.currentTimeMillis();\r\n boolean inactive = currentTime > inactivationTime;\r\n Log.i(StartPrefsHelper.class.getName(), \"Start Guide inactive: \" + inactive + \", inactivationTime: \" + new Date(inactivationTime) + \", currentTime: \" + new Date(currentTime));\r\n return inactive;\r\n }", "@Override\n public void checkEffect()\n {\n age(1);\n\n if (!suspended)\n suspend();\n }", "boolean hasChangeStatus();", "private boolean initVitals() {\n try {\n // WIP\n \n /*\n initRespiration();\n\n initCirculation();\n\n initCNSState();\n */\n \n // Example of initialization given below\n /*\n // Patient has been in cardiac arrest for ca. 5 minutes during arrival of EMS but given CPR the whole time\n // Initial oxygenation level of CNS (70 out of 100) indicates that CNS hasn't suffered any permanent damage yet\n \n this.cnsStatus = new CNS_Status(70);\n \n // BPM = 0 indicates cardiac arrest (type VF), the latter values indicate blood pressure measured in mmHg during CPR\n // Note that perfusion pressure is about 50 % from normal level (on average) during ideally applied CPR\n \n this.circulationStatus = new CirculationStatus(0, 40, 10, HeartState.VENTRICULAR_FIBRILLATION);\n \n // Patient isn't breathing spontaneously due to cardiac arrest, thus BF = 0, BreathingType = RESPIRATORY.ARREST\n \n this.respirationStatus = new VentilationStatus(0, BreathingType.RESPIRATORY_ARREST);\n */\n System.out.println(\"Vitals of the patient have been initialized successfully!\");\n return true;\n } catch (Exception e) {\n System.out.println(\"Exception during initialization of status of the patient!\");\n return false;\n }\n }", "private boolean canEnlist() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n || uiStateManager.getState().equals(GameUIState.STANDBY);\n }", "private boolean scanPreconditions()\n\t\t{\n\t\t\tboolean statusChanged = false;\n\t\t\t\n\t\t\t//Conditional activity\n\t\t\tif(TravelToCustomer.precondition(this) == true)\n\t\t\t{\n\t\t\t\tTravelToCustomer act = new TravelToCustomer(this);\n\t\t\t\tact.startingEvent();\n\t\t\t\tscheduleActivity(act);\n\t\t\t\tstatusChanged = true;\n\t\t\t\t//System.out.println(\"Started Travel to Customer. \");\n\t\t\t}\n\t\t\t\n\t\t\tif(TakingLunch.precondition(this) == true)\n\t\t\t{\n\t\t\t\tTakingLunch act = new TakingLunch(this);\n\t\t\t\tact.startingEvent();\n\t\t\t\tscheduleActivity(act);\n\t\t\t\tstatusChanged = true;\n\t\t\t\t//System.out.println(\"Started Take Lunch. \");\n\t\t\t}\n\t\t\t\n\t\t\t// Do not change the status if already true\n\t\t\tif(statusChanged) scanInterruptPreconditions();\n\t\t\telse statusChanged = scanInterruptPreconditions();\n\t\t\treturn(statusChanged);\n\t\t}", "public void viewApplicants() throws InterruptedException {\n\t\tdriver.findElement(By.xpath(dev_GSP_CLICKER)).click();\n\t\tdriver.findElement(By.xpath(dev_GSP_CONDITIONALLYAPPROVE)).click();\n\t\tThread.sleep(1000);\n\t\tWebElement promowz = driver.findElement(By.xpath(dev_GSP_CAPPROVEREASON));\n\t\tpromowz.sendKeys(\"c\");\n\t\tThread.sleep(1000);\n\t\tdriver.findElement(By.xpath(dev_GSP_CAPPROVEBUTTON)).click();\n\t\tAssert.assertTrue(\"Successfully conditionally approved!\", elementUtil.isElementAvailabe(dev_GSP_CAPPROVESUCCESS));\n\t\tlogger.info(\"Passed conditionally approved\");\n\t\t\n\t}", "boolean hasTransactionChangesPending() {\n// System.out.println(transaction_mod_list);\n return transaction_mod_list.size() > 0;\n }", "private static void policyInNoFaultState(AutoPolicy autoPolicy1) {\n\t\tSystem.out.println (\"The auto policy:\");\n\t\tSystem.out.printf(\"Account %d; car %s%n ; state %s; \"\n\t\t\t\t+ \"%s no-fault state %n\", \n\t\t\t\tautoPolicy1.getAccountNumber(),\n\t\t\t\tautoPolicy1.getMakeAndModel(), \n\t\t\t\tautoPolicy1.getState(),\n\t\t\t\t(autoPolicy1.isNoFaultState() ? \"is\": \"is not\"));\n\t}", "public boolean isInCheck() {\n\t\treturn false;\n\t}", "boolean isInactive() {\n/* 4818 */ return this.inactive;\n/* */ }", "public boolean isContinuingEducationPassed(CapIDModel capID) throws AAException, RemoteException;", "boolean isConcealed();", "public boolean verifyNoInactives() {\n\t\treturn !btnInactives.isEnabled();\n\n\t}", "public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }", "public boolean checkIn()\r\n\t{\r\n\t\tif(this.status == 'B')\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "protected boolean isEncumbrancePendingEntry(GeneralLedgerPendingEntry glpe) {\n return StringUtils.equals(glpe.getFinancialDocumentTypeCode(), TemConstants.TravelDocTypes.TRAVEL_AUTHORIZATION_DOCUMENT) ||\n StringUtils.equals(glpe.getFinancialDocumentTypeCode(), TemConstants.TravelDocTypes.TRAVEL_AUTHORIZATION_AMEND_DOCUMENT) ||\n StringUtils.equals(glpe.getFinancialDocumentTypeCode(), TemConstants.TravelDocTypes.TRAVEL_AUTHORIZATION_CLOSE_DOCUMENT);\n }", "AccessPoliciesStatus getAccessPoliciesStatus();", "private void updatePreferences() {\n\n /* Update preferences of the agent */\n patientAgent.updatePreferredAllocations();\n List<AllocationState> newPreferredAllocations = patientAgent.getAllocationStates();\n preferredAllocationsIterator = patientAgent.getAllocationStates().iterator();\n currentSize = patientAgent.getAllocationStates().size();\n\n if (newPreferredAllocations.isEmpty() || iterationsWithNoImprovementCount >= maxIterationsNum) {\n /* We shut down the behaviour if there are no better appointments\n or we exceeded the possible number of non-improving algorithm iterations\n */\n isHappyWithAppointment = true;\n\n } else if (newPreferredAllocations.size() >= currentSize) {\n\n /* No improvement has been made in our algorithm */\n iterationsWithNoImprovementCount++;\n } else {\n\n /* Improved the appointment, resetting the counter */\n iterationsWithNoImprovementCount = 0;\n }\n\n\n }", "void decideContinuity(Card curr_card) {\n if (curr_card.getTRIPS().size() != 0) { // if trips is not empty, then can get the last item and decide if continuous\n int last_index = curr_card.getTRIPS().size() - 1;\n WholeTrip last_whole_trip = (curr_card.getTRIPS().get(last_index));\n Trip last_trip = last_whole_trip.getWHOLE_TRIP().get(last_whole_trip.getWHOLE_TRIP().size() - 1); // get the last trip\n // evaluate if continuous\n this.isContinuous = START_TIME.timeInterval(last_trip.endTime) <= 120 &&\n last_trip.endStation.equals(START_STATION);\n }\n }", "public boolean isUnproved() {\n\t\treturn proveState == UNPROVED;\n\t}", "public boolean checkState(){\r\n\t\t//Check if we have enough users\r\n\t\tfor (Map.Entry<String, Role> entry : roleMap.entrySet()){\r\n\t\t\tString rid = entry.getKey();\r\n\t\t\tRole role = roleMap.get(rid);\r\n\t\t\tlog.info(\"Veryifying \" + rid);\t\t\t\r\n\t\t\tif(!roleCount.containsKey(rid)){\r\n\t\t\t\tlog.severe(\"Unsure of game state.\" + rid + \" not found in roleCount\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t\r\n\t\t\t} else if(role.getMin() > roleCount.get(rid)) {\r\n\t\t\t\t\tlog.info(\"minimum number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t} else if(role.getMax() < roleCount.get(rid)) { //probably don't need this one but cycles are cheap\r\n\t\t\t\tlog.severe(\"OVER MAXIMUM number for roleID: \" + rid + \" not achived\");\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if we do reach here we've reached a critical mass of players. But we still need them to load the screen\r\n\t\t\r\n\t\tif((this.getGameState() != GAMESTATE.RUNNING) ||(this.gameState !=GAMESTATE.READY_TO_START) ) {\r\n\t\t\tsetGameState(GAMESTATE.CRITICAL_MASS);\r\n\t\t\tlog.info(\"have enough players for game\");\r\n\t\t}\r\n\t\t//if the users are done loading their screen, let us know and then we can start\r\n\t\tif (!userReady.containsValue(false)){\r\n\t\t\tsetGameState(GAMESTATE.READY_TO_START);\r\n\t\t\tlog.info(\"Gamestate is running!!\");\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean isInactive();", "boolean hasShotChangeDetectionConfig();", "boolean hasCurrentStateTime();", "private OwnedState calculateIsRunningOnManagedProfile(Context context) {\n long startTime = SystemClock.elapsedRealtime();\n boolean hasProfileOwnerApp = false;\n boolean hasDeviceOwnerApp = false;\n PackageManager packageManager = context.getPackageManager();\n DevicePolicyManager devicePolicyManager =\n (DevicePolicyManager) context.getSystemService(\n Context.DEVICE_POLICY_SERVICE);\n\n for (PackageInfo pkg : packageManager.getInstalledPackages(/* flags= */ 0)) {\n assert devicePolicyManager != null;\n if (devicePolicyManager.isProfileOwnerApp(pkg.packageName)) {\n hasProfileOwnerApp = true;\n }\n if (devicePolicyManager.isDeviceOwnerApp(pkg.packageName)) {\n hasDeviceOwnerApp = true;\n }\n if (hasProfileOwnerApp && hasDeviceOwnerApp) break;\n }\n\n long endTime = SystemClock.elapsedRealtime();\n RecordHistogram.recordTimesHistogram(\n \"EnterpriseCheck.IsRunningOnManagedProfileDuration\",\n endTime - startTime);\n\n return new OwnedState(hasDeviceOwnerApp, hasProfileOwnerApp);\n }", "protected final void checkGC() {\n if (appliedState.relativeClip != currentState.relativeClip) {\n appliedState.relativeClip = currentState.relativeClip;\n currentState.relativeClip.setOn(gc, translateX, translateY);\n }\n\n if (appliedState.graphicHints != currentState.graphicHints) {\n reconcileHints(gc, appliedState.graphicHints,\n currentState.graphicHints);\n appliedState.graphicHints = currentState.graphicHints;\n }\n }", "public boolean verifyAndSetStatus() {\n if (status == FINISHED) {\n // No further checks needed\n return false;\n }\n \n if (Float.compare(estimation, 0f) <= 0) {\n if (status == READY_FOR_ESTIMATION) {\n return false;\n } else {\n status = READY_FOR_ESTIMATION;\n return true;\n }\n } else {\n // If no sprint was yet assigned, we must be in state\n // READY_FOR_SPRINT, otherwise in state IN_SPRINT\n if (sprint == null) {\n if (status == READY_FOR_SPRINT) {\n return false;\n } else {\n status = READY_FOR_SPRINT;\n return true;\n }\n } else {\n if (status == IN_SPRINT) {\n return false;\n } else {\n status = IN_SPRINT;\n return true;\n }\n }\n }\n }", "@Override\n public void syncState() {\n scheduledCounter.check();\n }", "public static void updateAutoEncumbrancechanges(EscmProposalMgmt proposalmgmt, boolean isCancel) {\n try {\n OBContext.setAdminMode();\n BigDecimal amt = BigDecimal.ZERO, amtTemp = BigDecimal.ZERO;\n List<EscmProposalmgmtLine> prolineList = proposalmgmt.getEscmProposalmgmtLineList();\n EscmProposalMgmt baseProposalObj = proposalmgmt.getEscmBaseproposal();\n List<EscmProposalmgmtLine> baseProlineList;\n BigDecimal diff = BigDecimal.ZERO;\n\n // checking with propsal line\n for (EscmProposalmgmtLine proposalline : prolineList) {\n if (!proposalline.isSummary()\n && (proposalline.getStatus() == null || !proposalline.getStatus().equals(\"CL\"))) {\n EfinBudgetManencumlines encline = proposalline.getEfinBudgmanencumline();\n if (isCancel) {\n\n if (encline.getManualEncumbrance().getAppliedAmount().compareTo(BigDecimal.ZERO) == 1) {\n\n if (proposalmgmt.getEscmBaseproposal() == null) {\n\n amt = encline.getAPPAmt().subtract(proposalline.getLineTotal());\n encline.setAPPAmt(amt);\n amtTemp = amtTemp.add(proposalline.getLineTotal());\n if (encline.getManualEncumbrance().getAppliedAmount().subtract(amtTemp)\n .compareTo(BigDecimal.ZERO) == 0 && baseProposalObj == null)\n encline.getManualEncumbrance().setDocumentStatus(\"CA\");\n }\n if (proposalmgmt.getEscmBaseproposal() == null)\n BidManagementDAO.insertEncumbranceModification(encline,\n proposalline.getLineTotal().negate(), null, \"PRO\", null, null);\n } else {\n // This else is for the particular case (proposal->po, po cancel and proposal\n // cancel)\n encline.getManualEncumbrance().setDocumentStatus(\"CA\");\n break;\n }\n\n } else {\n\n if (baseProposalObj == null) {\n if (encline != null) {\n encline.getManualEncumbrance().setDocumentStatus(\"DR\");\n // remove associated proposal line refernce\n if (encline.getEscmProposalmgmtLineEMEfinBudgmanencumlineIDList().size() > 0) {\n for (EscmProposalmgmtLine proLineList : encline\n .getEscmProposalmgmtLineEMEfinBudgmanencumlineIDList()) {\n proLineList.setEfinBudgmanencumline(null);\n OBDal.getInstance().save(proLineList);\n }\n }\n\n OBDal.getInstance().remove(encline);\n }\n }\n }\n /*\n * Trigger changes EfinEncumbarnceRevision.updateBudgetInquiry(encline,\n * encline.getManualEncumbrance(), proposalline.getLineTotal().negate());\n */\n }\n }\n\n // for cancel case if there exist a previous version, then update the encumbrance based on\n // the previous version values (Adding new records in the modification tab based on the new\n // and old proposal)\n if (isCancel) {\n if (baseProposalObj != null) {\n for (EscmProposalmgmtLine newproposalline : prolineList) {\n if (!newproposalline.isSummary()) {\n if (newproposalline.getStatus() == null) {\n EfinBudgetManencumlines encline = newproposalline.getEfinBudgmanencumline();\n diff = newproposalline.getLineTotal()\n .subtract(newproposalline.getEscmOldProposalline() != null\n ? newproposalline.getEscmOldProposalline().getLineTotal()\n : BigDecimal.ZERO);\n if (diff.compareTo(BigDecimal.ZERO) != 0) {\n ProposalManagementActionMethod.insertEncumbranceModification(encline,\n diff.negate(), null, false);\n encline.setAPPAmt(encline.getAPPAmt().add(diff.negate()));\n OBDal.getInstance().save(encline);\n }\n } else if (newproposalline.getStatus() != null\n && newproposalline.getEscmOldProposalline() != null\n && newproposalline.getEscmOldProposalline().getStatus() == null) {\n EfinBudgetManencumlines encline = newproposalline.getEfinBudgmanencumline();\n diff = newproposalline.getEscmOldProposalline() != null\n ? newproposalline.getEscmOldProposalline().getLineTotal()\n : BigDecimal.ZERO;\n if (diff.compareTo(BigDecimal.ZERO) != 0) {\n ProposalManagementActionMethod.insertEncumbranceModification(encline, diff, null,\n false);\n encline.setAPPAmt(encline.getAPPAmt().add(diff));\n OBDal.getInstance().save(encline);\n }\n }\n }\n }\n }\n }\n OBDal.getInstance().flush();\n } catch (final Exception e) {\n log.error(\"Exception in updateManualEncumAppAmt after Reject : \", e);\n } finally {\n OBContext.restorePreviousMode();\n }\n }", "public boolean willNotBeResurrected() {\n return state == State.FRESH || state == State.ERROR;\n }", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkAp() {\n\t\tboolean flag = oTest.checkAp();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "private boolean fileArrived(boolean granted) {\n\tString name = getPolicyFileName(granted);\n\tFile f = new File(name);\n\tboolean rvalue = ( f.exists() && _fileChanged(granted,f) );\n\n if (logger.isLoggable(Level.FINE)){\n logger.fine(\"JACC Policy Provider: file arrival check\" +\n \" type: \" + (granted? \"granted \" : \"excluded \") +\n \" arrived: \" + rvalue +\n\t\t \" exists: \" + f.exists() +\n\t\t \" lastModified: \" + f.lastModified() + \n\t\t \" storedTime: \" + lastModTimes[(int) (granted ? 1 : 0)] +\n \" state: \" + (this.state == OPEN_STATE ? \"open \" : \"deleted \") +\n CONTEXT_ID);\n }\n\n\treturn rvalue;\n }", "public void progressInfectionProbV1(){\n int recoveryProb = 0;\n //TODO work on this isolation probability\n //if not isolating already, maybe isolate\n if(!isolating) {\n int isolationProb = rand.nextInt(100) * daysInfected;\n if (isolationProb > 25) //TODO this is the probability\n isolating = true;\n }\n\n //progress the infection probabilistically\n if(daysInfected >= 5) { //start recovery at infection day 5, around which symptoms start\n if(daysInfected < 14)\n recoveryProb = daysInfected * 6; //80% of cases resolve after ~2 weeks\n else\n recoveryProb = daysInfected * 3; //Cases taking over 2 weeks (more severe cases) can take up to 6 weeks to resolve\n int recov = rand.nextInt(100);\n if (recov < recoveryProb) {\n //recover\n nextState = States.Recovered;\n immuneV1 = true;\n myAut.numberInfectedV1--;\n isolating = false;\n //System.out.println(\"cell recovered\");\n } else daysInfected++;\n } else daysInfected++;\n }", "@Override\n protected Collection<BDDState> preCheck(BDDState pState, VariableTrackingPrecision pPrecision) {\n if (pPrecision.isEmpty()) {\n return Collections.singleton(pState);\n }\n // the path is not fulfilled\n if (pState.getRegion().isFalse()) {\n return ImmutableList.of();\n }\n return null;\n }", "private boolean estPlein() {\n return (nbAssoc == associations.length);\n }", "boolean hasParentalStatus();", "private boolean isLegalState(int[] state){\n int[] stateOtherSide = new int[3];\n stateOtherSide[0] = totalMissionaries - state[0];\n stateOtherSide[1] = totalCannibals - state[1];\n stateOtherSide[2] = state[2]==0 ? 1 : 0;\n\n if((state[0] < state[1]) && state[0] >0 || (stateOtherSide[0] < stateOtherSide[1]) && stateOtherSide[0] > 0) {\n return false;\n }else{\n return true;\n }\n }", "boolean canTransit(final Map<T, Integer> state) {\n for (Entry<T, Integer> x : input.entrySet())\n if (get(state, x.getKey()) < x.getValue())\n return false;\n for (T x : inhibitor)\n if (get(state, x) != 0)\n return false;\n return true;\n }", "public void updateState(){\n\t\t\n\t\t\n\t\t\n\t\tArrayList<String> toAdd = new ArrayList<String>();\n\t\tArrayList<String> toRemove = new ArrayList<String>();\n\n\t\tthis.lastAdded.clear();\n\t\tthis.lastFulfilled.clear();\n\t\tthis.lastViolated.clear();\n\t\t\n\t\ttry {\n\n\t\t\tdo{\n\t\t\t\ttoAdd.clear();\n\t\t\t\ttoRemove.clear();\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iActive = reasoner.findall(\"xactive(A,Fa,Fm,Fd,Fr,Timeout)&not(as(A,Fa,Fm,Fd,Fr,Timeout))\");\n\t\t\t\twhile(iActive.hasNext()){\n\t\t\t\t\tUnifier un = iActive.next();\n\t\t\t\t\ttoAdd.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+ adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastAdded.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+ adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iViol = reasoner.findall(\"xviol(A,Fa,Fm,Fd,Fr,Timeout)&not(vs(A,Fa,Fm,Fd,Fr,Timeout))\");\n\t\t\t\twhile(iViol.hasNext()){\n\t\t\t\t\tUnifier un = iViol.next();\n\t\t\t\t\ttoAdd.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastViolated.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iDeactF = reasoner.findall(\"xdeact_f(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iDeactF.hasNext()){\n\t\t\t\t\tUnifier un = iDeactF.next();\n\t\t\t\t\ttoAdd.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString()+\",\"+un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastFulfilled.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iDeactR = reasoner.findall(\"xdeact_r(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iDeactR.hasNext()){\n\t\t\t\t\tUnifier un = iDeactR.next();\n\t\t\t\t\ttoAdd.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastFulfilled.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iFailed = reasoner.findall(\"xfailed(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iFailed.hasNext()){\n\t\t\t\t\tUnifier un = iFailed.next();\n\t\t\t\t\ttoAdd.add(\"fs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//norms deactivated (fulfilled) whose maintenance condition does not hold can be removed.\n\t\t\t\t//if they are not removed, new instances of the same norm are not activated\n\t\t\t\tIterator<Unifier> iDeactivated_to_remove = reasoner.findall(\"ds(A,Fa,Fm,Fd,Fr,Timeout)&not(Fm)\");\n\t\t\t\twhile(iDeactivated_to_remove.hasNext()){\n\t\t\t\t\tUnifier un = iDeactivated_to_remove.next();\n\t\t\t\t\ttoRemove.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\tfor(String s:toAdd){\n\t\t\t\t\treasoner.assertValue(s);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(String s:toRemove){\n\t\t\t\t\treasoner.retract(s);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}while(toAdd.size()>0|toRemove.size()>0);\t\t\t\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "public boolean getStatus() {\n return (rnd.nextInt(obstructionChanceBound) <= obstructionChance);\n }", "public void checkState() {\r\n\t\tout.println(state);\r\n\t\tif(getEnergy() < 80 && getOthers() > 5) {\r\n\t\t\tstate = 1;\r\n\t\t\tturnLeft(getHeading() % 90);\r\n\t\t\tahead(moveAmount);\r\n\t\t}\r\n\t\telse if(getEnergy() < 80 && getOthers() < 5) {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\t\r\n\t}", "private boolean isCollStatusPending(final Specimen objSpecimen)\r\n\t{\r\n\t\treturn objSpecimen.getCollectionStatus() == null || !Constants.COLLECTION_STATUS_COLLECTED.equals(objSpecimen.getCollectionStatus());\r\n\t}", "private boolean tryInactivate() {\n if (active) {\n if (!pool.tryDecrementActiveCount())\n return false;\n active = false;\n }\n return true;\n }", "private boolean tryInactivate() {\n if (active) {\n if (!pool.tryDecrementActiveCount())\n return false;\n active = false;\n }\n return true;\n }", "private boolean worthWaiting() {\n return !PsiDocumentManager.getInstance(myProject).hasUncommitedDocuments() && !ApplicationManager.getApplication().isWriteAccessAllowed() && !FileEditorsSplitters.isOpenedInBulk(myTextEditor.myFile);\n }", "private void checkConditionsToInteroperate(AID client) {\r\n\t\tif (!client.equals(TRUSTED_AID_1))\r\n\t\t\tISOException.throwIt(SW_CLIENT_UNAUTHORISED);\r\n\t\tif (image.isActive())\r\n\t\t\tISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);\r\n\t}", "final void checkForComodification() {\n\t}", "protected java.security.Policy getPolicy(){\n\tif (stateIs(INSERVICE_STATE)) {\n\t return this.policy;\n\t} \n\tif (logger.isLoggable(Level.FINEST)) {\n\t logger.finest(\"JACC Policy Provider: getPolicy (\"+CONTEXT_ID+\") is NOT in service\");\n\t}\n\treturn null;\n }", "protected boolean canProcessorInit(PaymentRequestDocument paymentRequestDocument) {\n String status = paymentRequestDocument.getApplicationDocumentStatus();\r\n if (StringUtils.equals(status, PaymentRequestStatuses.APPDOC_INITIATE)) {\r\n return true;\r\n }\r\n return false;\r\n }", "private void reviewDeptPolicies() {\n if(metWithHr && metDeptStaff) {\n reviewedDeptPolicies = true;\n } else {\n System.out.println(\"Sorry, you cannot review \"\n + \" department policies until you have first met with HR \"\n + \"and then with department staff.\");\n }\n }", "private void checkStatus() {\n if (switchOff) {\n String msg = \"Locker is switched off - no data source accessible.\";\n log.error(msg);\n throw new IllegalStateException(msg);\n }\n }", "private void checkAndUpdate() {\n if (csProposeEnter.get()) {\n if (numRepliesReceived.get() == (config.getNumNodes() - 1)\n && requestQueue.peek().getFromID().equals(nodeID)) {\n csProposeEnter.set(false);\n csAllowEnter.set(true);\n }\n }\n }", "private Boolean precond() {\r\n\t\tcalculoCantidadSacar(grupoPuestosController.getIdConcursoPuestoAgr());\r\n\t\t/**\r\n\t\t * fin incidencia 0001649\r\n\t\t */\r\n\t\tBoolean respuesta = validacionesIteracion();\r\n\t\treturn respuesta;\r\n\t}", "public abstract boolean isGoal(CCState state);", "boolean hasAccountBudgetProposal();", "public static boolean isPreparing(Transaction tx)\n {\n if (tx == null) return false;\n int status;\n try\n {\n status = tx.getStatus();\n return status == Status.STATUS_PREPARING;\n }\n catch (SystemException e)\n {\n return false;\n }\n }", "private void checkState() {\r\n\t\tswitch (this.stepPanel.getStep()) {\r\n\t\tcase StepPanel.STEP_HOST_GRAPH:\r\n\t\t\tcheckHostGraphAndNextStep();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_STOP_GRAPH:\r\n\t\t\tcheckStopGraphAndNextStep();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_CRITICAL_PAIRS:\r\n\t\t\tcheckPairsAndNextStep();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_FINISH:\r\n\t\t\tcheckIfReadyToParse();\r\n\t\t\tquitDialog();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public final boolean hasActiveRetentionPeriod() {\n\t if ( m_retainUntil == -1L)\n\t return false;\n\t return System.currentTimeMillis() < m_retainUntil ? true : false;\n\t}", "public boolean checkCurrentCampaianStatus(String myAppName) {\n\t\tboolean currentValue;\n\t\tLog.info(\"Searching for current compaign status for app\" + myAppName);\n\t\tWebElement myAccount = getAccontDetails(myAppName);\n\t\tWebElement myAccountCampaianStatus = myAccount.findElement(By.className(\"adminTable3\"));\n\t\tString elementPageSource = myAccountCampaianStatus.getAttribute(\"outerHTML\");\n\t\tboolean ifactive = checkAccountAction(myAppName);\n\t\tif (ifactive) {\n\t\t\tif (elementPageSource.contains(\"checked=\" + \"\\\"checked\\\"\")) {\n\t\t\t\tLog.info(myAppName + \" compaign is enabled\");\n\t\t\t\tcurrentValue = true;\n\t\t\t} else {\n\t\t\t\tLog.info(myAppName + \" compaign is disabled\");\n\t\t\t\tcurrentValue = false;\n\t\t\t}\n\t\t\treturn currentValue;\n\t\t} else {\n\t\t\tif (elementPageSource.contains(\"disabled=\" + \"\\\"disabled\\\"\")) {\n\t\t\t\tLog.info(myAppName + \" compaign is disabled\");\n\t\t\t\tcurrentValue = false;\n\t\t\t} else {\n\t\t\t\tLog.error(myAppName + \" compaign is enabled Which is a deactivatd app\");\n\t\t\t\tcurrentValue = true;\n\t\t\t}\n\t\t\treturn currentValue;\n\t\t}\n\n\t}", "public void isSafe() {\n\t\tsafetyLog = new boolean[proc];\r\n\r\n\t\tfor (int i = 0; i < proc; i++) {\r\n\t\t\tsafetyLog[i] = true;\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < proc; i++) {\r\n\t\t\tfor (int j = 0; j < res; j++) {\r\n\t\t\t\tif (need[i][j] > available[0][j]) {\r\n\t\t\t\t\tsafetyLog[i] = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/*System.out\r\n\t\t\t\t.println(\"Following processes are safe and unsafe to start with\");\r\n\r\n\t\tfor (int i = 0; i < proc; i++) {\r\n\t\t\tif (safetyLog[i]) {\r\n\t\t\t\tSystem.out.println(\"P\" + i + \": Safe\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"P\" + i + \": Un-Safe\");\r\n\t\t\t}\r\n\t\t}*/\r\n\r\n\t}", "public void checkOverDue() {\n\t\tif (state == loanState.current && //changed 'StAtE' to 'state' and ' lOaN_sTaTe.CURRENT to loanState.current\r\n\t\t\tCalendar.getInstance().getDate().after(date)) { //changed Calendar.gEtInStAnCe to Calender.getInstance and gEt_DaTe to getDate and DaTe to date\r\n\t\t\tthis.state = loanState.overDue; //changed 'StAtE' to 'state' and lOaN_sTaTe.OVER_DUE to loanState.overDue\t\t\t\r\n\t\t} //added curly brackets\r\n\t}", "private boolean isAvailable() {\n\t\tfor (int i = 0; i < lawsuitsAsClaimant.size(); i++) {\n\t\t\tif (lawsuitsAsClaimant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check lawsuits as Defendant\n\t\tfor (int i = 0; i < lawsuitsAsDefendant.size(); i++) {\n\t\t\tif (lawsuitsAsDefendant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "boolean hasAlreadCompareLose();", "private boolean not_completeScorboard(int no_of_instruct) {\n\n\t\tboolean comp;\n\t\tcomp = false;\n\t\tfor (int p = 0; p < no_of_instruct; p++) {\n\t\t\tif ((lstInstructionsScorboard.get(p).getStatus() != EnumInstructionStatus.complete))\n\t\t\t\tcomp = true;\n\t\t}\n\t\treturn comp;\n\t}", "public boolean isAcid() {\n return hasBase || deltas.size() > 0;\n }", "private boolean hasInProgressAttempt(QueuedRequestWithState queuedRequestWithState) {\n return (\n queuedRequestWithState.getCurrentState() ==\n InternalRequestStates.SEND_APPLY_REQUESTS &&\n !agentManager\n .getAgentResponses(queuedRequestWithState.getQueuedRequestId().getRequestId())\n .isEmpty()\n );\n }", "private boolean isValid() {\n\t\treturn proposalTable != null && !proposalTable.isDisposed();\n\t}", "public boolean isUpdateAllIntrospectedResources () {\n return updateAllIntrospectedResources;\n }", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "public boolean isAuMoinsUneCompetenceAutrefEstEnCoursDeModification() {\n\t\tboolean result = false;\n\t\tint i = 0;\n\t\twhile (!result && i < tosRepartFdpCompetencesAutres().count()) {\n\t\t\tEORepartFdpAutre repart = (EORepartFdpAutre) tosRepartFdpCompetencesAutres().objectAtIndex(i);\n\t\t\tif (repart.isEnCoursDeModification()) {\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn result;\n\t}", "public int checkGoals() {\n\t\tupdateUnsupportedPreconditionInconsistencies(maxLevel);\n\t\tcountInconsistencies();\n\t\tgraphQuality = calculateQuality();\n\t\treturn this.inconsistencyCount;\n\t}", "private boolean tryCounterExample(BDD reachableStates){\n\t\tBDD counterExample = reachableStates.andWith(buildEndGame());\n\t\t\n\t\treturn counterExample.satCount(this.dimension * this.dimension - 1) == 0 ? true : false;\n\t}", "public boolean checkIn(){\n return state.checkIn();\n }", "public void checkActivation() {\n\t\tplayer.getPackets().sendConfigByFile(10907, 1);\n\t\tplayer.getPackets().sendConfigByFile(10902, 1);\n\t\tfor (int x = 0; x <= 12; x++) {\n\t\t\tif (player.getActivatedLodestones()[x] == true) {\n\t\t\t\tplayer.getPackets().sendConfigByFile(CONFIG_IDS[x], 1);\n\t\t\t}\n\t\t}\n\t\tif (player.getActivatedLodestones()[13] == true) {\n\t\t\tplayer.getPackets().sendConfigByFile(CONFIG_IDS[13], 190);\n\t\t}\n\t\tif (player.getActivatedLodestones()[14] == true) {\n\t\t\tplayer.getPackets().sendConfigByFile(CONFIG_IDS[14], 15);\n\t\t}\n\t}", "public boolean isAbilityConfigured(Ability ability) {\n\n ReconfigurationMode mode = getFrameworkMode();\n\n if (mode == ReconfigurationMode.WARNING_ONLY || mode == ReconfigurationMode.IMPLICIT_RECONFIG) {\n return true;\n } else {\n VariablePointPoolAbilityConfiguration.VPPConfigurationStatus status = getConfiguration().getAbilityStatus(ability);\n return (status == VariablePointPoolAbilityConfiguration.VPPConfigurationStatus.ENABLED || status == VariablePointPoolAbilityConfiguration.VPPConfigurationStatus.PARENT_ENABLED);\n\n }\n }", "void check_game_state() {\n // Game over\n if (lives <= 0){ // No lives left\n end_game();\n }\n for (Alien alien : aliens){ // Aliens reached bottom of screen\n if (alien.y_position + alien.alien_height >= ship.y_position) {\n end_game();\n break;\n }\n }\n\n // Empty board\n if (aliens.isEmpty()) { // All aliens defeated\n if (level < 3) { // Level up\n level_up();\n alien_setup();\n }\n else { // Victory\n end_game();\n }\n }\n }", "FileState checkFileState(FsPath path);", "public boolean ctx_on(RTContainer n){\n\t\tif(n.getFulfillmentConditions().size()>0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "private void checkForSuspendChanges(){\n\tif(!blockedQueue.isEmpty() && !readySuspendedQueue.isEmpty()){\n\t //suspending blocked process\n\t Process suspending = GlobalVariables.removeQueueTail(blockedQueue);\n\t GlobalVariables.write(\"\\tSUSPENDING: Blocked Process \" + suspending.getId());\n\t blockedSuspendedQueue.offer(suspending);\n\t suspending.setStatus(GlobalVariables.BLOCKED_SUSPENDED_STATUS);\n\t GlobalVariables.mm.removeProcessFromMain(suspending);\n\n\t //move ready suspended process to ready\n\t Process readying = readySuspendedQueue.poll();\n\t GlobalVariables.write(\"\\tMOVING TO MAIN MEM: Suspended Process \" + readying.getId());\n\t readyQueue.offer(readying);\n\t readying.setStatus(GlobalVariables.READY_STATUS);\n\t GlobalVariables.mm.addProcessToMain(readying);\n\t} else if (!readySuspendedQueue.isEmpty() && GlobalVariables.mm.roomInMainMem()) {\n\t //move ready suspended process to ready\n\t Process readying = readySuspendedQueue.poll();\n\t GlobalVariables.write(\"\\tMOVING TO MAIN MEM: Ready/Suspended Process \" + readying.getId());\n\t readyQueue.offer(readying);\n\t readying.setStatus(GlobalVariables.READY_STATUS);\n\t GlobalVariables.mm.addProcessToMain(readying);\n\t}\n\telse if (readySuspendedQueue.isEmpty() && !blockedSuspendedQueue.isEmpty() && GlobalVariables.mm.roomInMainMem()) {\n\t //move blocked suspend process to blocked\n\t Process p = blockedSuspendedQueue.poll();\n\t GlobalVariables.write(\"\\tMOVING TO MAIN MEM: Blocked/Suspended Process \" + p.getId());\n\t blockedQueue.offer(p);\n\t p.setStatus(GlobalVariables.BLOCKED_STATUS);\n\t GlobalVariables.mm.addProcessToMain(p);\n\t}\n }", "boolean collectiveDeliveryPolicyHasEntry(Message msg){\n\t\treturn collectiveDatastruct.containsKey(new DeliveryPolicyDataStructureKey(msg.getId(), msg.getSenderId()));\r\n\t}", "@SystemAPI\n\tboolean needsApproval();", "public boolean takeControl() {\n\t\tif (!sharedState.isFindingObject()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// returns true if the shared state return in 1\r\n\t\treturn sharedState.getCurrentBehaviour()==1; \r\n\t}", "@Override\r\n\tpublic boolean CheckConditions() {\n\t\treturn true;\r\n\t}", "private static void checkResourceInConn(Connection conn) throws ServiceException {\n // Check weather OverlayVpn exist\n ResultRsp<OverlayVpn> overlayVpnRsp =\n new InventoryDao<OverlayVpn>().query(OverlayVpn.class, conn.getCompositeVpnId(), null);\n if(!overlayVpnRsp.isValid()) {\n ThrowOverlayVpnExcpt.throwResNotExistAsBadReq(\"OverlayVpn\", conn.getCompositeVpnId());\n }\n\n BaseMappingPolicy mappingPolicy = getMappingPolicy(conn.getTechnology(), conn.getMappingPolicyId());\n\n if(null != mappingPolicy) {\n validateTypeConsistency(conn.getTechnology(), mappingPolicy.getType());\n }\n }", "public void checkPrize()\n {\n for(PrizeMulti prize : prizes.getPrizes())\n {\n if(prize.isActive())\n {\n if (((locX - prize.getX()) * (locX - prize.getX()) + (locY - prize.getY()) * (locY - prize.getY())) <= 35 * 35) {\n if (prizeOwn == null)\n {\n status.setUsePrize(true);\n prize.deActive();\n prizeOwn = prize;\n if (prize.getType().equals(\"Health\")) {\n stamina += (stamina / 10);\n }\n if (prize.getType().equals(\"Power2\")) {\n canonPower *= 2;\n }\n if (prize.getType().equals(\"Power3\")) {\n canonPower *= 3;\n }\n if (prize.getType ().equals (\"Laser\")) {\n setBulletType (\"Laser\");\n }\n\n if (prize.getType ().equals (\"Protect\")) {\n setProtection (true);\n }\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Thread.sleep(10000);\n prizeOwn = null;\n if (prize.getType().equals(\"Power2\")) {\n canonPower /= 2;\n }\n if (prize.getType().equals(\"Power3\")) {\n canonPower /= 3;\n }\n if (prize.getType ().equals (\"Laser\")) {\n setBulletType (\"Normal\");\n }\n Thread.sleep (5000);\n if (prize.getType ().equals (\"Protect\")) {\n setProtection (false);\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }).start();\n }\n }\n }\n }\n }", "private void verifyActive() {\n if (!active) {\n throw new IllegalStateException(\"Container is no longer active for loading\");\n }\n }", "void validateState() throws EPPCodecException {\n // add/chg/rem\n if ((addDsData == null) && (chgDsData == null) && (remKeyTag == null)) {\n throw new EPPCodecException(\"EPPSecDNSExtUpdate required attribute missing\");\n }\n \n // Ensure there is only one non-null add, chg, or rem\n\t\tif (((addDsData != null) && ((chgDsData != null) || (remKeyTag != null)))\n\t\t\t\t|| ((chgDsData != null) && ((addDsData != null) || (remKeyTag != null)))\n\t\t\t\t|| ((remKeyTag != null) && ((chgDsData != null) || (addDsData != null)))) {\n\t\t\tthrow new EPPCodecException(\"Only one add, chg, or rem is allowed\");\n\t\t}\n }", "public boolean initialConditions() {\n\n boolean evaluable;\n\n\n evaluable = diag.directedLinks();\n\n if (evaluable == false) {\n System.out.print(\"Influence Diagram with no directed links\\n\\n\");\n return (false);\n }\n\n evaluable = ((((IDWithSVNodes) diag).hasOnlyOneTerminalSVNode())\n || (((IDWithSVNodes) diag).hasOnlyOneValueNode()));\n\n\n if (evaluable == false) {\n System.out.print(\"Influence Diagram with 0 or more than 1 terminal super value nodes\\n or hasn't got an only utility node\\n\");\n return (false);\n }\n\n evaluable = diag.hasCycles();\n if (evaluable == true) {\n System.out.print(\"Influence Diagram with cycles\\n\\n\");\n return (false);\n }\n\n diag.addNonForgettingArcs();\n\n evaluable = diag.pathBetweenDecisions();\n if (evaluable == false) {\n System.out.print(\"Influence Diagram with non ordered decisions\\n\\n\");\n return (false);\n }\n\n evaluable = ((IDWithSVNodes) diag).isTreeStructureSV();\n if (evaluable == false) {\n System.out.print(\"Influence Diagram whose structure of value nodes isn't a tree\\n\\n\");\n return (false);\n }\n\n // Remove barren nodes\n\n //diag.eliminateRedundancy();\n diag.removeBarrenNodes();\n\n\n\n // Return true if OK\n\n return (true);\n }", "public void isStillInCombat() {\n isInCombat = enemiesInCombat.size() > 0;\n }" ]
[ "0.54006356", "0.5317085", "0.5186097", "0.5161771", "0.514682", "0.5083851", "0.5057588", "0.5056856", "0.50561154", "0.5029786", "0.4995359", "0.49529976", "0.49187118", "0.49055117", "0.48943618", "0.4894341", "0.48781967", "0.48614126", "0.48611733", "0.48600218", "0.48510206", "0.4850413", "0.48491186", "0.48479813", "0.48472932", "0.4837517", "0.4831827", "0.48279148", "0.48176882", "0.4810639", "0.48080185", "0.48069316", "0.48033834", "0.48000032", "0.47969046", "0.4793761", "0.47927654", "0.47888196", "0.47862944", "0.4782054", "0.47689533", "0.47653154", "0.47624424", "0.4762385", "0.47409412", "0.47384065", "0.4731003", "0.4731003", "0.47257662", "0.47242346", "0.472171", "0.4716392", "0.4711068", "0.47071406", "0.4704668", "0.46969175", "0.46960795", "0.46954647", "0.4687026", "0.46835825", "0.4683423", "0.46821967", "0.46784353", "0.4677599", "0.46762964", "0.46697927", "0.46674314", "0.46646667", "0.46643883", "0.4663771", "0.46580043", "0.46438602", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.46394157", "0.4638589", "0.4638462", "0.46302068", "0.46222723", "0.4621157", "0.46170014", "0.461654", "0.46149865", "0.46102896", "0.4610046", "0.46069112", "0.4606665", "0.460468", "0.460385", "0.4601269", "0.46003813", "0.45990083", "0.45987183", "0.4598263", "0.4583358" ]
0.5858798
0
This method workarounds a bug in PolicyParser.write(...).
private String escapeName(String name) { return (name != null && name.indexOf('"') > 0) ? name.replaceAll("\"", "\\\\\"") : name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean createPolicyFile\n\t(boolean granted, PolicyParser parser, boolean woc) throws java.io.IOException {\n\n\tboolean result = woc;\n\tcreatePolicyContextDirectory();\n\tremovePolicyFile(granted);\n\tString name = getPolicyFileName(granted);\n\tOutputStreamWriter writer = null;\n\ttry {\n\t if(logger.isLoggable (Level.FINE)){\n\t\tlogger.fine(\"JACC Policy Provider: Writing grant statements to policy file: \"+name);\n\t }\n\t writer = new OutputStreamWriter(new FileOutputStream(name), \"UTF-8\");\n\t parser.write(writer);\n\t result = false;\n\t} catch(java.io.FileNotFoundException fnfe) {\n String msg=localStrings.getLocalString(\"pc.file_error\",\"file not found \"+name,\n new Object []{name, fnfe});\n\t logger.log(Level.SEVERE,msg);\n\t throw fnfe;\n\t} catch(java.io.IOException ioe){\n String msg=localStrings.getLocalString(\"pc.file_write_error\",\"file IO error on file \"+name,\n new Object []{name,ioe});\n\t logger.log(Level.SEVERE,msg);\n\t throw ioe;\n\t} finally {\n\t if (writer != null) {\n\t\ttry {\n\t\t writer.close();\n\t\t captureFileTime(granted);\n\t\t} catch (Exception e) {\n String defMsg=\"Unable to close Policy file: \"+name;\n String msg=localStrings.getLocalString(\"pc.file_close_error\",defMsg,new Object []{name,e}); \n\t\t logger.log(Level.SEVERE,msg);\n\t\t throw new RuntimeException(defMsg);\n\t\t}\n\t }\n\t}\n\treturn result;\n }", "@Override\r\n\tpublic void write() {\n\t\t\r\n\t}", "@Override\n public void write() {\n\n }", "protected void _verifyValueWrite(String typeMsg)\n/* */ throws IOException\n/* */ {\n/* 792 */ int status = this._writeContext.writeValue();\n/* 793 */ if (this._cfgPrettyPrinter != null)\n/* */ {\n/* 795 */ _verifyPrettyValueWrite(typeMsg, status); return;\n/* */ }\n/* */ \n/* */ char c;\n/* 799 */ switch (status) {\n/* */ case 0: case 4: \n/* */ default: \n/* 802 */ return;\n/* */ case 1: \n/* 804 */ c = ',';\n/* 805 */ break;\n/* */ case 2: \n/* 807 */ c = ':';\n/* 808 */ break;\n/* */ case 3: \n/* 810 */ if (this._rootValueSeparator != null) {\n/* 811 */ writeRaw(this._rootValueSeparator.getValue());\n/* */ }\n/* 813 */ return;\n/* */ case 5: \n/* 815 */ _reportCantWriteValueExpectName(typeMsg);\n/* 816 */ return;\n/* */ }\n/* 818 */ if (this._outputTail >= this._outputEnd) {\n/* 819 */ _flushBuffer();\n/* */ }\n/* 821 */ this._outputBuffer[(this._outputTail++)] = c;\n/* */ }", "@Override\n public void write(String text) {\n }", "protected abstract void _write(DataOutput output) throws IOException;", "@Override\n\tprotected void write(ObjectOutput out) throws IOException {\n\t\t\n\t}", "Write createWrite();", "private final void _writeNull()\n/* */ throws IOException\n/* */ {\n/* 1610 */ if (this._outputTail + 4 >= this._outputEnd) {\n/* 1611 */ _flushBuffer();\n/* */ }\n/* 1613 */ int ptr = this._outputTail;\n/* 1614 */ char[] buf = this._outputBuffer;\n/* 1615 */ buf[ptr] = 'n';\n/* 1616 */ buf[(++ptr)] = 'u';\n/* 1617 */ buf[(++ptr)] = 'l';\n/* 1618 */ buf[(++ptr)] = 'l';\n/* 1619 */ this._outputTail = (ptr + 1);\n/* */ }", "private void _writeStringCustom(int len)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1261 */ int end = this._outputTail + len;\n/* 1262 */ int[] escCodes = this._outputEscapes;\n/* 1263 */ int maxNonEscaped = this._maximumNonEscapedChar < 1 ? 65535 : this._maximumNonEscapedChar;\n/* 1264 */ int escLimit = Math.min(escCodes.length, maxNonEscaped + 1);\n/* 1265 */ int escCode = 0;\n/* 1266 */ CharacterEscapes customEscapes = this._characterEscapes;\n/* */ \n/* */ \n/* 1269 */ while (this._outputTail < end)\n/* */ {\n/* */ char c;\n/* */ do\n/* */ {\n/* 1274 */ c = this._outputBuffer[this._outputTail];\n/* 1275 */ if (c < escLimit) {\n/* 1276 */ escCode = escCodes[c];\n/* 1277 */ if (escCode != 0)\n/* */ break;\n/* */ } else {\n/* 1280 */ if (c > maxNonEscaped) {\n/* 1281 */ escCode = -1;\n/* 1282 */ break;\n/* */ }\n/* 1284 */ if ((this._currentEscape = customEscapes.getEscapeSequence(c)) != null) {\n/* 1285 */ escCode = -2;\n/* 1286 */ break;\n/* */ }\n/* */ }\n/* 1289 */ } while (++this._outputTail < end);\n/* 1290 */ break;\n/* */ \n/* */ \n/* 1293 */ int flushLen = this._outputTail - this._outputHead;\n/* 1294 */ if (flushLen > 0) {\n/* 1295 */ this._writer.write(this._outputBuffer, this._outputHead, flushLen);\n/* */ }\n/* 1297 */ this._outputTail += 1;\n/* 1298 */ _prependOrWriteCharacterEscape(c, escCode);\n/* */ }\n/* */ }", "@Override\n protected void doWriteTo(StreamOutput out) throws IOException {\n }", "void write();", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(73);\n StringWriter stringWriter0 = new StringWriter(3164);\n stringWriter0.write(\"{\");\n stringWriter0.close();\n stringWriter0.close();\n simpleNode0.setIdentifier(\"{\");\n simpleNode0.setIdentifier(\">\");\n simpleNode0.dump(\"1+wdB\", stringWriter0);\n simpleNode0.toString();\n PipedInputStream pipedInputStream0 = new PipedInputStream();\n PipedOutputStream pipedOutputStream0 = new PipedOutputStream(pipedInputStream0);\n byte[] byteArray0 = new byte[1];\n byteArray0[0] = (byte) (-45);\n int int0 = (-1952463216);\n // Undeclared exception!\n try { \n pipedOutputStream0.write(byteArray0, (-1952463216), (-486));\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.io.PipedOutputStream\", e);\n }\n }", "@Override\r\n\tpublic int write() throws Exception {\n\t\treturn 0;\r\n\t}", "static void write() {\n try {\n b.setLength(0); // clear the line buffer\n\n // this next section builds the output string while protecting\n // string literals. All extra spaces are removed from the output\n // string, except that string literals are left as is.\n ArrayList list = new ArrayList();\n String s = new String(\"\");\n for (int i = 0; i < a.size(); i++) {\n Object o = a.get(i);\n if (o instanceof Token) {\n Token token = (Token)o;\n if (token.kind == JavaParserConstants.STRING_LITERAL) {\n s = s.replaceAll(\"[ ]+\", \" \");\n list.add(s);\n s = new String(\"\");\n list.add(token.image);\n }\n else {\n s += ((Token)o).image;\n s = s.replaceAll(\"[ ]+\", \" \");\n }\n }\n else {\n s += (String)o;\n s = s.replaceAll(\"[ ]+\", \" \");\n }\n }\n for (int i = 0; i < list.size(); i++) {\n b.append((String)list.get(i));\n }\n\n b.append(s);\n s = b.toString();\n\n // check for blank line(s)\n String maybe_blank = new String(s);\n if (maybe_blank.trim().length() == 0) {\n // yep, it's a blank, so just print it out\n if (s.length() >= ls.length()) {\n s = s.substring(0, s.length() - ls.length());\n }\n outputBuffer.append(s);\n a.clear();\n return;\n }\n\n // indent --\n // most lines get indented, but there are a few special cases:\n // \"else\" gets put on the same line as the closing \"}\" for the \"if\",\n // so don't want to indent. Similarly with \"catch\" and \"finally\".\n // The \"while\" at the end of a \"do\" loop is marked as \"^while\" to\n // differentiate it from a regular \"while\" block. \"else if\" is also\n // a special case.\n if (!s.startsWith(\" else\")\n && !s.startsWith(\" catch\")\n && !s.startsWith(\" finally\")\n && !s.startsWith(\" ^while\")\n && !s.startsWith(\" {\")\n && (!endsWith(outputBuffer, \"else\") && !endsWith(outputBuffer, \"else \"))) {\n s = s.trim();\n for (int i = 0; i < level; i++) {\n s = indent + s;\n }\n }\n\n // maybe clean out the ^ from the specially marked \"while\" at the\n // end of a \"do\" loop\n if (s.startsWith(\" ^while\")) {\n b.deleteCharAt(1);\n s = b.toString();\n }\n\n // check if the output buffer does NOT end with a new line. If it\n // doesn't, remove any leading whitespace from this line\n if (!endsWith(outputBuffer, \"\\u005cn\") && !endsWith(outputBuffer, \"\\u005cr\")) {\n s = trimStart(s);\n }\n\n // check that there aren't extra spaces in the buffer already --\n // this handles the case where the output buffer ends with a space\n // and the new string starts with a space, don't want 2 spaces.\n if (s.startsWith(\" \") && endsWith(outputBuffer, \" \")) {\n s = s.substring(1);\n }\n\n // check that there is one space between the end of the output\n // buffer and this line -- this handles the case where the output\n // buffer does not end in a space and the new string does not start\n // with a space, want one space in between.\n if (!s.startsWith(\" \")\n && !endsWith(outputBuffer, \" \")\n && !endsWith(outputBuffer, \"\\u005cr\")\n && !endsWith(outputBuffer, \"\\u005cn\")\n && outputBuffer.length() > 0) {\n outputBuffer.append(\" \");\n }\n\n // by the Sun standard, there is no situation where '(' is followed\n // by a space or ')' is preceded with by a space\n s = s.replaceAll(\"[(][ ]\", \"(\");\n s = s.replaceAll(\"[ ][)]\", \")\");\n\n // there should be no situation where a comma is preceded by a space,\n // although that seems to happen when formatting string arrays.\n s = s.replaceAll(\"\\u005c\\u005cs+[,]\", \",\");\n\n // finally! add the string to the output buffer\n // check for line length, may need to wrap. Sun says to avoid lines\n // longer than 80 characters. This doesn't work well yet, so I've \n // commented out the wrapping code. Still need to clean out the\n // wrapping markers.\n //s = s.replaceAll(\"[\u001c]\", \"\");\n outputBuffer.append(s);\n /*\n int wrap_sep_count = countWrapSep(s);\n if (s.length() - wrap_sep_count > 80) {\n String[] lines = wrapLines(s);\n if ( lines != null ) {\n for (int i = 0; i < lines.length; i++) {\n outputBuffer.append(lines[i]).append(ls);\n }\n }\n else {\n // whack any remaining \u001c characters\n s = s.replaceAll(\"[\u001c]\", \"\");\n outputBuffer.append(s);\n }\n }\n else {\n // whack any remaining \u001c characters\n s = s.replaceAll(\"[\u001c]\", \"\");\n outputBuffer.append(s);\n }\n */\n // clear the accumulator for the next line\n a.clear();\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }", "int writeTo(OutputStream out, boolean withXmlDecl, Charset enc) throws IOException;", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n StringWriter stringWriter0 = new StringWriter(70);\n char[] charArray0 = new char[9];\n charArray0[0] = 'T';\n stringWriter0.write(70);\n stringWriter0.write(charArray0);\n StringWriter stringWriter1 = new StringWriter();\n StringWriter stringWriter2 = new StringWriter();\n stringWriter2.write(charArray0);\n stringWriter1.write(charArray0);\n StringBuffer stringBuffer0 = new StringBuffer();\n StringWriter stringWriter3 = stringWriter1.append((CharSequence) stringBuffer0);\n stringWriter2.flush();\n StringWriter stringWriter4 = new StringWriter(70);\n stringWriter2.write(63);\n StringWriter stringWriter5 = new StringWriter();\n stringWriter3.close();\n stringWriter5.flush();\n StringWriter stringWriter6 = new StringWriter(70);\n SimpleNode simpleNode0 = new SimpleNode(63);\n stringWriter2.write(1);\n StringWriter stringWriter7 = new StringWriter(63);\n stringWriter0.flush();\n stringWriter3.write(\"k}^Bdh;XfPc/Onl>.\");\n simpleNode0.setIdentifier(\"null\");\n stringWriter0.write(charArray0);\n simpleNode0.dump(\"*gt\", stringWriter0);\n assertEquals(\"FT\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000T\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000\\u0000<Literal>\\n<identifier>Literal Value</identifier>\\n</Literal>\\n\", stringWriter0.toString());\n }", "private void writeOutput(\n RecordWriter<Writable, Object> writer,\n TaskAttemptContext context) throws IOException, InterruptedException {\n NullWritable nullWritable = NullWritable.get();\n try (ManifestCommitterTestSupport.CloseWriter<Writable, Object> cw =\n new ManifestCommitterTestSupport.CloseWriter<>(writer, context)) {\n writer.write(KEY_1, VAL_1);\n writer.write(null, nullWritable);\n writer.write(null, VAL_1);\n writer.write(nullWritable, VAL_2);\n writer.write(KEY_2, nullWritable);\n writer.write(KEY_1, null);\n writer.write(null, null);\n writer.write(KEY_2, VAL_2);\n writer.close(context);\n }\n }", "private final synchronized void writePreferencesImpl() {\n if ( LOGD ) { Log.d( TAG, \"writePreferencesImpl \" + mPrefFile + \" \" + mPrefKey ); }\n\n mForcePreferenceWrite = false;\n\n SharedPreferences pref =\n Utilities.getContext().getSharedPreferences( mPrefFile, Context.MODE_PRIVATE );\n SharedPreferences.Editor edit = pref.edit();\n edit.putString( mPrefKey, getSerializedString() );\n Utilities.commitNoCrash(edit);\n }", "@Test(timeout = 4000)\n public void test31() throws Throwable {\n StringWriter stringWriter0 = new StringWriter(70);\n char[] charArray0 = new char[10];\n charArray0[1] = 'T';\n charArray0[5] = 'T';\n stringWriter0.write(70);\n charArray0[2] = 'T';\n charArray0[2] = '\\u0000';\n stringWriter0.write(charArray0);\n StringWriter stringWriter1 = new StringWriter('T');\n StringWriter stringWriter2 = new StringWriter();\n stringWriter2.write(charArray0);\n stringWriter0.write(charArray0);\n stringWriter0.close();\n StringWriter stringWriter3 = new StringWriter();\n stringWriter2.flush();\n stringWriter2.close();\n StringWriter stringWriter4 = new StringWriter('T');\n stringWriter1.write((int) 'T');\n StringWriter stringWriter5 = new StringWriter();\n stringWriter3.close();\n StringWriter stringWriter6 = new StringWriter('\\u0000');\n stringWriter2.flush();\n stringWriter2.flush();\n StringWriter stringWriter7 = new StringWriter('T');\n stringWriter0.write(90);\n stringWriter0.write(\"*le\");\n SimpleNode simpleNode0 = new SimpleNode('T');\n stringWriter3.write(204);\n StringWriter stringWriter8 = new StringWriter(70);\n stringWriter0.flush();\n stringWriter1.write(\"n~}KXk4pnRbMtpaDYJ\");\n simpleNode0.setIdentifier(\"ForUpdate\");\n stringWriter7.write(charArray0);\n simpleNode0.dump(\"n~}KXk4pnRbMtpaDYJ\", stringWriter2);\n assertEquals(\"\\u0000T\\u0000\\u0000\\u0000T\\u0000\\u0000\\u0000\\u0000<ForInit>\\n <identifier>ForUpdate</identifier>\\n</ForInit>\\n\", stringWriter2.toString());\n }", "private void _writeStringASCII(int len, int maxNonEscaped)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1117 */ int end = this._outputTail + len;\n/* 1118 */ int[] escCodes = this._outputEscapes;\n/* 1119 */ int escLimit = Math.min(escCodes.length, maxNonEscaped + 1);\n/* 1120 */ int escCode = 0;\n/* */ \n/* */ \n/* 1123 */ while (this._outputTail < end)\n/* */ {\n/* */ char c;\n/* */ do\n/* */ {\n/* 1128 */ c = this._outputBuffer[this._outputTail];\n/* 1129 */ if (c < escLimit) {\n/* 1130 */ escCode = escCodes[c];\n/* 1131 */ if (escCode != 0) {\n/* */ break;\n/* */ }\n/* 1134 */ } else if (c > maxNonEscaped) {\n/* 1135 */ escCode = -1;\n/* 1136 */ break;\n/* */ }\n/* 1138 */ } while (++this._outputTail < end);\n/* 1139 */ break;\n/* */ \n/* */ \n/* 1142 */ int flushLen = this._outputTail - this._outputHead;\n/* 1143 */ if (flushLen > 0) {\n/* 1144 */ this._writer.write(this._outputBuffer, this._outputHead, flushLen);\n/* */ }\n/* 1146 */ this._outputTail += 1;\n/* 1147 */ _prependOrWriteCharacterEscape(c, escCode);\n/* */ }\n/* */ }", "int writeTo(OutputStream out, boolean withXmlDecl) throws IOException;", "public void prepareToWrite(RecordWriter writer) {\n UDFContext udfc = UDFContext.getUDFContext();\n Properties p =\n udfc.getUDFProperties(this.getClass(), new String[]{ udfContextSignature });\n\n String strSchema = p.getProperty(SCHEMA_SIGNATURE);\n if (strSchema != null) {\n // Parse the schema from the string stored in the properties object.\n try {\n schema = new ResourceSchema(Utils.getSchemaFromString(strSchema));\n } catch (ParserException pex) {\n logger.warn(\"Could not parse schema for storing.\");\n }\n }\n\n if (headerTreatment == Headers.DEFAULT) {\n headerTreatment = Headers.SKIP_OUTPUT_HEADER;\n }\n\n // PigStorage's prepareToWrite()\n super.prepareToWrite(writer);\n }", "public abstract void write(DataOutput out) throws IOException;", "public abstract void write(O value) throws IOException;", "private void appendDowngraded(final Writer wtr,\n final Property prop) throws IOException {\n\n if (v3Ok(prop)) {\n wtr.write(prop.toString());\n return;\n }\n\n /* x-prop already? */\n\n// if (Property.Id.EXTENDED == prop.getId()) {\n// if (skipXprops.contains(Extend))\n// wtr.write(prop.toString());\n// return;\n// }\n\n /* Output as x-prop */\n if (prop.getGroup() != null) {\n wtr.write(prop.getGroup().toString());\n wtr.write('.');\n }\n\n wtr.write(VcardDefs.v4AsXpropPrefix);\n wtr.write(prop.getId().getPropertyName());\n\n for (final Parameter param : prop.getParameters()) {\n wtr.write(';');\n\n /* Watch for non v3 */\n wtr.write(param.toString());\n }\n wtr.write(':');\n\n if (prop instanceof Encodable) {\n wtr.write(Strings.escape(Strings.valueOf(prop.getValue())));\n }\n else {\n wtr.write(Strings.valueOf(prop.getValue()));\n }\n\n wtr.write(Strings.LINE_SEPARATOR);\n }", "@Override\r\n\tpublic void writeRents() {\n\t\t\r\n\t}", "void setOpp(PrintWriter out_opp){ this.out_opp = out_opp; }", "abstract protected void writeTuple(Tuple tuple) throws IOException;", "void write(Writer out) throws IOException;", "private void saveLicenseFile(long renewalDate, boolean pBogus)\n{\n\n FileOutputStream fileOutputStream = null;\n OutputStreamWriter outputStreamWriter = null;\n BufferedWriter out = null;\n\n try{\n\n fileOutputStream = new FileOutputStream(licenseFilename);\n outputStreamWriter = new OutputStreamWriter(fileOutputStream);\n out = new BufferedWriter(outputStreamWriter);\n\n //if the number is to purposely invalid, add junk to the encoded value\n int bogusModifier = 0;\n if (pBogus) {bogusModifier = 249872349;}\n\n //save the renewal date followed by the same value encoded\n\n out.write(\"\" + renewalDate); out.newLine();\n out.write(\"\" + encodeDecode(renewalDate + bogusModifier));\n out.newLine();\n\n }\n catch(IOException e){\n logSevere(e.getMessage() + \" - Error: 274\");\n }\n finally{\n\n try{if (out != null) {out.close();}}\n catch(IOException e){}\n try{if (outputStreamWriter != null) {outputStreamWriter.close();}}\n catch(IOException e){}\n try{if (fileOutputStream != null) {fileOutputStream.close();}}\n catch(IOException e){}\n }\n\n}", "public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise)\r\n/* 33: */ throws Exception\r\n/* 34: */ {\r\n/* 35: 81 */ CodecOutputList out = null;\r\n/* 36: */ try\r\n/* 37: */ {\r\n/* 38: 83 */ if (acceptOutboundMessage(msg))\r\n/* 39: */ {\r\n/* 40: 84 */ out = CodecOutputList.newInstance();\r\n/* 41: */ \r\n/* 42: 86 */ I cast = msg;\r\n/* 43: */ try\r\n/* 44: */ {\r\n/* 45: 88 */ encode(ctx, cast, out);\r\n/* 46: */ }\r\n/* 47: */ finally\r\n/* 48: */ {\r\n/* 49: 90 */ ReferenceCountUtil.release(cast);\r\n/* 50: */ }\r\n/* 51: 93 */ if (out.isEmpty())\r\n/* 52: */ {\r\n/* 53: 94 */ out.recycle();\r\n/* 54: 95 */ out = null;\r\n/* 55: */ \r\n/* 56: */ \r\n/* 57: 98 */ throw new EncoderException(StringUtil.simpleClassName(this) + \" must produce at least one message.\");\r\n/* 58: */ }\r\n/* 59: */ }\r\n/* 60: */ else\r\n/* 61: */ {\r\n/* 62:101 */ ctx.write(msg, promise);\r\n/* 63: */ }\r\n/* 64: */ }\r\n/* 65: */ catch (EncoderException e)\r\n/* 66: */ {\r\n/* 67: */ int sizeMinusOne;\r\n/* 68: */ ChannelPromise voidPromise;\r\n/* 69: */ boolean isVoidPromise;\r\n/* 70: */ int i;\r\n/* 71: */ ChannelPromise p;\r\n/* 72: */ ChannelPromise p;\r\n/* 73:104 */ throw e;\r\n/* 74: */ }\r\n/* 75: */ catch (Throwable t)\r\n/* 76: */ {\r\n/* 77:106 */ throw new EncoderException(t);\r\n/* 78: */ }\r\n/* 79: */ finally\r\n/* 80: */ {\r\n/* 81:108 */ if (out != null)\r\n/* 82: */ {\r\n/* 83:109 */ int sizeMinusOne = out.size() - 1;\r\n/* 84:110 */ if (sizeMinusOne == 0)\r\n/* 85: */ {\r\n/* 86:111 */ ctx.write(out.get(0), promise);\r\n/* 87: */ }\r\n/* 88:112 */ else if (sizeMinusOne > 0)\r\n/* 89: */ {\r\n/* 90:115 */ ChannelPromise voidPromise = ctx.voidPromise();\r\n/* 91:116 */ boolean isVoidPromise = promise == voidPromise;\r\n/* 92:117 */ for (int i = 0; i < sizeMinusOne; i++)\r\n/* 93: */ {\r\n/* 94: */ ChannelPromise p;\r\n/* 95: */ ChannelPromise p;\r\n/* 96:119 */ if (isVoidPromise) {\r\n/* 97:120 */ p = voidPromise;\r\n/* 98: */ } else {\r\n/* 99:122 */ p = ctx.newPromise();\r\n/* 100: */ }\r\n/* 101:124 */ ctx.write(out.getUnsafe(i), p);\r\n/* 102: */ }\r\n/* 103:126 */ ctx.write(out.getUnsafe(sizeMinusOne), promise);\r\n/* 104: */ }\r\n/* 105:128 */ out.recycle();\r\n/* 106: */ }\r\n/* 107: */ }\r\n/* 108: */ }", "private void generatePermissions() \n\n\tthrows java.io.FileNotFoundException, java.io.IOException {\n\n\tif (!writeOnCommit) return;\n\n\t// otherwise proceed to write policy file\n\n\tMap roleToSubjectMap = null;\n SecurityRoleMapperFactory factory=SecurityRoleMapperFactoryGen.getSecurityRoleMapperFactory();\n\tif (rolePermissionsTable != null) {\n\t // Make sure a role to subject map has been defined for the Policy Context\n\t if (factory != null) {\n // the rolemapper is stored against the\n // appname, for a web app get the appname for this contextid\n SecurityRoleMapper srm = factory.getRoleMapper(CONTEXT_ID);\n\t\tif (srm != null) {\n\t\t roleToSubjectMap = srm.getRoleToSubjectMapping();\n\t\t}\n\t\tif (roleToSubjectMap != null) {\n\t\t // make sure all liked PC's have the same roleToSubjectMap\n\t\t Set linkSet = (Set) fact.getLinkTable().get(CONTEXT_ID);\n\t\t if (linkSet != null) {\n\t\t\tIterator it = linkSet.iterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t String contextId = (String)it.next();\n\t\t\t if (!CONTEXT_ID.equals(contextId)) {\n\t\t\t\tSecurityRoleMapper otherSrm = factory.getRoleMapper(contextId);\n\t\t\t\tMap otherRoleToSubjectMap = null;\n\n\t\t\t\tif (otherSrm != null) {\n\t\t\t\t otherRoleToSubjectMap = otherSrm.getRoleToSubjectMapping();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (otherRoleToSubjectMap != roleToSubjectMap) {\n String defMsg=\"Linked policy contexts have different roleToSubjectMaps (\"+CONTEXT_ID+\")<->(\"+contextId+\")\";\n String msg=localStrings.getLocalString(\"pc.linked_with_different_role_maps\",defMsg,new Object []{CONTEXT_ID,contextId});\n\t\t\t\t logger.log(Level.SEVERE,msg); \n\t\t\t\t throw new RuntimeException(defMsg);\n\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t}\n\n\tif (roleToSubjectMap == null && rolePermissionsTable != null) {\n String defMsg=\"This application has no role mapper factory defined\";\n String msg=localStrings.getLocalString(\"pc.role_map_not_defined_at_commit\",defMsg,new Object []{CONTEXT_ID});\n\t logger.log(Level.SEVERE,msg);\n\t throw new RuntimeException\n\t\t(localStrings.getLocalString\n\t\t (\"enterprise.deployment.deployment.norolemapperfactorydefine\",defMsg));\n\t}\n\n\tPolicyParser parser = new PolicyParser(false);\n\n\t// load unchecked grants in parser\n\tif (uncheckedPermissions != null) {\n\t Enumeration pEnum = uncheckedPermissions.elements();\n\t if (pEnum.hasMoreElements()) {\n\t\tGrantEntry grant = new GrantEntry();\n\t\twhile (pEnum.hasMoreElements()) {\n\t\t Permission p = (Permission) pEnum.nextElement();\n\t\t PermissionEntry entry = \n\t\t\tnew PermissionEntry(p.getClass().getName(),\n\t\t\t\t\t p.getName(),p.getActions());\n\t\t grant.add(entry);\n\t\t}\n\t\tparser.add(grant);\n\t }\n\t}\n\n\t// load role based grants in parser\n\tif (rolePermissionsTable != null) {\n\t Iterator roleIt = rolePermissionsTable.keySet().iterator();\n\t while (roleIt.hasNext()) {\n\t\tboolean withPrincipals = false;\n\t\tString roleName = (String) roleIt.next();\n\t\tPermissions rolePerms = getRolePermissions(roleName);\n\t\tSubject rolePrincipals = (Subject) roleToSubjectMap.get(roleName);\n\t\tif (rolePrincipals != null) {\n\t\t Iterator pit = rolePrincipals.getPrincipals().iterator();\n\t\t while (pit.hasNext()){\n\t\t\tPrincipal prin = (Principal) pit.next();\n\t\t\tassert prin instanceof java.security.Principal;\n\t\t\tif (prin instanceof java.security.Principal) {\n\t\t\t withPrincipals = true;\n\t\t\t PrincipalEntry prinEntry = \n\t\t\t\tnew PrincipalEntry(prin.getClass().getName(),\n\t\t\t\t\t\t escapeName(prin.getName()));\n\t\t\t GrantEntry grant = new GrantEntry();\n\t\t\t grant.principals.add(prinEntry);\n\t\t\t Enumeration pEnum = rolePerms.elements();\n\t\t\t while (pEnum.hasMoreElements()) {\n\t\t\t\tPermission perm = (Permission) pEnum.nextElement();\n\t\t\t\tPermissionEntry permEntry = \n\t\t\t\t new PermissionEntry(perm.getClass().getName(),\n\t\t\t\t\t\t\tperm.getName(),\n\t\t\t\t\t\t\tperm.getActions());\n\t\t\t\tgrant.add(permEntry);\n\t\t\t }\n\t\t\t parser.add(grant);\n\t\t\t}\n\t\t\telse {\n String msg = localStrings.getLocalString(\"pc.non_principal_mapped_to_role\",\n \"non principal mapped to role \"+roleName,new Object[]{prin,roleName});\n\t\t\t logger.log(Level.WARNING,msg);\n\t\t\t}\n\t\t }\n\t\t} \n\t\tif (!withPrincipals) {\n String msg = localStrings.getLocalString(\"pc.no_principals_mapped_to_role\",\n \"no principals mapped to role \"+roleName, new Object []{ roleName});\n\t\t logger.log(Level.WARNING,msg);\n\t\t}\n\t }\n\t}\n\n\twriteOnCommit = createPolicyFile(true,parser,writeOnCommit);\n\n\t// load excluded perms in excluded parser\n\tif (excludedPermissions != null) {\n\n\t PolicyParser excludedParser = new PolicyParser(false);\n\n\t Enumeration pEnum = excludedPermissions.elements();\n\t if (pEnum.hasMoreElements()) {\n\t\tGrantEntry grant = new GrantEntry();\n\t\twhile (pEnum.hasMoreElements()) {\n\t\t Permission p = (Permission) pEnum.nextElement();\n\t\t PermissionEntry entry = \n\t\t\tnew PermissionEntry(p.getClass().getName(),\n\t\t\t\t\t p.getName(),p.getActions());\n\t\t grant.add(entry);\n\t\t}\n\t\texcludedParser.add(grant);\n\t }\n\n\t writeOnCommit = createPolicyFile(false,excludedParser,writeOnCommit);\n\t} \n\n\tif (!writeOnCommit) wasRefreshed = false;\n }", "protected void writeClosing ()\n {\n stream.println ('}');\n }", "public String getPolicy() {\r\n String policy = \"\";\r\n if (!policyRules.isEmpty()) {\r\n policy += policyRules.get(0).getRule().trim();\r\n for (int i = 1; i < policyRules.size(); i++) {\r\n policy += \",\" + policyRules.get(i).getRule().trim();\r\n }\r\n }\r\n\r\n return policy.trim();\r\n }", "public void writeOut(PrintWriter pw){}", "@Override\n public void writeSpace(String text)\n throws XMLStreamException\n {\n writeRaw(text);\n }", "protected abstract void write (Object val);", "public abstract JsonWriter newWriter(OutputStream out);", "private void write( String what ) {\n\ttry {\n\t output.write( what );\n\t} catch ( IOException e ) {\n\t e.printStackTrace();\n\t}\n }", "protected void writeNullValue() throws IOException {\n _generator.writeNull();\n }", "@Override\n public int write(byte[] bytes, int offset, int length) throws SWPException {\n int codePointLength = getLength();\n SWPException.requireTrue(length >= codePointLength, \"Buffer overflow.\");\n bytes[offset] = (byte) ((codePointLength << 8) & 0xff);\n bytes[offset + 1] = (byte) (codePointLength & 0xff);\n bytes[offset + 2] = (byte) (codePoint >>> 8);\n bytes[offset + 3] = (byte) (codePoint & 0xff);\n if (isNull()) {\n\n bytes[offset + 4] = SwpConstants.NULL_INDICATOR;\n }\n else {\n\n bytes[offset + 4] = SwpConstants.NOT_NULL_INDICATOR;\n primitive.write(bytes, offset + 5, length - 5);\n }\n return codePointLength;\n }", "@Override\n protected void writeFixed(Schema schema, Object datum, Encoder out)\n throws IOException {\n\n final byte[] bytes = ((GenericFixed) datum).bytes();\n GenericBinding.writeFixed(schema, bytes, out);\n }", "private void _writeString(char[] text, int offset, int len)\n/* */ throws IOException\n/* */ {\n/* 1049 */ if (this._characterEscapes != null) {\n/* 1050 */ _writeStringCustom(text, offset, len);\n/* 1051 */ return;\n/* */ }\n/* 1053 */ if (this._maximumNonEscapedChar != 0) {\n/* 1054 */ _writeStringASCII(text, offset, len, this._maximumNonEscapedChar);\n/* 1055 */ return;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1062 */ len += offset;\n/* 1063 */ int[] escCodes = this._outputEscapes;\n/* 1064 */ int escLen = escCodes.length;\n/* 1065 */ while (offset < len) {\n/* 1066 */ int start = offset;\n/* */ for (;;)\n/* */ {\n/* 1069 */ char c = text[offset];\n/* 1070 */ if ((c < escLen) && (escCodes[c] != 0)) {\n/* */ break;\n/* */ }\n/* 1073 */ offset++; if (offset >= len) {\n/* */ break;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1079 */ int newAmount = offset - start;\n/* 1080 */ if (newAmount < 32)\n/* */ {\n/* 1082 */ if (this._outputTail + newAmount > this._outputEnd) {\n/* 1083 */ _flushBuffer();\n/* */ }\n/* 1085 */ if (newAmount > 0) {\n/* 1086 */ System.arraycopy(text, start, this._outputBuffer, this._outputTail, newAmount);\n/* 1087 */ this._outputTail += newAmount;\n/* */ }\n/* */ } else {\n/* 1090 */ _flushBuffer();\n/* 1091 */ this._writer.write(text, start, newAmount);\n/* */ }\n/* */ \n/* 1094 */ if (offset >= len) {\n/* */ break;\n/* */ }\n/* */ \n/* 1098 */ char c = text[(offset++)];\n/* 1099 */ _appendCharacterEscape(c, escCodes[c]);\n/* */ }\n/* */ }", "private void writePubAuthPajekFile(PrintWriter pubAuthWriter) {\n\t\tauthorOffset = publications.size();\n\n\t\tpubAuthWriter.println(\"*Vertices \"\n\t\t + (publications.size() + authors.size()));\n\t\tthis.writePubVertices(pubAuthWriter);\n\t\tthis.writeAuthVertices(pubAuthWriter);\n\n\t\tpubAuthWriter.println(\"*Arcs\");\n\t\tthis.writePubArcs(pubAuthWriter);\n\t\tthis.writePubAuthArcs(pubAuthWriter);\n\n\t\tpubAuthWriter.println(\"*Edges\");\n\t\tthis.writeAuthEdges(pubAuthWriter);\n\t}", "public abstract void dump(PrintWriter pw, boolean skipEmptyComponents);", "@Override\n\tpublic void write(OutStream outStream) {\n\t}", "String doubleWrite();", "String shortWrite();", "private void deNude() throws IOException {\r\n if (this.isNude) {\r\n writer.write('>');\r\n if (peekElement().hasChildren) writer.write('\\n');\r\n this.isNude = false;\r\n }\r\n }", "@Test(timeout = 4000)\n public void test08() throws Throwable {\n StringWriter stringWriter0 = new StringWriter(70);\n char[] charArray0 = new char[10];\n charArray0[1] = 'T';\n charArray0[5] = 'T';\n stringWriter0.write(70);\n charArray0[2] = 'T';\n charArray0[2] = '\\u0000';\n stringWriter0.write(charArray0);\n StringWriter stringWriter1 = new StringWriter('T');\n StringWriter stringWriter2 = new StringWriter();\n stringWriter2.write(charArray0);\n stringWriter0.write(charArray0);\n stringWriter0.close();\n StringWriter stringWriter3 = new StringWriter();\n stringWriter2.flush();\n stringWriter2.close();\n StringWriter stringWriter4 = new StringWriter('T');\n stringWriter1.write((int) 'T');\n StringWriter stringWriter5 = new StringWriter();\n stringWriter3.close();\n StringWriter stringWriter6 = new StringWriter('\\u0000');\n stringWriter2.flush();\n stringWriter2.flush();\n StringWriter stringWriter7 = new StringWriter('T');\n stringWriter0.write(90);\n stringWriter0.write(\"*le\");\n SimpleNode simpleNode0 = new SimpleNode('T');\n stringWriter3.write(204);\n StringWriter stringWriter8 = new StringWriter(70);\n stringWriter0.flush();\n stringWriter1.write(\"n~}KXk4pnRbMtpaDYJ\");\n simpleNode0.setIdentifier(\"}\");\n stringWriter7.write(charArray0);\n simpleNode0.dump(\"n~}KXk4pnRbMtpaDYJ\", stringWriter2);\n assertEquals(\"\\u0000T\\u0000\\u0000\\u0000T\\u0000\\u0000\\u0000\\u0000<ForInit>\\n</ForInit>\\n\", stringWriter2.toString());\n }", "public PipedWriter(java.io.PipedReader snk) throws java.io.IOException { throw new RuntimeException(\"Stub!\"); }", "public void writeRight(PrintWriter out, RequestProperties reqState) \n throws IOException\n {\n // ignore\n }", "static void write (String filename, String graph_str) throws IOException {\n \ttry (FileWriter writer = new FileWriter(filename);\n BufferedWriter bw = new BufferedWriter(writer)) {\n bw.write(graph_str);\n } catch (IOException e) {\n System.err.format(\"IOException: %s%n\", e);\n }\n\t}", "abstract void toBinary(BinaryPropertyListWriter out) throws IOException;", "private PrintWriter getWriter(String signature) throws IOException {\n\n\tFile f = signature2file.get(signature);\n\n\tif (f == null) {\n\n\t throw new IllegalStateException(\"Supposed to have file name for \"\n\t\t + signature + \", but don't???\");\n\t}\n\n\t// Create a FileWriter with 'append'\n\treturn new PrintWriter(new FileWriter(f, true));\n }", "@Override\n public void writeTo(DataOutput dout) throws IOException {\n\n if (!isHeadless()) {\n dout.writeShort(getTransactionID());\n dout.writeShort(getProtocolID());\n dout.writeShort(getDataLength());\n }\n dout.writeByte(getUnitID());\n dout.writeByte(getFunctionCode());\n writeData(dout);\n }", "@Override\n public void write(byte[] buf) throws IOException;", "@Override\n public void write() throws IOException\n {\n super.write();//Chamada para metodo da superclasse ajusta ponteiro para \n //gravacao sequencial apos posicao do ultimo registro\n //gravado\n writeString(id, TOPIC_ID_STRLENGTH);\n writeString(title, TITLE_STRLENGTH);\n writeShort(rank);\n }", "protected void writeWrite ()\n {\n stream.println (\" public void _write (org.omg.CORBA.portable.OutputStream o)\");\n stream.println (\" {\");\n if (entry instanceof ValueBoxEntry)\n {\n TypedefEntry member = ((InterfaceState) ((ValueBoxEntry) entry).state ().elementAt (0)).entry;\n SymtabEntry mType = member.type ();\n if (mType instanceof StringEntry)\n stream.println (\" o.write_string (value);\");\n\n else if (mType instanceof PrimitiveEntry)\n {\n String name = entry.name ();\n stream.println (\" \" + name + \" vb = new \" + name + \" (value);\");\n stream.println (\" \" + helperClass + \".write (o, vb);\");\n }\n\n else\n stream.println (\" \" + helperClass + \".write (o, value);\");\n }\n else\n stream.println (\" \" + helperClass + \".write (o, value);\");\n stream.println (\" }\");\n stream.println ();\n }", "protected final void write(String s) throws IOException {\n\t\toutput.write(s);\n\t}", "public abstract String serialise();", "protected abstract void writeFile();", "private void prepareEndWriteOnePage() throws IOException {\n timeEncoder.flush(timeOut);\n valueEncoder.flush(valueOut);\n }", "private synchronized void write(RecordOutputStream s) throws IOException {\r\n s.writeIntCompressed(originalNamesToFixedNames.size());\r\n for (final Map.Entry<String, String> entry : originalNamesToFixedNames.entrySet()) { \r\n s.writeUTF(entry.getKey());\r\n s.writeUTF(entry.getValue());\r\n }\r\n }", "public abstract void write(NetOutput out) throws IOException;", "public String toString()\n\t\t{\n\t\t\tsynchronized(ExecutionPolicy.class)\n\t\t\t{\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\ttoStringIndent++;\n\t\t\t\tif (rules == null) sb.append(indent()).append(\"null\\n\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor (ExecutionPolicy ep: rules) sb.append(ep.toString());\n\t\t\t\t}\n\t\t\t\ttoStringIndent--;\n\t\t\t\treturn sb.toString();\n\t\t\t}\n\t\t}", "protected void writeEncoded(PrintWriter out,\n String str) {\n for (int i = 0; i < str.length(); i++) {\n char ch = str.charAt(i);\n\n switch (ch) {\n case '<':\n out.write(\"&lt;\");\n break;\n case '>':\n out.write(\"&gt;\");\n break;\n case '&':\n out.write(\"&amp;\");\n break;\n case '\"':\n out.write(\"&quot;\");\n break;\n case '\\'':\n out.write(\"&apos;\");\n break;\n case '\\r':\n case '\\n':\n out.write(ch);\n break;\n default:\n if (((int) ch < 32) || ((int) ch > 126)) {\n out.write(\"&#x\");\n out.write(Integer.toString((int) ch, 16));\n out.write(';');\n }\n else {\n out.write(ch);\n }\n }\n }\n }", "public abstract void write(PrintWriter out)\n throws IOException;", "void writeLegacyPermissionStateTEMP();", "public void write(Printer p) throws IOException, IVisitor.VisitorException {\n\t\tp.writer().append(\"(\" + commandName + \" \");\n\t\toption.accept(p);\n\t\tp.writer().append(\" \");\n\t\tvalue.accept(p);\n\t\tp.writer().append(\")\");\n\t}", "@Override\n\t\tprotected void writeStreamHeader() throws IOException {\n\t\t}", "public void writePiece(Piece piece) \n\t{\n\t\t\n\t}", "void write(StreamOption streamOpt);", "private void writeObject(ObjectOutputStream out)\n/* */ throws IOException\n/* */ {\n/* 900 */ out.writeUTF(toString());\n/* 901 */ out.writeObject(this.locale);\n/* */ }", "protected boolean continueOnWriteError() {\n/* 348 */ return true;\n/* */ }", "public PEMWriter() {\r\n }", "@Override\r\n\tpublic String encode() {\n\t\treturn null;\r\n\t}", "public static void endWrite()\r\n\t{\r\n\t\r\n\t}", "public void writeTo(ByteBuf out) {\n/* 77 */ if (this.value == null) {\n/* */ return;\n/* */ }\n/* 80 */ out.writeByte(this.value.byteValue());\n/* */ }", "public void writeRaw(String text)\n/* */ throws IOException\n/* */ {\n/* 442 */ int len = text.length();\n/* 443 */ int room = this._outputEnd - this._outputTail;\n/* */ \n/* 445 */ if (room == 0) {\n/* 446 */ _flushBuffer();\n/* 447 */ room = this._outputEnd - this._outputTail;\n/* */ }\n/* */ \n/* 450 */ if (room >= len) {\n/* 451 */ text.getChars(0, len, this._outputBuffer, this._outputTail);\n/* 452 */ this._outputTail += len;\n/* */ } else {\n/* 454 */ writeRawLong(text);\n/* */ }\n/* */ }", "@Test\n\tpublic void testSchemaWriter() throws Exception {\n\t\tSchemaParser parser = new SchemaParser();\n\t\tSchemaWriter writer = new SchemaWriter();\n\t\t// Read and write file\n\t\tFileReader reader = new FileReader(basicCustomSchema);\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\twriter.write(parser.load(reader), new PrintWriter(baos));\n\t\treader.close();\n\t\t// Read each line and compare\n\t\tBufferedReader readerA = new BufferedReader(new FileReader(basicCustomSchema));\n\t\tBufferedReader readerB = new BufferedReader(new StringReader(new String(baos.toByteArray())));\n\t\tString a = readerA.readLine();\n\t\tString b = readerB.readLine();\n\t\twhile (a != null && b != null) {\n\t\t\tAssert.assertEquals(a, b);\n\t\t\ta = readerA.readLine();\n\t\t\tb = readerB.readLine();\n\t\t}\n\t\tAssert.assertEquals(a, b);\n\t\treaderA.close();\n\t\treaderB.close();\n\t}", "void writeObject(OutputSerializer out) throws java.io.IOException;", "private void _writeSegment(int end)\n/* */ throws IOException\n/* */ {\n/* 1006 */ int[] escCodes = this._outputEscapes;\n/* 1007 */ int escLen = escCodes.length;\n/* */ \n/* 1009 */ int ptr = 0;\n/* 1010 */ int start = ptr;\n/* */ \n/* */ \n/* 1013 */ while (ptr < end)\n/* */ {\n/* */ char c;\n/* */ for (;;) {\n/* 1017 */ c = this._outputBuffer[ptr];\n/* 1018 */ if ((c >= escLen) || (escCodes[c] == 0))\n/* */ {\n/* */ \n/* 1021 */ ptr++; if (ptr >= end) {\n/* */ break;\n/* */ }\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1030 */ int flushLen = ptr - start;\n/* 1031 */ if (flushLen > 0) {\n/* 1032 */ this._writer.write(this._outputBuffer, start, flushLen);\n/* 1033 */ if (ptr >= end) {\n/* */ break;\n/* */ }\n/* */ }\n/* 1037 */ ptr++;\n/* */ \n/* 1039 */ start = _prependOrWriteCharacterEscape(this._outputBuffer, ptr, end, c, escCodes[c]);\n/* */ }\n/* */ }", "public void writeValue(OutputStream out) throws IOException {\n if (m_strPackage != null) {\n m_strPackage.write(out);\n }\n if ((m_subPackages != null) && (m_subPackages.size() > 0)) {\n Iterator iter = m_subPackages.listIterator(0);\n DsByteString bs = null;\n while (iter.hasNext()) {\n bs = (DsByteString) iter.next();\n if (bs != null) {\n out.write(B_PERIOD);\n bs.write(out);\n }\n }\n }\n if (m_paramTable != null) {\n m_paramTable.write(out);\n }\n }", "public static String getPolicyString(short policy) {\n\t\treturn POLICY_STRINGS[policy];\n\t}", "@Test\n void bug46ReportedByJnash67() throws IOException {\n try (StringWriter writer = new StringWriter()) {\n List<BeanWithMultipleStrings> beans = new ArrayList<>();\n beans.add(createBean(\"row 1, cell 3\", \"row 1, cell 2\", \"row 1, cell 1\"));\n beans.add(createBean(\"row 2, cell 3\", \"row 2, cell 2\", \"row 2, cell 1\"));\n beans.add(createBean(\"row 3, cell 3\", \"row 3, cell 2\", \"row 3, cell 1\"));\n BeanInstructions bi = new BeanInstructionsImpl(BeanWithMultipleStrings.class);\n bi.logSettings();\n bi.mapColumnNameToProperty(\"Aap\", \"gamma\");\n bi.mapColumnNameToProperty(\"Noot\", \"beta\");\n bi.mapColumnNameToProperty(\"Mies\", \"alpha\");\n BeanWriter<BeanWithMultipleStrings> beanWriter = new BeanWriterImpl<>(writer, bi);\n beanWriter.writeBeans(beans);\n\n assertEquals(\n \"\\\"Aap\\\";\\\"Noot\\\";\\\"Mies\\\"\\r\\n\" + \"\\\"row 1, cell 1\\\";\\\"row 1, cell 2\\\";\\\"row 1, cell 3\\\"\\r\\n\"\n + \"\\\"row 2, cell 1\\\";\\\"row 2, cell 2\\\";\\\"row 2, cell 3\\\"\\r\\n\"\n + \"\\\"row 3, cell 1\\\";\\\"row 3, cell 2\\\";\\\"row 3, cell 3\\\"\\r\\n\",\n writer.getBuffer().toString());\n }\n }", "public void write(Object o)\r\n throws IOException, XmlPullParserException\r\n {\n if(o instanceof XmlNode) {\r\n\t writeNode((XmlNode)o);\r\n } else if(o instanceof XmlStartTag) {\r\n\t writeStartTag((XmlStartTag)o);\r\n } else if(o instanceof XmlEndTag) {\r\n\t writeEndTag((XmlEndTag)o);\r\n } else if(o instanceof XmlWritable) {\r\n\t ((XmlWritable)o).writeXml(out);\r\n } else {\r\n\t if(o != null) {\r\n\t\twriteContent(o.toString());\r\n\t } else {\r\n\t\t//silenty ignore null values\r\n\t }\r\n\t}\r\n }", "protected void genWriter() {\n\t\t\n\t\tfixWriter_h();\n\t\tfixWriter_cpp();\n\t}", "public void write(Playlist playlist) throws IOException, ParseException, PlaylistException {\n final PlaylistValidation validation = PlaylistValidation.from(playlist);\n\n if (!validation.isValid()) {\n throw new PlaylistException(\"\", validation.getErrors());\n }\n\n writeByteOrderMark();\n mWriter.write(playlist);\n mFirstWrite = false;\n }", "public PipedWriter() { throw new RuntimeException(\"Stub!\"); }", "@org.junit.Test\r\n public void testProspectParser() {\r\n PrintWriter writer;\r\n try {\r\n writer = new PrintWriter(file);\r\n\r\n //Should be added to prospect list\r\n writer.println(\"Börje,30000,4,3\");\r\n //Should not be added to prospect list\r\n writer.println(\"Bamse,5000,fyra,3.\");\r\n //Should not be added to prospect list\r\n writer.println(\"Andersson,f,2\");\r\n //Should be added to prospect list\r\n writer.println(\"Doris,40000,5,2\");\r\n\r\n writer.close();\r\n ProspectParser p = new ProspectParser(file, namePattern, digitPattern);\r\n p.parse();\r\n int size = p.getProspects().size();\r\n\r\n assertEquals(2, size);\r\n } catch (FileNotFoundException ex) {\r\n String failStr = \"Failed to create file writer: \" + ex;\r\n Logger.getLogger(MortagePlanTest.class.getName()).log(Level.SEVERE, null, ex);\r\n fail(failStr);\r\n }\r\n }", "private void writeLength( ObjectOutput out, int len ) throws IOException\n {\n\t\tif (len <= 31)\n\t\t{\n\t\t\tout.write((byte) (0x80 | (len & 0xff)));\n\t\t}\n\t\telse if (len <= 0xFFFF)\n\t\t{\n\t\t\tout.write((byte) 0xA0);\n\t\t\tout.writeShort((short) len);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tout.write((byte) 0xC0);\n\t\t\tout.writeInt(len);\n\n\t\t}\n }", "private BufferedWriter getWriter(int secretPos) throws IOException {\n\t\tFile file = new File(\"reportingTool_tmp\" + sep + this.uniqueName + \"-\" + \"histogram_\" + this.dataset.getSecrets().get(secretPos).getFileName() + \".txt\");\n\t\tFileWriter writer = new FileWriter(file);\n\t\tBufferedWriter bw = new BufferedWriter(writer);\n\t\treturn bw;\n\t}", "private void _writeDatatypeAware(final DatatypeAware datatyped) throws IOException {\n final String datatype = datatyped.getDatatype().getReference();\n String value = XSD.ANY_URI.equals(datatype) ? datatyped.locatorValue().toExternalForm()\n : datatyped.getValue();\n _writeKeyValue(\"value\", value);\n if (!XSD.STRING.equals(datatype)) {\n _writeKeyValue(\"datatype\", datatyped.getDatatype().toExternalForm());\n }\n }", "@Test\n public void testWriteElements() {\n Random rnd = new Random();\n ReadablePeriod ObjectToWrite = new MutablePeriod(1+rnd.nextInt(12),rnd.nextInt(60),rnd.nextInt(60),rnd.nextInt(1000));\n ReadablePeriodXMLWriter instance = new ReadablePeriodXMLWriter();\n Element tempElement = instance.writeElements(ObjectToWrite);\n ReadablePeriod result = instance.readElements(tempElement);\n assertEquals(ObjectToWrite, result);\n }", "public void endWrite() throws ThingsException;", "@Override\n public void writeSpace(char[] text, int offset, int length)\n throws XMLStreamException\n {\n writeRaw(text, offset, length);\n }", "private void print(String toBeWritten)\n\t\t{ pw.print(getIndentString() + toBeWritten); }", "private void _writeString(String text)\n/* */ throws IOException\n/* */ {\n/* 908 */ int len = text.length();\n/* 909 */ if (len > this._outputEnd) {\n/* 910 */ _writeLongString(text);\n/* 911 */ return;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 916 */ if (this._outputTail + len > this._outputEnd) {\n/* 917 */ _flushBuffer();\n/* */ }\n/* 919 */ text.getChars(0, len, this._outputBuffer, this._outputTail);\n/* */ \n/* 921 */ if (this._characterEscapes != null) {\n/* 922 */ _writeStringCustom(len);\n/* 923 */ } else if (this._maximumNonEscapedChar != 0) {\n/* 924 */ _writeStringASCII(len, this._maximumNonEscapedChar);\n/* */ } else {\n/* 926 */ _writeString2(len);\n/* */ }\n/* */ }", "public void setPolicy(short policy) {\n\t\t_policy = policy;\n\t}" ]
[ "0.6013449", "0.5864846", "0.5729441", "0.5504033", "0.5480303", "0.542277", "0.5415767", "0.53884846", "0.5349822", "0.5319437", "0.52003366", "0.5168338", "0.5160326", "0.5106599", "0.50739014", "0.5063487", "0.5045902", "0.50399363", "0.50255996", "0.50180334", "0.50100946", "0.4992824", "0.49852854", "0.49832815", "0.49372673", "0.49160457", "0.48986977", "0.48753068", "0.48568627", "0.48442307", "0.48411235", "0.4819162", "0.4806985", "0.48050326", "0.47835553", "0.47823742", "0.4781351", "0.47761032", "0.47690377", "0.4761526", "0.47503334", "0.474864", "0.47286224", "0.4726858", "0.47204953", "0.47180453", "0.47180313", "0.4706786", "0.47043493", "0.46992573", "0.4697668", "0.46885222", "0.4679664", "0.4679408", "0.46697947", "0.46685168", "0.46664065", "0.46587357", "0.4657205", "0.46504503", "0.4643065", "0.46358937", "0.46318725", "0.462741", "0.462112", "0.4611333", "0.4599727", "0.4590811", "0.4588734", "0.458852", "0.45722875", "0.45703056", "0.4568976", "0.45683023", "0.45682925", "0.45553386", "0.4553662", "0.45528424", "0.4537381", "0.4534174", "0.45318955", "0.45310894", "0.45304838", "0.45234767", "0.4518555", "0.45148653", "0.4509578", "0.45083824", "0.45079577", "0.45057085", "0.4500902", "0.44987848", "0.44972336", "0.44947618", "0.44942978", "0.44892716", "0.44880044", "0.44810176", "0.44809973", "0.44784784", "0.44763446" ]
0.0
-1
optimization return if the rules have not changed
private void generatePermissions() throws java.io.FileNotFoundException, java.io.IOException { if (!writeOnCommit) return; // otherwise proceed to write policy file Map roleToSubjectMap = null; SecurityRoleMapperFactory factory=SecurityRoleMapperFactoryGen.getSecurityRoleMapperFactory(); if (rolePermissionsTable != null) { // Make sure a role to subject map has been defined for the Policy Context if (factory != null) { // the rolemapper is stored against the // appname, for a web app get the appname for this contextid SecurityRoleMapper srm = factory.getRoleMapper(CONTEXT_ID); if (srm != null) { roleToSubjectMap = srm.getRoleToSubjectMapping(); } if (roleToSubjectMap != null) { // make sure all liked PC's have the same roleToSubjectMap Set linkSet = (Set) fact.getLinkTable().get(CONTEXT_ID); if (linkSet != null) { Iterator it = linkSet.iterator(); while (it.hasNext()) { String contextId = (String)it.next(); if (!CONTEXT_ID.equals(contextId)) { SecurityRoleMapper otherSrm = factory.getRoleMapper(contextId); Map otherRoleToSubjectMap = null; if (otherSrm != null) { otherRoleToSubjectMap = otherSrm.getRoleToSubjectMapping(); } if (otherRoleToSubjectMap != roleToSubjectMap) { String defMsg="Linked policy contexts have different roleToSubjectMaps ("+CONTEXT_ID+")<->("+contextId+")"; String msg=localStrings.getLocalString("pc.linked_with_different_role_maps",defMsg,new Object []{CONTEXT_ID,contextId}); logger.log(Level.SEVERE,msg); throw new RuntimeException(defMsg); } } } } } } } if (roleToSubjectMap == null && rolePermissionsTable != null) { String defMsg="This application has no role mapper factory defined"; String msg=localStrings.getLocalString("pc.role_map_not_defined_at_commit",defMsg,new Object []{CONTEXT_ID}); logger.log(Level.SEVERE,msg); throw new RuntimeException (localStrings.getLocalString ("enterprise.deployment.deployment.norolemapperfactorydefine",defMsg)); } PolicyParser parser = new PolicyParser(false); // load unchecked grants in parser if (uncheckedPermissions != null) { Enumeration pEnum = uncheckedPermissions.elements(); if (pEnum.hasMoreElements()) { GrantEntry grant = new GrantEntry(); while (pEnum.hasMoreElements()) { Permission p = (Permission) pEnum.nextElement(); PermissionEntry entry = new PermissionEntry(p.getClass().getName(), p.getName(),p.getActions()); grant.add(entry); } parser.add(grant); } } // load role based grants in parser if (rolePermissionsTable != null) { Iterator roleIt = rolePermissionsTable.keySet().iterator(); while (roleIt.hasNext()) { boolean withPrincipals = false; String roleName = (String) roleIt.next(); Permissions rolePerms = getRolePermissions(roleName); Subject rolePrincipals = (Subject) roleToSubjectMap.get(roleName); if (rolePrincipals != null) { Iterator pit = rolePrincipals.getPrincipals().iterator(); while (pit.hasNext()){ Principal prin = (Principal) pit.next(); assert prin instanceof java.security.Principal; if (prin instanceof java.security.Principal) { withPrincipals = true; PrincipalEntry prinEntry = new PrincipalEntry(prin.getClass().getName(), escapeName(prin.getName())); GrantEntry grant = new GrantEntry(); grant.principals.add(prinEntry); Enumeration pEnum = rolePerms.elements(); while (pEnum.hasMoreElements()) { Permission perm = (Permission) pEnum.nextElement(); PermissionEntry permEntry = new PermissionEntry(perm.getClass().getName(), perm.getName(), perm.getActions()); grant.add(permEntry); } parser.add(grant); } else { String msg = localStrings.getLocalString("pc.non_principal_mapped_to_role", "non principal mapped to role "+roleName,new Object[]{prin,roleName}); logger.log(Level.WARNING,msg); } } } if (!withPrincipals) { String msg = localStrings.getLocalString("pc.no_principals_mapped_to_role", "no principals mapped to role "+roleName, new Object []{ roleName}); logger.log(Level.WARNING,msg); } } } writeOnCommit = createPolicyFile(true,parser,writeOnCommit); // load excluded perms in excluded parser if (excludedPermissions != null) { PolicyParser excludedParser = new PolicyParser(false); Enumeration pEnum = excludedPermissions.elements(); if (pEnum.hasMoreElements()) { GrantEntry grant = new GrantEntry(); while (pEnum.hasMoreElements()) { Permission p = (Permission) pEnum.nextElement(); PermissionEntry entry = new PermissionEntry(p.getClass().getName(), p.getName(),p.getActions()); grant.add(entry); } excludedParser.add(grant); } writeOnCommit = createPolicyFile(false,excludedParser,writeOnCommit); } if (!writeOnCommit) wasRefreshed = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Input\n public boolean isOptimized() {\n return optimize;\n }", "public boolean has_unprocessed_rules();", "private void computeSat(){\n addVertexVisitConstraint();\n //add clause for each vertex must be visited only once/ all vertices must be on path\n addVertexPositionConstraint();\n //add clause for every edge in graph to satisfy constraint of vertices not belonging to edge not part of successive positions\n addVertexNonEdgeConstraint();\n }", "@Override\r\n public final boolean isUseless() {\r\n int i;\r\n Rule[] r;\r\n\r\n r = this.m_rules;\r\n for (i = (r.length - 1); i >= 0; i--) {\r\n if (!(r[i].isUseless()))\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "private void applyTheRule() throws Exception {\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"IM APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n System.out.println();\n if (parameter.rule.equals(\"1\")) {\n Rule1.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"2\")) {\n Rule2.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3\")) {\n Rule3.all(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3a\")) {\n Rule3.a(resultingModel);\n\n }\n\n if (parameter.rule.equals(\"3b\")) {\n Rule3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"3c\")) {\n Rule3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"4\")) {\n Rule4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"4a\")) {\n Rule4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"4b\")) {\n Rule4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"4c\")) {\n Rule4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r1\")) {\n Reverse1.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r2\")) {\n Reverse2.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3\")) {\n Reverse3.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3a\")) {\n Reverse3.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3b\")) {\n Reverse3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3c\")) {\n Reverse3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4\")) {\n Reverse4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4a\")) {\n Reverse4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4b\")) {\n Reverse4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4c\")) {\n Reverse4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"5\")){\n Rule5.apply(resultingModel);\n }\n\n System.out.println(\"IM DONE APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n\n this.resultingModel.addRule(parameter);\n //System.out.println(this.resultingModel.name);\n this.resultingModel.addOutputInPath();\n }", "public void pruneRules_greedy() {\n LOGGER.info(\"STARTED Postpruning\");\n AttributeValue defClass = getDefaultRuleClass();\n int defError = getDefaultRuleError(defClass);\n boolean removeTail=false;\n for (Iterator<ExtendRule> it = extendedRules.iterator(); it.hasNext();) {\n\n ExtendRule rule = it.next();\n rule.updateQuality();\n if (LOGGER.isLoggable(Level.FINE)) {\n LOGGER.log(Level.FINE, \"#Rule {0}\", rule.toString());\n }\n \n if (removeTail)\n {\n it.remove();\n }\n else if (rule.getAntecedentLength() == 0) {\n it.remove();\n } \n else if (rule.getRuleQuality().getA() == 0)\n {\n it.remove();\n }\n else\n {\n int supportingTransactions = rule.removeTransactionsCoveredByAntecedent(true);\n AttributeValue newDefClass = getDefaultRuleClass();\n int newDefError = getDefaultRuleError(newDefClass);\n if (defError<=newDefError)\n {\n //adding the current rule did not decrease the errors compared to a default rule\n it.remove();\n removeTail=true;\n }\n else{\n LOGGER.log(Level.FINE, \"{0} transactions, RULE {1} KEPT\", new Object[]{supportingTransactions, rule.getRID()});\n defClass = newDefClass;\n defError = newDefError;\n } \n }\n \n \n\n\n }\n LOGGER.fine(\"Creating new Extend rule within narrow rule procedure\");\n extendedRules.add(createNewDefaultRule(defClass));\n LOGGER.info(\"FINISHED Postpruning\");\n }", "boolean shouldRescore() {\n return false;\n }", "public void pruneRules_cbaLike() {\n LOGGER.info(\"STARTED Postpruning\");\n //HashMap<ExtendRule,Integer> ruleErrors = new HashMap();\n //HashMap<ExtendRule,AttributeValue> ruleDefClass = new HashMap();\n ArrayList<ExtendRule> rulesToRemove = new ArrayList(); \n int totalErrorsWithoutDefault = 0; \n AttributeValue defClassForLowestTotalErrorsRule = getDefaultRuleClass();\n int lowestTotalErrors = getDefaultRuleError(defClassForLowestTotalErrorsRule);;\n ExtendRule lowestTotalErrorsRule = null;\n // DETERMINE TOTAL ERROR AND DEFAULT CLASS ASSOCIATED WITH EACH RULE \n // REMOVE RULES MATCHING ZERO TRANSACTIONS AND OF ZERO LENGTH\n for (Iterator<ExtendRule> it = extendedRules.iterator(); it.hasNext();) {\n\n ExtendRule rule = it.next();\n rule.updateQuality();\n rule.setQualityInRuleList(rule.getRuleQuality());\n if (LOGGER.isLoggable(Level.FINE)) {\n LOGGER.log(Level.FINE, \"Processing rule {0}\", rule.toString());\n }\n\n if (rule.getAntecedentLength() == 0) {\n LOGGER.fine(\"Rule of length 0, MARKED FOR REMOVAL\");\n rulesToRemove.add(rule); //covered transactions should not be removed\n } \n else if (rule.getRuleQuality().getA() == 0)\n {\n LOGGER.fine(\"Rule classifying 0 instances correctly, MARKED FOR REMOVAL\");\n rulesToRemove.add(rule); //covered transactions should not be removed \n }\n else\n {\n rule.removeTransactionsCoveredByAntecedent(true); \n totalErrorsWithoutDefault = totalErrorsWithoutDefault + rule.getRuleQuality().getB();\n // since transactions matching the current rule have been removed, the default class and error can change\n AttributeValue newDefClass = getDefaultRuleClass();\n int newDefError = getDefaultRuleError(newDefClass);\n int totalErrorWithDefault = newDefError + totalErrorsWithoutDefault;\n if (totalErrorWithDefault < lowestTotalErrors)\n {\n lowestTotalErrors = totalErrorWithDefault;\n lowestTotalErrorsRule = rule;\n defClassForLowestTotalErrorsRule= newDefClass;\n } \n //ruleErrors.put(rule,totalErrorWithDefault );\n //ruleDefClass.put(rule, newDefClass); \n }\n \n }\n boolean removeTail;\n // now we know the errors associated with each rule not marked for removal, we can perform pruning\n if (lowestTotalErrorsRule == null)\n {\n // no rule improves error over a classifier composed of only default rule\n // remove all rules\n removeTail = true;\n }\n else \n {\n removeTail = false;\n }\n \n data.getDataTable().unhideAllTransactions();\n for (Iterator<ExtendRule> it = extendedRules.iterator(); it.hasNext();) {\n ExtendRule rule = it.next();\n if (rulesToRemove.contains(rule) || removeTail)\n {\n it.remove();\n continue;\n }\n if (rule.equals(lowestTotalErrorsRule))\n {\n removeTail = true;\n }\n rule.updateQuality(); \n }\n \n \n if (LOGGER.isLoggable(Level.FINE)) {\n LOGGER.fine(\"Creating new default rule within narrow rule procedure\");\n }\n \n \n extendedRules.add(createNewDefaultRule(defClassForLowestTotalErrorsRule));\n \n \n LOGGER.info(\"FINISHED Postpruning\");\n }", "protected abstract boolean reduce();", "@Override public short getComplexity() {\n return 0;\n }", "private void applyMerge() {\n try {\n SolutionTrajectory trajectory = solution.getShortestTrajectory();\n trajectory.setModel(this.scope);\n trajectory.doTransformation();\n applied = true;\n } catch (IncQueryException e) {\n logger.error(e.getMessage(), e);\n }\n }", "@Override\n public long getComplexity() {\n final long[] complexity = {0};\n getChecks().forEachRemaining(element -> {\n complexity[0] += element.getComplexity();\n });\n return complexity[0];\n }", "private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}", "private void applyOrSaveRules() {\n final boolean enabled = Api.isEnabled(this);\n final Context ctx = getApplicationContext();\n\n Api.generateRules(ctx, Api.getApps(ctx, null), true);\n\n if (!enabled) {\n Api.setEnabled(ctx, false, true);\n setDirty(false);\n return;\n }\n Api.updateNotification(Api.isEnabled(getApplicationContext()), getApplicationContext());\n new RunApply().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }", "@Override\n public boolean rewritePre(Mutable<ILogicalOperator> opRef, IOptimizationContext context)\n throws AlgebricksException {\n\n boolean cboMode = this.getCBOMode(context);\n boolean cboTestMode = this.getCBOTestMode(context);\n\n if (!(cboMode || cboTestMode)) {\n return false;\n }\n\n // If we reach here, then either cboMode or cboTestMode is true.\n // If cboTestMode is true, then we use predefined cardinalities for datasets for asterixdb regression tests.\n // If cboMode is true, then all datasets need to have samples, otherwise the check in doAllDataSourcesHaveSamples()\n // further below will return false.\n ILogicalOperator op = opRef.getValue();\n if (!(joinClause(op) || ((op.getOperatorTag() == LogicalOperatorTag.DISTRIBUTE_RESULT)))) {\n return false;\n }\n\n // if this join has already been seen before, no need to apply the rule again\n if (context.checkIfInDontApplySet(this, op)) {\n return false;\n }\n\n //joinOps = new ArrayList<>();\n allJoinOps = new ArrayList<>();\n newJoinOps = new ArrayList<>();\n leafInputs = new ArrayList<>();\n varLeafInputIds = new HashMap<>();\n outerJoinsDependencyList = new ArrayList<>();\n assignOps = new ArrayList<>();\n assignJoinExprs = new ArrayList<>();\n buildSets = new ArrayList<>();\n\n IPlanPrettyPrinter pp = context.getPrettyPrinter();\n printPlan(pp, (AbstractLogicalOperator) op, \"Original Whole plan1\");\n leafInputNumber = 0;\n boolean canTransform = getJoinOpsAndLeafInputs(op);\n\n if (!canTransform) {\n return false;\n }\n\n convertOuterJoinstoJoinsIfPossible(outerJoinsDependencyList);\n\n printPlan(pp, (AbstractLogicalOperator) op, \"Original Whole plan2\");\n int numberOfFromTerms = leafInputs.size();\n\n if (LOGGER.isTraceEnabled()) {\n String viewInPlan = new ALogicalPlanImpl(opRef).toString(); //useful when debugging\n LOGGER.trace(\"viewInPlan\");\n LOGGER.trace(viewInPlan);\n }\n\n if (buildSets.size() > 1) {\n buildSets.sort(Comparator.comparingDouble(o -> o.second)); // sort on the number of tables in each set\n // we need to build the smaller sets first. So we need to find these first.\n }\n joinEnum.initEnum((AbstractLogicalOperator) op, cboMode, cboTestMode, numberOfFromTerms, leafInputs, allJoinOps,\n assignOps, outerJoinsDependencyList, buildSets, varLeafInputIds, context);\n\n if (cboMode) {\n if (!doAllDataSourcesHaveSamples(leafInputs, context)) {\n return false;\n }\n }\n\n printLeafPlans(pp, leafInputs, \"Inputs1\");\n\n if (assignOps.size() > 0) {\n pushAssignsIntoLeafInputs(pp, leafInputs, assignOps, assignJoinExprs);\n }\n\n printLeafPlans(pp, leafInputs, \"Inputs2\");\n\n int cheapestPlan = joinEnum.enumerateJoins(); // MAIN CALL INTO CBO\n if (cheapestPlan == PlanNode.NO_PLAN) {\n return false;\n }\n\n PlanNode cheapestPlanNode = joinEnum.allPlans.get(cheapestPlan);\n\n generateHintWarnings();\n\n if (numberOfFromTerms > 1) {\n getNewJoinOps(cheapestPlanNode, allJoinOps);\n if (allJoinOps.size() != newJoinOps.size()) {\n return false; // there are some cases such as R OJ S on true. Here there is an OJ predicate but the code in findJoinConditions\n // in JoinEnum does not capture this. Will fix later. Just bail for now.\n }\n buildNewTree(cheapestPlanNode, newJoinOps, new MutableInt(0));\n opRef.setValue(newJoinOps.get(0));\n\n if (assignOps.size() > 0) {\n for (int i = assignOps.size() - 1; i >= 0; i--) {\n MutableBoolean removed = new MutableBoolean(false);\n removed.setFalse();\n pushAssignsAboveJoins(newJoinOps.get(0), assignOps.get(i), assignJoinExprs.get(i), removed);\n if (removed.isTrue()) {\n assignOps.remove(i);\n }\n }\n }\n\n printPlan(pp, (AbstractLogicalOperator) newJoinOps.get(0), \"New Whole Plan after buildNewTree 1\");\n ILogicalOperator root = addRemainingAssignsAtTheTop(newJoinOps.get(0), assignOps);\n printPlan(pp, (AbstractLogicalOperator) newJoinOps.get(0), \"New Whole Plan after buildNewTree 2\");\n printPlan(pp, (AbstractLogicalOperator) root, \"New Whole Plan after buildNewTree\");\n\n // this will be the new root\n opRef.setValue(root);\n\n if (LOGGER.isTraceEnabled()) {\n String viewInPlan = new ALogicalPlanImpl(opRef).toString(); //useful when debugging\n LOGGER.trace(\"viewInPlanAgain\");\n LOGGER.trace(viewInPlan);\n String viewOutPlan = new ALogicalPlanImpl(opRef).toString(); //useful when debugging\n LOGGER.trace(\"viewOutPlan\");\n LOGGER.trace(viewOutPlan);\n }\n\n if (LOGGER.isTraceEnabled()) {\n LOGGER.trace(\"---------------------------- Printing Leaf Inputs\");\n printLeafPlans(pp, leafInputs, \"Inputs\");\n // print joins starting from the bottom\n for (int i = newJoinOps.size() - 1; i >= 0; i--) {\n printPlan(pp, (AbstractLogicalOperator) newJoinOps.get(i), \"join \" + i);\n }\n printPlan(pp, (AbstractLogicalOperator) newJoinOps.get(0), \"New Whole Plan\");\n printPlan(pp, (AbstractLogicalOperator) root, \"New Whole Plan\");\n }\n\n // turn of this rule for all joins in this set (subtree)\n for (ILogicalOperator joinOp : newJoinOps) {\n context.addToDontApplySet(this, joinOp);\n }\n\n } else {\n buildNewTree(cheapestPlanNode);\n }\n\n return true;\n }", "private void checkIsBetterSolution() {\n if (solution == null) {\n solution = generateSolution();\n //Si la solucion que propone esta iteracion es mejor que las anteriores la guardamos como mejor solucion\n } else if (getHealthFromAvailableWorkers(availableWorkersHours, errorPoints.size()) < solution.getHealth()) {\n solution = generateSolution();\n }\n }", "private boolean updateRuleCache(Context context,Map ruleInfoMap) throws Exception\r\n {\r\n \t String strNewExpression = null;\r\n \t boolean bsucceed = true;\r\n\r\n \t String strRuleId = (String)ruleInfoMap.get(SELECT_ID);\r\n \t DomainObject domRuleObj = DomainObject.newInstance(context,strRuleId);\r\n \t String strRuleType = (String) ruleInfoMap.get(DomainConstants.SELECT_TYPE);\r\n \t String strDVAttrVal = (String) ruleInfoMap.get(ConfigurationConstants.SELECT_DESIGNVARIANTS);\r\n \t String strRuleComplexity = (String) ruleInfoMap.get(ConfigurationConstants.SELECT_RULE_COMPLEXITY);\r\n\r\n try{\r\n \t /* Depending upon the Rule Type Left and Right expression\r\n \t * attributes will be computed\r\n \t */\r\n \t StringList sLOfExpAttr = new StringList();\r\n\r\n \t if(strRuleType.equalsIgnoreCase(ConfigurationConstants.TYPE_BOOLEAN_COMPATIBILITY_RULE)\r\n \t\t\t || strRuleType.equalsIgnoreCase(ConfigurationConstants.TYPE_MARKETING_PREFERENCE)\r\n \t\t\t || strRuleType.equalsIgnoreCase(ConfigurationConstants.TYPE_PRODUCT_COMPATIBILITY_RULE)\r\n \t\t\t || strRuleType.equalsIgnoreCase(ConfigurationConstants.TYPE_INCLUSION_RULE)){\r\n\r\n \t\t sLOfExpAttr.add(ConfigurationConstants.RELATIONSHIP_LEFT_EXPRESSION);\r\n \t\t sLOfExpAttr.add(ConfigurationConstants.RELATIONSHIP_RIGHT_EXPRESSION);\r\n\r\n \t }else if(strRuleType.equalsIgnoreCase(ConfigurationConstants.TYPE_QUANTITY_RULE)){\r\n\r\n \t\t sLOfExpAttr.add(ConfigurationConstants.RELATIONSHIP_RIGHT_EXPRESSION);\r\n \t }\r\n\r\n \t mqlLogRequiredInformationWriter(\"Rule Info :: \"+ ruleInfoMap + \"\\n\");\r\n \t mqlLogRequiredInformationWriter(\"Type of Rule :: \"+ strRuleType + \"\\n\");\r\n \t mqlLogRequiredInformationWriter(\"Rule Complexity :: \"+ strRuleComplexity + \"\\n\");\r\n \t mqlLogRequiredInformationWriter(\"Design Variant Attribute Value :: \"+ strDVAttrVal + \"\\n\");\r\n\r\n \t StringList RelationshipSelect = new StringList(ConfigurationConstants.SELECT_ID);\r\n \t RelationshipSelect.addElement(\"torel.id\");\r\n \t RelationshipSelect.addElement(\"to.id\");\r\n \t RelationshipSelect.addElement(\"torel.physicalid\");\r\n \t RelationshipSelect.addElement(\"to.physicalid\");\r\n \t RelationshipSelect.addElement(SELECT_PHYSICALID);\r\n\r\n \t RelationshipSelect.addElement(ConfigurationConstants.SELECT_ATTRIBUTE_SEQUENCE_ORDER);\r\n \t RelationshipSelect.addElement(SELECT_ATTRIBUTE_TOKEN);\r\n\r\n\r\n \t StringList sLRelationshipWhere = new StringList();\r\n \t sLRelationshipWhere.addElement(\"from.id\" + \"==\" + strRuleId);\r\n\r\n\r\n \t //Compute the LE and RE attributes and set attribute values accordingly\r\n \t for(int iCntExpAttr=0;iCntExpAttr<sLOfExpAttr.size() ;iCntExpAttr++){\r\n\r\n\t \t//StringList of RE Rel( delete token AND,OR,NOT specific related rel ids ) to be deleted\r\n\t\t\tStringList sLRERelIdsToBeDeleted = new StringList();\r\n\r\n \t\tString strExpAttr = (String)sLOfExpAttr.get(iCntExpAttr);\r\n\r\n \t\t//Get the LE or RE Rel ids\r\n \t\tStringList sLOfExp = new StringList();\r\n \t String ExpSelect = \"from[\"+ strExpAttr+ \"].id\";\r\n\r\n \t if((StringList)ruleInfoMap.get(ExpSelect)!=null){\r\n \t \tsLOfExp = (StringList)ruleInfoMap.get(ExpSelect);\r\n \t }\r\n\r\n \t mqlLogRequiredInformationWriter(\"Expression is :: \"+ ExpSelect + \"\\n\");\r\n \t mqlLogRequiredInformationWriter(\"Expression Value :: \"+ sLOfExp + \"\\n\");\r\n\r\n\t\t\tMapList mLOfExpToSideRelInfo = new MapList();\r\n\r\n\t\t\tfor(int iCnt=0;iCnt<sLOfExp.size();iCnt++) {\r\n\t\t\t\tString strRelId = (String)sLOfExp.get(iCnt);\r\n\r\n\t\t\t\t//Get the Rel Id info\r\n\t\t\t\tDomainRelationship domRelId = new DomainRelationship(strRelId);\r\n\t\t\t\tMap mRelData = domRelId.getRelationshipData(context,RelationshipSelect);\r\n\t\t\t\t/*\"Sequence Order\" is stored in StringList format...\r\n\t\t\t\t converted to String as this is used further in \"addSortKey\" method*/\r\n\t\t\t\tif(!((StringList)mRelData.get(SELECT_ATTRIBUTE_SEQUENCE_ORDER)).isEmpty()){\r\n\t\t\t\t\tmRelData.put(\"attribute[\"+ATTRIBUTE_SEQUENCE_ORDER +\"]\",\r\n\t\t\t\t\t\t\t ((StringList)mRelData.get(SELECT_ATTRIBUTE_SEQUENCE_ORDER)).get(0));\r\n \t\t\t }\r\n\r\n\t\t\t\tmLOfExpToSideRelInfo.add(mRelData);\r\n\t\t\t}\r\n\r\n \t\t //Need to sort the Map on the basis of \"Sequence Number\" attribute value in ascending order\r\n \t\t\t StringBuffer strBuffer = new StringBuffer(200);\r\n\t\t\t\tstrBuffer = strBuffer.append(STR_ATTRIBUTE)\r\n\t\t\t\t\t\t\t.append(OPEN_BRACE)\r\n\t\t\t\t\t\t\t.append(ConfigurationConstants.ATTRIBUTE_SEQUENCE_ORDER)\r\n\t\t\t\t\t\t\t.append(CLOSE_BRACE);\r\n\r\n\t\t\t\tmLOfExpToSideRelInfo.addSortKey(strBuffer.toString(), \"ascending\", \"integer\");\r\n\t\t\t\tmLOfExpToSideRelInfo.sort();\r\n\r\n \t\t StringBuffer strExpBuffer = new StringBuffer();\r\n\r\n \t\t mqlLogRequiredInformationWriter(\"Exp To Side Rel Info :: \"+ mLOfExpToSideRelInfo + \"\\n\");\r\n \t\t for(int m=0;m<mLOfExpToSideRelInfo.size();m++){\r\n\r\n \t\t\t Map mpInfo = new HashMap();\r\n \t\t\t mpInfo = (Map) mLOfExpToSideRelInfo.get(m);\r\n\r\n \t\t\t String strToken =\"\";\r\n \t\t\t String strPhysicalId =\"\";\r\n \t\t\t String strToRelPhyId =\"\";\r\n \t\t\t String strToPhyId =\"\";\r\n \t\t\t String strRERelId =\"\";\r\n\r\n\r\n \t\t\t if(!((StringList)mpInfo.get(SELECT_ATTRIBUTE_TOKEN)).isEmpty()){\r\n \t\t\t\t strToken = (String)((StringList)mpInfo.get(SELECT_ATTRIBUTE_TOKEN)).get(0);\r\n \t\t\t\t strRERelId = (String)((StringList)mpInfo.get(\"id\")).get(0);\r\n \t\t\t\t mqlLogRequiredInformationWriter(\"Existing RE Rel to be deleted for this Rule:: \"+ strRERelId + \"\\n\");\r\n \t\t\t\t sLRERelIdsToBeDeleted.add(strRERelId);\r\n \t\t\t }\r\n\r\n \t\t\t if(!((StringList)mpInfo.get(\"physicalid\")).isEmpty()){\r\n \t\t\t\t strPhysicalId = (String)((StringList)mpInfo.get(\"physicalid\")).get(0);\r\n \t\t\t }\r\n\r\n \t\t\t if(!((StringList)mpInfo.get(\"torel.physicalid\")).isEmpty()){\r\n \t\t\t\tstrToRelPhyId = (String)((StringList)mpInfo.get(\"torel.physicalid\")).get(0);\r\n \t\t\t }\r\n\r\n \t\t\t if(!((StringList)mpInfo.get(\"to.physicalid\")).isEmpty()){\r\n \t\t\t\t strToPhyId = (String)((StringList)mpInfo.get(\"to.physicalid\")).get(0);\r\n \t\t\t }\r\n\r\n \t\t\t mqlLogRequiredInformationWriter(\"Token value if any :: \"+ strToken + \"\\n\");\r\n \t\t\t mqlLogRequiredInformationWriter(\"Physical Id of LE/RE :: \"+ strPhysicalId + \"\\n\");\r\n \t\t\t mqlLogRequiredInformationWriter(\"Rel Physical Id of 'To side' of LE/RE Rel :: \"+ strToRelPhyId + \"\\n\");\r\n \t\t\t mqlLogRequiredInformationWriter(\"Obj Physical Id of 'To side' of LE/RE Rel :: \"+ strToPhyId + \"\\n\\n\");\r\n\r\n \t\t\t //Append the AND,OR,(,),NOT\r\n \t\t\t if(strToken!=null && strToken.length()!=0){\r\n \t\t\t\t strExpBuffer = strExpBuffer.append(strToken).append(SYMB_SPACE);\r\n \t\t\t }else{\r\n \t\t\t\t //Add to the String for attribute\r\n \t\t\t\t if(strToRelPhyId!=null && strToRelPhyId.length()!=0) {\r\n \t\t\t\t\t strExpBuffer = strExpBuffer.append(\"R\")\r\n \t\t\t\t\t .append(strToRelPhyId)\r\n \t\t\t\t\t .append(SYMB_SPACE);\r\n \t\t\t\t }else if(strToPhyId!=null && strToPhyId.length()!=0) {\r\n \t\t\t\t\t strExpBuffer = strExpBuffer.append(\"B\")\r\n \t\t\t\t\t .append(strToPhyId)\r\n \t\t\t\t\t .append(SYMB_SPACE);\r\n \t\t\t\t }\r\n \t\t\t }\r\n \t\t }\r\n\r\n \t\t strNewExpression = strExpBuffer.toString();\r\n \t\t StringBuffer strBuf= new StringBuffer();\r\n\r\n \t\t if(strRuleType.equalsIgnoreCase(ConfigurationConstants.TYPE_MARKETING_PREFERENCE)\r\n \t\t\t\t && strExpAttr.equalsIgnoreCase(ConfigurationConstants.ATTRIBUTE_RIGHT_EXPRESSION)){\r\n \t\t\t StringList slRtExpTokenised = FrameworkUtil.split(strNewExpression, SYMB_SPACE);\r\n \t\t\t for(int i=0;i<slRtExpTokenised.size();i++){\r\n \t\t\t\t String strElement = (String) slRtExpTokenised.get(i);\r\n \t\t\t\t if(!strElement.trim().isEmpty())\r\n \t\t\t\t strBuf.append(strElement).append(SYMB_SPACE).append(\"AND\").append(SYMB_SPACE);\r\n \t\t\t }\r\n \t\t\t String strMPRRExpressionFinal = strBuf.toString();\r\n\r\n \t\t\t if (strMPRRExpressionFinal.endsWith(\" AND \")) {\r\n \t\t\t\t int i = strMPRRExpressionFinal.lastIndexOf(\" AND \");\r\n \t\t\t\t strNewExpression = strMPRRExpressionFinal.substring(0, i);\r\n \t\t\t }\r\n \t\t }\r\n \t\t mqlLogRequiredInformationWriter(\"Set attribute values on Rule Id start :: \"+\"\\n\");\r\n \t\t mqlLogRequiredInformationWriter(\"Rule Attribute :: \"+ strExpAttr + \"\\n\");\r\n \t\t mqlLogRequiredInformationWriter(\"Value of Attribute :: \"+ strNewExpression + \"\\n\\n\");\r\n \t\t domRuleObj.setAttributeValue(context, strExpAttr, strNewExpression);\r\n \t\t mqlLogRequiredInformationWriter(\"Set Attribute values on Rule Id done :: \"+\"\\n\");\r\n\r\n \t\t //If Rule Type = Inclusion Rule then only update the below Attribute\r\n \t\t\tif(strRuleType.equalsIgnoreCase(ConfigurationConstants.TYPE_INCLUSION_RULE)\r\n \t\t\t\t && strDVAttrVal!=null\r\n \t\t\t\t && !strDVAttrVal.equals(\"\")\r\n \t\t\t\t && !strDVAttrVal.isEmpty()){\r\n\r\n \t\t\t\tif(strRuleComplexity!=null && strRuleComplexity.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_SIMPLE)){\r\n \t\t\t\t\t mqlLogRequiredInformationWriter(\"Rule Complexity :: \"+ strRuleComplexity + \"\\n\");\r\n \t\t\t\t\t String strDVVal = \"\";\r\n \t \t\t StringBuffer sBDVPhyIds = new StringBuffer();\r\n \t \t\t StringTokenizer newValueTZ = new StringTokenizer(strDVAttrVal, \",\");\r\n \t \t\t\t while(newValueTZ.hasMoreElements()) {\r\n \t \t\t\t\tstrDVVal = newValueTZ.nextToken();\r\n\r\n \t \t\t\t\tDomainObject domDVId = new DomainObject(strDVVal);\r\n \t \t\t\t\tString strDVPhyId =\"\";\r\n \t \t\t\t\tif(domDVId.exists(context)){\r\n \t \t\t\t\t\tstrDVPhyId= domDVId.getInfo(context, SELECT_PHYSICALID);\r\n \t \t\t\t\t\tsBDVPhyIds.append(strDVPhyId);\r\n \t \t\t\t\t\tsBDVPhyIds.append(\",\");\r\n \t \t\t\t\t}else{\r\n \t \t\t\t\t\tmqlLogRequiredInformationWriter(\"\\n\\n\\n\"\r\n \t \t\t\t\t\t\t\t\t\t\t\t\t\t+\"This Design Variant doesn't exist now\"\r\n \t \t\t\t\t\t\t\t\t\t\t\t\t\t+ strDVVal\r\n \t \t\t\t\t\t\t\t\t\t\t\t\t\t+\"\\n\"\r\n \t \t\t\t\t\t\t\t\t\t\t\t\t\t+\"\\n\");\r\n \t \t\t\t\t}\r\n \t \t\t\t}\r\n \t \t\t\t if(sBDVPhyIds!=null && sBDVPhyIds.length()!=0){\r\n \t \t\t\t\t String strDVPhyId = sBDVPhyIds.toString().substring(0,sBDVPhyIds.length()-1);\r\n \t \t\t\t\t mqlLogRequiredInformationWriter(\"Attrubute 'Design Variant' value to be set as :: \"+ strDVPhyId + \"\\n\");\r\n \t \t\t\t\t domRuleObj.setAttributeValue(context, ConfigurationConstants.ATTRIBUTE_DESIGNVARIANTS, strDVPhyId );\r\n \t \t\t\t }\r\n \t\t\t\t}\r\n \t\t }\r\n\r\n \t\t\t//To delete the RE rel\r\n \t\t\tif(!sLRERelIdsToBeDeleted.isEmpty()){\r\n \t\t\t\tmqlLogRequiredInformationWriter(\"List of Rel Ids to be deleted :: \"+ sLRERelIdsToBeDeleted + \"\\n\");\r\n \t \t\t\tdisconnectRel(context, sLRERelIdsToBeDeleted);\r\n \t \t\t mqlLogRequiredInformationWriter(\"Rel id's deletion done.\" + \"\\n\");\r\n \t\t\t}\r\n\r\n \t }\r\n }catch(Exception e)\r\n {\r\n \t e.printStackTrace();\r\n \t bsucceed = false;\r\n \t throw new FrameworkException(\"reCompute Expression Attributes failed \" + e.getMessage());\r\n }\r\n\r\n \t return bsucceed;\r\n }", "@Override\n\tpublic boolean getLinearityChange()\n\t{\n\t\treturn hasRan;\n\t}", "public boolean canReduce() {\n\t\treturn marker == getRhs().length;\n\t}", "private void applyRules () throws DataNormalizationException {\n\t\tapplyRules(null);\n\t}", "public void doOfflineComputation() {\n\t\toptimalPolicy = policyIteration();\n\n\t}", "@Override\n public void computeSatisfaction() {\n\n }", "public boolean hasObjective(){ return this.hasParameter(1); }", "static boolean applyChainOptimized(android.support.constraint.solver.widgets.ConstraintWidgetContainer r39, android.support.constraint.solver.LinearSystem r40, int r41, int r42, android.support.constraint.solver.widgets.ChainHead r43) {\n /*\n r0 = r40\n r1 = r41\n r2 = r43\n android.support.constraint.solver.widgets.ConstraintWidget r3 = r2.mFirst\n android.support.constraint.solver.widgets.ConstraintWidget r4 = r2.mLast\n android.support.constraint.solver.widgets.ConstraintWidget r5 = r2.mFirstVisibleWidget\n android.support.constraint.solver.widgets.ConstraintWidget r6 = r2.mLastVisibleWidget\n android.support.constraint.solver.widgets.ConstraintWidget r7 = r2.mHead\n r8 = r3\n r9 = 0\n r10 = 0\n r11 = 0\n float r12 = r2.mTotalWeight\n android.support.constraint.solver.widgets.ConstraintWidget r13 = r2.mFirstMatchConstraintWidget\n android.support.constraint.solver.widgets.ConstraintWidget r14 = r2.mLastMatchConstraintWidget\n r2 = r39\n r15 = r8\n android.support.constraint.solver.widgets.ConstraintWidget$DimensionBehaviour[] r8 = r2.mListDimensionBehaviors\n r8 = r8[r1]\n android.support.constraint.solver.widgets.ConstraintWidget$DimensionBehaviour r2 = android.support.constraint.solver.widgets.ConstraintWidget.DimensionBehaviour.WRAP_CONTENT\n r16 = 0\n r17 = r9\n if (r8 != r2) goto L_0x002b\n r2 = 1\n goto L_0x002c\n L_0x002b:\n r2 = 0\n L_0x002c:\n r8 = 0\n r18 = 0\n r19 = 0\n if (r1 != 0) goto L_0x0050\n int r9 = r7.mHorizontalChainStyle\n if (r9 != 0) goto L_0x0039\n r9 = 1\n goto L_0x003a\n L_0x0039:\n r9 = 0\n L_0x003a:\n r8 = r9\n int r9 = r7.mHorizontalChainStyle\n r21 = r2\n r2 = 1\n if (r9 != r2) goto L_0x0044\n r2 = 1\n goto L_0x0045\n L_0x0044:\n r2 = 0\n L_0x0045:\n int r9 = r7.mHorizontalChainStyle\n r22 = r2\n r2 = 2\n if (r9 != r2) goto L_0x004e\n r2 = 1\n goto L_0x004f\n L_0x004e:\n r2 = 0\n L_0x004f:\n goto L_0x006e\n L_0x0050:\n r21 = r2\n int r2 = r7.mVerticalChainStyle\n if (r2 != 0) goto L_0x0058\n r2 = 1\n goto L_0x0059\n L_0x0058:\n r2 = 0\n L_0x0059:\n r8 = r2\n int r2 = r7.mVerticalChainStyle\n r9 = 1\n if (r2 != r9) goto L_0x0061\n r2 = 1\n goto L_0x0062\n L_0x0061:\n r2 = 0\n L_0x0062:\n int r9 = r7.mVerticalChainStyle\n r23 = r2\n r2 = 2\n if (r9 != r2) goto L_0x006b\n r2 = 1\n goto L_0x006c\n L_0x006b:\n r2 = 0\n L_0x006c:\n r22 = r23\n L_0x006e:\n r9 = 0\n r18 = 0\n r24 = r7\n r7 = r11\n r11 = r15\n r15 = r9\n r9 = 0\n L_0x0077:\n r19 = 0\n r25 = r13\n r13 = 8\n if (r10 != 0) goto L_0x0143\n r26 = r10\n int r10 = r11.getVisibility()\n if (r10 == r13) goto L_0x00ca\n int r9 = r9 + 1\n if (r1 != 0) goto L_0x0092\n int r10 = r11.getWidth()\n float r10 = (float) r10\n float r15 = r15 + r10\n goto L_0x0098\n L_0x0092:\n int r10 = r11.getHeight()\n float r10 = (float) r10\n float r15 = r15 + r10\n L_0x0098:\n if (r11 == r5) goto L_0x00a4\n android.support.constraint.solver.widgets.ConstraintAnchor[] r10 = r11.mListAnchors\n r10 = r10[r42]\n int r10 = r10.getMargin()\n float r10 = (float) r10\n float r15 = r15 + r10\n L_0x00a4:\n if (r11 == r6) goto L_0x00b2\n android.support.constraint.solver.widgets.ConstraintAnchor[] r10 = r11.mListAnchors\n int r20 = r42 + 1\n r10 = r10[r20]\n int r10 = r10.getMargin()\n float r10 = (float) r10\n float r15 = r15 + r10\n L_0x00b2:\n android.support.constraint.solver.widgets.ConstraintAnchor[] r10 = r11.mListAnchors\n r10 = r10[r42]\n int r10 = r10.getMargin()\n float r10 = (float) r10\n float r18 = r18 + r10\n android.support.constraint.solver.widgets.ConstraintAnchor[] r10 = r11.mListAnchors\n int r20 = r42 + 1\n r10 = r10[r20]\n int r10 = r10.getMargin()\n float r10 = (float) r10\n float r18 = r18 + r10\n L_0x00ca:\n android.support.constraint.solver.widgets.ConstraintAnchor[] r10 = r11.mListAnchors\n r10 = r10[r42]\n r27 = r9\n int r9 = r11.getVisibility()\n if (r9 == r13) goto L_0x0106\n android.support.constraint.solver.widgets.ConstraintWidget$DimensionBehaviour[] r9 = r11.mListDimensionBehaviors\n r9 = r9[r1]\n android.support.constraint.solver.widgets.ConstraintWidget$DimensionBehaviour r13 = android.support.constraint.solver.widgets.ConstraintWidget.DimensionBehaviour.MATCH_CONSTRAINT\n if (r9 != r13) goto L_0x0106\n int r7 = r7 + 1\n if (r1 != 0) goto L_0x00f0\n int r9 = r11.mMatchConstraintDefaultWidth\n if (r9 == 0) goto L_0x00e7\n return r16\n L_0x00e7:\n int r9 = r11.mMatchConstraintMinWidth\n if (r9 != 0) goto L_0x00ef\n int r9 = r11.mMatchConstraintMaxWidth\n if (r9 == 0) goto L_0x00fe\n L_0x00ef:\n return r16\n L_0x00f0:\n int r9 = r11.mMatchConstraintDefaultHeight\n if (r9 == 0) goto L_0x00f5\n return r16\n L_0x00f5:\n int r9 = r11.mMatchConstraintMinHeight\n if (r9 != 0) goto L_0x0105\n int r9 = r11.mMatchConstraintMaxHeight\n if (r9 == 0) goto L_0x00fe\n goto L_0x0105\n L_0x00fe:\n float r9 = r11.mDimensionRatio\n int r9 = (r9 > r19 ? 1 : (r9 == r19 ? 0 : -1))\n if (r9 == 0) goto L_0x0106\n return r16\n L_0x0105:\n return r16\n L_0x0106:\n android.support.constraint.solver.widgets.ConstraintAnchor[] r9 = r11.mListAnchors\n int r13 = r42 + 1\n r9 = r9[r13]\n android.support.constraint.solver.widgets.ConstraintAnchor r9 = r9.mTarget\n if (r9 == 0) goto L_0x012c\n android.support.constraint.solver.widgets.ConstraintWidget r13 = r9.mOwner\n r28 = r7\n android.support.constraint.solver.widgets.ConstraintAnchor[] r7 = r13.mListAnchors\n r7 = r7[r42]\n android.support.constraint.solver.widgets.ConstraintAnchor r7 = r7.mTarget\n if (r7 == 0) goto L_0x012a\n android.support.constraint.solver.widgets.ConstraintAnchor[] r7 = r13.mListAnchors\n r7 = r7[r42]\n android.support.constraint.solver.widgets.ConstraintAnchor r7 = r7.mTarget\n android.support.constraint.solver.widgets.ConstraintWidget r7 = r7.mOwner\n if (r7 == r11) goto L_0x0127\n goto L_0x012a\n L_0x0127:\n r17 = r13\n goto L_0x0131\n L_0x012a:\n r7 = 0\n goto L_0x012f\n L_0x012c:\n r28 = r7\n r7 = 0\n L_0x012f:\n r17 = r7\n L_0x0131:\n if (r17 == 0) goto L_0x0139\n r7 = r17\n r11 = r7\n r10 = r26\n goto L_0x013b\n L_0x0139:\n r7 = 1\n r10 = r7\n L_0x013b:\n r13 = r25\n r9 = r27\n r7 = r28\n goto L_0x0077\n L_0x0143:\n r26 = r10\n android.support.constraint.solver.widgets.ConstraintAnchor[] r10 = r3.mListAnchors\n r10 = r10[r42]\n android.support.constraint.solver.widgets.ResolutionAnchor r10 = r10.getResolutionNode()\n android.support.constraint.solver.widgets.ConstraintAnchor[] r13 = r4.mListAnchors\n int r20 = r42 + 1\n r13 = r13[r20]\n android.support.constraint.solver.widgets.ResolutionAnchor r13 = r13.getResolutionNode()\n r29 = r14\n android.support.constraint.solver.widgets.ResolutionAnchor r14 = r10.target\n if (r14 == 0) goto L_0x0480\n android.support.constraint.solver.widgets.ResolutionAnchor r14 = r13.target\n if (r14 != 0) goto L_0x0170\n r30 = r2\n r32 = r6\n r37 = r7\n r33 = r8\n r38 = r9\n r35 = r13\n r13 = r0\n goto L_0x048d\n L_0x0170:\n android.support.constraint.solver.widgets.ResolutionAnchor r14 = r10.target\n int r14 = r14.state\n r0 = 1\n if (r14 != r0) goto L_0x0471\n android.support.constraint.solver.widgets.ResolutionAnchor r14 = r13.target\n int r14 = r14.state\n if (r14 == r0) goto L_0x018d\n r30 = r2\n r32 = r6\n r37 = r7\n r33 = r8\n r38 = r9\n r35 = r13\n r13 = r40\n goto L_0x047f\n L_0x018d:\n if (r7 <= 0) goto L_0x0192\n if (r7 == r9) goto L_0x0192\n return r16\n L_0x0192:\n r0 = 0\n if (r2 != 0) goto L_0x0199\n if (r8 != 0) goto L_0x0199\n if (r22 == 0) goto L_0x01b2\n L_0x0199:\n if (r5 == 0) goto L_0x01a4\n android.support.constraint.solver.widgets.ConstraintAnchor[] r14 = r5.mListAnchors\n r14 = r14[r42]\n int r14 = r14.getMargin()\n float r0 = (float) r14\n L_0x01a4:\n if (r6 == 0) goto L_0x01b2\n android.support.constraint.solver.widgets.ConstraintAnchor[] r14 = r6.mListAnchors\n int r20 = r42 + 1\n r14 = r14[r20]\n int r14 = r14.getMargin()\n float r14 = (float) r14\n float r0 = r0 + r14\n L_0x01b2:\n android.support.constraint.solver.widgets.ResolutionAnchor r14 = r10.target\n float r14 = r14.resolvedOffset\n r30 = r2\n android.support.constraint.solver.widgets.ResolutionAnchor r2 = r13.target\n float r2 = r2.resolvedOffset\n r20 = 0\n int r23 = (r14 > r2 ? 1 : (r14 == r2 ? 0 : -1))\n if (r23 >= 0) goto L_0x01c7\n float r23 = r2 - r14\n float r23 = r23 - r15\n goto L_0x01cb\n L_0x01c7:\n float r23 = r14 - r2\n float r23 = r23 - r15\n L_0x01cb:\n r27 = 1\n if (r7 <= 0) goto L_0x02b9\n if (r7 != r9) goto L_0x02b9\n android.support.constraint.solver.widgets.ConstraintWidget r20 = r11.getParent()\n if (r20 == 0) goto L_0x01e8\n r31 = r2\n android.support.constraint.solver.widgets.ConstraintWidget r2 = r11.getParent()\n android.support.constraint.solver.widgets.ConstraintWidget$DimensionBehaviour[] r2 = r2.mListDimensionBehaviors\n r2 = r2[r1]\n r32 = r6\n android.support.constraint.solver.widgets.ConstraintWidget$DimensionBehaviour r6 = android.support.constraint.solver.widgets.ConstraintWidget.DimensionBehaviour.WRAP_CONTENT\n if (r2 != r6) goto L_0x01ec\n return r16\n L_0x01e8:\n r31 = r2\n r32 = r6\n L_0x01ec:\n float r23 = r23 + r15\n float r23 = r23 - r18\n r2 = r3\n r6 = r2\n r2 = r14\n L_0x01f3:\n if (r6 == 0) goto L_0x02ad\n android.support.constraint.solver.Metrics r11 = android.support.constraint.solver.LinearSystem.sMetrics\n if (r11 == 0) goto L_0x021a\n android.support.constraint.solver.Metrics r11 = android.support.constraint.solver.LinearSystem.sMetrics\n r33 = r8\n r34 = r9\n long r8 = r11.nonresolvedWidgets\n long r8 = r8 - r27\n r11.nonresolvedWidgets = r8\n android.support.constraint.solver.Metrics r8 = android.support.constraint.solver.LinearSystem.sMetrics\n r35 = r13\n r36 = r14\n long r13 = r8.resolvedWidgets\n long r13 = r13 + r27\n r8.resolvedWidgets = r13\n android.support.constraint.solver.Metrics r8 = android.support.constraint.solver.LinearSystem.sMetrics\n long r13 = r8.chainConnectionResolved\n long r13 = r13 + r27\n r8.chainConnectionResolved = r13\n goto L_0x0222\n L_0x021a:\n r33 = r8\n r34 = r9\n r35 = r13\n r36 = r14\n L_0x0222:\n android.support.constraint.solver.widgets.ConstraintWidget[] r8 = r6.mNextChainWidget\n r17 = r8[r1]\n if (r17 != 0) goto L_0x022e\n if (r6 != r4) goto L_0x022b\n goto L_0x022e\n L_0x022b:\n r13 = r40\n goto L_0x02a1\n L_0x022e:\n float r8 = (float) r7\n float r8 = r23 / r8\n int r9 = (r12 > r19 ? 1 : (r12 == r19 ? 0 : -1))\n if (r9 <= 0) goto L_0x0249\n float[] r9 = r6.mWeight\n r9 = r9[r1]\n r11 = -1082130432(0xffffffffbf800000, float:-1.0)\n int r9 = (r9 > r11 ? 1 : (r9 == r11 ? 0 : -1))\n if (r9 != 0) goto L_0x0241\n r8 = 0\n goto L_0x0249\n L_0x0241:\n float[] r9 = r6.mWeight\n r9 = r9[r1]\n float r9 = r9 * r23\n float r8 = r9 / r12\n L_0x0249:\n int r9 = r6.getVisibility()\n r11 = 8\n if (r9 != r11) goto L_0x0252\n r8 = 0\n L_0x0252:\n android.support.constraint.solver.widgets.ConstraintAnchor[] r9 = r6.mListAnchors\n r9 = r9[r42]\n int r9 = r9.getMargin()\n float r9 = (float) r9\n float r2 = r2 + r9\n android.support.constraint.solver.widgets.ConstraintAnchor[] r9 = r6.mListAnchors\n r9 = r9[r42]\n android.support.constraint.solver.widgets.ResolutionAnchor r9 = r9.getResolutionNode()\n android.support.constraint.solver.widgets.ResolutionAnchor r11 = r10.resolvedTarget\n r9.resolve(r11, r2)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r9 = r6.mListAnchors\n int r11 = r42 + 1\n r9 = r9[r11]\n android.support.constraint.solver.widgets.ResolutionAnchor r9 = r9.getResolutionNode()\n android.support.constraint.solver.widgets.ResolutionAnchor r11 = r10.resolvedTarget\n float r13 = r2 + r8\n r9.resolve(r11, r13)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r9 = r6.mListAnchors\n r9 = r9[r42]\n android.support.constraint.solver.widgets.ResolutionAnchor r9 = r9.getResolutionNode()\n r13 = r40\n r9.addResolvedValue(r13)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r9 = r6.mListAnchors\n int r11 = r42 + 1\n r9 = r9[r11]\n android.support.constraint.solver.widgets.ResolutionAnchor r9 = r9.getResolutionNode()\n r9.addResolvedValue(r13)\n float r2 = r2 + r8\n android.support.constraint.solver.widgets.ConstraintAnchor[] r9 = r6.mListAnchors\n int r11 = r42 + 1\n r9 = r9[r11]\n int r9 = r9.getMargin()\n float r9 = (float) r9\n float r2 = r2 + r9\n L_0x02a1:\n r6 = r17\n r8 = r33\n r9 = r34\n r13 = r35\n r14 = r36\n goto L_0x01f3\n L_0x02ad:\n r33 = r8\n r34 = r9\n r35 = r13\n r36 = r14\n r13 = r40\n r8 = 1\n return r8\n L_0x02b9:\n r31 = r2\n r32 = r6\n r33 = r8\n r34 = r9\n r35 = r13\n r36 = r14\n r13 = r40\n int r2 = (r23 > r19 ? 1 : (r23 == r19 ? 0 : -1))\n if (r2 >= 0) goto L_0x02d3\n r8 = 0\n r22 = 0\n r2 = 1\n r30 = r2\n r33 = r8\n L_0x02d3:\n if (r30 == 0) goto L_0x0370\n float r23 = r23 - r0\n r2 = r3\n float r6 = r3.getBiasPercent(r1)\n float r6 = r6 * r23\n float r14 = r36 + r6\n r11 = r2\n r23 = r14\n L_0x02e3:\n if (r11 == 0) goto L_0x036a\n android.support.constraint.solver.Metrics r2 = android.support.constraint.solver.LinearSystem.sMetrics\n if (r2 == 0) goto L_0x0301\n android.support.constraint.solver.Metrics r2 = android.support.constraint.solver.LinearSystem.sMetrics\n long r8 = r2.nonresolvedWidgets\n long r8 = r8 - r27\n r2.nonresolvedWidgets = r8\n android.support.constraint.solver.Metrics r2 = android.support.constraint.solver.LinearSystem.sMetrics\n long r8 = r2.resolvedWidgets\n long r8 = r8 + r27\n r2.resolvedWidgets = r8\n android.support.constraint.solver.Metrics r2 = android.support.constraint.solver.LinearSystem.sMetrics\n long r8 = r2.chainConnectionResolved\n long r8 = r8 + r27\n r2.chainConnectionResolved = r8\n L_0x0301:\n android.support.constraint.solver.widgets.ConstraintWidget[] r2 = r11.mNextChainWidget\n r17 = r2[r1]\n if (r17 != 0) goto L_0x0309\n if (r11 != r4) goto L_0x0366\n L_0x0309:\n r2 = 0\n if (r1 != 0) goto L_0x0312\n int r6 = r11.getWidth()\n float r2 = (float) r6\n goto L_0x0317\n L_0x0312:\n int r6 = r11.getHeight()\n float r2 = (float) r6\n L_0x0317:\n android.support.constraint.solver.widgets.ConstraintAnchor[] r6 = r11.mListAnchors\n r6 = r6[r42]\n int r6 = r6.getMargin()\n float r6 = (float) r6\n float r6 = r23 + r6\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n r8 = r8[r42]\n android.support.constraint.solver.widgets.ResolutionAnchor r8 = r8.getResolutionNode()\n android.support.constraint.solver.widgets.ResolutionAnchor r9 = r10.resolvedTarget\n r8.resolve(r9, r6)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n int r9 = r42 + 1\n r8 = r8[r9]\n android.support.constraint.solver.widgets.ResolutionAnchor r8 = r8.getResolutionNode()\n android.support.constraint.solver.widgets.ResolutionAnchor r9 = r10.resolvedTarget\n float r14 = r6 + r2\n r8.resolve(r9, r14)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n r8 = r8[r42]\n android.support.constraint.solver.widgets.ResolutionAnchor r8 = r8.getResolutionNode()\n r8.addResolvedValue(r13)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n int r9 = r42 + 1\n r8 = r8[r9]\n android.support.constraint.solver.widgets.ResolutionAnchor r8 = r8.getResolutionNode()\n r8.addResolvedValue(r13)\n float r6 = r6 + r2\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n int r9 = r42 + 1\n r8 = r8[r9]\n int r8 = r8.getMargin()\n float r8 = (float) r8\n float r23 = r6 + r8\n L_0x0366:\n r11 = r17\n goto L_0x02e3\n L_0x036a:\n r37 = r7\n r38 = r34\n goto L_0x046f\n L_0x0370:\n if (r33 != 0) goto L_0x0374\n if (r22 == 0) goto L_0x036a\n L_0x0374:\n if (r33 == 0) goto L_0x0379\n float r23 = r23 - r0\n goto L_0x037d\n L_0x0379:\n if (r22 == 0) goto L_0x037d\n float r23 = r23 - r0\n L_0x037d:\n r2 = r3\n int r9 = r34 + 1\n float r6 = (float) r9\n float r6 = r23 / r6\n if (r22 == 0) goto L_0x0395\n r8 = r34\n r9 = 1\n if (r8 <= r9) goto L_0x0390\n int r9 = r8 + -1\n float r9 = (float) r9\n float r6 = r23 / r9\n goto L_0x0397\n L_0x0390:\n r9 = 1073741824(0x40000000, float:2.0)\n float r6 = r23 / r9\n goto L_0x0397\n L_0x0395:\n r8 = r34\n L_0x0397:\n r9 = r36\n int r11 = r3.getVisibility()\n r14 = 8\n if (r11 == r14) goto L_0x03a2\n float r9 = r9 + r6\n L_0x03a2:\n if (r22 == 0) goto L_0x03b2\n r11 = 1\n if (r8 <= r11) goto L_0x03b2\n android.support.constraint.solver.widgets.ConstraintAnchor[] r11 = r5.mListAnchors\n r11 = r11[r42]\n int r11 = r11.getMargin()\n float r11 = (float) r11\n float r9 = r36 + r11\n L_0x03b2:\n if (r33 == 0) goto L_0x03c0\n if (r5 == 0) goto L_0x03c0\n android.support.constraint.solver.widgets.ConstraintAnchor[] r11 = r5.mListAnchors\n r11 = r11[r42]\n int r11 = r11.getMargin()\n float r11 = (float) r11\n float r9 = r9 + r11\n L_0x03c0:\n r11 = r2\n r23 = r9\n L_0x03c3:\n if (r11 == 0) goto L_0x046b\n android.support.constraint.solver.Metrics r2 = android.support.constraint.solver.LinearSystem.sMetrics\n if (r2 == 0) goto L_0x03e6\n android.support.constraint.solver.Metrics r2 = android.support.constraint.solver.LinearSystem.sMetrics\n r37 = r7\n r38 = r8\n long r7 = r2.nonresolvedWidgets\n long r7 = r7 - r27\n r2.nonresolvedWidgets = r7\n android.support.constraint.solver.Metrics r2 = android.support.constraint.solver.LinearSystem.sMetrics\n long r7 = r2.resolvedWidgets\n long r7 = r7 + r27\n r2.resolvedWidgets = r7\n android.support.constraint.solver.Metrics r2 = android.support.constraint.solver.LinearSystem.sMetrics\n long r7 = r2.chainConnectionResolved\n long r7 = r7 + r27\n r2.chainConnectionResolved = r7\n goto L_0x03ea\n L_0x03e6:\n r37 = r7\n r38 = r8\n L_0x03ea:\n android.support.constraint.solver.widgets.ConstraintWidget[] r2 = r11.mNextChainWidget\n r17 = r2[r1]\n if (r17 != 0) goto L_0x03f6\n if (r11 != r4) goto L_0x03f3\n goto L_0x03f6\n L_0x03f3:\n r8 = 8\n goto L_0x0463\n L_0x03f6:\n r2 = 0\n if (r1 != 0) goto L_0x03ff\n int r7 = r11.getWidth()\n float r2 = (float) r7\n goto L_0x0404\n L_0x03ff:\n int r7 = r11.getHeight()\n float r2 = (float) r7\n L_0x0404:\n if (r11 == r5) goto L_0x0411\n android.support.constraint.solver.widgets.ConstraintAnchor[] r7 = r11.mListAnchors\n r7 = r7[r42]\n int r7 = r7.getMargin()\n float r7 = (float) r7\n float r23 = r23 + r7\n L_0x0411:\n r7 = r23\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n r8 = r8[r42]\n android.support.constraint.solver.widgets.ResolutionAnchor r8 = r8.getResolutionNode()\n android.support.constraint.solver.widgets.ResolutionAnchor r9 = r10.resolvedTarget\n r8.resolve(r9, r7)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n int r9 = r42 + 1\n r8 = r8[r9]\n android.support.constraint.solver.widgets.ResolutionAnchor r8 = r8.getResolutionNode()\n android.support.constraint.solver.widgets.ResolutionAnchor r9 = r10.resolvedTarget\n float r14 = r7 + r2\n r8.resolve(r9, r14)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n r8 = r8[r42]\n android.support.constraint.solver.widgets.ResolutionAnchor r8 = r8.getResolutionNode()\n r8.addResolvedValue(r13)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n int r9 = r42 + 1\n r8 = r8[r9]\n android.support.constraint.solver.widgets.ResolutionAnchor r8 = r8.getResolutionNode()\n r8.addResolvedValue(r13)\n android.support.constraint.solver.widgets.ConstraintAnchor[] r8 = r11.mListAnchors\n int r9 = r42 + 1\n r8 = r8[r9]\n int r8 = r8.getMargin()\n float r8 = (float) r8\n float r8 = r8 + r2\n float r23 = r7 + r8\n if (r17 == 0) goto L_0x03f3\n int r7 = r17.getVisibility()\n r8 = 8\n if (r7 == r8) goto L_0x0463\n float r23 = r23 + r6\n L_0x0463:\n r11 = r17\n r7 = r37\n r8 = r38\n goto L_0x03c3\n L_0x046b:\n r37 = r7\n r38 = r8\n L_0x046f:\n r2 = 1\n return r2\n L_0x0471:\n r30 = r2\n r32 = r6\n r37 = r7\n r33 = r8\n r38 = r9\n r35 = r13\n r13 = r40\n L_0x047f:\n return r16\n L_0x0480:\n r30 = r2\n r32 = r6\n r37 = r7\n r33 = r8\n r38 = r9\n r35 = r13\n r13 = r0\n L_0x048d:\n return r16\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.support.constraint.solver.widgets.Optimizer.applyChainOptimized(android.support.constraint.solver.widgets.ConstraintWidgetContainer, android.support.constraint.solver.LinearSystem, int, int, android.support.constraint.solver.widgets.ChainHead):boolean\");\n }", "private boolean needsToRecalcStats() {\n\n return this.equipsChanged;\n }", "float getCostReduction();", "private void validation(Solution sol) {\n List<Route> routes = sol.getRoutes();\n double totalDist = 0;\n double totalPenalty = 0;\n for (Route route : routes) {\n double dist = 0;\n double penalty = 0;\n double time = 0;\n double load = 0;\n List<Node> routeNodes = route.getNodes();\n for (int i = 1; i < routeNodes.size(); i++) {\n Node prevNode = routeNodes.get(i - 1);\n Node node = routeNodes.get(i);\n load += node.getq();\n if (!Utils.doubleEqual(node.getQ(), load)) throw new IllegalArgumentException(\"Wrong with load.\");\n if (load < 0 || load > route.getVehicle().getCapacity()) throw new IllegalArgumentException(\"Load Violation.\");\n time = Math.max(node.getTw1(), prevNode.gets() + time + Utils.calculateDistance(prevNode, node));\n if (node.getMembership() == 1 && time > node.getTw2()) throw new IllegalArgumentException(\"Time window violation.\");\n if (!Utils.doubleEqual(time, node.getT())) throw new IllegalArgumentException(\"Wrong with time.\");\n double tempPenalty = Math.max(0, time - node.getTw2());\n if (!Utils.doubleEqual(tempPenalty, node.getDL())) throw new IllegalArgumentException(\"Wrong penalty\");\n penalty += tempPenalty;\n dist += Utils.calculateDistance(prevNode, node);\n }\n if (!Utils.doubleEqual(dist, route.getDist())) throw new IllegalArgumentException(\"Wrong route distance\");\n// System.out.println(penalty + \" \" + route.getPenalty());\n if (!Utils.doubleEqual(penalty, route.getPenalty())) throw new IllegalArgumentException(\"Wrong route penalty\");\n totalDist += dist;\n totalPenalty += penalty;\n }\n if (!Utils.doubleEqual(totalDist, sol.getTotalDist())) throw new IllegalArgumentException(\"Wrong solution distance\");\n if (!Utils.doubleEqual(totalPenalty, sol.getTotalPenalty())) throw new IllegalArgumentException(\"Wrong solution penalty\");\n }", "public boolean checkChangeDetection() throws Exception{\n\t\t\tint length = -1 ;\n\t\t\tFuzzyRule ruleRemove = null ;\n\t\t\tfor (FuzzyRule rule: rs){\n\t\t\t\tif (rule.getChangeStatus()){\n\t\t\t\t\tif (rule.getHistory().size()>length){\n\t\t\t\t\t\tlength = rule.getHistory().size() ;\n\t\t\t\t\t\tif (rule!=defaultRule)\n\t\t\t\t\t\t\truleRemove = rule ;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tboolean drift = false ;\n\t\t\tif (ruleRemove!=null && rs.size()>1){\n\t\t\t\tif (chooseSingleRuleOption.isSet()) {\n\t\t\t\t\trs.remove(ruleRemove) ;\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tfor (FuzzyRule rule: rs){ \n\t\t\t\t\t\tif (rule!=ruleRemove){\n\t\t\t\t\t\t\tboolean tempDrift = rule.mergeWithSibling(ruleRemove) ;\n\t\t\t\t\t\t\tif (tempDrift){\n\t\t\t\t\t\t\t\trule.clearExtendedCandidates();\n\t\t\t\t\t\t\t\trule.clearStats();\n\t\t\t\t\t\t\t\trule.buildExtendedCandidates();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t drift = drift || tempDrift ;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\trs.remove(ruleRemove) ;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\treturn drift ;\n\t\t}", "public boolean checkRules() {\n for (Rule rule: rules) {\n if (! rule.checkRegel(board)) { //problem with a rule\n return false;\n }\n }\n return true;\n }", "protected void adjustToolForMode() {\n if(!staticOptimizationMode) return;\n // Check if have non-inverse dynamics analyses, or multiple inverse dynamics analyses\n boolean foundOtherAnalysis = false;\n boolean advancedSettings = false;\n int numFoundAnalyses = 0;\n InverseDynamics inverseDynamicsAnalysis = null;\n int numStaticOptimizationAnalyses = 0;\n StaticOptimization staticOptimizationAnalysis = null;\n if (false){\n // Since we're not using the model's actuator set, clear the actuator set related fields\n analyzeTool().setReplaceForceSet(true);\n analyzeTool().getForceSetFiles().setSize(0);\n // Mode is either InverseDynamics or StaticOptimization\n for(int i=analyzeTool().getAnalysisSet().getSize()-1; i>=0; i--) {\n Analysis analysis = analyzeTool().getAnalysisSet().get(i);\n //System.out.println(\" PROCESSING ANALYSIS \"+analysis.getType()+\",\"+analysis.getName());\n if(InverseDynamics.safeDownCast(analysis)==null) {\n foundOtherAnalysis = true;\n analyzeTool().getAnalysisSet().remove(i);\n } else{\n numFoundAnalyses++;\n if(numFoundAnalyses==1) {\n inverseDynamicsAnalysis = InverseDynamics.safeDownCast(analysis);\n if(inverseDynamicsAnalysis.getUseModelForceSet() || !inverseDynamicsAnalysis.getOn())\n advancedSettings = true;\n } else {\n analyzeTool().getAnalysisSet().remove(i);\n }\n }\n }\n if(inverseDynamicsAnalysis==null) {\n inverseDynamicsAnalysis = InverseDynamics.safeDownCast(new InverseDynamics().clone());\n setAnalysisTimeFromTool(inverseDynamicsAnalysis);\n //analyzeTool().addAnalysis(inverseDynamicsAnalysis);\n }\n inverseDynamicsAnalysis.setOn(true);\n inverseDynamicsAnalysis.setUseModelForceSet(false);\n \n }\n else { // StaticOptimization assumed\n // Mode is StaticOptimization\n for(int i=analyzeTool().getAnalysisSet().getSize()-1; i>=0; i--) {\n Analysis analysis = analyzeTool().getAnalysisSet().get(i);\n //System.out.println(\" PROCESSING ANALYSIS \"+analysis.getType()+\",\"+analysis.getName());\n if(StaticOptimization.safeDownCast(analysis)==null) {\n foundOtherAnalysis = true;\n analyzeTool().getAnalysisSet().remove(i);\n } else{\n numFoundAnalyses++;\n if(numFoundAnalyses==1) {\n staticOptimizationAnalysis = StaticOptimization.safeDownCast(analysis);\n //if(staticOptimizationAnalysis.getUseModelActuatorSet() || !staticOptimizationAnalysis.getOn())\n // advancedSettings = true;\n } else {\n analyzeTool().getAnalysisSet().remove(i);\n }\n }\n }\n if(staticOptimizationAnalysis==null) {\n staticOptimizationAnalysis = new StaticOptimization(); \n analyzeTool().getAnalysisSet().setMemoryOwner(false);\n analyzeTool().getAnalysisSet().cloneAndAppend(staticOptimizationAnalysis);\n staticOptimizationAnalysis = StaticOptimization.safeDownCast(\n analyzeTool().getAnalysisSet().get(\"StaticOptimization\"));\n }\n staticOptimizationAnalysis.setOn(true);\n staticOptimizationAnalysis.setUseModelForceSet(true);\n analyzeTool().setReplaceForceSet(false);\n }\n if(foundOtherAnalysis || advancedSettings || numFoundAnalyses>1) {\n String message = \"\";\n if(foundOtherAnalysis) message = \"Settings file contained analyses other than requested. The tool will ignore these.\\n\";\n if(numFoundAnalyses>1) message += \"More than one analysis was found. Extras will be ignored.\\n\";\n if(advancedSettings) message += \"Settings file contained an analysis with advanced settings which will be ignored by the tool.\\n\";\n message += \"Please use the analyze tool if you wish to handle different analysis types and advanced analysis settings.\\n\";\n DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(message, NotifyDescriptor.WARNING_MESSAGE));\n }\n }", "private boolean journalRebuildRequired() {\n\t\tfinal int REDUNDANT_OP_COMPACT_THRESHOLD = 2000;\n\t\treturn redundantOpCount >= REDUNDANT_OP_COMPACT_THRESHOLD\n\t\t\t&& redundantOpCount >= lruEntries.size();\n\t}", "@NotNull\n @Generated\n @Selector(\"needRulesVerdict\")\n public static native NEFilterNewFlowVerdict needRulesVerdict();", "public double[] runOptimizer() {\n List<Integer> sents = new ArrayList<Integer>();\n for(int i=0; i<sentNum; i++)\n sents.add(i);\n \n if(needShuffle)\n Collections.shuffle(sents);\n \n double oraMetric, oraScore, predMetric, predScore;\n double[] oraPredScore = new double[4];\n double eta = 1.0; //learning rate, will not be changed if run percep\n double avgEta = 0; //average eta, just for analysis\n double loss = 0;\n double featNorm = 0;\n double featDiffVal;\n double sumMetricScore = 0;\n double sumModelScore = 0;\n String oraFeat = \"\";\n String predFeat = \"\";\n String[] oraPredFeat = new String[2];\n String[] vecOraFeat;\n String[] vecPredFeat;\n String[] featInfo;\n boolean first = true;\n //int processedSent = 0;\n Iterator it;\n Integer diffFeatId;\n double[] avgLambda = new double[initialLambda.length]; //only needed if averaging is required\n for(int i=0; i<initialLambda.length; i++)\n avgLambda[i] = 0.0;\n\n //update weights\n for(Integer s : sents) {\n //find out oracle and prediction\n if(first)\n findOraPred(s, oraPredScore, oraPredFeat, initialLambda, featScale);\n else\n findOraPred(s, oraPredScore, oraPredFeat, finalLambda, featScale);\n \n //the model scores here are already scaled in findOraPred\n oraMetric = oraPredScore[0];\n oraScore = oraPredScore[1];\n predMetric = oraPredScore[2];\n predScore = oraPredScore[3];\n oraFeat = oraPredFeat[0];\n predFeat = oraPredFeat[1];\n \n //update the scale\n if(needScale) { //otherwise featscale remains 1.0\n sumMetricScore += java.lang.Math.abs(oraMetric+predMetric);\n sumModelScore += java.lang.Math.abs(oraScore+predScore)/featScale; //restore the original model score\n \n if(sumModelScore/sumMetricScore > scoreRatio)\n featScale = sumMetricScore/sumModelScore;\n\n /* a different scaling strategy \n if( (1.0*processedSent/sentNum) < sentForScale ) { //still need to scale\n double newFeatScale = java.lang.Math.abs(scoreRatio*sumMetricDiff / sumModelDiff); //to make sure modelScore*featScale/metricScore = scoreRatio\n \n //update the scale only when difference is significant\n if( java.lang.Math.abs(newFeatScale-featScale)/featScale > 0.2 )\n featScale = newFeatScale;\n }*/\n }\n// processedSent++;\n\n HashMap<Integer, Double> allOraFeat = new HashMap<Integer, Double>();\n HashMap<Integer, Double> allPredFeat = new HashMap<Integer, Double>();\n HashMap<Integer, Double> featDiff = new HashMap<Integer, Double>();\n\n vecOraFeat = oraFeat.split(\"\\\\s+\");\n vecPredFeat = predFeat.split(\"\\\\s+\");\n \n for (int i = 0; i < vecOraFeat.length; i++) {\n featInfo = vecOraFeat[i].split(\":\");\n diffFeatId = Integer.parseInt(featInfo[0]);\n allOraFeat.put(diffFeatId, Double.parseDouble(featInfo[1]));\n featDiff.put(diffFeatId, Double.parseDouble(featInfo[1]));\n }\n\n for (int i = 0; i < vecPredFeat.length; i++) {\n featInfo = vecPredFeat[i].split(\":\");\n diffFeatId = Integer.parseInt(featInfo[0]);\n allPredFeat.put(diffFeatId, Double.parseDouble(featInfo[1]));\n\n if (featDiff.containsKey(diffFeatId)) //overlapping features\n featDiff.put(diffFeatId, featDiff.get(diffFeatId)-Double.parseDouble(featInfo[1]));\n else //features only firing in the 2nd feature vector\n featDiff.put(diffFeatId, -1.0*Double.parseDouble(featInfo[1]));\n }\n\n if(!runPercep) { //otherwise eta=1.0\n featNorm = 0;\n\n Collection<Double> allDiff = featDiff.values();\n for(it =allDiff.iterator(); it.hasNext();) {\n featDiffVal = (Double) it.next();\n featNorm += featDiffVal*featDiffVal;\n }\n \n //a few sanity checks\n if(! evalMetric.getToBeMinimized()) {\n if(oraSelectMode==1 && predSelectMode==1) { //\"hope-fear\" selection\n /* ora_score+ora_metric > pred_score+pred_metric\n * pred_score-pred_metric > ora_score-ora_metric\n * => ora_metric > pred_metric */\n if(oraMetric+1e-10 < predMetric) {\n System.err.println(\"WARNING: for hope-fear selection, oracle metric score must be greater than prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n if(oraSelectMode==2 || predSelectMode==3) {\n if(oraMetric+1e-10 < predMetric) {\n System.err.println(\"WARNING: for max-metric oracle selection or min-metric prediction selection, the oracle metric \" +\n \t\t\"score must be greater than the prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n } else {\n if(oraSelectMode==1 && predSelectMode==1) { //\"hope-fear\" selection\n /* ora_score-ora_metric > pred_score-pred_metric\n * pred_score+pred_metric > ora_score+ora_metric\n * => ora_metric < pred_metric */\n if(oraMetric-1e-10 > predMetric) {\n System.err.println(\"WARNING: for hope-fear selection, oracle metric score must be smaller than prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n if(oraSelectMode==2 || predSelectMode==3) {\n if(oraMetric-1e-10 > predMetric) {\n System.err.println(\"WARNING: for min-metric oracle selection or max-metric prediction selection, the oracle metric \" +\n \"score must be smaller than the prediction metric score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n }\n \n if(predSelectMode==2) {\n if(predScore+1e-10 < oraScore) {\n System.err.println(\"WARNING: for max-model prediction selection, the prediction model score must be greater than oracle model score!\");\n System.err.println(\"Something is wrong!\");\n }\n }\n \n //cost - margin\n //remember the model scores here are already scaled\n loss = evalMetric.getToBeMinimized() ? //cost should always be non-negative \n (predMetric-oraMetric) - (oraScore-predScore)/featScale: \n (oraMetric-predMetric) - (oraScore-predScore)/featScale;\n \n if(loss<0)\n loss = 0;\n\n if(loss == 0)\n eta = 0;\n else\n //eta = C < loss/(featNorm*featScale*featScale) ? C : loss/(featNorm*featScale*featScale); //feat vector not scaled before\n eta = C < loss/(featNorm) ? C : loss/(featNorm); //feat vector not scaled before\n }\n \n avgEta += eta;\n\n Set<Integer> diffFeatSet = featDiff.keySet();\n it = diffFeatSet.iterator();\n\n if(first) {\n first = false;\n \n if(eta!=0) {\n while(it.hasNext()) {\n diffFeatId = (Integer)it.next();\n finalLambda[diffFeatId] = initialLambda[diffFeatId] + eta*featDiff.get(diffFeatId);\n }\n }\n }\n else {\n if(eta!=0) {\n while(it.hasNext()) {\n diffFeatId = (Integer)it.next();\n finalLambda[diffFeatId] = finalLambda[diffFeatId] + eta*featDiff.get(diffFeatId);\n }\n }\n }\n \n if(needAvg) {\n for(int i=0; i<avgLambda.length; i++)\n avgLambda[i] += finalLambda[i];\n }\n }\n \n if(needAvg) {\n for(int i=0; i<finalLambda.length; i++)\n finalLambda[i] = avgLambda[i]/sentNum;\n }\n \n avgEta /= sentNum;\n System.out.println(\"Average learning rate: \"+avgEta);\n\n // the intitialLambda & finalLambda are all trainable parameters\n //if (!trainMode.equals(\"3\")) // for mode 3, no need to normalize sparse\n // feature weights\n //normalizeLambda(finalLambda);\n //else\n //normalizeLambda_mode3(finalLambda);\n\n /*\n * for( int i=0; i<finalLambda.length; i++ ) System.out.print(finalLambda[i]+\" \");\n * System.out.println(); System.exit(0);\n */ \n\n double initMetricScore = computeCorpusMetricScore(initialLambda); // compute the initial corpus-level metric score\n double finalMetricScore = computeCorpusMetricScore(finalLambda); // compute final corpus-level metric score // the\n\n // prepare the printing info\n int numParamToPrint = 0;\n String result = \"\";\n\n if (trainMode.equals(\"1\") || trainMode.equals(\"4\")) {\n numParamToPrint = paramDim > 10 ? 10 : paramDim; // how many parameters\n // to print\n result = paramDim > 10 ? \"Final lambda(first 10): {\" : \"Final lambda: {\";\n\n for (int i = 1; i < numParamToPrint; i++)\n // in ZMERT finalLambda[0] is not used\n result += finalLambda[i] + \" \";\n } else {\n int sparseNumToPrint = 0;\n if (trainMode.equals(\"2\")) {\n result = \"Final lambda(regular feats + first 5 sparse feats): {\";\n for (int i = 1; i <= regParamDim; ++i)\n result += finalLambda[i] + \" \";\n\n result += \"||| \";\n\n sparseNumToPrint = 5 < (paramDim - regParamDim) ? 5 : (paramDim - regParamDim);\n\n for (int i = 1; i <= sparseNumToPrint; i++)\n result += finalLambda[regParamDim + i] + \" \";\n } else {\n result = \"Final lambda(first 10 sparse feats): {\";\n sparseNumToPrint = 10 < paramDim ? 10 : paramDim;\n\n for (int i = 1; i < sparseNumToPrint; i++)\n result += finalLambda[i] + \" \";\n }\n }\n\n output.add(result + finalLambda[numParamToPrint] + \"}\\n\" + \"Initial \"\n + evalMetric.get_metricName() + \": \" + initMetricScore + \"\\nFinal \"\n + evalMetric.get_metricName() + \": \" + finalMetricScore);\n\n // System.out.println(output);\n\n if (trainMode.equals(\"3\")) {\n // finalLambda = baseline(unchanged)+disc\n for (int i = 0; i < paramDim; i++)\n copyLambda[i + regParamDim + 1] = finalLambda[i];\n\n finalLambda = copyLambda;\n }\n\n return finalLambda;\n }", "public void optimize(){\n\n NfaState currState;\n HashMap<Integer, State> statesCloned = (HashMap)states.clone();\n\n\n boolean removed;\n\n for(Map.Entry<Integer, State> entry : statesCloned.entrySet()) {//for each state of the nfa\n\n do {\n removed=false;\n Integer id = entry.getKey();\n\n if (states.get(id) == null)//state already been removed\n continue;\n else\n currState = (NfaState) entry.getValue();\n\n HashMap<String, ArrayList<Integer>> startEdges = currState.getOut_edges();\n\n for (Map.Entry<String, ArrayList<Integer>> startEdge : startEdges.entrySet()) {//for each edge of the current state being optimezed\n\n ArrayList<Integer> transactions = new ArrayList(startEdge.getValue());\n\n\n for (Integer state2DegID : transactions) {// for each transaction the 2nd degree state\n NfaState stateDeg2 = (NfaState) states.get(state2DegID);\n\n if (stateDeg2.getOut_edges() == null)\n continue;\n\n\n\n ArrayList<Integer> edgesDeg2 = stateDeg2.getOut_edges().get(EPSILON);\n\n if (edgesDeg2 != null && edgesDeg2.size() == 1 && stateDeg2.getOut_edges().size() == 1) {//if the next state has only a epsilon transaction, we can remove this state\n NfaState successor = (NfaState) states.get(edgesDeg2.get(0));\n\n\n for (Map.Entry<String, ArrayList<Integer>> inEdgesDeg2 : stateDeg2.getIn_edges().entrySet()) {//for every in_edge of the state being removed, update the elements accordingly\n String key = inEdgesDeg2.getKey();\n\n if (inEdgesDeg2.getValue().size() > 0)\n removed = true;\n\n for (Integer stateBeingUpdatedId : inEdgesDeg2.getValue()) {//state to be updated\n NfaState stateBeingUpdated = (NfaState) states.get(stateBeingUpdatedId);\n //add new edge\n stateBeingUpdated.addEdge(key, successor);\n\n //remove out and in edge to intermediate\n stateBeingUpdated.getOut_edges().get(key).remove((Integer) stateDeg2.getId());\n }\n }\n\n //remove out_edges\n for (Map.Entry<String, ArrayList<Integer>> outEdgesDeg2 : stateDeg2.getOut_edges().entrySet()) {\n for (Integer sucId : outEdgesDeg2.getValue()){\n ((NfaState)states.get(sucId)).getIn_edges().get(outEdgesDeg2.getKey()).remove((Integer) stateDeg2.getId());\n }\n }\n //remove state\n states.remove(stateDeg2.getId());\n }\n }\n\n }\n\n }while (removed);\n }\n }", "@Override\n\t\tpublic boolean isValidSolution() {\n\t\t\treturn super.isValidSolution();\n\t\t}", "private void doOneUpdateStep(){\r\n SparseFractalSubTree target = null; //stores the tree which will receive the update\r\n for (int i = 0; i < subTrees.length - 1; i++) { //top tree never receives an update (reason for -1)\r\n SparseFractalSubTree subTree = subTrees[i];\r\n if (!subTree.hasStopped()) { //not permanently or temporary finished\r\n if (target != null) { //are we the first tree who can receive an update\r\n if ((subTree.getTailHeight() < target.getTailHeight())) { //are we a better candidate then the last one?\r\n target = subTree;\r\n }\r\n } else { //we are the first not finished subtree, so we receive the update if no better candidate is found\r\n target = subTree;\r\n }\r\n\r\n }\r\n }\r\n assert (target != null);\r\n assert (check(target)); //check all the assumptions\r\n\r\n measureDynamicSpace(); //measure\r\n\r\n target.updateTreeHashLow(); //apply a update to the target\r\n }", "boolean hasScoringParams();", "boolean getDoConstantFolding();", "@Override\n\tpublic boolean evaluar(Calculable cal) {\n\t\treturn false;\n\t}", "protected float computeModelScoreOnValidation() {\n/* 549 */ float score = computeModelScoreOnValidation(0, this.validationSamples.size() - 1);\n/* 550 */ return score / this.validationSamples.size();\n/* */ }", "@Override\r\n\tprotected void processCost() {\n\r\n\t}", "boolean addHardLoss();", "private boolean solutionChecker() {\n\t\t// TODO\n\t\treturn false;\n\n\t}", "private void filterAllRuleSetsForConfAndLift()\n\t{\n\t\truleCollection.forEach(lastRules->{\n\t\t\t\n\t\t\tif(!ListHelper.isNullOrEmpty(lastRules))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Current Filter Rule Size:\"+lastRules.get(0).getRuleSize());\n\t\t\t}\n\t\t\t\n\t\t\tIterator<RuleCompartment<T>> iter = lastRules.iterator();\n\t\t\t\n\t\t\twhile(iter.hasNext())\n\t\t\t{\n\t\t\t\tRuleCompartment<T> eachRule = iter.next();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tint ruleLength = eachRule.getRuleSize();\n\t\t\t\t\t\t\t\n\t\t\t\tif(ruleLength<config.getMinRuleLength())\n\t\t\t\t{\n\t\t\t\t\titer.remove();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble conf = eachRule.calculateConfidence(storage, evaluation);\n\t\t\t\t\n\t\t\t\tif(conf < config.minConf())\n\t\t\t\t{\n\t\t\t\t\titer.remove();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tif(config.minLift()>0)\n\t\t\t\t{\n\t\t\t\t\tdouble lift = eachRule.calculateLift(storage, evaluation);\n\t\t\t\t\t\n\t\t\t\t\tif(lift < config.minLift())\n\t\t\t\t\t{\n\t\t\t\t\t\titer.remove();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tpublic void processInstruction(ExecutionContext ec) {\n\t\tlong t1 = System.currentTimeMillis();\n\n\t\tSparkExecutionContext sec = (SparkExecutionContext) ec;\n\n\t\tCacheType type = _type;\n\t\tString rddVar = type.isRight() ? input1.getName() : input2.getName();\n\t\tString bcastVar = type.isRight() ? input2.getName() : input1.getName();\n\t\tString betterRddVar = rddVar + \"_filtered\";\n\t\tString betterBcastVar = bcastVar + \"_filtered\";\n\t\tMatrixCharacteristics mcRdd = sec.getMatrixCharacteristics(rddVar);\n\t\tMatrixCharacteristics mcBc = sec.getMatrixCharacteristics(bcastVar);\n\t\tboolean needRepartitionNow = needRepartitionNow(sec);\n\t\tboolean needFilterNow = needFilterNow(sec);\n\t\tString dVarName = null; // TODO added by czh 检查是否是dVar\n\t\tif (_needCache && DWhileStatement.isDWhileTmpVar(bcastVar)) {\n\t\t\tdVarName = DWhileStatement.getDVarNameFromTmpVar(bcastVar);\n\t\t\tSystem.out.println(\"in delta mapmm: \" + dVarName);\n\t\t} else if (_needCache) {\n\t\t\tdVarName = bcastVar;\n\t\t}\n\n\t\t// TODO added by czh\n\t\tif (rddVar.equals(\"G\")) {\n\t\t\tDWhileProgramBlock.midT2 = System.currentTimeMillis();\n\t\t}\n\n\t\t// TODO added by czh 删\n\t\t_outputEmpty = false;\n\n\t\t//get input rdd with preferred number of partitions to avoid unnecessary repartitionNonZeros\n\t\tJavaPairRDD<MatrixIndexes, MatrixBlock> in1;\n\t\tif (_needCache && (hasRepartitioned.contains(rddVar) || hasFiltered.contains(rddVar)) && !needRepartitionNow\n\t\t\t\t&& DWhileStatement.isDWhileTmpVar(bcastVar)) {\n\t\t\t// 在dwhile中, 做过repartition或filter且当前不需要repartition时取 betterRddVar\n\t\t\tin1 = sec.getBinaryBlockRDDHandleForVariable(betterRddVar,\n\t\t\t\t\t(requiresFlatMapFunction(type, mcBc) && requiresRepartitioning(\n\t\t\t\t\t\t\ttype, mcRdd, mcBc, sec.getSparkContext().defaultParallelism())) ?\n\t\t\t\t\t\t\tgetNumRepartitioning(type, mcRdd, mcBc) : -1, _outputEmpty);\n\t\t} else {\n\t\t\tin1 = sec.getBinaryBlockRDDHandleForVariable(rddVar,\n\t\t\t\t\t(requiresFlatMapFunction(type, mcBc) && requiresRepartitioning(\n\t\t\t\t\t\t\ttype, mcRdd, mcBc, sec.getSparkContext().defaultParallelism())) ?\n\t\t\t\t\t\t\tgetNumRepartitioning(type, mcRdd, mcBc) : -1, _outputEmpty);\n\t\t}\n\n\t\t//investigate if a repartitioning - including a potential flip of broadcast and rdd\n\t\t//inputs - is required to ensure moderately sized output partitions (2GB limitation)\n\t\tif (requiresFlatMapFunction(type, mcBc) && requiresRepartitioning(type, mcRdd, mcBc, in1.getNumPartitions())) {\n\t\t\tint numParts = getNumRepartitioning(type, mcRdd, mcBc);\n\t\t\tint numParts2 = getNumRepartitioning(type.getFlipped(), mcBc, mcRdd);\n\t\t\tif (numParts2 > numParts) { //flip required\n\t\t\t\ttype = type.getFlipped();\n\t\t\t\trddVar = type.isRight() ? input1.getName() : input2.getName();\n\t\t\t\tbcastVar = type.isRight() ? input2.getName() : input1.getName();\n\t\t\t\tmcRdd = sec.getMatrixCharacteristics(rddVar);\n\t\t\t\tmcBc = sec.getMatrixCharacteristics(bcastVar);\n\t\t\t\tin1 = sec.getBinaryBlockRDDHandleForVariable(rddVar);\n\t\t\t\tLOG.warn(\"Mapmm: Switching rdd ('\" + bcastVar + \"') and broadcast ('\" + rddVar + \"') inputs \"\n\t\t\t\t\t\t+ \"for repartitioning because this allows better control of output partition \"\n\t\t\t\t\t\t+ \"sizes (\" + numParts + \" < \" + numParts2 + \").\");\n\t\t\t}\n\t\t}\n\n\t\tif (_needCache && needRepartitionNow) {\n\t\t\tSystem.out.println(\"repartitioning... \" + bcastVar);\n\t\t\thasRepartitioned.add(rddVar);\n\n\t\t\t// repartitionNonZeros in2\n\t\t\tMatrixBlock in2Block = sec.getMatrixObject(bcastVar).acquireReadAndRelease();\n\n\t\t\tMatrixBlock newIn2Block = LibMatrixReorg.repartitionNonZerosWithEmpty(\n\t\t\t\t\tsec, in2Block, true, dVarName, in1.getNumPartitions(), mcRdd);\n\t\t\tif (!sec.containsVariable(betterBcastVar)) {\n\t\t\t\tsec.setVariable(betterBcastVar, new MatrixObject(sec.getMatrixObject(bcastVar)));\n\t\t\t}\n\t\t\tsec.cleanupBroadcastByDWhile(sec.getMatrixObject(betterBcastVar));\n\t\t\tsec.setMatrixOutput(betterBcastVar, newIn2Block);\n\n\t\t\t// repartitionNonZeros in1\n\t\t\tString orderName = DWhileStatement.getRepartitionOrderName(dVarName);\n\t\t\tPartitionedBroadcast<MatrixBlock> order = sec.getBroadcastForVariable(orderName);\n\t\t\tin1 = in1.mapPartitionsToPair(new RepartitionMapFunction(order));\n\t\t\tif (!sec.containsVariable(betterRddVar)) {\n\t\t\t\tsec.setVariable(betterRddVar, new MatrixObject(sec.getMatrixObject(rddVar)));\n\t\t\t}\n\t\t\tsec.getMatrixCharacteristics(betterRddVar).setCols(newIn2Block.getNumRows());\n\t\t\tin1 = sec.persistRdd(rddVar, in1, MEMORY_AND_DISK);\n\t\t\tsec.setRDDHandleForVariable(betterRddVar, in1);\n\t\t\tsec.addLineageBroadcast(betterRddVar, orderName);\n\n\t\t\tSystem.out.println(\" done\");\n\n\t\t} else if (_needCache && hasRepartitioned.contains(rddVar) && DWhileStatement.isDWhileTmpVar(bcastVar)) {\n\t\t\t// 若在之前的迭代已repartition in1, 则调整 in2 顺序\n\t\t\tMatrixBlock in2Block = sec.getMatrixObject(bcastVar).acquireReadAndRelease();\n\t\t\tMatrixBlock newIn2Block =\n\t\t\t\t\tLibMatrixReorg.repartitionByOrderWithEmpty(sec, in2Block, new MatrixBlock(), true, dVarName);\n\n\t\t\tint selectSum = Arrays.stream(newIn2Block.getSelectBlock().getData()).sum();\n\t\t\tif (selectSum == 0) {\n\t\t\t\tupdateBinaryMMOutputMatrixCharacteristics(sec, true);\n\t\t\t\tMatrixCharacteristics outputMc = sec.getMatrixCharacteristics(output.getName());\n\t\t\t\tsec.setMatrixOutput(output.getName(),\n\t\t\t\t\t\tnew MatrixBlock((int) outputMc.getRows(), (int) outputMc.getCols(), true), getExtendedOpcode());\n\n\t\t\t\t// TODO added by czh debug\n\t\t\t\tlong t2 = System.currentTimeMillis();\n\t\t\t\tSystem.out.println(\"skip mapmm \" + bcastVar + \" time: \" + (t2 - t1) / 1000.0);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t\tif (!ec.containsVariable(betterBcastVar)) {\n\t\t\t\tMatrixObject mb = new MatrixObject(sec.getMatrixObject(bcastVar));\n\t\t\t\tec.setVariable(betterBcastVar, mb);\n\t\t\t}\n\t\t\tsec.unpersistBroadcastByDWhile(sec.getMatrixObject(betterBcastVar));\n\t\t\tsec.setMatrixOutput(betterBcastVar, newIn2Block);\n\n\t\t} else if (_needCache && DWhileStatement.isDWhileTmpVar(bcastVar)) {\n\t\t\t// 设置 in2.selectBlock\n\t\t\tMatrixBlock in2Block = sec.getMatrixObject(bcastVar).acquireReadAndRelease();\n\t\t\tString selectName = DWhileStatement.getSelectName(dVarName);\n\t\t\tMatrixBlock select = sec.getMatrixObject(selectName).acquireReadAndRelease();\n\t\t\tfloat blockSize = OptimizerUtils.DEFAULT_BLOCKSIZE;\n\t\t\tint brlen = (int) Math.ceil(in2Block.getNumRows() / blockSize);\n//\t\t\tFilterBlock selectBlock = sec.getMatrixObject(selectName).acquireReadAndRelease().getFilterBlock();\n\n\t\t\tFilterBlock selectBlock = new FilterBlock(brlen, 1);\n\t\t\tselectBlock.initData();\n\t\t\tfor (int bi = 0; bi < brlen; bi++) {\n\t\t\t\tboolean flag = false;\n\t\t\t\tfor (int i = (int) (bi * blockSize); i < (bi + 1) * blockSize && i < in2Block.getNumRows(); i++) {\n\t\t\t\t\tif (select.getValue(i, 0) != 0) {\n\t\t\t\t\t\tflag = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) {\n\t\t\t\t\tselectBlock.setData(bi, 0, 1);\n\t\t\t\t} else {\n\t\t\t\t\tselectBlock.setData(bi, 0, 0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint selectSum = Arrays.stream(selectBlock.getData()).sum();\n\t\t\tif (selectSum == 0) {\n\t\t\t\tupdateBinaryMMOutputMatrixCharacteristics(sec, true);\n\t\t\t\tMatrixCharacteristics outputMc = sec.getMatrixCharacteristics(output.getName());\n\t\t\t\tsec.setMatrixOutput(output.getName(),\n\t\t\t\t\t\tnew MatrixBlock((int) outputMc.getRows(), (int) outputMc.getCols(), true), getExtendedOpcode());\n\n\t\t\t\t// TODO added by czh debug\n\t\t\t\tlong t2 = System.currentTimeMillis();\n\t\t\t\tSystem.out.println(\"skip mapmm \" + bcastVar + \" time: \" + (t2 - t1) / 1000.0);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tin2Block.setSelectBlock(selectBlock);\n\t\t\tsec.setMatrixOutput(bcastVar, in2Block);\n\t\t}\n\n\t\t//get inputs\n\t\tif (_needCache && hasRepartitioned.contains(rddVar) && DWhileStatement.isDWhileTmpVar(bcastVar)) {\n\t\t\tbcastVar = betterBcastVar;\n\t\t}\n\t\tPartitionedBroadcast<MatrixBlock> in2 = sec.getBroadcastForVariable(bcastVar);\n\n\t\t//empty input block filter\n\t\tif (!_outputEmpty)\n\t\t\tin1 = in1.filter(new FilterNonEmptyBlocksFunction());\n\n\t\tif (needFilterNow) {\n\t\t\tSystem.out.print(\"filtering... \" + bcastVar);\n\t\t\thasFiltered.add(rddVar);\n\n\t\t\tin1 = in1.filter(new FilterNonEmptyBlocksFunction());\n\t\t\tsec.persistRdd(rddVar, in1, StorageLevels.MEMORY_AND_DISK);\n\t\t\tif (!sec.containsVariable(betterRddVar)) {\n\t\t\t\tsec.setVariable(betterRddVar, new MatrixObject(sec.getMatrixObject(rddVar)));\n\t\t\t}\n\t\t\tsec.setRDDHandleForVariable(betterRddVar, in1);\n\t\t\tsec.addLineageBroadcast(betterRddVar, bcastVar);\n\t\t\tif (hasRepartitioned.contains(rddVar) && DWhileStatement.isDWhileTmpVar(bcastVar)) {\n\t\t\t\tsec.addLineageBroadcast(betterRddVar, DWhileStatement.getRepartitionOrderName(dVarName));\n\t\t\t}\n\n\t\t\tSystem.out.println(\" done\");\n\t\t}\n\n\t\t//execute mapmm and aggregation if necessary and put output into symbol table\n\t\tif (_aggtype == SparkAggType.SINGLE_BLOCK) {\n\t\t\tJavaRDD<MatrixBlock> out = in1.map(new RDDMapMMFunction2(type, in2));\n\t\t\tMatrixBlock out2 = RDDAggregateUtils.sumStable(out);\n\n\t\t\t//put output block into symbol table (no lineage because single block)\n\t\t\t//this also includes implicit maintenance of matrix characteristics\n\t\t\tsec.setMatrixOutput(output.getName(), out2, getExtendedOpcode());\n\n\t\t} else { //MULTI_BLOCK or NONE\n\t\t\tJavaPairRDD<MatrixIndexes, MatrixBlock> out;\n\t\t\tif (requiresFlatMapFunction(type, mcBc)) {\n\t\t\t\tif (requiresRepartitioning(type, mcRdd, mcBc, in1.getNumPartitions())) {\n\t\t\t\t\tint numParts = getNumRepartitioning(type, mcRdd, mcBc);\n\t\t\t\t\tLOG.warn(\"Mapmm: Repartition input rdd '\" + rddVar + \"' from \" + in1.getNumPartitions() + \" to \"\n\t\t\t\t\t\t\t+ numParts + \" partitions to satisfy size restrictions of output partitions.\");\n\t\t\t\t\tin1 = in1.repartition(numParts);\n\t\t\t\t}\n\t\t\t\tout = in1.flatMapToPair(new RDDFlatMapMMFunction(type, in2));\n\t\t\t} else if (preservesPartitioning(mcRdd, type))\n\t\t\t\tout = in1.mapPartitionsToPair(new RDDMapMMPartitionFunction(type, in2), true);\n\t\t\telse\n\t\t\t\tout = in1.mapToPair(new RDDMapMMFunction(type, in2));\n\n\t\t\t//empty output block filter\n\t\t\tif (!_outputEmpty)\n\t\t\t\tout = out.filter(new FilterNonEmptyBlocksFunction());\n\n\t\t\tif (_aggtype == SparkAggType.MULTI_BLOCK)\n\t\t\t\tout = RDDAggregateUtils.sumByKeyStable(out, false);\n\n\t\t\t//put output RDD handle into symbol table\n\t\t\tsec.setRDDHandleForVariable(output.getName(), out);\n\t\t\tsec.addLineageRDD(output.getName(), rddVar);\n\t\t\tsec.addLineageBroadcast(output.getName(), bcastVar);\n\n\t\t\tif (needRepartitionNow || needFilterNow) {\n\t\t\t\tsec.unpersistRdd(rddVar);\n\t\t\t}\n\n\t\t\t//update output statistics if not inferred\n\t\t\tupdateBinaryMMOutputMatrixCharacteristics(sec, true);\n\t\t}\n\n\t\t// TODO added by czh debug\n\t\tsec.getMatrixInput(output.getName());\n\t\tsec.releaseMatrixInput(output.getName());\n\t\tlong t2 = System.currentTimeMillis();\n\t\tSystem.out.println(\"mapmm \" + bcastVar + \" time: \" + (t2 - t1) / 1000.0);\n\n\t\t// TODO added by czh\n\t\tif (rddVar.equals(\"TG\")) {\n\t\t\tDWhileProgramBlock.midT1 = System.currentTimeMillis();\n\t\t}\n\t}", "public boolean runSolver()\n {\n Variable current = getUnassignedVar();\n\n if (current == null)\n {\n return true;\n }\n\n for (int i = 0; i < current.getDomain().size(); i++)\n {\n List<Integer> oldDomain = current.getDomain();\n int newval = oldDomain.get(i);\n current.setValue(newval);\n current.setDomain(i);\n\n if (constraintsSatisfied(constraintsWithAnyVals()))\n {\n if (runSolver())\n {\n return true;\n }\n }\n\n current.setDomain(oldDomain);\n current.setValue(current.getPrevious()); \n }\n return false;\n }", "public void doElimination() {\n IR ir;\n\tIR defCode;\n\tIR useCode;\n int i, j, countOperand;\n JavaVariable v1, v2;\n short shortOpcode;\n short shortOpcode2;\n boolean singleDefCondition;\n BitSet[] reachingDef = cfg.getReachingDef();\n\n Iterator it = cfg.iterator();\n\twhile(it.hasNext()) {\n ir = (IR) it.next();\n //System.out.println(ir);\n countOperand = ir.getNumOfOperands();\n if (ir.hasAttribute(IRAttribute.ELIMINATED)) {\n // Removed code can't remove other code\n continue; \n }\n // eliminate single def. single use. (aload)\n for (i = 0; i < countOperand; i++) {\n if (ir.getNumOfDefs(i) ==1 && ir.getShortOpcode() != OpcodeConst.opc_areturn) { // single def\n defCode = cfg.getIRAtBpc (ir.getDefOfOperand(i, 0));\n if (defCode.hasAttribute(IRAttribute.ELIMINATED)) {\n // Eliminated code can't remove other codes\n continue;\n } \n\t shortOpcode= defCode.getShortOpcode();\n if (shortOpcode == OpcodeConst.opc_aload ||\n (shortOpcode >= OpcodeConst.opc_aload_0 && shortOpcode <= OpcodeConst.opc_aload_3)) {\n singleDefCondition = false;\n for (j = 0; j < defCode.getNumOfUses(0); j++) {\n singleDefCondition = true;\n // if the def is the only def for every the uses it can reach\n useCode = cfg.getIRAtBpc(defCode.getUseOfTarget(0, j));\n if (useCode.getNumOfDefs(defCode.getTarget(0)) != 1) {\n singleDefCondition = false;\n break;\n }\n if (cfg.getIRAtBpc(useCode.getDefOfOperand(defCode.getTarget(0), 0)).compareTo(defCode) != 0) {\n singleDefCondition = false;\n break;\n }\n // For dup\n // The Reaching Def of the operand of the copy and the Reaching Def of the operand of the useCode\n // should be the same.\n int reachToCopyCode, reachToUseCode;\n reachToCopyCode = getUniqueReachOfVariable(reachingDef[defCode.getBpc()], defCode.getOperand(0));\n reachToUseCode = getUniqueReachOfVariable(reachingDef[useCode.getBpc()], defCode.getOperand(0));\n if (reachToCopyCode != reachToUseCode) {\n singleDefCondition = false;\n break;\n }\n }\n if (singleDefCondition == true) {\n for (j = 0; j < defCode.getNumOfUses(0); j++) {\n useCode = cfg.getIRAtBpc(defCode.getUseOfTarget(0, j));\n if (useCode.hasAttribute(IRAttribute.ELIMINATED) \n /*|| defCode.hasAttribute(IRAttribute.ELIMINATED)*/) {\n continue;\n }\n //System.out.println(\"useCode:\" + useCode + \" defCode:\" + defCode);\n //System.out.println(\"Try to change usecode's operand from \" + defCode.getTarget(0) +\n // \" to \" + defCode.getOperand(0));\n useCode.changeOperand(defCode.getTarget(0), defCode.getOperand(0));\n defCode.setAttribute(IRAttribute.ELIMINATED);\n defCode.addDebugInfoString(\"Eliminated by BPC:\" + ir.getBpc());\n }\n }\n }\n }\n }\n\n // elimination of single use. single def. (astore)\n if (ir.getNumOfTargets() == 1) {\n if (ir.getNumOfUses(0) == 1) {\n v1 = ir.getTarget(0);\n useCode = cfg.getIRAtBpc(ir.getUseOfTarget(0, 0));\n if (useCode.hasAttribute(IRAttribute.ELIMINATED)) {\n // Removed code can't remove other code\n continue; \n }\n countOperand = useCode.getNumOfOperands();\n for (i = 0; i < countOperand; i++) {\n v2 = useCode.getOperand(i);\n if ((v1.compareTo(v2) == 0) && (useCode.getNumOfDefs(i) == 1)) {\n\t //shortOpcode=CFG.makeShortVal((byte)0,useCode.getBytecode().getOpcode());\n shortOpcode = useCode.getShortOpcode();\n if (shortOpcode == OpcodeConst.opc_astore\n || (shortOpcode >= OpcodeConst.opc_astore_0 && shortOpcode <= OpcodeConst.opc_astore_3)) {\n //System.out.println(useCode + \" can be absorbed by \" + ir);\n // 1. substitute the target of bytecode for the target of astore.\n ir.changeTarget(0, useCode.getTarget(0));\n // 2. and remove the astore operation\n useCode.setAttribute(IRAttribute.ELIMINATED);\n useCode.addDebugInfoString(\"Eliminated by BPC:\" + ir.getBpc());\n }\n }\n }\n }\n } \n }\n\n }", "public final boolean inUse()\n{\n\tif (_buildTime > 0)\n\t{\n\t\treturn false;\n\t}\n\treturn (_base.getAvailableQuarters() - _rules.getPersonnel() < _base.getUsedQuarters() ||\n\t\t\t_base.getAvailableStores() - _rules.getStorage() < _base.getUsedStores() ||\n\t\t\t_base.getAvailableLaboratories() - _rules.getLaboratories() < _base.getUsedLaboratories() ||\n\t\t\t_base.getAvailableWorkshops() - _rules.getWorkshops() < _base.getUsedWorkshops() ||\n\t\t\t_base.getAvailableHangars() - _rules.getCrafts() < _base.getUsedHangars());\n}", "protected void optimize() {\n int[][] cutMemo = new int[dimX + 1][dimY + 1];\n Tuple[][] tupleMemo = new Tuple[dimX + 1][dimY + 1];\n Memo memo = new Memo(cutMemo,tupleMemo);\n\n //array is filled with -1 because -1 is used as a flag in the memo\n fillMemo(0, dimX, 0, dimY, cutMemo);\n\n //Calculates optimal value of cloth\n ArrayList<FittedPattern> answer = computeOptimal(dimX, dimY, pattern, memo, new ArrayList<>(), 0);\n coordinates = answer;\n finalValue = memo.getFittedPatternMemo()[dimX][dimY].getOptimalValue();\n\n }", "private static boolean special_optimization(String a)\n {\n int sum = 0;\n for(int x = 0; x < a.length(); x++)\n {\n sum += (find_value(\"\"+a.charAt(x)));\n }\n if(sum <= library.return_uppervalue() && sum >= library.return_lowervalue())\n return false;\n return true;\n }", "public void analize() {\n\t\t//clearing dropping rules\n\t\tthis.droppingRules.clear();\n\t\t//analysing new rules\n\t\tanalizeParts();\n\t}", "private List<Evaluator<? extends ExprNode>> optimize(\n List<Evaluator<? extends ExprNode>> unoptimized )\n {\n List<Evaluator<? extends ExprNode>> optimized = new ArrayList<>(\n unoptimized.size() );\n optimized.addAll( unoptimized );\n\n Collections.sort( optimized, new ScanCountComparator() );\n\n return optimized;\n }", "public void update(Graph graph, Rule rule) {\n Term[] terms = rule.terms();\n Entry[][] matrix = graph.matrix();\n final double q = rule.getQuality().raw();\n\n for (int i = 0; i < terms.length; i++) {\n double value = matrix[terms[i].index()][0].value(0);\n matrix[terms[i].index()][0].set(0, value + (value * q));\n }\n\n // normilises the pheromone values (it has the effect of\n // evaporation for vertices that have not being updated)\n\n double total = 0.0;\n\n for (int i = 1; i < matrix.length; i++) {\n total += matrix[i][0].value(0);\n }\n\n for (int i = 1; i < matrix.length; i++) {\n double value = matrix[i][0].value(0);\n matrix[i][0].set(0, value / total);\n }\n }", "private Rule honorRules(InstanceWaypoint context){\n \t\t\n \t\tStyle style = getStyle(context);\n \t\tRule[] rules = SLD.rules(style);\n \t\t\n \t\t//do rules exist?\n \t\t\n \t\tif(rules == null || rules.length == 0){\n \t\t\treturn null;\n \t\t}\n \t\t\n \t\t\n \t\t//sort the elserules at the end\n \t\tif(rules.length > 1){\n \t\t\trules = sortRules(rules);\n \t\t}\n \t\t\n \t\t//if rule exists\n \t\tInstanceReference ir = context.getValue();\n \t\tInstanceService is = (InstanceService) PlatformUI.getWorkbench().getService(InstanceService.class);\n \t\tInstance inst = is.getInstance(ir);\n \t\t\t\n \t\tfor (int i = 0; i < rules.length; i++){\n \t\t\t\n \t\t\tif(rules[i].getFilter() != null){\t\t\t\t\t\t\n \t\t\t\t\n \t\t\t\tif(rules[i].getFilter().evaluate(inst)){\n \t\t\t\t\treturn rules[i];\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t//if a rule exist without a filter and without being an else-filter,\n \t\t\t//the found rule applies to all types\n \t\t\telse{\n \t\t\t\tif(!rules[i].isElseFilter()){\n \t\t\t\t\treturn rules[i];\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\t//if there is no appropriate rule, check if there is an else-rule\n \t\tfor (int i = 0; i < rules.length; i++){\n \t\t\tif(rules[i].isElseFilter()){\n \t\t\t\treturn rules[i];\n \t\t\t}\n \t\t}\n \t\t\n \t \n \t\t//return null if no rule was found\n \t\treturn null;\n \t\n \t}", "public void changeIsParalysed()\r\n\t{\r\n\t\tisParalysed = !isParalysed;\r\n\t}", "public abstract Boolean higherScoreBetter();", "boolean shouldModify();", "private void performRule(DataNormalizationRule rule, GraphModification modifications) throws DataNormalizationException, DatabaseException, SQLException {\n\t\tif (inputGraph.getGraphName().length() == 0) {\n\t\t\tthrow new DataNormalizationException(\"Empty Graph Name is not allowed.\");\n\t\t}\n\n\t\tif (modifications == null) {\n\t\t\t/**\n\t\t\t * In case there is no interest in what was changed just perform all the components in the correct order\n\t\t\t */\n\t\t\tperformComponents(rule, inputGraph.getGraphName());\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tgetDirtyConnection().execute(markTemporaryGraph, original);\n\t\t\t\tgetDirtyConnection().execute(String.format(Locale.ROOT, backupQueryFormat, original, inputGraph.getGraphName()));\n\n\t\t\t\tperformComponents(rule, inputGraph.getGraphName());\n\n\t\t\t\tgetDirtyConnection().execute(markTemporaryGraph, modified);\n\t\t\t\tgetDirtyConnection().execute(String.format(Locale.ROOT, backupQueryFormat, modified, inputGraph.getGraphName()));\n\n\t\t\t\t/**\n\t\t\t\t * Unfortunatelly \"SELECT ?s ?p ?o WHERE {{GRAPH <%s> {?s ?p ?o}} MINUS {GRAPH <%s> {?s ?p ?o}}}\"\n\t\t\t\t * throws \"Internal error: 'output:valmode' declaration conflicts with 'output:format'\"\n\t\t\t\t *\n\t\t\t\t * Therefore it is necessary to first create graphs with differences.\n\t\t\t\t */\n\t\t\t\tgetDirtyConnection().execute(String.format(Locale.ROOT, diffQueryFormat, modified, original));\n\t\t\t\tgetDirtyConnection().execute(String.format(Locale.ROOT, diffQueryFormat, original, inputGraph.getGraphName()));\n\n\t\t\t\tWrappedResultSet inserted = getDirtyConnection().executeSelect(String.format(Locale.ROOT, selectQueryFormat, modified));\n\n\t\t\t\t/**\n\t\t\t\t * All that is new to the transformed graph are insertions done by this rule (one of its components)\n\t\t\t\t */\n\t\t\t\twhile (inserted.next()) {\n\t\t\t\t\tmodifications.addInsertion(rule,\n\t\t\t\t\t\t\tinserted.getString(\"s\"),\n\t\t\t\t\t\t\tinserted.getString(\"p\"),\n\t\t\t\t\t\t\tinserted.getString(\"o\"));\n\t\t\t\t}\n\n\t\t\t\tWrappedResultSet deleted = getDirtyConnection().executeSelect(String.format(Locale.ROOT, selectQueryFormat, original));\n\n\t\t\t\t/**\n\t\t\t\t * All that is missing from the transformed graph are deletions done by this rule (one of its components)\n\t\t\t\t */\n\t\t\t\twhile (deleted.next()) {\n\t\t\t\t\tmodifications.addDeletion(rule,\n\t\t\t\t\t\t\tdeleted.getString(\"s\"),\n\t\t\t\t\t\t\tdeleted.getString(\"p\"),\n\t\t\t\t\t\t\tdeleted.getString(\"o\"));\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tgetDirtyConnection().execute(String.format(Locale.ROOT, dropBackupQueryFormat, original));\n\t\t\t\t} finally {}\n\t\t\t\ttry {\n\t\t\t\t\tgetDirtyConnection().execute(String.format(Locale.ROOT, dropBackupQueryFormat, modified));\n\t\t\t\t} finally {}\n\t\t\t\tgetDirtyConnection().execute(unmarkTemporaryGraph, original);\n\t\t\t\tgetDirtyConnection().execute(unmarkTemporaryGraph, modified);\n\t\t\t}\n\t\t}\n\t\tLOG.info(String.format(Locale.ROOT, \"Data Normalization rule %d applied: %s\", rule.getId(), rule.getLabel() != null ? rule.getLabel() : \"\"));\n\t}", "@Override\r\n public final int getUselessCount() {\r\n int i;\r\n\r\n i = 0;\r\n for (Rule r : this.m_rules) {\r\n if (r.isUseless())\r\n i++;\r\n }\r\n\r\n return i;\r\n }", "public boolean optimal() {\n\t\treturn optimal;\n\t}", "public static void main(String[] args) {\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 3, 4, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 3, 5, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 3, 4, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 3, 5, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, false, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, false, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, true, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, true, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, true, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, true, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 5, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 5, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(6, 6, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(6, 6, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 3, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 3, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(7, 7, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(7, 7, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 4, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 4, true, null)));\n measureTime(()->checkInterruptSequential(4, 4, 3, false));\n measureTime(()->checkInterruptSequential(4, 4, 3, true));\n }", "public void WorkloadBasedOnlineCostOptimizationWithDoubleCopy() {\n\t\t\n\t \tinitialParameters();\n\t\tint inputObjectsNumber=0;\n\t\tint indexJ=0;\n\t\t\n\t\tint keepTime=0;// This variable indicates how long an object is stayed in the hot-tier\n\t\tint currentTime=0; // This variable indicates the passing time in the simulation\n\t\t\n\t for (int slot = 0; slot < workloadGenerator.numberObjectsPerSlot.length; slot++) {\n\t\tinputObjectsNumber=inputObjectsNumber+workloadGenerator.numberObjectsPerSlot[slot];\n\t\t\n\t\tfor (int j = indexJ; j < inputObjectsNumber; j++) {\n\t\t\t\n\t\t\tfor (int t=0; t<T; t++ ){\n\t\t\t\t\n\t\t\t\tcurrentTime=t;\n\t\t\t\tif(existRequest(j, t)){\n\t\t\t\t\tbreakPointEvaluation(j, t);\n\t\t\t\t\talphaCalculation();\n\t\t\t\t\t\n\t\t\t\t\tif(finalLocation[j][t]==1){\n\t\t\t\t\t\n\t\t\t\t\t for (keepTime = currentTime; keepTime < currentTime+alpha*(breakPoint); keepTime++) {\n\t\t\t\t\t\t finalLocation[j][t]=1;\n\t\t\t\t\t }\n\t\t\t\t\t}else if(residentialLatencyCost(j, t, 0).compareTo(residentialLatencyCost(j, t,1).add(totalCostCalculation.btotalMigrationCost[t][j][0][1]))==1){\n\t\t\t\t\t\tfinalLocation[j][t]=1;\n\t\t\t\t\t}\n\t\t\t\t}// FIRST IF\n\t\t\t} \t\n\t\t}//For t\n\t\tindexJ=inputObjectsNumber;\n\t }//slot\n\t \n\t /*\n\t for (int obj = 0; obj < finalLocation.length; obj++) {\n\t\t for (int time = 0; time < finalLocation[obj].length; time++) {\n\t\t System.out.print(finalLocation[obj][time]+\" \");\n\t\t \n\t\t \n\t\t }\n\t }\n\t */\n\t \n}", "private void optimiseEVProfile()\n\t{\n\t}", "@Test\n\tpublic void testOptimization() throws Exception {\n\t\tfor(int i = 0; i < 20000000; i++) {\n\t\t\tint _300s = (int) (Math.random() * 100);\n\t\t\tint _100s = (int) (Math.random() * 100);\n\t\t\tint _50s = (int) (Math.random() * 100);\n\t\t\tint misses = (int) (Math.random() * 100);\n\t\t\t\n\t\t\tdouble acc = OsuApiScore.getAccuracy(_300s, _100s, _50s, misses);\n\t\t\t\n\t\t\tAccuracyDistribution accuracyDistribution = AccuracyDistribution.closest(\n\t\t\t\t\t_300s + _100s + _50s + misses, misses,\n\t\t\t\t\tacc);\n\t\t\t\n\t\t\tdouble rec = OsuApiScore.getAccuracy(accuracyDistribution.getX300(),\n\t\t\t\t\taccuracyDistribution.getX100(), accuracyDistribution.getX50(),\n\t\t\t\t\taccuracyDistribution.getMiss());\n\t\t\t\n\t\t\tassertEquals(acc, rec, 0d);\n\t\t}\n\t}", "public boolean getOptimizeCopy()\n {\n return optimizeCopy;\n }", "private void adjustPathConditions() {\n List<ProgramCondition> pcList;\n for (ProgramPath pp : progPath){\n pcList = pp.getConditions();\n final List<ProgramCondition> pcList2 = pcList;\n List<ProgramCondition> collect = pcList2.stream().filter(p -> (pcList2.stream().anyMatch(q -> q.condition.equals(p.condition) \n && q.pred == ProgramConditionTruthValue.False && p.pred == ProgramConditionTruthValue.True))).collect(Collectors.toList());\n \n collect.forEach(p -> p.z3Allowable = false);\n }\n }", "public static List<ExtendRule> removeRedundantExtendedRules_transactionBased(List<ExtendRule> rules) {\n LOGGER.info(\"STARTED removeRedundantExtendedRules - transaction based\");\n LOGGER.info(\"Rules on start:\" + rules.size());\n ExtendRule defRule = rules.get(rules.size()-1);\n if (defRule.getAntecedent().getItems().size()>0)\n {\n LOGGER.warning(\"Default rule is not last rule. Returning null. Last rule:\" + defRule.toString() );\n \n return null;\n }\n Consequent defClass = defRule.getConsequent(); \n for (Iterator<ExtendRule> it = rules.iterator(); it.hasNext();) { \n ExtendRule PRCandidate = it.next();\n // PRCandidate = go through all rules with default class in the consequent\n if (!PRCandidate.getConsequent().toString().equals(defClass.toString()))\n {\n\n }\n // skip default rule\n else if (PRCandidate.equals(defRule))\n {\n \n } \n else{\n Set<Transaction> suppTran = PRCandidate.getAntecedent().getSupportingTransactions();\n // get transactions only CORRECTLY classified by the candidate rule\n Set<Transaction> consTran = PRCandidate.getConsequent().getSupportingTransactions();\n suppTran.retainAll(consTran);\n\n // Check if transactions correctly classified by pruning candidate intersect with transactions covered by those rules below prunCand in the rule list that assign to different than default class. If there are no such transactions PRCandidate can be removed\n boolean nonEmptyIntersection=false;\n boolean positionBelowPRCand = false;\n for (Iterator<ExtendRule> innerIt = rules.iterator(); innerIt.hasNext();) {\n ExtendRule candidateClash = innerIt.next();\n // candidateClash is PRCandidate, which would always evaluate to overlap!\n if (candidateClash.equals(PRCandidate))\n {\n positionBelowPRCand = true;\n continue;\n }\n if (!positionBelowPRCand) continue;\n // candidateClash = go through all rules with OTHER than default class in consequent \n if (candidateClash.getConsequent().toString().equals(defClass.toString()))\n {\n continue;\n }\n\n // check if transactions covered by PRCandidate intersect with transactions covered by candidateClash \n\n for (Transaction t : candidateClash.getAntecedent().getSupportingTransactions())\n {\n\n if (suppTran.contains(t))\n {\n nonEmptyIntersection=true;\n }\n break;\n } \n if (nonEmptyIntersection)\n {\n //go to next PRCandidate \n break;\n } \n }\n if (nonEmptyIntersection == false)\n {\n //no other rule with different consequent covering at least one shared transaction was found\n //this rule can be removed\n LOGGER.fine(\"Removing rule:\" + PRCandidate.toString());\n it.remove();\n } \n }\n \n }\n LOGGER.info(\"Rules on finish:\" + rules.size());\n LOGGER.info(\"FINISHED removeRedundantExtendedRules - transaction based\");\n return rules;\n }", "public boolean mayHaveRewrite() { return false; }", "public void minimize() {\n D = new boolean[states.length][states.length];\r\n S = new ArrayList<ArrayList<HashSet<Point>>>(); // lol\r\n\r\n //noinspection ForLoopReplaceableByForEach\r\n for (int i = 0; i < states.length; i++) {\r\n ArrayList<HashSet<Point>> innerList = new ArrayList<HashSet<Point>>();\r\n\r\n //noinspection ForLoopReplaceableByForEach\r\n for (int j = 0; j < states.length; j++) {\r\n Arrays.fill(D[i], false);\r\n innerList.add(new HashSet<Point>());\r\n }\r\n S.add(innerList);\r\n }\r\n\r\n // 2. states with different acceptances are distinguishable\r\n for (int i = 0; i < states.length; i++) {\r\n for (int j = i + 1; j < states.length; j++) {\r\n if (acceptStates.contains(i) != acceptStates.contains(j)) {\r\n D[i][j] = true;\r\n }\r\n }\r\n }\r\n\r\n // 3. mark as possibly indistinguishable, enforce distinguishability\r\n for (int i = 0; i < states.length; i++) {\r\n for (int j = i + 1; j < states.length; j++) {\r\n // only pairs that are as of yet indistinguishable\r\n if (D[i][j]) {\r\n continue;\r\n }\r\n\r\n DFAState qi = states[i];\r\n DFAState qj = states[j];\r\n\r\n // one of the things being compared is unreachable\r\n if (qi == null || qj == null) {\r\n continue;\r\n }\r\n\r\n // helps emulate \"for any\"\r\n boolean distinguished = false;\r\n for (int k = 0; k < qi.transitions.size(); k++) {\r\n int m = qi.transitions.get(k);\r\n int n = qj.transitions.get(k);\r\n\r\n // if on the same letter, qm and qn move to distinguishable states\r\n if (D[m][n] || D[n][m]) {\r\n dist(i, j);\r\n distinguished = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!distinguished) {\r\n // qm and qn are indistinguishable\r\n for (int k = 0; k < qi.transitions.size(); k++) {\r\n int m = qi.transitions.get(k);\r\n int n = qj.transitions.get(k);\r\n\r\n if (m < n && !(i == m && j == n)) {\r\n S.get(m).get(n).add(new Point(i, j));\r\n } else if (m > n && !(i == n && j == m)) {\r\n S.get(n).get(m).add(new Point(i, j));\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n mergeStates();\r\n }", "@Override\n public boolean needsTransitiveClosureForEvaluation() {\n for(Object matcher : this.matchers){\n if(GenericMatcherMultiSourceCaller.needsTransitiveClosureForEvaluation(matcher))\n return true;\n }\n return false;\n }", "private void optimizeEdgePropFlag() {\n TreeNode currentTreeNode = treeLeaf;\n while (!(currentTreeNode instanceof SourceTreeNode)) {\n if (currentTreeNode instanceof EdgeTreeNode) {\n EdgeTreeNode edgeTreeNode = EdgeTreeNode.class.cast(currentTreeNode);\n TreeNode nextTreeNode = edgeTreeNode.getOutputNode();\n if (null != nextTreeNode &&\n edgeTreeNode.beforeRequirementList.isEmpty() &&\n edgeTreeNode.afterRequirementList.isEmpty()) {\n if (nextTreeNode instanceof EdgeVertexTreeNode ||\n (nextTreeNode.getNodeType() == NodeType.AGGREGATE &&\n !(nextTreeNode instanceof GroupTreeNode))) {\n edgeTreeNode.setFetchPropFlag(true);\n }\n\n }\n }\n currentTreeNode = UnaryTreeNode.class.cast(currentTreeNode).getInputNode();\n }\n }", "private boolean purelySequentialDependent(\r\n\t\t\tfinal Rule r1, \r\n\t\t\tint indx_r1,\r\n\t\t\tfinal Rule r2,\r\n\t\t\tint indx_r2,\r\n\t\t\tGraph g) {\n\t\t\r\n\t\tfinal Match embedding = BaseFactory.theFactory().createMatch(r2, r1.getRight());\t\t\r\n\t\tembedding.setCompletionStrategy(this.strategy, true);\r\n\t\tboolean result = false;\r\n\t\twhile (embedding.nextCompletionWithConstantsChecking() && !result) {\r\n\t\t\tEnumeration<GraphObject> codom = embedding.getCodomain();\t\t\t\t\t\t\r\n\t\t\t// exist l21 : L2 -> R1\r\n\t\t\twhile (codom.hasMoreElements()) {\r\n\t\t\t\tGraphObject obj = codom.nextElement();\r\n\t\t\t\t// rule r1 produce at least one object which is used in LHS of r2\r\n\t\t\t\tif (!r1.getInverseImage(obj).hasMoreElements()) {\r\n\t\t\t\t\tresult = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (this.ruleSequence.isObjFlowActive()) {\r\n\t\t\t\t\t\tfinal ObjectFlow objFlow = this.ruleSequence.getObjFlowForRules(r1, indx_r1, r2, indx_r2);\r\n\t\t\t\t\t\tif (objFlow != null && !objFlow.isEmpty()) \r\n\t\t\t\t\t\t\tresult = pureEnablingAlongObjectFlow(embedding, objFlow);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// add match to matchSequence\r\n\t\t\t\t\tif (result)\r\n\t\t\t\t\t\tthis.ruleSequence.getMatchSequence().addTotalPureEnablingSourceMatch(r2, r1, embedding, indx_r2, indx_r1);\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak; \r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif (result) {\r\n\t\t\t\tboolean attrCondUsesIP = attrConditionUsesInputParameterRight(r2, r1, embedding);\r\n\t\t\t\t\t\r\n\t\t\t\tif (attrCondUsesIP) {\r\n\t\t\t\t\tsetRuleResult(indx_r2, r2.getName(), false, ApplicabilityConstants.PURE_ENABLING_PREDECESSOR, r1.getName());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsetRuleResult(indx_r2, r2.getName(), true, ApplicabilityConstants.PURE_ENABLING_PREDECESSOR, r1.getName());\t\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// TODO: apply r1, then r2 along the comatch of r2 to check NACs of r2\r\n//\t\t\tresult = isPurelyEnabledRuleApplicable(r1, r2, embedding, g);\r\n//\t\t\tif (result) {\r\n//\t\t\t\t// to test : add match to matchSequence\r\n//\t\t\t\tthis.ruleSequence.getMatchSequence().addTotalPureEnablingSourceOfMatch(r2, r1, embedding, indx_r2, indx_r1);\r\n//\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tembedding.dispose();\r\n\t\tBaseFactory.theFactory().unsetAllTransientAttrValuesOfRule(r1);\r\n//\t\tr1.getRight().setNotificationRequired(true);\r\n\t\t\r\n\t\treturn result;\r\n\t}", "double getSolutionCost();", "public void func_96648_a() {\n/* 63 */ if (this.theScoreObjective.getCriteria().isReadOnly())\n/* */ {\n/* 65 */ throw new IllegalStateException(\"Cannot modify read-only score\");\n/* */ }\n/* */ \n/* */ \n/* 69 */ increseScore(1);\n/* */ }", "protected void doDeduction() {\n\n boolean narrowed= false;\n\n unit=false;\n isInconclusive=false;\n\n int newXL;\n int newYU;\n\n Variable x = null;\n Variable y = null;\n\n for(Variable var : csp.getVars()){\n if(var.getPosition() == unitSB.getX().getPosition()){\n x = var;\n } else if(var.getPosition() == unitSB.getY().getPosition()){\n y = var;\n }\n }\n\n int xU = x.getUpperDomainBound();\n int yL = y.getLowerDomainBound();\n\n newXL = yL + unitSB.getCright();\n newYU = xU - unitSB.getCright();\n\n if(newXL>x.getLowerDomainBound()){\n Variable newX = new Variable(newXL, xU);\n newX.setPosition(x.getPosition());\n changeVariable(newX);\n narrowed= true;\n }\n if (newYU< y.getUpperDomainBound()){\n Variable newY = new Variable(yL, newYU);\n newY.setPosition(y.getPosition());\n changeVariable(newY);\n narrowed =true;\n }\n\n if(narrowed){\n doAlgorithmA1();\n }else {\n doAlgorithmA3();\n }\n\n }", "@Override public void postGlobal() {\n for(int i=1;i<_chkProds.length;++i) _chkProds[i] *= _chkProds[i-1];\n }", "private void optimizefc() {\n\r\n\t\tfor (int i = 0; i < fc.size(); i++) {\r\n\t\t\tString c = fc.get(i).get(0);\r\n\t\t\tif (!keys.containsAll(cliques.get(c))) {\r\n\t\t\t\tfc.remove(i);\r\n\t\t\t\toptimizefc();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void applyRules(GraphModification modifications) throws DataNormalizationException {\n\t\ttry {\n\t\t\tgetDirtyConnection();\n\n\t\t\tIterator<DataNormalizationRule> i = rules.iterator();\n\n\t\t\t/**\n\t\t\t * Ensure that the graph is either transformed completely or not at all\n\t\t\t */\n\t\t\t//getDirtyConnection().adjustTransactionLevel(EnumLogLevel.TRANSACTION_LEVEL);\n\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tDataNormalizationRule rule = i.next();\n\n\t\t\t\ttry {\n\t\t\t\t\tperformRule(rule, modifications);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLOG.error(String.format(Locale.ROOT, \"Debugging of rule %d failed: %s\", rule.getId(), e.getMessage()));\n\t\t\t\t\tthrow new DataNormalizationException(e);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//getDirtyConnection().commit();\n\t\t} catch (DatabaseException e) {\n\t\t\tthrow new DataNormalizationException(e);\n\t\t//} catch (SQLException e) {\n\t\t//\tthrow new DataNormalizationException(e);\n\t\t}\n\t}", "public boolean isSolved(){ return getRemainingValues() == 0; }", "@Override\n\tpublic float eval(State src) {\n\t\tfloat numMisplaced = 0.0f;\n\t\t\n\t\tfor (int i=0; i<3; i++) {\n\t\t\tfor (int j=0; j<3; j++) {\n\t\t\t\tif (src.getAt(i, j) != '-' && src.getAt(i,j) != this.goal.getAt(i,j)) {\n\t\t\t\t\tnumMisplaced += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn numMisplaced;\n\t}", "@Override\r\n\tprotected void preFilterAny(Component c) {\r\n\t\tnodeCount++;\r\n\t\tif (_optimize.db) {\r\n\t\t\t_optimize.ln(_optimize.PARTIAL, \"comp: \" + c.showIDLogical() + \" \"\r\n\t\t\t\t\t+ c.show(true));\r\n\t\t}\r\n\r\n\t\tif (isForward()) {\r\n\t\t\tboolean forwardMod = c.propagateValuesForward();\r\n\t\t\tmodified |= forwardMod;\r\n\t\t\tif (_optimize.db) {\r\n\t\t\t\t_optimize.ln(_optimize.PARTIAL, \"\\tfwd: \" + c.cpDebug(true)\r\n\t\t\t\t\t\t+ \" \\tmodified \" + forwardMod);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tboolean reverseMod = c.propagateValuesBackward();\r\n\t\t\tmodified |= reverseMod;\r\n\t\t\tif (_optimize.db) {\r\n\t\t\t\t_optimize.ln(_optimize.PARTIAL, \"\\trev: \" + c.cpDebug(true)\r\n\t\t\t\t\t\t+ \" \\tmodified \" + reverseMod);\r\n\t\t\t}\r\n\t\t}\r\n\t\tsuper.preFilterAny(c);\r\n\t}", "private boolean computeWeakeqExt() {\n\t\tfinal long startTime = System.nanoTime();\n\t\tmakeConstReps();\n\n\t\t/*\n\t\t * makeConstReps ensures that in each weak equivalence class, the const term is the weak representative. So if\n\t\t * mConstTerm != null then primary edge is null and all mSelects must have a value equal to the constant (in\n\t\t * fact mSelects is empty since we removed them).\n\t\t */\n\t\tmArrayModels = new HashMap<ArrayNode, Map<CCTerm,Object>>();\n\t\tfinal HashMap<Map<CCTerm,Object>,ArrayNode> inverse = \n\t\t\t\tnew HashMap<Map<CCTerm,Object>, ArrayNode>();\n\t\tfinal HashSet<SymmetricPair<ArrayNode>> propEqualities = \n\t\t\t\tnew HashSet<SymmetricPair<ArrayNode>>();\n\t\tfinal ArrayDeque<ArrayNode> todoQueue = \n\t\t\t\tnew ArrayDeque<ArrayNode>(mCongRoots.values());\n\t\twhile (!todoQueue.isEmpty()) {\n\t\t\tfinal ArrayNode node = todoQueue.getFirst();\n\t\t\tif (mArrayModels.containsKey(node)) {\n\t\t\t\ttodoQueue.removeFirst();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (node.mPrimaryEdge != null && !mArrayModels.containsKey(node.mPrimaryEdge)) {\n\t\t\t\ttodoQueue.addFirst(node.mPrimaryEdge);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttodoQueue.removeFirst();\n\t\t\tfinal HashMap<CCTerm, Object> nodeMapping\n\t\t\t\t= new HashMap<CCTerm, Object>();\n\t\t\tCCTerm constRep = null;\n\t\t\tArrayNode weakRep = node.getWeakRepresentative();\n\t\t\tif (weakRep.mConstTerm != null) {\n\t\t\t\tconstRep = getValueFromConst(weakRep.mConstTerm).getRepresentative();\n\t\t\t}\n\t\t\tif (node == weakRep) {\n\t\t\t\tnodeMapping.put(null, node);\n\t\t\t\tfor (final Entry<CCTerm, CCAppTerm> e : node.mSelects.entrySet()) {\n\t\t\t\t\tCCTerm value = e.getValue().getRepresentative();\n\t\t\t\t\tassert constRep == null || value == constRep;\n\t\t\t\t\tif (value != constRep) {\n\t\t\t\t\t\tnodeMapping.put(e.getKey(), value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfinal CCTerm storeIndex = getIndexFromStore(node.mPrimaryStore)\n\t\t\t\t\t\t.getRepresentative();\n\t\t\t\tnodeMapping.putAll(mArrayModels.get(node.mPrimaryEdge));\n\t\t\t\tnodeMapping.remove(storeIndex);\n\t\t\t\tfinal ArrayNode weakiRep = node.getWeakIRepresentative(storeIndex);\n\t\t\t\tfinal CCTerm value = weakiRep.mSelects.get(storeIndex);\n\t\t\t\tif (value != null) { // NOPMD\n\t\t\t\t\tif (value.getRepresentative() != constRep) {\n\t\t\t\t\t\tnodeMapping.put(storeIndex, value.getRepresentative());\n\t\t\t\t\t}\n\t\t\t\t} else if (weakiRep != weakRep) {\n\t\t\t\t\tnodeMapping.put(storeIndex, weakiRep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmArrayModels.put(node, nodeMapping);\n\t\t\tfinal ArrayNode prev = inverse.put(nodeMapping, node);\n\t\t\tif (prev != null) {\n\t\t\t\tpropEqualities.add(new SymmetricPair<ArrayNode>(prev, node));\n\t\t\t}\n\t\t}\n\t\tfor (final SymmetricPair<ArrayNode> equalities : propEqualities) {\n\t\t\tmNumInstsEq++;\n\t\t\tfinal WeakCongruencePath path = new WeakCongruencePath(this);\n\t\t\tfinal Clause lemma = path.computeWeakeqExt(\n\t\t\t\t\tequalities.getFirst().mTerm, equalities.getSecond().mTerm,\n\t\t\t\t\tmCClosure.mEngine.isProofGenerationEnabled());\n\t\t\tif (mLogger.isDebugEnabled()) {\n\t\t\t\tmLogger.debug(\"AL sw: \" + lemma);\n\t\t\t}\n\t\t\tmCClosure.mEngine.learnClause(lemma);\n\t\t}\n\t\tmTimeBuildWeakEqi += (System.nanoTime() - startTime);\n\t\treturn !propEqualities.isEmpty();\n\t}", "private Result analyzeIsStandard() {\n if (wallet != null && wallet.network() != BitcoinNetwork.MAINNET)\n return Result.OK;\n\n RuleViolation ruleViolation = isStandard(tx);\n if (ruleViolation != RuleViolation.NONE) {\n nonStandard = tx;\n return Result.NON_STANDARD;\n }\n\n for (Transaction dep : dependencies) {\n ruleViolation = isStandard(dep);\n if (ruleViolation != RuleViolation.NONE) {\n nonStandard = dep;\n return Result.NON_STANDARD;\n }\n }\n\n return Result.OK;\n }", "private boolean shouldApply() {\n return nextRandomInt() >= unappliedJobCutoff;\n }", "protected void MemorizeBestSource() {\n int i, j;\n\n bestUnchanged = true;\n for (i = 0; i < FoodNumber; i++) {\n if (f[i] < GlobalMin) {\n GlobalMin = f[i];\n for (j = 0; j < D; j++) {\n GlobalParams[j] = Foods[i][j];\n GlobalSalesman[j] = Salesmans[i][j];\n }\n bestUnchanged = false;\n }\n }\n }", "@Override\r\n @SuppressWarnings(\"unchecked\")\r\n public final EVirtualMachineState perform(\r\n final VirtualMachine<RBGPMemory, ? extends RBGPProgramBase> vm) {\r\n Rule[] r;\r\n int i;\r\n Rule x;\r\n boolean b1, b2;\r\n int[] d;\r\n EVirtualMachineState e1, e2;\r\n\r\n r = this.m_rules;\r\n d = vm.m_memory.m_mem1;\r\n e1 = EVirtualMachineState.NOTHING;\r\n for (i = 0; i < r.length; i++) {\r\n x = r[i];\r\n b1 = x.m_c1.compare(d[x.m_s11.m_id], d[x.m_s12.m_id]);\r\n b2 = x.m_c2.compare(d[x.m_s21.m_id], d[x.m_s22.m_id]);\r\n\r\n if (x.m_and)\r\n b1 = (b1 && b2);\r\n else\r\n b1 = (b1 || b2);\r\n\r\n if (b1) {\r\n e2 = ((Action<VirtualMachine<RBGPMemory, ? extends VirtualMachineProgram<RBGPMemory>>>) (x.m_act))\r\n .perform(x.m_sa1, x.m_sa2, vm);\r\n if ((e2 == EVirtualMachineState.ERROR)\r\n || (e2 == EVirtualMachineState.TERMINATED))\r\n return e2;\r\n if (e2 == EVirtualMachineState.CHANGED)\r\n e1 = e2;\r\n }\r\n\r\n }\r\n\r\n return e1;\r\n }", "protected final void calcScore()\n {\n\n m_score = SCORE_OTHER;\n\n if (null == m_targetString)\n calcTargetString();\n }", "boolean requiresRestart(Operation nextBestOp) {\n\t\t\treturn nextBestOp.val == Integer.MAX_VALUE;\n\n\t\t}", "public void optimize() {\n \tif (myRight != null) {\n \tmyRight.optimize();\n \t}\n \tif (myLeft != null) {\n \t\tmyLeft.optimize();\n \t}\n \tif (myLeft != null && myRight != null) {\n \tif (optimize_helper()) {\n \t\tSystem.out.println(\"test\");\n \t\tif (myItem.equals(\"+\")) {\n \t\t\tmyLeft.myItem = Integer.parseInt((String)myLeft.myItem);\n \t\t\tmyRight.myItem = Integer.parseInt((String)myRight.myItem);\n \t\t\tmyItem = Integer.toString((int)myLeft.myItem + (int)myRight.myItem);\n \t\t\tmyLeft = null;\n \t\t\tmyRight = null;\n \t\t} else if (myItem.equals(\"*\")) {\n \t\t\tmyLeft.myItem = Integer.parseInt((String)myLeft.myItem);\n \t\t\tmyRight.myItem = Integer.parseInt((String)myRight.myItem);\n \t\t\tmyItem = Integer.toString((int)myLeft.myItem * (int)myRight.myItem);\n \t\t\tmyLeft = null;\n \t\t\tmyRight = null;\n \t\t}\n \t}\n \t}\n }", "private boolean applyRules(boolean isAlive, int aliveNeighbours) {\n if (isAlive && aliveNeighbours < 2) {\n //Underpopulation\n return false;\n } else if (isAlive && aliveNeighbours > 3) {\n //Overcrowding\n return false;\n } else if (!isAlive && aliveNeighbours == 3) {\n //Creation of life\n return true;\n } else {\n // Stays the same\n return isAlive;\n }\n }", "public boolean adjust_satisfy(int satisfy) {\n boolean flag = false;\n switch (satisfy) {\n case 0: {//none satisfied\n this.relax_cpu += 0.1;\n this.relax_memory += 0.1;\n this.relax_qpi += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 1: {//only CPU satisfied\n this.relax_memory += 0.1;\n this.relax_qpi += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 2: {//only memory satisfied\n this.relax_cpu += 0.1;\n this.relax_qpi += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 4: {//only qpi satisfied\n this.relax_memory += 0.1;\n this.relax_cpu += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 8: {//only cores satisfied\n this.relax_cpu += 0.1;\n this.relax_memory += 0.1;\n this.relax_qpi += 0.1;\n }\n case 3: {//cpu and memory satisfied\n this.relax_qpi += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 5: {//cpu and qpi satisfied\n this.relax_memory += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 6: {//memory and qpi satisfied\n this.relax_cpu += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 7: {//all except cores\n this.relax_cores += 1;\n break;\n }\n case 9: {//cpu and cores satisfied\n this.relax_qpi += 0.1;\n this.relax_memory += 0.1;\n break;\n }\n case 10: {//memory and cores satisfied\n this.relax_cpu += 0.1;\n this.relax_qpi += 0.1;\n break;\n }\n case 11: {//all except qpi\n this.relax_qpi += 0.1;\n break;\n }\n case 12: {//qpi and cores satisfied\n this.relax_cpu += 0.1;\n this.relax_memory += 0.1;\n break;\n }\n case 13: {//all except memory\n this.relax_memory += 0.1;\n break;\n }\n case 14: {//all except cpu\n this.relax_cpu += 0.1;\n break;\n }\n }\n\n// if (this.relax_cpu > 1 || this.relax_memory > 1.5 || this.relax_qpi > 1.5) {\n// SOURCE_RATE = SOURCE_RATE * 0.9;\n// flag = true;\n// }\n\n// if (this.relax_cpu > 2) {\n// this.relax_cpu = 2;\n// }\n// if (this.relax_memory > 2) {\n// this.relax_memory = 2;\n// }\n// if (this.relax_qpi > 2) {\n// this.relax_qpi = 2;\n// }\n\n setRelax_cpu(this.relax_cpu);\n setRelax_memory(this.relax_memory);\n setRelax_qpi(this.relax_qpi);\n setRelax_cores(this.relax_cores);\n return flag;\n }", "public Rule_in_State get_unprocessed_rule();", "@Override\n public final void solve() {\n this.flag1 = this.neo.getPosition().equals(this.goal);\n \n }", "@Override\n\tprotected boolean isStoppingConditionReached() {\n\t\t\n\t\tboolean flag = iteration > maxIteration || \n\t\t\t\tlocalSearchTime > maxLocalSearchTime || \n\t\t\t\t!isUpdate;\n\t\tisUpdate = false ;\n\t\treturn flag ;\n\t}", "protected final void checkGC() {\n if (appliedState.relativeClip != currentState.relativeClip) {\n appliedState.relativeClip = currentState.relativeClip;\n currentState.relativeClip.setOn(gc, translateX, translateY);\n }\n\n if (appliedState.graphicHints != currentState.graphicHints) {\n reconcileHints(gc, appliedState.graphicHints,\n currentState.graphicHints);\n appliedState.graphicHints = currentState.graphicHints;\n }\n }", "protected void checkCompiled() {\r\n\t\tif (!isCompiled()) {\r\n\t\t\tlogger.debug(\"JdbcUpdate not compiled before execution - invoking compile\");\r\n\t\t\tcompile();\r\n\t\t}\r\n\t}", "private boolean merges(DPNode nd) {\n\n if (nd.isUsed())\n return true;\n if (!nd.hasPrev())\n return false;\n\n DPNode prev = nd.getPrev();\n if (prev.totalCost() <= 0)\n return false;\n\n return merges(prev);\n }", "@Override\n\tpublic void checkScore() {\n\t\t\n\t}", "public void resetFeasible() {\r\n \tstillFeasible = true;\r\n }", "private void getSensorConditions(List<RuleInstance> rules,Set<Condition> conds)\n{\n for (int i = 0; i < rules.size(); ++i) {\n RuleInstance ri1 = rules.get(i);\n for (int j = i+1; j < rules.size(); ++j) {\n\t RuleInstance ri2 = rules.get(j);\n\t if (ri1.getStateId() == ri2.getStateId()) continue;\n\t addSensorConditions(ri1,ri2,conds);\n }\n }\n}", "boolean isSkipCalculations();" ]
[ "0.6090777", "0.6004165", "0.5945495", "0.59100854", "0.58809566", "0.57395625", "0.5685418", "0.566396", "0.5643709", "0.56433344", "0.5451866", "0.5447712", "0.54330826", "0.5430834", "0.5430158", "0.54274476", "0.5420966", "0.5410133", "0.5403843", "0.53736097", "0.53643984", "0.53592616", "0.53424424", "0.5317065", "0.5299721", "0.52940893", "0.5291731", "0.5280456", "0.5274624", "0.5208092", "0.5201402", "0.51991385", "0.5189352", "0.518635", "0.5168558", "0.5156977", "0.5151624", "0.5134933", "0.5132388", "0.51292014", "0.5115447", "0.51099384", "0.5104922", "0.509801", "0.5093519", "0.508995", "0.5084366", "0.5069112", "0.5068682", "0.5067024", "0.50662285", "0.506413", "0.505535", "0.50533193", "0.5043842", "0.5039946", "0.5036136", "0.50315493", "0.5019561", "0.50171834", "0.50115216", "0.5006721", "0.49998984", "0.49927816", "0.49896044", "0.49868232", "0.49840775", "0.49794343", "0.49790472", "0.4978109", "0.49772325", "0.49757496", "0.4972064", "0.49694675", "0.49567598", "0.49535835", "0.4952323", "0.49516228", "0.4948558", "0.49376917", "0.49371535", "0.49346045", "0.49295574", "0.49294987", "0.4928577", "0.49196142", "0.49189827", "0.4918687", "0.49169865", "0.49161354", "0.4913934", "0.4909978", "0.4909133", "0.49078673", "0.49026024", "0.49012658", "0.49009567", "0.48883423", "0.48854387", "0.48835155", "0.48822552" ]
0.0
-1
returns false if write succeeds. otherwise returns input woc (i.e. writeOnCommit)
private boolean createPolicyFile (boolean granted, PolicyParser parser, boolean woc) throws java.io.IOException { boolean result = woc; createPolicyContextDirectory(); removePolicyFile(granted); String name = getPolicyFileName(granted); OutputStreamWriter writer = null; try { if(logger.isLoggable (Level.FINE)){ logger.fine("JACC Policy Provider: Writing grant statements to policy file: "+name); } writer = new OutputStreamWriter(new FileOutputStream(name), "UTF-8"); parser.write(writer); result = false; } catch(java.io.FileNotFoundException fnfe) { String msg=localStrings.getLocalString("pc.file_error","file not found "+name, new Object []{name, fnfe}); logger.log(Level.SEVERE,msg); throw fnfe; } catch(java.io.IOException ioe){ String msg=localStrings.getLocalString("pc.file_write_error","file IO error on file "+name, new Object []{name,ioe}); logger.log(Level.SEVERE,msg); throw ioe; } finally { if (writer != null) { try { writer.close(); captureFileTime(granted); } catch (Exception e) { String defMsg="Unable to close Policy file: "+name; String msg=localStrings.getLocalString("pc.file_close_error",defMsg,new Object []{name,e}); logger.log(Level.SEVERE,msg); throw new RuntimeException(defMsg); } } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean canWrite();", "boolean shouldCommit();", "boolean isUsedForWriting();", "public boolean write() {\n return this.write;\n }", "public boolean ownWrite(Object data);", "protected boolean continueOnWriteError() {\n/* 348 */ return true;\n/* */ }", "@Override\n\tpublic boolean isReadWrite() {\n\t\treturn true;\n\t}", "Write createWrite();", "boolean isWritable();", "@Override\n protected boolean continueOnWriteError() {\n return true;\n }", "@Generated\n @Selector(\"isHandlingWriting\")\n public native boolean isHandlingWriting();", "boolean isWriteAccess();", "public boolean writeDataFile();", "void tryWriteLockInOMRequest() throws IOException;", "@Override\n\tpublic boolean preWALWrite(ObserverContext<? extends WALCoprocessorEnvironment> ctx, HRegionInfo hRegionInfo, WALKey key,\n\t\t\tWALEdit edit) throws IOException {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isWritable(int arg0) throws SQLException {\n\n\t\treturn true;\n\t}", "@Override\r\n\tpublic int write() throws Exception {\n\t\treturn 0;\r\n\t}", "boolean performWrite(NfcWriteUtility writeUtility) throws ReadOnlyTagException, InsufficientCapacityException, TagNotPresentException, FormatException;", "public boolean isWritable() {\n return false;\n }", "public boolean isWriteable();", "@Override\n\tpublic boolean getCanWrite()\n\t{\n\t\treturn false;\n\t}", "private void ensureWrite() throws IOException {\n if (!reading) return;\n resetForWrite();\n }", "public boolean isWritable() {\n return accessControl != null && accessControl.getOpenStatus().isOpen() && !sandboxed;\n }", "protected abstract void _write(DataOutput output) throws IOException;", "@Test\r\n\tpublic void testWriter() {\r\n\t\tString s = \"This is a test of the writer\";\r\n\t\tWriter w = new Writer();\r\n\t\tassertThat(w, is(notNullValue()));\r\n\t\t\r\n\t\tw.write(s);\r\n\t\tassertThat(w.read(), is(s));\r\n\t}", "public boolean commit() {\r\n\tboolean result = false;\r\n\r\n\tif (conn != null && isConnected()) {\r\n\t try {\r\n\t\tboolean autoCommit = getAutoCommit();\r\n\r\n\t\tif (!autoCommit) {\r\n\t\t conn.commit();\r\n\t\t result = true;\r\n\t\t}\r\n\t } catch (Exception e) {\r\n\t\te.printStackTrace();\r\n\t }\r\n\t}\r\n\r\n\treturn result;\r\n }", "public boolean write(Object toWrite) throws IOException {\n try {\n Files.write(FILE.toPath(), Util.ObjectConverter.serialize(toWrite));\n\n return true;\n } catch (Exception e) {\n\n System.out.println(\"Failed to write object\");\n e.printStackTrace();\n return false;\n }\n\n }", "protected final synchronized boolean send(final Object data, final Commands overWrite) {\n\t\ttry {\n\t\t\t// verificamos si la conexion esta cerrada\n\t\t\tif (this.getConnection().isClosed())\n\t\t\t\t// retornamos false\n\t\t\t\treturn false;\n\t\t\t// mostramos un mensaje\n\t\t\tthis.getLogger().debug((data instanceof Commands || overWrite != null ? \"<<= \" : \"<<< \") + (overWrite != null ? overWrite : data));\n\t\t\t// verificamos si es un comando\n\t\t\tif (!this.getLocalStage().equals(Stage.POST) && data instanceof Commands || overWrite != null)\n\t\t\t\t// almacenamos el ultimo comando enviado\n\t\t\t\tthis.lastCommand = overWrite != null ? overWrite : (Commands) data;\n\t\t\t// enviamos el dato\n\t\t\tthis.getOutputStream().writeObject(data);\n\t\t\t// escribimos el dato\n\t\t\tthis.getOutputStream().flush();\n\t\t} catch (final IOException e) {\n\t\t\t// mostramos el trace\n\t\t\tthis.getLogger().error(e);\n\t\t\t// retornamos false\n\t\t\treturn false;\n\t\t}\n\t\t// retornamos true\n\t\treturn true;\n\t}", "protected abstract boolean commit(String value);", "boolean writeSystabIO(String topicName, int topicIndex, String value){\n // Order of parameter to write : SET, topicName, topicIndex, SYSTAB_SOURCE.MASTER, value\n // Validation\n String [] proParameters = {FILE_EXE_IO,\"SET\", topicName, Integer.toString(topicIndex), \"SYSTAB_SOURCE.MASTER\", value}; // The order of parameters are important for Process Builder!!\n\n if (util.validationNotNull(proParameters)){ // Validate everything -> true = no null\n\n BufferedWriter bw = null; // Outside of try/catch scope so it can be used in finally scope\n // Build the process\n ProcessBuilder pb = new ProcessBuilder(proParameters);\n pb.directory(new File(FILE_PATH_IO)); // Directory of the FILE_EXE_REG\n try {\n Process p = pb.start();\n bw = new BufferedWriter(new OutputStreamWriter(p.getOutputStream()));\n\n bw.write(value);\n bw.flush();\n\n return true; // Succeed to write\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if(bw != null)\n try {\n bw.close(); // if it couldn't be close at the try block because an exception\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return false; // Failed to write\n }", "public boolean checkWritePermission(final DataBucketBean bucket) {\r\n\t\t\treturn checkPermission(bucket, SecurityService.ACTION_READ_WRITE);\r\n\t\t}", "@Test\n public void testWriteToStream() throws Exception {\n System.out.println(\"writeToStream\");\n FileOutputStream output = new FileOutputStream(\"tmp.log\");\n String data = \"abc\";\n boolean expResult = true;\n boolean result = IOUtil.writeToStream(output, data);\n assertEquals(expResult, result);\n result = IOUtil.writeToStream(output, null);\n assertEquals(false, result);\n\n }", "private boolean isWriteConcernError(final CommandResult commandResult) {\n return commandResult.get(\"wtimeout\") != null;\n }", "@Override\n\tpublic IUnderWriteResultInfo confirmUnderWrite(ISecurityInfo securityInfo, IPolicyInfo policyInfo,\n\t\t\tIPolicyQueryInfo policyQueryInfo, IContextInfo context) throws java.lang.Exception {\n\t\treturn null;\n\t}", "private boolean enqueueWrite(ChannelHandlerContext ctx, HttpObject msg, ChannelPromise promise) {\n if (ctx.channel().isWritable() && queuedWrites.isEmpty()) {\n ctx.write(msg, promise);\n return true;\n } else {\n queuedWrites.add(new WriteOperation(msg, promise));\n return false;\n }\n }", "public boolean canWrite(Transaction.TransactionType t, Operation o) {\n if (!isActive || Transaction.TransactionType.READ_ONLY.equals(t) ||\n !variables.containsKey(o.getVariableId())) {\n return false;\n }\n return lockManagers.get(o.getVariableId()).canAcquireLock(o.getType(), o.getTransactionId());\n }", "@Override\r\n\tpublic void write() {\n\t\t\r\n\t}", "@Override\n\tpublic int commit() {\n\t\treturn 0;\n\t}", "protected abstract boolean onSave(CommitBuilder commit)\n throws IOException, ConfigInvalidException;", "boolean isWritePermissionGranted();", "public boolean otherWrite(IDataHolder dc, Object data);", "@Override\n public boolean write() throws Exception {\n if (count >= size) return true;\n if (dest == null) dest = new ChannelOutputDestination(channel);\n while (count < size) {\n final int n = location.transferTo(dest, false);\n if (n <= 0) break;\n count += n;\n channelCount = count;\n if (debugEnabled) log.debug(\"read {} bytes for {}\", n, this);\n }\n return count >= size;\n }", "protected boolean attemptCommit() {\n \t\t\tpretendCommit();\n \t\t\tif (isValid()) {\n \t\t\t\tfDocumentUndoManager.commit();\n \t\t\t\treturn true;\n \t\t\t}\n \t\t\treturn false;\n \t\t}", "boolean getHasWriteBehindWriter();", "public void write(WriteOnly data) {\n\t\tdata.writeData(\"new data\"); // Ok\n\t}", "public boolean isAlreadyWrittenToCPN() {\n\t\treturn this.pnWrittenToCPN;\n\t}", "protected int doWriteSingle(ChannelOutboundBuffer in) throws Exception {\n/* 481 */ Object msg = in.current();\n/* 482 */ if (msg instanceof ByteBuf)\n/* 483 */ return writeBytes(in, (ByteBuf)msg); \n/* 484 */ if (msg instanceof DefaultFileRegion)\n/* 485 */ return writeDefaultFileRegion(in, (DefaultFileRegion)msg); \n/* 486 */ if (msg instanceof FileRegion)\n/* 487 */ return writeFileRegion(in, (FileRegion)msg); \n/* 488 */ if (msg instanceof SpliceOutTask) {\n/* 489 */ if (!((SpliceOutTask)msg).spliceOut()) {\n/* 490 */ return Integer.MAX_VALUE;\n/* */ }\n/* 492 */ in.remove();\n/* 493 */ return 1;\n/* */ } \n/* */ \n/* 496 */ throw new Error();\n/* */ }", "public boolean checkpoint() {\n\t\ttry {\n\t\t\toutputStream.flush();\n\t\t} catch (IOException e) {\n\t\t\tif (RTS_COMMON.Option.VERBOSE)\n\t\t\t\te.printStackTrace();\n\t\t\treturn (false);\n\t\t}\n\t\treturn (true);\n\t}", "private boolean write(String sql) {\n if (!checkConnected()) {\n return false;\n }\n\n PreparedStatement statement = null;\n try {\n statement = connection.prepareStatement(sql);\n statement.executeUpdate();\n return true;\n }\n catch (SQLException ex) {\n if (!sql.equalsIgnoreCase(\"ALTER TABLE `\" + tablePrefix + \"users` DROP COLUMN `party` ;\")) {\n printErrors(ex);\n }\n return false;\n }\n finally {\n if (statement != null) {\n try {\n statement.close();\n }\n catch (SQLException e) {\n // Ignore\n }\n }\n }\n }", "long getLastWriteAccess();", "private boolean flushWrite(final boolean block) throws IOException, BadDescriptorException {\n if (reading || !modes.isWritable() || buffer.position() == 0) return false; // Don't bother\n int len = buffer.position();\n int nWritten = 0;\n buffer.flip();\n \n // For Sockets, only write as much as will fit.\n if (descriptor.getChannel() instanceof SelectableChannel) {\n SelectableChannel selectableChannel = (SelectableChannel)descriptor.getChannel();\n synchronized (selectableChannel.blockingLock()) {\n boolean oldBlocking = selectableChannel.isBlocking();\n try {\n if (oldBlocking != block) {\n selectableChannel.configureBlocking(block);\n }\n nWritten = descriptor.write(buffer);\n } finally {\n if (oldBlocking != block) {\n selectableChannel.configureBlocking(oldBlocking);\n }\n }\n }\n } else {\n nWritten = descriptor.write(buffer);\n }\n if (nWritten != len) {\n buffer.compact();\n return false;\n }\n buffer.clear();\n return true;\n }", "boolean commitEntryMemTableFlush() throws IOException;", "public com.mongodb.WriteResult getWriteResult() {\n return writeResult;\n }", "boolean isAutoCommit();", "public boolean isWritable() {\r\n\t\treturn isWritable;\r\n\t}", "@Override\n public void write() {\n\n }", "void write();", "public abstract boolean writeDataItem(BDTuple tuple) throws RollbackException;", "public interface WriteOnlyChannel {\n /**\n * Write message packet\n * @param data message packet\n * @return True if success ele False\n */\n boolean write(byte[] data );\n}", "public void commit(Writer output) throws IOException {\n postData(new StringReader(\"<commit/>\"), output);\n }", "String byteOrBooleanWrite();", "private static int check_fd_for_write(int fd) {\n int status = check_fd(fd);\n if (status < 0)\n return -1;\n\n FileDescriptor fileDescriptor = process.openFiles[fd];\n int flags = fileDescriptor.getFlags();\n if ((flags != O_WRONLY) &&\n (flags != O_RDWR)) {\n // return (EBADF) if the file is not open for writing\n process.errno = EBADF;\n return -1;\n }\n\n return 0;\n }", "public abstract boolean writeDataToFile(String fileName, boolean overwrite);", "public final boolean canWriteFile(long offset, long len, int pid) {\n\t\t\n\t\t//\tCheck if the lock list is valid\n\t\t\n\t\tif ( m_lockList == null)\n\t\t\treturn true;\n\t\t\t\n\t\t//\tCheck if the file section is writeable by the specified process\n\n\t\tboolean writeOK = false;\n\t\t\t\t\n\t\tsynchronized ( m_lockList) {\n\n\t\t\t//\tCheck if the file section is writeable\n\t\t\t\n\t\t\twriteOK = m_lockList.canWriteFile(offset, len, pid);\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\t//\tReturn the write status\n\t\t\n\t\treturn writeOK;\n\t}", "public long getWriteId() {\n return writeId;\n }", "public boolean getSupportsBankWrites() \n {\n return false; \n }", "public boolean isWritable(int tid, int varIndex) {\n if (!hasConflict(tid, varIndex, Lock.Type.WRITE)) {\n setLock(tid, varIndex, Lock.Type.WRITE);\n _accessedTransactions.add(tid);\n return true;\n } else {\n return false;\n }\n }", "int writeTo(OutputStream out) throws IOException;", "public boolean isWritable() {\n return channel instanceof WritableByteChannel;\n }", "@Override\n protected void doWriteTo(StreamOutput out) throws IOException {\n }", "private boolean writeToFile(String message) \n\t{\n\t BufferedWriter writer = null;\n\t boolean status = false;\n\t\ttry {\n\t\t\twriter = new BufferedWriter(new FileWriter(outputFile, true));\n\t\t\twriter.write(\"\\n\"+message);\n\t\t writer.close();\n\t\t status = true;\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error occured in writing output to file: \"+e.getLocalizedMessage());\n\t\t\ttry {\n\t\t\t\tif(writer!=null) {\n\t\t\t\t\twriter.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e1) {\n\t\t\t\tSystem.err.println(\"Error occured in closing filewriter: \"+e1.getLocalizedMessage());\n\t\t\t}\n\t\t\treturn status;\n\t\t}\n\t\treturn status; \n\t \n\t}", "abstract void onWriteable();", "public int internalWrite(ByteBuffer buffer) throws IOException, BadDescriptorException {\n checkOpen();\n \n // TODO: It would be nice to throw a better error for this\n if (!(channel instanceof WritableByteChannel)) {\n throw new BadDescriptorException();\n }\n \n WritableByteChannel writeChannel = (WritableByteChannel)channel;\n \n if (isSeekable() && originalModes.isAppendable()) {\n FileChannel fileChannel = (FileChannel)channel;\n fileChannel.position(fileChannel.size());\n }\n \n return writeChannel.write(buffer);\n }", "@Test\n public void testGetWriteRequest() {\n System.out.println(\"getWriteRequest\");\n Connection connection = null;\n IoGeneric instance = null;\n WriteRequest expResult = null;\n WriteRequest result = instance.getWriteRequest(connection);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "private boolean writeToFile() {\n\n\t\tBufferedWriter bw = null;\n\t\tFileWriter fw = null;\n\n\t\ttry {\n\t\t\tString content = getAsXmlString();\n\n\t\t\tfw = new FileWriter(FILENAME + \"w\");\n\t\t\tbw = new BufferedWriter(fw);\n\t\t\tbw.write(content);\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (bw != null)\n\t\t\t\t\tbw.close();\n\n\t\t\t\tif (fw != null)\n\t\t\t\t\tfw.close();\n\n\t\t\t\treturn true;\n\t\t\t} catch (IOException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean writeOrder2(IncomeInputpo incomeInputpo) throws RemoteException {\n\t\treturn false;\n\t}", "public boolean getShouldChangePatchAfterWrite()\n {\n return false; \n }", "public boolean getSupportsPatchWrites() { return true; }", "public boolean getSupportsPatchWrites() { return true; }", "protected abstract byte getWriteVersion();", "boolean isFlush();", "public void lock_write() {\n boolean update = false;\n logger.log(Level.FINE,\"lock_write() \"+this.lockState+\".\");\n lock.lock();\n logger.log(Level.FINE,\"lock_write : taking mutex \"+this.lockState+\".\");\n switch(this.lockState){\n case WLC:\n this.lockState=State.WLT;\n logger.log(Level.INFO,\"writing with cache\");\n \t break;\n \t\t default: \t\n update = true;\n break;\n \t }\n lock.unlock();\n logger.log(Level.FINE,\"lock_write : the mutex with :\"+lockState+\".\");\n if(update){\n \tlogger.log(Level.INFO,\"Updating lock to WLT \"+lockState+\".\"); //Avant RLC\n \tthis.lockState=State.WLT; \n if(lockState!=State.WLT){\n logger.log(Level.SEVERE,\"Lock = \"+this.lockState+\" instead of WLT\"); //Bien mmis à WLT.\n }\n logger.log(Level.INFO,\"LockState was updated to \"+lockState+\".\");\n this.obj = client.lock_write(this.id); //BUG : se fait invalider en tant que reader et passe à NL entrant dans la boucle suivante \n // A mon avis : se fait invalider en tant que lecteur (d'ou un lock_incohérent = WLT). A voir \n // Est-ce qu'il s'auto-invalide, auquel cas, il faut vérifier invalidate_reader mais je crois qu'il y un test pour ce cas.\n // Quelqu'un d'autre l'invalide mais dans ce cas, le serveur devrait \"séquencer\" cette autre invalidation et le lock_write.\n if(lockState!=State.WLT){\n logger.log(Level.SEVERE,\"Lock = \"+this.lockState+\" instead of WLT\");\n }\n logger.log(Level.INFO,\"lock_write() : end with \"+lockState+\".\");\n }\n }", "public void commitPendingDataToDisk() {\n /*\n r5 = this;\n monitor-enter(r5);\n r1 = r5.mPendingWrite;\t Catch:{ all -> 0x0039 }\n r3 = 0;\n r5.mPendingWrite = r3;\t Catch:{ all -> 0x0039 }\n if (r1 != 0) goto L_0x000a;\n L_0x0008:\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n L_0x0009:\n return;\n L_0x000a:\n r3 = r5.mWriteLock;\t Catch:{ all -> 0x0039 }\n r3.lock();\t Catch:{ all -> 0x0039 }\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n r2 = new java.io.FileOutputStream;\t Catch:{ IOException -> 0x003c }\n r3 = r5.mFile;\t Catch:{ IOException -> 0x003c }\n r3 = r3.chooseForWrite();\t Catch:{ IOException -> 0x003c }\n r2.<init>(r3);\t Catch:{ IOException -> 0x003c }\n r3 = r1.marshall();\t Catch:{ IOException -> 0x003c }\n r2.write(r3);\t Catch:{ IOException -> 0x003c }\n r2.flush();\t Catch:{ IOException -> 0x003c }\n android.os.FileUtils.sync(r2);\t Catch:{ IOException -> 0x003c }\n r2.close();\t Catch:{ IOException -> 0x003c }\n r3 = r5.mFile;\t Catch:{ IOException -> 0x003c }\n r3.commit();\t Catch:{ IOException -> 0x003c }\n r1.recycle();\n r3 = r5.mWriteLock;\n r3.unlock();\n goto L_0x0009;\n L_0x0039:\n r3 = move-exception;\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n throw r3;\n L_0x003c:\n r0 = move-exception;\n r3 = \"BatteryStats\";\n r4 = \"Error writing battery statistics\";\n android.util.Slog.w(r3, r4, r0);\t Catch:{ all -> 0x0052 }\n r3 = r5.mFile;\t Catch:{ all -> 0x0052 }\n r3.rollback();\t Catch:{ all -> 0x0052 }\n r1.recycle();\n r3 = r5.mWriteLock;\n r3.unlock();\n goto L_0x0009;\n L_0x0052:\n r3 = move-exception;\n r1.recycle();\n r4 = r5.mWriteLock;\n r4.unlock();\n throw r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.internal.os.BatteryStatsImpl.commitPendingDataToDisk():void\");\n }", "public boolean getSupportsPatchWrites() \n {\n return false; \n }", "@Override\n\tpublic boolean isWritable() {\n\t\treturn (Files.isWritable(this.path) && !Files.isDirectory(this.path));\n\t}", "public abstract long bytesWritten();", "void execute(final ReadWriteTransaction readWriteTransaction);", "void writeTo(DataOutputStream dout) throws IOException {\r\n throw new Error(\"Method no longer available\");\r\n// dout.writeInt(commit_id);\r\n// dout.writeInt(table_id);\r\n// dout.writeInt(journal_entries);\r\n// dout.write(command_journal, 0, journal_entries);\r\n// int size = command_parameters.size();\r\n// dout.writeInt(size);\r\n// for (int i = 0; i < size; ++i) {\r\n// dout.writeInt(command_parameters.intAt(i));\r\n// }\r\n }", "void notifyWrite();", "public synchronized boolean write(byte[] src, int offset, int bytesToWrite) {\n if (bytesToWrite > capacity) {\n return false;\n }\n if (bytesToWrite == 0) {\n return true;\n }\n if (writeHead + bytesToWrite <= capacity) {\n System.arraycopy(src, offset, buffer, writeHead, bytesToWrite);\n } else { // Data wraps around buffer edge.\n int entriesBeforeWrap = capacity - writeHead;\n System.arraycopy(src, offset, buffer, writeHead, entriesBeforeWrap);\n System.arraycopy(\n src, offset + entriesBeforeWrap, buffer, 0, bytesToWrite - entriesBeforeWrap);\n }\n writeHead = (writeHead + bytesToWrite) % capacity;\n cumulativeWritten += bytesToWrite;\n return true;\n }", "private void flushWrite() throws IOException, BadDescriptorException {\n if (reading || !modes.isWritable() || buffer.position() == 0) return; // Don't bother\n \n int len = buffer.position();\n buffer.flip();\n int n = descriptor.write(buffer);\n \n if(n != len) {\n // TODO: check the return value here\n }\n buffer.clear();\n }", "com.google.spanner.v1.Mutation.Write getUpdate();", "@Override\n\tpublic boolean isCommitted() {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean commit() {\n\t\ttry {\r\n\t\t\tconn = DriverManager.getConnection(URL, USER, PASS);\r\n\t\t\tString sql = \"commit\";\r\n\t\t\tps = conn.prepareStatement(sql);\r\n\t\t\tps.executeUpdate();\r\n\t\t\trs.close();\r\n\t\t\tps.close();\r\n\t\t\treturn true;\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Override\n public long writeData(InputStream in) {\n try {\n return IOUtils.copy(in, new FileOutputStream(getFile()));\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "@Override\n\tpublic boolean isDefinitelyWritable(int arg0) throws SQLException {\n\t\treturn false;\n\t}", "@Override\n\tpublic Future<RpcResult<AnimalWriteOutput>> animalWrite(\n\t\t\tAnimalWriteInput input) {\n\t\tfinal ReadWriteTransaction tx = db.newReadWriteTransaction();\n\n\t\tList<Fish> list = new LinkedList<>();\n\t\tFishBuilder fishBuilder = new FishBuilder();\n\t\tfishBuilder.setFishId(input.getId());\n\t\tfishBuilder.setFishName(input.getStrin());\n\t\tlist.add(fishBuilder.build());\n\t\t\n\t\ttx.merge(LogicalDatastoreType.OPERATIONAL, ORGANISM_IID, new OrganismBuilder().setFish(list).build());\n\t\t\n\t\ttry {\n\t\t\ttx.submit().get();\n\t\t} catch (InterruptedException | ExecutionException e) {\n\t\t\tLOG.warn(\"[labry]Exception: \", e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\tLOG.info(\"[labry]animalWrite(write): {} \", input.getStrin());\n\n\t\tAnimalWriteOutputBuilder animalWriteOutputBuilder = new AnimalWriteOutputBuilder();\n\t\tanimalWriteOutputBuilder.setStrout(input.getStrin());\n\n\t\treturn RpcResultBuilder.success(animalWriteOutputBuilder.build()).buildFuture();\n\t}", "Path getWritePath()\n {\n return writePath;\n }", "public abstract void write(DataOutput out) throws IOException;", "public void commitWriter () {\n try {\n writer.commit();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "protected final void verifyWriteCData()\n throws XMLStreamException\n {\n // Not legal outside main element tree:\n if (mCheckStructure) {\n if (inPrologOrEpilog()) {\n reportNwfStructure(ErrorConsts.WERR_PROLOG_CDATA);\n }\n }\n // 08-Dec-2005, TSa: validator-based validation?\n if (mVldContent <= XMLValidator.CONTENT_ALLOW_WS) {\n // there's no ignorable white space CDATA...\n reportInvalidContent(CDATA);\n }\n }" ]
[ "0.6399966", "0.6368003", "0.6318279", "0.61783594", "0.6049948", "0.60389245", "0.6029373", "0.6012725", "0.5996072", "0.59292465", "0.58220804", "0.5821107", "0.58164036", "0.5718381", "0.5675217", "0.5661511", "0.5643951", "0.5598006", "0.55451673", "0.551582", "0.5455715", "0.5413612", "0.53901684", "0.53731257", "0.5362229", "0.5348222", "0.534424", "0.53400075", "0.5337946", "0.5316607", "0.53155017", "0.5314882", "0.5313265", "0.53083545", "0.530833", "0.53047836", "0.53046817", "0.5298633", "0.5287182", "0.5274418", "0.5253959", "0.52396667", "0.52362496", "0.5228488", "0.5188457", "0.5178092", "0.51737523", "0.51735234", "0.51705325", "0.5166152", "0.51630646", "0.5159329", "0.5158382", "0.5153659", "0.5152692", "0.51512206", "0.51440966", "0.51264644", "0.5116801", "0.5112002", "0.5100443", "0.5093995", "0.50934404", "0.50932586", "0.5088375", "0.50690854", "0.5066443", "0.5062168", "0.50570285", "0.50561345", "0.50543326", "0.50515926", "0.5037108", "0.50256103", "0.5021831", "0.5014187", "0.50132257", "0.5011025", "0.5011025", "0.5009574", "0.50091124", "0.50083095", "0.5008125", "0.500443", "0.5001485", "0.49981698", "0.49935988", "0.49885812", "0.4981842", "0.4980584", "0.49731082", "0.4971207", "0.49709752", "0.49667376", "0.49632886", "0.49602556", "0.49551845", "0.49532554", "0.49511468", "0.49477795", "0.49466896" ]
0.0
-1
/ Positif Scenirio When I send a GET Request to the URL then HTTP Status code should be 200 And Content type should be Json And Status line should be HTTP 1.0 200 OK
@Test public void trial01() { spec1.pathParam("id", 3); Response response =given().spec(spec1).get("/{id}"); response.prettyPrint(); response.then().assertThat().statusCode(200).contentType(ContentType.JSON).statusLine("HTTP/1.1 200 OK"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Http.Status status();", "@Test\n\t \n\t public void getApi() {\n\t\t \n\t\t Response getIt=get(\"https://reqres.in/api/users?page=2\");\n\t\t getIt.prettyPrint();\n\t\t System.out.println(getIt.getStatusCode());\n\t\t System.out.println(getIt.getTime());\n\t\t \n\t\t //to validate\n\t\t int validGstatus=getIt.getStatusCode();\n\t\t Assert.assertEquals(validGstatus,200);\n\t\t \n\t }", "@GET(\"system/status\")\n Call<InlineResponse200> getStatus();", "@Test(priority=1)\n\tpublic void teststatuscode() {\n\t\t\n\t\twhen()\n\t\t\t.get(\"http://jsonplaceholder.typicode.com/posts/1\")\n\t\t.then()\n\t\t\t.statusCode(200);\n\t\t\t//.log().all();\n\t}", "@Test\r\n\tpublic void givenResourceUrl_whenSendGetForRequestEntity_thenStatusOk() throws IOException {\n\r\n\t\tfinal Logger log = LoggerFactory.getLogger(UserDataRestTemplateTest.class);\r\n\r\n\t\tRestTemplate restTemplate = new RestTemplate();\r\n\t\tMap<String, String> response = (Map<String, String>) restTemplate\r\n\t\t\t\t.getForObject(\"http://services.groupkt.com/country/get/iso2code/IN\", Map.class);\r\n\t\tlog.info(\"==== RESTful API Response using Spring RESTTemplate START =======\");\r\n\t\tlog.info(response.toString());\r\n\t\tlog.info(\"==== RESTful API Response using Spring RESTTemplate END =======\");\r\n\r\n\t}", "public String status() throws Exception {\n\n \t\tString apiUrl = \"api/status.json\";\n \t\t\n \t\tString url = this.baseUrl + apiUrl;\n\n URL urlObj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) urlObj.openConnection();\n\n con.setRequestMethod(\"GET\");\n\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n int responseCode = con.getResponseCode();\n String response = \"\";\n\t\tif (responseCode == 200) {\n response = buildReponse(con);\n\t\t} else {\n\t response = \"{'error': 'Something went wrong, looks like the server is down.'}\";\n\t\t}\n\n\t\treturn response; \n \t}", "java.lang.String getResponse();", "@Test\r\n\tpublic void testResponseCode(){\r\n\t\t\r\n\t\tint code = get(api1).getStatusCode();\r\n\t\tSystem.out.println(\"Code: \"+code);\r\n\t\tAssert.assertEquals(code, 200);\r\n\t}", "@Test\n public void getWitheaders(){\n with().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/countries/US\")\n .then().statusCode(200);\n }", "@Test\n\tpublic void teststatuscode() {\n\t\t\n\t\tgiven()\n\t\t\n\t\t.when()\n\t\t\t.get(\"http://jsonplaceholder.typicode.com/posts/5\")\n\t\t.then()\n\t\t\t.statusCode(200)\n\t\t\t.log().all();\n\t}", "@Override\n public RestStatus status() {\n return response.status();\n }", "@Test\n void getTest() {\n URI uri = URI.create(endBody + \"/get\");\n\n // get the response\n HttpResponse<String> response = HttpMethods.get(uri);\n\n // check if it received OK\n assertEquals(200, response.statusCode());\n }", "@Test(enabled=true)\npublic void getRequest() {\n\t\tString url = \"https://reqres.in/api/users?page=2\";\n\t\t\n\t\t//create an object of response class\n\t\t\n\t\t//Restassured will send get request to the url and store response in response object\n\t\tResponse response = RestAssured.get(url);\n\t\t\n\t\t//We have to put assertion in response code and response data\n\t\tAssert.assertEquals(response.getStatusCode(), 200 , \"Response code Mismatch\");\n\t\t\n\t\tint total_pages = response.jsonPath().get(\"total_pages\");\n\t\tAssert.assertEquals(total_pages, 2 , \"Total Pages value Mismatch\");\n \n}", "@Test\n public void teststatusCode() {\n\t \n\t given().\n\t \tget(\"https://reqres.in/api/unknown\").\n\t then().\t\t\n\t \tstatusCode(200);\n\t \n }", "@Test\n\tpublic void latest_Client() throws ClientProtocolException, IOException\n {\n CloseableHttpClient httpclinet2=HttpClientBuilder.create().build();\n \n // 2 Url purpose\n HttpGet httpget= new HttpGet(\"https://reqres.in\");\n \n // 3 Add Header\n\t httpget.addHeader(\"Authorization\",\"Bearer_ HGHKHGKHGKGKHGHGHJGKHGK\");\n\t \n\t /*********4 execute the API and store response************/ \n\t CloseableHttpResponse response= httpclinet2.execute(httpget);\n\t \n\t // Read the status code\n\t int i= response.getStatusLine().getStatusCode();\n\t System.out.println(i);\n\t Assert.assertEquals(200, i);\n\t \n\t //Print the response and store the response in string, here you cannot directly store the response and print.\n\t HttpEntity entity= response.getEntity();\n\t String data=EntityUtils.toString(entity);\n\t System.out.println(data);\n\t \n\t //GetJson value using Rest Assured Jsonpath value\n\t JsonPath json=new JsonPath(data);\n\t String dataapi=json.getString(\"Meta_.id\");\n\t System.out.println(dataapi);\n\t \n\t //working on Jway API alternative of jpath to retrieve the value.\n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n\t \n }", "@Test\n public void Task1() {\n given()\n .when()\n .get(\"https://httpstat.us/203\")\n .then()\n .statusCode(203)\n .contentType(ContentType.TEXT)\n ;\n }", "private String httpOk() {\n return \"HTTP/1.1 200 OK\\r\\n\"\n + \"Content-Type: text/html\\r\\n\"\n + \"\\r\\n\";\n }", "@Test(priority=1)\r\n\tpublic void validateStatusCode()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then()\r\n\t\t.statusCode(200);\r\n\t\t\r\n\t}", "public static Integer getResponseCode(String url) throws IOException {\n\n String chrome_user_agent = \"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36\";\n\n\n HttpClient client = HttpClientBuilder.create().build();\n HttpGet request = new HttpGet(url);\n request.addHeader(\"User-Agent\", chrome_user_agent);\n HttpResponse response = null;\n try {\n response = client.execute(request);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /* System.out.println(\"Response Code : \"\n + response.getStatusLine().getStatusCode());\n*/\n /*BufferedReader rd = new BufferedReader(\n new InputStreamReader(response.getEntity().getContent()));\n\n StringBuffer result = new StringBuffer();\n String line = \"\";\n while ((line = rd.readLine()) != null) {\n result.append(line);\n }\n*/\n return response.getStatusLine().getStatusCode();\n }", "private void sendStatus(HttpRequest request, HttpResponse response) {\r\n\t\tresponse.setHeader(\"Content-Type\", MediaType.JSON_UTF_8.toString());\r\n\t\tresponse.setStatus(200);\r\n\t\ttry {\r\n\t\t\tObject status = buildStatus(request);\r\n\t\t\tString reply = json.toJson(status);\r\n\t\t\t\r\n\t\t\t// do we return the whole status or just a part of it ?\r\n\t\t\tString jsonPath = request.getQueryParameter(\"jsonpath\");\r\n\t\t\tif (jsonPath != null) {\r\n\t\t\t\tstatus = JsonPath.using(jsonPathConf).parse(reply).read(jsonPath);\r\n\t\t\t\treply = status instanceof String ? status.toString() : json.toJson(status);\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tresponse.setContent(reply.getBytes(UTF_8));\r\n\t\t} catch (Throwable e) {\r\n\t\t\tthrow new GridException(e.getMessage());\r\n\t\t}\r\n\t}", "int getStatusCode();", "int getStatusCode();", "@Test\n public void simpleGet(){\n when()\n .get(\"http:://34.223.219.142:1212/ords/hr/employees\")\n .then().statusCode(200);\n\n }", "@Override\n public void onSuccess(int statusCode, cz.msebera.android.httpclient.Header[] headers, JSONObject response) {\n try {\n String status = response.getString(\"status\");\n if (status.contains(\"status not ok\")) {\n lt.error();\n Toast.makeText(activity, response.getString(\"error\"), Toast.LENGTH_LONG).show();\n } else {\n lt.success();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@GET\n @Path(\"/ping\")\n\tpublic Response ping() {\n\t\tlog.debug(\"Ping check ok\");\n return Response.status(Response.Status.OK).entity(1).build();\n \n\t}", "public static void getMethodTest()\n\t{\n String content = restTemplate.getForObject(baseURL+\"/hello\", String.class);\n System.out.println(\"-------------\");\n \n ResponseEntity<String > s = restTemplate.getForEntity(baseURL+\"/hello\", String.class);\n System.out.println(s.getBody());\n System.out.println(s.getStatusCodeValue());\n System.out.println(s.getHeaders());\n System.out.println(s.getStatusCode());\n\n\t}", "@Test\n\tpublic void testStatusCode() {\n\t\tgiven().\n\t\tget(Endpoint.GET_COUNTRY).then().statusCode(200);\n\t}", "int getStatusCode( );", "static String sendGET(String GET_URL) throws IOException, JSONException {\n\t\t// Check URL is valid or not.\n\t\tif (isValidURL(GET_URL)) {\n\t\t\ttry {\n\t\t\t\tURL obj = new URL(GET_URL);\n\t\t\t\tHttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\t\t\t\tcon.setRequestMethod(\"GET\");\n\t\t\t\tcon.setRequestProperty(\"User-Agent\", USER_AGENT);\n\t\t\t\tint responseCode = con.getResponseCode();\n\t\t\t\tSystem.out.println(\"GET Response Code :: \" + responseCode);\n\t\t\t\tif (responseCode == HttpURLConnection.HTTP_OK) { // success\n\t\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t\t\t\t\tString inputLine;\n\t\t\t\t\tStringBuffer response = new StringBuffer();\n\n\t\t\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\t\t\tresponse.append(inputLine);\n\t\t\t\t\t}\n\t\t\t\t\tin.close();\n\t\t\t\t\t// Convert to json object and get specified data from it. Then you can print if the response is json type.\n\t\t\t\t\tString list = getList(response.toString());\n\t\t\t\t\tSystem.out.println(list);\n\t\t\t\t\t// print result\n\t\t\t\t\tSystem.out.println(response.toString());\n\t\t\t\t\treturn \"GET request worked\"; // Added for testing.\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"GET request not worked\");\n\t\t\t\t\treturn \"GET request not worked\";\n\t\t\t\t}\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\treturn \"URL is valid but connection could not be established.\";\n\t\t\t} catch (IOException e) {\n\t\t\t\treturn \"URL is valid but connection could not be established.\";\n\t\t\t}\n\t\t} else {\n\t\t\treturn \"URL is not valid.\";\n\t\t}\n\t}", "private static String get_request(String uri, boolean isChecking, String token) throws IOException {\r\n URL url = new URL(uri);\r\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\r\n connection.setRequestProperty(\"Content-Type\", \"application/json\");\r\n connection.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36 Edg/88.0.705.74\");\r\n if (isChecking) {\r\n connection.setRequestProperty(\"Authorization\", token);\r\n }\r\n connection.setRequestMethod(\"GET\");\r\n InputStream responseStream = connection.getInputStream();\r\n if (debug) {\r\n System.out.println(\"GET - \"+connection.getResponseCode());\r\n }\r\n try (Scanner scanner = new Scanner(responseStream)) {\r\n String responseBody = scanner.useDelimiter(\"\\\\A\").next();\r\n if (debug) {\r\n System.out.println(responseBody);\r\n }\r\n return responseBody;\r\n } catch (Exception e) {\r\n return \"ERROR\";\r\n }\r\n }", "@Test\n\t@Ignore\n\tpublic void testResponse() throws UnsupportedEncodingException {\n\t\tws = resource().path(\"omxdata\");\n\t\tClientResponse response = ws.accept(MediaType.APPLICATION_JSON).get(ClientResponse.class);\n\t\tassertEquals(200, response.getStatus());\n\t\tSystem.out.println(response.getStatus());\n\t}", "@Test\n public void getEndpoint() throws IOException {\n CloseableHttpClient httpclient = HttpClients.createDefault();\n\n //Creating a HttpGet object\n HttpPost httppost = new HttpPost(\"https://api.github.com/user/repos\");\n String auth=Credentials.getEmail()+\":\"+Credentials.getPassWard();\n byte[] encodedAuth = Base64.encodeBase64(auth.getBytes(Charset.forName(\"ISO-8859-1\")));\n String authHeader=\"Basic \"+new String(encodedAuth);\n httppost.setHeader(HttpHeaders.AUTHORIZATION,authHeader);\n String json=\"{\\\"name\\\": \\\"ploiko\\\"}\";\n httppost.setEntity(new StringEntity(json, ContentType.APPLICATION_JSON));\n HttpResponse httpresponse = httpclient.execute(httppost);\n System.out.println(httpresponse.getStatusLine());\n int actual=httpresponse.getStatusLine().getStatusCode();\n Assert.assertEquals(actual,201);\n //System.out.println(getHeaders(httpresponse,\"Access-Control-Allow-Methods\"));\n //System.out.println(httpresponse.getAllHeaders().toString());\n\n }", "String getResponse();", "private Integer getStatus(Map<String, Object> info) {\n return 200;\n }", "protected abstract boolean isExpectedResponseCode(int httpStatus);", "HttpStatusCode getStatusCode();", "@Test\n public void getStatus_StatusIsGot_Passes() throws Exception {\n Assert.assertEquals(test1JsonResponse.getStatus(), test1status);\n }", "@Test\n void sendGetRequest() {\n try {\n String response = HttpUtils.sendGet();\n assertFalse(response.contains(\"404\"));\n } catch (IOException e) {\n e.printStackTrace();\n fail();\n }\n }", "@Test\n public void GETProductService_ProductCall() {\n givenHeaders().\n when().\n get(_url_prodservice).//.body().prettyPrint();\n then().\n using().defaultParser(Parser.JSON).\n log().ifError().\n statusCode(200).\n body(\"response\", not(isEmptyString()));\n System.out.print(\"GETProductService_ProductCall Test Run Result\");\n }", "@Test\n\t@Then(\"Validate the positive response code received\")\n\tpublic void validate_the_positive_response_code_received() {\n\t\tint code=response.getStatusCode();\n\t\t System.out.println(\"Status Code Received: \"+code);\n\t\t Assert.assertEquals(200,code);\n\t\t RestAssured.given()\n\t\t\t.when()\n\t\t\t.get(\"https://api.ratesapi.io/api/2050-01-12\") \n\t\t\t.then()\n\t\t\t.log().body();\n\t}", "public static Integer getStatusCode() {\n Response res = (Response) Serenity.getCurrentSession().get(\"apiResponse\");\n return res.then().extract().statusCode();\n //return SerenityRest.then().extract().statusCode();\n }", "@Test\n public void printResponse(){\n when().get(\"http:://34.223.219.142:1212/ords/hr/countries\")\n .body().prettyPrint();\n\n }", "@Test\n public void Task3() {\n given()\n .when()\n .get(\"https://jsonplaceholder.typicode.com/todos/2\")\n .then()\n .statusCode(200)\n .contentType(ContentType.JSON)\n .body(\"title\",equalTo(\"quis ut nam facilis et officia qui\"))\n ;\n }", "public static int doGetList(Result r) {\n // Make an HTTP GET passing the name on the URL line\n r.setValue(\"\");\n String response = \"\";\n HttpURLConnection conn;\n int status = 0;\n try {\n \n URL url = new URL(\"https://intense-lake-93564.herokuapp.com/menusection/\");\n conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"GET\");\n // tell the server what format we want back\n conn.setRequestProperty(\"Accept\", \"text/plain\");\n // wait for response\n status = conn.getResponseCode();\n // If things went poorly, don't try to read any response, just return.\n if (status != 200) {\n // not using msg\n String msg = conn.getResponseMessage();\n return conn.getResponseCode();\n }\n String output = \"\";\n // things went well so let's read the response\n BufferedReader br = new BufferedReader(new InputStreamReader(\n (conn.getInputStream()))); \n while ((output = br.readLine()) != null) {\n response += output; \n } \n conn.disconnect();\n \n }\n catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } \n // return value from server\n // set the response object\n r.setValue(response);\n // return HTTP status to caller\n return status;\n }", "@GetMapping(\"\")\r\n @ResponseStatus(code = HttpStatus.OK)\r\n public void main() {\r\n LOGGER.info(\"GET /\");\r\n }", "abstract Integer getStatusCode();", "private String doHttpClientGet() {\n\t\t\r\n\t\tHttpGet httpGet=new HttpGet(url);\r\n\t\tHttpClient client=new DefaultHttpClient();\r\n\t\ttry {\r\n\t\t\tHttpResponse response=client.execute(httpGet);\r\n\t\t\tif(response.getStatusLine().getStatusCode()==HttpStatus.SC_OK){\r\n\t\t\t\tresult=EntityUtils.toString(response.getEntity());\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"content----->\"+result);\r\n\t\t} catch (ClientProtocolException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "RequestStatus getStatus();", "public String hello() throws Exception {\n\n \t\tString apiUrl = \"api/hello.json\";\n \t\t\n \t\tString url = this.baseUrl + apiUrl;\n\n URL urlObj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) urlObj.openConnection();\n\n con.setRequestMethod(\"GET\");\n\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n int responseCode = con.getResponseCode();\n String response = \"\";\n\t\tif (responseCode == 200) {\n response = buildReponse(con);\n\t\t} else {\n\t response = \"{'error': 'Something went wrong, looks like the server is down.'}\";\n\t\t}\n\n\t\treturn response; \n \t}", "public String getAPI()\n {\n ResponseEntity<String> person;\n\n /*\n\t\t * Headers for the response type if we want to return JSON response then we\n\t\t * require to add.\n */\n HttpHeaders headers = new HttpHeaders();\n\n /*\n\t\t * Adding of the response header with application/json type\n */\n headers.add(\"Accept\", \"application/json\");\n\n /*\n\t\t * Creation of the Entity object for the adding the headers into request.\n */\n entity = new HttpEntity<>(headers);\n\n /*\n\t\t * Creation of REST TEMPLET object for the executing of the REST calls.\n */\n restTemplate = new RestTemplate();\n\n /*\n\t\t * Adding the basic type of authentication on the REST TEMPLETE.\n */\n restTemplate.getInterceptors()\n .add(new BasicAuthorizationInterceptor(\"Administrator\", \"Oneeight@admin18\"));\n\n /*\n\t\t * Execution of the REST call with basic authentication and JSON response type\n */\n person = restTemplate.exchange(\"http://52.172.222.197:8080/versa/login?username=Administrator&password=Oneeight@admin18\", HttpMethod.POST, entity, String.class);\n System.out.println(\"\"+person.toString());\n //headers.add(\"Cookie\", \"JSESSIONID=0FC37952D64B545C46969EFEC0E4FD12\");\n headers.add(\"Cookie\", person.getHeaders().getFirst(HttpHeaders.SET_COOKIE));\n entity = new HttpEntity<>(headers);\n person = restTemplate.exchange(\"http://52.172.222.197:8080/versa/analytics/v1.0.0/data/provider/tenants/OneEight/features/SDWAN/?qt=summary&start-date=1daysAgo&end-date=today&q=linkusage(site)&metrics=volume-rx&metrics=volume-tx&metrics=volume-rx&metrics=volume-tx&metrics=bandwidth&ds=aggregate&count=10\", HttpMethod.GET, entity, String.class);\n\n /*\n\t\t * Returning the response body with string format that easily readable.\n */\n return person.getBody();\n }", "@GET\n @Path(\"location/Arovince\")\n @Produces(\"application/json\")\n public String getJson() throws IOException {\n FileWriter file = new FileWriter(\"/home/component/NetBeansProjects/ArovinceAndSchool/web/api/Arovince.json\");\n JSONObject jsonArray = null;\n\n try {\n URL url = new URL(\"https://opend.data.go.th/get-ckan/datastore_search?resource_id=df922923-e009-4dee-92fc-d963a86ce4b8\"); \n HttpURLConnection httpURLConnection = (HttpURLConnection)url.openConnection();\n httpURLConnection.setRequestMethod(\"GET\");\n httpURLConnection.setRequestProperty(\"api-key\", \"XOe9aVTolOhCbyTU103IqAKTNNNPX8b5\");\n String line = \"\";\n InputStreamReader inputStreamReader = new InputStreamReader(httpURLConnection.getInputStream());\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n StringBuilder response = new StringBuilder();\n\n try {\n while((line = bufferedReader.readLine()) != null) {\n file.write(line);\n response.append(line);\n }\n } catch (IOException var10) {\n }\n\n file.close();\n bufferedReader.close();\n jsonArray = new JSONObject(response.toString());\n return jsonArray.toString(4);\n } catch (Exception var11) {\n return \"\" + var11;\n }\n }", "@GET(\"iss-now.json/\")\n Call<ISStatus> GetLocation();", "@Test\n public void testStatusCode(){\n Assert.assertEquals(resp.getStatusCode(),200, \"Status code does not match\");\n }", "public static int getStatusCode() {\r\n\r\n\r\n\r\n\t\tCloseableHttpResponse response= postSoapRequest(\"getDealList_Request\",baseURI);\r\n\r\n\r\n\r\n\t\tint statuseCode=response.getStatusLine().getStatusCode();\r\n\r\n\t\tSystem.out.println(\"statuseCode= \"+statuseCode);\r\n\r\n\t\t//Assert.assertEquals(200,statuseCode);\r\n\r\n\t\treturn statuseCode;\r\n\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n WebFunction.JsonHeaderInit(resp);\r\n ArticleService svc=new ArticleService();\r\n JSONObject ResultJson = svc.GetType(\"1\");\r\n WebFunction.ResponseJson(resp, ResultJson);\r\n }", "@GET\n @StatusCodes ({\n @ResponseCode ( code = 200, condition = \"Upon a successful read.\"),\n @ResponseCode( code = 204, condition = \"Upon a successful query with no results.\"),\n @ResponseCode( code = 404, condition = \"The specified entity has been moved, deleted, or otherwise not found.\")\n })\n Response get();", "@CrossOrigin\n\t@RequestMapping(value=\"/getStatus\", method= RequestMethod.POST)\n\tpublic JSONObject getStatus(@RequestBody StatusRequestBody requestBody, @RequestHeader HttpHeaders headers){\n\t\tHeadersManager.setHeaders(headers);\n\t\ttry {\n\t\t\tString jobId = requestBody.jobId;\n\t\t\t \n\t\t SimpleResultSet res = new SimpleResultSet();\n\t\t LoggerRestClient logger = LoggerRestClient.getInstance(log_prop);\n\t \tLoggerRestClient.easyLog(logger, \"Status Service\", \"getStatus start\", \"JobId\", jobId);\n\t \tLocalLogger.logToStdOut(\"Status Service getStatus start JobId=\" + jobId);\n\t\n\t \t\n\t\t try {\n\t\t \t\n\t\t \tJobTracker tracker = this.getTracker();\n\t\t \n\t\t\t res.addResult(SimpleResultSet.STATUS_RESULT_KEY, String.valueOf(tracker.getJobStatus(jobId)));\n\t\t\t res.setSuccess(true);\n\t\t\t \n\t\t } catch (Exception e) {\n\t\t \tres.setSuccess(false);\n\t\t \tres.addRationaleMessage(SERVICE_NAME, \"getStatus\", e);\n\t\t\t LoggerRestClient.easyLog(logger, \"Status Service\", \"getStatus exception\", \"message\", e.toString());\n\t\t\t LocalLogger.logToStdOut(\"Status Service getStatus exception message=\" + e.toString());\n\t\t } \n\t\t \n\t\t return res.toJson();\n\t\t \n\t\t} finally {\n\t \tHeadersManager.clearHeaders();\n\t }\n\t}", "private static String sendGET(String getURL) throws IOException {\n\t\tURL obj = new URL(getURL);\n\t\tHttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\t\tcon.setRequestMethod(\"GET\");\n\t\tString finalResponse = \"\";\n\n\t\t//This way we know if the request was processed successfully or there was any HTTP error message thrown.\n\t\tint responseCode = con.getResponseCode();\n\t\tSystem.out.println(\"GET Response Code : \" + responseCode);\n\t\tif (responseCode == HttpURLConnection.HTTP_OK) { // success\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t\t\tString inputLine;\n\t\t\tStringBuffer buffer = new StringBuffer();\n\n\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\tbuffer.append(inputLine);\n\t\t\t}\n\t\t\tin.close();\n\n\t\t\t// print result\n\t\t\tfinalResponse = buffer.toString();\n\t\t} else {\n\t\t\tSystem.out.println(\"GET request not worked\");\n\t\t}\n\t\treturn finalResponse;\n\t}", "public static int doGet(String id, Result r) {\n r.setValue(\"\");\n String response = \"\";\n HttpURLConnection conn;\n int status = 0;\n try {\n // pass the name on the URL line\n URL url = new URL(\"https://intense-lake-93564.herokuapp.com/menusection/\" + \"//\"+id);\n conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"GET\");\n // tell the server what format we want back\n conn.setRequestProperty(\"Accept\", \"text/plain\");\n // wait for response\n status = conn.getResponseCode();\n // If things went poorly, don't try to read any response, just return.\n if (status != 200) {\n // not using msg\n String msg = conn.getResponseMessage();\n return conn.getResponseCode();\n }\n String output = \"\";\n // things went well so let's read the response\n BufferedReader br = new BufferedReader(new InputStreamReader(\n (conn.getInputStream())));\n while ((output = br.readLine()) != null) {\n response += output;\n }\n conn.disconnect(); \n }\n catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n // return value from server\n // set the response object\n r.setValue(response);\n // return HTTP status to caller\n return status;\n }", "@Test\n public void GETProduct_ProductInventoryCall() {\n\n givenHeaders().\n when().\n get(_url_product).//.body().prettyPrint();\n then().\n using().defaultParser(Parser.JSON).\n log().ifError().\n statusCode(200).\n body(\"response\", not(isEmptyString()));\n System.out.print(\"GETPRODUCT_Inventory Test Run Result\");\n }", "private void showWeb() throws IOException{\n\n InputStream inputStream;\n BufferedReader bufferedReader;\n PrintWriter out;\n String request;\n String response;\n String[] requestParam;\n String[] requestParamButton;\n String path;\n String sensorDataIndex;\n String message = \"Don't have a Products\";\n String historyURL = \"/history\";\n String listURL = \"/list\";\n String invoiceURL = \"/invoice\";\n String testBadURL = \"/testError\";\n String buyForURL = \"/buyFor\";\n String pathForRefresh = \"\";\n String topic =\"\";\n //For test Status\n String httpStatus = \"\";\n\n try{\n inputStream = socket.getInputStream();\n bufferedReader = new BufferedReader(new InputStreamReader(inputStream));\n request = bufferedReader.readLine();\n if(!request.isEmpty()){\n System.out.println(request);\n requestParam = request.split(\" \");\n path = requestParam[1];\n System.out.println(path);\n if(!path.isEmpty()){\n requestParamButton = path.split(\":\");\n System.out.println(\"requestParamButton lenght is : \" + requestParamButton.length\n + \" last index have \" + requestParamButton[requestParamButton.length - 1]);\n sensorDataIndex = requestParamButton[requestParamButton.length - 1];\n }else{\n sensorDataIndex = \"0\";\n }\n //sensorDataIndex = \"0\";\n\n if(path.contains(buyForURL)){\n manuelOrder(sensorDataIndex);\n message = makeOneStringList();\n httpStatus = \"HTTP/1.1 200\";\n topic = \"List of products : \";\n pathForRefresh = listURL;\n }\n if(path.equals(invoiceURL)){\n message = makeOneStringInvoice();\n httpStatus = \"HTTP/1.1 200\";\n topic = \"Invoise : \";\n pathForRefresh = invoiceURL;\n }\n if(path.equals(historyURL)){\n message = makeOneStringHistory();\n httpStatus = \"HTTP/1.1 200\";\n topic = \"History of products : \";\n pathForRefresh = historyURL;\n }\n if(path.equals(listURL)){\n message = makeOneStringList();\n httpStatus = \"HTTP/1.1 200\";\n topic = \"List of products : \";\n pathForRefresh = listURL;\n /** compare Data from actualSensorData with response Data */\n //testShowList(message);\n }\n /** if path not equals /list or /history will be BAD REQUEST with status 400 */\n if(!path.equals(listURL) && !path.equals(historyURL) && !path.equals(invoiceURL) && !path.contains(buyForURL)){\n message = \"<h1 style='color:red'> BAD REQUEST, ALLOWED ONLY HTTP GET /list or /history REQUESTS </h1>\";\n httpStatus = \"HTTP/1.1 400\";\n topic = \"<h1 style='color:red'> ERROR </h1>\";\n pathForRefresh = testBadURL;\n }\n\n }\n\n /** Color test */\n //testColor(message,httpStatus);\n\n out = new PrintWriter(socket.getOutputStream());\n out.println(httpStatus);\n out.println(\"Content-type: text/html\");\n out.println(\"Server-name: myServer\");\n response = \"<html>\" + \"<head>\"\n + \"<meta http-equiv=\\\"refresh\\\" content=\\\"2\\\"; url=localhost:8282\" + pathForRefresh + \">\"\n + \"<meta charset='utf-8'>\" // Umlauts\n + \"<link rel=\\\"icon\\\" href=\\\"data:;base64,iVBORw0KGgo=\\\">\" // How to prevent favicon.ico requests?\n + \"<title>My Web Server</title></head>\"\n + \"<h1>Your request: \" + request + \"</h3>\"\n + \"<table width=\\\"200\\\">\"\n + \"<td><h3><a href=\\\"/list \\\">List</a></h3></td>\"\n + \"<td><h3><a href=\\\"/history \\\">History</a></h3></td>\"\n + \"<td><h3><a href=\\\"/testError \\\">TestError</a></h3></td>\"\n + \"<td><h3><a href=\\\"/invoice \\\">Invoice</a></h3></td>\"\n + \"<td><h3><a href=\\\"/buyFor \\\">BuyFor</a></h3></td>\"\n + \"</table>\"\n + \"<h1>\" + topic + \"</h1>\"\n + \"<table width=\\\"200\\\">\"\n + \"<h3>\" + message + \"</h3>\"\n + \"</table>\"\n + \"</html>\";\n out.println(\"Content-length: \" + response.length());\n out.println(\"\");\n out.println(response);\n out.flush();\n //out.close();\n //bufferedReader.close();\n }\n catch (IOException e)\n {\n System.out.println(\"Failed respond to client request: \" + e.getMessage());\n }\n\n }", "private static String makeHttpRequest(URL url) throws IOException {\n String JSONResponse = null;\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(Constants.URL_REQUEST_METHOD);\n urlConnection.setReadTimeout(Constants.URL_READ_TIME_OUT);\n urlConnection.setConnectTimeout(Constants.URL_CONNECT_TIME_OUT);\n urlConnection.connect();\n\n if (urlConnection.getResponseCode() == Constants.URL_SUCCESS_RESPONSE_CODE) {\n inputStream = urlConnection.getInputStream();\n JSONResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Response code : \" + urlConnection.getResponseCode());\n // If received any other code(i.e 400) return null JSON response\n JSONResponse = null;\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error Solving JSON response : makeHttpConnection() block\");\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n // Input stream throws IOException when trying to close, that why method signature\n // specify about IOException\n }\n }\n return JSONResponse;\n }", "@Test\n\tpublic static void TC1() throws IOException {\n\t\t// TODO Auto-generated method stub\n \n\t\tInteger n = RandomDataGeneration.randomNumber();\n\n\t\tProperties pr = PropertiesFile.readProperties(\"../APIAutomationFW/URI.properties\");\n\t\tString requestpayload = JsonFile.readJson(\"../APIAutomationFW/src/test/java/org/testing/resources/BodyData.json\");\n\t\trequestpayload = JsonVariableReplacement.jsonReplace(requestpayload, \"id\", n.toString());\n\t\tHttpMethods http = new HttpMethods(pr);\nResponse res =\thttp.postRequest(requestpayload, \"QA_URI\");\nresponseIdValue = JsonParsingUsingOrgJson.jsonParse(res.asString(), \"id\"); \t\n\nSystem.out.println(\"Response code is\" + responseIdValue);\n\t\n\t}", "private static String executeRequest(String url) throws IOException {\n\n\t\tLog.d(RiotJsonRequest.class.getSimpleName() , url);\n\t\t\n\t\tSocket s = new Socket(IP, PORT);\n\t\tPrintStream ps = new PrintStream(s.getOutputStream());\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"PS OPENED\");\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(\n\t\t\t\ts.getInputStream()));\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"BR OPENED\");\n\t\tps.println(url);\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"URL PRNTED\");\n\t\tString response = r.readLine();\n\t\t//Log.d(RiotJsonRequest.class.getSimpleName() , \"RESPONSE: \" + response);\n\t\treturn response;\n\n\t\t// boolean unsuccessful = true;\n\t\t// int tries = 0;\n\t\t// String response = \"\";\n\t\t// while(unsuccessful && tries != 3){\n\t\t// unsuccessful = false;\n\t\t// URL requestUrl = new URL(url);\n\t\t// HttpsURLConnection connection = (HttpsURLConnection)\n\t\t// requestUrl.openConnection();\n\t\t// try{\n\t\t// Log.d(RiotJsonRequest.class.getSimpleName() , url);\n\t\t// connection.setRequestMethod(\"GET\");\n\t\t// connection.getResponseCode();\n\t\t//\n\t\t// //connection.\n\t\t//\n\t\t// connection.connect();\n\t\t//\n\t\t//\n\t\t//\n\t\t//\n\t\t// //Needs error checking on connection\n\t\t//\n\t\t// InputStream in = new\n\t\t// BufferedInputStream(connection.getInputStream());\n\t\t// BufferedReader reader = new BufferedReader(new\n\t\t// InputStreamReader(in));\n\t\t// StringBuffer buffer = new StringBuffer();\n\t\t// String line;\n\t\t//\n\t\t// //reads response in and appends it to buffer\n\t\t// do{\n\t\t// line = reader.readLine();\n\t\t// buffer.append(line);\n\t\t// }while (line != null);\n\t\t//\n\t\t// //disconnects the HttpURLConnection so other requests can be made\n\t\t// connection.disconnect();\n\t\t// //Log.d(RiotJsonRequest.class.getSimpleName() , \"RECEIVED: \" +\n\t\t// buffer.toString());\n\t\t// response = buffer.toString();\n\t\t// }catch(Exception e){\n\t\t// String code = Integer.toString(connection.getResponseCode());\n\t\t// Log.d(RiotJsonRequest.class.getSimpleName() , \"CODE: \" + code);\n\t\t// if(code.equals(\"404\")){\n\t\t// return code;\n\t\t// }\n\t\t// unsuccessful = true;\n\t\t// tries++;\n\t\t// connection.disconnect();\n\t\t// connection = null;\n\t\t// requestUrl = null;\n\t\t// try {\n\t\t// Thread.sleep(1000);\n\t\t// } catch (InterruptedException e1) {\n\t\t// e1.printStackTrace();\n\t\t// }\n\t\t// }\n\t\t// }\n\t\t// return response;\n\t}", "private JSONObject sendRequestWithOkHttp(int page) {\n JSONObject json = null;\n String url = \"\";\n if (chatroom_id != null) {\n url = String.format(\"http://13.112.156.96/api/asgn3/get_messages?%s&%s\", \"chatroom_id=\" + chatroom_id, \"page=\" + page);\n }\n OkHttpClient client = new OkHttpClient();\n Log.d(GET, url);\n Request request = new Request.Builder()\n .url(url)\n .build();\n try {\n Response response = client.newCall(request).execute();\n String responseData = response.body().string();\n json = new JSONObject(responseData);\n Log.d(GET, String.valueOf(json.get(\"status\")));\n } catch (Exception e) {\n e.printStackTrace();\n Log.d(GET, \"GET Request error\");\n }\n return json;\n }", "@DisplayName(\"Spartan /api/hello Endpoint Test\")\n @Test\n public void TestHello(){\n Response response = get(\"http://3.95.214.153:8000/api/hello\");\n\n // get status code out of this Response object\n System.out.println(\"response.statusCode() = \" + response.statusCode());//200\n\n // assert the status code is 200\n assertThat(response.statusCode(),is(200));\n\n // how to pretty print entire \"response body\"\n // prettyPrint() -- print and return the body as String\n String responseBodyAsString = response.prettyPrint();//print the body as a String\n\n System.out.println(\"==========================\");\n\n // assertThat the body is Hello from Sparta\n assertThat(responseBodyAsString,is(\"Hello from Sparta\"));\n\n // get the header called ContentType from the response\n //three ways of getting content-Type header in restAssure\n System.out.println(\"response.getHeader(\\\"Content-Type\\\") = \" + response.getHeader(\"Content-Type\"));//text/plain;charset=UTF-8 as String\n System.out.println(\"response.getContentType() = \" + response.getContentType());//text/plain;charset=UTF-8 as String\n System.out.println(\"response.contentType() = \" + response.contentType());//returns text/plain;charset=UTF-8 as String\n System.out.println(\"response.header(\\\"Content-Type\\\") = \" + response.header(\"Content-Type\"));//text/plain;charset=UTF-8\n\n\n // assert That Content-Type is text/plain;charset=UTF-8\n assertThat(response.contentType() , is(\"text/plain;charset=UTF-8\") );\n // assert That Content-Type startWith text\n assertThat(response.contentType(),startsWith(\"text\"));\n\n\n // Easy way to work with Content-type without typing much\n // We can use \"ContentType Enum\" from RestAssured to easily get \"main\" part content-type\n // ContentType.TEXT -->> returns text/plain as Enum(Object) not as String\n // startWith accept a String object\n // so use toString method to convert ContentType.TEXT to String so we can use it startWith\n //response.contentType() ===returns you String\n assertThat(response.contentType(),startsWith(ContentType.TEXT.toString()));// /api/hello end point returns us ONLY plain text\n\n assertThat(response.contentType() , is( not(ContentType.JSON) ) );//since end point does not return us JSON we can assert that this endpoint does not return JSON\n\n\n\n }", "String getEEapi(String url, Map<String, String> params, int expectedStatus);", "@RequestMapping(value = \"/test\", method = RequestMethod.GET)\n\tpublic @ResponseBody ResponseEntity test() throws Exception {\n\t\tAppResponse appResponse = new AppResponse();\n\t\tappResponse.setMessage(AppConstants.CONNECTION_STATUS);\n\t\treturn new ResponseEntity<>(appResponse, HttpStatus.OK);\n\t}", "public void GetCall(String url) throws ClientProtocolException, IOException {\n\t\tCloseableHttpClient httpclient=HttpClients.createDefault();\n\t\tHttpGet httpget=new HttpGet(url);\n\t//lohith\n\t\tCloseableHttpResponse closeablehttpresponse=httpclient.execute(httpget);\n\t\tint responsestatuscode=closeablehttpresponse.getStatusLine().getStatusCode();\n\t\tSystem.out.println(\"responsestatuscode: \"+responsestatuscode);\n\t\t\n\t\tString response=EntityUtils.toString(closeablehttpresponse.getEntity(),\"UTF-8\");\n\t\tSystem.out.println(\"ClientResponse: \"+response);\n\t\tJSONObject jsonobject= new JSONObject(response);\n\t\t\n\t\tSystem.out.println(\"jsonobject: \"+jsonobject);\n\t\t\n\t\t\n\t}", "public abstract int statusCode();", "@Test\n public void shouldReturnOkStatus() throws Exception {\n mockMvc.perform(get(API_MOOD_TYPE, \"angry\"))\n .andExpect(status().isOk());\n\n mockMvc.perform(get(API_MOOD_TYPE, \"cherry\"))\n .andExpect(status().isOk());\n }", "@RequestLine(\"GET /status\")\n Status getNeustarNetworkStatus();", "private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000);\n urlConnection.setConnectTimeout(15000);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the Guardian JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "@GetMapping(value = \"/ping\",produces = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<String> pingService(InputStream req) {\n return new ResponseEntity<String>(\"{\\\"operation\\\": \\\"ping\\\", \\\"status\\\": \\\"SUCCESS\\\"}\", HttpStatus.OK);\n }", "public void doGet() throws IOException {\n\n // search ressource\n byte[] contentByte = null;\n try {\n contentByte = ToolBox.readFileByte(RESOURCE_DIRECTORY, this.url);\n this.statusCode = OK;\n ContentType contentType = new ContentType(this.extension);\n sendHeader(statusCode, contentType.getContentType(), contentByte.length);\n } catch (IOException e) {\n System.out.println(\"Ressource non trouvé\");\n statusCode = NOT_FOUND;\n contentByte = ToolBox.readFileByte(RESPONSE_PAGE_DIRECTORY, \"pageNotFound.html\");\n sendHeader(statusCode, \"text/html\", contentByte.length);\n }\n\n this.sendBodyByte(contentByte);\n }", "@Test\n void simpleBddTest(){\n given()\n .baseUri(\"https://reqres.in/api\")\n .basePath(\"/users?page=2\")\n\n //когда система\n .when().get()\n\n .then().statusCode(200)\n .and().header(\"Content-Type\", \"application/json; charset=utf-8\");\n }", "private MockHttpServletResponse httpServletResponse(HttpMethod httpMethod, String url, String json,\n\t\t\tResultMatcher status) throws Exception {\n\t\tMockHttpServletRequestBuilder requestBuilder = null;\n\n\t\tif (HttpMethod.POST.equals(httpMethod)) {\n\t\t\trequestBuilder = post(url).contentType(Constants.APPLICATION_JSON_UTF_8);\n\t\t} else if (HttpMethod.GET.equals(httpMethod)) {\n\t\t\trequestBuilder = get(url).contentType(Constants.APPLICATION_JSON_UTF_8);\n\t\t} else if (HttpMethod.PUT.equals(httpMethod)) {\n\t\t\trequestBuilder = put(url).contentType(Constants.APPLICATION_JSON_UTF_8);\n\t\t} else if (HttpMethod.DELETE.equals(httpMethod)) {\n\t\t\trequestBuilder = delete(url).contentType(Constants.APPLICATION_JSON_UTF_8);\n\t\t}\n\n\t\tif (json != null) {\n\t\t\tObjects.requireNonNull(requestBuilder).content(json);\n\t\t}\n\n\t\treturn mockMvc.perform(Objects.requireNonNull(requestBuilder)).andDo(print()).andExpect(status).andReturn()\n\t\t\t\t.getResponse();\n\t}", "private String sendRequest(String responseType, String token, Object body, String path, String expectResult, int statusCode) {\n RestAssured.config = RestAssured.config().sslConfig(SSLConfig.sslConfig().allowAllHostnames());\n\n Map<String, Object> header = new HashMap<>();\n header.put(\"Accept-Language\", \"en,ar\");\n if (body != null) {\n if (body instanceof Map) {\n Map<String, Object> bodyMap = (Map) body;\n if (bodyMap.containsKey(\"Accept-Language\")) {\n header.put(\"Accept-Language\", bodyMap.get(\"Accept-Language\"));\n }\n }\n }\n if (token != null) header.put(\"Authorization\", token);\n\n RequestSpecification request = given()\n .contentType(\"application/json\")\n .headers(header);\n\n if (body != null) request.body(body);\n\n request.when();\n\n// bypass statusCode - 429 ------------------------------------------------------\n Response resp = setResponse(responseType, request, path);\n\n if (resp.statusCode() == statusCode429) {\n sleep(2000);\n log(\"statusCode - \" + resp.statusCode());\n resp = setResponse(responseType, request, path);\n }\n\n String response = resp\n .then()\n .log().all()\n .statusCode(statusCode)\n .extract().response()\n .asString();\n// ---------------------------------------------------------------------------------\n\n\n// without bypass statusCode - 429 ----------------------------------------------\n// String response = setResponse(responseType, request, path)\n// .then()\n// .statusCode(statusCode)\n// .log().all()\n// .extract().response()\n// .asString();\n// ---------------------------------------------------------------------------------\n\n if (expectResult.equals(allResult)) return response;\n return from(response).getString(expectResult);\n }", "@Path(\"/\")\n @GET\n @Produces(MediaType.APPLICATION_JSON) // indique que la réponse est en json\n public Response test(@Context final UriInfo ui) {\n\n return Response.ok(true).build();\n }", "public abstract String getResponse();", "@Test\n\t\tpublic void testRestSuccessfulResponse() throws Exception {\n\n\t\t\tString responseBody = TestUtils.getValidResponse();\n\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tResponseEntity<ResponseWrapper> responseEntity= prepareReponseEntity(responseBody);\n\t\t\t\t\n\t\t\t\tboolean flag=weatherService.checkForErrors(responseEntity);\n\t\t\t\tassertFalse(flag);\n\t\t\t\n\t\t\t\tthis.mockServer.verify();\n\t\t\t} catch (Exception e) {\n\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "@GET\n @Path(\"{path : .+}\")\n @Produces(value = MediaType.APPLICATION_JSON)\n// @ApiOperation(value = \"Retrieve a image by id\",\n// produces = MediaType.APPLICATION_JSON)\n// @ApiResponses({\n// @ApiResponse(code = HttpStatus.NOT_FOUND_404,\n// message = \"The requested image could not be found\"),\n// @ApiResponse(code = HttpStatus.BAD_REQUEST_400,\n// message = \"The request is not valid. The response body will contain a code and \" +\n// \"details specifying the source of the error.\"),\n// @ApiResponse(code = HttpStatus.UNAUTHORIZED_401,\n// message = \"User is unauthorized to perform the desired operation\")\n// })\n\n public Response getMethod(\n @ApiParam(name = \"id\", value = \"id of page to retrieve image content\", required = true)\n @PathParam(\"path\") String getpath, @Context HttpServletRequest httpRequest, @Context UriInfo uriInfo) {\n String contentType = \"application/json\";\n String method = \"getMethod\";\n String httpMethodType = \"GET\";\n String resolvedResponseBodyFile = null;\n Response.ResponseBuilder myresponseFinalBuilderObject = null;\n\n try {\n\n\n\n String paramPathStg = getpath.replace(\"/\", \".\");\n\n //Step 1: Get responseGuidanceObject\n //TODO: handle JsonTransformationException exception.\n LocationGuidanceDTO responseGuidanceObject = resolveResponsePaths(httpMethodType, paramPathStg);\n\n //Step 2: Create queryparams hash and headers hash.\n Map<String, String> queryParamsMap = grabRestParams(uriInfo);\n Map<String, String> headerMap = getHeaderMap(httpRequest);\n\n\n //Step 3: TODO: Resolve header and params variables from Guidance JSON Body.\n resolvedResponseBodyFile = findExtractAndReplaceSubStg(responseGuidanceObject.getResponseBodyFile(), HEADER_REGEX, headerMap);\n resolvedResponseBodyFile = findExtractAndReplaceSubStg(resolvedResponseBodyFile, PARAMS_REGEX, headerMap);\n\n //Step 4: TODO: Validate responseBody, responseHeader, responseCode files existence and have rightJson structures.\n\n //Step 6: TODO: Grab responses body\n\n String responseJson = replaceHeadersAndParamsInJson(headerMap, queryParamsMap, resolvedResponseBodyFile);\n\n //Step 5: TODO: Decorate with response header\n String headerStg = \"{\\\"ContentType\\\": \\\"$contentType\\\"}\";\n\n //Step 7: TODO: Grab response code and related responsebuilderobject\n Response.ResponseBuilder myRespBuilder = returnRespBuilderObject(responseGuidanceObject.getResponseCode(), null).entity(responseJson);\n\n //Step 5: TODO: Decorate with response headers\n myresponseFinalBuilderObject = decorateWithResponseHeaders(myRespBuilder, responseGuidanceObject.getResponseHeaderFile());\n\n return myresponseFinalBuilderObject.build();\n } catch (IOException ex) {\n logger.error(\"api={}\", \"getContents\", ex);\n mapAndThrow(ex);\n }\n return myresponseFinalBuilderObject.build();\n }", "public void testHttpGetMarcadores() {\n HttpGet httpget = new HttpGet(\"http://www.movil.resultados-futbol.com/segunda\");\n HttpClient httpclient = new DefaultHttpClient();\n HttpResponse response = null;\n\n try {\n response = httpclient.execute(httpget);\n } catch(Exception e) {\n fail(\"Excepcion\");\n }\n\n assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode() );\n }", "public boolean getResponseStatus();", "public int handleGET(String requestURL) throws ClientProtocolException, IOException{\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\thttpGet = new HttpGet(requestURL);\t\t\r\n\t\t\t\t\t\t\r\n\t\tinputsource=null;\r\n\t\t\t\r\n\t\toutputString=\"\";\r\n\t\t\r\n\t\t//taking response by executing http GET object\r\n\t\tCloseableHttpResponse response = httpclient.execute(httpGet);\t\t\r\n\t\r\n\t\t/* \r\n\t\t * \tThe underlying HTTP connection is still held by the response object\r\n\t\t\tto allow the response content to be streamed directly from the network socket.\r\n\t\t\tIn order to ensure correct deallocation of system resources\r\n\t\t\tthe user MUST call CloseableHttpResponse.close() from a finally clause.\r\n\t\t\tPlease note that if response content is not fully consumed the underlying\r\n\t\t\tconnection cannot be safely re-used and will be shut down and discarded\r\n\t\t\tby the connection manager.\r\n\t\t */\r\n\t\t\r\n\t\t\tstatusLine= response.getStatusLine().toString();\t\t//status line\r\n\t\t\t\r\n\t\t\tHttpEntity entity1 = response.getEntity();\t\t\t\t//getting response entity from server response \t\r\n\t\t\t\t\t\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(entity1.getContent()));\r\n\r\n\t\t\tString line;\r\n\t\t\twhile((line=br.readLine())!=null)\r\n\t\t\t{\r\n\t\t\t\toutputString=outputString+line.toString();\r\n\t }\r\n\t\t\t\r\n\t\t\t//removing spaces around server response string.\r\n\t\t\toutputString.trim();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t//converting server response string into InputSource.\r\n\t\t\tinputsource = new InputSource(new StringReader(outputString));\t\r\n\t\t\t\r\n\t\t\t// and ensure it is fully consumed\r\n\t\t\tEntityUtils.consume(entity1);\t\t\t//consuming entity.\r\n\t\t\tresponse.close();\t\t\t\t\t\t//closing response.\r\n\t\t\tbr.close();\t\t\t\t\t\t\t\t//closing buffered reader\r\n\t\t\t\r\n\t\t\t//returning response code\r\n\t\t\treturn response.getStatusLine().getStatusCode();\r\n\t\r\n\t}", "@Test\n\tpublic void requestDataForCustomer12212_checkResponseCode_expect200() {\n\n\t\tgiven().\n\t\t\tspec(requestSpec).\n\t\twhen().\n\t\tthen();\n\t}", "@Test\n\tpublic void testEsempio() throws UnirestException {\n\t\tHttpResponse<String> response = Unirest.get(\"http://localhost:8080/TrackingVehicle/tracking/tracking/cercaveicolo/QWE123456\")\n\t\t\t\t .header(\"Cache-Control\", \"no-cache\")\n\t\t\t\t .header(\"Postman-Token\", \"b0269d33-a6e2-40f3-9c86-99b27e9ecaee\")\n\t\t\t\t .asString();\n\t}", "private String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.connect();\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n return jsonResponse;\n }\n\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem Http Request\", e);\n } catch (Exception e) {\n Log.e(LOG_TAG, \"Problem Http Request\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n // function must handle java.io.IOException here\n inputStream.close();\n }\n }\n return jsonResponse;\n }", "@GetMapping(path=\"/json\")\n public String getTodos() {\n String theUrl = \"http://localhost:8080/hello\";\n ResponseEntity<String> response = restTemplate.exchange(theUrl, HttpMethod.GET, null, String.class);\n\n return response.getBody();\n }", "private static String makeHTTPRequest(URL url) throws IOException {\n\n // Create an empty json string\n String jsonResponse = \"\";\n\n //IF url is null, return early\n if (url == null) {\n return jsonResponse;\n }\n\n // Create an Http url connection, and an input stream, making both null for now\n HttpURLConnection connection = null;\n InputStream inputStream = null;\n\n try {\n\n // Try to open a connection on the url, request that we GET info from the connection,\n // Set read and connect timeouts, and connect\n connection = (HttpURLConnection) url.openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setReadTimeout(10000 /*Milliseconds*/);\n connection.setConnectTimeout(15000 /*Milliseconds*/);\n connection.connect();\n\n // If response code is 200 (aka, working), then get and read from the input stream\n if (connection.getResponseCode() == 200) {\n\n Log.v(LOG_TAG, \"Response code is 200: Aka, everything is working great\");\n inputStream = connection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n\n } else {\n // if response code is not 200, Log error message\n Log.v(LOG_TAG, \"Error Response Code: \" + connection.getResponseCode());\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error making http request: \" + e);\n } finally {\n // If connection and inputStream are NOT null, close and disconnect them\n if (connection != null) {\n connection.disconnect();\n }\n\n if (inputStream != null) {\n // Closing the input stream could throw an IOException, which is why\n // the makeHttpRequest(URL url) method signature specifies that an IOException\n // could be thrown.\n inputStream.close();\n }\n }\n\n return jsonResponse;\n }", "static String request(String requestMethod, String input, String endURL)\n {\n StringBuilder result;\n result = new StringBuilder();\n try\n {\n String targetURL = firstURL + endURL;\n URL ServiceURL = new URL(targetURL);\n HttpURLConnection httpConnection = (HttpURLConnection) ServiceURL.openConnection();\n httpConnection.setRequestMethod(requestMethod);\n httpConnection.setRequestProperty(\"Content-Type\", \"application/json; charset=UTF-8\");\n httpConnection.setDoOutput(true);\n\n switch (requestMethod) {\n case \"POST\":\n\n httpConnection.setDoInput(true);\n OutputStream outputStream = httpConnection.getOutputStream();\n outputStream.write(input.getBytes());\n outputStream.flush();\n\n result = new StringBuilder(\"1\");\n break;\n case \"GET\":\n\n BufferedReader responseBuffer = new BufferedReader(new InputStreamReader((httpConnection.getInputStream())));\n String tmp;\n while ((tmp = responseBuffer.readLine()) != null) {\n result.append(tmp);\n }\n break;\n }\n\n if (httpConnection.getResponseCode() != 200)\n throw new RuntimeException(\"HTTP GET Request Failed with Error code : \" + httpConnection.getResponseCode());\n\n httpConnection.disconnect();\n\n } catch (IOException exception) {\n exception.printStackTrace();\n }\n return result.toString();\n }", "@GetMapping(path = ApiConstant.HEALTH_CHECK_API, produces = APPLICATION_JSON_VALUE)\n public ResponseEntity checkHealth() {\n logger.info(\"Health checking.\");\n HashMap<String, String> map = new HashMap<>();\n map.put(\"status\", \"OK\");\n return new ResponseEntity<>(map, HttpStatus.OK);\n }", "@Test\n public void VerifyContentTypeWithAssertThat(){\n given().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/employees/100\")\n .then().assertThat().statusCode(200)\n .and().contentType(ContentType.JSON);\n }", "@Test\n public void getRequest1() {\n str = METHOD_GET + \"/JavaPower.gif \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": www.devresource.org\" + ENDL +\n ACCEPT + \": text/html\" + ENDL +\n \"Range-Unit: 3388 | 1024\";\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"/JavaPower.gif\");\n assertEquals(request.getHeader(ACCEPT), \"text/html\");\n assertEquals(request.getHeader(\"Range-Unit\"), \"3388 | 1024\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }", "trinsic.services.common.v1.CommonOuterClass.ResponseStatus getStatus();", "@Test\r\n\tpublic void getAllIncidents() {\n\t\tRestAssured.baseURI = \"https://dev49243.service-now.com/api/now/table/incident\";\r\n\t\t\r\n\t\t// Step 2: Authentication (basic)\r\n\t\tRestAssured.authentication = RestAssured.basic(\"admin\", \"Tuna@123\");\r\n\t\t\r\n\t\t// Step 3: Request type - Get -> Response\r\n\t\tResponse response = RestAssured.get();\r\n\t\t\r\n\t\t// Step 4: Validate (Response -> Status Code : 200)\r\n\t\tSystem.out.println(response.getStatusCode());\r\n\t\t\r\n\t\t// Print the response time as well \r\n\t\t\r\n\t\t// Check what is the response format\r\n\t\tSystem.out.println(response.getContentType());\r\n\t\t\r\n\t\t// print the response\r\n\t\tresponse.prettyPrint();\r\n\t\t\r\n\t}", "public void httpclient(String url){\n\t\t\r\n\t\t\r\n\t\tString httpUrl =BASIC_URL+url;\r\n\t\t\r\n\t\tSystem.out.println(httpUrl);\r\n\t\t\r\n\t\tHttpGet method =new HttpGet(httpUrl);\r\n\t\t\r\n\t\tmethod.setHeader(\"Content-Type\",\"application/json\");\r\n\t\tmethod.setHeader(\"charset\",\"UTF-8\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\tCloseableHttpResponse res =client.execute(method,context);\r\n\r\n\t\t AuthState targetAuthState = context.getTargetAuthState();\r\n\t\t System.out.println(\"Target auth state: \" + targetAuthState.getState());\r\n\t\t System.out.println(\"Target auth scheme: \" + targetAuthState.getAuthScheme());\r\n\t\t System.out.println(\"Target auth credentials: \" + targetAuthState.getCredentials());\r\n\t\t\t\r\n\t\t HttpEntity ent =res.getEntity();\r\n\t\t \r\n\t\t if (ent != null) { \r\n System.out.println(\"Response content length: \" + ent.getContentLength()); \r\n System.out.println(ent+\"3214242423\");\r\n \r\n System.out.println(EntityUtils.toString(ent));\r\n } \r\n\t\t \r\n\t\t} catch (IOException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public SearchResponse getStatus();", "@When(\"user calls {string} with {string} http request\")\n public void user_calls_with_http_request(String AMAR, String HTTPreq) {\n pojoEnum pEnum =pojoEnum.valueOf(AMAR);\n resSpec = new ResponseSpecBuilder()\n .expectStatusCode(200)\n .expectContentType(ContentType.JSON).build();\n if(HTTPreq.equalsIgnoreCase(\"POST\")){\n response = res.when().post(pEnum.getResource());\n }\n else if(HTTPreq.equalsIgnoreCase(\"GET\")){\n response = res.when().get(pEnum.getResource());\n }\n else if(HTTPreq.equalsIgnoreCase(\"DELETE\")){\n response = res.when().delete(pEnum.getResource());\n }\n else if(HTTPreq.equalsIgnoreCase(\"PUT\")){\n response = res.when().put(pEnum.getResource());\n\n }\n String responseString = response.asString();\n System.out.println(\"This is the Response ---->\" +responseString);\n\n }", "private String setServerStatusCode()\n\t{\n\t\t\n\t\tString response = null;\n\t HttpClient client = new DefaultHttpClient();\n\t HttpPost post = new HttpPost(\"http://10.184.0.132:8005/ContextAwareFrameworkWebService/apiCheckTest1\");\n\t Log.d(\"Debug\",\"test1\");\n\t // set values you'd like to send\n\t List pairs = new ArrayList();\n\t //pairs.add(new BasicNameValuePair(\"devEmail\", developerEmail));\n\t //pairs.add(new BasicNameValuePair(\"apiKey\", ApiKey));\n\t pairs.add(new BasicNameValuePair(\"pkgName\", appPkgName));\n\t pairs.add(new BasicNameValuePair(\"appId\", appId));\n\t pairs.add(new BasicNameValuePair(\"userEmail\", userEmailId));\n\t pairs.add(new BasicNameValuePair(\"\", deviceId));\n\t pairs.add(new BasicNameValuePair(\"random\", \"randomConstant\"));\n\t try {\n\t post.setEntity(new UrlEncodedFormEntity(pairs));\n\t // set ResponseHandler to handle String responses\n\t ResponseHandler<String> responseHandler = new BasicResponseHandler();\n\t response = client.execute(post, responseHandler);\n\t serverRequestStatus = true;\n\t serverStatus = response;\n\t Log.v(\"HttpPost\", \"Response: \" + serverStatus);\n\t } \n\t catch (Exception e) \n\t {\n\t \tLog.e(\"Debug\",\"Error in post method\");\n\t \te.printStackTrace();\n\t }\n\t \n\t return response;\n\t}" ]
[ "0.68354225", "0.682674", "0.66291565", "0.6582131", "0.65496004", "0.65453845", "0.65231913", "0.65127915", "0.6439634", "0.6401038", "0.6384065", "0.63303304", "0.6322806", "0.6316715", "0.629584", "0.6287078", "0.6286462", "0.62726897", "0.6256357", "0.62529725", "0.6246085", "0.6246085", "0.6225057", "0.6168006", "0.61673754", "0.6151074", "0.6148566", "0.6146466", "0.6123714", "0.6109517", "0.6097565", "0.6084325", "0.6084195", "0.6057532", "0.6056759", "0.60528284", "0.6024073", "0.6018356", "0.60169435", "0.6011721", "0.60098046", "0.60090595", "0.5994634", "0.59908545", "0.5987691", "0.5972953", "0.59709644", "0.59558415", "0.5950991", "0.59496844", "0.5944869", "0.5905011", "0.58921236", "0.58900446", "0.58890426", "0.58845854", "0.5873494", "0.58668405", "0.58627844", "0.5860524", "0.58574826", "0.5851426", "0.5850028", "0.58342034", "0.58261615", "0.5818182", "0.5815244", "0.58063847", "0.5802473", "0.57941484", "0.5790562", "0.5780052", "0.57761395", "0.5753858", "0.5748551", "0.57469517", "0.5738124", "0.5736272", "0.57346016", "0.57297456", "0.5728711", "0.5722907", "0.5721026", "0.57103777", "0.57069933", "0.56941557", "0.5688201", "0.5685816", "0.56756574", "0.56691873", "0.56685805", "0.5664385", "0.5663444", "0.56623584", "0.56621224", "0.5661027", "0.5659378", "0.56452566", "0.5642498", "0.56414926" ]
0.5747809
75
head added after so that you can see it in front.
Node getNode() { return new Group(body.getPolygon(), head.getPolygon()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void head();", "public void Head() {\n\n\t}", "@Override\r\n public void addFront(T b) {\r\n head = head.addFront(b);\r\n }", "@Test\n\tpublic void addNodeBeforeGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node Before the given node \");\n\t\tdll.push(4);\n\t\tdll.push(3);\n\t\tdll.push(1);\n\t\tdll.InsertBefore(dll.head.next, 2);\n\t\tdll.print();\n\t}", "@Override\n public void prepend(T elem) {\n if(isEmpty()) { //if list is empty\n first = new DLNode(elem, null, null);//new element created, there's nothing before and after it yet\n last = first;\n }\n else{ //list in not empty\n \n first = new DLNode(elem, null, first); //new element goes to the front, there nothing before it, the old first element is after it\n \n first.next.prev = first; //ensure that reference to our first element is pointing to the new first element\n }\n \n }", "public void moveHead() {\n if (this.head == ram.length - 1) {\n head = 0;\n } else {\n head += 1;\n }\n }", "public void addBefore(Node node){\n node.next = head;\n head = node;\n count.incrementAndGet();\n }", "void sethead(ElementNode head){\r\n\t\t\tthis.head = head;\r\n\t\t}", "private void addToHead() {\n Node currentNode = null;\n switch (head.dir) {\n case LEFT:\n currentNode = new Node(head.row - 1, head.col, head.dir);\n break;\n case RIGHT:\n currentNode = new Node(head.row + 1, head.col, head.dir);\n break;\n case UP:\n currentNode = new Node(head.row, head.col - 1, head.dir);\n break;\n case DOWN:\n currentNode = new Node(head.row, head.col + 1, head.dir);\n break;\n }\n currentNode.next = head;\n head.pre = currentNode;\n head = currentNode;\n size++;\n }", "private void addNewHead() {\t\t\n\t\tif(currentDirection == Direction.RIGHT) {\n\t\t\tsnake.addLast(new HeadComponent(\n\t\t\t\t\tsnake.getLast().getX() + SnakeComponent.imageSize, \n\t\t\t\t\tsnake.getLast().getY(),\n\t\t\t\t\tcurrentDirection\n\t\t\t));\n\t\t\tsnakeDirection = Direction.RIGHT;\n\t\t\t\n\t\t} else if(currentDirection == Direction.LEFT) {\n\t\t\tsnake.addLast(new HeadComponent(\n\t\t\t\t\tsnake.getLast().getX() - SnakeComponent.imageSize, \n\t\t\t\t\tsnake.getLast().getY(), \n\t\t\t\t\tcurrentDirection\n\t\t\t));\n\t\t\tsnakeDirection = Direction.LEFT;\n\t\t\t\n\t\t} else if(currentDirection == Direction.DOWN) {\n\t\t\tsnake.addLast(new HeadComponent(\n\t\t\t\t\tsnake.getLast().getX(), \n\t\t\t\t\tsnake.getLast().getY()+SnakeComponent.imageSize, \n\t\t\t\t\tcurrentDirection\n\t\t\t));\n\t\t\tsnakeDirection = Direction.DOWN;\n\t\t\t\n\t\t} else if(currentDirection == Direction.UP) {\n\t\t\tsnake.addLast(new HeadComponent(\n\t\t\t\t\tsnake.getLast().getX(), \n\t\t\t\t\tsnake.getLast().getY()-SnakeComponent.imageSize,\n\t\t\t\t\tcurrentDirection\n\t\t\t));\n\t\t\tsnakeDirection = Direction.UP;\n\t\t}\n\t}", "@Test\n\tpublic void addNodeAfterGiveNode() {\n\t\tSystem.out.println(\"Given a node as prev_node, insert a new node after the given node \");\n\t\tdll.push(4);\n\t\tdll.push(2);\n\t\tdll.push(1);\n\t\tdll.InsertAfter(dll.head.next, 3);\n\t\tdll.print();\n\t}", "private synchronized void create_head(){\n\t\t// Take current time\n\t\thead_time = System.currentTimeMillis();\n\t\tdouble lcl_head_time = head_time/1000.0;\n\t\tString time = Double.toString(lcl_head_time);\n\t\t \n\t\theader.append(\"protocol: 1\\n\");\n\t\theader.append(\"experiment-id: \" + oml_exp_id + \"\\n\");\n\t\theader.append(\"start_time: \" + time + \"\\n\");\n\t\theader.append(\"sender-id: \" + oml_name + \"-sender\\n\");\n\t\theader.append(\"app-name: \" + oml_app_name + \"\\n\");\n\t}", "private void prepend(T t) {\n Node<T> n = new Node<T>();\n n.data = t;\n n.next = head;\n head = n;\n }", "private void moveToHead(DLinkedNode node){\n\t\tremoveNode(node);\n\t\taddNode(node);\n\t}", "public void setHead(String head) {\n _head = head;\n }", "void prepend(int element) {\n Node newHead = new Node(element,head);\n head = newHead;\n }", "public void addToFront(T elem) {\r\n\tDLLNode<T> newNode = new DLLNode<T>(elem);\r\n\t\r\n\tif (header == null) {\r\n\t\theader = newNode;\r\n\t}\r\n\tif (trailer == null)\r\n\t\ttrailer = newNode;\r\n\telse {\r\n\t\tnewNode.setLink(header);\r\n\t\theader.setBack(newNode);\r\n\t\theader = newNode;\r\n\t}\r\n\tsize++;\r\n\r\n}", "void prepend(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (front == null) \n\t\t{\n\t\t\tfront = back = temp; // if the list is empty the node will be the first node in the list making it the front and back node\n\t\t\tlength++;\n index = 0; //added because i failed the test scripts because i wasn't managing the indicies\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfront.prev=temp; //the temp node is inserted before the front\n\t\t\ttemp.next=front; //the node after temp will be the front because temp was inserted before the front\n\t\t\tfront = temp; //the front is now the temp node\n\t\t\tlength++;\n index++;//added because i failed the test scripts because i wasn't managing the indicies\n\t\t}\n\t}", "private void prependNode(Node prependNode) {\n\t\tNode currentNode = head;\n\t\tif(currentNode==null) {\n\t\t\thead = prependNode;\n\t\t} else {\n\t\t\tprependNode.next = currentNode;\n\t\t\thead = prependNode;\n\t\t}\n\t}", "T addAtHead(T t) {\n return header.addAtHead(t);\n }", "private void moveToHead(DLinkedNode node) {\n\t\t\tthis.removeNode(node);\n\t\t\tthis.addNode(node);\n\t\t}", "private void moveToHead(DLinkedNode node){\n this.removeNode(node);\n this.addNode(node);\n }", "public void setHead(Connector<T> head) {\n\t\tthis.head = head;\n\t}", "private void addToFront(ListNode node) {\n\t // new node inserted into the linked list\n\t node.prev = head;\n\t node.next = head.next;\n\n\t \n\t head.next.prev = node;\n\t head.next = node;\n\t }", "private void initialiseHeader()\n\t{\n\t ListHead head = null;\n\n\t head = super.getListHead();\n\n\t //init only once\n\t if (head != null)\n\t {\n\t \treturn;\n\t }\n\n\t head = new ListHead();\n\n\t // render list head\n\t if (this.getItemRenderer() instanceof WListItemRenderer)\n\t {\n\t \t((WListItemRenderer)this.getItemRenderer()).renderListHead(head);\n\t }\n\t else\n\t {\n\t \tthrow new ApplicationException(\"Rendering of the ListHead is unsupported for \"\n\t \t\t\t+ this.getItemRenderer().getClass().getSimpleName());\n\t }\n\n\t //attach the listhead\n\t head.setParent(this);\n\n\t return;\n\t}", "private void moveToHead(Node node) {\n deleteNode(node);\n addNode(node);\n }", "public String getHead() {\n return _head;\n }", "HEAD createHEAD();", "private void changeHead(Node node){\n node.next = head;\n node.pre = head == null ? null : head.pre;\n // node.pre = null;\n\n // if (head != null)\n // head.pre = node;\n\n head = node;\n \n if(end == null)\n end = head;\n }", "public int addHead(Users head) throws Exception{\r\n\t\treturn adminDao.addHead(head);\r\n\t}", "public void setHead(boolean head) {\n this.head = head;\n }", "private void addToFront(ListNode node) {\n node.prev = head;\n node.next = head.next;\n \n //wire the head next prev to node and the connect head to node\n head.next.prev = node;\n head.next = node;\n }", "public PlayerNode insertAthead(Player aPlayer, PlayerNode head)\n\t{\n\t\tPlayerNode newptr = new PlayerNode(null,aPlayer); //newptr to be used for the new node to be added!\n\t\t\n\t\tif(head.getLink() == null)\n\t\t{\n\t\t\thead.setLink(newptr); //sets newptr to link to head\n\t\t\tnewptr.setLink(head);\n\t\t\tnewptr.setaPlayer(aPlayer);\t\t\t\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\tnewptr.setLink(head.getLink());\n\t\t\thead.setLink(newptr);\n\t\t\tnewptr.setaPlayer(aPlayer);\n\t\t}\t\t\t\n\t\treturn head; //if head can change you want to return it\n\t}", "private void addToFront(Node node) {\n \n if(head == null) {\n head = node;\n tail = node;\n } \n else {\n node.next = head;\n head.prev = node;\n head = node;\n }\n }", "ElementNode gethead(){\r\n\t\t\treturn this.head;\r\n\t\t}", "private void moveToHead(ListNode node) { \n\t removeFromList(node);\n\t addToFront(node);\n\t }", "@Override\n\tpublic void renderHead(IHeaderResponse response)\n\t{\n\t\tfinal JavaScriptResourceReference topJsReference = new JavaScriptResourceReference(\n\t\t\tFilteredHeaderPage.class, \"top.js\");\n\t\tresponse.render(new FilteredHeaderItem(JavaScriptHeaderItem.forReference(topJsReference),\n\t\t\tFilteringHeaderResponse.DEFAULT_HEADER_FILTER_NAME));\n\n\t\t// rendered at the bottom of the body bucket\n\t\tJQueryPluginResourceReference bottomJs = new JQueryPluginResourceReference(\n\t\t\tFilteredHeaderPage.class, \"bottom.js\")\n\t\t{\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\t@Override\n\t\t\tpublic List<HeaderItem> getDependencies()\n\t\t\t{\n\t\t\t\tList<HeaderItem> dependencies = super.getDependencies();\n\n\t\t\t\t// WICKET-4566 : depend on a resource which is rendered in a different bucket\n\t\t\t\tdependencies.add(JavaScriptHeaderItem.forReference(topJsReference));\n\t\t\t\treturn dependencies;\n\t\t\t}\n\t\t};\n\t\tresponse.render(JavaScriptHeaderItem.forReference(bottomJs));\n\t}", "public final String getHead() {\n \t\treturn head;\n \t}", "private void addFront(String x)\n {\n head = new Node(x, head);\n if (tail == null)\n tail = head;\n\n size++;\n }", "private static void insertAtHead(int data) {\n\tNode newnode=new Node(data);\n\tnewnode.next=head;\n\tnewnode.prev=null;\n\tif(head!=null)\n\t\thead.prev=newnode;\n\thead=newnode;\n\t\n}", "public void removeAtFront(){\r\n\t head = head.getLink();\r\n\t cursor = head; \r\n\t precursor = null; \r\n\t \r\n\t manyNodes--;\r\n }", "private void insertCreator(Item item) {\n head = new Node(item, null, null); // creates node\n head.next = head;\n head.before = head; // sets itself as both next and before in the list\n }", "protected void setHeadFlag(boolean headFlag) {\n this.headFlag = headFlag;\n }", "public void addFrontNode(T a) {\r\n head = new ListNode(a, head);\r\n }", "@Override\r\n public void addBack(T b) {\r\n head = head.addBack(b);\r\n }", "public void setHead(Node head) {\n\t\tthis.head = head;\n\t}", "private void addNode(Node node) {\n node.prev = fakeHead;\n node.next = fakeHead.next;\n \n fakeHead.next.prev = node;\n fakeHead.next = node;\n }", "public Node getHeadNode();", "public void onHeadStatus(boolean isHead) {\n\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n public ITableOfContent appendHead(String rawHead, int headLevel,\n boolean noToC, int headCounter, int startPosition, int endPosition) {\n \tif (preserveContents) {\n \t\treturn super.appendHead(rawHead, headLevel, noToC, headCounter, startPosition, endPosition);\n \t} else {\n \t\tTagStack localStack = WikipediaParser.parseRecursive(rawHead.trim(),\n this, true, true);\n HTMLBlockTag headTagNode = new HTMLBlockTag(\"h\" + headLevel,\n Configuration.SPECIAL_BLOCK_TAGS);\n TagNode spanTagNode = new TagNode(\"span\");\n spanTagNode.addChildren(localStack.getNodeList());\n headTagNode.addChild(spanTagNode);\n String tocHead = headTagNode.getBodyString();\n String anchor = Encoder.encodeDotUrl(tocHead);\n createTableOfContent(false);\n if (fToCSet.contains(anchor)) {\n String newAnchor = anchor;\n for (int i = 2; i < Integer.MAX_VALUE; i++) {\n newAnchor = anchor + '_' + Integer.toString(i);\n if (!fToCSet.contains(newAnchor)) {\n break;\n }\n }\n anchor = newAnchor;\n }\n fToCSet.add(anchor);\n String trimmedHead = rawHead.trim();\n if (headLevel == 2) {\n \tMap<String, Object> data = new LinkedHashMap<>();\n \tdata.put(\"link\", \"#\" + anchor);\n dataMap.put(trimmedHead, data);\n prevHead = trimmedHead;\n } else if (headLevel == 3) {\n \t\t\tMap<String, Object> data = dataMap.get(prevHead);\n \t\t\tif (data != null) {\n \t\t\t\tMap<String, Map<String, String>> subHeaders = (Map<String, Map<String, String>>) data.get(\"subheaders\");\n \t\t\t\tsubHeaders = subHeaders == null ? new LinkedHashMap<String, Map<String, String>>() : subHeaders;\n \t\t\t\tMap<String, String> link = new HashMap<>();\n \t\t\t\tlink.put(\"link\", \"#\" + anchor);\n \t\t\t\tsubHeaders.put(trimmedHead, link);\n \t\t\t\tdata.put(\"subheaders\", subHeaders);\n \t\t\t}\n \t\t}\n SectionHeader strPair = new SectionHeader(headLevel, startPosition,\n endPosition, tocHead, anchor);\n if (getRecursionLevel() == 1) {\n buildEditLinkUrl(fSectionCounter++);\n }\n spanTagNode.addAttribute(\"class\", \"mw-headline\", true);\n spanTagNode.addAttribute(\"id\", anchor, true);\n \n append(headTagNode);\n return new TableOfContentTag(\"a\");\n \t}\n }", "public void removeHead() {\n\t\t\tif (length != 0)\n\t\t\t{ \n\t\t ElementDPtr save = head.getNext();\n\t\t head = head.getNext();\n\t\t\thead.setPrev(null);\n\t\t\thead.setNext(save.getNext());\n\t\t\tlength -= 1;\n\t\t\tSystem.out.println(tail.getPrev().getValue() + \" removeB \" + length);\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}", "@Override\n\tpublic Head getHead() {\n\t\treturn head;\n\t}", "public void prepend(Item item) {\n Node newNode = new Node();\n newNode.item = item;\n newNode.next = head.next;\n head.next = newNode;\n size++;\n }", "private void moveToHead(ListNode node) {\n removeFromList(node);\n addToFront(node);\n }", "private void addNodeBefore(SinglyLinkedList.Node<E> node, int idx) throws IndexOutOfBoundsException {\n if (idx == 0) {\n node.next = head;\n head = node;\n\n len += 1;\n return;\n }\n\n addNodeAfter(node, idx - 1);\n }", "@Test\n\tpublic void addNodeAtFront() {\n\t\tSystem.out.println(\"Adding a node at the front of the list\");\n\t\tdll.push(3);\n\t\tdll.push(2);\n\t\tdll.push(1);\n\t\tdll.print();\n\t}", "private synchronized boolean inject_head(){\n\t\tif(schemaPart.toString().isEmpty())\n\t\t\treturn false;\n\t\t\n\t\t// Assembly the head\n\t\tStringBuilder msg = new StringBuilder();\n\t\tmsg.append(header.toString());\n\t\tmsg.append(schemaPart.toString());\n\t\tmsg.append(\"content: text\\n\");\n\t\tmsg.append(\"\\n\");\n \n\t\ttry {\n\t\t\tSystem.out.println(TAG + \":head:\\n\" + msg.toString());\n\t\t\tout.print(msg.toString());\n\t\t\tmysock.getOutputStream().flush();\n\t\t\tout.flush();\n\t\t} catch (IOException ioException) {\n\t\t\tif (ioException instanceof SocketException && ioException.getMessage().contains(\"Permission denied\")) {\n\t\t\t\tSystem.out.println(TAG + \":You don't have internet permission:\" + ioException);\n\t\t\t}\n\t\t\tSystem.out.println(TAG + \":I could not connect.\");\n\t\t\tsrvDisconnect();\n\t\t\treturn false;\n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.out.println(TAG + \":Null Pointer Exception:inject head\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public Type show_head() {\n\t return(head.show_element());\n\n }", "public void addFirst(Object o) {\r\n addBefore(o, header.next);\r\n }", "void prepend(int value) {\n\t\tNode n = new Node(value);\n\t\tn.next = head;\n\t\thead = n;\n\t\tlength++;\n\t\t//print();\n\t}", "T addAtTail(T t) {\n return header.addAtTail(t);\n }", "public void addHead(T element) {\n Node<T> node = new Node<>(element);\n node.setNext(head);\n head = node;\n }", "public void addFirst(E e) {\n\r\n Node newNode = new Node(e,head);\r\n head = newNode;\r\n\r\n if(head.getNext() == null){\r\n tail = head;\r\n }\r\n\r\n }", "void insertBefore(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertBefore() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertBefore() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == front) \n\t\t{\n\t\t\tprepend(data); //if the cursor is at the front of the list, you can just call prepend since you will be inserting the element before the front element \n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.prev = cursor.prev; //the new node temp's previous becomes the cursors previous\t\n temp.next = cursor; //the new node temp's next becomes the cursor\n cursor.prev.next = temp; //cursor's previous next element becomes temp\n cursor.prev = temp; //cursor's previous becomes temp\n length++;\n index++;\n\t\t}\n\t}", "T addAtHead(T t) {\n new Node<T>(t, this.next, this);\n return this.next.getData();\n }", "protected void addToHead(T val)\n\t{\n\t\tListElement<T> newElm = new ListElement<T>(val, head);\n\t\t\n\t\tif(head != null)\n\t\t\thead.setPrev(newElm);\n\t\telse\n\t\t\t//If list was empty befor addition\n\t\t\ttail = newElm;\n\t\t\t\n\t\thead = newElm;\n\t}", "private void addFirst (E item)\n {\n Node<E> temp = new Node<E>(item); // create a new node\n // and link to the first node\n head = temp;\n size++;\n }", "public MyNode getHead()\r\n {\r\n \treturn head;\r\n }", "public Node getHeadNode() {\r\n\t\treturn head;\r\n\t}", "public void addFirst(Object e) {\n if(head == null) {\n tail = head = new Node(e, null, null);\n return;\n }\n\n Node n = new Node(e, null, head);\n head.setPrevious(n);\n head = n;\n }", "public void changeHead(ListNode newHead_in)\n {\n if(head != null)\n {\n ListNode temp = head;\n head = newHead_in;\n head.setNext(temp);\n head.setPrevious(null);\n }\n else\n {\n head = newHead_in;\n head.setNext(null);\n head.setPrevious(null);\n }\n }", "void linkBefore(E e, Node<E> succ) {\n\t // assert succ != null;\n\t final Node<E> pred = succ.prev;\n\t final Node<E> newNode = new Node<>(pred, e, succ);\n\t succ.prev = newNode;\n\t if (pred == null)\n\t first = newNode;\n\t else\n\t pred.next = newNode;\n\t size++;\n\t modCount++;\n\t }", "public void forward() {\n\t\t\n\t\tif(hasEaten()) {\n\t\t\taddBodyPart();\n\t\t} else {\n\t\t\tshuffleBody();\n\t\t}\n\t\t\n\t\tthis.setLocation(this.getX()+dX, this.getY()+dY); // move head\n\t\tthis.display(w); \n\t}", "public default StreamPlus<DATA> prependWith(Stream<DATA> head) {\n return StreamPlus.concat(StreamPlus.from(head), streamPlus());\n }", "public void insertHead(T element) {\n\t\tif (size == 0) {\n\t\t\tadd(element);\n\t\t\treturn;\n\t\t}\n\t\tNode<T> newHead = new Node<>(element);\n\t\tnewHead.next = this.head;\n\t\tthis.head = newHead;\n\t\tsize++;\n\t}", "public void addAtStart(Item item) { \t\n \tif(head.item == null) {\n \t\thead.item = item;\n\t \t\tif(isEmpty()) {\n\t \t\thead.next = tail;\n\t \t\ttail.next = head;\n\t \t\t} \t\t\n \t} else {\n \t\tNode oldHead;\n \t\toldHead = head;\n \t\thead = new Node();\n \t\thead.item = item;\n \t\thead.next = oldHead;\n \t\ttail.next = head;\n \t}\n \tsize++;\n }", "public void addAtFront(double element){\r\n\t head = new DoubleNode(element, head);\r\n\t cursor = head; \r\n\t precursor = null; \r\n\t \r\n }", "@Override\n\tpublic void prepend(Object data) {\n\t\tNode newNode = new Node(data);\n\t\tnewNode.setNext(this.head);\n\t\thead = newNode;\n\t\tsize++;\n\n\t}", "@Override\n public void addBefore(E element) {\n Node<E> newNodeList = new Node<>(element, cursor);\n\n if (prev == null) {\n head = newNodeList;\n cursor = newNodeList;\n } else {\n prev.setNext(newNodeList);\n cursor = newNodeList;\n }\n\n size++;\n }", "private void addBefore(Node n, E x) {\n\n\t\tNode newNode = new Node(x, n);\n\n\t\tNode q = mHead;\n\n\t\tNode p = mHead.next;\n\n\t\twhile (p != n) {\n\t\t\tq = p;\n\t\t\tp = p.next;\n\t\t}\n\n\t\tq.next = newNode;\n\n\t}", "void linkBefore(final T e, final int succ) {\r\n\t\tassert (succ > 0);\r\n\t\tfinal int pred = getPrevPointer(succ);\r\n\t\tfinal int newNode = setFirstFree(e);\r\n\r\n\t\tsetNextPointer(newNode, succ);\r\n\t\tsetPrevPointer(newNode, pred);\r\n\t\tsetPrevPointer(succ, newNode);\r\n\r\n\t\tif (pred == -1) {\r\n\t\t\tfirst = newNode;\r\n\t\t} else {\r\n\t\t\tsetNextPointer(pred, newNode);\r\n\t\t}\r\n\t\tsize++;\r\n\t\tmodCount++;\r\n\t}", "private void addNodeAtTheBeginning(int data) {\n ListNode newNode = new ListNode(data);\n if (head == null) {\n head = newNode;\n return;\n }\n newNode.next = head;\n head = newNode;\n }", "private Point getHeadLocation (Note note)\r\n {\r\n return new Point(tailLocation.x, note.getReferencePoint().y);\r\n }", "public void insertAfter(ListNode next){\n ListNode cur = this.next;\n this.next = next;\n next.next = cur;\n }", "public void prepend(final T data) {\n Node<T> newNode = new Node<>(data);\n if (head != null) {\n newNode.setNext(head);\n }\n head = newNode;\n numElement++;\n }", "TimelineMeta insert(TimelineMeta meta);", "public void yieldHead(PageContext pageContext) throws IOException\n {\n yield(\"head\", pageContext);\n }", "void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "public void printAscend() {\r\n\t\tMovieListNode<m> cur = head;\r\n\t\twhile (cur != null) {\r\n\t\t\tSystem.out.println(cur);\t//prints current node\r\n\t\t\tcur = cur.next;\t\t//moves on to next node\r\n\t\t}\r\n\t}", "@Override\n public void prepend(T element){\n if(isEmpty()){\n add(element);\n } else{\n this.first = new DLLNode<T>(element, null, this.first);\n this.first.successor.previous = this.first;\n }\n }", "public int head () {\n return head;\n }", "public void insertFront(Node newNode) {\n\t\tif(size == 0) {\n\t\t\thead = newNode;\n\t\t\ttail = newNode;\n\t\t} else {\n\t\t\thead.prev = newNode;\n\t\t\tnewNode.prev = null;\n\t\t\tnewNode.next = head;\n\t\t\thead = newNode;\n\t\t}\n\n\t\tsize++;\n\t}", "private Node prepend(E element) {\n \treturn new Node(sentinel, element);\n }", "public void insert_head(int data)\n {\n Node newNode = new Node(data);\n if(head==null)\n {\n head = newNode;\n }\n else\n {\n newNode.setNext(newNode);\n head = newNode;\n }\n }", "public void addAtHead(E entry) {\n\t\tLinkedNode<E> temp = new LinkedNode<E>(entry, null);\n\t\tsize++;\n\t\tif(head == null) {\n\t\t\thead = temp;\n\t\t\ttail = head;\n\t\t} else {\n\t\t\ttemp.setNext(head);\n\t\t\thead = temp;\n\t\t}\n\t}", "public Node getHead() {\r\n return head;\r\n }", "private void add(Node node) {\n Node headNext = head.next;\n head.next = node;\n node.previous = head;\n node.next = headNext;\n headNext.previous = node;\n }", "@Override\n\tpublic void buildHead() {\n\t\tg.drawOval(50, 20, 30, 30);\n\t}", "public void addNodeToHead(int data) {\r\n\t\tNode temp = head;\r\n\t\tNode new_node = new Node(data);\r\n\t\tif(head == null){\r\n\t\t\thead = new_node;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t \r\n\t\tnew_node.next = temp;\r\n\t\thead = new_node ;\r\n\t}", "public void addAtStart(int item) {\n\t\tCLL_LinkNode new_node = new CLL_LinkNode(item);\n\t\tif (this.length == 0) {\n\t\t\tthis.headNode = new_node;\n\t\t\tthis.headNode.setNext(this.headNode);\n\t\t} else {\n\t\t\tCLL_LinkNode temp_node = this.headNode;\n\t\t\twhile (temp_node.getNext() != this.headNode)\n\t\t\t\ttemp_node = temp_node.getNext();\n\t\t\ttemp_node.setNext(new_node);\n\t\t\tnew_node.setNext(headNode);\n\t\t\tthis.headNode = new_node;\n\t\t}\n\t\tthis.length++;\n\t}", "public void moveToStart() {\r\n\t\tcurr = head;\r\n\t}" ]
[ "0.6470402", "0.6440652", "0.6306535", "0.6271262", "0.6236452", "0.6227985", "0.6218916", "0.61922234", "0.6134971", "0.6134053", "0.6095956", "0.6094037", "0.6088567", "0.6069576", "0.6065987", "0.60659647", "0.6046164", "0.60451955", "0.5984684", "0.59769624", "0.59751356", "0.5960957", "0.59248304", "0.5923431", "0.5921412", "0.5919221", "0.59125066", "0.5910073", "0.5867789", "0.5841642", "0.5840025", "0.5836983", "0.58265364", "0.582134", "0.5820729", "0.5820297", "0.5819259", "0.58169776", "0.5801137", "0.5796572", "0.57885784", "0.57873446", "0.5778112", "0.57750267", "0.5747583", "0.5739677", "0.5738878", "0.5736857", "0.5736208", "0.57281554", "0.5712862", "0.5704939", "0.5702137", "0.567932", "0.56669533", "0.56666976", "0.5666041", "0.56479806", "0.5626718", "0.5625368", "0.5618332", "0.56078726", "0.5596296", "0.55953664", "0.5585885", "0.5581356", "0.55570996", "0.55530113", "0.55522835", "0.5534509", "0.5526225", "0.5524255", "0.5518389", "0.5515677", "0.5514736", "0.55099744", "0.55043167", "0.55010796", "0.54902333", "0.5489513", "0.5487667", "0.5487221", "0.54835165", "0.54776686", "0.5473136", "0.54677564", "0.54668814", "0.54664016", "0.54640126", "0.5451717", "0.5449411", "0.54475534", "0.5438583", "0.54370296", "0.5428409", "0.54239476", "0.541887", "0.54156166", "0.54119956", "0.5408208", "0.5405422" ]
0.0
-1
The pose used by winners!
Node getWinPose() { final Rectangle headCopy = new Rectangle(head); final Rectangle bodyCopy = new Rectangle(body); // TODO should the tank be pointing out or into the alert ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ needs more thought. right now it faces inward. feels more symmetric headCopy.rotate(pivot, -theta + Math.PI); bodyCopy.rotate(pivot, -theta + Math.PI); return new Group(bodyCopy.getPolygon(), headCopy.getPolygon()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDesiredPose() {\n\t\treturn desiredPose;\n\t}", "public int getPoseID(){ return poseID;}", "public String getCurrentPoseName() {return currentPoseName;}", "public int getPoseDuration(){ return poseDuration;}", "public Pose2d getPose() {\n return m_odometry.getPoseMeters();\n }", "public void receivedPoseFromTracker(Pose pose) {}", "private void onPoseUpdate(TangoPoseData pose) {\n StringBuilder stringBuilder = new StringBuilder();\n\n float translation[] = pose.getTranslationAsFloats();\n\n float newPositionX = translation[0];\n float newPositionY = translation[1];\n float newPositionZ = translation[2];\n\n float deltaX = newPositionX - lastPositionX;\n float deltaY = newPositionY - lastPositionY;\n float deltaZ = newPositionZ - lastPositionZ;\n\n lastPositionX = newPositionX;\n lastPositionY = newPositionY;\n lastPositionZ = newPositionZ;\n\n stringBuilder.append(\"Position: \" +\n lastPositionX + \", \" + lastPositionY + \", \" + lastPositionZ);\n\n float orientation[] = pose.getRotationAsFloats();\n stringBuilder.append(\". Orientation: \" +\n orientation[0] + \", \" + orientation[1] + \", \" +\n orientation[2] + \", \" + orientation[3]);\n\n Log.i(TAG, stringBuilder.toString());\n\n updateHumanTokenPosition(deltaX, deltaY, deltaZ);\n }", "public synchronized Pose getPose() {\n\n\t\tif (m_mover != null) {\n\t\t\tlong currentTime = System.currentTimeMillis();\n\t\t\tif (currentTime - m_lastUpdate > m_updateDelay) {\n\t\t\t\tupdatePose(m_mover.getMovement());\n\t\t\t\tm_lastUpdate = currentTime;\n\t\t\t}\n\t\t}\n\t\treturn new Pose(x, y, heading);\n\t}", "@Override\n public void onPoseAvailable(TangoPoseData pose) {\n }", "public void resetPose() {\n }", "public us.ihmc.euclid.geometry.Pose3D getPose()\n {\n return pose_;\n }", "private void logPose(TangoPoseData pose) {\n StringBuilder stringBuilder = new StringBuilder();\n\n float translation[] = pose.getTranslationAsFloats();\n stringBuilder.append(\"Position: \" +\n translation[0] + \", \" + translation[1] + \", \" + translation[2]);\n\n float orientation[] = pose.getRotationAsFloats();\n stringBuilder.append(\". Orientation: \" +\n orientation[0] + \", \" + orientation[1] + \", \" +\n orientation[2] + \", \" + orientation[3]);\n\n Log.i(TAG, stringBuilder.toString());\n }", "public void setPoseID(int i) { poseID = i;}", "public RobotPose2d getPose() throws CASTException {\n\t\tList<RobotPose2d> poses = new ArrayList<RobotPose2d>(1);\n\t\ttry {\n\t\t\tcomponent.getMemoryEntries(RobotPose2d.class, poses, SPATIAL_SA);\n\t\t\tif (poses.size() < 1) {\n\t\t\t\tcomponent.getLogger().warn(\n\t\t\t\t\t\tSpatialFacade.class.getSimpleName()\n\t\t\t\t\t\t\t\t+ \" failed to get pose from working memory\");\n\t\t\t\tthrow new CASTException(\"there is no \"\n\t\t\t\t\t\t+ RobotPose2d.class.getSimpleName() + \" on \"\n\t\t\t\t\t\t+ SPATIAL_SA);\n\t\t\t}\n\t\t\treturn poses.get(0);\n\t\t} catch (CASTException e) {\n\t\t\tcomponent.logException(\"in \" + SpatialFacade.class.getSimpleName()\n\t\t\t\t\t+ \" when trying to receive pose\", e);\n\t\t\tthrow (e);\n\t\t}\n\t}", "public void requestNewPose()\r\n {\r\n // WE MAY HAVE TO SAVE CURRENT WORK\r\n boolean continueToMakeNew = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE WITH A CANCEL\r\n continueToMakeNew = promptToSave();\r\n }\r\n \r\n // IF THE USER REALLY WANTS TO MAKE A NEW POSE\r\n if (continueToMakeNew)\r\n {\r\n // GO AHEAD AND PROCEED MAKING A NEW POSE\r\n continueToMakeNew = promptForNew();\r\n\r\n if (continueToMakeNew)\r\n {\r\n // NOW THAT WE'VE SAVED, LET'S MAKE SURE WE'RE IN THE RIGHT MODE\r\n \tAnimatedSpriteEditor singleton = AnimatedSpriteEditor.getEditor();\r\n \t\r\n PoseurStateManager poseurStateManager = singleton.getStateManager().getPoseurStateManager();\r\n \r\n PoseList pl = singleton.getSpriteType().getAnimations().get(singleton.getAnimationState());\r\n pl.addPose(poseID, poseDuration);\r\n poseurStateManager.setState(PoseurState.SELECT_SHAPE_STATE);\r\n \t\tsingleton.getStateManager().setState(EditorState.POSEUR_STATE);\r\n }\r\n }\r\n }", "public Poses cursorToPose(Cursor cursor) {\n\n\t\tPoses pose = null;\n\t\ttry { \n\t\t\tLog.d(\"Database contents\", \"Graphic string: \" + cursor.getString(1));\n\t\t\tLog.d(\"Database contents\", \"Yoga Name: \" + cursor.getString(6));\n\t\t\tpose = new Poses(cursor.getLong(0),\n\t\t\t\t\tcursor.getString(1),\n\t\t\t\t\tcursor.getString(2),\n\t\t\t\t\tcursor.getString(3),\n\t\t\t\t\tcursor.getInt(4),\n\t\t\t\t\tcursor.getInt(5),\n\t\t\t\t\tcursor.getString(6),\n\t\t\t\t\tcursor.getInt(7));\n\t\t\t\n\t\t}\n\t\tcatch (SQLException sqle) { \n\t\t\tLog.d(\"Database Error in cursorToPose\", sqle.toString());\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tLog.d(\"Exception\", e.toString());\n\t\t}\n\t\treturn pose;\n\t}", "public void requestSavePose() \r\n {\r\n \r\n \t// DON'T ASK, JUST SAVE\r\n boolean savedSuccessfully = poseIO.savePose(currentFile, false);\r\n if (savedSuccessfully)\r\n {\r\n \tposeIO.savePoseImage(currentPoseName, poseID);\r\n // MARK IT AS SAVED\r\n saved = true;\r\n \r\n // AND REFRESH THE GUI\r\n AnimatedSpriteEditor singleton = AnimatedSpriteEditor.getEditor(); \r\n \r\n PoseurStateManager poseurStateManager = singleton.getStateManager().getPoseurStateManager();\r\n poseurStateManager.clearSelectShape();\r\n poseurStateManager.setState(PoseurState.SELECT_SHAPE_STATE);\r\n \r\n }\r\n }", "void setPose(IPose2D newPose);", "private String whoIsMVP() {\n int highestValue = 0;\n String mvp = null;\n for (String player : mvpPlayersMap.keySet()) {\n if (highestValue < mvpPlayersMap.get(player)) {\n highestValue = mvpPlayersMap.get(player);\n mvp = player;\n }\n }\n log.info(\"MVP player: {} with {} points\", mvp, highestValue);\n return mvp;\n }", "public void requestMovePoseUp()\r\n {\r\n \tAnimatedSpriteEditor singleton = AnimatedSpriteEditor.getEditor();\r\n \tAnimatedSpriteEditorGUI gui = singleton.getGUI(); \r\n \t \r\n boolean continueToMove = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE\r\n continueToMove = promptToSave();\r\n }\r\n if(continueToMove)\r\n {\r\n \tposeIO.movePose(poseID, 0);\r\n \tsingleton.getFileManager().reloadSpriteType();\r\n \tsingleton.getGUI().updatePoseList();\r\n \tJOptionPane.showMessageDialog(\r\n gui,\r\n POSE_MOVED_TEXT,\r\n POSE_MOVED_TITLE_TEXT,\r\n JOptionPane.INFORMATION_MESSAGE);\r\n } \r\n }", "private synchronized void updatePose(Move event) {\n\t\tfloat angle = event.getAngleTurned() - angle0;\n\t\tfloat distance = event.getDistanceTraveled() - distance0;\n\t\tdouble dx = 0, dy = 0;\n\t\tdouble headingRad = (Math.toRadians(heading));\n\n\t\tif (event.getMoveType() == Move.MoveType.TRAVEL\n\t\t\t\t|| Math.abs(angle) < 0.2f) {\n\t\t\tdx = (distance) * (float) Math.cos(headingRad);\n\t\t\tdy = (distance) * (float) Math.sin(headingRad);\n\t\t} else if (event.getMoveType() == Move.MoveType.ARC) {\n\t\t\tdouble turnRad = Math.toRadians(angle);\n\t\t\tdouble radius = distance / turnRad;\n\t\t\tdy = radius\n\t\t\t\t\t* (Math.cos(headingRad) - Math.cos(headingRad + turnRad));\n\t\t\tdx = radius\n\t\t\t\t\t* (Math.sin(headingRad + turnRad) - Math.sin(headingRad));\n\t\t}\n\t\tx += dx;\n\t\ty += dy;\n\t\theading = normalize(heading + angle); // keep angle between -180 and 180\n\t\tangle0 = event.getAngleTurned();\n\t\tdistance0 = event.getDistanceTraveled();\n\t\tcurrent = !event.isMoving();\n\t}", "public Pose() {\n x = 0;\n y = 0;\n heading = 90;\n originalHeading = 90;\n }", "@Override\n public void receivedPose(UtmPose pose) {\n synchronized(_poseListeners) {\n if (_poseListeners.isEmpty()) return;\n }\n \n try {\n // Construct message\n Response resp = new Response(UdpConstants.NO_TICKET, DUMMY_ADDRESS);\n resp.stream.writeUTF(UdpConstants.COMMAND.CMD_SEND_POSE.str);\n UdpConstants.writePose(resp.stream, pose);\n \n // Send to all listeners\n synchronized(_poseListeners) {\n _udpServer.bcast(resp, _poseListeners.keySet());\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to serialize pose\");\n }\n }", "public int getMouthPosition()\n {\n return (mouthPosition);\n }", "public void copyPose(Pose raw) {\n pose = raw;\n }", "public boolean createPose(Poses pose) {\n\t\tif (!pose.getGraphic().equals(\"\") && !pose.getText().equals(\"\") && !pose.getTitle().equals(\"\")) { \n\t\t\tthis.openDataBase();\n\t\t\tContentValues values = new ContentValues();\n\t\t\tvalues.put(DataBaseHelper.COLUMN_GRAPHIC, pose.getGraphic());\n\t\t\tvalues.put(DataBaseHelper.COLUMN_TEXT, pose.getText());\n\t\t\tvalues.put(DataBaseHelper.COLUMN_TITLE, pose.getTitle());\n\t\t\tvalues.put(DataBaseHelper.COLUMN_DIFFICULTY, pose.getDifficulty());\n\t\t\tvalues.put(DataBaseHelper.COLUMN_SKIP, pose.getSkip());\n\t\t\ttry { \n\t\t\t\tlong insertId = myDataBase.insert(DataBaseHelper.TABLE_POSES, null,values);\n\t\t\t\tpose.setId(insertId);\n\t\t\t\tthis.close();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcatch (SQLException sqle) {\n\t\t\t\tLog.d(\"Database Error\", \"Error inserting Pose into database\");\n\t\t\t\tLog.d(\"SQL Exception\", sqle.toString());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tLog.d(\"Exception\", e.toString());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse { \n\t\t\tLog.d(\"Insert Pose Error\", \"Pose does not have all information\");\n\t\t\treturn false;\n\t\t\t\n\t\t}\t\n\t\t\n\t}", "@Override\n\t\tpublic void onPose(Myo myo, long timestamp, Pose pose) {\n\t\t\t// Handle the cases of the Pose.Type enumeration, and change the\n\t\t\t// text of the text view\n\n\t\t\t// based on the pose we receive.\n\t\t\tswitch (pose.getType()) {\n\t\t\tcase NONE:\n\t\t\t\t// mTextView.setText(getString(R.string.hello_world));\n\t\t\t\tbreak;\n\t\t\tcase FIST:\n\t\t\t\t// mTextView.setText(getString(R.string.myosdk__pose_fist));\n\n\t\t\t\tbreak;\n\t\t\tcase WAVE_IN:\n\t\t\t\t// mTextView.setText(getString(R.string.myosdk__pose_wavein));\n\t\t\t\tbreak;\n\t\t\tcase WAVE_OUT:\n\t\t\t\t// mTextView.setText(getString(R.string.myosdk__pose_waveout));\n\t\t\t\tbreak;\n\t\t\tcase FINGERS_SPREAD:\n\t\t\t\t// mTextView.setText(getString(R.string.myosdk__pose_fingersspread));\n\t\t\t\tif (ride)\n\t\t\t\t\tstop();\n\t\t\t\telse\n\t\t\t\t\tstart();\n\t\t\t\tbreak;\n\t\t\tcase TWIST_IN:\n\t\t\t\t// mTextView.setText(getString(R.string.myosdk__pose_twistin));\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public Position[] getWinningPositions();", "protected RobotCoordinates getRobotCoordinates() { return currentPos; }", "public Position getRobotPadPosition();", "public int getP1Points() {\n return p1Points;\n }", "public Point getPos(){\n return new Point(getUserFriendlyXPos(),getUserFriendlyYPos());\n }", "@Override\r\n public Point getRelatedSceneLocation() {\r\n return getLocationPoint(locationRatio);\r\n }", "public void setNeutralPose() {\n setPose(0.5f, -1, 0.5f, -1, 0.5f, -1);\n this.boltSize = 0;\n }", "public Point getRoverPos()\n {\n return new Point(roverX, roverY);\n }", "@Override\n public void onPose(Myo myo, long timestamp, Pose pose) {\n // Handle the cases of the Pose enumeration, and change the text of the text view\n // based on the pose we receive.\n switch (pose) {\n case UNKNOWN:\n break;\n case REST:\n case DOUBLE_TAP:\n break;\n case FIST:\n if(FLAG==true)\n {\n sendSMS(getReplyNumber(),getFistT());\n FLAG=false;\n }\n break;\n case WAVE_IN:\n if(FLAG==true)\n {\n sendSMS(getReplyNumber(),getMLT());\n FLAG=false;\n }\n //mTextView.setText(getString(R.string.pose_wavein));\n break;\n case WAVE_OUT:\n if(FLAG==true)\n {\n sendSMS(getReplyNumber(),getMRT());\n FLAG=false;\n }\n //mTextView.setText(getStrisdfng(R.string.pose_waveout));\n break;\n case FINGERS_SPREAD:\n if(FLAG==true)\n {\n sendSMS(getReplyNumber(),getSpreadT());\n FLAG=false;\n }\n //mTextView.setText(getString(R.string.pose_fingersspread));\n break;\n }\n\n if (pose != Pose.UNKNOWN && pose != Pose.REST) {\n // Tell the Myo to stay unlocked until told otherwise. We do that here so you can\n // hold the poses without the Myo becoming locked.\n myo.unlock(Myo.UnlockType.HOLD);\n\n // Notify the Myo that the pose has resulted in an action, in this case changing\n // the text on the screen. The Myo will vibrate.\n myo.notifyUserAction();\n } else {\n // Tell the Myo to stay unlocked only for a short period. This allows the Myo to\n // stay unlocked while poses are being performed, but lock after inactivity.\n myo.unlock(Myo.UnlockType.TIMED);\n }\n }", "public PVector getPos() {\n\t\treturn pos;\n\t}", "public PVector getPosition() { return position; }", "public static void main(String[] args) {\n\t\t// Set initial position in the pose network\n\t\tdouble x_pc = (Math.floor(PC_DIM_XY / 2.0) + 1);\n\t\tdouble y_pc = (Math.floor(PC_DIM_XY / 2.0) + 1);\n\t\tdouble th_pc = (Math.floor(PC_DIM_TH / 2.0) + 1);\n\n\t\t// Posecells[x_pc][y_pc][th_pc] = 1;\n\t\tdouble[] max_act_xyth_path = { x_pc, y_pc, th_pc };\n\n\t\t// Set the initial position in the odo and experience map\n\t\tprev_vrot_image_x_sums = new double[IMAGE_ODO_X_RANGE.length];\n\t\tprev_vtrans_image_x_sums = new double[IMAGE_ODO_X_RANGE.length];\n\n\t\tOdo initOdo = new Odo(0, PI / 2, prev_vtrans_image_x_sums,\n\t\t\t\tprev_vrot_image_x_sums, IMAGE_VTRANS_Y_RANGE,\n\t\t\t\tIMAGE_VROT_Y_RANGE, IMAGE_ODO_X_RANGE);\n\n\t\t// Specify movie and frames to read\n\t\t// In our case, specify image size, in x and y direction\n\n\t\tFFmpegFrameGrabber grabber = new FFmpegFrameGrabber(MOV_FILE);\n\t\tFFmpegFrameGrabber dispGrabber = null;\n\t\tif (DISP_MOV_FILE != \"\"){\n\t\t\tdispGrabber = new FFmpegFrameGrabber(DISP_MOV_FILE);\n\t\t}\n\n\t\t// store size in a variable\n\t\t// 5 used as random size\n\t\tArrayList<VT> vts = new ArrayList<VT>();\n\t\tArrayList<Odo> odos = new ArrayList<Odo>();\n\t\tArrayList<Experience> exps = new ArrayList<Experience>();\n\t\tArrayList<Link> links = new ArrayList<Link>();\n\n\t\tint numvts = 1;\n\n\t\t// Need to fix parameters; more specifically, array sizes\n\t\tvts.add(new VT(numvts, new double[] {}, 1.0, x_pc, y_pc, th_pc, 1, 1));\n\t\todos.add(initOdo);\n\n\t\t// vt[numvts].template_decay = 1.0;\n\t\tVT vtcurr = (VT) vts.get(0);\n\t\tvtcurr.template_decay = 1.0;\n\n\t\t// Experience[] exps = new Experience[5];\n\t\t// figure out where to get id\n\t\texps.add(new Experience(0, x_pc, y_pc, th_pc, 0, 0, (PI / 2), 1, links));\n\n\t\t// Process the parameters\n\t\t// nargin: number of arguments passed to main\n\t\t// varargin: input variable in a function definition statement that\n\t\t// allows the function to accept any number of input arguments\n\t\t// 1xN cell array, in which N is the number of inputs that the function\n\t\t// receives after explicitly declared inputs;\n\t\t// use prompt.in\n\t\tfor (int i = 0; i < (args.length - 3); i++) {\n\t\t\t// figure out varargin in Java\n\t\t\t// should be an array that is passed to the main(?) - double check\n\t\t\tswitch (args[i]) {\n\t\t\tcase \"RENDER_RATE\":\n\t\t\t\tRENDER_RATE = Integer.parseInt(args[i + 1]);\n\t\t\t\tbreak;\n\t\t\tcase \"BLOCK_READ\":\n\t\t\t\tBLOCK_READ = Integer.parseInt(args[i + 1]);\n\t\t\t\tbreak;\n\t\t\t// HK EDIT START\n\t\t\tcase \"START_FRAME\":\n\t\t\t\tSTART_FRAME = Integer.parseInt(args[i + 1]);\n\t\t\t\tbreak;\n\t\t\tcase \"END_FRAME\":\n\t\t\t\tEND_FRAME = Integer.parseInt(args[i + 1]);\n\t\t\t\tbreak;\n\n\t\t\tcase \"PC_VT_INJECT_ENERGY\":\n\t\t\t\tPC_VT_INJECT_ENERGY = Integer.parseInt(args[i + 1]);\n\t\t\t\tbreak;\n\t\t\tcase \"IMAGE_VT_Y_RANGE\":\n\t\t\t\tIMAGE_VT_Y_RANGE = Util.setRange(Integer.parseInt(args[i + 1]),\n\t\t\t\t\t\tInteger.parseInt(args[i + 2]));\n\t\t\t\tbreak;\n\t\t\tcase \"IMAGE_VT_X_RANGE\":\n\t\t\t\tIMAGE_VT_X_RANGE = Util.setRange(Integer.parseInt(args[i + 1]),\n\t\t\t\t\t\tInteger.parseInt(args[i + 2]));\n\t\t\t\t// break;\n\t\t\t\t// case \"VT_SHIFT_MATCH\": VT_SHIFT_MATCH =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// case \"VT_MATCH_THRESHOLD\": VT_MATCH_THRESHOLD =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t//\n\t\t\t\t// case \"VTRANS_SCALE\": VTRANS_SCALE =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// case \"VISUAL_ODO_SHIFT_MATCH\": VISUAL_ODO_SHIFT_MATCH =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// case \"IMAGE_VTRANS_Y_RANGE\": IMAGE_VTRANS_Y_RANGE =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// case \"IMAGE_VROT_Y_RANGE\": IMAGE_VROT_Y_RANGE =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// case \"IMAGE_ODO_X_RANGE\": IMAGE_ODO_X_RANGE =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t//\n\t\t\t\t// case \"EXP_DELTA_PC_THRESHOLD\": EXP_DELTA_PC_THRESHOLD =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// case \"EXP_CORRECTION\": EXP_CORRECTION =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// case \"EXP_LOOPS\": EXP_LOOPS = Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t//\n\t\t\t\t// case \"ODO_ROT_SCALING\": ODO_ROT_SCALING =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// case \"POSECELL_VTRANS_SCALING\": POSECELL_VTRANS_SCALING =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// HK EDIT END\n\t\t\t}\n\t\t}\n\n\t\t// vtcurr.template = new double[IMAGE_VT_X_RANGE.length];\n\n\t\tint frameIdx = 0;\n\n\t\ttry {\n\t\t\tgrabber.start();\n\t\t\tif (DISP_MOV_FILE != \"\"){\n\t\t\t\tdispGrabber.start();\n\t\t\t}\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tint frameCount = grabber.getLengthInFrames();\n\t\tEND_FRAME = frameCount;\n\t\tJFrame frame = new JFrame();\n\t\tif (DISP_MOV_FILE != \"\") {\n\t\t\tframe.setSize(1236, 744);\n\t\t} else {\n\t\t\tframe.setSize(640, 480);\n\t\t}\n\t\t\n\t\tframe.setVisible(true);\n\n\t\t// showOnScreen(0,frame);\n\n\t\t// Setup to display results\n\t\tDisplay display = new Display(\"RatSlam Output\");\n\t\tdisplay.pack();\n\t\tRefineryUtilities.centerFrameOnScreen(display);\n\t\t// showOnScreen(0,display);\n\t\tdisplay.setVisible(true);\n\t\tDefaultXYDataset dataset = (DefaultXYDataset) display.dataset;\n\n\t\tExpMapIteration expItr = new ExpMapIteration();\n\n\t\tExpMapIteration.EXP_DELTA_PC_THRESHOLD = 1.0;\n\t\tExpMapIteration.EXP_LOOPS = 100;\n\t\tExpMapIteration.EXP_CORRECTION = 0.5;\n\t\tExpMapIteration.PC_DIM_XY = PC_DIM_XY;\n\t\tExpMapIteration.PC_DIM_TH = PC_DIM_TH;\n\n\t\tOpenCVFrameConverter.ToIplImage grabberConverter = new OpenCVFrameConverter.ToIplImage();\n\t\tJava2DFrameConverter paintConverter = new Java2DFrameConverter();\n\t\tBufferedImage img = null;\n\t\tBufferedImage dispImg = null;\n\n//\t\tfor (frameIdx = 0; frameIdx < END_FRAME; frameIdx++) {\n\t\twhile (true) {\n\t\t\tframeIdx++;\n\t\t\tSystem.out.println(\"debug: frame: \" + frameIdx + \" of ???\");\n\t\t\t// save the experience map information to the disk for later\n\t\t\t// playback\n\t\t\t// read the avi file (in our case, the photo file) and record the\n\t\t\t// delta time\n\n\t\t\ttry {\n\t\t\t\torg.bytedeco.javacv.Frame f = grabber.grab();\n\t\t\t\timg = paintConverter.getBufferedImage(f,\n\t\t\t\t\t\t2.2 / grabber.getGamma());\n\t\t\t\tif (DISP_MOV_FILE != \"\"){\n\t\t\t\t\torg.bytedeco.javacv.Frame fd = dispGrabber.grab();\n\t\t\t\t\tdispImg = paintConverter.getBufferedImage(fd,\n\t\t\t\t\t\t\t2.2 / dispGrabber.getGamma());\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tImageFilter filter = new GrayFilter(true, 0);\n\t\t\tImageProducer producer = new FilteredImageSource(img.getSource(),\n\t\t\t\t\tfilter);\n\t\t\tImage grayImg = Toolkit.getDefaultToolkit().createImage(producer);\n\t\t\tif (DISP_MOV_FILE != \"\"){\n\t\t\t\tdrawFrame(frame, dispImg, dispImg, frameIdx); //using display image here for ONR visit, pretty it up, rest of processign is on img\n\t\t\t} else {\n\t\t\t\tdrawFrame(frame, img, img, frameIdx);\n\t\t\t}\n\t\t\tVisualTemplate viewTemplate = new VisualTemplate(img, x_pc, y_pc,\n\t\t\t\t\tth_pc, img.getWidth(), img.getHeight(), vts);\n\t\t\tvtID = viewTemplate.visual_template();\n\t\t\tVisualOdometry vo = new VisualOdometry();\n\t\t\tvo.visual_odometry(img, odos);\n\t\t\t// XXX: use odoData to track odo data for comparison as per Matlab\n\t\t\t// main\n\t\t\tPosecell_Iteration pci = new Posecell_Iteration(vtID, odos.get(odos\n\t\t\t\t\t.size() - 1).vtrans, odos.get(odos.size() - 1).vrot, pc,\n\t\t\t\t\tvts, PC_E_XY_WRAP, PC_E_TH_WRAP, PC_I_XY_WRAP, PC_I_TH_WRAP);\n\t\t\tpc = pci.iteration();\n\n\t\t\txyth = pc.getPosecellXYTH(PC_XY_SUM_SIN_LOOKUP,\n\t\t\t\t\tPC_XY_SUM_COS_LOOKUP, PC_TH_SUM_SIN_LOOKUP,\n\t\t\t\t\tPC_TH_SUM_COS_LOOKUP, PC_CELLS_TO_AVG, PC_AVG_XY_WRAP,\n\t\t\t\t\tPC_AVG_TH_WRAP);\n\t\t\t// System.out.println(\"debug: odo.vtrans: \"+\n\t\t\t// odos.get(odos.size()-1).vtrans);\n\n\t\t\tx_pc = xyth[0];\n\t\t\ty_pc = xyth[1];\n\t\t\tth_pc = xyth[2];\n\n\t\t\texpItr.iterate(vtID, odos.get(odos.size() - 1).vtrans,\n\t\t\t\t\todos.get(odos.size() - 1).vrot, x_pc, y_pc, th_pc, vts,\n\t\t\t\t\texps);\n\n\t\t\tdataset.addSeries(\"Experience Map\", getExpsXY(exps));\n\n\t\t}\n\t}", "public int getPlayPoints() {\n return localPlayPoints;\n }", "public int getCurrentPlayerRealPosition();", "public Point getPos() {\n return this.pos;\n }", "public static Point pos(){\r\n\t\tRandom random = new Random();\r\n\t\tint x = 0;\r\n\t\tint y = 0;\r\n\t\t//acts as a 4 sided coin flip\r\n\t\t//this is to decide which side the asteroid will appear\r\n\t\tint pos = random.nextInt(4);\r\n\t\t//west\r\n\t\tif(pos == 0){\r\n\t\t\tx = 0;\r\n\t\t\ty = random.nextInt(601);\r\n\t\t}\r\n\t\t//north\r\n\t\telse if(pos == 1){\r\n\t\t\tx = random.nextInt(801);\r\n\t\t\ty = 0;\r\n\t\t}\r\n\t\t//east\r\n\t\telse if(pos == 2){\r\n\t\t\tx = 800;\r\n\t\t\ty = random.nextInt(601);\r\n\t\t}\r\n\t\t//\r\n\t\telse if(pos == 3){\r\n\t\t\tx = random.nextInt(801);\r\n\t\t\ty = 600;\r\n\t\t}\r\n\t\tPoint p = new Point(x,y);\r\n\t\treturn p;\r\n\t}", "public Poses getPose(int id) {\n\t\tPoses newPose = null;\n\t\tthis.openDataBase();\n \tLog.d(\"We're Here\", \"getPose\");\n\t\ttry { \n\t\t\t\tCursor cursor = myDataBase.query(DataBaseHelper.TABLE_POSES,\n\t\t\t\tallColumns, DataBaseHelper.COLUMN_ID + \" = \" + id, null,\n\t\t\t\tnull, null, null);\n\t\n\t\tcursor.moveToFirst();\n\t\tLog.d(\"Database contents\", \"Graphic string: \" + cursor.getString(1));\n\t\tLog.d(\"Database contents\", \"YogaName: \" + cursor.getString(6));\n\t\tnewPose = new Poses(cursor.getLong(0),\n\t\t\t\tcursor.getString(1),\n\t\t\t\tcursor.getString(2),\n\t\t\t\tcursor.getString(3),\n\t\t\t\tcursor.getInt(4),\n\t\t\t\tcursor.getInt(5),\n\t\t\t\tcursor.getString(6),\n\t\t\t\tcursor.getInt(7));\n\t\tcursor.close();\n\t\t}\n\t\tcatch (SQLException sqle) {\n\t\t\tLog.d(\"Database Error\", \"Error getting Pose from database\");\n\t\t\tLog.d(\"SQL Exception\", sqle.toString());\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tLog.d(\"Exception\", e.toString());\n\t\t}\n\t\tthis.close();\n\t\treturn newPose;\n\t}", "private long opponent_winning_position() {\r\n return compute_winning_position(bitboard ^ mask, mask);\r\n }", "public void reach(Pose pose) throws ManipulatorException;", "MazePoint getActivePlayerCoordinates();", "public void paintPose(Graphics2D g2d, Pose pose) {\r\n\t\tEllipse2D c = new Ellipse2D.Float(getX(pose.getX() - ROBOT_SIZE/2), getY(pose.getY() + ROBOT_SIZE/2), getDistance(ROBOT_SIZE), getDistance(ROBOT_SIZE));\r\n\t\tLine rl = getArrowLine(pose);\r\n\t\tLine2D l2d = new Line2D.Float(rl.x1, rl.y1, rl.x2, rl.y2);\r\n\t\tg2d.draw(l2d);\r\n\t\tg2d.fill(c);\r\n\t}", "public int getPublicVictoryPoints() {\n \t\tint points = towns + 2 * cities;\n \n \t\tif (board.hasLongestRoad(this))\n \t\t\tpoints += 2;\n \n \t\tif (board.hasLargestArmy(this))\n \t\t\tpoints += 2;\n \n \t\treturn points;\n \t}", "@Override\n\tpublic void setup() {\n\t\tint videoWidth = 1280/2;\n\t\tint videoHeight = 720/2;\n//\t\tint videoWidth = 640;\n//\t\tint videoHeight = 400;\n\t\tint videoFrameRate = 30;\n\t\tint secondsToRecordInSegment = 5;\n\t\n\t\tsize(videoWidth, videoHeight, P2D);\n\t\tframeRate(60);\n\t\t\n\t\tcam = new Camera(this, videoWidth, videoHeight, videoFrameRate, secondsToRecordInSegment);\n\t\tregionManager = new RegionManager(this, videoWidth, videoHeight);\n\t\twinnerProcessor = new WinnerProcessor(this, cam, regionManager);\n\t\tstartingPistol = new StartingPistol();\n\t\t\n\t\tglobalKeyboardActions = new HashMap<Integer, Runnable>();\n\t\tglobalKeyboardActions.put(Integer.valueOf('D'), new Runnable() {\n\t\t\t@Override public void run() {\n\t\t\t\tprintln(\"Switching to region definition mode\");\n\t\t\t\tcurrentMode = Mode.DEFINE_REGION;\n\t\t\t}\n\t\t});\n\t\tglobalKeyboardActions.put(Integer.valueOf('R'), new Runnable() {\n\t\t\t@Override public void run() {\n\t\t\t\tprintln(\"Switching to recording mode\");\n\t\t\t\tcurrentMode = Mode.RECORDING;\n\t\t\t}\n\t\t});\n\t\tglobalKeyboardActions.put(Integer.valueOf('P'), new Runnable() {\n\t\t\t@Override public void run() {\n\t\t\t\tprintln(\"Switching to playback mode\");\n\t\t\t\tcurrentMode = Mode.PLAYBACK;\n\t\t\t}\n\t\t});\n\t\t\n\t\tmodeKeyboardActions = new HashMap<Mode, Map<Integer,Runnable>>();\n\t\t\n\t\t// Region Actions\n\t\tMap<Integer, Runnable> regionActions = new HashMap<Integer, Runnable>();\n\t\tmodeKeyboardActions.put(Mode.DEFINE_REGION, regionActions);\n\t\t\n\t\tregionActions.put(Integer.valueOf('3'), new Runnable() {\n\t\t\t@Override public void run() {\n\t\t\t\tprintln(\"In region define mode. Switching to finish line definition\");\n\t\t\t\tregionManager.setRegionToDefine(Region.FINISH_LINE);\n\t\t\t}\n\t\t});\n\t\tregionActions.put(Integer.valueOf('1'), new Runnable() {\n\t\t\t@Override public void run() {\n\t\t\t\tprintln(\"In region define mode. Switching to lane 1 definition\");\n\t\t\t\tregionManager.setRegionToDefine(Region.LANE1);\n\t\t\t}\n\t\t});\n\t\tregionActions.put(Integer.valueOf('2'), new Runnable() {\n\t\t\t@Override public void run() {\n\t\t\t\tprintln(\"In region define mode. Switching to lane 2 definition\");\n\t\t\t\tregionManager.setRegionToDefine(Region.LANE2);\n\t\t\t}\n\t\t});\n\t\tregionActions.put(Integer.valueOf('0'), new Runnable() {\n\t\t\t@Override public void run() {\n\t\t\t\tprintln(\"In region define mode. Clearing current region definition\");\n\t\t\t\tregionManager.setRegionToDefine(null);\n\t\t\t}\n\t\t});\n\t\tregionActions.put(Integer.valueOf('S'), new Runnable() {\n\t\t\t@Override public void run() {\n\t\t\t\tprintln(\"Saving current regions to disk\");\n\t\t\t\tregionManager.saveRegions();\n\t\t\t}\n\t\t});\n\t\tregionActions.put(Integer.valueOf('L'), new Runnable() {\n\t\t\t@Override public void run() {\n\t\t\t\tprintln(\"Loading previous regions from disk\");\n\t\t\t\tregionManager.loadRegions();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Recording actions\n\t\tMap<Integer, Runnable> recordingActions = new HashMap<Integer, Runnable>();\n\t\tmodeKeyboardActions.put(Mode.RECORDING, recordingActions);\n\t\t\n\t\trecordingActions.put(Integer.valueOf(' '), new Runnable() {\n\t\t\t@Override public void run() {\n\t\t\t\tstartRace();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Playback actions\n\t\tMap<Integer, Runnable> playbackActions = new HashMap<Integer, Runnable>();\n\t\tmodeKeyboardActions.put(Mode.PLAYBACK, playbackActions);\n\t\t\n\t\t// Left arrow\n\t\tplaybackActions.put(Integer.valueOf(37), new Runnable() {\n\t\t\t@Override public void run() {\n\t\t\t\twinnerProcessor.stepBackward();\n\t\t\t}\n\t\t});\n\t\t// Right arrow\n\t\tplaybackActions.put(Integer.valueOf(39), new Runnable() {\n\t\t\t@Override public void run() {\n\t\t\t\twinnerProcessor.stepForward();\n\t\t\t}\n\t\t});\n\t\tplaybackActions.put(Integer.valueOf(' '), new Runnable() {\n\t\t\t@Override public void run() {\n\t\t\t\twinnerProcessor.toggleManualStep();\n\t\t\t}\n\t\t});\n\t\tplaybackActions.put(Integer.valueOf(38), new Runnable() {\n\t\t\t@Override public void run() {\n\t\t\t\twinnerProcessor.togglePlayOriginal();\n\t\t\t}\n\t\t});\n\t\tplaybackActions.put(Integer.valueOf(40), new Runnable() {\n\t\t\t@Override public void run() {\n\t\t\t\twinnerProcessor.togglePlayOriginal();\n\t\t\t}\n\t\t});\n\t\t\n\t\tcam.start();\n\t\t\n\t\tstartingPistol.listen(this);\n\t}", "public Punto getPos() {\n\t\treturn pos;\n\t}", "public double getPosition()\n {\n return position * FPS;\n }", "public String toString() {\n\t\treturn \"PoseDelta<\" + this.angleDelta + \", \" + this.distanceDelta + \">\"; \n\t}", "public int getLiftPosition() {\n //Do some math on getting the encoder positions\n return liftStageOne.getCurrentPosition() + liftStageTwo.getCurrentPosition();\n }", "public int getWinY() {\r\n return winY;\r\n }", "public int getVictoryPoints() {\n\t\treturn victoryPoints;\n\t}", "public void requestMovePoseDown()\r\n {\r\n \tAnimatedSpriteEditor singleton = AnimatedSpriteEditor.getEditor();\r\n \tAnimatedSpriteEditorGUI gui = singleton.getGUI(); \r\n \t \r\n boolean continueToMove = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE\r\n continueToMove = promptToSave();\r\n }\r\n if(continueToMove)\r\n {\r\n \tposeIO.movePose(poseID, 1);\r\n \tsingleton.getFileManager().reloadSpriteType();\r\n \tgui.updatePoseList();\r\n \tJOptionPane.showMessageDialog(\r\n gui,\r\n POSE_MOVED_TEXT,\r\n POSE_MOVED_TITLE_TEXT,\r\n JOptionPane.INFORMATION_MESSAGE);\r\n } \r\n else\r\n {\r\n \tJOptionPane.showMessageDialog(\r\n gui,\r\n POSE_MOVE_ERROR_TEXT,\r\n POSE_MOVE_ERROR_TITLE_TEXT,\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "public PregledPoruka() {\n preuzmiMape();\n preuzmiPoruke();\n }", "public int getVictoryPoints() {\n \t\treturn getPublicVictoryPoints() + victory;\n \t}", "public Point getAPosition()\n\t{\n\t\treturn aPoint;\n\t}", "public int getPoints() { return points; }", "public Rectangle points(){\n\t\treturn shotRect;\n\t}", "public int getPoints(){\r\n\t\treturn this.points;\r\n\t}", "public int getPoints(){\r\n\t\treturn this.points;\r\n\t}", "public int getPointsP() {\r\n\r\n pointsP = getPointsPlayer() + getPointsPlayer2();\r\n\r\n if (pointsP >= 10) {\r\n pointsP -= 10;\r\n }\r\n return pointsP;\r\n }", "public void findRobotPosition(){\n targetVisible = false;\n for (VuforiaTrackable trackable : allTrackables) {\n if (((VuforiaTrackableDefaultListener)trackable.getListener()).isVisible()) {\n telemetry.addData(\"Visible Target\", trackable.getName());\n targetVisible = true;\n\n // Get the position of the visible target and put the X & Y position in visTgtX and visTgtY\n // We will use these for determining bearing and range to the visible target\n OpenGLMatrix tgtLocation = trackable.getLocation();\n VectorF tgtTranslation = tgtLocation.getTranslation();\n visTgtX = tgtTranslation.get(0) / mmPerInch;\n visTgtY = tgtTranslation.get(1) / mmPerInch;\n //telemetry.addData(\"Tgt X & Y\", \"{X, Y} = %.1f, %.1f\", visTgtX, visTgtY);\n\n // getUpdatedRobotLocation() will return null if no new information is available since\n // the last time that call was made, or if the trackable is not currently visible.\n OpenGLMatrix robotLocationTransform = ((VuforiaTrackableDefaultListener)trackable.getListener()).getUpdatedRobotLocation();\n if (robotLocationTransform != null) {\n lastLocation = robotLocationTransform;\n }\n break;\n }\n }\n\n // Provide feedback as to where the robot is located (if we know).\n if (targetVisible) {\n // express position (translation) of robot in inches.\n VectorF translation = lastLocation.getTranslation();\n //telemetry.addData(\"Pos (in)\", \"{X, Y, Z} = %.1f, %.1f, %.1f\",\n // translation.get(0) / mmPerInch, translation.get(1) / mmPerInch, translation.get(2) / mmPerInch);\n\n // express the rotation of the robot in degrees.\n Orientation rotation = Orientation.getOrientation(lastLocation, EXTRINSIC, XYZ, DEGREES);\n //telemetry.addData(\"Rot (deg)\", \"{Roll, Pitch, Heading} = %.0f, %.0f, %.0f\", rotation.firstAngle, rotation.secondAngle, rotation.thirdAngle);\n\n // Robot position is defined by the standard Matrix translation (x and y)\n robotX = translation.get(0)/ mmPerInch;\n robotY = translation.get(1)/ mmPerInch;\n\n // Robot bearing (in +vc CCW cartesian system) is defined by the standard Matrix z rotation\n robotBearing = rotation.thirdAngle;\n\n // target range is based on distance from robot position to the visible target\n // Pythagorean Theorum\n targetRange = Math.sqrt((Math.pow(visTgtX - robotX, 2) + Math.pow(visTgtY - robotY, 2)));\n\n // target bearing is based on angle formed between the X axis to the target range line\n // Always use \"Head minus Tail\" when working with vectors\n targetBearing = Math.toDegrees(Math.atan((visTgtY - robotY)/(visTgtX - robotX)));\n\n // Target relative bearing is the target Heading relative to the direction the robot is pointing.\n // This can be used as an error signal to have the robot point the target\n relativeBearing = targetBearing - robotBearing;\n // Display the current visible target name, robot info, target info, and required robot action.\n\n telemetry.addData(\"Robot\", \"[X]:[Y] (Heading) [%5.0fin]:[%5.0fin] (%4.0f°)\",\n robotX, robotY, robotBearing);\n telemetry.addData(\"Target\", \"[TgtRange] (TgtBearing):(RelB) [%5.0fin] (%4.0f°):(%4.0f°)\",\n targetRange, targetBearing, relativeBearing);\n }\n else {\n telemetry.addData(\"Visible Target\", \"none\");\n }\n }", "public void onTrackedHand(SimpleOpenNI curKinect, int handId, PVector pos){\n kinect.convertRealWorldToProjective(pos,pos);\n\n if( gesture.getHands().containsKey(handId) ){\n //insert point\n gesture.getHand(handId).savePoint(pos);\n\n }\n}", "private Pose cameraTouchingImage(Frame frame) {\n getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);\n float y_pos = displaymetrics.heightPixels / 2.0f;\n float x_pos = displaymetrics.widthPixels / 2.0f;\n\n for (HitResult hit : frame.hitTest(x_pos, y_pos)) {\n Trackable trackable = hit.getTrackable();\n if (trackable instanceof AugmentedImage) {\n Pose poseHit = hit.getHitPose();\n Pose cameraPose = frame.getCamera().getPose(); // need to check if camera is decently close\n float dx = poseHit.tx() - cameraPose.tx();\n float dy = poseHit.ty() - cameraPose.ty();\n float dz = poseHit.tz() - cameraPose.tz();\n float distanceMeters = (float) Math.sqrt(dx * dx + dy * dy + dz * dz);\n\n if (distanceMeters <= .15f) {\n return poseHit;\n }\n }\n }\n return null;\n }", "public void requestCopyPose()\r\n {\r\n \tAnimatedSpriteEditorGUI gui = AnimatedSpriteEditor.getEditor().getGUI(); \r\n \r\n boolean continueToCopy = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE\r\n continueToCopy = promptToSave();\r\n }\r\n \r\n // IF THE USER REALLY WANTS TO EXIT THE APP\r\n if (continueToCopy)\r\n {\r\n \tcontinueToCopy = poseIO.copyPose(currentPoseName, poseID);\r\n }\t \r\n \r\n \tif (continueToCopy)\r\n \t{\r\n \t\tJOptionPane.showMessageDialog(\r\n\t gui,\r\n\t POSE_COPIED_TEXT,\r\n\t POSE_COPIED_TITLE_TEXT,\r\n\t JOptionPane.INFORMATION_MESSAGE);\r\n \t\tAnimatedSpriteEditor.getEditor().getFileManager().reloadSpriteType();\r\n EditorStateManager stateManager = AnimatedSpriteEditor.getEditor().getStateManager();\r\n stateManager.setState(EditorState.SELECT_POSE_STATE);\r\n stateManager.getPoseurStateManager().setState(PoseurState.SELECT_SHAPE_STATE);\r\n \t}\r\n \telse\r\n \t{\r\n \t\tJOptionPane.showMessageDialog(\r\n\t gui,\r\n\t POSE_COPIED_ERROR_TEXT,\r\n\t POSE_COPIED_ERROR_TITLE_TEXT,\r\n\t JOptionPane.ERROR_MESSAGE);\r\n \t}\r\n \t\r\n }", "final public int getPoints() {\r\n\t\tif (wildcard) {\r\n\t\t\treturn 20;\r\n\t\t}\r\n\t\t\r\n\t\tif (isJoker()) {\t\t\t\r\n\t\t\treturn 50;\r\n\t\t}\r\n\t\t\r\n\t\treturn face;\r\n\t}", "@Override\n\t\t\tpublic Vector getPosition() {\n\t\t\t\treturn new Vector(-2709.487, -4281.02, 3861.564); //-4409.0, 2102.0, -4651.0);\n\t\t\t}", "public int getP2Points() {\n return p2Points;\n }", "@Override\n public void onPose(Myo myo, long timestamp, Pose pose) {\n if (unlocked) {\n if (pose.equals(Pose.FINGERS_SPREAD) == true) {\n Intent i = new Intent(\"com.android.music.musicservicecommand\");\n i.putExtra(\"command\", \"togglepause\");\n sendBroadcast(i);\n extendLock();\n } else if (pose.equals(Pose.WAVE_IN) == true) {\n Intent i = new Intent(\"com.android.music.musicservicecommand\");\n i.putExtra(\"command\", \"previous\");\n sendBroadcast(i);\n extendLock();\n } else if (pose.equals(Pose.WAVE_OUT) == true) {\n Intent i = new Intent(\"com.android.music.musicservicecommand\");\n i.putExtra(\"command\", \"next\");\n sendBroadcast(i);\n extendLock();\n }\n } else if (!unlocked && !unlocked1 && pose.equals(Pose.THUMB_TO_PINKY)) {\n unlocked1 = true;\n } else if (!unlocked && unlocked1) {\n if (pose.equals(Pose.FIST)) {\n unlocked = true;\n myo.vibrate(Myo.VibrationType.SHORT);\n\n handler.postDelayed(lockMyo, 2000);\n } else if(!pose.equals(Pose.REST)) {\n unlocked1 = false;\n }\n }\n }", "private Vec2 calculatePos() {\n\t\tNetTransformComponent transform = actor.getEntity().getNetTransform();\n\t\tif (transform != null) {\n\t\t\tVec2 screenPos = scene.getCamera()\n\t\t\t\t\t.getScreenCoordinates(Vec3.add(transform.getPosition(), new Vec3(-2.0f, 3.25f, 0.0f)));\n\t\t\tVec2 result = new Vec2(screenPos.getX(), screenPos.getY());\n\t\t\treturn result;\n\t\t}\n\n\t\treturn new Vec2(0.0f, 0.0f);\n\t}", "public int getPoints() {\n return this.points;\n }", "public PVector getRawPosition(){\n\t\treturn this.leap.convert(this.arm.center());\n\t}", "public float getPos() {\n return ((spos-xpos))/(sposMax-sposMin);// * ratio;\n }", "public static Pose getHab1CenterLeftStartPose() { rightSide = false; return centerLeftStartPose; }", "@Override\r\n\tpublic Point getWaku() {\r\n\t\treturn new Point(wx, wy);\r\n\t}", "public int getPoints() {\r\n\t\treturn points;\r\n\t}", "public Point getNotePoint() {\r\n\t\tif (rect != null) {\r\n\t\t\treturn new Point((int) rect.getX(), (int) rect.getY());\r\n\t\t} else {\r\n\t\t\treturn new Point(0, 0);\r\n\t\t}\r\n\t}", "public Point getRobotLocation();", "public int getPoints() {\r\n\t\treturn this.points;\r\n\r\n\t}", "public int getPoints() {\n return points;\n }", "public int getPoints() {\n return points;\n }", "public int getPoints() {\n return points;\n }", "public int getPoints() {\n return points;\n }", "protected int getFramesPased() {\r\n\t\treturn framesPassed;\r\n\t}", "private String getPoints(){\n\t\tString pu = \" punts.\";\n\t\tif(points == 1){\n\t\t\tpu = \" punt.\";\n\t\t}\n\t\treturn \"Puntuació de \" + points + pu;\n\t}", "public abstract int getPerTagAvgPoseSolveTime();", "public int getWinX() {\r\n return winX;\r\n }", "public void requestOpenPose()\r\n {\r\n // WE MAY HAVE TO SAVE CURRENT WORK\r\n boolean continueToOpen = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE WITH A CANCEL\r\n continueToOpen = promptToSave();\r\n }\r\n \r\n // IF THE USER REALLY WANTS TO OPEN A POSE\r\n if (continueToOpen)\r\n {\r\n // GO AHEAD AND PROCEED MAKING A NEW POSE\r\n promptToOpen();\r\n }\r\n }", "public String position() {\n\t\t\treturn \"\\n\"\n\t\t\t+ \"Player 1 owns: \"\n\t\t\t+ printSet(moves1)\n\t\t\t+ \"Player 2 owns: \"\n\t\t\t+ printSet(moves2)\n\t\t\t+ (isGameOver() ? \"Game is over.\\n\" : \"Player \"\n\t\t\t\t\t+ whoseTurn() + \" moves next.\\n\");\n\t\t}", "public void requestExportPose()\r\n {\r\n // ASK THE USER TO MAKE SURE THEY WANT TO GO AHEAD WITH IT\r\n AnimatedSpriteEditorGUI gui = AnimatedSpriteEditor.getEditor().getGUI();\r\n int selection = JOptionPane.showOptionDialog( gui, \r\n EXPORT_POSE_TEXT + currentPoseName + POSE_FILE_EXTENSION,\r\n EXPORT_POSE_TITLE_TEXT, \r\n JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE,\r\n null, null, null);\r\n \r\n // IF THE USER CLICKED OK, THEN EXPORT THE POSE\r\n if (selection == JOptionPane.OK_OPTION)\r\n {\r\n poseIO.exportPose(currentPoseName);\r\n }\r\n }", "public void onCompletedGesture(SimpleOpenNI curContext,int gestureType, PVector pos)\n{\n println(\"onCompletedGesture - gestureType: \" + gestureType + \", pos: \" + pos);\n \n int handId = kinect.startTrackingHand(pos);\n println(\"hand stracked: \" + handId);\n}", "@Override\n public PosDeg getPosition() {\n return tracker.getPosition();\n }", "public HashMap<String, int[]> getPoses() {\n\t\treturn poses;\n\t}", "public PVector getPosition(){\n\t\treturn position;\n\t}", "public void visionTurnPID(){\n double error = visionTargetPosition + Robot.vision.getYaw();\n double dt = Timer.getFPGATimestamp() - visionLastTimestamp;\n visionKF = Math.copySign(visionKF, error);\n\n if(Math.abs(error)<visionIZone){\n visionErrorSum = visionErrorSum + error * dt;\n }else{\n visionErrorSum = 0;\n }\n\n double errorRate = (error - visionLastError)/dt;\n\n Double outputTurn = visionKF + (visionKP * error) + (visionKI * visionErrorSum) + (visionKD * errorRate);\n teleopDrive(0, outputTurn);\n\n SmartDashboard.putNumber(\"Vision Turn Value\", outputTurn);\n\n visionLastTimestamp = Timer.getFPGATimestamp();\n visionLastError = error;\n \n \n }", "public int[] getCurrentTrueState() {\n\t\tint[] ret = { mrRoboto.y, mrRoboto.x, mrRoboto.h };\n\t\treturn ret;\n\t}" ]
[ "0.7160649", "0.689967", "0.68810844", "0.6856653", "0.6576852", "0.65200466", "0.64756525", "0.64514464", "0.63811564", "0.63157904", "0.62925863", "0.6072724", "0.60678774", "0.60267633", "0.5811193", "0.5810775", "0.57465434", "0.5706549", "0.5681927", "0.5664984", "0.55470526", "0.55137813", "0.550708", "0.5478775", "0.54666823", "0.5431576", "0.5428756", "0.53611624", "0.5355468", "0.5347353", "0.5344037", "0.533278", "0.5306843", "0.52984554", "0.5295811", "0.5281049", "0.52705806", "0.52461874", "0.52317977", "0.52299106", "0.5228483", "0.52221334", "0.5208753", "0.520584", "0.5189092", "0.5180807", "0.51745135", "0.51583654", "0.5155646", "0.5142582", "0.5140798", "0.5134124", "0.5132124", "0.5126581", "0.5118016", "0.5101284", "0.5096309", "0.5092342", "0.50868636", "0.50706434", "0.5070163", "0.50634927", "0.5063281", "0.5063281", "0.50629115", "0.5062118", "0.50518566", "0.5046541", "0.5046528", "0.5046083", "0.5045308", "0.5042522", "0.5039465", "0.50362486", "0.5034845", "0.5034112", "0.5030618", "0.502901", "0.5026045", "0.5014789", "0.50036013", "0.5001712", "0.4997297", "0.49941716", "0.49941716", "0.49941716", "0.49941716", "0.4993082", "0.49903393", "0.49860862", "0.49859533", "0.4984113", "0.4981382", "0.4981151", "0.49798456", "0.49768904", "0.4974778", "0.49711734", "0.49691552", "0.4964603" ]
0.6067076
13
The direction of angles is reversed because the coordinate system is reversed.
private void right() { lastMovementOp = Op.RIGHT; rotate(TURNING_ANGLE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Direction reverse()\n {\n return new Direction(dirInDegrees + (FULL_CIRCLE / 2));\n }", "public void reverseDirection() {\n\t\tdirection *= -1;\n\t\ty += 10;\n\t}", "void reverseDirection();", "private float reverseDirection(float dir) {\n if (dir < Math.PI) return (float) (dir+Math.PI);\n else return (float) (dir-Math.PI);\n }", "public Bearing reverse() {\n return Bearing.get( (this.bearing + 4) % 8);\n }", "public double direction(){\n return Math.atan2(this.y, this.x);\n }", "public double bearingReverse() {\r\n return this.bearingReverse;\r\n }", "public float reverseVerticalDirection(float angle) {\n return (float) (2*Math.PI-angle);\n }", "public double getOrientation()\r\n\t{\r\n\t\treturn Math.atan2(-end.getY()+start.getY(), end.getX()-start.getX());\r\n\t}", "public static double reverseAngle(double angle) {\n return 180 - angle;\n }", "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}", "void turnToDir(float angle) { \n float radian = radians(angle);\n _rotVector.set(cos(radian), sin(radian));\n _rotVector.setMag(1);\n }", "@Override\n public void turnRight(Double angle) {\n turnLeft(angle * -1);\n }", "public void reverseDirectionY()\n\t{\n\t\t\n\t\tvy = -vy;\n\t}", "private void fixDirections() {\n\t\tdouble sensDir = sens.getDirection();\n\t\tif (sensDir > 360) {\n\t\t\tsensDir -= 360;\n\t\t} // Rotate back around to keep it tidy\n\t\telse if (sensDir < 1) {\n\t\t\tsensDir += 360;\n\t\t}\n\t\tsens.setDirection(sensDir);\n\n\t\tif (desiredDirection > 360) {\n\t\t\tdesiredDirection -= 360;\n\t\t} // Rotate back around to keep it tidy\n\t\telse if (desiredDirection < 1) {\n\t\t\tdesiredDirection += 360;\n\t\t}\n\t}", "public Direction opposite() {\n return opposite;\n }", "@NotNull\n @Override\n public OctilinearDirection toOctilinear() {\n Direction direction;\n double diff = angle % 45;\n if (diff < 45 / 2) {\n direction = fromAngle(angle - diff);\n }\n else {\n direction = fromAngle(angle + (45 - diff));\n }\n return direction.toOctilinear();\n }", "public float reverseHorizontalDirection(float angle) {\n if (angle <= Math.PI) return (float) (Math.PI-angle);\n else return (float) (3*Math.PI-angle);\n }", "public void reverseDirection(Position ep) throws InvalidPositionException;", "Direction invert() {\n switch (this) {\n case NORTH: return SOUTH;\n case SOUTH: return NORTH;\n case EAST: return WEST;\n case WEST: return EAST;\n case NORTH_EAST: return SOUTH_WEST;\n case NORTH_WEST: return SOUTH_EAST;\n case SOUTH_EAST: return NORTH_WEST;\n case SOUTH_WEST: return NORTH_EAST;\n default: return NULL;\n }\n }", "public Direction rotate180() {\n return values()[r180index];\n }", "private void rotateRight() {\r\n\t switch(direction){\r\n\t case Constants.DIRECTION_NORTH:\r\n\t direction = Constants.DIRECTION_EAST;\r\n\t break;\r\n\t case Constants.DIRECTION_EAST:\r\n\t direction = Constants.DIRECTION_SOUTH;\r\n\t break;\r\n\t case Constants.DIRECTION_SOUTH:\r\n\t direction = Constants.DIRECTION_WEST;\r\n\t break;\r\n\t case Constants.DIRECTION_WEST:\r\n\t direction = Constants.DIRECTION_NORTH;\r\n\t break;\r\n\t }\r\n\t }", "default Vector3 getDirection() {\r\n return Vector3.fromXYZ(getDirX(), getDirY(), getDirZ());\r\n }", "private void resetAngles() {\n \ttorso_front.rotateAngleX = 0;\n \tleg_front_left.rotateAngleX = leg_front_right.rotateAngleX = 0;\n \tleg_front_left.rotateAngleY = leg_front_right.rotateAngleY = 0;\n \tleg_front_left.rotateAngleZ = leg_front_right.rotateAngleZ = 0;\n \tleg_back_left.rotateAngleX = leg_front_left.rotateAngleX;\n \tleg_back_right.rotateAngleX = leg_front_right.rotateAngleX;\n \tleg_back_right.rotateAngleY = leg_back_left.rotateAngleY = 0;\n \tleg_back_right.rotateAngleZ = leg_back_left.rotateAngleZ = 0;\n\t\tknee_front_left.rotateAngleX = knee_front_right.rotateAngleX = 0;\n\t\tknee_back_left.rotateAngleX = knee_back_right.rotateAngleX = 0;\n\t\ttail_stub.rotateAngleX = -1.05f;\n\t\ttail_segment_1.rotateAngleX = 1.1f;\n\t\ttail_segment_2.rotateAngleX = tail_segment_3.rotateAngleX = 0;\n\t\tneck.rotateAngleX = 0.17453292519943295f;\n }", "public double getAngleYZ() {\r\n\t\tdouble l = this.lenght();\r\n\t\tif (l==0)\r\n\t\t\treturn 0;\r\n\t\treturn Math.asin(this.x/l);\r\n\t}", "public void rotateY180() {\n\t\tfor (int v = 0; v < vertexCount; v++) {\n\t\t\tvertexZ[v] = -vertexZ[v];\n\t\t}\n\t\tfor (int f = 0; f < faceCount; f++) {\n\t\t\tint a = faceVertexA[f];\n\t\t\tfaceVertexA[f] = faceVertexC[f];\n\t\t\tfaceVertexC[f] = a;\n\t\t}\n\t}", "private void normalizeOrientation() {\n\t\twhile (this.orientation >= 2 * Math.PI) {\n\t\t\torientation -= 2 * Math.PI;\n\t\t}\n\t\twhile (this.orientation < 0) {\n\t\t\torientation += 2 * Math.PI;\n\t\t}\n\t}", "public Direction getOppositeDirection() {\n\t\treturn opposite;\n\t}", "public double getAngle() {\n\t\treturn 180 * (this.N - 2) / this.N;\n\t}", "public String getDirection(){\n\t\tif(this.toRight)\n\t\t\treturn \"RIGHT\";\n\t\telse\n\t\t\treturn \"LEFT\";\n\t}", "private double getAngle(){\n //Get a new angle measurement\n angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n //Get the difference between current angle measurement and last angle measurement\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n //Process the angle to keep it within (-180,180)\n //(Once angle passes +180, it will rollback to -179, and vice versa)\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n //Add the change in angle since last measurement (deltaAngle)\n //to the change in angle since last reset (globalAngle)\n globalAngle += deltaAngle;\n //Set last angle measurement to current angle measurement\n lastAngles = angles;\n\n return globalAngle;\n }", "public Direction rotate270() {\n return values()[r270index];\n }", "public Direction toRight()\n {\n return new Direction(dirInDegrees + (FULL_CIRCLE / 4));\n }", "public int getAngle(){\n\t\tif(!resetCoordinates()&&robot.imu1.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu1.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(!resetCoordinates()&&robot.imu.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.YZX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(resetCoordinates()){\n\t\t\tdouble oldAngle = robot.rotation.thirdAngle;\n\t\t\tdouble posAngle = oldAngle;\n\t\t\tint finalAngle;\n\t\t\tif (oldAngle < 0) posAngle = 360 - Math.abs(oldAngle);\n\t\t\tif((int) (Math.round(posAngle)) - 45 < 0){\n\t\t\t\tfinalAngle = 360-(int)Math.round(posAngle);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfinalAngle = (int) (Math.round(posAngle)) - 45;\n\t\t\t}\n\t\t\treturn finalAngle;\n\t\t}\n\t\telse{\n\t\t\treturn 10000;\n\t\t}\n\t}", "public double getYDirection() {\r\n return Math.sin(Math.toRadians(angle));\r\n }", "public void rotateRight() {\n\t\tthis.direction = this.direction.rotateRight();\n\t}", "@Override\n public void reAngle() {\n }", "public double getDirectionFace();", "static void changeDirectionBackwards() {\n\n if(--direction == -1)\n direction = 3;\n }", "public void rotateY90() {\n\t\tfor (int v = 0; v < vertexCount; v++) {\n\t\t\tint x_ = vertexX[v];\n\t\t\tvertexX[v] = vertexZ[v];\n\t\t\tvertexZ[v] = -x_;\n\t\t}\n\t}", "private void resetAngle() {\n lastAngles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n startAngles = lastAngles;\n globalAngle = 0;\n }", "public double getAngle2() {\n\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return (globalAngle);\n\n }", "double getAngle();", "double getAngle();", "public Direction invertTurns(){\n switch(this){\n case SPIN_BACK:\n return SPIN_BACK;\n case SPIN_LEFT:\n return SPIN_RIGHT; \n case SPIN_RIGHT:\n return SPIN_LEFT;\n case ARC_LEFT:\n return ARC_RIGHT;\n case ARC_RIGHT:\n return ARC_LEFT; \n default:\n return this; \n }\n }", "@Override\r\n\tpublic void rotateRight() {\n\t\tfinal int THETA = 10;\r\n\t\tint dir = this.getDirection();\r\n\t\tthis.setDirection(dir + THETA);\r\n\t\t\r\n\t}", "public double toAngle()\n\t{\n\t\treturn Math.toDegrees(Math.atan2(y, x));\n\t}", "public void resetAngle() {\n lastAngles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n globalAngle = 0;\n\n }", "private void resetAngle() {\n lastAngles = imu.getAngularOrientation(AxesReference.INTRINSIC,\n AxesOrder.ZYX, AngleUnit.DEGREES);\n globalAngle = 0;\n }", "public double getAngle();", "private double getAngle()\n {\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return angles.firstAngle;\n }", "float getDir() {\n return degrees(_rotVector.heading());\n }", "void reverseTurnOrder() {\n turnOrder *= -1;\n }", "private void resetAngle()\n {\n lastAngles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n globalAngle = 0;\n }", "public float getDirection();", "private void rotate() {\n byte tmp = topEdge;\n topEdge = leftEdge;\n leftEdge = botEdge;\n botEdge = rightEdge;\n rightEdge = tmp;\n tmp = reversedTopEdge;\n reversedTopEdge = reversedLeftEdge;\n reversedLeftEdge = reversedBotEdge;\n reversedBotEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n tmp = ltCorner;\n ltCorner = lbCorner;\n lbCorner = rbCorner;\n rbCorner = rtCorner;\n rtCorner = tmp;\n\n }", "public float getDirection()\r\n {\r\n return direction;\r\n }", "@Override\r\n\tpublic void rotateRight() {\n\t\tsetDirection((this.getDirection() + 1) % 4);\r\n\t}", "void getAngles(double[] values);", "public double getAngle() { return angle; }", "private double getAngle() {\n double normal= Math.sqrt(((getgAxis(ADXL345_I2C.Axes.kX))*(getgAxis(ADXL345_I2C.Axes.kX)))+((getgAxis(ADXL345_I2C.Axes.kY))*(getgAxis(ADXL345_I2C.Axes.kY))));\n\n return MathUtils.atan(normal / getgAxis(ADXL345_I2C.Axes.kZ));\n }", "public double currentAngle() {\n return imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\r\n }", "public void reverseY()\r\n {\r\n\t if(moveY < 0)\r\n\t\t moveY = moveY * (-1);\r\n\t else if(moveY > 0)\r\n\t\t moveY = moveY * (-1);\r\n }", "public void resetAngle() {\n\t\t//this.angle = (this.orientation % 4 + 4) * (90);\n\t\tthis.angle = this.orientation * 90*-1;\n\t\tthis.tweenAngle.setCurrentValue(this.angle);\n\t\tthis.tweenAngle.setTargetValue(this.angle);\n\t}", "public GJEllipseShape2D reverse();", "public double getAngle() {\n if (r == 0) {\n if (i == 0)\n return 0;// error?\n if (i > 0)\n return p2;\n else\n return -p2;\n }\n double d = Math.atan(i / r);\n if (r >= 0) {\n return d;\n }\n if (i >= 0)\n return Math.PI + d;\n return d + Math.PI;\n }", "public void setReverseDirection(boolean reverseDirection)\n {\n mDirection = reverseDirection ? -1 : 1;\n }", "public double getAngle() {\n\t\treturn armMotor.getEncPosition();\n\t}", "public Vector getDirection(){\n\t\treturn new Vector(_direction);\n\t}", "public void flip() {\r\n\t\tObject[] bak = path.toArray(new Direction[path.size()]);\r\n\t\tpath.clear();\r\n\t\tfor (int i = bak.length-1; i >= 0; i--) {\r\n\t\t\tpath.push((Direction) bak[i]);\r\n\t\t}\r\n\t}", "public Direction rotate90() {\n return values()[r90index];\n }", "public void changeDirReverse(Platforms platform)\r\n\t{\r\n\t\tif (changeDirectionReverse==0)\r\n\t\t{\r\n\t\t\tplatform.setXCord(platform.getXCord()+1);\r\n\t\t}\r\n\t\tif(changeDirectionReverse==1)\r\n\t\t{\r\n\t\t\tplatform.setXCord(platform.getXCord()-1);\r\n\t\t}\r\n\t}", "private void flip()\r\n\t{\r\n\t\tif(heading == Direction.WEST)\r\n\t\t{\r\n\t\t\tsetDirection(Direction.EAST);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsetDirection(Direction.WEST);\r\n\t\t}\r\n\t}", "void resetAngle();", "public double getAngle() {\n\t\treturn this.position[2];\n\t}", "EDataType getAngleDegrees();", "private double changeDirection(double theta) {\n // Check angle not out of bounds\n theta = (theta > MAX_ANGLE) ? MAX_ANGLE : theta;\n theta = (theta < -MAX_ANGLE) ? -MAX_ANGLE : theta;\n\n return theta;\n }", "public double\nangleInXYPlane()\n{\n\tBVector2d transPt = new BVector2d(\n\t\tthis.getP2().getX() - this.getP1().getX(),\n\t\tthis.getP2().getY() - this.getP1().getY());\n\t\n\t// debug(\"transPt: \" + transPt);\n\n\tdouble angle = MathDefines.RadToDeg * new Vector2d(1.0, 0.0).angle(transPt);\n\tif (transPt.getY() < 0.0)\n\t{\n\t\t// debug(\"ang0: \" + (360.0 - angle));\n\t\treturn(360.0 - angle);\n\t}\n\t// debug(\"ang1: \" + angle);\n\treturn(angle);\n}", "public Direction getCorrectRobotDirection();", "public abstract double getOrientation();", "public Direction getOpposite() {\n if (equals(Direction.NORTH)) return Direction.SOUTH;\n else if (equals(Direction.EAST)) return Direction.WEST;\n else if (equals(Direction.SOUTH)) return Direction.NORTH;\n else if (equals(Direction.WEST)) return Direction.EAST;\n else return null;\n }", "public Direction invertAll(){\n switch(this){\n case STAY:\n return STAY;\n case SPIN_BACK:\n return SPIN_BACK;\n case FORWARD:\n return BACKWARD;\n case BACKWARD:\n return FORWARD;\n case SPIN_LEFT:\n return SPIN_RIGHT; \n case SPIN_RIGHT:\n return SPIN_LEFT;\n case ARC_LEFT:\n return ARC_RIGHT;\n case ARC_RIGHT:\n return ARC_LEFT; \n default:\n return this; \n }\n }", "public void reverseDirectionX()\n\t{\n\t\t\n\t\tvx = -vx;\n\t\t\n\t}", "public static Direction opposite(Direction other) {\r\n\t\t\tif (other == Direction.UP) return Direction.DOWN;\r\n\t\t\telse if (other == Direction.DOWN) return Direction.UP;\r\n\t\t\telse if (other == Direction.LEFT) return Direction.RIGHT;\r\n\t\t\telse return Direction.LEFT;\t// RIGHT\r\n\t\t}", "public double getAngleXZ() {\r\n\t\tdouble l = this.lenght();\r\n\t\tif (l==0)\r\n\t\t\treturn 0;\r\n\t\treturn Math.asin(this.y/l);\r\n\t}", "public void updateRenderAngles() {\n }", "public double angle()\n {\n return Math.atan2(this.y, this.x);\n }", "@Override\n\tpublic void rotateRight(int degrees) {\n\t\t\n\t}", "@Override\n\tpublic float getOrientation() {\n\t\treturn body.getAngle();\n\t}", "public double getDirectionView();", "public String getOrientation(){\n\n if(robot.getRotation()%360 == 0){\n return \"NORTH\";\n } else if(robot.getRotation()%360 == 90\n ||robot.getRotation()%360 == -270){\n return \"EAST\";\n } else if(robot.getRotation()%360 == 180\n ||robot.getRotation()%360 == -180){\n return \"SOUTH\";\n } else if(robot.getRotation()%360 == 270\n ||robot.getRotation()%360 == -90){\n return \"WEST\";\n } else\n\n errorMessage(\"Id:10T error\");\n return null;\n }", "public int getAngle() {\r\n return angle;\r\n }", "public float getOrientacion() { return orientacion; }", "public double getAngle() {\n synchronized (this.angleLock) {\n return this.movementComposer.getOrientationAngle();\n }\n }", "private double getAngle()\n {\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "private double getAngle() {\n // We experimentally determined the Z axis is the axis we want to use for\n // heading angle. We have to process the angle because the imu works in\n // euler angles so the Z axis is returned as 0 to +180 or 0 to -180\n // rolling back to -179 or +179 when rotation passes 180 degrees. We\n // detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC,\n AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "public ForgeDirection toForgeDirection()\n {\n for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS)\n {\n if (this.x == direction.offsetX && this.y == direction.offsetY && this.z == direction.offsetZ)\n {\n return direction;\n }\n }\n\n return ForgeDirection.UNKNOWN;\n }", "public final Vector2D getOrientation() {\n return orientation;\n }", "public double getAngle ()\n {\n return angle_;\n }", "public double getAngle() {\n return Math.atan2(sinTheta, cosTheta);\n }", "public double getAngle() {\n\t\treturn navx.getAngle();\n\t}" ]
[ "0.72037256", "0.71874493", "0.6942468", "0.6898764", "0.68476874", "0.68151623", "0.6757012", "0.66139066", "0.6608197", "0.6587585", "0.6538363", "0.6411679", "0.630465", "0.62974906", "0.6284682", "0.6281044", "0.62774426", "0.6276378", "0.62477887", "0.6245003", "0.6240942", "0.6229368", "0.6222578", "0.6217081", "0.6194202", "0.6192902", "0.6157714", "0.61524683", "0.6119484", "0.61108345", "0.61103183", "0.60948664", "0.60853654", "0.6084671", "0.60461813", "0.6044007", "0.5990905", "0.597053", "0.5964057", "0.5964026", "0.59588224", "0.5956012", "0.5941062", "0.5941062", "0.59365916", "0.5932546", "0.59322685", "0.59040356", "0.59010476", "0.5901018", "0.58927566", "0.5883406", "0.58768773", "0.5875904", "0.5872641", "0.5861123", "0.5851921", "0.58429366", "0.5830162", "0.5829638", "0.58263135", "0.58107436", "0.58096355", "0.5791556", "0.5778438", "0.5774738", "0.576458", "0.5763113", "0.5759921", "0.57588077", "0.5754998", "0.57549053", "0.5749725", "0.5748754", "0.5726072", "0.57232785", "0.57219285", "0.57162225", "0.57149774", "0.56857115", "0.5684428", "0.5678552", "0.5677301", "0.56723887", "0.56704813", "0.56592757", "0.5658062", "0.565122", "0.5651081", "0.56442726", "0.56308246", "0.56306183", "0.5630365", "0.5622814", "0.5622689", "0.56217694", "0.56171656", "0.56131226", "0.5607414", "0.5607218", "0.56053644" ]
0.0
-1
TODO add edge mechanics, e.g. instead of just stopping the tank, we lower velocity/slide. The way this works is that we first grab possible collision candidates from the maze. Then we ensure there is actually a collision. Once we know there is a collision, we backtrack the tank until there is no collision.
private void handleMazeCollisions() { final ArrayList<Rectangle> segs = maze.getCollisionCandidates(getCenter()); for (int i = 0; i < segs.size(); i++) { if (!checkCollision(segs.get(i).getPolygon())) { // The tank does not intersect the seg. segs.remove(i); i--; } } if (segs.size() == 0) { // The tank does not intersect any of the segs. return; } Runnable reverseOp = null; // Backtrack. final Tank tank = this; // Need to declare this up here instead of in each case because java's switch cases share scope. So java would think // we are redeclaring a variable. final Point2D decomposedVelocity; switch (lastMovementOp) { case FORWARD: decomposedVelocity = Physics.decomposeVector(-1, theta); reverseOp = () -> tank.moveBy(decomposedVelocity); break; case REVERSE: decomposedVelocity = Physics.decomposeVector(1, theta); reverseOp = () -> tank.moveBy(decomposedVelocity); break; case RIGHT: reverseOp = () -> tank.rotate(-TURNING_ANGLE / 12); break; case LEFT: reverseOp = () -> tank.rotate(TURNING_ANGLE / 12); break; } do { assert reverseOp != null; reverseOp.run(); for (int i = 0; i < segs.size(); i++) { if (!checkCollision(segs.get(i).getPolygon())) { segs.remove(i); i--; } } } while (segs.size() > 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void collide() {\n int collisionRange;\n \n if(isObstacle) {\n for(Thing thg: proximity) {\n if(\n thg.isObstacle\n &&\n !thg.equals(this)\n ) {\n collisionRange = (thg.size + this.size)/2;\n deltaA = this.distance(thg);\n \n if( \n Math.abs(deltaA[0]) <= collisionRange\n &&\n Math.abs(deltaA[1]) <= collisionRange\n ){\n if(deltaA[0] > deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == 1) {\n dA[0] = 0;\n }\n }\n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == -1) {\n dA[1] = 0;\n }\n }\n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n if(dA[0] != 0) {\n dA[1] = dA[0];\n }\n if(dA[1] != 0) {\n dA[0] = dA[1];\n }\n }\n }\n \n if(deltaA[0] < deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == -1) {\n dA[0] = 0;\n }\n } \n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == 1) {\n dA[1] = 0;\n }\n } \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = dA[0];\n }\n }\n \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = -dA[0];\n }\n }\n }\n }\n }\n }", "private void createMaze(Tile currentTile) {\n\n while (numberOfCellsVisited < CAST_WIDTH * CAST_HEIGHT) {\n\n // Get coordinates of current tile and set as visited\n int currentX = currentTile.getPosition().getX();\n int currentY = currentTile.getPosition().getY();\n tempMap[currentY][currentX].setVisited(true);\n\n // Begin neighbourhood scan\n ArrayList<Integer> neighbours = new ArrayList<>();\n\n // If a neighbour is not visited and its projected position is within bounds, add it to the list of valid neighbours\n // North neighbour\n if (currentY - 1 >= 0) {\n if (!tempMap[currentY - 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(0);\n }\n //Southern neighbour\n if (currentY + 1 < CAST_HEIGHT) { //y index if increased is not greater than height of the chamber\n if (!tempMap[currentY + 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(1);\n }\n //Eastern neighbour\n if (currentX + 1 < CAST_WIDTH) { //check edge case\n if (!tempMap[currentY][currentX + 1].isVisited()) { //check if visited\n neighbours.add(2);\n }\n }\n //Western neighbour\n if (currentX - 1 >= 0) {\n if (!tempMap[currentY][currentX - 1].isVisited()) {\n neighbours.add(3);\n }\n }\n if (!neighbours.isEmpty()) {\n\n //generate random number between 0 and 3 for direction\n Random rand = new Random();\n boolean randomizer;\n int myDirection;\n do {\n myDirection = rand.nextInt(4);\n randomizer = neighbours.contains(myDirection);\n } while (!randomizer);\n\n //knock down wall\n switch (myDirection) {\n case 0 -> { // North\n tempMap[currentY][currentX].getPathDirection()[0] = true;\n currentTile = tempMap[currentY - 1][currentX];\n }\n case 1 -> { // South\n tempMap[currentY][currentX].getPathDirection()[1] = true;\n currentTile = tempMap[currentY + 1][currentX];\n }\n case 2 -> { // East\n tempMap[currentY][currentX].getPathDirection()[2] = true;\n currentTile = tempMap[currentY][currentX + 1];\n }\n case 3 -> { // West\n tempMap[currentY][currentX].getPathDirection()[3] = true;\n currentTile = tempMap[currentY][currentX - 1];\n }\n }\n\n mapStack.push(currentTile);\n numberOfCellsVisited++;\n } else {\n currentTile = mapStack.pop(); //backtrack\n }\n }\n\n castMaze(tempMap[0][0], -1);\n }", "public void chase(int targetX, int targetY, ArrayList<Wall> listOfWalls, ArrayList<Point> intersections) {\n double minDistance = 5000000000.0; //no distance is greater than this 4head\r\n double upDistance = 500000000.0;\r\n double downDistance = 5000000.0;\r\n double leftDistance = 50000000.0;\r\n double rightDistance = 5000000.0;\r\n boolean isIntersection = checkIntersection(intersections);\r\n boolean isRightCollision = checkWallCollision(listOfWalls, 2);\r\n boolean isLeftCollision = checkWallCollision(listOfWalls, 3);\r\n boolean isUpCollision = checkWallCollision(listOfWalls, 0);\r\n boolean isDownCollision = checkWallCollision(listOfWalls, 1);\r\n\r\n if (isIntersection) {\r\n if (!isRightCollision && this.direction != 3) {\r\n rightDistance = Math.pow((xPos + 20) - targetX, 2) + Math.pow(yPos - targetY, 2);\r\n }\r\n if (!isLeftCollision && this.direction != 2) {\r\n leftDistance = Math.pow((xPos - 20) - targetX, 2) + Math.pow(yPos - targetY, 2);\r\n }\r\n if (!isUpCollision && this.direction != 1) {\r\n upDistance = Math.pow((xPos) - targetX, 2) + Math.pow((yPos - 20) - targetY, 2);\r\n }\r\n if (!isDownCollision && this.direction != 0) {\r\n downDistance = Math.pow((xPos) - targetX, 2) + Math.pow((yPos + 20) - targetY, 2);\r\n }\r\n if (upDistance <= downDistance && upDistance <= leftDistance && upDistance <= rightDistance) {\r\n this.direction = 0;\r\n } else if (downDistance <= upDistance && downDistance <= leftDistance && downDistance <= rightDistance) {\r\n this.direction = 1;\r\n } else if (rightDistance <= leftDistance && rightDistance <= downDistance && rightDistance <= upDistance) {\r\n this.direction = 2;\r\n } else if (leftDistance <= rightDistance && leftDistance <= upDistance && leftDistance <= downDistance) {\r\n this.direction = 3;\r\n }\r\n\r\n\r\n }\r\n\r\n if (this.direction == 0) {\r\n yPos = yPos - 5;\r\n }\r\n if (this.direction == 1) {\r\n yPos = yPos + 5;\r\n }\r\n if (this.direction == 2) {\r\n xPos = xPos + 5;\r\n }\r\n if (this.direction == 3) {\r\n xPos = xPos - 5;\r\n }\r\n\r\n }", "@Override\n\tpublic boolean drive2Exit() throws Exception {\n\t\tint[][] timesVisited = new int[width][height];\n\t\tfor (int i = 0; i < timesVisited.length; i++) {\n\t\t\tfor (int j = 0; j < timesVisited[0].length; j++) {\n\t\t\t\ttimesVisited[i][j] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\twhile (robot.isAtExit() == false) {\n\t\t\t/* start a list of potential positions to move to. */\n\t\t\tLinkedList<CardinalDirectionNumVisitsPair> possibleDirections = new LinkedList<CardinalDirectionNumVisitsPair>();\n\t\t\t\n\t\t\t/* get the directions and number of visits to all accessible adjacent spaces. */\n\t\t\tint robotX = robot.getCurrentPosition()[0];\n\t\t\tint robotY = robot.getCurrentPosition()[1];\n\t\t\taddCardinalDirectionNumVisitsPairIfValid(robotX + 1, robotY, CardinalDirection.East, possibleDirections, timesVisited);\n\t\t\taddCardinalDirectionNumVisitsPairIfValid(robotX - 1, robotY, CardinalDirection.West, possibleDirections, timesVisited);\n\t\t\taddCardinalDirectionNumVisitsPairIfValid(robotX, robotY + 1, CardinalDirection.North, possibleDirections, timesVisited);\n\t\t\taddCardinalDirectionNumVisitsPairIfValid(robotX, robotY - 1, CardinalDirection.South, possibleDirections, timesVisited);\n\t\t\t\n\t\t\t/* find the minimum number of visits. */\n\t\t\tint minVisits = Integer.MAX_VALUE;\n\t\t\tfor (CardinalDirectionNumVisitsPair pair : possibleDirections) {\n\t\t\t\tif (pair.numVisits < minVisits) {\n\t\t\t\t\tminVisits = pair.numVisits;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* remove all pairs that do NOT have minVisits visits from the list. */\n\t\t\tfor (Iterator<CardinalDirectionNumVisitsPair> iterator = possibleDirections.listIterator(); iterator.hasNext(); ) {\n\t\t\t CardinalDirectionNumVisitsPair pair = iterator.next();\n\t\t\t if (pair.numVisits != minVisits) {\n\t\t\t iterator.remove();\n\t\t\t }\n\t\t\t}\n\t\t\t\n\t\t\t/* the list now contains only spaces that have the minimum number of visits. */\n\t\t\t/* pick randomly from the list. */\n\t\t\tint randomIndex = (int) Math.floor(Math.random() * possibleDirections.size());\n\t\t\tCardinalDirectionNumVisitsPair randomPair = possibleDirections.get(randomIndex);\n\t\t\t\n\t\t\t/* turn to face that direction. */\n\t\t\trobot.turnToDirection(randomPair.cardinalDirection);\n\t\t\t\n\t\t\t/* move. */\n\t\t\trobot.move(1, false);\n\t\t\t\n\t\t\t/* update the numVisits array. */\n\t\t\ttimesVisited[robot.getCurrentPosition()[0]][robot.getCurrentPosition()[1]]++;\n\t\t}\n\t\t\n\t\treturn robot.stepOutOfExit();\n\t}", "private Pair decideMovement(Entity e) {\n Pair pos = gameMap.getCoordinatesFor(e.getId());\n Movable movable = mm.get(e);\n Array<Pair> reachableCells = gameMap.pathFinder.getReachableCells(pos.x, pos.y, movable);\n ImmutableBag<Integer> enemies = groupAI.getEnemies(e);\n if (enemies.size() == 0) return reachableCells.get(MathUtils.random(reachableCells.size-1));\n\n // The best enemy you are considering chasing and its score\n int targetEnemy = -1;\n float bestScore = 0f;\n\n // The current enemy you are checking out and its score\n int id;\n float score;\n\n // How far away is the enemy? How many enemies are within a small radius of it?\n int distance, count;\n\n for (int i = 0; i < enemies.size(); i++) {\n count = 1;\n Pair target = gameMap.getCoordinatesFor(enemies.get(i));\n distance = MapTools.distance(pos.x, pos.y, target.x, target.y);\n for (Pair cell : MapTools.getNeighbors(target.x, target.y, 6)) {\n id = gameMap.getEntityAt(cell.x, cell.y);\n if (!enemies.contains(id)) continue;\n count++;\n }\n\n score = groupAI.entityScores.get(enemies.get(i)) * count / (1 + distance / 5);\n if (score > bestScore) {\n bestScore = score;\n targetEnemy = enemies.get(i);\n }\n }\n\n if (targetEnemy > -1) {\n Pair target = gameMap.getCoordinatesFor(targetEnemy);\n Path path = gameMap.pathFinder.findPath(pos.x, pos.y, target.x, target.y, movable, true);\n for (int i = 0; i < path.getLength(); i++) {\n Step step = path.getStep(i);\n Pair p = new Pair(step.getX(),step.getY());\n if (reachableCells.contains(p, false)) return p;\n }\n }\n return reachableCells.get(MathUtils.random(reachableCells.size-1));\n }", "public void checkTileMapCollision() {\t\t\t// Works for both x and y directions. Only going to use the x-component for now but leaves room for future expansion.\n\n\t\tcurrCol = (int)x / tileSize;\n\t\tcurrRow = (int)y / tileSize;\n\n\t\txdest = x + dx;\n\t\tydest = y + dy;\n\n\t\txtemp = x;\n\t\tytemp = y;\n\n\t\tcalculateCorners(x, ydest);\n\t\tif (dy < 0) { \t\t\t// upwards\n\t\t\tif (topLeft || topRight) {\n\t\t\t\tdy = 0;\n\t\t\t\tytemp = currRow * tileSize + height / 2;\t\t\t// Set just below where we bumped our head.\n\t\t\t} else {\n\t\t\t\tytemp += dy;\t\t// Otherwise keep going.\n\t\t\t}\n\t\t}\n\t\tif (dy > 0) { \t\t\t// downwards\n\t\t\tif (bottomLeft || bottomRight) {\n\t\t\t\tdy = 0;\n\t\t\t\tfalling = false;\n\t\t\t\tytemp = (currRow + 1) * tileSize - height / 2;\n\t\t\t} else {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\n\t\tcalculateCorners(xdest, y);\n\t\tif (dx < 0) { \t\t\t// left\n\t\t\tif (topLeft || bottomLeft) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = currCol * tileSize + width / 2;\n\t\t\t} else {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\tif (dx > 0) { \t\t\t// right\n\t\t\tif (topRight || bottomRight) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = (currCol + 1) * tileSize - width / 2;\n\t\t\t} else {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\n\t\tif(!falling) {\n\t\t\tcalculateCorners(x, ydest + 1);\t\t\t// Have to check the ground 1 pixel below us and make sure we haven't fallen off a cliff\n\t\t\tif(!bottomLeft && !bottomRight) {\n\t\t\t\tfalling = true;\n\t\t\t}\n\t\t}\n\n\t}", "private void checkCollision(Graphics g) {\n\t\t// collision detection for the tanks\n\t\tGraphics2D g2d = (Graphics2D) g.create();\n\t\tRectangle heroRectangle = hero.getBounds();\n\t\tRectangle hero2Rectangle = computer.getBounds();\n\t\tArrayList<Missile> heroMissiles = hero.getMissiles();\n\t\tArrayList<Missile> hero2Missile = computer.getMissiles();\n\n\t\t// hero1 --------------------\n\t\tAffineTransform at = g2d.getTransform();\n\t\tg2d.setTransform(at);\n\t\tat.rotate(Math.toRadians(hero.getAngle()), hero.getX() + hero.getImageWidth() / 2,\n\t\t\t\thero.getY() + hero.getImageHeight() / 2);\n\t\tGeneralPath heroPath = new GeneralPath();\n\t\theroPath.append(heroRectangle.getPathIterator(at), true);\n\t\tArea heroArea = new Area(heroPath);\n\n\t\t// hero2 ------------------------------\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tat.rotate(Math.toRadians(computer.getAngle()), computer.getX() + computer.getImageWidth() / 2,\n\t\t\t\tcomputer.getY() + computer.getImageHeight() / 2);\n\t\tGeneralPath hero2Path = new GeneralPath();\n\t\thero2Path.append(hero2Rectangle.getPathIterator(at), true);\n\t\tArea hero2Area = new Area(hero2Path);\n\n\t\t// tank1 -- tank2 collision\n\t\thero2Area.intersect(heroArea);\n\t\tif (!hero2Area.isEmpty()) {\n\t\t\tplay(\"tank-tank.wav\");\n\t\t\tposxt2 = computer.getX();\n\t\t\tposyt2 = computer.getY();\n\t\t\tposyt1 = hero.getY();\n\t\t\tposxt1 = hero.getX();\n\t\t\t\n\t\t\texplodet2 = true;\n\t\t\texplodet1 = true;\n\t\t\tg2d.setColor(Color.RED);\n\t\t\tg2d.fill(heroArea);\n\t\t\tcomputer.spawnGenerator();\n\t\t\twhile (getValidRespawnPosition((int) computer.getX(), (int) computer.getY(), computer.getImageWidth(),\n\t\t\t\t\tcomputer.getImageHeight())) {\n\t\t\t\tcomputer.spawnGenerator();\n\t\t\t}\n\n\t\t\thero.spawnGenerator();\n\t\t\twhile (getValidRespawnPosition((int) hero.getX(), (int) hero.getY(), hero.getImageWidth(),\n\t\t\t\t\thero.getImageHeight())) {\n\t\t\t\thero.spawnGenerator();\n\t\t\t}\n\t\t}\n\n\t\t// tank2 -- tank1 bullet collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < heroMissiles.size(); i++) {\n\t\t\tMissile m = heroMissiles.get(i);\n\t\t\tRectangle tank1BulletRect = m.getBounds();\n\t\t\tGeneralPath tank1BulletPath = new GeneralPath();\n\t\t\ttank1BulletPath.append(tank1BulletRect.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea tank1BulletArea = new Area(tank1BulletPath);\n\t\t\thero2Area.intersect(tank1BulletArea);\n\t\t\tif (!hero2Area.isEmpty()) {\n\t\t\t\tplay(\"bullet-tank.wav\");\n\t\t\t\tposxt2 = computer.getX();\n\t\t\t\tposyt2 = computer.getY();\n\t\t\t\texplodet2 = true;\n\t\t\t\tif (computer.getCurrentPowerup() == 5) {\n\t\t\t\t} else {\n\t\t\t\t\tp1score++;\n\t\t\t\t\tcomputer.spawnGenerator();\n\t\t\t\t\twhile (getValidRespawnPosition((int) computer.getX(), (int) computer.getY(),\n\t\t\t\t\t\t\tcomputer.getImageWidth(), computer.getImageHeight())) {\n\t\t\t\t\t\tcomputer.spawnGenerator();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\theroMissiles.remove(i);\n\t\t\t\tcomputer.setCurrentPowerup(0);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// tank1 -- tank1 bullet collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < heroMissiles.size(); i++) {\n\t\t\tMissile m1 = heroMissiles.get(i);\n\t\t\tRectangle tankBulletRect = m1.getBounds();\n\t\t\tGeneralPath tankBulletPath = new GeneralPath();\n\t\t\ttankBulletPath.append(tankBulletRect.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea tankBulletArea = new Area(tankBulletPath);\n\t\t\theroArea.intersect(tankBulletArea);\n\t\t\tif (!heroArea.isEmpty() && m1.isReflected()) {\n\t\t\t\tplay(\"bullet-tank.wav\");\n\t\t\t\tposyt1 = hero.getY();\n\t\t\t\tposxt1 = hero.getX();\n\t\t\t\texplodet1 = true;\n\t\t\t\tif (hero.getCurrentPowerup() == 5) {\n\t\t\t\t} else {\n\t\t\t\t\tp2score++;\n\t\t\t\t\thero.spawnGenerator();\n\t\t\t\t\twhile (getValidRespawnPosition((int) hero.getX(), (int) hero.getY(), hero.getImageWidth(),\n\t\t\t\t\t\t\thero.getImageHeight())) {\n\t\t\t\t\t\thero.spawnGenerator();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\theroMissiles.remove(i);\n\t\t\t\thero.setCurrentPowerup(0);\n\t\t\t}\n\t\t}\n\n\t\t// tank1 -- tank2 bullet collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < hero2Missile.size(); i++) {\n\t\t\tMissile m1 = hero2Missile.get(i);\n\t\t\tRectangle tank2BulletRect = m1.getBounds();\n\t\t\tGeneralPath tank2BulletPath = new GeneralPath();\n\t\t\ttank2BulletPath.append(tank2BulletRect.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea tank2BulletArea = new Area(tank2BulletPath);\n\t\t\theroArea.intersect(tank2BulletArea);\n\t\t\tif (!heroArea.isEmpty()) {\n\t\t\t\tplay(\"bullet-tank.wav\");\n\t\t\t\tposyt1 = hero.getY();\n\t\t\t\tposxt1 = hero.getX();\n\t\t\t\texplodet1 = true;\n\t\t\t\tif (hero.getCurrentPowerup() == 5) {\n\t\t\t\t} else {\n\t\t\t\t\tp2score++;\n\t\t\t\t\thero.spawnGenerator();\n\t\t\t\t\twhile (getValidRespawnPosition((int) hero.getX(), (int) hero.getY(), hero.getImageWidth(),\n\t\t\t\t\t\t\thero.getImageHeight())) {\n\t\t\t\t\t\thero.spawnGenerator();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\thero2Missile.remove(i);\n\t\t\t\thero.setCurrentPowerup(0);\n\t\t\t}\n\t\t}\n\n\t\t// tank1 -- powerup collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < powerupArray.size(); i++) {\n\t\t\tRectangle powerupRectangle = (powerupArray.get(i)).getBounds();\n\t\t\tGeneralPath powerupPath = new GeneralPath();\n\t\t\tpowerupPath.append(powerupRectangle.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea powerupArea = new Area(powerupPath);\n\t\t\theroArea.intersect(powerupArea);\n\t\t\tif (!heroArea.isEmpty()) {\n\t\t\t\tplay(\"powerup.wav\");\n\t\t\t\tif ((powerupArray.get(i)).getPowerupType() == 5) {\n\t\t\t\t\thero.setIndex(1);\n\t\t\t\t}\n\t\t\t\tint powerupType = (powerupArray.get(i)).getPowerupType();\n\t\t\t\thero.setCurrentPowerup(powerupType);\n\t\t\t\tpowerupArray.remove(i);\n\t\t\t}\n\t\t}\n\n\t\t// tank2 -- powerup collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (int i = 0; i < powerupArray.size(); i++) {\n\t\t\tRectangle powerupRectangle = (powerupArray.get(i)).getBounds();\n\t\t\tGeneralPath powerupPath = new GeneralPath();\n\t\t\tpowerupPath.append(powerupRectangle.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea powerupArea = new Area(powerupPath);\n\t\t\thero2Area.intersect(powerupArea);\n\t\t\tif (!hero2Area.isEmpty()) {\n\t\t\t\tplay(\"powerup.wav\");\n\t\t\t\tint powerupType = (powerupArray.get(i)).getPowerupType();\n\t\t\t\tcomputer.setCurrentPowerup(powerupType);\n\t\t\t\tpowerupArray.remove(i);\n\t\t\t}\n\t\t}\n\n\t\t// tank 1 and wall collision\n\t\tat = new AffineTransform();\n\t\tg2d.setTransform(at);\n\t\tfor (Wall w : wallArray) {\n\t\t\tRectangle wallRect = w.getBounds();\n\t\t\tGeneralPath wallPath = new GeneralPath();\n\t\t\twallPath.append(wallRect.getPathIterator(at), true);\n\t\t\theroArea = new Area(heroPath);\n\t\t\thero2Area = new Area(hero2Path);\n\t\t\tArea wallArea = new Area(wallPath);\n\t\t\theroArea.intersect(wallArea);\n\t\t\tif (!heroArea.isEmpty()) {\n\t\t\t\thero.setX(hero.getPrevX());\n\t\t\t\thero.setY(hero.getPrevY());\n\t\t\t}\n\t\t}\n\t}", "public void detectCollisions() {\r\n\r\n for (int pos = 0; pos < this.numberOfBees; pos++) {\r\n if (!beesArray[pos].isInCollisionRisk()) {\r\n int i = beesArray[pos].getI();\r\n int j = beesArray[pos].getJ();\r\n int k = beesArray[pos].getK();\r\n for (int x = (i - offset); x <= (i + offset); x++) {\r\n for (int y = (j - offset); y <= (j + offset); y++) {\r\n for (int z = (k - offset); z <= (k + offset); z++) {\r\n if (x == i && y == j && z == k || (Math.abs(i - j) == 0) || Math.abs(i - j) == 2 * offset) {\r\n continue;\r\n } else if (BeesCollision[x][y][z] != null) {\r\n beesArray[pos].setCollision(true);\r\n if (BeesCollision[x][y][z].size() == 1) {\r\n BeesCollision[x][y][z].getFirst().setCollision(true);\r\n break;\r\n }\r\n }\r\n }\r\n if (beesArray[pos].isInCollisionRisk()) {\r\n break;\r\n }\r\n }\r\n if (beesArray[pos].isInCollisionRisk()) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }", "public void updateOptimalCollisionArea();", "public void explore() {\n\t\t\tif(getSpeed() < CAR_MAX_SPEED){ // Need speed to turn and progress toward the exit\n\t\t\t\tapplyForwardAcceleration(); // Tough luck if there's a wall in the way\n\t\t\t}\n\t\t\tif (isFollowingWall) {\n\t\t\t\t// if already been to this tile, stop following the wall\n\t\t\t\tif (travelled.contains(new Coordinate(getPosition()))) {\n\t\t\t\t\tisFollowingWall = false;\n\t\t\t\t} else {\n\t\t\t\t\tif(!checkFollowingWall(getOrientation(), map)) {\n\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If wall on left and wall straight ahead, turn right\n\t\t\t\t\t\tif(checkWallAhead(getOrientation(), map)) {\n\t\t\t\t\t\t\tif (!checkWallRight(getOrientation(), map))\t{\n\t\t\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t\t\t} else if (!checkWallLeft(getOrientation(), map)){\n\t\t\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tapplyReverseAcceleration();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Start wall-following (with wall on left) as soon as we see a wall straight ahead\n\t\t\t\tif(checkWallAhead(getOrientation(), map)) {\n\t\t\t\t\tif (!checkWallRight(getOrientation(), map) && !checkWallLeft(getOrientation(), map)) {\n\t\t\t\t\t\t// implementing some randomness so doesn't get stuck in loop\n\t\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\t\tint n = rand.nextInt(2);\n\t\t\t\t\t\tif (n==0) {\n\t\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (!checkWallRight(getOrientation(), map))\t{\n\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t} else if (!checkWallLeft(getOrientation(), map)){\n\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapplyReverseAcceleration();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private boolean canMove() {\n\t\tif (System.currentTimeMillis() - lastTrunTime < 300) {// move time is\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 300ms before\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// last move\n\t\t\treturn false;\n\t\t}\n\t\tboolean status = false;\n\t\tif(stage == 1){\n\t\t\tmap = GameView.map;\n\t\t}else if(stage == 2){\n\t\t\tmap = GameViewStage2.map;\n\t\t}else {\n\t\t\tmap = GameViewStage3.map;\n\t\t}\n\t\tif (direction == UP) {// when tank moves up\n\t\t\tif (centerPoint.getY() - speed >= 0) {\n\t\t\t\tif (map[(centerPoint.getY() - speed) / UNIT][centerPoint\n\t\t\t\t\t\t.getX() / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() - speed) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + UNIT) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() - speed) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT) / UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == DOWN) {\n\t\t\tif (centerPoint.getY() + tankBmp.getHeight() + speed < screenHeight) {\n\t\t\t\tif (map[(centerPoint.getY() + 2 * UNIT + speed) / UNIT][centerPoint\n\t\t\t\t\t\t.getX() / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT][(centerPoint.getX() + UNIT) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT][(centerPoint.getX() + 2 * UNIT) / UNIT] == 0) {\n\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == LEFT) {\n\n\t\t\tif (centerPoint.getX() - speed >= 0) {\n\t\t\t\tif (map[centerPoint.getY() / UNIT][(centerPoint.getX() - speed)\n\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() - speed) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() - speed) / UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == RIGHT) {\n\t\t\tif (centerPoint.getX() + tankBmp.getWidth() + speed < screenWidth) {\n\t\t\t\tif (map[centerPoint.getY() / UNIT][(centerPoint.getX()\n\t\t\t\t\t\t+ 2 * UNIT + speed)\n\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (status)\n\t\t\tlastTrunTime = System.currentTimeMillis();\n\t\treturn status;\n\t}", "private void analyzeForObstacles() {\n \t\n \t\n \tStack<Rect> bestFound = new Stack<Rect>();//This is a stack as the algorithm moves along x linearly\n \tboolean[][] blackWhiteGrid = getBlackWhiteGrid();\n \tint[] cache = new int[grid.length];\n \t\n \twhile (true) {\n\t\t\tboolean noneFound = true;\n\t\t\t\n\t\t\tfor (int i = 0; i<cache.length; i++)\n\t\t\t\tcache[i] = 0;\n\t\t\tfor (int llx = grid.length -1; llx >= 0; llx--) {\n\t\t\t\tupdate_cache(blackWhiteGrid,cache, llx);\n\t\t\t\tfor (int lly = 0; lly < grid.length; lly++) {\n\t\t\t\t\tRect bestOfRound = new Rect(llx,lly,llx,lly);\n\t\t\t\t\tint y = lly;\n\t\t\t\t\tint x_max = 9999;\n\t\t\t\t\tint x = llx;\n\t\t\t\t\twhile (y+1<grid.length && blackWhiteGrid[llx][y]) {\n\t\t\t\t\t\ty++;\n\t\t\t\t\t\tx = Math.min(llx+cache[y]-1, x_max);\n\t\t\t\t\t\tx_max = x;\n\t\t\t\t\t\tRect tryRect = new Rect(llx,lly-1,x,y);\n\t\t\t\t\t\tif (tryRect.area() > bestOfRound.area()) {\n\t\t\t\t\t\t\tbestOfRound = tryRect;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (bestOfRound.area() > 40) {\n\t\t\t\t\t\tif (noneFound) {\n\t\t\t\t\t\t\tbestFound.push(bestOfRound);\n\t\t\t\t\t\t\tnoneFound = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tRect lastRect = bestFound.peek();\n\t\t\t\t\t\t\tif (lastRect.area() < bestOfRound.area()) {\n\t\t\t\t\t\t\t\tbestFound.pop();\n\t\t\t\t\t\t\t\tbestFound.push(bestOfRound);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (noneFound)\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tclearFoundRectangle(blackWhiteGrid, bestFound.peek());\n \t}\n \t\n \t//add found rectanlges\n \tobstacles.clear();\n \tobstacles.addAll(bestFound);\n \tSystem.out.println(\"Sweep done:\");\n \tfor (Rect r : bestFound){\n \t\tSystem.out.println(\"Rect: llx=\" + (r.llx-400) + \"\\tlly=\" + (r.lly-400) + \"\\turx=\" + (r.urx-400) + \"\\tury=\" + (r.ury-400));\n \t\tList<Point2D.Double> corners = new ArrayList<Point2D.Double>();\n \t\tcorners.add(new Point2D.Double((r.llx-400),(r.lly-400)));\n \t\tcorners.add(new Point2D.Double((r.llx-400),(r.ury-400)));\n \t\tcorners.add(new Point2D.Double((r.urx-400),(r.lly-400)));\n \t\tcorners.add(new Point2D.Double((r.urx-400),(r.ury-400)));\n \t\tobstaclesF.add(new Obstacle(corners));\n \t}\n \t\n \ttoExplore.clear();\n \tint i = 0;\n \tRandom rand = new Random();\n \twhile (toExplore.size() < 10 && i < 1000) {\n \t\tint x = rand.nextInt(grid.length);\n \t\tint y = rand.nextInt(grid.length);\n \t\tif (grid[x][y] == .5) {\n \t\t\ttoExplore.add(new Flag(\"blue\",x,y));\n \t\t}\n \t}\n }", "private void testForWallCollision() {\n\t\tVector2 n1 = temp;\n\t\tVector2 hitPoint = temp2;\n\t\t\n\t\tArrayList<Vector2> list;\n\t\tdouble angleOffset;\n\t\t\n\t\tfor (int w=0; w < 2; w++) {\n\t\t\tif (w == 0) {\n\t\t\t\tlist = walls1;\n\t\t\t\tangleOffset = Math.PI/2;\n\t\t\t} else {\n\t\t\t\tlist = walls2;\n\t\t\t\tangleOffset = -Math.PI/2;\n\t\t\t}\n\t\t\tn1.set(list.get(0));\n\t\t\t\n\t\t\tfor (int i=1; i < list.size(); i++) {\n\t\t\t\tVector2 n2 = list.get(i);\n\t\t\t\tif (Intersector.intersectSegments(n1, n2, oldPos, pos, hitPoint)) {\n\t\t\t\t\t// bounceA is technically the normal. angleOffset is used\n\t\t\t\t\t// here to get the correct side of the track segment.\n\t\t\t\t\tfloat bounceA = (float) (Math.atan2(n2.y-n1.y, n2.x-n1.x) + angleOffset);\n\t\t\t\t\tVector2 wall = new Vector2(1, 0);\n\t\t\t\t\twall.setAngleRad(bounceA).nor();\n\t\t\t\t\t\n\t\t\t\t\t// move the car just in front of the wall.\n\t\t\t\t\tpos.set(hitPoint.add((float)Math.cos(bounceA)*0.05f, (float)Math.sin(bounceA)*0.05f));\n\t\t\t\t\t\n\t\t\t\t\t// Lower the speed depending on which angle you hit the wall in.\n\t\t\t\t\ttemp2.setAngleRad(angle).nor();\n\t\t\t\t\tfloat wallHitDot = wall.dot(temp2);\n\t\t\t\t\tspeed *= (1 - Math.abs(wallHitDot)) * 0.85;\n\t\t\t\t\t\n\t\t\t\t\t// calculate the bounce using the reflection formula.\n\t\t\t\t\tfloat dot = vel.dot(wall);\n\t\t\t\t\tvel.sub(wall.scl(dot*2));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tn1.set(n2);\n\t\t\t}\n\t\t}\n\t}", "private void escapeFromMaze() throws Exception {\n\t\tassert robot.distanceToObstacle(Direction.BACKWARD) != Integer.MAX_VALUE : \"Unexpected exit environment.\";\n\t\t\n\t\tswitch(robot.getCurrentDirection()){\n\t\t\tcase East:\n\t\t\t\tif(robot.getController().getMazeConfiguration().getMazecells().hasNoWall(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1], CardinalDirection.East)\n\t\t\t\t\t\t&& !robot.getController().getMazeConfiguration().isValidPosition(robot.getCurrentPosition()[0]+1, robot.getCurrentPosition()[1])){\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t\telse if(robot.getController().getMazeConfiguration().getMazecells().hasNoWall(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1], CardinalDirection.North)){\n\t\t\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}else{\n\t\t\t\t\trobot.rotate(Turn.LEFT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase West:\n\t\t\t\tif(robot.getController().getMazeConfiguration().getMazecells().hasNoWall(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1], CardinalDirection.West)\n\t\t\t\t\t\t&& !robot.getController().getMazeConfiguration().isValidPosition(robot.getCurrentPosition()[0]-1, robot.getCurrentPosition()[1])){\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t\telse if (robot.getController().getMazeConfiguration().getMazecells().hasNoWall(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1], CardinalDirection.North)){\n\t\t\t\t\trobot.rotate(Turn.LEFT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}else{\n\t\t\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase North:\n\t\t\t\tif(robot.getController().getMazeConfiguration().getMazecells().hasNoWall(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1], CardinalDirection.North)\n\t\t\t\t\t\t&& !robot.getController().getMazeConfiguration().isValidPosition(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1]-1)){\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t\telse if (robot.getController().getMazeConfiguration().getMazecells().hasNoWall(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1], CardinalDirection.East)){\n\t\t\t\t\trobot.rotate(Turn.LEFT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}else{\n\t\t\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase South:\n\t\t\t\tif(robot.getController().getMazeConfiguration().getMazecells().hasNoWall(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1], CardinalDirection.South)\n\t\t\t\t\t\t&& !robot.getController().getMazeConfiguration().isValidPosition(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1]+1)){\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t\telse if (robot.getController().getMazeConfiguration().getMazecells().hasNoWall(robot.getCurrentPosition()[0], robot.getCurrentPosition()[1], CardinalDirection.West)){\n\t\t\t\t\trobot.rotate(Turn.LEFT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}else{\n\t\t\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\t\t\trobot.move(1, false);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t}", "private void thinkAboutNext(ArrayList<Point> pos, boolean hit, boolean destroyedIt) {\n if (!searching && hit) {\n betweenTwo = false;\n System.out.println(\"WAS A NEW TARGET\");\n if(!destroyedIt) {\n int[] d = Direction.DOWN.getDirectionVector();\n Point n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.DOWN);\n\n d = Direction.UP.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.UP);\n\n d = Direction.LEFT.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.LEFT);\n\n d = Direction.RIGHT.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.RIGHT);\n\n directionLooking = directionsToGo.get(directionsToGo.size() - 1);\n }\n }\n else if (searching) {\n //FILTER OUT ALREADY ATTACKED\n\n System.out.println(\"WAS AN OLD TARGET\");\n\n //FAILED\n if(!hit) {\n justBefore = firstHit;\n int size = directionsToGo.size();\n\n for(int i = size - 1; i >= 0; i--){\n Point n = new Point(justBefore.x + directionsToGo.get(i).getDirectionVector()[0],\n justBefore.y + directionsToGo.get(i).getDirectionVector()[1]);\n if(!pos.contains(n))\n directionsToGo.remove(i);\n }\n directionLooking = directionsToGo.get(0);\n }\n else\n if(!pos.contains(pWD(justBefore, directionLooking))) {\n justBefore = firstHit;\n directionLooking = directionLooking.getOpposite();\n }\n\n }\n if(hit) {\n searching = !destroyedIt;\n }\n }", "@Override\n\tpublic void move() {\n\t\tCoordinate currPos = new Coordinate(control.getPosition());\n\t\t\n\t\t// if we have enough packages head to the exit\n\t\tif (control.numParcels() <= control.numParcelsFound()) {\n\t\t\t// if we don't have a path to the exit\n\t\t\tif (control.currentPath == null || !control.isHeadingToFinish) {\t\n\t\t\t\t// find path to exit\n\t\t\t\tArrayList<Coordinate> tempPath = null;\n\t\t\t\t// See if there's a path without needing to go through hazards\n\t\t\t\ttempPath = control.findPath(currPos, control.finish.get(0), control.hazardsMap.keySet());\n\t\t\t\tSet<Coordinate> tempHazards = new HashSet<>(control.hazardsMap.keySet());\n\t\t\t\t// If no path without going through hazards, just go through them\n\t\t\t\tif (tempPath == null || tempPath.size() == 0) {\n\t\t\t\t\tfor (Coordinate coord : control.hazardsMap.keySet()) {\n\t\t\t\t\t\ttempHazards.remove(coord);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If it's a valid map, there should be a path now\n\t\t\t\tcontrol.setPath(control.findPath(currPos, control.finish.get(0), tempHazards));\n\t\n\t\t\t\tcontrol.isHeadingToFinish = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\theadTowardsPackages(currPos);\n\t\t\n\t\texploreUnseenMap(currPos);\n\t\t\n\t\tMapTile currTile = control.getView().get(currPos);\n\t\tboolean isHealth = false;\n\t\tif (currTile.getType() == MapTile.Type.TRAP) {\n\t\t\tTrapTile trap = (TrapTile) currTile;\n\t\t\tif (trap.getTrap().equals(\"health\")) {\n\t\t\t\tisHealth = true;\n\t\t\t}\n\t\t}\n\t\tif (isHealth && (control.getHealth() < HEALTH_TRAP_THRESHOLD)) {\n\t\t\t// do nothing\n\t\t\treturn;\n\t\t} else {\n\t\t\tisHealth = false;\n\t\t\tcontrol.moveTowards(control.dest);\n\t\t}\n\t\t\n\t}", "private void collision() {\n\t\tfor(int i = 0; i < brownMeteors.length; i++) {\n\t\t\tif( distance(brownMeteors[i].getLayoutX() + ENTITIES_SIZE/2, brownMeteors[i].getLayoutY() - ENTITIES_SIZE/2, \n\t\t\t\t\tplayer.getLayoutX() + ENTITIES_SIZE/2, player.getLayoutY() - ENTITIES_SIZE/2) <= ENTITIES_SIZE) {\n\t\t\t\tsetNewElementPosition(brownMeteors[i]);\n\t\t\t\t\n\t\t\t\t//Update score -\n\t\t\t\tsc.score -= 3 * sc.collisionCounter; \n\t\t\t\tsc.collisionCounter++;\n\t\t\t}\n\t\t}\n\t\t//player vs grey Meteor\n\t\tfor(int i = 0; i < greyMeteors.length; i++) {\n\t\t\tif( distance(greyMeteors[i].getLayoutX() + ENTITIES_SIZE/2, greyMeteors[i].getLayoutY() - ENTITIES_SIZE/2, \n\t\t\t\t\tplayer.getLayoutX() + ENTITIES_SIZE/2, player.getLayoutY() - ENTITIES_SIZE/2) <= ENTITIES_SIZE) {\n\t\t\t\tsetNewElementPosition(greyMeteors[i]);\n\n\t\t\t\t//Update score -\n\t\t\t\tsc.score -= 3 * sc.collisionCounter;\n\t\t\t\tsc.collisionCounter++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//laser vs brown Meteor\n\t\tfor(int i = 0; i < lasers.size(); i++) {\n\t\t\tfor(int j = 0; j < brownMeteors.length; j++) { // 0 - 2 -> 3elem\n\t\t\t\tif(lasers.get(i).getBoundsInParent().intersects(brownMeteors[j].getBoundsInParent())) {\t// bounds of a node in it's parent coordinates\n\t\t\t\t\tsetNewElementPosition(brownMeteors[j]);\n\t\t\t\t\tgamePane.getChildren().remove(lasers.get(i));\n\t\t\t\t\tlasers.remove(i);\n\t\t\t\t\tSystem.out.println(lasers.size());\n\t\t\t\t\t\n\t\t\t\t\t//Update score +\n\t\t\t\t\tsc.score += 1; \n\t\t\t\t\tbreak; //kein fehler mehr durch index out of bounds verletzung\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\tfor(int i = 0; i < lasers.size(); i++) {\n\t\t\tfor(int j = 0; j < greyMeteors.length; j++) { // 0 - 2 -> 3elem\n\t\t\t\tif(lasers.get(i).getBoundsInParent().intersects(greyMeteors[j].getBoundsInParent())) {\t// bounds of a node in it's parent coordinates\n\t\t\t\t\tsetNewElementPosition(greyMeteors[j]);\n\t\t\t\t\tgamePane.getChildren().remove(lasers.get(i));\n\t\t\t\t\tlasers.remove(i);\n\t\t\t\t\tSystem.out.println(lasers.size());\n\t\t\t\t\t\n\t\t\t\t\t//Update score +\n\t\t\t\t\tsc.score += 1; \n\t\t\t\t\tbreak; //kein fehler mehr durch index out of bounds verletzung\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\t\t\n\t}", "@Override\n\tpublic void move(){\n\t\tSector tail = null;\n\t\tif(hit){\n\t\t\ttail = getNext();\n\t\t\tif(tail == null){\t\n\t\t\t\tselfDestruct();\n\t\t\t} else {\t\t\n\t\t\t\tsector.setInhabitant(null);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tsectors.add(sector);\n\t\tSector nextSector = quadrant.getNext(sector, velocity[0]);\t\n\t\tif(nextSector == null){\n\t\t\thit = true;\n\t\t} else {\n\t\t\tSpaceObject object = nextSector.getInhabitant();\n\t\t\tif(object != null) {\n\t\t\t\tobject.bump(this);\n\t\t\t} else {\n\t\t\t\tsetSector(nextSector); \n\t\t\t}\n\t\t} \n\t}", "private void enemyMove() {\n\n\t\tboolean goAgain = false;\n\n\t\tint x = (int) (Math.random() * 10);\n\t\tint y = (int) (Math.random() * 10);\n\n\t\t// Make sure the enemy hits in a checkerboard pattern.\n\t\tif (x % 2 == 0) { // if x is even, y should be odd\n\t\t\tif (y % 2 == 0) {\n\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\ty++;\n\t\t\t\telse\n\t\t\t\t\ty--;\n\t\t\t}\n\t\t} else { // if x is odd, y should be even\n\t\t\tif (y % 2 == 1)\n\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\ty++;\n\t\t\t\telse\n\t\t\t\t\ty--;\n\t\t}\n\n\t\tif (enemyLastShotHit && getDifficulty() > 0) { // /if last shot was a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// hit, enemy\n\t\t\t// will try to\n\t\t\t// check around it only run if difficulty is\n\t\t\t// normal or above\n\t\t\tx = enemyLastHitX;\n\t\t\ty = enemyLastHitY;\n\n\t\t\tif (getDifficulty() != 2) {\n\n\t\t\t\tif (conflictX == 4) {\n\t\t\t\t\tconflictX = 0;\n\t\t\t\t} else if (conflictY == 4) {\n\t\t\t\t\tconflictY = 0;\n\t\t\t\t\t// System.out.println(\"conflict has been reset \");\n\t\t\t\t}\n\n\t\t\t\tif (conflictX != 0) {\n\t\t\t\t\tif (conflictX == 1)\n\t\t\t\t\t\tx++;\n\t\t\t\t\telse {\n\t\t\t\t\t\tx--;\n\t\t\t\t\t}\n\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\tconflictX = 4;\n\t\t\t\t} else if (conflictY == 1) {\n\t\t\t\t\t// System.out.println(\"checking down\");\n\t\t\t\t\tconflictY = 4;\n\t\t\t\t\ty++;\n\t\t\t\t}\n\n\t\t\t\tif (x + 1 < 10 && x - 1 >= 0) {// branch for multiple hits\n\t\t\t\t\tif (egrid[x + 1][y] == 1 && egrid[x - 1][y] == 1) {\n\t\t\t\t\t\t// System.out.println(\"conflict at \"+ex+\",\"+ey);\n\t\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\t\tif (x + 2 < 10) {\n\t\t\t\t\t\t\tif (egrid[x + 2][y] == 1) {\n\t\t\t\t\t\t\t\tconflictX = 1;\n\t\t\t\t\t\t\t\tx--;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconflictX = 2;\n\t\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconflictX = 2;\n\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (y + 1 < 10 && y - 1 >= 0) {// branch for multiple vertical\n\t\t\t\t\t\t\t\t\t\t\t\t// hits\n\t\t\t\t\tif (egrid[x][y + 1] == 1 && egrid[x][y - 1] == 1) {\n\t\t\t\t\t\t// System.out.println(\"conflict at \"+ex+\",\"+ey);\n\t\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\t\tconflictY = 1;\n\t\t\t\t\t\ty--;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (conflictX == 0 && conflictY == 0) {\n\n\t\t\t\t\tif (checkDirection == 0) // checks in each direction\n\t\t\t\t\t\tx++;\n\t\t\t\t\telse if (checkDirection == 1)\n\t\t\t\t\t\tx--;\n\t\t\t\t\telse if (checkDirection == 2)\n\t\t\t\t\t\ty++;\n\t\t\t\t\telse if (checkDirection == 3) {\n\t\t\t\t\t\ty--;\n\t\t\t\t\t\tenemyLastShotHit = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (x < 0) // making sure coordinates stay within bounds\n\t\t\t\t\t\tx = 0;\n\t\t\t\t\telse if (x > 9)\n\t\t\t\t\t\tx = 9;\n\t\t\t\t\tif (y < 0)\n\t\t\t\t\t\ty = 0;\n\t\t\t\t\telse if (y > 9)\n\t\t\t\t\t\ty = 9;\n\t\t\t\t}\n\t\t\t} // medium diff\n\n\t\t\telse if (getDifficulty() == 2) {// hard difficulty\n\t\t\t\t// gives enemy unfair advantage\n\n\t\t\t\tif (conflictX == 4)\n\t\t\t\t\tconflictX = 0;\n\t\t\t\tif (conflictY == 4)\n\t\t\t\t\tconflictY = 0;\n\n\t\t\t\tif (conflictX != 0) {\n\t\t\t\t\tif (conflictX == 1)\n\t\t\t\t\t\tx++;\n\t\t\t\t\telse {\n\t\t\t\t\t\tx--;\n\t\t\t\t\t}\n\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\tconflictX = 4;\n\t\t\t\t} else if (conflictY == 1) {\n\t\t\t\t\tconflictY = 4;\n\t\t\t\t\ty++;\n\t\t\t\t}\n\n\t\t\t\tif (x + 1 < 10 && x - 1 >= 0) {// branch for multiple hits\n\t\t\t\t\tif (egrid[x + 1][y] == 1 && egrid[x - 1][y] == 1) {\n\t\t\t\t\t\t// System.out.println(\"conflict at \"+ex+\",\"+ey);\n\t\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\t\tif (x + 2 < 10) {\n\t\t\t\t\t\t\tif (egrid[x + 2][y] == 1) {\n\t\t\t\t\t\t\t\tconflictX = 1;\n\t\t\t\t\t\t\t\tx--;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconflictX = 2;\n\t\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconflictX = 2;\n\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (y + 1 < 10 && y - 1 >= 0) {// branch for multiple vertical\n\t\t\t\t\t\t\t\t\t\t\t\t// hits\n\t\t\t\t\tif (egrid[x][y + 1] == 1 && egrid[x][y - 1] == 1) {\n\t\t\t\t\t\t// System.out.println(\"conflict at \"+ex+\",\"+ey);\n\t\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\t\tconflictY = 1;\n\t\t\t\t\t\ty--;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (conflictX == 0 && conflictY == 0) {\n\t\t\t\t\tif (y + 1 < 10) {\n\t\t\t\t\t\tif (egrid[x][y + 1] == 1)// if y+1 is a hit and it is\n\t\t\t\t\t\t\t\t\t\t\t\t\t// within bounds, it will go\n\t\t\t\t\t\t\t\t\t\t\t\t\t// there\n\t\t\t\t\t\t\ty++;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (y - 1 >= 0) {\n\t\t\t\t\t\tif (egrid[x][y - 1] == 1)\n\t\t\t\t\t\t\ty--;\n\t\t\t\t\t}\n\t\t\t\t\tif (x + 1 < 10) {\n\t\t\t\t\t\tif (egrid[x + 1][y] == 1)\n\t\t\t\t\t\t\tx++;\n\t\t\t\t\t}\n\t\t\t\t\tif (x - 1 >= 0) {\n\t\t\t\t\t\tif (egrid[x - 1][y] == 1) {\n\t\t\t\t\t\t\tx--;\n\t\t\t\t\t\t\tenemyLastShotHit = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} // hard diff\n\t\t\tcheckDirection++;\n\t\t} // lasthit\n\n\t\tint tryCount = 0;\n\t\twhile (egrid[x][y] == 3) { // makes sure enemy doesn't hit same spot\n\t\t\t\t\t\t\t\t\t// twice\n\t\t\tx = (int) (Math.random() * 10);\n\t\t\ty = (int) (Math.random() * 10);\n\t\t\tif (tryCount < 20 && getDifficulty() > 0) {\n\t\t\t\tif (x % 2 == 0) { // if x is even, y should be odd\n\t\t\t\t\tif (y % 2 == 0) { // for checkerboard pattern\n\t\t\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\t\t\ty++;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ty--;\n\t\t\t\t\t}\n\t\t\t\t} else { // if x is odd, y should be even\n\t\t\t\t\tif (y % 2 == 1)\n\t\t\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\t\t\ty++;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ty--;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttryCount++;\n\t\t}\n\n\t\tif (egrid[x][y] == 1) { // hit branch\n\t\t\tenemyBoard[x][y].setIcon(createImageIcon(\"tilehit.jpg\"));\n\t\t\tstatus.setText(\" Enemy got a hit\");\n\t\t\tenemyLastShotHit = true; // starts ai\n\t\t\tcheckDirection = 0;\n\t\t\tif (conflictX == 0 && conflictY == 0) {\n\t\t\t\tenemyLastHitX = x; // stores x and y values\n\t\t\t\tenemyLastHitY = y;\n\t\t\t}\n\t\t\tehits--; // keeps score\n\t\t}\n\n\t\telse if (egrid[x][y] == 2) { // poweup branch\n\t\t\tenemyBoard[x][y].setIcon(createImageIcon(\"tilepower.jpg\"));\n\t\t\tstatus.setText(\" Enemy got a PowerUp\");\n\t\t\tgoAgain = true;\n\t\t}\n\n\t\telse\n\t\t\t// miss branch\n\t\t\tenemyBoard[x][y].setIcon(createImageIcon(\"tilemiss.jpg\"));\n\n\t\tegrid[x][y] = 3;\n\n\t\tcheckEnemyWin();\n\n\t\tif (goAgain)\n\t\t\tenemyMove();\n\n\t}", "public static void checkCollisions() {\n\t \n\t\tfor (Ball b1 : Panel.balls) {\n\t\t\tfor (Ball b2 : Panel.balls) {\n\t\t\t\tif (b1.Bounds().intersects(b2.Bounds()) && !b1.equals(b2)) {\t\t\t//checking for collision and no equals comparisions\n\t\t\t\t\tint vX = b1.getxVelocity();\n\t\t\t\t\tint vY = b1.getyVelocity();\n\t\t\t\t\tb1.setxVelocity(b2.getxVelocity());\t\t\t\t\t\t\t\t//reversing velocities of each Ball object\n\t\t\t\t\tb1.setyVelocity(b2.getyVelocity());\n\t\t\t\t\tb2.setxVelocity(vX);\n\t\t\t\t\tb2.setyVelocity(vY);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void frighten(ArrayList<Wall> listOfWalls, ArrayList<Point> intersections) {\n Random r = new Random();\r\n int targetX = 25;\r\n int targetY = 25;\r\n double minDistance = 5000000000.0; //no distance is greater than this 4head\r\n double upDistance = 500000000.0;\r\n double downDistance = 5000000.0;\r\n double leftDistance = 50000000.0;\r\n double rightDistance = 5000000.0;\r\n\r\n boolean isIntersection = checkIntersection(intersections);\r\n boolean isRightCollision = checkWallCollision(listOfWalls, 2);\r\n boolean isLeftCollision = checkWallCollision(listOfWalls, 3);\r\n boolean isUpCollision = checkWallCollision(listOfWalls,0);\r\n boolean isDownCollision = checkWallCollision(listOfWalls, 1);\r\n\r\n if(isIntersection) {\r\n\r\n if(!isRightCollision && this.direction != 3) {\r\n rightDistance = Math.pow((xPos + 20) - targetX,2) + Math.pow(yPos - targetY,2);\r\n }\r\n if(!isLeftCollision && this.direction !=2) {\r\n leftDistance = Math.pow((xPos - 20) - targetX,2) + Math.pow(yPos - targetY,2);\r\n }\r\n if(!isUpCollision && this.direction != 1) {\r\n upDistance = Math.pow((xPos) - targetX,2) + Math.pow((yPos-20) - targetY,2);\r\n }\r\n if(!isDownCollision && this.direction != 0) {\r\n downDistance = Math.pow((xPos) - targetX,2) + Math.pow((yPos+20) - targetY,2);\r\n }\r\n if(upDistance <= downDistance && upDistance <= leftDistance && upDistance <= rightDistance) {\r\n this.direction = 0;\r\n }\r\n else if(downDistance <= upDistance && downDistance <= leftDistance && downDistance <= rightDistance) {\r\n this.direction = 1;\r\n }\r\n\r\n else if(rightDistance <= leftDistance && rightDistance <= downDistance && rightDistance <= upDistance) {\r\n this.direction = 2;\r\n }\r\n\r\n else if(leftDistance <= rightDistance && leftDistance <= upDistance && leftDistance <= downDistance) {\r\n this.direction = 3;\r\n }\r\n\r\n\r\n }\r\n\r\n if(this.direction == 0) {\r\n yPos = yPos - 5;\r\n }\r\n if(this.direction ==1) {\r\n yPos = yPos + 5;\r\n }\r\n if(this.direction ==2) {\r\n xPos = xPos + 5;\r\n }\r\n if(this.direction == 3) {\r\n xPos = xPos - 5;\r\n }\r\n }", "public void tick() {\n\t\tif (mainRef.player().getPos()[1] <= lastEnd.getPos()[1] + 2000)\r\n\t\t\tloadNextMap();\r\n\r\n\t\tfor (GameObject go : gameObjects)\r\n\t\t\tgo.tick();\r\n\r\n\t\t// Check Player Collision\r\n\t\t// Top-Left\r\n\t\tPointColObj cTL = new PointColObj(mainRef.player().getPos()[0] + mainRef.player().getCol()[2],\r\n\t\t\t\tmainRef.player().getPos()[1] + mainRef.player().getCol()[3]);\r\n\t\t// Top-Right\r\n\t\tPointColObj cTR = new PointColObj(mainRef.player().getPos()[0] + mainRef.player().getCol()[2],\r\n\t\t\t\tmainRef.player().getPos()[1] + mainRef.player().getCol()[3] + mainRef.player().getCol()[1]);\r\n\t\t// Bottom-Left\r\n\t\tPointColObj cBL = new PointColObj(\r\n\t\t\t\tmainRef.player().getPos()[0] + mainRef.player().getCol()[2] + mainRef.player().getCol()[0],\r\n\t\t\t\tmainRef.player().getPos()[1] + mainRef.player().getCol()[3]);\r\n\t\t// Bottom-Right\r\n\t\tPointColObj cBR = new PointColObj(\r\n\t\t\t\tmainRef.player().getPos()[0] + mainRef.player().getCol()[2] + mainRef.player().getCol()[0],\r\n\t\t\t\tmainRef.player().getPos()[1] + mainRef.player().getCol()[3] + mainRef.player().getCol()[1]);\r\n\r\n\t\t// Inverse Collision, no part of the player's ColBox should be not\r\n\t\t// colliding...\r\n\t\tif (checkCollisionWith(cTL).size() == 0 || checkCollisionWith(cTR).size() == 0\r\n\t\t\t\t|| checkCollisionWith(cBL).size() == 0 || checkCollisionWith(cBR).size() == 0) {\r\n\t\t\t// If it would have left the bounding box of the floor, reverse the\r\n\t\t\t// player's posiiton\r\n\t\t\tmainRef.player().setMoveBack(true);\r\n\t\t} else\r\n\t\t\tmainRef.player().setMoveBack(false);\r\n\r\n\t\t// Check General Collision\r\n\t\tArrayList<GameObject> allCol = checkCollisionWith(mainRef.player());\r\n\t\tfor (GameObject go : allCol) {\r\n\t\t\tif (go instanceof Tile) {\r\n\t\t\t\tTile gameTile = (Tile) go;\r\n\t\t\t\tif (gameTile.getType() == GameObjectRegistry.TILE_WALL\r\n\t\t\t\t\t\t|| gameTile.getType() == GameObjectRegistry.TILE_BASE\r\n\t\t\t\t\t\t|| gameTile.getType() == GameObjectRegistry.TILE_DOOR\r\n\t\t\t\t\t\t|| gameTile.getType() == GameObjectRegistry.TILE_SEWER\r\n\t\t\t\t\t\t|| (gameTile.getType() == GameObjectRegistry.TILE_WATERFALL && gameTile.getVar() == 0)) {\r\n\t\t\t\t\tmainRef.player().setMoveBack(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t} else if (go instanceof LineColObjHor || go instanceof LineColObjVert) {\r\n\t\t\t\tmainRef.player().setMoveBack(true);\r\n\t\t\t\tbreak;\r\n\t\t\t} else if (go instanceof SkillDrop) {\r\n\t\t\t\tSkillDrop d = (SkillDrop) go;\r\n\t\t\t\tmainRef.player().getInv()[d.getVariation()]++;\r\n\t\t\t\tremoveGameObject(go);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "public void checkCollisions() {\n\t\t List<Missile> missiles = player.getMissiles();\n\t\t for(Missile n : missiles) {\n\t\t\t Rectangle r1 = n.getBounds();\n\t\t\t for(Mushroom mush : mushrooms) {\n\t\t\t\t Rectangle r2 = mush.getBounds();\n\t\t\t\t r2.x += 8;\n\t\t\t\t if(r1.intersects(r2)) {\n\t\t\t\t\t mush.hitCnt += 1;\n\t\t\t\t\t if(mush.hitCnt == 3) {\n\t\t\t\t\t\t score += 5;\n\t\t\t\t\t\t n.setVisible(false);\n\t\t\t\t\t\t mush.setVisible(false);\n\t\t\t\t\t } else {\n\t\t\t\t\t\t score += 1;\n\t\t\t\t\t\t n.setVisible(false);\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if Missile hits Centipede\n\t\t //missiles = player.getMissiles();\n\t\t for(Missile m: missiles) {\n\t\t\t Rectangle rm = m.getBounds();\n\t\t\t for(int i = 0; i < centipede.size(); i++) {\n\t\t\t\t Segment s = centipede.get(i);\n\t\t\t\t Rectangle rs = s.getBounds();\n\t\t\t\t if(rs.intersects(rm)) {\n\t\t\t\t\ts.hit();\n\t\t\t\t\tscore = (s.hitCnt < 2 ? score +2 : score + 0);\n\t\t\t\t\tif(s.hitCnt == 2){\n\t\t\t\t\t\t//split centipede\n\t\t\t\t\t\tscore += 5;\n\t\t\t\t\t\tm.setVisible(false);\n\t\t\t\t\t\tcentipede.remove(i);\n\t\t\t\t\t\t//mushrooms.add(new Mushroom(s.getX(), s.getY()));\n\t\t\t\t\t}else {\n\t\t\t\t\t\tm.setVisible(false);\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if missile hits spider\n\t\t missiles = player.getMissiles();\n\t\t for(Missile m : missiles) {\n\t\t\t Rectangle mBound = m.getBounds();\n\t\t\t Rectangle spiderBound = spider.getBounds();\n\t\t\t if(mBound.intersects(spiderBound)) {\n\t\t\t\t spiderHitCnt += 1;\n\t\t\t\t if(spiderHitCnt == 2) {\n\t\t\t\t\t m.setVisible(false);\n\t\t\t\t\t spider.setVisible(false);\n\t\t\t\t\t score += 600;\n\t\t\t\t } else {\n\t\t\t\t\t score += 100;\n\t\t\t\t\t m.setVisible(false);\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if centipede hits mushroom\n\t\t for(Segment c : centipede) {\n\t\t\t Rectangle cB = c.getBounds();\n\t\t\t for(Mushroom m: mushrooms) {\n\t\t\t\t Rectangle mB = new Rectangle(m.getX(), m.getY() + 5, m.getWidth(), m.getHeight() - 10);\n\t\t\t\t mB.y += 3;\n\t\t\t\t if(cB.intersects(mB)) {\n\t\t\t\t\t//makes each segment to go downs\n\t\t\t\t\tc.y += 16;\n\t\t\t\t\tc.dx = -c.dx;\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if Centipede hits Player\n\t\t Rectangle playerBounds = player.getBounds();\n\t\t for(Segment s : centipede) {\n\t\t\t Rectangle sB = s.getBounds();\n\t\t\t if(playerBounds.intersects(sB)) {\n\t\t\t\t playerLives -= 1;\n\t\t\t\t playerHitCnt += 1;\n\t\t\t\t if(playerHitCnt > MAX_HIT_COUNT) {\n\t\t\t\t\t// System.out.println(playerLives+\" \"+ x);\n\t\t\t\t\t player.setVisible(false);\n\t\t\t\t\t inGame = false;\n\t\t\t\t }else {\n\t\t\t\t\t\tplayer.x = 707;\n\t\t\t\t\t\tplayer.y = 708;\n\t\t\t\t\t\tPoint location = getLocationOnScreen();\n\t\t\t\t\t\trobot.mouseMove(location.x + 250, location.y + 425);\n\t\t\t\t\t\tplayer = new Player(300, 400);\n\t\t\t\t\t\tregenMushrooms();\n\t\t\t\t\t}\n\t\t\t }\n\t\t }\n\n\t\t //check if Spider hits Player\n\t\t playerBounds = player.getBounds();\n\t\t Rectangle spiderBounds = spider.getBounds();\n\t\t if(spiderBounds.intersects(playerBounds)) {\n\t\t\tplayerLives -= 1;\n\t\t\tplayerHitCnt += 1;\n\t\t\tif(playerLives > MAX_HIT_COUNT) {\n\t\t\t\t//System.out.println(playerLives+\" \"+ y);\n\t\t\t\tplayer.setVisible(false);\n\t\t\t\tspider.setVisible(false);\n\t\t\t}else {\n\t\t\t\tregenMushrooms();\n\t\t\t\tcentipede.clear();\n\t\t\t\tcreateCentipede();\n\t\t\t\tplayer.x = 707;\n\t\t\t\tplayer.y = 708;\n\t\t\t\tPoint location = getLocationOnScreen();\n\t\t\t\trobot.mouseMove(location.x + 250, location.y + 425);\n\t\t\t\tplayer = new Player(300, 400);\n\t\t\t}\n\t\t}\n\t }", "@Test\n public void testSolveIrregularBeginAndEndMaze(){\n try {\n //link row 1\n largeMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n largeMaze.linkPillars(Maze.position(2, 0), Maze.position(3, 0));\n largeMaze.linkPillars(Maze.position(3, 0), Maze.position(4, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(1, 2));\n largeMaze.linkPillars(Maze.position(3, 1), Maze.position(4, 1));\n\n //link row 3\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(1, 3));\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //link row 4\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(0, 3));\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(2, 3));\n largeMaze.linkPillars(Maze.position(3, 3), Maze.position(4, 3));\n largeMaze.linkPillars(Maze.position(0, 3), Maze.position(0, 4));\n\n //link row 5\n largeMaze.linkPillars(Maze.position(0, 4), Maze.position(1, 4));\n largeMaze.linkPillars(Maze.position(1, 4), Maze.position(2, 4));\n largeMaze.linkPillars(Maze.position(2, 4), Maze.position(3, 4));\n largeMaze.linkPillars(Maze.position(3, 4), Maze.position(4, 4));\n\n //set beginning and end\n largeMaze.setBegin(Maze.position(1, 0));\n largeMaze.setEnd(Maze.position(3, 4));\n shortestPath = MazeSolver.pStar(largeMaze, 25);\n\n assertEquals(\"<1, 0>\", shortestPath.get(0).getCoordinateString());\n assertEquals(\"<1, 1>\", shortestPath.get(1).getCoordinateString());\n assertEquals(\"<1, 2>\", shortestPath.get(2).getCoordinateString());\n assertEquals(\"<1, 3>\", shortestPath.get(3).getCoordinateString());\n assertEquals(\"<2, 3>\", shortestPath.get(4).getCoordinateString());\n assertEquals(\"<2, 4>\", shortestPath.get(5).getCoordinateString());\n assertEquals(\"<3, 4>\", shortestPath.get(6).getCoordinateString());\n\n assertEquals(7, shortestPath.size());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "public void step(double timeStep){\n\t\t\n\t\t//Base case of the recursive implementation --> end if we've basically reached negligible\n\t\t//amounts of time\n\t\tif(timeStep < TIME_EPSILON){\n\t\t\treturn;\n\t\t}\n\t\t\n//\t\t//Modify the velocities of all of the balls according to gravity and friction\n//\t\tfor(Ball ball : balls){\n//\t\t\tdouble vY = ball.getVel().y();\n//\t\t\tdouble vX = ball.getVel().x();\n//\t\t double newVY = vY + GRAVITY * timeStep;\n//\t\t double newVX = vX * (1 - MU_1 * timeStep - MU_2 * Math.abs(vX) * timeStep);\n//\t\t newVY = newVY * (1 - MU_1 * timeStep - MU_2 * Math.abs(newVY) * timeStep);\n//\t\t \n//\t\t ball.setVel(new Vect(newVX, newVY));\n//\t\t}\n\t\t\n\t\tBall collisionBall1 = null;\n\t\tBall collisionBall2 = null;\n\t\tBall collisionBall3 = null;\n\t\tGadget collisionGadget = null;\n\t\t\n\t\t//With the current velocities and positions determine the time for the next ball-ball\n\t\t//collision as well as the balls that actually collide\n\t\tdouble minTimeUntilBallBallCollision = Double.POSITIVE_INFINITY;\n\t\t\n\t\tif(balls.size() > 1){\n\t\t\tcollisionBall1 = balls.get(0);\n\t\t\tcollisionBall2 = balls.get(1);\n\t\t\tfor(int i = 0; i < balls.size() - 1; i++){\n\t\t\t\tfor(int j = i + 1; j < balls.size(); j++){\n\t\t\t\t\tBall ball1 = balls.get(i);\n\t\t\t\t\tBall ball2 = balls.get(j);\n\t\t\t\t\tif(!ball1.getInAbsorber() && !ball2.getInAbsorber()){\t\n\t\t\t\t\t\tdouble timeUntilCollision = ball1.impactCalc(ball2)[0];\n\t\t\t\t\t\tif (timeUntilCollision < minTimeUntilBallBallCollision){\n\t\t\t\t\t\t\tminTimeUntilBallBallCollision = timeUntilCollision;\n\t\t\t\t\t\t\tcollisionBall1 = ball1;\n\t\t\t\t\t\t\tcollisionBall2 = ball2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//With the current velocities and positions determine the time for the next ball-gadget\n\t\t//collision and determine the objects involved in that collision\n\t\tdouble minTimeUntilBallGadgetCollision = Double.POSITIVE_INFINITY;\n\t\tif(balls.size() > 0 && gadgets.size() > 0){\n\t\t\tcollisionBall3 = balls.get(0);\n\t\t\tcollisionGadget = gadgets.get(0);\n\t\t\tfor(Ball b : balls){\n\t\t\t\tif(!b.getInAbsorber()){\n\t\t\t\t\tfor(Gadget g : gadgets){\n\t\t\t\t\t\tdouble timeUntilCollision = ((BoardObject) g).impactCalc(b)[0];\n\t\t\t\t\t\t//System.out.println(g.getID() + \" \" +timeUntilCollision);\n\t\t\t\t\t\tif (timeUntilCollision < minTimeUntilBallGadgetCollision){\n\t\t\t\t\t\t\tminTimeUntilBallGadgetCollision = timeUntilCollision;\n\t\t\t\t\t\t\tcollisionBall3 = b;\n\t\t\t\t\t\t\tcollisionGadget = g;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\n\t\t\n\t\t//Trivially progress the board if the next determined collision of any kind doesn't happen\n\t\t//within the time step\n\t\tif(Math.min(minTimeUntilBallBallCollision, minTimeUntilBallGadgetCollision) > timeStep){\n\t\t\tprogress(timeStep - TIME_EPSILON);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//If a ball-ball collision happens within the time step, progress the board trivially until\n\t\t//just before the collision, modify the ball velocities accordingly and recursively call the\n\t\t//step function passing the remaining time as the argument for step()\n\t\tif(minTimeUntilBallBallCollision < minTimeUntilBallGadgetCollision){\n\t\t\tprogress(minTimeUntilBallBallCollision - TIME_EPSILON);\n\t\t\t\n\t\t\tVect ball1Vel = new Vect(collisionBall2.impactCalc(collisionBall1)[1], collisionBall2.impactCalc(collisionBall1)[2]);\n\t\t\tVect ball2Vel = new Vect(collisionBall1.impactCalc(collisionBall2)[1], collisionBall1.impactCalc(collisionBall2)[2]);\n\t\t\t\n\t\t\tcollisionBall1.setVel(ball1Vel);\n\t\t\tcollisionBall2.setVel(ball2Vel);\n\t\t\t\n\t\t\tstep(timeStep - minTimeUntilBallBallCollision);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//In the final case, a ball-gadget collision occurs within the time step. In this case we\n\t\t//progress the board trivially until just before the collision, modify the ball velocity\n\t\t//and trigger the gadget. Then recursively call the step function passing the remaining time \n\t\t//as the argument for step()\n\t\t\n\t\tprogress(minTimeUntilBallGadgetCollision - TIME_EPSILON);\n\t\t\n\t\tVect ball3Vel = new Vect(((BoardObject)collisionGadget).impactCalc(collisionBall3)[1], ((BoardObject)collisionGadget).impactCalc(collisionBall3)[2]);\n\t\t\n\t\tif(collisionGadget instanceof Absorber){\n\t\t\tcollisionBall3.setVel(new Vect(0,0));\n\t\t\tVect newPos = new Vect(collisionGadget.getX() + collisionGadget.getWidth() - 0.25, collisionGadget.getY() + collisionGadget.getHeight() - 0.25);\n\t\t\tcollisionBall3.setPos(newPos);\n\t\t\tcollisionBall3.setInAbsorber(true);\n\t\t\t((Absorber) collisionGadget).addBallToAbsorber(collisionBall3);\n\t } else if(!(collisionGadget instanceof OuterWall) || ((OuterWall)collisionGadget).getConnectedBoard() == this && ((OuterWall)collisionGadget).getConnectedWall().equals(collisionGadget.getID())){\n\t\t\tcollisionBall3.setVel(ball3Vel);\n\t\t} else{\n\t\t\t//TODO @DANA, this has to do with the client/server ball passing stuff\n\t\t}\n\t\t\n\t\n\t\tcollisionGadget.trigger();\n\n\t\t\n\t\tstep(timeStep - minTimeUntilBallBallCollision);\n\t\treturn;\t\n\t}", "public boolean solve(final int startRow, final int startCol) {\r\n\r\n // TODO\r\n // validate arguments: ensure position is within maze area\r\n\r\n if(mazeData [startRow][startCol] == WALL) {\r\n throw new IllegalArgumentException(\" we're in a wall buddy\");\r\n }\r\n else if (startRow > mazeData.length-1 || startCol > mazeData.length-1 ){\r\n throw new IllegalArgumentException(\" we're out of bounds \");\r\n }\r\n\r\n\r\n\r\n\r\n\r\n // TODO create local class for row/col positions\r\n class Position {\r\n private int row;\r\n private int col;\r\n\r\n // TODO add instance variables\r\n public Position(final int row, final int col) {\r\n this.row = row;\r\n this.col= col;\r\n }\r\n\r\n\r\n\r\n // TODO toString if desired\r\n public String toString() {\r\n return \"Row: \" + this.row + \"Column: \"+ this.col;\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n // define the stack (work queue)\r\n final var queue = Collections.asLifoQueue(new LinkedList<Position>());\r\n //Queue<Position> queue = new LinkedList<Position>(); // EXTRA CREDIT PART 2\r\n\r\n // put starting position in queue\r\n queue.add(new Position(startRow, startCol));\r\n\r\n\r\n\r\n\r\n\r\n // look for a way out of the maze from the current position\r\n while (!queue.isEmpty()) {\r\n\r\n\r\n final Position pos = queue.remove();\r\n\r\n // if this is a wall, then ignore this position (and skip the remaining steps of the loop body)\r\n if (mazeData [pos.row][pos.col]== WALL){\r\n continue; // jumps to next spot in que , by skipping to next iteration of loops by saying continue\r\n }\r\n\r\n\r\n // otherwise mark this place as visited (drop a breadcrumb)\r\n if (mazeData [pos.row][pos.col]== VISITED){\r\n continue; // jumps to next spot in que , by skipping to next iteration of loops by saying continue\r\n }\r\n else if(mazeData [pos.row][pos.col]== EMPTY){\r\n mazeData [pos.row][pos.col]= VISITED;\r\n }\r\n\r\n // if we're already on the perimeter, then this is a way out and we should return success (true) right away\r\n if (pos.row == 0|| pos.col ==0 || pos.row == mazeData.length-1 || pos.col == mazeData[0].length-1){\r\n mazeData[startRow][startCol] = START;\r\n return true;\r\n }\r\n\r\n queue.add(new Position(pos.row+1,pos.col ));//down\r\n queue.add(new Position(pos.row-1,pos.col ));//up\r\n queue.add(new Position(pos.row,pos.col-1 )); //left\r\n queue.add(new Position(pos.row, pos.col + 1)); //right\r\n\r\n\r\n }//end of while\r\n\r\n\r\n\r\n // mark starting position\r\n mazeData[startRow][startCol] = START;\r\n\r\n // if we've looked everywhere but haven't gotten out, then return failure (false)\r\n return false;\r\n }", "public void CheckCollision(Ball b){\n\n if( b.getDirX() < 0f ){\n if( (b.getPosX() - b.getSizeX() ) < px + sx){\n //if we're in the upper \n if( b.getPosY() > py+sy/2 && b.getPosY() < py+sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() + .25f);\n }\n //if we are in the lower\n else if( b.getPosY() < py-sy/2 && b.getPosY() > py-sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() - .25f); \n }\n else if( b.getPosY() > py-sy && b.getPosY() < py+sy)\n b.setDirX(-b.getDirX());\n b.setVelocity(b.getVelocity() * 1.10f);\n } \n }else{\n if( (b.getPosX() + b.getSizeX() ) > px - sx){\n //if we're in the upper \n if( b.getPosY() > py+sy/2 && b.getPosY() < py+sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() + .25f);\n }\n //if we are in the lower\n else if( b.getPosY() < py-sy/2 && b.getPosY() > py-sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() - .25f); \n }\n else if( b.getPosY() > py-sy && b.getPosY() < py+sy)\n b.setDirX(-b.getDirX());\n b.setVelocity(b.getVelocity() * 1.10f);\n }\n }\n }", "public void checkCollision(){\r\n\r\n\t\t\t\tsmile.updateVelocity();\r\n\r\n\t\t\t\tsmile.updatePosition();\r\n\r\n\t\t\t\tif (smile.updateVelocity() > 0){\r\n\r\n\t\t\t\t\tfor (int k = 0; k < arrayPlat.size(); k++){\r\n\r\n\t\t\t\t\t\tif (smile.getNode().intersects(arrayPlat.get(k).getX(), arrayPlat.get(k).getY(), Constants.PLATFORM_WIDTH, Constants.PLATFORM_HEIGHT)){\r\n\r\n\t\t\t\t\t\t\tsmile.setVelocity(Constants.REBOUND_VELOCITY);\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t}", "@Test\n public void testTankMovingOutsideBoundaries() {\n tank.moveRight();\n tank.notMoveLeft();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n assertEquals(tank.x(), 460);\n\n tank.moveLeft();\n tank.notMoveRight();\n\n for (int i = 0; i < 480; i++) {\n tank.tick();\n }\n\n assertEquals(tank.x(), 180);\n }", "@Override\n protected Move makeDecision() {\n myTurn = index();\n /* block the nearest + most effective player (as in, people who arent blocked) */\n ArrayList<Move> pathMoves = new ArrayList<>();\n ArrayList<Move> playMoves = new ArrayList<>();\n ArrayList<Move> discardMoves = new ArrayList<>();\n Map<Integer, Card> destroyCards = new HashMap<Integer, Card>();\n Map<Integer, Card> repairCards = new HashMap<Integer, Card>();\n Map<Integer, Card> blockCards = new HashMap<Integer, Card>();\n Map<Integer, Card> pathCards = new HashMap<Integer, Card>();\n Set<Position> reachable = game().board().getReachable();\n canSee=false;\n canMove=false;\n canBlock=false;\n canRockfall=false;\n canRepair=false;\n int len = hand().size();\n for (int i = 0; i < len; ++i) {\n Card c = hand().get(i);\n if (c instanceof PathCard && !isSabotaged()) {\n pathCards.put(i,c);\n// pathMoves.addAll(generatePossiblePaths(i, (PathCard) c));\n canMove = true;\n }\n if (c instanceof PlayerActionCard) {\n// playMoves.addAll(generatePossiblePlayerActions(i, (PlayerActionCard) c));\n if(c.type()== Card.Type.BLOCK) {\n blockCards.put(i, c);\n canBlock=true;\n }\n else if(c.type()== Card.Type.REPAIR) {\n repairCards.put(i, c);\n canRepair=true;\n }\n }\n if (c.type() == Card.Type.MAP) {\n// playMoves.addAll(generatePossibleMap(i));\n mapIndex = i;\n canSee = true;\n }\n if (c.type() == Card.Type.ROCKFALL) {\n destroyCards.put(i,c);\n// playMoves.addAll(generatePossibleRockfall(i));\n canRockfall = true;\n }\n discardMoves.add(Move.NewDiscardMove(index(), i));\n }\n\n if(canSee) {\n //sum of all heuristics\n double sumGoal[] = new double[3];\n for (Position h : reachable) {\n sumGoal[0]+=(9-(8-h.x)+ 5-(4-h.y));\n sumGoal[1]+=(9-(8-h.x)+ 5-(2-h.y));\n sumGoal[2]+=(9-(8-h.x)+ 5-(-h.y));\n }\n //update goldProb\n for(int i=0; i<3; i++) {\n int seenSum=0;\n for(int j=0; j<numPlayers; j++) {\n if(j!=myTurn) {\n if(haveSeen.get(j)[i]==1) seenSum++;\n }\n }\n goldProb[i] = (i==1?0.5:1)*(1-haveSeen.get(myTurn)[i])*(mapRate*(seenSum/numPlayers)+(sumGoal[i]/10));\n }\n }\n\n// System.out.println(hand());\n// System.out.println(pathMoves);\n\n\n if (role() == Role.GOLD_MINER) {\n //Path\n if(canSee && !goldFound) {\n int selection=0;\n double maxProb=goldProb[0];\n for(int i=0; i<3; i++) {\n if(goldProb[i]>maxProb) {\n maxProb = goldProb[i];\n selection=i;\n }\n }\n Move look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n switch(selection) {\n case 0:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n break;\n case 1:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.MIDDLE);\n break;\n case 2:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.BOTTOM);\n break;\n }\n return look;\n }\n if(canMove) {\n int globalIndex = 0;\n double maxH = 0;\n double oldH;\n Position bp = new Position(0,0);\n boolean rotate = false;\n //Find best path to place;\n Board board = game().board().copy();\n oldH = getClosest(board);\n// System.out.print(getClosest(board)+\" : \");\n for( Map.Entry<Integer, Card> p : pathCards.entrySet()) {\n int index = p.getKey();\n Card path = p.getValue();\n ((PathCard)path).setRotated(false);\n Set<Position> placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosest(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n rotate=false;\n }\n }\n ((PathCard) path).setRotated(true);\n placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(simulated);\n double cH = getClosest(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n rotate=true;\n maxH = cH;\n }\n }\n }\n// System.out.println(oldH+\": \"+maxH+\" (\"+abs(maxH-oldH)+\")\");\n oldBoard = game().board().copy();\n if(maxH>0 && abs(maxH-oldH)>0.01)\n return Move.NewPathMove(index(), globalIndex, bp.x, bp.y, rotate);\n }\n //Unblock\n if(canRepair) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for(int i=0; i<numPlayers; i++) {\n //heal self\n if(i == myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n// System.out.println(Arrays.toString(game().playerAt(index()).sabotaged()));\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n if (game().playerAt(index()).isRepairable(repair.effects())) {\n return Move.NewPlayerActionMove(index(),index, index());\n }\n }\n }\n else if(i!=myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n// System.out.println(Arrays.toString(game().playerAt(i).sabotaged()));\n if (game().playerAt(i).isRepairable(repair.effects())) {\n //calculate the should i repair? function\n double shouldIBlockMore = Probability[i]+(0.03*(numPlayers-i));\n if(blockMore<shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.75 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Block Enemy\n if(canBlock) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for (int i = 0; i < numPlayers; i++) {\n if (i != myTurn) {\n for (Map.Entry<Integer, Card> b : blockCards.entrySet()) {\n int index = b.getKey();\n PlayerActionCard block = (PlayerActionCard) b.getValue();\n if (game().playerAt(i).isSabotageable(block.effects()[0])) {\n //calculate the should i repair? function\n double shouldIBlockMore = (1 - Probability[i]) * ((1 - Probability[i]) + 0.2 * (numPlayers - i));\n if (blockMore < shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.6 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Fix (Rockfall)\n if(canRockfall) {\n int globalIndex = 0;\n double maxH = 0.0;\n Position bp = new Position(0,0);\n //Find best path to place;\n Board board = game().board().copy();\n for( Map.Entry<Integer, Card> d : destroyCards.entrySet()) {\n int index = d.getKey();\n Set<Position> destroyable = game().board().getDestroyable();\n for (Position h : destroyable) {\n Board simulated = board.simulateRemoveCardAt(h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosest(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n }\n }\n }\n oldBoard = game().board().copy();\n if(maxH>0)\n return Move.NewRockfallMove(index(), globalIndex, bp.x, bp.y);\n }\n //See map\n\n //Conserve (Find the best card to discard)\n\n //calculate the heuristics and adjust accordingly,\n //choose between playing a card or discarding.\n } else if (role() == Role.SABOTEUR) {\n //See map\n if(canSee && !goldFound) {\n int selection=0;\n //specific for saboteurs\n double maxProb=goldProb[0];\n for(int i=0; i<3; i++) {\n if(goldProb[i]>maxProb) {\n maxProb = goldProb[i];\n selection=i;\n }\n }\n Move look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n switch(selection) {\n case 0:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n break;\n case 1:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.MIDDLE);\n break;\n case 2:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.BOTTOM);\n break;\n }\n return look;\n }\n //Path\n if(canMove) {\n int globalIndex = 0;\n double maxH = 0.0;\n Position bp = new Position(0,0);\n boolean rotate = false;\n //Find best path to place;\n Board board = game().board().copy();\n double oldH = getClosestSabotage(board);\n for( Map.Entry<Integer, Card> p : pathCards.entrySet()) {\n int index = p.getKey();\n Card path = p.getValue();\n ((PathCard)path).setRotated(false);\n Set<Position> placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosestSabotage(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n rotate=false;\n }\n }\n ((PathCard) path).setRotated(true);\n placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(simulated);\n double cH = getClosestSabotage(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n rotate=true;\n maxH = cH;\n }\n }\n }\n oldBoard = game().board().copy();\n if(maxH>0 && abs(maxH-oldH)>0.01)\n return Move.NewPathMove(index(), globalIndex, bp.x, bp.y, rotate);\n }\n //Unblock Friend\n if(canRepair) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for(int i=0; i<numPlayers; i++) {\n if(i == myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n if (game().playerAt(myTurn).isRepairable(repair.effects())) {\n return Move.NewPlayerActionMove(index(),index, index());\n }\n }\n }\n else if(i!=myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n if (game().playerAt(i).isRepairable(repair.effects())) {\n //calculate the should i repair? function\n double shouldIBlockMore = (1-Probability[i])+(0.03*(numPlayers-i));\n if(blockMore<shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.75 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Block Enemy\n if(canBlock) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for (int i = 0; i < numPlayers; i++) {\n if (i != myTurn) {\n for (Map.Entry<Integer, Card> b : blockCards.entrySet()) {\n int index = b.getKey();\n PlayerActionCard block = (PlayerActionCard) b.getValue();\n if (game().playerAt(i).isSabotageable(block.effects()[0])) {\n //calculate the should i repair? function\n double shouldIBlockMore = (Probability[i]) * ((Probability[i]) + 0.2 * (numPlayers - i));\n if (blockMore < shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.6 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Sabotage (Rockfall)\n if(canRockfall) {\n int globalIndex = 0;\n double maxH = 0;\n Position bp = new Position(0,0);\n //Find best path to place;\n Board board = game().board().copy();\n for( Map.Entry<Integer, Card> d : destroyCards.entrySet()) {\n int index = d.getKey();\n Set<Position> destroyable = game().board().getDestroyable();\n for (Position h : destroyable) {\n Board simulated = board.simulateRemoveCardAt(h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosestSabotage(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n }\n }\n }\n oldBoard = game().board().copy();\n if(maxH>0)\n return Move.NewRockfallMove(index(), globalIndex, bp.x, bp.y);\n }\n //Conserve (Find the best card to discard\n\n //calculate the heuristics and adjust accordingly,\n //choose between playing a card or discarding.\n }\n return discardMoves.get(0);\n }", "public void collision(){\r\n\t\tif(currX < 0 || currX > 1000-width || currY < 0 || currY > 700-height){\r\n\t\t\tinGame=false;\r\n\t\t}\r\n\t\t/*\r\n\t\tI start at 1 because tail[0] will constantly be taking the position\r\n\t\tof the snake's head, so if i start at 0, the game would end immediately.\r\n\t\t*/\r\n\t\tfor(int i=1; i < numOranges; i++){\r\n\t\t\tRectangle currOrangeRect = new Rectangle(tail[i].getXcoords(), tail[i].getYcoords(), OrangeModel.getWidth(), OrangeModel.getHeight());\r\n\t\t\tif(new Rectangle(currX, currY, width, height).intersects(currOrangeRect)){\r\n\t\t\t\tinGame=false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void checkCollisions(){\n for(int i=bodyParts;i>0;i--){\n if((x[0]==x[i])&&(y[0]==y[i])){\n running=false;\n }\n }\n //head with left border\n if(x[0]<0){\n running=false;\n }\n //head with right border\n if(x[0]>screen_width){\n running=false;\n }\n //head with top border\n if(y[0]<0){\n running=false;\n }\n //head with bottom border\n if(y[0]>screen_height){\n running=false;\n }\n if(!running){\n timer.stop();\n }\n }", "public void hunt() {\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tif(cells[i].visited == false) {\n\t\t\t\t\n\t\t\t\tint currentIndex = i;\n\t\t\t\t\n\t\t\t\tArrayList<Integer> neighbors = setVisitedNeighbors(i);\n\t\t\t\tint nextIndex = getRandomVisitedNeighborIndex(neighbors);\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(neighbors.size() != 0 ) {\n\t\t\t\t\tcells[currentIndex].visited = true;\n\t\t\t\t\t\n\t\t\t\t\tif(nextIndex == NOT_EXIST) {\n\t\t\t\t\t\tbreak; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if there is NO not visited neighbors \n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -1) {\n\t\t\t\t\t\tcells[currentIndex].border[EAST] = NO_WALL; \t\t\t\t\t\t\t//neighbor is right \n\t\t\t\t\t\tcells[nextIndex].border[WEST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == width) {\n\t\t\t\t\t\tcells[currentIndex].border[NORTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is up\n\t\t\t\t\t\tcells[nextIndex].border[SOUTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -width) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[SOUTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is down\n\t\t\t\t\t\tcells[nextIndex].border[NORTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == 1) {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[WEST] = NO_WALL;\t\t\t\t\t\t\t\t//neighbor is left\n\t\t\t\t\t\tcells[nextIndex].border[EAST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\tkill(nextIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean checkWithFragmentingWarheadRocketJump ()\n {\n Map<Square, List<Player>> squarePlayerListMap = checkRocketJump();\n List<Player> playerList;\n\n for (Square squareIterate : squarePlayerListMap.keySet())\n {\n\n for (Player playerIterate : squarePlayerListMap.get(squareIterate))\n {\n playerList = new ArrayList<>();\n\n playerList.addAll(playerIterate.getSquare().getPlayerList());\n playerList.remove(player);\n\n if (playerList.size()>1)\n return true;\n\n }\n }\n\n return false;\n }", "private void createChamber() {\n\n // Give all tiles coordinates for map and temp map\n int CurrentY = 0;\n for (Tile[] tiles : map) {\n int CurrentX = 0;\n for (Tile tile : tiles) {\n tile.setPosition(new Coordinates(CurrentX, CurrentY));\n tile.setTerrain(Terrain.WALL);\n CurrentX++;\n }\n CurrentY++;\n }\n\n for (int y = 0; y < CAST_HEIGHT; y++) {\n for (int x = 0; x < CAST_WIDTH; x++) {\n tempMap[y][x].setPosition(new Coordinates(x, y));\n }\n }\n\n // Initialize algorithm at starting position (0, 0)\n tempMap[0][0].setVisited(true);\n numberOfCellsVisited = 1; //setting number of cells visited to 1 because I have visited one now!\n mapStack.push(tempMap[0][0]); //Chamber start position\n createMaze(tempMap[0][0]); //Chamber start position\n\n // Reveal top edge, sides, and bottom edge\n for (Tile tile : map[0]) {\n tile.setVisible(true);\n }\n for (Tile[] tiles : map) {\n tiles[0].setVisible(true);\n tiles[CHAMBER_WIDTH].setTerrain(Terrain.WALL);\n tiles[CHAMBER_WIDTH].setVisible(true);\n }\n for (Tile tile : map[CHAMBER_HEIGHT]) {\n tile.setVisible(true);\n }\n\n // Clear bugged walls\n for (int i = 1; i < MAP_HEIGHT - 2; i += 2)\n map[i][MAP_WIDTH - 2].setTerrain(Terrain.EMPTY);\n\n // Randomly make regulated holes in walls to create cycles\n Random rand = new Random(); // Preset rng for performance purposes\n for (int i = 1; i < MAP_HEIGHT - 1; i++) {\n for (int j = 1; j < MAP_WIDTH - 1; j++) {\n Tile tile = map[i][j];\n if (tile.getTerrain().equals(Terrain.WALL)) {\n\n // Neighbourhood Check\n int neighbourCount = 0, index = 0;\n boolean[] neighbourhood = new boolean[]{false, false, false, false}; // validity flags\n\n for (Direction direction : Direction.cardinals) {\n Coordinates targetCoordinates = Utility.locateDirection(tile.getPosition(), direction);\n Tile neighbour = getTileAtCoordinates(targetCoordinates);\n if (neighbour.getTerrain().equals(Terrain.WALL)) {\n neighbourCount++;\n neighbourhood[index] = true;\n }\n index++;\n }\n\n // Corner exclusion test, tests vertical NS and horizontal EW\n boolean isStraight = false;\n if (neighbourhood[0] && neighbourhood[1]) isStraight = true;\n if (neighbourhood[2] && neighbourhood[3]) isStraight = true;\n\n if (neighbourCount == 2 && isStraight) {\n if (rand.nextInt(5) == 4) tile.setTerrain(Terrain.EMPTY);\n }\n }\n }\n }\n\n // Check for enclosed spaces and create openings\n for (int i = 1; i < MAP_HEIGHT - 2; i++) probe(map[i][MAP_WIDTH - 2], Direction.EAST);\n }", "@Override\n synchronized public void run() {\n if (gameBoard.wasCollisionDetected()) {\n Point collisionPoint = gameBoard.getLastCollision();\n if (collisionPoint.x >= 0) {\n dummyText.setText(\"Last Collision XY (\" + Integer.toString(collisionPoint.x) + \",\" + Integer.toString(collisionPoint.y) + \")\");\n score++;\n }\n //turn off the animation until reset gets pressed\n //return;\n }\n frame.removeCallbacks(frameUpdate);\n\n Point playerNewPosition = new Point(gameBoard.getPlayerX(), gameBoard.getPlayerY());\n Point targetNewPosition = new Point(gameBoard.getTargetX(), gameBoard.getTargetY());\n Point obstacle1NewPosition = new Point(gameBoard.getObstacle1X(), gameBoard.getObstacle1Y());\n Point obstacle2NewPosition = new Point(gameBoard.getObstacle2X(), gameBoard.getObstacle2Y());\n\n updatePlayerVelocity();\n playerNewPosition.y = playerNewPosition.y + playerVelocity.y;\n if (playerNewPosition.y > playerMaxY) {\n // return doge to original position if it overshoots\n playerNewPosition.y = playerMaxY;\n performJump = false;\n button.setEnabled(true);\n }\n\n targetNewPosition.x = targetNewPosition.x + targetVelocity.x;\n if (targetNewPosition.x > memeMaxX || targetNewPosition.x < 5) {\n targetVelocity.x *= -1;\n }\n targetNewPosition.y = targetNewPosition.y + targetVelocity.y;\n if (targetNewPosition.y > memeMaxY || targetNewPosition.y < 5) {\n targetVelocity.y *= -1;\n }\n\n obstacle1NewPosition.x = obstacle1NewPosition.x + obstacle1Velocity.x;\n if (obstacle1NewPosition.x > memeMaxX || obstacle1NewPosition.x < 5) {\n obstacle1Velocity.x *= -1;\n }\n obstacle1NewPosition.y = obstacle1NewPosition.y + obstacle1Velocity.y;\n if (obstacle1NewPosition.y > memeMaxY || obstacle1NewPosition.y < 5) {\n obstacle1Velocity.y *= -1;\n }\n\n obstacle2NewPosition.x = obstacle2NewPosition.x + obstacle2Velocity.x;\n if (obstacle2NewPosition.x > memeMaxX || obstacle2NewPosition.x < 5) {\n obstacle2Velocity.x *= -1;\n }\n obstacle2NewPosition.y = obstacle2NewPosition.y + obstacle2Velocity.y;\n if (obstacle2NewPosition.y > memeMaxY || obstacle2NewPosition.y < 5) {\n obstacle2Velocity.y *= -1;\n }\n\n gameBoard.setPlayerPosition(playerNewPosition.x, playerNewPosition.y);\n gameBoard.setTargetPosition(targetNewPosition.x, targetNewPosition.y);\n gameBoard.setObstacle1Position(obstacle1NewPosition.x, obstacle1NewPosition.y);\n gameBoard.setObstacle2Position(obstacle2NewPosition.x, obstacle2NewPosition.y);\n gameBoard.invalidate();\n frame.postDelayed(frameUpdate, getFrameRate());\n }", "private int Block_Move() {\n\t\tfinal int POSSIBLE_BLOCK = 2;\n\t\tint move = NO_MOVE;\n\t\t\n\t\tif(( gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_LEFT] == EMPTY){\n\t\t\t\tmove = TOP_LEFT;\n\t\t\t}else if (gameBoard[TOP_CENTER] == EMPTY){\n\t\t\t\tmove = TOP_CENTER;\n\t\t\t}else if (gameBoard[TOP_RIGHT] == EMPTY){\n\t\t\t\tmove = TOP_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[CTR_LEFT] == EMPTY){\n\t\t\t\tmove = CTR_LEFT;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[CTR_RIGHT] == EMPTY){\n\t\t\t\tmove = CTR_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[BTM_LEFT] == EMPTY){\n\t\t\t\tmove = BTM_LEFT;\n\t\t\t}else if (gameBoard[BTM_CENTER] == EMPTY){\n\t\t\t\tmove = BTM_CENTER;\n\t\t\t}else if (gameBoard[BTM_RIGHT] == EMPTY){\n\t\t\t\tmove = BTM_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_LEFT] + gameBoard[BTM_LEFT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_LEFT] == EMPTY){\n\t\t\t\tmove = TOP_LEFT;\n\t\t\t}else if (gameBoard[CTR_LEFT] == EMPTY){\n\t\t\t\tmove = CTR_LEFT;\n\t\t\t}else if (gameBoard[BTM_LEFT] == EMPTY){\n\t\t\t\tmove = BTM_LEFT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_CENTER] + gameBoard[CTR_CENTER] + gameBoard[BTM_CENTER]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_CENTER] == EMPTY){\n\t\t\t\tmove = TOP_CENTER;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[BTM_CENTER] == EMPTY){\n\t\t\t\tmove = BTM_CENTER;\n\t\t\t}\t\t\t\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_RIGHT] + gameBoard[BTM_RIGHT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_RIGHT] == EMPTY){\n\t\t\t\tmove = TOP_RIGHT;\n\t\t\t}else if (gameBoard[CTR_RIGHT] == EMPTY){\n\t\t\t\tmove = CTR_RIGHT;\n\t\t\t}else if (gameBoard[BTM_RIGHT] == EMPTY){\n\t\t\t\tmove = BTM_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_CENTER] + gameBoard[BTM_RIGHT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_LEFT] == EMPTY){\n\t\t\t\tmove = TOP_LEFT;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[BTM_RIGHT] == EMPTY){\n\t\t\t\tmove = BTM_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_CENTER] + gameBoard[BTM_LEFT]) == POSSIBLE_BLOCK){\n\t\t\tif(gameBoard[TOP_RIGHT] == EMPTY){\n\t\t\t\tmove = TOP_RIGHT;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[BTM_LEFT] == EMPTY){\n\t\t\t\tmove = BTM_LEFT;\n\t\t\t}\n\t\t}\n\t\treturn move;\n\t}", "@Override\n public boolean detect() {\n \t slowDown();\n final MoveResult move = CurrentData.CALCULATED.tetromino.move;\n\t\t\t\t\t\tif (move.hasMove()) {\n final Tetromino moveTetromino = move.tetromino;\n final int y = QQRobot.findTetromino(moveTetromino, 3 + missingTetromino * 2);\n if (y == -1) {\n missingTetromino++;\n if (missingTetromino == 3) {\n // System.out.println(\"没找到块\" + nr + \"!\" + CurrentData.CALCULATED.tetromino.move + \", \"\n // + CurrentData.CALCULATED.tetromino + \", \"\n // + CurrentData.CALCULATED.tetromino.move.tetromino);\n // QQDebug.save(QQRobot.getScreen(), \"qqtetris_\" + nr);\n // nr++;\n throw new NoTetrominoFoundException(\"没找到块!\");\n // CurrentData.CALCULATED.tetromino.move.doMove();\n }\n } else {\n \t final int fallen = y - moveTetromino.y;\n if (fallen > 0) {\n // System.out.println(\"掉落:\" + fallen);\n moveTetromino.y = y;\n } \t \n \t if (move.clever) {\n \t \t if (firstScan) {\n \t \t firstScan = false;\n \t \t } else if (fallen > 0) {\n\t\t\t move.doMove(); \t \t \t \n \t \t }\n \t } else {\n\t\t move.doMove();\n \t }\n }\n }\n if (move.hasMove()) {\n return false;\n } else {\n // QQDebug.printBoard(CurrentData.CALCULATED.board);\n return true;\n }\n }", "@Test\n public void testSolveBackwardMaze(){\n try {\n //link row 1\n largeMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n largeMaze.linkPillars(Maze.position(2, 0), Maze.position(3, 0));\n largeMaze.linkPillars(Maze.position(3, 0), Maze.position(4, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(1, 2));\n largeMaze.linkPillars(Maze.position(3, 1), Maze.position(4, 1));\n\n //link row 3\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(1, 3));\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //link row 4\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(0, 3));\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(2, 3));\n largeMaze.linkPillars(Maze.position(3, 3), Maze.position(4, 3));\n largeMaze.linkPillars(Maze.position(0, 3), Maze.position(0, 4));\n\n //link row 5\n largeMaze.linkPillars(Maze.position(0, 4), Maze.position(1, 4));\n largeMaze.linkPillars(Maze.position(1, 4), Maze.position(2, 4));\n largeMaze.linkPillars(Maze.position(2, 4), Maze.position(3, 4));\n largeMaze.linkPillars(Maze.position(3, 4), Maze.position(4, 4));\n\n //set beginning and end\n largeMaze.setBegin(Maze.position(3, 4));\n largeMaze.setEnd(Maze.position(1, 0));\n shortestPath = MazeSolver.pStar(largeMaze, 25);\n\n assertEquals(null, shortestPath);\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "public void seekWalls() {\n\t\t for (int j=0; j<visited[0].length; j++){\n\t\t\tfor (int i=visited.length-1; i>=0; i--) {\t\t\t\n\t\t\t\tif (i!=0 && j!= visited[0].length-1) {//general position\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;//not break!!!!! return to exit !\n\t\t\t\t\t}\n\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (i==0 && j!= visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse if (i!=0 && j== visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse {//if (i==0 && j== visited[0].length-1) {\n\t\t\t\t\t//no solution\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void checkForCollisions()\r\n\t{\r\n\t\t//collision detection\r\n\t\tfor(PolygonD obj : objects)\r\n\t\t{\r\n\t\t\t//find points in character that intersected with the scene\r\n\t\t\tfor(PointD p : aSquare.getBoundary().getVerts())\r\n\t\t\t{\r\n\t\t\t\tif(obj.contains(p)){\r\n\t\t\t\t\t//find side that intersected\r\n\t\t\t\t\tdouble minDist = Double.MAX_VALUE;\r\n\t\t\t\t\tPointD prev = obj.getVerts().get(obj.getVerts().size()-1);\r\n\t\t\t\t\tPointD closestPoint = null;\r\n\t\t\t\t\tfor(PointD vert : obj.getVerts())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tDouble d = distanceToLine(new Vector(prev, vert), p);\r\n\t\t\t\t\t\tif(d != null && d < minDist)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tminDist = d;\r\n\t\t\t\t\t\t\tclosestPoint = getNearestPointOnLine(new Vector(prev, vert),p);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tprev = vert;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tVector offset = new Vector(p, closestPoint);\r\n\t\t\t\t\taSquare.translate(offset);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//find points in scene that intersected with the character\r\n\t\t\tfor(PointD p : obj.getVerts())\r\n\t\t\t{\r\n\t\t\t\tif(aSquare.getBoundary().contains(p)){\r\n\t\t\t\t\t//find side that intersected\r\n\t\t\t\t\tdouble minDist = Double.MAX_VALUE;\r\n\t\t\t\t\tPointD prev = aSquare.getBoundary().getVerts().get(aSquare.getBoundary().getVerts().size()-1);\r\n\t\t\t\t\tPointD closestPoint = null;\r\n\t\t\t\t\tfor(PointD vert : aSquare.getBoundary().getVerts())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tDouble d = distanceToLine(new Vector(prev, vert), p);\r\n\t\t\t\t\t\tif(d != null && d < minDist)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tminDist = d;\r\n\t\t\t\t\t\t\tclosestPoint = getNearestPointOnLine(new Vector(prev, vert),p);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tprev = vert;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//get the angle of object by 'feeling' it\r\n\t\t\t\t\tint numVerts = obj.verts.size();\r\n\t\t\t\t\tint objI = obj.verts.indexOf(p);\r\n\t\t\t\t\tint lastI = (objI - 1) % numVerts;\r\n\t\t\t\t\tif(lastI == -1)\r\n\t\t\t\t\t\tlastI = numVerts - 1;\r\n\t\t\t\t\tint nextI = (objI + 1) % numVerts;\r\n\t\t\t\t\t\r\n\t\t\t\t\tint angle = (int)Math.round((new Vector(obj.verts.get(objI), obj.verts.get(lastI))).angleBetween(new Vector(obj.verts.get(objI), obj.verts.get(nextI))));\r\n\t\t\t\t\t\r\n\t\t\t\t\taSquare.sendMsg(new Msg(aSquare, \"Felt Vertex: \" + angle + \"deg\"));//null means status message\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//reverse direction to make aSquare move out of wall\r\n\t\t\t\t\tVector offset = new Vector(closestPoint, p);\r\n\t\t\t\t\taSquare.translate(offset);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\taSquare.getCenter();\r\n\t}", "private void checkTargetsReachable(){\n\t\tPathfinder pathfinder = new Pathfinder(collisionMatrix);\n\t\tLinkedList<Node> removeList = new LinkedList<Node>();\n\t\tboolean pathWasFound = false;\n\t\tLinkedList<Node> currentPath;\n\t\tLinkedList<Node> reversePath;\n\t\t\n\t\t//Go through all starting positions\n\t\tfor(LinkedList<Node> startList : targets){\n\t\t\tprogress += 8;\n\t\t\tsetProgress(progress);\n\t\t\tfor(Node startNode : startList){\n\t\t\t\t\n\t\t\t\tboolean outsideMap = (startNode.getCollisionXPos(scaleCollision) < 0 || startNode.getCollisionXPos(scaleCollision) >= (collisionMatrix.length-1) || startNode.getCollisionYPos(scaleCollision) < 0 || startNode.getCollisionYPos(scaleCollision) >= (collisionMatrix.length-1));\n\t\t\t\t\n\t\t\t\tpathWasFound = false;\n\t\t\t\t//Make sure that target is inside of map\n\t\t\t\tif(!outsideMap){\n\t\t\t\t\t//Check against all target positions\n\t\t\t\t\tfor(LinkedList<Node> targetList : targets){\n\t\t\t\t\t\tfor(Node targetNode : targetList){\n\t\t\t\t\t\t\t//Only check against targets that have not already been marked as unreachable\n\t\t\t\t\t\t\tboolean selfCheck = (targetNode.getXPos() != startNode.getXPos() || targetNode.getYPos() != startNode.getYPos());\n\t\t\t\t\t\t\tif(!removeList.contains(targetNode) && selfCheck){\n\t\t\t\t\t\t\t\t//Check if this path has already been checked\n\t\t\t\t\t\t\t\tif(!preCalculatedPaths.containsKey(startNode.toStringCollision(scaleCollision) + \"-\" + targetNode.toStringCollision(scaleCollision))){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcurrentPath = new LinkedList<Node>();\n\t\t\t\t\t\t\t\t\t//Check if a path can be found for this start and target node\n\t\t\t\t\t\t\t\t\tif(pathfinder.findPath(startNode.getCollisionXPos(scaleCollision), startNode.getCollisionYPos(scaleCollision), targetNode.getCollisionXPos(scaleCollision), targetNode.getCollisionYPos(scaleCollision), currentPath)){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(Frame.USE_PRECALCULATED_PATHS)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tpreCalculatedPaths.put(startNode.toStringCollision(scaleCollision) + \"-\" + targetNode.toStringCollision(scaleCollision), currentPath);\n\t\t\t\t\t\t\t\t\t\t\treversePath = new LinkedList<Node>();\n\t\t\t\t\t\t\t\t\t\t\treversePath.addAll(currentPath);\n\t\t\t\t\t\t\t\t\t\t\tCollections.reverse(reversePath);\n\t\t\t\t\t\t\t\t\t\t\treversePath.removeFirst();\n\t\t\t\t\t\t\t\t\t\t\treversePath.add(startNode);\n\t\t\t\t\t\t\t\t\t\t\tpreCalculatedPaths.put(targetNode.toStringCollision(scaleCollision) + \"-\" + startNode.toStringCollision(scaleCollision) ,reversePath);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tpathWasFound = true;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\tpathWasFound = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Remove nodes which we cannot find a path from\n\t\t\t\tif(!pathWasFound){\n\t\t\t\t\tremoveList.add(startNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Go through the remove list and remove unreachable nodes\n\t\tfor(Node node : removeList){\n\t\t\tfor(LinkedList<Node> startList : targets){\n\t\t\t\tstartList.remove(node);\n\t\t\t}\n\t\t}\n\t}", "private void compareMove(int next){\n moveBuffer[0] = moveBuffer[1];//moveBuffer[0]=currentLocation,1 is next;\n moveBuffer[1] = next;\n if(moveBuffer[0]==moveBuffer[1]){\n flagbuffer0=0;\n return;\n }\n int currenti=0;int currentj=0;\n for ( int i = 0; i < 3; ++i ) {\n for ( int j = 0; j < 3; ++j ) {\n if ( maze[i][j] == moveBuffer[0] ) {\n currenti=i;\n currentj=j;\n break;// Found the correct i,j - print them or return them or whatever\n }\n }\n }\n int nexti=0;int nextj=0;\n for ( int i = 0; i < 3; ++i ) {\n for ( int j = 0; j < 3; ++j ) {\n if ( maze[i][j] == moveBuffer[1] ) {\n nexti=i;\n nextj=j;\n break;// Found the correct i,j - print them or return them or whatever\n }\n }\n }\n\n if( currenti== nexti){\n if(nextj > currentj && flagbuffer0==0){\n /*uiShowToast(\"Going right\");\n System.out.println(\"Going right\");\n this.sendCarMovement(\"R\");*/\n uiShowToast(\"Going right\");\n this.sendCarMovement(\"R\");\n try {\n Thread.sleep(550);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\"); flagbuffer0=1;\n }\n else if(nextj < currentj && flagbuffer0==0){\n uiShowToast(\"Going left\");\n this.sendCarMovement(\"L\");\n try {\n Thread.sleep(550);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\"); flagbuffer0=1;\n }\n else if(flagbuffer0==1){\n this.sendCarMovement(\"U\");\n }\n }\n if( currentj== nextj){\n if(nexti > currenti){\n /*uiShowToast(\"Going down\");\n System.out.println(\"Going down\");\n this.sendCarMovement(\"D\");*/\n uiShowToast(\"Going down\");\n flagbuffer0=0;\n this.sendCarMovement(\"L\");\n try {\n Thread.sleep(1100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\");\n\n }\n else if(nexti < currenti){\n /*uiShowToast(\"Going up\");\n System.out.println(\"Going up\");\n this.sendCarMovement(\"U\");*/\n uiShowToast(\"Going up\");\n flagbuffer0=0;\n this.sendCarMovement(\"U\");\n try {\n Thread.sleep(550);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\");\n }\n }\n /*if(movebuffer[0]==mvebuffer[1]){\n uiShowToast(\"Going up\");\n this.sendCarMovement(\"U\");\n try {\n Thread.sleep(550);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\");\n }else{\n\n }\n\n /*\n */\n /* Damon movement code\n if(moveBuffer[1] == 100 && moveBuffer[0] == 200){\n uiShowToast(\"Going left\");\n System.out.println(\"Going left\");\n this.sendCarMovement(\"L\");\n try {\n Thread.sleep(550);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\");\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }else{\n uiShowToast(\"Going up\");\n //Toast.makeText(getApplicationContext(), \"Going up\", Toast.LENGTH_LONG).show();\n System.out.println(\"Going up\");\n this.sendCarMovement(\"U\");\n try {\n Thread.sleep(2000);//wait 2 sec to next command;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n */\n return;\n }", "private void detectBombs(int row, int col){\r\n int bombCount = 0; //Amount of bombs nearby\r\n //Check up\r\n if((row-1 >= 0) && row<map.length && col<map[0].length && col>=0 && map[row-1][col].getSafe() == false){\r\n bombCount++;\r\n }\r\n //Check down\r\n if((row+1 < map.length) && row>=0&& col<map[0].length && col>=0 && map[row+1][col].getSafe() == false){\r\n bombCount++;\r\n }\r\n //Check right\r\n if((col+1 < map[0].length) && col>=0 && row<map.length && row>=0 && map[row][col+1].getSafe() == false){\r\n bombCount++;\r\n }\r\n //Check left\r\n if((col-1 >= 0) && col<map[0].length && row<map.length && row>=0 && map[row][col-1].getSafe() == false){\r\n bombCount++;\r\n }\r\n //Check up right\r\n if((row-1 >= 0) && row<map.length && (col+1 < map[0].length) && col>=0 && map[row-1][col+1].getSafe() == false){\r\n bombCount++;\r\n }\r\n //Check up left\r\n if((row-1 >= 0) && row<map.length && (col-1 >= 0) && col<map[0].length&& map[row-1][col-1].getSafe() == false){\r\n bombCount++;\r\n }\r\n //Check down left\r\n if((row+1 < map.length) && row>=0 && (col-1 >= 0)&& col<map[0].length && map[row+1][col-1].getSafe() == false){\r\n bombCount++;\r\n }\r\n //check down right\r\n if((row+1 < map.length) && row>=0 && (col+1 < map[0].length)&& col>=0 && map[row+1][col+1].getSafe() == false){\r\n bombCount++;\r\n }\r\n if(row>=0 && col>=0 && row<map.length && col<map[0].length && !map[row][col].getVisual().equals(\"F\") && map[row][col].getSafe() == true){\r\n if(bombCount==0){\r\n map[row][col].setVisual(zero);\r\n }\r\n if(bombCount==1){\r\n map[row][col].setVisual(one);\r\n }\r\n if(bombCount==2){\r\n map[row][col].setVisual(two);\r\n }\r\n if(bombCount==3){\r\n map[row][col].setVisual(three);\r\n }\r\n if(bombCount==4){\r\n map[row][col].setVisual(four);\r\n }\r\n if(bombCount==5){\r\n map[row][col].setVisual(five);\r\n }\r\n if(bombCount==6){\r\n map[row][col].setVisual(six);\r\n }\r\n if(bombCount==7){\r\n map[row][col].setVisual(seven);\r\n }\r\n if(bombCount==8){\r\n map[row][col].setVisual(eight);\r\n }\r\n map[row][col].setRevealed(true);\r\n }\r\n\r\n\r\n //return bombCount;\r\n\r\n\r\n }", "public void moveOneStep(double dt) {\r\n double movementX = this.p.getX() + dt * this.vel.getDx();\r\n double movementY = this.p.getY() + dt * this.vel.getDy();\r\n Line trajectory = new Line(this.p, new Point(movementX, movementY));\r\n CollisionInfo collInfo = gameE.getClosestCollision(trajectory);\r\n // if there is a collision point collInfo doesn't equal to null.\r\n if (collInfo != null) {\r\n double x = this.getX();\r\n double y = this.getY();\r\n Point collisionPoint = collInfo.collisionPoint();\r\n Collidable obj = collInfo.collisionObject();\r\n Rectangle r = obj.getCollisionRectangle();\r\n // Check if the ball hit on one of the corners block.\r\n if (collisionPoint.getY() == collisionPoint.getX()) {\r\n // If the ball hit on the top corners.\r\n if (collisionPoint.getY() == r.getUpperLeft().getY()\r\n || collisionPoint.getX() == r.getUpperLeft().getX()) {\r\n x = collisionPoint.getX() - this.getSize() - 0.001;\r\n y = collisionPoint.getY() - this.getSize() - 0.001;\r\n // else the ball hit on the bottom corners.\r\n } else {\r\n x = collisionPoint.getX() + this.getSize() + 0.001;\r\n y = collisionPoint.getY() + this.getSize() + 0.001;\r\n }\r\n // Set a new velocity.\r\n this.setVelocity(obj.hit(this, collInfo.collisionPoint(), this.getVelocity()));\r\n this.p = new Point(x, y);\r\n return;\r\n }\r\n\r\n // If the ball hit on the left border block.\r\n if (collisionPoint.getX() == r.getUpperLeft().getX()) {\r\n x = collisionPoint.getX() - this.getSize() - 0.001;\r\n y = collisionPoint.getY();\r\n // If the ball hit on the right border block.\r\n } else if (collisionPoint.getX() == r.getWidth() + r.getUpperLeft().getX()) {\r\n x = collisionPoint.getX() + this.getSize() + 0.001;\r\n y = collisionPoint.getY();\r\n\r\n }\r\n // If the ball hit on the top border block.\r\n if (collisionPoint.getY() == r.getUpperLeft().getY()) {\r\n y = collisionPoint.getY() - this.getSize() - 0.001;\r\n x = collisionPoint.getX();\r\n // If the ball hit on the bottom border block.\r\n } else if (collisionPoint.getY() == r.getHeight() + r.getUpperLeft().getY()) {\r\n y = collisionPoint.getY() + this.getSize() + 0.001;\r\n x = collisionPoint.getX();\r\n }\r\n // set a new velocity.\r\n this.setVelocity(obj.hit(this, collInfo.collisionPoint(), this.getVelocity()));\r\n this.p = new Point(x, y);\r\n // else move the ball one step.\r\n } else {\r\n this.p = this.getVelocity().applyToPoint(this.p, dt);\r\n }\r\n }", "public boolean canBombThisEnemyAndRunSafe(Player p1, Player p2){\n Maze maze = state.getMaze();\n Cell[][] tabcells = maze.getCells();\n //Cells in range of p1 corresponds to the cells p1 can put a bomb on associated with the number of moves needed\n //to go to the cell where p1 would be when putting the bomb\n ArrayList<Journey> journeysinrangeofp1 = new ArrayList<Journey>();\n //Available moves to flee represents how many moves p1 would still have to run away from its bomb\n int availablemovestoflee;\n //Available cells to flee represents the cells p1 can run to after putting the bomb\n List<Cell> availablecellstoflee = new ArrayList<>();\n List<Cell> bombingavailableslots = new ArrayList<Cell>();\n //Bombing available slots corresponds to the cells where a bomb could be placed to kill p2\n for(int i = 0; i<=p1.getBombRange();i++){\n if((p2.getX()-i)>=0){\n bombingavailableslots.add(tabcells[p2.getX()-i][p2.getY()]);\n }\n if((p2.getX()+i)<maze.getWidth()){\n bombingavailableslots.add(tabcells[p2.getX()+i][p2.getY()]);\n }\n if((p2.getY()-i)>=0){\n bombingavailableslots.add(tabcells[p2.getX()][p2.getY()-i]);\n }\n if((p2.getY()+i)<maze.getHeight()){\n bombingavailableslots.add(tabcells[p2.getX()][p2.getY()+i]);\n }\n }\n journeysinrangeofp1 = getReacheableCellsInRangeWithPath(tabcells[p1.getX()][p1.getY()],p1.getNumberMoveRemaining()+1);\n for(Journey j:journeysinrangeofp1){\n if(bombingavailableslots.contains(j.getDestinationcell())){\n availablemovestoflee = p1.getNumberMoveRemaining() - j.getNbmoves();\n availablecellstoflee = getReacheableCellsInRange(j.getDestinationcell(), availablemovestoflee);\n for(Cell c: availablecellstoflee){\n if(wouldBeSafeFromBomb(p1,j.getDestinationcell(),c)){\n if(isSafeFromAllPlayersExcept(c,p1,p2)){\n return true;\n }\n }\n }\n }\n }\n return false;\n }", "public void move(long deltaTime) {\n\n Point currentTile = getOccupyingTile(position);\n\n /*\n if (!Simulator.getInstance().getTileMap().isInsideMap(currentTile))\n return;\n\n if (Simulator.getInstance().getTileMap().isAWall(currentTile) || Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(currentTile))\n return;\n*/\n\n if (Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(currentTile))\n return;\n\n setTargetVector(Simulator.getInstance().getDestination().getDistanceMap().getTiles()[currentTile.y][currentTile.x].getVector());\n\n\n if (!Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(currentTile) && Simulator.getInstance().getDestination().getDistanceMap().getTiles()[currentTile.y][currentTile.x].getVector().equals(new Point2D.Double(0.0, 0.0))) {\n setTargetVector(Simulator.getInstance().getDestination().getDistanceMap().getTiles()[currentTile.y][currentTile.x].getVector());\n double angle = 0;\n while ((angle >= 60 && angle <= 120) || (angle >= 150 && angle <= 210) || (angle >= 240 && angle <= 300) || (angle >= 330) || (angle <= 30)) {\n\n angle = Math.random() * 360;\n }\n setVector(new Point2D.Double(Math.cos(Math.toRadians(angle)) / 1.5, Math.sin(Math.toRadians(angle)) / 1.5));\n } else {\n setTargetVector(Simulator.getInstance().getDestination().getDistanceMap().getTiles()[currentTile.y][currentTile.x].getVector());\n }\n\n\n Point2D vectorDiff = new Point2D.Double(vector.getX() - targetVector.getX(), vector.getY() - targetVector.getY());\n\n if (vectorDiff.getX() < 0)\n vector.setLocation(vector.getX() + 0.001 * velocity * deltaTime, vector.getY());\n else if (vectorDiff.getX() > 0)\n vector.setLocation(vector.getX() - 0.001 * velocity * deltaTime, vector.getY());\n\n if (vectorDiff.getY() < 0)\n vector.setLocation(vector.getX(), vector.getY() + 0.001 * velocity * deltaTime);\n else if (vectorDiff.getY() > 0)\n vector.setLocation(vector.getX(), vector.getY() - 0.001 * velocity * deltaTime);\n\n\n Point2D newPosition = new Point2D.Double(\n position.getX() + (velocity * deltaTime) * vector.getX(), position.getY() + (velocity * deltaTime) * vector.getY());\n\n\n Point targetTile = getOccupyingTile(newPosition);\n\n\n Point direction = getDirection(currentTile, targetTile);\n\n\n if (!Simulator.getInstance().getTileMap().isInsideMap(targetTile) || Simulator.getInstance().getTileMap().isAWall(targetTile)\n || Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(targetTile)) {// || Simulator.getInstance().getDestination().getDistanceMap().getTiles()[targetTile.y][targetTile.x].getVector() == new Point2D.Double(0, 0)) {\n\n if (Simulator.getInstance().isUsingBounceCollision()) {\n if (direction.x > 0 || direction.x < 0)\n vector.setLocation(vector.getX() * -0.5, vector.getY());\n if (direction.y > 0 || direction.y < 0)\n vector.setLocation(vector.getX(), vector.getY() * -0.5);\n\n newPosition = new Point2D.Double(\n position.getX() + (velocity * deltaTime) * vector.getX(), position.getY() + (velocity * deltaTime) * vector.getY());\n\n\n targetTile = getOccupyingTile(newPosition);\n\n //Secondary check to make sure the bounce doesn't make it go out of bounds\n if (!Simulator.getInstance().getTileMap().isInsideMap(targetTile) || Simulator.getInstance().getTileMap().isAWall(targetTile)\n || Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(targetTile)) { //|| Simulator.getInstance().getDestination().getDistanceMap().getTiles()[targetTile.y][targetTile.x].getVector() == new Point2D.Double(0, 0)) {\n vector.setLocation(0, 0);\n } else {\n setPosition(newPosition);\n }\n\n\n } else {\n vector.setLocation(0, 0);\n }\n\n } else {\n setPosition(newPosition);\n }\n\n }", "private void solve(int x, int y, boolean draw) {\n \t\t// these are the walls of the maze, maze solver should not go beyond\n \t\t// walls\n \t\t// if (x == 0 || y == 0 || x == N + 1 || y == N + 1) {\n \t\t// return;\n \t\t// }\n \n \t\t// if we have already visited this position\n \t\t// or if deep levels of the recursion have found the target\n \t\tif (foundTarget || visited[x][y])\n \t\t\treturn;\n \n \t\t// this position is new, mark it as visited\n \t\tvisited[x][y] = true;\n \n \t\tif (draw) {\n \t\t\t// Draw a blue dot to show we have been here\n \t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n \t\t\tStdDraw.filledCircle(x + 0.5, y + 0.5, 0.25);\n \t\t\tStdDraw.show(SOLVER_SPEED);\n \t\t}\n \n \t\t// if we have reached the maze solve target\n \t\tif (x == target.x && y == target.y) {\n \t\t\tfoundTarget = true;\n \t\t}\n \n \t\t// Try go another place\n \t\tif (!north[x][y])\n \t\t\tsolve(x, y + 1, draw);\n \t\tif (!east[x][y])\n \t\t\tsolve(x + 1, y, draw);\n \t\tif (!south[x][y])\n \t\t\tsolve(x, y - 1, draw);\n \t\tif (!west[x][y])\n \t\t\tsolve(x - 1, y, draw);\n \n \t\tif (foundTarget)\n \t\t\treturn;\n \n \t\tif (draw) {\n \t\t\t// Draw a grey dot to show we have backtracked\n \t\t\tStdDraw.setPenColor(StdDraw.GRAY);\n \t\t\tStdDraw.filledCircle(x + 0.5, y + 0.5, 0.25);\n \t\t\tStdDraw.show(SOLVER_SPEED);\n \t\t}\n \t}", "private void handleCollisions() {\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tcheckInvaderDeath(a);\n\t\t\t\tcheckPlayerDeath(a);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (Shot s : enemyShotList) {\n\t\t\t\n\t\t\tif (s.detectDownwardCollision(player.getX(), player.getY())) {\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcollectPowerUp(armorPiercing);\n\t\tcollectPowerUp(explosive);\n\t}", "@Test\n public void testSolveGivenMazeTwice() {\n try {\n //link row 1\n largeMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n largeMaze.linkPillars(Maze.position(2, 0), Maze.position(3, 0));\n largeMaze.linkPillars(Maze.position(3, 0), Maze.position(4, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(1, 2));\n largeMaze.linkPillars(Maze.position(3, 1), Maze.position(4, 1));\n\n //link row 3\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(1, 3));\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //link row 4\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(0, 3));\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(2, 3));\n largeMaze.linkPillars(Maze.position(3, 3), Maze.position(4, 3));\n largeMaze.linkPillars(Maze.position(0, 3), Maze.position(0, 4));\n\n //link row 5\n largeMaze.linkPillars(Maze.position(0, 4), Maze.position(1, 4));\n largeMaze.linkPillars(Maze.position(1, 4), Maze.position(2, 4));\n largeMaze.linkPillars(Maze.position(2, 4), Maze.position(3, 4));\n largeMaze.linkPillars(Maze.position(3, 4), Maze.position(4, 4));\n\n //set beginning and end\n largeMaze.setBegin(Maze.position(0, 0));\n largeMaze.setEnd(Maze.position(4, 4));\n shortestPath = MazeSolver.pStar(largeMaze, 25);\n shortestPath2 = MazeSolver.pStar(largeMaze, 25);\n\n assertEquals(9, shortestPath.size());\n\n assertEquals(shortestPath.size(), shortestPath2.size());\n\n assertEquals(\"<0, 0>\", shortestPath.get(0).getCoordinateString());\n assertEquals(\"<1, 0>\", shortestPath.get(1).getCoordinateString());\n assertEquals(\"<1, 1>\", shortestPath.get(2).getCoordinateString());\n assertEquals(\"<1, 2>\", shortestPath.get(3).getCoordinateString());\n assertEquals(\"<1, 3>\", shortestPath.get(4).getCoordinateString());\n assertEquals(\"<1, 4>\", shortestPath.get(5).getCoordinateString());\n assertEquals(\"<2, 4>\", shortestPath.get(6).getCoordinateString());\n assertEquals(\"<3, 4>\", shortestPath.get(7).getCoordinateString());\n assertEquals(\"<4, 4>\", shortestPath.get(8).getCoordinateString());\n\n assertEquals(\"<0, 0>\", shortestPath2.get(0).getCoordinateString());\n assertEquals(\"<0, 1>\", shortestPath2.get(1).getCoordinateString());\n assertEquals(\"<0, 2>\", shortestPath2.get(2).getCoordinateString());\n assertEquals(\"<0, 3>\", shortestPath2.get(3).getCoordinateString());\n assertEquals(\"<0, 4>\", shortestPath2.get(4).getCoordinateString());\n assertEquals(\"<1, 4>\", shortestPath2.get(5).getCoordinateString());\n assertEquals(\"<2, 4>\", shortestPath2.get(6).getCoordinateString());\n assertEquals(\"<3, 4>\", shortestPath2.get(7).getCoordinateString());\n assertEquals(\"<4, 4>\", shortestPath2.get(8).getCoordinateString());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "public void checkIfAtEdge() {\n\t\tif(x<=0){\n\t\t\tx=1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\tif(y<=0){\n\t\t\ty=1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\tif(x>=GameSystem.GAME_WIDTH-collisionWidth){\n\t\t\tx=GameSystem.GAME_WIDTH-collisionHeight-1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\tif(y>=GameSystem.GAME_HEIGHT-collisionWidth){\n\t\t\ty=GameSystem.GAME_HEIGHT-collisionHeight-1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\telse{\n\t\t\tatEdge=false;\n\t\t}\n\t\t\n\t}", "public void challengeMove(){\n int maxOutcome = -1;\n int returnIndex = -1;\n Hole lastHole;\n Hole selectedHole;\n ArrayList<Hole> availableHoles = availableMoves(nextToPlay);\n for(int i = 0; i < availableHoles.size(); i++){\n selectedHole = availableHoles.get(i);\n lastHole = holes[(selectedHole.getHoleIndex() + selectedHole.getNumberOfKoorgools() - 1) % 18];\n if(lastHole.getOwner() != nextToPlay){\n int numOfKorgools = lastHole.getNumberOfKoorgools() +1;\n if(numOfKorgools == 3 && !nextToPlay.hasTuz()){\n int otherTuzIndex = getPlayerTuz(Side.WHITE);\n if(otherTuzIndex == -1 || ((otherTuzIndex + 9) != lastHole.getHoleIndex())) {\n redistribute(selectedHole.getHoleIndex());\n return;\n }\n redistribute(selectedHole.getHoleIndex());\n return;\n }\n if(numOfKorgools % 2 == 0 && numOfKorgools > maxOutcome){\n maxOutcome = numOfKorgools;\n returnIndex = selectedHole.getHoleIndex();\n }\n }\n }\n if(returnIndex <= -1){\n randomMove();\n return;\n }\n redistribute(returnIndex);\n }", "private void checkRegTileCollisions(float deltaTime) {\n\t\tint len = regTiles.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tRegTile tile = regTiles.get(i);\n\t\t\t\n\t\t\t//overlap between player and tile\n\t\t\t\n\t\t\t//experiment with these values to get close to perfect collisions *************************\n\t\t\ttry {\n\t\t\t\tif(OverlapTester.overlapRectangles(player.bounds, tile.bounds)) {\n\t\t\t\t\t\n\t\t\t\t\t//check y - collisions\n\t\t\t\t\tif(player.position.y > tile.position.y + (tile.bounds.height / 2) && player.position.x - (player.bounds.width / 2) + correctionFactor < tile.position.x + (tile.bounds.width / 2) && player.position.x + (player.bounds.width / 2) - correctionFactor > tile.position.x - (tile.bounds.width / 2)) {\n\t\t\t\t\t\tplayer.velocity.y = 0;\n\t\t\t\t\t\tplayer.position.y = tile.position.y + 1;\n\t\t\t\t\t\tif(player.velocity.x > 3) {\n\t\t\t\t\t\t\tplayer.velocity.x -= 0.2f; //prev. optimal was .3\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(player.position.y < tile.position.y - (tile.bounds.height / 2) && player.position.x - (player.bounds.width / 2) + correctionFactor < tile.position.x + (tile.bounds.width / 2) && player.position.x + (player.bounds.width / 2) - correctionFactor > tile.position.x - (tile.bounds.width / 2)) {\n\t\t\t\t\t\tplayer.velocity.y = 0;\n\t\t\t\t\t\tplayer.position.y = tile.position.y - 1;\n\t\t\t\t\t\tif(player.velocity.x > 3) {\n\t\t\t\t\t\t\tplayer.velocity.x -= 0.2f;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//check x - collision\n\t\t\t\t\tif(player.position.x > tile.position.x + (tile.bounds.width / 2) + correctionFactor && player.position.y - (player.bounds.height / 2) + correctionFactor < tile.position.y + (tile.bounds.height / 2) && player.position.y + (player.bounds.height / 2) - correctionFactor > tile.position.y - (tile.bounds.height / 2)) {\n\t\t\t\t\t\tplayer.velocity.x = 0;\n\t\t\t\t\t\txColliding = true;\n\t\t\t\t\t\tplayer.position.x = tile.position.x + 1; //animate possibly\n\t\t\t\t\t\tif(player.velocity.y > 0) {\n\t\t\t\t\t\t\t//player.velocity.y -= 0.2f;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(player.position.x < tile.position.x - (tile.bounds.width / 2) - correctionFactor && player.position.y - (player.bounds.height / 2) + correctionFactor < tile.position.y + (tile.bounds.height / 2) && player.position.y + (player.bounds.height / 2) - correctionFactor > tile.position.y - (tile.bounds.height / 2)) {\n\t\t\t\t\t\tplayer.velocity.x = 0;\n\t\t\t\t\t\txColliding = true;\n\t\t\t\t\t\tplayer.position.x = tile.position.x - 1; //animate possibly\n\t\t\t\t\t\tif(player.velocity.y > 0) {\n\t\t\t\t\t\t\t//player.velocity.y -= 0.2f;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t} catch (Exception e) {}\n\t\t}\n\t\trecheckTileCollisions(); //fix frame-skipping \n\t}", "private void checkForCollisionWithSelf() {\r\n if (isInSnake(snake[0].row,snake[0].column,true)) {\r\n gameOver();\r\n }\r\n }", "private void recheckTileCollisions() {\n\t\tint len = regTiles.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tRegTile tile = regTiles.get(i);\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(OverlapTester.overlapRectangles(player.bounds, tile.bounds)) {\n\t\t\t\t\t//check-x cols and fix\n\t\t\t\t\tif(player.position.x > tile.position.x - tile.bounds.width/2 && player.position.x < tile.position.x + tile.bounds.width/2 && player.position.y < tile.position.y + tile.bounds.height/2 && player.position.y > tile.position.y - tile.bounds.height/2) {\n\t\t\t\t\t\tif(player.position.x < tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x - 1;\n\t\t\t\t\t\t} else if(player.position.x > tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}", "void animalMove(int x,int y, Living[][] map,int gridLength, int gridWidth){\r\n \r\n boolean age=map[x][y].getAge();\r\n boolean gender=map[x][y].getGender();\r\n boolean checkRight=false;\r\n boolean checkLeft=false;\r\n boolean checkUp=false;\r\n boolean checkDown=false;\r\n boolean up=false;\r\n boolean down=false;\r\n boolean right=false;\r\n boolean left=false;\r\n boolean baby=false;\r\n boolean turn=map[x][y].getMovement(); //Check to see if it moved before in the array\r\n \r\n double random=Math.random();\r\n \r\n \r\n \r\n \r\n //Checks to see if it is possible to even see to the left first\r\n if(y-1>=0){\r\n left=true;\r\n \r\n if(turn && (map[x][y-1] instanceof Plant) ){ //Check to see if there is plants and goes to plants\r\n map[x][y].gainHealth((map[x][y-1].getHealth()));\r\n map[x][y].setMovement(false); \r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n turn=false; \r\n }\r\n if(turn && (map[x][y-1] instanceof Sheep) && (age==map[x][y-1].getAge()) ){ \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x][y-1].getGender()) && (map[x][y].getHealth()>19) && (map[x][y-1].getHealth()>19) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){ \r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null)&& !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n \r\n if( (x-1>=0) && (map[x-1][y]==null)&& !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if((y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){\r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x][y-1].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x][y-1].setMovement(false);\r\n turn=false;\r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n //If it can move to the left need to check if it can foresee more incase there wasn't any place for it to go\r\n if(y-2>=0){\r\n checkLeft=true;\r\n }\r\n }\r\n \r\n //Checks to see if it is possible to even see to the right first \r\n if(y+1<gridWidth){\r\n right=true;\r\n \r\n //Check to move on towards plants\r\n if(turn && (map[x][y+1] instanceof Plant)){\r\n map[x][y].gainHealth(map[x][y+1].getHealth()); \r\n map[x][y].setMovement(false); \r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null;\r\n turn=false; \r\n }\r\n \r\n if(turn && (map[x][y+1] instanceof Sheep && age==map[x][y+1].getAge()) ){ \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x][y+1].getGender()) && (map[x][y].getHealth()>19) && (map[x][y+1].getHealth()>19) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n \r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n \r\n if( (x-1>=0) && (map[x-1][y]==null) && !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheeps will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x][y+1].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x][y+1].setMovement(false);\r\n turn=false; \r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n \r\n //If it can move to the right need to check if it can foresee more incase there wasn't any place for it to go\r\n if(y+2<gridWidth){ \r\n checkRight=true;\r\n }\r\n } \r\n \r\n //Check to see if it can go up\r\n if(x-1>=0){\r\n up=true;\r\n \r\n //Check for plant to go on to upwards \r\n if(turn && (map[x-1][y] instanceof Plant) ){\r\n map[x][y].gainHealth(map[x-1][y].getHealth()); \r\n map[x][y].setMovement(false); \r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n turn=false;\r\n }\r\n \r\n if(turn && (map[x-1][y] instanceof Sheep) && (age==map[x-1][y].getAge()) ){ \r\n //If the ages match age must be false to be adults and both be opposite genders and have more then 19 health\r\n if(turn && !age && !(gender==map[x-1][y].getGender()) &&map[x][y].getHealth()>19 &&map[x-1][y].getHealth()>19){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n if( (y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n \r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null) && !(baby) ){\r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n \r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x-1][y].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x-1][y].setMovement(false);\r\n turn=false; \r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n \r\n //If it can move to upwards need to check if it can foresee more incase there wasn't any place for it to go\r\n if(x-2>=0){\r\n checkUp=true; \r\n }\r\n } \r\n //Check to see where to go downwards\r\n if(x+1<gridLength){\r\n down=true; \r\n \r\n //Check to see if any plants are downwards\r\n if(turn && (map[x+1][y] instanceof Plant) ){\r\n map[x][y].gainHealth( (map[x+1][y].getHealth()));\r\n map[x][y].setMovement(false);\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n turn=false;\r\n } \r\n \r\n if(turn && (map[x+1][y] instanceof Sheep) && (age==map[x+1][y].getAge()) ){ \r\n \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x+1][y].getGender()) && (map[x][y].getHealth()>=20) && (map[x+1][y].getHealth()>=20) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n if( (y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep \r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if( (x-1>=0) && (map[x+1][y]==null) && !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x+1][y].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x+1][y].setMovement(false);\r\n turn=false;\r\n baby=false;\r\n }\r\n }\r\n } \r\n } \r\n if(x+2<gridLength){\r\n checkDown=true;\r\n }\r\n } \r\n \r\n //Movement towards plant only if no immediate sheep/plants are there to move to\r\n if(turn && checkRight && (map[x][y+2] instanceof Plant) ){\r\n if(map[x][y+1]==null){\r\n \r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null;\r\n map[x][y+1].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n if(turn && checkDown && (map[x+2][y] instanceof Plant) ){\r\n if(map[x+1][y]==null){\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n map[x+1][y].setMovement(false);\r\n turn=false;\r\n }\r\n } \r\n if(turn && checkUp && (map[x-2][y] instanceof Plant) ){\r\n if(map[x-1][y]==null){\r\n \r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n map[x-1][y].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n \r\n if(turn && checkLeft && (map[x][y-2] instanceof Plant) ){\r\n if(map[x][y-1]==null){\r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n map[x][y-1].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n \r\n //Random Movement if there are no plants to move towards \r\n if(turn && right && (random<=0.2) ){\r\n if(map[x][y+1]==null){\r\n map[x][y].setMovement(false);\r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null; \r\n }\r\n }\r\n if(turn && left && (random>0.2) && (random<=0.4) ){\r\n if(map[x][y-1]==null){\r\n map[x][y].setMovement(false);\r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n if(turn && up && (random>0.4) && (random<=0.6) ){\r\n if(map[x-1][y]==null){\r\n map[x][y].setMovement(false);\r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n if(turn && down && (random>0.6) && (random<=0.8) ){\r\n if(map[x+1][y]==null){\r\n map[x][y].setMovement(false);\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n }", "public boolean tileReachable(float tx, float ty, AgentModel selectedAgent)\r\n/* 243: */ {\r\n/* 244:271 */ float x = selectedAgent.getX() - 0.5F;\r\n/* 245:272 */ float y = selectedAgent.getY() - 0.5F;\r\n/* 246:274 */ switch ((int)selectedAgent.getAngle())\r\n/* 247: */ {\r\n/* 248: */ case 0: \r\n/* 249:277 */ if ((y - 1.0F == ty) && (tx >= x - 1.0F) && (tx <= x + 1.0F)) {\r\n/* 250:279 */ return true;\r\n/* 251: */ }\r\n/* 252: */ break;\r\n/* 253: */ case 90: \r\n/* 254:283 */ if ((x + 1.0F == tx) && (ty >= y - 1.0F) && (ty <= y + 1.0F)) {\r\n/* 255:285 */ return true;\r\n/* 256: */ }\r\n/* 257: */ break;\r\n/* 258: */ case 180: \r\n/* 259:289 */ if ((y + 1.0F == ty) && (tx >= x - 1.0F) && (tx <= x + 1.0F)) {\r\n/* 260:291 */ return true;\r\n/* 261: */ }\r\n/* 262: */ break;\r\n/* 263: */ case 270: \r\n/* 264:295 */ if ((x - 1.0F == tx) && (ty >= y - 1.0F) && (ty <= y + 1.0F)) {\r\n/* 265:298 */ return true;\r\n/* 266: */ }\r\n/* 267: */ break;\r\n/* 268: */ }\r\n/* 269:303 */ return false;\r\n/* 270: */ }", "public static boolean collision(String direction, int speed){\n\t\tMain.p.updateHitboxs();\n\t\t/*LeftBottomHitbox[0] = Main.p.xLeft;\n\t\tLeftBottomHitbox[1] = Main.p.yLeft;\n\t\tRightBottomHitbox[0] = Main.p.xRight;\n\t\tRightBottomHitbox[1] = Main.p.yRight;\n\t\tLeftTopHitbox[0] = Main.p.xLeft;\n\t\tLeftTopHitbox[1] = Main.p.yLeft-(3 * Main.SCALE);\n\t\tRightTopHitbox[0] = Main.p.xRight;\n\t\tRightTopHitbox[1] = Main.p.yRight-(3 * Main.SCALE);\n\t\tif(!direction.equals(\"p\")){\n\t\t\tresult1 = checkCollision(speed, direction, LeftBottomHitbox);\n\t\t\tresult2 = checkCollision(speed, direction, RightBottomHitbox);\n\t\t\tresult3 = checkCollision(speed, direction, LeftTopHitbox);\n\t\t\tresult4 = checkCollision(speed, direction, RightTopHitbox);\n\t\t\tif(animationSwitchCount == 4)\n\t\t\t\tMain.p.pg.animationSet = 1;\n\t\t\tanimationSwitchCount = 0;\n\t\t\treturn result1 || result2 || result3 || result4;\n\t\t}\n\t\tresult1 = checkPlayerCollision(LeftBottomHitbox[0], LeftBottomHitbox[1]);\n\t\tresult2 = checkPlayerCollision(RightBottomHitbox[0], RightBottomHitbox[1]);\n\t\tresult3 = checkPlayerCollision(LeftTopHitbox[0], LeftTopHitbox[1]);\n\t\tresult4 = checkPlayerCollision(RightTopHitbox[0], RightTopHitbox[1]);\n\t\treturn result1 || result2 || result3 || result4;\n\t\t\t*/\n\t\tArrayList<int[]> tiles = new ArrayList<int[]>();\n\t\tint tempX, tempY;\n\t\tboolean copy = false, xOverextended = false, yOverextended = false;\n\t\t\n\t\tif(direction.equals(\"x\")){\n\t\t\tx = Main.p.getXStart() + speed;\n\t\t\ty = Main.p.getYStart();\n\t\t}\n\t\telse if (direction.equals(\"y\")){\n\t\t\tx = Main.p.getXStart();\n\t\t\ty = Main.p.getYStart() + speed;\n\t\t}\n\t\tif(!direction.equals(\"p\")){\n\t\t\tfor(int yCount = 0; yCount <= Main.p.getCOLLISIONSIZEY(); yCount++){\n\t\t\t\ttempY = y + (yCount * Main.T);\n\t\t\t\tif(tempY > y + Main.p.getCOLLISIONDISTANCEY()){\n\t\t\t\t\ttempY = y + Main.p.getCOLLISIONDISTANCEY();\n\t\t\t\t\tyOverextended = true;\n\t\t\t\t}\n\t\t\t\tfor(int xCount = 0; xCount <= Main.p.getCOLLISIONSIZEX(); xCount++){\n\t\t\t\t\ttempX = x + (xCount * Main.T);\n\t\t\t\t\tif(tempX > x + Main.p.getCOLLISIONDISTANCEX()){\n\t\t\t\t\t\txOverextended = true;\n\t\t\t\t\t\ttempX = x + Main.p.getCOLLISIONDISTANCEX();\n\t\t\t\t\t}\n\t\t\t\t\ttempTile = Main.p.getCurrentTile(tempX, tempY);\n\t\t\t\t\tfor(int i = 0; i < tiles.size(); i++){\n\t\t\t\t\t\tif(tempTile[0] == tiles.get(i)[0] && tempTile[1] == tiles.get(i)[1]){\n\t\t\t\t\t\t\tcopy = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!copy){\n\t\t\t\t\t\tif(collisionOccured())\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\ttiles.add(tempTile);\n\t\t\t\t\t}\n\t\t\t\t\tcopy = false;\n\t\t\t\t\tif(xOverextended){\n\t\t\t\t\t\txOverextended = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(yOverextended)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//If no tile collision is found sprite collisions are checked\n\t\tfor(int i = 0; i < Main.currentLocation.ls.sprites.size(); i++){\n\t\t\tif(Main.currentLocation.ls.sprites.get(i) != null && Main.currentLocation.ls.sprites.get(i).playerCollision(x, y))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void set() {\n if(keyLeft&&keyRight||!keyLeft&&!keyRight){\n xspeed *=0.8;\n }\n else if(keyLeft&&!keyRight) {\n xspeed--;\n }\n else if(keyRight&&!keyLeft){\n xspeed++;\n }\n if (xspeed>0 && xspeed <0.75) xspeed=0;\n if (xspeed<0 && xspeed >-0.75) xspeed=0;\n\n if (xspeed>7) xspeed=7;\n if (xspeed<-7) xspeed=-7;\n\n if(keyUp) {\n hitBox.y++;\n for(Wall wall: panel.walls) {\n if(wall.hitBox.intersects(hitBox)){\n yspeed=-8;\n }\n }\n hitBox.y--;\n }\n\n if (yspeed < 8) yspeed += 0.3;\n\n //Horizontal collisons\n hitBox.x += xspeed;\n for(Wall wall: panel.walls) {\n if(hitBox.intersects(wall.hitBox)){ //if on floor\n hitBox.x -= xspeed;//Moves hitbox back to last place\n while(!wall.hitBox.intersects(hitBox)){\n hitBox.x += Math.signum(xspeed);\n }\n hitBox.x -= Math.signum(xspeed); //Moves hitbox to space next to the wall\n panel.cameraX += x - hitBox.x;\n xspeed = 0;\n hitBox.x = x;\n }\n }\n\n //Vertical collisions\n hitBox.y += yspeed;\n for(Wall wall: panel.walls) {\n if(hitBox.intersects(wall.hitBox)){\n hitBox.y -= yspeed;\n while(!wall.hitBox.intersects(hitBox)) hitBox.y += Math.signum(yspeed);\n hitBox.y -= Math.signum(yspeed);\n yspeed = 0;\n y = hitBox.y;\n }\n }\n\n panel.cameraX -= xspeed;\n y += yspeed;\n hitBox.x=x;\n hitBox.y=y;\n\n //Death\n if(y>MainFrame.FRAME_HEIGHT+100) panel.reset();\n }", "public void move(Cell[][] maze) {\n // check monster still alive or not\n if (!alive) {\n return;\n }\n //four directions: left, right, up, down\n int[][] dirs = {{0, -1}, {0, 1}, {-1, 0}, {1, 0}};\n // a list to store all valid directions to move\n List<int[]> validDir = new ArrayList<>();\n for (int[] dir : dirs) {\n int newRow = this.current_row + dir[0];\n int newCol = this.current_column + dir[1];\n // try finding a location where is not wall, not the previous location, not a place 3 sides surrounded by walls\n // and save it to valid directions list\n if (maze[newRow][newCol].getValue() != 1 && !(newRow == pre_row && newCol == pre_column)\n && validNextMove(newRow, newCol, maze)) {\n int[] newLocation = new int[]{newRow, newCol};\n validDir.add(newLocation);\n }\n }\n //If there is no valid move choice, the monster has to backtrack\n if (validDir.size() == 0) {\n this.current_row = this.pre_row;\n this.current_column = this.pre_column;\n this.pre_row = this.current_row;\n this.pre_column = this.current_column;\n } else {\n // randomly select a valid direction to move\n Random random = new Random();\n int ranNum = random.nextInt(validDir.size());\n int[] newLoc = validDir.get(ranNum);\n int newRow = newLoc[0];\n int newCol = newLoc[1];\n this.pre_row = this.current_row;\n this.pre_column = this.current_column;\n this.current_row = newRow;\n this.current_column = newCol;\n }\n }", "private void collisionsCheck() {\n\t\tif(this.fence.collisionTest(\n\t\t\t\tthis.spider.getMovementVector())) \n\t\t{\n\t\t\t// we actually hit something!\n\t\t\t// call collision handlers\n\t\t\tthis.spider.collisionHandler();\n\t\t\tthis.fence.collisionHandler();\n\t\t\t// vibrate!\n\t\t\tvibrator.vibrate(Customization.VIBRATION_PERIOD);\n\t\t\t// lose one life\n\t\t\tthis.data.lostLife();\n\t\t}\n\t}", "public void detectCollisions(){\n\t\tfor(int i = 0; i < pScene.getNumOf(); i++){\n\t\t\tEntity a = pScene.getObject(i);\n\t\t\tif (!a.isAlive())\n\t\t\t\tcontinue;\n\t\t\tfor(int j = i + 1; j < pScene.getNumOf(); j++){\n\t\t\t\tEntity b = pScene.getObject(j);\n\t\t\t\tif(a.intersects(b)&&(!(a.getStatic()&&b.getStatic()))){\n\t\t\t\t\tsManifolds.add(new Manifold(a,b)); // For regular objects\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void checkCollisions() {\n int x1 = 0;\n int x2 = 0;\n for(CollisionBox e : cols) {\n for(CollisionBox f : cols) {\n if(\n x2 > x1 && // Skip checking collisions twice\n// (\n// e != f || // The entities are not the same entity\n// ( // One of the entities's parent object is not the bullet of the other's (aka ignore player bullets colliding with player)\n// // And also check they're not both from the same entity (two bullets colliding both going in the same direction from the same entity)\n// f.getParent() != null && // The first entity has a parent and\n// e.getParent() != null && // The second entity has a parent and\n// f.getParent().getParent() != null && // The first entity's parent has a parent and\n// e.getParent().getParent() != null && // The second entity's parent has a parent and\n// f.getParent().getParent() != e.getParent() && // The first entity's parent's parent is not the second entity's parent\n// e.getParent().getParent() != f.getParent() &&// The second entity's parent's parent is not the first entity's parent\n// f.getParent().getParent() != e.getParent().getParent() // The first and second entities' parents' parents are not the same\n// )\n// ) &&\n SAT.isColliding(e, f) // The entities are colliding\n ) { // Collide the Entities\n Entity ep = e.getParent();\n Entity fp = f.getParent();\n ep.collide(fp);\n fp.collide(ep);\n }\n x2++;\n }\n x1++;\n x2 = 0;\n }\n }", "protected int bestDirection(int _y, int _x)\n {\n int sX = -1, sY = -1;\n for (int i = 0; i < m; i++) {\n boolean breakable = false;\n for (int j = 0; j < n; j++) {\n if (map[i][j] == 'p' || map[i][j] == '5') {\n sX = i;\n sY = j;\n breakable = true;\n break;\n }\n }\n if(breakable) break;\n sX =0; sY = 0;\n }\n Pair s = new Pair(sX, sY);\n Queue<Pair> queue = new Queue<Pair>();\n int[][] distance = new int[m][n];\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++)\n distance[i][j] = -1;\n distance[sX][sY] = 0;\n queue.add(s);\n /*\n System.out.println(\"DEBUG TIME!!!!\");\n for(int i = 0; i < m; i++)\n {\n for(int j = 0; j < n; j++)\n System.out.print(map[i][j]);\n System.out.println();\n }\n System.out.println();\n */\n while (!queue.isEmpty())\n {\n Pair u = queue.remove();\n for (int i = 0; i < 4; i++)\n {\n int x = u.getX() + hX[i];\n int y = u.getY() + hY[i];\n if (!validate(x, y)) continue;\n if (distance[x][y] != -1) continue;\n if (!canGo.get(map[x][y])) continue;\n distance[x][y] = distance[u.getX()][u.getY()] + 1;\n queue.add(new Pair(x, y));\n }\n }\n\n //slove if this enemy in danger\n //System.out.println(_x + \" \" + _y);\n if (inDanger[_x][_y])\n {\n int direction = -1;\n boolean canAlive = false;\n int curDistance = dangerDistance[_x][_y];\n int distanceToBomber = m * n;\n if (curDistance == -1) return 0;\n for (int i = 0; i < 4; i++)\n {\n int x = _x + hX[i];\n int y = _y + hY[i];\n if (!validate(x, y)) continue;\n if (dangerDistance[x][y] == -1) continue;\n if (dangerDistance[x][y] < curDistance)\n {\n curDistance = dangerDistance[x][y];\n direction = i;\n distanceToBomber = distance[x][y];\n } else if (dangerDistance[x][y] == curDistance)\n {\n if (distanceToBomber == -1 || distanceToBomber > distance[x][y])\n {\n direction = i;\n distanceToBomber = distance[x][y];\n }\n }\n }\n if (direction == -1) direction = random.nextInt(4);\n allowSpeedUp = true;\n return direction;\n }\n // or not, it will try to catch bomber\n else\n {\n /*\n System.out.println(\"x = \" + _x + \"y = \" + _y);\n for(int i = 0; i < n; i++) System.out.printf(\"%2d \",i);\n System.out.println();\n for(int i = 0; i < m; i++)\n {\n for(int j = 0; j < n; j++)\n System.out.printf(\"%2d \",distance[i][j]);\n System.out.println();\n }\n System.out.println();\n System.out.println();\n */\n int direction = -1;\n int[] die = new int[4];\n for (int i = 0; i < 4; i++)\n die[i] = 0;\n int curDistance = distance[_x][_y];\n for (int i = 0; i < 4; i++)\n {\n int x = _x + hX[i];\n int y = _y + hY[i];\n if (!validate(x, y))\n {\n die[i] = 1;\n continue;\n }\n ;\n if (inDanger[x][y])\n {\n die[i] = 2;\n continue;\n }\n if (distance[x][y] == -1) continue;\n if (distance[x][y] < curDistance)\n {\n curDistance = distance[x][y];\n direction = i;\n }\n }\n if(curDistance < 4) allowSpeedUp = true;\n else allowSpeedUp = false; //TODO: TEST :))\n if (direction == -1)\n {\n for (int i = 0; i < 4; i++)\n if (die[i] == 0) return i;\n for (int i = 0; i < 4; i++)\n if (die[i] == 1) return i;\n return 0;\n } else return direction;\n }\n }", "public void checkCollision()\r\n\t{\r\n\t\t//for Bullets against Avatar and Enemy\r\n\t\tfor(int bulletIndex = 0; bulletIndex < bullets.size(); bulletIndex++)\r\n\t\t{\r\n\t\t\tBullet b = bullets.get(bulletIndex);\r\n\t\t\tif (b instanceof AvatarBullet)\r\n\t\t\t{\r\n\t\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\t\tboolean collided = false;\r\n\t\t\t\tfor (int enemyIndex = 0; enemyIndex < enemy.size(); enemyIndex++)\r\n\t\t\t\t{\r\n\t\t\t\t\tEnemy e = enemy.get(enemyIndex);\r\n\t\t\t\t\tif(((AvatarBullet) b).collidedWith(e))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\t\tenemy.remove(enemyIndex);\r\n\t\t\t\t\t\tenemyIndex --;\r\n\t\t\t\t\t\tcollided = true;\r\n\t\t\t\t\t\tint score = getScore()+1;\r\n\t\t\t\t\t\tsetScore(score);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (b instanceof EnemyBullet)\r\n\t\t\t{\r\n\t\t\t\tif (((EnemyBullet) b).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\tint health = Avatar.getLives()-1;\r\n\t\t\t\t\tavatar.setLives(health);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int platformIndex = 0; platformIndex < platforms.size(); platformIndex++)\r\n\t\t{\r\n\t\t\tPlatforms p = platforms.get(platformIndex);\r\n\t\t\tif (p instanceof Platforms)\r\n\t\t\t{\r\n\t\t\t\t//boolean collided = false;\r\n\t\t\t\t//Avatar a = avatar.get(enemyIndex);\r\n\t\t\t\tif(((Platforms) p).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(false);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void checkCollision()\n {\n if(isTouching(Rocket.class))\n {\n removeTouching(Rocket.class);\n Level1 level1 = (Level1)getWorld(); \n isSwordscore = false;\n notifyObservers(-20);\n }\n else if(isTouching(Fire.class))\n {\n removeTouching(Fire.class);\n Level1 level1 = (Level1)getWorld(); \n isSwordscore = false;\n notifyObservers(-20);\n }\n else if(isTouching(Sword.class))\n { \n removeTouching(Sword.class);\n Level1 level1 = (Level1)getWorld();\n isSwordscore = false;\n notifyObservers(-20);\n }\n \n else if(isTouching(Star.class))\n { \n removeTouching(Star.class);\n Level1 level1 = (Level1)getWorld();\n isSwordscore = false;\n count++;\n boost();\n }\n }", "private void checkBulletWallCollision() {\n\t\tArrayList<Missile> heroMissiles = hero.getMissiles();\n\t\tArrayList<Missile> hero2Missile = computer.getMissiles();\n\n\t\tdouble x1Wall, y1Wall, x2Wall, y2Wall, x1Bullet, y1Bullet, x2Bullet, y2Bullet;\n\t\tboolean left, right, top, bottom;\n\n\t\t// tank 1 bullets and wall collision\n\t\tfor (int i = 0; i < heroMissiles.size(); i++) {\n\t\t\tMissile m1 = heroMissiles.get(i);\n\t\t\tif (m1 == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tRectangle r2b = m1.getBounds();\n\t\t\tfor (int j = 0; j < wallArray.size(); j++) {\n\t\t\t\tWall w1 = wallArray.get(j);\n\t\t\t\tRectangle r2w = w1.getBounds();\n\n\t\t\t\tx1Wall = r2w.getMinX();\n\t\t\t\ty1Wall = r2w.getMinY();\n\t\t\t\tx2Wall = r2w.getMaxX();\n\t\t\t\ty2Wall = r2w.getMaxY();\n\n\t\t\t\tx1Bullet = r2b.getMinX();\n\t\t\t\ty1Bullet = r2b.getMinY();\n\t\t\t\tx2Bullet = r2b.getMaxX();\n\t\t\t\ty2Bullet = r2b.getMaxY();\n\n\t\t\t\tleft = (x2Bullet < x1Wall);\n\t\t\t\tright = (x2Wall < x1Bullet);\n\t\t\t\ttop = (y2Bullet < y1Wall);\n\t\t\t\tbottom = (y2Wall < y1Bullet);\n\n\t\t\t\tif ((left && !right && top && !bottom) || (!left && right && top && !bottom)\n\t\t\t\t\t\t|| (left && !right && !top && bottom) || (!left && right && !top && bottom)) {\n\t\t\t\t} else if (left && !right && !top && !bottom) {\n\t\t\t\t\tdouble leftDist = x1Wall - x2Bullet;\n\t\t\t\t\tif (leftDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && right && !top && !bottom) {\n\t\t\t\t\tdouble rightDist = x1Bullet - x2Wall;\n\t\t\t\t\tif (rightDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && top && !bottom) {\n\t\t\t\t\tdouble topDist = y1Wall - y2Bullet;\n\t\t\t\t\tif (topDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && !top && bottom) {\n\t\t\t\t\tdouble bottomDist = y1Bullet - y2Wall;\n\t\t\t\t\tif (bottomDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// tank 2 bullets and wall collision\n\t\tfor (int i = 0; i < hero2Missile.size(); i++) {\n\t\t\tMissile m1 = hero2Missile.get(i);\n\t\t\tif (m1 == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tRectangle r2b = m1.getBounds();\n\t\t\tfor (int j = 0; j < wallArray.size(); j++) {\n\t\t\t\tWall w1 = wallArray.get(j);\n\t\t\t\tRectangle r2w = w1.getBounds();\n\n\t\t\t\tx1Wall = r2w.getMinX();\n\t\t\t\ty1Wall = r2w.getMinY();\n\t\t\t\tx2Wall = r2w.getMaxX();\n\t\t\t\ty2Wall = r2w.getMaxY();\n\n\t\t\t\tx1Bullet = r2b.getMinX();\n\t\t\t\ty1Bullet = r2b.getMinY();\n\t\t\t\tx2Bullet = r2b.getMaxX();\n\t\t\t\ty2Bullet = r2b.getMaxY();\n\n\t\t\t\tleft = (x2Bullet < x1Wall);\n\t\t\t\tright = (x2Wall < x1Bullet);\n\t\t\t\ttop = (y2Bullet < y1Wall);\n\t\t\t\tbottom = (y2Wall < y1Bullet);\n\n\t\t\t\tif ((left && !right && top && !bottom) || (!left && right && top && !bottom)\n\t\t\t\t\t\t|| (left && !right && !top && bottom) || (!left && right && !top && bottom)) {\n\t\t\t\t} else if (left && !right && !top && !bottom) {\n\t\t\t\t\tdouble leftDist = x1Wall - x2Bullet;\n\t\t\t\t\tif (leftDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && right && !top && !bottom) {\n\t\t\t\t\tdouble rightDist = x1Bullet - x2Wall;\n\t\t\t\t\tif (rightDist < 2) {\n\t\t\t\t\t\tm1.setAngle(180 - (m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && top && !bottom) {\n\t\t\t\t\tdouble topDist = y1Wall - y2Bullet;\n\t\t\t\t\tif (topDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (!left && !right && !top && bottom) {\n\t\t\t\t\tdouble bottomDist = y1Bullet - y2Wall;\n\t\t\t\t\tif (bottomDist < 2) {\n\t\t\t\t\t\tm1.setAngle(-(m1.getAngle()));\n\t\t\t\t\t\tm1.setReflected(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void makeEnemyMove() { //all players after index 1 are enemies\n if (gameMode == EARTH_INVADERS) {//find leftmost and rightmost vehicle columns to see if we need to move down\n int leftMost = board[0].length;\n int rightMost = 0;\n int lowest = 0;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {//find left-most, right-most and lowest most vehicles (non aircraft/train) to determine how formation should move\n Player curr = players[i];\n if (curr == null)\n continue;\n String name = curr.getName();\n if (name.equals(\"NONE\") || curr.isFlying() || name.startsWith(\"TRAIN\") || (curr instanceof Monster))\n continue;\n if (curr.getCol() < leftMost)\n leftMost = curr.getCol();\n if (curr.getCol() > rightMost)\n rightMost = curr.getCol();\n if (curr.getRow() > lowest)\n lowest = curr.getRow();\n curr.setHeadDirection(DOWN);\n }\n for (int i = FIRST_VEHICLE; i < players.length; i++) {//***move aircraft and trains\n Player curr = players[i];\n if (curr == null)\n continue;\n String name = curr.getName();\n if (name.equals(\"NONE\") || curr.isFlying() || name.startsWith(\"TRAIN\") || (curr instanceof Monster)) {\n if (curr.isMoving())\n continue;\n ArrayList<Integer> dirs = new ArrayList(); //array of preferred directions - everything but the reverse of their body position\n int bodyDir = curr.getBodyDirection();\n curr.clearDirections();\n int r = curr.getRow();\n int c = curr.getCol();\n if (bodyDir == UP) {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n }\n } else if (bodyDir == RIGHT) {\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n }\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n } else if (bodyDir == DOWN) {\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c + 1))\n dirs.add(RIGHT);\n }\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n } else //if(curr.getBodyDirection()==LEFT)\n {\n if (isValidMove(curr, r - 1, c))\n dirs.add(UP);\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r + 1, c))\n dirs.add(DOWN);\n }\n if (isValidMove(curr, r, c - 1))\n dirs.add(LEFT);\n }\n int rand = 0;\n if (dirs.size() > 0)\n rand = dirs.get((int) (Math.random() * dirs.size()));\n if (curr.isFlying()) { //if aircraft is flying in the visible board, don't change direction\n if (r == 1 && (c == 0 || c == board[0].length - 1)) //we are in the first row but behind a border\n { //we only want aircraft to appear in row 1 in EARTH INVADERS (like the UFO in space invaders)\n if (bodyDir == LEFT || bodyDir == RIGHT) {\n rand = UP;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (c == 0)\n rand = RIGHT;\n else if (c == board[0].length - 1)\n rand = LEFT;\n else\n //if(dirs.contains(bodyDir))\n rand = bodyDir;\n } else if (r == 0 || c == 0 || r == board.length - 1 || c == board[0].length - 1) {\n rand = bodyDir;\n if (r == 0 && c == 0) {\n rand = RIGHT;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (r == 0 && c == board[0].length - 1) {\n rand = LEFT;\n if (Math.random() < .5)\n rand = DOWN;\n } else if (r == board.length - 1 && c == 0) {\n rand = RIGHT;\n if (Math.random() < .5)\n rand = UP;\n } else if (r == board.length - 1 && c == board[0].length - 1) {\n rand = LEFT;\n if (Math.random() < .5)\n rand = UP;\n }\n } else if (/*dirs.contains(bodyDir) && */(r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1))\n rand = bodyDir; //make it so aircraft prefer to keep going the same direciton\n\n } else if (name.startsWith(\"TRAIN\")) {//make it so trains prefer to follow the right wall\n for (int j = 0; j < dirs.size(); j++)\n if (dirs.get(j) != bodyDir) {\n rand = dirs.get(j);\n break;\n }\n }\n curr.setDirection(rand);\n curr.setBodyDirection(rand);\n }\n }//***end aircraft/train movement\n if (leftMost == 1) //move vehicles down and start them moving right\n {\n if (EI_moving == LEFT) {\n EI_moving = DOWN;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (lowest < board.length - 3 && !curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setRow(curr.getRow() + 1);\n }\n } else if (EI_moving == DOWN) {\n EI_moving = RIGHT;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\")) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n }\n }\n } else if (EI_moving == RIGHT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(RIGHT);\n }\n }//***end leftmost is first col\n else if (rightMost == board[0].length - 2) //move vehicles down and start them moving left\n {\n if (EI_moving == RIGHT) {\n EI_moving = DOWN;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (lowest < board.length - 3 && !curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setRow(curr.getRow() + 1);\n }\n } else if (EI_moving == DOWN) {\n EI_moving = LEFT;\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\")) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n }\n }\n } else if (EI_moving == LEFT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(LEFT);\n }\n }//***end rightmost is last col\n else if (EI_moving == LEFT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(LEFT);\n }\n else if (EI_moving == RIGHT)\n for (int i = FIRST_VEHICLE; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n if (!curr.isFlying() && !curr.getName().startsWith(\"TRAIN\"))\n curr.setDirection(RIGHT);\n }\n return;\n }//***end EARTH INVADERS enemy movements\n for (int i = 2; i < players.length; i++) {\n Player curr = players[i];\n if (curr == null || curr.getName().equals(\"NONE\"))\n continue;\n String name = curr.getName();\n int r = curr.getRow();\n int c = curr.getCol();\n if (r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1 && (curr instanceof Vehicle))\n ((Vehicle) (curr)).setOnField(true);\n\n if (curr.isFlying() && webs[panel].size() > 0) {\n int x = curr.findX(cellSize);\n int y = curr.findY(cellSize);\n for (int p = 0; p < webs[panel].size(); p++) {\n int[] ray = webs[panel].get(p);\n if (Utilities.isPointOnRay(x, y, ray[0], ray[1], ray[2], ray[3])) {\n explosions.add(new Explosion(\"BIG\", x, y, explosionImages, animation_delay));\n Ordinance.radiusDamage(-1, x, y, 25, panel, .5);\n Spawner.resetEnemy(i);\n webs[panel].remove(p);\n p--;\n Structure str1 = structures[ray[4]][ray[5]][panel];\n Structure str2 = structures[ray[6]][ray[7]][panel];\n if (str1 != null)\n str1.setWebValue(0);\n if (str2 != null)\n str2.setWebValue(0);\n Utilities.updateKillStats(curr);\n break;\n }\n }\n }\n //reset any ground vehicle that ended up in the water\n //reset any train not on tracks - we need this because a player might change panels as a vehicle spawns\n if (name.startsWith(\"TRAIN\")) {\n Structure str = structures[r][c][panel];\n if (str != null && str.getName().equals(\"hole\") && str.getHealth() != 0) {\n explosions.add(new Explosion(\"BIG\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Utilities.updateKillStats(curr);\n Spawner.resetEnemy(i);\n continue;\n } else if (board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"BIG\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n } else if (!board[r][c][panel].startsWith(\"T\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else //ground vehicles\n if (!curr.isFlying() && !curr.getName().startsWith(\"BOAT\") && (curr instanceof Vehicle)) {\n\n if (((Vehicle) (curr)).getStunTime() > numFrames) //ground unit might be stunned by WoeMantis shriek\n continue;\n if (board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else //reset any water vehicle that ended up on land\n if (name.startsWith(\"BOAT\")) {\n if (!board[r][c][panel].startsWith(\"~\")) {\n explosions.add(new Explosion(\"SMALL\", curr.getX() - (cellSize / 2), curr.getY() - (cellSize / 2), puffImages, animation_delay));\n Spawner.resetEnemy(i);\n continue;\n }\n } else if (curr.getHealth() <= 0) {\n Spawner.resetEnemy(i);\n continue;\n }\n\n //if a ground unit has been on the playable field and leaves it, respawn them\n if (!curr.isFlying() && !name.startsWith(\"TRAIN\") && (curr instanceof Vehicle)) {\n if ((r == 0 || c == 0 || r == board.length - 1 || c == board[0].length - 1) && ((Vehicle) (curr)).getOnField()) {\n ((Vehicle) (curr)).setOnField(false);\n Spawner.resetEnemy(i);\n continue;\n }\n }\n if (name.endsWith(\"nukebomber\")) {//for the nukebomber, set the detonation coordinates so nuke fires when the plane exits the field\n int dr = curr.getDetRow();\n int dc = curr.getDetCol();\n int bd = curr.getBodyDirection();\n int dd = curr.getDetDir();\n if (bd == dd && (((bd == LEFT || bd == RIGHT) && c == dc) || (bd == UP || bd == DOWN) && r == dr)) {\n Ordinance.nuke();\n curr.setDetRow(-1);\n curr.setDetCol(-1);\n }\n }\n\n if (curr.isMoving())\n continue;\n int bodyDir = curr.getBodyDirection();\n curr.clearDirections();\n int[] target = isMonsterInSight(curr);\n int mDir = target[0]; //direction of the monster, -1 if none\n int monsterIndex = target[1]; //index of the monster in the players array, -1 if none\n ArrayList<Integer> dirs = new ArrayList(); //array of preferred directions - everything but the reverse of their body position\n if (bodyDir == UP) {\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n }\n } else if (bodyDir == RIGHT) {\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n }\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n } else if (bodyDir == DOWN) {\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r, c + 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == RIGHT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(RIGHT);\n }\n }\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n } else //if(curr.getBodyDirection()==LEFT)\n {\n\n if (isValidMove(curr, r - 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == UP) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(UP);\n }\n if (!name.startsWith(\"TRAIN\")) //trains need to follow the track circuit - only straight and right turns\n {\n if (isValidMove(curr, r + 1, c)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == DOWN) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(DOWN);\n }\n }\n if (isValidMove(curr, r, c - 1)) {\n if (Utilities.nonFlyingCivilian(name) && mDir == LEFT) {\n }//civilians don't want to move towards the monster if it is in direct sight\n else\n dirs.add(LEFT);\n }\n }\n\n if (dirs.size() > 0) {\n if (curr instanceof Monster) {//***MONSTER AI*******************\n double headTurnProb = 0.25;\n double stompProb = 0.5;\n int vDir = isVehicleInSight(curr);\n if (vDir >= 0) {\n boolean airShot = false;\n int vD = vDir;\n if (vD >= 10) {\n airShot = true;\n vD -= 10;\n }\n if (curr.head360() || !Utilities.oppositeDirections(vD, curr.getHeadDirection())) {\n curr.setHeadDirection(vD);\n if ((curr.getName().startsWith(\"Gob\") || curr.getName().startsWith(\"Boo\")) && numFrames >= curr.getLastShotTime() + curr.getReloadTime()) {\n Bullet temp = null;\n if (curr.getName().startsWith(\"Boo\")) {\n temp = new Bullet(curr.getName() + vD, curr.getX(), curr.getY(), 50, beamImages, SPEED, \"BEAM\", SPEED * 10, airShot, i, -1, -1);\n } else if (curr.getName().startsWith(\"Gob\")) {\n temp = new Bullet(\"flame\" + vD, curr.getX(), curr.getY(), 15, monsterFireImages, SPEED, \"FIRE\", SPEED * 4, airShot, i, -1, -1);\n }\n if (temp != null) {\n temp.setDirection(vD);\n bullets.add(temp);\n curr.setLastShotTime(numFrames);\n continue;\n }\n }\n }\n } else if (Math.random() < headTurnProb) {\n String hd = \"right\";\n if (Math.random() < .5)\n hd = \"left\";\n Utilities.turnHead(curr, hd);\n }\n Structure str = structures[r][c][panel];\n if (str != null && str.getHealth() > 0 && str.isDestroyable() && !str.getName().startsWith(\"FUEL\") && Math.random() < stompProb)\n playerMove(KeyEvent.VK_SPACE, i);\n else {\n int dir = dirs.get((int) (Math.random() * dirs.size()));\n if (dir == UP) {\n if (curr.getBodyDirection() != UP) {\n curr.setBodyDirection(UP);\n curr.setHeadDirection(UP);\n } else {\n if (!curr.isSwimmer() && board[r - 1][c][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (r - 1 >= 1) {\n str = structures[r - 1][c][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_UP, i);\n }\n } else if (dir == DOWN) {\n if (curr.getBodyDirection() != DOWN) {\n curr.setBodyDirection(DOWN);\n curr.setHeadDirection(DOWN);\n } else {\n if (!curr.isSwimmer() && board[r + 1][c][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (r + 1 <= structures.length - 1) {\n str = structures[r + 1][c][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_DOWN, i);\n }\n } else if (dir == LEFT) {\n if (curr.getBodyDirection() != LEFT) {\n curr.setBodyDirection(LEFT);\n curr.setHeadDirection(LEFT);\n } else {\n if (!curr.isSwimmer() && board[r][c - 1][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (c - 1 >= 1) {\n str = structures[r][c - 1][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_LEFT, i);\n }\n } else if (dir == RIGHT) {\n if (curr.getBodyDirection() != RIGHT) {\n curr.setBodyDirection(RIGHT);\n curr.setHeadDirection(RIGHT);\n } else {\n if (!curr.isSwimmer() && board[r][c + 1][panel].equals(\"~~~\") && !board[r][c][panel].equals(\"~~~\")) {\n continue;\n }\n if (c + 1 <= board[0].length - 1) {\n str = structures[r][c + 1][panel]; //don't walk into a fire\n if (str != null && str.onFire())\n continue;\n }\n playerMove(KeyEvent.VK_RIGHT, i);\n }\n }\n }\n continue;\n }//end monster AI movement\n else //shoot at a target\n if (name.endsWith(\"troops\") || name.endsWith(\"jeep\") || name.endsWith(\"police\") || name.startsWith(\"TANK\") || name.endsWith(\"coastguard\") || name.endsWith(\"destroyer\") || name.endsWith(\"fighter\") || name.equals(\"AIR bomber\")) {\n boolean airShot = false;\n if (gameMode == EARTH_INVADERS) //we don't want vehicles to shoot each other\n {\n airShot = true;\n curr.setHeadDirection(DOWN);\n }\n if (monsterIndex >= 0 && monsterIndex < players.length && players[monsterIndex].isFlying())\n airShot = true;\n if (curr.getName().endsWith(\"fighter\"))\n curr.setDirection(bodyDir); //keep moving while shooting\n if (mDir != -1 && curr.getRow() > 0 && curr.getCol() > 0 && curr.getRow() < board.length - 1 && curr.getCol() < board[0].length - 1) { //don't shoot from off the visible board\n if ((mDir == bodyDir || ((curr.getName().startsWith(\"TANK\") || curr.getName().endsWith(\"jeep\") || name.equals(\"AIR bomber\")) && (mDir == curr.getHeadDirection() || name.equals(\"AIR bomber\")))) && numFrames >= curr.getLastShotTime() + curr.getReloadTime()) { //AIR bomber needs to be able to drop bombs if they see the monster in front of them or behind them, so we need to check the name in two conditions\n Bullet temp;\n if (name.endsWith(\"jeep\") || name.endsWith(\"coastguard\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 65, (int) (Math.random() * 10) + 30);\n temp = new Bullet(\"jeep\" + mDir, curr.getX(), curr.getY(), 5, machBulletImages, SPEED, \"BULLET\", SPEED * 6, airShot, i, -1, -1);\n } else if (name.endsWith(\"troops\") || name.endsWith(\"police\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 70, (int) (Math.random() * 10) + 20);\n temp = new Bullet(\"troops\" + mDir, curr.getX(), curr.getY(), 3, bulletImages, SPEED, \"BULLET\", SPEED * 6, airShot, i, -1, -1);\n } else if (name.endsWith(\"destroyer\") || name.endsWith(\"artillery\")) {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 45, (int) (Math.random() * 10) + 85);\n temp = new Bullet(\"destroyer\" + mDir, curr.getX(), curr.getY(), 15, shellImages, SPEED, \"SHELL\", SPEED * 3, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n } else if (name.endsWith(\"fighter\")) {\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n temp = new Bullet(\"fighter\" + mDir, curr.getX(), curr.getY(), 30, rocketImages, SPEED, \"SHELL\", SPEED * 8, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n } else if (name.endsWith(\"missile\")) {\n temp = new Bullet(\"missile\" + mDir, curr.getX(), curr.getY(), 50, rocketImages, SPEED, \"SHELL\", SPEED * 3, true, i, players[monsterIndex].findX(cellSize), players[monsterIndex].findY(cellSize));\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n } else if (name.endsWith(\"flame\")) {\n temp = new Bullet(\"flame\" + mDir, curr.getX(), curr.getY(), 15, monsterFireImages, SPEED, \"FIRE\", SPEED * 4, airShot, i, -1, -1);\n channels[0].programChange(instr[TAIKO].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 10) + 5, (int) (Math.random() * 10) + 40);\n } else if (name.equals(\"AIR bomber\")) {\n temp = null;\n if (!DISABLE_BOMBERS) {\n int mR = players[PLAYER1].getRow(); //main player row & col\n int mC = players[PLAYER1].getCol();\n int mR2 = -99; //possible 2nd monster row & col\n int mC2 = -99;\n if (p1partner) {\n mR2 = players[PLAYER2].getRow();\n mC2 = players[PLAYER2].getCol();\n }\n if (players[PLAYER1].getHealth() > 0 && (Math.abs(r - mR) <= 2 || Math.abs(c - mC) <= 2 || Math.abs(r - mR2) <= 2 || Math.abs(c - mC2) <= 2)) {//our bomber is in the same row & col as a monster + or - 1\n if (bodyDir == UP && r < board.length - 1) {\n Ordinance.bigExplosion(curr.getX(), curr.getY() + (cellSize * 2), panel);\n Ordinance.radiusDamage(-1, curr.getX(), curr.getY() + (cellSize * 2), 50, panel, .25);\n } else if (bodyDir == DOWN && r > 1) {\n Ordinance.bigExplosion(curr.getX(), curr.getY() - (cellSize * 2), panel);\n Ordinance.radiusDamage(-1, curr.getX(), curr.getY() - (cellSize * 2), 50, panel, .25);\n } else if (bodyDir == RIGHT && c < board[0].length - 1) {\n Ordinance.bigExplosion(curr.getX() - (cellSize * 2), curr.getY(), panel);\n Ordinance.radiusDamage(-1, curr.getX() - (cellSize * 2), curr.getY(), 50, panel, .25);\n } else if (bodyDir == LEFT && c > 1) {\n Ordinance.bigExplosion(curr.getX() + (cellSize * 2), curr.getY(), panel);\n Ordinance.radiusDamage(-1, curr.getX() + (cellSize * 2), curr.getY(), 50, panel, .25);\n }\n }\n }\n } else {\n channels[0].programChange(instr[GUNSHOT].getPatch().getProgram());\n channels[0].noteOn((int) (Math.random() * 6) + 45, (int) (Math.random() * 10) + 85);\n temp = new Bullet(\"\" + mDir, curr.getX(), curr.getY(), 15, shellImages, SPEED, \"SHELL\", SPEED * 5, airShot, i, -1, -1);\n }\n if (temp != null)\n temp.setDirection(mDir);\n\n if (name.endsWith(\"troops\") || name.endsWith(\"police\") && Math.random() < .5) //make the police move towards the monster half the time\n {\n if (mDir == UP && isValidMove(curr, curr.getRow() - 1, curr.getCol()))\n curr.setDirection(UP);\n else if (mDir == DOWN && isValidMove(curr, curr.getRow() + 1, curr.getCol()))\n curr.setDirection(DOWN);\n else if (mDir == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() - 1))\n curr.setDirection(LEFT);\n else if (mDir == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() + 1))\n curr.setDirection(RIGHT);\n else\n curr.setDirection(-1);\n }\n if (temp != null && players[PLAYER1].getHealth() > 0) {\n if (gameMode == EARTH_INVADERS && !curr.isFlying()) {\n } else {\n if (numFrames >= ceaseFireTime + ceaseFireDuration || gameMode == EARTH_INVADERS) {\n bullets.add(temp);\n curr.setLastShotTime(numFrames);\n continue;\n }\n }\n }\n } else //change to face the monster to line up a shot\n {\n if (name.endsWith(\"troops\") || name.endsWith(\"police\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.endsWith(\"artillery\")) {\n curr.setDirection(-1); //stop to shoot\n curr.setBodyDirection(mDir);\n } else if (curr.getName().startsWith(\"TANK\") || curr.getName().endsWith(\"jeep\"))\n curr.setHeadDirection(mDir);\n continue;\n }\n }\n }\n int rand = dirs.get((int) (Math.random() * dirs.size()));\n if (curr.isFlying() && (r > 0 && c > 0 && r < board.length - 1 && c < board[0].length - 1)) {\n rand = bodyDir; //make it so aircraft prefer to keep going the same direciton\n } else if (name.startsWith(\"TRAIN\")) {//make it so trains prefer to follow the right wall\n for (int j = 0; j < dirs.size(); j++)\n if (dirs.get(j) != bodyDir) {\n rand = dirs.get(j);\n break;\n }\n }\n curr.setDirection(rand);\n curr.setBodyDirection(rand);\n\n continue;\n }\n //if no preferred direction, include the option to turn around\n //civilians should prefer to turn around rather than approach the monster\n if (name.endsWith(\"civilian\") || name.endsWith(\"bus\")) {\n if (bodyDir == mDir) //if we are facing the same direction as the monster, turn around\n {\n if (bodyDir == UP && isValidMove(curr, curr.getRow() + 1, curr.getCol())) {\n curr.setDirection(DOWN);\n curr.setBodyDirection(DOWN);\n continue;\n } else if (bodyDir == DOWN && isValidMove(curr, curr.getRow() - 1, curr.getCol())) {\n curr.setDirection(UP);\n curr.setBodyDirection(UP);\n continue;\n } else if (bodyDir == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() + 1)) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n continue;\n } else if (bodyDir == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() - 1)) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n continue;\n }\n }\n }\n int rand = (int) (Math.random() * 4);\n if (rand == UP && isValidMove(curr, curr.getRow() - 1, curr.getCol())) {\n curr.setDirection(UP);\n curr.setBodyDirection(UP);\n continue;\n }\n if (rand == DOWN && isValidMove(curr, curr.getRow() + 1, curr.getCol())) {\n curr.setDirection(DOWN);\n curr.setBodyDirection(DOWN);\n continue;\n }\n if (rand == LEFT && isValidMove(curr, curr.getRow(), curr.getCol() - 1)) {\n curr.setDirection(LEFT);\n curr.setBodyDirection(LEFT);\n continue;\n }\n if (rand == RIGHT && isValidMove(curr, curr.getRow(), curr.getCol() + 1)) {\n curr.setDirection(RIGHT);\n curr.setBodyDirection(RIGHT);\n continue;\n }\n\n }\n }", "@Override\n\tpublic boolean checkCollision() {\n\t\treturn true;\n\t}", "private void checkCastleCollisions() {\n\t\t\n\t}", "protected void moveTowards()\r\n {\r\n if(planet != null)\r\n turnTowards(planet.getX(), planet.getY());\r\n\r\n //If the invader touches a planet, it will go into the planet\r\n TargetPlanet t = (TargetPlanet)getOneIntersectingObject (TargetPlanet.class);\r\n //if t exists and looking for nearest planet OR looking for unconquered planet and reached it or no set planet\r\n if (t != null && ((findNearestPlanet || (!findNearestPlanet && t.equals(planet))) || planet == null))\r\n {\r\n t.hitByFighter(isHuman); //planet's stats will change\r\n removeMe = true;\r\n }\r\n }", "void move(int direction)\n {\n // TODO YOUR CODE HERE\n if (direction == 3)\n {\n int begincell=tankY;\n int endcell=tankY+cell_height;\n if ((begincell >= 0) && (endcell <= BF_HEIGHT))\n {\n System.out.println(\"Move down\");\n while (tankY<=endcell)\n {tankY++;\n repaint();\n sleep(10);\n }\n\n repaint ();\n sleep(500);\n }\n else System.out.println(\"Move down is not allowed from this position\");\n }\n else if (direction == 1)\n {\n int begincell=tankY;\n int endcell=tankY+cell_height;\n if ((begincell >= cell_height) && (endcell <= BF_HEIGHT))\n {\n System.out.println(\"Move up\");\n while (tankY>=begincell-cell_height)\n {tankY--;\n repaint();\n sleep(10);\n }\n\n repaint ();\n sleep(500);\n }\n else System.out.println(\"Move up is not allowed from this position\");\n }\n else if (direction == 2)\n {\n int begincell=tankX;\n int endcell=tankX+cell_width;\n if ((begincell >= 0) && (endcell <= BF_WIDTH))\n {\n System.out.println(\"Move right\");\n while (tankX<=endcell)\n {tankX++;\n repaint();\n sleep(10);\n }\n\n repaint ();\n sleep(500);\n }\n else System.out.println(\"Move right is not allowed from this position\");\n }\n else if (direction == 4)\n {\n int begincell=tankX;\n int endcell=tankX+cell_width;\n if ((begincell >= cell_width) && (endcell <= BF_WIDTH))\n {\n System.out.println(\"Move left\");\n while (tankX>=begincell-cell_width)\n {tankX--;\n repaint();\n sleep(10);\n }\n\n repaint ();\n sleep(500);\n }\n else System.out.println(\"Move left is not allowed from this position\");\n }\n else\n {\n System.out.println(\"Direction is not recognized\");\n }\n\n\n }", "public static boolean moveking() //returns false if valid move is there\n{ System.out.println(\"IN FUNCTION MOVE KING.....\");\n flag=0;\n int kx,ky;\n if(q==2)\n {\n kx=p2.ka.kbx; //WHITE KING....\n ky=p2.ka.kby;\n } \nelse\n {\n kx=p1.ka.kax; //BLACK KING....\n\tky=p1.ka.kay;\n }\n//CHECKS WHETHER KING CAN MOVE TO THE 8 adjacent places...\n if(kx-1>=0)\n {\n move2(kx,ky,kx-1,ky);\n \n if(flag==1)\n {\n revert(kx,ky,kx-1,ky);\n return false;\n }\n }\n //r\n if(kx+1<=7)\n { move2(kx,ky,kx+1,ky);\n if(flag==1)\n {revert(kx,ky,kx+1,ky);\n return false;\n \n }\n }\n \n //u\n if(ky-1>=0)\n {\n move2(kx,ky,kx,ky-1);\n \n if(flag==1)\n {revert(kx,ky,kx,ky-1);\n return false;\n \n }\n }\n //d\n if(ky+1<=7)\n {\n move2(kx,ky,kx,ky+1);\n \n if(flag==1)\n { revert(kx,ky,kx,ky+1);\n return false;\n \n }\n }\n //lu\n if(kx-1>=0&&ky-1>=0)\n {\n move2(kx,ky,kx-1,ky-1);\n \n if(flag==1)\n {revert(kx,ky,kx-1,ky-1);\n return false;\n \n }\n }\n //ld\n if(kx-1>=0&&ky+1<=7)\n {\n move2(kx,ky,kx-1,ky+1);\n \n if(flag==1)\n {revert(kx,ky,kx-1,ky+1);\n return false;\n \n }\n }\n //ru\n if(kx+1<=7&&ky-1>=0)\n {\n move2(kx,ky,kx+1,ky-1);\n \n if(flag==1)\n {revert(kx,ky,kx+1,ky-1);\n return false;\n \n }\n }\n //rd\n if(kx+1<=7&&ky+1<=7)\n {\n move2(kx,ky,kx+1,ky+1);\n \n if(flag==1)\n {revert(kx,ky,kx+1,ky+1);\n return false;\n \n }\n }\n return true; \n }", "@Test\n public void testGetVerticalPillarAbove(){\n Pillar pillar = largePillarMap.get(Maze.position(0,0));\n Pillar edgePillar = largePillarMap.get(Maze.position(4,4));\n Pillar neighbor = largeMaze.getVerticalPillar(pillar, true);\n assertEquals(0, neighbor.getX());\n assertEquals(1, neighbor.getY());\n\n neighbor = largeMaze.getVerticalPillar(edgePillar, true);\n assertEquals(null, neighbor);\n }", "public void MovesRemainingExists() {\n InsideMovesRemainingExists = 1;\n NoMovesRemaining = 1;\n Beginning:\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n previousX = i;\n previousY = j + 1;\n if ((i + 1) < 9) {\n ValidSwitch(i + 1, j + 1);\n if (NoMovesRemaining == 0) { //checks the candies to the right\n ResetState();\n break Beginning; //breaks the loop\n }\n }\n\n if ((i - 1) >= 0) {\n ValidSwitch(i - 1, j + 1);\n if (NoMovesRemaining == 0) { //checks the candies to the left\n ResetState();\n break Beginning;\n }\n }\n\n if ((j + 1) < 9) {\n ValidSwitch(i, j + 2);\n if (NoMovesRemaining == 0) { //checks the candies on the bottom\n ResetState();\n break Beginning;\n }\n }\n\n if ((j - 1) >= 0) {\n ValidSwitch(i, j);\n if (NoMovesRemaining == 0) { //checks the candies at the top\n ResetState();\n break Beginning;\n }\n }\n }\n\n }\n InsideMovesRemainingExists = 0;\n\n}", "private void scanForBlockFarAway() {\r\n\t\tList<MapLocation> locations = gameMap.senseNearbyBlocks();\r\n\t\tlocations.removeAll(stairs);\r\n\t\tif (locations.size() == 0) {\r\n\t\t\tblockLoc = null;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t/* remove blocks that can be sensed */\r\n\t\tIterator<MapLocation> iter = locations.iterator();\r\n\t\twhile(iter.hasNext()) {\r\n\t\t\tMapLocation loc = iter.next();\r\n\t\t\tif (myRC.canSenseSquare(loc))\r\n\t\t\t\titer.remove();\r\n\t\t} \r\n\t\t\r\n\t\tlocations = navigation.sortLocationsByDistance(locations);\r\n\t\t//Collections.reverse(locations);\r\n\t\tfor (MapLocation block : locations) {\r\n\t\t\tif (gameMap.get(block).robotAtLocation == null){\r\n\t\t\t\t/* this location is unoccupied */\r\n\t\t\t\tblockLoc = block;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tblockLoc = null;\r\n\t}", "Velocity hit(Ball hitter, Point collisionPoint, Velocity currentVelocity);", "private void updateTileCollisions(Mob mob) {\n\t\tif (mob instanceof Player) {\r\n\t\t\tmob.setScreenPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.max(mob.getScreenPosition().x, mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.max(mob.getScreenPosition().y, mob.getHeight() / 2)));\r\n\t\t\tmob.setScreenPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.min(mob.getScreenPosition().x, Display.getWidth() - mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.min(mob.getScreenPosition().y, Display.getHeight() - mob.getHeight() / 2)));\n\r\n\t\t\tmob.setAbsPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.max(mob.getAbsPosition().x, mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.max(mob.getAbsPosition().y, mob.getHeight() / 2)));\r\n\t\t\tmob.setAbsPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.min(mob.getAbsPosition().x, tilemap.getWidth() - mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.min(mob.getAbsPosition().y, tilemap.getHeight()) - mob.getHeight() / 2));\r\n\t\t}\r\n\r\n\t\tPoint center = mob.getScreenPosition().add(offset);\r\n\r\n\t\tboolean hitGround = false; // used to check for vertical collisions and determine \r\n\t\t// whether or not the mob is in the air\r\n\t\tboolean hitWater = false;\r\n\r\n\t\t//update mob collisions with tiles\r\n\t\tfor (int i = 0; i < tilemap.grid.length; i++) {\r\n\t\t\tfor (int j = 0; j < tilemap.grid[0].length; j++) {\r\n\r\n\t\t\t\tif (tilemap.grid[i][j] != null &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().x > center.x - (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().x < center.x + (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().y > center.y - (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().y < center.y + (250)) {\r\n\r\n\t\t\t\t\tRectangle mobRect = mob.getBounds();\r\n\t\t\t\t\tRectangle tileRect = tilemap.grid[i][j].getBounds();\r\n\r\n\t\t\t\t\t// if mob intersects a tile\r\n\t\t\t\t\tif (mobRect.intersects(tileRect)) {\r\n\r\n\t\t\t\t\t\t// get the intersection rectangle\r\n\t\t\t\t\t\tRectangle rect = mobRect.intersection(tileRect);\r\n\r\n\t\t\t\t\t\t// if the mob intersects a water tile, adjust its movement accordingly\r\n\t\t\t\t\t\tif (tilemap.grid[i][j].type == TileMap.WATER) { \r\n\r\n\t\t\t\t\t\t\tmob.gravity = mob.defaultGravity * 0.25f;\r\n\t\t\t\t\t\t\tmob.jumpSpeed = mob.defaultJumpSpeed * 0.35f;\r\n\t\t\t\t\t\t\tmob.moveSpeed = mob.defaultMoveSpeed * 0.7f;\r\n\r\n\t\t\t\t\t\t\tif (!mob.inWater) { \r\n\t\t\t\t\t\t\t\tmob.velocity.x *= 0.2;\r\n\t\t\t\t\t\t\t\tmob.velocity.y *= 0.2;\r\n\t\t\t\t\t\t\t\tmob.inWater = true;\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\thitWater = true;\r\n\t\t\t\t\t\t\tmob.jumping = false;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t\t// if intersection is vertical (and underneath player)\r\n\t\t\t\t\t\t\tif (rect.getHeight() < rect.getWidth()) {\r\n\r\n\t\t\t\t\t\t\t\t// make sure the intersection isn't really horizontal\r\n\t\t\t\t\t\t\t\tif (j + 1 < tilemap.grid[0].length && \r\n\t\t\t\t\t\t\t\t\t\t(tilemap.grid[i][j+1] == null || \r\n\t\t\t\t\t\t\t\t\t\t!mobRect.intersects(tilemap.grid[i][j+1].getBounds()))) {\r\n\r\n\t\t\t\t\t\t\t\t\t// only when the mob is falling\r\n\t\t\t\t\t\t\t\t\tif (mob.velocity.y <= 0) {\r\n\t\t\t\t\t\t\t\t\t\tmob.velocity.y = 0;\r\n\t\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().x, \r\n\t\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().y + rect.getHeight() - 1)));\r\n\t\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().x, \r\n\t\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().y + rect.getHeight() - 1)));\r\n\t\t\t\t\t\t\t\t\t\tmob.inAir = false;\t\r\n\t\t\t\t\t\t\t\t\t\tmob.jumping = false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// if intersection is horizontal\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tmob.velocity.x = 0;\r\n\r\n\t\t\t\t\t\t\t\tif (mobRect.getCenterX() < tileRect.getCenterX()) {\r\n\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().x - rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().y));\r\n\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().x - rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().y));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().x + rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().y));\r\n\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().x + rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().y));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tfloat xToCenter = Math.abs((float)(mobRect.getCenterX() - tileRect.getCenterX()));\r\n\t\t\t\t\t\t\tfloat yToCenter = Math.abs((float)(mobRect.getCenterY() - tileRect.getCenterY())); \r\n\r\n\t\t\t\t\t\t\t// Check under the mob to see if it touches a tile. If so, hitGround = true\r\n\t\t\t\t\t\t\tif (yToCenter <= (mobRect.getHeight() / 2 + tileRect.getHeight() / 2) && \r\n\t\t\t\t\t\t\t\t\txToCenter <= (mobRect.getWidth() / 2 + tileRect.getWidth() / 2))\r\n\t\t\t\t\t\t\t\thitGround = true;\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// if mob doesn't intersect a tile vertically, they are in the air\r\n\t\tif (!hitGround) {\r\n\t\t\tmob.inAir = true;\r\n\t\t}\r\n\t\t// if the mob is not in the water, restore its default movement parameters\r\n\t\tif (!hitWater) {\r\n\t\t\tmob.gravity = mob.defaultGravity;\r\n\t\t\tmob.moveSpeed = mob.defaultMoveSpeed;\r\n\t\t\tmob.jumpSpeed = mob.defaultJumpSpeed;\r\n\t\t\tmob.inWater = false;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void onPostSolve(Contact c, ContactImpulse cImpulse) {\n\t\tBodyComponent body = (BodyComponent)c.getFixtureA().getBody().getUserData();\n\t\tif(c.isTouching() && body.getVelocity() > contactVelocity){\n\t\t\tmanifold=c.getManifold();\n\t\t\tc.getWorldManifold(worldManifold);\n\t\t\t\tint count=0;\n\t\t\t\tgame.getSoundPool().playRandom(game.getSoundPool().getPool().hit1,\n\t\t\t\t\t\tgame.getSoundPool().getPool().hit2,\n\t\t\t\t\t\tgame.getSoundPool().getPool().hit3,\n\t\t\t\t\t\tgame.getSoundPool().getPool().hit4);\n\t\t\t\t//pt.localPoint.\n\t\t\t\tfor(Spark spark : sparks){\n\t\t\t\t\tif(!spark.active){\n\t\t\t\t\t\tspark.active=true;\n\t\t\t\t\t\t//spark.x=pt.localPoint.x;\n\t\t\t\t\t\t//spark.y=pt.localPoint.y;\n\t\t\t\t\t\tspark.x=worldManifold.points[0].x;\n\t\t\t\t\t\tspark.y=worldManifold.points[0].y;\n\t\t\t\t\t\t//spark.vx=2*worldManifold.normal.x;\n\t\t\t\t\t\t//spark.vy=2*worldManifold.normal.y;\n\t\t\t\t\t\t\n\t\t\t\t\t\tvel1 = c.getFixtureA().getBody().getLinearVelocityFromWorldPoint(worldManifold.points[0]);\n\t\t\t\t\t\tvel2 = c.getFixtureB().getBody().getLinearVelocityFromWorldPoint(worldManifold.points[0]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tspark.rotation=(int)(Math.random()*180);\n\t\t\t\t\t\tspark.dir=(int)(1-(Math.random()*2)*2);\n\t\t\t\t\t\tspark.vx=vel2.x/(5+(float)Math.random()*20);\n\t\t\t\t\t\tspark.vy=vel2.y/(5+(float)Math.random()*20);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(++count>5){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t}", "public Velocity hit(Point collisionPoint, Velocity currentVelocity, Ball hitter) {\r\n this.hitCounter--; // when getting in this function its mean the ball hit a block , and change the\r\n //number of hit by 1.\r\n Velocity newVelocity = currentVelocity;\r\n\r\n // check where is the collision point on the rectangle if the collision point is on the right\r\n // side change the velocity to tell the to go to the left side. and the same with up , down, left.\r\n if ((this.getCollisionRectangle().upLine()\r\n .checkOnTheLine(this.getCollisionRectangle().upLine(), collisionPoint))\r\n || this.getCollisionRectangle().downLine()\r\n .checkOnTheLine(this.getCollisionRectangle().downLine(), collisionPoint)) {\r\n newVelocity = new Velocity(currentVelocity.getDx(), ((-1) * (currentVelocity.getDy())));\r\n }\r\n if ((this.getCollisionRectangle().leftLine()\r\n .checkOnTheLine(this.getCollisionRectangle().leftLine(), collisionPoint))\r\n || this.getCollisionRectangle().rightLine()\r\n .checkOnTheLine(this.getCollisionRectangle().rightLine(), collisionPoint)) {\r\n newVelocity = new Velocity((-1) * (currentVelocity.getDx()), (currentVelocity.getDy()));\r\n }\r\n // notifi there been a hit to the listners.\r\n this.notifyHit(hitter);\r\n // return the new velocity to the moveOne Step.\r\n return newVelocity;\r\n\r\n }", "public void update() {\n double newAngle = angle - 90;\n Coordinate nextCenterPointCoordinate = new Coordinate(\n this.centerPointCoordinate.getXCoordinate() - (Constants.BULLET_SPEED * Math.cos(Math.toRadians(newAngle))),\n this.centerPointCoordinate.getYCoordinate() + (Constants.BULLET_SPEED * Math.sin(Math.toRadians(newAngle)))\n );\n\n\n ArrayList<Wall> walls = new ArrayList<>();\n walls.addAll(TankTroubleMap.getDestructibleWalls());\n walls.addAll(TankTroubleMap.getIndestructibleWalls());\n ArrayList<Coordinate> nextCoordinatesArrayList = makeCoordinatesFromCenterCoordinate(nextCenterPointCoordinate);\n Wall wallToCheck = null;\n for (Wall wall : walls) {\n if (TankTroubleMap.checkOverLap(wall.getPointsArray(), nextCoordinatesArrayList)) {\n wallToCheck = wall;\n }\n }\n\n if (wallToCheck != null) {\n if (horizontalCrash(wallToCheck)) { //if the bullet would only go over horizontal side of any walL\n nextCenterPointCoordinate = flipH();\n } else if (verticalCrash(wallToCheck)) { // if the bullet would only go over vertical side any wall\n nextCenterPointCoordinate = flipV();\n } else {// if the bullet would only go over corner of any wall\n int cornerCrashState = cornerCrash(wallToCheck);\n nextCenterPointCoordinate = flipCorner(cornerCrashState);\n }\n\n if (wallToCheck.isDestroyable()) {//crashing destructible\n //System.out.println(\"bullet damage:\"+ damage);\n //System.out.println(\"wall health:\"+ ((DestructibleWall) wallToCheck).getHealth());\n ((DestructibleWall) wallToCheck).receiveDamage(damage);\n if (((DestructibleWall) wallToCheck).getHealth() <= 0) {\n TankTroubleMap.getDestructibleWalls().remove(wallToCheck);\n }\n bulletsBlasted = true;\n tankTroubleMap.getBullets().remove(this);\n }\n }\n this.centerPointCoordinate = nextCenterPointCoordinate;\n updateArrayListCoordinates();\n\n // Tanks / users\n if (!bulletsBlasted) {\n for (int i = 0; i < tankTroubleMap.getUsers().size(); i++) {\n if (TankTroubleMap.checkOverLap(coordinates, tankTroubleMap.getUsers().get(i).getUserTank().getTankCoordinates())) {\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n tankTroubleMap.getUsers().get(i).getUserTank().receiveDamage(damage);\n //System.out.println(\"health: \" + tankTroubleMap.getUsers().get(i).getUserTank().getHealth());\n if (tankTroubleMap.getUsers().get(i).getUserTank().getHealth() <= 0) {\n int finalI = i;\n Thread thread = new Thread(() -> {\n try {\n SoundsOfGame soundsOfGame = new SoundsOfGame(\"explosion\", false);\n soundsOfGame.playSound();\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_A.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_B.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_C.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_D.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_E.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_F.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_G.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_H.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().remove(finalI);\n gameOverCheck();\n if (isUserTank) {\n tankTroubleMap.getUsers().get(tankIndex).getUserTank().setNumberOfDestroyedTank(tankTroubleMap.getUsers().get(tankIndex).getUserTank().getNumberOfDestroyedTank() + 1);\n }\n tankTroubleMap.getAudience().add(tankTroubleMap.getUsers().get(finalI));\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n }\n break;\n }\n }\n }\n\n // Tanks / bots\n if (!bulletsBlasted) {\n for (int i = 0; i < tankTroubleMap.getBots().size(); i++) {\n if (TankTroubleMap.checkOverLap(coordinates, tankTroubleMap.getBots().get(i).getAiTank().getTankCoordinates())) {\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n tankTroubleMap.getBots().get(i).getAiTank().receiveDamage(damage);\n //System.out.println(\"health: \" + tankTroubleMap.getBots().get(i).getAiTank().getHealth());\n if (tankTroubleMap.getBots().get(i).getAiTank().getHealth() <= 0) {\n // System.out.println(\"Blasted Tank.......\");\n int finalI = i;\n Thread thread = new Thread(() -> {\n try {\n SoundsOfGame soundsOfGame = new SoundsOfGame(\"explosion\", false);\n soundsOfGame.playSound();\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_A.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_B.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_C.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_D.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_E.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_F.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_G.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_H.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().remove(finalI);\n gameOverCheck();\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n }\n break;\n }\n }\n }\n }", "public Velocity hit(Ball hitter, Point collisionPoint, Velocity currentVelocity) {\n // Checking a collision with the corners.\n if (collisionPoint.equals(this.rectangle.getDownerLeft())\n || collisionPoint.equals(this.rectangle.getDownerRight())\n || collisionPoint.equals(this.rectangle.getUpperLeft())\n || collisionPoint.equals(this.rectangle.getUpperRight())) {\n this.notifyCounter();\n this.notifyHit(hitter);\n return new Velocity(currentVelocity.getDx() * -1, currentVelocity.getDy() * -1);\n }\n // checking collisions with the block's edges.\n if (this.rectangle.getDownerEdge().isOnLine(collisionPoint)) {\n this.notifyCounter();\n this.notifyHit(hitter);\n return new Velocity(currentVelocity.getDx(), currentVelocity.getDy() * -1);\n }\n if (this.rectangle.getLeftEdge().isOnLine(collisionPoint)) {\n this.notifyCounter();\n this.notifyHit(hitter);\n return new Velocity(currentVelocity.getDx() * -1, currentVelocity.getDy());\n }\n if (this.rectangle.getUpperEdge().isOnLine(collisionPoint)) {\n this.notifyCounter();\n this.notifyHit(hitter);\n return new Velocity(currentVelocity.getDx(), currentVelocity.getDy() * -1);\n }\n if (this.rectangle.getRightEdge().isOnLine(collisionPoint)) {\n this.notifyCounter();\n this.notifyHit(hitter);\n return new Velocity(currentVelocity.getDx() * -1, currentVelocity.getDy());\n }\n return currentVelocity; // default.\n }", "@Override\n public void update(float dt) {\n\n\n for (GameObject g : getGameObjectList()) {\n Collider gameObjectCollider = g.getComponent(Collider.class);\n if (g.getSID() instanceof Map.Block ) {\n continue;\n }\n gameObjectCollider.reduceAvoidTime(dt);\n\n for (GameObject h : getGameObjectList()) {\n Collider gameObjectCollider2 = h.getComponent(Collider.class);\n if (g.equals(h)) {\n continue;\n }\n\n if ((gameObjectCollider.bitmask & gameObjectCollider2.layer) != 0) {\n if (gameObjectCollider2.layer == gameObjectCollider.layer){\n continue;\n }\n\n TransformComponent t = g.getComponent(TransformComponent.class);\n Vector2f pos1 = g.getComponent(Position.class).getPosition();\n FloatRect rect1 = new FloatRect(pos1.x, pos1.y, t.getSize().x, t.getSize().y);\n TransformComponent t2 = g.getComponent(TransformComponent.class);\n Vector2f pos2 = h.getComponent(Position.class).getPosition();\n FloatRect rect2 = new FloatRect(pos2.x, pos2.y, t2.getSize().x, t2.getSize().y);\n FloatRect collision = rect2.intersection(rect1);\n if (collision != null) {\n Collider mainCollider = g.getComponent(Collider.class);\n Collider collidingWith = h.getComponent(Collider.class);\n\n\n if (!(mainCollider.checkGameObject(h)||collidingWith.checkGameObject(g)))\n {\n if (mainCollider.events == true && collidingWith.events == true)\n {\n\n\n if ((g.getBitmask() & BitMasks.produceBitMask(CollisionEvent.class)) == 0)\n {\n g.addComponent(new CollisionEvent());\n\n\n }\n g.getComponent(CollisionEvent.class).getG().add(h);\n if ((h.getBitmask() & BitMasks.produceBitMask(CollisionEvent.class)) == 0) {\n h.addComponent(new CollisionEvent());\n\n }\n h.getComponent(CollisionEvent.class).getG().add(g);\n\n }\n\n\n if (mainCollider.dieOnPhysics == true) {\n EntityManager.getEntityManagerInstance().removeGameObject(g);\n }\n if (mainCollider.physics == true && collidingWith.physics == true) {\n float resolve = 0;\n float xIntersect = (rect1.left + (rect1.width * 0.5f)) - (rect2.left + (rect2.width * 0.5f));\n float yIntersect = (rect1.top + (rect1.height * 0.5f)) - (rect2.top + (rect2.height * 0.5f));\n if (Math.abs(xIntersect) > Math.abs(yIntersect)) {\n if (xIntersect > 0) {\n resolve = (rect2.left + rect2.width) - rect1.left;\n } else {\n resolve = -((rect1.left + rect1.width) - rect2.left);\n }\n g.getComponent(Position.class).addPosition(new Vector2f(resolve, 0));\n } else {\n if (yIntersect > 0) {\n resolve = (rect2.top + rect2.height) - rect1.top;\n\n } else\n {\n resolve = -((rect1.top + rect1.height) - rect2.top);\n }\n g.getComponent(Position.class).addPosition(new Vector2f(0, resolve));\n }\n }\n }\n\n\n }\n }\n }\n }\n }", "public void plan()\n {\n turnRight();\n while(isFrontClear())\n {\n while(isBrainHere()) {\n takeBrain();\n }\n move();\n }\n \n if (isBrainHere()) {\n takeBrain();\n }\n \n turnRight();\n if (!isFrontClear()) {\n turnAround();\n }\n \n goCenter();\n \n turnAround();\n move();\n win();\n }", "public void checkWallBounce(){\n // Bounce the ball back when it hits the top of screen\n if (getRect().top < 0) {\n reverseYVelocity();\n clearObstacleY(40);\n }\n\n // If the ball hits left wall bounce\n if (getRect().left < 0) {\n reverseXVelocity();\n clearObstacleX(2);\n }\n\n // If the ball hits right wall Velocity\n if (getRect().right > screenX) {\n reverseXVelocity();\n clearObstacleX(screenX - 57);\n }\n }", "public abstract void processCollisions();", "private void collision(GameObjectContainer<GameObject> object) {\n \tGameObject renderObject = null;\r\n\t\tfor (int i = 0; i < object.getSize(); i++) {\r\n\t\t\trenderObject = object.iterator().next();\r\n\r\n\t\t\tif (renderObject.getType() == \"BLOCK\") {\r\n\t\t\t\tif (this.getBoundsInParent().intersects(renderObject.getBoundsInParent())) {\r\n\t\t\t\t\tSystem.out.println(\"intersected\");\r\n\t\t\t\t\tthis.setTranslateY(renderObject.getTranslateY() - renderObject.getHeight());\r\n\t\t\t\t\tfalling = false;\r\n\t\t\t\t\tjump = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfalling = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif (renderObject.getType() == \"NURSE\") {\r\n\t\t\t\tif (this.getBoundsInParent().intersects(renderObject.getBoundsInParent())) {\r\n\t\t\t\t\tSystem.out.println(\"nurse\");\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}else {\r\n\t\t\t\tfalling = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n }", "public void move() {\n\t\t// tolerance of angle at which the Base starts moving\n\t\tint tolerance = 10;\n\t\tif(Math.abs(angle) < Math.abs(angleDesired)+tolerance && Math.abs(angleDesired)-tolerance < Math.abs(angle)) {\n\t\t\tdouble vX = Math.cos(Math.toRadians(this.angle + 90)) * v;\n\t\t\tdouble vY = Math.sin(Math.toRadians(this.angle + 90)) * v;\n\t\t\t\n\t\t\tthis.x += vX;\n\t\t\tthis.y += vY;\t\n\t\t\tthis.rectHitbox = new Rectangle((int)(x-rectHitbox.width/2),(int)(y-rectHitbox.height/2),rectHitbox.width,rectHitbox.height);\n\t\t}\n\t\t// curTargetPathBoardRectangle\n\t\tRectangle curTPBR = pathBoardRectangles.get(curTargetPathCellIndex).rect;\n\t\tRectangle rectSmallerBR = new Rectangle((int)curTPBR.getCenterX()-5,(int)curTPBR.getCenterY()-5,10,10);\n\t\t// updates the index when it crosses a pathCell so it counts down from pathCell to pathCell,\n\t\t// always having the next pathCell in the array as the target until the end is reached then it stops\n\t\tif(rectSmallerBR.contains(new Point((int)x,(int)y))) {\n\t\t\tif(curTargetPathCellIndex < pathBoardRectangles.size()-1) {\n\t\t\t\tcurTargetPathCellIndex++;\n\t\t\t\tparentGP.boardRect = pathBoardRectangles.get(curTargetPathCellIndex-1);\n\t\t\t\ttAutoDirectionCorrection.restart();\n\t\t\t}else {\n\t\t\t\tparentGP.isMoving = false;\n\t\t\t\tparentGP.boardRect = pathBoardRectangles.get(curTargetPathCellIndex);\n\t\t\t\tpathBoardRectangles.clear();\n\t\t\t\ttAutoDirectionCorrection.stop();\n\t\t\t\tStagePanel.tryCaptureGoldMine(parentGP);\n\t\t\t}\n\t\t}\n\t}", "private void checkSpikeCollisions() {\n\t\t\n\t\t//check collisions with up spikes\n\t\tint len = upSpikes.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tSpike spike = upSpikes.get(i);\n\t\t\t\n\t\t\tif(OverlapTester.overlapCircleRectangle(spike.bounds, player.bounds)) {\n\t\t\t\tplayerAlive = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//check collisions with down spikes\n\t\tlen = downSpikes.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tSpike spike = downSpikes.get(i);\n\t\t\t\n\t\t\tif(OverlapTester.overlapCircleRectangle(spike.bounds, player.bounds)) {\n\t\t\t\tplayerAlive = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//check collisions with right spikes\n\t\tlen = rightSpikes.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tSpike spike = rightSpikes.get(i);\n\t\t\t\n\t\t\tif(OverlapTester.overlapCircleRectangle(spike.bounds, player.bounds)) {\n\t\t\t\tplayerAlive = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//check collisions with left spikes\n\t\tlen = leftSpikes.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tSpike spike = leftSpikes.get(i);\n\t\t\t\n\t\t\tif(OverlapTester.overlapCircleRectangle(spike.bounds, player.bounds)) {\n\t\t\t\tplayerAlive = false;\n\t\t\t}\n\t\t}\n\t}", "public void moveOneStep() {\n\n //computing the predicted trajectory\n Line trajectory = computeTrajectory();\n\n //checking the borders\n if (reachedBorder(trajectory)) {\n return;\n }\n\n //getting the closest collision info\n //CollisionInfo collisionInfo = this.gameEnvironment.getClosestCollision(trajectory);\n CollisionInfo collisionInfo = this.gameLevel.getEnvironment().getClosestCollision(trajectory);\n\n if (collisionInfo != null && collisionInfo.collisionObject() != null) {\n\n //changing the velocity according to the collision info (point, type of collidiable\n // and position on the collidable)\n Velocity newVelocity =\n collisionInfo.collisionObject().hit(this, collisionInfo.collisionPoint(), this.velocity);\n this.velocity = newVelocity;\n }\n\n //setting the next position of the center of the ball (new velocity after collision)\n this.center = this.getVelocity().applyToPoint(this.center);\n }", "public void collisionVS() {\n for (int i = 0; i < enemyBullets.size(); i++) {\n\n enemyBullets.get(i).tick();\n\n if (enemyBullets.get(i).getImgY() >= 750 || enemyBullets.get(i).getImgY() <= 40) {\n\n enemyBullets.get(i).bulletImage.delete();\n enemyBullets.remove(enemyBullets.get(i));\n i--;\n continue;\n }\n\n for (int j = 0; j < spaceShips.size(); j++) {\n\n if (spaceShips.get(j).getHitbox().intersects(enemyBullets.get(i).getHitbox())) {\n\n spaceShips.get(j).hit();\n enemyBullets.get(i).hit();\n enemyBullets.remove(enemyBullets.get(i));\n\n if (spaceShips.get(j).getHp() <= 0) {\n spaceShips.remove(spaceShips.get(j));\n }\n\n //if it collides with one leave the for loop\n i--;\n j = spaceShips.size();\n }\n }\n }\n\n //////////////////////////////////////////////////////////////////////////////////////////////\n\n // SPACESHIPS WITH ENEMIES AND ENEMY BULLETS\n for (int i = 0; i < spaceShips.size(); i++) {\n spaceShips.get(i).tick();\n\n // WITH ENEMIES\n for (int j = 0; j < enemies.size(); j++) {\n if (spaceShips.get(i).getHitbox().intersects(enemies.get(j).getHitbox())) {\n\n spaceShips.get(i).hit();\n enemies.get(j).hit(20);\n enemies.remove(enemies.get(j));\n\n if (spaceShips.get(i).getHp() <= 0) {\n spaceShips.remove(spaceShips.get(i));\n }\n\n //if it collides with one leave the for loop\n j = enemies.size();\n }\n }\n }\n }", "private void handleObjectCollision() {\n \tGObject obstacle = getCollidingObject();\n \t\n \tif (obstacle == null) return;\n \tif (obstacle == message) return;\n \t\n\t\tvy = -vy;\n\t\t\n\t\tSystem.out.println(\"ball x: \" + ball.getX() + \" - \" + (ball.getX() + BALL_RADIUS * 2) );\n\t\tSystem.out.println(\"paddle x: \" + paddleXPosition + \" - \" + (paddleXPosition + PADDLE_WIDTH) );\n\t\tif (obstacle == paddle) {\n\t\t\tpaddleCollisionCount++;\n\t\t\t\n\t\t\t// if we're hitting the paddle's side, we need to also bounce horizontally\n\t\t\tif (ball.getX() >= (paddleXPosition + PADDLE_WIDTH) || \n\t\t\t\t(ball.getX() + BALL_RADIUS * 2) <= paddleXPosition ) {\n\t\t\t\tvx = -vx;\t\t\t\t\n\t\t\t}\n\t\t} else {\n \t\t// if the object isn't the paddle, it's a brick\n\t\t\tremove(obstacle);\n\t\t\tnBricksRemaining--;\n\t\t}\n\t\t\n\t\tif (paddleCollisionCount == 7) {\n\t\t\tvx *= 1.1;\n\t\t}\n }", "public void bottomTopCheck() {\n bLCollide = false;\n bRCollide = false;\n tLCollide = false;\n tRCollide = false;\n if(grounded) {\n bottomCollision(); \n }\n else if(!grounded) {\n if(ySpeed > 0 || Math.abs(xSpeed) > Math.abs(ySpeed)) {\n bottomCollision(); \n }\n else if(ySpeed < 0 || Math.abs(xSpeed) > Math.abs(ySpeed)) {\n topCollision();\n }\n }\n }", "public void AI()\r\n\t{\r\n\t\tRandom random = new Random();\r\n\t\tspeed = random.nextInt(2) + 1;\r\n\t\tif (canMove)\r\n\t\t{\r\n\t\t\tif (randomAxis == 1)\r\n\t\t\t{\r\n\t\t\t\tif (xDestination < this.x)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.x -= this.speed;\r\n\t\t\t\t\tthis.hitBox.addX(-(this.speed));\r\n\t\t\t\t\tdirection = KeysDefiner.LEFT;\r\n\t\t\t\t}\r\n\t\t\t\telse if (xDestination > this.x)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.x += this.speed;\r\n\t\t\t\t\tthis.hitBox.addX(this.speed);\r\n\t\t\t\t\tdirection = KeysDefiner.RIGHT;\r\n\t\t\t\t}\r\n\t\t\t\telse if (xDestination == this.x)\r\n\t\t\t\t\trandomAxis = 2;\r\n\t\t\t}\r\n\t\t\telse if (randomAxis == 2)\r\n\t\t\t{\r\n\t\t\t\tif (yDestination < this.y)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.y -= this.speed;\r\n\t\t\t\t\tthis.hitBox.addY(-(this.speed));\r\n\t\t\t\t\tdirection = KeysDefiner.UP;\r\n\t\t\t\t}\r\n\t\t\t\telse if (yDestination > this.y)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.y += this.speed;\r\n\t\t\t\t\tthis.hitBox.addY(this.speed);\r\n\t\t\t\t\tdirection = KeysDefiner.DOWN;\r\n\t\t\t\t}\r\n\t\t\t\telse if (yDestination == this.y)\r\n\t\t\t\t\trandomAxis = 1;\r\n\t\t\t}\r\n\t\t\tif (yDestination == this.y && xDestination == this.x)\r\n\t\t\t{\r\n\t\t\t\tif (spotsNumber == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\txDestination = random.nextInt(SCREEN_W / 2) * 2;\r\n\t\t\t\t\tyDestination = random.nextInt(SCREEN_H / 2) * 2;\r\n\t\t\t\t\tspotsNumber++;\r\n\t\t\t\t}\r\n\t\t\t\telse if (spotsNumber == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\txDestination = -(SCREEN_W / 21);\r\n\t\t\t\t\tyDestination = -(SCREEN_H / 12);\r\n\t\t\t\t\tspotsNumber++;\r\n\t\t\t\t}\r\n\t\t\t\telse lastDestinationReached = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic boolean drive2Exit() throws Exception {\r\n\t\t// Need to keep track of current position --> give current position to getNeighborClosestToExit\r\n\t\trobot.mC.mapMode = true;\r\n\t\trobot.mC.showSolution = true;\r\n\t\trobot.mC.showMaze = !robot.mC.showMaze;\r\n\t\trobot.mC.notifyViewerRedraw();\r\n\r\n\t\tHandler handler = new Handler();\r\n\t\thandler.postDelayed(new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\t//if(mC.isOutside(mC.px, mC.py) == false){\r\n\t\t\t\tif (paused == false) {\r\n\t\t\t\t\tif (robot.isAtExit() == false) {\r\n\t\t\t\t\t\t// energy\r\n\t\t\t\t\t\tif (robot.getBatteryLevel() > 0) {\r\n\r\n\t\t\t\t\t\t\t// Get current x and y positions\r\n\t\t\t\t\t\t\tint currX = 0;\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tcurrX = robot.getCurrentPosition()[0];\r\n\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tint currY = 0;\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tcurrY = robot.getCurrentPosition()[1];\r\n\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tint[] neighbor = robot.mC.mazeConfig.getNeighborCloserToExit(currX, currY);\r\n\t\t\t\t\t\t\t//CardinalDirection currdirection = robot.getCurrentDirection() ;\r\n\r\n\t\t\t\t\t\t\t// Find the distance between the current cell and the neighbor cell\r\n\t\t\t\t\t\t\tint xDist = currX - neighbor[0];\r\n\t\t\t\t\t\t\tint yDist = currY - neighbor[1];\r\n\t\t\t\t\t\t\tSystem.out.println(\"move forward\");\r\n\r\n\r\n\t\t\t\t\t\t\t//Get the current direction of the robot and get the current direction of the neighbor\r\n\t\t\t\t\t\t\tCardinalDirection currDirection = robot.getCurrentDirection();\r\n\t\t\t\t\t\t\tCardinalDirection neighborDirection = CardinalDirection.getDirection(xDist, yDist);\r\n\r\n\t\t\t\t\t\t\t//Manually move the robot\r\n\t\t\t\t\t\t\trobot.currentPosition = neighbor; //current position from the basic robot is neighbor\r\n\t\t\t\t\t\t\trobot.mC.setCurrentPosition(neighbor[0], neighbor[1]);\r\n\t\t\t\t\t\t\trobot.setPathLength();\r\n\t\t\t\t\t\t\tmC.notifyViewerRedraw();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tdrive2Exit();\r\n\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n\t\t\t\t\t\t\t//Use basic robot to move\r\n\t\t\t\t\t\t\t//Fix the direction the robot faces\r\n\t\t\t\t\t\t\tif (currDirection.oppositeDirection() == neighborDirection) {\r\n\t\t\t\t\t\t\t\trobot.rotate(Turn.AROUND);\r\n\t\t\t\t\t\t\t\tmC.notifyViewerRedraw();\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tdrive2Exit();\r\n\t\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else if (currDirection.rotateClockwise() == neighborDirection) {\r\n\t\t\t\t\t\t\t\trobot.rotate(Turn.RIGHT);\r\n\t\t\t\t\t\t\t\tmC.notifyViewerRedraw();\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tdrive2Exit();\r\n\t\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else if (currDirection.rotateCounterClockwise() == neighborDirection) {\r\n\t\t\t\t\t\t\t\trobot.rotate(Turn.LEFT);\r\n\t\t\t\t\t\t\t\tmC.notifyViewerRedraw();\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tdrive2Exit();\r\n\t\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t//if there is not enough energy or there is an obstacle\r\n\t\t\t\t\t\t\tnotEnoughEnergy = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},10);\r\n\r\n\t\tif (notEnoughEnergy == true){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(robot.isAtExit()){\r\n\t\t\trobot.mC.state = Constants.StateGUI.STATE_FINISH;\r\n\t\t\treachedExit = true;\r\n\t\t\trobot.mC.notifyViewerRedraw();\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Test\n public void testGetVerticalPillarBelow(){\n Pillar pillar = largePillarMap.get(Maze.position(0,0));\n Pillar edgePillar = largePillarMap.get(Maze.position(4,4));\n Pillar neighbor = largeMaze.getVerticalPillar(pillar, false);\n assertEquals(null, neighbor);\n\n neighbor = largeMaze.getVerticalPillar(edgePillar, false);\n assertEquals(4, neighbor.getX());\n assertEquals(3, neighbor.getY());\n }", "private void CheckWorldCollision() {\n\t\tfor(WorldObj obj : World.CurrentWorld.SpawnedObjects) {\n\t\t\tif(bounds.overlaps(obj.bounds))\n\t\t\t\tobj.OnCollision(this);\n\t\t\tif(MapRenderer.CurrentRenderer.ItemAnimation != null) {\n\t\t\t\tif(obj.ai != null) {\n\t\t\t\t\tif(dir == LEFT)\n\t\t\t\t\tAttackBounds.set(pos.x+(dir*1.35f)+0.5f,pos.y,1.35f,1);\n\t\t\t\t\telse\n\t\t\t\t\t\tAttackBounds.set(pos.x+0.5f,pos.y,1.35f,1);\n\t\t\t\t\tif(obj.healthBarTimer > 0.4f)\n\t\t\t\tif(AttackBounds.overlaps(obj.bounds)) {\n\t\t\t\t\tif(!Terrain.CurrentTerrain.isSolid((int)(pos.x+0.5f+(0.3f*dir)), (int)(pos.y+0.5f)))\n\t\t\t\t\tobj.ai.onDamaged(this, UsedItem, GetATK());\n\t\t\t\t\tHitTimer = 0;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(obj.damageable) {\n\t\t\t\t\tif(AttackBounds.overlaps(obj.bounds)) {\n\t\t\t\t\t\tobj.onDamaged(this, UsedItem, GetATK());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void testCollisions () \n\t{\n\t r1.set(level.bird.position.x, level.bird.position.y,\n\t \t\t level.bird.bounds.width+.03f, level.bird.bounds.height);\n\t \n\t // Test collision: Pipes\n\t for (Pipe pipe : level.pipes) \n\t {\n\t \t r2.set(pipe.position.x, pipe.position.y, pipe.bounds.width,\n\t \t\t\t pipe.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t \n\t \t onCollisionBirdWithPipe(pipe);\n\t }\n\t \n\t // Test collision: GoldCoins\n\t for (GoldCoin goldcoin : level.goldcoins)\n\t {\n\t \t if (goldcoin.collected) continue;\n\t \t r2.set(goldcoin.position.x, goldcoin.position.y,\n\t \t\t\t goldcoin.bounds.width, goldcoin.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithGoldCoin(goldcoin);\n\t \t break;\n\t }\n\t \n\t // Test collision: Dp\n\t for (DoublePoint doublepoint : level.doublepoints) \n\t {\n\t \t if (doublepoint.collected) continue;\n\t \t r2.set(doublepoint.position.x, doublepoint.position.y,\n\t \t\t\t doublepoint.bounds.width, doublepoint.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithDoublePoint(doublepoint);\n\t \t break;\n\t }\n\t \n\t // Test collision: Goal\n\t for (Goal goal : level.goals)\n\t {\n\t \t r2.set(goal.position.x, goal.position.y,\n\t \t\t\t goal.bounds.width, goal.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t onCollisionBirdWithGoal(goal);\n\t \t break;\n\t }\n\t \n\t // Test collision: Brick\n\t for (Brick brick : level.bricks) \n\t {\n\t \t r2.set(brick.position.x, brick.position.y, brick.bounds.width,\n\t \t\t\t brick.bounds.height);\n\t \t if (!r1.overlaps(r2)) continue;\n\t \t \n\t \t onCollisionBirdWithBrick(brick);\n\t }\n\t }", "private void checkCollisions() {\n float x = pacman.getPos().x;\n float y = pacman.getPos().y;\n\n GameEntity e;\n for (Iterator<GameEntity> i = entities.iterator(); i.hasNext(); ) {\n e = i.next();\n // auf kollision mit spielfigur pruefen\n if (Math.sqrt((x - e.getPos().x) * (x - e.getPos().x) + (y - e.getPos().y) * (y - e.getPos().y)) < 0.5f)\n if (e.collide(this, pacman))\n i.remove();\n }\n }", "@Override\r\n public void applyEntityCollision(Entity entity)\r\n {\r\n Vector3 v = Vector3.getNewVector();\r\n Vector3 v1 = Vector3.getNewVector();\r\n\r\n blockBoxes.clear();\r\n\r\n int sizeX = blocks.length;\r\n int sizeY = blocks[0].length;\r\n int sizeZ = blocks[0][0].length;\r\n Set<Double> topY = Sets.newHashSet();\r\n for (int i = 0; i < sizeX; i++)\r\n for (int k = 0; k < sizeY; k++)\r\n for (int j = 0; j < sizeZ; j++)\r\n {\r\n ItemStack stack = blocks[i][k][j];\r\n if (stack == null || stack.getItem() == null) continue;\r\n\r\n Block block = Block.getBlockFromItem(stack.getItem());\r\n AxisAlignedBB box = Matrix3.getAABB(posX + block.getBlockBoundsMinX() - 0.5 + boundMin.x + i,\r\n posY + block.getBlockBoundsMinY() + k,\r\n posZ + block.getBlockBoundsMinZ() - 0.5 + boundMin.z + j,\r\n posX + block.getBlockBoundsMaxX() + 0.5 + boundMin.x + i,\r\n posY + block.getBlockBoundsMaxY() + k,\r\n posZ + block.getBlockBoundsMaxZ() + 0.5 + boundMin.z + j);\r\n blockBoxes.add(box);\r\n topY.add(box.maxY);\r\n }\r\n\r\n v.setToVelocity(entity).subtractFrom(v1.setToVelocity(this));\r\n v1.clear();\r\n Matrix3.doCollision(blockBoxes, entity.getEntityBoundingBox(), entity, 0, v, v1);\r\n for(Double d: topY)\r\n if (entity.posY >= d && entity.posY + entity.motionY <= d && motionY <= 0)\r\n {\r\n double diff = (entity.posY + entity.motionY) - (d + motionY);\r\n double check = Math.max(0.5, Math.abs(entity.motionY + motionY));\r\n if (diff > 0 || diff < -0.5 || Math.abs(diff) > check)\r\n {\r\n entity.motionY = 0;\r\n }\r\n }\r\n\r\n boolean collidedY = false;\r\n if (!v1.isEmpty())\r\n {\r\n if (v1.y >= 0)\r\n {\r\n entity.onGround = true;\r\n entity.fallDistance = 0;\r\n entity.fall(entity.fallDistance, 0);\r\n }\r\n else if (v1.y < 0)\r\n {\r\n boolean below = entity.posY + entity.height - (entity.motionY + motionY) < posY;\r\n if (below)\r\n {\r\n v1.y = 0;\r\n }\r\n }\r\n if (v1.x != 0) entity.motionX = 0;\r\n if (v1.y != 0) entity.motionY = motionY;\r\n if (v1.z != 0) entity.motionZ = 0;\r\n if (v1.y != 0) collidedY = true;\r\n v1.addTo(v.set(entity));\r\n v1.moveEntity(entity);\r\n }\r\n if (entity instanceof EntityPlayer)\r\n {\r\n EntityPlayer player = (EntityPlayer) entity;\r\n if (Math.abs(player.motionY) < 0.1 && !player.capabilities.isFlying)\r\n {\r\n entity.onGround = true;\r\n entity.fallDistance = 0;\r\n }\r\n if (!player.capabilities.isCreativeMode && !player.worldObj.isRemote)\r\n {\r\n EntityPlayerMP entityplayer = (EntityPlayerMP) player;\r\n if (collidedY) entityplayer.playerNetServerHandler.floatingTickCount = 0;\r\n }\r\n }\r\n }" ]
[ "0.6228715", "0.6116625", "0.6021622", "0.592796", "0.5871241", "0.5832235", "0.5802956", "0.578078", "0.5776146", "0.5694772", "0.56522954", "0.5627714", "0.56246036", "0.5612448", "0.55785555", "0.5566004", "0.5559047", "0.55398303", "0.5518442", "0.5518364", "0.5516699", "0.55011797", "0.55002445", "0.54854506", "0.54751736", "0.5464899", "0.54639107", "0.5448659", "0.542787", "0.542362", "0.5416145", "0.54022133", "0.53994465", "0.5398979", "0.5398212", "0.539688", "0.5385633", "0.5379745", "0.53777933", "0.5377567", "0.53634727", "0.5362971", "0.53616923", "0.53563637", "0.53545904", "0.53519005", "0.53398746", "0.53345686", "0.5325174", "0.5324773", "0.5322565", "0.5321309", "0.5310034", "0.53067476", "0.53066325", "0.52961504", "0.5293206", "0.528467", "0.5268872", "0.5265945", "0.52614933", "0.5255081", "0.5243087", "0.524106", "0.5239311", "0.5238811", "0.5238641", "0.5235471", "0.52331346", "0.52301115", "0.52267104", "0.52251345", "0.5224427", "0.5223191", "0.5216961", "0.52116835", "0.52012634", "0.51976323", "0.5191721", "0.5189098", "0.51860774", "0.5185976", "0.5184748", "0.5181443", "0.51757413", "0.517572", "0.5171406", "0.51649284", "0.5162588", "0.51597345", "0.5158988", "0.51537526", "0.51515436", "0.51510096", "0.5140129", "0.5139626", "0.5138269", "0.5136124", "0.51357204", "0.51351535" ]
0.78761065
0
handle updates the state of the tank and the tank's bullets.
void handle(final long nanos) { bulletManager.update(nanos); if (activeOps.contains(Op.FIRE)) { bulletManager.addBullet( getBulletLaunchPoint(), getTheta(), nanos ); bulletManager.lock = true; } bulletManager.handleMazeCollisions(); if (bulletManager.isReloading()) { head.getPolygon().setFill(outOfAmmoHeadColor); } else { head.getPolygon().setFill(headColor); } if (activeOps.contains(Op.RIGHT)) { right(); } if (activeOps.contains(Op.LEFT)) { left(); } handleMazeCollisions(); if (activeOps.contains(Op.FORWARD)) { forward(); } if (activeOps.contains(Op.REVERSE)) { back(); } handleMazeCollisions(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void trackBullets(){\n for (int i = 0; i < bullets.size(); i++){\n Bullet tempBullet = bullets.get(i);\n //update the position of the bullets\n tempBullet.update();\n tempBullet.drawBullet();\n //check if the bullet hit the boundary, remove the bullet from the list of the bullet\n if(tempBullet.detectBound()){\n bullets.remove(i);\n continue;\n }\n //detect if the bullet hit the boss and cause the damage if yes\n if(tempBullet.hitObject(Main.boss) && Main.boss.alive){\n Main.boss.decreaseHealth(attack);\n tempBullet.drawHit();\n bullets.remove(i);\n if(Main.boss.health <= 0){\n Main.boss.alive = false;\n Main.boss.deadTime = millis();\n Main.score += 100;\n }\n }\n //detect if the bullet hit the enemy and cause the damage if yes\n for(int j = 0; j < Main.enemies.size(); j++){\n Enemy tempEnemy = Main.enemies.get(j);\n if(tempBullet.hitObject(tempEnemy) && tempEnemy.alive){\n tempBullet.drawHit();\n tempEnemy.decreaseHealth(attack);\n // if enemy is totally hitted, wait one 1s, and then removed\n if(tempEnemy.health <= 0){\n tempEnemy.alive = false;\n tempEnemy.deadTime = millis();\n }\n bullets.remove(i);\n break;\n }\n }\n }\n }", "public void trackBullets(){\n // bossbullet control, if it hit the bound, remove the bullet\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n tempBullet.update();\n tempBullet.drawBullet();\n // print (tempBullet.posX, tempBullet.posY,'\\n');\n if(tempBullet.detectBound()){\n bossBullets.remove(i);\n continue;\n }\n\n if(tempBullet.hitObject(Main.player) && !Main.player.invincible){\n Main.player.decreaseHealth(1);\n Main.player.posX = width / 2;\n Main.player.posY = height * 9 / 10;\n Main.player.invincible = true;\n Main.player.invincibleTime = millis();\n }\n\n }\n }", "private void tankWillShoot(Graphics2D g2d, GameState state) {\n if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() > 0 && state.getGunType() % 2 == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfCannonBullet(tankObject.getNumOfCannonBullet() - 1);\n if (tankObject.getCannonLevel() == 1) {\n state.getMissiles().add(new Missile(state, 15));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (tankObject.getCannonLevel() == 2) {\n state.getMissiles().add(new Missile(state, 30));\n state.getMissiles().get(state.getMissiles().size() - 1).missileDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/heavygun.wav\", 0);\n state.setMouseClicked(false);\n }\n } else if (state.isMouseClicked() && tankObject.getNumOfCannonBullet() == 0 && state.getGunType() % 2 == 1) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n state.setMouseClicked(false);\n }\n for (Missile missile : state.getMissiles()) {\n missile.paint(g2d, state);\n }\n if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() > 0 && state.getGunType() % 2 == 0) {\n if (numOfRenderBullet1 == 0 && tankObject.getMachineGunLevel() == 1) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 20));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet2 == 0 && tankObject.getMachineGunLevel() == 2) {\n if (!state.getInfiniteMissilesCheatCode().isCheatCodeEntered())\n tankObject.setNumOfMachineGunBullet(tankObject.getNumOfMachineGunBullet() - 1);\n state.getBullets().add(new Bullet(state, 30));\n state.getBullets().get(state.getBullets().size() - 1).bulletDirection(state);\n AudioPlayer tankMissileSFX = new AudioPlayer(\"sound effects/lightgun.wav\", 0);\n state.setMouseClicked(false);\n }\n if (numOfRenderBullet1 <= 7) {\n numOfRenderBullet1++;\n }\n if (numOfRenderBullet1 == 7) {\n numOfRenderBullet1 = 0;\n }\n if (numOfRenderBullet2 <= 3) {\n numOfRenderBullet2++;\n }\n if (numOfRenderBullet2 == 3) {\n numOfRenderBullet2 = 0;\n }\n }\n else if (state.isMousePressed() && tankObject.getNumOfMachineGunBullet() == 0 && state.getGunType() % 2 == 0) {\n AudioPlayer emptyGunSFX = new AudioPlayer(\"sound effects/emptyGun.wav\", 0);\n }\n for (Bullet bullet : state.getBullets()) {\n bullet.paint(g2d, state);\n }\n }", "public void tick() {\n boolean shouldHaltAfterTick = false;\n\n List<Pair<Movement, Bullet>> movements = new ArrayList<>();\n\n //Bullets on nodes\n Map<Coordinate, Bullet> capturedBullets = new HashMap<>(bullets);\n capturedBullets.keySet().retainAll(nodes.keySet());\n\n //Bullets not on nodes\n Map<Coordinate, Bullet> freeBullets = new HashMap<>(bullets);\n freeBullets.keySet().removeAll(capturedBullets.keySet());\n\n //Generate movements for free bullets\n for (Map.Entry<Coordinate, Bullet> entry : freeBullets.entrySet()) {\n Bullet bullet = entry.getValue();\n Coordinate coord = entry.getKey();\n Coordinate newCoord = entry.getKey().plus(bullet.getDirection()).wrap(width, height);\n movements.add(new Pair<>(new Movement(coord, newCoord), bullet));\n }\n\n //Update captured bullets\n for (Map.Entry<Coordinate, Bullet> entry : capturedBullets.entrySet()) {\n Coordinate coordinate = entry.getKey();\n INode node = nodes.get(coordinate);\n\n // special case\n if (node instanceof NodeHalt)\n shouldHaltAfterTick = true;\n\n //TODO this brings great shame onto my family\n Direction bulletDirection = entry.getValue().getDirection();\n Direction dir = Direction.UP;\n while (dir != node.getRotation()) {\n dir = dir.clockwise();\n bulletDirection = bulletDirection.antiClockwise();\n }\n Bullet bullet = new Bullet(bulletDirection, entry.getValue().getValue());\n\n Map<Direction, BigInteger> bulletParams = node.run(bullet);\n\n for (Map.Entry<Direction, BigInteger> newBulletEntry : bulletParams.entrySet()) {\n //TODO this too\n bulletDirection = newBulletEntry.getKey();\n dir = Direction.UP;\n while (dir != node.getRotation()) {\n dir = dir.clockwise();\n bulletDirection = bulletDirection.clockwise();\n }\n\n Bullet newBullet = new Bullet(bulletDirection, newBulletEntry.getValue());\n Coordinate newCoordinate = coordinate.plus(newBullet.getDirection()).wrap(width, height);\n Movement movement = new Movement(coordinate, newCoordinate);\n movements.add(new Pair<>(movement, newBullet));\n }\n }\n\n //Remove swapping bullets\n List<Movement> read = new ArrayList<>();\n Set<Coordinate> toDelete = new HashSet<>();\n for (Pair<Movement, Bullet> pair : movements) {\n Movement movement = pair.getKey();\n Coordinate from = movement.getFrom();\n Coordinate to = movement.getTo();\n boolean foundSwaps = read.stream().anyMatch(other -> from.equals(other.getTo()) && to.equals(other.getFrom()));\n if (foundSwaps) {\n toDelete.add(from);\n toDelete.add(to);\n }\n read.add(movement);\n }\n movements.removeIf(pair -> toDelete.contains(pair.getKey().getFrom()) || toDelete.contains(pair.getKey().getTo()));\n\n //Remove bullets that end in the same place\n read.clear();\n toDelete.clear();\n for (Pair<Movement, Bullet> pair : movements) {\n Movement movement = pair.getKey();\n Coordinate to = movement.getTo();\n boolean foundSameFinal = read.stream().anyMatch(other -> to.equals(other.getTo()));\n if (foundSameFinal) {\n toDelete.add(to);\n }\n read.add(movement);\n }\n movements.removeIf(pair -> toDelete.contains(pair.getKey().getTo()));\n\n //Move bullets\n Map<Coordinate, Bullet> newBullets = new HashMap<>();\n for (Pair<Movement, Bullet> pair : movements) {\n Movement movement = pair.getKey();\n Bullet bullet = pair.getValue();\n newBullets.put(movement.getTo(), bullet);\n }\n\n bullets.clear();\n bullets.putAll(newBullets);\n\n if (shouldHaltAfterTick)\n halt();\n }", "private void UpdateBullets()\n\t {\n\t for(int i = 0; i < BulletList.size(); i++)\n\t {\n\t Bullet bullet = BulletList.get(i);\n\t \n\t // Move the bullet.\n\t bullet.Update();\n\t \n\t // checks if the bullet has it left the screen\n\t if(bullet.HasLeftScreen()){\n\t BulletList.remove(i);\n\t \n\t continue;\n\t }\n\t \n\t // checks if the bullet hit the enemy\n\t Rectangle BulletRectangle = new Rectangle((int)bullet.xCoord, (int)bullet.yCoord, bullet.BulletImage.getWidth(), bullet.BulletImage.getHeight());\n\t // Go trough all enemies.\n\t for(int j = 0; j < EnemyList.size(); j++)\n\t {\n\t Enemy eh = EnemyList.get(j);\n\n\t \n\t Rectangle EnemyRectangel = new Rectangle(eh.xCoord, eh.yCoord, eh.EnemyHelicopterImage.getWidth(), eh.EnemyHelicopterImage.getHeight());\n\n\t // Checks whether the the bullet has hit the enemy\n\t if(BulletRectangle.intersects(EnemyRectangel))\n\t {\n\t // Bullet hit the enemy so we reduce his health.\n\t eh.Health -= Bullet.DamagePower;\n\t \n\t // Bullet was also destroyed so we remove it.\n\t BulletList.remove(i);\n\t \n\t \n\t }\n\t }\n\t }\n\t }", "void update() {\n for (int i = 0; i < bullets.size(); i++) {//if any bullets expires remove it\n if (bullets.get(i).off) {\n bullets.remove(i);\n i--;\n }\n }\n move();//move everything\n checkPositions();//check if anything has been shot or hit\n }", "@Override\n public void update(float dt) {\n //bulletUpdate(dt,b2body);\n stateTime += dt;\n bulletUpdate(b2body,bulletSprite1);\n bulletUpdate(b2body2,bulletSprite2);\n bulletUpdate(b2body3,bulletSprite3);\n\n\n\n }", "public void update() {\n double newAngle = angle - 90;\n Coordinate nextCenterPointCoordinate = new Coordinate(\n this.centerPointCoordinate.getXCoordinate() - (Constants.BULLET_SPEED * Math.cos(Math.toRadians(newAngle))),\n this.centerPointCoordinate.getYCoordinate() + (Constants.BULLET_SPEED * Math.sin(Math.toRadians(newAngle)))\n );\n\n\n ArrayList<Wall> walls = new ArrayList<>();\n walls.addAll(TankTroubleMap.getDestructibleWalls());\n walls.addAll(TankTroubleMap.getIndestructibleWalls());\n ArrayList<Coordinate> nextCoordinatesArrayList = makeCoordinatesFromCenterCoordinate(nextCenterPointCoordinate);\n Wall wallToCheck = null;\n for (Wall wall : walls) {\n if (TankTroubleMap.checkOverLap(wall.getPointsArray(), nextCoordinatesArrayList)) {\n wallToCheck = wall;\n }\n }\n\n if (wallToCheck != null) {\n if (horizontalCrash(wallToCheck)) { //if the bullet would only go over horizontal side of any walL\n nextCenterPointCoordinate = flipH();\n } else if (verticalCrash(wallToCheck)) { // if the bullet would only go over vertical side any wall\n nextCenterPointCoordinate = flipV();\n } else {// if the bullet would only go over corner of any wall\n int cornerCrashState = cornerCrash(wallToCheck);\n nextCenterPointCoordinate = flipCorner(cornerCrashState);\n }\n\n if (wallToCheck.isDestroyable()) {//crashing destructible\n //System.out.println(\"bullet damage:\"+ damage);\n //System.out.println(\"wall health:\"+ ((DestructibleWall) wallToCheck).getHealth());\n ((DestructibleWall) wallToCheck).receiveDamage(damage);\n if (((DestructibleWall) wallToCheck).getHealth() <= 0) {\n TankTroubleMap.getDestructibleWalls().remove(wallToCheck);\n }\n bulletsBlasted = true;\n tankTroubleMap.getBullets().remove(this);\n }\n }\n this.centerPointCoordinate = nextCenterPointCoordinate;\n updateArrayListCoordinates();\n\n // Tanks / users\n if (!bulletsBlasted) {\n for (int i = 0; i < tankTroubleMap.getUsers().size(); i++) {\n if (TankTroubleMap.checkOverLap(coordinates, tankTroubleMap.getUsers().get(i).getUserTank().getTankCoordinates())) {\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n tankTroubleMap.getUsers().get(i).getUserTank().receiveDamage(damage);\n //System.out.println(\"health: \" + tankTroubleMap.getUsers().get(i).getUserTank().getHealth());\n if (tankTroubleMap.getUsers().get(i).getUserTank().getHealth() <= 0) {\n int finalI = i;\n Thread thread = new Thread(() -> {\n try {\n SoundsOfGame soundsOfGame = new SoundsOfGame(\"explosion\", false);\n soundsOfGame.playSound();\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_A.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_B.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_C.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_D.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_E.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_F.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_G.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_H.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().remove(finalI);\n gameOverCheck();\n if (isUserTank) {\n tankTroubleMap.getUsers().get(tankIndex).getUserTank().setNumberOfDestroyedTank(tankTroubleMap.getUsers().get(tankIndex).getUserTank().getNumberOfDestroyedTank() + 1);\n }\n tankTroubleMap.getAudience().add(tankTroubleMap.getUsers().get(finalI));\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n }\n break;\n }\n }\n }\n\n // Tanks / bots\n if (!bulletsBlasted) {\n for (int i = 0; i < tankTroubleMap.getBots().size(); i++) {\n if (TankTroubleMap.checkOverLap(coordinates, tankTroubleMap.getBots().get(i).getAiTank().getTankCoordinates())) {\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n tankTroubleMap.getBots().get(i).getAiTank().receiveDamage(damage);\n //System.out.println(\"health: \" + tankTroubleMap.getBots().get(i).getAiTank().getHealth());\n if (tankTroubleMap.getBots().get(i).getAiTank().getHealth() <= 0) {\n // System.out.println(\"Blasted Tank.......\");\n int finalI = i;\n Thread thread = new Thread(() -> {\n try {\n SoundsOfGame soundsOfGame = new SoundsOfGame(\"explosion\", false);\n soundsOfGame.playSound();\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_A.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_B.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_C.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_D.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_E.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_F.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_G.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_H.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().remove(finalI);\n gameOverCheck();\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n }\n break;\n }\n }\n }\n }", "private void battleTickStatuses(){\n updateStatuses(battleEnemies);\n updateStatuses(battleAllies);\n }", "public void shootBullet( ){\n bulletsFired.add(new Bullet((short)(this.xPos + BOX_HEIGHT), (short)((this.getYPos() + (BOX_HEIGHT+15))), this.xPos, this.id, (byte) 0, (byte) 0, shootingDirection, currentWeapon.getKey()));\n\n byte weaponFired = currentWeapon.getKey();\n switch (weaponFired){\n case PISTOL_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n case MACHINEGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(MACHINEGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(MACHINEGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case SHOTGUN_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SHOTGUN_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SHOTGUN_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.shotgunSound);\n break;\n case SNIPER_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(SNIPER_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(SNIPER_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case UZI_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(UZI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(UZI_RANGE);\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.machineGunSound);\n break;\n case AI_WEAPON_ID: bulletsFired.get(bulletsFired.size()-1).setDmg(AI_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n System.out.println(\"Bullet sound \" + audioHandler.getSoundEffectVolume());\n audioHandler.updateSFXVolume(audioHandler.getSoundEffectVolume());\n audioHandler.playSoundEffect(audioHandler.pistolSound);\n break;\n default: bulletsFired.get(bulletsFired.size()-1).setDmg(DEFAULT_DMG);\n bulletsFired.get(bulletsFired.size()-1).setRange(DEFAULT_RANGE);\n\n }\n }", "public void moveBullets() {\n bController.increment();\n }", "@Override\r\n\tpublic void onCollisionWithBullet() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\tAlly.update();\r\n\t\tEnemy.update();\r\n\t\tfor(int i = 0 ; i < GroundList.size();i++){\r\n\t\t\tif(GroundList.get(i).kill) {\r\n\t\t\t\tGroundList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < BarelList.size(); i++) {\r\n\t\t\tif(BarelList.get(i).kill) {\r\n\t\t\t\tBarelList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < WoodList.size(); i++) {\r\n\t\t\tif(WoodList.get(i).kill) {\r\n\t\t\t\tWoodList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < FireBallList.size(); i++) {\r\n\t\t\tif(FireBallList.get(i).kill) {\r\n\t\t\t\tFireBallList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < BulletList.size(); i++) {\r\n\t\t\tif(BulletList.get(i).kill) {\r\n\t\t\t\tBulletList.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0 ; i < GroundList.size();i++){\r\n\t\t\tGroundList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0 ; i < BarelList.size(); i++) {\r\n\t\t\tBarelList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < BulletList.size(); i++) {\r\n\t\t\tBulletList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < FireBallList.size(); i++) {\r\n\t\t\tFireBallList.get(i).update();\r\n\t\t}\r\n\t\tfor(int i = 0; i < WoodList.size(); i++) {\r\n\t\t\tWoodList.get(i).update();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(GamePanel.updateTimes%60 == 0) {\r\n\t\t\tEnemy.PushEntity(2, new Vector2f(width*1/2, height/4),enemy);\r\n\t\t}\r\n\t\tfor(int i = 0; i < AllyDeadList.size(); i++) {\r\n\t\t\tAlly.entityList.remove(AllyDeadList.get(i)-i);\r\n\t\t}\r\n\t\tfor(int i = 0; i < EnemyDeadList.size(); i++) {\r\n\t\t\tEnemy.entityList.remove(EnemyDeadList.get(i)-i);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tAllyDeadList.clear();\r\n\t\tEnemyDeadList.clear();\r\n\t\tfor(int i = 0; i < Ally.entityList.size(); i++) {\r\n\t\t\tif(Ally.entityList.get(i).returnHealth() <= 0) {\r\n\t\t\t\tAllyDeadList.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < Enemy.entityList.size(); i++) {\r\n\t\t\tif(Enemy.entityList.get(i).returnHealth() <= 0) {\r\n\t\t\t\tEnemyDeadList.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void update()\n {\n done = false;\n if(data.size()==0)\n {\n data.add('0');\n data.add('0');\n data.add('0');\n data.add('0');\n data.add('0');\n }\n\n boolean isPressed = shot;\n\n keyUP = data.get(0) == '1';\n keyDOWN = data.get(1) == '1';\n keyLEFT = data.get(2) == '1';\n keyRIGHT = data.get(3) == '1';\n shot = data.get(4) == '1';\n\n if(!shot && isPressed)\n {\n if (canShot)\n {\n status.setShot(true);\n if (getBulletType ().equals (\"Laser\"))\n {\n bullets.add (new LaserBulletMulti (getCanonStartX (), getCanonStartY (),\n getDegree (), System.currentTimeMillis (), walls, tanks,canonPower,this.code,kills));\n setBulletType (\"Normal\");\n } else\n {\n bullets.add (new BulletMulti (getCanonStartX (), getCanonStartY (),\n getDegree (), System.currentTimeMillis (), walls, tanks,canonPower,this.code,kills));\n }\n\n canShot = false;\n shot = true;\n new Thread (new Runnable () {\n @Override\n public void run () {\n try {\n Thread.sleep (100);\n shot = false;\n } catch (InterruptedException e) {\n e.printStackTrace ();\n }\n }\n }).start ();\n new Thread (new Runnable () {\n @Override\n public void run () {\n try {\n Thread.sleep (500);\n canShot = true;\n } catch (InterruptedException e) {\n e.printStackTrace ();\n }\n }\n }).start ();\n }\n }\n\n int forX = (int) (6 * Math.cos (Math.toRadians (this.getDegree ())));\n int forY = (int) (6 * Math.sin (Math.toRadians (this.getDegree ())));\n\n if(keyUP && canMove(forX , forY) && isEmpty(forX,forY,1))\n {\n this.addLocX(forX);\n this.addLocY(forY);\n }\n if(keyDOWN && canMove(-1*forX , -1*forY) && isEmpty(forX,forY,-1))\n {\n this.addLocX(-1*forX);\n this.addLocY(-1*forY);\n }\n\n checkPrize();\n\n if(keyRIGHT && !keyLEFT)\n this.increaseDegree();\n\n if(!keyRIGHT && keyLEFT)\n this.decreaseDegree();\n\n\n this.setLocX(Math.max(this.getLocX(), 0));\n this.setLocX(Math.min(this.getLocX(), GameFrameMulti.GAME_WIDTH - 30));\n this.setLocY(Math.max(this.getLocY(), 0));\n this.setLocY(Math.min(this.getLocY(), GameFrameMulti.GAME_HEIGHT - 30));\n done = true;\n }", "@SuppressWarnings(\"rawtypes\")\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t// Bullet //\r\n\t\t////////////\r\n\t\tArrayList msDOWN = GameCraft.getBulletDOWN();\r\n\t\tfor (int i = 0; i < msDOWN.size(); i++) {\r\n\t\t\tBulletDOWN m = (BulletDOWN) msDOWN.get(i);\r\n\t\t\tif (m.isVisible()) \r\n\t\t\t\tm.moveDOWN();\r\n\t\t\telse msDOWN.remove(i);\r\n\t\t}\r\n\r\n\t\tArrayList msUP = GameCraft.getBulletUP();\r\n\t\tfor (int i = 0; i < msUP.size(); i++) {\r\n\t\t\tBulletUP m = (BulletUP) msUP.get(i);\r\n\t\t\tif (m.isVisible()) \r\n\t\t\t\tm.moveUP();\r\n\t\t\telse msUP.remove(i);\r\n\t\t}\r\n\r\n\t\tArrayList msLEFT = GameCraft.getBulletLEFT();\r\n\t\tfor (int i = 0; i < msLEFT.size(); i++) {\r\n\t\t\tBulletLEFT m = (BulletLEFT) msLEFT.get(i);\r\n\t\t\tif (m.isVisible()) \r\n\t\t\t\tm.moveLEFT();\r\n\t\t\telse msLEFT.remove(i);\r\n\t\t}\r\n\r\n\t\tArrayList msRIGHT = GameCraft.getBulletRIGHT();\r\n\t\tfor (int i = 0; i < msRIGHT.size(); i++) {\r\n\t\t\tBulletRIGHT m = (BulletRIGHT) msRIGHT.get(i);\r\n\t\t\tif (m.isVisible()) \r\n\t\t\t\tm.moveRIGHT();\r\n\t\t\telse msRIGHT.remove(i);\r\n\t\t}\r\n\t\t\r\n\t\tArrayList msEnemys = GameCraft.getEnemys();\r\n\t\tif(moveamount >= 150){\r\n\t\t\tfor (int i = 0; i < msEnemys.size(); i++) {\r\n\t\t\t\tEnemys m = (Enemys) msEnemys.get(i);\r\n\t\t\t\tif (m.isVisible()){\r\n\t\t\t\t\tm.moveMe();\r\n\t\t\t\t}else{ \r\n\t\t\t\t\tmsEnemys.remove(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmoveamount = 0;\r\n\t\t}\r\n\t\tmoveamount++;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfor(int a = 0; a < msDOWN.size(); a++){\r\n\t\t\tfor(int b = 0; b < msEnemys.size(); b++){\r\n\t\t\t\tBulletDOWN bdown = (BulletDOWN) msDOWN.get(a);\r\n\t\t\t\tEnemys enemy = (Enemys) msEnemys.get(b);\r\n\t\t\t\tint xbul = bdown.getX();\r\n\t\t\t\tint ybul = bdown.getY();\r\n\t\t\t\tint xenemy = enemy.getX();\r\n\t\t\t\tint yenemy = enemy.getY();\r\n\t\t\t\t\r\n\t\t\t\tif((xbul - xenemy < 20 && xbul - xenemy > -20) && ( ybul - yenemy < 20 && xbul - yenemy > -20)){\r\n\t\t\t\t\tenemy.visible = false;\r\n\t\t\t\t\tscoreamount++;\r\n\t\t\t\t\t//GameCraft.SpawnEnemys();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int a = 0; a < msRIGHT.size(); a++){\r\n\t\t\tfor(int b = 0; b < msEnemys.size(); b++){\r\n\t\t\t\tBulletRIGHT bright = (BulletRIGHT) msRIGHT.get(a);\r\n\t\t\t\tEnemys enemy = (Enemys) msEnemys.get(b);\r\n\t\t\t\tint xbul = bright.getX();\r\n\t\t\t\tint ybul = bright.getY();\r\n\t\t\t\tint xenemy = enemy.getX();\r\n\t\t\t\tint yenemy = enemy.getY();\r\n\t\t\t\t\r\n\t\t\t\tif((xbul - xenemy < 20 && xbul - xenemy > -20) && ( ybul - yenemy < 20 && xbul - yenemy > -20)){\r\n\t\t\t\t\tenemy.visible = false;\r\n\t\t\t\t\tscoreamount++;\r\n\t\t\t\t\t//GameCraft.SpawnEnemys();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int a = 0; a < msLEFT.size(); a++){\r\n\t\t\tfor(int b = 0; b < msEnemys.size(); b++){\r\n\t\t\t\tBulletLEFT bleft = (BulletLEFT) msLEFT.get(a);\r\n\t\t\t\tEnemys enemy = (Enemys) msEnemys.get(b);\r\n\t\t\t\tint xbul = bleft.getX();\r\n\t\t\t\tint ybul = bleft.getY();\r\n\t\t\t\tint xenemy = enemy.getX();\r\n\t\t\t\tint yenemy = enemy.getY();\r\n\t\t\t\t\r\n\t\t\t\tif((xbul - xenemy < 20 && xbul - xenemy > -20) && ( ybul - yenemy < 20 && xbul - yenemy > -20)){\r\n\t\t\t\t\tenemy.visible = false;\r\n\t\t\t\t\tscoreamount++;\r\n\t\t\t\t\t//GameCraft.SpawnEnemys();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor(int a = 0; a < msUP.size(); a++){\r\n\t\t\tfor(int b = 0; b < msEnemys.size(); b++){\r\n\t\t\t\tBulletUP bup = (BulletUP) msUP.get(a);\r\n\t\t\t\tEnemys enemy = (Enemys) msEnemys.get(b);\r\n\t\t\t\tint xbul = bup.getX();\r\n\t\t\t\tint ybul = bup.getY();\r\n\t\t\t\tint xenemy = enemy.getX();\r\n\t\t\t\tint yenemy = enemy.getY();\r\n\t\t\t\t\r\n\t\t\t\tif((xbul - xenemy < 20 && xbul - xenemy > -20) && ( ybul - yenemy < 20 && xbul - yenemy > -20)){\r\n\t\t\t\t\tenemy.visible = false;\r\n\t\t\t\t\tscoreamount++;\r\n\t\t\t\t\t//GameCraft.SpawnEnemys();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\tEnemy 500 500\r\n\t\tBullet 510 510\r\n\t\t510 < 500 && 480 < 500 || 500 > 510 && 500 > 480\r\n\t\t500 > 320 && 500 > 380\r\n\t\t\r\n\t\t*/\r\n\t\t\r\n\t\t////////////\r\n\t\t// Bullet //\r\n\t\t////////////\r\n\t\tGameCraft.move();\r\n\t\trepaint(); \r\n\t}", "public void onHitByBullet() {\r\n\t\t// Move ahead 100 and in the same time turn left papendicular to the bullet\r\n\t\tturnAheadLeft(100, 90 - hitByBulletBearing);\r\n\t}", "public void shoot() {\n\n //DOWN\n if (moveDown && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveDown && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n } else if (moveDown && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveDown && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //UP\n else if (moveUp && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (5 + this.getySpeed() / 2) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), (-5 + this.getySpeed()) * this.getBulletSpeedMulti());\n\n } else if (moveUp && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n } else if (moveUp && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), (this.getySpeed()) * this.getBulletSpeedMulti());\n }\n\n //LEFT \n else if (moveLeft && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveLeft && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n }\n\n //RIGHT\n else if (moveRight && shootDown) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootUp) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (this.getxSpeed()) * this.getBulletSpeedMulti(), (-5) * this.getBulletSpeedMulti());\n } else if (moveRight && shootLeft) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (-5 + this.getxSpeed() / 2) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } else if (moveRight && shootRight) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), (5 + this.getxSpeed()) * this.getBulletSpeedMulti(), (0) * this.getBulletSpeedMulti());\n } //STANDING STILL\n \n \n if (shootDown && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), 5 * this.getBulletSpeedMulti());\n } else if (shootUp && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 0 * this.getBulletSpeedMulti(), -5 * this.getBulletSpeedMulti());\n\n } else if (shootLeft && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), -5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n } else if (shootRight && !moving) {\n bController.addBullet(\"playerbullet.png\",this.getxPos(), this.getyPos(), this.getRadius(), 5 * this.getBulletSpeedMulti(), 0 * this.getBulletSpeedMulti());\n\n }\n }", "public void shoot(){\r\n \tgame.pending.add(new Bullet(this, bulletlife));\t\r\n }", "@Override\n public void update(GameContainer gc, StateBasedGame stateBasedGame, int delta) throws SlickException {\n timeSinceStart += delta;\n rtimeSinceStart += delta;\n Input input = gc.getInput();\n int mouseX = input.getMouseX();\n int mouseY = input.getMouseY();\n\n\n basicbulletSheet.rotate(90f);\n basicbulletSheet.setCenterOfRotation(16, 16);\n\n // Move this bullet\n for (int i = 0; i < bulletList.size(); i++) {\n bullet = bulletList.get(i);\n bullet.move();\n }\n\n //Add this tower to the this towerList\n if (Tower.isBasicPlaced()) {\n basicTowers.add(new BasicTower());\n System.out.println(basicTowers);\n Tower.setBasicPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isBomberPlaced()) {\n bomberTowers.add(new BomberTower());\n System.out.println(bomberTowers);\n Tower.setBomberPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isSniperPlaced()) {\n sniperTowers.add(new SniperTower());\n System.out.println(sniperTowers);\n Tower.setSniperPlaced(false);\n }\n\n //Add this tower to the this towerList\n if (Tower.isQuickPlaced()) {\n quickTowers.add(new QuickTower());\n System.out.println(quickTowers);\n Tower.setQuickPlaced(false);\n }\n\n //For this tower, calculate how often this tower will shoot bullets\n for (BasicTower basicTower1 : basicTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n if (rtimeSinceStart > basicTower1.rcoolDown + basicTower1.rlastShot) {\n if (enemy.Playrect.intersects(basicTower1.Radius)) {\n basicTower1.basicClicked.setRotation((float) getTargetAngle(basicTower1.towerX,\n basicTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n basicTower1.basicClicked.setCenterOfRotation(32, 32);\n basicTower1.rlastShot = rtimeSinceStart;\n }\n }\n if (timeSinceStart > basicTower1.coolDown + basicTower1.lastShot) {\n if (enemy.Playrect.intersects(basicTower1.Radius)) {\n addNewBullet2(basicTower1.towerX, basicTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 10);\n basicTower1.lastShot = timeSinceStart;\n }\n\n }\n }\n }\n\n //For this tower, calculate how often this tower will shoot bullets\n for (BomberTower bomberTower1 : bomberTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n if (rtimeSinceStart > bomberTower1.rcoolDown + bomberTower1.rlastShot) {\n if (enemy.Playrect.intersects(bomberTower1.Radius)) {\n bomberTower1.bomberClicked.setRotation((float) getTargetAngle(bomberTower1.bombertowerX,\n bomberTower1.bombertowerY, enemy.getStartPosX(), enemy.getStartPosY()));\n bomberTower1.bomberClicked.setCenterOfRotation(32, 32);\n bomberTower1.rlastShot = rtimeSinceStart;\n }\n }\n if (timeSinceStart > bomberTower1.coolDown + bomberTower1.lastShot) {\n if (enemy.Playrect.intersects(bomberTower1.Radius)) {\n addNewBullet2(bomberTower1.bombertowerX, bomberTower1.bombertowerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 10);\n bomberTower1.lastShot = timeSinceStart;\n }\n }\n }\n }\n //For this tower, calculate how often this tower will shoot bullets\n for (SniperTower sniperTower1 : sniperTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n\n if (rtimeSinceStart > sniperTower1.rcoolDown + sniperTower1.rlastShot) {\n if (enemy.Playrect.intersects(sniperTower1.Radius)) {\n sniperTower1.sniperClicked.setRotation((float) getTargetAngle(sniperTower1.towerX,\n sniperTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n sniperTower1.sniperClicked.setCenterOfRotation(32, 32);\n sniperTower1.rlastShot = rtimeSinceStart;\n }\n }\n\n if (timeSinceStart > sniperTower1.coolDown + sniperTower1.lastShot) {\n if (enemy.Playrect.intersects(sniperTower1.Radius)) {\n addNewBullet2(sniperTower1.towerX, sniperTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 50);\n sniperTower1.lastShot = timeSinceStart;\n }\n\n }\n }\n }\n //For this tower, calculate how often this tower will shoot bullets\n for (QuickTower quickTower1 : quickTowers) {\n for (Enemy enemy : enemies) {\n enemy.Playrect = new Circle(enemy.getStartPosX() * w + r,\n enemy.getStartPosY() * w + r, 10);\n\n if (rtimeSinceStart > quickTower1.rcoolDown + quickTower1.rlastShot) {\n if (enemy.Playrect.intersects(quickTower1.Radius)) {\n quickTower1.quickClicked.setRotation((float) getTargetAngle(quickTower1.towerX,\n quickTower1.towerY, enemy.getStartPosX(), enemy.getStartPosY()));\n quickTower1.quickClicked.setCenterOfRotation(32, 32);\n quickTower1.rlastShot = rtimeSinceStart;\n }\n }\n\n\n if (timeSinceStart > quickTower1.coolDown + quickTower1.lastShot) {\n if (enemy.Playrect.intersects(quickTower1.Radius)) {\n radiusVisited = true;\n addNewBullet2(quickTower1.towerX, quickTower1.towerY, enemy.getStartPosX(),\n enemy.getStartPosY(), 5);\n quickTower1.lastShot = timeSinceStart;\n }\n }\n\n }\n }\n\n //A spawn is in progress\n if (spawninProgress) {\n timePassedEnemy += delta;\n if (timePassedEnemy > 800) {\n enemies.add(new Enemy());\n enemySpawns++;\n timePassedEnemy = 0;\n }\n }\n //When enough enemies has spawned, stop the spawninProgress\n if (enemySpawns == enemyCounter) {\n spawninProgress = false;\n //hasbeenDead = false;\n enemySpawns = 0;\n enemyCounter++;\n }\n\n //When no more enemies on maps\n if (enemies.size() == 0) {\n waveinProgress = false;\n startWaveCount = 0;\n }\n\n //Start a new level when there's no more enemies on the map\n if (loadMap.MAP[mouseY / w][mouseX / w] == 16) {\n if (input.isMousePressed(0) && startWaveCount == 0 && !waveinProgress) {\n startWaveCount++;\n if (startWaveCount == 1 && enemies.size() == 0 && !waveinProgress) {\n waveinProgress = true;\n gc.resume();\n spawninProgress = true;\n currentLevel++;\n }\n }\n }\n\n //For each new level, increase the HP of each enemy\n if (currentLevel < currentLevel + 1 && !waveinProgress) {\n for (Enemy enemyHP : enemies) {\n if (enemyHP.getStartPosX() <= 0 && enemyHP.getHP() < enemyHP.startHP + currentLevel) {\n enemyHP.setHP(enemyHP.getHP() + currentLevel);\n }\n }\n }\n\n\n //For each enemies, if enemies has finished their way, decrease player HP\n //and set them inactive\n for (Enemy enemyList : enemies) {\n if (enemyList.counter >= enemyList.path.getLength() - 1) {\n player.decreaseLife();\n bulletCount = 0;\n enemyList.isActive = false;\n }\n\n //If enemies' hp is zero, set them inactive and remove from the list\n if (enemyList.getHP() <= 0) {\n enemyList.isActive = false;\n bulletCount = 0;\n player.addCredits(20);\n }\n enemyList.update(gc, stateBasedGame, delta);\n }\n for (int i = 0; i < enemies.size(); i++) {\n if (!enemies.get(i).isActive) {\n enemies.remove(enemies.get(i));\n }\n }\n\n //For all objects, update\n for (GameObject obj : objects)\n try {\n obj.update(gc, stateBasedGame, delta);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n //Go to Menu\n if (gc.getInput().isKeyPressed(Input.KEY_ESCAPE)) {\n gc.getInput().clearKeyPressedRecord();\n stateBasedGame.enterState(2);\n }\n\n\n }", "@Override\n public void attack(){\n int xBullet=0,yBullet=0;\n switch(direction){\n case 0:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()*3/4);\n break;\n case 1:\n xBullet=(int)(x+Sprite.python_left.getWidth()*3/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 2:\n xBullet=(int)(x+Sprite.python_left.getWidth()/3);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n case 3:\n xBullet=(int)(x+Sprite.python_left.getWidth()/4);\n yBullet=(int)(y+Sprite.python_left.getHeight()/4);\n break;\n }\n PythonBullet pythonBullet=new PythonBullet(xBullet,yBullet,board,Player.PLAYER_SPEED*1.5);\n pythonBullet.setDirection(direction);\n board.addBullets(pythonBullet);\n\n }", "@Test\r\n public void testCheckCollisionBulletsTank() {\r\n Tank tank = new Tank(10, 10, 2);\r\n ArrayList<Bullet> bullets = new ArrayList<>();\r\n bullets.add(new Bullet(10, 10, 0, true));\r\n CollisionUtility.checkCollisionBulletsTank(bullets, tank);\r\n assertEquals(tank.x, 10 * 16);\r\n assertEquals(tank.y, (Map.level0.length - 3) * 16);\r\n assertEquals(tank.starLevel, 0);\r\n assertEquals(tank.shield, true);\r\n tank = new Tank(20, 20, 2);\r\n bullets.add(new Bullet(10, 10, 0, false));\r\n CollisionUtility.checkCollisionBulletsTank(bullets, tank);\r\n assertNotSame(tank.x, 10 * 16);\r\n\r\n }", "void fireBullet() {\n\r\n\t\tif (count > 0)\r\n\t\t\treturn;\r\n\t\t// ...and if all the bullets aren't currently in use...\r\n\t\tint slot = getAvailableBullet();\r\n\t\tif (slot < 0)\r\n\t\t\treturn;\r\n\t\t// ...then launch a new bullet\r\n\t\tbullets[slot].setLocation(locX, locY);\r\n\t\tbullets[slot].setDirection(angle);\r\n\t\tbullets[slot].reset();\r\n\t\t// Reset the timer\r\n\t\tcount = RELOAD;\r\n\t}", "public void update() {\r\n super.update();\r\n life -= 1;\r\n if(life <= 0) {\r\n killBullet();\r\n }\r\n }", "public void onBulletHit(BulletHitEvent event) {\n RobotReference hitRobot;\n hitRobot = robots.get(event.getName());\n\n if (hitRobot.isTeammate()) {\n setTurnRight(90);\n setAhead(400);\n setChargerTarget();\n }\n }", "@Override\n public void update() {\n if(alive==false){\n afterBeKilled();\n return;\n }\n animate();\n chooseState();\n checkBeKilled();\n if(attack){\n if(timeBetweenShot<0){\n chooseDirection();\n attack();\n timeBetweenShot=15;\n }\n else{\n timeBetweenShot--;\n }\n\n }\n else{\n calculateMove();\n setRectangle();\n }\n }", "private void updateDelta() {\n\t\tbulletDelta = Delta.getDelta(\"bullet\");\n\t\tenemyDelta = Delta.getDelta(\"enemy\");\n\t}", "public void attack()\n {\n getWorld().addObject(new RifleBullet(player.getX(), player.getY(), 1, 6, true), getX(), getY()); \n }", "@Override\n\tpublic void update() {\n\t\tgetInput();\n\t\t\n\t\t//swap 2 guns\n\t\tif(handler.getKeyManager().q) {\n\t\t\tswap(next);\n\t\t\thandler.getKeyManager().q = false;\n\t\t}\n\t\t\n\t\tif(isMoving) {\n\t\t\tSoundEffect.playStep();\n\t\t\t\n\t\t\tanim_run_left.update();\n\t\t\tanim_run_right.update();\n\t\t\t\n\t\t\tif(!penetrating) move();\n\t\t\telse {\n\t\t\t\tx += xMove;\n\t\t\t\ty += yMove;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tanim_run_left.reset();\n\t\t\tanim_run_right.reset();\n\t\t\tSoundEffect.stopStep();\n\t\t}\n\t\t\n\t\t//check direction\n\t\theadingRight = (mouseX >= x - handler.getCamera().getxOffset() + getWidth() / 2);\n\t\t\n\t\trotateHands((double) (mouseX - (x - handler.getCamera().getxOffset() + getWidth() / 2)), \n\t\t\t\t (double) ((y - handler.getCamera().getyOffset() + getHeight() / 2) - mouseY));\n\t\t\n\t\t//atk speed\n\t\tif(timer < curr.getDelay()) {\n\t\t\ttimer += System.currentTimeMillis() - lastTime;\n\t\t}\n\t\telse {\n\t\t\ttimer = curr.getDelay();\n\t\t}\n\t\t\n\t\t//if there is no ammo left ==> force reload\n\t\tif (!curr.isShootable()) isReloading = true;\n\t\t\n\t\t//if reloading\n\t\tif(isReloading) {\n\t\t\t//if really need to reload\n\t\t\tif(curr.getCurrAmmo() < curr.getMaxAmmo()) {\n\t\t\t\tif(loading == 0) curr.playReloadSound();\n\t\t\t\t\n\t\t\t\tloading += System.currentTimeMillis() - lastTime;\n\t\t\t\tif(loading >= curr.getReloadTime()) {\n\t\t\t\t\treload();\n\t\t\t\t\tloading = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if full of ammo already ==> cancel reload\n\t\t\telse isReloading = handler.getKeyManager().r = false;\n\t\t}\n\t\t//if not reloading\n\t\telse {\n\t\t\t//if is shooting and able to shoot\n\t\t\tif(isShooting && timer == curr.getDelay()) {\n\t\t\t\tshoot();\n\t\t\t\ttimer = 0;\n\t\t\t}\n\t\t}\n\n\t\tlastTime = System.currentTimeMillis();\n\t\t\n\t\t//set focus\n\t\thandler.getCamera().focusOnEntity(this);\n\t}", "@Override\n\tpublic void update() {\n\t\tif(isMove) {\n\t\t\tspriteMoveToPoint(player, (int) mouseX, (int) mouseY);\n\t\t}\n\t\t\n\t\t//bullet\n\t\tfor(int i = 0; i < bulletList.size(); i++) {\n\t\t\tMoveSprite bullet = bulletList.get(i);\n\t\t\tspriteMoveToPoint(bullet, bullet.getX(), bullet.getY() - bullet.getVelocity());\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < bulletList.size(); i++) {\n\t\t\tMoveSprite bullet = bulletList.get(i);\n\t\t\t\tif(bullet.getY() < 10) {\n\t\t\t\t\tremoveBullet(bullet);\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t//enemy\n\t\tfor(int i = 0; i < enemyList.size(); i++) {\n\t\t\tMoveSprite enemy = enemyList.get(i);\n\t\t\tspriteMoveToPoint(enemy, enemy.getX(), enemy.getY() + enemy.getVelocity());\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < enemyList.size(); i++) {\n\t\t\tMoveSprite enemy = enemyList.get(i);\n\t\t\tif(enemy.getY() > layerheight) {\n\t\t\t\tremoveEnemy(enemy);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < enemyList.size(); i++) {\n\t\t\tEnemy enemy = enemyList.get(i);\n\t\t\tfor(int j = 0; j < bulletList.size(); j++) {\n\t\t\t\tBullet bullet = bulletList.get(j);\n\t\t\t\tcollisionCheckForBulletAndEnemy(enemy, bullet);\n\t\t\t}\n\t\t}\n\t}", "public void shoot(){\n int bulletPosX = posX;\n int bulletPosY = posY;\n int bulletVelX = 0;\n int bulletVelY = -9;\n //add the new bullets to the array of bullets\n bullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,0,attack));\n }", "public void shoot(GraphicsContext graphicsContext) {\n TankBullet bullet = new TankBullet(new FixedCoordinates(getCoordinates().getX() + 17, getCoordinates().getY() + 100), gameEnded, graphicsContext);\n bullet.draw(graphicsContext);\n CoordinatesCache.getInstance().getEnemyBullets().add(bullet);\n }", "public void update(float dt) {\n\t\tIterator<Bullet> iter = bullets.iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tBullet b = iter.next();\n\t\t\t\n\t\t\tb.update(dt);\n\t\t\tif(b.getY() > 480 - bullet_size_h) iter.remove();\n\t\t}\n\t}", "public void update(){\n\n // advance player and entity loader\n player.advance();\n entityloader.advance();\n\n // if the player is shooting\n if (player.isShooting){\n player.nextBullet--;\n if (player.nextBullet < 0){\n audioloader.play(\"plshoot\"); // play audio\n for (int i = -1; i <= 1; ++i){\n playerBullets.add(new Projectile<RectangleHitbox>(player.getCenterX(), player.getCenterY(), 500, 0, 270 + 2.5 * i, 0, 0, false, 1.5, true, 0,\n player.bulletSprite.getRectangleHitbox(player.bulletSize), player.bulletSprite.img.getScaledInstance(player.bulletSize, player.bulletSize, 1), 0, 0, this));\n } \n player.nextBullet = (int)(FPS / player.bulletsPerSecond);\n }\n }\n\n // Player bullets\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n if (bullet.advance()){\n nextPlayerBullets.add(bullet);\n }\n }\n playerBullets.clear();\n for (Projectile<RectangleHitbox> bullet : nextPlayerBullets){\n playerBullets.add(bullet);\n }\n nextPlayerBullets.clear();\n\n // Circle Enemies\n for (Projectile<CircleHitbox> enemy : circleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (!enemy.isBullet){ // if enemy is not a bullet, check if it is being hit by player bullets\n boolean hit = false; // each enemy can only be hit once each frame\n for (Projectile<RectangleHitbox> bullet : playerBullets){\n hit |= bullet.getHitbox().intersects(enemy.getHitbox());\n if (hit)\n break;\n }\n if (hit){\n enemy.damageTaken += enemy.originalLifetime * enemy.percentDamage;\n }\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextCircleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n circleEnemies.clear();\n for (Projectile<CircleHitbox> enemy : nextCircleEnemies){ // swap nextCircleEnemies with circleEnemies\n circleEnemies.add(enemy);\n }\n nextCircleEnemies.clear();\n\n // Rectangle Enemies\n for (Projectile<RectangleHitbox> enemy : rectangleEnemies){\n if (player.invulnerableTime <= 0 && enemy.getHitbox().intersects(player.getHitbox())){\n loseLife();\n }\n if (enemy.advance()){ // if enemy lifetime is not up\n nextRectangleEnemies.add(enemy); // add to next frame\n } else if (enemy.id != 0) { // if lifetime is up\n // tell entity loader enemy with that id is removed\n entityloader.setUnactive(enemy.id);\n }\n }\n rectangleEnemies.clear();\n for (Projectile<RectangleHitbox> enemy : nextRectangleEnemies){ // swap nextRectangleEnemies with rectangleEnemies\n rectangleEnemies.add(enemy);\n }\n nextRectangleEnemies.clear();\n\n }", "private void update() {\n\t\t// checks to see if the w key is down\n\t\tif (wKeyDown) {\n\t\t\tplayer.setY((int) (player.getY() - 8));\n\t\t}\n\t\t// checks to see if the a key is down\n\t\tif (aKeyDown) {\n\t\t\tplayer.setX((int) (player.getX() - 8));\n\t\t}\n\t\t// checks to see if the s key is down\n\t\tif (sKeyDown) {\n\t\t\tplayer.setY((int) (player.getY() + 8));\n\t\t}\n\t\t// checks to see if the d key is down\n\t\tif (dKeyDown) {\n\t\t\tplayer.setX((int) (player.getX() + 8));\n\t\t}\n\t\t\n\t\t// checks to make sure the player is within the bounds\n\t\tcheckBounds();\n\t\t\n\t\t// checks to see if the left mouse button is clicked\n\t\tif (mouseDown) {\n\t\t\t// if doubleshot is activated\n\t\t\tif (doubleShot && bulletDelta > doubleShotShootingSpeed) {\n\t\t\t\t// plays the bullet shooting sound\n\t\t\t\tsound.get(\"shootEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t\n\t\t\t\t// adds the first bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the bullet\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble xChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble yChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\txChange = xChange / magnitude * 20;\n\t\t\t\tyChange = yChange / magnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) xChange);\n\t\t\t\tlastBullet.setYChange((int) yChange);\n\t\t\t\t\n\t\t\t\t// adds the second bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tlastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET2_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET2_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble doubleshotXChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble doubleshotYChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble doubleshotMagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\tdoubleshotXChange = xChange / doubleshotMagnitude * 20;\n\t\t\t\tdoubleshotYChange = yChange / doubleshotMagnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) doubleshotXChange);\n\t\t\t\tlastBullet.setYChange((int) doubleshotYChange);\n\t\t\t\t\n\t\t\t\tDelta.setLastBullet(Delta.getTime());\n\t\t\t}\n\t\t\t// if a bullet is shot and the time since the last bullet is at least shootingSpeed\n\t\t\telse if (bulletShot && bulletDelta > bulletShootingSpeed) {\n\t\t\t\t// plays the bullet shooting sound\n\t\t\t\tsound.get(\"shootEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t\n\t\t\t\t// adds the bullet\n\t\t\t\tbullet.add(new Bullet(this, \"bullet\", 0, 0, 100));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the bullet\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"bulletSprite\").getHeight() / 2 + BULLET_Y_OFFSET);\n\t\t\t\t\n\t\t\t\t// set the angle of the shot\n\t\t\t\tdouble xChange = Mouse.getX() - lastBullet.getX();\n\t\t\t\tdouble yChange = (displayHeight - Mouse.getY()) - lastBullet.getY();\n\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\txChange = xChange / magnitude * 20;\n\t\t\t\tyChange = yChange / magnitude * 20;\n\t\t\t\tlastBullet.setXChange((int) xChange);\n\t\t\t\tlastBullet.setYChange((int) yChange);\n\t\t\t\t\n\t\t\t\tDelta.setLastBullet(Delta.getTime());\n\t\t\t}\n\t\t\t// if a laser is shot\n\t\t\telse if (laserShot) {\n\t\t\t\tif (Delta.getTime() % 6 == 0) {\n\t\t\t\t\t// plays the laser shooting sound\n\t\t\t\t\tsound.get(\"laserEffect\").playAsSoundEffect(1.0f, 0.5f, false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// adds the laser\n\t\t\t\tbullet.add(new Bullet(this, \"laser\", 0, 0, 20));\n\t\t\t\tBullet lastBullet = bullet.get(bullet.size() - 1);\n\t\t\t\t\n\t\t\t\t// sets the x and y coordinates of the laser\n\t\t\t\tlastBullet.setX(player.getX() + sprite.get(\"playerSprite\").getWidth()\n\t\t\t\t\t\t- sprite.get(\"laserSprite\").getWidth() / 2 + BULLET_X_OFFSET);\n\t\t\t\tlastBullet.setY(player.getY() + sprite.get(\"playerSprite\").getHeight()\n\t\t\t\t\t\t- sprite.get(\"laserSprite\").getHeight() + BULLET_Y_OFFSET);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Checks to see if the time since the last enemy is greater than the enemy interval\n\t\tif (!bossSpawned && enemyDelta > generateEnemyInterval()) {\n\t\t\tdouble enemyGenerate = randomGenerator.nextDouble();\n\t\t\tif (enemyGenerate >= 0.3 || Delta.getDelta(\"beginning\") <= 10000)\n\t\t\t\tenemy.add(new Enemy(this, \"green_box\", 0, 0, 300, Delta.getDelta(\"beginning\"), 300));\n\t\t\telse if (enemyGenerate < 0.3)\n\t\t\t\tenemy.add(new Enemy(this, \"red_box\", 0, 0, 400, Delta.getDelta(\"beginning\"), 400));\n\t\t\tEnemy lastEnemy = enemy.get(enemy.size() - 1);\n\t\t\t\n\t\t\tlastEnemy.setX(lastEnemy.generateEnemyX());\n\t\t\tlastEnemy.setY(-lastEnemy.getSprite().getHeight());\n\t\t\tDelta.setLastEnemy(Delta.getTime());\n\t\t}\n\t\t\n\t\tif (bossExplosionNum == 0) {\n\t\t\t// Checks to see if enemy bullets should be generated\n\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\tif (enemy.get(i).getName().equals(\"red_box\") && enemy.get(i).getTimeSinceLastBullet() >= 700) {\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"enemy_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tBullet lastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tSprite enemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tSprite enemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (enemy.get(i).getName().equals(\"boss\") && enemy.get(i).getTimeSinceLastBullet() >= 1000) {\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tBullet lastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tSprite enemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tSprite enemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\tdouble xChange = player.getX() - lastEnemyBullet.getX();\n\t\t\t\t\tdouble yChange = player.getY() - lastEnemyBullet.getY();\n\t\t\t\t\tdouble magnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t\t\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tenemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tenemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\txChange = player.getX() - lastEnemyBullet.getX() - 100;\n\t\t\t\t\tyChange = player.getY() - lastEnemyBullet.getY() - 100;\n\t\t\t\t\tmagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t\t\n\t\t\t\t\tenemy_bullet.add(new Bullet(this, \"boss_bullet\", 0, 0, 100));\n\t\t\t\t\tenemy.get(i).setLastBulletTime(Delta.getDelta(\"beginning\"));\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet = enemy_bullet.get(enemy_bullet.size() - 1);\n\t\t\t\t\tenemySprite = enemy.get(i).getSprite();\n\t\t\t\t\tenemyBulletSprite = lastEnemyBullet.getSprite();\n\t\t\t\t\t\n\t\t\t\t\tlastEnemyBullet.setX(enemy.get(i).getX() + enemySprite.getWidth() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getWidth() / 2);\n\t\t\t\t\tlastEnemyBullet.setY(enemy.get(i).getY() + enemySprite.getHeight() / 2\n\t\t\t\t\t\t\t- enemyBulletSprite.getHeight() / 2);\n\t\t\t\t\t\n\t\t\t\t\t// set the angle of the shot\n\t\t\t\t\txChange = player.getX() - lastEnemyBullet.getX() + 100;\n\t\t\t\t\tyChange = player.getY() - lastEnemyBullet.getY() + 100;\n\t\t\t\t\tmagnitude = Math.sqrt(xChange * xChange + yChange * yChange);\n\t\t\t\t\txChange = xChange / magnitude * 15;\n\t\t\t\t\tyChange = yChange / magnitude * 15;\n\t\t\t\t\tlastEnemyBullet.setXChange((int) xChange);\n\t\t\t\t\tlastEnemyBullet.setYChange((int) yChange);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// spawns the boss if 60 seconds has passed\n\t\tif (Delta.getDelta(\"beginning\") >= 60000 && !bossSpawned) {\n\t\t\tbossSpawned = true;\n\t\t\tenemy.add(new Enemy(this, \"boss\", 0, 0, 10000, Delta.getDelta(\"beginning\"), 500));\n\t\t\t\n\t\t\tEnemy boss = enemy.get(enemy.size() - 1);\n\t\t\tboss.setX(displayWidth / 2 - boss.getSprite().getWidth() / 2);\n\t\t\tboss.setY(-boss.getSprite().getHeight());\n\t\t}\n\t\t\n\t\t// checks for collisions\n\t\tif (bossExplosionNum == 0) {\n\t\t\tfor (int i = 0; i < enemy.size(); i++) {\n\t\t\t\tEntity entity1 = enemy.get(i);\n\t\t\t\t\n\t\t\t\t// if a bullet collides with an enemy\n\t\t\t\tfor (int j = 0; j < bullet.size(); j++) {\n\t\t\t\t\tEntity entity2 = bullet.get(j);\n\t\t\t\t\t\n\t\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tEntity entity2 = player;\n\t\t\t\t\n\t\t\t\t// if the player collides with an enemy\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tEntity entity1 = player;\n\t\t\t// if an enemy bullet collides with the player\n\t\t\tfor (int i = 0; i < enemy_bullet.size(); i++) {\n\t\t\t\tEntity entity2 = enemy_bullet.get(i);\n\t\t\t\t\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if a powerup collides with the player\n\t\t\tfor (int i = 0; i < powerup.size(); i++) {\n\t\t\t\tEntity entity2 = powerup.get(i);\n\t\t\t\t\n\t\t\t\tif (entity1.collidesWith(entity2)) {\n\t\t\t\t\tentity1.collidedWith(entity2);\n\t\t\t\t\tentity2.collidedWith(entity1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// if the player has defeated the boss\n\t\tif (gameWon && bossSpawned) {\n\t\t\t// draw Congratulations\n\t\t\tString congrats = \"Congratulations! You were able to vanquish\";\n\t\t\tString congrats2 = \"all of your evil thoughts and achieve nirvana!\";\n\t\t\tcongratsFont.drawString(displayWidth / 2 - congratsFont.getWidth(congrats) / 2, displayHeight / 2\n\t\t\t\t\t- congratsFont.getHeight(congrats) / 2 - 50, congrats);\n\t\t\tcongratsFont.drawString(displayWidth / 2 - congratsFont.getWidth(congrats2) / 2, displayHeight\n\t\t\t\t\t/ 2 - congratsFont.getHeight(congrats2) / 2 - 15, congrats2);\n\t\t\t\n\t\t\t// draw the score\n\t\t\tscoreFont.drawString(displayWidth / 2 - scoreFont.getWidth(\"Score: \" + totalCash) / 2, displayHeight\n\t\t\t\t\t/ 2\n\t\t\t\t\t+ scoreFont.getHeight(\"Game Over!\")\n\t\t\t\t\t/ 2\n\t\t\t\t\t+ scoreFont.getHeight(\"Score: \" + totalCash)\n\t\t\t\t\t/ 2 + 10 - 50, \"Score: \" + totalCash);\n\t\t}\n\t}", "public void update(){\n if(clearing) {\n attacks.clear();\n attacksToAdd.clear();\n attacksToDelete.clear();\n playerAttackCount = 0;\n clearing = false;\n } else {\n for (AttackObject attack : attacks) {\n attack.update();\n checkAttackCollisionsFor(attack);\n checkAttackReachedEnd(attack);\n if (attack.wasDestroyed()) {\n onAttackDestroyed(attack);\n }\n }\n deleteAttacks();\n addAttacks();\n }\n }", "public void tick() {\n if (ShulkerEntity.this.world.getDifficulty() != Difficulty.PEACEFUL) {\n --this.attackTime;\n LivingEntity livingentity = ShulkerEntity.this.getAttackTarget();\n ShulkerEntity.this.getLookController().setLookPositionWithEntity(livingentity, 180.0F, 180.0F);\n double d0 = ShulkerEntity.this.getDistanceSq(livingentity);\n if (d0 < 400.0D) {\n if (this.attackTime <= 0) {\n this.attackTime = 20 + ShulkerEntity.this.rand.nextInt(10) * 20 / 2;\n ShulkerEntity.this.world.addEntity(new ShulkerBulletEntity(ShulkerEntity.this.world, ShulkerEntity.this, livingentity, ShulkerEntity.this.getAttachmentFacing().getAxis()));\n ShulkerEntity.this.playSound(SoundEvents.ENTITY_SHULKER_SHOOT, 2.0F, (ShulkerEntity.this.rand.nextFloat() - ShulkerEntity.this.rand.nextFloat()) * 0.2F + 1.0F);\n }\n } else {\n ShulkerEntity.this.setAttackTarget((LivingEntity)null);\n }\n\n super.tick();\n }\n }", "private void tick() {\n handler.tick();\n if (gameStart == GAME_STATE.Game) {\n hud.tick();\n menu.tick();\n\n // determines player lives + game over\n if (HUD.LIVES <= 0) {\n HUD.LIVES = 5;\n gameStart = GAME_STATE.GameOver;\n } else if (gameStart == GAME_STATE.Menu || gameStart == GAME_STATE.GameOver || gameStart == GAME_STATE.GameVictory) {\n menu.tick();\n }\n }\n }", "private void updateTamingProcess() {\n\n if (!mseEntity.isTameable())\n return;\n\n int tamingIncrease = mseEntity.updateHunger();\n if (tamingIncrease > 0) {\n mseEntity.eatAnimation();\n }\n\n int tamingProgress = tamingHandler.getTamingProgress();\n tamingProgress += tamingIncrease;\n tamingHandler.setTamingProgress(tamingProgress);\n if (tamingProgress < 0)\n tamingProgress = 0;\n if (tamingProgress >= mseEntity.getMaxTamingProgress())\n tamingHandler.setSuccessfullyTamed();\n\n }", "@Override\n public void update(Bullet b){\n if(!(b.getData() instanceof DriverBulletData)){\n hit(b);\n return;\n }\n\n float hitDst = 7f;\n\n DriverBulletData data = (DriverBulletData) b.getData();\n\n //if the target is dead, just keep flying until the bullet explodes\n if(data.to.isDead()){\n return;\n }\n\n float baseDst = data.from.distanceTo(data.to);\n float dst1 = b.distanceTo(data.from);\n float dst2 = b.distanceTo(data.to);\n\n boolean intersect = false;\n\n //bullet has gone past the destination point: but did it intersect it?\n if(dst1 > baseDst){\n float angleTo = b.angleTo(data.to);\n float baseAngle = data.to.angleTo(data.from);\n\n //if angles are nearby, then yes, it did\n if(Mathf.angNear(angleTo, baseAngle, 2f)){\n intersect = true;\n //snap bullet position back; this is used for low-FPS situations\n b.set(data.to.x + Angles.trnsx(baseAngle, hitDst), data.to.y + Angles.trnsy(baseAngle, hitDst));\n }\n }\n\n //if on course and it's in range of the target\n if(Math.abs(dst1 + dst2 - baseDst) < 4f && dst2 <= hitDst){\n intersect = true;\n } //else, bullet has gone off course, does not get recieved.\n\n if(intersect){\n data.to.handlePayload(b, data);\n }\n }", "public void shoot(){\n // boss bullete attract to player\n int bulletPosX = PApplet.parseInt(posX + (speed * cos(angle)));\n int bulletPosY = (int)(posY + hei / 2);\n float bulletAngle = atan2(Main.player.posY - bulletPosY, Main.player.posX - bulletPosX);\n int bulletVelX = (int)(8 * cos(bulletAngle));\n int bulletVelY = (int)(8 * sin(bulletAngle));\n bossBullets.add(new Bullet(bulletPosX,bulletPosY,bulletVelX,bulletVelY,1,attack));\n }", "@Override\r\n\tpublic void update() {\r\n\t\t\r\n\t\tboolean fireKicker = kickerTarget;\r\n\t\tdouble localWheelTarget = wheelTarget;\r\n\t\tdouble localHoodTarget = hoodTarget;\r\n\t\tdouble localTurretTarget = turretTarget;\r\n\t\t\r\n\t\tflywheel.setTargetVelocity(localWheelTarget);\r\n\t\tservoBoulderLock.set(servoTarget);\r\n\t\t\r\n\t\tsafeToFire = (getFlywheelCurrentVelocity() >= 50) &&\r\n\t\t\t\t(servoBoulderLock.get() == Constants.BALL_HOLDER_RETRACTED) &&\r\n\t\t\t\t(getHoodCurrentAngle() <= 70);\r\n\t\t\r\n\t\tif(fireKicker && safeToFire)\r\n\t\t\tkicker.fire();\r\n\t\telse\r\n\t\t\tkicker.reset();\r\n\t\t\r\n\t\tif(intake.safeForTurretToMove()){\r\n\t\t\thood.setTargetPosition(localHoodTarget);\r\n\t\t\tturret.setTargetPosition(localTurretTarget);\r\n\t\t} \r\n\t\t\r\n\t\tif(hood.isHoodSwitchPressed()){\r\n\t\t\thood.resetZeroPosition();\r\n\t\t}\r\n\t\t\r\n\t}", "public void updateList(long t) {\n\t\tfor (int i = 0; i < ballList.size(); i++) {\n\t\t\tballList.get(i).move(t);\n\t\t\t//System.out.printf(\"ball %d at %d %d\\n\", i, ballList.get(i).getX(), ballList.get(i).getY());\n\t\t}\n\t}", "private void killBullet() {\r\n this.dead = true;\r\n }", "public void tick(){\n\t\tfor(int i=0;i<object.size(); i++){\n\t\t\ttempObject = object.get(i);\n\t\t\ttempObject.tick(object);\n\t\t\tif(tempObject.getId() == ObjectId.Player){\n\t\t\t\tif(tempObject.position.x == MouseInput.exitPosition.x&&\n\t\t\t\t tempObject.position.y == MouseInput.exitPosition.y){\n\t\t\t\t\tgame.score += game.timeLeft;\n\t\t\t\t\tSystem.out.println(\"exited\");\n\t\t\t\t\tgame.levelCompleted=true;\n\t\t\t\t}\n\t\t\t\tif(game.player.health <= 0){\n\t\t\t\t\tobject.clear();\n\t\t\t\t\tgame.gameLoop=1;\n\t\t\t\t\tgame.State=STATE.GAMEOVER;\n\t\t\t}\n\t\t}\n\t\t// bomb is null when exploded\t\t\n\t\tif(Bomb.exploded(bomb, object)){\n\t\t\tbomb=null;\t\t\t\n\t\t}\n\t\t\n\t\tif(System.currentTimeMillis()-Player.tHit < 3000){\n\t\t\tPlayer.invincible = true;\n\t\t}\n\t\telse{\n\t\t\tPlayer.invincible = false;\n\t\t}\n\t\t\n\t\tif(Power.consumed(power, object)) {\n\t\t\tpower=null;\n\t\t}\n\t\t}\n\t\t\n\t}", "private void physicsTickAlive() {\n\t\t// Physics stuff\n\t\tsetThrusts();\n\t\tmoveEverything(deltaTimeAlive);\n\t\tageScoreMarkers(deltaTimeAlive);\n\t\tshootBullets();\n\t\t\n\t\tcollideTankToWall();\n\t\tcollideTankToTank();\n\t\tcollideBulletToWall();\n\t\tcollideBulletToTank();\n\t}", "public void tick() {\n\t\tif (Math.abs(disToPlayerX()) > Math.abs(disToPlayerY())) {\r\n\t\t\tif (disToPlayerX()<0) {\r\n\t\t\t\tx -= speed;\t//moves enemy to the left\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tx += speed; //moves enemy to the right\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (disToPlayerY()<0) {\r\n\t\t\t\ty-=speed; //moves enemy up\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ty+=speed; //moves enemy down\r\n\t\t\t}\r\n\t\t}\r\n\t\tenemyRectangle.setLocation((int)x,(int) y); //updates hitbox of enemy\r\n\r\n\t\t//checks all enemies and see if they run into player\r\n\t\tfor (int i=0;i<c.getEnemys().size();i++) {\r\n\t\t\tif (enemyRectangle.getBounds().intersects(player.getRectangle().getBounds())) {\r\n\t\t\t\tkillEnemy(); //removes the enemy\r\n\t\t\t\tPlayer.health -=10; //removes 10 health\r\n\t\t\t\tbreak; //doesn't work without this BREAK. DO NOT REMOVE\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//checks all bullets if they hit an enemy\r\n\t\tfor (int i = 0;i<c.getBullets().size();i++) {\r\n\t\t\tif (enemyRectangle.getBounds().intersects(c.getBullets().get(i).getRect().getBounds())) {\r\n\t\t\t\tkillEnemy(); //removes enemy\r\n\t\t\t\tc.removeBullet(c.getBullets().get(i)); //removes the bullet\r\n\t\t\t\tPlayer.score += 50; //adds 50 to the score\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void onTick() {\r\n if (this.worklist.size() > 0) {\r\n ArrayList<ACell> tempWorklist = new ArrayList<ACell>();\r\n for (ACell c : this.worklist) {\r\n tempWorklist.add(c);\r\n }\r\n this.worklist = new ArrayList<ACell>();\r\n this.collector(tempWorklist);\r\n }\r\n else if (this.allCellsFlooded()) {\r\n if (this.worklist.size() > 0) {\r\n this.worklist = new ArrayList<ACell>();\r\n }\r\n this.drawWin();\r\n }\r\n else if (this.currTurn >= this.maxTurn) {\r\n if (this.worklist.size() > 0) {\r\n this.worklist = new ArrayList<ACell>();\r\n }\r\n this.drawLose();\r\n }\r\n }", "public void tick(){\r\n scoreKeep++;\r\n if(scoreKeep >= 500){\r\n scoreKeep = 0;\r\n hud.setLevel(hud.getLevel()+1);\r\n // continuous addition of enemies at each new level\r\n if(game.diff == 0) {\r\n \tif((hud.getLevel() >= 2 && hud.getLevel() <= 3)||(hud.getLevel() >= 7 && hud.getLevel() <= 9))\r\n \thandler.addObject(new BasicEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.BasicEnemy, handler));\r\n if(hud.getLevel() == 4 || hud.getLevel() == 6)\r\n handler.addObject(new FastEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.FastEnemy, handler));\r\n if(hud.getLevel() == 5)\r\n \thandler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));\r\n if(hud.getLevel() == 10){\r\n handler.clearEnemies();\r\n handler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));\r\n handler.addObject(new BossEnemy((Game.width/2)-48, -100, ID.BossEnemy, handler));\r\n }\r\n }else if(game.diff == 1) {\r\n \tif((hud.getLevel() >= 2 && hud.getLevel() <= 3)||(hud.getLevel() >= 7 && hud.getLevel() <= 9))\r\n \thandler.addObject(new HardEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.BasicEnemy, handler));\r\n if(hud.getLevel() == 4 || hud.getLevel() == 6)\r\n handler.addObject(new FastEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.FastEnemy, handler));\r\n if(hud.getLevel() == 5)\r\n \thandler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));\r\n if(hud.getLevel() == 10){\r\n handler.clearEnemies();\r\n handler.addObject(new SmartEnemy(r.nextInt(Game.width-50), r.nextInt(Game.height-50), ID.SmartEnemy, handler));\r\n handler.addObject(new BossEnemy((Game.width/2)-48, -100, ID.BossEnemy, handler));\r\n }\r\n }\r\n }\r\n }", "@Override\n public void update(ArrayList<String> pressedKeys) {\n\n\n super.update(pressedKeys);\n// if(!backgroundMusic.play && x==0){\n// x=1;\n// backgroundMusic.playMusic(\"resources/oceanOperator.mp3\");\n// }\n\n if (state == STATE.MENU) {\n\n }\n\n //moveGameY(1);\n\n else if (state == STATE.GAME) {\n if (player != null && !player.isDead) {\n player.update(pressedKeys);\n }\n if (player.getLifeCount() <= 0) {\n complete = true;\n player.isDead = true;\n }\n\n\n if (transitionYCurrent < transitionY) {\n moveGameY(transitionYSpeed);\n transitionYCurrent += transitionYSpeed;\n }\n\n if(complete && !player.isDead){\n System.out.println(\"you won!\");\n state = STATE.COMPLETE;\n\n\n }\n\n if (player != null && !player.isDead) {\n// for (int i = 0; i < enemies.size(); i++) {\n// if (player.playerCollidesWith(enemies.get(i)) && enemies.get(i).dead == false && player.canGetHurt()) {\n// damageThePlayer();\n// }\n// }\n\n for (int i = 0; i < currentRoom.getSpikeList().size(); i++) {\n SpikeTile spikes = currentRoom.getSpikeList().get(i);\n if (player.feetCollideWith(spikes) && spikes.getStateName() == \"idle up\" && player.canGetHurt()) {\n damageThePlayer();\n }\n }\n\n\n if (player.playerCollidesWith(coin)) {\n coin.handleEvent(collidedEvent);\n myQuestManager.handleEvent(PickedUpEvent);\n }\n player.update();\n checkCollisions(player);\n\n\n for (int i = 0; i < player.playerBullets.size(); i++) {\n Bullet bul = player.playerBullets.get(i);\n bul.update(pressedKeys);\n if (bul.getShotTimer() >= bul.getShotCap()) {\n\n player.playerBullets.remove(i);\n }\n }\n\n TweenJuggler.getInstance().nextFrame();\n\n boolean pickpocketTrigger = false;\n for (int i = 0; i < enemies.size(); i++) {\n\n Enemy enemy = enemies.get(i);\n if (player.getHitBox().intersects(enemy.getPickpocketRect())) {\n pickpocketTrigger = true;\n pickpocketEnemy = enemy;\n }\n\n }\n pickpocket = pickpocketTrigger;\n if (!pickpocket)\n pickpocketEnemy = null;\n }\n if (pressedKeys.contains(KeyEvent.getKeyText(KeyEvent.VK_W))) {\n for (int i = 0; i < currentRoom.getDoors().size(); i++) {\n if (player.getHitBox().intersects(currentRoom.getDoors().get(i).getDoorCollider()) && currentRoom.getDoors().get(i).stateName == \"door_open\" && transitionPhase == false) {\n transitionPhase = true;\n currentRoom.fadeOut();\n queuedRoom = currentRoom.getDoors().get(i).getNextRoom();\n queuedRoom.fadeIn();\n transitionYCurrent = 0;\n enemies = new ArrayList<>();\n pressedKeys.remove(KeyEvent.getKeyText(KeyEvent.VK_W));\n }\n }\n\n }\n\n if (pressedKeys.contains(KeyEvent.getKeyText(KeyEvent.VK_E))) {\n if (pickpocket == true && pickpocketEnemy != null) {\n keyCount += pickpocketEnemy.pickpocketKeys();\n int knives = pickpocketEnemy.pickpocketKnives();\n knifeCount += knives;\n System.out.println(knives);\n// int n = rand.nextInt(3) + 1;\n// if (n == 1) {\n//\n// itemString = \"You found a knife!\";\n// } else if (n == 2) {\n// keyCount++;\n// itemString = \"You found a key!\";\n//\n// } else if (n == 3) {\n// itemString = \"No items found.\";\n// }\n }\n\n\n for (int i = 0; i < currentRoom.getDoors().size(); i++) {\n\n if (player.getHitBox().intersects(currentRoom.getDoors().get(i).getDoorCollider()) && currentRoom.getDoors().get(i).stateName == \"door_closed\") {\n if (keyCount > 0) {\n soundEffects.playSoundEffect(\"resources/chains.wav\",0);\n currentRoom.getDoors().get(i).setAnimationState(\"door_opening\", \"door_open\");\n itemString = \"Door unlocked\";\n keyCount--;\n } else {\n soundEffects.playMusic(\"resources/door_locked.wav\");\n }\n } else if (player.getHitBox().intersects(currentRoom.getDoors().get(i).getDoorCollider()) && currentRoom.getDoors().get(i).stateName == \"door_open\" && transitionPhase == false) {\n transitionPhase = true;\n currentRoom.fadeOut();\n queuedRoom = currentRoom.getDoors().get(i).getNextRoom();\n queuedRoom.fadeIn();\n transitionYCurrent = 0;\n enemies = new ArrayList<>();\n }\n }\n\n for (int i = 0; i < currentRoom.getChests().size(); i++) {\n TreasureChest chest = currentRoom.getChests().get(i);\n if (player.feetCollideWith(chest) && chest.getStateName() == \"closed\") {\n chest.setAnimationState(\"open\", \"\");\n if (chest.getItem().equals(\"key\")) {\n keyCount++;\n } else if (chest.getItem().equals(\"knife\")) {\n knifeCount++;\n }\n }\n }\n\n\n pressedKeys.remove(KeyEvent.getKeyText(KeyEvent.VK_E));\n }\n\n if (pressedKeys.contains(KeyEvent.getKeyText(KeyEvent.VK_P))) {\n if (complete == true) {\n removeAll();\n complete = false;\n currentLevel = 0;\n\n\n tutorial = new TutorialLevel1(\"Tutorial\");\n tutorial.run();\n addChild(tutorial);\n\n\n myLevel = new Level0(\"Room1\");\n myLevel.run();\n addChild(myLevel);\n\n\n myLevel1 = new Level1(\"Room2\");\n myLevel1.run();\n myLevel1.hide();\n addChild(myLevel1);\n\n myLevel2 = new ahmedslevel(\"Room3\", player);\n myLevel2.run();\n myLevel2.hide();\n addChild(myLevel2);\n\n myLevel3 = new BrighamLevel(\"Room4\");\n myLevel3.run();\n myLevel3.hide();\n addChild(myLevel3);\n\n level4 = new AlternatingSpikesLevel(\"Room6\");\n level4.run();\n level4.hide();\n addChild(level4);\n\n\n bossLevel = new BossLevel(\"Room5\", player);\n bossLevel.run();\n bossLevel.hide();\n addChild(bossLevel);\n\n\n tutorial.mapDoorToRoom(0,myLevel);\n myLevel.mapDoorToRoom(0, myLevel1);\n myLevel1.mapDoorToRoom(0, myLevel2);\n myLevel2.mapDoorToRoom(0, myLevel3);\n myLevel3.mapDoorToRoom(0, level4);\n level4.mapDoorToRoom(0, bossLevel);\n currentRoom = tutorial;\n\n enemies = currentRoom.enemies;\n\n player.isDead = false;\n player.setLifeCount(3);\n player.setPositionX(550);\n player.setPositionY(700);\n knifeCount = 4;\n keyCount = 0;\n backgroundMusic.stop();\n backgroundMusic.playSoundEffect(\"resources/oceanOperator.wav\", 100);\n } else {\n state = STATE.PAUSE;\n\n }\n }\n for (int i = 0; i < enemies.size(); i++) {\n Enemy currentEnemy = enemies.get(i);\n currentEnemy.update();\n if (!currentEnemy.dead) {\n if (currentEnemy.enemyBullet != null) {\n currentEnemy.enemyBullet.update(pressedKeys);\n if (currentEnemy.enemyBullet.getShotTimer() >= currentEnemy.enemyBullet.getShotCap()) {\n currentEnemy.enemyBullet = null;\n }\n }\n if (currentEnemy.isInView(player, currentRoom.coverList)) {\n// System.out.println(currentRoom.coverList.get(0));\n if (complete == false) {\n if (currentEnemy.enemyBullet == null) {\n currentEnemy.enemyBullet = new Bullet(\"bullet\", \"knife.png\", 0.4);\n currentEnemy.enemyBullet.setStart(currentEnemy.getPositionX() + currentEnemy.getUnscaledWidth() / 2, currentEnemy.getPositionY() + currentEnemy.getUnscaledHeight() / 2);\n currentEnemy.enemyBullet.setEnd(player.getPositionX(), player.getPositionY());\n TweenTransitions enemyBulletPath = new TweenTransitions(\"linearTransition\");\n Tween enemyBulletmovement = new Tween(currentEnemy.enemyBullet, enemyBulletPath);\n enemyBulletmovement.animate(TweenableParams.X, currentEnemy.enemyBullet.startValX, currentEnemy.enemyBullet.endValX, 0.4);\n enemyBulletmovement.animate(TweenableParams.Y, currentEnemy.enemyBullet.startValY, currentEnemy.enemyBullet.endValY, 0.4);\n TweenJuggler.getInstance().add(enemyBulletmovement);\n currentEnemy.handleEvent(throwKnife);\n }\n }\n if (currentEnemy.enemyBullet != null) {\n// System.out.println(currentEnemy.enemyBullet.getShotTimer());\n if (currentEnemy.enemyBullet.collidesWith(player) && player.canGetHurt()) {\n damageThePlayer();\n currentEnemy.enemyBullet = null;\n break;\n }\n for (int j = 0; j < currentRoom.collisionArray.size(); j++) {\n if (currentEnemy.enemyBullet.collidesWith(currentRoom.collisionArray.get(j))) {\n currentEnemy.enemyBullet = null;\n break;\n }\n }\n\n }\n }\n\n\n for (int j = 0; j < player.playerBullets.size(); j++) {\n Bullet bul = player.playerBullets.get(j);\n// for (int k = 0; k < currentRoom.collisionArray.size(); k++) {\n// if (bul.collidesWith(currentRoom.collisionArray.get(k))) {\n// player.playerBullets.remove(j);\n// break;\n// }\n// }\n if (bul != null) {\n if (bul.collidesWith(enemies.get(i))) {\n enemies.get(i).dead = true;\n enemies.get(i).enemyBullet = null;\n if (enemies.get(i).getStateName().contains(\"right\")) {\n enemies.get(i).setDelay(90);\n enemies.get(i).setAnimationState(\"dying right\", \"dead right\");\n } else {\n enemies.get(i).setDelay(90);\n enemies.get(i).setAnimationState(\"dying left\", \"dead left\");\n }\n if (player.playerBullets.size() > j)\n player.playerBullets.remove(j);\n }\n\n }\n }\n }\n }\n\n for (int j = 0; j < player.playerBullets.size(); j++) {\n Bullet bul = player.playerBullets.get(j);\n for (int k = 0; k < currentRoom.collisionArray.size(); k++) {\n if (bul.collidesWith(currentRoom.collisionArray.get(k))) {\n player.playerBullets.remove(j);\n break;\n }\n }\n }\n\n currentRoom.update();\n\n if (queuedRoom != null) {\n queuedRoom.update();\n\n if (queuedRoom.getDoneFading() && currentRoom.getDoneFading()) {\n\n queuedRoom.setDoneFading(false);\n currentRoom.setDoneFading(false);\n if(queuedRoom == bossLevel){\n backgroundMusic.stop();\n bossLevel.intro();\n }\n currentRoom = queuedRoom;\n enemies = currentRoom.enemies;\n queuedRoom = null;\n transitionPhase = false;\n currentQuestObjective = 0;\n }\n }\n }\n if (keyCount > 0){\n currentQuestObjective = 1;\n }\n else if(currentRoom == bossLevel){\n currentQuestObjective = 2;\n }\n\n if(bossLevel != null) {\n if (bossLevel.endgame == true) {\n state = STATE.COMPLETE;\n System.out.println(\"you won!\");\n quitButton.setPositionX(300);\n\n }\n }\n }", "public void update() {\n super.update();\n // Code specific to the ship gameObject\n action = ctrl.action();\n direction.rotate(action.turn * STEER_RATE * Constants.DT);\n velocity.addScaled(direction, (MAG_ACC * Constants.DT * action.thrust));\n position.addScaled(velocity, DRAG * Constants.DT);\n position.wrap(Constants.FRAME_WIDTH, Constants.FRAME_HEIGHT);\n\n // Checks if the user is pressing forwards\n if(action.thrust == 1){\n thrusting = true;\n } else{\n thrusting = false;\n }\n time -= 1;\n if(action.shoot && time <= 0){\n mkBullet();\n time = 30;\n }\n\n if(invincible)\n color = Color.blue;\n else\n color = Color.cyan;\n }", "private void shoot()\n\t{\n\t\t//Speed movement of the bullet\n\t\tint speed = 0;\n\t\t//Damage dealt by the bullet\n\t\tint damage = 0;\n\t\t//Angle used to shoot. Used only by the vulcan weapon\n\t\tdouble angle = 0;\n\t\t\n\t\tif(weapon == PROTON_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 10;\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30, speed, damage, 0);\n\t\t\tSoundManager.getInstance().playSound(\"protonshoot\", false);\n\t\t}\t\n\t\telse if(weapon == VULCAN_WEAPON)\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 2;\n\t\t\tangle = 10;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getThreeBullets(getX() +27, getX()+37, getX()+47,\n\t\t\t\t\tgetY()-this.getHeight()+30, speed, damage, (int)angle);\n\t\t\tSoundManager.getInstance().playSound(\"vulcanshoot\", false);\n\t\t}\t\t\n\t\telse\n\t\t{\n\t\t\tspeed = 15;\n\t\t\tdamage = 15;\n\t\t\tangle = 0;\n\t\t\t\n\t\t\tbulletPool.getBulletPool(weapon).getBullet(getX()+37, getY()-this.getHeight()+30,\n\t\t\t\t\t\tspeed, damage, angle);\n\t\t\tSoundManager.getInstance().playSound(\"gammashoot\", false);\n\t\t}\t\n\t}", "@Override\n public void update(Input input) {\n\n tickCounter++;\n // This logic was taken from the sample solution\n if (this.endOfGame || input.wasPressed(Keys.ESCAPE)){\n Window.close();\n } else{\n BACKGROUND.drawFromTopLeft(0, 0);\n treasure.printImage();\n displayEntity(entityList);\n\n // Game proceeds as the speed of a tick\n if (tickCounter%10 == 0){\n player.printImage();\n\n // Player updates including the movement and setting her direction\n player.playerUpdate(this);\n\n // Bullet movement to a zombie\n if(player.getShooting()) {\n player.getBullet().printImage();\n player.getBullet().move();\n\n }\n\n\n } else {\n player.printImage();\n if(player.getShooting()){\n player.getBullet().printImage();\n }\n }\n }\n }", "public void drawBullets(){\n if(!world.getPlayer().getWeapon().getBullets().isEmpty()) {\n for (Bullet b : world.getPlayer().getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y * ppuY,\n b.SIZE * ppuX, b.SIZE * ppuY);\n }\n }\n if(!world.getEnemies().isEmpty()) {\n for(Enemy e: world.getEnemies()){\n if(!e.getWeapon().getBullets().isEmpty()){\n for (Bullet b : e.getWeapon().getBullets()) {\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }\n }\n if(!world.getBullets().isEmpty()) {\n for(Bullet b : world.getBullets()){\n spriteBatch.draw(bulletTexture, b.getPosition().x * ppuX, b.getPosition().y\n * ppuY, b.SIZE * ppuX, b.SIZE * ppuY, 0, 0, bulletTexture.getWidth(),\n bulletTexture.getHeight(), false, true);\n }\n }\n }", "@Override\n public void refuel() {\n // refuel tank\n System.out.println(\"Tank has been refueled.\");\n }", "public Tank(int tankNumber, Handler handler, float x, float y, int vx, int vy, int angle) {\n// super(handler, x, y, vx, vy, angle);\n super(handler, x, y, angle);\n health = 5;\n\n this.tankNumber = tankNumber;\n bounds.x = 0;\n bounds.y = 0;\n bounds.width = 49;\n bounds.height = 50;\n lifeCount = 3;\n }", "public void onHitByBullet(HitByBulletEvent e) {\n\t\t// Replace the next line with any behavior you would like\n\t\t\n\t}", "public void onShootPressed(){\n if(player.getRechargeTimer()<=0) {\n playShootingSound();\n Bullet bullet = new Bullet();\n player.setRechargeTimer(shotRechargeTime);\n bullet.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet.setRotation(player.getRotation());\n bullet.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet.getRotation() - 90))));\n if(player.getTripleShotTimer()>0){\n Bullet bullet1 = new Bullet();\n bullet1.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet1.setRotation(player.getRotation()+15);\n bullet1.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet1.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet1.getRotation() - 90))));\n Bullet bullet2 = new Bullet();\n bullet2.moveCentreTo(player.getCentreX(), player.getCentreY());\n bullet2.setRotation(player.getRotation()-15);\n bullet2.setSpeed(new Point2D(15 * Math.cos(Math.toRadians(bullet2.getRotation() - 90)), 15 * Math.sin(Math.toRadians(bullet2.getRotation() - 90))));\n }\n }\n }", "private void enemiesWillShoot(Graphics2D g2d, GameState state) {\n if (numOfRenderShoot == 75) {\n numOfRenderShoot = 0;\n for (int i = 0; i < state.getEnemyTanks().size(); i++) {\n if (state.getEnemyTanks().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyTanks().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyTanks().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyTanks().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyMissiles().add(new EnemyMissile(this, state, 10\n , state.getEnemyTanks().get(i)));\n state.getEnemyMissiles().get(state.getEnemyMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n for (int i = 0; i < state.getEnemyCars().size(); i++) {\n if (state.getEnemyCars().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyCars().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyCars().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyCars().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyBullets().add(new EnemyBullet(this, state, 20\n , state.getEnemyCars().get(i)));\n state.getEnemyBullets().get(state.getEnemyBullets().size() - 1).bulletDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n for (int i = 0; i < state.getEnemyWallTurrets().size(); i++) {\n if (state.getEnemyWallTurrets().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyWallTurrets().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyWallTurrets().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyWallTurrets().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyWallTurretMissiles().add(new EnemyWallTurretMissile(this, state, 15\n , state.getEnemyWallTurrets().get(i)));\n state.getEnemyWallTurretMissiles().get(state.getEnemyWallTurretMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n\n for (int i = 0; i < state.getEnemyTurrets().size(); i++) {\n if (state.getEnemyTurrets().get(i).getLocY() < state.getTankLocY() + 500 && state.getEnemyTurrets().get(i).getLocY() > state.getTankLocY() - 400 &&\n state.getEnemyTurrets().get(i).getLocX() < state.getTankLocX() + 800 && state.getEnemyTurrets().get(i).getLocX() > state.getTankLocX() - 500) {\n state.getEnemyHomingMissiles().add(new EnemyHomingMissile(this, state, 15\n , state.getEnemyTurrets().get(i)));\n state.getEnemyHomingMissiles().get(state.getEnemyHomingMissiles().size() - 1).missileDirection(state);\n AudioPlayer enemyGunShotSFX = new AudioPlayer(\"sound effects/enemyshot.wav\", 0);\n }\n }\n }\n for (EnemyMissile enemyMissile : state.getEnemyMissiles()) {\n enemyMissile.paint(g2d, state);\n }\n for (EnemyBullet enemyBullet : state.getEnemyBullets()) {\n enemyBullet.paint(g2d, state);\n }\n for (EnemyWallTurretMissile enemyWallTurretMissile : state.getEnemyWallTurretMissiles()) {\n enemyWallTurretMissile.paint(g2d, state);\n }\n for (EnemyHomingMissile enemyHomingMissile : state.getEnemyHomingMissiles()) {\n enemyHomingMissile.paint(g2d, state);\n }\n }", "@Override\n\tpublic void collideWith(Bullet bullet) {\n\t\tbulletMoveForward(bullet);\n\t}", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tprivate void drawListEntity(ArrayList list) {\n\t\tArrayList listRemove = new ArrayList();\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tEntity ent = (Entity) list.get(i);\n\t\t\t\n\t\t\tdrawEntity(ent);\n\t\t\t\n\t\t\t// if the entity is still in the screen, update its position\n\t\t\tif (ent.continueDrawing()) {\n\t\t\t\tif (ent instanceof Bullet) {\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"bullet\")) {\n\t\t\t\t\t\tent.setX(ent.getX() + ((Bullet) ent).getXChange());\n\t\t\t\t\t\tent.setY(ent.getY() + ((Bullet) ent).getYChange());\n\t\t\t\t\t}\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"enemy_bullet\")) {\n\t\t\t\t\t\tent.setY(ent.getY() + 8);\n\t\t\t\t\t}\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"laser\")) {\n\t\t\t\t\t\tlistRemove.add(list.get(i));\n\t\t\t\t\t}\n\t\t\t\t\tif (((Bullet) ent).getName().equals(\"boss_bullet\")) {\n\t\t\t\t\t\tent.setX(ent.getX() + ((Bullet) ent).getXChange());\n\t\t\t\t\t\tent.setY(ent.getY() + ((Bullet) ent).getYChange());\n\t\t\t\t\t}\n\t\t\t\t} else if (ent instanceof Enemy) {\n\t\t\t\t\tif (((Enemy) ent).getName().equals(\"green_box\")) {\n\t\t\t\t\t\tent.setY(ent.getY() + 5);\n\t\t\t\t\t}\n\t\t\t\t\tif (((Enemy) ent).getName().equals(\"red_box\")) {\n\t\t\t\t\t\tent.setY(ent.getY() + 3);\n\t\t\t\t\t}\n\t\t\t\t\tif (((Enemy) ent).getName().equals(\"boss\") && bossExplosionNum == 0) {\n\t\t\t\t\t\tif (ent.getX() <= 0)\n\t\t\t\t\t\t\tbossMovement = 3;\n\t\t\t\t\t\tif (ent.getX() >= displayWidth - ((Enemy) ent).getSprite().getWidth())\n\t\t\t\t\t\t\tbossMovement = -3;\n\t\t\t\t\t\tif (ent.getY() <= 30)\n\t\t\t\t\t\t\tent.setY(ent.getY() + 1);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tent.setX(ent.getX() + bossMovement);\n\t\t\t\t\t}\n\t\t\t\t} else if (ent instanceof Explosion) {\n\t\t\t\t\tif (((Explosion) ent).getName().equals(\"player_hit\")) {\n\t\t\t\t\t\tent.setX(((Explosion) ent).getEntity().getX());\n\t\t\t\t\t\tent.setY(((Explosion) ent).getEntity().getY());\n\t\t\t\t\t} else if (((Explosion) ent).getName().equals(\"enemy_hit\")) {\n\t\t\t\t\t\tent.setX(((Explosion) ent).getEntity().getX() - 5);\n\t\t\t\t\t\tent.setY(((Explosion) ent).getEntity().getY() - 5);\n\t\t\t\t\t}\n\t\t\t\t} else if (ent instanceof Powerup) {\n\t\t\t\t\tent.setY(ent.getY() + 4);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// else if the entity is outside of the screen, remove it\n\t\t\telse {\n\t\t\t\tlistRemove.add(list.get(i));\n\t\t\t\t\n\t\t\t\t// handles the boss explosions\n\t\t\t\thandleBossExplosions(list, listRemove, i);\n\t\t\t}\n\t\t\t\n\t\t\t// if the player is dead, notify the player of death\n\t\t\tif (stopDrawingPlayer || gameWon) {\n\t\t\t\tnotifyGameOver();\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < listRemove.size(); i++) {\n\t\t\tlist.remove(listRemove.get(i));\n\t\t}\n\t\tlistRemove.clear();\n\t}", "public void updateStep() {\n if (level != null) {\n // erst bewegung beenden, dann aktivitaet\n pacman.endMove();\n pacman.update(this);\n checkCollisions();\n // beendet die bewegungen von entities sofort, sonst keine aktivitaet\n GameEntity e;\n for (GameEntity entity : entities) {\n e = entity;\n // erst aktivitaet, dann bewegung beenden\n e.update(this);\n if (e instanceof MovingEntity)\n ((MovingEntity) e).endMove();\n }\n checkCollisions();\n }\n }", "public void takeTurn() {\n world.updateLinkedList();\n repaint();\n }", "public Bullet(int bulletsDamage, @NotNull String bulletsType, Coordinate centerPointCoordinate, double angle, TankTroubleMap tankTroubleMap, boolean isUserTank, int tankIndex) {\n this.isUserTank = isUserTank;\n this.tankIndex = tankIndex;\n this.centerPointCoordinate = centerPointCoordinate;\n updateArrayListCoordinates();\n bulletsBlasted = false;\n damage = bulletsDamage;\n this.tankTroubleMap = tankTroubleMap;\n if (bulletsType.equals(\"NORMAL\")) {\n try {\n bulletsImage = ImageIO.read(new File(\"kit/bullet/normal.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else if (bulletsType.equals(\"LASER\")) { // ba else nazadam yevakht khastim emtiazi ezafe konim ye golule\n try {\n bulletsImage = ImageIO.read(new File(\"kit/bullet/laser.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n this.angle = angle;\n\n fireTime = LocalDateTime.now();\n Thread thread = new Thread(() -> {\n try {\n Thread.sleep(4000);\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n\n }", "public void tick()\r\n\t{\r\n\t\tsuper.tick();\r\n\t\t\r\n\t\tswitch(state) {\r\n\t\tcase ENTERING:\r\n\t\t\tif (speed() == 0) {\r\n\t\t\t\tsetSpeed(speed);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase STOPPED:\r\n\t\t\tif (speed() > 0) {\r\n\t\t\t\tsetSpeed(0);\r\n\t\t\t}\r\n\t\t\t//Remain in same state\r\n\t\t\tbreak;\r\n\t\tcase EXITING:\r\n\t\t\tif (speed() == 0) {\r\n\t\t\t\tsetSpeed(speed);\r\n\t\t\t}\r\n\t\t\t//turn();\r\n\t\t\t//Remain in same state\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t// Check to see if enity has entered a box\r\n\t\tBox box = getBox();\r\n\t\tif( box != null){\r\n\t\t//check to see if the box contains the vehicle, and check ot see if the pedsetrian is already in the box\r\n\t\t//if so add it to the box\r\n\t\t\tif( box.insideBox(this) && !inBox && state == State.EXITING){ \r\n\t\t\t\tbox.addEntity(this);\r\n\t\t\t\tinBox = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t\r\n\t\t//Check for boundary crossing\r\n\t\tif ((x() < lane.road().getIntersection().getMinX() || x() > lane.road().getIntersection().getMaxX()) || (y() < lane.road().getIntersection().getMinY() || y() > lane.road().getIntersection().getMaxY())) {\r\n\t\t\tlane.removePedestrian(this);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public void act() \n {\n World w = getWorld();\n int height = w.getHeight();\n \n setLocation(getX(),getY()+1);\n if (getY() <=0 || getY() >= height || getX() <= 0) // off the world\n {\n w.removeObject(this);\n return;\n }\n \n \n SaboWorld thisWorld = (SaboWorld) getWorld();\n Turret turret = thisWorld.getTurret();\n Actor turretActor = getOneIntersectingObject(Turret.class);\n Actor bullet = getOneIntersectingObject(Projectile.class);\n \n if (turretActor!=null && bullet==null) // hit the turret!\n {\n \n turret.bombed(); //Turret loses health\n explode();\n w.removeObject(this);\n } else if (turret==null && bullet!=null) //hit by a bullet!\n {\n explode();\n w.removeObject(this);\n }\n \n }", "public void update(float delta) {\n rangeTimer++;//update bullet distance\n //delete bullet if hit collison or met ranged\n if (rangeTimer == RANGE) {\n bullet.setShoot(false);\n rangeTimer = 0;\n } else {\n //update bullet timings\n bullet.updateTimer(delta);\n //make bullet go to p x y - follows player to increase difficulty\n if (this.bullet.x < playerX + 1.5) {\n this.bullet.x += Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.x >playerX + 1.5) {\n this.bullet.x -= Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.y < playerY + 0.5) {\n this.bullet.y += Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n if (this.bullet.y > playerY + 1.5) {\n this.bullet.y -= Gdx.graphics.getDeltaTime() * Bullet.SPEED;\n }\n }\n }", "public void tick(LinkedList<GameObject> object){\n\t\tx += velX;\r\n\t\ty += velY;\r\n\t\t\r\n\t\tif(facing != 0) {\r\n\t\t\t\r\n\t\t\tif(facing == 88) {//moving up\r\n\t\t\t\tvelX = 0;\r\n\t\t\t\tvelY = -1 * speed;\r\n\t\t\t\tif(count > wait) {\r\n\t\t\t\t\tfacing = 8;\r\n\t\t\t\t\tcount = 0;\r\n\t\t\t\t}\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\telse if(facing == 8) {//up\r\n\t\t\t\tvelX = 0;\r\n\t\t\t\tvelY = 0;\r\n\t\t\t\tif(count > wait) {\r\n\t\t\t\t\tfacing = 66;\r\n\t\t\t\t\tcount = 0;\r\n\t\t\t\t}\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if(facing == 22) {//moving down\r\n\t\t\t\tvelX = 0;\r\n\t\t\t\tvelY = speed;\r\n\t\t\t\tif(count > wait) {\r\n\t\t\t\t\tfacing = 2;\r\n\t\t\t\t\tcount = 0;\r\n\t\t\t\t}\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\telse if(facing == 2) {//down\r\n\t\t\t\tvelX = 0;\r\n\t\t\t\tvelY = 0;\r\n\t\t\t\tif(count > wait) {\r\n\t\t\t\t\tfacing = 44;\r\n\t\t\t\t\tcount = 0;\r\n\t\t\t\t}\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if(facing == 66) {//moving right\r\n\t\t\t\tvelX = speed;\r\n\t\t\t\tvelY = 0;\r\n\t\t\t\tif(count > wait) {\r\n\t\t\t\t\tfacing = 6;\r\n\t\t\t\t\tcount = 0;\r\n\t\t\t\t}\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\telse if(facing == 6) {//right\r\n\t\t\t\tvelX = 0;\r\n\t\t\t\tvelY = 0;\r\n\t\t\t\tif(count > wait) {\r\n\t\t\t\t\tfacing = 22;\r\n\t\t\t\t\tcount = 0;\r\n\t\t\t\t}\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if(facing == 44) {//moving left\r\n\t\t\t\tvelX = -1*speed;\r\n\t\t\t\tvelY = 0;\r\n\t\t\t\tif(count > wait) {\r\n\t\t\t\t\tfacing = 4;\r\n\t\t\t\t\tcount = 0;\r\n\t\t\t\t}\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\telse if(facing == 4) {//down\r\n\t\t\t\tvelX = 0;\r\n\t\t\t\tvelY = 0;\r\n\t\t\t\tif(count > wait) {\r\n\t\t\t\t\tfacing = 88;\r\n\t\t\t\t\tcount = 0;\r\n\t\t\t\t}\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\telse if(facing == 666) {//dead animation followed by moving the object to the top left corner of the map\r\n\t\t\t\tvelX = 0;\r\n\t\t\t\tvelY = 0;\r\n\t\t\t\tif(count > wait) {\r\n\t\t\t\t\tcount = 0;\r\n\t\t\t\t\tfacing = 0;\r\n\t\t\t\t\tx = 0;\r\n\t\t\t\t\ty = 0;\r\n\t\t\t\t}\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tDown.runAnimation();\r\n\t\tRight.runAnimation();\r\n\t\tLeft.runAnimation();\r\n\t\tUp.runAnimation();\r\n\t\tDeath.runAnimation();\r\n\t\tCollision(object);\r\n\t}", "public void draw() {\n if (you.health() > 0 | lives >= 0) {\n if (aliens.isEmpty()) {\n win();\n }\n if (you.health() <= 0 & lives >= 0) {\n die();\n }\n \n you.act();\n \n if (fire & you.getWeapon() == Weapon.WEAPON_GOD) {\n for (Dot d : you.fire()) {\n this.moreBullets(d);\n }\n }\n for (Dot d : lazers){d.update(); d.draw(page);}\n for (Dot d : bullets) {d.update(); d.draw(page);}\n for (Alien loop : aliens) {\n loop.act();\n if (Math.random() > .993) {\n for (Dot d : loop.fire())\n lazers.add(d);\n }\n loop.draw(page);\n }\n \n if (collisionCheck() | fl) {\n flash();\n fl = !fl;\n }\n \n int index1 = 0, index2 = 0, size1 = bullets.size(), size2 = aliens.size();\n for (Alien al : aliens) {\n index2 = 0;\n while (index2 < size1) {\n if (al.collide(bullets.get(index2))) {\n bullets.remove(index2);\n size1--;\n score += 10;\n }\n index2++;\n }\n }\n\n index1 = 0; size1 = aliens.size();\n while (index1 < size1) {\n if (aliens.get(index1).health() <= 0) {\n aliens.remove(index1);\n index1--;\n size1--;\n score += 25;\n }\n index1++;\n }\n \n for (Dot d : lazers) {\n if (d.getX() < 0 | d.getX() > 512 | d.getY() < 0 | d.getY() > 496) {\n d.deactivate();\n }\n }\n index1 = 0; size1 = lazers.size();\n while (index1 < size1) {\n if (!lazers.get(index1).isActive()) {\n lazers.remove(index1);\n size1--;\n index1--;\n }\n index1++;\n }\n \n for (Dot d : bullets) {\n if (d.getX() < 0 | d.getX() > 512 | d.getY() < 0 | d.getY() > 512) {\n d.deactivate();\n }\n }\n index1 = 0; size1 = bullets.size();\n while (index1 < size1) {\n if (!bullets.get(index1).isActive()) {\n bullets.remove(index1);\n size1--;\n index1--;\n }\n index1++;\n }\n \n for (int i = 0; i < lives; i++) {\n page.drawImage(you.getImage(), i*20, 496, 16, 16, null);\n }\n page.setColor(Color.white);\n page.drawString(\"\" + you.health(), 420, 509);\n page.drawString(\"\" + score, 450, 509);\n you.draw(page);\n }\n else {\n lose();\n }\n }", "@Override\n public void fireBullet(ArrayList<ScreenObject> level) {\n level.add(new ShipBullet(position.x, position.y, 8, 8, direction));\n }", "public void defensive_act()\r\n\t{\r\n\t\tBullet closestBullet = IMAGINARY_BULLET;\r\n\t//\tBullet secondClosestBullet = IMAGINARY_BULLET;\r\n\t\t\r\n\t\tActor machines;\r\n\t\tEnumeration<Actor> opponent = ((MachineInfo)data.get(TankFrame.PLAYER_1)).getHashtable().elements();\r\n\t\twhile(opponent.hasMoreElements())\r\n\t\t{\r\n\t\t\tmachines = (Actor) opponent.nextElement();\r\n\t\t\tif(machines instanceof Bullet)\r\n\t\t\t{\r\n\t\t\t\tif(machines.getPoint().distance(getPoint()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t{\r\n\t\t\t\t\tclosestBullet = (Bullet)machines;\r\n\t\t\t\t\tLine2D aim = new Line2D.Double(getCenterX(), getCenterY(), closestBullet.getPosX(), closestBullet.getPosY() );\r\n\t\t\t\t\tSystem.out.println(aim.getP1().distance(aim.getP2()));\r\n\t\t\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t\t\taimAndShoot(aim);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t/*\tif(machines.getPoint().distance(getPoint()) > secondClosestBullet.getPoint().distance(getPoint()) \r\n\t\t\t\t\t&& machines.getPoint().distance(getPoint()) < closestBullet.getPoint().distance(getPoint()))\r\n\t\t\t\t\tsecondClosestBullet = (Bullet)machines;*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\t * Find the line\r\n\t\t */\r\n\t\t/*if(!closestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), closestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(getCenterX(), getCenterY(), (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\t/*bulletPath = new Line2D(getRightPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\tbulletPath = new Line2D(getPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);*/\r\n\t\t\t\r\n\t\t//}\r\n\t/*\tif(!secondClosestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), secondClosestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t}*/\r\n\r\n\t}", "void smallgunHandler() {\n for (Sprite smb: smBullets) {\n \n smb.display();\n if(usingCoil){\n smb.forward(120);\n }else{\n smb.forward(40);\n }\n\n }\n}", "void tick() {\n\t\tif (playing) {\n\t\t\tdeadcannon = null;\n\t\t\t// sets general output message\n\t\t\tstatus.setText(\"Engaging alien wave \" + Integer.toString(level)+ \" \");\n\n\t\t\t// controls the first shot fired by the aliens\n\t\t\tif (shot1 == null) {\n\t\t\t\tint count1 = 0;\n\t\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\t\tif (alien3[i]!=null) {if (!alien3[i].Destroyed) count1++ ;}\n\t\t\t\t}\n\t\t\t\tif (count1 > 1) shot1 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\tshootbottom().pos_x + 18, shootbottom().pos_y); \n\t\t\t\telse {\n\t\t\t\t\tint count2 = 0;\n\t\t\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\t\t\tif (alien2[i]!=null) {if(!alien2[i].Destroyed)count2++;}\n\t\t\t\t\t}\n\t\t\t\t\tif (count2 > 1) shot1 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\tshootmiddle().pos_x + 18, shootmiddle().pos_y);\n\t\t\t\t\telse {\n\t\t\t\t\t\tint count3 = 0;\n\t\t\t\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\t\t\t\tif (alien1[i]!=null) {if(!alien1[i].Destroyed)count3++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (count3 != 0) shot1 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\t\tshoottop().pos_x + 18, shoottop().pos_y);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// controls the second shot fired by the aliens\n\t\t\tif (shot2 == null) {\n\t\t\t\tint count4 = 0;\n\t\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\t\tif (alien3[i]!=null) {if (!alien3[i].Destroyed) count4++ ;}\n\t\t\t\t}\n\t\t\t\tif (count4 != 0) {shot2 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\tshootbottom().pos_x + 18, shootbottom().pos_y); \n\t\t\t\tStdAudio.play(\"zap.wav\"); }\n\t\t\t\telse {\n\t\t\t\t\tint count5 = 0;\n\t\t\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\t\t\tif (alien2[i]!=null) {if(!alien2[i].Destroyed)count5++;}\n\t\t\t\t\t}\n\t\t\t\t\tif (count5 != 0) { shot2 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\tshootmiddle().pos_x + 18, shootmiddle().pos_y);\n\t\t\t\t\tStdAudio.play(\"zap.wav\"); }\n\t\t\t\t\telse {\n\t\t\t\t\t\tint count6 = 0;\n\t\t\t\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\t\t\t\tif (alien1[i]!=null) {if(!alien1[i].Destroyed)count6++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (count6 != 0) {shot2 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\t\tshoottop().pos_x + 18, shoottop().pos_y);\n\t\t\t\t\t\tStdAudio.play(\"zap.wav\");}\n\t\t\t\t\t\telse {level = level + 1; \n\t\t\t\t\t\tnewlevel();\n\t\t\t\t\t\tthescore=thescore + 100;\n\t\t\t\t\t\tStdAudio.play(\"up.wav\");}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// move bullet and delete if it reaches the roof\n\t\t\tif (bullet!= null) {\n\t\t\t\tbullet.move();\n\t\t\t\tif (bullet.pos_y == 0) bullet = null;\n\t\t\t}\n\n\t\t\t// controls movement of first shot\n\t\t\tif (shot1 != null) {\n\t\t\t\tshot1.move();\n\t\t\t\tif (shot1.pos_y > 435) shot1 = null;\n\t\t\t}\n\t\t\t// controls movement of second shot\n\t\t\tif (shot2 != null) {\n\t\t\t\tshot2.move();\n\t\t\t\tif (shot2.pos_y > 435) shot2 = null;\n\t\t\t}\n\n\t\t\t// For Top Row\n\n\t\t\t// change alien direction if a wall is reached\n\t\t\tif (alien1[0] != null && alien1[9] != null){\n\t\t\t\tif (alien1[0].pos_x == 0 || alien1[9].pos_x == 730) {\n\t\t\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\t\t\tif (alien1[i]!=null){alien1[i].v_x = -alien1[i].v_x;\n\t\t\t\t\t\talien1[i].pos_y=alien1[i].pos_y+15;\n\t\t\t\t\t\tif (alien1[i].pos_y >= 385 && !alien1[i].Destroyed){\n\t\t\t\t\t\t\tplaying = false;\n\t\t\t\t\t\t\tstatus.setText(\"You have been overrun and Earth \"+\n\t\t\t\t\t\t\t\t\t\"has been destroyed. You are a terrible \"+\n\t\t\t\t\t\t\t\t\t\"defender of humanity. \");\t \n\t\t\t\t\t\t} \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// move the aliens as group\n\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\tif (alien1[i] != null) \n\t\t\t\t\talien1[i].move();\n\t\t\t}\n\n\t\t\t// destroy both bullet and aliens if bullet hits\n\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\tif (alien1[i] != null && bullet != null) {\n\t\t\t\t\tif (alien1[i].intersects(bullet) && !alien1[i].Destroyed) { \n\t\t\t\t\t\talien1[i].Destroyed=true;\n\t\t\t\t\t\tthescore += 20;\n\t\t\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\t\t\tbullet = null;\n\t\t\t\t\t\tif (i == 0 || i == 10 ) {\n\t\t\t\t\t\t\talien1[i].img_file = \"black.jpg\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// For Second Row\n\n\t\t\t// change alien direction if a wall is reached\n\t\t\tif (alien2[0] != null && alien2[9] != null){\n\t\t\t\tif (alien2[0].pos_x == 0 || alien2[9].pos_x == 730) {\n\t\t\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\t\t\tif (alien2[i]!=null){alien2[i].v_x = -alien2[i].v_x;\n\t\t\t\t\t\talien2[i].pos_y=alien2[i].pos_y+15;\n\t\t\t\t\t\tif (alien2[i].pos_y >= 385 && !alien2[i].Destroyed){\n\t\t\t\t\t\t\tplaying = false; \n\t\t\t\t\t\t\tstatus.setText(\"You have been ovverun and Earth \"+\n\t\t\t\t\t\t\t\t\t\"has been destroyed. You are a terrible \"+\n\t\t\t\t\t\t\t\t\t\"defender of humanity. \");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// move the aliens as group\n\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\tif (alien2[i] != null) \n\t\t\t\t\talien2[i].move();\n\t\t\t}\n\n\t\t\t// destroy both bullet and aliens if bullet hits\n\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\tif (alien2[i] != null && bullet != null) {\n\t\t\t\t\tif (alien2[i].intersects(bullet) && !alien2[i].Destroyed) { \n\t\t\t\t\t\talien2[i].Destroyed=true;\n\t\t\t\t\t\tthescore +=15;\n\t\t\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\t\t\tbullet = null;\n\t\t\t\t\t\tif (i == 0 || i == 10 ) {\n\t\t\t\t\t\t\talien2[i].img_file = \"black.jpg\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//For third row\n\n\t\t\t//change alien direction if a wall is reached\n\t\t\tif (alien3[0] != null && alien3[9] != null){\n\t\t\t\tif (alien3[0].pos_x == 0 || alien3[9].pos_x == 730) {\n\t\t\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\t\t\tif (alien3[i]!=null){alien3[i].v_x = -alien3[i].v_x;\n\t\t\t\t\t\talien3[i].pos_y=alien3[i].pos_y+15;\n\t\t\t\t\t\tif (alien3[i].pos_y >= 385 && !alien3[i].Destroyed){\n\t\t\t\t\t\t\tplaying = false;\n\t\t\t\t\t\t\tstatus.setText(\"You have been ovverrun and Earth \"+\n\t\t\t\t\t\t\t\t\t\"has been destroyed. You are a terrible \"+\n\t\t\t\t\t\t\t\t\t\"defender of humanity. \");\n\t\t\t\t\t\t} \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// move the aliens as group\n\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\tif (alien3[i] != null) \n\t\t\t\t\talien3[i].move();\n\t\t\t}\n\n\t\t\t// destroy both bullet and aliens if bullet hits\n\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\tif (alien3[i] != null && bullet != null) {\n\t\t\t\t\tif (alien3[i].intersects(bullet) && !alien3[i].Destroyed) { \n\t\t\t\t\t\talien3[i].Destroyed=true;\n\t\t\t\t\t\tthescore += 10;\n\t\t\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\t\t\tbullet = null;\n\t\t\t\t\t\tif (i == 0 || i == 10) {\n\t\t\t\t\t\t\talien3[i].img_file = \"black.jpg\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// destroy cannon if shot\n\t\t\tif (shot1 != null) {\n\t\t\t\tif (shot1.intersects(cannon)){ dead = true; \n\t\t\t\tthelives = thelives - 1;\n\t\t\t\tStdAudio.play(\"bigboom.wav\");\n\t\t\t\tcannon.img_file = \"dead.jpg\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (shot2 != null) {\n\t\t\t\tif (shot2.intersects(cannon)){ dead = true; \n\t\t\t\tthelives = thelives - 1;\n\t\t\t\tStdAudio.play(\"bigboom.wav\");}\n\t\t\t\tcannon.img_file = \"dead.jpg\";\n\t\t\t}\n\n\t\t\t// ends the game when all lives are lost\n\t\t\tif (thelives <= 0) {\n\t\t\t\tplaying = false; \n\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\tstatus.setText(\"You have been killed and Earth has been \" +\n\t\t\t\t\t\t\"destroyed. You are a terrible defender \" +\n\t\t\t\t\t\t\"of humanity. \");\n\t\t\t}\n\n\t\t\t//makes sure lives cannot become negative\n\t\t\tif (thelives <= 0) {\n\t\t\t\tthelives = 0;\n\t\t\t\tdeadcannon = new DeadCannon(COURT_WIDTH, COURT_HEIGHT);\n\t\t\t\tdeadcannon.pos_x = cannon.pos_x;\n\t\t\t\tStdAudio.play(\"loss.wav\");\n\t\t\t}\n\n\t\t\t//set the text labels at the bottom of the screen\n\t\t\tmyscore.setText(\"Score = \"+ Integer.toString(thescore)+ \" \");\n\t\t\tmylives.setText(\"Lives = \"+ Integer.toString(thelives));\n\t\t\trepaint();\n\t\t\n\t\t\t//move cannon\n\t\t\tcannon.move();\n\t\t} \n\t}", "private void getInput(){\n\n if (tankNumber == 1) {\n if (handler.getTankControl1().up1) {\n this.moveForwards();\n }\n if (handler.getTankControl1().down1) {\n this.moveBackwards();\n }\n if (handler.getTankControl1().left1) {\n this.rotateLeft();\n }\n if (handler.getTankControl1().right1) {\n this.rotateRight();\n }\n if (handler.getTankControl1().enter){\n this.checkAttacks();\n }\n// if (handler.getTankControl1().checkEntities)\n// {\n// handler.getWorld().getEntityManager().printContents();\n// }\n }\n\n if (tankNumber == 2){\n if (handler.getTankControl1().up2) {\n this.moveForwards();\n }\n if (handler.getTankControl1().down2) {\n this.moveBackwards();\n }\n if (handler.getTankControl1().left2) {\n this.rotateLeft();\n }\n if (handler.getTankControl1().right2) {\n this.rotateRight();\n }\n if (handler.getTankControl1().space){\n this.checkAttacks();\n }\n }\n\n }", "public void shootAimingBullet(){\n bossBullet = new BossBullet(bossBulletImage,this.getXposition() + 100, this.getYposition() + 100, 8, player, true);\n bulletList.add(bossBullet);\n }", "@Override\n public void update() {\n if (Screen.checkState(GameState.RUNNING)) {\n healthToDraw = getPlayer().getHealth();\n maxHealthToDraw = getPlayer().getMaxHealth();\n minesToDraw = getPlayer().getCurrentMines();\n maxMinesToDraw = getPlayer().getMaxMines();\n currentLevelToDraw = Screen.getRoomHandler().getCurrentLevel();\n defenseToDraw = getPlayer().getDefense();\n speedToDraw = getPlayer().getSpeed();\n rangeToDraw = getPlayer().getSmallPlayerRange();\n damageToDraw = getPlayer().getPlayerDamage();\n playerRings = getPlayer().getRings();\n skillsToDraw = new Skill[4];\n for (int i = 0; i < getPlayer().getSkills().size(); i++) {\n if ( i < 4) {\n skillsToDraw[i] = getPlayer().getSkills().get(i);\n }\n }\n }\n }", "public void update(ArrayList<Object> o, Map m, int delta) {\n\t\t\tsuper.update(o, m, delta);\n\t\t\t//Animation\n\t\t\tif (Flame_tank.getFrame()==2 && alive) {\n\t\t\t\tFlame_tank.setCurrentFrame(0);\n\t\t\t}\n\t\t\tif (hp<=0 && alive) {\n\t\t\t\tFlame_tank.setCurrentFrame(3);\n\t\t\t\tFlame_tank.setSpeed(2);\n\t\t\t\talive = false;\n\t\t\t}\n\t\t\tif (Flame_tank.getFrame()==7) {\n\t\t\t\tRandom r = new Random();\n\t\t\t\tint i = r.nextInt(10)+1;\n\t\t\t\tif (i<8) {\n\t\t\t\t\to.add(new Item((int)this.getX(),(int)this.getY(),Collect.FLAMETHROWER_AMMO));\n\t\t\t\t}\n\t\t\t\tif (i==8) {\n\t\t\t\t\to.add(new Item((int)this.getX(),(int)this.getY(),Collect.HP));\n\t\t\t\t}\n\t\t\t\tFlame_tank.stop();\n\t\t\t\to.remove(this);\n\t\t\t}\n\t\t\t// Walks left\n\t\t\tif ((((Character) o.get(0)).getX() > this.getX() -500) && ((Character) o.get(0)).getX() < this.getX() && alive&&canSeeCharacter((Character)o.get(0),m)){\n\t\t\t\tif ((((Character) o.get(0)).getY() > this.getY() -50) && ((Character) o.get(0)).getY() < this.getY() +50){\n\t\t\t\t\tif (checkMap(m,-36,36)){\n\t\t\t\t\t\twalkLeft(delta);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Shoots left\n\t\t\tif ((((Character) o.get(0)).getX() > this.getX() -300) && ((Character) o.get(0)).getX() < this.getX() && alive&&canSeeCharacter((Character)o.get(0),m)){\n\t\t\t\tif ((((Character) o.get(0)).getY() > this.getY() -50) && ((Character) o.get(0)).getY() < this.getY() +50){\n\t\t\t\t\tshoot(o, (int)this.getX()-30,(int)this.getY()-5,(int)((Character) o.get(0)).getX(), (int)this.getY());\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Walks right\n\t\t\tif ((((Character) o.get(0)).getX() < this.getX() +500) && ((Character) o.get(0)).getX() > this.getX() && alive&&canSeeCharacter((Character)o.get(0),m)){\n\t\t\t\tif ((((Character) o.get(0)).getY() > this.getY() -50) && ((Character) o.get(0)).getY() < this.getY() +50){\n\t\t\t\t\tif (checkMap(m,36,36)){\n\t\t\t\t\t\twalkRight(delta);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Shoots right\n\t\t\tif ((((Character) o.get(0)).getX() < this.getX() +300) && ((Character) o.get(0)).getX() > this.getX() && alive&&canSeeCharacter((Character)o.get(0),m)){\n\t\t\t\tif ((((Character) o.get(0)).getY() > this.getY() -50) && ((Character) o.get(0)).getY() < this.getY() +50){\n\t\t\t\t\tshoot(o,(int)this.getX()+30,(int)this.getY()-5,(int)((Character) o.get(0)).getX(), (int)this.getY());\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tFlame_tank.update(delta);\n\t\t}", "public void draw() {\r\n\r\n if (this.z == 2) {\r\n //--- Shooting//---\r\n for (Enemy e: this.td.getEnemies()) {\r\n if (e.getX() < this.x + this.size / 2\r\n && e.getX() + e.getSize() > this.x - this.size / 2) {\r\n if (e.getY() < this.y + this.size / 2\r\n && e.getY() + e.getSize() > this.y - this.size / 2) {\r\n if (!this.firing) {\r\n this.firing = true;\r\n this.target = e;\r\n }\r\n } else {\r\n this.firing = false;\r\n }\r\n }\r\n this.firing();\r\n }\r\n }\r\n this.update();\r\n\r\n }", "void dropHandler() {\n if (tickSpeed < 0) {\n if((int)random(1,6) == 1){ //every 6 medkits the handler drops a minigun\n Sprite mg = new Sprite(minigun);\n mg.moveToPoint(random(0,2048), random(0, 2048)); //moves drop to random point\n minigunDrop.add(mg);\n tickSpeed = (int)random(100,500);\n }else if((int)random(1,4) == 1){ //every 4 medkits the handler drops a coilgun\n Sprite cg = new Sprite(coilgun);\n cg.moveToPoint(random(0,2048), random(0,2048)); //moves drop to random point\n coilgunDrop.add(cg);\n tickSpeed = (int)random(100,500); //changes \n }\n else {\n \n \n Medkit hp = new Medkit();\n hp.med.moveToPoint(random(0, 2048), random(0, 2048));\n\n health.add(hp);\n\n tickSpeed = (int)random(100,500);\n }\n }\n tickSpeed--;\n for (Medkit hp: health) {\n hp.med.display();\n hp.timer--;\n\n }\n for (Sprite mg: minigunDrop){\n mg.display();\n }\n for (Sprite cg: coilgunDrop){\n cg.display();\n }\n // e.forward(5);\n}", "public void tick(){\n\t\tinput.tick();\n\t\t\n\t\tif(!this.gameOver){\n\t\t\tthis.updateGame();\n\t\t}else{\n\t\t\tif(input.down){\n\t\t\t\tbird.x = 80;\n\t\t\t\tbird.y = (HEIGHT-50)/2;\n\t\t\t\tthis.numGoals = 0;\n\t\t\t\tthis.obstacles.clear();\n\t\t\t\tthis.goals.clear();\n\t\t\t\tthis.gameOver = false;\n\t\t\t\tthis.begin = true;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public void tick() {\n\t\thealth = GamePanel.getPlayer().health;\n\t\tmaxhealth = GamePanel.getPlayer().maxHealth;\n\t\tstatus = GamePanel.getPlayer().status;\t\n\t\tmanaLevel = GamePanel.getPlayer().mana;\n\t\tmaxManaLevel = GamePanel.getPlayer().maxMana;\n\t\tinv.tick();\n\t}", "public void tick(){\n oilLevel --;\n maintenance --;\n happiness --;\n health --;\n boredom ++;\n }", "@Override\n public void update() {\n \tif(++this.timeoutCounter < 5) { return; }\n \t\n \tList<EntityDog> dogList = this.world.getEntitiesWithinAABB(EntityDog.class, new AxisAlignedBB(this.pos.getX(), this.pos.getY() + 0.5D, this.pos.getZ(), this.pos.getX() + 1.0D, this.pos.getY() + 0.5D + 0.05000000074505806D, this.pos.getZ() + 1.0D).grow(5));\n\n \tfor(EntityDog dog : dogList) {\n \t\tdog.coords.setBowlPos(this.pos);\n \t\n \t\tint slotIndex = DogUtil.getFirstSlotWithFood(dog, this.inventory);\n \tif(dog.getDogHunger() < 60 && slotIndex >= 0)\n \t\tDogUtil.feedDog(dog, this.inventory, slotIndex);\n }\n \t\n \tthis.timeoutCounter = 0;\n }", "public void gotHit(Bullet bullet) {\n\t\tif (bullet.getOwner() != this) {\n\t\t\tDefaultModeScoring.addHitScore(bullet.getOwner());\n\t\t\tAudioManager.startAudio(bullet.getSoundName());\n\t\t\tif (!isDead())\n\t\t\t\tAudioManager.startAudio(getSoundName());\n\t\t\tsetHp(getHp() - bullet.getDamage());\n\t\t\tif (bullet.getSpeed().x() > 0)\n\t\t\t\tgetPush().setX(getPush().x() + bullet.getPush());\n\t\t\telse\n\t\t\t\tgetPush().setX(getPush().x() - bullet.getPush());\n\t\t\tif (getHp() <= 0 && !isDead())\n\t\t\t\tdie();\n\t\t}\n\t}", "private void tick() {\n\n if (StateManager.getState() != null) {\n StateManager.getState().tick();\n }\n this.backgroundFrames--;\n if (this.backgroundFrames == 0) {\n this.backgroundFrames = Const.TOTAL_BACKGROUND_FRAMES;\n }\n//Check all changed variables for the player\n player.tick();\n long elapsed = (System.nanoTime() - time) / (Const.DRAWING_DELAY - (4000 * Enemy.getDifficulty()));\n//Check if enough time is passed to add new enemy or if spawnSpot is available\n if (elapsed > (this.delay - Enemy.getDifficulty() * 300)&& Road.isSpotAvailable()) {\n enemies.add(new Enemy());\n time = System.nanoTime();\n }\n//Loop for checking all changed variables for the enemies and check if they intersects with the player\n for (int j = 0; j < enemies.size(); j++) {\n enemies.get(j).tick();\n if(enemies.get(j).getY() > Const.ROAD_BOTTOM_BORDER + 200){\n Road.getOccupiedSpawnPoints()[Const.SPAWN_POINTS.indexOf(enemies.get(j).getX())] = false;\n player.setScore(player.getScore() + 50);\n enemies.remove(j);\n continue;\n }\n enemyBoundingBox = enemies.get(j).getEnemyRectangle();\n if (player.getBoundingBox().intersects(enemyBoundingBox)) {\n reset();\n if(player.getLives() == 0){\n gameOver();\n }\n break;\n }\n }\n }", "@Override\n public void updateStates() {\n mySprite.update();\n }", "private void checkForBulletCollisions() {\r\n\t\tbulletMoveOffScreen();\r\n\t\tbulletCollisionWithObject();\r\n\t}", "public void update() {\n\t\t// shooting and moving! This results in a slower movement, and unit self-targeting.\n\t\tif (action == 3 && !(this instanceof Grenadier) && !(this instanceof Sniper)) { // can't be a tank\n\t\t\tif (stop()) { // the method stop detects if we have arrived at correct position or reached max distance\n\t\t\t\txa = 0;\n\t\t\t\tya = 0;\n\t\t\t} else move(xa - xa / 8 * 5, ya - ya / 8 * 5); // SLOWS DOWN MOVEMENT\n\n\t\t\tUnit u = target(); // this is the enemy unit it is targeting.\n\t\t\tif (u != null) {\n\t\t\t\tdir = Math.atan2(u.getY() - y, u.getX() - x);\n\t\t\t\tupdateShooting();\n\t\t\t}\n\t\t}\n\n\t\t// shooting only\n\t\telse if (action == 2) {\n\t\t\tupdateShooting();\n\t\t}\n\t\t\n\t\t// moving only\n\t\telse if (action == 1) {\n\t\t\tif (unitType.equals(\"Assassin\") || unitType.equals(\"Zombie\")) { // these are units that deal with collisions!\n\t\t\t\tunitCollision(); // these three units have methods that specialize in collision\n\t\t\t}\n\n\t\t\tif (stop()) { // the method stop detects if we have arrived at correct position!\n\t\t\t\txa = 0;\n\t\t\t\tya = 0;\n\t\t\t\taction = 0;\n\t\t\t} else move(xa, ya); // YOU MUST ROUND TO A CERTAIN NUMBER OF DECIMAL PLACES IN ORDER TO REDUCE CHOPPINESS OF MOVEMENT\n\t\t}\n\t\tupdateAnimation();\n\n\t}", "private void multiBulletFire() {\n\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 20, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) - 10, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2) + 50, bulletYPosition, bulletWidth,\n\t\t\t\tbulletHeight, \"Blue\"));\n\t}", "public void update(float dt) {\n\t // Move an object if touched\n\t\tInputController input = InputController.getInstance();\n\t if (input.didTertiary() && !selector.isSelected()) {\n\t selector.select(input.getCrossHair().x,input.getCrossHair().y);\n\t } else if (!input.didTertiary() && selector.isSelected()) {\n\t selector.deselect();\n\t } else {\n\t selector.moveTo(input.getCrossHair().x,input.getCrossHair().y);\n\t }\n\n\t // Play a sound for each bubble\n\t if (ragdoll.getBubbleGenerator().didBubble()) {\n\t // Pick a sound\n\t int indx = RandomController.rollInt(0,BUBBLE_SOUNDS.length-1);\n\t String key = \"bubble\"+soundCounter;\n\t soundCounter++;\n\t SoundController.getInstance().play(key, BUBBLE_SOUNDS[indx], false);\n\t }\n\t \n\t // If we use sound, we must remember this.\n\t SoundController.getInstance().update();\n\t}", "public void paintComponent(Graphics g){\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.black);\n\t\t\tg.fillRect(0,0,getWidth(), getHeight());//paints the background black\n\t\t\tt.drawTank(g);//draws the tank\n\t\t\tboolean b = false;\n\t\t\tfor (int i = 0; i < t.bullets.size(); i++){ //draws the bullets. if the bullets either hit a plane or go off the screen, they are removed from the array to not clog up memory\n\t\t\t\tt.bullets.get(i).drawBullet(g);\n\t\t\t\tt.bullets.get(i).move();\n\n\t\t\t\tfor (int j = 0; j < bombers.size(); j++){ //draws the bombers, removes them if they are shot down\n\t\t\t\t\tif (bombers.get(j).checkHit(t.bullets.get(i))) {t.bullets.remove(i); b = true; break;}\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif (!b)\n\t\t\t\t\tif (t.bullets.get(i).bx < 0 || t.bullets.get(i).bx > 1090 || t.bullets.get(i).by < 0 || t.bullets.get(i).by > 730) t.bullets.remove(i);\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < bombers.size(); i ++){ \n\t\t\t\tbombers.get(i).drawBomber(g);\n\t\t\t}\n\t\t \tif (t.lost == true){ //manages the loosing of the game\n\t\t\t\t\n\t\t\t\tif (t.startboomtimer){\n\t\t\t\t\tif (t.boomtimer < 10) g.drawImage(boom2, t.x +25, 565, 100, 60, null);\n\t\t\t\t\telse if (t.boomtimer < 20) g.drawImage(boom2, t.x,535, 150,100,null);\n\t\t\t\t\telse if (t.boomtimer == 30) t.startboomtimer = false;\n\t\t\t\t\tt.boomtimer ++;\n\t\t\t\t}\n\t\t\t\tg.setColor(Color.WHITE);\n\t\t\t\tg.setFont(new Font(\"Times New Roman\", Font.BOLD, 50));\n\t\t\t\tg.drawString(\"YOU LOST :(\", 400, 300);\n\t\t\t\tif (t.onetime == 31){ //this method adds a question panel so that when you loose you can revive yourself with the questions\n\t\t\t\t\t\n\t\t\t\t\tmoveframe = new JFrame (\"Move on\");\n\t\t\t\t\t\n\t\t\t\t\tmoveframe.setSize(510,320);\n\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\tQuestion question1 = questions.get(rand.nextInt(questions.size())); //selects 2 seperate questions from the question array to be used\n\t\t\t\t\tQuestion question2;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tquestion2 = questions.get(rand.nextInt(questions.size()));\n\t\t\t\t\t} while(question2.equals(question1));\n\t\t\t\t\t\n\t\t\t\t\tmoveframe.getContentPane().add(new QuestionPanelLoss(question1, question2, 0), BorderLayout.CENTER); //adds the questionpanel\n\t\t\t\t\tmoveframe.setLocationRelativeTo(null);;\n\t\t\t\t\tmoveframe.setVisible(true);\n\n\t\t\t\t\t\n\t\t\t\t\ttime.stop();\n\t\t\t\t}\n\t\t\t\tt.onetime ++ ;\n\t\t\t\n\t\t\t}\n\n\n\t\t}", "public void update() {\n if (player.getPlaying()) { //if player alive\n bg.update(); //update background\n player.update(); //update player\n //player collision detection, if player hits any baddies or their bullets is playing sets to false\n for (int i = 0; i < gargants.size(); i++) {\n if (collision(gargants.get(i), player)) {\n //gargants.remove(i);\n player.setPlaying(false);\n\n }\n for (int j = 0; j < demons.size(); j++) {\n if (collision(demons.get(j), player)) {\n //demons.remove(j);\n player.setPlaying(false);\n\n }\n for (int k = 0; k < dragons.size(); k++) {\n if (collision(dragons.get(k), player)) {\n //dragons.remove(k);\n player.setPlaying(false);\n\n }\n for (int l = 0; l < demonShots.size(); l++) {\n if (collision(demonShots.get(l), player)) {\n //demonShots.remove(l);\n player.setPlaying(false);\n\n }\n\n }\n }\n }\n }\n\n for (int i = 0; i < bullets.size(); i++) { //for each bullet\n bullets.get(i).update(); //update them\n if (bullets.get(i).getX() > WIDTH + 10) {\n bullets.remove(i); //if off screen delete\n }\n }\n\n for (int i = 0; i < demonShots.size(); i++) { // for each demon bullet\n demonShots.get(i).update(); //update them\n if (demonShots.get(i).getX() < -100) {\n demonShots.remove(i); //if off screen delete\n }\n }\n\n long gargantElapseTime = (System.nanoTime() - gargantStartTime) / 1000000;\n if (gargantElapseTime > (1200 - player.getScore() / 3)) { //as score increases, more will spawn\n gargants.add(new Gargant(BitmapFactory.decodeResource(getResources(), R.drawable.gargant), WIDTH + 10, (int) (rand.nextDouble() * (HEIGHT)), 64, 64, 8));\n if (gargants.size() >= 13) { //limit amount of this enemy to 13\n gargants.remove(gargants.size() - 1);\n }\n gargantStartTime = System.nanoTime();\n }\n for (int i = 0; i < gargants.size(); i++) { // for each gargant\n gargants.get(i).update(); //update them\n for (int j = 0; j < bullets.size(); j++) {\n if (collision(gargants.get(i), bullets.get(j))) {\n //when shot remove enemy and bullet\n gargants.remove(i);\n bullets.remove(j);\n player.addScore(10); //10 score for these guys\n break;\n }\n }\n if (gargants.get(i).getX() < -100) {\n gargants.remove(i); //if off screen remove\n }\n }\n\n if (level >= 3) { //only spawn demon above level 3\n long demonElapseTime = (System.nanoTime() - demonStartTime) / 1000000;\n if (demonElapseTime > (12000 - player.getScore() / 3)) { //as score increases, more will spawn\n demons.add(new Demon(BitmapFactory.decodeResource(getResources(), R.drawable.demon), WIDTH + 10, (int) (rand.nextDouble() * (HEIGHT)), 64, 64, 8));\n if (demons.size() >= 10) { //limit amount of this enemy to 10\n demons.remove(demons.size() - 1);\n }\n demonStartTime = System.nanoTime();\n }\n for (int i = 0; i < demons.size(); i++) { //for each demon\n demons.get(i).update(); //update them\n int n = rand.nextInt(1001); //random int between 1 and 1000\n if (n > 980) { //if random int > 980 shoot demon bullet\n demonShots.add(new HellFire(BitmapFactory.decodeResource(getResources(), R.drawable.hellfire_0), demons.get(i).getX(), demons.get(i).getY(), 64, 64));\n }\n for (int j = 0; j < bullets.size(); j++) {\n if (collision(demons.get(i), bullets.get(j))) {\n demonHitCount++; //each hit with bullet increases hitcount\n bullets.remove(j);\n if (demonHitCount >= 10) { //when hit more than 10 times it dies\n demonHitCount = 0;\n demons.remove(i);\n bullets.remove(j);\n player.addScore(100); //100 score for these big bois\n }\n }\n }\n if (demons.get(i).getX() < -100) {\n demons.remove(i); //if off screen delete\n }\n }\n }\n\n\n if (level >= 2) { //only spawn dragon above level 3\n long dragonElapseTime = (System.nanoTime() - dragonStartTime) / 1000000;\n if (dragonElapseTime > (6000 - player.getScore() / 3)) { //as score increases, more will spawn\n dragons.add(new Dragon(BitmapFactory.decodeResource(getResources(), R.drawable.dragon), WIDTH + 10, (int) (rand.nextDouble() * (HEIGHT)), 128, 128, 8));\n if (dragons.size() >= 5) { //dragons limitted to only 5\n dragons.remove(dragons.size() - 1);\n }\n dragonStartTime = System.nanoTime();\n }\n for (int i = 0; i < dragons.size(); i++) {\n dragons.get(i).update();\n for (int j = 0; j < bullets.size(); j++) {\n if (collision(dragons.get(i), bullets.get(j))) {\n dragonHitCount++; //if hit increase hitcount\n bullets.remove(j);\n if (dragonHitCount >= 4) { //when hit 4 times it dies\n dragonHitCount = 0;\n dragons.remove(i);\n bullets.remove(j);\n player.addScore(25); //25 score for dragons\n }\n break;\n }\n }\n if (dragons.get(i).getX() < -100) {\n dragons.remove(i); //when off screen remove\n }\n }\n }\n }\n }", "@Override\n public void poll() {\n if( state == State.attacking ) {\n if( !ctx.movement.running() && ctx.movement.energyLevel() >= 75) {\n stateText = \"Setting running\";\n ctx.movement.running(true);\n }\n stateText = \"\";\n if( isAttacking() ) {\n stateText = \"Attacking\";\n Item ammo = inventory.getFirst(ammoUsed);\n if( ammo != null && ammo.valid() ){\n inventory.clickItem(ammo);\n sleep(100);\n }\n } else {//TODO find out why it stops picking up arrows after some time\n if (!inventory.full() && (targetBone == null || !targetBone.valid() || !misc.pointOnScreen(targetBone.centerPoint())) ) {\n targetBone = getNextGroundBone();\n clickedGroundItem = false;\n }\n if (!inventory.full() && targetBone != null && targetBone.valid() && misc.pointOnScreen(targetBone.centerPoint())) {\n stateText = \"Picking up bones\";\n if( !ctx.players.local().inMotion() )\n clickedGroundItem = false;\n if (!clickedGroundItem ) {\n clickedGroundItem = groundItems.pickup(targetBone);\n }\n } else if( inventory.full() && inventory.contains(bones) ) {\n state = State.burying;\n } else {\n if( !clickedMonster || !target.valid() || target.health() <= 0 || target.interacting() != ctx.players.local() ) {\n target = getNextTarget();\n clickedMonster = false;\n }\n if (!misc.pointOnScreen(target.centerPoint())) {\n if (target.tile().matrix(ctx).onMap()) {\n stateText = \"Walking to monster\";\n movement.walkTile(target.tile());\n }\n } else {\n stateText = \"Attacking monster\";\n if( !clickedMonster ) {\n clickedMonster = npcs.attackMonster(target);\n }\n }\n }\n }\n }else if( state == State.burying){\n Item invBones = inventory.getFirst(bones);\n if( invBones!= null && invBones.valid()) {\n stateText = \"Clicking bones\";\n inventory.clickItem(invBones);\n }else {\n state = State.attacking;\n }\n }\n checkIfBeingAttacked();\n }", "public void tick(){\n if(healthPoints <= 0){\n sprite.setVisible(false);\n }\n if(isInvulnerable){\n invulnTimer++;\n }\n if(invulnTimer >= invulnTicks){\n setInvulnerable(false);\n invulnTimer = 0;\n }\n //System.out.println(stuckCounter);\n //System.out.println(isStuck);\n\n if(isStuck){\n stuckCounter++;\n }\n else{\n stuckCounter = 0;\n }\n\n x += dx;\n\n y += dy;\n sprite.setY((int) y);\n sprite.setX((int) x);\n }", "@Override\n public void update(int timeModifier) {\n // Check if a bomb can be dropped and if the plane is still within the game window\n bombDropper.update(timeModifier);\n if (bombDropper.shouldRelease() && isInGameWindow()){\n justDropped = true;\n bombs.add(new Bomb(currPos, parentLevel));\n }\n\n // if we just dropped a bomb, reset the timer to a new random value\n if (justDropped){\n int dropTime = ThreadLocalRandom.current().nextInt(DROP_TIME_LOWER_BOUND, DROP_TIME_UPPER_BOUND + 1);\n bombDropper.setNewTime(dropTime);\n justDropped = false;\n }\n\n // Update all current bombs\n ArrayList<Bomb> bombsToRemove = new ArrayList<>();\n for (Bomb bomb : bombs){\n bomb.update(timeModifier);\n if (bomb.isFinished()){\n bombsToRemove.add(bomb);\n }\n }\n // Remove all finished bombs\n for (Bomb bomb : bombsToRemove){\n bombs.remove(bomb);\n }\n\n // update the current position\n if (flyingHorizontally) {\n double newX = currPos.x + PLANE_SPEED * timeModifier;\n currPos = new Point(newX, currPos.y);\n }\n else {\n double newY = currPos.y + PLANE_SPEED * timeModifier;\n currPos = new Point(currPos.x, newY);\n }\n\n // if the plane has moved outside the window, and has no remaining\n // bombs, it no longer needs to be updated\n if (!isInGameWindow() && bombs.size() == 0){\n isFinished = true;\n }\n render();\n\n }", "private void ShootListener() {\n shoot.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (presenter.canShoot()) {\n shoot(presenter.getBullet());\n presenter.checkLastBullet();\n }\n\n }\n });\n }", "public void attack() {\n\t\t\n\t\tint row = getPosition().getRow();\n\t\tint column = getPosition().getColumn();\n\t\t\n\t\tgetPosition().setCoordinates(row + 1, column);\n\t\tsetPosition(getPosition()) ;\n\t\t// restore health\n\t\tsetHealth(100);\n\t\t// end hunter mode\n\t\tthis.hunter = false;\n\t\t\n\t}", "public void tick() {\n if (this.overlayMessageTime > 0) {\n --this.overlayMessageTime;\n }\n\n if (this.titlesTimer > 0) {\n --this.titlesTimer;\n if (this.titlesTimer <= 0) {\n this.displayedTitle = null;\n this.displayedSubTitle = null;\n }\n }\n\n ++this.ticks;\n Entity entity = this.mc.getRenderViewEntity();\n if (entity != null) {\n this.updateVignetteBrightness(entity);\n }\n\n if (this.mc.player != null) {\n ItemStack itemstack = this.mc.player.inventory.getCurrentItem();\n if (itemstack.isEmpty()) {\n this.remainingHighlightTicks = 0;\n } else if (!this.highlightingItemStack.isEmpty() && itemstack.getItem() == this.highlightingItemStack.getItem() && (itemstack.getDisplayName().equals(this.highlightingItemStack.getDisplayName()) && itemstack.getHighlightTip(itemstack.getDisplayName()).equals(highlightingItemStack.getHighlightTip(highlightingItemStack.getDisplayName())))) {\n if (this.remainingHighlightTicks > 0) {\n --this.remainingHighlightTicks;\n }\n } else {\n this.remainingHighlightTicks = 40;\n }\n\n this.highlightingItemStack = itemstack;\n }\n\n }", "@Override\r\n\tpublic void update(float delta) {\r\n\t\tswitch(this.state) {\r\n\t\tcase DAMAGE:\r\n\t\t\tdamageTime += delta;\r\n\t\t\tif(damageTime > (3 * 0.18f)) {\r\n\t\t\t\tdamageTime = 0;\r\n\t\t\t\tthis.state = slugState.WALK;\r\n\t\t\t\tthis.stateTime = 0;\r\n\t\t\t\tif(this.dir == directionState.LEFT) {\r\n\t\t\t\t\tthis.speed = -30;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthis.speed = 30;\r\n\t\t\t\t}\r\n\t\t\t\tif(this.hitpoints <= 0) {\r\n\t\t\t\t\tthis.setFlaggedForRemoval(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\tcase ATTACK:\r\n\t\t\tattackTime += delta;\r\n\t\t\tif(attackTime > (5 * 0.18f)) {\r\n\t\t\t\tattackTime = 0;\r\n\t\t\t\tthis.stateTime = 0;\r\n\t\t\t\tthis.state = slugState.WALK;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tif(!alert) {\r\n\t\t\tif(this.xStart - x > 72) {\r\n\t\t\t\tthis.move('d');\r\n\t\t\t}\r\n\t\t\telse if(x - this.xStart > 72) {\r\n\t\t\t\tthis.move('a');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public TankLocal() {\n super();\n\n setHullImage(\"/gui/sprites/TankBases/Tank1.png\");\n getHullView().setFocusTraversable(true);\n super.bindTurret();\n\n canShoot.bind(shotCooldownTicks.isEqualTo(0));\n\n getHullView().setOnKeyPressed(event -> {\n //System.out.println(event.getCharacter());\n\n switch(event.getCode()) {\n case UP: isUpPressed.setValue(true); break;\n case DOWN: isDownPressed.setValue(true); break;\n case LEFT: isLeftPressed.setValue(true); break;\n case RIGHT: isRightPressed.setValue(true); break;\n }\n });\n\n getHullView().setOnKeyReleased(event -> {\n switch(event.getCode()) {\n case UP: isUpPressed.setValue(false); break;\n case DOWN: isDownPressed.setValue(false); break;\n case LEFT: isLeftPressed.setValue(false); break;\n case RIGHT: isRightPressed.setValue(false); break;\n }\n });\n\n coolDownArc = new Arc();\n coolDownArc.setType(ArcType.ROUND);;\n coolDownArc.setFill(Paint.valueOf(\"#abababbf\"));\n coolDownArc.setStrokeWidth(0);\n coolDownArc.setRadiusX(40);\n coolDownArc.setRadiusY(40);\n coolDownArc.setStartAngle(90);\n\n //current / initial * 360\n coolDownArc.lengthProperty().bind(shotCooldownTicks.divide(initialCooldownTicks).multiply(360));\n coolDownArc.centerXProperty().bind(getHullView().xProperty().add(20));\n coolDownArc.centerYProperty().bind(getHullView().yProperty().add(20));\n }", "@Override\n public List<Bullet> tick(List<Creep> creeps, boolean levelInProgress) {\n timeToNextShot--;\n List<Bullet> fired = null;\n if(imageRotates || timeToNextShot <= 0) {\n // The creeps are sorted by the default creep comparator in Clock, so that they don't\n // have to be resorted for any tower left on the default (which is often most of them)\n if(!creepComparator.getClass().equals(DEFAULT_CREEP_COMPARATOR.getClass())) {\n // Make a copy so it can be sorted\n creeps = new ArrayList<Creep>(creeps);\n Collections.sort(creeps, creepComparator);\n }\n // If the image rotates, this needs to be done to find out the direction to rotate to\n fired = fireBullets(creeps);\n }\n if (timeToNextShot <= 0 && fired != null && fired.size() > 0) {\n timeToNextShot = fireRate;\n // Use bulletsToAdd as some towers launch bullets between ticks\n bulletsToAdd.addAll(fired);\n }\n List<Bullet> bulletsToReturn = bulletsToAdd;\n bulletsToAdd = new ArrayList<Bullet>();\n return bulletsToReturn;\n }", "public void onLivingUpdate()\n {\n this.updateArmSwingProgress();\n float var1 = this.getBrightness(1.0F);\n\n if (var1 > 0.5F)\n {\n this.entityAge += 2;\n }\n\n super.onLivingUpdate();\n }" ]
[ "0.6948332", "0.67833424", "0.6714785", "0.6490822", "0.6465136", "0.63517964", "0.63502187", "0.63259345", "0.61794865", "0.6157676", "0.6106718", "0.60468197", "0.60439795", "0.60393614", "0.60259765", "0.6006917", "0.59971166", "0.5991951", "0.5976234", "0.5972489", "0.5970682", "0.59258604", "0.592388", "0.59030807", "0.5868835", "0.5843707", "0.58023244", "0.57905346", "0.5779231", "0.57641613", "0.5760786", "0.57469374", "0.5744011", "0.57114124", "0.56976885", "0.5694434", "0.5687396", "0.5681729", "0.5665496", "0.5655889", "0.5628436", "0.56118965", "0.5606634", "0.55963534", "0.5574947", "0.5571309", "0.5556045", "0.55479074", "0.5545953", "0.55457604", "0.55436444", "0.5537959", "0.55376154", "0.5536269", "0.5533005", "0.55277", "0.55253726", "0.5482724", "0.54699326", "0.54666704", "0.5463984", "0.54598725", "0.54550254", "0.54463834", "0.54430276", "0.5419615", "0.54061455", "0.53930104", "0.5390271", "0.53811353", "0.5374857", "0.53665364", "0.53662705", "0.535685", "0.53521127", "0.53519696", "0.5345803", "0.534456", "0.5342391", "0.5338189", "0.5327014", "0.532567", "0.5325337", "0.5324886", "0.5324582", "0.5322493", "0.5320572", "0.5313731", "0.53113073", "0.5309253", "0.5308969", "0.5307451", "0.53048337", "0.53021497", "0.5300337", "0.5297295", "0.5294605", "0.5293977", "0.5291474", "0.52901906", "0.5283517" ]
0.0
-1
To prevent someone from accidentally instantiating the contract class, give it an empty constructor.
public MetaDataContract() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Contract() {\n }", "private StoneContract() {\n }", "public Contracts() {\r\n super();\r\n \r\n }", "public ContractMethod() {\n }", "public BaseContract() {}", "private CatalogContract() {}", "private DishContract() {\n }", "public Contract() {\n // initialise instance variables\n generateContractId();\n }", "private BookMasterContract() {\n }", "public KaChingContract() {\n\t}", "private BookContract() {}", "public CustomerContract() {\n\n }", "private ProjectContract() {\n }", "private TMDBContract() {\n }", "private TodoContract() {}", "private HabitContract() {\n }", "private FavouriteContract() {\n }", "private BookContract() {\n }", "private BookContract() {\n }", "private IgniteContract() {\n }", "private ChildContract() {}", "private DBContract() {}", "private DBContract() {}", "private TrainingContract() {\n }", "private DatabaseContract()\n {\n }", "private CoverageReaderContract() {}", "private FixtureContract() {}", "private DatabaseContract() {}", "public iptablesDBContract() {\n\t}", "public ProductListContract() {}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private FeedReaderContract() {\n }", "public LogContract(){}", "public Contract create(){\n\t\treturn new Contract();\n\t}", "public XpeDccContractLineImpl() {\n }", "private PasskeyContract() {}", "private UserNumbersPersistenceContract() {\n }", "private RecentCardDBContract() {}", "protected Settlement() {\n // empty constructor\n }", "public itemDBContract(){}", "private FeedReaderContract() {}", "public void createContract() {\n\r\n\t}", "private LocationContract() {}", "public FeedReaderContract() {\n }", "public LocationTripViewPersistenceContract()\n\t{\n\t}", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "private CardExchangeModel() {\n\t}", "public ApiReleaseContractInner() {\n }", "private MoneyPreconditions() {\n }", "public Currency() {\n // Instances built via this constructor have undefined behavior.\n }", "public FeedReaderContract() {}", "public FeedReaderContract() {}", "public FeedReaderContract() {}", "public FeedReaderContract() {}", "@Test\n public void shouldCreateEmptyContract() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.emptyContract();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n }", "public ContractRequest() {\n\t\tsuper(PREFERENCES_NAMES);\n\t}", "@SuppressWarnings(\"unused\")\r\n private Rental() {\r\n }", "private SingleObject()\r\n {\r\n }", "public Clade() {}", "public Member() {\n //Empty constructor!\n }", "@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}", "public Market() {\n }", "public CashPayment()\n {\n super();\n }", "public Cable() {\r\n }", "private Ex() {\n }", "public StubPrivateConstructorPair() {\r\n this(null, null);\r\n }", "public AirlineCompany() {\n\t}", "public TransferMarket() {\n }", "public BoletoPaymentRequest() {\n\n }", "public Party() {\n // empty constructor\n }", "private Conversation()\n {\n }", "private Cart() {\n }", "private BankCustomerFacade() {\n }", "public PaymentCard() {\n\t}", "public XxGamMaPaymentReqVOImpl() {\n }", "public InvoiceBalance()\n {\n }", "public Person()\n {\n //intentionally left empty\n }", "public ArrivalQuayStub() {\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic InventoryServiceBean() {\n }", "private Message(){\n // default constructor\n }", "VehicleClass() {}", "public XpeDccNewContractSetupROVORowImpl() {\n }", "public Ctacliente() {\n\t}", "public Potencial() {\r\n }", "private Catalog() {\r\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "@Test\n public void shouldCreateEmptyContractWithoutPreconditions() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.emptyContract();\n\n // Then\n Assert.assertTrue(\"The empty contract has unknown preconditions!\", contract.preconditions().length == 0);\n Assert.assertTrue(\"The empty contract has unknown postconditions!\", contract.postconditions().length == 0);\n Assert.assertEquals(\"The created contract has the wrong annotation type!\", contract.annotationType(),\n Contract.class);\n }", "public TurnoVOClient() {\r\n }", "public Company() {\n\t\tsuper();\n\t}", "public Stock() {\n }", "public Vaccine() {\n\t}", "@SuppressWarnings(\"unused\")\n private Booking() {\n }", "public HLCPaymentDetails() { }", "public VoucherPayment() {\r\n }", "public Account(){\r\n System.out.println(\"Called of empty constructor.\");\r\n }", "public Contact() {\n\t}", "public Method() {\n }", "public BrokerAlgo() {}", "public ProtoVehicle() {\n super();\n }", "public Company() {\r\n\t\tsuper();\r\n\t}" ]
[ "0.86930716", "0.83890015", "0.8324607", "0.830322", "0.81006837", "0.8035093", "0.79511994", "0.7938716", "0.7933073", "0.7892574", "0.7821817", "0.78088", "0.7798501", "0.77876645", "0.7778599", "0.7762839", "0.7737825", "0.77108413", "0.77108413", "0.76641566", "0.7656838", "0.7609163", "0.7609163", "0.75885236", "0.7536669", "0.7454638", "0.7449797", "0.73732203", "0.71755934", "0.714182", "0.71186656", "0.70221525", "0.6962866", "0.6958708", "0.693994", "0.68590194", "0.6856483", "0.68220884", "0.68065333", "0.6789513", "0.6777489", "0.67360723", "0.6697546", "0.6674249", "0.6667026", "0.6640589", "0.6630636", "0.6595022", "0.6591303", "0.65588593", "0.6558557", "0.6558557", "0.6558557", "0.6558557", "0.6537333", "0.65343165", "0.6509564", "0.6472189", "0.6459578", "0.6451396", "0.64422697", "0.6423894", "0.64028525", "0.63972324", "0.63927704", "0.63914645", "0.638014", "0.6371488", "0.6363654", "0.6363397", "0.63583905", "0.6352559", "0.63485", "0.6337337", "0.6330982", "0.6329404", "0.6316643", "0.631479", "0.6301161", "0.6293672", "0.62898827", "0.628884", "0.6277509", "0.62658745", "0.6265757", "0.62652725", "0.6260514", "0.62518847", "0.62451303", "0.62442225", "0.62423754", "0.6242033", "0.6239591", "0.6239183", "0.62349284", "0.62281835", "0.6224535", "0.62178785", "0.6216525", "0.62146264" ]
0.635591
71
TODO: Autogenerated Javadoc Copyright 2013 Interbank IBK. Todos los derechos reservados. The Interface ParametroListarService.
public interface ParametroListarService { /** * Listar parametros. * Fecha: 22/08/2013 * * @param idPanel the id panel * @throws Exception the exception */ public void listarParametros(String idPanel) throws Exception; /** * Eliminar parametro. * Fecha: 22/08/2013 * * @throws Exception the exception */ public void eliminarParametro() throws Exception; /** * Limpiar lista parametro. * Fecha: 22/08/2013 * * @throws Exception the exception */ public void limpiarListaParametro() throws Exception; /** * Obtiene bean listar parametro. * Fecha: 22/08/2013 * * @return bean listar parametro */ public BeanListarParametro getBeanListarParametro(); /** * Establece el bean listar parametro. * * @param beanListarParametro el new bean listar parametro */ public void setBeanListarParametro(BeanListarParametro beanListarParametro); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<ParqueaderoEntidad> listar();", "public List<Perfil> perfilListar() {\r\n\r\n try {\r\n ControladorPerfil ctrlperfil = new ControladorPerfil();\r\n return ctrlperfil.getListaPerfil();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n return new ArrayList<>();\r\n }\r\n }", "public void setBeanListarParametro(BeanListarParametro beanListarParametro);", "public BeanListarParametro getBeanListarParametro();", "public Adaptador_Puntuaciones(ArrayList<Puntuacion> puntuaciones) {\n listaPuntuaciones = puntuaciones;\n }", "public void Listar() {\n try {\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n this.listaApelaciones.clear();\n setListaApelaciones(apelacionesDao.cargaApelaciones());\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public List<Parcheggio> getListParcheggi() {\n return mListParcheggi;\n }", "@SuppressWarnings(\"unchecked\")\r\n\t\r\n\tpublic List<ParadaUtil> listar(String nomeCampo, Long valorCampo) {\n\t\tiniciarTransacao();\r\n\t\tCriteria c = s.createCriteria(ParadaUtil.class);\r\n\t\tc.add(Restrictions.eq(nomeCampo, valorCampo));\r\n\t\treturn c.list();\r\n\t}", "public void limpiarListaParametro() throws Exception;", "List<Vehiculo>listar();", "public static List<Parte> listarPartes(){\n List <Parte> partes=new ArrayList<>();\n Conexion.conectar();\n String sql = \"call ppartes.partesList (?)\";\n \n try {\n CallableStatement cs = Conexion.getConexion().prepareCall(sql);\n cs.registerOutParameter(1, OracleTypes.CURSOR);\n cs.execute();\n \n ResultSet rs = (ResultSet) cs.getObject(1);\n while (rs.next()){\n Parte p = new Parte();\n p.setFecha(rs.getString(\"fecha\"));\n p.setKmInicial(rs.getBigDecimal(\"kmInicial\"));\n p.setKmFinal(rs.getBigDecimal(\"kmFinal\"));\n p.setGastoPeaje(rs.getBigDecimal(\"gastosPeaje\")); \n p.setGastoDietas(rs.getBigDecimal(\"gastosDietas\"));\n p.setGastoCombustible(rs.getBigDecimal(\"gastosCombustible\"));\n p.setGastoVarios(rs.getBigDecimal(\"otrosGastos\"));\n p.setIncidencias(rs.getString(\"incidencias\"));\n p.setEstado(rs.getString(\"estado\"));\n p.setValidado(rs.getString(\"validado\"));\n p.setHorasExtras(rs.getBigDecimal(\"horasExtras\"));\n p.setIdTrabajador(rs.getBigDecimal(\"TRABAJADORES_ID\"));\n p.setNotasAdministrativas(rs.getString(\"notasAdministrativas\"));\n partes.add(p);\n }\n \n rs.close();\n cs.close();\n Conexion.desconectar();\n return partes;\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"No se puede efectuar la conexión, hable con el administrador del sistema\" + ex.getMessage());\n }\n return null;\n }", "public ArrayList<Object> procesar(String comando) {\n\n String[] parametros;\n\n int tam;\n\n if (!comando.contains(\",\")) {\n throw new IllegalArgumentException(\"Cadena \" + comando\n + \" no contiene caracter ,\");\n }\n\n //Se hace el split de la cadena\n parametros = comando.split(\",\");\n\n //Valida la cantidad de parametros\n if (parametros.length > 2) {\n throw new IllegalArgumentException(\"Cadena \" + comando\n + \" contiene mas caracter ,\");\n }\n\n //Valida la cantidad de parametros\n if (parametros.length < 2) {\n throw new IllegalArgumentException(\"Cadena \" + comando\n + \" no contiene los parametros requeridos\");\n }\n\n //Valida que el parametro size sea un numerico\n if (isNumeric(parametros[0])) {\n tam = Integer.parseInt(parametros[0]);\n\n // se valida que el size este entre 1 y 10\n if (tam < 1 || tam > 10) {\n throw new IllegalArgumentException(\"El parametro size [\" + tam\n + \"] debe estar entre 1 y 10\");\n }\n } else {\n throw new IllegalArgumentException(\"Parametro Size [\" + parametros[0]\n + \"] no es un numero\");\n }\n \n ArrayList<Object> retorno = new ArrayList<Object>();\n \n retorno.add(tam);\n retorno.add(parametros[1]);\n \n return retorno;\n\n }", "@Override\n\tpublic List<Componentes> Listar() throws Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Paciente> listar() {\n\t\treturn dao.findAll();\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t\r\n\tpublic List<ParadaUtil> listar(String nomeCampo, boolean valorCampo) {\n\t\tiniciarTransacao();\r\n\t\tCriteria c = s.createCriteria(ParadaUtil.class);\r\n\t\tc.add(Restrictions.eq(nomeCampo, valorCampo));\r\n\t\treturn c.list();\r\n\t}", "public List<Produto> buscarProdutos(){\n return new ArrayList<>();\n }", "public List<PerfilTO> buscarTodos();", "public ArrayList<Veiculo> pesquisarCarro(int tipoCarro);", "@Override\n\tpublic List<Produto> listar(Produto entidade) {\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t\r\n\tpublic List<ParadaUtil> listar() {\n\t\tiniciarTransacao();\r\n\t\tCriteria c = s.createCriteria(ParadaUtil.class);\r\n\t\tc.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\r\n\t\treturn c.list();\r\n\t}", "public List<Tripulante> buscarTodosTripulantes();", "public void listarProducto() {\n }", "List<Plaza> consultarPlazas();", "private void listar() throws Exception{\n int resId=1;\n List<PlatoDia> lista = this.servicioRestaurante.listarMenuDia(resId);\n this.modelListEspecial.clear();\n lista.forEach(lse -> {\n this.modelListEspecial.addElement(\"ID: \" + lse.getId() \n + \" NOMBRE: \" + lse.getNombre()\n + \" DESCRIPCION: \" + lse.getDescripcion()\n + \" PRECIO: \" + lse.getPrecio()\n + \" ENTRADA: \"+lse.getEntrada() \n + \" PRINCIPIO: \"+lse.getPrincipio()\n + \" CARNE: \"+lse.getCarne()\n + \" BEBIDA: \"+lse.getBebida()\n + \" DIA: \"+lse.getDiaSemana());\n });\n }", "List<Pacote> buscarPorTransporte(Transporte transporte);", "public LlistaPistes() {\n _llistaPistes = new ArrayList();\n }", "@Override\r\n public List<Prova> consultarTodosProva() throws Exception {\n return rnProva.consultarTodos();\r\n }", "public ArrayList <String> ListDepartamentos() throws RemoteException;", "public List<PersonaDTO> consultarPersonas() ;", "List<Videogioco> retriveByPiattaforma(String piattaforma);", "public List<persona> listar() {\n\t\tList<persona>lista= new ArrayList<>();\n\t\t\n\t\tString sql=\"SELECT * FROM TABLA.TABLA;\";\n\t\ttry {\n\t\t\n\t\tcon = c.conectar();\n\t\tps= con.prepareStatement(sql);\n\t\trs=ps.executeQuery();\n\t\t\n\t\twhile(rs.next()) {\n\t\t\tPersona p= new persona();\n\t\t\tp.setId(rs.getString(1));\n\t\t\tp.setNom(rs.getString(2));\n\t\t\tlista.add(p);\n\t\t}\n\t}catch (Exception e) {\n\t\t\n\t}return lista;\n\t\n\t}", "List<BeanPedido> getPedidos();", "public List<EstructuraContratosDatDTO> obtenerConsultaProsperaLista() {\n\t\tList<EstructuraContratosDatDTO> consultaNominaLista = consultaProsperaService.listaEstructuraProspera();\n\t\treturn consultaNominaLista;\n\t}", "private void carregarPacienteAtivoList() {\n\t\tthis.setPacienteList(new ArrayList<Paciente>());\n\t\tthis.getPacienteList().addAll(this.getPacienteDAO().getPacienteAtivoList());\n\t}", "List<Persona> obtenerTodasLasPersona();", "@Override\n public List<Paciente> listar(){\n EntityManagerFactory factory = Persistence.createEntityManagerFactory(\"vesaliusPU\"); \n EntityManager em = factory.createEntityManager();\n List<Paciente> listaPaciente = em.createQuery(\"SELECT pac FROM Paciente pac\").getResultList(); \n em.close();\n factory.close();\n return (listaPaciente);\n }", "public ListaPessoal getListaPessoal() {\n\t\treturn listaPessoal;\n\t}", "public GUIModificarPlatoDia(clienteService servicioRestaurante) {\n this.initComponents();\n this.setLocationRelativeTo(null);\n this.btnActualizar.setEnabled(false);\n this.modelListEspecial=new DefaultListModel();\n this.listPlato.setModel(modelListEspecial);\n this.servicioRestaurante=servicioRestaurante; \n try {\n this.listar();\n } catch (Exception ex) {\n Logger.getLogger(GUIModificarPlatoDia.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public ArrayList<DataRestaurante> listarRestaurantes();", "public List<Parcela> readParcela() throws ClassNotFoundException {\r\n java.sql.Connection con = ConnectionFactory.getConnection();\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n List<Parcela> Parcela = new ArrayList<>();\r\n try {\r\n stmt = con.prepareStatement(\"SELECT codParcela, DATEDIFF(NOW(), dataVencParcela) as diasVencPar FROM tbparcela WHERE statusParcela = 1\");\r\n rs = stmt.executeQuery();\r\n while (rs.next()) {\r\n Parcela par = new Parcela();\r\n par.setCodParcela(rs.getInt(\"codParcela\"));\r\n par.setDiasAtrasoPar(rs.getInt(\"diasVencPar\"));\r\n Parcela.add(par);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ParcelaDao.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n ConnectionFactory.closeConnection(con, stmt, rs);\r\n }\r\n return Parcela;\r\n }", "public void GetVehiculos() {\n String A = \"&LOCATION=POR_ENTREGAR\";\n String Pahtxml = \"\";\n \n try {\n \n DefaultListModel L1 = new DefaultListModel();\n Pahtxml = Aso.SendGetPlacas(A);\n Lsvehiculo = Aso.Leerxmlpapa(Pahtxml);\n Lsvehiculo.forEach((veh) -> {\n System.out.println(\"Placa : \" + veh.Placa);\n L1.addElement(veh.Placa);\n });\n \n Lista.setModel(L1);\n \n } catch (Exception ex) {\n Logger.getLogger(Entrega.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public List<Fortaleza> listarFortalezas(){\r\n return cVista.listarFortalezas();\r\n }", "@Override\r\n\tpublic List<EquipoCompetencia> listar() {\n\t\treturn null;\r\n\t}", "void listarDadosNaTelaLivro(ArrayList<Livro> lista,DefaultTableModel model ) throws Exception {\n \n model.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[7];\n Livro aux = lista.get(pos);\n linha[0] = \"\"+aux.getId();\n linha[1] = \"\"+editora.recuperar(aux.getIdEditora());\n linha[2] = \"\"+autor.recuperar(aux.getIdAutor());\n linha[3] = \"\"+areaDeConhecimento.recuperar(aux.getIdAreaDeConhecimento());\n linha[4] = aux.getTituloDoLivro();\n linha[5] = \"\"+aux.getIsbn();\n model.addRow(linha);\n }\n }", "@RequestMapping(value=\"/listar\", method=RequestMethod.GET)\r\n\tpublic String listar(Model model) {\t\t\r\n\t\tmodel.addAttribute(\"titulo\", \"Listado de Pacientes\");\r\n\t\tmodel.addAttribute(\"pacientes\", pacienteService.findAll());\r\n\t\treturn \"listar\";\r\n\t}", "public interface InterfaceSistemaDeControle {\r\n\t\r\n\t/** Este método adiciona um pedido.\r\n\t * \r\n\t * @param p Recebe um objeto do tipo Pedido.\r\n\t */\r\n\t\r\n\tpublic void adicionaPedido (Pedido p);\r\n\t\r\n\t/** Este método pesquisa pedidos utilizando o código do produto.\r\n\t * \r\n\t * @param codProduto Recebe um objeto do tipo String que representa o código do produto.\r\n\t * @return Este método retorna uma Lista do tipo Pedido contendo todos os produtos que têm o código \r\n\t * igual ao passado no parametro.\r\n\t */\r\n\t\r\n\tpublic List<Pedido> pesquisaIncluindoProduto (String codProduto);\r\n\t\r\n\t/** Este método remove um pedido.\r\n\t * \r\n\t * @param numPedido Este método do tipo long recebe o número do pedido que será removido.\r\n\t */\r\n\tpublic void removePedido (long numPedido);\r\n\t\r\n}", "@Override\n public List<Venda> listar() {\n String sql = \"SELECT v FROM venda v\";\n TypedQuery<Venda> query = em.createQuery(sql, Venda.class);\n List<Venda> resultList = query.getResultList();\n\n return resultList;\n }", "public ArrayList<Punto> getListaPuntos() {\n\t\treturn listaPuntos;\n\t}", "@GetMapping\n public List<Tipovehiculo>listar(){\n return service.listar();\n }", "public ArrayList<Departamento> getListdepartamentos(){\n return Listdepartamentos;\n }", "public static ArrayList<Puntaje> listadoPuntajes(String ruta, String jugador)\n { \n ArrayList<String> listadoPuntajes = helper.HelperArchivo.leerLineasArchivo(ruta);\n ArrayList<Puntaje> listado = new ArrayList<>(); \n int nivel;\n double puntajeGanado;\n \n for(String puntaje : listadoPuntajes)\n {\n System.out.println(\"puntaje=\"+puntaje);\n String[] puntajePart = puntaje.split(\",\"); \n if(jugador.equalsIgnoreCase(puntajePart[0]))\n { \n nivel = Integer.parseInt(puntajePart[1]);\n puntajeGanado = Double.parseDouble(puntajePart[2]); \n listado.add(new Puntaje(jugador,nivel,puntajeGanado));\n } \n } \n return listado;\n }", "public void listar(){\r\n // Verifica si la lista contiene elementoa.\r\n if (!esVacia()) {\r\n // Crea una copia de la lista.\r\n Nodo aux = inicio;\r\n // Posicion de los elementos de la lista.\r\n int i = 0;\r\n // Recorre la lista hasta el final.\r\n while(aux != null){\r\n // Imprime en pantalla el valor del nodo.\r\n System.out.print(i + \".[ \" + aux.getValor() + \" ]\" + \" -> \");\r\n // Avanza al siguiente nodo.\r\n aux = aux.getSiguiente();\r\n // Incrementa el contador de la posión.\r\n i++;\r\n }\r\n }\r\n }", "@Override\n public void onPeticionesRecibidasObtenidas(List<PeticionQuedada> peticionesQuedadas) {\n this.lista_peticiones= peticionesQuedadas;\n lista_peticionesRecibidas=new ArrayList<>();\n\n\n progressDialog.show();\n Log.i(\"ADAPTADOR\", \"+++++++++ LISTA PETICIONES RECIBIDAS ++++++++\\n\" + peticionesQuedadas.toString());\n\n PeticionQuedada mPeticionQuedada= peticionesQuedadas.get(peticionesQuedadas.size()-1);\n\n Log.i(\"ADAPTADOR\", \"+++++++++ OBTENIENDO FOTO ++++++++\\n\" + mPeticionQuedada.toString());\n\n presenter.obtenerFotoUsuario(mPeticionQuedada.getAutor_peticion(),mPeticionQuedada);\n\n\n }", "private void listarDepartamentos() {\r\n\t\tdepartamentos = departamentoEJB.listarDepartamentos();\r\n\t}", "@Override\n\tprotected void doListado() throws Exception {\n\t\tList<Department> deptos = new DepartmentDAO().getAllWithManager();\n//\t\tList<Department> deptos = new DepartmentDAO().getAll();\n\t\tthis.addColumn(\"Codigo\").addColumn(\"Nombre\").addColumn(\"Manager\").newLine();\n\t\t\n\t\tfor(Department d: deptos){\n\t\t\taddColumn(d.getNumber());\n\t\t\taddColumn(d.getName());\n\t\t\taddColumn(d.getManager().getFullName());\n\t\t\tnewLine();\n\t\t}\n\t}", "public interface IProcesar {\n\tpublic ArrayList<String> dividir(String cadena); \n\tpublic String unir(ArrayList<String> cadenas);\n}", "private List<Produto> todosProdutos() {\n\t\treturn produtoService.todosProdutos();\n\t}", "public List<Location> listarPorAnunciante() throws SQLException {\r\n \r\n //OBJETO LISTA DE COMODOS\r\n List<Location> enderecos = new ArrayList<>(); \r\n \r\n //OBJETO DE CONEXÃO COM O BANCO\r\n Connection conn = ConnectionMVC.getConnection();\r\n \r\n //OBJETO DE INSTRUÇÃO SQL\r\n PreparedStatement pStatement = null;\r\n \r\n //OBJETO CONJUNTO DE RESULTADOS DA TABELA IMOVEL\r\n ResultSet rs = null;\r\n \r\n try {\r\n \r\n //INSTRUÇÃO SQL DE LISTAR IMÓVEIS\r\n pStatement = conn.prepareStatement(\"select * from pessoa inner join anuncio inner join imagem inner join imovel inner join location inner join comodo\");\r\n \r\n //OBJETO DE RESULTADO DA INSTRUÇÃO\r\n rs = pStatement.executeQuery();\r\n \r\n //PERCORRER OS DADOS DA INSTRUÇÃO\r\n while(rs.next()) {\r\n \r\n //OBJETO UTILIZADO PARA BUSCA\r\n Location endereco = new Location();\r\n \r\n //PARAMETROS DE LISTAGEM\r\n endereco.setCep(rs.getString(\"cep\"));\r\n endereco.setRua(rs.getString(\"rua\"));\r\n endereco.setNumero(rs.getInt(\"numero\"));\r\n endereco.setBairro(rs.getString(\"bairro\"));\r\n endereco.setCidade(rs.getString(\"cidade\"));\r\n endereco.setUf(rs.getString(\"uf\"));\r\n\r\n //OBJETO ADICIONADO A LISTA\r\n enderecos.add(endereco); \r\n }\r\n \r\n //MENSAGEM DE ERRO\r\n } catch (SQLException ErrorSql) {\r\n JOptionPane.showMessageDialog(null, \"Erro ao listar do banco: \" +ErrorSql,\"erro\", JOptionPane.ERROR_MESSAGE);\r\n\r\n //FINALIZAR/FECHAR CONEXÃO\r\n }finally {\r\n ConnectionMVC.closeConnection(conn, pStatement, rs);\r\n } \r\n return enderecos;\r\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesAgente(String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"'\");\n return resultado;\n }", "public void ouvrirListe(){\n\t\n}", "private void listarItems() {\r\n // Cabecera\r\n System.out.println(\"Listado de Items\");\r\n System.out.println(\"================\");\r\n\r\n // Criterio de Ordenación/Filtrado\r\n System.out.printf(\"Criterio de Ordenación .: %S%n\", criOrd.getNombre());\r\n System.out.printf(\"Criterio de Filtrado ...: %S%n\", criFil.getNombre());\r\n\r\n // Separados\r\n System.out.println(\"---\");\r\n\r\n // Filtrado > Selección Colección\r\n List<Item> lista = criFil.equals(Criterio.NINGUNO) ? CARRITO : FILTRO;\r\n\r\n // Recorrido Colección\r\n for (Item item : lista) {\r\n System.out.println(item.toString());\r\n }\r\n\r\n // Pausai\r\n UtilesEntrada.hacerPausa();\r\n }", "public ListIFace getLovAsListService() throws Exception {\r\n\t\tListIFace list = null;\t\r\n\t\tLovResultHandler lovResultHandler = new LovResultHandler( getLovResult() );\r\n\t\tSourceBean lovResultSB = lovResultHandler.getLovResultSB();\r\n\t\tPaginatorIFace paginator = new GenericPaginator();\r\n\t\t\r\n\t\tint numRows = 10;\r\n\t\ttry{\r\n\t\t\tSingletonConfig spagoconfig = SingletonConfig.getInstance();\r\n\t\t\tString lookupnumRows = spagoconfig.getConfigValue(\"SPAGOBI.LOOKUP.numberRows\");\r\n\t\t\tif(lookupnumRows!=null) {\r\n\t\t\t\tnumRows = Integer.parseInt(lookupnumRows);\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tnumRows = 10;\r\n\t\t\tSpagoBITracer.major(SpagoBIConstants.NAME_MODULE, this.getClass().getName(),\r\n\t\t\t\t\t \"getListServiceBaseConfig\", \"Error while recovering number rows for \" +\r\n\t\t\t\t\t \"lookup from configuration, usign default 10\", e);\r\n\t\t}\r\n\t\tpaginator.setPageSize(numRows);\r\n\t\t\r\n\t\t\r\n\t\tList rows = null;\r\n\t\tif (lovResultSB != null) {\r\n\t\t\trows = lovResultSB.getAttributeAsList(\"ROW\");\r\n\t\t\tfor (int i = 0; i < rows.size(); i++)\r\n\t\t\t\tpaginator.addRow(rows.get(i));\r\n\t\t}\r\n\t\tlist = new GenericList();\r\n\t\tlist.setPaginator(paginator);\r\n\t\treturn list;\r\n\t}", "public Parametro[] getParametros() {\n return parametros;\n }", "public List<NotaDeCredito> procesar();", "public List<Producto> listar() throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Producto> lista = new ArrayList<Producto>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT t.idproducto, t.nombre_producto, t.imagen, t.idcategoria, t.idmarca, t.idmodelo, c.nombre as categoria, m.nombre as marca, d.nombre as modelo \"\n\t\t\t\t\t+ \" FROM conftbc_producto t INNER JOIN conftbc_categoria c on c.idcategoria = t.idcategoria\"\n\t\t\t\t\t+ \" INNER JOIN conftbc_marca m on m.idmarca = t.idmarca INNER JOIN conftbc_modelo d on d.idmodelo = t.idmodelo \";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tProducto producto = new Producto();\n\t\t\t\tproducto.setIdproducto(rs.getInt(\"idproducto\"));\n\t\t\t\tproducto.setNombre(rs.getString(\"nombre_producto\"));\n\t\t\t\tproducto.setImagen(rs.getString(\"imagen\"));\n\t\t\t\tCategoria categoria = new Categoria();\n\t\t\t\tcategoria.setIdcategoria(rs.getInt(\"idcategoria\"));\n\t\t\t\tcategoria.setNombre(rs.getString(\"categoria\"));\n\t\t\t\tproducto.setCategoria(categoria);\n\t\t\t\tMarca marca = new Marca();\n\t\t\t\tmarca.setIdmarca(rs.getInt(\"idmarca\"));\n\t\t\t\tmarca.setNombre(rs.getString(\"marca\"));\n\t\t\t\tproducto.setMarca(marca);\n\t\t\t\tModelo modelo = new Modelo();\n\t\t\t\tmodelo.setIdmodelo(rs.getInt(\"idmodelo\"));\n\t\t\t\tmodelo.setNombre(rs.getString(\"modelo\"));\n\t\t\t\tproducto.setModelo(modelo);\n\t\t\t\tlista.add(producto);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "private ArrayList<Parametro> getParametros(int pregunta){\n ArrayList<Parametro> arrayListParametros = new ArrayList<>();\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql =\"SELECT p FROM ParametroInterrogante pi \"\n + \"JOIN pi.interrogante i \"\n + \"JOIN pi.parametro p \"\n + \"WHERE p.estado='a' AND i.estado='a' \"\n + \"AND i.idinterrogante = :pregunta\";\n\n Query query = em.createQuery(jpql);\n query.setParameter(\"pregunta\", pregunta);\n List<Parametro> list = query.getResultList();\n for(Parametro p : list){\n arrayListParametros.add(p);\n }\n\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n return arrayListParametros;\n }", "public List<Documento> getListaDocumento()\r\n/* 297: */ {\r\n/* 298:299 */ if (this.listaDocumento == null) {\r\n/* 299: */ try\r\n/* 300: */ {\r\n/* 301:301 */ this.listaDocumento = this.servicioDocumento.buscarPorDocumentoBaseOrganizacion(DocumentoBase.RETENCION_PROVEEDOR, AppUtil.getOrganizacion()\r\n/* 302:302 */ .getId());\r\n/* 303: */ }\r\n/* 304: */ catch (ExcepcionAS2 e)\r\n/* 305: */ {\r\n/* 306:304 */ addInfoMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()));\r\n/* 307: */ }\r\n/* 308: */ }\r\n/* 309:307 */ return this.listaDocumento;\r\n/* 310: */ }", "public void listar() {\n\t\t\n\t}", "@Override\n\tpublic List<Servicio> listarServicioTQ() {\n\t\tservicioDao = new ServicioDaoImpl();\n\t\treturn servicioDao.listarServicioTQ();\n\t}", "public ArrayList<String> ListDepartamentos(String faculdadeTemp) throws RemoteException;", "public void listar(){\n if (!esVacia()) {\n // Crea una copia de la lista.\n NodoEmpleado aux = inicio;\n // Posicion de los elementos de la lista.\n int i = 0;\n System.out.print(\"-> \");\n // Recorre la lista hasta llegar nuevamente al incio de la lista.\n do{\n // Imprime en pantalla el valor del nodo.\n System.out.print(i + \".[ \" + aux.getEmpleado() + \" ]\" + \" -> \");\n // Avanza al siguiente nodo.\n aux = aux.getSiguiente();\n // Incrementa el contador de la posi�n.\n i++;\n }while(aux != inicio);\n }\n }", "public List<Produto> listar() {\n return manager.createQuery(\"select distinct (p) from Produto p\", Produto.class).getResultList();\n }", "@Override\n\tpublic List<Estadoitem> listar() {\n\t\treturn estaitemdao.listar();\n\t}", "public ArrayList<LoteriaDto> listarLoterias() {\n\n ArrayList<LoteriaDto> lista = new ArrayList();\n Connection con = null;\n try {\n con = Recurso.Conexion.getPool().getDataSource().getConnection();\n String sql = \"SELECT codigo,nombre,dia,hora,minuto,ruta FROM loteria\";\n PreparedStatement str;\n str = con.prepareStatement(sql);\n ResultSet rs = str.executeQuery();\n\n while (rs.next()) {\n LoteriaDto dto = new LoteriaDto();\n dto.setCodigo(rs.getInt(1));\n dto.setNombre(rs.getString(2));\n dto.setDia(rs.getInt(3));\n dto.setHora(rs.getInt(4));\n dto.setMinuto(rs.getInt(5));\n dto.setRuta(rs.getString(6));\n lista.add(dto);\n\n }\n str.close();\n rs.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n } finally {\n if (con != null) {\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorLoteria.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return lista;\n }\n }", "@RequestMapping(method = RequestMethod.GET)\n\tpublic @ResponseBody List<ServicoPessoa> getServicoPessoas()\n\t\t\tthrows Exception {\n\t\ttry {\n\t\t\tList<ServicoPessoa> servicoPessoas = servicoPessoaService.getServicoPessoas();\n\t\t\treturn servicoPessoas;\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "@Override\n\tpublic List<Produto> listPorId(int id) throws Exception {\n\t\treturn null;\n\t}", "public ArrayList<Exemplar> listar() throws GeralException{\n try {\n return dao.lista();\n } catch (ConexaoException ex) {\n throw new GeralException(\"Erro na conexão: \"+ex.getMessage());\n } catch (DAOException ex) {\n throw new GeralException(\"Erro na DAO: \"+ex.getMessage());\n }\n }", "public interface CarListService {\n\n public List<Transportation> getLocal();\n public List<Transportation> getLuxery();\n public List<Transportation> getExotic();\n}", "public static List<Parte> partesTFA(){\n List <Parte> partes=new ArrayList<>();\n Conexion.conectar();\n String sql = \"call ppartes.partesTA (?)\";\n \n try {\n CallableStatement cs = Conexion.getConexion().prepareCall(sql);\n \n \n \n cs.registerOutParameter(1, OracleTypes.CURSOR);\n cs.execute();\n \n ResultSet rs = (ResultSet) cs.getObject(1);\n while (rs.next()){\n Parte p = new Parte();\n p.setFecha(rs.getString(\"fecha\"));\n p.setKmInicial(rs.getBigDecimal(\"kmInicial\"));\n p.setKmFinal(rs.getBigDecimal(\"kmFinal\"));\n p.setGastoPeaje(rs.getBigDecimal(\"gastosPeaje\")); \n p.setGastoDietas(rs.getBigDecimal(\"gastosDietas\"));\n p.setGastoCombustible(rs.getBigDecimal(\"gastosCombustible\"));\n p.setGastoVarios(rs.getBigDecimal(\"otrosGastos\"));\n p.setIncidencias(rs.getString(\"incidencias\"));\n p.setEstado(rs.getString(\"estado\"));\n p.setValidado(rs.getString(\"validado\"));\n p.setHorasExtras(rs.getBigDecimal(\"horasExtras\"));\n p.setIdTrabajador(rs.getBigDecimal(\"TRABAJADORES_ID\"));\n p.setNotasAdministrativas(rs.getString(\"notasAdministrativas\"));\n partes.add(p);\n }\n \n rs.close();\n cs.close();\n Conexion.desconectar();\n return partes;\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"No se puede efectuar la conexión, hable con el administrador del sistema\" + ex.getMessage());\n }\n return null;\n }", "public interface TProvinciasDAO {\n\t\n\tpublic ArrayList<TProvinciasBean> obtenerProvincias(String codigoDepartamento) throws DataAccessException;\n\t\n}", "public ArrayList<Producto> ListaProductos() {\n ArrayList<Producto> list = new ArrayList<Producto>();\n \n try {\n conectar();\n ResultSet result = state.executeQuery(\"select * from producto;\");\n while(result.next()) {\n Producto nuevo = new Producto();\n nuevo.setIdProducto((int)result.getObject(1));\n nuevo.setNombreProducto((String)result.getObject(2));\n nuevo.setFabricante((String)result.getObject(3));\n nuevo.setCantidad((int)result.getObject(4));\n nuevo.setPrecio((int)result.getObject(5));\n nuevo.setDescripcion((String)result.getObject(6));\n nuevo.setSucursal((int)result.getObject(7));\n list.add(nuevo);\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return list;\n }", "public RecyclerViewProductos( List<Producto> lista) {\n this.productoList=lista;\n }", "public void marcarTodos() {\r\n\t\tfor (int i = 0; i < listaPlantaCargoDto.size(); i++) {\r\n\t\t\tPlantaCargoDetDTO p = new PlantaCargoDetDTO();\r\n\t\t\tp = listaPlantaCargoDto.get(i);\r\n\t\t\tif (!obtenerCategoria(p.getPlantaCargoDet())\r\n\t\t\t\t\t.equals(\"Sin Categoria\"))\r\n\t\t\t\tp.setReservar(true);\r\n\t\t\tlistaPlantaCargoDto.set(i, p);\r\n\t\t}\r\n\t\tcantReservados = listaPlantaCargoDto.size();\r\n\t}", "@Override\n\tpublic List<Perfil> listaPerfilDescarte(Perfil perfil) {\n\t\tList<Perfil> lista = perfilDAOImp.listaPerfilDescarte(perfil);\n\t\treturn lista;\n\t}", "public ArrayList<DataRestaurante> listarRestaurantes(String patron) throws Exception;", "List<BeanPedido> getPedidos(String idUsuario);", "public List<PersonEntity> obtenerDatosPersonas() {\n\n\t\ttry {\n\n\t\t\tlog.info(\"Procediendo a obtener el detalle de los clientes\");\n\t\t\tStoredProcedureQuery storedProcedureQuery = entityManager\n\t\t\t\t\t\n\t\t\t\t\t// Definicion\n\t\t\t\t\t.createStoredProcedureQuery(prop.getPROCEDURE_OBTENER_PERSONAS(), PersonEntity.class);\n\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<PersonEntity> res = storedProcedureQuery.getResultList();\n\n\t\t\tlog.info(\"Lista consultada exitosamente\");\n\t\t\tlog.info(\"Recorriendo lista de salida...\");\n\t\t\tfor (PersonEntity p : res) {\n\t\t\t\tlog.info(\"Persona : \" + p);\n\t\t\t}\n\n\t\t\treturn res;\n\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error al consultar procedure [\" + prop.getPROCEDURE_OBTENER_PERSONAS() + \"] , Detalle > \" + e.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\t\r\n\t@Override\r\n\tpublic List<Distrito> listar() {\n\t\tList<Distrito> lista = new ArrayList<Distrito>();\r\n\t\tQuery q = em.createQuery(\"select m from Distrito m\");\r\n\t\tlista = (List<Distrito>) q.getResultList();\r\n\t\treturn lista;\r\n\t}", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\r\n\tpublic List<Departamento> listarDepartamento() {\r\n\t\tQuery query = em.createNamedQuery(Departamento.CONSULTA_LISTAR_DEPARTAMENTOS);\r\n\t\tList<Departamento> dep = query.getResultList();\r\n\t\tif (dep.isEmpty()) {\r\n\t\t\tthrow new ExcepcionNegocio(\"No hay departamentos registrados en la base de datos\");\r\n\t\t} else {\r\n\t\t\treturn dep;\r\n\t\t}\r\n\t}", "public String[] ListaPuertos() {\n listaPuertos = CommPortIdentifier.getPortIdentifiers();\n String[] puertos = null;\n ArrayList p = new ArrayList();\n int i = 0;\n while (listaPuertos.hasMoreElements()) {\n id_Puerto = (CommPortIdentifier) listaPuertos.nextElement();\n if (id_Puerto.getPortType() == 1) {\n p.add(id_Puerto.getName());\n }\n i++;\n }\n puertos = new String[p.size()];\n return (String[]) p.toArray(puertos);\n }", "public List<Perguntas> getPerguntas(String servico) {\r\n String idSolicitacao = \"\";\r\n List<Perguntas> perguntas = new ArrayList<>();\r\n\r\n String sql = \"Select\\n\"\r\n + \" perguntas.Id_Perguntas,\\n\"\r\n + \" perguntas.pergunta,\\n\"\r\n + \" perguntas.Servico_id_servico,\\n\"\r\n + \" solicitacoes.id_solicitacao\\n\"\r\n + \"FROM \\n\"\r\n + \"\tpid \\n\"\r\n + \"\\n\"\r\n + \"INNER JOIN solicitacoes on (pid.cod_pid= solicitacoes.PID_cod_pid)\\n\"\r\n + \" INNER JOIN servico on\t(solicitacoes.Servico_id_servico=servico.id_servico)\\n\"\r\n + \" INNER JOIN perguntas on \t(servico.id_servico=perguntas.Servico_id_servico)\\n\"\r\n + \" WHERE solicitacoes.em_chamado = 3 and servico.id_servico = \" + servico + \";\";\r\n\r\n stmt = null;\r\n rs = null;\r\n\r\n try {\r\n stmt = conn.createStatement();\r\n rs = stmt.executeQuery(sql);\r\n while (rs.next()) {\r\n Perguntas p = new Perguntas();\r\n\r\n p.setIdPerguntas(rs.getInt(1));\r\n p.setIdServico(rs.getInt(3));\r\n p.setPergunta(rs.getString(2));\r\n idSolicitacao = rs.getString(4);\r\n perguntas.add(p);\r\n }\r\n mudaStatus(idSolicitacao);\r\n\r\n return perguntas;\r\n\r\n } catch (SQLException | ArrayIndexOutOfBoundsException ex) {\r\n Logger.getLogger(SimpleQueries.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return perguntas;\r\n }", "public ArrayList<Miembro> daoListar() throws SQLException {\r\n\t\t\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT * from miembros\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\tArrayList<Miembro> result = new ArrayList<Miembro>();\r\n\t\t\r\n\t\twhile(rs.next()) { //Convertimos el resulset en un arraylist\r\n\t\t\tresult.add(new Miembro(rs.getInt(\"id\"),rs.getString(\"nombre\"),rs.getString(\"apellido1\"),rs.getString(\"apellido2\"),rs.getInt(\"edad\"),rs.getInt(\"cargo\")));\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}", "private void mostraPesquisa(List<BeansLivro> livros) {\n // Limpa a tabela sempre que for solicitado uma nova pesquisa\n limparTabela();\n \n if (livros.isEmpty()) {\n JOptionPane.showMessageDialog(rootPane, \"Nenhum registro encontrado.\");\n } else { \n // Linha em branco usada no for, para cada registro é criada uma nova linha \n String[] linha = new String[] {null, null, null, null, null, null, null};\n // P/ cada registro é criada uma nova linha, cada linha recebe os campos do registro\n for (int i = 0; i < livros.size(); i++) {\n tmLivro.addRow(linha);\n tmLivro.setValueAt(livros.get(i).getId(), i, 0);\n tmLivro.setValueAt(livros.get(i).getExemplar(), i, 1);\n tmLivro.setValueAt(livros.get(i).getAutor(), i, 2);\n tmLivro.setValueAt(livros.get(i).getEdicao(), i, 3);\n tmLivro.setValueAt(livros.get(i).getAno(), i, 4);\n tmLivro.setValueAt(livros.get(i).getDisponibilidade(), i, 5); \n } \n }\n }", "public ArrayList<Objets> getObjetParNoeud() {\n\t\treturn ListObjetParNoeud;\n\t}", "@GET\n\t@Path(\"/carrocerias\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic ArrayList<CarroceriaDTO> listarCarrocerias(){\n\t\tSystem.out.println(\"ini: listarCarrocerias()\");\n\t\t\n\t\tCarroceriaService tipotService = new CarroceriaService();\n\t\tArrayList<CarroceriaDTO> lista = tipotService.ListadoCarroceria();\n\t\t\n\t\tif (lista == null) {\n\t\t\tSystem.out.println(\"Listado Vacío\");\n\t\t}else {\n\t\t\tSystem.out.println(\"Consulta Exitosa\");\n\t\t}\n\n\t\tSystem.out.println(\"fin: listarCarrocerias()\");\n\t\t\n\t\treturn lista;\n\t}", "public ArrayList<Empleado> getListaEmpleados(){\n return listaEmpleados;\n }", "List<TipoHuella> listarTipoHuellas();", "public void addPedidoDetalle(biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle param){\n if (localPedidoDetalle == null){\n localPedidoDetalle = new biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle[]{};\n }\n\n \n\n java.util.List list =\n org.apache.axis2.databinding.utils.ConverterUtil.toList(localPedidoDetalle);\n list.add(param);\n this.localPedidoDetalle =\n (biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle[])list.toArray(\n new biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle[list.size()]);\n\n }", "@Override\n\tpublic List<Reparto> list() throws Exception {\n\t\treturn entityManager.createQuery(\"from Reparto\", Reparto.class).getResultList();\n\t}", "public ArrayList<DataCliente> listarClientes();" ]
[ "0.6826827", "0.6690298", "0.66779053", "0.6650231", "0.65156", "0.6513449", "0.64954054", "0.62570393", "0.6205896", "0.6197024", "0.61727595", "0.6169214", "0.6136449", "0.6097154", "0.6089307", "0.6079605", "0.6049725", "0.6033282", "0.6021508", "0.59920025", "0.5977539", "0.5937991", "0.5931008", "0.5922044", "0.59190154", "0.5916029", "0.5899088", "0.5876371", "0.5876173", "0.58560723", "0.58519644", "0.5851204", "0.58432955", "0.58323526", "0.5821535", "0.582086", "0.57952356", "0.5787925", "0.5772591", "0.57620615", "0.57610774", "0.575727", "0.57564473", "0.5737061", "0.57306623", "0.57212687", "0.5715094", "0.57140654", "0.57095635", "0.56856745", "0.5683778", "0.56691104", "0.56609535", "0.5651621", "0.5651309", "0.5647592", "0.56463623", "0.5642621", "0.56308633", "0.5627565", "0.5624035", "0.5623078", "0.5619482", "0.56159043", "0.5615864", "0.56150216", "0.5614416", "0.56058097", "0.5604664", "0.56004643", "0.55902696", "0.5576098", "0.55744934", "0.55720973", "0.5553246", "0.55518013", "0.554996", "0.5548041", "0.55422366", "0.553994", "0.55394953", "0.5538297", "0.5538254", "0.55236924", "0.5522759", "0.5513969", "0.5513232", "0.5512223", "0.5509475", "0.5508553", "0.55055815", "0.55048484", "0.54975975", "0.5497594", "0.5491191", "0.5490619", "0.5488588", "0.5487789", "0.5487613", "0.5486777" ]
0.7374498
0
Listar parametros. Fecha: 22/08/2013
public void listarParametros(String idPanel) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void limpiarListaParametro() throws Exception;", "java.util.List<datawave.webservice.query.QueryMessages.QueryImpl.Parameter> getParametersList();", "ParameterList getParameters();", "public BeanListarParametro getBeanListarParametro();", "List<FichaDocente> listarDocentesxParametroxFacultad(String parametro, Integer integer);", "public void remplireListeParam(){\r\n bddParam.add(\"id\");\r\n bddParam.add(\"site\");\r\n bddParam.add(\"smtp_serv\");\r\n bddParam.add(\"smtp_port\");\r\n bddParam.add(\"smtp_user\");\r\n bddParam.add(\"smtp_mail\");\r\n bddParam.add(\"smtp_pass\");\r\n bddParam.add(\"mail_envoie\");\r\n bddParam.add(\"licence\");\r\n bddParam.add(\"pop_up\");\r\n bddParam.add(\"mail_rapport\");\r\n bddParam.add(\"archives\");\r\n bddParam.add(\"mail\");\r\n bddParam.add(\"dbext_adress\");\r\n bddParam.add(\"dbext_port\");\r\n bddParam.add(\"dbext_user\");\r\n bddParam.add(\"dbext_pass\");\r\n bddParam.add(\"dbext_delais\");\r\n bddParam.add(\"dbext_name\");\r\n bddParam.add(\"dbext\");\r\n bddParam.add(\"dbext_purge\");\r\n bddParam.add(\"dbext_perte\");\r\n bddParam.add(\"langue\");\r\n \r\n }", "java.util.List<gen.grpc.hospital.examinations.Parameter> \n getParameterList();", "java.util.List<com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameter> \n getParamsList();", "List<PowreedCommandParameter> getParameters();", "public List<IParam> getParams();", "public List<IParam> getParams();", "java.util.List<com.google.cloud.commerce.consumer.procurement.v1.Parameter> getParametersList();", "private static List<String> loadParams(Type.FunctionOrMethod function){\n\t\tint numParams = function.params().size();\n\t\tList<String >params = new ArrayList<String>();\n\n\t\t//Params are numbered in order, so just put in the variable names\n\t\tfor (int i = 0; i < numParams; i++){\n\t\t\tparams.add(String.format(\"$%d\", i));\n\t\t}\n\n\t\treturn params;\n\t}", "String [] getParameters();", "public List<Esysmeudef> list(Map<String, Object> params);", "public Collection<String> getParameterIds();", "public static ArrayList getParameterList(HttpServletRequest req) {\n ArrayList result = new ArrayList();\n\n Enumeration parameterNames = req.getParameterNames();\n\n if (parameterNames != null) {\n String tStr;\n String vStr;\n while (parameterNames.hasMoreElements()) {\n tStr = parameterNames.nextElement().toString();\n vStr = req.getParameter(tStr);\n\n if (vStr != null) {\n DataBean tmp = new DataBean();\n tmp.setValue(\"name\", tStr);\n tmp.setValue(\"value\", vStr);\n\n result.add(tmp);\n }\n }\n }\n\n return (result);\n }", "public List<GroupParameter> getParameters();", "public void getMutliParams(String name, Collection<String> list) {\n\t\tNodeList nodes = paramElem.getElementsByTagName(name);\n\t\tfor (int i = 0; i < nodes.getLength(); i++) {\n\t\t\tElement elem = (Element) nodes.item(i);\n\t\t\tlist.add(getTextContent(elem));\n\t\t}\n\t}", "public List<Parameter> getParameter( )\n {\n return _parameter;\n }", "private void listParameters(String methodName, JavaSamplerContext context) {\n\t\tIterator<String> iter = context.getParameterNamesIterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tString name = iter.next();\n\t\t\tlog.debug(\"inside {}, name {} = {}\",\n\t\t\t\t\tnew Object[] { methodName, name, context.getParameter(name) });\n\t\t}\n\t}", "private void listParameters(JavaSamplerContext context)\n {\n if (getLogger().isDebugEnabled())\n {\n Iterator argsIt = context.getParameterNamesIterator();\n while (argsIt.hasNext())\n {\n String name = (String) argsIt.next();\n getLogger().debug(name + \"=\" + context.getParameter(name));\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\t\r\n\tpublic List<ParadaUtil> listar(String nomeCampo, Long valorCampo) {\n\t\tiniciarTransacao();\r\n\t\tCriteria c = s.createCriteria(ParadaUtil.class);\r\n\t\tc.add(Restrictions.eq(nomeCampo, valorCampo));\r\n\t\treturn c.list();\r\n\t}", "public void setBeanListarParametro(BeanListarParametro beanListarParametro);", "private String[] getParams(int amount) {\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\tString paramArray[] = {param1,param2,param3,param4,param5,param6};\r\n\t\tString letters[] = {\"a\",\"b\",\"c\",\"d\",\"e\",\"f\"};\r\n\t\tfor(int i = 0; i < amount; i++) {\r\n\t\t\tlist.add(\"-\" + letters[i]);\r\n\t\t\tlist.add(paramArray[i]);\r\n\t\t}\r\n\t\treturn list.toArray(new String[0]);\r\n\t}", "private static List<String> parametersToList(Series<Parameter> headers) {\n if (headers.isEmpty()) {\n return Collections.emptyList();\n }\n List<String> stringHeaders = new ArrayList<>(headers.size());\n for (Parameter header : headers) {\n stringHeaders.add(header.getValue());\n }\n return stringHeaders;\n }", "public List<ParamIntervento> getAll()\n {\n\t System.out.println(\"chiamo getAll: \");\n System.out.flush();\n CriteriaQuery<ParamIntervento> criteria = this.entityManager.getCriteriaBuilder().createQuery(ParamIntervento.class);\n return this.entityManager.createQuery(criteria.select(criteria.from(ParamIntervento.class))).getResultList();\n }", "List<ParqueaderoEntidad> listar();", "java.util.List<? extends gen.grpc.hospital.examinations.ParameterOrBuilder> \n getParameterOrBuilderList();", "public Collection<String> getParamNames();", "public ArrayList<String> getParameterValues() { return this.params; }", "public String parameterListToString(){\n StringBuilder sb = new StringBuilder();\n for (String parameter : parameterList){\n sb.append(parameter);\n if (!parameter.equals(parameterList.get(parameterList.size() - 1))){\n sb.append(\", \");\n }\n }\n return sb.toString();\n }", "List<Videogioco> retriveByPiattaforma(String piattaforma);", "public ListParameter()\r\n\t{\r\n\t}", "public List<Parameter> getParamters() {\r\n return this.lstParameters;\r\n }", "public List getParameterValues() {\r\n\t\treturn parameterValues;\r\n\t}", "public ArrayList parametrosConectorBaseDatos()\r\n\t{\r\n\t\tArrayList parametros = new ArrayList(); \r\n\t\ttry\r\n\t\t{\r\n\t\t\tFileInputStream fr = new FileInputStream( \"./images/parametrosBD.txt\" );\r\n\t \tDataInputStream entrada = new DataInputStream(fr);\r\n\t String parametro = \"\";\r\n\t String valorparametro = \"\";\r\n\t boolean esvalor = false;\r\n\t while((parametro=entrada.readLine())!= null)\r\n\t {\r\n\t \tfor (int i = 0; i < parametro.length(); i++) \r\n\t \t{\r\n\t \t\tif(esvalor == true)\r\n\t \t\t{\r\n\t \t\t\tvalorparametro += parametro.charAt(i);\r\n\t \t\t}\r\n\t \t\tif(parametro.charAt(i) == ':')\r\n\t \t\t{\r\n\t \t\t\tesvalor = true;\r\n\t \t\t}\r\n\t\t\t\t}\r\n\t \tparametros.add(valorparametro.trim());\r\n\t \tvalorparametro = \"\";\r\n\t \tesvalor = false;\r\n\t }\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t}\r\n\t\treturn parametros;\r\n\t}", "@Parameters\n public static Collection<Object[]> testParameters() {\n Collection<Object[]> params = new ArrayList<Object[]>();\n\n for (OPT opt: OPT.values()) {\n Object[] par = new Object[2];\n par[0] = opt;\n par[1] = opt.name();\n\n params.add( par );\n }\n\n return params;\n }", "public ArrayList<Object> procesar(String comando) {\n\n String[] parametros;\n\n int tam;\n\n if (!comando.contains(\",\")) {\n throw new IllegalArgumentException(\"Cadena \" + comando\n + \" no contiene caracter ,\");\n }\n\n //Se hace el split de la cadena\n parametros = comando.split(\",\");\n\n //Valida la cantidad de parametros\n if (parametros.length > 2) {\n throw new IllegalArgumentException(\"Cadena \" + comando\n + \" contiene mas caracter ,\");\n }\n\n //Valida la cantidad de parametros\n if (parametros.length < 2) {\n throw new IllegalArgumentException(\"Cadena \" + comando\n + \" no contiene los parametros requeridos\");\n }\n\n //Valida que el parametro size sea un numerico\n if (isNumeric(parametros[0])) {\n tam = Integer.parseInt(parametros[0]);\n\n // se valida que el size este entre 1 y 10\n if (tam < 1 || tam > 10) {\n throw new IllegalArgumentException(\"El parametro size [\" + tam\n + \"] debe estar entre 1 y 10\");\n }\n } else {\n throw new IllegalArgumentException(\"Parametro Size [\" + parametros[0]\n + \"] no es un numero\");\n }\n \n ArrayList<Object> retorno = new ArrayList<Object>();\n \n retorno.add(tam);\n retorno.add(parametros[1]);\n \n return retorno;\n\n }", "@SuppressWarnings(\"unchecked\")\r\n\t\r\n\tpublic List<ParadaUtil> listar(String nomeCampo, boolean valorCampo) {\n\t\tiniciarTransacao();\r\n\t\tCriteria c = s.createCriteria(ParadaUtil.class);\r\n\t\tc.add(Restrictions.eq(nomeCampo, valorCampo));\r\n\t\treturn c.list();\r\n\t}", "public List<ParameterObject> getParameterList() {\n return parameterList;\n }", "java.util.List<godot.wire.Wire.Value> \n getArgsList();", "java.util.List<java.lang.String>\n getArgsList();", "public void listar() {\n\t\t\n\t}", "List<Parameter> uriParameters();", "@Test\r\n\tpublic void testListArg() {\r\n\t\tAssert.assertEquals(\"test[(`a,`b,`c)]\", new FunctionImpl.FunctionBuilderImpl(\"test\").param(SymbolValue.froms(\"a\", \"b\", \"c\")).build().toQ());\r\n\t}", "public List<ActDetalleActivo> listarPorSerial(String serial,String amie, int estado,Integer anio,int estadoActivo);", "public String getObtieneParametrosReformaTribu()throws Exception {\n Connection conn = null;\n CallableStatement call = null;\n String result = new String();\n\n try {\n\n conn = this.getConnection();\n\n //Deudas que forman parte de la propuesta, pero no son propias del contribuyente\n call = conn.prepareCall(\"{? =call PKG_OBTIENE_PARAM.obtieneParametroReformaTribu}\");\n call.registerOutParameter(1, OracleTypes.VARCHAR);\n call.execute();\n\n result = call.getObject(1).toString();\n \n call.close(); \n \n }catch (Exception e) {\n e.printStackTrace();\n }\n finally{\n this.closeConnection();\n }\n\t\treturn result;\n }", "private List<String> nextIdentListParam()\n {\n if (empty())\n return null;\n\n int start = position;\n ArrayList<String> result = null;\n\n if (!consume('('))\n return null;\n skipWhitespace();\n\n do {\n String ident = nextIdentifier();\n if (ident == null) {\n position = start;\n return null;\n }\n if (result == null)\n result = new ArrayList<>();\n result.add(ident);\n skipWhitespace();\n } while (skipCommaWhitespace());\n\n if (consume(')'))\n return result;\n\n position = start;\n return null;\n }", "public java.util.List<com.isat.catalist.oms.order.OOSOrderLineItemParamType> getParametersList()\n {\n final class ParametersList extends java.util.AbstractList<com.isat.catalist.oms.order.OOSOrderLineItemParamType>\n {\n public com.isat.catalist.oms.order.OOSOrderLineItemParamType get(int i)\n { return OOSOrderLineItemTypeImpl.this.getParametersArray(i); }\n \n public com.isat.catalist.oms.order.OOSOrderLineItemParamType set(int i, com.isat.catalist.oms.order.OOSOrderLineItemParamType o)\n {\n com.isat.catalist.oms.order.OOSOrderLineItemParamType old = OOSOrderLineItemTypeImpl.this.getParametersArray(i);\n OOSOrderLineItemTypeImpl.this.setParametersArray(i, o);\n return old;\n }\n \n public void add(int i, com.isat.catalist.oms.order.OOSOrderLineItemParamType o)\n { OOSOrderLineItemTypeImpl.this.insertNewParameters(i).set(o); }\n \n public com.isat.catalist.oms.order.OOSOrderLineItemParamType remove(int i)\n {\n com.isat.catalist.oms.order.OOSOrderLineItemParamType old = OOSOrderLineItemTypeImpl.this.getParametersArray(i);\n OOSOrderLineItemTypeImpl.this.removeParameters(i);\n return old;\n }\n \n public int size()\n { return OOSOrderLineItemTypeImpl.this.sizeOfParametersArray(); }\n \n }\n \n synchronized (monitor())\n {\n check_orphaned();\n return new ParametersList();\n }\n }", "public List<String> getParametersLabel() {\n\t\treturn PARAMETERS;\n\t}", "List<String> getListInput(String fieldName);", "java.util.List<java.lang.String> getValuesList();", "public void initParams(List<String> list) {\n if ((list.size() & 1) != 0) {\n throw new IllegalArgumentException(\"list size must be a multiple of 2\");\n }\n for (int i = 0; i < list.size(); ) {\n addParam(list.get(i++), list.get(i++));\n }\n }", "java.util.List<java.lang.String>\n getArgsList();", "@Override\n public List<String> getEntityParameter(Group entity) {\n List<String> parameterList = new ArrayList<>();\n\n int adminId = entity.getAdminId();\n String adminIdValue = String.valueOf(adminId);\n parameterList.add(adminIdValue);\n\n String name = entity.getGroupName();\n parameterList.add(name);\n\n Date dateCreated = entity.getDateCreated();\n String dateCreatedValue = String.valueOf(dateCreated);\n parameterList.add(dateCreatedValue);\n\n String groupDescription = entity.getGroupDescription();\n parameterList.add(groupDescription);\n\n return parameterList;\n }", "public final String paramList() throws RecognitionException {\n\t\tString out = null;\n\n\n\n\t\t\tArrayList<String> list = new ArrayList<String>();\n\t\t\tout = \"\";\n\n\t\ttry {\n\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:273:2: ( ( param[list] )+ )\n\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:273:4: ( param[list] )+\n\t\t\t{\n\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:273:4: ( param[list] )+\n\t\t\tint cnt12=0;\n\t\t\tloop12:\n\t\t\twhile (true) {\n\t\t\t\tint alt12=2;\n\t\t\t\tint LA12_0 = input.LA(1);\n\t\t\t\tif ( (LA12_0==PARAM) ) {\n\t\t\t\t\talt12=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt12) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:273:4: param[list]\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_param_in_paramList336);\n\t\t\t\t\tparam(list);\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tif ( cnt12 >= 1 ) break loop12;\n\t\t\t\t\tEarlyExitException eee = new EarlyExitException(12, input);\n\t\t\t\t\tthrow eee;\n\t\t\t\t}\n\t\t\t\tcnt12++;\n\t\t\t}\n\n\n\t\t\t\t\t\tif (!list.isEmpty()) {\n\t\t\t\t\t\t\tout = list.get(0);\n\t\t\t\t\t\t\tfor (int i = 1; i < list.size(); i++) {\n\t\t\t\t\t\t\t\tout = out.concat(\", \" + list.get(i));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn out;\n\t}", "public void printParameterListToOut(Vector<ProcedureParameter> list) {\r\n\t\tfinal char delimiter = ':';\r\n\t\tfor (ProcedureParameter procedureParameter : list) {\r\n\t\t\tSystem.out.println(paramTag + procedureParameter.name + delimiter\r\n\t\t\t\t\t+ procedureParameter.dataType + delimiter\r\n\t\t\t\t\t+ procedureParameter.defaultvalue);\r\n\t\t}\r\n\r\n\r\n\t\t//\t\tEnumeration<ProcedureParameter> en = list.elements();\r\n\t\t//\t\twhile (en.hasMoreElements()) {\r\n\t\t//\t\t\tProcedureParameter procedureParameter = (ProcedureParameter) en\r\n\t\t//\t\t\t\t\t.nextElement();\r\n\t\t//\t\t\tSystem.out.println(paramTag + procedureParameter.name + delimiter\r\n\t\t//\t\t\t\t\t+ procedureParameter.dataType + delimiter\r\n\t\t//\t\t\t\t\t+ procedureParameter.defaultvalue);\r\n\t\t//\t\t}\r\n\t}", "private ArrayList<Parametro> getParametros(int pregunta){\n ArrayList<Parametro> arrayListParametros = new ArrayList<>();\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql =\"SELECT p FROM ParametroInterrogante pi \"\n + \"JOIN pi.interrogante i \"\n + \"JOIN pi.parametro p \"\n + \"WHERE p.estado='a' AND i.estado='a' \"\n + \"AND i.idinterrogante = :pregunta\";\n\n Query query = em.createQuery(jpql);\n query.setParameter(\"pregunta\", pregunta);\n List<Parametro> list = query.getResultList();\n for(Parametro p : list){\n arrayListParametros.add(p);\n }\n\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n return arrayListParametros;\n }", "public String[] list(String text, String von, String bis) throws RemoteException;", "public List<? extends DocElement> getParameterDocument(int index) {\n String name = getParameterName(index);\n for (DocBlock block : documentation.getBlocks()) {\n if (block.getTag().equals(\"@param\") == false) { //$NON-NLS-1$\n continue;\n }\n List<? extends DocElement> elements = block.getElements();\n if (elements.isEmpty()) {\n continue;\n }\n DocElement first = elements.get(0);\n if (first.getModelKind() != ModelKind.SIMPLE_NAME) {\n continue;\n }\n if (name.equals(((SimpleName) first).getToken()) == false) {\n continue;\n }\n return elements.subList(1, elements.size());\n }\n return Collections.emptyList();\n }", "public String buscarTrabajadoresPorParametros() {\r\n try {\r\n inicializarFiltros();\r\n listaTrabajadores = null;\r\n //listaTrabajadores = administrarGestionarTrabajadoresBO.consultarTrabajadoresPorParametro(filtros);\r\n return null;\r\n } catch (Exception e) {\r\n System.out.println(\"Error ControllerAdministrarTrabajadores buscarTrabajadoresPorParametros : \" + e.toString());\r\n return null;\r\n }\r\n }", "protected static ParameterDef createListParameter(final String param) {\n return new ParameterDef(new Variable(param), ParameterType.LIST);\n }", "public static List<Parte> listarPartes(){\n List <Parte> partes=new ArrayList<>();\n Conexion.conectar();\n String sql = \"call ppartes.partesList (?)\";\n \n try {\n CallableStatement cs = Conexion.getConexion().prepareCall(sql);\n cs.registerOutParameter(1, OracleTypes.CURSOR);\n cs.execute();\n \n ResultSet rs = (ResultSet) cs.getObject(1);\n while (rs.next()){\n Parte p = new Parte();\n p.setFecha(rs.getString(\"fecha\"));\n p.setKmInicial(rs.getBigDecimal(\"kmInicial\"));\n p.setKmFinal(rs.getBigDecimal(\"kmFinal\"));\n p.setGastoPeaje(rs.getBigDecimal(\"gastosPeaje\")); \n p.setGastoDietas(rs.getBigDecimal(\"gastosDietas\"));\n p.setGastoCombustible(rs.getBigDecimal(\"gastosCombustible\"));\n p.setGastoVarios(rs.getBigDecimal(\"otrosGastos\"));\n p.setIncidencias(rs.getString(\"incidencias\"));\n p.setEstado(rs.getString(\"estado\"));\n p.setValidado(rs.getString(\"validado\"));\n p.setHorasExtras(rs.getBigDecimal(\"horasExtras\"));\n p.setIdTrabajador(rs.getBigDecimal(\"TRABAJADORES_ID\"));\n p.setNotasAdministrativas(rs.getString(\"notasAdministrativas\"));\n partes.add(p);\n }\n \n rs.close();\n cs.close();\n Conexion.desconectar();\n return partes;\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"No se puede efectuar la conexión, hable con el administrador del sistema\" + ex.getMessage());\n }\n return null;\n }", "void compileParameterList() {\n tagBracketPrinter(PAR_LIST_TAG, OPEN_TAG_BRACKET);\n try {\n compileParameterListHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(PAR_LIST_TAG, CLOSE_TAG_BRACKET);\n }", "public ArrayList getParameters() {\n return parameters;\n }", "private void listViewPendentes(List<Compra> listAll) {\n\t\t\n\t}", "public List getList(int start, int pernum, SearchParam param);", "List<Vehiculo>listar();", "List<Room> selectRoomList(@Param(\"building\") String building);", "@TestMethod(value=\"testGetParameterNames\")\n public String[] getParameterNames() {\n \tString[] params = new String[3];\n params[0] = \"maxIterations\";\n params[1] = \"lpeChecker\";\n params[2] = \"maxResonStruc\";\n return params;\n }", "java.util.List<? extends com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameterOrBuilder> \n getParamsOrBuilderList();", "public static boolean ParamList(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"ParamList\")) return false;\n if (!nextTokenIs(b, L_PAR)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, PARAM_LIST, null);\n r = consumeToken(b, L_PAR);\n p = r; // pin = 1\n r = r && report_error_(b, ParamList_1(b, l + 1));\n r = p && consumeToken(b, R_PAR) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "public List<Goods> selectByStr(@Param(\"limit\")Integer limit,@Param(\"name\") String name,@Param(\"describle\") String describle);", "List<T> findAll(ListParams params);", "public List<ActDetalleActivo> listarDetalleActivoLaboratorio(long codigoSalaLaboratorio,long codigoTipo,String amie, int estado,int anio);", "private static final List<ParameterImpl> createParameters() {\n\t\tParameterImpl initialize = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Initialize\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"INITIALIZE\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"checkbox\")\n\t\t\t\t.setDefaultValue(\"true\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\tParameterImpl run = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Run\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"RUN\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"checkbox\")\n\t\t\t\t.setDefaultValue(\"true\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\tParameterImpl duration = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Duration (minutes)\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"DURATION\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"number\")\n\t\t\t\t.setDefaultValue(\"0\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\tParameterImpl retrieveData = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Retrieve Data\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"RETRIEVE_DATA\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"checkbox\")\n\t\t\t\t.setDefaultValue(\"true\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\tParameterImpl cleanup = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Cleanup\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"CLEANUP\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"checkbox\")\n\t\t\t\t.setDefaultValue(\"true\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\tParameterImpl cancel = new ParameterImpl.Builder()\n\t\t\t\t.setLabel(\"Cancel\") // FIXME: STRING: srogers\n\t\t\t\t.setName(\"CANCEL\") // FIXME: STRING: srogers\n\t\t\t\t.setType(\"checkbox\")\n\t\t\t\t.setDefaultValue(\"false\")\n\t\t\t\t.setAcceptableValues(null)\n\t\t\t\t.setRequired(false)\n\t\t\t\t.build();\n\n\t\treturn Arrays.asList(initialize, run, duration, retrieveData, cleanup, cancel);\n\t}", "List<Videogioco> retriveByGenere(String genere);", "public Parametro[] getParametros() {\n return parametros;\n }", "private static ArrayList<String> loadParameters() throws IOException {\r\n BufferedReader br = new BufferedReader(new FileReader(new File(\"conf.data\")));\r\n\r\n ArrayList<String> params = new ArrayList<>();\r\n\r\n String param;\r\n while ((param = br.readLine()) != null ){\r\n params.add(param);\r\n }\r\n\r\n return params;\r\n }", "private ArrayList<TypeDef> parseParamTypeList(Tokenizer in) {\n\t\tArrayList<TypeDef> types = new ArrayList<>();\n\t\tToken next = in.next();\n\t\tif (next.type == Token.TokenType.CLOSE_PARENTHESIS)\n\t\t\treturn types;\n\t\tin.pushTokens(next);\n\t\ttypes.add(parseType(in));\n\t\tnext = in.next();\n\t\twhile (true) {\n\t\t\tif (next.type == Token.TokenType.CLOSE_PARENTHESIS)\n\t\t\t\treturn types;\n\t\t\tif (next.type != Token.TokenType.COMMA)\n\t\t\t\tthrow new SyntaxError(\"Expected ) or , got: '\"+next+\"'\"+next.generateLineChar());\n\t\t\ttypes.add(parseType(in));\n\t\t\tnext = in.next();\n\t\t}\n\t}", "private List<ApiParameter> getParameters(final List<Parameter> params) {\r\n\t\tList<ApiParameter> apiParams = null;\r\n\t\tif(!CollectionUtils.isEmpty(params)) {\r\n\t\t\tapiParams = params.stream().map(p -> {\r\n\t\t\t\tfinal ApiParameter apiParam = new ApiParameter();\r\n\t\t\t\tapiParam.setName(p.getName());\r\n\t\t\t\tapiParam.setRequired(p.getRequired());\r\n\t\t\t\tapiParam.setParamType(p.getIn());\r\n\t\t\t\tapiParam.setDataType(p.getSchema().getType());\r\n\t\t\t\treturn apiParam;\r\n\t\t\t}).collect(Collectors.toList());\r\n\t\t}\r\n\t\treturn apiParams;\r\n\t}", "void query9InterativaPrint(List<ParQuery9> pares);", "public ParameterList getParameters() {\n\t\treturn _parameters;\n\t}", "@Override\n\tprotected String getParameters()\n\t{\n\t\tString fields = \" ?, ?, ?, ?, ?, ? \";\n\t\treturn fields;\n\t}", "public static List<String> formPossibleValues(String enumeraion){\n\t\tList<String> ret = new ArrayList<String>();\n\t\tfor (String value : enumeraion.split(\";\"))\n\t\t\tret.add(value);\n\t\t\n\t\treturn ret;\n\t}", "@Override\n\tprotected String getParameters()\n\t{\n\t\tString fields = \" ?, ?, ?, ?, ? \";\n\t\treturn fields;\n\t}", "java.util.List<java.lang.String>\n\t\tgetArgsList();", "public List<ParameterDefinition> getParameterList() {\n if (this.telemetryName != null) {\n TelemetryChartDefinition teleDef = \n this.getTelemetrys().get(telemetryName);\n if (teleDef == null) {\n TelemetryClient client = ProjectBrowserSession.get().getTelemetryClient();\n try {\n teleDef = client.getChartDefinition(this.telemetryName);\n this.getTelemetrys().put(telemetryName, teleDef);\n return teleDef.getParameterDefinition();\n }\n catch (TelemetryClientException e) {\n this.feedback = \"Exception when retrieving Telemetry chart definition: \" + e.getMessage();\n }\n }\n else {\n return teleDef.getParameterDefinition();\n }\n }\n return new ArrayList<ParameterDefinition>();\n }", "public List<JParameter> getParams() {\n return params;\n }", "public abstract List toNameValueList();", "private static String[][] decodificarCadenaParametros(String cadena) {\n ArrayList resultado = new ArrayList();\n StringTokenizer stringTokenizer = new StringTokenizer(cadena, \"&\");\n String aux = null;\n int index = 0;\n String[] atributo = null; //Un atributo se compone de un nombre y un valor asociado \n String attrtmp; // [1] atributo temporal para conoces si tenia un & en el string original\n while (stringTokenizer.hasMoreElements()) {\n aux = stringTokenizer.nextToken();\n index = aux.indexOf('=');\n\n if (index == -1) {\n throw new IllegalArgumentException(\"Al parametro le falta el =\");\n } else {\n atributo = new String[2];\n atributo[0] = aux.substring(0, index); //A la izquierda del =\n attrtmp = aux.substring(index + 1, aux.length()); // [1] a la derecha del =\n attrtmp = attrtmp.replaceAll(\";druida;amp;\",\"&\");//[1]\n atributo[1] = attrtmp; //[1]\n //[1] atributo[1] = aux.substring(index + 1, aux.length()); //A la derecha del =\n resultado.add(atributo); //Añadimos el atributo recien creado a la lista\n }\n }\n\n return listToArray(resultado);\n }", "public List<Parameter> parameters() {\n if (_params != null && !_params.isEmpty()) {\n return new ArrayList<Parameter>(_params.values());\n }\n return null;\n }", "@Override\n\t\tpublic Enumeration getParameterNames() {\n\t\t\treturn null;\n\t\t}", "public List getParameterValuesDescription() {\r\n\t\treturn parameterValuesDescription;\r\n\t}", "protected List<String> getFormals(Exp e) {\n List<String> ret = new ArrayList<String>();\n\n if (e == null) return ret;\n\n if (!e.isFunction()) return ret;\n\n Exp fmls = e.getChild(1);\n assert fmls.is(JSExp.PARAM_LIST);\n if (fmls.getChildCount() == 0) return ret;\n\n Exp cur = e.getChild(1).getFirstChild();\n while (cur != null) {\n ret.add(cur.toCode());\n cur = cur.getNext();\n }\n\n return ret;\n }", "public String listViaje() {\n\t\t\t//resetForm();\n\t\t\treturn \"/boleta/list.xhtml\";\t\n\t\t}", "protected abstract List<Object> getParamValues(SqlKeyWord sqlKeyWord, Object dbEntity, TableInfo tableInfo, Map<String, Object> params) throws Exception;", "public ArrayList<String> listarProgramas();", "java.util.List<java.lang.String>\n getCommandList();" ]
[ "0.71587956", "0.69691247", "0.6912664", "0.68278545", "0.6753573", "0.67502666", "0.66379535", "0.65609545", "0.6450242", "0.64274144", "0.64274144", "0.6408605", "0.6348502", "0.62856364", "0.62745905", "0.6255537", "0.62398905", "0.6227007", "0.62073106", "0.61089396", "0.6102116", "0.6099254", "0.6068456", "0.60615903", "0.6027957", "0.6020705", "0.6016093", "0.6015316", "0.5994425", "0.5988108", "0.5982107", "0.59790534", "0.5954627", "0.5905364", "0.5903735", "0.5874031", "0.58687603", "0.5860291", "0.5849463", "0.5840637", "0.583509", "0.5829189", "0.5821142", "0.58180857", "0.5808278", "0.5775562", "0.577128", "0.57685035", "0.5766713", "0.57545865", "0.5748804", "0.5739907", "0.57310754", "0.5728521", "0.5726245", "0.5717291", "0.5711522", "0.57111466", "0.5707354", "0.57068825", "0.57058793", "0.5691834", "0.5691754", "0.56861204", "0.5672569", "0.56686825", "0.5666015", "0.5659262", "0.5652418", "0.5652182", "0.5650555", "0.5644996", "0.5642751", "0.5635335", "0.5632343", "0.56143636", "0.56123054", "0.56115264", "0.5609892", "0.56092805", "0.5605554", "0.55942166", "0.5588536", "0.5588501", "0.5584562", "0.5583511", "0.5583194", "0.5574956", "0.55688447", "0.55631524", "0.55551845", "0.5551525", "0.5546668", "0.5535799", "0.5533692", "0.5531348", "0.5525748", "0.55233085", "0.5521743", "0.5517276" ]
0.6781687
4
Eliminar parametro. Fecha: 22/08/2013
public void eliminarParametro() throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeParameter(){\r\n \tMap<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();\r\n\t\tlong paramId = Long.parseLong(params.get(\"parameterId\"));\r\n\t\tthis.getLog().info(\"parameterId:\" + paramId);\r\n\t\t\r\n\t\tif(paramId != 0){\r\n\t\t\ttry {\r\n\t\t\t\tConnectionFactory.createConnection().deleteParameter(paramId);\r\n\t\t\t\tthis.getSelectedAlgorithm().setParameters(ConnectionFactory.createConnection().getAlgorithmParameterArray(getSelectedAlgorithm().getId()));\r\n\t\t\t} catch (DataStorageException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void supprimerParametre() {\n if (getSelectedParamatre() == null) return;\n parametreListView.getItems().remove(parametreListView.getSelectionModel().getSelectedItem());\n }", "void deleteParameter(long id);", "public void removeParameter(String name) throws IllegalArgumentException {\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"removeParameter() \");\n Via via=(Via)sipHeader;\n \n if( name==null )\n throw new IllegalArgumentException\n (\"JAIN-EXCEPTION: parameter is null\");\n else via.removeParameter(name); \n }", "public void removeParam(Object obj) {\n\t\tparams.remove(obj);\n\t}", "public void removeParam(int index) {\n params = Lists.remove(params, index);\n }", "private void remove(String paramString) {\n }", "public void deleteBeneficioDeuda(Map parametros);", "public void removeParameters() {\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"removeParameters() \");\n Via via=(Via)sipHeader;\n \n via.removeParameters();\n }", "public void removeParam(int pos) {\n String[] origParams = getParamNames();\n if ((pos < 0) || (pos >= origParams.length))\n throw new IndexOutOfBoundsException(\"pos = \" + pos);\n\n String[] params = new String[origParams.length - 1];\n\n for (int i = 0, index = 0; i < origParams.length; i++)\n if (i != pos)\n params[index++] = origParams[i];\n setParams(params);\n }", "public void removeParameter(final String name) {\n\t\tqueryParameters.remove(name);\n\t}", "public void removeParameter(String name)\r\n {\r\n // warning, param names are escaped\r\n this.parameters.remove(StringEscapeUtils.escapeHtml(name));\r\n }", "public void removeParameter(int key){\n\n int i = 0;\n boolean found = false;\n while (i < parameters.size() && !found){\n if (parameters.get(i).getKey() == key) {\n parameters.remove(i);\n found = true;\n }\n }\n\n }", "public static void eliminarRegistros(){\n int idEliminar = Integer.parseInt(JOptionPane.showInputDialog(\"Igrese el ID a Eliminar\"));\n pd.eliminaraPersonas(idEliminar);\n }", "public void elimina(DTOAcreditacionGafetes acreGafete) throws Exception;", "public void removeIndependentParameter(String name)\n throws ParameterException;", "boolean removeTypedParameter(Parameter typedParameter);", "public void eliminarFechaTratamiento(String fecha){\n String[] fechaAborrar = {fecha};\n db.delete(\"tratamiento\",\"fecha=?\",fechaAborrar);\n }", "public void eliminarPais(String txtPais);", "private int deleteRecordParam(String name) {\n println(\"deleting records using parameters.\");\n\n String[] whereArgs = {\"Rice\"};\n\n int rowAffected = db.delete(name,\n \"name = ?\",\n whereArgs);\n\n return rowAffected;\n }", "public void removeFromParameterNameValuePairs(entity.LoadParameter element);", "void removeQueryParam(String name) {\n if (name == null) {\n throw new IllegalArgumentException(\"Name cannot be null\");\n }\n Iterator<Param> iter = queryParams.iterator();\n while (iter.hasNext()) {\n Param p = iter.next();\n if (p.key.equals(name)) {\n iter.remove();\n }\n }\n }", "Statement clearParameters();", "public void removeParameter(String sName)\r\n {\r\n for (int iCount = 0; iCount < m_alParameters.size(); iCount++)\r\n {\r\n Parameter c = m_alParameters.get(iCount);\r\n\r\n if (c.getName().equals(sName))\r\n {\r\n m_alParameters.remove(iCount);\r\n fireTableRowsDeleted(iCount, iCount);\r\n }\r\n }\r\n }", "public void eliminarMensaje(InfoMensaje m) throws Exception;", "public void eliminar(){\n SQLiteDatabase db = conn.getWritableDatabase();\n String[] parametros = {cajaId.getText().toString()};\n db.delete(\"personal\", \"id = ?\", parametros);\n Toast.makeText(getApplicationContext(), \"Se eliminó el personal\", Toast.LENGTH_SHORT).show();\n db.close();\n }", "public void removeParam(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(PARAM$14, i);\r\n }\r\n }", "public void eliminar(DetalleArmado detallearmado);", "@Override\r\n\tpublic void delParamInfoById(String id) {\n\t\tpm.deleteByPrimaryKey(id);\r\n\t\t\r\n\t}", "public String eliminarEstudiante(HttpServletRequest request,String codEstudiante){\n String salida=\"\";\n if(request==null){\n return \"\";\n }\n if(connection!=null && codEstudiante!=null && codEstudiante.length()>0){\n try {\n StringBuilder query=new StringBuilder();\n query.append(\"delete from estudiante \");\n query.append(\" where idestudiante=? \");\n deleteEstudiante=connection.prepareStatement(query.toString());\n //pasando el parametro\n deleteEstudiante.setInt(1, Integer.parseInt(codEstudiante));\n //ejecutando la consulta\n int nroRegistros=deleteEstudiante.executeUpdate();\n if(nroRegistros==1){\n salida=\"Registro Eliminado de forma correcta\";\n }\n else{\n salida=\"Existo un error al tratar de eliminar el registro\";\n }\n } catch (SQLException e) {\n salida=\"Existo un error SQL\";\n System.out.println(\"Error en el proceso \");\n e.printStackTrace();\n }\n }\n return salida;\n }", "public String vistaEliminar(String codaloja, String codactiv) {Alojamiento alojbusc = alojamientoService.find(codaloja);\n// Actividad actbusc = actividadService.find(codactiv);\n// Alojamiento_actividad aloact = new Alojamiento_actividad();\n// Alojamiento_actividad_PK aloact_pk = new Alojamiento_actividad_PK();\n// aloact_pk.setActividad(actbusc);\n// aloact_pk.setAlojamiento(alojbusc);\n// aloact.setId(aloact_pk);\n// \n// actividadAlojamientoService.remove(aloact);\n// \n// \n// \n return \"eliminarAsignacion\";\n }", "public void eliminar(String sentencia){\n try {\n Statement stmt = Conexion.getInstancia().createStatement();\n stmt.executeUpdate(sentencia);\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "public void EliminarPrestamo(Integer idPrestamo) {\n this.conexion.ConectarBD();\n String consulta = \"delete from prestamos where IdPrestamo = ?\";\n try {\n this.pstm = this.conexion.getConexion().prepareStatement(consulta);\n //Indicamos los parametros del delete\n this.pstm.setInt(1, idPrestamo);\n //Ejecutamos la consulta\n int res = pstm.executeUpdate();\n } catch (SQLException e) { \n throw new MisException(\"Error al eliminar un Prestamo.\\n\"+e.toString());\n //System.out.println(\"Error al eliminar un Libro.\");\n } catch (Exception e) {\n throw new MisException(\"Error.\\n\"+e.toString());\n //e.printStackTrace();\n }\n \n //Desconectamos de la BD\n this.conexion.DesconectarBD();\n }", "void eliminar(Long id);", "@Override\r\n public void eliminar(final Empleat entitat) throws UtilitatPersistenciaException {\r\n JdbcPreparedDao jdbcDao = new JdbcPreparedDao() {\r\n\r\n @Override\r\n public void setParameter(PreparedStatement pstm) throws SQLException {\r\n int field=0;\r\n pstm.setInt(++field, entitat.getCodi());\r\n }\r\n\r\n @Override\r\n public String getStatement() {\r\n return \"delete from Empleat where codi = ?\";\r\n }\r\n };\r\n UtilitatJdbcPlus.executar(con, jdbcDao);\r\n }", "public void eliminarEmpleado(CLEmpleado cl) throws SQLException{\r\n String sql = \"{CALL sp_eliminarEmpleado(?)}\";\r\n \r\n try{\r\n ps = cn.prepareCall(sql);\r\n ps.setInt(1, cl.getIdEmpleado());\r\n ps.execute();\r\n \r\n }catch(SQLException e){\r\n JOptionPane.showMessageDialog(null, \"error: \"+ e.getMessage());\r\n \r\n }\r\n \r\n }", "public void eliminar(Periodo periodo)\r\n/* 27: */ {\r\n/* 28: 53 */ this.periodoDao.eliminar(periodo);\r\n/* 29: */ }", "public void eliminarDatos(EstructuraContratosDatDTO estructuraNominaSelect) {\n\t\t\n\t}", "public boolean removeParameter(String name) {\n/* 247 */ throw new UnsupportedOperationException(\"Removing parameters in a stack is not supported.\");\n/* */ }", "public void eliminarValor(String tabla, String columnaID, String datoABorrar){\n try {\n Statement stmt = Conexion.getInstancia().createStatement();\n stmt.executeUpdate(\"DELETE From \"+tabla+\" Where \"+columnaID+\" = \"+datoABorrar+\";\");\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "private void eliminar(HttpServletRequest request, HttpServletResponse response) {\n\t\n\t\ttry {\n\t\t\tString numero =request.getParameter(\"idCliente\");//leo parametro numeroHabitacion de la vista\n\t\t\t\n\t\t\t//llamo a un metodo del modelo para que elimine el editorial de la bd y consulto si se pudo eliminar\n\t\t\tif(modelo.eliminarCliente(numero) > 0) {\n\t\t\t\t\n\t\t\t\t//paso un atributo de exito si se pudo eliminar\n\t\t\t\trequest.setAttribute(\"exito\", \"Cliente eliminado exitosamente\");\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//paso un atributo de fracaso. \n\t\t\t\trequest.setAttribute(\"fracaso\", \"No se puede eliminar Cliente\");\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//redirecciono sin importar si se pudo o no eliminar\n\t\t\trequest.getRequestDispatcher(\"/clientes.do?op=listar\").forward(request, response);\n\t\t} catch (SQLException | ServletException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\n\t}", "public void eliminarIntemediaPersonaMovilidad(Movilidad mov){\n try{\n String query = \"DELETE FROM PERSONA_MOVILIDAD WHERE ID_MOVILIDAD = \"+ mov.getIdMovilidad();\n Query q = getSessionFactory().getCurrentSession().createSQLQuery(query);\n q.executeUpdate();\n }catch(Exception e){\n e.printStackTrace();\n }\n \n }", "public int eliminar(int pasoSolicitado ){\n if(tipoTraductor.equals(\"Ascendente\"))\n eliminarAsc(pasoSolicitado);\n else \n eliminarDesc(pasoSolicitado);\n cadena.actualizarCadena(pasoSolicitado);\n contador=pasoSolicitado;\n return contador-1;\n }", "public Object removeValue(final String name) {\r\n return this.params.remove(name);\r\n }", "public void eliminarDatosEnEntidad(String entidad, ArrayList entidadencontrada)\r\n\t{\r\n\t\tif(entidad.equalsIgnoreCase(\"Rol\"))\r\n\t\t{\r\n\t\t\tRol encontrado = (Rol)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t RolBD.eliminar(encontrado.getIdrol(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Prueba\"))\r\n\t\t{\r\n\t\t\tPrueba encontrado = (Prueba)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \tString nombrepru = encontrado.getNombre();\r\n\t \tif(nombrepru.equalsIgnoreCase(\"Vacante Exclusivo\") || nombrepru.equalsIgnoreCase(\"Vacante Multiple\") || nombrepru.equalsIgnoreCase(\"Prueba Libre\"))\r\n\t \t{\r\n\t \t\tJOptionPane.showMessageDialog(this,\"La prueba \"+nombrepru+\" no puede ser eliminada por ser parte importante de la base del conocimiento.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\ttry\r\n\t\t\t {\r\n\t\t\t Conector conector = new Conector();\r\n\t\t\t conector.iniciarConexionBaseDatos();\r\n\t\t\t PruebaBD.eliminar(encontrado.getIdprueba(), conector);\r\n\t\t\t conector.terminarConexionBaseDatos();\r\n\t\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t\t }\r\n\t\t\t catch (Exception e)\r\n\t\t\t\t\t{\r\n\t\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t\t}\r\n\t \t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Pregunta\"))\r\n\t\t{\r\n\t\t\tPregunta encontrado = (Pregunta)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t PreguntaBD.eliminar(encontrado.getIdpregunta(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Escala\"))\r\n\t\t{\r\n\t\t\tEscala encontrado = (Escala)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t EscalaBD.eliminar(encontrado.getIdescala(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Competencia\"))\r\n\t\t{\r\n\t\t\tCompetencia encontrado = (Competencia)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t CompetenciaBD.eliminar(encontrado.getIdcompetencia(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Caracteristica\"))\r\n\t\t{\r\n\t\t\tCaracteristica encontrado = (Caracteristica)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t CaracteristicaBD.eliminar(encontrado.getIdcaracteristica(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t}", "public static void remove(String n) {\r\n\t\tif (runtimePars.remove(n) == null)\r\n\t\t\tnew ParameterNameError(\"Parameter \" + n + \" does not exist.\");\r\n\t\t// System.out.println(\"Parameter \" + n +\r\n\t\t// \" removed from the runtime table. \");\r\n\t}", "void eliminarPedidosUsuario(String idUsuario);", "@Override\r\n\tpublic void remover(Tipo tipo) {\n String sql = \"delete from tipos_servicos where id = ?\";\r\n try {\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, tipo.getId());\r\n \r\n stmt.execute();\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n\t}", "@Override\r\n\t\t\tpublic void eliminar() {\n\r\n\t\t\t}", "public void eliminar(){\n conexion = base.GetConnection();\n try{\n PreparedStatement borrar = conexion.prepareStatement(\"DELETE from usuarios where Cedula='\"+this.Cedula+\"'\" );\n \n borrar.executeUpdate();\n // JOptionPane.showMessageDialog(null,\"borrado\");\n }catch(SQLException ex){\n System.err.println(\"Ocurrió un error al borrar: \"+ex.getMessage());\n \n }\n }", "public void removeTemporaryParameter(String name) {\n\t\ttemporaryParameters.remove(name);\n\t}", "public void eliminarAlergia(String alergia){\n String[] alergiaBorrar = {alergia};\n db.delete(\"alergia\",\"alergia=?\",alergiaBorrar);\n }", "public void eliminar(Maquina maquina)\r\n/* 24: */ {\r\n/* 25: 52 */ this.maquinaDao.eliminar(maquina);\r\n/* 26: */ }", "public void eliminarPaciente(String codigo)\n {\n try\n {\n int rows_update=0;\n PreparedStatement pstm=con.conexion.prepareStatement(\"DELETE paciente.* FROM paciente WHERE IdPaciente='\"+codigo+\"'\");\n rows_update=pstm.executeUpdate();\n \n if (rows_update==1)\n {\n JOptionPane.showMessageDialog(null,\"Registro eliminado exitosamente\");\n }\n else\n {\n JOptionPane.showMessageDialog(null,\"No se pudo eliminar el registro, verifique datos\");\n con.desconectar();\n }\n }\n catch (SQLException e)\n {\n JOptionPane.showMessageDialog(null,\"Error \"+e.getMessage()); \n }\n }", "@Override\r\n\tpublic HashMap<String, Object> deleteBulletine(HashMap<String, Object> param) {\n\t\tint sqlResult = sqlSession.update(\"Fbulletine.delete\", param);\r\n\t\tHashMap<String,Object> result = new HashMap<String,Object>();\r\n\t\tif(sqlResult >0 ){\r\n\t\t\tresult.put(\"success\", true);\r\n\t\t\tresult.put(\"msg\", \"공지사항이 정상적으로 삭제되었습니다.\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tresult.put(\"success\", false);\r\n\t\t\tresult.put(\"msg\", \"공지사항이 정상적으로 삭제되지 않았습니다.\");\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public void eliminarVideojuegoPorPlataforma(String plataforma)\n {\n Iterator<Videojuegos> iteration = listaDeVideojuegos.iterator();\n while(iteration.hasNext()){\n Videojuegos iter = iteration.next();\n String plataformaVideojuego = iter.getPlataforma();\n if(plataformaVideojuego.equals(plataforma)){\n iteration.remove();\n }\n }\n }", "public void eliminar(Object o) {\n\t\t\n\t}", "public void deleteEquipoComunidad(EquipoComunidad equipoComunidad);", "void clearParameters() throws SQLException;", "final void delete(int param1) {\n }", "public void eliminar() {\n try {\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.IME_APELACIONES(3, this.Selected);\n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.Selected.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"2\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue eliminada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n addMessage(\"Eliminado Exitosamente\", 1);\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al eliminar el registro, contacte al administrador del sistema\", 2);\n }\n }", "public void executeProcesarEliminarBuzonMensaje(Map criteria);", "@Override\r\n\tpublic SverResponse<String> delParam(Integer id) {\n\t\tif (actionParamsDao.findChildrenByParentId(id).size()>0) {\r\n\t\t\treturn SverResponse.createByErrorMessage(\"请先删除子类型!\");\r\n\t\t}\r\n\t\tActionProduct pro = new ActionProduct();\r\n\t\tpro.setPartsId(id);\r\n\t\tif(actionProductDao.findProductsNoPage(pro).size()>0) {\r\n\t\t\treturn SverResponse.createByErrorMessage(\"不能删除有商品的类型!\");\r\n\t\t}\r\n\t\tint rs = actionParamsDao.delParam(id);\r\n\t\tif (rs>0) {\r\n\t\t\treturn SverResponse.createRespBySuccess();\r\n\t\t}\r\n\t\treturn SverResponse.createByErrorMessage(\"删除失败!\");\r\n\t}", "public void removePersistentParameter(String name) {\r\n\t\tpersistentParameters.remove(name);\r\n\t}", "public boolean RemoveSport(Sport sport){\n\n boolean noError = true;\n\n\n\n try {\n ConnectDB();\n\n\n preparedStatement=connection.prepareStatement(\"SELECT t_clubs.FK_Sport FROM t_clubs WHERE t_clubs.FK_Sport=?\");\n preparedStatement.setInt(1, sport.getPk_sport());\n result = preparedStatement.executeQuery();\n\n if(result.next()) {\n JOptionPane pane = new JOptionPane(\"le sport est affilié a un club impossible de le supprimer\", JOptionPane.ERROR_MESSAGE);\n JDialog dialog = pane.createDialog(null,\"error\");\n dialog.setAlwaysOnTop(true);\n dialog.setVisible(true);\n dialog.dispose();\n\n }else{\n\n preparedStatement = connection.prepareStatement(\"Delete FROM `t_sports` WHERE `PK_Sport`= ? \");\n preparedStatement.setInt(1, sport.getPk_sport());\n preparedStatement.executeUpdate();}\n\n\n } catch (SQLException e) {\n e.printStackTrace();\n noError = false;\n } finally {\n CloseDB();\n }\n\n\n\n\n\n\n return noError;\n }", "public void eliminarUsuario(Long idUsuario);", "@Override\n\tpublic String getParameter(String name) {\n\t\treturn null;\n\t}", "public void eliminar(CategoriaArticuloServicio categoriaArticuloServicio)\r\n/* 24: */ {\r\n/* 25:53 */ this.categoriaArticuloServicioDao.eliminar(categoriaArticuloServicio);\r\n/* 26: */ }", "public void eliminar(Provincia provincia) throws BusinessErrorHelper;", "private void excluir(String text) { \n try{\n //Variaveis de sessao\n Session s = HibernateUtil.getSessionFactory().openSession();\n s.beginTransaction();\n //sql \n Query q = s.createSQLQuery(\"delete from estacionamento where placa = \"+text);\n //execulta e grava\n q.executeUpdate();\n s.getTransaction().commit();\n \n //exeção //nao conectou // erro\n }catch(HibernateException e){\n JOptionPane.showConfirmDialog(null, \"erro :\"+e );\n }\n \n \n \n \n }", "@Override\n\tpublic void eliminar(Integer id) {\n\t\t\n\t}", "@Override\n\tpublic void eliminar(Integer id) {\n\t\t\n\t}", "@Override\n\tpublic void eliminar() {\n\t\t\n\t}", "@Override\n\tpublic MensajeBean elimina(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.elimina(nuevo);\n\t}", "@Override\n\tpublic void delete(Pessoa arg0) {\n\t\t\n\t}", "@Override\n public void deletar(Object pacienteParametro) {\n Paciente paciente;\n paciente = (Paciente) pacienteParametro;\n EntityManagerFactory factory = Persistence.createEntityManagerFactory(\"vesaliusPU\"); \n EntityManager em = factory.createEntityManager();\n em.getTransaction().begin();\n em.remove(em.merge(paciente));\n em.getTransaction().commit();\n em.close();\n factory.close();\n }", "public String eliminarCliente(){\r\n //leyendo el parametro enviador desde la vista\r\n String identificador = JsfUtil.getRequest().getParameter(\"idCliente\");\r\n if(modelo.eliminarCliente(identificador)>0){\r\n JsfUtil.setFlashMessage(\"exito\", \"El cliente ha sido eliminado\");\r\n }//fin if\r\n else{\r\n JsfUtil.setErrorMessage(null, \"Lo sentimos, no se pudo borrar el registro\");\r\n }//fin else\r\n return \"listacli?faces-redirect=true\";\r\n }", "@Override\n\tpublic int delete(JSONObject param) {\n\t\tMap<String, Object> data = new HashMap<String, Object>();\n\t\tString movieId = StringUtil.ToString(param.getString(\"id\"));\n\t\tdata.put(\"movieId\", movieId);\n\t\tint number = this.delete(\"MovieRecommand.deleteById\", data);\n\t\treturn number;\n\t}", "public void eliminarGrupoLocal(GrupoLocalRequest grupoLocalRequest);", "@Override\n\tpublic void eliminar() {\n\n\t}", "public void removePersistentParameter(String name) {\n\t\tpersistentParameters.remove(name);\n\t}", "public void remove(Aluno a) {\n\t\ttry {\n\t\t\tConnection con = DBUtil.getInstance().getConnection();\n\t\t\tPreparedStatement stmt = con.prepareStatement(\"DELETE FROM Aluno WHERE idAluno = ? \");\n\t\t\tstmt.setInt(1, a.getNumero());\n\t\t\tstmt.executeUpdate();\n\t\t\tJOptionPane.showMessageDialog(null,\"Removido com sucesso!\");\n\t\t} \n\t\tcatch(com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Numero ja existe\", \"ERRO\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\t catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Erro no Sql, verifique a senha, ou o banco\", \"ERRO\", JOptionPane.ERROR_MESSAGE);\n\n\t\t\t}\n\n\t\t}", "public void eraseObjParuse(ObjParuse aObjParuse, Session aSession) throws EMFUserError {\r\n\t\tString hql = \"from SbiObjParuse s where s.id.sbiObjPar.objParId = ? \" + \r\n \" and s.id.sbiParuse.useId = ? \" + \r\n \" and s.id.sbiObjParFather.objParId = ? \" + \r\n \" and s.id.filterOperation = ? \";\r\n\t\tQuery hqlQuery = aSession.createQuery(hql);\r\n\t\thqlQuery.setInteger(0, aObjParuse.getObjParId().intValue());\r\n\t\thqlQuery.setInteger(1, aObjParuse.getParuseId().intValue());\r\n\t\thqlQuery.setInteger(2, aObjParuse.getObjParFatherId().intValue());\r\n\t\thqlQuery.setString(3, aObjParuse.getFilterOperation());\r\n\t\t\r\n\t\tSbiObjParuse sbiObjParuse = (SbiObjParuse)hqlQuery.uniqueResult();\r\n\t\tif (sbiObjParuse == null) {\t\t\r\n\t\t\tSpagoBITracer.major(SpagoBIConstants.NAME_MODULE, this.getClass().getName(), \r\n\t\t\t \"eraseObjParuse\", \"the ObjParuse relevant to BIObjectParameter with \" +\r\n\t\t\t \"id=\"+aObjParuse.getObjParId()+\" and ParameterUse with \" +\r\n\t\t\t \"id=\"+aObjParuse.getParuseId()+\" does not exist.\");\r\n\t\t\tthrow new EMFUserError(EMFErrorSeverity.ERROR, 1045);\r\n\t\t}\r\n\t\taSession.delete(sbiObjParuse);\r\n\t}", "public void borrar(Especialiadad espe,JTextField txtcodigo ){\r\n\t\tConnection con = null;\r\n\t\tStatement stmt = null;\r\n\t\tint result = 0;\r\n\t\t\r\n\t\tSystem.out.println(txtcodigo.getText());\r\n\t\tString sql = \"DELETE FROM Especialiadad \"\r\n\t\t\t\t+ \"WHERE codigo = \"+ txtcodigo.getText();\r\n\t\t\t\t\r\n\t\ttry {\r\n\t\t\tcon = ConexionBD.getConnection();\r\n\t\t stmt = con.createStatement();\r\n\t\t result = stmt.executeUpdate(sql);\r\n\t\t//\tPreparedStatement ps= con.prepareStatement(sql);\r\n\t\t // ps.setInt(1, espe.getCodigo());\r\n\t\t // ps.setString(2, espe.getNombre());\r\n\t\t \t\t \r\n\t\t \r\n\t\t// ps.executeUpdate();\r\n\t\t \r\n\t\t} catch (Exception e) {\r\n\t\t e.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tConexionBD.close(con);\r\n\t\t}\r\n\t\t}", "@Override\n\tpublic void eliminar(Object T) {\n\t\tSeccion seccionE= (Seccion)T;\n\t\tif(seccionE!=null){\n\t\t\ttry{\n\t\t\tString insertTableSQL = \"update seccion set estatus=?\" +\"where codigo=? and estatus='A'\";\n\t\t\tPreparedStatement preparedStatement = conexion.prepareStatement(insertTableSQL);\n\t\t\tpreparedStatement.setString(1, \"I\");\n\t\t\tpreparedStatement.setString(2, seccionE.getCodigo());\n\t\t\tpreparedStatement.executeUpdate();\n\t\t}catch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"No se elimino el registro\");\n\t\t}\n\t\tSystem.out.println(\"Eliminacion exitosa\");\n\t}\n\n\t}", "RemoveTokenParameter getRemoveTokenParameter();", "@Override\n\tpublic void remover(Parcela entidade) {\n\n\t}", "public void eliminar(){\n inicio = null;\r\n // Reinicia el contador de tamaño de la lista a 0.\r\n tamanio = 0;\r\n }", "@Override\r\n\tpublic MensajeBean elimina(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.elimina(nuevo);\r\n\t}", "public void eliminar(Producto producto) throws IWDaoException;", "public void remove(Ejemplar ej);", "public boolean deleteByID(Info_laboral I){\n ConexionBD con = new ConexionBD();\n Connection c = con.conOracle();\n \n boolean var;\n try{\n CallableStatement cs = c.prepareCall(\"{call P_DELINF(?,?)}\");\n cs.setInt(1,I.getId());\n cs.registerOutParameter(2, Types.VARCHAR);\n var = cs.execute();\n System.out.println(cs.getString(2));\n }catch(SQLException e){\n System.out.println(\"ERROR : \" +e);\n var = false;\n }\n con.CerrarCon();\n return var;\n }", "public void deletePerson(){\r\n\r\n\t/*get values from text fields*/\r\n\tname = tfName.getText();\r\n\r\n\tif(name.equals(\"\"))\r\n\t{\r\n\t\tJOptionPane.showMessageDialog(null,\"Please enter person name to delete.\");\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/*remove Person of the given name*/\r\n\t\tint no = pDAO.removePerson(name);\r\n\t\tJOptionPane.showMessageDialog(null, no + \" Record(s) deleted.\");\r\n\t}\r\n }", "@Override\n\tpublic boolean eliminar(Connection connection, Object DetalleSolicitud) {\n\t\tString query = \"DELETE FROM detallesolicitudes WHERE sysPK = ?\";\n\t\ttry {\t\n\t\t\tDetalleSolicitud detalleSolicitud = (DetalleSolicitud)DetalleSolicitud;\n\t\t\tPreparedStatement preparedStatement = (PreparedStatement) connection.prepareStatement(query);\n\t\t\tpreparedStatement.setInt(1, detalleSolicitud.getSysPk());\n\t\t\tpreparedStatement.execute();\n\t\t\treturn true;\n\t\t} catch (SQLException e) {\n\t\t\tNotificacion.dialogoException(e);\n\t\t\treturn false;\n\t\t}//FIN TRY/CATCH\t\n\t}", "@Override\n\tpublic void deleteStudToWait(Map<String, Object> param) {\n\t\tExamManagement em = examManagementDao.getExamManagementListById(param,\n\t\t\t\tparam.get(\"termInfo\").toString());\n\t\tif (em == null) {\n\t\t\tthrow new CommonRunException(0, \"没有查询到相应的考试信息,请刷新页面!\");\n\t\t}\n\t\tInteger autoIncr = em.getAutoIncr();\n\t\tparam.put(\"autoIncr\", autoIncr);\n\t\texamManagementSetDao.deleteArrangeExamResult(param);\n\t\tList<Map<String, Object>> inlist = new ArrayList<Map<String, Object>>();\n\t\tinlist.add(param);\n\t\tMap<String, Object> ob = new HashMap<String, Object>();\n\t\tob.put(\"autoIncr\", autoIncr);\n\t\tob.put(\"termInfo\", param.get(\"termInfo\"));\n\t\tob.put(\"list\", inlist);\n\t\texamManagementSetDao.saveStudsWaiting(ob);\n\t\tif (param.containsKey(\"isKeepContinuous\")\n\t\t\t\t&& param.get(\"isKeepContinuous\").toString().equals(\"1\")) {// 进行排序\n\t\t\tthis.sortExamResult(param);\n\t\t}\n\t}", "public void remove(String fieldName) {\n Object key = null;\n for (Object[] param : paramList) {\n if (param[0].toString().equals(fieldName)) {\n key = param;\n break;\n }\n }\n paramList.remove(key);\n }", "@Override\n protected void remover(Funcionario funcionario) {\n\n }", "private void enviarRequisicaoRemover() {\n servidor.removerPalito(nomeJogador);\n atualizarPalitos();\n }", "public void eliminarUsuario(String id) throws BLException;", "private void eliminarDeMisPropiedades(Casilla casilla){\n if(esDeMipropiedad(casilla)){\n propiedades.remove(casilla.getTituloPropiedad());\n }\n \n }" ]
[ "0.75529826", "0.7234671", "0.7177055", "0.7048808", "0.66299886", "0.66165936", "0.6614475", "0.65998244", "0.65713507", "0.6536065", "0.65288514", "0.64891505", "0.6484491", "0.64555544", "0.6353797", "0.6307708", "0.6289422", "0.6288322", "0.62180287", "0.62107235", "0.6200499", "0.6159983", "0.61578137", "0.6132952", "0.6129875", "0.6124871", "0.611065", "0.6109034", "0.60966057", "0.6066088", "0.6064691", "0.602636", "0.6023979", "0.6022248", "0.60131705", "0.60057294", "0.60035634", "0.6000924", "0.59925", "0.59902346", "0.5982603", "0.59562254", "0.5955544", "0.5929791", "0.5914803", "0.5911162", "0.5910916", "0.5901376", "0.5898315", "0.5893171", "0.58894056", "0.58866394", "0.5883697", "0.5874253", "0.5860348", "0.58525664", "0.5844876", "0.5806691", "0.5803164", "0.58006924", "0.5796012", "0.57943106", "0.5789182", "0.5785511", "0.57831585", "0.5782465", "0.5779163", "0.57712954", "0.5767419", "0.5762435", "0.57610536", "0.57610536", "0.5756435", "0.57562804", "0.57549816", "0.5752366", "0.5751172", "0.5744891", "0.5744408", "0.573916", "0.5735147", "0.57306117", "0.5730267", "0.5723271", "0.5710819", "0.5698699", "0.56903774", "0.56894594", "0.5681713", "0.5681662", "0.5681158", "0.56771404", "0.5676646", "0.5669397", "0.56648403", "0.5660139", "0.56566054", "0.56550306", "0.565312", "0.565075" ]
0.7924823
0
Limpiar lista parametro. Fecha: 22/08/2013
public void limpiarListaParametro() throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remplireListeParam(){\r\n bddParam.add(\"id\");\r\n bddParam.add(\"site\");\r\n bddParam.add(\"smtp_serv\");\r\n bddParam.add(\"smtp_port\");\r\n bddParam.add(\"smtp_user\");\r\n bddParam.add(\"smtp_mail\");\r\n bddParam.add(\"smtp_pass\");\r\n bddParam.add(\"mail_envoie\");\r\n bddParam.add(\"licence\");\r\n bddParam.add(\"pop_up\");\r\n bddParam.add(\"mail_rapport\");\r\n bddParam.add(\"archives\");\r\n bddParam.add(\"mail\");\r\n bddParam.add(\"dbext_adress\");\r\n bddParam.add(\"dbext_port\");\r\n bddParam.add(\"dbext_user\");\r\n bddParam.add(\"dbext_pass\");\r\n bddParam.add(\"dbext_delais\");\r\n bddParam.add(\"dbext_name\");\r\n bddParam.add(\"dbext\");\r\n bddParam.add(\"dbext_purge\");\r\n bddParam.add(\"dbext_perte\");\r\n bddParam.add(\"langue\");\r\n \r\n }", "ParameterList getParameters();", "List<FichaDocente> listarDocentesxParametroxFacultad(String parametro, Integer integer);", "String [] getParameters();", "private static String[][] decodificarCadenaParametros(String cadena) {\n ArrayList resultado = new ArrayList();\n StringTokenizer stringTokenizer = new StringTokenizer(cadena, \"&\");\n String aux = null;\n int index = 0;\n String[] atributo = null; //Un atributo se compone de un nombre y un valor asociado \n String attrtmp; // [1] atributo temporal para conoces si tenia un & en el string original\n while (stringTokenizer.hasMoreElements()) {\n aux = stringTokenizer.nextToken();\n index = aux.indexOf('=');\n\n if (index == -1) {\n throw new IllegalArgumentException(\"Al parametro le falta el =\");\n } else {\n atributo = new String[2];\n atributo[0] = aux.substring(0, index); //A la izquierda del =\n attrtmp = aux.substring(index + 1, aux.length()); // [1] a la derecha del =\n attrtmp = attrtmp.replaceAll(\";druida;amp;\",\"&\");//[1]\n atributo[1] = attrtmp; //[1]\n //[1] atributo[1] = aux.substring(index + 1, aux.length()); //A la derecha del =\n resultado.add(atributo); //Añadimos el atributo recien creado a la lista\n }\n }\n\n return listToArray(resultado);\n }", "public BeanListarParametro getBeanListarParametro();", "public void setBeanListarParametro(BeanListarParametro beanListarParametro);", "public ListParameter()\r\n\t{\r\n\t}", "protected void initParametros ( int numParametros ) {\n if ( numParametros > 0 )\n parametros = new Parametro[ numParametros ];\n }", "public void initParams(List<String> list) {\n if ((list.size() & 1) != 0) {\n throw new IllegalArgumentException(\"list size must be a multiple of 2\");\n }\n for (int i = 0; i < list.size(); ) {\n addParam(list.get(i++), list.get(i++));\n }\n }", "@Override\n\tpublic String[] getParameterValues(String arg0) {\n\t\treturn null;\n\t}", "@Override\r\n public Memory expParam(ListExpNode lexp, HeadersNode ent) {\r\n return null;\r\n }", "private static List<String> loadParams(Type.FunctionOrMethod function){\n\t\tint numParams = function.params().size();\n\t\tList<String >params = new ArrayList<String>();\n\n\t\t//Params are numbered in order, so just put in the variable names\n\t\tfor (int i = 0; i < numParams; i++){\n\t\t\tparams.add(String.format(\"$%d\", i));\n\t\t}\n\n\t\treturn params;\n\t}", "java.util.List<com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameter> \n getParamsList();", "java.util.List<gen.grpc.hospital.examinations.Parameter> \n getParameterList();", "@Override\n protected void elaboraParametri() {\n super.elaboraParametri();\n titoloPagina = TITOLO_PAGINA;\n }", "java.util.List<datawave.webservice.query.QueryMessages.QueryImpl.Parameter> getParametersList();", "public List<IParam> getParams();", "public List<IParam> getParams();", "@Override\n\t\tpublic String[] getParameterValues(String name) {\n\t\t\treturn null;\n\t\t}", "public Collection<String> getParameterIds();", "public void listarParametros(String idPanel) throws Exception;", "public void setParameter( List<Parameter> parameter )\n {\n _parameter = parameter;\n }", "public MetaParameter() {\n m_aParams = new ArrayList();\n }", "public void getMutliParams(String name, Collection<String> list) {\n\t\tNodeList nodes = paramElem.getElementsByTagName(name);\n\t\tfor (int i = 0; i < nodes.getLength(); i++) {\n\t\t\tElement elem = (Element) nodes.item(i);\n\t\t\tlist.add(getTextContent(elem));\n\t\t}\n\t}", "private List<ApiParameter> getParameters(final List<Parameter> params) {\r\n\t\tList<ApiParameter> apiParams = null;\r\n\t\tif(!CollectionUtils.isEmpty(params)) {\r\n\t\t\tapiParams = params.stream().map(p -> {\r\n\t\t\t\tfinal ApiParameter apiParam = new ApiParameter();\r\n\t\t\t\tapiParam.setName(p.getName());\r\n\t\t\t\tapiParam.setRequired(p.getRequired());\r\n\t\t\t\tapiParam.setParamType(p.getIn());\r\n\t\t\t\tapiParam.setDataType(p.getSchema().getType());\r\n\t\t\t\treturn apiParam;\r\n\t\t\t}).collect(Collectors.toList());\r\n\t\t}\r\n\t\treturn apiParams;\r\n\t}", "@Override\n\tpublic String[] getParameterValues(String name) {\n\t\treturn null;\n\t}", "private String[] getParams(int amount) {\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\tString paramArray[] = {param1,param2,param3,param4,param5,param6};\r\n\t\tString letters[] = {\"a\",\"b\",\"c\",\"d\",\"e\",\"f\"};\r\n\t\tfor(int i = 0; i < amount; i++) {\r\n\t\t\tlist.add(\"-\" + letters[i]);\r\n\t\t\tlist.add(paramArray[i]);\r\n\t\t}\r\n\t\treturn list.toArray(new String[0]);\r\n\t}", "public void removeFromParameterNameValuePairs(entity.LoadParameter element);", "protected static ParameterDef createListParameter(final String param) {\n return new ParameterDef(new Variable(param), ParameterType.LIST);\n }", "public static PreparedStatement crearDeclaracionPreparada(java.sql.Connection conexion, ArrayList<String> datos, String orden){\n try {\n PreparedStatement dp = null;\n dp = conexion.prepareStatement(orden); //asignamos el select que trae el String orden \n int esUnEntero;\n for(int i = 1; i <= datos.size(); i++){//asignamos los valores del arrayList datos en cada campo del select\n String aux = null; \n esUnEntero = isEntero(datos.get(i - 1));//Revisamos si la cadena de datos.get(i) es un entero\n switch(esUnEntero){\n case 1: //Cuando es 1 significa que el dato dentro de datos.get(i) es un entero, por tanto se rellena el campo como tal\n aux = datos.get(i - 1);\n dp.setInt(i, Integer.parseInt(aux)); \n break;\n case 0://Cuando es 0 significa que no es un entero y se rellena el campo como String\n aux = datos.get(i - 1);\n dp.setString(i, aux);\n break;\n } \n }\n return dp;\n } catch (SQLException ex) {\n System.out.println(\"\\n\\n\\n\"+ex); //Imprimimos el error en consola en caso de fallar \n } \n return null;\n }", "private void recogerParametros(HttpServletRequest request) {\r\n\t\tif (request.getParameter(\"op\") != null) {\r\n\t\t\top = Integer.parseInt(request.getParameter(\"op\"));\r\n\t\t} else {\r\n\t\t\top = 0;\r\n\t\t}\r\n\t\t\r\n\t\tsearch = (request.getParameter(\"search\") != null) ? request.getParameter(\"search\") : \"\";\r\n\r\n\t\tif (request.getParameter(\"id\") != null) {\r\n\t\t\tid = Integer.parseInt(request.getParameter(\"id\"));\r\n\t\t} else {\r\n\t\t\tid = -1;\r\n\t\t}\r\n\r\n\t\tif (request.getParameter(\"nombre\") != null) {\r\n\t\t\t\r\n\t\t\tnombre = request.getParameter(\"nombre\");\r\n\t\t\tnombre = Utilidades.limpiarEspacios(nombre);\r\n\t\t\tnombre = nombre.substring(0, Math.min(nombre.length(), 44));\r\n\t\t} else {\r\n\t\t\tnombre = \"\";\r\n\t\t}\r\n\r\n\t\tif (request.getParameter(\"precio\") != null) {\r\n\t\t\ttry{\r\n\t\t\t\tprecio = Float.parseFloat(request.getParameter(\"precio\"));\r\n\t\t\t}\r\n\t\t\tcatch( Exception e){\r\n\t\t\t\tprecio=PRECIO_EN_LETRA;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t} else {\r\n\t\t\tprecio = 0;\r\n\t\t}\r\n\t\tif(request.getParameter(\"id_usuario\")!=null) {\r\n\t\t\tusuario=daoUsuario.getById(Integer.parseInt(request.getParameter(\"id_usuario\")));\r\n\t\t}\r\n\t\telse {\r\n\t\t\tusuario=new Usuario();\r\n\t\t}\r\n\t\tif(request.getParameter(\"id_usuario_cambio\")!=null) {\r\n\t\t\tusuario=daoUsuario.getById(Integer.parseInt(request.getParameter(\"id_usuario_cambio\")));\r\n\t\t}\r\n\t\telse {\r\n\t\t\tusuario=new Usuario();\r\n\t\t}\r\n\t}", "private void supprimerParametre() {\n if (getSelectedParamatre() == null) return;\n parametreListView.getItems().remove(parametreListView.getSelectionModel().getSelectedItem());\n }", "CollectionParameter createCollectionParameter();", "public void eliminarParametro() throws Exception;", "public void setParameterList(String parName,\n Collection<?> parVal) throws HibException ;", "public List<Parameter> getParameter( )\n {\n return _parameter;\n }", "public ArrayList parametrosConectorBaseDatos()\r\n\t{\r\n\t\tArrayList parametros = new ArrayList(); \r\n\t\ttry\r\n\t\t{\r\n\t\t\tFileInputStream fr = new FileInputStream( \"./images/parametrosBD.txt\" );\r\n\t \tDataInputStream entrada = new DataInputStream(fr);\r\n\t String parametro = \"\";\r\n\t String valorparametro = \"\";\r\n\t boolean esvalor = false;\r\n\t while((parametro=entrada.readLine())!= null)\r\n\t {\r\n\t \tfor (int i = 0; i < parametro.length(); i++) \r\n\t \t{\r\n\t \t\tif(esvalor == true)\r\n\t \t\t{\r\n\t \t\t\tvalorparametro += parametro.charAt(i);\r\n\t \t\t}\r\n\t \t\tif(parametro.charAt(i) == ':')\r\n\t \t\t{\r\n\t \t\t\tesvalor = true;\r\n\t \t\t}\r\n\t\t\t\t}\r\n\t \tparametros.add(valorparametro.trim());\r\n\t \tvalorparametro = \"\";\r\n\t \tesvalor = false;\r\n\t }\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t}\r\n\t\treturn parametros;\r\n\t}", "public void setParameterNameValuePairs(entity.LoadParameter[] value);", "public void addPedidoDetalle(biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle param){\n if (localPedidoDetalle == null){\n localPedidoDetalle = new biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle[]{};\n }\n\n \n\n java.util.List list =\n org.apache.axis2.databinding.utils.ConverterUtil.toList(localPedidoDetalle);\n list.add(param);\n this.localPedidoDetalle =\n (biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle[])list.toArray(\n new biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle[list.size()]);\n\n }", "public ArrayList<String> getParameterValues() { return this.params; }", "public abstract ImmutableSet<String> getExplicitlyPassedParameters();", "public void setIndependentParameters(ParameterList list);", "public String getObtieneParametrosReformaTribu()throws Exception {\n Connection conn = null;\n CallableStatement call = null;\n String result = new String();\n\n try {\n\n conn = this.getConnection();\n\n //Deudas que forman parte de la propuesta, pero no son propias del contribuyente\n call = conn.prepareCall(\"{? =call PKG_OBTIENE_PARAM.obtieneParametroReformaTribu}\");\n call.registerOutParameter(1, OracleTypes.VARCHAR);\n call.execute();\n\n result = call.getObject(1).toString();\n \n call.close(); \n \n }catch (Exception e) {\n e.printStackTrace();\n }\n finally{\n this.closeConnection();\n }\n\t\treturn result;\n }", "public void setParamList(List<Object[]> paramList) {\n this.paramList = paramList;\n }", "@Parameters\n public static Collection<Object[]> testParameters() {\n Collection<Object[]> params = new ArrayList<Object[]>();\n\n for (OPT opt: OPT.values()) {\n Object[] par = new Object[2];\n par[0] = opt;\n par[1] = opt.name();\n\n params.add( par );\n }\n\n return params;\n }", "private static void variosParametros(String nombre, int ... numeros){\n System.out.println(\"nombre = \" + nombre);\n imprimirNumeros(numeros);\n }", "private List<String> getCleanedParameters(final List<String> parameters) {\n final List<String> params = new ArrayList<String>(parameters);\n removeEmptyElements(params);\n removeCommentsFromParameters(params);\n return params;\n }", "String toParameter();", "@Override\n\t\tpublic Enumeration getParameterNames() {\n\t\t\treturn null;\n\t\t}", "public void setParameters(ArrayList parameters) {\n this.parameters = parameters;\n }", "protected void initParameters(List<ParameterWrapper> params) {\n\t\tparameters = new SchemaParameterCollection();\n\t\tif (params != null) {\n\t\t\tIParameter par;\n\t\t\tfor (ParameterWrapper parwrap : params) {\n\t\t\t\tpar = ParameterFactory.createParameter(parwrap);\n\t\t\t\tparameters.addParameter(par);\n\t\t\t}\n\t\t}\n\t}", "void setParameter(String name, String[] values);", "private static List<String> parametersToList(Series<Parameter> headers) {\n if (headers.isEmpty()) {\n return Collections.emptyList();\n }\n List<String> stringHeaders = new ArrayList<>(headers.size());\n for (Parameter header : headers) {\n stringHeaders.add(header.getValue());\n }\n return stringHeaders;\n }", "public void addToParameterNameValuePairs(entity.LoadParameter element);", "public final void param(ArrayList<String> list) throws RecognitionException {\n\t\tCommonTree TYPE17=null;\n\t\tCommonTree ID18=null;\n\n\t\ttry {\n\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:285:2: ( ^( PARAM TYPE ID ) )\n\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:285:4: ^( PARAM TYPE ID )\n\t\t\t{\n\t\t\tmatch(input,PARAM,FOLLOW_PARAM_in_param357); \n\t\t\tmatch(input, Token.DOWN, null); \n\t\t\tTYPE17=(CommonTree)match(input,TYPE,FOLLOW_TYPE_in_param359); \n\t\t\tID18=(CommonTree)match(input,ID,FOLLOW_ID_in_param361); \n\t\t\tmatch(input, Token.UP, null); \n\n\n\t\t\t\t\t\tString type = \"\";\n\t\t\t\t\t\tif ((TYPE17!=null?TYPE17.getText():null).equals(\"COUNT\")) {\n\t\t\t\t\t\t\ttype = \"int\";\n\t\t\t\t\t\t} else if ((TYPE17!=null?TYPE17.getText():null).equals(\"TRUTH\")) {\n\t\t\t\t\t\t\ttype = \"boolean\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tScope_stack.peek().scopeMap.put((ID18!=null?ID18.getText():null), (TYPE17!=null?TYPE17.getText():null));\n\t\t\t\t\t\tlist.add(type + \" _\" + (ID18!=null?ID18.getText():null));\n\t\t\t\t\t\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "public Final_parametre() {\r\n\t}", "@Override\n\t\tpublic String getParameter(String name) {\n\t\t\treturn null;\n\t\t}", "public Setparam() {\r\n super();\r\n }", "protected String finalizarGenerateStringCamposFiltro(String listCamposFiltro){\r\n\t\t//Eliminamos la ultima coma y espacio introducidos.\r\n\t\tif(listCamposFiltro != \"\"){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.substring(0, listCamposFiltro.length()-2);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlistCamposFiltro = null; //Devolvemos null si no hay ningun filtro introducido\r\n\t\t}\r\n\r\n\t\tsetCamposFiltro(listCamposFiltro);\r\n\t\treturn listCamposFiltro;\r\n\t}", "public void removeParameter(){\r\n \tMap<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();\r\n\t\tlong paramId = Long.parseLong(params.get(\"parameterId\"));\r\n\t\tthis.getLog().info(\"parameterId:\" + paramId);\r\n\t\t\r\n\t\tif(paramId != 0){\r\n\t\t\ttry {\r\n\t\t\t\tConnectionFactory.createConnection().deleteParameter(paramId);\r\n\t\t\t\tthis.getSelectedAlgorithm().setParameters(ConnectionFactory.createConnection().getAlgorithmParameterArray(getSelectedAlgorithm().getId()));\r\n\t\t\t} catch (DataStorageException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void clearParams() {\n setParams((String[]) null);\n }", "@Override\n\tpublic String getParameter(String name) {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<CarPostionVo> searchAsksByParameter(CarPostionVo carPostionVo) {\n\t\treturn null;\n\t}", "java.lang.String getParameterValue();", "public void setParameters(ArrayList<ParameterEntry<String, String>> params) {\n parameters = params;\n }", "public Tipo visitParameter(DECAFParser.ParameterContext ctx){\r\n\t\tVarDec var =new VarDec(ctx.ID().getText(),tablaSimbolos.searchTipo(ctx.parameterType().getText()),0,position);\r\n\t\tfirmaA.addParam(var);\r\n\t\taddComment(\"paramname: \"+var.getNombre()+\"-position: \"+position);\r\n\t\tposition+=var.getByteSize();\r\n\t\treturn tablaSimbolos.correct();\r\n\t}", "public ArrayList<Object> procesar(String comando) {\n\n String[] parametros;\n\n int tam;\n\n if (!comando.contains(\",\")) {\n throw new IllegalArgumentException(\"Cadena \" + comando\n + \" no contiene caracter ,\");\n }\n\n //Se hace el split de la cadena\n parametros = comando.split(\",\");\n\n //Valida la cantidad de parametros\n if (parametros.length > 2) {\n throw new IllegalArgumentException(\"Cadena \" + comando\n + \" contiene mas caracter ,\");\n }\n\n //Valida la cantidad de parametros\n if (parametros.length < 2) {\n throw new IllegalArgumentException(\"Cadena \" + comando\n + \" no contiene los parametros requeridos\");\n }\n\n //Valida que el parametro size sea un numerico\n if (isNumeric(parametros[0])) {\n tam = Integer.parseInt(parametros[0]);\n\n // se valida que el size este entre 1 y 10\n if (tam < 1 || tam > 10) {\n throw new IllegalArgumentException(\"El parametro size [\" + tam\n + \"] debe estar entre 1 y 10\");\n }\n } else {\n throw new IllegalArgumentException(\"Parametro Size [\" + parametros[0]\n + \"] no es un numero\");\n }\n \n ArrayList<Object> retorno = new ArrayList<Object>();\n \n retorno.add(tam);\n retorno.add(parametros[1]);\n \n return retorno;\n\n }", "java.util.List<? extends gen.grpc.hospital.examinations.ParameterOrBuilder> \n getParameterOrBuilderList();", "public String getParameterFromP();", "@SuppressWarnings(\"unchecked\")\r\n\t\r\n\tpublic List<ParadaUtil> listar(String nomeCampo, Long valorCampo) {\n\t\tiniciarTransacao();\r\n\t\tCriteria c = s.createCriteria(ParadaUtil.class);\r\n\t\tc.add(Restrictions.eq(nomeCampo, valorCampo));\r\n\t\treturn c.list();\r\n\t}", "@Override\r\n\tpublic List<TVA> rechercherParRequeteNommee(String requeteNommee,\r\n\t\t\tMap<String, Object> parametres, int nbreMaxElements) {\n\t\treturn null;\r\n\t}", "java.util.List<com.google.cloud.commerce.consumer.procurement.v1.Parameter> getParametersList();", "@Override\n\tpublic Enumeration<String> getParameterNames() {\n\t\treturn null;\n\t}", "@Override\n\t\tpublic Object[] getParameters() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic List<TVA> rechercherParRequeteNommee(String requeteNommee,\r\n\t\t\tMap<String, Object> parametres) {\n\t\treturn null;\r\n\t}", "protected ParameterList(){\n //title = t;\n //cellWorld = cw;\n }", "public void setAdjustableParams(ParameterList paramList);", "protected void validateParameter(String... param) throws NavigationException {\r\n\t\tif (param.length > 0){\r\n\t\t\tfor(int i = 0; i < param.length; i++){\r\n\t\t\t\tif (param[i] != null && param[i].isEmpty()) {\r\n\t\t\t\t\tthrow new NavigationException(\"parametro no enviado\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "default List<Parameter<?>> getMethodParameters()\n {\n return Collections.unmodifiableList(Collections.emptyList());\n }", "public Collection<String> getParamNames();", "public static ArrayList getParameterList(HttpServletRequest req) {\n ArrayList result = new ArrayList();\n\n Enumeration parameterNames = req.getParameterNames();\n\n if (parameterNames != null) {\n String tStr;\n String vStr;\n while (parameterNames.hasMoreElements()) {\n tStr = parameterNames.nextElement().toString();\n vStr = req.getParameter(tStr);\n\n if (vStr != null) {\n DataBean tmp = new DataBean();\n tmp.setValue(\"name\", tStr);\n tmp.setValue(\"value\", vStr);\n\n result.add(tmp);\n }\n }\n }\n\n return (result);\n }", "List<PowreedCommandParameter> getParameters();", "@SuppressWarnings(\"unchecked\")\r\n\t\r\n\tpublic List<ParadaUtil> listar(String nomeCampo, boolean valorCampo) {\n\t\tiniciarTransacao();\r\n\t\tCriteria c = s.createCriteria(ParadaUtil.class);\r\n\t\tc.add(Restrictions.eq(nomeCampo, valorCampo));\r\n\t\treturn c.list();\r\n\t}", "private void getParameters(HttpServletRequest request) {\n\t\t// Recoger datos\n\t\tconcepto = request.getParameter(\"concepto\");\n\t\tString importeTexto = request.getParameter(\"importe\");\n\t\ttry {\n\t\t\timporte = Double.parseDouble(importeTexto);\n\n\t\t} catch (NumberFormatException e) {\n\t\t\timporte = (double) 0;\n\t\t}\n\t\tLong idCoche = Long.parseLong(request.getParameter(\"id_coche\"));\n\t\tc = daoCoche.getBYId(idCoche);\n\t\tidAgente = Long.parseLong(request.getParameter(\"id_agente\"));\n\t}", "List<Parameter> uriParameters();", "public abstract void setConfiguracion(ArrayList<String> DateEntrada);", "public String parameterListToString(){\n StringBuilder sb = new StringBuilder();\n for (String parameter : parameterList){\n sb.append(parameter);\n if (!parameter.equals(parameterList.get(parameterList.size() - 1))){\n sb.append(\", \");\n }\n }\n return sb.toString();\n }", "PARAM createPARAM();", "public void getParameters(Parameters param)\r\n {\r\n Enumeration keys=keys();\r\n while (keys.hasMoreElements())\r\n {\r\n String keyName=(String) keys.nextElement();\r\n if (param.containsKey(keyName))\r\n put(keyName, param.get(keyName));\r\n }\r\n }", "@Override\n\tprotected void setParameterValues() {\n\t}", "public String[] getParameterValues(String name) {\n return (String[]) params.get(name);\n }", "public java.util.List<com.isat.catalist.oms.order.OOSOrderLineItemParamType> getParametersList()\n {\n final class ParametersList extends java.util.AbstractList<com.isat.catalist.oms.order.OOSOrderLineItemParamType>\n {\n public com.isat.catalist.oms.order.OOSOrderLineItemParamType get(int i)\n { return OOSOrderLineItemTypeImpl.this.getParametersArray(i); }\n \n public com.isat.catalist.oms.order.OOSOrderLineItemParamType set(int i, com.isat.catalist.oms.order.OOSOrderLineItemParamType o)\n {\n com.isat.catalist.oms.order.OOSOrderLineItemParamType old = OOSOrderLineItemTypeImpl.this.getParametersArray(i);\n OOSOrderLineItemTypeImpl.this.setParametersArray(i, o);\n return old;\n }\n \n public void add(int i, com.isat.catalist.oms.order.OOSOrderLineItemParamType o)\n { OOSOrderLineItemTypeImpl.this.insertNewParameters(i).set(o); }\n \n public com.isat.catalist.oms.order.OOSOrderLineItemParamType remove(int i)\n {\n com.isat.catalist.oms.order.OOSOrderLineItemParamType old = OOSOrderLineItemTypeImpl.this.getParametersArray(i);\n OOSOrderLineItemTypeImpl.this.removeParameters(i);\n return old;\n }\n \n public int size()\n { return OOSOrderLineItemTypeImpl.this.sizeOfParametersArray(); }\n \n }\n \n synchronized (monitor())\n {\n check_orphaned();\n return new ParametersList();\n }\n }", "public OBDParamCollection() {\n\t\tparser = new OBDParamFormulaParser();\n\t}", "@Test\r\n\tpublic void testListArg() {\r\n\t\tAssert.assertEquals(\"test[(`a,`b,`c)]\", new FunctionImpl.FunctionBuilderImpl(\"test\").param(SymbolValue.froms(\"a\", \"b\", \"c\")).build().toQ());\r\n\t}", "public static KmList<KmParameter> parse(String... args)\n {\n StringBuilder sb = new StringBuilder();\n int n = args.length;\n for ( int i = 0; i < n; i++ )\n {\n sb.append(args[i]);\n sb.append(\" \");\n }\n String s = sb.toString().trim();\n return new KmParameterParser()._parse(s);\n }", "public void setListaVariablesMotivosLlamadoAtencion(List<String> listaVariablesMotivosLlamadoAtencion)\r\n/* 156: */ {\r\n/* 157:158 */ this.listaVariablesMotivosLlamadoAtencion = listaVariablesMotivosLlamadoAtencion;\r\n/* 158: */ }", "public void checkExistingParameter() {\n parameterList.clear();\n if (!attribute[13].equalsIgnoreCase(\"NA\")) {\n parameterList.add(parameterStore.getParameterWithCode(\"HB000\"));\n }\n\n if (!attribute[14].equalsIgnoreCase(\"NA\")) {\n parameterList.add(parameterStore.getParameterWithCode(\"WBC00\"));\n }\n\n if (!attribute[15].equalsIgnoreCase(\"NA\")) {\n parameterList.add(parameterStore.getParameterWithCode(\"PLT00\"));\n }\n\n if (!attribute[16].equalsIgnoreCase(\"NA\")) {\n parameterList.add(parameterStore.getParameterWithCode(\"RBC00\"));\n }\n\n if (!attribute[20].equalsIgnoreCase(\"NA\")) {\n parameterList.add(parameterStore.getParameterWithCode(\"IgGAN\"));\n }\n }", "@Override\r\n public void setParameter(String parameters) {\r\n // dummy\r\n }", "public List<GroupParameter> getParameters();" ]
[ "0.666926", "0.64476955", "0.62495244", "0.6105267", "0.6084749", "0.6039994", "0.603971", "0.60382867", "0.598614", "0.59645605", "0.59623325", "0.5938791", "0.59332067", "0.58932817", "0.5887997", "0.58824563", "0.5844594", "0.5841491", "0.5841491", "0.5817765", "0.58127093", "0.5806239", "0.5801339", "0.57992613", "0.5791126", "0.57894355", "0.5783776", "0.5774147", "0.5748906", "0.5740082", "0.5734547", "0.5733114", "0.57123667", "0.56987333", "0.56645334", "0.5654622", "0.5633633", "0.5618326", "0.56002104", "0.5571666", "0.55609864", "0.5560289", "0.5558135", "0.55538464", "0.55427766", "0.5534907", "0.55140424", "0.5513677", "0.55133325", "0.55037886", "0.54886144", "0.548302", "0.54739875", "0.547022", "0.5469372", "0.5469232", "0.54614687", "0.5458933", "0.5457802", "0.5455076", "0.5452002", "0.54466325", "0.5434669", "0.54251426", "0.542282", "0.5421148", "0.54137814", "0.5410666", "0.5386633", "0.53817946", "0.53676814", "0.5365371", "0.53612787", "0.5360524", "0.53519803", "0.53519434", "0.5351322", "0.53479373", "0.5338941", "0.5336103", "0.53309554", "0.53289664", "0.5326141", "0.5322171", "0.5311095", "0.5305865", "0.5305051", "0.5303811", "0.5299597", "0.52857804", "0.52750677", "0.5273445", "0.5267382", "0.5264773", "0.5262486", "0.5260691", "0.52586627", "0.5255038", "0.5252084", "0.5238715" ]
0.71403515
0
Obtiene bean listar parametro. Fecha: 22/08/2013
public BeanListarParametro getBeanListarParametro();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBeanListarParametro(BeanListarParametro beanListarParametro);", "public void remplireListeParam(){\r\n bddParam.add(\"id\");\r\n bddParam.add(\"site\");\r\n bddParam.add(\"smtp_serv\");\r\n bddParam.add(\"smtp_port\");\r\n bddParam.add(\"smtp_user\");\r\n bddParam.add(\"smtp_mail\");\r\n bddParam.add(\"smtp_pass\");\r\n bddParam.add(\"mail_envoie\");\r\n bddParam.add(\"licence\");\r\n bddParam.add(\"pop_up\");\r\n bddParam.add(\"mail_rapport\");\r\n bddParam.add(\"archives\");\r\n bddParam.add(\"mail\");\r\n bddParam.add(\"dbext_adress\");\r\n bddParam.add(\"dbext_port\");\r\n bddParam.add(\"dbext_user\");\r\n bddParam.add(\"dbext_pass\");\r\n bddParam.add(\"dbext_delais\");\r\n bddParam.add(\"dbext_name\");\r\n bddParam.add(\"dbext\");\r\n bddParam.add(\"dbext_purge\");\r\n bddParam.add(\"dbext_perte\");\r\n bddParam.add(\"langue\");\r\n \r\n }", "List<FichaDocente> listarDocentesxParametroxFacultad(String parametro, Integer integer);", "List<ParqueaderoEntidad> listar();", "List<BeanPedido> getPedidos();", "public interface ParametroListarService {\n\t\n\t/**\n\t * Listar parametros.\n\t * Fecha: 22/08/2013\n\t *\n\t * @param idPanel the id panel\n\t * @throws Exception the exception\n\t */\n\tpublic void listarParametros(String idPanel) throws Exception;\n\t\n\t/**\n\t * Eliminar parametro.\n\t * Fecha: 22/08/2013\n\t *\n\t * @throws Exception the exception\n\t */\n\tpublic void eliminarParametro() throws Exception;\n\t\n\t/**\n\t * Limpiar lista parametro.\n\t * Fecha: 22/08/2013\n\t *\n\t * @throws Exception the exception\n\t */\n\tpublic void limpiarListaParametro() throws Exception;\n\n\t/**\n\t * Obtiene bean listar parametro.\n\t * Fecha: 22/08/2013\n\t *\n\t * @return bean listar parametro\n\t */\n\tpublic BeanListarParametro getBeanListarParametro();\n\n\t/**\n\t * Establece el bean listar parametro.\n\t *\n\t * @param beanListarParametro el new bean listar parametro\n\t */\n\tpublic void setBeanListarParametro(BeanListarParametro beanListarParametro);\n\n}", "public void limpiarListaParametro() throws Exception;", "java.util.List<datawave.webservice.query.QueryMessages.QueryImpl.Parameter> getParametersList();", "public List<PersonaDTO> consultarPersonas() ;", "public List<PmPropertyBean> getPropertiesByModel(Map paramter);", "List<Room> selectRoomList(@Param(\"building\") String building);", "public ProductoListarBean() {\r\n }", "private ArrayList<Parametro> getParametros(int pregunta){\n ArrayList<Parametro> arrayListParametros = new ArrayList<>();\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql =\"SELECT p FROM ParametroInterrogante pi \"\n + \"JOIN pi.interrogante i \"\n + \"JOIN pi.parametro p \"\n + \"WHERE p.estado='a' AND i.estado='a' \"\n + \"AND i.idinterrogante = :pregunta\";\n\n Query query = em.createQuery(jpql);\n query.setParameter(\"pregunta\", pregunta);\n List<Parametro> list = query.getResultList();\n for(Parametro p : list){\n arrayListParametros.add(p);\n }\n\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n return arrayListParametros;\n }", "public List<Esysmeudef> list(Map<String, Object> params);", "public void listarParametros(String idPanel) throws Exception;", "public FinPagamentosListagemBean()\n {\n }", "List<BeanPedido> getPedidos(String idUsuario);", "public ConsultBean() {\n \t annees= new ArrayList<String>(); \n int a = Integer.parseInt(cenServ.getCentre().getAnneeRegistre());\n \t\t\n \t\tfor(int i = anneeCourant ; i >= a; i--){\n \t\t\tannees.add(i+\"\"); \n \t\t} \n \t\t\n \t\t\t\t\n }", "@Override\r\n\tpublic List<ComunidadBean> getComunidadList() {\n\t\tList<ComunidadBean> result=new ArrayList<ComunidadBean>();\r\n\t\t\r\n\t\tList<JugComunidad> list= comunidadRepository.getComunidadList();\r\n\t\tfor (JugComunidad entiry : list) \r\n \t\tresult.add(new ComunidadBean(entiry.getId(), entiry.getCodigo(), entiry.getDescripcion()));\t\r\n\t\t\r\n\t\treturn result;\r\n\t}", "public List getBeneficioDeudaList(Map criteria);", "public List<Joueur> List_Joueur_HommesForComboBox() \r\n {\r\n List<Joueur> j = new ArrayList<>();\r\n String req= \"SELECT * FROM personne WHERE datedestruction is NULL and role = 'Joueur' and sexe='Homme' \";\r\n try {\r\n ResultSet res = ste.executeQuery(req);\r\n while (res.next()) {\r\n \r\n Joueur Jou = new Joueur(\r\n res.getInt(\"idpersonne\"),\r\n \r\n res.getString(\"nom\"),\r\n res.getString(\"prenom\")\r\n );\r\n j.add(Jou);\r\n \r\n System.out.println(\"------- joueurs selectionné avec succés----\");\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n System.out.println(\"----------Erreur lors methode : List_Joueur_Hommes()------\");\r\n }\r\n return j;\r\n \r\n}", "@RequestMapping(value=\"/listar\", method=RequestMethod.GET)\r\n\tpublic String listar(Model model) {\t\t\r\n\t\tmodel.addAttribute(\"titulo\", \"Listado de Pacientes\");\r\n\t\tmodel.addAttribute(\"pacientes\", pacienteService.findAll());\r\n\t\treturn \"listar\";\r\n\t}", "public List<ParamIntervento> getAll()\n {\n\t System.out.println(\"chiamo getAll: \");\n System.out.flush();\n CriteriaQuery<ParamIntervento> criteria = this.entityManager.getCriteriaBuilder().createQuery(ParamIntervento.class);\n return this.entityManager.createQuery(criteria.select(criteria.from(ParamIntervento.class))).getResultList();\n }", "public List<PmPropertyBean> getProperties(Map paramter);", "List<Especialidad> getEspecialidades();", "public ListaReservasBean() {\r\n\t\tthis.listaReservas = new ArrayList<ReservaDAO>();\r\n\t}", "public String buscarTrabajadoresPorParametros() {\r\n try {\r\n inicializarFiltros();\r\n listaTrabajadores = null;\r\n //listaTrabajadores = administrarGestionarTrabajadoresBO.consultarTrabajadoresPorParametro(filtros);\r\n return null;\r\n } catch (Exception e) {\r\n System.out.println(\"Error ControllerAdministrarTrabajadores buscarTrabajadoresPorParametros : \" + e.toString());\r\n return null;\r\n }\r\n }", "public List<VentaDet> generar(Periodo mes){\n\t\tString sql=ReplicationUtils.resolveSQL(mes,\"ALMACE\",\"ALMFECHA\")+\" AND ALMTIPO=\\'FAC\\' ORDER BY ALMSUCUR,ALMNUMER,ALMSERIE\";\r\n\t\tVentasDetMapper mapper=new VentasDetMapper();\r\n\t\tmapper.setBeanClass(getBeanClass());\r\n\t\tmapper.setOrigen(\"ALMACE\");\r\n\t\tmapper.setPropertyColumnMap(getPropertyColumnMap());\r\n\t\tList<VentaDet> rows=getFactory().getJdbcTemplate(mes).query(sql,mapper);\r\n\t\tlogger.info(\"VentaDet obtenidas : \"+rows.size());\r\n\t\treturn rows;\r\n\t}", "List<Vehiculo>listar();", "@SuppressWarnings(\"unchecked\")\r\n\t\r\n\tpublic List<ParadaUtil> listar(String nomeCampo, Long valorCampo) {\n\t\tiniciarTransacao();\r\n\t\tCriteria c = s.createCriteria(ParadaUtil.class);\r\n\t\tc.add(Restrictions.eq(nomeCampo, valorCampo));\r\n\t\treturn c.list();\r\n\t}", "ParameterList getParameters();", "public static Object getLista(Object obj) {\n\t\tConexionDB db=new TipoComisionDB();\r\n\t\treturn db.getAll(obj);\r\n\t}", "public List<Parameter> getParameter( )\n {\n return _parameter;\n }", "java.util.List<com.google.cloud.commerce.consumer.procurement.v1.Parameter> getParametersList();", "@Override\n public Retorno_MsgObj obtenerLista() {\n PerManejador perManager = new PerManejador();\n\n return perManager.obtenerLista(\"Inscripcion.findAll\", null);\n }", "public List<IParam> getParams();", "public List<IParam> getParams();", "public List<Object> retrievePagingList(PageBean pageBean) ;", "List<Plaza> consultarPlazas();", "public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }", "public static List<Parte> listarPartes(){\n List <Parte> partes=new ArrayList<>();\n Conexion.conectar();\n String sql = \"call ppartes.partesList (?)\";\n \n try {\n CallableStatement cs = Conexion.getConexion().prepareCall(sql);\n cs.registerOutParameter(1, OracleTypes.CURSOR);\n cs.execute();\n \n ResultSet rs = (ResultSet) cs.getObject(1);\n while (rs.next()){\n Parte p = new Parte();\n p.setFecha(rs.getString(\"fecha\"));\n p.setKmInicial(rs.getBigDecimal(\"kmInicial\"));\n p.setKmFinal(rs.getBigDecimal(\"kmFinal\"));\n p.setGastoPeaje(rs.getBigDecimal(\"gastosPeaje\")); \n p.setGastoDietas(rs.getBigDecimal(\"gastosDietas\"));\n p.setGastoCombustible(rs.getBigDecimal(\"gastosCombustible\"));\n p.setGastoVarios(rs.getBigDecimal(\"otrosGastos\"));\n p.setIncidencias(rs.getString(\"incidencias\"));\n p.setEstado(rs.getString(\"estado\"));\n p.setValidado(rs.getString(\"validado\"));\n p.setHorasExtras(rs.getBigDecimal(\"horasExtras\"));\n p.setIdTrabajador(rs.getBigDecimal(\"TRABAJADORES_ID\"));\n p.setNotasAdministrativas(rs.getString(\"notasAdministrativas\"));\n partes.add(p);\n }\n \n rs.close();\n cs.close();\n Conexion.desconectar();\n return partes;\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"No se puede efectuar la conexión, hable con el administrador del sistema\" + ex.getMessage());\n }\n return null;\n }", "public List<PerfilTO> buscarTodos();", "public List<Pagamento> buscarPorBusca(String busca)throws DaoException;", "List<CatalogoAprobadorDTO> buscarAprobador(int cveADM, String numEmpleado, Integer claveNivel, Integer centroCostoOP) throws SIATException;", "List<TipoHuella> listarTipoHuellas();", "public List<Goods> selectByCatelog(@Param(\"catelog_id\") Integer catelog_id,@Param(\"name\") String name,@Param(\"describle\") String describle);", "public ListParameter()\r\n\t{\r\n\t}", "public List<Produto> buscarProdutos(){\n return new ArrayList<>();\n }", "List<CarritoProductoResponseDTO> consultarCarritoCompras(String userName,TipoMoneda tipoMoneda);", "public void llenadoDeCombos() {\n PerfilDAO asignaciondao = new PerfilDAO();\n List<Perfil> asignacion = asignaciondao.listar();\n cbox_perfiles.addItem(\"\");\n for (int i = 0; i < asignacion.size(); i++) {\n cbox_perfiles.addItem(Integer.toString(asignacion.get(i).getPk_id_perfil()));\n }\n \n }", "@Override\r\n\tpublic List<Object> consultarVehiculos() {\r\n\t\t\r\n\t\tFormat formato = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t\r\n\t\treturn AdminEstacionamientoImpl.getParqueadero().stream().map(\r\n\t\t\t\t temp -> {HashMap<String, String> lista = new HashMap<String, String>(); \r\n\t\t\t\t lista.put( \"placa\", temp.getVehiculo().getPlaca() );\r\n\t\t\t\t lista.put( \"tipo\", temp.getVehiculo().getTipo() );\r\n\t\t\t\t lista.put( \"fechaInicio\", formato.format( temp.getFechaInicio() ) );\r\n\r\n\t\t\t\t return lista;\r\n\t\t\t\t }\r\n\t\t\t\t).collect(Collectors.toList());\r\n\t}", "List<Videogioco> retriveByPiattaforma(String piattaforma);", "public List<IbBeneficiariosPjDTO> listarIbBeneficiariosPjDTO(Long idBeneficiario, Short estatusCarga, String idCanal, String codigoCanal);", "List<Oficios> buscarActivas();", "List<Persona> obtenerTodasLasPersona();", "public List<ActDetalleActivo> listarPorSerial(String serial,String amie, int estado,Integer anio,int estadoActivo);", "public static ArrayList getParameterList(HttpServletRequest req) {\n ArrayList result = new ArrayList();\n\n Enumeration parameterNames = req.getParameterNames();\n\n if (parameterNames != null) {\n String tStr;\n String vStr;\n while (parameterNames.hasMoreElements()) {\n tStr = parameterNames.nextElement().toString();\n vStr = req.getParameter(tStr);\n\n if (vStr != null) {\n DataBean tmp = new DataBean();\n tmp.setValue(\"name\", tStr);\n tmp.setValue(\"value\", vStr);\n\n result.add(tmp);\n }\n }\n }\n\n return (result);\n }", "@Override\n public void mostrarListadoEquipos(List<Equipo> equipos) {\n\n }", "public List<ActDetalleActivo> listarDetalleActivoLaboratorio(long codigoSalaLaboratorio,long codigoTipo,String amie, int estado,int anio);", "public List<Goods> selectByStr(@Param(\"limit\")Integer limit,@Param(\"name\") String name,@Param(\"describle\") String describle);", "List<T> findAll(ListParams params);", "public ArrayList<Object> procesar(String comando) {\n\n String[] parametros;\n\n int tam;\n\n if (!comando.contains(\",\")) {\n throw new IllegalArgumentException(\"Cadena \" + comando\n + \" no contiene caracter ,\");\n }\n\n //Se hace el split de la cadena\n parametros = comando.split(\",\");\n\n //Valida la cantidad de parametros\n if (parametros.length > 2) {\n throw new IllegalArgumentException(\"Cadena \" + comando\n + \" contiene mas caracter ,\");\n }\n\n //Valida la cantidad de parametros\n if (parametros.length < 2) {\n throw new IllegalArgumentException(\"Cadena \" + comando\n + \" no contiene los parametros requeridos\");\n }\n\n //Valida que el parametro size sea un numerico\n if (isNumeric(parametros[0])) {\n tam = Integer.parseInt(parametros[0]);\n\n // se valida que el size este entre 1 y 10\n if (tam < 1 || tam > 10) {\n throw new IllegalArgumentException(\"El parametro size [\" + tam\n + \"] debe estar entre 1 y 10\");\n }\n } else {\n throw new IllegalArgumentException(\"Parametro Size [\" + parametros[0]\n + \"] no es un numero\");\n }\n \n ArrayList<Object> retorno = new ArrayList<Object>();\n \n retorno.add(tam);\n retorno.add(parametros[1]);\n \n return retorno;\n\n }", "List<Object> getListProperty(Object name) throws JMSException;", "@Override\n\tpublic List<BeanDistrito> listar() {\n\t\tList<BeanDistrito> lista = new ArrayList<BeanDistrito>();\n\t\tBeanDistrito distrito = null;\n\t\tConnection con = MySQLDaoFactory.obtenerConexion();\n\t\ttry {\n\t\t\n\t\t\tString sql=\"SELECT * FROM t_distrito ORDER BY codDistrito\";\n\t\t\tStatement stmt = con.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(sql);\n\t\t\t\n\t\t\twhile(rs.next()){\n\t\t\t\tdistrito = new BeanDistrito();\n\t\t\t\tdistrito.setCodDistrito(rs.getInt(1));\n\t\t\t\tdistrito.setNombre(rs.getString(2));\n\t\t\t\t\n\t\t\t\tlista.add(distrito);\n\t\t\t}\n\t\t\tcon.close();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\ttry {\n\t\t\t\tcon.close();\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn lista;\n\t}", "public List<Consulta> getPorCPF(String cpf) throws BusinessException;", "@Override\n public Retorno_MsgObj obtenerLista() {\n PerManejador perManager = new PerManejador();\n\n return perManager.obtenerLista(\"Curso.findAll\", null);\n }", "Object getTolist();", "public List<PmPropertyLanguageBean> selectPropertyWithLanguages(Map Paramter);", "List<Pacote> buscarPorTransporte(Transporte transporte);", "public List getTrabajadores();", "public abstract ArrayList<DtPropuesta> listarPropuestasPorCategoria(String nombreCat);", "public List<RolModel> listarRolUsuario();", "@Override\r\n\tpublic <T extends Object> List<T> getBeanList(Class<T> c, String specific, String text, int from, int size, String sort)\r\n\t\tthrows Exception {\r\n\t\tClass[] cs;\r\n\t\tif (c==null)cs=new Class[]{}; else cs=new Class[]{c};\r\n\t\tPageInfo page=getBeanList(cs,specific,text,from,size, sort, \"\", false);\r\n\t\treturn page.getList();\r\n\t}", "public ArrayList<LoteriaDto> listarLoteriaXNombre(String nombre) {\n\n ArrayList<LoteriaDto> lista = new ArrayList();\n Connection con =null;\n try {\n con=Recurso.Conexion.getPool().getDataSource().getConnection();\n String sql = \"SELECT codigo,nombre,dia,hora,minuto,ruta FROM loteria where nombre='\" + nombre + \"'\";\n PreparedStatement str;\n str = con.prepareStatement(sql);\n ResultSet rs = str.executeQuery();\n\n while (rs.next()) {\n LoteriaDto dto = new LoteriaDto();\n dto.setCodigo(rs.getInt(1));\n dto.setNombre(rs.getString(2));\n dto.setDia(rs.getInt(3));\n dto.setHora(rs.getInt(4));\n dto.setMinuto(rs.getInt(5));\n dto.setRuta(rs.getString(6));\n lista.add(dto);\n\n }\n str.close();\n rs.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }finally{\n if(con!=null){\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorLoteria.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return lista;\n }\n\n }", "@Override\n public List<ProductPojo> getProductTypeFavouritesList(Map<String, Object> params) {\n return yourFavouritesDetaildao.getProductTypeFavouritesList(params);\n }", "List<ResourcePojo> selectByBktAndModelName(@Param(\"bktName\") String bktName, @Param(\"modelName\") String modelName);", "java.util.List<gen.grpc.hospital.examinations.Parameter> \n getParameterList();", "java.util.List<cb.Careerbuilder.Job> \n getJobsList();", "public List<UsuarioDTO> consultarUsuarios();", "public List<UsuarioDTO> consultarUsuarios();", "List<ParUsuarios> selectByExample(ParUsuariosExample example);", "java.util.List<com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameter> \n getParamsList();", "public List<CLEmpleado> obtenerListaEmpleados() throws SQLException{\r\n String sql = \"{CALL sp_mostrarEmpleados()}\";\r\n List<CLEmpleado> miLista = null;\r\n try{\r\n st = cn.createStatement();\r\n rs = st.executeQuery(sql);\r\n miLista = new ArrayList<>();\r\n while(rs.next()) {\r\n CLEmpleado cl = new CLEmpleado();\r\n cl.setIdEmpleado(rs.getInt(\"IdEmpleado\"));\r\n cl.setPrimerNombre(rs.getString(\"empleadoPrimerNombre\"));\r\n cl.setSegundoNombre(rs.getString(\"empleadoSegundoNombre\"));\r\n cl.setPrimerApellido(rs.getString(\"empleadoPrimerApellido\"));\r\n cl.setSegundoApellido(rs.getString(\"empleadoSegundoApellido\"));\r\n cl.setDireccion(rs.getString(\"empleadoDireccion\"));\r\n cl.setTelefonoCelular(rs.getString(\"empleadoTelefonoCelular\"));\r\n cl.setIdCargo(rs.getInt(\"idCargo\"));\r\n cl.setIdEstado(rs.getInt(\"idEstado\"));\r\n miLista.add(cl);\r\n }\r\n \r\n }catch(SQLException e){\r\n JOptionPane.showMessageDialog(null, \"error: \"+ e.getMessage());\r\n \r\n }\r\n return miLista; \r\n }", "public void ouvrirListe(){\n\t\n}", "public List<Tiposservicios> getTiposServicios(HashMap parametros);", "public void setListaCuentaContableBean(ListaCuentaContableBean listaCuentaContableBean)\r\n/* 324: */ {\r\n/* 325:387 */ this.listaCuentaContableBean = listaCuentaContableBean;\r\n/* 326: */ }", "public List<Tripulante> buscarTodosTripulantes();", "public ArrayList< UsuarioVO> listaDePersonas() {\r\n\t ArrayList< UsuarioVO> miUsuario = new ArrayList< UsuarioVO>();\r\n\t Conexion conex= new Conexion();\r\n\t \r\n\t try {\r\n\t PreparedStatement consulta = conex.getConnection().prepareStatement(\"SELECT * FROM usuarios\");\r\n\t ResultSet res = consulta.executeQuery();\r\n\t while(res.next()){\r\n\t\t UsuarioVO persona= new UsuarioVO();\r\n\t persona.setCedula_usuario(Integer.parseInt(res.getString(\"cedula_usuario\")));\r\n\t persona.setEmail_usuario(res.getString(\"email_usuario\"));\r\n\t persona.setNombre_usuario(res.getString(\"nombre_usuario\"));\r\n\t persona.setPassword(res.getString(\"password\"));\r\n\t persona.setUsuario(res.getString(\"usuario\"));\r\n\t \r\n\t \r\n\t miUsuario.add(persona);\r\n\t }\r\n\t res.close();\r\n\t consulta.close();\r\n\t conex.desconectar();\r\n\t \r\n\t } catch (Exception e) {\r\n\t JOptionPane.showMessageDialog(null, \"no se pudo consultar la Persona\\n\"+e);\r\n\t }\r\n\t return miUsuario;\r\n\t }", "List<SchoolMasterVo> getSchoolMasterVoList();", "List<String> getListInput(String fieldName);", "public List listar() {\n ArrayList<Empleado> lista = new ArrayList<>();\r\n String sql = \"SELECT * FROM empleado\";\r\n \r\n try {\r\n con = cn.getConexion();\r\n ps = con.prepareStatement(sql); \r\n rs = ps.executeQuery();\r\n \r\n while (rs.next()) {\r\n Empleado emp = new Empleado(); \r\n emp.setId(rs.getInt(\"Id\")); //campos de la tabla\r\n emp.setNombre(rs.getString(\"Nombre\"));\r\n emp.setSalario(rs.getDouble(\"Salario\")); \r\n lista.add(emp); \r\n } \r\n } catch(Exception e) {\r\n System.out.println(e.getMessage());\r\n }\r\n \r\n return lista;\r\n }", "public List<Ejercicio> getListaEjercicio()\r\n/* 155: */ {\r\n/* 156:202 */ if (this.listaEjercicio == null) {\r\n/* 157:203 */ this.listaEjercicio = this.servicioEjercicio.obtenerListaCombo(\"nombre\", true, null);\r\n/* 158: */ }\r\n/* 159:205 */ return this.listaEjercicio;\r\n/* 160: */ }", "protected String inicializarCamposComunes() {\r\n\t\tString listCamposFiltro = \"\";\r\n\r\n\t\tif(getId() != null){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Id\").concat(\", \");\r\n\t\t}\r\n\t\tif(getObservaciones() != null && getObservaciones().length() >0){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Observaciones\").concat(\", \");\r\n\t\t}\r\n\t\tif(getActivo() != null && getActivo().length() > 0){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Activo [\").concat(getActivo()).concat(\"], \");\r\n\t\t}\r\n\t\tif(getFechaBajaDesde() != null){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Fecha Baja Desde\").concat(\", \");\r\n\t\t}\r\n\t\tif(getFechaBajaHasta() != null){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Fecha Baja Hasta\").concat(\", \");\r\n\t\t}\r\n\t\tif(getFechaAltaDesde() != null){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Fecha Alta Desde\").concat(\", \");\r\n\t\t}\r\n\t\tif(getFechaAltaHasta() != null){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Fecha Alta Hasta\").concat(\", \");\r\n\t\t}\r\n\r\n\t\treturn listCamposFiltro;\r\n\t}", "@Override\n\tpublic List<StudyVO> list(Criteria cri) {\n \n\t\n\t\t \n\tList<StudyVO> list =mapper.list(cri);\n\tlogger.info(\"service계층에서list는\"+mapper.list(cri));\n\t\n\tlogger.info(\"service에서 list값은\"+list);\n\tSystem.out.println(\"service에서 list값은\"+list);\n\t\n\treturn list;\n\t\n\t\n\t}", "public String listViaje() {\n\t\t\t//resetForm();\n\t\t\treturn \"/boleta/list.xhtml\";\t\n\t\t}", "@GetMapping(\"/filtering-list\")\r\n\tpublic MappingJacksonValue retrieveListBean() {\n\t\tList<SomeBean> list = Arrays.asList(new SomeBean(\"value1\",\"value2\",\"value3\"),\r\n\t\t\t\tnew SomeBean(\"value10\",\"value20\",\"value30\")\r\n\t\t\t\t);\r\n\t\tMappingJacksonValue mapping = new MappingJacksonValue(list);\r\n\t\tSimpleBeanPropertyFilter filter = SimpleBeanPropertyFilter.filterOutAllExcept(\"field3\", \"field2\");\r\n\t\tFilterProvider filters = new SimpleFilterProvider().addFilter(\"SomeBeanFilter\", filter);\r\n\t\tmapping.setFilters(filters);\r\n\t\treturn mapping;\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t\r\n\tpublic List<ParadaUtil> listar(String nomeCampo, boolean valorCampo) {\n\t\tiniciarTransacao();\r\n\t\tCriteria c = s.createCriteria(ParadaUtil.class);\r\n\t\tc.add(Restrictions.eq(nomeCampo, valorCampo));\r\n\t\treturn c.list();\r\n\t}", "private List<Produto> retornaProduto (Long cod){\n \n Query q = entityManager.createNamedQuery(\"Produto.findByCodigo\");\n q.setParameter(\"codigo\", cod);\n List <Produto> p = q.getResultList();\n return p; \n}", "public List<Cliente> consultarClientes();", "public void populateListaObjetos() {\n listaObjetos.clear();\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n String tipo = null;\n if (selectedTipo.equals(\"submenu\")) {\n tipo = \"menu\";\n } else if (selectedTipo.equals(\"accion\")) {\n tipo = \"submenu\";\n }\n\n Criteria cObjetos = session.createCriteria(Tblobjeto.class);\n cObjetos.add(Restrictions.eq(\"tipoObjeto\", tipo));\n Iterator iteObjetos = cObjetos.list().iterator();\n while (iteObjetos.hasNext()) {\n Tblobjeto o = (Tblobjeto) iteObjetos.next();\n listaObjetos.add(new SelectItem(new Short(o.getIdObjeto()).toString(), o.getNombreObjeto(), \"\"));\n }\n } catch (HibernateException e) {\n //logger.throwing(getClass().getName(), \"populateListaObjetos\", e);\n } finally {\n session.close();\n }\n }" ]
[ "0.7022336", "0.6657112", "0.64540327", "0.6431403", "0.6356425", "0.6351529", "0.6313395", "0.62698036", "0.62037873", "0.6174074", "0.61381835", "0.61082006", "0.6098748", "0.60969687", "0.6070021", "0.6034866", "0.6020655", "0.59625655", "0.5962085", "0.5951218", "0.5947736", "0.593267", "0.59132457", "0.59119797", "0.58918965", "0.5884967", "0.58841926", "0.5865792", "0.5840171", "0.5836267", "0.58329666", "0.5826787", "0.582672", "0.582586", "0.581677", "0.58028513", "0.58028513", "0.5797768", "0.577189", "0.5767477", "0.5765832", "0.5755048", "0.5753084", "0.5734729", "0.57290137", "0.5728344", "0.57245094", "0.5701002", "0.5697412", "0.5686262", "0.56854373", "0.56832886", "0.5672863", "0.56683785", "0.5663797", "0.5661976", "0.56605244", "0.56533104", "0.5647912", "0.564577", "0.5638888", "0.5638776", "0.56329113", "0.5626592", "0.5626051", "0.5624912", "0.5624671", "0.56241167", "0.56234586", "0.56192976", "0.5609845", "0.5609712", "0.5598156", "0.5592521", "0.55888087", "0.5587268", "0.5584645", "0.557493", "0.55732375", "0.55732375", "0.5565356", "0.55594146", "0.55560786", "0.555516", "0.5542951", "0.5537342", "0.5535842", "0.5534043", "0.5533529", "0.55332106", "0.5531819", "0.55316156", "0.55281085", "0.5526439", "0.5525223", "0.5521967", "0.55197924", "0.5519235", "0.55171293", "0.55135095" ]
0.8181671
0
Establece el bean listar parametro.
public void setBeanListarParametro(BeanListarParametro beanListarParametro);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BeanListarParametro getBeanListarParametro();", "public void limpiarListaParametro() throws Exception;", "List<ParqueaderoEntidad> listar();", "List<FichaDocente> listarDocentesxParametroxFacultad(String parametro, Integer integer);", "public void remplireListeParam(){\r\n bddParam.add(\"id\");\r\n bddParam.add(\"site\");\r\n bddParam.add(\"smtp_serv\");\r\n bddParam.add(\"smtp_port\");\r\n bddParam.add(\"smtp_user\");\r\n bddParam.add(\"smtp_mail\");\r\n bddParam.add(\"smtp_pass\");\r\n bddParam.add(\"mail_envoie\");\r\n bddParam.add(\"licence\");\r\n bddParam.add(\"pop_up\");\r\n bddParam.add(\"mail_rapport\");\r\n bddParam.add(\"archives\");\r\n bddParam.add(\"mail\");\r\n bddParam.add(\"dbext_adress\");\r\n bddParam.add(\"dbext_port\");\r\n bddParam.add(\"dbext_user\");\r\n bddParam.add(\"dbext_pass\");\r\n bddParam.add(\"dbext_delais\");\r\n bddParam.add(\"dbext_name\");\r\n bddParam.add(\"dbext\");\r\n bddParam.add(\"dbext_purge\");\r\n bddParam.add(\"dbext_perte\");\r\n bddParam.add(\"langue\");\r\n \r\n }", "public interface ParametroListarService {\n\t\n\t/**\n\t * Listar parametros.\n\t * Fecha: 22/08/2013\n\t *\n\t * @param idPanel the id panel\n\t * @throws Exception the exception\n\t */\n\tpublic void listarParametros(String idPanel) throws Exception;\n\t\n\t/**\n\t * Eliminar parametro.\n\t * Fecha: 22/08/2013\n\t *\n\t * @throws Exception the exception\n\t */\n\tpublic void eliminarParametro() throws Exception;\n\t\n\t/**\n\t * Limpiar lista parametro.\n\t * Fecha: 22/08/2013\n\t *\n\t * @throws Exception the exception\n\t */\n\tpublic void limpiarListaParametro() throws Exception;\n\n\t/**\n\t * Obtiene bean listar parametro.\n\t * Fecha: 22/08/2013\n\t *\n\t * @return bean listar parametro\n\t */\n\tpublic BeanListarParametro getBeanListarParametro();\n\n\t/**\n\t * Establece el bean listar parametro.\n\t *\n\t * @param beanListarParametro el new bean listar parametro\n\t */\n\tpublic void setBeanListarParametro(BeanListarParametro beanListarParametro);\n\n}", "List<BeanPedido> getPedidos();", "java.util.List<datawave.webservice.query.QueryMessages.QueryImpl.Parameter> getParametersList();", "public List<PersonaDTO> consultarPersonas() ;", "public ProductoListarBean() {\r\n }", "public void listarParametros(String idPanel) throws Exception;", "public ListaReservasBean() {\r\n\t\tthis.listaReservas = new ArrayList<ReservaDAO>();\r\n\t}", "public List<Esysmeudef> list(Map<String, Object> params);", "List<Vehiculo>listar();", "private ArrayList<Parametro> getParametros(int pregunta){\n ArrayList<Parametro> arrayListParametros = new ArrayList<>();\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql =\"SELECT p FROM ParametroInterrogante pi \"\n + \"JOIN pi.interrogante i \"\n + \"JOIN pi.parametro p \"\n + \"WHERE p.estado='a' AND i.estado='a' \"\n + \"AND i.idinterrogante = :pregunta\";\n\n Query query = em.createQuery(jpql);\n query.setParameter(\"pregunta\", pregunta);\n List<Parametro> list = query.getResultList();\n for(Parametro p : list){\n arrayListParametros.add(p);\n }\n\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n return arrayListParametros;\n }", "public List<Produto> buscarProdutos(){\n return new ArrayList<>();\n }", "public void Listar() {\n try {\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n this.listaApelaciones.clear();\n setListaApelaciones(apelacionesDao.cargaApelaciones());\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public List<PerfilTO> buscarTodos();", "@RequestMapping(value=\"/listar\", method=RequestMethod.GET)\r\n\tpublic String listar(Model model) {\t\t\r\n\t\tmodel.addAttribute(\"titulo\", \"Listado de Pacientes\");\r\n\t\tmodel.addAttribute(\"pacientes\", pacienteService.findAll());\r\n\t\treturn \"listar\";\r\n\t}", "@Override\n public void mostrarListadoEquipos(List<Equipo> equipos) {\n\n }", "java.util.List<com.google.cloud.commerce.consumer.procurement.v1.Parameter> getParametersList();", "public List<ParamIntervento> getAll()\n {\n\t System.out.println(\"chiamo getAll: \");\n System.out.flush();\n CriteriaQuery<ParamIntervento> criteria = this.entityManager.getCriteriaBuilder().createQuery(ParamIntervento.class);\n return this.entityManager.createQuery(criteria.select(criteria.from(ParamIntervento.class))).getResultList();\n }", "public void ouvrirListe(){\n\t\n}", "private void listar() throws Exception{\n int resId=1;\n List<PlatoDia> lista = this.servicioRestaurante.listarMenuDia(resId);\n this.modelListEspecial.clear();\n lista.forEach(lse -> {\n this.modelListEspecial.addElement(\"ID: \" + lse.getId() \n + \" NOMBRE: \" + lse.getNombre()\n + \" DESCRIPCION: \" + lse.getDescripcion()\n + \" PRECIO: \" + lse.getPrecio()\n + \" ENTRADA: \"+lse.getEntrada() \n + \" PRINCIPIO: \"+lse.getPrincipio()\n + \" CARNE: \"+lse.getCarne()\n + \" BEBIDA: \"+lse.getBebida()\n + \" DIA: \"+lse.getDiaSemana());\n });\n }", "public void listarProducto() {\n }", "List<Plaza> consultarPlazas();", "@SuppressWarnings(\"unchecked\")\r\n\t\r\n\tpublic List<ParadaUtil> listar(String nomeCampo, Long valorCampo) {\n\t\tiniciarTransacao();\r\n\t\tCriteria c = s.createCriteria(ParadaUtil.class);\r\n\t\tc.add(Restrictions.eq(nomeCampo, valorCampo));\r\n\t\treturn c.list();\r\n\t}", "public static List<Parte> listarPartes(){\n List <Parte> partes=new ArrayList<>();\n Conexion.conectar();\n String sql = \"call ppartes.partesList (?)\";\n \n try {\n CallableStatement cs = Conexion.getConexion().prepareCall(sql);\n cs.registerOutParameter(1, OracleTypes.CURSOR);\n cs.execute();\n \n ResultSet rs = (ResultSet) cs.getObject(1);\n while (rs.next()){\n Parte p = new Parte();\n p.setFecha(rs.getString(\"fecha\"));\n p.setKmInicial(rs.getBigDecimal(\"kmInicial\"));\n p.setKmFinal(rs.getBigDecimal(\"kmFinal\"));\n p.setGastoPeaje(rs.getBigDecimal(\"gastosPeaje\")); \n p.setGastoDietas(rs.getBigDecimal(\"gastosDietas\"));\n p.setGastoCombustible(rs.getBigDecimal(\"gastosCombustible\"));\n p.setGastoVarios(rs.getBigDecimal(\"otrosGastos\"));\n p.setIncidencias(rs.getString(\"incidencias\"));\n p.setEstado(rs.getString(\"estado\"));\n p.setValidado(rs.getString(\"validado\"));\n p.setHorasExtras(rs.getBigDecimal(\"horasExtras\"));\n p.setIdTrabajador(rs.getBigDecimal(\"TRABAJADORES_ID\"));\n p.setNotasAdministrativas(rs.getString(\"notasAdministrativas\"));\n partes.add(p);\n }\n \n rs.close();\n cs.close();\n Conexion.desconectar();\n return partes;\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"No se puede efectuar la conexión, hable con el administrador del sistema\" + ex.getMessage());\n }\n return null;\n }", "@Override\n\tpublic List<Componentes> Listar() throws Exception {\n\t\treturn null;\n\t}", "List<Persona> obtenerTodasLasPersona();", "List<T> findAll(ListParams params);", "public String buscarTrabajadoresPorParametros() {\r\n try {\r\n inicializarFiltros();\r\n listaTrabajadores = null;\r\n //listaTrabajadores = administrarGestionarTrabajadoresBO.consultarTrabajadoresPorParametro(filtros);\r\n return null;\r\n } catch (Exception e) {\r\n System.out.println(\"Error ControllerAdministrarTrabajadores buscarTrabajadoresPorParametros : \" + e.toString());\r\n return null;\r\n }\r\n }", "public ListParameter()\r\n\t{\r\n\t}", "List<BeanPedido> getPedidos(String idUsuario);", "public FinPagamentosListagemBean()\n {\n }", "public static Object getLista(Object obj) {\n\t\tConexionDB db=new TipoComisionDB();\r\n\t\treturn db.getAll(obj);\r\n\t}", "public List<Perfil> perfilListar() {\r\n\r\n try {\r\n ControladorPerfil ctrlperfil = new ControladorPerfil();\r\n return ctrlperfil.getListaPerfil();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n return new ArrayList<>();\r\n }\r\n }", "List<Especialidad> getEspecialidades();", "public RecyclerViewProductos( List<Producto> lista) {\n this.productoList=lista;\n }", "List<Room> selectRoomList(@Param(\"building\") String building);", "private void listar(HttpServletRequest request, HttpServletResponse response) throws SQLException {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\t//pasamos un atributo en la redireccion con la lista que devuelve el metodo listarHabitaciones() del modelo\n\t\t\trequest.setAttribute(\"listaClientes\", modelo.listarClientes());//tipo (atributo,valor)\n\t\t\t\t\n\t\t\t//hacemos la redireccion a la vista en el servidor, NO en el cliente. Para no perder la lista que se pasa como atributo\n\t\t\trequest.getRequestDispatcher(\"/clientes/listaClientes.jsp\").forward(request, response);\n\t\t\t\t\n\t\t} catch (ServletException | IOException e) {\n\t\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\t\n\t\t}\n\t}", "@Override\n\tpublic List<Produto> listar(Produto entidade) {\n\t\treturn null;\n\t}", "public void populateListaObjetos() {\n listaObjetos.clear();\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n String tipo = null;\n if (selectedTipo.equals(\"submenu\")) {\n tipo = \"menu\";\n } else if (selectedTipo.equals(\"accion\")) {\n tipo = \"submenu\";\n }\n\n Criteria cObjetos = session.createCriteria(Tblobjeto.class);\n cObjetos.add(Restrictions.eq(\"tipoObjeto\", tipo));\n Iterator iteObjetos = cObjetos.list().iterator();\n while (iteObjetos.hasNext()) {\n Tblobjeto o = (Tblobjeto) iteObjetos.next();\n listaObjetos.add(new SelectItem(new Short(o.getIdObjeto()).toString(), o.getNombreObjeto(), \"\"));\n }\n } catch (HibernateException e) {\n //logger.throwing(getClass().getName(), \"populateListaObjetos\", e);\n } finally {\n session.close();\n }\n }", "@Override\n\tpublic List<BeanDistrito> listar() {\n\t\tList<BeanDistrito> lista = new ArrayList<BeanDistrito>();\n\t\tBeanDistrito distrito = null;\n\t\tConnection con = MySQLDaoFactory.obtenerConexion();\n\t\ttry {\n\t\t\n\t\t\tString sql=\"SELECT * FROM t_distrito ORDER BY codDistrito\";\n\t\t\tStatement stmt = con.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(sql);\n\t\t\t\n\t\t\twhile(rs.next()){\n\t\t\t\tdistrito = new BeanDistrito();\n\t\t\t\tdistrito.setCodDistrito(rs.getInt(1));\n\t\t\t\tdistrito.setNombre(rs.getString(2));\n\t\t\t\t\n\t\t\t\tlista.add(distrito);\n\t\t\t}\n\t\t\tcon.close();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\ttry {\n\t\t\t\tcon.close();\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn lista;\n\t}", "public void listar() {\n\t\t\n\t}", "public abstract List<Usuario> seleccionarTodos();", "@Override\n\tpublic List<Reparto> list() throws Exception {\n\t\treturn entityManager.createQuery(\"from Reparto\", Reparto.class).getResultList();\n\t}", "private void listViewPendentes(List<Compra> listAll) {\n\t\t\n\t}", "private void pickListCarreras(Proyecto proyecto) {\r\n sessionProyecto.getCarrerasProyecto().clear();\r\n sessionProyecto.getFilterCarrerasProyecto().clear();\r\n List<Carrera> carrerasProyecto = new ArrayList<>();\r\n List<Carrera> usuarioCarreras = new ArrayList<>();\r\n try {\r\n List<ProyectoCarreraOferta> lips = proyectoCarreraOfertaService.buscar(new ProyectoCarreraOferta(proyecto, null, null, Boolean.TRUE));\r\n if (lips != null) {\r\n for (ProyectoCarreraOferta pco : lips) {\r\n Carrera c = carreraService.find(pco.getCarreraId());\r\n if (!carrerasProyecto.contains(c)) {\r\n carrerasProyecto.add(c);\r\n }\r\n }\r\n }\r\n for (Carrera carrera : sessionProyecto.getCarreras()) {\r\n if (!usuarioCarreras.contains(carrera)) {\r\n usuarioCarreras.add(carrera);\r\n }\r\n }\r\n sessionProyecto.setCarrerasDualList(new DualListModel<>(carreraService.diferenciaProyectoCarrera(\r\n usuarioCarreras, carrerasProyecto), carrerasProyecto));\r\n sessionProyecto.setCarrerasProyecto(carrerasProyecto);\r\n sessionProyecto.setFilterCarrerasProyecto(sessionProyecto.getCarrerasProyecto());\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n }", "public List<ParameterObject> getParameterList() {\n return parameterList;\n }", "public List<RolModel> listarRolUsuario();", "Object getTolist();", "public List<Parameter> getParameter( )\n {\n return _parameter;\n }", "private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }", "public List<IParam> getParams();", "public List<IParam> getParams();", "protected String list(HttpServletRequest request, pedidoModel pdmodel)\r\n\t\t\tthrows Exception {\n\t\tString error = null;\r\n\r\n\t\tList<Pedido> list =pdmodel.Listarpedido();\r\n\t\tif (list != null) {\r\n\t\t\trequest.setAttribute(\"lispedidos\", list);\r\n\t\t} else {\r\n\t\t\terror = \"Sin acceso a Base de datos\";\r\n\t\t}\r\n\r\n\t\treturn error;\r\n\t}", "@Override\n\tpublic List<Portlet> getListForSync(Map<String, Object> param) {\n\t\treturn portletDao.getListForSync(param);\n\t}", "@Override\n\tprotected void doListado() throws Exception {\n\t\tList<Department> deptos = new DepartmentDAO().getAllWithManager();\n//\t\tList<Department> deptos = new DepartmentDAO().getAll();\n\t\tthis.addColumn(\"Codigo\").addColumn(\"Nombre\").addColumn(\"Manager\").newLine();\n\t\t\n\t\tfor(Department d: deptos){\n\t\t\taddColumn(d.getNumber());\n\t\t\taddColumn(d.getName());\n\t\t\taddColumn(d.getManager().getFullName());\n\t\t\tnewLine();\n\t\t}\n\t}", "public ArrayList<Object> procesar(String comando) {\n\n String[] parametros;\n\n int tam;\n\n if (!comando.contains(\",\")) {\n throw new IllegalArgumentException(\"Cadena \" + comando\n + \" no contiene caracter ,\");\n }\n\n //Se hace el split de la cadena\n parametros = comando.split(\",\");\n\n //Valida la cantidad de parametros\n if (parametros.length > 2) {\n throw new IllegalArgumentException(\"Cadena \" + comando\n + \" contiene mas caracter ,\");\n }\n\n //Valida la cantidad de parametros\n if (parametros.length < 2) {\n throw new IllegalArgumentException(\"Cadena \" + comando\n + \" no contiene los parametros requeridos\");\n }\n\n //Valida que el parametro size sea un numerico\n if (isNumeric(parametros[0])) {\n tam = Integer.parseInt(parametros[0]);\n\n // se valida que el size este entre 1 y 10\n if (tam < 1 || tam > 10) {\n throw new IllegalArgumentException(\"El parametro size [\" + tam\n + \"] debe estar entre 1 y 10\");\n }\n } else {\n throw new IllegalArgumentException(\"Parametro Size [\" + parametros[0]\n + \"] no es un numero\");\n }\n \n ArrayList<Object> retorno = new ArrayList<Object>();\n \n retorno.add(tam);\n retorno.add(parametros[1]);\n \n return retorno;\n\n }", "private void cargaLista() {\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Aclaracion\", \"Aclaracion\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revision\", \"Revision\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revocatoria\", \"Revocatoria\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Subsidiaria\", \"Subsidiaria\"));\n \n }", "@Override\r\n\tpublic List<ComunidadBean> getComunidadList() {\n\t\tList<ComunidadBean> result=new ArrayList<ComunidadBean>();\r\n\t\t\r\n\t\tList<JugComunidad> list= comunidadRepository.getComunidadList();\r\n\t\tfor (JugComunidad entiry : list) \r\n \t\tresult.add(new ComunidadBean(entiry.getId(), entiry.getCodigo(), entiry.getDescripcion()));\t\r\n\t\t\r\n\t\treturn result;\r\n\t}", "public abstract ArrayList<DtPropuesta> listarPropuestasPorCategoria(String nombreCat);", "public ArrayList<LoteriaDto> listarLoteriaXNombre(String nombre) {\n\n ArrayList<LoteriaDto> lista = new ArrayList();\n Connection con =null;\n try {\n con=Recurso.Conexion.getPool().getDataSource().getConnection();\n String sql = \"SELECT codigo,nombre,dia,hora,minuto,ruta FROM loteria where nombre='\" + nombre + \"'\";\n PreparedStatement str;\n str = con.prepareStatement(sql);\n ResultSet rs = str.executeQuery();\n\n while (rs.next()) {\n LoteriaDto dto = new LoteriaDto();\n dto.setCodigo(rs.getInt(1));\n dto.setNombre(rs.getString(2));\n dto.setDia(rs.getInt(3));\n dto.setHora(rs.getInt(4));\n dto.setMinuto(rs.getInt(5));\n dto.setRuta(rs.getString(6));\n lista.add(dto);\n\n }\n str.close();\n rs.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }finally{\n if(con!=null){\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorLoteria.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return lista;\n }\n\n }", "public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }", "@Override\r\n\tpublic List<BoardVO> list() throws Exception {\n\t\tlog.info(\"list() - 게시판 리스트 데이터 가져오기 +++++++++++++++\");\r\n\t\treturn null;\r\n\t}", "public void llenadoDeCombos() {\n PerfilDAO asignaciondao = new PerfilDAO();\n List<Perfil> asignacion = asignaciondao.listar();\n cbox_perfiles.addItem(\"\");\n for (int i = 0; i < asignacion.size(); i++) {\n cbox_perfiles.addItem(Integer.toString(asignacion.get(i).getPk_id_perfil()));\n }\n \n }", "@SuppressWarnings(\"unchecked\")\r\n\t\r\n\tpublic List<ParadaUtil> listar(String nomeCampo, boolean valorCampo) {\n\t\tiniciarTransacao();\r\n\t\tCriteria c = s.createCriteria(ParadaUtil.class);\r\n\t\tc.add(Restrictions.eq(nomeCampo, valorCampo));\r\n\t\treturn c.list();\r\n\t}", "java.util.List<com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameter> \n getParamsList();", "List<TipoHuella> listarTipoHuellas();", "List<CarritoProductoResponseDTO> consultarCarritoCompras(String userName,TipoMoneda tipoMoneda);", "public List<Joueur> List_Joueur_HommesForComboBox() \r\n {\r\n List<Joueur> j = new ArrayList<>();\r\n String req= \"SELECT * FROM personne WHERE datedestruction is NULL and role = 'Joueur' and sexe='Homme' \";\r\n try {\r\n ResultSet res = ste.executeQuery(req);\r\n while (res.next()) {\r\n \r\n Joueur Jou = new Joueur(\r\n res.getInt(\"idpersonne\"),\r\n \r\n res.getString(\"nom\"),\r\n res.getString(\"prenom\")\r\n );\r\n j.add(Jou);\r\n \r\n System.out.println(\"------- joueurs selectionné avec succés----\");\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n System.out.println(\"----------Erreur lors methode : List_Joueur_Hommes()------\");\r\n }\r\n return j;\r\n \r\n}", "List<CatalogoAprobadorDTO> buscarAprobador(int cveADM, String numEmpleado, Integer claveNivel, Integer centroCostoOP) throws SIATException;", "@Override\n public Retorno_MsgObj obtenerLista() {\n PerManejador perManager = new PerManejador();\n\n return perManager.obtenerLista(\"Inscripcion.findAll\", null);\n }", "@Override\r\n\tpublic List<Object> consultarVehiculos() {\r\n\t\t\r\n\t\tFormat formato = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t\r\n\t\treturn AdminEstacionamientoImpl.getParqueadero().stream().map(\r\n\t\t\t\t temp -> {HashMap<String, String> lista = new HashMap<String, String>(); \r\n\t\t\t\t lista.put( \"placa\", temp.getVehiculo().getPlaca() );\r\n\t\t\t\t lista.put( \"tipo\", temp.getVehiculo().getTipo() );\r\n\t\t\t\t lista.put( \"fechaInicio\", formato.format( temp.getFechaInicio() ) );\r\n\r\n\t\t\t\t return lista;\r\n\t\t\t\t }\r\n\t\t\t\t).collect(Collectors.toList());\r\n\t}", "public List<UsuarioDTO> consultarUsuarios();", "public List<UsuarioDTO> consultarUsuarios();", "public ArrayList<ProductoDTO> mostrartodos() {\r\n\r\n\r\n PreparedStatement ps;\r\n ResultSet res;\r\n ArrayList<ProductoDTO> arr = new ArrayList();\r\n try {\r\n\r\n ps = conn.getConn().prepareStatement(SQL_READALL);\r\n res = ps.executeQuery();\r\n while (res.next()) {\r\n\r\n arr.add(new ProductoDTO(res.getInt(1), res.getString(2), res.getString(3), res.getInt(4), res.getInt(5), res.getString(6), res.getString(7), res.getString(8), res.getString(9)));\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"error vuelva a intentar\");\r\n } finally {\r\n conn.cerrarconexion();\r\n\r\n }\r\n return arr;\r\n\r\n }", "@Override\r\n\tpublic List<EquipoCompetencia> listar() {\n\t\treturn null;\r\n\t}", "List<Pacote> buscarPorTransporte(Transporte transporte);", "public List<Livro> getLista(String exemplar) throws SQLException {\n // Prepara conexão p/ receber o comando SQL\n String sql = \"SELECT * FROM livro WHERE exemplar like ?\";\n PreparedStatement stmt = this.conexao.prepareStatement(sql);\n stmt.setString(1, exemplar);\n\n // Recebe o resultado da consulta SQL\n ResultSet rs = stmt.executeQuery();\n\n List<Livro> lista = new ArrayList<>();\n\n // Enquanto existir registros, pega os valores do ReultSet e vai adicionando na lista\n while (rs.next()) {\n // A cada loop, é instanciado um novo objeto, p/ servir de ponte no envio de registros p/ a lista\n Livro l = new Livro();\n\n // \"c\" -> Registro novo - .setNome recebe o campo do banco de String \"nome\" \n l.setId(Integer.valueOf(rs.getString(\"id_livro\")));\n l.setId_genero(Integer.valueOf(rs.getString(\"id_genero\")));\n l.setExemplar(rs.getString(\"exemplar\"));\n l.setAutor(rs.getString(\"autor\"));\n l.setEdicao(Byte.valueOf(rs.getString(\"edicao\")));\n l.setAno(Short.valueOf(rs.getString(\"ano\")));\n l.setDisponibilidade(rs.getString(\"disponibilidade\"));\n\n // Adiciona o registro na lista\n lista.add(l);\n }\n\n // Fecha a conexão com o BD\n rs.close();\n stmt.close();\n\n // Retorna a lista de registros, gerados pela consulta\n return lista;\n }", "public List<Parameter> getParamters() {\r\n return this.lstParameters;\r\n }", "public java.util.List<com.isat.catalist.oms.order.OOSOrderLineItemParamType> getParametersList()\n {\n final class ParametersList extends java.util.AbstractList<com.isat.catalist.oms.order.OOSOrderLineItemParamType>\n {\n public com.isat.catalist.oms.order.OOSOrderLineItemParamType get(int i)\n { return OOSOrderLineItemTypeImpl.this.getParametersArray(i); }\n \n public com.isat.catalist.oms.order.OOSOrderLineItemParamType set(int i, com.isat.catalist.oms.order.OOSOrderLineItemParamType o)\n {\n com.isat.catalist.oms.order.OOSOrderLineItemParamType old = OOSOrderLineItemTypeImpl.this.getParametersArray(i);\n OOSOrderLineItemTypeImpl.this.setParametersArray(i, o);\n return old;\n }\n \n public void add(int i, com.isat.catalist.oms.order.OOSOrderLineItemParamType o)\n { OOSOrderLineItemTypeImpl.this.insertNewParameters(i).set(o); }\n \n public com.isat.catalist.oms.order.OOSOrderLineItemParamType remove(int i)\n {\n com.isat.catalist.oms.order.OOSOrderLineItemParamType old = OOSOrderLineItemTypeImpl.this.getParametersArray(i);\n OOSOrderLineItemTypeImpl.this.removeParameters(i);\n return old;\n }\n \n public int size()\n { return OOSOrderLineItemTypeImpl.this.sizeOfParametersArray(); }\n \n }\n \n synchronized (monitor())\n {\n check_orphaned();\n return new ParametersList();\n }\n }", "ParameterList getParameters();", "public static void llenarListaProcesados() {\n List<String> lista = Datos.getInstance().getDocumentos();\n if (lista == null) {\n return;\n }\n modelProcesados.clear();\n for (String s : lista) {\n modelProcesados.addElement(s);\n }\n\n }", "private void getinterrogantes(){\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql = \"SELECT i FROM Interrogante i \"\n + \"WHERE i.estado='a' \";\n\n Query query = em.createQuery(jpql);\n List<Interrogante> listInterrogantes = query.getResultList();\n\n ArrayList<ListQuestion> arrayListQuestions = new ArrayList<>();\n for (Interrogante i : listInterrogantes){\n ListQuestion lq = new ListQuestion();\n lq.setIdinterrogante(i.getIdinterrogante());\n lq.setQuestion(i.getDescripcion());\n lq.setListParametros(getParametros(i.getIdinterrogante()));\n arrayListQuestions.add(lq);\n }\n\n this.ListQuestions = arrayListQuestions;\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n } \n \n }", "public void GetVehiculos() {\n String A = \"&LOCATION=POR_ENTREGAR\";\n String Pahtxml = \"\";\n \n try {\n \n DefaultListModel L1 = new DefaultListModel();\n Pahtxml = Aso.SendGetPlacas(A);\n Lsvehiculo = Aso.Leerxmlpapa(Pahtxml);\n Lsvehiculo.forEach((veh) -> {\n System.out.println(\"Placa : \" + veh.Placa);\n L1.addElement(veh.Placa);\n });\n \n Lista.setModel(L1);\n \n } catch (Exception ex) {\n Logger.getLogger(Entrega.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public List getBeneficioDeudaList(Map criteria);", "public List<Tripulante> buscarTodosTripulantes();", "public List<Pagamento> buscarPorBusca(String busca)throws DaoException;", "public List<PmPropertyBean> getPropertiesByModel(Map paramter);", "@Override\n public Retorno_MsgObj obtenerLista() {\n PerManejador perManager = new PerManejador();\n\n return perManager.obtenerLista(\"Curso.findAll\", null);\n }", "public ArrayList< UsuarioVO> listaDePersonas() {\r\n\t ArrayList< UsuarioVO> miUsuario = new ArrayList< UsuarioVO>();\r\n\t Conexion conex= new Conexion();\r\n\t \r\n\t try {\r\n\t PreparedStatement consulta = conex.getConnection().prepareStatement(\"SELECT * FROM usuarios\");\r\n\t ResultSet res = consulta.executeQuery();\r\n\t while(res.next()){\r\n\t\t UsuarioVO persona= new UsuarioVO();\r\n\t persona.setCedula_usuario(Integer.parseInt(res.getString(\"cedula_usuario\")));\r\n\t persona.setEmail_usuario(res.getString(\"email_usuario\"));\r\n\t persona.setNombre_usuario(res.getString(\"nombre_usuario\"));\r\n\t persona.setPassword(res.getString(\"password\"));\r\n\t persona.setUsuario(res.getString(\"usuario\"));\r\n\t \r\n\t \r\n\t miUsuario.add(persona);\r\n\t }\r\n\t res.close();\r\n\t consulta.close();\r\n\t conex.desconectar();\r\n\t \r\n\t } catch (Exception e) {\r\n\t JOptionPane.showMessageDialog(null, \"no se pudo consultar la Persona\\n\"+e);\r\n\t }\r\n\t return miUsuario;\r\n\t }", "public List listarCategoriasForm() throws Exception {\n PreparedStatement ps = null;\n Connection conn = null;\n ResultSet rs = null;\n\n try {\n conn = this.conn;\n ps = conn.prepareStatement(\"select idRemedio, categoria from Remedios group by categoria order by categoria ASC \");\n rs = ps.executeQuery();\n List<Produto> list = new ArrayList<Produto>();\n while (rs.next()) {\n int idRemedio = rs.getInt(1);\n String categoria = rs.getString(2);\n list.add(new Produto(idRemedio, null, null, null,null, null, null, null, null, null, null, null, null, null, categoria, null));\n\n }\n return list;\n\n } catch (SQLException sqle) {\n throw new Exception(sqle);\n } finally {\n Conexao.closeConnection(conn, ps, rs);\n }\n }", "@RequestMapping(value = \"/GET_MUNICIPIO\", method = RequestMethod.POST)\n\tpublic @ResponseBody ArrayList GET_MUNICIPIO(@RequestParam String OID_ESTADO) {\n\t\t\n\t\treturn dependencia.GET_MUNICIPIO(OID_ESTADO);\n\t}", "public void setLstDetalle(ArrayList<ConciliacionDetalleVO> lst)\r\n\t{\r\n\t\t\r\n\t\tthis.lstDetalle = lst;\r\n\t\t\r\n\t\t/*Seteamos la grilla con los formularios*/\r\n\t\tthis.container = \r\n\t\t\t\tnew BeanItemContainer<ConciliacionDetalleVO>(ConciliacionDetalleVO.class);\r\n\t\t\r\n\t\t\r\n\t\tif(this.lstDetalle != null)\r\n\t\t{\r\n\t\t\tfor (ConciliacionDetalleVO det : this.lstDetalle) {\r\n\t\t\t\tcontainer.addBean(det); /*Lo agregamos a la grilla*/\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//lstFormularios.setContainerDataSource(container);\r\n\t\tthis.actualizarGrillaContainer(container);\r\n\t\t\r\n\t}", "public IFrmListar() {\n initComponents();\n \n }", "public List listar() {\n ArrayList<Empleado> lista = new ArrayList<>();\r\n String sql = \"SELECT * FROM empleado\";\r\n \r\n try {\r\n con = cn.getConexion();\r\n ps = con.prepareStatement(sql); \r\n rs = ps.executeQuery();\r\n \r\n while (rs.next()) {\r\n Empleado emp = new Empleado(); \r\n emp.setId(rs.getInt(\"Id\")); //campos de la tabla\r\n emp.setNombre(rs.getString(\"Nombre\"));\r\n emp.setSalario(rs.getDouble(\"Salario\")); \r\n lista.add(emp); \r\n } \r\n } catch(Exception e) {\r\n System.out.println(e.getMessage());\r\n }\r\n \r\n return lista;\r\n }", "public void definirObjetos(ObservableList<ListaCompras> lista){\n this.data=lista;\n }", "public void setListaCuentaContableBean(ListaCuentaContableBean listaCuentaContableBean)\r\n/* 324: */ {\r\n/* 325:387 */ this.listaCuentaContableBean = listaCuentaContableBean;\r\n/* 326: */ }" ]
[ "0.8181996", "0.69124067", "0.67638576", "0.66043735", "0.65831953", "0.642461", "0.63245326", "0.63181776", "0.63100874", "0.62852615", "0.6241519", "0.6226177", "0.6215519", "0.62044716", "0.6198932", "0.6186328", "0.6181916", "0.6181096", "0.6152434", "0.612359", "0.6111392", "0.6105499", "0.60789776", "0.60733825", "0.60641557", "0.6057047", "0.6051653", "0.60436505", "0.6039654", "0.6035805", "0.6002416", "0.59987867", "0.5987772", "0.59469455", "0.5925771", "0.5920059", "0.5912543", "0.58968824", "0.58919823", "0.5890834", "0.5886364", "0.587891", "0.5865791", "0.5865791", "0.5861429", "0.5859404", "0.58578026", "0.58563495", "0.58514506", "0.5845724", "0.58450496", "0.584129", "0.5831817", "0.5831682", "0.58302104", "0.58302104", "0.5829999", "0.58299494", "0.5821013", "0.5819611", "0.5817802", "0.5817536", "0.5815394", "0.58101285", "0.5808198", "0.5807834", "0.5804393", "0.5798908", "0.57961214", "0.5796092", "0.5785428", "0.5783782", "0.5783366", "0.57806903", "0.5773984", "0.5768027", "0.5768027", "0.5766749", "0.5763355", "0.5761731", "0.5758638", "0.5757935", "0.5755594", "0.5753953", "0.57536954", "0.57484746", "0.573545", "0.5734511", "0.5734285", "0.57326144", "0.5731369", "0.5728353", "0.5714563", "0.57037586", "0.57035184", "0.570175", "0.570014", "0.56999314", "0.56998897", "0.5694201" ]
0.7771313
1
TODO Autogenerated method stub
@Override public void create(Board board) throws Exception { dao.insert(board); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
The class holding records for this type
@Override public Class<ReportVersionDataRecord> getRecordType() { return ReportVersionDataRecord.class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RecordRecord() {\n\t\tsuper(org.jooq.examples.cubrid.demodb.tables.Record.RECORD);\n\t}", "public Class<?> getRecordClass() \n\t{\n\t return recordClass ;\n\t}", "public DataRecord() {\n super(DataTable.DATA);\n }", "@Override\n public Class<Record> getRecordType() {\n return Record.class;\n }", "@Override\n public Class<Record> getRecordType() {\n return Record.class;\n }", "@Override\n public Class<Record> getRecordType() {\n return Record.class;\n }", "@Override\n public Class<Record> getRecordType() {\n return Record.class;\n }", "public Record() {\n data = new int[DatabaseManager.fieldNames.length];\n }", "@Override\n public Class<PgClassRecord> getRecordType() {\n return PgClassRecord.class;\n }", "@Override\n public Class<ModelRecord> getRecordType() {\n return ModelRecord.class;\n }", "@Override\n\tpublic java.lang.Class<org.jooq.Record> getRecordType() {\n\t\treturn __RECORD_TYPE;\n\t}", "@Override\n\tpublic java.lang.Class<org.jooq.Record> getRecordType() {\n\t\treturn __RECORD_TYPE;\n\t}", "@Override\n\tpublic java.lang.Class<org.jooq.Record> getRecordType() {\n\t\treturn __RECORD_TYPE;\n\t}", "public ARecord() {\n super(A.A);\n }", "@Override\n\tpublic java.lang.Class<org.jooq.Record> getRecordType() {\n\t\treturn org.jooq.Record.class;\n\t}", "@Override\n\tpublic java.lang.Class<org.jooq.Record> getRecordType() {\n\t\treturn org.jooq.Record.class;\n\t}", "@Override\n\tpublic java.lang.Class<org.jooq.Record> getRecordType() {\n\t\treturn org.jooq.Record.class;\n\t}", "public ObjectRecord() {\n\t\tsuper(org.jooq.test.hsqldb.generatedclasses.tables.Object.OBJECT);\n\t}", "public WERecordDataModel()\n\t{\n\t\tsuper();\n\t\tsetEqFileName(RECORD_NAME);\n\t\tinitMessages();\n\t}", "public Record toRecord() {\n return new Record().setColumns(this);\n }", "DataHRecordData() {}", "@Override\n public Class<ResourcesRecord> getRecordType() {\n return ResourcesRecord.class;\n }", "public GO_RecordType() {\n }", "@Override\n public Class<QsRecord> getRecordType() {\n return QsRecord.class;\n }", "public ItemRecord() {\n super(Item.ITEM);\n }", "public Record getRecord() {\n return record;\n }", "public Record getRecord() {\n return record;\n }", "@Override\n\tpublic Class<Record> getRecordType() {\n\t\treturn Record.class;\n\t}", "@Override\n\tpublic Class<Record> getRecordType() {\n\t\treturn Record.class;\n\t}", "@Override\n public Class<LinearmodelRecord> getRecordType() {\n return LinearmodelRecord.class;\n }", "@JsonProperty(\"Records\") abstract List<?> getRecords();", "public Item_Record() {\n super(Item_.ITEM_);\n }", "@Override\n public Class<MytableRecord> getRecordType() {\n return MytableRecord.class;\n }", "@Override\n protected Class<RecordType> getBoundType() {\n return RecordType.class;\n }", "@Override\n public Class<PatientRecord> getRecordType() {\n return PatientRecord.class;\n }", "public interface CollectionRecord {\n\n\t/**\n\t * Gets the id attribute of the CollectionRecord object\n\t *\n\t * @return The id value\n\t */\n\tpublic String getId();\n\n\n\t/**\n\t * Gets the setSpec attribute of the CollectionRecord object\n\t *\n\t * @return The setSpec value\n\t */\n\tpublic String getSetSpec();\n\n\n\t/**\n\t * Gets the metadataHandle attribute of the CollectionRecord object\n\t *\n\t * @param collectionSetSpec setSpec (e.g., \"dcc\")\n\t * @return The metadataHandle value\n\t * @exception Exception if there is a webservice error\n\t */\n\tpublic String getMetadataHandle(String collectionSetSpec) throws Exception;\n\n\n\t/**\n\t * Gets the handleServiceBaseUrl attribute of the CollectionRecord object\n\t *\n\t * @return The handleServiceBaseUrl value\n\t */\n\tpublic String getHandleServiceBaseUrl();\n\n\t/* \tpublic String getNativeFormat();\n\tpublic DcsDataRecord getDcsDataRecord();\n\tpublic MetaDataFramework getMetaDataFramework();\n\tpublic Document getLocalizedDocument(); */\n}", "@Override\n\tpublic Class<QuotesRecord> getRecordType() {\n\t\treturn QuotesRecord.class;\n\t}", "@Override\n public Class<AnalysisRecord> getRecordType() {\n return AnalysisRecord.class;\n }", "public Record() {\n this.symptoms = new LinkedHashSet<>();\n this.diagnoses = new LinkedHashSet<>();\n this.prescriptions = new LinkedHashSet<>();\n }", "public OpenERPRecordSet() {\r\n\t\trecords = new Vector<OpenERPRecord>();\r\n\t}", "@Override\n public Class<QuestionForBuddysRecord> getRecordType() {\n return QuestionForBuddysRecord.class;\n }", "public QuestionsRecord() {\n\t\tsuper(sooth.entities.tables.Questions.QUESTIONS);\n\t}", "public Data() {\n this.customers = new HashMap<>();\n this.orders = new HashMap<>();\n this.siteVisits = new HashMap<>();\n this.imageUploads = new HashMap<>();\n }", "public GenericData.Record serialize() {\n return null;\n }", "public GenericTcalRecord() {\n this(-1);\n }", "public StudentRecord() {\n\t\tscores = new ArrayList<>();\n\t\taverages = new double[5];\n\t}", "@Override\n public Class<CarmodelRecord> getRecordType() {\n return CarmodelRecord.class;\n }", "@Override\n public Class<MemberRecord> getRecordType() {\n return MemberRecord.class;\n }", "public BookRecord() {\n super(Book.BOOK);\n }", "@Override\n public Class<SearchLogsRecord> getRecordType() {\n return SearchLogsRecord.class;\n }", "@Override\n public Class<EasytaxTaxationsRecord> getRecordType() {\n return EasytaxTaxationsRecord.class;\n }", "public SalesRecords() {\n super();\n }", "public SongRecord(){\n\t}", "@Override\n public Class<LangsRecord> getRecordType() {\n return LangsRecord.class;\n }", "public PersonRecord(){\n\t\tlistNames = new ArrayList<String>();\n\t}", "@Override\n public Class<RoomRecord> getRecordType() {\n return RoomRecord.class;\n }", "@Override\n public Class<CalcIndicatorAccRecordInstanceRecord> getRecordType() {\n return CalcIndicatorAccRecordInstanceRecord.class;\n }", "public ArrayList<Record> getRecords() {\r\n\t\treturn records;\r\n\t}", "@Override\n public Class<CourseRecord> getRecordType() {\n return CourseRecord.class;\n }", "@Override\n public Class<CabTripDataRecord> getRecordType() {\n return CabTripDataRecord.class;\n }", "@Override\n public Class<TripsRecord> getRecordType() {\n return TripsRecord.class;\n }", "public Item_Record(Integer _Id_, String name_, String description_, String code_, Double price_, Double retailPrice_, Double costPrice_, Object _Search_, String[] _Types_, String _LastModified_, Integer _Version_) {\n super(Item_.ITEM_);\n\n set(0, _Id_);\n set(1, name_);\n set(2, description_);\n set(3, code_);\n set(4, price_);\n set(5, retailPrice_);\n set(6, costPrice_);\n set(7, _Search_);\n set(8, _Types_);\n set(9, _LastModified_);\n set(10, _Version_);\n }", "@Override\r\n\tpublic List<T> getRecords() {\n\t\treturn null;\r\n\t}", "@Override\n public Class<StudentCourseRecord> getRecordType() {\n return StudentCourseRecord.class;\n }", "@Override\n public Class<ZTest1Record> getRecordType() {\n return ZTest1Record.class;\n }", "public OfcRecordRecord() {\n\t\tsuper(org.openforis.collect.persistence.jooq.tables.OfcRecord.OFC_RECORD);\n\t}", "public Class<gDBR> getRecordClass() \n {\n return this.rcdClass;\n }", "public RecordingRepository() {\r\n recordings = new ArrayList<>();\r\n recordingMap = new HashMap<>();\r\n recordingsByMeetingIDMap = new HashMap<>();\r\n update();\r\n }", "@Override\n public Class<GchCarLifeBbsRecord> getRecordType() {\n return GchCarLifeBbsRecord.class;\n }", "@Override\n\tpublic java.lang.Class<nesi.jobs.tables.records.HourlyRecordRecord> getRecordType() {\n\t\treturn nesi.jobs.tables.records.HourlyRecordRecord.class;\n\t}", "@Override\n public Class<AccountRecord> getRecordType() {\n return AccountRecord.class;\n }", "public ExperimentRecord() {\n super(Experiment.EXPERIMENT);\n }", "public MealRecord() {\n\t\tsuper(Meal.MEAL);\n\t}", "@Override\n public Class<StaffRecord> getRecordType() {\n return StaffRecord.class;\n }", "public LateComingRecord() {\n\t\t}", "@Override\n public Class<AssessmentStudenttrainingworkflowRecord> getRecordType() {\n return AssessmentStudenttrainingworkflowRecord.class;\n }", "public UsersRecord() {\n super(Users.USERS);\n }", "@Override\n public Class<MyMenuRecord> getRecordType() {\n return MyMenuRecord.class;\n }", "public DataPersistence() {\n storage = new HashMap<>();\n idCounter = 0;\n }", "public AnswerRecord() {\n super(Answer.ANSWER);\n }", "public DatasetReader()\n\t{\n\t\treviews = new ArrayList<Review>();\n\t\tratings = new HashMap<Double,List<Double>>();\n\t\tproducts = new HashMap<String, Map<String,Double>>();\n\t\tproductRatings = new HashMap<String, List<Double>>();\n\t\treInstanceList = new ArrayList<ReviewInstance>();\n\t\treInstanceMap = new HashMap<String, ReviewInstance>();\n\t}", "@Override\n public Class<JournalEntryLineRecord> getRecordType() {\n return JournalEntryLineRecord.class;\n }", "@Override\n public Class<CommentsRecord> getRecordType() {\n return CommentsRecord.class;\n }", "@Override\n public Class<SpeedAlertsHistoryRecord> getRecordType() {\n return SpeedAlertsHistoryRecord.class;\n }", "@Override\n public Class<RatingsRecord> getRecordType() {\n return RatingsRecord.class;\n }", "@Override\n public Class<TOpLogsRecord> getRecordType() {\n return TOpLogsRecord.class;\n }", "@Override\n\tpublic java.lang.Class<net.user1.union.zz.common.model.tables.records.ZzcronRecord> getRecordType() {\n\t\treturn __RECORD_TYPE;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic RelationClass() {\n\t\t\n\t\tParser pars = new Parser(FILE_NAME); \t\t\t\t\t\t\t\n\t\tint bucketlength = 0;\n\t\tbucketlength = (int) (pars.getNumOfLines()*BUCKET_MULTIPLIER);\n\t\tbuckets = (Node<k,v>[]) new Node<?,?>[bucketlength];\n\t\tpars.process(this);\t\t\t\t\t\t\t\t\t\t\t\t\n\t}", "@Override\n\tpublic java.lang.Class<persistencia.tables.records.AsientoRecord> getRecordType() {\n\t\treturn persistencia.tables.records.AsientoRecord.class;\n\t}", "@Override\n public Class<StatsRecord> getRecordType() {\n return StatsRecord.class;\n }", "@Override\n\tpublic Class<QuestionRecord> getRecordType() {\n\t\treturn QuestionRecord.class;\n\t}", "public MetricSchemaRecord() { }", "public PedidoRecord() {\n super(Pedido.PEDIDO);\n }", "@Override\n public Class<DynamicSchemaRecord> getRecordType() {\n return DynamicSchemaRecord.class;\n }", "public PersonRecord() {}", "@Override\n\tpublic Class<RentalRecord> getRecordType() {\n\t\treturn RentalRecord.class;\n\t}", "public PagesRecord() {\n super(Pages.PAGES);\n }", "@Override\n public Class<AbsenceRecord> getRecordType() {\n return AbsenceRecord.class;\n }", "@Override\n public Class<RedpacketConsumingRecordsRecord> getRecordType() {\n return RedpacketConsumingRecordsRecord.class;\n }", "@Override\n\tpublic java.lang.Class<jooq.model.tables.records.TBasicSalaryRecord> getRecordType() {\n\t\treturn jooq.model.tables.records.TBasicSalaryRecord.class;\n\t}", "public YearlyRecord() {\n this.wordToCount = new HashMap<String, Integer>();\n this.wordToRank = new HashMap<String, Integer>();\n this.countToWord = new HashMap<Integer, Set<String>>();\n }" ]
[ "0.68004626", "0.66954035", "0.64103794", "0.6398801", "0.6398801", "0.6398801", "0.6398801", "0.6393993", "0.6354873", "0.6192012", "0.61258304", "0.61258304", "0.61258304", "0.6104736", "0.60470754", "0.60470754", "0.60470754", "0.6040716", "0.6029211", "0.6020949", "0.6008978", "0.60082155", "0.6006576", "0.59716636", "0.59703285", "0.5949182", "0.5949182", "0.59396815", "0.59396815", "0.5936131", "0.5935658", "0.5895888", "0.5895527", "0.5893964", "0.5884042", "0.58751285", "0.58681023", "0.5865894", "0.5864961", "0.5855157", "0.5851545", "0.58495414", "0.58392423", "0.58338994", "0.58154637", "0.58069575", "0.57927567", "0.578939", "0.57841045", "0.5779981", "0.5753099", "0.5741735", "0.57333666", "0.57321835", "0.5731796", "0.57317585", "0.572287", "0.5720141", "0.5712233", "0.56939065", "0.56927073", "0.5685293", "0.56847894", "0.5683809", "0.56834316", "0.56828403", "0.56666017", "0.56607187", "0.56579894", "0.5648655", "0.56438047", "0.5620551", "0.561873", "0.5609984", "0.55931836", "0.55871445", "0.5586237", "0.55789423", "0.55779636", "0.55737203", "0.55702287", "0.55692416", "0.5561011", "0.5559403", "0.5543905", "0.5541634", "0.5536858", "0.5522634", "0.5517553", "0.5517258", "0.5512109", "0.5509594", "0.55070907", "0.5496529", "0.54921997", "0.5491354", "0.5486711", "0.5481696", "0.54758567", "0.5471066", "0.54659206" ]
0.0
-1
Create a report_version_data table reference
public ReportVersionData() { this("report_version_data", null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void createReport(Report report);", "public ReportVersionData(String alias) {\n this(alias, REPORT_VERSION_DATA);\n }", "Report createReport();", "@Override\n\tpublic String createTable() {\n\t\t\t\treturn \"CREATE TABLE history_table_view(id number(8) primary key not null ,sqltext text, pointid varchar2(1024), type varchar2(100))\";\n\t}", "void create(DataTableDef def) throws IOException;", "public ReportTable(TableView<Report> reportTable) {\n this.reportTable = reportTable;\n }", "private void createVersionTable(SQLiteDatabase db) {\n // SQL statement to create version table\n String CREATE_VERSION_TABLE = \"CREATE TABLE IF NOT EXISTS \" + VERSION_TABLE_NAME + \" (\" +\n NAME_ID + \" INTEGER PRIMARY KEY,\" +\n NAME_FULL_NAME + \" TEXT,\" +\n NAME_SLUG + \" TEXT,\" +\n NAME_ANDROID_VERSION + \" TEXT,\" +\n NAME_CHANGELOG + \" TEXT,\" +\n NAME_CREATED_AT + \" TEXT,\" +\n NAME_PUBLISHED_AT + \" TEXT,\" +\n NAME_DOWNLOADS + \" INTEGER,\" +\n NAME_VERSION_NUMBER + \" INTEGER,\" +\n NAME_FULL_ID + \" INTEGER,\" +\n NAME_DELTA_ID + \" INTEGER\" +\n \")\";\n // create version table\n db.execSQL(CREATE_VERSION_TABLE);\n }", "private String getRevisionTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table REVISION(\");\n \t\tbuilder.append(\"REVISION_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"REVISION_IDENTIFIER TEXT UNIQUE\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "DataTable createDataTable();", "public void createDataTable() {\r\n Log.d(TAG, \"creating table\");\r\n String queryStr = \"\";\r\n String[] colNames = {Constants.COLUMN_NAME_ACC_X, Constants.COLUMN_NAME_ACC_Y, Constants.COLUMN_NAME_ACC_Z};\r\n queryStr += \"create table if not exists \" + Constants.TABLE_NAME;\r\n queryStr += \" ( id INTEGER PRIMARY KEY AUTOINCREMENT, \";\r\n for (int i = 1; i <= 50; i++) {\r\n for (int j = 0; j < 3; j++)\r\n queryStr += colNames[j] + \"_\" + i + \" real, \";\r\n }\r\n queryStr += Constants.COLUMN_NAME_ACTIVITY + \" text );\";\r\n execute(queryStr);\r\n Log.d(TAG, \"created table\");\r\n try {\r\n ContentValues values = new ContentValues();\r\n values.put(\"id\", 0);\r\n insertRowInTable(Constants.TABLE_NAME, values);\r\n Log.d(TAG,\"created hist table\");\r\n }catch (Exception e){\r\n Log.d(TAG,Constants.TABLE_NAME + \" table already exists\");\r\n }\r\n }", "public void generateReport(ReportGenerationData data)throws ChangeApplicationException;", "public DataMigration(int version) {\n super(MigrationType.DATA, version);\n }", "public ReportVersionArtefact() {\n this(\"report_version_artefact\", null);\n }", "TABLE createTABLE();", "private void createDataTable() {\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoEditors.TABLE + \" (ID INT IDENTITY PRIMARY KEY, NAME VARCHAR(150) NOT NULL UNIQUE)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.TABLE + \" (ID INT IDENTITY PRIMARY KEY, TITLE VARCHAR(150) NOT NULL UNIQUE, YEAR INT, ISBN10 VARCHAR(20), ISBN13 VARCHAR(13), NOTE INT, PAGES_NUMBER INT, RESUME VARCHAR(2000), THE_EDITOR_FK INT, THE_KIND_FK INT, THE_LANGUAGE_FK INT, THE_LENDING_FK INT, THE_SAGA_FK INT, THE_TYPE_FK INT)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.BOOKS_AUTHOR_TABLE + \" (THE_BOOK_FK INT NOT NULL, THE_AUTHOR_FK INT NOT NULL)\");\n\n jdbcTemplate.update(\"CREATE INDEX BOOK_EDITOR_IDX ON \" + IDaoEditors.TABLE + \"(ID)\");\n jdbcTemplate.update(\"CREATE INDEX BOOKS_IDX ON \" + IDaoBooks.TABLE + \"(ID)\");\n }", "public static String AssetRef_CreateTable()\n\t{\n\t\tString str = \"create table assetref (\" \n\t\t\t\t+ \"id INTEGER PRIMARY KEY,\"\n\t\t\t\t+ \"uniqueId string,\"\n\t\t\t\t+ \"path string,\"\n\t\t\t\t+ \"name string,\"\n\t\t\t\t+ \"size int,\"\n\t\t\t\t+ \"lastChanged time\"\n\t\t\t\t+ \")\";\n\t\treturn str;\t\n\t}", "protected VersionData() {}", "public static void CreateReport() {\n\t\tString fileName = new SimpleDateFormat(\"'Rest_Country_Report_'YYYYMMddHHmm'.html'\").format(new Date());\n\t\tString path = \"Report/\" + fileName;\n\t\treport = new ExtentReports(path);\n\t}", "public TableVersion() {\n this(DSL.name(\"table_version\"), null);\n }", "private void createTableViewer(SashForm aSashForm) {\n\n\t\tList<AdapterFactoryImpl> factories = new ArrayList<AdapterFactoryImpl>();\n\t\tfactories.add(new ReportItemProviderAdapterFactory());\n\t\tfactories.add(new ResourceItemProviderAdapterFactory());\n\t\tfactories.add(new ReflectiveItemProviderAdapterFactory());\n\n\t\tComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(\n\t\t\t\tfactories);\n\n\t\tTable table = new Table(aSashForm, SWT.SINGLE | SWT.H_SCROLL\n\t\t\t\t| SWT.V_SCROLL | SWT.FULL_SELECTION);\n\t\tcreateTable(table);\n\n\t\t// Create the table viewer\n\t\tthis.viewer = new TableViewer(table);\n\n\t\t// Set the content provider\n\t\tthis.contentProvider = new ReportAdapterFactoryContentProvider(\n\t\t\t\tadapterFactory);\n\t\tthis.viewer.setContentProvider(this.contentProvider);\n\n\t\t// set the label provider\n\t\tthis.labelProvider = new ReportAdapterFactoryLabelProvider(adapterFactory);\n\t\tthis.viewer.setLabelProvider(this.labelProvider);\n\n\t\tthis.viewer.setUseHashlookup(true);\n\n\t\tGridData layoutData = new GridData();\n\t\tthis.viewer.getControl().setLayoutData(layoutData);\n\n\t\t// add a selection action listener\n\t\tthis.viewer.addSelectionChangedListener(new ISelectionChangedListener() {\n\t\t\tpublic void selectionChanged(SelectionChangedEvent aEvent) {\n\t\t\t\tif (aEvent.getSelection() instanceof IStructuredSelection) {\n\t\t\t\t\tIStructuredSelection lSelection = (IStructuredSelection) aEvent\n\t\t\t\t\t\t\t.getSelection();\n\n\t\t\t\t\tString lLog = null;\n\t\t\t\t\tEList lExceptions;\n\t\t\t\t\t// we are interrested in GenericReport, TefReport and\n\t\t\t\t\t// ReportInfo\n\t\t\t\t\tif (lSelection.getFirstElement() instanceof GenericReport) {\n\t\t\t\t\t\tGenericReport lReport = (GenericReport) lSelection\n\t\t\t\t\t\t\t\t.getFirstElement();\n\n\t\t\t\t\t\t// populate the browser area\n\t\t\t\t\t\tlLog = lReport.getLog();\n\t\t\t\t\t\tupdateBrowser(lLog);\n\n\t\t\t\t\t\t// populate the exceptions area\n\t\t\t\t\t\tlExceptions = lReport.getExecptionReport();\n\t\t\t\t\t\tupdateExceptions(lExceptions);\n\n\t\t\t\t\t} else if (lSelection.getFirstElement() instanceof TefReport) {\n\t\t\t\t\t\tTefReport lReport = (TefReport) lSelection\n\t\t\t\t\t\t\t\t.getFirstElement();\n\n\t\t\t\t\t\t// populate the browser area\n\t\t\t\t\t\tlLog = lReport.getLog();\n\t\t\t\t\t\tupdateBrowser(lLog);\n\n\t\t\t\t\t\t// populate the exceptions\n\t\t\t\t\t\tlExceptions = lReport.getExecptionReport();\n\t\t\t\t\t\tupdateExceptions(lExceptions);\n\n\t\t\t\t\t} else if (lSelection.getFirstElement() instanceof ReportInfo) {\n\t\t\t\t\t\tFile lRoot = getXMLLocationFromModel();\n\t\t\t\t\t\tif (lRoot != null) {\n\t\t\t\t\t\t\tString lPath = lRoot.getAbsolutePath().replaceAll(\n\t\t\t\t\t\t\t\t\t\"\\\\.xml\", \"\\\\.html\");\n\t\t\t\t\t\t\tFile lHtmlFile = new File(lPath);\n\t\t\t\t\t\t\tif (lHtmlFile.exists()) {\n\t\t\t\t\t\t\t\tiBrowser.setUrl(lPath);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tiBrowser.setText(iFileDoesNotExist\n\t\t\t\t\t\t\t\t\t\t+ lHtmlFile.toString()\n\t\t\t\t\t\t\t\t\t\t+ iFileDoesNotExist2);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tiBrowser.setText(iNoHtmlLog);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tiException.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tprivate void updateExceptions(EList lExceptions) {\n\t\t\t\tiException.setText(\"\");\n\t\t\t\tIterator lIter = lExceptions.iterator();\n\t\t\t\twhile (lIter.hasNext()) {\n\t\t\t\t\tExceptionReport lEx = (ExceptionReport) lIter.next();\n\t\t\t\t\tString lMessage = lEx.getMessage();\n\t\t\t\t\tString lExStack = lEx.getStackTrace();\n\t\t\t\t\tiException.append(lMessage + \"\\n\" + lExStack + iLineBreak );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tprivate void updateBrowser(String lLog) {\n\t\t\t\tif (lLog != null) {\n\t\t\t\t\t// this path is relative to the path of the xml file\n\t\t\t\t\tFile lRoot = getXMLLocationFromModel();\n\t\t\t\t\tif (lRoot != null) {\n\t\t\t\t\t\t// an html log file\n\t\t\t\t\t\tFile lHtmlFile = new File(lRoot.getParent(), lLog);\n\t\t\t\t\t\tif (lHtmlFile.exists()) {\n\t\t\t\t\t\t\tiBrowser.setUrl(lHtmlFile.getAbsolutePath());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tiBrowser\n\t\t\t\t\t\t\t\t\t.setText(iFileDoesNotExist\n\t\t\t\t\t\t\t\t\t\t\t+ lHtmlFile.toString()\n\t\t\t\t\t\t\t\t\t\t\t+ iFileDoesNotExist2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tiBrowser.setText(iNoHtmlLog);\n\t\t\t\t}\n\t\t\t\tiBrowser.update();\n\t\t\t}\n\t\t});\n\t}", "public void createTables(){\n Map<String, String> name_type_map = new HashMap<>();\n List<String> primaryKey = new ArrayList<>();\n try {\n name_type_map.put(KEY_SINK_NAME, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_SINK_ADDRESS, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_SINK_DETAIL, MyDatabase.TYPE_VARCHAR);\n primaryKey.add(KEY_SINK_ADDRESS);\n myDatabase.createTable(TABLE_SINK, name_type_map, primaryKey, null);\n }catch (MySQLException e){ //数据表已存在\n e.print();\n }\n try {\n name_type_map.clear();\n name_type_map.put(KEY_NODE_NAME, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_PARENT, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_DETAIL, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_ADDRESS,MyDatabase.TYPE_VARCHAR);\n primaryKey.clear();\n primaryKey.add(KEY_NODE_PARENT);\n primaryKey.add(KEY_NODE_ADDRESS);\n myDatabase.createTable(TABLE_NODE, name_type_map, primaryKey, null);\n }catch (MySQLException e){\n e.print();\n }\n\n try {\n name_type_map.clear();\n name_type_map.put(KEY_NODE_ADDRESS, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_NODE_PARENT, MyDatabase.TYPE_VARCHAR);\n name_type_map.put(KEY_DATA_TIME, MyDatabase.TYPE_TIMESTAMP);\n name_type_map.put(KEY_DATA_VAL, MyDatabase.TYPE_FLOAT);\n primaryKey.clear();\n primaryKey.add(KEY_DATA_TIME);\n primaryKey.add(KEY_NODE_ADDRESS);\n primaryKey.add(KEY_NODE_PARENT);\n myDatabase.createTable(TABLE_DATA, name_type_map, primaryKey, null);\n }catch (MySQLException e) {\n e.print();\n }\n }", "public ProductTestReport(Long id, String name, Date date, String operator, Long fileId, String fileName)\n/* 16: */ {\n/* 17:17 */ setId(id);\n/* 18:18 */ setName(name);\n/* 19:19 */ setDate(date);\n/* 20:20 */ setOperator(operator);\n/* 21:21 */ setFileId(fileId);\n/* 22:22 */ setFileName(fileName);\n/* 23: */ }", "PivotTable createPivotTable();", "public static File createTableDataDefinition(File directory, Hashtable valuesTable, DateFormat df)\r\n throws Exception {\r\n return AbstractTemplateGenerator.createTableDataDefinition(directory, valuesTable, df, null);\r\n }", "public void createTableComplaintsData()\n\t\t{\n\t\t\ttry {\n\t\t\t\tDatabaseMetaData d=con.getMetaData();\n\t\t\t\tResultSet rs=d.getTables(null,null,\"ComplaintsData\",null);\n\t\t\t\tif(rs.next())\n\t\t\t\t{\n\t//\t\t\t\tJOptionPane.showMessageDialog(null,\"ComplaintsData table exist\");\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tString Create_Table=\"create table ComplaintsData(Customer_Name varchar(100),Address varchar(100),Contact varchar(30),Product varchar(100),Serial_No varchar(50),Module_No varchar(50),Complaint_No varchar(50),Category varchar(30))\";\n\t\t\t\t\tPreparedStatement ps=con.prepareStatement(Create_Table);\n\t\t\t\t\tps.executeUpdate();\n\t//\t\t\t\tJOptionPane.showMessageDialog(null,\"ComplaintsData created successfully!\");\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}", "public interface SQLV4 {\n\n //数据统计\n String ALTER_TABLE_DATASTATISTICS_TYPE = \"ALTER TABLE \" + DataStatisticsTable.TABLE_DATA_STATISTICS\n + \" ADD COLUMN \" + DataStatisticsTable.COLUMN_DATA_TYPE + \" INTEGER DEFAULT 0\";\n}", "public static void init_traffic_table() throws SQLException{\n\t\treal_traffic_updater.create_traffic_table(Date_Suffix);\n\t\t\n\t}", "public CreateTable(Object result) {\r\n this.result = result;\r\n columnNames = new String[1];\r\n columnNames[0] = \"Result\";\r\n tableData = new Object[1][1];\r\n tableData[0][0] = this.result;\r\n }", "private void initialiseTable() {\n\n // Get database reference and listen for single event to use for download\n DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference().child(\"steps\");\n databaseReference.addListenerForSingleValueEvent(\n\n new ValueEventListener() {\n\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n Map<String,Object> currentSteps = (Map<String,Object>)dataSnapshot.getValue();\n\n // Add each downloaded value to the Arraylist\n for (Map.Entry<String,Object> entry : currentSteps.entrySet()){\n Map stepEntry = (Map) entry.getValue();\n int steps = ((Long)stepEntry.get(\"stepCount\")).intValue();\n Long timeMillis = Long.valueOf(entry.getKey());\n downloadedStepValues.add(new StepsRecord(steps,timeMillis));\n }\n\n // Sort to ensure the correct order in time\n Collections.sort(downloadedStepValues);\n\n // Add each entry to the table\n for(int i = 0; i < downloadedStepValues.size(); i++){\n Date date = new Date(downloadedStepValues.get(i).getTime());\n String markerText = DateFormat.getDateTimeInstance().format(date);\n addNewLine(markerText, downloadedStepValues.get(i).getStepCount());\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n }\n );\n }", "private String createTableSQL()\n\t{\n\t\tStringBuffer str = new StringBuffer();\n\n\t\t// Keep track of the list of fields\n\t\tList<String> listFields = new ArrayList<String>();\n\n\t\t// Table command\n\t\tstr.append(\"CREATE TABLE \" + getFullPath() + \"( \");\n\t\tstr.append(createStandardGZFields());\n\n\t\t// Loop through all InputFields\n\t\tfor (InputFieldSet fieldSet : function.getInputFieldSets())\n\t\t{\n\t\t\tfor (InputField inputField : fieldSet.getInputFields())\n\t\t\t{\n\t\t\t\t// Phase 2 does not support repeating fields being journalled\n\t\t\t\tif (!Field.isRepeating(inputField))\n\t\t\t\t{\n\t\t\t\t\t// Field\n\t\t\t\t\tString fieldName = SQLToolbox.cvtToSQLFieldName(inputField.getId());\n\n\t\t\t\t\t// add if not yet existing\n\t\t\t\t\tif (listFields.indexOf(fieldName) == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tstr.append(\", \");\n\t\t\t\t\t\tString fieldDataType = inputField.getDataType();\n\t\t\t\t\t\tString fieldType = SQLToolbox.cvtToSQLFieldType(fieldDataType, inputField.getSize(), inputField\n\t\t\t\t\t\t\t\t\t\t.getDecimals());\n\t\t\t\t\t\tString fieldDefault = SQLToolbox.cvtToSQLDefault(fieldDataType);\n\t\t\t\t\t\tstr.append(fieldName + \" \" + fieldType + \" \" + \" not null default \" + fieldDefault);\n\t\t\t\t\t\tlistFields.add(fieldName);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// End\n\t\tstr.append(\" ) \");\n\t\t// RCDFMT \" + getJournalRcdName());\n\n\t\treturn str.toString();\n\t}", "@Override\n public Class<ReportVersionDataRecord> getRecordType() {\n return ReportVersionDataRecord.class;\n }", "public Report createReportFromInputData(InputData inputData)\n {\n List<ReportRow> rows = generateRows(inputData.compact, inputData);\n \n Report reportModel = new Report();\n reportModel.setTitle(inputData.title);\n reportModel.setSubtitle(inputData.subtitle);\n reportModel.setDates(inputData.dates);\n \n reportModel.addColumn(\"Manufacturer\", \"manufacturerName\");\n reportModel.addColumn(\"Product Name/Code\", \"productNameAndCode\");\n if (!inputData.compact)\n reportModel.addColumn(\"Contract\", \"contractName\");\n \n int asize = inputData.distributors.size();\n for (int i = 0; i < asize; i++)\n {\n reportModel.addColumn(inputData.distributors.get(i), \"formattedPrices[\" + i + \"]\");\n }\n for (ReportRow row : rows)\n reportModel.addRow(row);\n return reportModel;\n }", "public abstract void buildTable(PdfPTable table);", "DataCfgTableInfo createTableIfNotExists(String dataCfgOid);", "private void statsTable() {\n try (Connection connection = hikari.getConnection()) {\n try (PreparedStatement statement = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS `\" + TABLE_STATS + \"` \" +\n \"(id INT NOT NULL AUTO_INCREMENT UNIQUE, \" +\n \"uuid varchar(255) PRIMARY KEY, \" +\n \"name varchar(255), \" +\n \"kitSelected varchar(255), \" +\n \"points INT, \" +\n \"kills INT, \" +\n \"deaths INT, \" +\n \"killstreaks INT, \" +\n \"currentKillStreak INT, \" +\n \"inGame BOOLEAN)\")) {\n statement.execute();\n statement.close();\n connection.close();\n }\n } catch (SQLException e) {\n LogHandler.getHandler().logException(\"TableCreator:statsTable\", e);\n }\n }", "@Override\n\tpublic void createTable(Object connectionHandle, DataTable table) throws DataSourceException\n\t{\n\t\tList<DataField> fields = new LinkedList<DataField>();\n\t\tList<String> indexes = new LinkedList<String>();\n\t\t\n\t\tList<String> keys = table.getFields();\n\t\tIterator<String> it = keys.iterator();\n\t\twhile(it.hasNext()){\n\t\t\tString fld = it.next();\n\t\t\tDataField df = table.getDataField(fld);\n\t\t\t\n\t\t\tfields.add(df);\n\t\t\t\n\t\t//\tif(df.isPrimary()){\n\t\t//\t\tindexes.add(fld);\n\t\t//\t}\n\t\t}\n\t\t\n\t\tIterator<DataField> primaryIt = table.getPrimaryKeys().iterator();\n\t\twhile(primaryIt.hasNext()){\n\t\t\tDataField pf = primaryIt.next();\n\t\t\t\n\t\t\tindexes.add(pf.getName());\n\t\t}\n\t\t\n\t\t\n\t\t// Make SQL String\n\t\tStringBuffer sqlString = new StringBuffer();\n\t\tsqlString.append(\"CREATE TABLE \");\n\t\tsqlString.append(table.getName());\n\t\tsqlString.append(\" ( \\n\");\n\t\t\n\t\tboolean first = true;\n\t\tIterator<DataField> itDf = fields.iterator();\n\t\twhile(itDf.hasNext()){\n\t\t\tDataField fld = itDf.next();\n\t\t\t\n\t\t\tif(first){\n\t\t\t\tfirst = false;\n\t\t\t}else{\n\t\t\t\tsqlString.append(\",\\n\");\n\t\t\t}\n\t\t\t\n\t\t\tsqlString.append(fld.getName());\n\t\t\tsqlString.append(\" \");\n\t\t\tsqlString.append(getSQLType(fld.getType()));\n\t\t\t\n\t\t\t// not null\n\t\t\tif(fld.isNotnull()){\n\t\t\t\tsqlString.append(\" NOT NULL\");\n\t\t\t}\n\t\t\t\n\t\t\t// unique\n\t\t\tif(fld.isUnique()){\n\t\t\t\tsqlString.append(\" UNIQUE\");\n\t\t\t}\n\t\t\t\n\t\t\t// default\n\t\t\tif(fld.getDefaultValue() != null){\n\t\t\t\tsqlString.append(\" \");\n\t\t\t\tsqlString.append(fld.getDefaultString());\n\t\t\t}\n\t\t\t\n\t\t\t// check\n\t\t\tif(fld.getCheck() != null){\n\t\t\t\tsqlString.append(\" \");\n\t\t\t\ttry {\n\t\t\t\t\tsqlString.append(fld.getCheck().extract(null, null, null, null, null));\n\t\t\t\t} catch (ExecutionException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tthrow new DataSourceException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// check\n\t\tIterator<CheckDefinition> checkIt = table.getCheck().iterator();\n\t\twhile(checkIt.hasNext()){\n\t\t\tCheckDefinition def = checkIt.next();\n\t\t\t\n\t\t\tsqlString.append(\",\\n\");\n\t\t\ttry {\n\t\t\t\tsqlString.append(def.extract(null, null, null, null, null));\n\t\t\t} catch (ExecutionException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tthrow new DataSourceException(e);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// foreign key\n\t\tIterator<ForeignKey> foreignIt = table.getForeignKey().iterator();\n\t\twhile(foreignIt.hasNext()){\n\t\t\tForeignKey fkey = foreignIt.next();\n\t\t\t\n\t\t\tsqlString.append(\",\\n\");\n\t\t\ttry {\n\t\t\t\tsqlString.append(fkey.extract(null, null, null, null, null));\n\t\t\t} catch (ExecutionException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tthrow new DataSourceException(e);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// primary key\n\t\tif(indexes.size() > 0){\n\t\t\tsqlString.append(\",\\n\");\n\t\t\tsqlString.append(\"PRIMARY KEY(\");\n\t\t\t\n\t\t\tfirst = true;\n\t\t\tit = indexes.iterator();\n\t\t\twhile(it.hasNext()){\n\t\t\t\tString idxFld = it.next();\n\t\t\t\t\n\t\t\t\tif(first){\n\t\t\t\t\tfirst = false;\n\t\t\t\t}else{\n\t\t\t\t\tsqlString.append(\", \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsqlString.append(idxFld);\n\t\t\t}\n\n\t\t\tsqlString.append(\")\");\n\t\t}\n\t\t\n\t\t// unique\n\t\tIterator<Unique> itU = table.getUnique().iterator();\n\t\twhile(itU.hasNext()){\n\t\t\tUnique unique = itU.next();\n\t\t\t\n\t\t\tsqlString.append(\",\\n\");\n\t\t\tsqlString.append(\"UNIQUE(\");\n\t\t\t\n\t\t\tfirst = true;\n\t\t\tIterator<String> itUnique = unique.getKey().iterator();\n\t\t\twhile(itUnique.hasNext()){\n\t\t\t\tString col = itUnique.next();\n\t\t\t\t\n\t\t\t\tif(first){\n\t\t\t\t\tfirst = false;\n\t\t\t\t}else{\n\t\t\t\t\tsqlString.append(\",\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsqlString.append(col);\n\t\t\t}\n\t\t\t\n\t\t\tsqlString.append(\")\");\n\t\t}\n\t\t\n\t\tsqlString.append(\"\\n)\\n\");\n\t\t\n\t\tif(this.logger != null && this.outSql){\n\t\t\tthis.logger.reportInfo(sqlString.toString());\n\t\t}\n\t\t\n\t\t// \n\t\tAlinousDebug.debugOut(core, sqlString.toString());\n\t\t\n\t\texecuteUpdateSQL(connectionHandle, sqlString.toString(), false);\n\n\t}", "@Override\n public void setUp() throws SQLException {\n connection.createStatement().executeUpdate(\n \"CREATE TABLE IF NOT EXISTS \\\"ENTRY\\\" (\" +\n \"\\\"SHARED_ID\\\" SERIAL PRIMARY KEY, \" +\n \"\\\"TYPE\\\" VARCHAR, \" +\n \"\\\"VERSION\\\" INTEGER DEFAULT 1)\");\n\n connection.createStatement().executeUpdate(\n \"CREATE TABLE IF NOT EXISTS \\\"FIELD\\\" (\" +\n \"\\\"ENTRY_SHARED_ID\\\" INTEGER REFERENCES \\\"ENTRY\\\"(\\\"SHARED_ID\\\") ON DELETE CASCADE, \" +\n \"\\\"NAME\\\" VARCHAR, \" +\n \"\\\"VALUE\\\" TEXT)\");\n\n connection.createStatement().executeUpdate(\n \"CREATE TABLE IF NOT EXISTS \\\"METADATA\\\" (\"\n + \"\\\"KEY\\\" VARCHAR,\"\n + \"\\\"VALUE\\\" TEXT)\");\n }", "Table8 create(Table8 table8);", "private void createTable(BufferedWriter writer, ResultTable tableData)\r\n\t\t\tthrows IOException {\r\n\t\tint height = (37 * tableData.getDataCount()) + 56\r\n\t\t\t\t+ (tableData.getExpectionMessageData().size() * 4);\r\n\t\tString container = \"<div style='width: 766px;background-color: #FFFFFF;box-shadow: 1px 1px 1px #888888;;height: \"\r\n\t\t\t\t+ height + \"px;position: absolute;top: 165px;left: 554px'>\";\r\n\t\tString table = \"<table style='top:10px;position:absolute;width: 750px;left:8px;'><tbody>\";\r\n\t\tString headers = \"<tr><th>TestCase Id</th><th>Method Name</th><th>Servrity</th><th>Time Taken</th><th>Result</th></tr>\";\r\n\r\n\t\twriter.write(container + table + headers);\r\n\r\n\t}", "@Override\n public void createMetaTable(Connection conn) throws PersistenceException {\n String sql = String.format(\"CREATE TABLE %1$s (%2$s %3$s NOT NULL)\", metaTableName, META_TABLE_DATA_COLUMN, config.dataColumnType());\n executeUpdateSql(conn, sql);\n updateMetaTable(conn);\n }", "public void createVirtualTable(){\n\n\t\t\n\t\tif(DBHandler.getConnection()==null){\n\t\t\treturn;\n\t\t}\n\n\t\tif(DBHandler.tableExists(name())){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tStatement s = DBHandler.getConnection().createStatement();\n\t\t\ts.execute(\"create virtual table \"+name()+\" using fts4(\"+struct()+\")\");\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tMainFrame.print(e.getMessage());\n\t\t}\n\t}", "public StubReport() {\n\t\t\thashMapDB = new HashMap<String, HashMap<Integer, String>>();\n\t\t\tparkReportData = new HashMap<Integer, String>();\n\n\t\t\tparkReportData = new HashMap<Integer, String>();\n\t\t\tparkReportData.put(1, \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\");\n\t\t\tparkReportData.put(2,\n\t\t\t\t\t\"12 88 28 60 28 0 76 40 20 32 76 0 16 96 0 96 0 0 60 56 28 56 28 0 60 28 0 56 0 0 92 28 0 44 28 0\");\n\t\t\tparkReportData.put(3, \"1 2 3 4 5 6 1 23 2 8 9 2 3 2 4 3 2 2 1 1 1 5 32 6 12 7 23 8 12 5 32 6 12 5 23 7\");\n\t\t\thashMapDB.put(\"Haifa Park\", parkReportData);\n\t\t\tparkReportData = new HashMap<Integer, String>();\n\t\t\tparkReportData.put(4, \"1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1\");\n\t\t\tparkReportData.put(5, \"1 2 7 4 7 6 7 7 0 8 7 0 7 7 7 0 7 0 7 5 7 5 7 6 7 7 7 8 7 5 7 6 7 5 7 7\");\n\t\t\tparkReportData.put(6,\n\t\t\t\t\t\"11 22 33 44 55 66 17 23 5 8 4 2 3 2 54 34 2 32 1 61 1 75 32 46 12 67 23 82 12 56 32 36 12 85 232 7\");\n\t\t\thashMapDB.put(\"Tel-Aviv Park\", parkReportData);\n\n\t\t\tparkReportData = new HashMap<Integer, String>();\n\t\t\tparkReportData.put(7, \"1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1\");\n\t\t\tparkReportData.put(8, \"1 2 3 4 5 6 0 0 0 8 9 0 3 0 4 0 6 0 0 5 5 5 0 6 0 7 0 8 0 5 0 6 0 5 0 7\");\n\t\t\tparkReportData.put(9, \"1 2 3 4 5 6 1 23 2 8 9 2 3 2 4 3 2 2 1 1 1 5 32 6 12 7 23 8 12 5 32 6 12 5 23 7\");\n\t\t\thashMapDB.put(\"Safed Park\", parkReportData);\n\t\t}", "@Test\n\tpublic void driverCreateReport() {\n\t\tfinal Object testingData[][] = {\n\t\t\t{\n\t\t\t\t\"2019/04/23\", \"example\", \"player1\", null\n\t\t\t},//1. All fine\n\t\t\t{\n\t\t\t\t\"2019/04/23\", \"\t\t\", \"player1\", ConstraintViolationException.class\n\t\t\t},//2. Description = blank\n\t\t\t{\n\t\t\t\t\"2019/04/23\", null, \"player1\", ConstraintViolationException.class\n\t\t\t},//3. Description = null\n\n\t\t};\n\n\t\tfor (int i = 0; i < testingData.length; i++)\n\t\t\tthis.templateCreateReport(this.convertStringToDate((String) testingData[i][0]), (String) testingData[i][1], (String) testingData[i][2], (Class<?>) testingData[i][3]);\n\t}", "FromTable createFromTable();", "private String getCommitTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table VCS_COMMIT(\");\n \t\tbuilder.append(\"VCS_COMMIT_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"BEFORE_REVISION_ID LONG,\");\n \t\tbuilder.append(\"AFTER_REVISION_ID LONG,\");\n \t\tbuilder.append(\"BEFORE_REVISION_IDENTIFIER TEXT,\");\n \t\tbuilder.append(\"AFTER_REVISION_IDENTIFIER TEXT\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "private void populateTable(Vector data) {\n Vector columnNames = ViewStrings.getShareColumnNames();\n ((ShareTraderTable) table).updateTable(data, columnNames);\n }", "public static Report createEntity() {\n\t\tReport report = new Report()\n\t\t\t\t.fromIsoCode(DEFAULT_FROM_ISO_CODE)\n\t\t\t\t.toIsoCode(DEFAULT_TO_ISO_CODE)\n\t\t\t\t.total(DEFAULT_TOTAL)\n\t\t\t\t.lastUpdated(DEFAULT_LAST_UPDATED);\n\t\treturn report;\n\t}", "protected void constructTable(Logger l, Statement s, int run)\n throws SQLException{\n createTable(s, run);\n insertResults(l,s,run);\n }", "public MonthlyValuesTable(Database database) \n {\n //Constructor calls DbTable's constructor\n super(database);\n setTableName(\"monthlyvalues\");\n }", "public void createTable() throws LRException\n\t{\n\t\tgetBackground();\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\t// Create a new (empty) record\n\t\tcreate(new Hashtable(),myData);\n\t\tif (myData.record==null) throw new LRException(DataRMessages.nullRecord(getName()));\n\t\ttry\n\t\t{\n\t\t\tbackground.newTransaction();\n\t\t\tmyData.record.createNewTable(background.getClient(),true);\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"O\\\"6T\");\n File file0 = MockFile.createTempFile(\"<*kYz\", \"BLOB\");\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(file0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n SQLUtil.renderCreateTable(defaultDBTable0, true, nameSpec0, mockPrintWriter0);\n assertNull(defaultDBTable0.getDoc());\n }", "private void initExcelReport() {\n DocumentItem documentItem = new DocumentItem(\"Source Node ID\", \"File Name\", \"Target Destination Folder\", \"Target Node ID\", null, \"Target Node Status\", \"Message\", null, null);\n ExcelUtil.addMigrationRow(jobParameters.getMigrationReport(), \"Date Time\", \"Source Node Status\", \"Source Destination Folder\", documentItem);\n ExcelUtil.addErrorRow(jobParameters.getErrorReport(), \"Date Time\", \"Source Node Status\", \"Source Destination Folder\", documentItem);\n }", "protected abstract void initialiseTable();", "protected void constructTable(Logger l, Statement s, int run)\n throws SQLException{\n createTable(s, run);\n insertResults(l,s,run);\n }", "private String getFileTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table FILE(\");\n \t\tbuilder.append(\"FILE_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"FILE_PATH TEXT,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder.append(\"END_REVISION_ID LONG\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "@Override\n public void createTable() {\n String[] TABLE_COLUMNS_ATLAS = {\n TableColumn.ChecklistTable.CID + \" INTEGER PRIMARY KEY AUTOINCREMENT\",\n TableColumn.ChecklistTable.PID + \" INTEGER NOT NULL\",\n TableColumn.ChecklistTable.REAL + \" INTEGER DEFAULT 0\",\n TableColumn.ChecklistTable.UNIT_ID + \" INTEGER\",\n TableColumn.ChecklistTable.WAREHOUSE_ID + \" INTEGER\",\n TableColumn.ChecklistTable.QUEUE_ID + \" INTEGER\",\n TableColumn.ChecklistTable.CATEGORIES_ID + \" INTEGER\",\n TableColumn.ChecklistTable.DATE + \" DATE\",\n TableColumn.ChecklistTable.RECORDTIME + \" DATE\",\n TableColumn.ChecklistTable.CONFIRM + \" INTEGER DEFAULT 0\"\n };\n\n //TODO: create table\n database.execSQL(makeSQLCreateTable(TABLE_NAME, TABLE_COLUMNS_ATLAS));\n\n addColumn(TableColumn.ChecklistTable.CONFIRM, \" INTEGER DEFAULT 0\");\n\n //TODO: show table\n XCursor cursor = selectTable();\n printData(TABLE_NAME, cursor);\n cursor.close();\n }", "private void createStressTestControlTable() {\n Column runId = new Column(\"RUN_ID\");\n runId.setMappedType(\"INTEGER\");\n runId.setPrimaryKey(true);\n runId.setRequired(true);\n Column clientCommitSleepMs = new Column(\"CLIENT_COMMIT_SLEEP_MS\");\n clientCommitSleepMs.setMappedType(\"BIGINT\");\n Column clientCommitRows = new Column(\"CLIENT_COMMIT_ROWS\");\n clientCommitRows.setMappedType(\"BIGINT\");\n Column serverCommitSleepMs = new Column(\"SERVER_COMMIT_SLEEP_MS\");\n serverCommitSleepMs.setMappedType(\"BIGINT\");\n Column serverCommitRows = new Column(\"SERVER_COMMIT_ROWS\");\n serverCommitRows.setMappedType(\"BIGINT\");\n Column payloadColumns = new Column(\"PAYLOAD_COLUMNS\");\n payloadColumns.setMappedType(\"INTEGER\");\n Column initialSeedSize = new Column(\"INITIAL_SEED_SIZE\");\n initialSeedSize.setMappedType(\"BIGINT\");\n Column duration = new Column(\"DURATION_MINUTES\");\n duration.setMappedType(\"BIGINT\");\n\n Table table = new Table(STRESS_TEST_CONTROL, runId, clientCommitSleepMs, clientCommitRows, serverCommitSleepMs, serverCommitRows,\n payloadColumns, initialSeedSize, duration);\n engine.getDatabasePlatform().createTables(true, true, table);\n }", "public Creator_4_tables() {\n// this.sourceUnits = sourceUnits;\n sourceUnits = new HashMap<String, PojoSourceCreatorUnit>();\n sourceTemplatePool.logEnvOnSrcCreate = app.cfg.getCfgBean().logEnvOnSrcCreate;\n env.setLogLeading(\"--cfenv--\");\n }", "public String createTable(){\r\n return \"CREATE TABLE Doctor \" +\r\n \"(idDoctor decimal primary key, \" +\r\n \"firstNameDoctor char(14), \" +\r\n \"lastNameDoctor char(14), \" +\r\n \"costPerVisit integer,\" +\r\n \"qualification varchar(32))\";\r\n }", "public org.dhis2.ns.schema.dxf2.ReportTableDataElementsDocument.ReportTableDataElements addNewReportTableDataElements()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.dhis2.ns.schema.dxf2.ReportTableDataElementsDocument.ReportTableDataElements target = null;\n target = (org.dhis2.ns.schema.dxf2.ReportTableDataElementsDocument.ReportTableDataElements)get_store().add_element_user(REPORTTABLEDATAELEMENTS$0);\n return target;\n }\n }", "public org.dhis2.ns.schema.dxf2.ReportTableDataElementDocument.ReportTableDataElement addNewReportTableDataElement()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.dhis2.ns.schema.dxf2.ReportTableDataElementDocument.ReportTableDataElement target = null;\n target = (org.dhis2.ns.schema.dxf2.ReportTableDataElementDocument.ReportTableDataElement)get_store().add_element_user(REPORTTABLEDATAELEMENT$0);\n return target;\n }\n }", "boolean createReport(String lang, String reportId, String fileName, Object... params) throws Exception;", "private void createStressTestStatusTable() {\n Column runId = new Column(\"RUN_ID\");\n runId.setMappedType(\"INTEGER\");\n runId.setPrimaryKey(true);\n runId.setRequired(true);\n Column nodeId = new Column(\"NODE_ID\");\n nodeId.setMappedType(\"VARCHAR\");\n nodeId.setPrimaryKey(true);\n nodeId.setRequired(true);\n nodeId.setSize(\"50\");\n Column status = new Column(\"STATUS\");\n status.setMappedType(\"VARCHAR\");\n status.setSize(\"10\");\n status.setRequired(true);\n status.setDefaultValue(\"NEW\");\n Column startTime = new Column(\"START_TIME\");\n startTime.setMappedType(\"TIMESTAMP\");\n Column endTime = new Column(\"END_TIME\");\n endTime.setMappedType(\"TIMESTAMP\");\n\n Table table = new Table(STRESS_TEST_STATUS, runId, nodeId, status, startTime, endTime);\n\n engine.getDatabasePlatform().createTables(true, true, table);\n }", "protected void createTableRecordings() {\n\t\tString query = \n\t\t\t\t\"CREATE TABLE IF NOT EXISTS Recordings (\" \t\t\t\t\t\t\t+\n\t\t\t\t\"artist_name\tVARCHAR(128),\" \t\t\t\t\t\t\t\t\t\t+\n\t\t\t\t\"track_name\t\tVARCHAR(128),\" \t\t\t\t\t\t\t\t\t\t+\n\t\t\t\t\"CONSTRAINT unique_track PRIMARY KEY (artist_name, track_name)\" \t+\n\t\t\t\t\");\"\n\t\t\t\t;\n\t\tcreateTable(query);\n\t}", "public void createReport(Report report) {\n view.onProgress(true);\n apiInterface.newReport(report.getNumber(), report.isNo_telp(), report.isNo_rek())\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new SingleObserver<ReportItem>() {\n @Override\n public void onSubscribe(Disposable d) {\n\n }\n\n @Override\n public void onSuccess(ReportItem reportItem) {\n if (reportItem != null) {\n view.onReportResult(reportItem.toReportparcel(), true);\n }\n view.onProgress(false);\n }\n\n @Override\n public void onError(Throwable e) {\n view.onError(e.getMessage());\n view.onProgress(false);\n }\n });\n }", "public static void createTable(Database db, boolean ifNotExists) {\n String constraint = ifNotExists? \"IF NOT EXISTS \": \"\";\n db.execSQL(\"CREATE TABLE \" + constraint + \"\\\"DCPURCHASE_DATA\\\" (\" + //\n \"\\\"_id\\\" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL ,\" + // 0: id\n \"\\\"VFCROPS_ID\\\" INTEGER NOT NULL ,\" + // 1: vfcropsId\n \"\\\"EXPECTNEEDS_NUM\\\" INTEGER NOT NULL ,\" + // 2: expectneedsNum\n \"\\\"DATE\\\" TEXT,\" + // 3: date\n \"\\\"DCID\\\" INTEGER NOT NULL );\"); // 4: dcid\n }", "BTable createBTable();", "DT createDT();", "private String generateRevisionSQLStatement(boolean tableExists,\n\t\t\tMap<String, Set<Integer>> dataSourceToUse)\n\t{\n\t\tStringBuffer output = new StringBuffer();\n\n\t\t// Statement creates table for Template Id -> Revision Id\n\t\toutput.append(\"CREATE TABLE IF NOT EXISTS \"\n\t\t\t\t+ GeneratorConstants.TABLE_TPLID_REVISIONID\n\t\t\t\t+ \" (\"\n\t\t\t\t+ \"templateId INTEGER UNSIGNED NOT NULL,\"\n\t\t\t\t+ \"revisionId INTEGER UNSIGNED NOT NULL, UNIQUE(templateId, revisionId));\\r\\n\");\n\n\t\t// Statement for data into templateId -> revisionId\n\t\toutput.append(this.generateSQLStatementForDataInTable(dataSourceToUse,\n\t\t\t\tGeneratorConstants.TABLE_TPLID_REVISIONID));\n\n\t\tif (!tableExists) {\n\t\t\t// Create index statement if table does not exists\n\t\t\toutput.append(\"CREATE INDEX revisionIdx ON \"\n\t\t\t\t\t+ GeneratorConstants.TABLE_TPLID_REVISIONID\n\t\t\t\t\t+ \"(revisionID);\");\n\t\t\toutput.append(\"\\r\\n\");\n\t\t}\n\n\t\treturn output.toString();\n\t}", "String getCreateTableSql(String name, DataSet dataSet, boolean isTemporary,\r\n String key, FieldsRepository fieldsRepository);", "public abstract List<String> newReportColumns();", "UdtRef createUdtRef();", "Table createTable();", "private void create(Hashtable fieldValues,DataHRecordData myData) throws LRException\n\t{\n\t\t// First, to permit searching for a field name\n\t\t// the passed table must be converted to change the\n\t\t// keys from LVValues to Strings.\n\t\tHashtable ht=new Hashtable();\n\t\tEnumeration en=fieldValues.keys();\n\t\twhile (en.hasMoreElements())\n\t\t{\n\t\t\tLVValue v=(LVValue)en.nextElement();\n\t\t\tht.put(v.getStringValue(),fieldValues.get(v));\n\t\t}\n\t\tfieldValues=ht;\n\t\tgetBackground();\n\t\tDataHSpecification spec=myData.spec;\n\t\tif (spec==null) throw new LRException(DataRMessages.hasNoSpec(getName()));\n\t\tmyData.record=createRecord(spec,fieldValues);\n\t}", "TableInstance createTableInstance();", "public abstract void appendReportEntryValues(ReportRow entry);", "private void insertProjectTable() {\n name.setCellValueFactory(new PropertyValueFactory<>(\"nameId\"));\n dateStart.setCellValueFactory(new PropertyValueFactory<>(\"dateStart\"));\n dateFinish.setCellValueFactory(new PropertyValueFactory<>(\"dateFinish\"));\n place.setCellValueFactory(new PropertyValueFactory<>(\"place\"));\n car.setCellValueFactory(new PropertyValueFactory<>(\"cars\"));\n instructors.setCellValueFactory(new PropertyValueFactory<>(\"instructors\"));\n description.setCellValueFactory(new PropertyValueFactory<>(\"description\"));\n author.setCellValueFactory(new PropertyValueFactory<>(\"author\"));\n }", "public static String getCreateSQLString(){\n\t\treturn \"create table \" +TABLE_NAME_FAMILY_PLANNING_RECORDS +\" ( \"\n\t\t\t\t+SERVICE_REC_ID+\" integer primary key, \"\n\t\t\t\t+FamilyPlanningServices.SERVICE_ID +\" integer, \"\n\t\t\t\t+CommunityMembers.COMMUNITY_MEMBER_ID +\" integer, \"\n\t\t\t\t+SERVICE_DATE+\" text,\"\n\t\t\t\t+SCHEDULE_DATE+\" text, \"\n\t\t\t\t+QUANTITY+\" numberic ,\"\n\t\t\t\t+SERVICE_TYPE+\" integer default 0,\"\n\t\t\t\t+DataClass.REC_STATE+ \" integer \"\n\t\t\t\t+\")\";\n\t}", "private void createTable() {\n\t\t// Tao dataModel & table \n\t\tdataModel = new DefaultTableModel(headers, 0);\n\t\ttable.setModel(dataModel);\n\t\t\n\t\tnapDuLieuChoBang();\n\t}", "@Override\n public List<String> buildCreateTableStatements(TableId table,\n Collection<SinkRecordField> fields) {\n List<String> sqlQueries = new ArrayList<>();\n if (table.schemaName() != null) {\n sqlQueries.add(buildCreateSchemaStatement(table));\n }\n sqlQueries.add(super.buildCreateTableStatement(table, fields));\n\n Optional<SinkRecordField> timeField = getTimeField(fields);\n if (!timeField.isPresent()) {\n log.warn(\"Time column is not present. Skipping hypertable creation..\");\n } else {\n sqlQueries.add(buildCreateHyperTableStatement(table, timeField.get().name()));\n }\n\n return sqlQueries;\n }", "public TrackerTableChangeLog() {\r\n\t\t// Default constructor\r\n\t}", "@Override\n\tpublic void checkTableVersion() {\n\n\t}", "@Override\n\tprotected void setupV8Tables(Connection connection) throws SQLException {\n\t\tStatement create = connection.createStatement();\n\n\t\t// Create new empty tables if they do not exist\n\t\tcreate.executeUpdate(\"CREATE TABLE IF NOT EXISTS mh_Mobs \"//\n\t\t\t\t+ \"(MOB_ID INTEGER NOT NULL AUTO_INCREMENT,\"//\n\t\t\t\t+ \" PLUGIN_ID INTEGER NOT NULL,\"//\n\t\t\t\t+ \" MOBTYPE VARCHAR(30),\"//\n\t\t\t\t+ \" PRIMARY KEY(MOB_ID))\");\n\n\t\tcreate.executeUpdate(\"CREATE TABLE IF NOT EXISTS mh_Daily \"//\n\t\t\t\t+ \"(ID CHAR(7) NOT NULL,\"//\n\t\t\t\t+ \" MOB_ID INTEGER,\"//\n\t\t\t\t+ \" PLAYER_ID INTEGER,\"//\n\t\t\t\t+ \" ACHIEVEMENT_COUNT INTEGER DEFAULT 0,\"//\n\t\t\t\t+ \" TOTAL_KILL INTEGER DEFAULT 0,\"//\n\t\t\t\t+ \" TOTAL_ASSIST INTEGER DEFAULT 0,\"//\n\t\t\t\t+ \" TOTAL_CASH REAL DEFAULT 0,\"//\n\t\t\t\t+ \" PRIMARY KEY(ID, MOB_ID, PLAYER_ID),\"//\n\t\t\t\t+ \" KEY `MOB_ID` (`MOB_ID`),\" + \" KEY `mh_Daily_Player_Id` (`PLAYER_ID`),\"\n\t\t\t\t//+ \" CONSTRAINT mh_Daily_Player_Id FOREIGN KEY(PLAYER_ID) REFERENCES mh_Players(PLAYER_ID) ON DELETE CASCADE, \"\n\t\t\t\t+ \" CONSTRAINT mh_Daily_Mob_Id FOREIGN KEY(MOB_ID) REFERENCES mh_Mobs(MOB_ID) ON DELETE CASCADE)\");\n\n\t\tcreate.executeUpdate(\"CREATE TABLE IF NOT EXISTS mh_Weekly \"//\n\t\t\t\t+ \"(ID CHAR(6) NOT NULL,\"//\n\t\t\t\t+ \" MOB_ID INTEGER,\"//\n\t\t\t\t+ \" PLAYER_ID INTEGER,\"//\n\t\t\t\t+ \" ACHIEVEMENT_COUNT INTEGER DEFAULT 0,\"//\n\t\t\t\t+ \" TOTAL_KILL INTEGER DEFAULT 0,\"//\n\t\t\t\t+ \" TOTAL_ASSIST INTEGER DEFAULT 0,\"//\n\t\t\t\t+ \" TOTAL_CASH REAL DEFAULT 0,\"//\n\t\t\t\t+ \" PRIMARY KEY(ID, MOB_ID, PLAYER_ID),\"//\n\t\t\t\t+ \" KEY `MOB_ID` (`MOB_ID`),\"//\n\t\t\t\t+ \" KEY `mh_Weekly_Player_Id` (`PLAYER_ID`),\"\n\t\t\t\t//+ \" CONSTRAINT mh_Weekly_Player_Id FOREIGN KEY(PLAYER_ID) REFERENCES mh_Players(PLAYER_ID) ON DELETE CASCADE,\"\n\t\t\t\t+ \" CONSTRAINT mh_Weekly_Mob_Id FOREIGN KEY(MOB_ID) REFERENCES mh_Mobs(MOB_ID) ON DELETE CASCADE)\");\n\n\t\tcreate.executeUpdate(\"CREATE TABLE IF NOT EXISTS mh_Monthly \"//\n\t\t\t\t+ \"(ID CHAR(6) NOT NULL,\"//\n\t\t\t\t+ \" MOB_ID INTEGER,\"//\n\t\t\t\t+ \" PLAYER_ID INTEGER,\"//\n\t\t\t\t+ \" ACHIEVEMENT_COUNT INTEGER DEFAULT 0,\"//\n\t\t\t\t+ \" TOTAL_KILL INTEGER DEFAULT 0,\"//\n\t\t\t\t+ \" TOTAL_ASSIST INTEGER DEFAULT 0,\"//\n\t\t\t\t+ \" TOTAL_CASH REAL DEFAULT 0,\"//\n\t\t\t\t+ \" PRIMARY KEY(ID, MOB_ID, PLAYER_ID),\"//\n\t\t\t\t+ \" KEY `MOB_ID` (`MOB_ID`),\"//\n\t\t\t\t+ \" KEY `mh_Monthly_Player_Id` (`PLAYER_ID`),\"\n\t\t\t\t//+ \" CONSTRAINT mh_Monthly_Player_Id FOREIGN KEY(PLAYER_ID) REFERENCES mh_Players(PLAYER_ID) ON DELETE CASCADE,\"\n\t\t\t\t+ \" CONSTRAINT mh_Monthly_Mob_Id FOREIGN KEY(MOB_ID) REFERENCES mh_Mobs(MOB_ID) ON DELETE CASCADE)\");\n\n\t\tcreate.executeUpdate(\"CREATE TABLE IF NOT EXISTS mh_Yearly \"//\n\t\t\t\t+ \"(ID CHAR(4) NOT NULL,\"//\n\t\t\t\t+ \" MOB_ID INTEGER,\"//\n\t\t\t\t+ \" PLAYER_ID INTEGER,\"//\n\t\t\t\t+ \" ACHIEVEMENT_COUNT INTEGER DEFAULT 0,\"//\n\t\t\t\t+ \" TOTAL_KILL INTEGER DEFAULT 0,\"//\n\t\t\t\t+ \" TOTAL_ASSIST INTEGER DEFAULT 0,\"//\n\t\t\t\t+ \" TOTAL_CASH REAL DEFAULT 0,\"//\n\t\t\t\t+ \" PRIMARY KEY(ID, MOB_ID, PLAYER_ID),\"//\n\t\t\t\t+ \" KEY `MOB_ID` (`MOB_ID`),\"//\n\t\t\t\t+ \" KEY `mh_Yearly_Player_Id` (`PLAYER_ID`),\"\n\t\t\t\t//+ \" CONSTRAINT mh_Yearly_Player_Id FOREIGN KEY(PLAYER_ID) REFERENCES mh_Players(PLAYER_ID) ON DELETE CASCADE,\"\n\t\t\t\t+ \" CONSTRAINT mh_Yearly_Mob_Id FOREIGN KEY(MOB_ID) REFERENCES mh_Mobs(MOB_ID) ON DELETE CASCADE)\");\n\n\t\tcreate.executeUpdate(\"CREATE TABLE IF NOT EXISTS mh_AllTime \"//\n\t\t\t\t+ \"(MOB_ID INTEGER,\"//\n\t\t\t\t+ \" PLAYER_ID INTEGER,\"//\n\t\t\t\t+ \" ACHIEVEMENT_COUNT INTEGER DEFAULT 0,\"//\n\t\t\t\t+ \" TOTAL_KILL INTEGER DEFAULT 0,\"//\n\t\t\t\t+ \" TOTAL_ASSIST INTEGER DEFAULT 0,\"//\n\t\t\t\t+ \" TOTAL_CASH REAL DEFAULT 0,\"//\n\t\t\t\t+ \" PRIMARY KEY(MOB_ID, PLAYER_ID),\"//\n\t\t\t\t+ \" KEY `MOB_ID` (`MOB_ID`),\"//\n\t\t\t\t+ \" KEY `mh_AllTime_Player_Id` (`PLAYER_ID`),\"//\n\t\t\t\t//+ \" CONSTRAINT mh_AllTime_Player_Id FOREIGN KEY(PLAYER_ID) REFERENCES mh_Players(PLAYER_ID) ON DELETE CASCADE,\"\n\t\t\t\t+ \" CONSTRAINT mh_AllTime_Mob_Id FOREIGN KEY(MOB_ID) REFERENCES mh_Mobs(MOB_ID) ON DELETE CASCADE)\");\n\n\t\tcreate.executeUpdate(\"CREATE TABLE IF NOT EXISTS mh_Achievements \"//\n\t\t\t\t+ \"(PLAYER_ID INTEGER,\"//\n\t\t\t\t+ \" ACHIEVEMENT VARCHAR(64) NOT NULL,\"//\n\t\t\t\t+ \" DATE DATETIME NOT NULL,\"//\n\t\t\t\t+ \" PROGRESS INTEGER NOT NULL,\"//\n\t\t\t\t+ \" PRIMARY KEY(PLAYER_ID, ACHIEVEMENT) )\");\n\t\t\t\t//+ \" CONSTRAINT mh_Achievements_Player_Id FOREIGN KEY(PLAYER_ID) REFERENCES mh_Players(PLAYER_ID) ON DELETE CASCADE)\");\n\n\t\ttry {\n\t\t\tcreate.executeUpdate(\"ALTER TABLE mh_Bounties DROP PRIMARY KEY\");\n\t\t\tplugin.getMessages().debug(\"MySQLDatastore: Primary key on mh_Bounties deleted\");\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t\t// CONSTRAINT can't be used when I use 'INSERT ... ON DUPLICATE KEY'\n\t\t\tcreate.executeUpdate(\"ALTER TABLE mh_Bounties DROP CONSTRAINT mh_Bounties_Player_Id_1\");\n\t\t\tplugin.getMessages().debug(\"MySQLDatastore: DROP CONSTRAINT mh_Bounties_Player_Id_1\");\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t\t// CONSTRAINT can't be used when I use 'INSERT ... ON DUPLICATE KEY'\n\t\t\tcreate.executeUpdate(\"ALTER TABLE mh_Bounties DROP CONSTRAINT mh_Bounties_Player_Id_2\");\n\t\t\tplugin.getMessages().debug(\"MySQLDatastore: DROP CONSTRAINT mh_Bounties_Player_Id_2\");\n\t\t} catch (Exception e) {\n\t\t}\n\t\tcreate.executeUpdate(\"CREATE TABLE IF NOT EXISTS mh_Bounties (\"//\n\t\t\t\t+ \"BOUNTYOWNER_ID INTEGER NOT NULL, \"//\n\t\t\t\t+ \"MOBTYPE CHAR(6), \"//\n\t\t\t\t+ \"WANTEDPLAYER_ID INTEGER NOT NULL, \"//\n\t\t\t\t+ \"NPC_ID INTEGER, \"//\n\t\t\t\t+ \"MOB_ID VARCHAR(40), \"//\n\t\t\t\t+ \"WORLDGROUP VARCHAR(20) NOT NULL, \"//\n\t\t\t\t+ \"CREATED_DATE BIGINT NOT NULL, \" + \"END_DATE BIGINT NOT NULL, \"//\n\t\t\t\t+ \"PRIZE FLOAT NOT NULL, \"//\n\t\t\t\t+ \"MESSAGE VARCHAR(64), \"//\n\t\t\t\t+ \"STATUS INTEGER NOT NULL DEFAULT 0, \"//\n\t\t\t\t+ \"PRIMARY KEY(WORLDGROUP, WANTEDPLAYER_ID, BOUNTYOWNER_ID))\");\n\t\t//\n\t\t// + \"KEY `mh_Bounties_Player_Id_1` (`BOUNTYOWNER_ID`),\"\n\t\t// + \"KEY `mh_Bounties_Player_Id_2` (`WANTEDPLAYER_ID`),\"\n\t\t// + \"CONSTRAINT mh_Bounties_Player_Id_1 FOREIGN KEY(BOUNTYOWNER_ID) REFERENCES\n\t\t// mh_Players(PLAYER_ID) ON DELETE CASCADE, \"\n\t\t// + \"CONSTRAINT mh_Bounties_Player_Id_2 FOREIGN KEY(WANTEDPLAYER_ID) REFERENCES\n\t\t// mh_Players(PLAYER_ID) ON DELETE CASCADE\"\n\t\t// + \")\");\n\t\ttry {\n\t\t\tcreate.executeUpdate(\n\t\t\t\t\t\"ALTER TABLE mh_Bounties ADD CONTRAINT mh_Bounties_Unique UNIQUE (WORLDGROUP, WANTEDPLAYER_ID, BOUNTYOWNER_ID)\");\n\t\t\tplugin.getMessages().debug(\"MySQLDatastore: UNIQUE key on mh_Bounties added\");\n\t\t} catch (Exception e) {\n\t\t}\n\n\t\t// Setup Database triggers\n\t\tcreate.executeUpdate(\"DROP TRIGGER IF EXISTS `mh_DailyInsert`\");\n\t\tcreate.executeUpdate(\"DROP TRIGGER IF EXISTS `mh_DailyUpdate`\");\n\t\tcreate.close();\n\t\tconnection.commit();\n\n\t}", "@Override\n public Pipe execute(DBMS engine) throws DBxicException {\n engine.storManager.createTable(table);\n engine.catalog.saveCatalog();\n return new MessageThroughPipe(\"Table \" + table.getName() + \" successfully created\");\n }", "private String buildStaticViewString(Stream strm, String name) {\n\t\tString viewString = \"CREATE TEMP TABLE \"+name;\n\t\tviewString += \" AS \";\n\t\tviewString += \"SELECT * FROM \" + generateStreamData(strm, name, false) + \";\\r\\n\";\n\t\treturn viewString;\n\t}", "public void writeResultData() {\n\n// DatabaseLoader databaseLoader = new DatabaseLoader();\n TestResultDeployer testResultDeployer = new TestResultDeployer();\n MySqlDatabaseManager mySqlDatabaseManager;\n try {\n EnvironmentBuilder environmentBuilder = new EnvironmentBuilder();\n DashboardVariables dashboardVariables = environmentBuilder.getFrameworkSettings().getDashboardVariables();\n if (dashboardVariables.getEnableDashboard().equalsIgnoreCase(\"true\")) {\n String databaseName = dashboardVariables.getDbName();\n\n mySqlDatabaseManager = new MySqlDatabaseManager(dashboardVariables.getJdbcUrl(), dashboardVariables.\n getDbUserName(), dashboardVariables.getDbPassword());\n// databaseLoader.createDatabase();\n mySqlDatabaseManager.execute(\"INSERT INTO \" + databaseName + \".WA_BUILD_HISTORY VALUES()\");\n DirectoryScanner scan = new DirectoryScanner();\n scan.setBasedir(ProductConstant.REPORT_LOCATION + File.separator + \"reports\" + File.separator);\n String[] fileList = new String[]{\"*/testng-results.xml\"};\n scan.setIncludes(fileList);\n scan.scan();\n String[] fileset = scan.getIncludedFiles();\n for (int i = 0; i <= fileset.length - 1; i++) {\n testResultDeployer.writeResult(ProductConstant.REPORT_LOCATION + \"reports\" +\n File.separator + fileset[i]);\n log.info(fileset[i] + \" write to database\");\n }\n }\n } catch (ClassNotFoundException e) {\n log.error(e);\n } catch (SQLException e) {\n log.error(e);\n } /*catch (IOException e) {\n log.error(e);\n }*/\n }", "private void createStocksTable() {\n\t\ttry {\n\t\t\tStatement stmt = this.conn.createStatement();\n\t\t\tstmt.executeUpdate(\"CREATE TABLE stocks \"\n\t\t\t\t\t+ \"(id BIGINT GENERATED ALWAYS AS IDENTITY, \" + \"owner INT, \"\n\t\t\t\t\t+ \"shareAmount INT, \" + \"purchasePrice DOUBLE, \" + \"symb VARCHAR(10), \"\n\t\t\t\t\t+ \"timePurchased BIGINT)\");\n\t\t\tconn.commit();\n\t\t\tSystem.out.println(\"Created table stocks\");\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.err.println(\"Creation of stocks table FAILED\");\n\t\t\tSystem.err.println(sqle);\n\t\t}\n\t}", "@Override\n public synchronized void buildIndex(){\n for(SlotData data : slotDataList){\n data.prepareReport();\n }\n }", "private void buildReport() throws IOException {\n try (InputStream template = Thread.currentThread().getContextClassLoader().getResourceAsStream(TEMPLATE_DIR + \"/\" + TEMPLATE_NAME)) {\n reportDoc = Jsoup.parse(template, null, \"\");\n Element diffReportContainer = reportDoc.select(\".diffReport\").first();\n Element diffResultTable = diffReportContainer.select(\".diffResult\").first().clone();\n\n diffReportContainer.empty();\n\n for (SimpleImmutableEntry<String, List<File>> diffResult : fileDiffResults) {\n diffReportContainer.appendChild(getDiffTable(diffResultTable, diffResult));\n }\n }\n }", "public void getReportData(WalkInReport report) {\n\t\tnewReport2 = report;\n\t\tnewReport2.clearConclusions();\n\t\tfor(int i=0;i<newReport2.table.size();i++) {\n\t\t\tSample newBacteroidesSample = newReport2.table.get(i);\n\t\t\ttable.getItems().add(newBacteroidesSample);\n\t\t\taddConclusionNumber(newBacteroidesSample);\n\t\t}\n\t}", "public void testCreateTable() {\n LOG.info(\"Entering testCreateTable.\");\n\n // Specify the table descriptor.\n HTableDescriptor htd = new HTableDescriptor(tableName);\n\n // Set the column family name to info.\n HColumnDescriptor hcd = new HColumnDescriptor(\"info\");\n\n // Set data encoding methods,HBase provides DIFF,FAST_DIFF,PREFIX\n // and PREFIX_TREE\n hcd.setDataBlockEncoding(DataBlockEncoding.FAST_DIFF);\n\n // Set compression methods, HBase provides two default compression\n // methods:GZ and SNAPPY\n // GZ has the highest compression rate,but low compression and\n // decompression effeciency,fit for cold data\n // SNAPPY has low compression rate, but high compression and\n // decompression effeciency,fit for hot data.\n // it is advised to use SANPPY\n hcd.setCompressionType(Compression.Algorithm.SNAPPY);\n\n htd.addFamily(hcd);\n\n Admin admin = null;\n try {\n // Instantiate an Admin object.\n admin = conn.getAdmin();\n if (!admin.tableExists(tableName)) {\n LOG.info(\"Creating table...\");\n admin.createTable(htd);\n LOG.info(admin.getClusterStatus());\n LOG.info(admin.listNamespaceDescriptors());\n LOG.info(\"Table created successfully.\");\n } else {\n LOG.warn(\"table already exists\");\n }\n } catch (IOException e) {\n LOG.error(\"Create table failed.\");\n } finally {\n if (admin != null) {\n try {\n // Close the Admin object.\n admin.close();\n } catch (IOException e) {\n LOG.error(\"Failed to close admin \", e);\n }\n }\n }\n LOG.info(\"Exiting testCreateTable.\");\n }", "public abstract void createTables() throws DataServiceException;", "ReservationReportSchema reportUrl();", "private void initializeGUITableHeaders(){\n TableColumn<HeapData, Integer> addressColumn = new TableColumn<>(\"Address\");\n addressColumn.setCellValueFactory(new PropertyValueFactory<>(\"address\"));\n TableColumn<HeapData, String> valueColumn = new TableColumn<>(\"Value\");\n valueColumn.setCellValueFactory(new PropertyValueFactory<>(\"value\"));\n valueColumn.setMinWidth(100);\n this.heapTableList.getColumns().addAll(addressColumn, valueColumn);\n\n TableColumn<SymbolData, String> variableNameColumn = new TableColumn<>(\"Variable Name\");\n variableNameColumn.setCellValueFactory(new PropertyValueFactory<>(\"variableName\"));\n variableNameColumn.setMinWidth(100);\n TableColumn<SymbolData, String> valColumn = new TableColumn<>(\"Value\");\n valColumn.setCellValueFactory(new PropertyValueFactory<>(\"value\"));\n symbolTableList.getColumns().addAll(variableNameColumn, valColumn);\n\n TableColumn<SemaphoreData,String> indexColumn = new TableColumn<>(\"Index\");\n indexColumn.setCellValueFactory(new PropertyValueFactory<>(\"index\"));\n TableColumn<SemaphoreData,Integer> valueColumnSem = new TableColumn<>(\"Value\");\n valueColumnSem.setCellValueFactory(new PropertyValueFactory<>(\"value\"));\n TableColumn<SemaphoreData,ArrayList<Integer>>valuesColumn = new TableColumn<>(\"Values\");\n valuesColumn.setCellValueFactory(new PropertyValueFactory<>(\"values\"));\n this.semaphoreTable.getColumns().addAll(indexColumn,valueColumnSem,valuesColumn);\n\n }", "public static JasperReportBuilder generateReport(ExportData metaData,HttpServletRequest request){\n session = request.getSession(false);\n report = report(); // Creer le rapport\n \n //Logo\n// logoImg = cmp.image(inImg).setStyle(DynamicReports.stl.style().setHorizontalAlignment(HorizontalAlignment.LEFT)); \n //logoImg.setDimension(80,80); \n \n //Definit le style des colonnes d'entàte\n report.setColumnTitleStyle(getHeaderStyle(metaData));\n \n \n \n LinkedHashMap <String,String> criteria = metaData.getCriteria(); \n //Ajout la date d'àdition au critere d'impression\n String valDateProperty = getDateTxt(metaData.getLang()) ;\n String keyDateProperty = \"\" ;\n if ( session.getAttribute(\"activedLocale\").equals(\"fr\") ) {\n keyDateProperty = \"Edité le \" ;\n }\n else {\n keyDateProperty = \"Printed on \" ;\n }\n criteria.put(keyDateProperty,valDateProperty);\n \n StyleBuilder titleStyle = stl.style(boldStyle).setFontSize(16).setForegroundColor(new Color(0, 0, 0)).setHorizontalAlignment(HorizontalAlignment.RIGHT).setRightIndent(20);\n ComponentBuilder<?, ?> logoComponent = cmp.horizontalList(\n //cmp.image(Templates.class.getResource(\"/logopalm.png\")).setFixedDimension(150, 50).setStyle(stl.style().setLeftIndent(20)),\n cmp.verticalList(\n cmp.text(metaData.getTitle()).setStyle(titleStyle)\n )\n ).newRow()\n .add(cmp.horizontalList().add(cmp.hListCell(createCriteriaComponent(criteria,metaData)).heightFixedOnTop()))\n .newRow(); \n \n report.noData(logoComponent, cmp.text(\"Aucun enregistrement trouvà\").setStyle(stl.style().setHorizontalAlignment(HorizontalAlignment.CENTER).setTopPadding(30)));\n\n \n \n lblStyle = stl.style(Templates.columnStyle).setForegroundColor(new Color(60, 91, 31)); // Couleur du text \n colStyle = stl.style(Templates.columnStyle).setHorizontalAlignment(HorizontalAlignment.CENTER);\n \n groupStyle = stl.style().setForegroundColor(new Color(60, 91, 31)) \n .setBold(Boolean.TRUE)\n .setPadding(5)\n .setFontSize(13)\n .setHorizontalAlignment(HorizontalAlignment.CENTER); \n \n\n \n if(metaData.getTitle().equals(ITitle.PARCEL)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PARCEL_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SECTOR)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SECTOR_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.BLOCK)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.BLOCK_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.ATTACK_PHYTO)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TREATMENT)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TREATMENT_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVEST)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVEST_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SERVICING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SERVICING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_PLANTING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_PLANTING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.FERTILIZATION)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.FERTILIZATION_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.CONTROL_PHYTO)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.CONTROL_PHYTO_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_FOLDING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_FOLDING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.MORTALITY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.MORTALITY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVESTING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVESTING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.BUDGET)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.REPLACEMENT)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.REPLACEMENT_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.METEOROLOGY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.METEOROLOGY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING_MATERIAL)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING_MATERIAL_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLUVIOMETRY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLUVIOMETRY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.ETP)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.ETP_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HYGROMETRY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HYGROMETRY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TEMPERATURE)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TEMPERATURE_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.INSULATION)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.INSULATION_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.WORK)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.WORK_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }\n \n \n drColumns = new HashMap<String, TextColumnBuilder>(); \n groups = new ArrayList<String>();\n subtotals = new ArrayList<String>();\n \n //Definit la liste des colonnes du rapport\n ExportGenerator.getColumns(metaData); \n //Definit la liste des sous-totaux du rapport\n ExportGenerator.getSubTotals(metaData);\n \n \n //Genration des sous totaux\n for (String group : groups) {\n ColumnGroupBuilder group2 = grp.group(drColumns.get(group));\n report.groupBy(group2);\n for (String subtotal : subtotals) {\n report.subtotalsAtGroupFooter(group2,sbt.sum(drColumns.get(subtotal)));\n }\n }\n\n for (String subtotal : subtotals) {\n report.subtotalsAtSummary(sbt.sum(drColumns.get(subtotal))); \n }\n \n /*if(ExportGenerator.getColumnByNameField(\"plantingName\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL \"), ExportGenerator.getColumnByNameField(\"plantingName\"), Calculation.NOTHING));\n }*//*else if(ExportGenerator.getColumnByNameField(\"invoiceCode\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"invoiceCode\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"planterCode\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL\"), ExportGenerator.getColumnByNameField(\"planterCode\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"transportTicket\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"transportTicket\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"deliveryDate\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"deliveryDate\"), Calculation.NOTHING));\n }\n else if(ExportGenerator.getColumnByNameField(\"arroundPlantingTicketNumber\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"arroundPlantingTicketNumber\"), Calculation.NOTHING));\n }\n else if(ExportGenerator.getColumnByNameField(\"planterNumber\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"planterNumber\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"startPaymentDate\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"startPaymentDate\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"sectorCode\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"sectorCode\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"month\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL \"), ExportGenerator.getColumnByNameField(\"month\"), Calculation.NOTHING));\n }*/\n \n\n \n \n //Genere la source de donnàes du rapport\n report.setDataSource(metaData.getData());\n \n report.highlightDetailEvenRows(); \n \n \n // Definition de l'entete : valable uniquement pour la 1ere page\n HorizontalListBuilder hlb= null;\n \n hlb = cmp.horizontalList().add(\n cmp.hListCell(createCriteriaComponent(criteria,metaData)).heightFixedOnTop()\n );\n\n \n report.title(\n createCustomTitleComponent(metaData.getTitle()), // Titre\n hlb,// Liste Horizontal des Critàres \n cmp.verticalGap(12) // Marge de 12 px entre chaque critàre\n ); \n \n \n \n report.setPageMargin(DynamicReports.margin().setLeft(15).setTop(30).setRight(15).setBottom(30));\n report.setPageFormat(PageType.A3, PageOrientation.LANDSCAPE);\n report.pageFooter(DynamicReports.cmp.pageXslashY());\n return report;\n \n }", "public TableVersion(String alias) {\n this(DSL.name(alias), TABLE_VERSION);\n }", "CreationData creationData();", "public static byte[] getDashboardPDFAsByteArray() {\n\n\t\tString localProviderURL = \"t3://localhost:7001\";\n\t\tSystem.setProperty(Context.INITIAL_CONTEXT_FACTORY, \"weblogic.jndi.WLInitialContextFactory\");\n\t\tSystem.setProperty(Context.PROVIDER_URL, localProviderURL);\n\t\t\n\t\t\n\t\tSystem.out.println(\"Generating VINSight DashBoard Reports\");\n\n\t\t\n\t\t\n\t\t\n\t\t// step 1: creation of a document-object\n\t\tDocument document = new Document();\n\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream(100000);\n\n \ttry {\n \t\t// step 2\n \t\tPdfWriter writer;\n\t\t\twriter = PdfWriter.getInstance(document, baos);\n\t\t\t// step 3\n \t\tdocument.open();\n\t\t\t// step 4: we add a paragraph to the document\n\t\t\tdocument.add(new Paragraph(\"VINSight Health Check\"));\n\t\t\tdocument.add(new Paragraph(\"Report 1\"));\n\n\t\t\t//create the chart1 image\n\t\t\tJFreeChart chart1 = VINSightDashboardReport.createVINSightDashBoardChart1();\n\t\t\tBufferedImage image1 = chart1.createBufferedImage(350, 350);\n\t\t\timage1.flush();\n\n\t\t\tdocument.add(com.lowagie.text.Image.getInstance(image1, null) );\n\t\t\tdocument.add(new Paragraph(\"Report 2\"));\n\t\t\tJFreeChart chart2 = VINSightDashboardReport.createVINSightDashBoardChart2();\n\t\t\tBufferedImage image2 = chart2.createBufferedImage(350, 350);\n\t\t\timage2.flush();\n\n\t\t\tdocument.add(com.lowagie.text.Image.getInstance(image2, null) );\n \t\t\n\t\t\n \t}\n \tcatch(DocumentException de) {\n \t\tde.printStackTrace();\n \t}catch(Exception e){\n \t\te.printStackTrace();\n \t}finally{\n \t// step 5\n \t\tdocument.close();\n \t\t\ttry{ baos.close();}catch(IOException ioe){/*ignore*/}\n \t}\n \t\n \treturn baos.toByteArray();\n\t\t\n\t}", "public static void createTable() {\n\n // Create statement\n Statement statement = null;\n try {\n statement = Database.getDatabase().getConnection().createStatement();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n // Attempt to create table\n try {\n statement.execute(\n \"CREATE TABLE \" + Constants.SANITATION_TABLE + \"(\" +\n \"requestID INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),\" +\n \"nodeID VARCHAR(100) References \" + Constants.LOCATION_TABLE + \" (nodeID), \" +\n \"priority VARCHAR(10), \" +\n \"status VARCHAR(100), \" +\n \"description VARCHAR(100), \" +\n \"requesterID INT REFERENCES \" + Constants.USERS_TABLE + \"(userID), \" +\n \"requestTime TIMESTAMP, \" +\n \"servicerID INT REFERENCES \" + Constants.USERS_TABLE + \"(userID), \" +\n \"claimedTime TIMESTAMP, \" +\n \"completedTime TIMESTAMP, \" +\n \"CONSTRAINT priority_enum CHECK (priority in ('LOW', 'MEDIUM', 'HIGH')), \" +\n \"CONSTRAINT status_enum CHECK (status in ('INCOMPLETE', 'COMPLETE')))\"\n );\n } catch (SQLException | NullPointerException e) {\n e.printStackTrace();\n }\n }", "private void installHPSoftwareTable() {}" ]
[ "0.6061201", "0.57847637", "0.5674248", "0.5638577", "0.5595093", "0.5563812", "0.5532259", "0.5520442", "0.5424101", "0.54200774", "0.5387263", "0.5264504", "0.521197", "0.5186997", "0.5175989", "0.51721585", "0.5123336", "0.51049775", "0.50534546", "0.49957326", "0.4985158", "0.4970996", "0.49628532", "0.49571806", "0.49353957", "0.49317157", "0.49300677", "0.49254152", "0.49229604", "0.49089304", "0.49038935", "0.4888157", "0.4882806", "0.48821712", "0.48745894", "0.4870646", "0.48673493", "0.4866833", "0.48551646", "0.48544765", "0.48528433", "0.48495808", "0.4847723", "0.48287532", "0.4826051", "0.48253903", "0.48107368", "0.48084924", "0.4806931", "0.48026776", "0.4797371", "0.4791768", "0.47872323", "0.47773913", "0.47736728", "0.4763923", "0.4760624", "0.47595754", "0.4756789", "0.47516885", "0.47515222", "0.4751382", "0.47482923", "0.47209892", "0.47200722", "0.47175533", "0.4678997", "0.4677657", "0.46764064", "0.4674949", "0.4673951", "0.46732298", "0.4672837", "0.4669015", "0.46648324", "0.46527848", "0.46524125", "0.4646529", "0.46373168", "0.46241", "0.46213734", "0.46185774", "0.46144783", "0.46133345", "0.46117812", "0.46115142", "0.4609511", "0.46040165", "0.45983425", "0.45889276", "0.45870256", "0.4583013", "0.4578253", "0.45657653", "0.45596436", "0.45582977", "0.45519686", "0.455039", "0.4544092", "0.4542525" ]
0.67405796
0
Create an aliased report_version_data table reference
public ReportVersionData(String alias) { this(alias, REPORT_VERSION_DATA); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TableVersion(String alias) {\n this(DSL.name(alias), TABLE_VERSION);\n }", "public ReportVersionData() {\n this(\"report_version_data\", null);\n }", "private String getRevisionTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table REVISION(\");\n \t\tbuilder.append(\"REVISION_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"REVISION_IDENTIFIER TEXT UNIQUE\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "public TableVersion(Name alias) {\n this(alias, TABLE_VERSION);\n }", "private String buildStaticViewString(Stream strm, String name) {\n\t\tString viewString = \"CREATE TEMP TABLE \"+name;\n\t\tviewString += \" AS \";\n\t\tviewString += \"SELECT * FROM \" + generateStreamData(strm, name, false) + \";\\r\\n\";\n\t\treturn viewString;\n\t}", "public ReportTable(TableView<Report> reportTable) {\n this.reportTable = reportTable;\n }", "public interface SQLV4 {\n\n //数据统计\n String ALTER_TABLE_DATASTATISTICS_TYPE = \"ALTER TABLE \" + DataStatisticsTable.TABLE_DATA_STATISTICS\n + \" ADD COLUMN \" + DataStatisticsTable.COLUMN_DATA_TYPE + \" INTEGER DEFAULT 0\";\n}", "void createReport(Report report);", "public ReportVersionArtefact(String alias) {\n this(alias, REPORT_VERSION_ARTEFACT);\n }", "public DynamicSchemaTable(String alias) {\n this(alias, DYNAMIC_SCHEMA);\n }", "private void appendFullTableNameAndAlias(String stageName) {\n builder.append(getFullTableName(stageName)).append(AS).append(getTableAlias(stageName));\n }", "DataTable createDataTable();", "DataNameReference createDataNameReference();", "@Override\n\tpublic String createTable() {\n\t\t\t\treturn \"CREATE TABLE history_table_view(id number(8) primary key not null ,sqltext text, pointid varchar2(1024), type varchar2(100))\";\n\t}", "public Table<Integer, Integer, String> getAnonymizedData();", "private String getCodeFragmentLinkTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CODE_FRAGMENT_LINK(\");\n \t\tbuilder.append(\"CODE_FRAGMENT_LINK_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"BEFORE_ELEMENT_ID LONG,\");\n \t\tbuilder.append(\"AFTER_ELEMENT_ID LONG,\");\n \t\tbuilder.append(\"BEFORE_REVISION_ID LONG,\");\n \t\tbuilder.append(\"AFTER_REVISION_ID LONG,\");\n \t\tbuilder.append(\"CHANGED INTEGER\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "@Test\n public void testAliasedTableColumns()\n {\n assertEquals(\n runner.execute(\"SELECT * FROM orders AS t (a, b, c, d, e, f, g, h, i)\"),\n runner.execute(\"SELECT * FROM orders\"));\n }", "UdtRef createUdtRef();", "void create(DataTableDef def) throws IOException;", "TableReportMetadata getReportMetadata(String reportId);", "String getCreateTableSql(String name, DataSet dataSet, boolean isTemporary,\r\n String key, FieldsRepository fieldsRepository);", "public void addColumnPathReportId() {\n addColumnInPath(ColumnMetaData.KEY_PATH_ID);\n }", "@Test(timeout = 4000)\n public void test042() throws Throwable {\n String[] stringArray0 = new String[5];\n String string0 = SQLUtil.innerJoin(\"alter materialized viewjcsh%4%|@v9\", stringArray0, \"create materialized viewjcsh%4%|@v9\", \"\", stringArray0);\n assertEquals(\"create materialized viewjcsh%4%|@v9 as on alter materialized viewjcsh%4%|@v9.null = .null and alter materialized viewjcsh%4%|@v9.null = .null and alter materialized viewjcsh%4%|@v9.null = .null and alter materialized viewjcsh%4%|@v9.null = .null and alter materialized viewjcsh%4%|@v9.null = .null\", string0);\n }", "public abstract List<String> newReportColumns();", "public AgentTable(String alias) {\n this(alias, AGENT);\n }", "public static String AssetRef_CreateTable()\n\t{\n\t\tString str = \"create table assetref (\" \n\t\t\t\t+ \"id INTEGER PRIMARY KEY,\"\n\t\t\t\t+ \"uniqueId string,\"\n\t\t\t\t+ \"path string,\"\n\t\t\t\t+ \"name string,\"\n\t\t\t\t+ \"size int,\"\n\t\t\t\t+ \"lastChanged time\"\n\t\t\t\t+ \")\";\n\t\treturn str;\t\n\t}", "PivotTable createPivotTable();", "Report createReport();", "private String getCommitTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table VCS_COMMIT(\");\n \t\tbuilder.append(\"VCS_COMMIT_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"BEFORE_REVISION_ID LONG,\");\n \t\tbuilder.append(\"AFTER_REVISION_ID LONG,\");\n \t\tbuilder.append(\"BEFORE_REVISION_IDENTIFIER TEXT,\");\n \t\tbuilder.append(\"AFTER_REVISION_IDENTIFIER TEXT\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "TableOrAlias createTableOrAlias();", "private String getCloneSetLinkTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CLONE_SET_LINK(\");\n \t\tbuilder.append(\"CLONE_SET_LINK_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"BEFORE_ELEMENT_ID LONG,\");\n \t\tbuilder.append(\"AFTER_ELEMENT_ID LONG,\");\n \t\tbuilder.append(\"BEFORE_REVISION_ID LONG,\");\n \t\tbuilder.append(\"AFTER_REVISION_ID LONG,\");\n \t\tbuilder.append(\"CHANGED_ELEMENTS INTEGER,\");\n \t\tbuilder.append(\"ADDED_ELEMENTS INTEGER,\");\n \t\tbuilder.append(\"DELETED_ELEMENTS INTEGER,\");\n \t\tbuilder.append(\"CO_CHANGED_ELEMENTS INTEGER,\");\n \t\tbuilder.append(\"CODE_FRAGMENT_LINKS TEXT NOT NULL\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "public abstract void appendReportEntryValues(ReportRow entry);", "public void setSourceTable(String sourceTable);", "PivotForClause createPivotForClause();", "public Mytable(String alias) {\n this(DSL.name(alias), MYTABLE);\n }", "UnpivotTable createUnpivotTable();", "@Override\n protected Map<TableUniqueName, String> tableSubstitution() {\n return ImmutableMap.of();\n }", "private String getCodeFragmentGenealogyTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CODE_FRAGMENT_GENEALOGY(\");\n \t\tbuilder.append(\"CODE_FRAGMENT_GENEALOGY_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder.append(\"END_REVISION_ID LONG,\");\n \t\tbuilder.append(\"CODE_FRAGMENTS TEXT NOT NULL,\");\n \t\tbuilder.append(\"CODE_FRAGMENT_LINKS TEXT NOT NULL,\");\n \t\tbuilder.append(\"CHANGES INTEGER\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "private void populateTable(Vector data) {\n Vector columnNames = ViewStrings.getShareColumnNames();\n ((ShareTraderTable) table).updateTable(data, columnNames);\n }", "public void setup(ObservableList<Report> rpts, TableColumn<Report, String>[] reportColumns,\n String[] reportColumnReferences, String[] reportColumnNames) {\n for (int i=0; i < reportColumns.length; i++) {\n reportTable.getColumns().add(reportColumns[i]);\n reportColumns[i].setCellValueFactory(new PropertyValueFactory<>(reportColumnReferences[i]));\n reportColumns[i].setMinWidth(reportTable.getPrefWidth() / reportColumns.length);\n reportColumns[i].setText(reportColumnNames[i]);\n }\n reportTable.setItems(rpts);\n }", "public ReportVersionArtefact() {\n this(\"report_version_artefact\", null);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"O\\\"6T\");\n File file0 = MockFile.createTempFile(\"<*kYz\", \"BLOB\");\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(file0);\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n SQLUtil.renderCreateTable(defaultDBTable0, true, nameSpec0, mockPrintWriter0);\n assertNull(defaultDBTable0.getDoc());\n }", "private void createVersionTable(SQLiteDatabase db) {\n // SQL statement to create version table\n String CREATE_VERSION_TABLE = \"CREATE TABLE IF NOT EXISTS \" + VERSION_TABLE_NAME + \" (\" +\n NAME_ID + \" INTEGER PRIMARY KEY,\" +\n NAME_FULL_NAME + \" TEXT,\" +\n NAME_SLUG + \" TEXT,\" +\n NAME_ANDROID_VERSION + \" TEXT,\" +\n NAME_CHANGELOG + \" TEXT,\" +\n NAME_CREATED_AT + \" TEXT,\" +\n NAME_PUBLISHED_AT + \" TEXT,\" +\n NAME_DOWNLOADS + \" INTEGER,\" +\n NAME_VERSION_NUMBER + \" INTEGER,\" +\n NAME_FULL_ID + \" INTEGER,\" +\n NAME_DELTA_ID + \" INTEGER\" +\n \")\";\n // create version table\n db.execSQL(CREATE_VERSION_TABLE);\n }", "FromTable createFromTable();", "public interface PathAliasHandler {\n String toAliasedColumn(FieldExpression fieldExpression);\n}", "public abstract void buildTable(PdfPTable table);", "public DataMigration(int version) {\n super(MigrationType.DATA, version);\n }", "private void createTableViewer(SashForm aSashForm) {\n\n\t\tList<AdapterFactoryImpl> factories = new ArrayList<AdapterFactoryImpl>();\n\t\tfactories.add(new ReportItemProviderAdapterFactory());\n\t\tfactories.add(new ResourceItemProviderAdapterFactory());\n\t\tfactories.add(new ReflectiveItemProviderAdapterFactory());\n\n\t\tComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(\n\t\t\t\tfactories);\n\n\t\tTable table = new Table(aSashForm, SWT.SINGLE | SWT.H_SCROLL\n\t\t\t\t| SWT.V_SCROLL | SWT.FULL_SELECTION);\n\t\tcreateTable(table);\n\n\t\t// Create the table viewer\n\t\tthis.viewer = new TableViewer(table);\n\n\t\t// Set the content provider\n\t\tthis.contentProvider = new ReportAdapterFactoryContentProvider(\n\t\t\t\tadapterFactory);\n\t\tthis.viewer.setContentProvider(this.contentProvider);\n\n\t\t// set the label provider\n\t\tthis.labelProvider = new ReportAdapterFactoryLabelProvider(adapterFactory);\n\t\tthis.viewer.setLabelProvider(this.labelProvider);\n\n\t\tthis.viewer.setUseHashlookup(true);\n\n\t\tGridData layoutData = new GridData();\n\t\tthis.viewer.getControl().setLayoutData(layoutData);\n\n\t\t// add a selection action listener\n\t\tthis.viewer.addSelectionChangedListener(new ISelectionChangedListener() {\n\t\t\tpublic void selectionChanged(SelectionChangedEvent aEvent) {\n\t\t\t\tif (aEvent.getSelection() instanceof IStructuredSelection) {\n\t\t\t\t\tIStructuredSelection lSelection = (IStructuredSelection) aEvent\n\t\t\t\t\t\t\t.getSelection();\n\n\t\t\t\t\tString lLog = null;\n\t\t\t\t\tEList lExceptions;\n\t\t\t\t\t// we are interrested in GenericReport, TefReport and\n\t\t\t\t\t// ReportInfo\n\t\t\t\t\tif (lSelection.getFirstElement() instanceof GenericReport) {\n\t\t\t\t\t\tGenericReport lReport = (GenericReport) lSelection\n\t\t\t\t\t\t\t\t.getFirstElement();\n\n\t\t\t\t\t\t// populate the browser area\n\t\t\t\t\t\tlLog = lReport.getLog();\n\t\t\t\t\t\tupdateBrowser(lLog);\n\n\t\t\t\t\t\t// populate the exceptions area\n\t\t\t\t\t\tlExceptions = lReport.getExecptionReport();\n\t\t\t\t\t\tupdateExceptions(lExceptions);\n\n\t\t\t\t\t} else if (lSelection.getFirstElement() instanceof TefReport) {\n\t\t\t\t\t\tTefReport lReport = (TefReport) lSelection\n\t\t\t\t\t\t\t\t.getFirstElement();\n\n\t\t\t\t\t\t// populate the browser area\n\t\t\t\t\t\tlLog = lReport.getLog();\n\t\t\t\t\t\tupdateBrowser(lLog);\n\n\t\t\t\t\t\t// populate the exceptions\n\t\t\t\t\t\tlExceptions = lReport.getExecptionReport();\n\t\t\t\t\t\tupdateExceptions(lExceptions);\n\n\t\t\t\t\t} else if (lSelection.getFirstElement() instanceof ReportInfo) {\n\t\t\t\t\t\tFile lRoot = getXMLLocationFromModel();\n\t\t\t\t\t\tif (lRoot != null) {\n\t\t\t\t\t\t\tString lPath = lRoot.getAbsolutePath().replaceAll(\n\t\t\t\t\t\t\t\t\t\"\\\\.xml\", \"\\\\.html\");\n\t\t\t\t\t\t\tFile lHtmlFile = new File(lPath);\n\t\t\t\t\t\t\tif (lHtmlFile.exists()) {\n\t\t\t\t\t\t\t\tiBrowser.setUrl(lPath);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tiBrowser.setText(iFileDoesNotExist\n\t\t\t\t\t\t\t\t\t\t+ lHtmlFile.toString()\n\t\t\t\t\t\t\t\t\t\t+ iFileDoesNotExist2);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tiBrowser.setText(iNoHtmlLog);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tiException.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tprivate void updateExceptions(EList lExceptions) {\n\t\t\t\tiException.setText(\"\");\n\t\t\t\tIterator lIter = lExceptions.iterator();\n\t\t\t\twhile (lIter.hasNext()) {\n\t\t\t\t\tExceptionReport lEx = (ExceptionReport) lIter.next();\n\t\t\t\t\tString lMessage = lEx.getMessage();\n\t\t\t\t\tString lExStack = lEx.getStackTrace();\n\t\t\t\t\tiException.append(lMessage + \"\\n\" + lExStack + iLineBreak );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tprivate void updateBrowser(String lLog) {\n\t\t\t\tif (lLog != null) {\n\t\t\t\t\t// this path is relative to the path of the xml file\n\t\t\t\t\tFile lRoot = getXMLLocationFromModel();\n\t\t\t\t\tif (lRoot != null) {\n\t\t\t\t\t\t// an html log file\n\t\t\t\t\t\tFile lHtmlFile = new File(lRoot.getParent(), lLog);\n\t\t\t\t\t\tif (lHtmlFile.exists()) {\n\t\t\t\t\t\t\tiBrowser.setUrl(lHtmlFile.getAbsolutePath());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tiBrowser\n\t\t\t\t\t\t\t\t\t.setText(iFileDoesNotExist\n\t\t\t\t\t\t\t\t\t\t\t+ lHtmlFile.toString()\n\t\t\t\t\t\t\t\t\t\t\t+ iFileDoesNotExist2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tiBrowser.setText(iNoHtmlLog);\n\t\t\t\t}\n\t\t\t\tiBrowser.update();\n\t\t\t}\n\t\t});\n\t}", "private String generateRevisionSQLStatement(boolean tableExists,\n\t\t\tMap<String, Set<Integer>> dataSourceToUse)\n\t{\n\t\tStringBuffer output = new StringBuffer();\n\n\t\t// Statement creates table for Template Id -> Revision Id\n\t\toutput.append(\"CREATE TABLE IF NOT EXISTS \"\n\t\t\t\t+ GeneratorConstants.TABLE_TPLID_REVISIONID\n\t\t\t\t+ \" (\"\n\t\t\t\t+ \"templateId INTEGER UNSIGNED NOT NULL,\"\n\t\t\t\t+ \"revisionId INTEGER UNSIGNED NOT NULL, UNIQUE(templateId, revisionId));\\r\\n\");\n\n\t\t// Statement for data into templateId -> revisionId\n\t\toutput.append(this.generateSQLStatementForDataInTable(dataSourceToUse,\n\t\t\t\tGeneratorConstants.TABLE_TPLID_REVISIONID));\n\n\t\tif (!tableExists) {\n\t\t\t// Create index statement if table does not exists\n\t\t\toutput.append(\"CREATE INDEX revisionIdx ON \"\n\t\t\t\t\t+ GeneratorConstants.TABLE_TPLID_REVISIONID\n\t\t\t\t\t+ \"(revisionID);\");\n\t\t\toutput.append(\"\\r\\n\");\n\t\t}\n\n\t\treturn output.toString();\n\t}", "private String getQualifiedSrcDsTableName() {\n return sourceDB + \".\" + DATASET_TABLE_NAME;\n }", "public abstract void transformReportEntry(ReportRow entry);", "public TableVersion() {\n this(DSL.name(\"table_version\"), null);\n }", "private String getCloneGenealogyTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CLONE_GENEALOGY(\");\n \t\tbuilder.append(\"CLONE_GENEALOGY_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder.append(\"END_REVISION_ID LONG,\");\n \t\tbuilder.append(\"CLONES TEXT NOT NULL,\");\n \t\tbuilder.append(\"CLONE_LINKS TEXT NOT NULL,\");\n \t\tbuilder.append(\"CHANGES INTEGER,\");\n \t\tbuilder.append(\"ADDITIONS INTEGER,\");\n \t\tbuilder.append(\"DELETIONS INTEGER,\");\n \t\tbuilder.append(\"DEAD INTEGER\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "private String getFileTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table FILE(\");\n \t\tbuilder.append(\"FILE_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"FILE_PATH TEXT,\");\n \t\tbuilder.append(\"START_REVISION_ID LONG,\");\n \t\tbuilder.append(\"END_REVISION_ID LONG\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "public static VDF getViewDefinition()\n {\n if ( localVdf == null )\n {\n VDFEntry [] vdfEntries = {\n new VDFEntry((int)1, \"OutUnqassGrp\", \"\", \"\", \"MA\", VDFEntry.TYPE_INT, (\n short)1, (short)0, 4, (short)0, null), \n new VDFEntry((int)2, \"OutUnqassGrp\", \"\", \"\", \"AC\", VDFEntry.TYPE_CHAR, (\n short)100, (short)0, 1, (short)0, null), \n new VDFEntry((int)3, \"OutUnqassGrp\", \"OutGUniqueAssignment\", \n \"UniqueAssignment\", \"Year\", VDFEntry.TYPE_SHORT, (short)100, (short)0,\n 2, (short)0, null), \n new VDFEntry((int)4, \"OutUnqassGrp\", \"OutGUniqueAssignment\", \n \"UniqueAssignment\", \"Period\", VDFEntry.TYPE_SHORT, (short)100, (short)\n 0, 2, (short)0, null), \n new VDFEntry((int)5, \"OutUnqassGrp\", \"OutGUniqueAssignment\", \n \"UniqueAssignment\", \"UniqueNr\", VDFEntry.TYPE_INT, (short)100, (short)\n 0, 8, (short)0, null), \n new VDFEntry((int)6, \"OutUnqassGrp\", \"OutGUniqueAssignment\", \n \"UniqueAssignment\", \"MkStudyUnitCode\", VDFEntry.TYPE_STRING, (short)\n 100, (short)0, 7, (short)0, null), \n new VDFEntry((int)7, \"OutUnqassGrp\", \"OutGUniqueAssignment\", \n \"UniqueAssignment\", \"AssignmentNr\", VDFEntry.TYPE_SHORT, (short)100, (\n short)0, 2, (short)0, null), \n new VDFEntry((int)8, \"OutUnqassGrp\", \"OutGUniqueAssignment\", \n \"UniqueAssignment\", \"NrOfQuestions\", VDFEntry.TYPE_SHORT, (short)100, \n (short)0, 2, (short)0, null), \n new VDFEntry((int)9, \"OutUnqassGrp\", \"OutGUniqueAssignment\", \n \"UniqueAssignment\", \"Type\", VDFEntry.TYPE_STRING, (short)100, (short)\n 0, 1, (short)0, null), \n new VDFEntry((int)10, \"OutUnqassGrp\", \"OutGUniqueAssignment\", \n \"UniqueAssignment\", \"NegativeMarkFactor\", VDFEntry.TYPE_SHORT, (short)\n 100, (short)0, 2, (short)0, null), \n new VDFEntry((int)11, \"OutUnqassGrp\", \"OutGUniqueAssignment\", \n \"UniqueAssignment\", \"MaxCredits\", VDFEntry.TYPE_SHORT, (short)100, (\n short)0, 2, (short)0, null), \n new VDFEntry((int)12, \"OutUnqassGrp\", \"OutGUniqueAssignment\", \n \"UniqueAssignment\", \"CreditSystem\", VDFEntry.TYPE_SHORT, (short)100, (\n short)0, 2, (short)0, null), \n new VDFEntry((int)13, \"OutUnqassGrp\", \"OutGUniqueAssignment\", \n \"UniqueAssignment\", \"PassMarkPercentage\", VDFEntry.TYPE_SHORT, (short)\n 100, (short)0, 2, (short)0, null), \n new VDFEntry((int)14, \"OutUnqassGrp\", \"OutGUniqueAssignment\", \n \"UniqueAssignment\", \"ClosingDate\", VDFEntry.TYPE_DATE, (short)100, (\n short)0, 8, (short)0, null), \n new VDFEntry((int)15, \"OutUnqassGrp\", \"OutGUniqueAssignment\", \n \"UniqueAssignment\", \"Compulsory\", VDFEntry.TYPE_STRING, (short)100, (\n short)0, 1, (short)0, null), \n new VDFEntry((int)16, \"OutUnqassGrp\", \"OutGUniqueAssignment\", \n \"UniqueAssignment\", \"TsaUniqueNr\", VDFEntry.TYPE_INT, (short)100, (\n short)0, 8, (short)0, null), \n new VDFEntry((int)17, \"OutUnqassGrp\", \"OutGYearMarkCalculation\", \n \"YearMarkCalculation\", \"Type\", VDFEntry.TYPE_STRING, (short)100, (\n short)0, 1, (short)0, null), \n new VDFEntry((int)18, \"OutUnqassGrp\", \"OutGYearMarkCalculation\", \n \"YearMarkCalculation\", \"NormalWeight\", VDFEntry.TYPE_DOUBLE, (short)\n 100, (short)0, 6, (short)2, null), \n new VDFEntry((int)19, \"OutUnqassGrp\", \"OutGYearMarkCalculation\", \n \"YearMarkCalculation\", \"OptionalityGc3\", VDFEntry.TYPE_STRING, (short)\n 100, (short)0, 1, (short)0, null), \n };\n localVdf = new VDF(vdfEntries);\n }\n try {\n VDF result = (VDF)localVdf.clone();\n result.initViewData();\n return result;\n } catch( CloneNotSupportedException e ) {\n return null;\n }\n }", "@Test\n public void testIdAssignmentWithNoReference() throws Exception {\n RowKeyFormat2 format = makeHashPrefixedRowKeyFormat();\n // Reference layout with a single column: \"family_name:column_name\"\n final TableLayoutDesc desc = TableLayoutDesc.newBuilder()\n .setName(\"table_name\")\n .setKeysFormat(format)\n .setVersion(TABLE_LAYOUT_VERSION)\n .setLocalityGroups(Lists.newArrayList(\n LocalityGroupDesc.newBuilder()\n .setName(\"locality_group_name\")\n .setInMemory(false)\n .setTtlSeconds(84600)\n .setMaxVersions(1)\n .setCompressionType(CompressionType.GZ)\n .setFamilies(Lists.newArrayList(\n FamilyDesc.newBuilder()\n .setName(\"family_name\")\n .setColumns(Lists.newArrayList(\n ColumnDesc.newBuilder()\n .setName(\"column_name\")\n .setColumnSchema(CellSchema.newBuilder()\n .setStorage(SchemaStorage.UID)\n .setType(SchemaType.INLINE)\n .setValue(\"\\\"string\\\"\")\n .build())\n .build(),\n ColumnDesc.newBuilder()\n .setName(\"column2_name\")\n .setColumnSchema(CellSchema.newBuilder()\n .setStorage(SchemaStorage.UID)\n .setType(SchemaType.INLINE)\n .setValue(\"\\\"bytes\\\"\")\n .build())\n .build()\n ))\n .build(),\n FamilyDesc.newBuilder()\n .setName(\"family2_name\")\n .setMapSchema(CellSchema.newBuilder()\n .setStorage(SchemaStorage.FINAL)\n .setType(SchemaType.COUNTER)\n .build())\n .build()\n ))\n .build(),\n LocalityGroupDesc.newBuilder()\n .setName(\"locality_group2_name\")\n .setInMemory(false)\n .setTtlSeconds(84600)\n .setMaxVersions(1)\n .setCompressionType(CompressionType.GZ)\n .setFamilies(Lists.newArrayList(\n FamilyDesc.newBuilder()\n .setName(\"family3_name\")\n .setMapSchema(CellSchema.newBuilder()\n .setStorage(SchemaStorage.FINAL)\n .setType(SchemaType.COUNTER)\n .build())\n .build()\n ))\n .build()\n ))\n .build();\n\n final FijiTableLayout layout = FijiTableLayout.newLayout(desc);\n final FijiTableLayout.LocalityGroupLayout lgLayout =\n layout.getLocalityGroupMap().get(\"locality_group_name\");\n assertEquals(1, lgLayout.getId().getId());\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout fLayout =\n lgLayout.getFamilyMap().get(\"family_name\");\n assertEquals(1, fLayout.getId().getId());\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout.ColumnLayout cLayout =\n fLayout.getColumnMap().get(\"column_name\");\n assertEquals(1, cLayout.getId().getId());\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout.ColumnLayout c2Layout =\n fLayout.getColumnMap().get(\"column2_name\");\n assertEquals(2, c2Layout.getId().getId());\n\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout f2Layout =\n lgLayout.getFamilyMap().get(\"family2_name\");\n assertEquals(2, f2Layout.getId().getId());\n\n final FijiTableLayout.LocalityGroupLayout lg2Layout =\n layout.getLocalityGroupMap().get(\"locality_group2_name\");\n assertEquals(2, lg2Layout.getId().getId());\n }", "public Mytable(Name alias) {\n this(alias, MYTABLE);\n }", "protected abstract String upgradeSql(int oldVersion, int newVersion);", "public abstract DataTableDefinition clone();", "private Builder() {\n super(net.explorys.samhat.z12.r837.X837Ins_2305_CR7_HomeHealthCarePlanInformation.SCHEMA$);\n }", "public String getSourceTable();", "public static final String getAuthCollabOverKWTableCreationSQL(String shortname) {\r\n\t\tString crTopicTableSQL = \"CREATE TABLE IF NOT EXISTS dblp_authcollabkw_\" +shortname +\r\n\t\t\"(keyword varchar(255) NOT NULL, \" + \r\n\t\t\"author varchar(70) NOT NULL, \" + \r\n\t\t\" collabauth varchar(70) NOT NULL, \" +\r\n\t\t\"collabcnt int NOT NULL\" +\r\n\t\t\" ) \";\r\n\t\treturn crTopicTableSQL;\r\n\t}", "private void createDataTable() {\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoEditors.TABLE + \" (ID INT IDENTITY PRIMARY KEY, NAME VARCHAR(150) NOT NULL UNIQUE)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.TABLE + \" (ID INT IDENTITY PRIMARY KEY, TITLE VARCHAR(150) NOT NULL UNIQUE, YEAR INT, ISBN10 VARCHAR(20), ISBN13 VARCHAR(13), NOTE INT, PAGES_NUMBER INT, RESUME VARCHAR(2000), THE_EDITOR_FK INT, THE_KIND_FK INT, THE_LANGUAGE_FK INT, THE_LENDING_FK INT, THE_SAGA_FK INT, THE_TYPE_FK INT)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.BOOKS_AUTHOR_TABLE + \" (THE_BOOK_FK INT NOT NULL, THE_AUTHOR_FK INT NOT NULL)\");\n\n jdbcTemplate.update(\"CREATE INDEX BOOK_EDITOR_IDX ON \" + IDaoEditors.TABLE + \"(ID)\");\n jdbcTemplate.update(\"CREATE INDEX BOOKS_IDX ON \" + IDaoBooks.TABLE + \"(ID)\");\n }", "private Builder() {\n super(com.twc.bigdata.views.avro.viewing_info.SCHEMA$);\n }", "public void testEmbeddedFrom() {\n\n String\tsql\t= \"SELECT t.AD_Table_ID, t.TableName, cc.CCount \" + \"FROM AD_Table t,\" + \"(SELECT COUNT(ColumnName) AS CCount FROM AD_Column) cc \" + \"WHERE t.IsActive='Y'\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[AD_Column|AD_Table=t,(##)=cc|1]\", fixture.toString());\n }", "public DataResourceBuilder _version_(String _version_) {\n this.dataResourceImpl.setVersion(_version_);\n return this;\n }", "public void generateReport(ReportGenerationData data)throws ChangeApplicationException;", "public String getNextTableSqlAlias() {\n return \"t\"+(aliasCounter++);\n }", "public abstract String[] createTablesStatementStrings();", "Table8 create(Table8 table8);", "private void upgradeFromVersion11(SQLiteDatabase database){\n\t\tString TMPTABLE = \"TMPRESULTSTABLE\";\n\t\tString CREATETMPTABLE = \"create table \"+TMPTABLE+\n\t\t\t\t\" (\"+iStayHealthyDatabaseSchema.KEY_ID+\" integer primary key autoincrement, \"+iStayHealthyDatabaseSchema.CD4+\" integer,\"+iStayHealthyDatabaseSchema.RESULTSDATE+\" long,\"\n\t\t\t\t+iStayHealthyDatabaseSchema.VIRALLOAD+\" integer,\"+iStayHealthyDatabaseSchema.CD4PERCENT+\" real,\"+iStayHealthyDatabaseSchema.HEPCVIRALLOAD+\" integer,\"+iStayHealthyDatabaseSchema.GLUCOSE+\" real,\"\n\t\t\t\t+iStayHealthyDatabaseSchema.TOTALCHOLESTEROL+\" real,\"+iStayHealthyDatabaseSchema.LDL+\" real,\"+iStayHealthyDatabaseSchema.HDL+\" real,\"+iStayHealthyDatabaseSchema.TRIGYLCERIDE+\" real,\"+iStayHealthyDatabaseSchema.HEARTRATE+\" integer,\"\n\t\t\t\t+iStayHealthyDatabaseSchema.SYSTOLE+\" integer,\"+iStayHealthyDatabaseSchema.DIASTOLE+\" integer,\"+iStayHealthyDatabaseSchema.OXYGENLEVEL+\" real, \"+iStayHealthyDatabaseSchema.WEIGHT+\" real, \"\n\t\t\t\t+iStayHealthyDatabaseSchema.TINTABEEKEY+\" text, \"+iStayHealthyDatabaseSchema.GUIDTEXT+\" GUID);\";\n\t\t//create tmp table\n\t\tdatabase.execSQL(CREATETMPTABLE);\n\t\t\n\t\t//SQLite copy data from results to tmp table statement\n\t\tString COPYTOSTRING = \"insert into \"+TMPTABLE+\" (\"+\n\t\t\t\tiStayHealthyDatabaseSchema.CD4+\", \"+iStayHealthyDatabaseSchema.RESULTSDATE+\", \"+iStayHealthyDatabaseSchema.VIRALLOAD+\", \"+iStayHealthyDatabaseSchema.CD4PERCENT+\", \"+iStayHealthyDatabaseSchema.GUIDTEXT+\" ) select \"+\n\t\t\t\tiStayHealthyDatabaseSchema.CD4+\", \"+iStayHealthyDatabaseSchema.RESULTSDATE+\", \"+iStayHealthyDatabaseSchema.VIRALLOAD+\", \"+iStayHealthyDatabaseSchema.CD4PERCENT+\", \"+iStayHealthyDatabaseSchema.GUIDTEXT+\n\t\t\t\t\" from \"+iStayHealthyDatabaseSchema.RESULTSTABLE;\n\n\t\t//execute SQL copy statement\n\t\tdatabase.execSQL(COPYTOSTRING);\n\t\t//drop results table since we copied the relevant data across into tmp table\n\t\tdatabase.execSQL(\"drop table if exists \"+iStayHealthyDatabaseSchema.RESULTSTABLE);\n\t\t//recreate results table\n\t\tdatabase.execSQL(iStayHealthyDatabaseSchema.CREATERESULTSTABLE);\n\n\t\t//SQLite copy data from tmp to results table statement\n\t\tString COPYFROMSTRING = \"insert into \"+iStayHealthyDatabaseSchema.RESULTSTABLE+\" (\"\n\t\t\t\t+iStayHealthyDatabaseSchema.CD4+\", \"+iStayHealthyDatabaseSchema.RESULTSDATE+\", \"+iStayHealthyDatabaseSchema.VIRALLOAD+\", \"+iStayHealthyDatabaseSchema.CD4PERCENT+\", \"+iStayHealthyDatabaseSchema.GUIDTEXT+\" ) select \"\n\t\t\t\t+iStayHealthyDatabaseSchema.CD4+\", \"+iStayHealthyDatabaseSchema.RESULTSDATE+\", \"+iStayHealthyDatabaseSchema.VIRALLOAD+\", \"+iStayHealthyDatabaseSchema.CD4PERCENT+\", \"+iStayHealthyDatabaseSchema.GUIDTEXT+\n\t\t\t\t\" from \"+TMPTABLE;\t\t\t\n\t\t//execute SQL copy statement\n\t\tdatabase.execSQL(COPYFROMSTRING);\n\t\t//drop tmp table since we copied the relevant data across back into the results table\n\t\tdatabase.execSQL(\"drop table if exists \"+TMPTABLE);\n\t}", "AliasVariable createAliasVariable();", "private String getCloneSetTableQuery() {\n \t\tfinal StringBuilder builder = new StringBuilder();\n \n \t\tbuilder.append(\"create table CLONE_SET(\");\n \t\tbuilder.append(\"CLONE_SET_ID LONG PRIMARY KEY,\");\n \t\tbuilder.append(\"OWNER_REVISION_ID LONG,\");\n \t\tbuilder.append(\"ELEMENTS TEXT NOT NULL,\");\n \t\tbuilder.append(\"NUMBER_OF_ELEMENTS INTEGER\");\n \t\tbuilder.append(\")\");\n \n \t\treturn builder.toString();\n \t}", "TABLE createTABLE();", "void updateReport(AllTablesReportDelta delta);", "AliasStatement createAliasStatement();", "@IID(\"{A2ABF067-6ECA-4C19-9961-8654719A85F7}\")\npublic interface IReportToReportProjectTemplateLink extends IBaseField {\n // Methods:\n /**\n * <p>\n * The ID of the project template element referenced by this link.\n * </p>\n * <p>\n * Getter method for the COM property \"TemplateID\"\n * </p>\n * @return Returns a value of type int\n */\n\n @DISPID(14) //= 0xe. The runtime will prefer the VTID if present\n @VTID(20)\n int templateID();\n\n\n /**\n * <p>\n * The ID of the project template element referenced by this link.\n * </p>\n * <p>\n * Setter method for the COM property \"TemplateID\"\n * </p>\n * @param pVal Mandatory int parameter.\n */\n\n @DISPID(14) //= 0xe. The runtime will prefer the VTID if present\n @VTID(21)\n void templateID(\n int pVal);\n\n\n /**\n * <p>\n * The ID of the report (analysis item) referenced by this link.\n * </p>\n * <p>\n * Getter method for the COM property \"ReportID\"\n * </p>\n * @return Returns a value of type int\n */\n\n @DISPID(15) //= 0xf. The runtime will prefer the VTID if present\n @VTID(22)\n int reportID();\n\n\n /**\n * <p>\n * The ID of the report (analysis item) referenced by this link.\n * </p>\n * <p>\n * Setter method for the COM property \"ReportID\"\n * </p>\n * @param pVal Mandatory int parameter.\n */\n\n @DISPID(15) //= 0xf. The runtime will prefer the VTID if present\n @VTID(23)\n void reportID(\n int pVal);\n\n\n // Properties:\n}", "protected void createExpandedNameTable( )\r\n {\r\n\r\n super.createExpandedNameTable();\r\n\r\n m_ErrorExt_TypeID =\r\n m_expandedNameTable.getExpandedTypeID(S_NAMESPACE, S_EXT_ERROR, DTM.ELEMENT_NODE);\r\n\r\n m_SQLError_TypeID =\r\n m_expandedNameTable.getExpandedTypeID(S_NAMESPACE, S_SQL_ERROR, DTM.ELEMENT_NODE);\r\n\r\n m_Message_TypeID =\r\n m_expandedNameTable.getExpandedTypeID(S_NAMESPACE, S_MESSAGE, DTM.ELEMENT_NODE);\r\n\r\n m_Code_TypeID =\r\n m_expandedNameTable.getExpandedTypeID(S_NAMESPACE, S_CODE, DTM.ELEMENT_NODE);\r\n\r\n m_State_TypeID =\r\n m_expandedNameTable.getExpandedTypeID(S_NAMESPACE, S_STATE, DTM.ELEMENT_NODE);\r\n\r\n m_SQLWarning_TypeID =\r\n m_expandedNameTable.getExpandedTypeID(S_NAMESPACE, S_SQL_WARNING, DTM.ELEMENT_NODE);\r\n }", "public MonthlyValuesTable(Database database) \n {\n //Constructor calls DbTable's constructor\n super(database);\n setTableName(\"monthlyvalues\");\n }", "public org.dhis2.ns.schema.dxf2.ReportTableDataElementDocument.ReportTableDataElement addNewReportTableDataElement()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.dhis2.ns.schema.dxf2.ReportTableDataElementDocument.ReportTableDataElement target = null;\n target = (org.dhis2.ns.schema.dxf2.ReportTableDataElementDocument.ReportTableDataElement)get_store().add_element_user(REPORTTABLEDATAELEMENT$0);\n return target;\n }\n }", "private void register_to_data_table() {\n\n\t\t\tfinal DataClient dc = this.task.data_client;\n\t\t\tfinal Transaction tx = dc.beginTransaction();\n\n\t\t\tfinal String repoid = this.op_repo;\n\t\t\tString uid = this.op_user;\n\n\t\t\tAliasDAO alias_dao = new AliasDAO(dc);\n\t\t\tuid = alias_dao.findUser(uid);\n\n\t\t\tRepoDTM repoinfo = dc.get(uid, RepoDTM.class);\n\t\t\tif (repoinfo == null) {\n\t\t\t\trepoinfo = new RepoDTM();\n\t\t\t\tdc.insert(uid, repoinfo);\n\t\t\t}\n\n\t\t\tMap<String, RepoItem> tab = repoinfo.getTable();\n\t\t\tif (tab.containsKey(repoid)) {\n\t\t\t\tString msg = \"the repo with name [%s] exists.\";\n\t\t\t\tmsg = String.format(msg, repoid);\n\t\t\t\tthrow new SnowflakeException(msg);\n\t\t\t}\n\n\t\t\tURI location = this.repo.getComponentContext().getURI();\n\n\t\t\tRepoItem item = new RepoItem();\n\t\t\titem.setName(repoid);\n\t\t\titem.setLocation(location.toString());\n\t\t\titem.setDescriptor(this.getRepoDescriptorId().toString());\n\t\t\ttab.put(repoid, item);\n\n\t\t\tdc.update(repoinfo);\n\n\t\t\ttx.commit();\n\n\t\t}", "@Test(timeout = 4000)\n public void test123() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(\"Illegal column type format: \");\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n SQLUtil.renderCreateTable(defaultDBTable0, false, nameSpec0, mockPrintWriter0);\n assertNull(defaultDBTable0.getDoc());\n }", "@Override\n\tpublic String getProviderName() {\n\t\treturn \"Table Based Report\";\n\t}", "FromTableJoin createFromTableJoin();", "ReservationReportSchema reportUrl();", "private void exportToInsertSql() {\n\n if (destTableNameList.isEmpty()) {\n JOptionPane.showMessageDialog(this, \"No table is selected.\");\n return;\n }\n final StringBuilder sb = new StringBuilder();\n for (final String tableName : destTableNameList) {\n utils.executeQuerySql(\"SELECT * FROM \" + tableName + \" WHERE 1=2\", new DataMetaUtils.QueryAction<Object>() {\n @Override\n public Object callback(ResultSet rs) throws SQLException {\n StringBuilder tableTriggerSb = new StringBuilder();\n ResultSetMetaData metaData = rs.getMetaData();\n String auditTableName = tableName + \"_AL\";\n tableTriggerSb.append(\"CREATE TABLE \").append(auditTableName).append(\" (\\n\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n tableTriggerSb.append(\" \");\n tableTriggerSb.append(metaData.getColumnName(i + 1));\n String typeName = metaData.getColumnTypeName(i + 1);\n tableTriggerSb.append(\" \")\n .append(typeName);\n if (metaData.getPrecision(i + 1) > 0) {\n tableTriggerSb.append(\"(\")\n .append(metaData.getPrecision(i + 1));\n if (metaData.getScale(i + 1) > 0) {\n tableTriggerSb.append(\",\")\n .append(metaData.getScale(i + 1));\n }\n tableTriggerSb.append(\")\");\n }\n\n tableTriggerSb.append(\",\\n\");\n\n }\n tableTriggerSb.append(\" ACT_TYPE CHAR(1),\\n\")\n .append(\" ACT_BY VARCHAR2(50),\\n\")\n .append(\" ACT_TIME DATE\\n\");\n tableTriggerSb.append(\");\\n\");\n\n\n //create trigger\n StringBuilder newInsert = new StringBuilder();\n StringBuilder delInsert = new StringBuilder();\n newInsert.append(\"INSERT INTO \").append(auditTableName).append(\"(\");\n delInsert.append(\"INSERT INTO \").append(auditTableName).append(\"(\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n\n newInsert.append(metaData.getColumnName(i + 1));\n newInsert.append(\",\");\n delInsert.append(metaData.getColumnName(i + 1));\n delInsert.append(\",\");\n }\n newInsert.append(\"ACT_TYPE,\")\n .append(\"ACT_BY,\")\n .append(\"ACT_TIME) VALUES(\");\n delInsert.append(\"ACT_TYPE,\")\n .append(\"ACT_BY,\")\n .append(\"ACT_TIME) VALUES(\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n\n newInsert.append(\":NEWROW.\").append(metaData.getColumnName(i + 1));\n newInsert.append(\",\");\n delInsert.append(\":OLDROW.\").append(metaData.getColumnName(i + 1));\n delInsert.append(\",\");\n }\n newInsert.append(\"v_actType,\")\n .append(\":NEWROW.UPDATED_BY,\")\n .append(\"sysdate);\\n\");\n delInsert.append(\"'D',\")\n .append(\"USER,\")\n .append(\"sysdate);\\n\");\n\n tableTriggerSb.append(\"CREATE OR REPLACE TRIGGER \")\n .append(\"TR_AL_\")\n .append(tableName)\n .append(\" \\n\")\n .append(\"AFTER INSERT OR DELETE OR UPDATE ON \")\n .append(tableName)\n .append(\" \\n\")\n .append(\"REFERENCING OLD AS \\\"OLDROW\\\" NEW AS \\\"NEWROW\\\" \\n\"\n + \"FOR EACH ROW \\n\"\n + \"ENABLE\\n\")\n .append(\"DECLARE\\n\")\n .append(\"v_actType char(1);\\n\")\n .append(\"BEGIN\\n\")\n .append(\"IF INSERTING OR UPDATING THEN \\n\"\n + \"BEGIN \\n\"\n + \"IF INSERTING THEN \\n v_actType := 'I'; \\nELSE\\n v_actType := 'U';\\n END IF;\\n\");\n tableTriggerSb.append(newInsert.toString());\n tableTriggerSb.append(\"END;\\n\"\n + \" ELSIF DELETING THEN \\n\"\n + \" BEGIN \\n\");\n\n tableTriggerSb.append(delInsert.toString());\n tableTriggerSb.append(\"END;\\n\"\n + \"END IF;\\n\"\n + \"END;\\n/\\n\");\n sb.append(tableTriggerSb.toString());\n\n return null;\n }\n });\n }\n\n SqlResultForm form = new SqlResultForm(null, true);\n form.setLocationRelativeTo(null);\n form.setSqlResult(sb.toString());\n form.setTestDsKey(((ValueName) cmbDs.getSelectedItem()).getValue());\n form.setVisible(true);\n\n }", "private Repository getAssayReportRepository()\r\n {\r\n RepositoryBuilder repoBuilder = new RepositoryBuilder(\"optionalModules\", \"assayreport\", LicenseType.LABKEY_LICENSE, BranchType.TRUNK);\r\n return repoBuilder.buildRepository();\r\n }", "public PgPublicationTables(String alias) {\n this(DSL.name(alias), PG_PUBLICATION_TABLES);\n }", "public static final String getAuthKWRelTableCreationSQL(String shortname) {\r\n\t\tString crTopicTableSQL = \"CREATE TABLE IF NOT EXISTS dblp_authkw_\" +shortname +\r\n\t\t\"(author varchar(70) NOT NULL, \" +\r\n\t\t\" keyword varchar(255) NOT NULL, \" + \r\n\t\t\" PRIMARY KEY (keyword,author)) \";\r\n\t\treturn crTopicTableSQL;\r\n\t}", "public org.dhis2.ns.schema.dxf2.ReportTableDataElementsDocument.ReportTableDataElements addNewReportTableDataElements()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.dhis2.ns.schema.dxf2.ReportTableDataElementsDocument.ReportTableDataElements target = null;\n target = (org.dhis2.ns.schema.dxf2.ReportTableDataElementsDocument.ReportTableDataElements)get_store().add_element_user(REPORTTABLEDATAELEMENTS$0);\n return target;\n }\n }", "public PgPublicationTables(Name alias) {\n this(alias, PG_PUBLICATION_TABLES);\n }", "public void createVirtualTable(){\n\n\t\t\n\t\tif(DBHandler.getConnection()==null){\n\t\t\treturn;\n\t\t}\n\n\t\tif(DBHandler.tableExists(name())){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tStatement s = DBHandler.getConnection().createStatement();\n\t\t\ts.execute(\"create virtual table \"+name()+\" using fts4(\"+struct()+\")\");\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tMainFrame.print(e.getMessage());\n\t\t}\n\t}", "private String generateDataString(Table inputTable, int idxData) {\n int colsz = inputTable.getColumnSize();\n if (idxData > colsz || idxData < -1) {\n System.out.println(\"No such data in table.\");\n throw new IndexOutOfBoundsException();\n }\n StringBuilder dataBuilder = new StringBuilder();\n String currField;\n List<String> recordKeys = inputTable.getKeyList();\n for (int i = 0; i < inputTable.getColumnSize(); i++) {\n if (idxData == -1) {\n currField = inputTable.getColumnName(i);\n } else {\n currField = inputTable.select(recordKeys.get(idxData)).getField(i);\n }\n dataBuilder.append(V_DIV + EMPTY + currField);\n // fill right side of data with empty spaces\n for (int j = 0; j < getColWidth(i) - currField.length() + HPADD; j++) {\n dataBuilder.append(EMPTY);\n }\n }\n dataBuilder.append(V_DIV + NEWLN);\n return dataBuilder.toString();\n }", "@Override\n public synchronized void buildIndex(){\n for(SlotData data : slotDataList){\n data.prepareReport();\n }\n }", "interface DataTableFile extends TableDataSource {\n\n /**\n * Creates a new file of the given table. The table is initialised and\n * contains 0 row entries. If the table already exists in the database then\n * this will throw an exception.\n * <p>\n * On exit, the object will be initialised and loaded with the given table.\n *\n * @param def the definition of the table.\n */\n void create(DataTableDef def) throws IOException;\n\n /**\n * Updates a file of the given table. If the table does not exist, then it\n * is created. If the table already exists but is different, then the\n * existing table is modified to incorporate the new fields structure.\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * Implementations of this method may choose to reorganise information that\n * the relational schemes are dependant on (the row order for example). If\n * this method returns 'true' then we must also reindex the schemes.\n * <p>\n * <strong>NOTE:</strong> If the new format has columns that are not\n * included in the new format then the columns are deleted.\n *\n * @param def the definition of the table.\n * @return true if the table topology has changed.\n */\n boolean update(DataTableDef def) throws IOException;\n\n /**\n * This is called periodically when this data table file requires some\n * maintenance. It is recommended that this method is called every\n * time the table is initialized (loaded).\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * This method may change the topology of the rows (delete rows that are\n * marked as deleted), therefore if the method returns true you need to\n * re-index the schemes.\n *\n * @return true if the table topology was changed.\n */\n boolean doMaintenance() throws IOException;\n\n// /**\n// * A recovery method that returns a DataTableDef object for this data\n// * table file that was last used in a call to 'create' or 'update'. This\n// * information should be kept in a secondary table topology store but it\n// * is useful to keep this information in the data table file just incase\n// * something bad happens, or tables are moved to another database.\n// */\n// DataTableDef recoverLastDataTableDef() throws IOException;\n\n /**\n * Loads a previously created table. A table can be loaded in read only\n * mode, in which case any methods that write to the DataTableFile will\n * throw an IOException.\n *\n * @param table_name the name of the table.\n * @param read_only if true then the table file is opened as read-only.\n */\n void load(String table_name, boolean read_only) throws IOException;\n\n /**\n * Shuts down the table. This is called when the table is closed and the\n * resources it uses are to be freed back to the system. This is called\n * as part of the database shut down procedure or called when we want to\n * free the resources associated with this table.\n */\n void shutdown() throws IOException;\n\n /**\n * Deletes the data table file in the file system. This is used to clear\n * up resources after a table has been dropped. The table must be shut\n * down before this method is called.\n * <p>\n * NOTE: Use this with care. All data is lost!\n */\n void drop();\n\n /**\n * Flushes all information that may be cached in memory to disk. This\n * includes any relational data, any cached data that hasn't made it to\n * the file system yet. It will write out all persistant information\n * and leave the table in a state where it is fully represented in the\n * file system.\n */\n void updateFile() throws IOException;\n\n /**\n * Locks the data in the file to prevent the system overwritting entries\n * that have been marked as removed. This is necessary so we may still\n * safely read removed entries from the table while the table is locked.\n */\n void addRowsLock();\n\n /**\n * Unlocks the data in the file to indicate that the system may safely\n * overwrite removed entries in the file.\n */\n void removeRowsLock();\n\n /**\n * Returns true if the file currently has all of its rows locked.\n */\n boolean hasRowsLocked();\n\n// /**\n// * The number of rows that are currently stored in this table. This number\n// * does not include the rows that have been marked as removed.\n// */\n// int rowCount();\n\n /**\n * Returns true if the given row index points to a valid and available\n * row entry. Returns false if the row entry has been marked as removed,\n * or the index goes outside the bounds of the table.\n */\n boolean isRowValid(int record_index) throws IOException;\n\n /**\n * Adds a complete new row into the table. If the table is in a row locked\n * state, then this will always add a new entry to the end of the table.\n * Otherwise, new entries are added where entries were previously removed.\n * <p>\n * This will update any column indices that are set.\n *\n */\n int addRow(RowData row_data) throws IOException;\n\n /**\n * Removes a row from the table at the given index. This will only mark\n * the entry as removed, and will not actually remove the data. This is\n * because a process is allowed to read the data even after the row has been\n * marked as removed (if the rows have been locked).\n * <p>\n * This will update any column indices that are set.\n *\n * @param row_index the raw row index of the entry to be marked as removed.\n */\n void removeRow(int row_index) throws IOException;\n\n// /**\n// * Returns a DataCell object of the entry at the given column, row\n// * index in the table. This will always work provided there was once data\n// * stored at that index, even if the row has been marked as deleted.\n// */\n// DataCell getCellAt(int column, int row) throws IOException;\n\n /**\n * Returns a unique number. This is incremented each time it is accessed.\n */\n long nextUniqueKey() throws IOException;\n\n}", "public String getCreationSQL(final boolean quoteNames) {\n final StringBuilder sbSQL = new StringBuilder();\n sbSQL.append(\"CREATE TABLE \");\n sbSQL.append(PgDiffUtils.getQuotedName(name, quoteNames));\n sbSQL.append(\" (\\n\");\n \n for (PgColumn column : columns) {\n sbSQL.append(\"\\t\");\n sbSQL.append(column.getFullDefinition(quoteNames, false));\n sbSQL.append(\",\\n\");\n }\n \n sbSQL.setLength(sbSQL.length() - 2);\n sbSQL.append(\"\\n)\");\n \n if ((inherits != null) && (inherits.length() > 0)) {\n sbSQL.append(\"\\nINHERITS \");\n sbSQL.append(inherits);\n }\n \n sbSQL.append(';');\n \n for (PgColumn column : getColumnsWithStatistics()) {\n sbSQL.append(\"\\nALTER TABLE ONLY \");\n sbSQL.append(PgDiffUtils.getQuotedName(name, quoteNames));\n sbSQL.append(\" ALTER COLUMN \");\n sbSQL.append(\n PgDiffUtils.getQuotedName(column.getName(), quoteNames));\n sbSQL.append(\" SET STATISTICS \");\n sbSQL.append(column.getStatistics());\n sbSQL.append(';');\n }\n \n return sbSQL.toString();\n }", "public void setReportFormat(Long entryVersion1) {\n this.reportFormat = entryVersion1;\n }", "@Override\n public void createMetaTable(Connection conn) throws PersistenceException {\n String sql = String.format(\"CREATE TABLE %1$s (%2$s %3$s NOT NULL)\", metaTableName, META_TABLE_DATA_COLUMN, config.dataColumnType());\n executeUpdateSql(conn, sql);\n updateMetaTable(conn);\n }", "@Override\n\tpublic String getTableName() {\n\t\treturn \"DMDB.GY_DM_ZJLX\";\n\t}" ]
[ "0.5396347", "0.52881503", "0.5260742", "0.5076279", "0.49984103", "0.495382", "0.49365667", "0.48794615", "0.47985476", "0.4742762", "0.4697971", "0.46496493", "0.46247303", "0.4615884", "0.45822975", "0.45780993", "0.45755526", "0.4574071", "0.45730373", "0.45604894", "0.45583913", "0.454434", "0.45356274", "0.45177558", "0.45013836", "0.44693705", "0.4462367", "0.44371536", "0.44142523", "0.44053343", "0.43968302", "0.43934432", "0.439098", "0.43882924", "0.43808615", "0.4376657", "0.43735993", "0.43733412", "0.43608457", "0.43510816", "0.43406114", "0.43268013", "0.4322454", "0.43182346", "0.4300851", "0.4295915", "0.42710608", "0.42684942", "0.42628023", "0.42506552", "0.4230451", "0.42304105", "0.4229978", "0.42275587", "0.42249915", "0.42231402", "0.4210206", "0.42027563", "0.4185143", "0.41753432", "0.4175221", "0.41743702", "0.416904", "0.41649917", "0.4162057", "0.41530648", "0.41514647", "0.4147346", "0.41422647", "0.41416004", "0.41379365", "0.41353586", "0.4133816", "0.4120469", "0.4114329", "0.41109577", "0.4106685", "0.4104481", "0.4095143", "0.40946072", "0.4094561", "0.40937847", "0.4093209", "0.40912804", "0.40871152", "0.4085968", "0.4085849", "0.40849245", "0.40827116", "0.40799326", "0.40747833", "0.4068301", "0.40668938", "0.40666515", "0.40611902", "0.40610474", "0.4060115", "0.4058133", "0.40536273", "0.4046587" ]
0.60596985
0
/ Both methods below are necessary for the sorting process made by the Ranking module. The first one implement a polynomial hash function, using a prime base B and a large prime modulo M to avoid collision.
@Override public int hashCode() { int B = 31, M = 1000000007, code = 0; for(int pos = 0; pos < this.objectA.length(); pos++) { code = ((this.objectA.charAt(pos) - 'a') + B * code) % M; } return (code * this.objectB) % M; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int _hash(int maximum);", "static int hash(int h) {\n\t\t // This function ensures that hashCodes that differ only by constant \n\t\t // multiples at each bit position have a bounded number of collisions \n\t\t // (approximately 8 at default load factor).\n\t\th ^= (h >>> 20) ^ (h >>> 12);\n\t\treturn h ^ (h >>> 7) ^ (h >>> 4);\n\t}", "public int hashCode(){\n \n long code;\n\n // Values in linear combination with two\n // prime numbers.\n\n code = ((21599*(long)value)+(20507*(long)n.value));\n code = code%(long)prime;\n return (int)code;\n }", "public int hash2(int x)\n {\n return ((a2*(x)+b2)%n);\n }", "private static int computeHash(int par0)\n {\n par0 ^= par0 >>> 20 ^ par0 >>> 12;\n return par0 ^ par0 >>> 7 ^ par0 >>> 4;\n }", "@Override\n\tpublic int hashFunction(int key) {\n\t\treturn key%M;\n\t}", "public int hashcode();", "public abstract int hashCode();", "private int funcaoHash(int x) {\n\t\treturn (x % 37);\n\t}", "private int hashFunction(int hashCode) {\n int location = hashCode % capacity;\n return location;\n }", "int getHash();", "private int hasher() {\n int i = 0;\n int hash = 0;\n while (i != length) {\n hash += hashableKey.charAt(i++);\n hash += hash << 10;\n hash ^= hash >> 6;\n }\n hash += hash << 3;\n hash ^= hash >> 11;\n hash += hash << 15;\n return getHash(hash);\n }", "public int hash1(int x)\n {\n return ((a1*(x)+b1)%n);\n }", "public int hash(T input);", "public int hashFunction(int key){\r\n return (int) Math.floor((constFactor*key - Math.floor(constFactor*key)) * Math.pow(2,electionTable.length));\r\n }", "int hash(String makeHash, int mod);", "protected int myhash(T x)\r\n\t{\r\n\t\tint hashVal = x.hashCode( );\r\n\t\thashVal %= tableSize;\r\n\t\tif( hashVal < 0 )\r\n\t\t\thashVal += tableSize;\r\n\t\treturn hashVal;\r\n\t}", "public int hashCode()\r\n\t{\n\t\treturn (i % 9); //this will make the values to store in the table based on size of hashtable is 9 and calculation will be (i %9)\r\n\t}", "int compFunction(int code) {\r\n if (code % num_buckets < 0) {\r\n return (code % num_buckets) + num_buckets;\r\n } else {\r\n return code % num_buckets;\r\n } \r\n /*int a = 13;\r\n int b = 23;\r\n int p = 1000000 * num_buckets;\r\n while (isPrime(p) == false) { \r\n p += 1; \r\n }\r\n return ((a * code + b) % p) % num_buckets; */\r\n }", "@Override\r\n public int hashCode() {\n int key=(Integer)(this.capsule.get(0)); // Get the key\r\n Integer bkey=Integer.parseInt(Integer.toBinaryString(key)); // Convert into binary \r\n int n=setcount(bkey); //counts the number of 1's in the binary\r\n key=key*n + Objects.hashCode(this.capsule.get(0)); //multiplies that with the hashcode of the pId\r\n return key;\r\n }", "int hashCode();", "int hashCode();", "private int hashFunc2(String word) {\n int hashVal = word.hashCode();\n hashVal = hashVal % arraySize;\n\n if (hashVal < 0) {\n hashVal += arraySize;\n }\n\n // Research shows that you can use a Prime number Less than the array size to calculate the step value.\n // Prime Number 3 arbitrarily chosen.\n return 3 - hashVal % 3;\n }", "public abstract int getHash();", "@Override\n\tpublic int hashCode() {\n\t\tint karprabin = 0;\n\t\tfinal int B = 31;\n\t\tfor (int k = 0; k < this.actualsizeinwords; ++k) {\n\t\t\tkarprabin += B * karprabin + (this.buffer[k] & ((1l << 32) - 1));\n\t\t\tkarprabin += B * karprabin + (this.buffer[k] >>> 32);\n\t\t}\n\t\treturn this.sizeinbits ^ karprabin;\n\t}", "private long hash(String key, int M)\n {\n long h = 0;\n for (int j = 0; j < M; j++) {\n h = (R * h + key.charAt(j)) % Q;\n }\n return h;\n }", "int\thashCode();", "private int hash(T x)\n {\n // calcolo della chiave ridotta - eventualmente negativa\n int h = x.hashCode() % v.length;\n\n // calcolo del valore assoluto\n if (h < 0)\n h = -h;\n \n return h; \n }", "@Override\r\n\tpublic int hashCode() {\n\t\tint result = QAOperation.SEED;\r\n\t\tresult = QAOperation.PRIME_NUMBER * result + operator.hashCode();\r\n\t\tresult = QAOperation.PRIME_NUMBER * result + operand.hashCode();\r\n\t\tresult = QAOperation.PRIME_NUMBER * result + constraint.hashCode();\r\n\t\treturn result;\r\n\t}", "public int getHash(int key, int i, int max);", "int baseHash(int hashKey,int length)\n\t{\n\t\tdouble constant = (Math.sqrt(3) - 1);\n\t\tint base = (int) Math.floor((length * ((constant* hashKey) - Math.floor(constant* hashKey)))); \n\t\treturn base; //mod value is not applied at the base hashLevel. It is in the insert/find/reinset respectively\n\t}", "private static BigInteger Hash(String term, int printBits)\n {\n BigInteger baseHash = new BigInteger(\"14695981039346656037\");\n Long seed = 1099511628211L;\n long hash_mod = (long)java.lang.Math.pow(2, printBits);\n for(int i = 0; i < term.length(); i++) {\n baseHash = baseHash.multiply(new BigInteger(seed.toString())).remainder(new BigInteger(hash_mod+\"\"));\n baseHash = baseHash.xor(BigInteger.valueOf((long)term.charAt(i)));\n }\n return baseHash;\n }", "private int hashFunc(String input) {\n\t\tBigInteger value = BigInteger.valueOf(0);\n\t\tBigInteger k2 = new BigInteger(\"27\");\n\t\tchar c = input.charAt(0);\n\t\tlong i1 = (int) c - 96;\n\t\tBigInteger k1 = new BigInteger(\"0\");\n\t\tk1 = k1.add(BigInteger.valueOf(i1));\n\t\tvalue = k1;\n\n\t\tfor (int i = 1; i < input.length(); i++) {\n\n\t\t\tchar c2 = input.charAt(i);\n\n\t\t\tvalue = value.multiply(k2);\n\n\t\t\tlong i2 = (int) c2 - 96;\n\t\t\tBigInteger k3 = new BigInteger(\"0\");\n\t\t\tk3 = k3.add(BigInteger.valueOf(i2));\n\n\t\t\tvalue = value.add(k3);\n\n\t\t}\n\t\tBigInteger size = new BigInteger(\"0\");\n\t\tsize = size.add(BigInteger.valueOf(this.size));\n\t\tvalue = value.mod(size);\n\n\t\treturn value.intValue();\n\t}", "public int hashCode();", "public int hashCode();", "public int hashCode();", "public int hashCode();", "public int R_M(){\n\t\tBigInteger nminus1=n.subtract(BigInteger.ONE);\n\t\tdo{\n\t\t\tif(nminus1.mod(two.pow(a)).equals(BigInteger.ZERO)){\n\t\t\t\ttable.add(a);\n\t\t\t}\n\t\t\titerator++;\n\t\t\ta++;\n\t\t}while(!(two.pow(a).compareTo(n)>0));\n\t\t\n\t\ta=table.get(table.size()-1);\n\t\tBigInteger m=nminus1.divide(two.pow(a));\n\t\tint wlen=n.bitLength();\n\t\tBigInteger b;\n\t\tBigInteger z;\n\t\tfor(int i=0;i<iterations;i++){\n\t\t\tint straznik=0;\n\t\t\tint straznik1=0;\n\t\t\tdo{\n\t\t\t b=new BigInteger(wlen,new Random());\n\t\t\t}while(!(b.compareTo(BigInteger.ONE)>0) && !(b.compareTo(nminus1)<0));\n\t\t\tz=b.modPow(m, n);\n\t\t\tif(z.equals(BigInteger.ONE) || z.equals(nminus1)){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int j=0;j<a-1;j++){\n\t\t\t\t\tz=z.pow(2).mod(n);\n\t\t\t\t\tif(z.equals(nminus1)){\n\t\t\t\t\t\tstraznik++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(z.equals(BigInteger.ONE)){\n\t\t\t\t\t\tstraznik1++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(straznik==1){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(straznik1==1){\n\t\t\t\t\tgetComposite();\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\tgetComposite();\n\t\t\treturn 0;\n\t\t}\n\t\tgetProbablyPrime();\n\t\treturn 1;\n\t\t}", "String getHashAlgorithm();", "private int hashFunction(KeyType key) {\r\n // use hashCode() method to get the hashCode and take the absolute value % capacity\r\n return Math.abs(key.hashCode()) % capacity;\r\n }", "@Override public int hashCode() {\n\t\t// for details on the use of result and prime below, see Effective Java, 2E, page 47-48\n\t\tint result = 7; // arbitrary number\n\t\tint prime = 31; // this ensures order matters\n\t\t\n\t\t// factor in each field used in the equals method\n\t\tresult = prime * result + numerator;\n\t\tresult = prime * result + denominator;\n\t\t\n\t\treturn result;\n\t}", "@Override\n public int hashCode() {\n final int primeNum = 31;\n int result = primeNum * numElement;\n Node<T> iter = head;\n for (int index = 0; index < numElement; index++) {\n result = primeNum * iter.hashCode();\n iter = iter.getNext();\n }\n return result;\n }", "public int hash(String key){\r\n\t\tint i;\r\n\t\tint v = 0;\r\n\t\tfor(i = 0; i < key.length(); i++)\r\n\t\t\tv += key.charAt(i);\r\n\t\treturn v % M;\r\n\t}", "private int hash(String str, int h){\n int v=0;\n\n /* FILL IN HERE */\n v = Math.floorMod(MurmurHash.hash32(str, seeds[h]) >>> h, 1 << logNbOfBuckets);\n\n return v;\n }", "public static int hashCode(int m, int n)\n\t{\n\t\t\t\treturn m + n * HASH_CODE_SEED;\n\t}", "protected abstract int hashOfObject(Object key);", "@Override\n\tpublic int hashCode() {\n\t\treturn m * 100 + c * 10 + b;\n\t}", "private boolean testHash(int a, int b, int n, int k)\n {\n\n int [] testList = new int[n]; // Each value Automatically intialized to 0\n int hashValue;\n\n // Mark values reached by hash function\n for( int i = 0; i < k*n ; i++)\n {\n hashValue = (a*i + b)%n;\n testList[hashValue]++;\n }\n\n // Test if a uniform distribution is found\n for(int i = 0; i < n; i++)\n if(testList[i] != k)\n return false;\n\n return true;\n }", "private int hash (k key) {\n\t\treturn Math.abs(key.hashCode())\t% buckets.length;\n\t}", "int compFunction(int code) {\n int a = 1021;\n int b = 11287;\n int p = Prime.primeLarge(sizeBucket);\n //System.out.println(\"code = \"+ code + \", p = \"+p);\n\n int index = (Math.abs(a * code + b) % p) % sizeBucket;\n return index;\n }", "@Override\n\tpublic double[] hash(int[] p) {\n\t\tint N = p.length;\n\t\tdouble[] g = new double[N];\n\t\tfor (int k = 0; k < N; k++) {\t\t// dimension k\n\t\t\tint h = h8(p, k + seed);\n\t\t\tg[k] = (double) (h & 0xFF) / 0xFF;\n\t\t}\n\t\treturn g;\n\t}", "public static int hashCode(String str, int b) {\n\tint result = 0;\n\tfor(int i = 0; i < str.length(); i++) {\n\t\tresult += (str.charAt(i)) * (int)Math.pow(b, str.length() - (1+i));\n\t\t}\n\treturn result;\n\t}", "public int generateHash(StudentClass item)\n {\n \t return item.hashCode() % tableSize;\n }", "int toHashKey(String s)\n\t{\n\t\tint A = 1952786893;\n\t\tint B = 367257;\n\t\tint v = B;\n\t\tfor (int j = 0; j < s.length(); j++)\n\t\t{\n\t\t\tchar c = s.charAt(j);\n\t\t\tv = A * (v + (int) c + j) + B;\n\t\t}\n\n\t\tif (v < 0) v = -v;\n\t\treturn v;\n\t}", "public int hashCode() {\n int hash = 104473;\n if (token_ != null) {\n // Obtain unencrypted form as common base for comparison\n byte[] tkn = getToken();\n for (int i=0; i<tkn.length; i++)\n hash ^= (int)tkn[i];\n }\n hash ^= (type_ ^ 14401);\n hash ^= (timeoutInterval_ ^ 21327);\n hash ^= (isPrivate() ? 15501 : 12003);\n if (getPrincipal() != null)\n hash ^= getPrincipal().hashCode();\n if (getSystem() != null)\n hash ^= getSystem().getSystemName().hashCode();\n return hash;\n }", "public int hashCode() {\n/* 370 */ if (this.hashCode == 0) {\n/* 371 */ this.hashCode = 17;\n/* 372 */ this.hashCode = 37 * this.hashCode + getClass().hashCode();\n/* 373 */ this.hashCode = 37 * this.hashCode + (int)(this.min ^ this.min >> 32L);\n/* 374 */ this.hashCode = 37 * this.hashCode + (int)(this.max ^ this.max >> 32L);\n/* */ } \n/* 376 */ return this.hashCode;\n/* */ }", "@Override\n public abstract int hashCode();", "@Override\n public abstract int hashCode();", "@Override\n public abstract int hashCode();", "long hash(Block block, int position);", "int compFunction(int code) {\n return Math.abs(((3 * code + 8) % largePrime) % buckets.length);\n }", "private int d(@Nullable K ☃) {\r\n/* 127 */ return (xq.f(System.identityHashCode(☃)) & Integer.MAX_VALUE) % this.b.length;\r\n/* */ }\r\n/* */ private int b(@Nullable K ☃, int i) {\r\n/* */ int j;\r\n/* 131 */ for (j = i; j < this.b.length; j++) {\r\n/* 132 */ if (this.b[j] == ☃) {\r\n/* 133 */ return j;\r\n/* */ }\r\n/* 135 */ if (this.b[j] == a) {\r\n/* 136 */ return -1;\r\n/* */ }\r\n/* */ }", "public static void example1() {\n Group z23 = ZModPrime.getInstance(23);\r\n ProductGroup pg = ProductGroup.getInstance(z23, 10);\r\n Tuple tuple = pg.getRandomElement();\r\n\r\n // Define hash function Z23^10 -> {0,1}^256 (default SHA256)\r\n Function function = HashFunction.getInstance(pg);\r\n\r\n // Apply hash function to tuple (return finite byte array)\r\n Element hashValue = function.apply(tuple);\r\n\r\n System.out.println(function.toString());\r\n System.out.println(tuple.toString());\r\n System.out.println(hashValue.toString());\r\n }", "public int hash2 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ )\n hashVal = (37 * hashVal) + key.charAt(i);\n //if(hashVal != 0)\n return hashVal % tableSize;\n //else\n // return 0;\n }\n else{\n //System.out.println(\"Key is null\");\n return 0;\n }\n }", "public int hashCode()\n {\n return (int)(swigCPtr^(swigCPtr>>>32));\n }", "public int hash2(int h, int m) {\r\n//\t\tint m = this.capability>>1 + 1;\r\n\t\treturn 1+(h%(m-1));\r\n\t}", "@Override\r\n public int hashCode() {\r\n int result = (int) (a ^ (a >>> 32));\r\n result = 31 * result + (b != null ? b.hashCode() : 0);\r\n result = 31 * result + (a != null ? a.hashCode() : 0);\r\n result = 31 * result + (b != null ? b.hashCode() : 0);\r\n return result;\r\n }", "public abstract int doHash(T t);", "public int hashCode() {\n return 37 * 17;\n }", "static int getHash(long key) {\n int hash = (int) ((key >>> 32) ^ key);\n // a supplemental secondary hash function\n // to protect against hash codes that don't differ much\n hash = ((hash >>> 16) ^ hash) * 0x45d9f3b;\n hash = ((hash >>> 16) ^ hash) * 0x45d9f3b;\n hash = (hash >>> 16) ^ hash;\n return hash;\n }", "public int hashCode(T elemento)\n {\n return elemento.toInt()%tamanioEst;\n }", "private int hash(E e) {\n return Math.abs(e.hashCode()) % table.length;\n }", "@Override\r\n public int hashCode() {\n return id % 10;\r\n }", "public interface TByteHashingStrategy extends Serializable {\n\n /**\n * Computes a hash code for the specified byte. Implementors can use the byte's own value or a\n * custom scheme designed to minimize collisions for a known set of input.\n *\n * @param val byte for which the hashcode is to be computed\n * @return the hashCode\n */\n int computeHashCode(byte val);\n}", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n int lowerIndex = Math.min(index1, index2);\n int higherIndex = Math.max(index1, index2);\n result = prime * result + lowerIndex;\n result = prime * result + higherIndex;\n return result;\n }", "public int hashCode(String s){\r\n int length = s.length();\r\n int h = 0;\r\n for(int i = 0; i < length; i++){\r\n h = h + ((int)s.indexOf(i))*(37^(length - 1));\r\n }\r\n return h;\r\n }", "public int hashFunction(String key){\r\n return Math.abs(key.hashCode())%electionTable.length;\r\n }", "public HashTableChained() {\r\n num_buckets = 101; //prime number close to 100\r\n hash_table = new DList[num_buckets]; \r\n }", "public int hashCode()\n\t{\n\t\treturn y<<16+x;\n\t}", "@Override\n\tpublic long getHashCode(String key) {\n\t\tlong hash = 0;\n\t\tlong b = 378551;\n\t\tlong a = 63689;\n\t\tint tmp = 0;\n\t\tfor (int i = 0; i < key.length(); i++) {\n\t\t\ttmp = key.charAt(i);\n\t\t\thash = hash * a + tmp;\n\t\t\ta *= b;\n\t\t}\n\t\treturn hash;\n\t}", "@Override\n public int hashCode() {\n int result = 42;\n int prime = 37;\n for (char ch : key.toCharArray()) {\n result = prime * result + (int) ch;\n }\n result = prime * result + summary.length();\n result = prime * result + value;\n return result;\n }", "@Override\n\tpublic int hash(K key)\n\t{\n\t\treturn (key.hashCode() & 0x7fffffff) % M;\n\t}", "private static int initHash() {\n return 0x811c9DC5; // unsigned 2166136261\n }", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tHashtable<Temp, String> h = new Hashtable<>();\r\n\t\th.put(new Temp(1), \"A\");\r\n\t\th.put(new Temp(25), \"B\");\r\n\t\th.put(new Temp(30), \"C\");\r\n\t\th.put(new Temp(10), \"D\");\r\n\t\tSystem.out.println(h);\r\n\t\t//{30=C, 10=D, 25=B, 1=A}---when hashcode returns i\r\n\t\t//{25=B, 30=C, 1=A, 10=D}---when hashcode returns i%9\r\n\t\t\r\n\t\t//constructor with initial capacity\r\n\t\t//here if hashcode exceeds 4 then, modules of 5 is done. \r\n\t\tHashtable<Temp1, String> h1 = new Hashtable<>(5);\r\n\t\th1.put(new Temp1(1), \"A\");\r\n\t\th1.put(new Temp1(25), \"B\");\r\n\t\th1.put(new Temp1(30), \"C\");\r\n\t\th1.put(new Temp1(10), \"D\");\r\n\t\tSystem.out.println(h1);\r\n\t\t//{25=B, 10=D, 1=A, 30=C}\r\n\t\t\r\n\t\t//constructor using initial capacity and fill ratio.\r\n\t\tHashtable<Temp1, String> h2 = new Hashtable<>(5,0.4f);\r\n\t\th2.put(new Temp1(1), \"A\");\r\n\t\th2.put(new Temp1(25), \"B\");\r\n\t\th2.put(new Temp1(30), \"C\");\r\n\t\th2.put(new Temp1(10), \"D\");\r\n\t\tSystem.out.println(h2);\r\n\t\t//{30=C, 1=A, 10=D, 25=B}\r\n\t\t//{25=B, 10=D, 1=A, 30=C}\r\n\t\t\r\n\t\t//constructor using Map\r\n\t\tHashtable<Temp1, String> h3 = new Hashtable<>(h2);\r\n\t\tSystem.out.println(h3);\r\n\t}", "private int hash(T t) {\n int code = t.hashCode();\n return code % Table.size();\n }", "@Override\n public int hashCode() {\n\n if (this.hashCode == null) {\n int hashCode = this.symbol.hashCode();\n\n if (this.isLookahead) {\n hashCode *= 109;\n }\n\n this.hashCode = hashCode;\n }\n\n return this.hashCode;\n }", "@Override \n int hashCode();", "public int hashCode() {\n int hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + (userId != null ? userId.hashCode() : 0);\n hash = hash * UtilConstants.HASH_PRIME + (role != null ? role.hashCode() : 0);\n return hash;\n }", "private int hash(Key key) {\n\t\treturn (key.hashCode() & 0x7fffffff) % M;\n\t}", "public int hashCode() {\n\t\tint h = 0, i = 0, j = count;\n\t\twhile (j-- != 0) {\n\t\t\twhile (state[i] != OCCUPIED)\n\t\t\t\ti++;\n\t\t\th += longHash2IntHash(key[i]);\n\t\t\ti++;\n\t\t}\n\t\treturn h;\n\t}", "@Override\n public int hashCode() {\n int hash = 3;\n hash = 97 * hash + this.x;\n hash = 97 * hash + this.y;\n return hash;\n }", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "public BigInteger hash(String element)\n\t{ \n\t\treturn (BigInteger.valueOf(element.hashCode())).mod(modulus);\n\t}", "public interface Hasher {\n int[] hash(int[] source);\n}", "@Override\r\n public int hashCode()\r\n {\r\n if(this.isEmpty()) return 0;\r\n\r\n /**\r\n * En este caso es recomendable usar la funcion Arrays.hashCode porque\r\n * garantiza un hash unico para cada array.\r\n * Si se usa la suma, los objetos \"ab\" y \"ba\" tendrian el mismo hash.\r\n */\r\n return Arrays.hashCode(this.table);\r\n }", "public int hashCode()\n { \n \tint result = 17;\n \t\n \tresult = 37 * result + score; \t\n \t\n \treturn result;\n }", "@Override\r\n\tpublic int hashCode() {\n\t\tint result = 17;\r\n\t\tresult = 37*result+(int) (id ^ (id>>>32));\r\n\t\t//result = 37*result+(name==null?0:name.hashCode());\r\n\t\t//result = 37*result+displayOrder;\r\n\t\t//result = 37*result+(this.url==null?0:url.hashCode());\r\n\t\treturn result;\r\n\t}", "@Override\n\tpublic int hash(String item) {\n\t\tlong hashCode = 0l;\n\t\tchar[] c = item.toCharArray();\n\t\tfor (int i = 0; i < c.length; i++) {\n\t\t\thashCode += c[i] * Math.pow(31, c.length - (i + 1));\n\t\t}\n\t\tint i = (int) hashCode % 2147483647;\n\n\t\n\t\treturn Math.abs(i);\n\t\t\n\t}", "public static double HashCP(double n_samples, double size) {\n double probAllUnique = 1.0;\n for (int i = 1; i < n_samples+1; i++) {\n probAllUnique= probAllUnique*((size-(i-1))/size);\n \n }\n\n\t\treturn 1-probAllUnique;\n\t}", "RSAKeygen(){\n Random rnd = new Random();\n p = BigInteger.probablePrime(bitlength, rnd);\n BigInteger eTmp = BigInteger.probablePrime(bitlength, rnd);\n\n while(p.equals(eTmp)){\n eTmp = BigInteger.probablePrime(bitlength,rnd);\n }\n\n q = eTmp;\n n = p.multiply(q);\n }" ]
[ "0.6817722", "0.6495348", "0.64256024", "0.6399776", "0.63922024", "0.6326797", "0.63177884", "0.6262708", "0.6259835", "0.622911", "0.6227005", "0.622536", "0.6221346", "0.6195121", "0.6190928", "0.61809564", "0.61746025", "0.616513", "0.61384326", "0.6138049", "0.6132039", "0.6132039", "0.6120788", "0.61153007", "0.6083091", "0.6072109", "0.6069902", "0.60669893", "0.60644865", "0.6060607", "0.6033576", "0.60090363", "0.59914666", "0.59673744", "0.59673744", "0.59673744", "0.59673744", "0.59296113", "0.59200937", "0.5894936", "0.58713716", "0.5862325", "0.58540595", "0.5843317", "0.5830625", "0.58285475", "0.5823976", "0.5814763", "0.58103555", "0.58032125", "0.5800157", "0.5782452", "0.5763679", "0.57537293", "0.57493937", "0.5740213", "0.57395977", "0.57395977", "0.57395977", "0.57376474", "0.57306826", "0.57306224", "0.5721525", "0.57203597", "0.5719993", "0.5719122", "0.5717848", "0.57176125", "0.5713225", "0.5711524", "0.5707726", "0.57030207", "0.5692128", "0.56879884", "0.5672523", "0.5669766", "0.5669544", "0.56668496", "0.566594", "0.5662955", "0.56610954", "0.5655216", "0.5632318", "0.56283647", "0.5620495", "0.56105906", "0.56058687", "0.5604246", "0.5597908", "0.55873215", "0.55856675", "0.5583821", "0.55820763", "0.55796325", "0.5561799", "0.55576324", "0.55422807", "0.5542219", "0.5527052", "0.55261886" ]
0.6496703
1
Created by Mateusz on 29.10.2016.
@Repository @Transactional public interface MusicGenresRepository extends CrudRepository<MusicGenres, Long> { List<MusicGenres> findByNameLike(String name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private void poetries() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n public void init() {\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public void init() {}", "public void mo38117a() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "private void init() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo4359a() {\n }", "@Override\n protected void init() {\n }", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void einkaufen() {\n\t}", "private void m50366E() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public int getSize() {\n return 1;\n }", "@Override\n public void initialize() {\n \n }", "Petunia() {\r\n\t\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n public int getOrder() {\n return 0;\n }", "@Override\n public int getOrder() {\n return 4;\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}" ]
[ "0.6013131", "0.58491033", "0.58026767", "0.5711847", "0.5657861", "0.5649326", "0.5649326", "0.56208", "0.55926347", "0.5576018", "0.5557537", "0.5535161", "0.5518969", "0.5507973", "0.55029035", "0.5500603", "0.5497374", "0.5480033", "0.5480033", "0.5480033", "0.5480033", "0.5480033", "0.5480033", "0.5472487", "0.5472142", "0.5472019", "0.5461418", "0.5461203", "0.54570127", "0.5449873", "0.5433476", "0.54287916", "0.54266787", "0.54241157", "0.5414697", "0.5389952", "0.5389952", "0.5389952", "0.5389952", "0.5389952", "0.53894013", "0.53894013", "0.5379764", "0.53730464", "0.53678167", "0.53678167", "0.534081", "0.53267795", "0.5326579", "0.5316884", "0.5316215", "0.5316215", "0.5315534", "0.53105843", "0.5310193", "0.530301", "0.53005284", "0.52984047", "0.52951586", "0.52907014", "0.52907014", "0.52907014", "0.5289673", "0.52819073", "0.5280837", "0.52802896", "0.52781886", "0.5266244", "0.52537555", "0.5248854", "0.5248854", "0.5248854", "0.5238506", "0.5238506", "0.5238506", "0.52380526", "0.52380526", "0.52380526", "0.52256954", "0.52253926", "0.5225082", "0.52209544", "0.52204406", "0.5219312", "0.5219312", "0.5219312", "0.5219312", "0.5219312", "0.5219312", "0.5219312", "0.5216245", "0.5212105", "0.52087784", "0.5202343", "0.5202096", "0.5199066", "0.5191316", "0.5191316", "0.51891685", "0.5180974", "0.51758707" ]
0.0
-1
Check collision with player ship
public boolean colliding(PlayerShip ship){ if (CollisionChecker.check(ship.getLimits(), this.limits)) { this.addBonusToShip(ship); this.remove(); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean collidesShip(Ship s) {\n // establish a rectangle for the player ship\n Rectangle ship = new Rectangle((int)s.getX() + 5, (int)s.getY(), 30, 50);\n\n // determine if an enemy blast intersects ship rectangle\n for(int i = 0; i < enemyBarrage.size(); i++) {\n Rectangle blaster = new Rectangle((int)enemyBarrage.get(i).getX(), (int)enemyBarrage.get(i).getY(), WIDTH, HEIGHT);\n if (blaster.intersects(ship)) {\n return true; // hit\n }\n }\n return false; // miss\n }", "public boolean collides (){\n if(shipX<=astX && shipY>=astY){\n if(Math.abs(shipX-astX)<=40 && Math.abs(shipY-astY)<=65){\n return true;\n }\n }\n else if(shipX>=astX && shipY>=astY){\n if(Math.abs(shipX-astX)<=75 && Math.abs(shipY-astY)<=65){\n return true;\n }\n }\n else if(shipX>=astX && shipY<=astY){\n if(Math.abs(shipX-astX)<=75 && Math.abs(shipY-astY)<=55){\n return true;\n }\n }\n else if(shipX<=astX && shipY<=astY){\n if(Math.abs(shipX-astX)<=60 && Math.abs(shipY-astY)<=55){\n return true;\n }\n }\n return false;\n }", "private boolean collide(int row, int col, Ship ship) {\n if (ship.getIsVertical()) {\n if (col != ship.getCol()) return false;\n if (row < ship.getRow()) return false;\n if (row >= ship.getRow() + ship.getSize()) return false;\n return true;\n } else {\n if (row != ship.getRow()) return false;\n if (col < ship.getCol()) return false;\n if (col >= ship.getCol() + ship.getSize()) return false;\n return true;\n }\n }", "private boolean collide(Ship ship, Ship[] ships) {\n for (Ship s : ships) {\n if (collide(s, ship)) return true;\n }\n return false;\n }", "private void checkCollisions(MovementEngine currentShip)\n\t{\t\t\n\t\tif (currentShip.getWeaponName() == Constants.PLAYER \n\t\t\t\t|| currentShip.getWeaponName() == Constants.ENEMY_FIGHTER\n\t\t\t\t|| currentShip.getWeaponName() == Constants.ENEMY_BOSS\t\n\t\t\t\t|| currentShip.getWeaponName() == Constants.MISSILE_PLAYER\t\n\t\t\t\t|| currentShip.getWeaponName() == Constants.MISSILE_ENEMY\n\t\t\t\t|| currentShip.getWeaponName() == Constants.GUN_ENEMY\t\n\t\t\t\t|| currentShip.getWeaponName() == Constants.GUN_PLAYER\n\t\t\t\t|| currentShip.getWeaponName() == Constants.PARACHUTE\n\t\t\t\t&& currentShip.getDestroyedFlag() == false)\n\t\t{\n\t\t\tfor(int i = 0; i < GameState._weapons.size(); i ++)\n\t\t\t{\t\t\t\t\t\n\t\t\t\tif (i < GameState._weapons.size())\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tMovementEngine ship = GameState._weapons.get(i);\t\t\t\t\t\n\t\t\t\t\t\tif (ship.getWeaponName() == Constants.PLAYER \n\t\t\t\t\t\t\t\t|| ship.getWeaponName() == Constants.ENEMY_FIGHTER\n\t\t\t\t\t\t\t\t|| ship.getWeaponName() == Constants.ENEMY_BOSS\n\t\t\t\t\t\t\t\t|| ship.getWeaponName() == Constants.MISSILE_PLAYER\t\n\t\t\t\t\t\t\t\t|| ship.getWeaponName() == Constants.MISSILE_ENEMY\n\t\t\t\t\t\t\t\t|| ship.getWeaponName() == Constants.GUN_ENEMY\t\n\t\t\t\t\t\t\t\t|| ship.getWeaponName() == Constants.GUN_PLAYER\n\t\t\t\t\t\t\t\t|| ship.getWeaponName() == Constants.PARACHUTE\n\t\t\t\t\t\t\t\t&& ship.getDestroyedFlag() == false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint diffX = Math.abs((int)(currentShip.getX() - ship.getX())); \n\t\t\t\t\t\t\tint diffY = Math.abs((int)(currentShip.getY() - ship.getY())); \n\t\t\t\t\t\t\tif (diffX <= (10 * GameState._density) && diffY <= (10 * GameState._density))\n\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcurrentShip.onCollision(ship);\n\t\t\t\t\t\t\t\tship.onCollision(currentShip);\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch(ArrayIndexOutOfBoundsException e)\n\t\t\t\t\t{\n\t\t\t\t\t\t// ignore and continue\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "private void checkCollision() {\n for (int i = snakeSize; i > 0; i--) {\n if (i>4 && x[0] == x[i] && y[0] == y[i]){\n isInGame=false;\n }\n }\n\n if (x[0] > FIELD_SIZE) {\n isInGame=false;\n }\n\n if (x[0] < 0) {\n isInGame=false;\n }\n\n if (y[0] > FIELD_SIZE) {\n isInGame=false;\n }\n\n if (y[0] < 0) {\n isInGame=false;\n }\n\n\n }", "private boolean collide(int row, int col, Ship[] ships) {\n for (Ship ship : ships) {\n if (collide(row, col, ship)) return true;\n }\n return false;\n }", "public void calculateCollision(Ship ship){\r\n\t\tfor(Entry<Integer, Element> elementEntry:_elementList.entrySet()){\r\n\t\t\tElement element=elementEntry.getValue();\r\n\t\t\tif(element.isActive){\r\n\t\t\t\tif(ship.calculateObjectCollision(element.position,element.radius,0)==false){\r\n\t\t\t\t\telement.isHit=true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "private void checkPlayerCollisions() {\r\n\t\tGObject left = getElementAt(player.getX() - 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tGObject right = getElementAt(player.getX() + player.getWidth() + 1, player.getY() + player.getHeight() / 2.0);\r\n\t\tif(dragon1 != null && (left == dragon1 || right == dragon1)) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t\tif(dragon2 != null && (left == dragon2 || right == dragon2)) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t}", "private void checkCollision() {\n\n for(int b = 1; b < snakeLength; b++){\n if(xLength[b] == xLength[0] && yLength[b] == yLength[0]) {\n right = false;\n left = false;\n down = false;\n up = false;\n gameOver = true;\n }\n }\n\n if(right){\n if(xLength[0] >= 825) {\n gameOver = true;\n }\n }\n if(left){\n if(xLength[0] <= 50) {\n gameOver = true;\n }\n }\n if(down){\n if(yLength[0] >= 600) {\n gameOver = true;\n }\n }\n if(up){\n if(yLength[0] <= 100) {\n gameOver = true;\n }\n }\n }", "public boolean contains(ShiffmanShip ship) {\n PVector loc =ship.location;\n // is Lover object is inside of mouse controlled fluid?\n // if (loc.x> mouseX && loc.x < mouseX + w && loc.y > mouseY && loc.y < mouseY+ h) { //creates flyover\n // return true;\n // } \n // is Lover object inside of stationary fluid area? Yes? then go back to if statement and apply force\n if (loc.x> x && loc.x < x + w && loc.y > y && loc.y < y+ h) {\n return true;\n } \n // No? then return fals and do not apply drag force\n else {\n return false;\n }\n }", "public boolean collides(Rectangle player) {\r\n return player.overlaps(boundsTop) || player.overlaps(boundsBot);\r\n }", "public void checkCollision() {}", "public boolean hasHitShip() {\n\t\t// see if the lines of the ship have intersected with the lines of the\n\t\t// asteroid\n\t\treturn linesIntersect();\n\n\t}", "private void checkPlayerCollisions(int x, int y){\n\t\tint wHitBoxX = 100;\n\t\tint wHitBoxY = 150;\n\t\t\n\t\tfor(int i = 0; i<enemy_num; i++){\n\t\t\tfor(int j = 0; j<enemy_arrow_num[i]; j++){\n\t\t\t\tif(enemy_arrows[i][j][0] > x && enemy_arrows[i][j][0] < (x+wHitBoxX)){\n\t\t\t\tif(enemy_arrows[i][j][1] > y && enemy_arrows[i][j][1] < (y+wHitBoxY)){\n\t\t\t\t \tremove_arrow(i,j);\n\t\t\t\t}}\n\t\t\t}\n\t\t}\n\t\t\n\t\n\t}", "private void checkForCollisionWithSelf() {\r\n if (isInSnake(snake[0].row,snake[0].column,true)) {\r\n gameOver();\r\n }\r\n }", "public void checkCollisions(int xH, int yH) {\n Rectangle r1 = new Rectangle(xH, yH, 50, 50);\n Rectangle r2 = new Rectangle(zombie.x, zombie.y, 50, 50);\n if (r1.intersects(r2)) {\n zombieWins = true; \n }\n }", "public boolean isCollision(double x, double y) {\n return false;\n }", "public void collision(){\r\n\t\tif(currX < 0 || currX > 1000-width || currY < 0 || currY > 700-height){\r\n\t\t\tinGame=false;\r\n\t\t}\r\n\t\t/*\r\n\t\tI start at 1 because tail[0] will constantly be taking the position\r\n\t\tof the snake's head, so if i start at 0, the game would end immediately.\r\n\t\t*/\r\n\t\tfor(int i=1; i < numOranges; i++){\r\n\t\t\tRectangle currOrangeRect = new Rectangle(tail[i].getXcoords(), tail[i].getYcoords(), OrangeModel.getWidth(), OrangeModel.getHeight());\r\n\t\t\tif(new Rectangle(currX, currY, width, height).intersects(currOrangeRect)){\r\n\t\t\t\tinGame=false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void processPlayerCollision() {\n\t\t// This starts by converting the player vertices to global positions.\n\t\tVector3 playerGlobalPosition = player.getGlobalPositionVector();\n\t\tVector3 playerGlobalRotation = player.getGlobalRotationVector();\n\n\t\tVector3 playerVertex1 = new Vector3(player.hitboxPoints[0], player.hitboxPoints[1]);\n\t\tVector3 playerVertex2 = new Vector3(player.hitboxPoints[2], player.hitboxPoints[3]);\n\t\tVector3 playerVertex3 = new Vector3(player.hitboxPoints[4], player.hitboxPoints[5]);\n\t\t// TODO: Confirm this is correct.\n\t\tVector3 playerVertex1Global = new Vector3(playerVertex1.x * -Math.sin(Math.toRadians(playerGlobalRotation.z)), playerVertex1.y * Math.cos(Math.toRadians(playerGlobalRotation.z))).add(playerGlobalPosition);\n\t\tVector3 playerVertex2Global = new Vector3(playerVertex2.x * -Math.sin(Math.toRadians(playerGlobalRotation.z)), playerVertex2.y * Math.cos(Math.toRadians(playerGlobalRotation.z))).add(playerGlobalPosition);\n\t\tVector3 playerVertex3Global = new Vector3(playerVertex3.x * -Math.sin(Math.toRadians(playerGlobalRotation.z)), playerVertex3.y * Math.cos(Math.toRadians(playerGlobalRotation.z))).add(playerGlobalPosition);\n\n\t\tfor (AsteroidsAsteroid a : asteroids) {\n\t\t\t// If any of the vertices collide and the player is alive, lose a life.\n\t\t\tif ((a.collides(playerVertex1Global) || a.collides(playerVertex2Global) || a.collides(playerVertex3Global)) && player.isShowing()) {\n\t\t\t\tloseLife();\n\t\t\t}\n\t\t}\n\t}", "public void collideWithShip (Ship ship)\n {\n ship.takeDamage(AvoiderGame.getBundle().getDouble(\"floating_object_to_ship_damage\"));\n setActive(false);\n }", "private boolean collision(double xa, double ya) {\n\t\t\n\t\tint xMin = 2;\n int xMax = 15;\n int yMin = 15;\n int yMax = 19;\n if(Player.isSwimming){\n \tyMax = 1;\n \txMax = 18;\n }\n if (level.getTile((int)this.x / 32, (int)this.y / 32).getId() == 30) {\n \txMax = 18;\n \txMin = 20;\n }\n if (level.getTile((int)this.x / 32, (int)this.y / 32).getId() == 25) {\n \txMax = 32;\n \txMin = 32;\n \tyMax = 7;\n }\n \n \n int yMinWater = 0;\n for (int x = xMin; x < xMax; x++) {\n if (isSolidTile((int)xa, (int)ya, x, yMin)) {\n return true;\n }\n }\n for (int x = xMin; x < xMax; x++) {\n if (isSolidTile((int)xa,(int) ya, x, yMax)) {\n return true;\n }\n }\n for (int y = yMin; y < yMax; y++) {\n if (isSolidTile((int)xa, (int)ya, xMin, y)) {\n return true;\n }\n }\n for (int y = yMin; y < yMax; y++) {\n if (isSolidTile((int)xa, (int)ya, xMax, y)) {\n return true;\n }\n }\n if(Player.isSwimming || Player.isClimbing){\n \t for (int y = yMinWater; y < yMax; y++) {\n if (isSolidTile((int)xa, (int)ya, yMinWater, y)) {\n return true;\n }\n }\n }\n \n return false;\n\t}", "public boolean playerShootCheck(int x, int y){\n\t\tif( opponentShips[x][y] != null ){\n\t\t\t\n\t\t\tif(opponentShips[x][y].isDestroyed()){\n\t\t\t\tint shipSize = opponentShips[x][y].getshipSize();\n\t\t\t\topponentShips[x][y] = null;\n\t\t\t\tthis.dmgLastRound = shipSize;\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\topponentShips[x][y] = null;\n\t\t\tthis.dmgLastRound = 0;\n\t\t\treturn true;\n\t\t}\n\t\telse this.dmgLastRound = -1;\n\t\treturn false;\n\t}", "public void checkCollision(Actor player) {\n\n for (int i = 0; i < activePickups.size(); i++) {\n Pickup p = activePickups.get(i);\n\n if (p.getBounds().intersects(player.getBounds())) {\n p.despawn();\n if (p instanceof FogLightsPickup) {\n PlayerInventory.incrementFogLights();\n } else if (p instanceof SlowMotionPickup) {\n PlayerInventory.incrementSlowMotion();\n } else if (p instanceof InvincibilityPickup) {\n PlayerInventory.incrementInvincibility();\n\n } else if (p instanceof CoinPickup) {\n coinsPickedUp++;\n canvas.playSound(\"coin.wav\");\n }\n }\n }\n }", "public boolean fitsInPlayerBoard(int x, int y) {\n if (rotation) { // na vysku\n if (!(x + sizeSelected - 1 < maxN)) {\n return false;\n }\n } else { // na sirku\n if (!(y + sizeSelected - 1 < maxN)) {\n return false;\n }\n }\n\n // skontrolujem ci nebude prekrvat inu lod\n if (rotation) { // na vysku\n for (int i = 0; i < sizeSelected; i++) {\n if (boardPlayer[x + i][y] == GameObject.Ship) {\n return false;\n }\n }\n } else { // na sirku\n for (int i = 0; i < sizeSelected; i++) {\n if (boardPlayer[x][y + i] == GameObject.Ship) {\n return false;\n }\n }\n }\n\n // skontrolujem ci sa nebude dotykat inej lode\n if (rotation) { // na vysku\n for (int i = 0; i < sizeSelected; i++) {\n if ((x - 1 >= 0 && boardPlayer[x + i - 1][y] == GameObject.Ship) ||\n (x - 1 >= 0 && y - 1 >= 0 && boardPlayer[x + i - 1][y - 1] == GameObject.Ship) ||\n (y - 1 >= 0 && boardPlayer[x + i][y - 1] == GameObject.Ship) ||\n (x + i + 1 < maxN && y - 1 >= 0 && boardPlayer[x + i + 1][y - 1] == GameObject.Ship) ||\n (x + i + 1 < maxN && boardPlayer[x + i + 1][y] == GameObject.Ship) ||\n (x + i + 1 < maxN && y + 1 < maxN && boardPlayer[x + i + 1][y + 1] == GameObject.Ship) ||\n (y + 1 < maxN && boardPlayer[x + i][y + 1] == GameObject.Ship) ||\n (x - 1 >= 0 && y + 1 < maxN && boardPlayer[x + i - 1][y + 1] == GameObject.Ship)) {\n return false;\n }\n }\n } else { // na sirku\n for (int i = 0; i < sizeSelected; i++) {\n if ((x - 1 >= 0 && boardPlayer[x - 1][y + i] == GameObject.Ship) ||\n (x - 1 >= 0 && y - 1 >= 0 && boardPlayer[x - 1][y + i - 1] == GameObject.Ship) ||\n (y - 1 >= 0 && boardPlayer[x][y + i - 1] == GameObject.Ship) ||\n (x + 1 < maxN && y - 1 >= 0 && boardPlayer[x + 1][y + i - 1] == GameObject.Ship) ||\n (x + 1 < maxN && boardPlayer[x + 1][y + i] == GameObject.Ship) ||\n (x + 1 < maxN && y + i + 1 < maxN && boardPlayer[x + 1][y + i + 1] == GameObject.Ship) ||\n (y + i + 1 < maxN && boardPlayer[x][y + i + 1] == GameObject.Ship) ||\n (x - 1 >= 0 && y + i + 1 < maxN && boardPlayer[x - 1][y + i + 1] == GameObject.Ship)) {\n return false;\n }\n }\n }\n\n return true;\n }", "void collisionHappened(int position);", "void checkCollision(Entity other);", "private boolean checkCollision(int x, int y) {\r\n\t\tRectangle r = new Rectangle(); // Location Rectangle\r\n\t\tr.width = Tile.TILEWIDTH;\r\n\t\tr.height = Tile.TILEHEIGHT;\r\n\t\tr.x = x * Tile.TILEWIDTH;\r\n\t\tr.y = y * Tile.TILEHEIGHT;\r\n\t\tfor(Nonmoving n : handler.getWorld().getEntityManager().getNonmoving()) {\r\n\t\t\tif(n.getCollisionBounds(0, 0).intersects(r)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(Objects o : handler.getWorld().getEntityManager().getObjects()) {\r\n\t\t\tif(o.getCollisionBounds(0, 0).intersects(r)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean isCollided(SpaceShip invader, Rocket rocket) {\n\t\t//(posX + width) /2 , (posY + height) /2\n\t\tint spaceshipCenterX = (int)(invader.getPosition().getX() + invader.getSize().getWidth()) / 2;\n\t\tint spaceshipCenterY = (int)(invader.getPosition().getY() + invader.getSize().getHeight()) / 2;\n\t\tPoint spaceshipCenter = new Point(spaceshipCenterX, spaceshipCenterY);\n\t\tif (spaceshipCenter == rocket.getPosition())\n\t\t\treturn true;\n\t\treturn false;\n\t}", "@Override\n public boolean isCollided(gameObject obj){\n return Rect.intersects(obj.getastRect(), getRectplayer1())||\n Rect.intersects(obj.getastRect(), getRectplayer2()) ||\n Rect.intersects(obj.getastRect(), getRectplayer3()) ||\n Rect.intersects(obj.getastRect(), getRectplayer4());\n }", "private void checkCollision()\n {\n if (gameOverBool==false)\n { \n Actor a = getOneIntersectingObject(Wall.class);\n if (a != null||isAtEdge())\n {\n setImage(\"gone.png\");//laat de helicopter verdwijnen\n //greenfoot.GreenfootSound.stop(\"helisound.wav\");\n World world = getWorld();\n world.addObject(new Explosion(), getX(), getY());\n Greenfoot.playSound(\"heliExplosion.wav\");\n world.addObject( new Gameover(), 600, 300 );\n gameOverBool = true; \n }\n } \n }", "public static boolean detectCollision(Celestial celestial, Ship ship) {\n return Math.sqrt(Math.pow(celestial.getX() - ship.getLastX(), 2) + Math.pow(celestial.getY() - ship.getLastY(), 2))\n - celestial.getRadius() - ship.getRadius() < 0 && !ship.getOnCelestial();\n }", "@Override\n\tpublic boolean checkCollision() {\n\t\treturn true;\n\t}", "private boolean collide(Ship s1, Ship s2) {\n if (s1 == null || s2 == null) return false; // no collision if either ship is null\n boolean vert1 = s1.getIsVertical();\n boolean vert2 = s2.getIsVertical();\n if (vert1 && vert2) {\n if (s1.getCol() != s2.getCol()) return false; // 2 vertical ships in different columns\n if (s1.getRow() >= s2.getRow() + s2.getSize()) return false; // s1 is below s2\n if (s2.getRow() >= s1.getRow() + s1.getSize()) return false; // s2 is below s1\n return true; // otherwise they collide\n } else if (!vert1 && !vert2) {\n if (s1.getRow() != s2.getRow()) return false; // 2 holizontal ships in different rows\n if (s1.getCol() >= s2.getCol() + s2.getSize()) return false; // s1 to the right of s2\n if (s2.getCol() >= s1.getCol() + s1.getSize()) return false; // s2 to the right of s1\n return true; // otherwise they collide\n } else {\n if (s1.getRow() >= s2.getRow() + s2.getSize()) return false; // s1 is below s2\n if (s2.getRow() >= s1.getRow() + s1.getSize()) return false; // s2 is below s1\n if (s1.getCol() >= s2.getCol() + s2.getSize()) return false; // s1 to the right of s2\n if (s2.getCol() >= s1.getCol() + s1.getSize()) return false; // s2 to the right of s1\n return true; // otherwise they collide\n }\n }", "private boolean checkCollision(int x, int y){\n\t\t\n\t\tboolean b = false;\n\t\tif(Math.abs((this.particles.get(x).getPosition().distance(this.particles.get(y).getPosition()))) < 0.5*Renderer.SCALE*(this.particles.get(x).getRadius() + this.particles.get(y).getRadius()))\n\t\t{\n\t\t\tb = true;\n\t\t}\n\t\treturn b;\n\t}", "public void checkPlayerCollisions() {\n\t\t//Iterate over the players\n\t\tfor (PlayerFish player : getPlayers()) {\n\t\t\t//Get collidables parallel.\n\t\t\tcollidables.parallelStream()\n\t\t\t\n\t\t\t//We only want the collidables we actually collide with\n\t\t\t.filter(collidable -> player != collidable && player.doesCollides(collidable))\n\t\t\t\n\t\t\t//We want to do the for each sequentially, otherwise we get parallelism issues\n\t\t\t.sequential()\n\t\t\t\n\t\t\t//Iterate over the elements\n\t\t\t.forEach(collidable -> {\n\t\t\t\tplayer.onCollide(collidable);\n\t\t\t\tcollidable.onCollide(player);\n\t\t\t});\n\t\t}\n\t}", "static boolean Hit(Point shipStart, Point shipEnd, Point shotPoint){\n\n if(shipStart.getDown() == shipEnd.getDown()){ // if start and end on same y coordinate, ship is horizontal\n int y = shipStart.getDown();\n\n for (int x = shipStart.getAcross(); x <= shipEnd.getAcross(); x++){ // loop from left to right of ship position\n if(x == shotPoint.getAcross() && y == shotPoint.getDown())\n return true; // if the coordinates of current point match shot, you hit!\n }\n\n } else if (shipStart.getAcross() == shipEnd.getAcross()) { // if start and end on same x coordinate, ship is vertical\n int x = shipStart.getAcross();\n\n for (int y = shipStart.getDown(); y <= shipEnd.getDown(); y++) {\n if (x == shotPoint.getAcross() && y == shotPoint.getDown())\n return true; // if the coordinates of current point match shot, you hit!\n }\n }\n\n return false; // points given are not horizontal or vertical and not valid, can't hit diagonally\n }", "public boolean checkCollision(int x, int y){\n return x<=xEnd&&x>=xStart&&y<=yEnd&&y>=yStart;\n }", "@Override\n\tpublic boolean handleCollision(ICollider otherObject, GameWorld gw) {\n\t\tif (otherObject instanceof NPSMissile) return false;\n\t\tif(otherObject instanceof PlayerShip)\n\t\t\tgw.explodePS();\n\t\treturn true;\n\t\t\n\t}", "public boolean checkCollisions(Tuple camera) {\n\n\t\t// already exploded\n\t\tif(disabled > 0) {\n\t\t\treturn false;\n\t\t} // if\n\t\t\n\t\t// collision detected\n\t\tif(location.distance(camera) - size < SHIP_SIZE) {\n\t\t\tdisabled = 1;\n\t\t\treturn true;\n\t\t} // if\n\t\treturn false;\n\t}", "private boolean isInDoor(Entity player){\n Sprite playerSprite= (Sprite) player.getComponent(Sprite.class);\n for(int i = 0; i<Main.colliderWallMap.size(); i++){\n if(Main.colliderWallMap.get(i).intersects(playerSprite.getValue().getX(), playerSprite.getValue().getY(),playerSprite.getValue().getWidth(), playerSprite.getValue().getHeight())){\n return false;\n }\n }\n\n return true;\n }", "private boolean checkCollisions(int keycode) {\n \t\t\n \t\tint sX = super.getX()/Main.gridSize;\n \t\tint sY = super.getY()/Main.gridSize;\n \t\t\n \t\tif (World.currentMap().solidAtPoint(sX-1, sY) && keycode == Keyboard.KEY_A) {\n \t\t\treturn false;\n \t\t} else if (World.currentMap().solidAtPoint(sX+1, sY) && keycode == Keyboard.KEY_D) {\n \t\t\treturn false;\n \t\t} else if (World.currentMap().solidAtPoint(sX, sY-1) && keycode == Keyboard.KEY_W) {\n \t\t\treturn false;\n \t\t} else if (World.currentMap().solidAtPoint(sX, sY+1) && keycode == Keyboard.KEY_S) {\n \t\t\treturn false;\n \t\t}\n \t\treturn true;\n \t}", "private boolean checkContactingships(int x,int y,int shipSize,boolean orientacja){\n\t\tif(orientacja){\n\t\t\tif(x-1 >= 0 && y - 1 >= 0){\n\t\t\t\tif(opponentShips[x-1][y-1] != null) return false;\n\t\t\t}\n\t\t\tif(y-1 >= 0){\n\t\t\t\tif(opponentShips[x][y-1] != null) return false;\n\t\t\t}\n\t\t\tif(x+1 < sizeBoard && y-1 >= 0){\n\t\t\t\tif(opponentShips[x+1][y-1] != null) return false;\n\t\t\t}\n\t\t\tif(y+shipSize < sizeBoard){\n\t\t\t\tif(opponentShips[x][y+shipSize] != null) return false;\n\t\t\t}\n\t\t\tif(x-1 >= 0 && shipSize+y < sizeBoard){\n\t\t\t\tif(opponentShips[x-1][y+shipSize] != null) return false;\n\t\t\t}\n\t\t\tif(x+1 < sizeBoard && shipSize+y < sizeBoard){\n\t\t\t\tif(opponentShips[x+1][y+shipSize] != null) return false;\n\t\t\t}\n\t\t\tif(x-1 >= 0){\n\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\tif(opponentShips[x-1][y+i] != null)return false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(x+1 < sizeBoard){\n\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\tif(opponentShips[x+1][y+i] != null)return false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(x-1 >= 0 && y - 1 >= 0){\n\t\t\t\tif(opponentShips[x-1][y-1] != null) return false;\n\t\t\t}\n\t\t\tif(x-1 >= 0){\n\t\t\t\tif(opponentShips[x-1][y] != null) return false;\n\t\t\t}\n\t\t\tif(y+1 < sizeBoard && x-1 >= 0){\n\t\t\t\tif(opponentShips[x-1][y+1] != null) return false;\n\t\t\t}\n\t\t\tif(x+shipSize < sizeBoard){\n\t\t\t\tif(opponentShips[x+shipSize][y] != null) return false;\n\t\t\t}\n\t\t\tif(y-1 >= 0 && shipSize+x < sizeBoard){\n\t\t\t\tif(opponentShips[shipSize+x][y-1] != null) return false;\n\t\t\t}\n\t\t\tif(y+1 < sizeBoard && shipSize+x < sizeBoard){\n\t\t\t\tif(opponentShips[shipSize+x][y+1] != null) return false;\n\t\t\t}\n\t\t\tif(y-1 >= 0){\n\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\tif(opponentShips[x+i][y-1] != null) return false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(y+1 < sizeBoard){\n\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\tif(opponentShips[x+i][y+1] != null) return false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private void checkGameCondition(int x, int y) {\n int player = this.gameField.getValue(x, y);\n if (this.cellsClosed == this.gameField.length() * this.gameField.length()) {\n this.gameOver = true;\n }else if (horizontalMatches(player, y) || verticalMatches(player, x)\n || diagonalMatches(player, true)\n || diagonalMatches(player, false)) {\n this.gameOver = true;\n this.winnerId = player;\n }\n }", "private void checkCollisions() {\n float x = pacman.getPos().x;\n float y = pacman.getPos().y;\n\n GameEntity e;\n for (Iterator<GameEntity> i = entities.iterator(); i.hasNext(); ) {\n e = i.next();\n // auf kollision mit spielfigur pruefen\n if (Math.sqrt((x - e.getPos().x) * (x - e.getPos().x) + (y - e.getPos().y) * (y - e.getPos().y)) < 0.5f)\n if (e.collide(this, pacman))\n i.remove();\n }\n }", "private boolean checkSeesPlayer(int x, int y) {\r\n\t\tint enemy;\r\n\t\tif (creature.getCreature().team == 1) {\r\n\t\t\tenemy = 2;\r\n\t\t} else if (creature.getCreature().team == 2) {\r\n\t\t\tenemy = 1;\r\n\t\t} else {\r\n\t\t\tenemy = 0; //No enemy\r\n\t\t}\r\n\t\tRectangle r = new Rectangle(); // Location Rectangle\r\n\t\tr.width = Tile.TILEWIDTH;\r\n\t\tr.height = Tile.TILEHEIGHT;\r\n\t\tr.x = x * Tile.TILEWIDTH;\r\n\t\tr.y = y * Tile.TILEHEIGHT;\r\n\t\tfor(Creature c : handler.getWorld().getEntityManager().getCreatures()) {\r\n\t\t\tif (c.getCreature().team == enemy) {\r\n\t\t\t\tif(c.getCollisionBounds(0, 0).intersects(r)) {\r\n\t\t\t\t\tseenEnemy = c;\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private static void checkCollisions() {\n ArrayList<Entity> bulletsArray = bullets.entities;\n ArrayList<Entity> enemiesArray = enemies.entities;\n for (int i = 0; i < bulletsArray.size(); ++i) {\n for (int j = 0; j < enemiesArray.size(); ++j) {\n if (j < 0) {\n continue;\n }\n if (i < 0) {\n break;\n }\n Entity currentBullet = bulletsArray.get(i);\n Entity currentEnemy = enemiesArray.get(j);\n if (Collision.boxBoxOverlap(currentBullet, currentEnemy)) {\n ++player.hiScore;\n if (currentBullet.collided(currentEnemy)) {\n --i;\n }\n if (currentEnemy.collided(currentBullet)) {\n --j;\n }\n }\n }\n }\n textHiScore.setString(\"HISCORE:\" + player.hiScore);\n\n // Check players with bonuses\n ArrayList<Entity> bonusArray = bonus.entities;\n for (int i = 0; i < bonusArray.size(); ++i) {\n Entity currentBonus = bonusArray.get(i);\n if (Collision.boxBoxOverlap(player, currentBonus)) {\n if (currentBonus.collided(player)) {\n --i;\n player.collided(currentBonus);\n }\n }\n }\n }", "public boolean willBoxesCollide(Unit player, float deltaX, float deltaY) {\n\tScene currentScene = WorldMap.getInstance().getCurrentScene();\n\tfor (Obstacle obstacle : currentScene.getObstacleList()) {\n\t if (player.collisionBetweenBoxes(deltaX, deltaY, obstacle) && player.getPosZ() < obstacle.getProtrusionHeight())\n\t\treturn true;\n\t}\n\t \n\treturn false;\n }", "public abstract boolean collisionWith(CollisionObject obj);", "public boolean playerCollide(Player player) {\n return RectF.intersects(new RectF(this.rect), player.getRect());\n }", "public boolean placeShip(int player, int x, int y) {\n\n Ship ship = null;\n\n for (int i = 0; i < 5; i++) {\n if (playerShips[i].selected) {\n ship = playerShips[i];\n }\n }\n if (ship == null) {\n return false;\n }\n\n if (orientation == 1) {\n if (ship.length + y > 10) {\n return false;\n }\n }\n if (orientation == 0) {\n if (ship.length + x > 10) {\n return false;\n }\n }\n for (int i = 0; i < ship.length; i++) {\n if(orientation == 0) {\n if (humanPlayerBoard[y][x+i] != board.water.ordinal()) {\n return false;\n }\n }\n else{\n if(humanPlayerBoard[y+i][x] != board.water.ordinal()){\n return false;\n }\n }\n }\n for (int i = 0; i < ship.length; i++) {\n if(orientation == 0) {\n humanPlayerBoard[y][x+i] = board.ship.ordinal();\n }\n else{\n humanPlayerBoard[y+i][x] = board.ship.ordinal();\n }\n }\n if(ship.placed){\n if(ship.orientation == 1){\n for(int i = 0; i < ship.length; i++){\n humanPlayerBoard[ship.y+i][ship.x] = board.water.ordinal();\n }\n }\n else{\n for(int j = 0; j < ship.length; j++){\n humanPlayerBoard[ship.y][ship.x+j] = board.water.ordinal();\n }\n }\n }\n ship.setShip(x, y, orientation);\n ship.placed = true;\n\n return true;\n }", "boolean collidesEnemy() {\n for(int i = 0; i < barrage.size(); i++) {\n // establish a rectangle for the laser\n Rectangle blaster = new Rectangle((int)barrage.get(i).getX(), (int)barrage.get(i).getY(), WIDTH, HEIGHT);\n \n // determine if the laser intersects an enemy\n for (int q = 0; q < fleet.size(); q++) {\n Rectangle enemy = new Rectangle((int)fleet.get(q).getX(), (int)fleet.get(q).getY(), 40, 36); \n \n // if blaster hits a ship, remove it\n if (blaster.intersects(enemy) && fleet.get(q).getCount() == 0) {\n fleet.get(q).hit = true; // set the enemy hit\n barrage.remove(barrage.get(i));\n score += 100; // add to score\n return true; // hit\n }\n }\n }\n return false; // miss\n }", "public void checkCollision(){\r\n\r\n\t\t\t\tsmile.updateVelocity();\r\n\r\n\t\t\t\tsmile.updatePosition();\r\n\r\n\t\t\t\tif (smile.updateVelocity() > 0){\r\n\r\n\t\t\t\t\tfor (int k = 0; k < arrayPlat.size(); k++){\r\n\r\n\t\t\t\t\t\tif (smile.getNode().intersects(arrayPlat.get(k).getX(), arrayPlat.get(k).getY(), Constants.PLATFORM_WIDTH, Constants.PLATFORM_HEIGHT)){\r\n\r\n\t\t\t\t\t\t\tsmile.setVelocity(Constants.REBOUND_VELOCITY);\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t}", "public boolean isShipAlreadyPiloted() {\t\t\n\t\tfor (ACBaseShip othership : Autocraft.shipmanager.ships.values()) {\n\t\t\tfor (int i = 0; i < othership.blocks.length; i++) {\n\t\t\t\tif (blockBelongsToShip(othership.blocks[i], blocks))\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public void checkCollision( Sprite obj )\n {\n \n }", "private void checkRegTileCollisions(float deltaTime) {\n\t\tint len = regTiles.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tRegTile tile = regTiles.get(i);\n\t\t\t\n\t\t\t//overlap between player and tile\n\t\t\t\n\t\t\t//experiment with these values to get close to perfect collisions *************************\n\t\t\ttry {\n\t\t\t\tif(OverlapTester.overlapRectangles(player.bounds, tile.bounds)) {\n\t\t\t\t\t\n\t\t\t\t\t//check y - collisions\n\t\t\t\t\tif(player.position.y > tile.position.y + (tile.bounds.height / 2) && player.position.x - (player.bounds.width / 2) + correctionFactor < tile.position.x + (tile.bounds.width / 2) && player.position.x + (player.bounds.width / 2) - correctionFactor > tile.position.x - (tile.bounds.width / 2)) {\n\t\t\t\t\t\tplayer.velocity.y = 0;\n\t\t\t\t\t\tplayer.position.y = tile.position.y + 1;\n\t\t\t\t\t\tif(player.velocity.x > 3) {\n\t\t\t\t\t\t\tplayer.velocity.x -= 0.2f; //prev. optimal was .3\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(player.position.y < tile.position.y - (tile.bounds.height / 2) && player.position.x - (player.bounds.width / 2) + correctionFactor < tile.position.x + (tile.bounds.width / 2) && player.position.x + (player.bounds.width / 2) - correctionFactor > tile.position.x - (tile.bounds.width / 2)) {\n\t\t\t\t\t\tplayer.velocity.y = 0;\n\t\t\t\t\t\tplayer.position.y = tile.position.y - 1;\n\t\t\t\t\t\tif(player.velocity.x > 3) {\n\t\t\t\t\t\t\tplayer.velocity.x -= 0.2f;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//check x - collision\n\t\t\t\t\tif(player.position.x > tile.position.x + (tile.bounds.width / 2) + correctionFactor && player.position.y - (player.bounds.height / 2) + correctionFactor < tile.position.y + (tile.bounds.height / 2) && player.position.y + (player.bounds.height / 2) - correctionFactor > tile.position.y - (tile.bounds.height / 2)) {\n\t\t\t\t\t\tplayer.velocity.x = 0;\n\t\t\t\t\t\txColliding = true;\n\t\t\t\t\t\tplayer.position.x = tile.position.x + 1; //animate possibly\n\t\t\t\t\t\tif(player.velocity.y > 0) {\n\t\t\t\t\t\t\t//player.velocity.y -= 0.2f;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(player.position.x < tile.position.x - (tile.bounds.width / 2) - correctionFactor && player.position.y - (player.bounds.height / 2) + correctionFactor < tile.position.y + (tile.bounds.height / 2) && player.position.y + (player.bounds.height / 2) - correctionFactor > tile.position.y - (tile.bounds.height / 2)) {\n\t\t\t\t\t\tplayer.velocity.x = 0;\n\t\t\t\t\t\txColliding = true;\n\t\t\t\t\t\tplayer.position.x = tile.position.x - 1; //animate possibly\n\t\t\t\t\t\tif(player.velocity.y > 0) {\n\t\t\t\t\t\t\t//player.velocity.y -= 0.2f;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t} catch (Exception e) {}\n\t\t}\n\t\trecheckTileCollisions(); //fix frame-skipping \n\t}", "public boolean hit(int y, int x)\n {\n if (this.space[y][x].charAt(1) == 'X' || this.space[y][x].charAt(1) == '*') { //Test to see if space already hit wasn't passed to hit method\n throw new IllegalArgumentException(\"A space that was already hit can't be hit again\".toUpperCase());\n }\n \n if (!(this.space[y][x].equals(\"[ ]\"))) { //Remove point y, x on ship and board, illegal values not looked at (X or *)\n Ship shipHit = null;\n for (int i = 0; i < this.fleet.size(); i++)\n {\n if(this.space[y][x].charAt(1) == this.fleet.get(i).getEmblem()) {\n shipHit = this.fleet.get(i);\n break;\n }\n }\n \n if(shipHit.destroyPointOnShip(new int[]{y,x})) //check to see if ship was destroyed and displays appropriate message to user, subtracts from\n //number of ships remaining\n {\n System.out.println((shipHit.getClass().getName().replace('_',' ')+ \" was destroyed!!!\").toUpperCase());\n this.numberOfShips--;\n }\n else {\n System.out.println((shipHit.getClass().getName().replace('_',' ')+ \" was hit at \"+(char)(y+'A') + \"-\" + (x+1)).toUpperCase());\n }\n this.space[y][x] = \"[X]\";\n return true;\n }\n else { //Mark useless shot on Board\n System.out.println(\"Nothing was hit at \".toUpperCase()+ (char)(y+'A') + \"-\" + (x+1) + \".\");\n this.space[y][x] = \"[*]\";\n return false;\n }\n }", "public String playerCollide(PlayerObject player)\n {\n String collision;\n\n Rect oldPos = player.getRectangle();\n\n\n if (Rect.intersects(rectangle, player.getRectangle()))\n {\n if (isTouchable && isMovable )\n {\n if (Constants.xVelocity > 0) {\n return \"right\";\n }\n\n if (Constants.xVelocity < 0) {\n return \"left\";\n }\n\n if (Constants.yVelocity > 0) {\n return \"bottom\";\n }\n\n if (Constants.yVelocity < 0) {\n return \"top\";\n }\n }\n\n if (isTouchable & !isMovable)\n {\n return \"0\";\n }\n\n }\n\n return \"null\";\n }", "private void checkIfOccupied(int row, int col) {\n if (status == MotionStatus.DOWN || AIisAttacking) {\n\n// if (player && playerAttacks != null) {\n// // Ignore touch if player has previously committed an attack on that cell.\n// for (int i = 0; i < playerAttacks.size(); i++) {\n// if (playerAttacks.get(i).equals(row,col)) {\n// Log.i(\"for\", \"You Hit this Previously!\");\n// }\n// }\n// }\n\n for (int i = 0; i < occupiedCells.size(); i++) {\n if (occupiedCells.get(i).x == row && occupiedCells.get(i).y == col) {\n Point p = new Point(row, col);\n selectedShip = findWhichShip(p); //Touching View Updated\n Log.i(\"checkIfOccupied getHit\", \"\" + getHit() + \", (\" + row + \", \" + col + \")\");\n setHit(true);\n break;\n }\n }\n\n if (selectedShip == null) {\n setHit(false);\n Log.i(\"checkIfOccupied getHit\", \"\" + getHit() + \", (\" + row + \", \" + col + \")\");\n }\n\n } else if (status == MotionStatus.MOVE) {//MotionStatus.MOVE\n if (selectedShip != null) {//Need to make sure none of the current ship parts will overlap another.\n int rowHolder = selectedShip.getHeadCoordinatePoint().x;\n int colHolder = selectedShip.getHeadCoordinatePoint().y;\n int tempRow, tempCol;\n selectedShip.moveShipTo(row, col);\n for (Ship s : ships) {\n if (s != selectedShip) {\n\n for (int i = 0; i < selectedShip.getShipSize(); i++) {\n tempRow = selectedShip.getBodyLocationPoints()[i].x;\n tempCol = selectedShip.getBodyLocationPoints()[i].y;\n\n for (int j = 0; j < s.getShipSize(); j++) {\n if (tempRow == s.getBodyLocationPoints()[j].x && tempCol == s.getBodyLocationPoints()[j].y) {\n selectedShip.moveShipTo(rowHolder, colHolder);\n }\n }//for\n }//for\n }\n }//for\n }\n }//Move\n }", "public boolean collides(int x, int y) {\n //Check For Collision\n // bottom left corner\n Tile tile = game.map.getTilePixel(x, y);\n // top right corner\n Tile tile2 = game.map.getTilePixel((int) (x + width), (int) (y + width));\n // top left corner\n Tile tile3 = game.map.getTilePixel(x, (int) (y + width));\n // bottom right corner\n Tile tile4 = game.map.getTilePixel((int) (x + width), y);\n try {\n boolean collisionWithMap = (tile == null) || (!tile.isPassable() || !tile3.isPassable() || !tile2.isPassable() || !tile4.isPassable());\n //React to Collision\n if (collisionWithMap) {\n if (speedX != 0 && speedY != 0) {\n if ((!tile.isPassable() && !tile3.isPassable()) || (!tile2.isPassable() && !tile4.isPassable()))\n speedX = 0;\n if ((!tile.isPassable() && !tile4.isPassable()) || (!tile2.isPassable() && !tile3.isPassable()))\n speedY = 0;\n }\n }\n return collisionWithMap;\n } catch (NullPointerException e) {\n //in case any of the tiles is outside of the map\n return true;\n }\n }", "void collide() {\n for (Target t : this.helicopterpieces) {\n if (!t.isHelicopter && ((t.x == this.player.x && t.y == this.player.y)\n || (t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected--;\n t.isCollected = true;\n }\n if (t.isHelicopter && this.collected == 1\n && ((t.x == this.player.x && t.y == this.player.y) || (t.isHelicopter\n && this.collected == 1 && t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected = 0;\n this.helicopter.isCollected = true;\n }\n }\n }", "public boolean isValid(Ships ship) {\n\t\tboolean orientation = ship.getOrientation();\r\n\t\tif(orientation) {\r\n\t\t\tif(ship.getLength() + ship.getCoord()[1] <= 10) {\r\n\t\t\t\treturn this.isOverlapping(ship);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif(ship.getLength() + ship.getCoord()[0] <= 10) {\r\n\t\t\t\treturn this.isOverlapping(ship);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "void checkHandleContactWithPlayer() {\n Player curPlayer = this.mainSketch.getCurrentActivePlayer();\n\n if (this.doesAffectPlayer) {\n // boundary collision for player\n if (contactWithCharacter(curPlayer)) { // this has contact with non-player\n if (!this.charactersTouchingThis.contains(curPlayer)) { // new collision detected\n curPlayer.changeNumberOfVerticalBoundaryContacts(1);\n this.charactersTouchingThis.add(curPlayer);\n }\n curPlayer.handleContactWithVerticalBoundary(this.startPoint.x);\n\n } else { // this DOES NOT have contact with player\n if (this.charactersTouchingThis.contains(curPlayer)) {\n curPlayer.setAbleToMoveRight(true);\n curPlayer.setAbleToMoveLeft(true);\n curPlayer.changeNumberOfVerticalBoundaryContacts(-1);\n this.charactersTouchingThis.remove(curPlayer);\n }\n }\n }\n }", "public void controlla_collisioni() {\n\n for (int i = punti; i > 0; i--) {\n\n if ((i > 4) && (x[0] == x[i]) && (y[0] == y[i])) {\n in_gioco = false;\n }\n }\n\n if (y[0] >= ALTEZZA+85) { //devo aggungere +85 perche' l'area di gioco comincia dal punto 100,100\n in_gioco = false;\n }\n\n if (y[0] <= 100) {\n in_gioco = false;\n }\n\n if (x[0] >= LARGHEZZA+85) {\n in_gioco = false;\n }\n\n if (x[0] <= 100) {\n in_gioco = false;\n }\n }", "@Override\n public void checkCollision( Sprite obj )\n {\n\n }", "@Override\n public boolean checkCollideSingle(GameObject gameObject, int x, int y) {\n if (!(gameObject instanceof Player) || !isAlive())\n return false;\n\n boolean result = super.withinRange(x, y);\n\n if (result) {\n if (prev + (hitInterval * 10) < System.currentTimeMillis()) {\n prev = System.currentTimeMillis();\n startHitTime = prev + 300;\n startHit = true;\n }\n }\n\n if (result) {\n if (startHitTime < System.currentTimeMillis() && startHit) {\n HUD.getInstance().removeHealth(getDamage());\n setStatus(PlayerStatus.FIGHTING);\n startHit = false;\n }\n }\n\n return result;\n }", "private boolean checkCollisions(int X, int Y){\n\t\tint hitBoxSizeX = 105;\n\t\tint hitBoxSizeY = 80;\n\t\tfor(int i=0;i<enemy_num;i++){\n\t\t\tif(X<enemy[i][0]+hitBoxSizeX && X>enemy[i][0]){\n\t\t\t\tif(Y<enemy[i][1]+hitBoxSizeY && Y>enemy[i][1]){\n\t\t\t\t\tremoveEnemy(i);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn(false);\n\t}", "public boolean contains(Ship s){\n\t\treturn myPolygon.contains(s.getX()-10, s.getY()-10,s.getW()/2,s.getH()/2);\n\t\t\n\t}", "public static void checkCollisions() {\n\t \n\t\tfor (Ball b1 : Panel.balls) {\n\t\t\tfor (Ball b2 : Panel.balls) {\n\t\t\t\tif (b1.Bounds().intersects(b2.Bounds()) && !b1.equals(b2)) {\t\t\t//checking for collision and no equals comparisions\n\t\t\t\t\tint vX = b1.getxVelocity();\n\t\t\t\t\tint vY = b1.getyVelocity();\n\t\t\t\t\tb1.setxVelocity(b2.getxVelocity());\t\t\t\t\t\t\t\t//reversing velocities of each Ball object\n\t\t\t\t\tb1.setyVelocity(b2.getyVelocity());\n\t\t\t\t\tb2.setxVelocity(vX);\n\t\t\t\t\tb2.setyVelocity(vY);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void checkHits() {\n\t\t// your code here\n\t\tfor (int i = 0; i < enemyX.length; i++) {\n\t\t\tif (distance((int)xI, (int)yI, enemyX[i], enemyY[i]) <= DIAM_ENEMY/2 + DIAM_LAUNCHER/2) {\n\t\t\t}\n\t\t}\n\t}", "protected void checkEntityCollisions(long time) {\n\t\tRectangle2D.Float pla1 = player1.getLocationAsRect();\n\t\tRectangle2D.Float pla2 = player2.getLocationAsRect();\n\t\tfor(int i = 0; i < ghosts.length; i++)\n\t\t{\n\t\t\tGhost g = ghosts[i];\n\t\t\t\n\t\t\tif(g.isDead())\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tRectangle2D.Float ghRect = g.getLocationAsRect();\n\t\t\t\n\t\t\tif(ghRect.intersects(pla1))\n\t\t\t\tonPlayerCollideWithGhost(time, player1, i);\n\t\t\t\n\t\t\tif(ghRect.intersects(pla2))\n\t\t\t\tonPlayerCollideWithGhost(time, player2, i);\n\t\t}\n\t}", "public abstract boolean collide(int x, int y, int z, int dim, Entity entity);", "public int check4CollisionWithBlue(Player player)\n {\n int number_of_collisions = 0;\n int x_cord = getMidPoint(player.x_cordinate);\n int y_cord = getMidPoint(player.y_cordinate);\n int blux1 = getMidPoint(getBlue_player1().x_cordinate);//blue_player1.x_cordinate;\n int blux2 = getMidPoint(getBlue_player2().x_cordinate);\n int blux3 = getMidPoint(getBlue_player3().x_cordinate);//blue_player3.x_cordinate;\n int blux4 = getMidPoint(getBlue_player4().x_cordinate);//blue_player4.x_cordinate;\n int bluy1 = getMidPoint(getBlue_player1().y_cordinate);//blue_player1.y_cordinate;\n int bluy2 = getMidPoint(getBlue_player2().y_cordinate);//blue_player2.y_cordinate;\n int bluy3 = getMidPoint(getBlue_player3().y_cordinate);//blue_player3.y_cordinate;\n int bluy4 = getMidPoint(getBlue_player4().y_cordinate);//blue_player4.y_cordinate;\n number_of_collisions += collisionDetection(x_cord, y_cord, blux1, bluy1);\n number_of_collisions += collisionDetection(x_cord, y_cord, blux2, bluy2);\n number_of_collisions += collisionDetection(x_cord, y_cord, blux3, bluy3);\n number_of_collisions += collisionDetection(x_cord, y_cord, blux4, bluy4);\n return number_of_collisions;\n }", "public static boolean collision(String direction, int speed){\n\t\tMain.p.updateHitboxs();\n\t\t/*LeftBottomHitbox[0] = Main.p.xLeft;\n\t\tLeftBottomHitbox[1] = Main.p.yLeft;\n\t\tRightBottomHitbox[0] = Main.p.xRight;\n\t\tRightBottomHitbox[1] = Main.p.yRight;\n\t\tLeftTopHitbox[0] = Main.p.xLeft;\n\t\tLeftTopHitbox[1] = Main.p.yLeft-(3 * Main.SCALE);\n\t\tRightTopHitbox[0] = Main.p.xRight;\n\t\tRightTopHitbox[1] = Main.p.yRight-(3 * Main.SCALE);\n\t\tif(!direction.equals(\"p\")){\n\t\t\tresult1 = checkCollision(speed, direction, LeftBottomHitbox);\n\t\t\tresult2 = checkCollision(speed, direction, RightBottomHitbox);\n\t\t\tresult3 = checkCollision(speed, direction, LeftTopHitbox);\n\t\t\tresult4 = checkCollision(speed, direction, RightTopHitbox);\n\t\t\tif(animationSwitchCount == 4)\n\t\t\t\tMain.p.pg.animationSet = 1;\n\t\t\tanimationSwitchCount = 0;\n\t\t\treturn result1 || result2 || result3 || result4;\n\t\t}\n\t\tresult1 = checkPlayerCollision(LeftBottomHitbox[0], LeftBottomHitbox[1]);\n\t\tresult2 = checkPlayerCollision(RightBottomHitbox[0], RightBottomHitbox[1]);\n\t\tresult3 = checkPlayerCollision(LeftTopHitbox[0], LeftTopHitbox[1]);\n\t\tresult4 = checkPlayerCollision(RightTopHitbox[0], RightTopHitbox[1]);\n\t\treturn result1 || result2 || result3 || result4;\n\t\t\t*/\n\t\tArrayList<int[]> tiles = new ArrayList<int[]>();\n\t\tint tempX, tempY;\n\t\tboolean copy = false, xOverextended = false, yOverextended = false;\n\t\t\n\t\tif(direction.equals(\"x\")){\n\t\t\tx = Main.p.getXStart() + speed;\n\t\t\ty = Main.p.getYStart();\n\t\t}\n\t\telse if (direction.equals(\"y\")){\n\t\t\tx = Main.p.getXStart();\n\t\t\ty = Main.p.getYStart() + speed;\n\t\t}\n\t\tif(!direction.equals(\"p\")){\n\t\t\tfor(int yCount = 0; yCount <= Main.p.getCOLLISIONSIZEY(); yCount++){\n\t\t\t\ttempY = y + (yCount * Main.T);\n\t\t\t\tif(tempY > y + Main.p.getCOLLISIONDISTANCEY()){\n\t\t\t\t\ttempY = y + Main.p.getCOLLISIONDISTANCEY();\n\t\t\t\t\tyOverextended = true;\n\t\t\t\t}\n\t\t\t\tfor(int xCount = 0; xCount <= Main.p.getCOLLISIONSIZEX(); xCount++){\n\t\t\t\t\ttempX = x + (xCount * Main.T);\n\t\t\t\t\tif(tempX > x + Main.p.getCOLLISIONDISTANCEX()){\n\t\t\t\t\t\txOverextended = true;\n\t\t\t\t\t\ttempX = x + Main.p.getCOLLISIONDISTANCEX();\n\t\t\t\t\t}\n\t\t\t\t\ttempTile = Main.p.getCurrentTile(tempX, tempY);\n\t\t\t\t\tfor(int i = 0; i < tiles.size(); i++){\n\t\t\t\t\t\tif(tempTile[0] == tiles.get(i)[0] && tempTile[1] == tiles.get(i)[1]){\n\t\t\t\t\t\t\tcopy = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!copy){\n\t\t\t\t\t\tif(collisionOccured())\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\ttiles.add(tempTile);\n\t\t\t\t\t}\n\t\t\t\t\tcopy = false;\n\t\t\t\t\tif(xOverextended){\n\t\t\t\t\t\txOverextended = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(yOverextended)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//If no tile collision is found sprite collisions are checked\n\t\tfor(int i = 0; i < Main.currentLocation.ls.sprites.size(); i++){\n\t\t\tif(Main.currentLocation.ls.sprites.get(i) != null && Main.currentLocation.ls.sprites.get(i).playerCollision(x, y))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean detectedCollision(int xCoordinate, int yCoordinate) {\n return xCoordinate >= x && xCoordinate <= x + width\n && yCoordinate >= y && yCoordinate <= y + height;\n }", "public boolean attackShip(int row, int column, Grid grid){\n\t\tboolean attempt = true;\r\n\t\t\r\n\t\tif(grid.getGameObject(grid.getGrid()[row][column]) == 1) { // If the object found is a ShipSection\r\n\t\t\tattempt = true;\r\n\t\t\tfor (int i = 0; i < grid.getAliveShips().length; i++) { //Check every alive ship\r\n\t\t\t\tif ( grid.getAliveShips()[i] instanceof Ships) {\r\n\t\t\t\t\tfor (int j = 0; j < grid.getAliveShips()[i].getShip().length; j++) { //Check the ship section on a alive ship\r\n\t\t\t\t\t\tif (grid.getAliveShips()[i].getShip()[j] instanceof ShipSection) {\r\n\t\t\t\t\t\t\tif (grid.getAliveShips()[i].getShip()[j].getCoord()[0] == grid.getGrid()[row][column].getCoord()[0] && grid.getAliveShips()[i].getShip()[j].getCoord()[1] == grid.getGrid()[row][column].getCoord()[1]) { //If the coords of the ship on the grid and the one on AliveShips match\r\n\t\t\t\t\t\t\t\tgrid.getAliveShips()[i].decreaseHP(); \r\n\t\t\t\t\t\t\t\tgrid.getAliveShips()[i].getShip()[j] = null; //Bye bye ShipSection\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tgrid.setGameObject(new Explosion(row, column)); //Kabooooom\r\n\t\t}\r\n\t\telse if(grid.getGameObject(grid.getGrid()[row][column]) == 2){ // If it is either an explosion or missed shot\r\n\t\t\tattempt = false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tattempt = false;\r\n\t\t\tgrid.setGameObject(new Shots(row, column));\r\n\t\t}\r\n\t\t\r\n\t\treturn attempt;\r\n\t}", "public int CollisionBetween2RedPlayers(Player player)\n {\n int total_collisions = 0;\n try\n {\n RedPlayer red_player = (RedPlayer) player;\n total_collisions += check4CollisionWithRed(player);\n player.setCollisions(total_collisions);\n }\n catch (Exception e)\n {\n return -1;\n }\n return total_collisions;\n }", "public int checkScreenedShip(Spaceship aShip){\n\t \r\n\t \r\n\t int found = -1;\r\n\t for (int i = 0; i < screenedShips.size(); i++){\r\n\t if (aShip.getId() == screenedShips.get(i)){\r\n\t found = i;\r\n\t }\r\n\t }\r\n\t \r\n\t return found;\r\n\t }", "public static boolean checkHit(int row, int col, BattleshipModel currentModel){\n boolean hit = false;\n\n //check if it is a hit on the computer's aircraft carrier\n if ((currentModel.computerAircraftCarrier.start.Across <= col) && (col <= currentModel.computerAircraftCarrier.end.Across)){\n if ((currentModel.computerAircraftCarrier.start.Down <= row) && (row <= currentModel.computerAircraftCarrier.end.Down))\n {\n //it's a hit on the aircraft carrier\n hit = true;\n }\n }\n\n //check if it's a hit on the battleship\n if ((currentModel.computerBattleship.start.Across <= col) && (col <= currentModel.computerBattleship.end.Across)){\n if ((currentModel.computerBattleship.start.Down <= row) && (row <= currentModel.computerBattleship.end.Down))\n {\n //it's a hit on the battleship\n hit = true;\n }\n }\n\n //check if it's a hit on the cruiser\n if ((currentModel.computerCruiser.start.Across <= col) && (col <= currentModel.computerCruiser.end.Across)){\n if ((currentModel.computerCruiser.start.Down <= row) && (row <= currentModel.computerCruiser.end.Down))\n {\n //it's a hit on the cruiser\n hit = true;\n }\n }\n\n //check if it's a hit on the destroyer;\n if ((currentModel.computerDestroyer.start.Across <= col) && (col <= currentModel.computerDestroyer.end.Across)){\n if ((currentModel.computerDestroyer.start.Down <= row) && (row <= currentModel.computerDestroyer.end.Down))\n {\n //it's a hit on the destroyer\n hit = true;\n }\n }\n\n //check if it's a hit on th submarine\n if ((currentModel.computerSubmarine.start.Across <= col) && (col <= currentModel.computerSubmarine.end.Across)){\n if ((currentModel.computerSubmarine.start.Down <= row) && (row <= currentModel.computerSubmarine.end.Down))\n {\n //it's a hit on the submarine\n hit = true;\n }\n }\n\n\n if (!hit){\n //record as a miss\n Misses miss = new Misses(row, col);\n currentModel.computerMisses.add(miss);\n System.out.println(\"You missed!\");\n } else if (hit) {\n Hits hit1 = new Hits(row, col);\n currentModel.computerHits.add(hit1);\n System.out.println(\"That was a hit\");\n }\n\n //Hit for AI to user\n int airow, aicol;\n boolean aihit = false;\n\n airow = rn.nextInt(10) + 1;\n aicol = rn.nextInt(10) + 1;\n\n //check if it is a hit on the computer's aircraft carrier\n if ((currentModel.AircraftCarrier.start.Across <= aicol) && (aicol <= currentModel.AircraftCarrier.end.Across)){\n if ((currentModel.AircraftCarrier.start.Down <= airow) && (airow <= currentModel.AircraftCarrier.end.Down))\n {\n //it's a hit on the aircraft carrier\n aihit = true;\n }\n }\n\n //check if it's a hit on the battleship\n if ((currentModel.Battleship.start.Across <= aicol) && (aicol <= currentModel.Battleship.end.Across)){\n if ((currentModel.Battleship.start.Down <= airow) && (airow <= currentModel.Battleship.end.Down))\n {\n //it's a hit on the battleship\n aihit = true;\n }\n }\n\n //check if it's a hit on the cruiser\n if ((currentModel.Cruiser.start.Across <= aicol) && (aicol <= currentModel.Cruiser.end.Across)){\n if ((currentModel.Cruiser.start.Down <= airow) && (airow <= currentModel.Cruiser.end.Down))\n {\n //it's a hit on the cruiser\n aihit = true;\n }\n }\n\n //check if it's a hit on the destroyer;\n if ((currentModel.Destroyer.start.Across <= aicol) && (aicol <= currentModel.Destroyer.end.Across)){\n if ((currentModel.Destroyer.start.Down <= airow) && (airow <= currentModel.Destroyer.end.Down))\n {\n //it's a hit on the destroyer\n aihit = true;\n }\n }\n\n //check if it's a hit on th submarine\n if ((currentModel.Submarine.start.Across <= aicol) && (aicol <= currentModel.Submarine.end.Across)){\n if ((currentModel.Submarine.start.Down <= airow) && (airow <= currentModel.Submarine.end.Down))\n {\n //it's a hit on the submarine\n aihit = true;\n }\n }\n\n if (!aihit){\n //record as a miss\n Misses aimiss = new Misses(airow, aicol);\n currentModel.Misses.add(aimiss);\n System.out.println(\"The computer missed!\");\n } else if (aihit) {\n Hits aihit1 = new Hits(airow, aicol);\n currentModel.Hits.add(aihit1);\n System.out.println(\"The computer hit\");\n }\n\n //return the updated battleship model as a string (json)\n Gson gson = new Gson();\n String CurrentStateJson = gson.toJson(currentModel);\n\n // return CurrentStateJson;\n return hit;\n\n }", "public boolean intersects(Sprite ship) {\r\n\t\t\tArea asteroid = new Area(shape);\r\n\t\t\treturn ship.intersects(this);\r\n\t\t}", "public boolean detectCollision(int x, int y) {\n\t\tif(this.x <= x && this.y <= y && this.x + width >= x && this.y + height >= y) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private void checkCollisions() {\n int x1 = 0;\n int x2 = 0;\n for(CollisionBox e : cols) {\n for(CollisionBox f : cols) {\n if(\n x2 > x1 && // Skip checking collisions twice\n// (\n// e != f || // The entities are not the same entity\n// ( // One of the entities's parent object is not the bullet of the other's (aka ignore player bullets colliding with player)\n// // And also check they're not both from the same entity (two bullets colliding both going in the same direction from the same entity)\n// f.getParent() != null && // The first entity has a parent and\n// e.getParent() != null && // The second entity has a parent and\n// f.getParent().getParent() != null && // The first entity's parent has a parent and\n// e.getParent().getParent() != null && // The second entity's parent has a parent and\n// f.getParent().getParent() != e.getParent() && // The first entity's parent's parent is not the second entity's parent\n// e.getParent().getParent() != f.getParent() &&// The second entity's parent's parent is not the first entity's parent\n// f.getParent().getParent() != e.getParent().getParent() // The first and second entities' parents' parents are not the same\n// )\n// ) &&\n SAT.isColliding(e, f) // The entities are colliding\n ) { // Collide the Entities\n Entity ep = e.getParent();\n Entity fp = f.getParent();\n ep.collide(fp);\n fp.collide(ep);\n }\n x2++;\n }\n x1++;\n x2 = 0;\n }\n }", "public void checkCollisions() {\n\t\t List<Missile> missiles = player.getMissiles();\n\t\t for(Missile n : missiles) {\n\t\t\t Rectangle r1 = n.getBounds();\n\t\t\t for(Mushroom mush : mushrooms) {\n\t\t\t\t Rectangle r2 = mush.getBounds();\n\t\t\t\t r2.x += 8;\n\t\t\t\t if(r1.intersects(r2)) {\n\t\t\t\t\t mush.hitCnt += 1;\n\t\t\t\t\t if(mush.hitCnt == 3) {\n\t\t\t\t\t\t score += 5;\n\t\t\t\t\t\t n.setVisible(false);\n\t\t\t\t\t\t mush.setVisible(false);\n\t\t\t\t\t } else {\n\t\t\t\t\t\t score += 1;\n\t\t\t\t\t\t n.setVisible(false);\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if Missile hits Centipede\n\t\t //missiles = player.getMissiles();\n\t\t for(Missile m: missiles) {\n\t\t\t Rectangle rm = m.getBounds();\n\t\t\t for(int i = 0; i < centipede.size(); i++) {\n\t\t\t\t Segment s = centipede.get(i);\n\t\t\t\t Rectangle rs = s.getBounds();\n\t\t\t\t if(rs.intersects(rm)) {\n\t\t\t\t\ts.hit();\n\t\t\t\t\tscore = (s.hitCnt < 2 ? score +2 : score + 0);\n\t\t\t\t\tif(s.hitCnt == 2){\n\t\t\t\t\t\t//split centipede\n\t\t\t\t\t\tscore += 5;\n\t\t\t\t\t\tm.setVisible(false);\n\t\t\t\t\t\tcentipede.remove(i);\n\t\t\t\t\t\t//mushrooms.add(new Mushroom(s.getX(), s.getY()));\n\t\t\t\t\t}else {\n\t\t\t\t\t\tm.setVisible(false);\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if missile hits spider\n\t\t missiles = player.getMissiles();\n\t\t for(Missile m : missiles) {\n\t\t\t Rectangle mBound = m.getBounds();\n\t\t\t Rectangle spiderBound = spider.getBounds();\n\t\t\t if(mBound.intersects(spiderBound)) {\n\t\t\t\t spiderHitCnt += 1;\n\t\t\t\t if(spiderHitCnt == 2) {\n\t\t\t\t\t m.setVisible(false);\n\t\t\t\t\t spider.setVisible(false);\n\t\t\t\t\t score += 600;\n\t\t\t\t } else {\n\t\t\t\t\t score += 100;\n\t\t\t\t\t m.setVisible(false);\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if centipede hits mushroom\n\t\t for(Segment c : centipede) {\n\t\t\t Rectangle cB = c.getBounds();\n\t\t\t for(Mushroom m: mushrooms) {\n\t\t\t\t Rectangle mB = new Rectangle(m.getX(), m.getY() + 5, m.getWidth(), m.getHeight() - 10);\n\t\t\t\t mB.y += 3;\n\t\t\t\t if(cB.intersects(mB)) {\n\t\t\t\t\t//makes each segment to go downs\n\t\t\t\t\tc.y += 16;\n\t\t\t\t\tc.dx = -c.dx;\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if Centipede hits Player\n\t\t Rectangle playerBounds = player.getBounds();\n\t\t for(Segment s : centipede) {\n\t\t\t Rectangle sB = s.getBounds();\n\t\t\t if(playerBounds.intersects(sB)) {\n\t\t\t\t playerLives -= 1;\n\t\t\t\t playerHitCnt += 1;\n\t\t\t\t if(playerHitCnt > MAX_HIT_COUNT) {\n\t\t\t\t\t// System.out.println(playerLives+\" \"+ x);\n\t\t\t\t\t player.setVisible(false);\n\t\t\t\t\t inGame = false;\n\t\t\t\t }else {\n\t\t\t\t\t\tplayer.x = 707;\n\t\t\t\t\t\tplayer.y = 708;\n\t\t\t\t\t\tPoint location = getLocationOnScreen();\n\t\t\t\t\t\trobot.mouseMove(location.x + 250, location.y + 425);\n\t\t\t\t\t\tplayer = new Player(300, 400);\n\t\t\t\t\t\tregenMushrooms();\n\t\t\t\t\t}\n\t\t\t }\n\t\t }\n\n\t\t //check if Spider hits Player\n\t\t playerBounds = player.getBounds();\n\t\t Rectangle spiderBounds = spider.getBounds();\n\t\t if(spiderBounds.intersects(playerBounds)) {\n\t\t\tplayerLives -= 1;\n\t\t\tplayerHitCnt += 1;\n\t\t\tif(playerLives > MAX_HIT_COUNT) {\n\t\t\t\t//System.out.println(playerLives+\" \"+ y);\n\t\t\t\tplayer.setVisible(false);\n\t\t\t\tspider.setVisible(false);\n\t\t\t}else {\n\t\t\t\tregenMushrooms();\n\t\t\t\tcentipede.clear();\n\t\t\t\tcreateCentipede();\n\t\t\t\tplayer.x = 707;\n\t\t\t\tplayer.y = 708;\n\t\t\t\tPoint location = getLocationOnScreen();\n\t\t\t\trobot.mouseMove(location.x + 250, location.y + 425);\n\t\t\t\tplayer = new Player(300, 400);\n\t\t\t}\n\t\t}\n\t }", "public void checkCollision(Enemy enemy){\r\n if(collidingEntity!=null && collidingEntity!=enemy){\r\n return;\r\n }\r\n FloatRect x = enemy.getRect ();\r\n\r\n if (rect1==null || x==null){\r\n return;\r\n }\r\n\r\n FloatRect ins = rect1.intersection (x);\r\n\r\n if(ins!=null) {\r\n this.collidingEntity= enemy;\r\n collide=true;\r\n checkRightCollision (x);\r\n checkLeftCollision (x);\r\n bounce(enemy);\r\n } else {\r\n noCollision ();\r\n }\r\n }", "private void fireball2Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball2.getX() - 1, fireball2.getY());\r\n\t\tGObject topRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball2.getX() - 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tGObject bottomRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tif(topLeft == player || topRight == player || bottomLeft == player || bottomRight == player) {\r\n\t\t\tremove(fireball2);\r\n\t\t\tfireball2 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}", "public void collide(Entity entity) throws IllegalArgumentException{\n\t \n \tif (this instanceof Ship && entity instanceof Ship) this.defaultCollide(entity);\n \telse if (this instanceof MinorPlanet && entity instanceof MinorPlanet) this.defaultCollide(entity);\n \telse if (entity instanceof Bullet) {\n \t\tBullet bullet = (Bullet) entity;\n \t\tif (bullet.getBulletSource() == this) bullet.bulletCollideOwnShip((Ship) this);\n \t\telse bullet.bulletCollideSomethingElse(this);\n \t\t}\n \t\n \telse if (this instanceof Bullet) {\n \t\tBullet bullet = (Bullet) this;\n \t\tif (bullet.getBulletSource() == entity) bullet.bulletCollideOwnShip((Ship) entity);\n \t\telse bullet.bulletCollideSomethingElse(entity);\n \t\t}\n \t\n \telse if ((this instanceof Ship && entity instanceof Asteroid) || (entity instanceof Ship && this instanceof Asteroid)){\n \t\tShip ship = null;\n \t\tif (this instanceof Ship){\n \t\t\tship = (Ship) this;\n \t\t} else {\n \t\t\tship = (Ship) entity;\n \t\t}\n \t\tship.terminate();\n \t}\n \t\n \telse if ((this instanceof Ship && entity instanceof Planetoid) || (entity instanceof Ship && this instanceof Planetoid)){\n \t\tShip ship = null;\n \t\tif (this instanceof Ship){\n \t\t\tship = (Ship) this;\n \t\t} else {\n \t\t\tship = (Ship) entity;\n \t\t}\n \t\t\n \t\tWorld world = ship.getSuperWorld();\n \t\tdouble xnew = Helper.randomInBetween(this.getRadius(), world.getWorldWidth());\n \t\tdouble ynew = Helper.randomInBetween(this.getRadius(), world.getWorldHeight());\n \t\tship.setPosition(xnew, ynew);\n \t\t\n \t\twhile (! this.overlapAnyEntity()){\n \t\t\txnew = Helper.randomInBetween(this.getRadius(), world.getWorldWidth());\n \t\t\tynew = Helper.randomInBetween(this.getRadius(), world.getWorldHeight());\n \t\t\tship.setPosition(xnew, ynew);\n \t\t\t}\n \t}\n\t \t\n \t\n }", "public void checkCollision()\r\n\t{\r\n\t\t//for Bullets against Avatar and Enemy\r\n\t\tfor(int bulletIndex = 0; bulletIndex < bullets.size(); bulletIndex++)\r\n\t\t{\r\n\t\t\tBullet b = bullets.get(bulletIndex);\r\n\t\t\tif (b instanceof AvatarBullet)\r\n\t\t\t{\r\n\t\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\t\tboolean collided = false;\r\n\t\t\t\tfor (int enemyIndex = 0; enemyIndex < enemy.size(); enemyIndex++)\r\n\t\t\t\t{\r\n\t\t\t\t\tEnemy e = enemy.get(enemyIndex);\r\n\t\t\t\t\tif(((AvatarBullet) b).collidedWith(e))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\t\tenemy.remove(enemyIndex);\r\n\t\t\t\t\t\tenemyIndex --;\r\n\t\t\t\t\t\tcollided = true;\r\n\t\t\t\t\t\tint score = getScore()+1;\r\n\t\t\t\t\t\tsetScore(score);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (b instanceof EnemyBullet)\r\n\t\t\t{\r\n\t\t\t\tif (((EnemyBullet) b).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tbullets.remove(bulletIndex);\r\n\t\t\t\t\tbulletIndex--;\r\n\t\t\t\t\tint health = Avatar.getLives()-1;\r\n\t\t\t\t\tavatar.setLives(health);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int platformIndex = 0; platformIndex < platforms.size(); platformIndex++)\r\n\t\t{\r\n\t\t\tPlatforms p = platforms.get(platformIndex);\r\n\t\t\tif (p instanceof Platforms)\r\n\t\t\t{\r\n\t\t\t\t//boolean collided = false;\r\n\t\t\t\t//Avatar a = avatar.get(enemyIndex);\r\n\t\t\t\tif(((Platforms) p).collidedWith(avatar))\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tsetAlive(false);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void recheckTileCollisions() {\n\t\tint len = regTiles.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tRegTile tile = regTiles.get(i);\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(OverlapTester.overlapRectangles(player.bounds, tile.bounds)) {\n\t\t\t\t\t//check-x cols and fix\n\t\t\t\t\tif(player.position.x > tile.position.x - tile.bounds.width/2 && player.position.x < tile.position.x + tile.bounds.width/2 && player.position.y < tile.position.y + tile.bounds.height/2 && player.position.y > tile.position.y - tile.bounds.height/2) {\n\t\t\t\t\t\tif(player.position.x < tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x - 1;\n\t\t\t\t\t\t} else if(player.position.x > tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}", "public boolean hitCheck(float x, float y) {\r\n if (boxX <= x && x <= boxX + boxSize &&\r\n boxY <= y && y <= frameHeight) {\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean deployWeapon(int x, int y, Player opponent, Map attacked_map, Map current_player_map, Player current_player, int method_choice) {\n Ship temp_ship = new Minesweeper();\n //Catches if current player is trying to use a bomb on an underwater map or space map, returns false for not successful\n if (current_player.player_weapons.contains(this) && (attacked_map.getName().equals(\"UnderwaterMap\") || attacked_map.getName().equals(\"SpaceMap\"))) {\n bombOutputs(method_choice, 1, attacked_map, temp_ship, x, y);\n return false;\n }\n\n //Checks if coordinate is in bounds\n if (x > 10 || x < 0 || y > 10 || y < 0) {\n bombOutputs(method_choice, 2, attacked_map, temp_ship, x, y);\n return false;\n }\n\n int is_occupied = attacked_map.defensiveGrid.checkCellStatus(x,y);\n\n //Checks if there is a ship at the attacked location: 0 = no ship, 1 = ship exists, 2 = ship exists and already hit\n if (is_occupied == 0) {\n //no ship: miss!\n bombOutputs(method_choice, 3, attacked_map, temp_ship, x, y);\n\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(1, x, y);\n }\n } else if (is_occupied == 1) {\n //ship there: first time attacking!\n Ship attacked_ship = new Minesweeper();\n\n for (int i = 0; i < attacked_map.existing_ships.size(); i++){\n Ship shipy = attacked_map.existing_ships.get(i);\n ArrayList<Coordinate> coordsList = attacked_map.ship_coordinates.get(shipy);\n for (Coordinate coordinate : coordsList) {\n if (coordinate.x == x && coordinate.y == y) {\n attacked_ship = shipy;\n break;\n }\n }\n }\n\n //Check if captain's quarters at location\n Coordinate capt_quart = attacked_map.captains_quarters.get(attacked_ship);\n if (capt_quart.x == x && capt_quart.y == y) {\n //Check for armoured captain's quarters\n if (attacked_ship instanceof ArmoredShip) {\n //Armoured!\n //Armoured captains quarters hasn't been hit before\n if (((ArmoredShip) attacked_ship).getHitCount() == 0) {\n //Prints out a miss - some sneaky captain's quarters here\n bombOutputs(method_choice, 4, attacked_map, attacked_ship, x, y);\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(1, x, y);\n }\n ((ArmoredShip) attacked_ship).updateHitCount();\n }\n //Armoured captains quarters has been hit before\n else if (((ArmoredShip) attacked_ship).getHitCount() == 1){\n //Destroys entire ship!\n bombOutputs(method_choice, 5, attacked_map, attacked_ship, x, y);\n bombOutputs(method_choice, 6, attacked_map, attacked_ship, x, y);\n\n attacked_map.sinkShip(attacked_ship);\n\n if (method_choice == 2 || method_choice == 3) {\n current_player.incrementShipSunkCount();\n current_player.hasSunkFirstShip();\n }\n\n attacked_map.ship_health.replace(attacked_ship, 0);\n ArrayList<Coordinate> coordsList = attacked_map.ship_coordinates.get(attacked_ship);\n for (Coordinate coordinate : coordsList) {\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n attacked_map.defensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n ((ArmoredShip) attacked_ship).updateHitCount();\n }\n }\n //Hit a captain's quarters but not armoured\n else {\n //Destroy the ship!\n bombOutputs(method_choice, 7, attacked_map, attacked_ship, x, y);\n attacked_map.sinkShip(attacked_ship);\n if (method_choice == 2 || method_choice == 3) {\n current_player.incrementShipSunkCount();\n current_player.hasSunkFirstShip();\n }\n\n attacked_map.ship_health.replace(attacked_ship, 0);\n ArrayList<Coordinate> coordsList = attacked_map.ship_coordinates.get(attacked_ship);\n for (Coordinate coordinate : coordsList) {\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n attacked_map.defensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n }\n }\n //Not a captain's quarters there\n else {\n //Attack and hit!\n int current_health = attacked_map.ship_health.get(attacked_ship);\n current_health -= 1;\n attacked_map.ship_health.replace(attacked_ship, current_health);\n\n bombOutputs(method_choice, 8, attacked_map, temp_ship, x, y);\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(2, x, y);\n }\n attacked_map.defensiveGrid.setCellStatus(2, x, y);\n }\n } else if (method_choice == 2 || method_choice == 3) {\n //Already attacked, already hit a ship!\n bombOutputs(method_choice, 9, attacked_map, temp_ship, x, y);\n }\n\n return true;\n }", "private boolean didMyShipSink(int x, int y) {\n boolean sunk = false; //assumes ship hasn't sunk\n for (int i = 0; i < fleet.size(); i++) { //going through fleet to find boat\n if (fleet.get(i).getStartX() == x && fleet.get(i).getStartY() == y) {\n sunk = fleet.get(i).hitAndMaybeSunk(); \n //System.out.println(\"didMyShipSink(): \" + fleet.get(i).getIsSunk());\n if (sunk) { \n shipsSunk.add(fleet.get(i)); \n fleet.remove(i);\n }\n }\n }\n return sunk;\n }", "public void checkCollisions(){\n for(int i=bodyParts;i>0;i--){\n if((x[0]==x[i])&&(y[0]==y[i])){\n running=false;\n }\n }\n //head with left border\n if(x[0]<0){\n running=false;\n }\n //head with right border\n if(x[0]>screen_width){\n running=false;\n }\n //head with top border\n if(y[0]<0){\n running=false;\n }\n //head with bottom border\n if(y[0]>screen_height){\n running=false;\n }\n if(!running){\n timer.stop();\n }\n }", "void checkCol() {\n Player player = gm.getP();\n int widthPlayer = (int) player.getImg().getWidth();\n int heightPlayer = (int) player.getImg().getHeight();\n Bullet dummyBuullet = new Bullet();\n int widthBullet = (int) dummyBuullet.getImg().getWidth();\n int heightBullet = (int) dummyBuullet.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n // the bullet must be an enemy bullet\n if (bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the bullet location is inside the rectangle of player\n if ( Math.abs( bullet.getX() - player.getX() ) < widthPlayer / 2\n && Math.abs( bullet.getY() - player.getY() ) < heightPlayer / 2 ) {\n // 1) destroy the bullet\n // 2) decrease the life of a player\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n bullet.setActive(false);\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n break;\n }\n }\n }\n // 2'nd case\n // the enemy is hit with player bullet\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n if (!bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the player bullet location is inside the rectangle of enemy\n if (Math.abs(enemy.getX() - bullet.getX()) < (widthBullet / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - bullet.getY()) < (heightBullet / 2 + heightEnemy / 2)) {\n // 1) destroy the player bullet\n // 2) destroy the enemy\n if (destroyedEnemy % 3 == 0 && destroyedEnemy != 0) onlyOnce = 0;\n destroyedEnemy++;\n gm.increaseScore();\n enemy.setActive(false);\n\n\n if(enemy.hTitanium()) {\n gm.getTitaniumList()[gm.getTitaniumIndex()].setX(enemy.getX());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setY(enemy.getY());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setActive(true);\n gm.increaseTitaniumIndex();\n }\n\n if(enemy.hBonus()) {\n \tgm.getBonusList()[gm.getBonusIndex()].setX(enemy.getX());\n \tgm.getBonusList()[gm.getBonusIndex()].setY(enemy.getY());\n \tgm.getBonusList()[gm.getBonusIndex()].setActive(true);\n \tgm.increaseBonusIndex();\n }\n bullet.setActive(false);\n break;\n }\n }\n }\n }\n }\n\n // 3'rd case\n // the player collided with enemy ship\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n // the condition when the enemy rectangle is inside the rectangle of player\n if (Math.abs(enemy.getX() - player.getX()) < (widthPlayer / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - player.getY()) < (heightPlayer / 2 + heightEnemy / 2)) {\n // 1) destroy the enemy\n // 2) decrease the player's life\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n enemy.setActive(false);\n\n break;\n }\n }\n }\n\n for (Bonus bonus : gm.getBonusList()) {\n if (bonus.isActive()) {\n int widthBonus = (int) bonus.getImg().getWidth();\n int heightBonus = (int) bonus.getImg().getHeight();\n if (Math.abs(bonus.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(bonus.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n bonus.setActive(false);\n if (bonus.getType() == 1) {\n if (player.getLives() < player.getMaxLives()) {\n player.setLives(player.getLives() + 1);\n }\n }\n else{\n superAttack = 1;\n }\n }\n }\n }\n\n for (Titanium titanium : gm.getTitaniumList()) {\n if (titanium.isActive()) {\n int widthBonus = (int) titanium.getImg().getWidth();\n int heightBonus = (int) titanium.getImg().getHeight();\n if (Math.abs(titanium.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(titanium.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n titanium.setActive(false);\n gm.getP().increaseTitanium();\n }\n }\n }\n\n }", "public boolean collidesWith(double x, double y) {\n\t\tdouble leftBound = owner.getX() + this.offsetX - (width/2);\n\t\tdouble upBound = owner.getY() + this.offsetY - (height/2);\n\t\treturn x <= leftBound + width && x >= leftBound && y <= upBound + height && y >= upBound;\n\t}", "static boolean alreadyShot(Point shotPoint, BattleshipModel model, boolean player){\n List<Point> checkHits;\n List<Point> checkMisses;\n\n int sizeHits;\n int sizeMisses;\n\n //if player\n if(player) {\n checkHits = model.getComputerHits(); //Grabs the point list for player\n checkMisses = model.getComputerMisses();\n\n sizeHits = model.getComputerHits().size();\n sizeMisses = model.getComputerMisses().size();\n\n }else{\n checkHits = model.getPlayerHits(); //Grabs the point list for computer\n checkMisses = model.getPlayerMisses();\n\n sizeHits = model.getPlayerHits().size();\n sizeMisses = model.getPlayerMisses().size();\n }\n\n for(int i = 0; i < sizeHits; i++){ //checks the Hit list for the same point\n if(shotPoint.getAcross() == checkHits.get(i).getAcross() && shotPoint.getDown() == checkHits.get(i).getDown()){\n return true;\n }\n }\n\n for(int i = 0; i < sizeMisses; i++){ //checks the Hit list for the same point\n if(shotPoint.getAcross() == checkMisses.get(i).getAcross() && shotPoint.getDown() == checkMisses.get(i).getDown() ){\n return true;\n }\n }\n\n return false;\n }", "public void checkCollisionTile(Entity entity) {\n\t\t\tint entityLeftX = entity.worldX + entity.collisionArea.x;\n\t\t\tint entityRightX = entity.worldX + entity.collisionArea.x + entity.collisionArea.width;\n\t\t\tint entityUpY = entity.worldY + entity.collisionArea.y;\n\t\t\tint entityDownY = entity.worldY + entity.collisionArea.y + entity.collisionArea.height;\n\t\t\t\n\t\t\tint entityLeftCol = entityLeftX/gamePanel.unitSize;\n\t\t\tint entityRightCol = entityRightX/gamePanel.unitSize;\n\t\t\tint entityUpRow = entityUpY/gamePanel.unitSize;\n\t\t\tint entityDownRow = entityDownY/gamePanel.unitSize;\n\t\t\t\n\t\t\tint point1;\n\t\t\tint point2;\n\t\t\t//This point is used for diagonal movement\n\t\t\tint point3;\n\t\t\t\n\t\t\tswitch(entity.direction) {\n\t\t\t\t//Lateral and longitudinal movements\n\t\t\t\tcase \"up\":\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\t//Sets the top left and top right point to draw a line which will check for collision\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\t//If either points are touched, turn on collision stopping movement\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"down\":\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"left\":\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"right\":\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t//Diagonal Movements\n\t\t\t\tcase \"upleft\":\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\t//Sets the top left and top right point to draw a line which will check for collision\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\t//If either points are touched, turn on collision stopping movement\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"upright\":\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase \"downleft\":\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"downright\":\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public boolean hasCollided(int xa, int ya) {\n int xMin = 0;//This is based on the character sprite... soo like near the legs is the collision box\n int xMax = 7;\n int yMin = 3;\n int yMax = 7;\n for (int x = xMin; x < xMax; x++) {\n if (isSolidTile(xa, ya, x, yMin)) {\n return true;\n }\n }\n for (int x = xMin; x < xMax; x++) {\n if (isSolidTile(xa, ya, x, yMax)) {\n return true;\n }\n }\n for (int y = yMin; y < yMax; y++) {\n if (isSolidTile(xa, ya, xMin, y)) {\n return true;\n }\n }\n for (int y = yMin; y < yMax; y++) {\n if (isSolidTile(xa, ya, xMax, y)) {\n return true;\n }\n }\n return false;\n }", "public boolean collidesWith(SpriteBase otherSprite) {\r\n boolean toReturn = false;\r\n\r\n if (distTo(otherSprite.x, x) < collideSize && distTo(otherSprite.y,y) < collideSize){\r\n toReturn = true;\r\n }\r\n\r\n return (toReturn);\r\n }", "boolean testMoveShip(Tester t) {\n return t.checkExpect(ship1.move(),\n new Ship(10, Color.CYAN, new MyPosn(50, 200), new MyPosn(50, 50)))\n && t.checkExpect(ship10.move(),\n new Ship(10, Color.CYAN, new MyPosn(290, 270), new MyPosn(-10, -30)));\n }", "public void collisionDetection(){\r\n\t\tif( this.isActiv() ){\r\n\t\t\tif( this.isCollided() ){\r\n\t\t\t\tthis.onCollision();\r\n\t\t\t}\r\n\t\t}\r\n\t}" ]
[ "0.74628955", "0.7376721", "0.7223133", "0.7213659", "0.7095628", "0.7083149", "0.70758194", "0.7052173", "0.6997448", "0.6895229", "0.68480486", "0.6825784", "0.6793728", "0.67861664", "0.6731043", "0.671964", "0.67113394", "0.669479", "0.6653315", "0.6640491", "0.6620769", "0.65846264", "0.6559082", "0.6555139", "0.65529984", "0.65507865", "0.6544393", "0.6524308", "0.6519112", "0.65115225", "0.65088964", "0.65083027", "0.6494993", "0.647904", "0.64726204", "0.6472416", "0.6456927", "0.6446639", "0.6437036", "0.64152133", "0.64029294", "0.6389205", "0.63874596", "0.6367861", "0.63664764", "0.6361426", "0.63445157", "0.63326454", "0.63304293", "0.63213384", "0.6313495", "0.63107175", "0.62997234", "0.6297944", "0.62962943", "0.629411", "0.62855214", "0.62579596", "0.62515277", "0.62506944", "0.6232193", "0.6216819", "0.6211845", "0.6203592", "0.6202953", "0.6200283", "0.61986345", "0.619858", "0.6197215", "0.61955357", "0.6191247", "0.617475", "0.6163514", "0.61497074", "0.6149656", "0.6148003", "0.61461025", "0.61457086", "0.6131711", "0.6113473", "0.61095387", "0.6098318", "0.60960984", "0.60940653", "0.60845065", "0.60834074", "0.6075864", "0.6056642", "0.6050899", "0.6050192", "0.6047579", "0.60458124", "0.6042994", "0.60423183", "0.60285455", "0.60186076", "0.601297", "0.6004752", "0.6001349", "0.60006106" ]
0.686069
10
Add bonus to ship
protected abstract void addBonusToShip(Ship ship);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BonusResponse add(Long customerId, Long authorizedBy, BonusRequest bonus);", "public void addShip(Ship ship){\n\n ship.setGamePlayers(this);\n myships.add(ship);\n }", "public void setBonus(double bonus){\r\n this.bonus = bonus;\r\n }", "public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif(shipSpawned)\n\t\t{\n\t\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t\t\treturn;\n\t\t}\n\t\tgameObj.add(new PlayerShip(getHeight(), getWidth()));\n\t\tSystem.out.println(\"Player ship added\");\n\t\tshipSpawned = true;\n\t\tnotifyObservers();\n\t}", "@Override\n\tpublic double bonus() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void activateSkill(Spaceship ship) {\n\t\tmissingHealth = ship.getHealth() - ship.getCurrentHealth();\n\t\tif (healingPower < missingHealth) {\n\t\t\tship.addHealth(healingPower);\n\t\t} else {\n\t\t\tship.addHealth(missingHealth);\n\t\t}\n\t}", "private void ustawienie_bonusu(String bonus)\n {\n switch (bonus)\n {\n case \"+10 naboi\":\n liczba_naboi+=10;\n break;\n case \"+zycie\":\n liczba_zyc+=1;\n break;\n case \"-zycie\":\n liczba_zyc-=1;\n break;\n case \"+wieksze pilki\":\n rozmiar_pilki+=1;\n break;\n case \"+5 naboi\":\n liczba_naboi+=5;\n case \"+40 punktow\":\n liczba_punktow+=40;\n break;\n case \"+duze pilki\":\n break;\n }\n }", "public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif (gameObj[1].size() == 0)\n\t\t{\n\t\t\tgameObj[1].add(new PlayerShip());\n\t\t\tSystem.out.println(\"PlayerShip added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t}\n\t\t\n\t}", "public void bonusStones() {\n\t\tint bonus = 1; // final pit player had when landing on empty pit\n\t\tbonus += board[12 - currentPit]; // (12 - currentPit) will get us pit directly across board\n\t\tboard[12 - currentPit] = 0;\n\t\tif (isPlayer1()) { // if player one, place bonus stones in pit 6\n\t\t\tboard[6] += bonus;\n\t\t} else { // if player 2, place stones in pit 13\n\t\t\tboard[13] += bonus;\n\t\t}\n\t}", "@Override\n public int craftBonus() {\n\treturn 1;\n }", "private void placeShip() {\r\n\t\t// Expire the ship ship\r\n\t\tParticipant.expire(ship);\r\n\r\n\t\tclipShip.stop();\r\n\r\n\t\t// Create a new ship\r\n\t\tship = new Ship(SIZE / 2, SIZE / 2, -Math.PI / 2, this);\r\n\t\taddParticipant(ship);\r\n\t\tdisplay.setLegend(\"\");\r\n\t}", "public void addShip(Ship ship) {\n\t\tint row = ship.getRow();\n\t\tint column = ship.getColumn();\n\t\tint direction = ship.getDirection();\n\t\tint shipLength = ship.getLength();\n\t\t//0 == Horizontal; 1 == Vertical\n\t\tif (direction == 0) {\n\t\t\tfor (int i = column; i < shipLength + column; i++) {\n\t\t\t\tthis.grid[row][i].setShip(true);\n\t\t\t\tthis.grid[row][i].setLengthOfShip(shipLength);\n\t\t\t\tthis.grid[row][i].setDirectionOfShip(direction);\n\t\t\t}\n\t\t}\n\t\telse if (direction == 1) {\n\t\t\tfor (int i = row; i < shipLength + row; i++) {\n\t\t\t\tthis.grid[i][column].setShip(true);\n\t\t\t\tthis.grid[i][column].setLengthOfShip(shipLength);\n\t\t\t\tthis.grid[i][column].setDirectionOfShip(direction);\n\t\t\t}\n\t\t}\n\t}", "public boolean placeShipUser(Ship ship) {\r\n return fieldUser.addShip(ship);\r\n }", "@POST(\"/AddShip\")\n\tint addShip(@Body Ship ship,@Body int id) throws GameNotFoundException;", "public void incSpeed()\n\t{\n\t\t//only increase if a PlayerShip is currently spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t((PlayerShip)gameObj[1].get(0)).incSpeed();\n\t\t\tSystem.out.println(\"Speed +10\");\n\t\t}else\n\t\t\tSystem.out.println(\"A player ship is not currently spawned\");\n\t}", "@Override\r\n\tpublic void addToCost() {\n\t\t\r\n\t}", "public void actionPerformed(ActionEvent event)\n {\n if (add)\n {\n if (validInput())\n {\n Ship newShip = map.addUserShip(\"Lobsterboat\",shipName,\n xcoord,ycoord,speed,direction);\n main.setUserShip(newShip);\n map.repaint();\n main.closeStartWindow();\n }\n }\n else\n {\n main.closeStartWindow();\n }\n }", "public boolean addShip(Ships ship) {\n\t\tfor (int i = 0; i < this.aliveShips.length; i++) {\r\n\t\t\tif (this.aliveShips[i] == null) {\r\n\t\t\t\tthis.aliveShips[i] = ship;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void addToScore(int id, int bonus){\n scores.set(id,scores.get(id) + bonus);\n }", "public void addBonus() {\r\n game.settings.setBonusDay(strDate);\r\n }", "private void obsluga_bonusu()\n {\n if(bonusy_poziomu>0)\n {\n boolean numer= los.nextBoolean();\n if(numer){\n bon.add(new Bonus(w.getPolozenie_x(),w.getPolozenie_y(),getWidth(),getHeight()));\n bonusy_poziomu--;\n }\n }\n }", "public void updateArmorBonus(int value){\n\t\t//TODO do we want a negative value???\n\t\tthis.armorBonus = value;\n\t}", "public void addCost(int amount) {\n\t\tcost = amount;\n\t}", "public boolean setBonus(boolean bonus) {\r\n\t\tthis.bonus = bonus;\r\n\t\tif (bonus == true) {\r\n\t\t\tif (!deck.isEmpty()) {\r\n\t\t\t\thand[5] = deck.remove(0);\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tdeck.add(hand[5]);\r\n\t\t\thand[5] = null;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public void addJackpot(int amount){\n this.amount += amount;\n }", "public void insertShipment(String custType, int xCoord, int yCoord, int capacity,int shipmentIndex)\r\n\t{\r\n\t\tVRPBShipment thisShip = new VRPBShipment(custType, xCoord, yCoord, capacity,shipmentIndex); //creates shipment\r\n\t\t//System.out.println(custType);\r\n\t\tinsertLast(thisShip); //and adds it to the linked list\r\n\t}", "public void addFuel(double fuelToAdd){\n\n fuelRemaining = fuelRemaining + fuelToAdd;\n }", "private static String placeShip(Request req) {\n BattleshipModel currentModel = getModelFromReq(req);\n\n int rows = Integer.parseInt(req.params(row));\n int col = Integer.parseInt(req.params(col));\n\n BattleshipModel placeModel = getModelFromReq(req);\n\n\n\n return \"SHIP\";\n }", "public void addPoint(int points){\n\t\tthis.fidelityCard.point += points;\t\t\n\t}", "public int giveRaise(int bonus) {\n if (bonus >= 0) {\n this.salary += bonus;\n }\n return this.salary;\n }", "public boolean requestBonus(Employee e, double bonus) {\n\n return true;\n }", "public final void setBonus(LeaderKingdomModifier bonus) {\r\n\tremove();\r\n\tthis.bonus = bonus;\r\n\tapply();\r\n }", "private void addPointsToPlayer(Player player, int marbleNum) {\n Long score = player.getScore();\n score += marbleNum;\n\n // add the score for the marble 7 places before\n Long value = (Long) placement.get(getMarbel7());\n score += value;\n\n player.setScore(score);\n }", "public void update(Spaceship ship) {\n Log.d(\"Powerstate\", \"ShieldPowerState\");\n ship.paint.setColor(Color.argb(255,47,247,250));\n ship.isHit = false;\n\n\n }", "public void sprawdzBonusy()\n\t{\n\t\tif(aktualnyNumerSciezki != -1)\n\t\t{\n\t\t\tpojazd.sprawdzBonus(droga.get(aktualnyNumerSciezki));\n\t\t\twyswietleniePunktow.setText(\"\" + pojazd.pobierzPunkty());\n\t\t}\n\t}", "public double getBonus(){\r\n return bonus;\r\n }", "public void assignEnergyToShip(Ship ship, AbstractObject source) {\n\t\tenergyToShip.put(source.getId(), ship);\n\t}", "public int calculateLineBonus()\r\n {\r\n int bonus = 0;\r\n \r\n switch(line[0])\r\n {\r\n case 1:\r\n bonus = gameBoard.getTile(0,0).getTileValue() + gameBoard.getTile(0,1).getTileValue() + gameBoard.getTile(0,2).getTileValue();\r\n break;\r\n case 2:\r\n bonus = gameBoard.getTile(1,0).getTileValue() + gameBoard.getTile(1,1).getTileValue() + gameBoard.getTile(1,2).getTileValue();\r\n break;\r\n case 3:\r\n bonus = gameBoard.getTile(2,0).getTileValue() + gameBoard.getTile(2,1).getTileValue() + gameBoard.getTile(2,2).getTileValue();\r\n break;\r\n case 4: \r\n bonus = gameBoard.getTile(0,0).getTileValue() + gameBoard.getTile(1,0).getTileValue() + gameBoard.getTile(2,0).getTileValue();\r\n break;\r\n case 5:\r\n bonus = gameBoard.getTile(0,1).getTileValue() + gameBoard.getTile(1,1).getTileValue() + gameBoard.getTile(2,1).getTileValue();\r\n break;\r\n case 6: \r\n bonus = gameBoard.getTile(0,2).getTileValue() + gameBoard.getTile(1,2).getTileValue() + gameBoard.getTile(2,2).getTileValue();\r\n break;\r\n case 7: \r\n bonus = gameBoard.getTile(0,0).getTileValue() + gameBoard.getTile(1,1).getTileValue() + gameBoard.getTile(2,2).getTileValue();\r\n break;\r\n case 8:\r\n bonus = gameBoard.getTile(2,0).getTileValue() + gameBoard.getTile(1,1).getTileValue() + gameBoard.getTile(0,2).getTileValue();\r\n break;\r\n }\r\n \r\n return bonus;\r\n }", "@Override\n\tprotected boolean on_bonus_taken(GfxObject bonus) {\n\t\treturn false;\n\t}", "public void addPoints(int earnedPoints) {score = score + earnedPoints;}", "public void awardPoints(int points)\n {\n score += points ;\n }", "public void setBonusAwarded(double value) {\n this.bonusAwarded = value;\n }", "public void shootIntoCargoShip(){\n shoot.set(SHIP_SHOOT);\n }", "@Override\n public IStarship increaseFuel(Integer addAmount) throws Exception {\n int totalFuel;\n\n try {\n totalFuel = this.increaseFuelHelper(addAmount);\n } catch (InvalidFuelException e) {\n System.err.println(e.getMessage());\n return null;\n }\n\n try {\n return new XWingFighter(totalFuel, this.destructionLevel);\n } catch (Exception e) {\n System.err.println(e.getMessage());\n return null;\n }\n }", "public int getBonus(){\n return bonus;\n }", "public Ship getShip (){\n \treturn this.ship;\n }", "private void updateOwnedShips(JSONObject profile)\n {\n JSONObject ships = Utils.getJsonObject(profile, \"ships\");\n\n for (Object o : ships.keySet())\n {\n String shipId = (String) o;\n\n JSONObject ship = Utils.getJsonObject(ships, shipId);\n\n if (ship != null)\n {\n long cost = getShipCost(ship);\n String shipName = getShipName(ship);\n\n String tmp = \"break;\";\n }\n }\n }", "public void givePlayerLevelBonus() {\n\t\tfor(Player p : playerList) {\n\t\t\tif(p.getType() == PlayerType.Agent) {\n\t\t\t\tp.addScore(5 * (currentLevel-1));\n\t\t\t}\n\t\t}\n\t\tserver.updateHighscoreList();\n\t\tserver.addTextToLoggingWindow(\"Server gives all players level bonus\");\n\t}", "public int getBonus() {\n\t\treturn bonus;\n\t}", "public void enterShipment(){\n Shipment shipment = new Shipment();\n shipment.setShipmentID(data.numberOfShipment());\n shipment.setReceiver(new Customer(data.numberOfCustomer(), GetChoiceFromUser.getStringFromUser(\"Enter Receiver FirstName: \"),\n GetChoiceFromUser.getStringFromUser(\"Enter Receiver Last Name: \"),data.getBranchEmployee(ID).getBranchID()));\n shipment.setSender(new Customer(data.numberOfCustomer(), GetChoiceFromUser.getStringFromUser(\"Enter Sender First Name: \"),\n GetChoiceFromUser.getStringFromUser(\"Enter Sender Last Name: \"),data.getBranchEmployee(ID).getBranchID()));\n shipment.setCurrentStatus(getStatus());\n shipment.setTrackingNumber(getUniqueTrackingNumber());\n shipment.setBranchID(data.getBranchEmployee(ID).getBranchID());\n data.getBranch(shipment.getBranchID()).addShipment(shipment);\n data.addShipment(shipment,shipment.getReceiver());\n System.out.printf(\"Your Shipment has added with tracking Number %d !\\n\",shipment.getTrackingNumber());\n }", "static void bonus() {\n\t\tSystem.out.println(\"Yearly bonus is 20000\");\n\n\t}", "@POST(\"/UpdateShip\")\n\tShip updateShip(@Body Ship ship,@Body int id) throws GameNotFoundException;", "public void setBonusRepurchase(Float bonusRepurchase) {\n this.bonusRepurchase = bonusRepurchase;\n }", "public void setshippingcost() {\r\n\t\tshippingcost = getweight() * 3;\r\n\t}", "public void setShip (Ship s){\n \tthis.ship=s;\n }", "public void addMoneytoPurse(Player player, double winnings) {\n player.addMoneyToPurse(winnings);\n }", "public void shotShip() {\r\n score -= 20;\r\n System.out.println(\"Current Score = \"+score);\r\n }", "public void addRating(double points) {\n rating += points;\n }", "public void addPotion() {\n setPotion(getPotion() + 1);\n }", "public Ship getShip()\n {\n return ship;\n }", "public Ship getShip(){\n return this.ship;\n }", "public void assignBaseToShip(Ship ship, Base base) {\n\t\tbaseToShip.put(base.getId(), ship);\n\t}", "public void incrementNumberOfShips(int value) {\r\n\t\tnumberOfShips = numberOfShips + value;\r\n\t}", "private static String placeShip(Request req) {\n\n if( req.params(\"Version\").equals(\"Updated\") ) {\n\n BattleshipModelUpdated model = (BattleshipModelUpdated) getModelFromReq( req );\n\n model.resetArrayUpdated( model );\n model = model.PlaceShip( model, req );\n model.resetArrayUpdated( model );\n\n Gson gson = new Gson();\n return gson.toJson( model );\n\n }else{\n\n BattleshipModelNormal model = (BattleshipModelNormal) getModelFromReq( req );\n\n model.resetArrayNormal( model );\n model = model.PlaceShip( model, req );\n model.resetArrayNormal( model );\n\n Gson gson = new Gson();\n return gson.toJson( model );\n\n }\n }", "@Override\n public CustomerEntity incrementBonusPoints(CustomerEntity customerEntity, int bonusPoints) {\n customerEntity.setBonusPoints(customerEntity.getBonusPoints() + bonusPoints);\n return customerRepository.save(customerEntity);\n }", "public void addNPS()\n\t{\t\n\t\t\tgameObj.add(new NonPlayerShip(getHeight(), getWidth()));\n\t\t\ttotalNPS ++;\n\t\t\tSystem.out.println(\"Non-Player ship added\");\n\t\t\tnotifyObservers();\n\t}", "public void AddCredits(int credits)\n {\n this.credits += credits;\n }", "public void addMoney(double profit){\n money+=profit;\n }", "public double calculateShipping() {\n shipAmount = (SHIPPINGCOST);\n\n return shipAmount;\n }", "public void incSpeed()\n\t{\n\t\t//only increase if a PlayerShip is currently spawned\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif(current instanceof PlayerShip)\n\t\t\t{\n\t\t\t\t((PlayerShip)current).incSpeed();\t\t\t\n\t\t\t\tSystem.out.println(\"Speed increased by 1\");\n\t\t\t\tnotifyObservers();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"There is no playerShip spawned\");\n\t}", "public void addNPS()\n\t{\n\t\tgameObj[2].add(new NonPlayerShip());\n\t\tSystem.out.println(\"Non-Player ship added\");\n\t}", "int getBonusMoney();", "public void add(double amount) {\n x += amount;\n y += amount;\n }", "public void withdraw(float amount) {}", "public void withdraw(float amount) {}", "public void buyhouse(int cost){\n\t\n}", "public boolean requestBonus(Employee e, double bonus){\n BusinessLead lead = (BusinessLead) e;\n return lead.approveBonus(e,bonus);\n }", "public void putShip(Ship ship) throws OverlapException{\r\n if(this.ship == null){\r\n this.ship = ship;\r\n }else{\r\n throw new OverlapException(row, column);\r\n }\r\n }", "public void addFuel(int quantity) throws Exception;", "public Ship getShip() {\r\n\t\treturn ship;\r\n\t}", "public Ship getShip() {\r\n\t\treturn ship;\r\n\t}", "public void assignFlagCarrier(Ship ship) {\n\t\tflagCarrier = ship.getId();\n\t}", "public void addFood(int quantity) {\n if (quantity > 0) {\n this.food += quantity;\n System.out.printf(\"\\u001B[34mINFO:\\u001B[0m %d of food added.\\n\", quantity);\n } else {\n System.out.println(\"\\u001B[34mINFO:\\u001B[0m There are no food to add.\");\n }\n }", "public void setBonusScore() {\r\n count = count+50;\r\n }", "public void addGold(int g){\n this.gold += g;\n }", "public void addInterest() {\n\t\tdouble interest = getBalance() * interestRate / 100;\n\t\tdeposit(interest);\n\t}", "@Override\n\tpublic void addCost(long userId, int cost) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void shotHere(boolean wasHit, int shipMod, Coordinate c) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void shotHere(boolean wasHit, int shipMod, Coordinate c) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void shotHere(boolean wasHit, int shipMod, Coordinate c) {\n\t\t\t\t\n\t\t\t}", "public boolean execute(FamilyMember f){\r\n\t\tif(check(f)){\r\n\t\t\tif (this.bonus!=null) {\r\n\t\t\t\tfor (Effect effect : this.bonus){\r\n\t\t\t\t\teffect.executeEffect(f);\r\n\t\t\t\t\tSystem.out.println(\"bonus in this action space is \"+effect.toString());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"no bonus here to take!\");\r\n\t\t\t}\r\n\t\t\tthis.getFamiliarIn().add(f);\r\n\t\t\tf.setAlreadyPlaced(true);\r\n\t\t\tf.setFamilyMemberPosition(this);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse return false;\r\n\t}", "public long getBonusAmount() {\r\n return bonusAmount;\r\n }", "void giveReward(BPlayer bPlayer, int tier, int status);", "public void purchase(double shares, double pricePerShare)\n {\n this.totalShares += shares;\n super.addCost(shares * pricePerShare);\n }", "public void purchase(Unit unit) {\n purchasePoints = purchasePoints - unit.cost();\n }", "public void setBonusAmount(long value) {\r\n this.bonusAmount = value;\r\n }", "public void connectShipToBoard(Ship ship){\n ships.add(ship);\n }", "@Override\n public void liftTravelBan(Player player, City city) {\n super.liftTravelBan(player, city);\n player.addPoints(getBonusPoints());\n }", "public void putShips(int nbShips){\n ai.putShips(this.ships);\n }", "public void spawnSateliteShip(LogicEngine in_logicEngine,float in_x)\r\n\t{\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/gravitonlevel.png\",in_x,LogicEngine.SCREEN_HEIGHT,1);\r\n\t\tship.i_animationFrameSizeWidth = 64;\r\n\t\tship.i_animationFrameSizeHeight = 32;\r\n\t\tship.i_animationFrame = 2;\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t\r\n\t\tship.v.setMaxForce(1.0f);\r\n\t\tship.v.setMaxVel(4.0f);\r\n\t\t\r\n\t\t\r\n\t\t//fly down\r\n\t\t//ship.stepHandlers.add( new FlyStraightStep(new Vector2d(0,-1f)));\r\n\t\t\r\n\t\tSimplePathfollowing followPathBehaviour = new SimplePathfollowing();\r\n\t\tfollowPathBehaviour.setInfluence(1);\r\n\t\tfollowPathBehaviour.setAttribute(\"arrivedistance\", \"10\", null);\r\n\t\t\r\n\t\t//add waypoints\r\n\t\tfor(int i=0 ; i< 20 ; i++)\r\n\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t//put in some edge ones too\r\n\t\t\tif(r.nextInt(6)%3==0)\r\n\t\t\t\tship.v.addWaypoint(new Point2d((int) LogicEngine.SCREEN_WIDTH * (i%2), LogicEngine.SCREEN_HEIGHT/1.5 + r.nextInt((int) LogicEngine.SCREEN_HEIGHT/5)));\r\n\t\t\telse\r\n\t\t\t\t//put in some random doublebacks etc\r\n\t\t\t\tship.v.addWaypoint(new Point2d(r.nextInt((int) LogicEngine.SCREEN_WIDTH), LogicEngine.SCREEN_HEIGHT/1.5 + r.nextInt((int) LogicEngine.SCREEN_HEIGHT/5)));\r\n\t\t}\r\n\t\tship.v.addWaypoint(new Point2d(LogicEngine.SCREEN_WIDTH/2, -100));\r\n\t\t\r\n\t\tif(Difficulty.isEasy())\r\n\t\t\tship.shotHandler = new BeamShot(50);\r\n\t\telse\r\n\t\tif(Difficulty.isMedium())\r\n\t\t\tship.shotHandler = new BeamShot(40);\r\n\t\telse\r\n\t\tif(Difficulty.isHard())\r\n\t\t\tship.shotHandler = new BeamShot(30);\r\n\t\t\r\n\t\tCustomBehaviourStep b = new CustomBehaviourStep(followPathBehaviour);\r\n\t\tship.stepHandlers.add(b);\r\n\t\t\r\n\t\t//destroy ships that get too close\r\n\t\tHitpointShipCollision hps = new HitpointShipCollision(ship, 10, 32);\r\n\t\thps.setSimpleExplosion();\r\n\t\t\r\n\t\tship.collisionHandler = hps; \r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\t\r\n\t\r\n\t}" ]
[ "0.6526067", "0.6443659", "0.6367306", "0.636178", "0.6361287", "0.6354971", "0.6333179", "0.63102806", "0.62861633", "0.6257914", "0.6168411", "0.6141083", "0.60944706", "0.59962404", "0.5974727", "0.5917969", "0.5893581", "0.5883571", "0.58808154", "0.58792114", "0.58757776", "0.5857009", "0.5802201", "0.57876545", "0.5785168", "0.57677853", "0.57649666", "0.5721382", "0.57184976", "0.5714099", "0.57123965", "0.5710102", "0.56884265", "0.56836295", "0.56608456", "0.56598306", "0.5658981", "0.565005", "0.5639894", "0.56371397", "0.56369305", "0.5633994", "0.56333673", "0.5630631", "0.5625429", "0.56138456", "0.5612024", "0.5608246", "0.56071585", "0.55923134", "0.5586606", "0.5584756", "0.5582877", "0.5582169", "0.5570897", "0.5570681", "0.5565822", "0.55588335", "0.5557278", "0.55562174", "0.5548772", "0.5529932", "0.5527057", "0.5526151", "0.55248064", "0.55166066", "0.5491375", "0.5489913", "0.5486451", "0.54828316", "0.5477558", "0.5475125", "0.5457841", "0.54431725", "0.54431725", "0.54407626", "0.54382145", "0.54280454", "0.54133284", "0.5412342", "0.5412342", "0.53961134", "0.53944594", "0.5393518", "0.53928554", "0.5387343", "0.53846514", "0.53767717", "0.53767717", "0.53767717", "0.5375693", "0.5374291", "0.5372918", "0.53695667", "0.53679985", "0.53597915", "0.53581375", "0.5357654", "0.5356863", "0.5349638" ]
0.86103255
0
Get default timer of bonus animation
protected abstract float getFrameTimeNormalAnimation();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Double getTimer() {\n\t\treturn null;\n\t}", "Timer getTimer();", "double getDefaultTimerTrig();", "public int getTimer() {\n return getOption(ArenaOption.TIMER);\n }", "long getTimerPref();", "public Timer getOverallTimer();", "private void getOneToteTimer()\r\n\t{\r\n\t\tswitch(autoStep)\r\n\t\t{\r\n\t\t\tcase 0:\r\n\t\t\t{\r\n\t\t\t\tpickUpTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 1:\r\n\t\t\t{\r\n\t\t\t\tdriveForwardTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "public int getTimer() {\n return timer;\n }", "public int getDefaultAnimationDuration() {\n return (defaultAnimationDuration);\n }", "RampDownTimer getRampDownTimer();", "public Timer()\n {\n // initialise instance variables\n startTime = 0;\n bonusTime = 0;\n }", "public static void initTimer(){\r\n\t\ttimer = new Timer();\r\n\t timer.scheduleAtFixedRate(new TimerTask() {\r\n\t public void run() {\r\n\t \t//se o player coletar todas os lixos, o tempo para\r\n\t \tif(ScorePanel.getScore() == 100){\r\n\t \t\ttimer.cancel();\r\n\t \t}\r\n\t \t//se o Tempo se esgotar, é game over!!!\r\n\t \telse if (tempo == 0){\r\n\t \t timer.cancel();\r\n \t\tAvatar.noMotion();\r\n \t\t//System.exit(0);\r\n\t }\r\n\t \t//Senão, vai contando\r\n\t \telse{\r\n\t \tlbltimer.setText(\"Tempo: \"+ --tempo);\r\n\t }\r\n\t }\r\n\t\t}, 1000, 1000);\r\n\t}", "public float getCurrentTime () {\n\t\treturn timer;\n\t}", "public String getTimerType() {\n\t\treturn Main.STANDARDTIMER;\n\t}", "long getInitialDelayInSeconds();", "public void createTimer() {\n timer = new AnimationTimer() {\n @Override\n public void handle(long now) {\n if (animal.changeScore()) {\n setNumber(animal.getPoints());\n }\n if (animal.getStop()) {\n System.out.println(\"Game Ended\");\n background.stopMusic();\n stop();\n background.stop();\n\n ArrayList list = null;\n try {\n list = scoreFile.sortFile(animal.getPoints());\n } catch (IOException e) {\n e.printStackTrace();\n }\n popUp(list);\n }\n }\n };\n }", "static public Timer theTimer() {\n return TheTimer;\n }", "private float resetTimer() {\r\n final float COUNTDOWNTIME = 10;\r\n return COUNTDOWNTIME;\r\n }", "public int getTimingDelay(ImageAnimation animation)\n {\n if(timingMap.containsKey(animation))\n return timingMap.get(animation);\n else\n return 0; \n }", "public static long startTimer() {\n return System.currentTimeMillis();\n }", "public Timer getTimer() {\n\t//if (heartbeat_==null) heartbeat_ = new Timer(100, 1000); // on demand: don't slow down startup\n\tif (timer_==null) timer_ = new java.util.Timer();\n\treturn timer_;\n }", "public String getDefaultInAnimation() {\n return (defaultInAnimation);\n }", "public GameTimer getTimer()\n {\n return timer;\n }", "private UimaTimer getTimer() throws Exception {\n String uimaTimerClass = cpeFactory.getCPEConfig().getCpeTimer().get();\n if (uimaTimerClass != null) {\n new TimerFactory(uimaTimerClass);\n return TimerFactory.getTimer();\n }\n // If not timer defined return default timer based on System.currentTimeMillis()\n return new JavaTimer();\n }", "RampUpTimer getRampUpTimer();", "public int getTimer() {\n return worldTimer;\n }", "public void setTimer() {\n\t\t\n\t}", "public final Pair<String, Integer> startTimer() {\r\n long j = (long) 1000;\r\n this.remainTime -= j;\r\n long j2 = this.remainTime;\r\n long j3 = j2 - j;\r\n long j4 = j3 / ((long) 3600000);\r\n long j5 = (long) 60;\r\n long j6 = (j3 / ((long) 60000)) % j5;\r\n long j7 = (j3 / j) % j5;\r\n double d = (double) j2;\r\n double d2 = (double) this.totalRemainTime;\r\n Double.isNaN(d);\r\n Double.isNaN(d2);\r\n double d3 = d / d2;\r\n double d4 = (double) AbstractSpiCall.DEFAULT_TIMEOUT;\r\n Double.isNaN(d4);\r\n double d5 = d3 * d4;\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(designTimeUnit(j4));\r\n String str = \" : \";\r\n sb.append(str);\r\n sb.append(designTimeUnit(j6));\r\n sb.append(str);\r\n sb.append(designTimeUnit(j7));\r\n return new Pair<>(sb.toString(), Integer.valueOf((int) Math.ceil(d5)));\r\n }", "public String getTimer() {\n return timer;\n }", "public void pickUpTimer()\r\n\t{\t\t\r\n\t\tSystem.out.println(timer.get());\r\n\t\tif(timer.get() < Config.Auto.timeIntakeOpen)\r\n\t\t{\r\n\t\t\t//claw.openClaw();\r\n\t\t\tSystem.out.println(\"in second if\");\r\n\t\t}\r\n\t\t\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeElevatorStack)\r\n\t\t{\r\n\t\t\t//elevator.setLevel(elevatorLevel);\r\n\t\t\t//elevatorLevel++;\r\n\t\t}\r\n\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeIntakeClose)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"in first if\");\r\n\t\t\t//claw.closeClaw();\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t\tendRoutine();\r\n\t}", "public AnimationTimer createTimer() {\n return new AnimationTimer() {\n @Override\n public void handle(long now) {\n if (!levelController.getLevelControllerMethods().getGamePaused()) {\n levelController.getBubbles().forEach(Monster.this::checkCollision);\n move();\n }\n\n setChanged();\n notifyObservers();\n }\n };\n\n }", "public Timer getTimer(){\n\t\treturn timer;\n\t}", "public static int getDelay() {\n\t\treturn ANIMATION_DELAY;\n\t}", "Timer(int tempTotalTime) {\n totalTime = tempTotalTime;\n }", "public default int getDuration(int casterLevel){ return Reference.Values.TICKS_PER_SECOND; }", "public Timer getTimer() {\r\n\t\treturn timer;\r\n\t}", "private CountDownTimer getGameTimer() {\n CountDownTimer countDownTimer;\n countDownTimer = new CountDownTimer(gameTimeLeftYet, 100) {\n @Override\n public void onTick(long millisUntilFinished) {\n gameTimerOnTick(millisUntilFinished);\n }\n\n @Override\n public void onFinish() {\n gameTimerOnFinish();\n }\n };\n return countDownTimer;\n }", "@Override\n public int getTimeForNextTicInSeconds() {\n int seconds = Calendar.getInstance().get(Calendar.SECOND);\n return 60 - seconds;\n }", "public static void ComienzaTimer(){\n timer = System.nanoTime();\n }", "public int getTime(){\n return (timerStarted > 0) ? (int) ((System.currentTimeMillis() - timerStarted) / 1000L) : 0;\n }", "int getTtiSeconds();", "public final static KaranteeniTimerInitiater getTimerHandler() {\r\n\t\treturn timerInitiater;\r\n\t}", "double getMinTimerTrig();", "public String timerPause(){\n return mTimer;\n }", "public static void startTimerLabel()\n {\n {\n if (timeline != null) {\n timeline.stop();\n }\n timeSeconds.set(STARTTIME);\n //timeLabel.setText(timeSeconds.toString());\n timeline = new Timeline();\n //timeline.setCycleCount(timeline.INDEFINITE); // need this?\n\n timeline.getKeyFrames().add(\n new KeyFrame(Duration.seconds(STARTTIME+1),\n new EventHandler<ActionEvent>() {\n public void handle(ActionEvent event) {\n //System.out.println(\"Got Timer timeout.\");\n if (cancel == false) {\n SceneResultsTimed.updatePlayerScore();\n localStage.setScene(SceneMgr.getScene(SceneMgr.IDX_RESULTSTIMED));\n }\n }\n },\n new KeyValue(timeSeconds, 0)));\n timeline.playFromStart();\n }\n }", "public double getDelay();", "private static float getDefaultDuration(ResourceLocation effectId) {\n return new ResourceLocation(\"night_vision\").equals(effectId) ? 15.9f : 1.9f;\n }", "int getChronicDelayTime();", "public static Timer getSharedNonDeamonTimer() {\n if ( sharedNonDeamonTimer == null ) {\n sharedNonDeamonTimer = new Timer(\"Shared Non-Deamon Timer\", false);\n }\n\n return sharedNonDeamonTimer;\n }", "@Override\n protected Stopwatch initialValue() {\n return Stopwatch.createUnstarted(ticker);\n }", "public int getDefaultTimeout() {\n return defaultTimeout;\n }", "private static void hackTooltipStartTiming(Tooltip tooltip) {\n try {\n Field fieldBehavior = tooltip.getClass().getDeclaredField(\"BEHAVIOR\");\n fieldBehavior.setAccessible(true);\n Object objBehavior = fieldBehavior.get(tooltip);\n\n Field fieldTimer = objBehavior.getClass().getDeclaredField(\"activationTimer\");\n fieldTimer.setAccessible(true);\n Timeline objTimer = (Timeline) fieldTimer.get(objBehavior);\n\n objTimer.getKeyFrames().clear();\n objTimer.getKeyFrames().add(new KeyFrame(new Duration(5)));\n } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) {\n System.out.println(e);\n }\n }", "TimerType createTimerType();", "private void initTimer(){\r\n\t\ttimer = new Timer() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tdisplayNext();\r\n\t\t\t}\r\n\t\t};\r\n\t}", "public long getTimerTime() {\n return timerTime;\n }", "public String getDefaultOutAnimation() {\n return (defaultOutAnimation);\n }", "public Timer getTime() {\n\t\treturn time;\n\t}", "public Timer() {\n\t\tthis.start = 0L;\n\t\tthis.end = 0L;\n\t}", "@Override\n protected int getRevealTime()\n {\n // If not Line chart or Trace.Disabled, return default\n Trace trace = getTrace();\n boolean showPointsOrArea = trace.isShowPoints() || trace.isShowArea();\n if (showPointsOrArea || getTrace().isDisabled())\n return ContentView.DEFAULT_REVEAL_TIME;\n\n // Calc factor to modify default time\n double maxLen = getTraceLineShapeArcLength();\n double factor = Math.max(1, Math.min(maxLen / 500, 2));\n\n // Return default time times factor\n return (int) Math.round(factor * ContentView.DEFAULT_REVEAL_TIME);\n }", "static public String soutAllTimer() {\n return HeartCore.t + \" - \" + HeartMoveBird.internalTime + \" - \" + HeartMoveObstacle.tWall;\n }", "public Timer()\r\n\t{\r\n\t\tcurrentstate = TIMER_STOP;\r\n\t}", "public Timer() {}", "private TimerTask getTimerTask() {\n TimerTask timerTask = new TimerTask() {\n @Override\n public void run() {\n\n if (angleSignaled && !ConcurrencyUtil.isAnyAnimationOnRun()) {\n\n // numAnimationOnRun += 2;\n Map<String, Double> newAnglesMap = qiblaManager\n .fetchDeltaAngles();\n Double newNorthAngle = newAnglesMap\n .get(QiblaCompassManager.NORTH_CHANGED_MAP_KEY);\n Double newQiblaAngle = newAnglesMap\n .get(QiblaCompassManager.QIBLA_CHANGED_MAP_KEY);\n\n Message message = mHandler.obtainMessage();\n message.what = ROTATE_IMAGES_MESSAGE;\n Bundle b = new Bundle();\n if (newNorthAngle == null) {\n b.putBoolean(IS_COMPASS_CHANGED, false);\n } else {\n ConcurrencyUtil.incrementAnimation();\n b.putBoolean(IS_COMPASS_CHANGED, true);\n\n b.putDouble(COMPASS_BUNDLE_DELTA_KEY, newNorthAngle);\n }\n if (newQiblaAngle == null) {\n b.putBoolean(IS_QIBLA_CHANGED, false);\n\n } else {\n ConcurrencyUtil.incrementAnimation();\n b.putBoolean(IS_QIBLA_CHANGED, true);\n b.putDouble(QIBLA_BUNDLE_DELTA_KEY, newQiblaAngle);\n }\n\n message.setData(b);\n mHandler.sendMessage(message);\n } else if (ConcurrencyUtil.getNumAimationsOnRun() < 0) {\n Log.d(NAMAZ_LOG_TAG,\n \" Number of animations are negetive numOfAnimation: \"\n + ConcurrencyUtil.getNumAimationsOnRun());\n }\n }\n };\n return timerTask;\n }", "public IdleTimer getIdleTimer()\n {\n return idleTimer;\n }", "private void prepareQuestionTimer() {\n timerQuestion = new Timer(1000, new ActionListener() {\n\n @Override\n public void actionPerformed(ActionEvent evt) {\n if (questionStartTime == null)\n return;\n DateFormat df = new SimpleDateFormat(\"mm:ss\");\n Date currentDate = new Date();\n // Time elapsed\n long timeElapsed = currentDate.getTime() - questionStartTime.getTime();\n // Show timer\n String timeStr = df.format(new Date(timeElapsed));\n try {\n labelTimeQuestion.setText(\"\" + (Integer.parseInt(labelTimeQuestion.getText()) - 1));\n } catch(NumberFormatException e) {\n labelTimeQuestion.setText(\"15\");\n }\n labelTimeQuestion.repaint();\n if (labelTimeQuestion.getText().equals(\"0\")) {\n verifyQuestion(Answer.NO_ANSWER);\n challengeModel.nextAnswer(null);\n labelTimeQuestion.setText(\"15\");\n }\n }\n \n });\n }", "public float getUpDownTimer() {\n return upDownTimer;\n }", "public abstract void startInitTimer();", "public void timer()\n{\n textSize(13);\n controlP5.getController(\"time\").setValue(runtimes);\n line(400, 748, 1192, 748);\n fill(255,0,0);\n for (int i =0; i<25; i++)\n {\n line(400+i*33, 743, 400+i*33, 753);\n text(i, 395 +i*33, 768);\n }\n if ((runtimes < 1 || runtimes > 28800) && s == true)\n {\n //origint = 0;\n runtimes = 1;\n //pausets = 0;\n runtimep = 0;\n } else if (runtimes > 0 && runtimes < 28800 && s == true)\n {\n runtimep = runtimes;\n runtimes = runtimes + speed;\n }\n timeh= runtimes/1200;\n timem= (runtimes%1200)/20;\n}", "public DankTimer getDankTimer(DLabel key) {\n return getDankTimer(key, DankTimerFormat.TENTH_OF_SECOND);\n }", "int getNominalDelay();", "Posn getDuration();", "public void anim() {\n // start the timer\n t.start();\n }", "private void setupAnimationTimer() {\n new AnimationTimer() {\n @Override\n public void handle(long l) {\n view.movePlayer();\n view.updateView();\n }\n }.start();\n\n // Timeline for UI stuff\n uiTimeline = new Timeline();\n\n KeyFrame keyStart = new KeyFrame(\n Duration.seconds(0),\n e -> view.updateUI((1160 / distance) * 0.005)\n );\n KeyFrame keyEnd = new KeyFrame(Duration.millis(5));\n\n uiTimeline.getKeyFrames().addAll(keyStart, keyEnd);\n uiTimeline.setCycleCount(Timeline.INDEFINITE);\n uiTimeline.setAutoReverse(false);\n\n countdownTimer = new Timeline(\n new KeyFrame(\n Duration.seconds(distance - (1160 / distance) * 0.005),\n e -> journeyComplete()\n )\n );\n\n // Timeline for asteroids\n Timeline asteroidTimer = new Timeline(\n new KeyFrame(Duration.millis(2000), e -> model.AsteroidPool.spawn())\n );\n asteroidTimer.setCycleCount(Timeline.INDEFINITE);\n asteroidTimer.play();\n }", "private void startTimer(){\n timer= new Timer();\r\n task = new TimerTask() {\r\n @Override\r\n public void run() {\r\n waitDuration++;\r\n\r\n timerLabel.setText(Integer.toString(waitDuration));\r\n }\r\n };\r\n timer.scheduleAtFixedRate(task,1000,1000);\r\n }", "public double gettimetoAchieve(){\n\t\treturn this.timeFrame;\n\t}", "public static float getCurrentTime(){\n return (float)(System.currentTimeMillis()-t0)/1000.0f;\r\n }", "public void timer()\n {\n timer += .1; \n }", "public JTimerLabel(String icon)\n\t{\n\t\tupdateTimer = new UpdateTimer();\n\t\t\n\t\tif (icon.equals(LOOP_ICON))\n\t\t{\n\t\t\ticonGroup = new Icon[15];\n\t\t\tupdateTimer.setDelay(30);\n\t\t}\n\t\telse if (icon.equals(BALL_ICON))\n\t\t{\n\t\t\ticonGroup = new Icon[30];\n\t\t\tupdateTimer.setDelay(80);\n\t\t}\n\t\telse if (icon.equals(CIRCLE_ICON))\n\t\t{\n\t\t\ticonGroup = new Icon[60];\n\t\t\tupdateTimer.setDelay(80);\n\t\t}\n\t\telse if (icon.equals(COMPASS_ICON))\n\t\t{\n\t\t\ticonGroup = new Icon[15];\n\t\t\tupdateTimer.setDelay(350);\n\t\t}\n\t\telse if (icon.equals(MAGNIFIER_ICON))\n\t\t{\n\t\t\ticonGroup = new Icon[22];\n\t\t\tupdateTimer.setDelay(80);\n\t\t}\n\t\tfor (int i = 0; i < iconGroup.length; i++)\n\t\t{\n\t\t\ticonGroup[i] = IconFactory.getSwingIcon(icon + (i + 1) + \".png\");\n\t\t}\n\t\t\n\t\treset();\n\t}", "public TimerDisplay()\n {\n timeElapsed = 0;\n }", "void startUpdateTimer();", "public void startFirstSampleTimer() {\n }", "@Override\n\tpublic String getName() {\n\t\treturn \"Advance time (time, +, done)\";\n\t}", "int getFirstTick();", "public int getDelayedTimeout();", "public YangUInt8 getRequestTimerValue() throws JNCException {\n YangUInt8 requestTimer = (YangUInt8)getValue(\"request-timer\");\n if (requestTimer == null) {\n requestTimer = new YangUInt8(\"5\"); // default\n }\n return requestTimer;\n }", "private void startTimer()\n {\n if (timer == null)\n {\n timer = new CountDownTimer(TIMER_MILLI_SEC, 1000)\n {\n @Override\n public void onTick(long l)\n {\n timerText.setText(\"\" + l / 1000);\n }\n\n @Override\n public void onFinish()\n {\n // Let P2 play\n if (secondPlayer instanceof IAPlayer)\n {\n ((IAPlayer) secondPlayer).playRandom();\n }\n // Animations and full results\n announceRoundResult();\n\n // Hide timer\n timerText.setVisibility(View.GONE);\n gameControlButton.setVisibility(View.VISIBLE);\n }\n };\n }\n\n // Clean UI state\n gameControlButton.setVisibility(View.INVISIBLE);\n timerText.setVisibility(View.VISIBLE);\n\n drawIcon.setVisibility(View.INVISIBLE);\n firstCup.setVisibility(View.INVISIBLE);\n secondCup.setVisibility(View.INVISIBLE);\n\n // Reset users actions\n resetActionButtonsState();\n firstPlayer.resetLastAction();\n secondPlayer.resetLastAction();\n\n // First player plays first\n if (firstPlayer instanceof IAPlayer)\n {\n ((IAPlayer) firstPlayer).playRandom();\n }\n\n // Start count down\n timer.start();\n }", "public long getTimeRemaining() {\n int timer = 180000; //3 minutes for the game in milliseconds\n long timeElapsed = System.currentTimeMillis() - startTime;\n long timeRemaining = timer - timeElapsed + bonusTime;\n long timeInSeconds = timeRemaining / 1000;\n long seconds = timeInSeconds % 60;\n long minutes = timeInSeconds / 60;\n if (seconds < 0 || minutes < 0) { //so negative numbers don't show\n seconds = 0;\n minutes = 0;\n }\n return timeInSeconds;\n }", "Integer getStartTimeout();", "public double getCircleTime();", "TimerStatus onTimer();", "Duration getDefaultPollInterval();", "@SimpleProperty(description = \"The default duration (in seconds) of each scan for this probe\")\n\tpublic float DefaultDuration(){\n\t\t\n\t\treturn SCHEDULE_DURATION;\n\t}", "protected long deadlineSeconds() {\n return DEFAULT_TASK_SECONDS;\n }", "public void start() {timer.start();}", "public void timerCallBack() {\r\n\t\tif (!ConfigManager.IS_MUSIC) {\r\n\t\t\tmusicBtn.setCurrentTileIndex(1);\r\n\t\t}\r\n\t\tif (!ConfigManager.IS_SOUND) {\r\n\t\t\tsoundBtn.setCurrentTileIndex(1);\r\n\t\t}\r\n\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif (bgSettingSpr.isVisible()) {\r\n\t\t\tif (isSetting) {\r\n\t\t\t\tif (!musicBtn.isVisible()) {\r\n\t\t\t\t\tshowSettingButton(true);\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\tbgSettingSpr.setVisible(false);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tbgSettingSpr.setVisible(false);\r\n\t\t\tsettingBtn.setCurrentTileIndex(0);\r\n\r\n\t\t\tif (musicBtn.isVisible()) {\r\n\t\t\t\tshowSettingButton(false);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic void setTimer(Double d) {\n\t\t\n\t}", "public float getMaxTimeSeconds() { return getMaxTime()/1000f; }", "public int getType() {\n\t\treturn ANIMATED;\n\t}", "public static Timer getSharedDeamonTimer() {\n \n if ( sharedDeamonTimer == null ) {\n sharedDeamonTimer = new Timer(\"Shared Deamon Timer\", true);\n }\n\n return sharedDeamonTimer;\n }", "private int getActiveTime() {\n\t\treturn 15 + level;\n\t}" ]
[ "0.69024575", "0.6834719", "0.6778845", "0.677576", "0.6604487", "0.6530458", "0.6506302", "0.6435131", "0.6394464", "0.6368089", "0.634238", "0.62961566", "0.6204115", "0.61844486", "0.61554337", "0.61498", "0.61298615", "0.6104114", "0.6079244", "0.6049841", "0.6029528", "0.60057247", "0.60036755", "0.600231", "0.5999224", "0.59756595", "0.59477395", "0.59442675", "0.5913206", "0.5898231", "0.5892293", "0.58631045", "0.58466977", "0.58427924", "0.58405036", "0.5827262", "0.58215547", "0.58203536", "0.5812958", "0.581275", "0.5793537", "0.5733782", "0.57314914", "0.5721028", "0.5714629", "0.57048005", "0.57004654", "0.569089", "0.5685119", "0.56567174", "0.5636599", "0.562551", "0.5618166", "0.55936825", "0.55862564", "0.55828136", "0.5564453", "0.5562882", "0.55567575", "0.55545276", "0.55483156", "0.55403817", "0.5534563", "0.55299145", "0.5524378", "0.5512177", "0.55108744", "0.5507636", "0.55051094", "0.5503209", "0.5501129", "0.5500122", "0.5496136", "0.5490862", "0.54800445", "0.5474304", "0.54736495", "0.5466008", "0.54618365", "0.54608876", "0.54563725", "0.544001", "0.54361784", "0.542615", "0.5421952", "0.5418365", "0.54183096", "0.5413184", "0.54113626", "0.54059446", "0.54053736", "0.5401361", "0.54007673", "0.53993905", "0.53972745", "0.5384937", "0.53706497", "0.53705645", "0.53696156", "0.53641766" ]
0.6128741
17
Get all frame names of bonus animation
protected abstract String[] getFrameNames();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<IKeyframe> getKeyframes();", "private void listFrames() {\n System.out.println(\"\\nFrames:\");\n MasterFrame master = world.getMasterFrame();\n System.out.println(master.getName() + \" moving at \" + master.getVelocity() + \"c.\");\n for (ReferenceFrame frame: world.getRelativeFrames()) {\n String speed = \" moving at \" + frame.getVelocity() + \"c relative to \" + master.getName() + \".\";\n System.out.println(frame.getName() + speed);\n }\n }", "public StringKey getAnimation() {\n return ModelBundle.SHIP_ANIMATIONS.get(name);\n }", "public List<Frame> getAllFrames(){\n\t\treturn Collections.unmodifiableList(frames);\n\t}", "public String toString() {\r\n\t\treturn \"PlayAnimation\";\r\n\t}", "private String addAnimation() {\n\t\t// Three Parameters: AnimNumber, AnimName, AnimArgument\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|anim\");\n\t\tif (!parameters[0].equals(\"0\")) {\n\t\t\ttag.append(parameters[0]);\n\t\t}\n\t\ttag.append(\":\" + parameters[1]);\n\t\tif (parameters.length > 2) {\n\t\t\ttag.append(\" \" + parameters[2]);\n\t\t}\n\t\treturn tag.toString();\n\n\t}", "public BoundedAnimation(String filePrefix, int frameCount) {\n images = new ArrayList<Image>();\n for (int i=1; i<frameCount+1; i++) {\n //System.out.Println(filePrefix + \"_\" + i);\n ImageIcon ii = new ImageIcon(filePrefix + \"_\" + i + \".png\");\n images.add(ii.getImage());\n }\n }", "public String toString()\n\t{\n\t\treturn \"Base animation\";\n\t}", "public Animation get_anim(String anim_name) {\n\n\t\tArrayList<Integer> dur_list;\n\t\tArrayList<Image> image_list;\n\t\tswitch (anim_name) {\n\t\tcase \"fly\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"f1\"));\n\t\t\timage_list.add(get_image(\"f2\"));\n\t\t\timage_list.add(get_image(\"f3\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(50);\n\t\t\tdur_list.add(50);\n\t\t\tdur_list.add(50);\n\t\t\tbreak;\n\t\tcase \"grub_right\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"gr1\"));\n\t\t\timage_list.add(get_image(\"gr2\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(100);\n\t\t\tdur_list.add(100);\n\t\t\tbreak;\n\t\tcase \"grub_left\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"gl1\"));\n\t\t\timage_list.add(get_image(\"gl2\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(100);\n\t\t\tdur_list.add(100);\n\t\t\tbreak;\n\t\tcase \"mario_run_left\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"ml1\"));\n\t\t\timage_list.add(get_image(\"ml2\"));\n\t\t\timage_list.add(get_image(\"ml3\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(200);\n\t\t\tdur_list.add(200);\n\t\t\tdur_list.add(200);\n\t\t\tbreak;\n\t\tcase \"mario_run_right\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"mr1\"));\n\t\t\timage_list.add(get_image(\"mr2\"));\n\t\t\timage_list.add(get_image(\"mr3\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(200);\n\t\t\tdur_list.add(200);\n\t\t\tdur_list.add(200);\n\t\t\tbreak;\n\t\tcase \"mario_still_left\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"mls\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(200);\n\t\t\tbreak;\n\t\tcase \"mario_still_right\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"mrs\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(200);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(anim_name));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(50);\n\t\t}\n\t\treturn new Animation(image_list, dur_list);\n\t}", "protected abstract float getFrameTimeNormalAnimation();", "private BufferedImage getCurrentAnimationFrame() {\n\t\treturn mainMenuAnimation.getCurrentFrame();\n\t\t\n\t}", "Animation getStructure();", "public int getTotalFrames() {\n int frame = 0;\n for (MOFPartPolyAnimEntry entry : getEntryList().getEntries())\n frame += entry.getDuration();\n return frame;\n }", "public int getFrames() {\r\n return frames;\r\n }", "public int[] getFrameSequence() {\n return frameSequence;\n }", "int animationId();", "public static void afficherNombreDAnimaux() {\n\t System.out.println(\"**************************\");\n\t System.out.println(\"Il y a \" + totalNumber + \" animaux\");\n\t}", "public int getAnimation() {\n\t\t\treturn animation;\n\t\t}", "java.util.List<org.chromium.components.paint_preview.common.proto.PaintPreview.PaintPreviewFrameProto> \n getSubframesList();", "int getNumberFrames();", "public BufferedImage getCurrentFrame(){\n\t\tif(first)\n\t\t\treturn animation_frame[index];\n\t\telse\n\t\t\treturn animation_frame[0];\n\t\t\n\t}", "public List <Integer> getKeyFrameTimes(List <RMShape> theShapes, boolean includeImplied)\n{\n // If a shapeList wasn't provided, assume it should be animator owner's children.\n if(theShapes==null)\n theShapes = _owner.getChildren();\n\n // Create new list for key frames\n List <Integer> keyFrames = new Vector();\n \n // Add implied key frames: time zero, current time and freeze frames\n if(includeImplied) {\n keyFrames.add(0);\n if(getTime()!=0) keyFrames.add(getTime());\n for(Integer freezeFrame : _freezeFrames) {\n int index = Collections.binarySearch(keyFrames, freezeFrame);\n if(index<0)\n keyFrames.add(-index - 1, freezeFrame);\n }\n }\n \n // Add explicit key frames by iterating over owner's children (on down)\n for(int i=0, iMax=ListUtils.size(theShapes); i<iMax; i++)\n getKeyFrames(theShapes.get(i), keyFrames);\n\n // Update Scoped keyframe\n if(!keyFrames.contains(_scopeTime))\n _scopeTime = null;\n\n // Return key frames\n return keyFrames;\n}", "public List<String> nomeAnimais(){\n\t\tfor (Animal a: this.animais) {\n\t\t\tthis.nomes.add(a.getNomeNumero());\n\t\t}\n\t\treturn this.nomes;\n\t}", "public synchronized String[] getOutputNames() {\n String[] names = new String[buffers.length];\n\n for (int i = 0; i < buffers.length; i++) {\n names[i] = buffers[i].getName();\n if (names[i] == null) {\n throw new IllegalStateException(\"BUFFER IS BROKEN\");\n }\n }\n\n return names;\n }", "public String toString()\n{\n StringBuffer sb = new StringBuffer(getClass().getSimpleName()).append(' ');\n if(getName()!=null) sb.append(getName()).append(' ');\n sb.append(getFrame().toString());\n return sb.toString();\n}", "private void initAnimationArray() {\r\n\t\tanimationArr = new GObject[8];\r\n\t\tfor(int i = 1; i < animationArr.length; i++) {\r\n\t\t\tString fileName = \"EvilMehran\" + i + \".png\";\r\n\t\t\tanimationArr[i] = new GImage(fileName);\r\n\t\t}\r\n\t}", "public SortedSet<EvDecimal> getFrames()\n\t\t{\n\t\treturn Collections.unmodifiableSortedSet((SortedSet<EvDecimal>)frameInfo.keySet());\n\t\t}", "public java.util.ArrayList<android.animation.Animator> getChildAnimations() { throw new RuntimeException(\"Stub!\"); }", "int getFramesCount();", "public ArrayList<String> getSpriteNames() {\n\t\treturn getFileNamesByPath(simulationConfig.getString(\"spritepath\"));\n\t}", "public ArrayList<Animator> getChildAnimations() {\n/* 106 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private AnimFrame getFrame(final int index) {\n\t\treturn (AnimFrame)frames.get(index);\n\t}", "public Animation Animation() {\r\n return animation;\r\n }", "public List<AnimationCallback> getAnimationCallbacks() {\n return callbacks;\n }", "public List <Integer> getKeyFrameTimes() { return getKeyFrameTimes(null, true); }", "public static int getTimeFrames() {\n return Atlantis.getBwapi().getFrameCount();\n }", "String getFPS();", "@Override // com.airbnb.lottie.model.animatable.BaseAnimatableValue, com.airbnb.lottie.model.animatable.AnimatableValue\r\n public /* bridge */ /* synthetic */ List<Keyframe<ScaleXY>> getKeyframes() {\r\n return super.getKeyframes();\r\n }", "public Collection getChildFrames();", "default Animator getInAnimation() {\n return null;\n }", "void loadCaptureAnimation() {\n\t\tanimationGroup = (ViewGroup) findViewById(R.id.capturedbarcodeholder);\n\t\tcaptureImageView = (ImageView) animationGroup\n\t\t\t\t.findViewById(R.id.capturedimageview);\n\t\tcapturedBarcodeTextView = (TextView) animationGroup\n\t\t\t\t.findViewById(R.id.capturedbarcodetv);\n\t\tDisplay display = getWindowManager().getDefaultDisplay();\n\t\tPoint size = new Point();\n\t\tdisplay.getSize(size);\n\t\tscreenWidth = size.x;\n\t\tanimationGroup.setLayerType(View.LAYER_TYPE_HARDWARE, null);\n\t\tcaptureMoveAnimation = AnimationUtils.loadAnimation(this,\n\t\t\t\tR.anim.captureanimationset);\n\t\tcaptureMoveAnimation.setFillAfter(false);\n\t\tcaptureMoveAnimation.setAnimationListener(new AnimationListener() {\n\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\n\t\t\t}\n\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\n\n\t\t\t}\n\n\t\t\tpublic void onAnimationEnd(Animation animation) {\n\t\t\t\t// lets hide the layer after animation is complete\n\t\t\t\tanimationGroup.setVisibility(View.GONE);\n\t\t\t\tanimationGroup.clearAnimation();\n\t\t\t}\n\t\t});\n\t}", "@java.lang.Override\n public int getSubframesCount() {\n return subframes_.size();\n }", "int getSubframesCount();", "public String getCurrentFrameName()\n\t{\n\t\tJavascriptExecutor jsExecutor = (JavascriptExecutor)driver;\n\t\treturn (jsExecutor.executeScript(\"return self.name\")).toString();\n\t}", "Animation getAnimation() {\n return currAnimation;\n }", "public Image getImage() {\n float percent = (System.currentTimeMillis() - animationStart) % animationDuration / (float)animationDuration;\n return frames[(int) (percent * frames.length)];\n }", "Animation getShowAnimation();", "@java.lang.Override\n public org.chromium.components.paint_preview.common.proto.PaintPreview.PaintPreviewFrameProto getSubframes(int index) {\n return subframes_.get(index);\n }", "public double getFrameDuration();", "public String getTimeframe() {\n return this.timeframe;\n }", "java.util.List<com.google.cloud.videointelligence.v1p2beta1.ObjectTrackingFrame> getFramesList();", "public int compterAnimaux(){\r\n\t\treturn noms.size();\r\n\t}", "@java.lang.Override\n public java.util.List<org.chromium.components.paint_preview.common.proto.PaintPreview.PaintPreviewFrameProto> getSubframesList() {\n return java.util.Collections.unmodifiableList(\n instance.getSubframesList());\n }", "public String[] getVerbFrames() {\n throw new UnsupportedOperationException();\n }", "public short getFrameOrder()\n\t{\n\t\treturn (short) nameList.size();\n\t}", "private String[] getTarget(XmlNode animationNode) {\n XmlNode channelNode = animationNode.getChild(\"channel\");\n String data = channelNode.getAttribute(\"target\");\n return data.split(\"/\");\n }", "public MyAnimation getSprite();", "private void updateKeyframes() {\n keyframes.clear();\n ArrayList<IMotion> motions = new ArrayList<>(shape.getMotions());\n\n if (motions.size() > 0) {\n IMotion start = motions.get(0);\n keyframes.add(start.getIntermediateState(start.getStartTime()));\n }\n\n for (IMotion motion : motions) {\n IState keyframe = motion.getIntermediateState(motion.getEndTime());\n\n if (!keyframes.contains(keyframe)) {\n keyframes.add(keyframe);\n }\n }\n }", "private String[] createNamesArray(){\n\t\t//TODO just test data\n\t\t/*\n\t\tfor(int i=0; i<20; i++){\n\t\t\tReplayData rd = new ReplayData(\"Game \" + i);\n\t\t\ttotalData.replays.add(rd);\n\t\t}*/\n\t\tString[] gameNames = new String[totalData.replays.size()];\n\t\tfor(int i =0; i<totalData.replays.size(); i++){\n\t\t\tgameNames[i] = totalData.replays.get(i).getName() + \" @ \" + totalData.replays.get(i).getDate();\n\t\t}\n\t\treturn gameNames;\n\t}", "@java.lang.Override\n public java.util.List<org.chromium.components.paint_preview.common.proto.PaintPreview.PaintPreviewFrameProto> getSubframesList() {\n return subframes_;\n }", "int getFrame() {\n return currFrame;\n }", "public String toString()\n\t{\n\t\treturn this.frame.toString();\n\t}", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn FRAMES_COUNT;\n\t\t}", "Frame getFrame();", "org.chromium.components.paint_preview.common.proto.PaintPreview.PaintPreviewFrameProto getSubframes(int index);", "public JLabel []getCardLabels()\n\t{\n\t\tsynchronized(this)\n\t\t{\n\t\t\tJLabel []out = new JLabel[numberCards];\n\t\t\tfor (int i = 0 ; i < numberCards ; i++)\n\t\t\t\tout[i] = board[i].getLabel();\n\t\t\treturn out;\n\t\t}\n\t}", "private String drawAllShapes() {\n\n /*\n Have list of list for each shape and the motions of each shape\n Need to iterate through the frames and for each motion in a frame\n add it to the corresponding shape in the list of lists\n */\n StringBuilder shapeSVG = new StringBuilder();\n Map<Integer, List<Shape>> animationFrames = this.model.getFrames();\n List<List<Shape>> shapeStates = new ArrayList<>();\n for (Integer key : new TreeSet<>(animationFrames.keySet())) {\n List<Shape> singleFrame = animationFrames.get(key);\n for (Shape shape : singleFrame) {\n if (!this.containsShapeList(shapeStates, shape.getName())) {\n List<Shape> shapeMotions = new ArrayList<>();\n shapeMotions.add(singleFrame.get(singleFrame.indexOf(shape)));\n shapeStates.add(shapeMotions);\n } else {\n shapeStates.get(this.findShape(shapeStates, shape.getName()))\n .add(singleFrame.get(singleFrame.indexOf(shape)));\n }\n }\n }\n\n for (List<Shape> shape : shapeStates) {\n shapeSVG.append(this.drawSingleShape(shape.get(0).getName(), shape.get(0).getType(), shape))\n .append(\"\\n\");\n }\n\n return shapeSVG.toString();\n }", "@java.lang.Override\n public org.chromium.components.paint_preview.common.proto.PaintPreview.PaintPreviewFrameProto getSubframes(int index) {\n return instance.getSubframes(index);\n }", "protected int getFramesPased() {\r\n\t\treturn framesPassed;\r\n\t}", "public static String[] names() {\n return ListableValuesHelper.names(LogicalFragmentBenchmarked.values());\n }", "public String showPlayListNames(){\n String namePlayList = \"\";\n for(int i = 0; i<MAX_PLAYLIST; i++){\n if(thePlayLists[i] != null){\n namePlayList += \"[\"+(i+1)+\"]\"+thePlayLists[i].getNamePlayList()+\"\\n\";\n }\n }\n return namePlayList;\n }", "public int getFrame() {\r\n return frame;\r\n }", "public Map<Pair<ID, PowerUpT>, List<Image>> getAnimationsPowerUp() {\n return AnimationsPowerUp;\n }", "public static String[] getNames() {\n String[] res = new String[crossbows.length];\n for (int i = 0; i < crossbows.length; i++) {\n res[i] = (String)crossbows[i][2];\n }\n return res;\n }", "public ArrayList<String> getCurrentVarNames() {\n\t\tArrayList<String> names = new ArrayList<String>();\n\t\tfor (NameSSA n : name.values())\n\t\t\tnames.add(n.current());\n\t\treturn names;\n\t}", "java.lang.String getGameName();", "java.lang.String getGameName();", "public TextureRegion getCurrentFrame() {\n stateTime += Gdx.graphics.getDeltaTime();\n return animation.getKeyFrame(stateTime, loop);\n }", "public Texture getCurrentFrame(){\n\t\treturn images[currentFrame];\n\t}", "void matchFrame();", "private TreeSet<Float> getKeyTimes() {\n TreeSet<Float> ret = new TreeSet<>();\n for (XmlNode animation : library_animations.getChildren(\"animation\")) {\n if (animation.getChild(\"animation\") != null) {\n animation = animation.getChild(\"animation\");\n }\n XmlNode timeData = animation.getChild(\"source\").getChild(\"float_array\");\n String[] rawTimes = timeData.getData().trim().split(\"\\\\s+\");\n for (String rawTime : rawTimes) {\n ret.add(Float.parseFloat(rawTime));\n\n }\n }\n return ret;\n }", "protected String[] generateLayerNames(int numLayers){\n\t\t\n\t\tString[] names = new String[numLayers];\n\t\tnames[0] = \"Graph Background\";\n\t\tnames[1] = \"Raw Semivariogram\";\n\t\tfor(int i = 2; i < numLayers; i++){\n\t\t\tnames[i] = \"Experimental Variogram: \" + (i - 2);\n\t\t}\n\n\t\treturn names;\n\t}", "@Override\n\tpublic String[] getTextureNames() {\n\t\treturn null;\n\t}", "public String[] getOutputNames()\n\t{\n\t\treturn _outputNames;\n\t}", "public int FrameIndex() {\r\n return frameIndex;\r\n }", "private void createAnimations(Texture spriteSheet, float frameTime) {\n\n TextureRegion[][] spriteRegion = TextureRegion.split(spriteSheet, TILESIZE, TILESIZE);\n\n TextureRegion[] downFrames = new TextureRegion[4];\n TextureRegion[] leftFrames = new TextureRegion[4];\n TextureRegion[] rightFrames = new TextureRegion[4];\n TextureRegion[] upFrames = new TextureRegion[4];\n\n System.arraycopy(spriteRegion[3], 0, upFrames, 0, 4);\n animations.add(new Animation<>(frameTime, upFrames));\n\n System.arraycopy(spriteRegion[1], 0, leftFrames, 0, 4);\n animations.add(new Animation<>(frameTime, leftFrames));\n\n System.arraycopy(spriteRegion[0], 0, downFrames, 0, 4);\n Animation<TextureRegion> downAnim = new Animation<>(frameTime, downFrames);\n animations.add(downAnim);\n\n System.arraycopy(spriteRegion[2], 0, rightFrames, 0, 4);\n animations.add(new Animation<>(frameTime, rightFrames));\n\n animations.add(downAnim);\n }", "public TextureRegion getFrame(){\n return frames.get(frame);\n }", "public int getFrame()\n\t{\n\t\treturn currFrame;\n\t}", "protected abstract Animator[] getAnimators(View itemView);", "String getTextureName();", "default Animator getOutAnimation() {\n return null;\n }", "public Map<Pair<ID, SpecialEffectT>, List<Image>> getAnimationsEffect() {\n return AnimationsEffect;\n }", "com.google.cloud.videointelligence.v1p2beta1.ObjectTrackingFrame getFrames(int index);", "private void getPlayer(){\n /** We need to have the correct child index from the scene **/\n //Spatial spatialNode = animation_Scene.getChild(16);\n //spatialNode\n animCharacter = (Node) animation_Scene.getChild(16);\n //rootNode.attachChild(animCharacter);\n animCharacter.setLocalTranslation(0, 0, 0);\n \n \n /** Get the animation control **/\n control = animCharacter.getChild(0).getControl(AnimControl.class);\n \n /** Print the names of animations**/\n Collection<String> animationNames = control.getAnimationNames();\n Object[] nameArray = animationNames.toArray();\n for(int a = 0; a < animationNames.size(); a++){\n System.out.println(\"Animation \" + a + \": \" + nameArray[a]);\n }\n \n /** Get Animation Channel **/\n channel = control.createChannel();\n walk = control.getAnim(\"Walk\");\n run = control.getAnim(\"Run\");\n stand = control.getAnim(\"Action_Stand\");\n \n channel.setAnim(\"Action_Stand\");\n }", "public static BufferedImage[] getAnimation(int length, int row, int tileSize, String file) {\n\n\t\tBufferedImage[] b = new BufferedImage[length];\n\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tb[i] = getFrame(i, row, file, tileSize);\n\t\t}\n\n\t\treturn b;\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t\t\t\t\t}", "public ArrayList<String> getStatsNames() {\n\t\tArrayList<String> arr = new ArrayList<String>();\n\t\tNodeList nl = getStats();\n\t\tint len = nl.getLength();\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tString name = ParserHelper.requiredAttributeGetter((Element) nl.item(i), \"name\");\n\t\t\tif (name != null) {\n\t\t\t\tarr.add(name);\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}", "@Override\n public void onAnimationStart(Animation anim) {\n }", "@Override\n public void onAnimationStart(Animation anim) {\n }" ]
[ "0.65548986", "0.65035343", "0.5965466", "0.59582806", "0.59491426", "0.5915164", "0.58728415", "0.58471197", "0.5804176", "0.5768749", "0.5768117", "0.57602257", "0.5710017", "0.5696305", "0.56945395", "0.5686188", "0.5684067", "0.5666329", "0.5662837", "0.5661713", "0.55847424", "0.5568848", "0.55475503", "0.5526582", "0.55196077", "0.55102617", "0.550301", "0.5497008", "0.547313", "0.545482", "0.5444944", "0.54445666", "0.54387015", "0.5422288", "0.54196906", "0.5394168", "0.536109", "0.53574294", "0.5320576", "0.52994895", "0.529893", "0.52872425", "0.5286655", "0.5280974", "0.5279449", "0.5276959", "0.5266151", "0.5260912", "0.5258007", "0.5248566", "0.52419335", "0.5226759", "0.52187645", "0.5214906", "0.5214103", "0.52018845", "0.5197119", "0.5193158", "0.5182552", "0.5176895", "0.51713544", "0.51450723", "0.51367337", "0.51342326", "0.5123066", "0.51158816", "0.50985646", "0.5095232", "0.50943476", "0.50920606", "0.50881845", "0.5082636", "0.50806445", "0.5059905", "0.50589937", "0.5053407", "0.5053407", "0.5045481", "0.5040495", "0.5034783", "0.50243545", "0.50162417", "0.50005203", "0.50003135", "0.49950755", "0.4994608", "0.49895215", "0.4985845", "0.49846435", "0.4979321", "0.49683368", "0.4966695", "0.4964839", "0.49628663", "0.49619824", "0.49542916", "0.49542916", "0.49511343", "0.4936869", "0.4936869" ]
0.76275223
0
Toast.makeText(DrillSettingsActivity.this, "result is:" +result.getMinearea(), Toast.LENGTH_LONG).show();
@Override protected void onPostExecute(HoleDetail result) { editor = getPreference(); editor.remove("minearea"); editor.remove("geologysituation"); editor.putString("minearea", result.getMinearea()); editor.putString("geologysituation", result.getGeologysituation()); editor.putString("outerflag",result.getOutferlag()); editor.commit(); tv_minearea = (TextView) findViewById(R.id.settings_minearea); tv_geologysituation = (TextView) findViewById(R.id.settings_geologysituation); tv_minearea.setText(result.getMinearea()); tv_geologysituation.setText(result.getGeologysituation()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void onResult(String result)\r\n {\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"SN = \"+result));\r\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n // TODO Auto-generated method stub\n if ((requestCode == request_code) && (resultCode == RESULT_OK)) {\n\n // Toast.makeText(this, intent.getStringExtra(\"resultado\"), Toast.LENGTH_LONG).show();\n inEquipo.setText(intent.getStringExtra(\"resultado\"));\n }\n }", "@Override\n protected void onPostExecute(String result)\n {\n //Toast.makeText(OTPActivity.this, result.toString(), Toast.LENGTH_LONG).show();\n }", "@Override\n protected void onPostExecute(String result) {\n // tvResult.setText(result);\n }", "private void showResult(WeatherInfo info) {\n Toast.makeText(this, info.getCityName() + \" : \" + info.getDescription(), Toast.LENGTH_LONG)\n .show();\n }", "private void result(String result) {\n\n Log.d(LOG_TAG, \"result method\");\n setInfo(result + \"\\n НОВАЯ ИГРА\" + \"\\n побед первого игрока =\" + winsOfPlayerOne + \"\\n побед второго игрока:\" + winsOfPlayerTwo);\n enableAllButtons(false);\n startNewGame();\n Toast.makeText(this, \"Игра окончена\", Toast.LENGTH_LONG).show();\n\n }", "@Override\r\n public void onResult(boolean result)\r\n {\n if (result) {\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"Set Successfully\"));\r\n } else {\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"Set Fail\"));\r\n }\r\n }", "private void sendToCatEd()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Education'\", Toast.LENGTH_SHORT).show();\n }", "@Override\n protected void onReceiveResult(int resultCode, Bundle resultData)\n {\n if (resultCode == Constants.SUCCESS_RESULT) {\n //showToast(getString(R.string.address_found));\n }\n\n }", "private void sendToCatVA()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Visual Art'\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(Details.this, \"\" + response, Toast.LENGTH_LONG).show();\n }", "@Override\n public void run() {\n result.setText(\"\"+res);\n }", "@Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(getContext(), \"המוצר נמחק בהצלחה!\", Toast.LENGTH_SHORT).show();\n }", "@Override\r\n public void onClick(View v)\r\n {\n DJIDrone.getDjiMainController().getAircraftSn(new DJIExecuteStringResultCallback(){\r\n\r\n @Override\r\n public void onResult(String result)\r\n {\r\n // TODO Auto-generated method stub\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"SN = \"+result));\r\n }\r\n \r\n });\r\n }", "private void showResult(String result) {\n TextView averageText = (TextView) findViewById(R.id.averageText);\n mUnit = getResultUnit();\n mAverageConsumption = result + \" \" + mUnit;\n\n String text = getResourceString(R.string.average) + \" \" + mAverageConsumption;\n averageText.setText(text);\n }", "private void sendToCatLit()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Literary'\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void handleResult(Result rawResult) {\n\n Toast.makeText(this,rawResult.getText(),Toast.LENGTH_LONG).show();\n// Toast.makeText(this,rawResult.getBarcodeFormat().toString(),Toast.LENGTH_LONG).show();\n\n\n if (rawResult.getText().equals(\"admin\")) {\n\n Intent intent = new Intent(ScannerActivity.this, ExamPage.class);\n startActivity(intent);\n finish();\n\n\n } else {\n\n Toast.makeText(this,\"Wrong QR Code\",Toast.LENGTH_LONG).show();\n Intent intent = new Intent(ScannerActivity.this, ScannerActivity.class);\n startActivity(intent);\n finish();\n\n\n }\n\n\n\n SharedPreferences sp = getSharedPreferences(\"PREF_NAME\", Context.MODE_PRIVATE);\n String qrText = sp.getString(\"QR_Code\", String.valueOf(-1));\n Toast.makeText(this,qrText,Toast.LENGTH_LONG).show();\n\n\n Log.v(\"Scan\", rawResult.getText()); // Prints scan results\n Log.v(\"Scan\", rawResult.getBarcodeFormat().toString()); // Prints the scan format (qrcode, pdf417 etc.)\n }", "@Override\r\n protected void onReceiveResult(int resultCode, Bundle resultData) {\n String adderssOutput = resultData.getString(Constants.RESULT_DATA_KEY);\r\n\r\n if (resultCode == Constants.SUCCESS_RESULT) {\r\n mTextView.setText(adderssOutput);\r\n }\r\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n // Logic to handle location object\n longitude = location.getLongitude();\n latitude = location.getLatitude();\n\n //tv_lat.setText(String.valueOf(location.getLatitude()));\n //tv_long.setText(String.valueOf(location.getLongitude()));\n } else {\n finish();\n //tv_lat.setText(\"Latitude not available\");\n //tv_long.setText(\"Longitude not available\");\n }\n }", "public void displayResult(View view){\n countPoints();\n String quantity;\n String player;\n boolean checked = ((CheckBox) findViewById(R.id.nickname)).isChecked();\n\n if (checked == true) {\n player = \"Anonymous\";\n } else {\n player = ((EditText) findViewById(R.id.name)).getText().toString();\n }\n /*\n method to show toast message with result\n */\n if (points > 1) {\n quantity = \" points!\";\n } else {\n quantity = \" point!\";\n }\n Toast.makeText(FlagQuiz.this, player + \", your score is: \" + points + quantity, Toast.LENGTH_LONG).show();\n }", "public void loadToast(){\n Toast.makeText(getApplicationContext(), \"Could not find city\", Toast.LENGTH_SHORT).show();\n }", "private void mostrarToast () {\n Toast.makeText(this, \"Imagen guardada en la galería.\", Toast.LENGTH_SHORT).show();\n }", "void displayMessage(){\r\n Toast toast = Toast.makeText(this, getString(R.string.congratz_message, String.valueOf(playerScore)), Toast.LENGTH_SHORT);\r\n toast.show();\r\n }", "@Override\n public void onSuccess(Location location) {\n Log.d(TAG, \"onSuccess: Location : \" + location);\n if (location != null) {\n Toast.makeText(MainActivity.this, \"Location : \" + location, Toast.LENGTH_SHORT).show();\n }\n }", "public void showResult(boolean result) {\n\t\tToast.makeText(this, \"The result was: \" + result, Toast.LENGTH_LONG)\n\t\t\t\t.show();\n\t}", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n //Toast.makeText(getApplicationContext(), String.valueOf(location.getLatitude()+\",\"+location.getLongitude()), Toast.LENGTH_SHORT).show();\n retrofitPegarOnibus(location.getLatitude() + \",\" + location.getLongitude());\n coord = location.getLatitude() + \",\" + location.getLongitude();\n } else {\n //Toast.makeText(getApplicationContext(), \"Location = null\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\r\n\t\tprotected void onPostExecute(String result) {\n\t\t\tsuper.onPostExecute(result);\r\n\t\t\tshowtalk.setText(result);\r\n\t\t}", "@Override\n protected void onPostExecute(String result) {\n Toast.makeText(getBaseContext(), \"Received!\", Toast.LENGTH_LONG).show();\n Toast.makeText(getBaseContext(), \"title : \" + result, Toast.LENGTH_LONG).show();\n\n Log.i(\"Message\", \"Result*****\" + result);\n }", "@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\tLog.e(TAG,result);\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\tLog.e(TAG,result);\t\n\t\t\t\t}", "@Override\n public void onClick(View v) {\n Toast.makeText(context, \"You Clicked \" + result[position], Toast.LENGTH_SHORT).show();\n }", "private void exibe_mensagem(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "@Override\r\n public void onResult(boolean result)\r\n {\n if(result){\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"Start Calibration ,successful\"));\r\n }\r\n else{\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"Start Calibration ,fail\"));\r\n }\r\n }", "public void showErrorMessage(){\n Toast.makeText(context, R.string.generic_error_message, Toast.LENGTH_LONG).show();\n }", "private void sendToCatTheater()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Theater'\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(getApplicationContext(), \"Success!\",\n Toast.LENGTH_LONG).show();\n }", "@Override\n protected void onPostExecute(String result) {\n tvContenidoTarea.setText(result); // txt.setText(result);\n // might want to change \"executed\" for the returned string passed\n // into onPostExecute() but that is upto you\n }", "@Override\n\t\t\t\t\t\tpublic void result(String result) {\n\t\t\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void result(String result) {\n\t\t\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t\t\t}", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode,resultCode,data);\n\n // menangkap hasil balikan dari Place Picker, dan menampilkannya pada TextView\n if (requestCode == 5 && resultCode == RESULT_OK) {\n\n place_Picker = PlacePicker.getPlace(TambahWarkopActivity.this,data);\n\n stxtaddresplace = String.format(\"%s\", place_Picker.getAddress().toString());\n latLng = place_Picker.getLatLng();\n latitude = (float) latLng.latitude;\n longitude = (float) latLng.longitude;\n alamat_warkopText.setText(\"\"+ stxtaddresplace);\n\n }\n }", "@Override\n\t\t\t\t\tpublic void onSuccess(Integer result) {\n\t\t\t\t\t\tif (result == 0) {\n\t\t\t\t\t\t\tgetApplyDialog();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToastUtil.showToast(context, \"无法获取游戏信息\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}", "@Override\n public void success(Response result, Response response) {\n BufferedReader reader = null;\n\n //An string to store output from the server\n String output = \"\";\n\n try {\n //Initializing buffered reader\n reader = new BufferedReader(new InputStreamReader(result.getBody().in()));\n\n //Reading the output in the string\n output = reader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //Displaying the output as a toast\n Toast.makeText(MainActivity.this, output, Toast.LENGTH_LONG).show();\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(data!=null&&data.getStringExtra(\"Format\")!=null)\n Toast.makeText(this, \"Contents = \" + data.getStringExtra(\"Contents\") +\n \", Format = \" + data.getStringExtra(\"Format\"), Toast.LENGTH_SHORT).show();\n }", "@Override\n public void toastSemEnderecos() {\n Toast.makeText(MainActivity.this, R.string.semEndereco, Toast.LENGTH_SHORT).show();\n }", "public String doInBackground(Void... params) {\n return ChargeUtils.getChargingHintText(KeyguardIndicationController.this.mContext, KeyguardIndicationController.this.mPowerPluggedIn, KeyguardIndicationController.this.mBatteryLevel);\n }", "public String doInBackground(Void... params) {\n return ChargeUtils.getChargingHintText(KeyguardIndicationController.this.mContext, KeyguardIndicationController.this.mPowerPluggedIn, KeyguardIndicationController.this.mBatteryLevel);\n }", "private void showResult(TYPE type){\r\n\t\tString brand = \"\";//brand\r\n\t\tString sub = \"\";//sub brand\r\n\t\tString area = \"\";//area\r\n\t\tString cus = \"\";//customer name\r\n\t\tString time = \"\";//time in second level\r\n\t\tKIND kind = null;//profit or shipment \r\n\t\t\r\n\t\tif(item1.getExpanded()){\r\n\t\t\tkind = KIND.SHIPMENT;\r\n\t\t\tbrand = combo_brand_shipment.getText();\r\n\t\t\tsub = combo_sub_shipment.getText();\r\n\t\t\tarea = combo_area_shipment.getText();\r\n\t\t\tcus = combo_cus_shipment.getText();\r\n\t\t}else if(item2.getExpanded()){\r\n\t\t\tkind = KIND.PROFIT;\r\n\t\t\tbrand = combo_brand_profit.getText();\r\n\t\t\tsub = combo_sub_profit.getText();\r\n\t\t\tarea = combo_area_profit.getText();\r\n\t\t\tcus = combo_cus_profit.getText();\r\n\t\t}else{//either item1 & item2 are not expanded\r\n\t\t\t//show a message?\r\n\t\t\tkind = KIND.NONE;\r\n\t\t}\r\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMddHHmmss\");\r\n\t\ttime = formatter.format(new Date());\r\n\t\tfinal Map<String, Object> args = new HashMap<String ,Object>();\r\n\t\targs.put(\"brand\", brand);\r\n\t\targs.put(\"sub_brand\", sub);\r\n\t\targs.put(\"area\", area);\r\n\t\targs.put(\"customer\", cus);\r\n\t\targs.put(\"time\", time);\r\n\t\targs.put(\"kind\", kind.toString());\r\n\t\targs.put(\"type\", type.toString());\r\n\t\t//call engine to get the data\t\r\n\t\t\r\n\t\tProgressMonitorDialog progressDialog = new ProgressMonitorDialog(Display.getCurrent().getActiveShell());\r\n\t\tIRunnableWithProgress runnable = new IRunnableWithProgress() { \r\n\t\t public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { \r\n\t\t \t\r\n\t\t Display.getDefault().asyncExec(new Runnable() { \r\n\t\t public void run() { \r\n\t\t monitor.beginTask(\"正在进行更新,请勿关闭系统...\", 100); \r\n\t\t \r\n\t\t monitor.worked(25); \r\n\t monitor.subTask(\"收集数据\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tro.getMap().clear();\r\n\t\t\t\t\tro=statistic.startAnalyzing(args, monitor);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tMessageBox mbox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t\t\t\t\tmbox.setMessage(\"分析数据失败,请重试\");\r\n\t\t\t\t\tmbox.open();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\tmonitor.worked(100); \r\n\t monitor.subTask(\"分析完成\");\r\n\t \r\n\t\t monitor.done();\r\n\t\t }\r\n\t\t \t });\r\n\t\t } \r\n\t\t}; \r\n\t\t \r\n\t\ttry { \r\n\t\t progressDialog.run(true,/*是否开辟另外一个线程*/ \r\n\t\t false,/*是否可执行取消操作的线程*/ \r\n\t\t runnable/*线程所执行的具体代码*/ \r\n\t\t ); \r\n\t\t} catch (InvocationTargetException e) { \r\n\t\t\tMessageBox mbox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t\t\tmbox.setMessage(\"分析数据失败,请重试\");\r\n\t\t\tmbox.open();\r\n\t\t\treturn;\r\n\t\t} catch (InterruptedException e) { \r\n\t\t\tMessageBox mbox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t\t\tmbox.setMessage(\"分析数据失败,请重试\");\r\n\t\t\tmbox.open();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(ro.getMap().isEmpty())\r\n\t\t\treturn;\r\n\t\t\r\n\t\tPagination page1 = (Pagination) ro.get(\"table1\");\r\n\t\tPagination page2 = (Pagination) ro.get(\"table2\");\r\n\t\tPagination page3 = (Pagination) ro.get(\"table3\");\r\n\t\tList<Object> res1 = new ArrayList<Object>();\r\n\t\tList<Object> res2 = new ArrayList<Object>();\r\n\t\tList<Object> res3 = new ArrayList<Object>();\r\n\t\tif(page1 != null)\r\n\t\t\tres1 = (List<Object>)page1.getItems();\r\n\t\tif(page2 != null)\r\n\t\t\tres2 = (List<Object>)page2.getItems();\r\n\t\tif(page2 != null)\r\n\t\t\tres3 = (List<Object>)page3.getItems();\r\n\t\t\r\n\t\tif(res1.size()==0 && res2.size()==0 && res3.size()==0){\r\n\t\t\tMessageBox messageBox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t \tmessageBox.setMessage(\"没有满足查询条件的数据可供分析,请查询其他条件\");\r\n\t \tmessageBox.open();\r\n\t \treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//this if/else can be optimized, since it looks better in this way, leave it\t\t\r\n\t\t//case 1: brand ratio, area ratio, trend\r\n\t\tif(brand.equals(AnalyzerConstants.ALL_BRAND) && area.equals(AnalyzerConstants.ALL_AREA)){\r\n\t\t\t\t\t\t\r\n\t\t\t//brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(true);//all brands\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n \t\t\r\n \t\t//area ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(true);//all areas\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//area\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\r\n\t\t}\r\n\t\t//case 2: brand ratio, customer ratio, trend\r\n\t\telse if(brand.equals(AnalyzerConstants.ALL_BRAND) && cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(true);//all brands\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n \r\n \t\t//customer ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(false);//all areas\r\n \t\trb2.setArea(area);\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//area\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 3: brand ratio, trend\r\n\t\telse if(brand.equals(AnalyzerConstants.ALL_BRAND) && !area.equals(AnalyzerConstants.ALL_AREA) && !cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(true);//all brands\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 4: sub brand ratio, area ratio, trend\r\n\t\telse if(sub.equals(AnalyzerConstants.ALL_SUB) && area.equals(AnalyzerConstants.ALL_AREA)){\r\n\t\t\t//sub brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(false);//all brands\r\n\t\t\trb.setBrand(brand);\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n \r\n \t\t//area ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(true);//all areas\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//area\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 5: sub brand ratio, customer ratio, trend\r\n\t\telse if(sub.equals(AnalyzerConstants.ALL_SUB) && cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//sub brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(false);//all brands\r\n\t\t\trb.setBrand(brand);\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n \r\n \t\t//customer ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(false);//all areas\r\n \t\trb2.setArea(area);\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//area\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 6: sub brand ratio, trend\r\n\t\telse if(sub.equals(AnalyzerConstants.ALL_SUB) && !area.equals(AnalyzerConstants.ALL_AREA) && !cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//sub brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(false);//all brands\r\n\t\t\trb.setBrand(brand);\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 7: area ratio, trend\r\n\t\telse if(!brand.equals(AnalyzerConstants.ALL_BRAND) && !sub.equals(AnalyzerConstants.ALL_SUB) && area.equals(AnalyzerConstants.ALL_AREA)){\r\n \t\t//area ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(true);//all areas\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//brand\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 8: customer ratio, trend\r\n\t\telse if(!brand.equals(AnalyzerConstants.ALL_BRAND) && !sub.equals(AnalyzerConstants.ALL_SUB) && cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n \t\t//customer ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(false);//all areas\r\n \t\trb2.setArea(area);\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//brand\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 9: trend\r\n\t\telse if(!brand.equals(AnalyzerConstants.ALL_BRAND) && !sub.equals(AnalyzerConstants.ALL_SUB) && !area.equals(AnalyzerConstants.ALL_AREA) & !cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//now, just trend, do nothing here\r\n\t\t}\r\n\t\tif(!kind.equals(KIND.NONE)){\r\n\t\t\t//trend, always has the trend graph \t\r\n\t\t\tTrendDataSet ts = new TrendDataSet();\r\n\t\t\tts.setKind(kind);\t\r\n\t\t\tts.setType(type);\r\n\t\t\tTrendComposite tc = new TrendComposite(composite_content, 0, ts, res3); \r\n\t\t\talys.add(tc);\r\n\t\t\tcomposite_content.setLayout(layout_content);\r\n\t\t\tcomposite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t\t\t\r\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK && requestCode == REQUEST_CODE) {\n \t settings_params = data.getExtras().getString(\"api_params\");\n Toast.makeText(this, settings_params,\n Toast.LENGTH_LONG).show();\n\n }\n \n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n Toast.makeText(MainActivity.this,\n location.toString(),Toast.LENGTH_LONG).show();\n }\n else{\n Toast.makeText(MainActivity.this,\n \"Location object not received\",Toast.LENGTH_LONG).show();\n }\n }", "void showSuccess();", "protected void onPostExecute(String result) {\n showOpinionCreatedMessage(Integer.parseInt(result));\n }", "public void getLoco(double lat, double lon){\n cords.setText(lat + \" \"+lon);\n\n // String dress = getCompleteAddressString(lat,lon);\n\n // latt = lat;\n // longg = lon;\n\n //Toast.makeText(getContext(), add, Toast.LENGTH_SHORT).show();\n\n //LocationAddress locationAddress = new LocationAddress();\n //locationAddress.getAddressFromLocation(38.898748, -77.037684\n // , getContext(), new GeocoderHandler());\n\n //String add = getAddressString(lat,lon);\n //Toast.makeText(getContext(), add, Toast.LENGTH_LONG);\n //info.setText(add);\n\n check.setVisibility(View.VISIBLE);\n\n\n\n\n\n\n\n }", "private void showResultAsToast(int nbOfCorrectAnswers) {\n String msg = \"\";\n\n if(nbOfCorrectAnswers == 4) {\n msg = \"Genius ! LOL !! \" + nbOfCorrectAnswers + \"/4\";\n } else if (nbOfCorrectAnswers < 4) {\n msg = \"You can do better than this! \" + nbOfCorrectAnswers + \"/4\";\n }\n\n // The Toast method helps to show a message that shows the number of correct answers\n Toast.makeText(this, msg, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onLocationResult(LocationResult locationResult) {\n super.onLocationResult(locationResult);\n Log.d(TAG, \"onLocationResult: \");\n if (locationResult != null) {\n Log.d(TAG, \"onLocationResult: loaction!==null\");\n myLocation = locationResult.getLastLocation();\n showMarker();//de show hinh len\n }\n }", "@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}", "protected void onPostExecute(String result) {\n pDialog.dismiss();\n\n Log.d(\"workshop onPostExecute:\",result);\n\n try {\n // Checking for SUCCESS TAG\n // Check your log cat for JSON reponse\n jObj_result = new JSONObject(result);\n v_success = jObj_result.getInt(TAG_SUCCESS);\n v_msg = jObj_result.getString(TAG_MSG);\n\n } catch (JSONException e) {\n v_success = 0;\n e.printStackTrace();\n }\n\n Log.d(\"workshop v_msg:\",v_msg);\n if (v_success == 1) {\n Toast.makeText(myContext, v_msg, Toast.LENGTH_SHORT).show();\n } //else msg Erro\n\n }", "protected void onPostExecute(String result) {\n pDialog.dismiss();\n\n Log.d(\"workshop onPostExecute:\",result);\n\n try {\n // Checking for SUCCESS TAG\n // Check your log cat for JSON reponse\n jObj_result = new JSONObject(result);\n v_success = jObj_result.getInt(TAG_SUCCESS);\n v_msg = jObj_result.getString(TAG_MSG);\n\n } catch (JSONException e) {\n v_success = 0;\n e.printStackTrace();\n }\n\n Log.d(\"workshop v_msg:\",v_msg);\n if (v_success == 1) {\n Toast.makeText(myContext, v_msg, Toast.LENGTH_SHORT).show();\n } //else msg Erro\n\n }", "public void displayAnswer(){\r\n String message = \"That is the correct answer!\";\r\n\r\n Toast.makeText(QuizActivity.this,\r\n message, Toast.LENGTH_SHORT).show();\r\n }", "@Override\r\n public void onClick(View v)\r\n {\n DJIDrone.getDjiMainController().getGohomeAltitude(new DJIExecuteFloatResultCallback() {\r\n \r\n @Override\r\n public void onResult(float result)\r\n {\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, result + \"\"));\r\n }\r\n });\r\n }", "public void getTip(View v)\n {\n EditText billEditText = (EditText) findViewById(R.id.billEditText);\n EditText percentEditText = (EditText) findViewById(R.id.percentEditText);\n TextView tipTextView = (TextView) findViewById(R.id.tipTextView);\n TextView totalTextView = (TextView) findViewById(R.id.totalTextView);\n\n //get the values from the EditText boxes and convert them to double data types\n double bill = Double.parseDouble(billEditText.getText().toString());\n double percent = Double.parseDouble(percentEditText.getText().toString());\n //double total = Double.parseDouble(totalTextView.getText().toString());\n\n //calculate tip\n percent = percent/100;\n double tip = bill*percent;\n double total = bill + tip;\n\n tipTextView.setText(\"Tip: \" + tip);\n totalTextView.setText(\"Total: \" + total);\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(DemoLocationActivity.this,response,Toast.LENGTH_SHORT).show();\n\n }", "public void onSuccess(String result) {\n\t\t\t\tmember_info.setText(result);\n\t\t\t}", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\n\t\tif (requestCode == CODE_OK) {\n\t\t\tString result = data.getExtras().getString(\"result\");\n\t\t\tif (!result.equals(\"null\")) {\n\t\t\t\tMSShow.show(getApplicationContext(), result);\n\t\t\t\tLog.e(\"result\", result);\n\t\t\t}\n\n\t\t}\n\t}", "@Override\n public void onLocationChanged(Location location) {\nString x=\"Latitude is--> \"+location.getLatitude();\nString y=\"Longtitude is--> \"+location.getLongitude();\n Toast.makeText(this.context,\"LATITUDE=\"+x+\" LONGTITUDE=\"+y, Toast.LENGTH_LONG).show();\n txtview.setText(x+\"\\n\"+y);\n\n }", "@Override\n protected void onPostExecute(String result) {\n Log.i(\"this is the result\", \"HULA\");\n //Do anything with response..\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n Toast.makeText(ATSLocationActivity.this, \"Last location is null\", Toast.LENGTH_SHORT).show();\n }else{\n Toast.makeText(ATSLocationActivity.this, \"\"+location.getLatitude(), Toast.LENGTH_SHORT).show();\n }\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 1) {\n if(resultCode == RESULT_OK) {\n location = data.getStringExtra(\"EXTRA_PLACE_NAME\");\n place_id = data.getStringExtra(\"EXTRA_PLACE_ID\");\n //lat = data.getDoubleExtra(\"EXTRA_PLACE_LAT\", 0);\n //lng = data.getDoubleExtra(\"EXTRA_PLACE_LNG\", 0);\n\n ViewLocation.setText(location);\n\n }\n }\n }", "@Override\r\n public void onResult(String result)\r\n {\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"Firmware version = \"+result));\r\n }", "@Override\n\tprotected void onPostExecute(Void result) {\n\t\tsuper.onPostExecute(result);\n\t\tstatus.setText(debug);\n\t}", "@Override\n protected void onPostExecute(String result) {\n Log.i(TAG, \"STATUS IS: \" + result);\n }", "@Override\r\n\r\n public void getResult(String result) {\n Log.d(\"myApp_AWS\", \"Registration:\" + result);\r\n\r\n if (!result.equals(\"\\\"Appliance Registration Successful\\\"\")) {\r\n\r\n runOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Toast.makeText(Rinnai11eRegistration.this, \"Web Services Error.\",\r\n Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n } else {\r\n runOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Toast.makeText(Rinnai11eRegistration.this, \"Update Successful.\",\r\n Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n }\r\n }", "@Override\n public void success(Object result) {\n super.success(result);\n if (null == result) {\n Util.show(\"网络异常,请重试\", PayMoneyFrame1.this);\n return;\n }\n JSONObject json = JSON.parseObject(result.toString());\n if (200 != json.getIntValue(\"code\")) {\n Util.show(\"网络异常,请重试\", PayMoneyFrame1.this);\n return;\n }\n\n String number = \"0.00\";\n if (!Util.isNull(json.getString(\"shopping_voucher\"))) {\n number = json.getString(\"shopping_voucher\");\n }\n gowuquan.setText(number);\n gowuquan.setVisibility(View.VISIBLE);\n\n\n }", "@Override\n\tprotected void onPostExecute(String result) {\n\t\tLog.d(TAG, result);\n\t}", "private void toastmessage(String message){\n Toast.makeText(Accountinfo.this,message,Toast.LENGTH_SHORT).show();\n }", "public void showresult(String result, String status, String message) {\r\n\t\tCommonFunctions.queryresult = \"No of Cells not Matching :\" + result;\r\n\t\tCommonFunctions.teststatus = \"Status :\" + status;\r\n\t\tCommonFunctions.message = \"System Message :\" + message;\r\n\t\tresultstextarea.setText(\"No of Cells not Matching : \" + result + \"\\n\\n\" + \"Status : \" + status + \"\\n\\n\"\r\n\t\t\t\t+ \"System Message : \" + message);\r\n\t\t// CommonFunctions.invokeTestResultsDialog(getClass());\r\n\t}", "@Override\n protected void onPostExecute(String result) {\n temptext.setText(result+data);\n }", "private void showResults() {\n verifyFCMToken(this);\n progressDialog.cancel();\n Toast.makeText(RegisterActivity.this, \"Welcome!\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "@Override\n protected void onPostExecute (String Resultado)\n {\n super.onPostExecute(Resultado);\n try{\n Log.e(\"Salida\", Resultado);\n Toast.makeText(contexto, Resultado,Toast.LENGTH_SHORT).show();\n //Se mandan esos datos a otra actividad lista en formato string\n //Intent i = new Intent(contexto, MapsActivity.class);\n\n\n }catch (Throwable t){\n Log.e(\"Falla\",t.toString());\n }\n }", "void showToast(String value);", "@Override\r\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(AttendanceActivity.this, \"Failed to get results from mlkit!!!\", Toast.LENGTH_SHORT).show();\r\n }", "@Override\n protected void onPostExecute(String result) {\n// Toast.makeText(getBaseContext(), \"Data Sent!\", Toast.LENGTH_LONG).show();\n }", "@Override\r\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\t\tactivityContext,\r\n\t\t\t\t\t\t\t\tR.string.unable_to_fetch_the_details,\r\n\t\t\t\t\t\t\t\t2000);\r\n\r\n\t\t\t\t\t\t }", "private void displayLocation() {\n\n if(customProgressDialog.isShowing())\n customProgressDialog.cancel();\n\n boolean hasPermissionFine = (ContextCompat.checkSelfPermission(LocationChooser.this,\n android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED);\n boolean hasPermissionCoarse = (ContextCompat.checkSelfPermission(LocationChooser.this,\n android.Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED);\n if (!hasPermissionFine || !hasPermissionCoarse) {\n ActivityCompat.requestPermissions(LocationChooser.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION}, REQUEST_LOCATION);\n } else {\n mLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n }\n mLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n if (mLocation != null) {\n sLat = mLocation.getLatitude();\n sLang = mLocation.getLongitude();\n Log.d(\"curren location:\", String.valueOf(sLat) + \"::\" + String.valueOf(sLang));\n source.setText(\"Your location\");\n //locationText.setText(String.valueOf(sLat)+\"::\"+String.valueOf(sLang));\n } else {\n Toast.makeText(this, \"Location not Detected.\", Toast.LENGTH_SHORT).show();\n // showSettingsAlert();\n }\n }", "@Override\n public void onClick(View view) {\n ShowDialog(\"El Resultado es:\",BuildNumber(SpnC1.getSelectedItemPosition(),SpnC2.getSelectedItemPosition(),\n SpnC3.getSelectedItemPosition())+\" \"+GetTolerance(SpnC4.getSelectedItemPosition()));\n }", "@Override\n public void run() {\n String scanNumText = result.getText();\n Toast.makeText(ItemScan.this, scanNumText, Toast.LENGTH_SHORT).show();\n Intent intent = getIntent();\n intent.putExtra(\"Barcode\", scanNumText);\n setResult(Activity.RESULT_OK, getIntent());\n finish();\n }", "public void showResults(String results){\n\t\t\tMessage msg = MainUIHandler.obtainMessage(UI_SHOW_RESULTS);\n\t\t\tmsg.obj=results;\n\t\t\tMainUIHandler.sendMessage(msg);\t\n\t\t}", "@Override\n protected void onPostExecute(String s) {\n super.onPostExecute(s);\n dialog.dismiss(); // to stop showing the progressbar After process is completed\n tvResult.setText(s);\n tvResult.setVisibility(View.VISIBLE);\n Toast.makeText(MainActivity.this, \"Process Done\", Toast.LENGTH_SHORT).show();\n\n }", "public void displayResultScreen() {\n displayScreenAdminView = new Result();\n\n\n }", "void toast(int resId);", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n int latitude = (int) location.getLatitude();\n int longitude = (int) location.getLongitude();\n slat = latitude + \"\";\n slong = longitude + \"\";\n }\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n int latitude = (int) location.getLatitude();\n int longitude = (int) location.getLongitude();\n slat = latitude + \"\";\n slong = longitude + \"\";\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String output = intent.getStringExtra(\"success\");\n //SpannableString redSpannable= new SpannableString(output);\n //redSpannable.setSpan(new ForegroundColorSpan(Color.RED), 0, output.length(), 0);\n Log.d(\"Output\", output);\n TextView ins = (TextView)findViewById(R.id.instructions);\n //String start_display = \"User Guide: \\n 1. Press Heart Rate Button \\n 2. Turn on Flash Light \\n\" + \"3. Keep Fingertip on camera\";\n ins.append(\"\\n Respiratory Rate: \"+ output);\n rr_val = Double.parseDouble(output);\n hideProgressDialogWithTitle();\n\n }", "@Override\n\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0, Toast.LENGTH_LONG).show();\n\t\t\t}" ]
[ "0.6702021", "0.66253674", "0.648231", "0.6293942", "0.6232578", "0.62217057", "0.62116826", "0.6160354", "0.61285824", "0.61230403", "0.61077124", "0.61022884", "0.60955703", "0.60641277", "0.6029416", "0.60138893", "0.599774", "0.5994885", "0.5974107", "0.5961749", "0.59410614", "0.5940499", "0.59288263", "0.59224683", "0.5900408", "0.5894823", "0.5889592", "0.58892316", "0.58766806", "0.58766806", "0.58714783", "0.5871108", "0.58585364", "0.58488107", "0.5844046", "0.58437216", "0.58403623", "0.5834742", "0.5834742", "0.5829689", "0.582147", "0.58179295", "0.58134544", "0.5813206", "0.5808379", "0.5808379", "0.5798734", "0.5783208", "0.5773583", "0.5770807", "0.5760361", "0.5755078", "0.5751282", "0.5739449", "0.5738141", "0.5738141", "0.5738141", "0.5738141", "0.5738141", "0.5738141", "0.5738141", "0.5738141", "0.57374215", "0.57374215", "0.5735064", "0.57106334", "0.5708595", "0.56949186", "0.5680346", "0.56791914", "0.56711996", "0.5662049", "0.5660827", "0.56581974", "0.5657886", "0.5647271", "0.56427306", "0.56422573", "0.56334966", "0.56266475", "0.5615678", "0.5614077", "0.5611649", "0.56058997", "0.5596066", "0.5592569", "0.5576155", "0.55760264", "0.5573949", "0.5573814", "0.5568878", "0.55674833", "0.55646497", "0.5564158", "0.5557451", "0.5555634", "0.55541253", "0.55541253", "0.5552647", "0.55389124" ]
0.6288513
4
SpinnerData data1 = adapter_hole.getItem(position);
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { SpinnerData data1 = (SpinnerData) hole_adapter.getItem(position); Log.d(DEBUG_TAG, "钻孔id:"+data1.getId()+";钻孔holenumber:"+data1.getName()); new FetchDeploymentDataTask().execute(http_str+server+peopleurl+data1.getId()); // 获取项目经理、机长、班长 //Toast.makeText(DrillSettingsActivity.this, "url is:" +server+detailurl+data1.getId(), Toast.LENGTH_LONG).show(); new FetchHoleDetail().execute(http_str+server+detailurl+data1.getId()); // 获取钻孔的详细情况 // TextView tv = (TextView)view; // tv.setTextColor(getResources().getColor(R.color.black)); //设置颜色 // tv.setTextSize(15.0f); //设置大小 editor = getPreference(); // 保存到sharedpreference editor.putString("holeid", data1.getId()); editor.putString("holenumber", data1.getName()); editor.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n quanHuyens = sqLite_quanHuyen.getDSQH(arrTinhTP.get(position).getId());\n adapterRecyclerViewChonQuan = new AdapterRecyclerViewChonQuan(quanHuyens, getApplicationContext());\n recycleQH.setAdapter(adapterRecyclerViewChonQuan);\n\n //spinnerQuanHuyen_adapter = new SpinnerQuanHuyen_Adapter(getApplicationContext(), arrQuanHuyen);\n //spinnerQuanHuyen_adapter.notifyDataSetChanged();\n //spinnerQuanHuyen.setAdapter(spinnerQuanHuyen_adapter);\n\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n\n\n try{\n String s = \"\";\n Log.e(\"mytag\",\"(String) parent.getItemAtPosition(position):\"+(String) parent.getItemAtPosition(position).toString().trim());\n if (parent.getItemAtPosition(position).toString().trim().equals(\"בחר\")){\n s = \"-1\";\n }else{\n s = String.valueOf(ctype_map.get(parent.getItemAtPosition(position).toString().trim()).getCtypeID());\n }\n setCcustomerSpinner(s);\n }catch(Exception e){\n helper.LogPrintExStackTrace(e);\n }\n Log.e(\"mytag\", (String) parent.getItemAtPosition(position));\n //statusID = db.getCallStatusByCallStatusName((String) parent.getItemAtPosition(position)).getCallStatusID();\n //statusName = db.getCallStatusByCallStatusName((String) parent.getItemAtPosition(position)).getCallStatusName();\n //Toast.makeText(getApplication(), \"status: \" + s, Toast.LENGTH_LONG).show();\n //Log.v(\"item\", (String) parent.getItemAtPosition(position));\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n baseService.getPukul(waktus.get(position).getId())\n .enqueue(new Callback<PukulResponse>() {\n @Override\n public void onResponse(Call<PukulResponse> call, Response<PukulResponse> response) {\n if (response.isSuccessful()){\n pukuls.clear();\n spnPukul.clear();\n pukuls = response.body().getPukuls();\n final ArrayAdapter<String> adapter2 = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_list_item_1, spnPukul);\n if (!pukuls.isEmpty()){\n spinnerTime.setAdapter(adapter2);\n for (int j = 0; j<pukuls.size(); j++){\n String pkl = pukuls.get(j).getStart() + \" - \" +pukuls.get(j).getEnd();\n spnPukul.add(pkl);\n adapter2.notifyDataSetChanged();\n\n spinnerTime.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n id_pukul = pukuls.get(position).getId();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n }\n }\n }\n }\n\n @Override\n public void onFailure(Call<PukulResponse> call, Throwable t) {\n Log.e(\"Error Message\", t.getMessage());\n }\n });\n }", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1, int position,long id) {\n\n\n\n\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n\n try {\n JSONObject dataClicked = units_array.getJSONObject(i);\n id_unit = dataClicked.getInt(\"id\");\n\n\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String item = parent.getItemAtPosition(position).toString();\n\n //System.out.println(position);\n }", "@Override\n public Object getItem(int position) {\n return data;\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n SpinnerValue = (String)spinner.getSelectedItem();\n }", "@Override\r\n public Object getItem(int position) {\n return data.get(position);\r\n }", "private void loadSpinnerData() {\n rows = db.getPumpDetails();\n\n // Creating adapter for spinner\n dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, rows);\n\n // Drop down layout style - list view with radio button\n dataAdapter\n .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // attaching data adapter to spinner\n spinner.setAdapter(dataAdapter);\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n\n try {\n JSONObject dataClicked = details_array.getJSONObject(i);\n id_detail = dataClicked.getInt(\"id\");\n\n// getMaterialClasses();\n\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n }", "private void spinner() {\n spn_semester.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n id_database = position;\n if(spn_semester.getSelectedItemPosition() == 0){\n listadaptor1();\n }\n else if(spn_semester.getSelectedItemPosition() == 1){\n listadaptor2();\n }\n else{\n listadaptor3();\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n //Nothing\n }\n });\n }", "private void loadSpinnerData() {\n\n // Spinner Drop down elements\n areas = dbHendler.getAllAreas();\n for (Area area : areas) {\n String singleitem = area.get_areaName();\n items.add(singleitem);\n }\n\n // Creating adapter for spinnerArea\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, items);\n\n // Drop down layout style - list view with radio button\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // attaching data adapter to spinnerArea\n spinner.setAdapter(dataAdapter);\n }", "@Override\n\t\t\t\t\t\tpublic void onItemSelected(AdapterView<?> parent,\n\t\t\t\t\t\t\t\tView view, int position, long id) {\n\t\t\t\t\t\t\tif(position!=0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tMyspinner sp = (Myspinner)districtlist.getSelectedItem();\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\tencryptedgeoid = new Webservicerequest().Encrypt(sp.getValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\t\t\t\te.getMessage();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcategory2.addAll(get.getMandi(encryptedgeoid));\t\n\t\t\t\t\t\t\t\tMyspinner[] redemo2 = new Myspinner[category2.size()];\n\t\t\t\t \t\t\t\tfor(int i=0; i<category2.size(); i++){\n\t\t\t\t \t\t\t\t\tredemo2[i] = new Myspinner(category2.get(i).get(\"2\"), category2.get(i).get(\"1\"), \"\");\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t\t\tArrayAdapter<Myspinner> adapter2 = new ArrayAdapter<Myspinner>(context, android.R.layout.simple_spinner_dropdown_item, redemo2);\n\t\t\t\t \t\t\t\tmandilist.setAdapter(adapter2);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tArrayList<HashMap<String,String>> category2=new ArrayList<HashMap<String,String>>();\n\t\t\t\t\t\t\t\tHashMap<String, String> map2=new HashMap<String, String>();\n\t\t\t\t \t\t\t\tmap2.put(\"1\",\"\");\n\t\t\t\t \t\t\t\tmap2.put(\"2\",\"Select Mandi\");\n\t\t\t\t \t\t\t\tcategory2.add(map2);\n\t\t\t\t\t\t\t\tMyspinner[] redemo2 = new Myspinner[category2.size()];\n\t\t\t\t \t\t\t\tfor(int i=0; i<category2.size(); i++){\n\t\t\t\t \t\t\t\t\tredemo2[i] = new Myspinner(category2.get(i).get(\"2\"), category2.get(i).get(\"1\"), \"\");\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t\t\tArrayAdapter<Myspinner> adapter2 = new ArrayAdapter<Myspinner>(context, android.R.layout.simple_spinner_dropdown_item, redemo2);\n\t\t\t\t \t\t\t\tmandilist.setAdapter(adapter2);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n\n\n }", "void loadSpinner(Spinner sp){\n List<String> spinnerArray = new ArrayList<>();\n spinnerArray.add(\"Oui\");\n spinnerArray.add(\"Non\");\n\n// (3) create an adapter from the list\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(\n this,\n android.R.layout.simple_spinner_item,\n spinnerArray\n );\n\n//adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n// (4) set the adapter on the spinner\n sp.setAdapter(adapter);\n\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n huruf = dataSandiItem.get(position).getHuruf();\n drajatX = dataSandiItem.get(position).getDerajat_lengan_x();\n drajatY = dataSandiItem.get(position).getDerajat_lengan_y();\n gambar = dataSandiItem.get(position).getGambar();\n }", "@Override\n public Object getItem(int position) {\n return data.get(position);\n }", "@Override\n public Object getItem(int position) {\n return data.get(position);\n }", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tindex1=arg2;\n\t\t\t\ttype0 = spn1.get(arg2).getType_id();\n\t\t\t\ttype_name = spn1.get(arg2).getType_name();\n\t\t\t\tHttpRequest(1, APIURL.CHECK.ADDARTICLE1, spn1.get(arg2)\n\t\t\t\t\t\t.getType_id(), \"\");\n\t\t\t\tspn3.clear();\n\t\t\t\tspinnerAdapter3.setList(spn3);\n\t\t\t\tspinnerAdapter3.notifyDataSetChanged();\n\t\t\t\tspn4.clear();\n\t\t\t\tspinnerAdapter4.setList(spn4);\n\t\t\t\tspinnerAdapter4.notifyDataSetChanged();\n\t\t\t\tspn5.clear();\n\t\t\t\tspinnerAdapter5.setList(spn5);\n\t\t\t\tspinnerAdapter5.notifyDataSetChanged();\n\t\t\t}", "@Override\n public void onResponse(JSONArray response) {\n\n for(int i=0;i<response.length();i++){\n try {\n JSONObject obj=response.getJSONObject(i);\n ItemModel model=new ItemModel();\n model.setId(obj.getString(\"id\"));\n //model.setImage(obj.getString(\"image\"));\n //model.setName(obj.getString(\"name\"));\n modelListspin.add(model);\n worldlist.add(obj.getString(\"category_name\"));\n } catch (JSONException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n SpinnerAdapter.notifyDataSetChanged();\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String item = parent.getItemAtPosition(position).toString();\n ArrayList<Integer> list = map.get(item);\n a = list.get(0);\n b = list.get(1);\n setupChart();\n // Showing selected spinner ite\n Toast.makeText(parent.getContext(), \"Selected: \" + item, Toast.LENGTH_LONG).show();\n }", "@Override\r\n public Object getItem(int position) {\n return arraylist.get(position);//get position\r\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view,\n int position, long id) {\n Matter matter = adapter.getItem(position);\n // Here you can do the action you want to...\n Toast.makeText(FilterActivity.this, \"ID: \" + matter.get_projeadi() + \"\\nName: \" + matter.get_projekodu(),\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position,\n long id) {\n\n }", "public void addItemsOnSpinner2() {\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n brand_id = String.valueOf(brand_list.get(i).getBrandId());\n brandName = brand_list.get(i).getBrand_name();\n\n Log.d(\"fsdklj\", brand_id + brandName);\n\n hitSpinnerSeries(brand_id);\n\n }", "@Override\n\t\t\t\t\t\tpublic void onItemSelected(AdapterView<?> parent,\n\t\t\t\t\t\t\t\tView view, int position, long id) {\n\t\t\t\t\t\t\tif(position!=0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tMyspinner sp = (Myspinner)mandilist.getSelectedItem();\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\tencryptedgeoid = new Webservicerequest().Encrypt(sp.getValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\t\t\t\te.getMessage();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcategory3.addAll(get.getretailersList(encryptedgeoid));\t\n\t\t\t\t\t\t\t\tMyspinner[] redemo3 = new Myspinner[category3.size()];\n\t\t\t\t \t\t\t\tfor(int i=0; i<category3.size(); i++){\n\t\t\t\t \t\t\t\t\tredemo3[i] = new Myspinner(category3.get(i).get(\"2\"), category3.get(i).get(\"1\"), \"\");\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t\t\tArrayAdapter<Myspinner> adapter3 = new ArrayAdapter<Myspinner>(context, android.R.layout.simple_spinner_dropdown_item, redemo3);\n\t\t\t\t \t\t\t\tretailerslist.setAdapter(adapter3);\n\t\t\t\t\t\t\t\tArrayAdapter<String> adaptervillages = new ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item, get.getVillageNames(encryptedgeoid));\n\t\t\t\t\t\t\t\tvillages.setAdapter(adaptervillages);\n\t\t\t\t\t\t\t\tvillages.setThreshold(3);\n\t\t\t\t\t\t\t\tvillages.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t\t\t\t\t\t\t @Override\n\t\t\t\t\t\t\t\t\t public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\t\t\t\t\t\t\t InputMethodManager in = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\t\t\t\t\t\t\t\t in.hideSoftInputFromWindow(villages.getWindowToken(), 0);\n\n\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tvillages.setAdapter(null);\n\t\t\t\t\t\t\t\tArrayList<HashMap<String, String>> category3=new ArrayList<HashMap<String,String>>();\n\t\t\t\t\t\t\t\tHashMap<String, String> map3=new HashMap<String, String>();\n\t\t\t\t \t\t\t\tmap3.put(\"1\",\"\");\n\t\t\t\t \t\t\t\tmap3.put(\"2\",\"Select Retailer\");\n\t\t\t\t \t\t\t\tcategory3.add(map3);\n\t\t\t\t \t\t\t\tMyspinner[] redemo3 = new Myspinner[category3.size()];\n\t\t\t\t \t\t\t\tfor(int i=0; i<category3.size(); i++){\n\t\t\t\t \t\t\t\t\tredemo3[i] = new Myspinner(category3.get(i).get(\"2\"), category3.get(i).get(\"1\"), \"\");\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t\t\tArrayAdapter<Myspinner> adapter3 = new ArrayAdapter<Myspinner>(context, android.R.layout.simple_spinner_dropdown_item, redemo3);\n\t\t\t\t \t\t\t\tretailerslist.setAdapter(adapter3); \t\t\t\t \t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id)\n {\n }", "private void updateSpinner() {\n ArrayAdapter<CharSequence> adaptador = new ArrayAdapter(getContext(), android.R.layout.simple_spinner_item,nombresEnComboBox);\n spinner.setAdapter(adaptador);\n //guardo el item seleccionado del combo\n spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n nombreDeLocSeleccionada[0] = (String) spinner.getAdapter().getItem(i);\n for (int j=0 ; j < listaLocalidades.size() ; j++){\n if (listaLocalidades.get(j).getNombreLocalidad().equals(nombreDeLocSeleccionada[0])) {\n idLoc = listaLocalidades.get(j).getIdLocalidad() ;\n break;\n }\n }\n //Toast.makeText(getActivity(), nombreDeLocSeleccionada[0], Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n\n }\n });\n }", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tif (arg2 != 0) {\n\t\t\t\t\tindex2=arg2;\n\t\t\t\t\ttype1 = spn2.get(arg2).getType_id();\n\t\t\t\t\ttype_name1 = spn2.get(arg2).getType_name();\n\t\t\t\t\tHttpRequest1(APIURL.CHECK.ADDARTICLE1, spn2.get(arg2)\n\t\t\t\t\t\t\t.getType_id());\n\t\t\t\t\tspn4.clear();\n\t\t\t\t\tspinnerAdapter4.setList(spn4);\n\t\t\t\t\tspinnerAdapter4.notifyDataSetChanged();\n\t\t\t\t\tspn5.clear();\n\t\t\t\t\tspinnerAdapter5.setList(spn5);\n\t\t\t\t\tspinnerAdapter5.notifyDataSetChanged();\n\t\t\t\t} else {\n\t\t\t\t\ttype1 = \"\";\n\t\t\t\t\ttype_name1 = \"\";\n\t\t\t\t}\n\t\t\t}", "public Object getItem(int position) { \n return mDataObjects.get(position); \n }", "@Override\r\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n switch (position) {\r\n case 0:\r\n mode = 1;\r\n //mode = spinner.getSelectedItem().toString();\r\n break;\r\n case 1:\r\n mode = 2;\r\n //mode = spinner.getSelectedItem().toString();\r\n break;\r\n case 2:\r\n mode = 3;\r\n //mode = spinner.getSelectedItem().toString();\r\n break;\r\n }\r\n }", "public void onItemSelected(AdapterView<?> parent, View view,\n int pos, long id) {\n\n if(parent.getId()==R.id.Branch_Spinner)\n mNotification.setBranch((String)parent.getItemAtPosition(pos));\n\n if(parent.getId()==R.id.Year_Spinner)\n mNotification.setYear((String)parent.getItemAtPosition(pos));\n\n if(parent.getId()==R.id.Section_Spinner)\n mNotification.setSection((String)parent.getItemAtPosition(pos));\n\n\n\n\n\n\n }", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n str_loc = Arraylist_location.get(arg2);\n str_loc_id = Arraylist_location_id.get(arg2);\n\n System.out.println(\"### ID : \" + str_loc + \" : \" + str_loc_id);\n\n\n\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "public void addListenerOnButton() {\n\n isempleado = (Spinner) findViewById(R.id.spinnerWifi);\n spinner2 = (Spinner) findViewById(R.id.spinner2);\n\n\n Toast.makeText(getApplicationContext(), \"Spinner 1 \"+String.valueOf(isempleado.getSelectedItem()) +\n \"Spinner 2 : \"+ String.valueOf(spinner2.getSelectedItem()), Toast.LENGTH_LONG).show();\n\n\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position,\n long id) {\n nama_dokter2 = parent.getItemAtPosition(position).toString();\n\n // Showing selected spinner item\n Toast.makeText(parent.getContext(), \"You selected: \" + nama_dokter2,\n Toast.LENGTH_LONG).show();\n\n }", "private void loadSpinnerData() {\n List<String> patientList = db.getAllPatient();\n\n // Creating adapter for spinner\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, patientList);\n\n // Drop down layout style - list view with radio button\n dataAdapter\n .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // attaching data adapter to spinner\n patientIdSpn.setAdapter(dataAdapter);\n }", "@Override\n public void onItemSelected(View view, int position) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n item = parent.getItemAtPosition(position).toString();\n\n // Showing selected spinner item\n //Toast.makeText(parent.getContext(), \"Selected: \" + item, Toast.LENGTH_LONG).show();\n /*Intent people_intent= new Intent();\n people_intent.putExtra(\"people\",item);\n setResult(RESULT_OK,people_intent);\n finish();*/\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View arg1, int position, long id) {\n if(parent.getId()==R.id.branch)\n branchRes=branches[position];\n else if (parent.getId()==R.id.interviewDifficulty)\n diffRes=difficulty[position];\n else if(parent.getId()==R.id.interviewMode)\n modeRes=interviewMode[position];\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {\n spinnerItemSelected = parent.getItemAtPosition(pos).toString();\n }", "@Override\n public void onItemSelected(AdapterView<?> adapter, View v,\n int position, long id) {\n mappos = position;\n findmapinfo(position , adapter.getItemAtPosition(position).toString());\n \n // Showing selected spinner item\n \n }", "@Override\n public void onClick(View v)\n {\n mySpinner.performClick();\n int getPosition = (Integer) v.getTag();\n\n toggleSelection(getPosition);\n\n\n notifyDataSetChanged();\n\n /**\n * if clicked position is one\n * that means you want clear all select item in list\n */\n /* if (getPosition == 1)\n {\n clearList();\n }\n */\n /**\n * if clicked position is two\n * that means you want select all item in list\n */\n /* else if (getPosition == 2)\n {\n fillList();\n }*/\n }", "@Override\n public Object getItem(int position) {\n return data.get(position);\n }", "public void addItemsOnSpinner() {\n Data dataset = new Data(getApplicationContext());\n List<String> list = new ArrayList<String>();\n list = dataset.getClasses();\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, list);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(dataAdapter);\n }", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tif (arg2 != 0) {\n\t\t\t\t\tindex22=arg2;\n\t\t\t\t\ttype2 = spn3.get(arg2).getType_id();\n\t\t\t\t\ttype_name2 = spn3.get(arg2).getType_name();\n\t\t\t\t\tHttpRequest(2, APIURL.CHECK.ADDARTICLE2, \"\", spn3.get(arg2)\n\t\t\t\t\t\t\t.getType_id());\n\n\t\t\t\t\tspn5.clear();\n\t\t\t\t\tspinnerAdapter5.setList(spn5);\n\t\t\t\t\tspinnerAdapter5.notifyDataSetChanged();\n\t\t\t\t} else {\n\t\t\t\t\ttype2 = \"\";\n\t\t\t\t\ttype_name2 = \"\";\n\t\t\t\t}\n\t\t\t}", "@Override\n public Object getItem(int position) {\n return dataList.get(position);\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String item = parent.getItemAtPosition(position).toString();\n\n // Showing selected spinner item\n Toast.makeText(parent.getContext(), \"Selected: \" + item, Toast.LENGTH_LONG).show();\n\n }", "private void spinner() {\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.planets_array, R.layout.simple_spinner_item_new);\n// Specify the layout to use when the list of choices appears\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n// Apply the adapter to the spinner\n// dropDownViewTheme.\n planetsSpinner.setAdapter(adapter);\n planetsSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n Object itemAtPosition = parent.getItemAtPosition(position);\n Log.d(TAG, \"onItemSelected: \" + itemAtPosition);\n\n String[] stringArray = getResources().getStringArray(R.array.planets_array);\n Toast.makeText(DialogListActivity.this, \"选择 \" + stringArray[position], Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n Toast.makeText(DialogListActivity.this, \"未选择\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public Item getItem(int position) {\n return data.get(position);\n }", "@Override\n protected void onPostExecute(String s) {\n ActivitySpinnerAdapter activitySpinnerAdapter = new ActivitySpinnerAdapter(getActivity().getApplicationContext(), aImage, aName);\n activitySpinner.setAdapter(activitySpinnerAdapter);;\n }", "@Override\n public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) {\n spnDistrict.setAdapter(C.getArrayAdapter(\"select ZIlLAID||'-'||ZILLANAMEENG DistName from Zilla where DIVID='\" + Global.Left(spnDiv.getSelectedItem().toString(), 2) + \"'\"));// Global.Left(spnDiv.getSelectedItem().toString(),2)\n spnDistrict.setSelection(DivzillaSelect(\"zilla\"));\n\n\n }", "@Override\n protected void onPostExecute(Void args) {\n Spinner mySpinner = (Spinner) findViewById(R.id.profile_spinner);\n\n // Spinner adapter\n mySpinner\n .setAdapter(new ArrayAdapter<String>(NewUserVehicleDetails.this,\n android.R.layout.simple_spinner_dropdown_item,\n modelvarlist));\n\n // Spinner on item click listener\n mySpinner\n .setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n\n @Override\n public void onItemSelected(AdapterView<?> arg0,\n View arg1, int position, long arg3) {\n\n\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> arg0) {\n // TODO Auto-generated method stub\n }\n });\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n slctdrest = restaurants[position].toString();\n slctpos = position;\n\n sr_alltables.post(new Runnable() {\n @Override\n public void run() {\n sr_alltables.setRefreshing(true);\n gettablesdetails(slctpos);\n }\n });\n }", "@Override\n protected void onPostExecute(String result) {\n super.onPostExecute(result);\n\n ArrayAdapter<String> adapter_state1 = new ArrayAdapter<String>(MainActivity.this, R.layout.simple_list_item_2, arrayListtype){\n\n @Override\n public boolean isEnabled(int position){\n if(position == 0)\n {\n // Disable the first item from Spinner\n // First item will be use for hint\n return false;\n }\n else\n {\n return true;\n }\n }\n @Override\n public View getDropDownView(int position, View convertView,\n ViewGroup parent) {\n View view = super.getDropDownView(position, convertView, parent);\n TextView tv = (TextView) view;\n if(position == 0){\n // Set the hint text color gray\n tv.setTextColor(getResources().getColor(R.color.grey));\n }\n else {\n tv.setTextColor(getResources().getColor(R.color.textcolour));\n }\n return view;\n }\n };\n\n adapter_state1\n .setDropDownViewResource(R.layout.simple_list_item_1);\n\n sp1.setAdapter(adapter_state1);\n pdia.dismiss();\n\n }", "@Override\n protected void onPostExecute(String result) {\n super.onPostExecute(result);\n ArrayAdapter<String> adapter_state2 = new ArrayAdapter<String>(MainActivity.this, R.layout.simple_list_item_3, arrayListsize){\n\n @Override\n public boolean isEnabled(int position){\n if(position == 0)\n {\n // Disable the first item from Spinner\n // First item will be use for hint\n return false;\n }\n else\n {\n return true;\n }\n }\n @Override\n public View getDropDownView(int position, View convertView,\n ViewGroup parent) {\n View view = super.getDropDownView(position, convertView, parent);\n TextView tv = (TextView) view;\n if(position == 0){\n // Set the hint text color gray\n tv.setTextColor(getResources().getColor(R.color.grey));\n }\n else {\n tv.setTextColor(getResources().getColor(R.color.textcolour));\n }\n return view;\n }\n };\n\n adapter_state2\n .setDropDownViewResource(R.layout.simple_list_item_1);\n\n sp2.setAdapter(adapter_state2);\n pdia.dismiss();\n\n\n }", "public void onItemSelected(AdapterView<?> parent, View view,\n int pos, long id) {\n\n }", "public void onItemSelected(AdapterView<?> parent, View view,\n int pos, long id) {\n final SharedPreferences.Editor fooddetail = clothdata.edit();\n int position1=spinner1.getSelectedItemPosition();\n int position2=spinner2.getSelectedItemPosition();\n int position3=spinner3.getSelectedItemPosition();\n\n switch(position1){\n case 1:\n fooddetail.putString(\"type\", \"Male\");\n break;\n case 2:fooddetail.putString(\"type\",\"Female\");\n break;\n case 3:fooddetail.putString(\"type\",\"Both\");\n break;\n }\n fooddetail.commit();\n switch(position2){\n case 1:\n fooddetail.putString(\"number\", \"less then 10\");\n break;\n case 2:fooddetail.putString(\"number\",\"10 to 20\");\n break;\n case 3:fooddetail.putString(\"number\",\"20 to 30\");\n break;\n case 4:fooddetail.putString(\"number\",\"more then 30\");\n break;\n }\n fooddetail.commit();\n switch(position3) {\n case 1:\n fooddetail.putString(\"area\", \"jayanagar\");\n break;\n case 2:\n fooddetail.putString(\"area\", \"WhiteField\");\n break;\n case 3:\n fooddetail.putString(\"area\", \"Malleshwaram\");\n break;\n case 4: fooddetail.putString(\"area\", \"Koramangala\");\n break;\n\n }\n fooddetail.commit();\n }", "public void onNothingSelected(AdapterView<?> parent) {\n // Toast.makeText(getApplicationContext(), \"nada en el spinner\", Toast.LENGTH_LONG).show();\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n item = parent.getItemAtPosition(position).toString();\n //beaconselected.setText(item);\n\n // Showing selected spinner item\n if(!item.equals(\"select a beacon\")){\n //Toast.makeText(parent.getContext(), \"Selected: \" + item, Toast.LENGTH_LONG).show();\n x++;\n beaconManager.stopRanging(beaconRegion);\n t=0;\n //Toast.makeText(this, \"Search stopped\", Toast.LENGTH_SHORT).show();\n }\n\n\n\n }", "@Override\n public Object getItem(int position) {\n return ais.get(position);\n }", "@Override\n public void onResponse(JSONObject jsonobj) {\n dialog.dismiss();\n try {\n JSONArray jArray=jsonobj.getJSONArray(\"rows\");\n JSONObject jData;\n list=new ArrayList<String>();\n listId=new ArrayList<String>();\n for (int i=0;i<jArray.length();i++){\n jData=jArray.getJSONObject(i);\n int Seq=jData.getInt(\"Seq\");\n if(Seq>0){\n list.add(jData.getString(\"LineName\"));\n listId.add(jData.getString(\"LineCode\"));\n }\n\n }\n\n if(listId.size()>0){\n initData(myDate,listId.get(index));\n initData02(listId.get(index));\n }\n\n niceSpinner.attachDataSource(list);\n\n //niceSpinner.attachDataSource(list);\n\n //loadPatrolTask(listId.get(0));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }", "public void addItemsOnSpinner2() {\n\n spinner2 = (Spinner) findViewById(R.id.spinner2);\n List<String> list = new ArrayList<String>();\n list.add(\"list 1\");\n list.add(\"list 2\");\n list.add(\"list 3\");\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, list);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner2.setAdapter(dataAdapter);\n }", "@Override\n public void onItemSelected(AdapterView<?> parent2, View view2, int position2, long id2) {\n }", "public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n userType = (int) arg3;\n /* 将mySpinner 显示*/\n arg0.setVisibility(View.VISIBLE);\n }", "public void addItemsOnSpinner() {\r\n\r\n\tspinner = (Spinner) findViewById(R.id.spinner);\r\n\tList<String> list = new ArrayList<String>();\r\n\tlist.add(\"Food\");\r\n\tlist.add(\"RentHouse\");\r\n\tlist.add(\"Closing\");\r\n\tlist.add(\"Party\");\r\n\tlist.add(\"Material\");\r\n\tArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item, list);\r\n\tdataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n\tspinner.setAdapter(dataAdapter);\r\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n id = i;\n }", "public void onItemSelected(AdapterView<?> parent, View v, int pos, long row) {\r\n \t\r\n \tString str;\r\n if( parent==spinner ){\r\n \tstr = String.format(\"Parent = (spinner), Objectset (%d), pos (%d), row *%d)\", objectSet, pos, row);\r\n \tLog.v(\"Debug\", str);\r\n \tglobalPos = pos;\r\n if( objectSet==0 ){\r\n textRA.setText(myMessiers.GetRA(pos));\r\n textDEC.setText(myMessiers.GetDEC(pos));\r\n objectName.setText(myMessiers.GetName(pos)); \r\n }\r\n \r\n if( objectSet==1 ){\r\n Calendar now = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\r\n myPlanets.UpdateRADEC((Calendar)now.clone(), pos);\r\n\r\n textRA.setText(myPlanets.GetRA(pos));\r\n textDEC.setText(myPlanets.GetDEC(pos));\r\n objectName.setText(myPlanets.GetName(pos));\r\n }\r\n \r\n if( objectSet==2 ){\r\n textRA.setText(myStars.GetRA(pos));\r\n textDEC.setText(myStars.GetDEC(pos));\r\n objectName.setText(myStars.GetName(pos)); \r\n }\r\n \r\n if( objectSet==3 ){\r\n \tif( myObjects == null )\r\n \t{\r\n\t textRA.setText(\"0h0\");\r\n\t textDEC.setText(\"0\");\r\n\t objectName.setText(\"None\"); \t\t\r\n \t}\r\n \telse\r\n \t{\r\n\t textRA.setText(myObjects.GetRA(pos));\r\n\t textDEC.setText(myObjects.GetDEC(pos));\r\n\t objectName.setText(myObjects.GetName(pos)); \r\n \t}\r\n }\r\n \r\n if( objectSet==4 ){\r\n textRA.setText(myClosestObjs.GetRA(pos));\r\n textDEC.setText(myClosestObjs.GetDEC(pos));\r\n objectName.setText(myClosestObjs.GetName(pos)); \r\n }\r\n }\r\n \r\n if( parent==spinner_group ){\r\n \tstr = String.format(\"Parent = (spinner_group), Objectset (%d), pos (%d), row *%d)\", objectSet, pos, row);\r\n \tLog.v(\"Debug\", str);\r\n\r\n if( pos == 0 ){\r\n\t adapterMessier.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n\t spinner.setAdapter(adapterMessier);\r\n\t objectSet = 0;\r\n } \r\n \r\n if( pos == 1 ){\r\n adapterPlanets.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n spinner.setAdapter(adapterPlanets);\r\n objectSet = 1;\r\n }\r\n \r\n if( pos == 2 ){\r\n\t adapterStars.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n\t spinner.setAdapter(adapterStars);\r\n\t objectSet = 2;\r\n } \r\n\r\n if( pos == 3 ){\r\n \tadapterUserObjects.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n\t spinner.setAdapter(adapterUserObjects);\r\n\t objectSet = 3;\r\n }\r\n \r\n if( pos == 4 ){\r\n \tadapterClosestObjects.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n\t spinner.setAdapter(adapterClosestObjects);\r\n\t objectSet = 4;\r\n } \r\n }\r\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n if(parent.getItemIdAtPosition(position) == 0){\n if(spinner.getSelectedItem().equals(\"Google Reviews\")){\n getGoogleRev(container);\n } else {\n getYelpRev(container);\n }\n } else if(parent.getItemIdAtPosition(position) == 1){\n\n if(spinner.getSelectedItem().equals(\"Google Reviews\")){\n getGoogleRevHRate(container);\n } else {\n getYelpRevHRate(container);\n }\n\n } else if(parent.getItemIdAtPosition(position) == 2){\n\n if(spinner.getSelectedItem().equals(\"Google Reviews\")){\n getGoogleRevLRate(container);\n } else {\n getYelpRevLRate(container);\n }\n\n } else if(parent.getItemIdAtPosition(position) == 3){\n\n if(spinner.getSelectedItem().equals(\"Google Reviews\")){\n getGoogleRevMRec(container);\n } else {\n getYelpRevMRec(container);\n }\n\n } else if(parent.getItemIdAtPosition(position) == 4){\n if(spinner.getSelectedItem().equals(\"Google Reviews\")){\n getGoogleRevLRec(container);\n } else {\n getYelpRevLRec(container);\n }\n }\n }", "@Override\n public Object getItem(int position) {\n if(datas != null && position < datas.size() && position >= 0){\n return datas.get(position);\n }\n return null;\n }", "@Override\n protected void onPostExecute(Void args) {\n Spinner mySpinner = (Spinner) findViewById(R.id.manu_spinner);\n\n // Spinner adapter\n mySpinner\n .setAdapter(new ArrayAdapter<String>(NewUserVehicleDetails.this,\n android.R.layout.simple_spinner_dropdown_item,\n manufatureslist));\n\n // Spinner on item click listener\n mySpinner\n .setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n\n @Override\n public void onItemSelected(AdapterView<?> arg0,\n View arg1, int position, long arg3) {\n // new DownloadModelVarJSON().execute();\n Spinner manufacturSpin=(Spinner) findViewById(R.id.manu_spinner);\n String name = manufacturSpin.getSelectedItem().toString();\n\n GetModelVarDropdon(name);\n\n\n\n\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> arg0) {\n // TODO Auto-generated method stub\n }\n });\n }", "private void setSpinner() {\n class spinna extends AsyncTask<Void, Void, ArrayList<String>> {\n\n @Override\n protected void onPreExecute() {\n super.onPreExecute();\n }\n\n @Override\n protected ArrayList<String> doInBackground(Void... voids) {\n ArrayList<String> items = new ArrayList<>();\n for (Season season : series.getSeasons()) {\n int i = season.getSeasonNumber();\n items.add(String.valueOf(i));\n }\n\n return items;\n\n }\n\n @Override\n protected void onPostExecute(ArrayList<String> items) {\n super.onPostExecute(items);\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(SeriesActivity.this, android.R.layout.simple_spinner_dropdown_item, items);\n adapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n dropdown.setAdapter(adapter);\n adapter.notifyDataSetChanged();\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n }\n }\n spinna kkkk = new spinna();\n kkkk.execute();\n\n\n }", "private void cargarSpinner() {\n\n admin = new AdminSQLiteOpenHelper(this, \"activo_fijo\", null, 1);\n BaseDeDatos = admin.getReadableDatabase();\n\n List<String> opciones = new ArrayList<String>();\n opciones.add(\"Selecciona una opción\");\n\n String selectQuery = \"SELECT * FROM sucursales\" ;\n Cursor cursor = BaseDeDatos.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n // adding to tags list\n opciones.add(cursor.getString(cursor.getColumnIndex(\"local\")));\n } while (cursor.moveToNext());\n }\n\n BaseDeDatos.close();\n\n //spiner personalizado\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, opciones);\n spinner.setAdapter(adapter);\n\n }", "public void onItemSelected(AdapterView<?> parent, View view, int position,\n long id) {\n nama_pasien2 = parent.getItemAtPosition(position).toString();\n\n // Showing selected spinner item\n Toast.makeText(parent.getContext(), \"You selected: \" + nama_pasien2,\n Toast.LENGTH_LONG).show();\n\n }", "public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n\n if (position == 0){\n loaddata();\n }\n else if (position == 1){\n sortbyevent();\n }\n else if (position == 2){\n sortbyorganization();\n }\n else {\n String text = parent.getItemAtPosition(position).toString();\n Toast.makeText(parent.getContext(), text, Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n if(position==0)\n p=1;\n if(position==1)\n p=2;\n if(position==2)\n p=3;\n\n }", "@Override\r\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\r\n\t\t\t\tGender_ID = adapter.getPosition(parent.getItemAtPosition(position).toString());\r\n\t\t\t\tSystem.out.println(\"Gender_ID index--->\" + Age_ID);\r\n\r\n\t\t\t}", "@Override\n public Object getItem(int position){\n return paradesList.get(position);\n }", "private void UpdateDataForSpinner(Spinner spinner){\n // Create an ArrayAdapter using the string array and a default spinner layout\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.serviceQuantity, android.R.layout.simple_spinner_item);\n // Specify the layout to use when the list of choices appears\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n // Apply the adapter to the spinner\n spinner.setAdapter(adapter);\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n switch (parent.getId())\n {\n case R.id.spiEspecie:\n /**Vericamos si la posicion seleccionada es mayor que cero, ya que el numero 0 es un valor por default\n y no tiene ningun valor en la base de datos*/\n if(position>0)\n {\n\n //Desbloqueamos la base el sepinner de razas\n enableSpinnerAndButton(spiRaza,agregarRaza);\n /**Establecemos un observador para obtener las razas por especie seleccianada, en esta caso este se encarga de actualizar\n * cada vez que agreguemos una nueva raza\n * */\n instanciaDB.getRazaDAO().getAllBreedsFromSpecie(parent.getSelectedItem().toString()).observe(CreacionPerfiles.this,\n new Observer<List<RazaDAO.NombreRaza>>() {\n @Override\n public void onChanged(List<RazaDAO.NombreRaza> nombreRazas) {\n arrayNombreRazas.clear();\n /**Este metodo esta asociado a un Observer que decta cuando se han cambiado los datos para actualizar\n * de forma asincrona, por tal razan validdamos cuando es guardar y cuando es actualizar en caso de ser\n * \"guardar\" entonces solo actualiza el spinner raza cuando se selecciona una especie */\n if (accion == Constantes.GUARDAR) {\n for (RazaDAO.NombreRaza raza : nombreRazas) {\n arrayNombreRazas.add(raza.getNombreRaza());\n }\n }\n else if (accion == Constantes.ACTUALIZAR) {\n for(int i=0;i<nombreRazas.size();i++)\n {\n if(nombreRazas.get(i).getNombreRaza().equals(raza))\n {\n /**Se obtiene la posición y se le suma 1 porque el 0 es el valor por defecto*/\n postionItemRaza =i+1;\n }\n arrayNombreRazas.add(i,nombreRazas.get(i).getNombreRaza());\n }\n }\n\n /** Independientemente si es actualizacion o se esta guardando la opcion por default siempre va e\n * existir por eso se coloca al final de las evaluaciones*/\n arrayNombreRazas.add(0,\"Seleccione Raza\");\n spiRaza.setSelection(postionItemRaza);\n /** Se resetea esta posición con el objetivo que la proxima vez que seleccione una nueva especie y\n * no tenga razas relacionadas en la base de datos, el valor por defecto se seleccione*/\n postionItemRaza=0;\n }\n });\n /**\n * Cada vez que se selecciona una especie se recarga las razas pertenecientes a esa especie, por tanto el primer item seleccionado sea el cero\n * ya que es el valor por defecto \"Seleccione raza\", que le indica al usuario que hacer\n * */\n\n }\n else\n {\n /**Se selecciona el valor po defecto*/\n spiRaza.setSelection(postionItemRaza);\n disableSpinnerAndButton(spiRaza,agregarRaza);\n\n }\n\n\n\n break;\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1, int position, long id) {\n switch (position)\n {\n case 1:\n break;\n case 2:\n Toast.makeText(this,appointmentTypes[position],Toast.LENGTH_LONG).show();\n /*Intent intent = new Intent(getApplicationContext(), AppointmentRequests.class);\n Bundle b = new Bundle();\n b.putString(\"userid\",userid);\n intent.putExtras(b);\n startActivity(intent);*/\n break;\n case 3:\n break;\n }\n }", "@Override\r\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {\n\t\t\t\thasilSpinJurusan = parent.getItemAtPosition(pos).toString();\r\n\t\t\t\tString[] parts = hasilSpinJurusan.split(\"--\");\r\n\t\t\t\tString kode = parts[0];\r\n\t\t\t\tkodeJurusan=kode;\r\n\t\t\t}", "@Override\r\n public Object getItem(int position) {\n return splits[position];\r\n }", "private void addNewSpinnerItem1() {\n\t\tmscust=ecust.getText().toString();\n\t\tCharSequence textHolder = \"\" +mscust; \n\t\tadapter1.insert(textHolder, 0);\n\t\tswork.setAdapter(adapter1);\n\t\t\n\t}", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n\n setSpinnerData(holder.spinner1, this.mMerk);\n setSpinnerData(holder.spinner2, this.mTipe);\n setSpinnerData(holder.spinner3, this.mUkuran);\n setSpinnerData(holder.spinner4, this.mBahan);\n }", "@Override\n public void onItemSelected(AdapterView<?> parent4, View view4, int position4, long id4) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent3, View view3, int position3, long id3) {\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n\n switch (adapterView.getId()){\n case R.id.vegtype:\n item = adapterView.getItemAtPosition(i).toString();\n if (!item.equals(\"Item\")) {\n item1 =item;\n }\n // Showing selected spinner item\n break;\n case R.id.vegsize:\n size = adapterView.getItemAtPosition(i).toString();\n if (!size.equals(\"Size\")) {\n size1 =size;\n }\n // Showing selected spinner item\n break;\n\n case R.id.nonvegtype:\n item = adapterView.getItemAtPosition(i).toString();\n if (!item.equals(\"Item\")) {\n item2 =item;\n }\n // Showing selected spinner item\n break;\n case R.id.nonvegsize:\n size = adapterView.getItemAtPosition(i).toString();\n if (!size.equals(\"Size\")) {\n size2 =size;\n\n }\n // Showing selected spinner item\n break;\n }\n\n if(!item1.equals(\"a\") && !size1.equals(\"a\")){\n items.add(item1);\n pizzaSize.put(item1,size1);\n }\n\n if(!item2.equals(\"a\") && !size2.equals(\"a\")){\n items.add(item2);\n pizzaSize.put(item2,size2);\n }\n\n\n\n }", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n\n String status = spinner.getItemAtPosition(arg2).toString();\n if (status.equals(\"ACTIVE\")) {\n status = \"TRUE\";\n }\n String surname = surnameText.getText().toString();\n if (surname.isEmpty()) {\n surname = null;\n }\n\n members = MemberDAL.getInstance(getBaseContext()).filterHospital(surname, status.equals(\"TRUE\"));\n\n MemberAdapter recyclerAdapter = new MemberAdapter(members);\n mRecyclerView.setAdapter(recyclerAdapter);\n mRecyclerView.setLayoutManager(new LinearLayoutManager(getBaseContext()));\n }", "@Override\n public void onItemSelected(AdapterView<?> adapter, View view,\n int position, long id) {\n\n kitchenCity=cityList.get(position);\n cityid=cityId.get(position);\n }" ]
[ "0.7351485", "0.69525826", "0.6906445", "0.68614024", "0.6854327", "0.6814968", "0.67760676", "0.6743799", "0.67221415", "0.67211527", "0.6720682", "0.6705873", "0.6705146", "0.6696992", "0.6687794", "0.6672337", "0.6672337", "0.6650634", "0.663391", "0.66313857", "0.66312915", "0.66312915", "0.6629635", "0.6625311", "0.66251194", "0.66210043", "0.66158986", "0.66055536", "0.6595127", "0.65912014", "0.65890515", "0.65890515", "0.65890515", "0.65826344", "0.6575534", "0.65646505", "0.6561273", "0.65537107", "0.6543966", "0.6538727", "0.6530325", "0.6527444", "0.6525794", "0.6525794", "0.6525557", "0.6524983", "0.65200156", "0.65195864", "0.6514263", "0.65131307", "0.65086067", "0.6506365", "0.6504609", "0.6501813", "0.6490414", "0.64896315", "0.64864415", "0.647319", "0.64545023", "0.6453561", "0.6452998", "0.64528704", "0.6449738", "0.64419943", "0.64318764", "0.6415804", "0.6410362", "0.6409906", "0.64065623", "0.63927", "0.6389274", "0.6387255", "0.6382262", "0.6376101", "0.63668364", "0.6363982", "0.6357028", "0.6343313", "0.6340966", "0.63348436", "0.6330482", "0.63221925", "0.6315745", "0.6315724", "0.6315227", "0.63098884", "0.6306914", "0.63048106", "0.63020176", "0.63010484", "0.62992066", "0.6296076", "0.62944317", "0.629034", "0.6288941", "0.6283461", "0.62770516", "0.62764275", "0.6271781", "0.6267038" ]
0.73709434
0
String url =scenicImgUrl + a+"/"+b+"/"+c+"/"+d;
@RequestMapping("/files/{a}/{b}/{c}/{d}/{e}") public String playmusic(@PathVariable String a,@PathVariable String b,@PathVariable String c,@PathVariable String d,@PathVariable String e,HttpServletRequest request, HttpServletResponse response, ModelMap param) { String strBackUrl = "http://" + request.getServerName() //服务器地址 + ":" + request.getServerPort() //端口号 + request.getContextPath() //项目名称 + request.getServletPath() ; //请求页面或其他地址 ); param.put("fileUrl","http://192.168.1.87:18080/YlServer/files/Scenic/00000001/Attract/00000001/1.mp3"); return "playmusic"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public String imageUrl ();", "public String getURL() {\n\t\treturn RequestConstants.BASE_IMAGE_URL+_url;\n\t}", "private static String composeApiUrl(String string){\r\n\t\treturn API_BASE + API_VERSION + string;\r\n\t}", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "private String generateUrl(List<String> codes) {\n StringBuilder builder = new StringBuilder();\n for (String code : codes) {\n builder.append(\",\");\n builder.append(recognizeType(code));\n builder.append(code);\n }\n builder = builder.delete(0, 1);\n return prefix + builder.toString();\n }", "public String setTestURL(int position) {\n if (position == 0) {\n return \"http://plazacam.studentaffairs.duke.edu/mjpg/video.mjpg\";\n } else if (position == 1) {\n return \"http://webcam.st-malo.com/axis-cgi/mjpg/video.cgi?resolution=640x480\";\n } else if (position == 2) {\n return \"http://webcams.hotelcozumel.com.mx:6003/axis-cgi/mjpg/video.cgi?resolution=320x240&dummy=1458771208837\";\n } else if (position == 3) {\n return \"http://iris.not.iac.es/axis-cgi/mjpg/video.cgi?resolution=320x240\";\n } else if (position == 4) {\n return \"http://bma-itic1.iticfoundation.org/mjpeg2.php?camid=61.91.182.114:1111\";\n } else if (position == 5) {\n return \"http://bma-itic1.iticfoundation.org/mjpeg2.php?camid=61.91.182.114:1112\";\n } else {\n return \"http://plazacam.studentaffairs.duke.edu/mjpg/video.mjpg\";\n }\n }", "String getUrl(String key);", "public String reSizeImage(String url){\n if (url.equals(\"\"))\n return url;\n String[] separated = url.split(\"=\");\n return separated[0] + \"=s500\";\n }", "public String formatImageURL(String imageUrl){\n final String BASE_URL = \"http://image.tmdb.org/t/p/\";\n final String IMG_SIZE = \"w500\";\n return BASE_URL+IMG_SIZE+imageUrl;\n }", "private static String buildGetPhotoUrl(String pictureId){\n Uri.Builder uriBuilder = END_POINT.buildUpon()\n .appendQueryParameter(\"method\", GETPHOTO_METHOD)\n .appendQueryParameter(\"api_key \", API_KEY)\n .appendQueryParameter(\"photo_id\", pictureId);\n return uriBuilder.build().toString();\n }", "String url();", "public static void main(String[] args) {\n\t\tString str = \"http://192.168.1.188/stw/images/20160814/33db29ec33d5.jpg\";\n\t\tSystem.out.println(str.substring(str.lastIndexOf(\"images\")+7,str.length()));\n\t\t\n\t}", "private String buildURL(String[] components) {\n\t\tfinal String BASE_URL = \"http://www.campusdish.com/en-US/CSMA/WilliamMary/Menus/\";\n\t\tfinal String ORG_ID = \"&OrgID=231624\";\n\t\tfinal String STATIC_PARAMS = \"&ShowPrice=False&ShowNutrition=True\";\n\t\t\n\t\tHashMap<String, String> location_map = new HashMap<String, String>();\n\t\tHashMap<String, Integer> time_map = new HashMap<String, Integer>();\n\t\t\n\t\tlocation_map.put(\"Sadler\", \"SadlerCenterRFoC.htm?LocationName=Sadler%20Center%20RFoC\");\n\t\tlocation_map.put(\"Commons\", \"CommonsFreshFoodCompany.htm?LocationName=Commons%20Fresh%20Food%20Company\");\n\t\tlocation_map.put(\"Marketplace\", \"Marketplace.htm?LocationName=Marketplace\");\n\t\ttime_map.put(\"Breakfast\", 1);\n\t\ttime_map.put(\"Lunch\", 16);\n\t\ttime_map.put(\"Dinner\", 17);\n\t\t\t\n\t\treturn BASE_URL + location_map.get(components[0]) + ORG_ID + \"&Date=\" + components[1] + \"&MealID=\" + time_map.get(components[2]) + STATIC_PARAMS;\n\t}", "public String getPictureUrl()\n\t{\n\t\treturn \"http://cdn-0.nflximg.com/us/headshots/\" + id + \".jpg\";\n\t}", "void mo36480a(int i, int i2, ImageView imageView, Uri uri);", "public java.lang.String decideUrl(java.lang.String r31, int r32, com.taobao.tao.image.ImageStrategyConfig r33) {\n /*\n r30 = this;\n r13 = r30\n r14 = r31\n r15 = r32\n boolean r0 = r33.isSkipped()\n if (r0 == 0) goto L_0x000d\n return r14\n L_0x000d:\n r16 = 0\n r12 = 0\n if (r14 != 0) goto L_0x001c\n java.lang.String r0 = \"STRATEGY.ALL\"\n java.lang.String r1 = \"origin url is null\"\n java.lang.Object[] r2 = new java.lang.Object[r12]\n com.taobao.tao.image.Logger.w(r0, r1, r2)\n return r16\n L_0x001c:\n java.lang.String r0 = r30.changeUrl(r31)\n com.taobao.tao.util.TaobaoImageUrlStrategy$UriCDNInfo r1 = new com.taobao.tao.util.TaobaoImageUrlStrategy$UriCDNInfo\n r1.<init>(r0)\n com.taobao.tao.util.OssImageUrlStrategy r2 = com.taobao.tao.util.OssImageUrlStrategy.getInstance()\n java.lang.String r3 = r1.host\n boolean r2 = r2.isOssDomain(r3)\n if (r2 == 0) goto L_0x003c\n com.taobao.tao.util.OssImageUrlStrategy r1 = com.taobao.tao.util.OssImageUrlStrategy.getInstance()\n r11 = r33\n java.lang.String r0 = r1.decideUrl(r0, r15, r11)\n return r0\n L_0x003c:\n r11 = r33\n boolean r2 = r13.isCdnImage((com.taobao.tao.util.TaobaoImageUrlStrategy.UriCDNInfo) r1)\n r10 = 1\n if (r2 != 0) goto L_0x0051\n java.lang.String r0 = \"STRATEGY.ALL\"\n java.lang.String r1 = \"origin not cdn url:%s\"\n java.lang.Object[] r2 = new java.lang.Object[r10]\n r2[r12] = r14\n com.taobao.tao.image.Logger.w(r0, r1, r2)\n return r14\n L_0x0051:\n java.lang.String r2 = r1.host\n java.lang.Boolean r3 = r33.isEnabledMergeDomain()\n if (r3 != 0) goto L_0x005d\n boolean r3 = r13.mDomainSwitch\n if (r3 != 0) goto L_0x006d\n L_0x005d:\n java.lang.Boolean r3 = r33.isEnabledMergeDomain()\n if (r3 == 0) goto L_0x0078\n java.lang.Boolean r3 = r33.isEnabledMergeDomain()\n boolean r3 = r3.booleanValue()\n if (r3 == 0) goto L_0x0078\n L_0x006d:\n java.lang.String[] r0 = r13.convergenceUrl(r1, r12)\n r1 = r0[r12]\n r2 = r0[r10]\n r17 = r1\n goto L_0x007a\n L_0x0078:\n r17 = r0\n L_0x007a:\n r8 = r2\n com.taobao.tao.util.ImageStrategyExtra$ImageUrlInfo r9 = com.taobao.tao.util.ImageStrategyExtra.getBaseUrlInfo(r17)\n java.lang.String r0 = r9.base\n java.lang.String r1 = \"_sum.jpg\"\n boolean r0 = r0.endsWith(r1)\n if (r0 == 0) goto L_0x009a\n java.lang.String r0 = r9.base\n java.lang.String r1 = r9.base\n int r1 = r1.length()\n int r1 = r1 + -8\n java.lang.String r0 = r0.substring(r12, r1)\n r9.base = r0\n goto L_0x00be\n L_0x009a:\n java.lang.String r0 = r9.base\n java.lang.String r1 = \"_m.jpg\"\n boolean r0 = r0.endsWith(r1)\n if (r0 != 0) goto L_0x00ae\n java.lang.String r0 = r9.base\n java.lang.String r1 = \"_b.jpg\"\n boolean r0 = r0.endsWith(r1)\n if (r0 == 0) goto L_0x00be\n L_0x00ae:\n java.lang.String r0 = r9.base\n java.lang.String r1 = r9.base\n int r1 = r1.length()\n int r1 = r1 + -6\n java.lang.String r0 = r0.substring(r12, r1)\n r9.base = r0\n L_0x00be:\n java.lang.String r0 = r9.base\n com.taobao.tao.util.ImageStrategyExtra.parseImageUrl(r0, r9)\n boolean r0 = r9.existCo\n if (r0 != 0) goto L_0x03e1\n boolean r0 = r9.existCi\n if (r0 == 0) goto L_0x00cd\n goto L_0x03e1\n L_0x00cd:\n java.lang.StringBuffer r6 = new java.lang.StringBuffer\n java.lang.String r0 = r9.base\n int r0 = r0.length()\n int r0 = r0 + 27\n r6.<init>(r0)\n java.lang.String r0 = r9.base\n r6.append(r0)\n java.lang.String r7 = r33.getName()\n boolean r0 = r13.mGlobalSwitch\n if (r0 == 0) goto L_0x00fc\n java.util.HashMap<java.lang.String, com.taobao.tao.util.TaobaoImageUrlStrategy$ServiceImageSwitch> r0 = r13.mServiceImageSwitchList\n if (r0 == 0) goto L_0x00fc\n boolean r0 = android.text.TextUtils.isEmpty(r7)\n if (r0 != 0) goto L_0x00fc\n java.util.HashMap<java.lang.String, com.taobao.tao.util.TaobaoImageUrlStrategy$ServiceImageSwitch> r0 = r13.mServiceImageSwitchList\n java.lang.Object r0 = r0.get(r7)\n com.taobao.tao.util.TaobaoImageUrlStrategy$ServiceImageSwitch r0 = (com.taobao.tao.util.TaobaoImageUrlStrategy.ServiceImageSwitch) r0\n r18 = r0\n goto L_0x00fe\n L_0x00fc:\n r18 = r16\n L_0x00fe:\n r0 = 4604480259023595110(0x3fe6666666666666, double:0.7)\n r2 = 4607182418800017408(0x3ff0000000000000, double:1.0)\n java.lang.String r4 = \"\"\n if (r18 == 0) goto L_0x011f\n double r0 = r18.getLowNetScale()\n double r2 = r18.getHighNetScale()\n java.lang.String r4 = r18.getSuffix()\n boolean r5 = r18.isUseCdnSizes()\n r5 = r5 ^ r10\n r19 = r0\n r21 = r2\n goto L_0x0124\n L_0x011f:\n r19 = r0\n r21 = r2\n r5 = 1\n L_0x0124:\n java.lang.Boolean r0 = r33.isEnabledLevelModel()\n if (r0 == 0) goto L_0x0135\n java.lang.Boolean r0 = r33.isEnabledLevelModel()\n boolean r0 = r0.booleanValue()\n r23 = r0\n goto L_0x0137\n L_0x0135:\n r23 = r5\n L_0x0137:\n r1 = 0\n int r5 = r33.getFinalWidth()\n int r24 = r33.getFinalHeight()\n com.taobao.tao.util.TaobaoImageUrlStrategy$CutType r25 = r33.getCutType()\n r0 = r30\n r2 = r6\n r3 = r9\n r26 = r4\n r4 = r5\n r5 = r24\n r27 = r6\n r24 = r7\n r6 = r19\n r29 = r8\n r28 = r9\n r8 = r21\n r10 = r32\n r11 = r25\n r12 = r23\n boolean r0 = r0.decideUrlWH(r1, r2, r3, r4, r5, r6, r8, r10, r11, r12)\n java.lang.Boolean r1 = r33.isShortEdgeEnable()\n boolean r1 = r1.booleanValue()\n if (r1 == 0) goto L_0x017e\n java.lang.String r1 = \"O1CN\"\n boolean r1 = r14.contains(r1)\n if (r1 == 0) goto L_0x017e\n java.lang.String r1 = \"xl\"\n r2 = r27\n r2.append(r1)\n goto L_0x0180\n L_0x017e:\n r2 = r27\n L_0x0180:\n if (r15 >= 0) goto L_0x0190\n r1 = r28\n java.lang.String r3 = r1.quality\n boolean r3 = android.text.TextUtils.isEmpty(r3)\n if (r3 != 0) goto L_0x0192\n java.lang.String r3 = r1.quality\n L_0x018e:\n r4 = r3\n goto L_0x01dc\n L_0x0190:\n r1 = r28\n L_0x0192:\n java.lang.Boolean r3 = r33.isEnabledQuality()\n if (r3 == 0) goto L_0x01a6\n java.lang.Boolean r3 = r33.isEnabledQuality()\n boolean r3 = r3.booleanValue()\n if (r3 == 0) goto L_0x01a3\n goto L_0x01a6\n L_0x01a3:\n r3 = r16\n goto L_0x018e\n L_0x01a6:\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageQuality r3 = r33.getFinalImageQuality()\n if (r3 == 0) goto L_0x01b5\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageQuality r3 = r33.getFinalImageQuality()\n java.lang.String r3 = r3.getImageQuality()\n goto L_0x018e\n L_0x01b5:\n if (r18 == 0) goto L_0x01c0\n java.lang.String r3 = r18.getLowNetQ()\n java.lang.String r4 = r18.getHighNetQ()\n goto L_0x01dc\n L_0x01c0:\n boolean r3 = r13.mIsLowQuality\n if (r3 == 0) goto L_0x01cb\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageQuality r3 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageQuality.q50\n L_0x01c6:\n java.lang.String r3 = r3.getImageQuality()\n goto L_0x01ce\n L_0x01cb:\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageQuality r3 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageQuality.q75\n goto L_0x01c6\n L_0x01ce:\n boolean r4 = r13.mIsLowQuality\n if (r4 == 0) goto L_0x01d9\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageQuality r4 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageQuality.q75\n L_0x01d4:\n java.lang.String r4 = r4.getImageQuality()\n goto L_0x01dc\n L_0x01d9:\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageQuality r4 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageQuality.q90\n goto L_0x01d4\n L_0x01dc:\n if (r3 == 0) goto L_0x01ec\n if (r4 == 0) goto L_0x01ec\n boolean r3 = r13.decideValueByNetwork(r0, r2, r3, r4)\n if (r3 != 0) goto L_0x01eb\n if (r0 == 0) goto L_0x01e9\n goto L_0x01eb\n L_0x01e9:\n r0 = 0\n goto L_0x01ec\n L_0x01eb:\n r0 = 1\n L_0x01ec:\n if (r15 >= 0) goto L_0x01fa\n java.lang.String r3 = r1.sharpen\n boolean r3 = android.text.TextUtils.isEmpty(r3)\n if (r3 != 0) goto L_0x01fa\n java.lang.String r3 = r1.sharpen\n L_0x01f8:\n r4 = r3\n goto L_0x0227\n L_0x01fa:\n java.lang.Boolean r3 = r33.isEnabledSharpen()\n if (r3 == 0) goto L_0x020e\n java.lang.Boolean r3 = r33.isEnabledSharpen()\n boolean r3 = r3.booleanValue()\n if (r3 == 0) goto L_0x020b\n goto L_0x020e\n L_0x020b:\n r3 = r16\n goto L_0x01f8\n L_0x020e:\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageSharpen r3 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageSharpen.non\n java.lang.String r16 = r3.getImageSharpen()\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageSharpen r3 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageSharpen.non\n java.lang.String r3 = r3.getImageSharpen()\n if (r18 == 0) goto L_0x0224\n java.lang.String r16 = r18.getLowNetSharpen()\n java.lang.String r3 = r18.getHighNetSharpen()\n L_0x0224:\n r4 = r3\n r3 = r16\n L_0x0227:\n if (r3 == 0) goto L_0x0237\n if (r4 == 0) goto L_0x0237\n boolean r3 = r13.decideValueByNetwork(r0, r2, r3, r4)\n if (r3 != 0) goto L_0x0236\n if (r0 == 0) goto L_0x0234\n goto L_0x0236\n L_0x0234:\n r0 = 0\n goto L_0x0237\n L_0x0236:\n r0 = 1\n L_0x0237:\n r4 = r26\n r13.decideUrlSuffix(r0, r2, r4)\n boolean r0 = r33.isForcedWebPOn()\n if (r0 == 0) goto L_0x024b\n r0 = 1\n r13.decideUrlWebP(r2, r0, r0)\n r4 = r29\n L_0x0248:\n r7 = 0\n goto L_0x032f\n L_0x024b:\n r0 = 1\n int r3 = r33.getBizId()\n boolean r3 = r13.isHeifAllowedWithBiz(r3)\n if (r3 == 0) goto L_0x02f7\n com.taobao.tao.image.ImageInitBusinss r3 = com.taobao.tao.image.ImageInitBusinss.getInstance()\n if (r3 == 0) goto L_0x02f7\n com.taobao.tao.image.ImageInitBusinss r3 = com.taobao.tao.image.ImageInitBusinss.getInstance()\n com.taobao.tao.image.IImageExtendedSupport r3 = r3.getImageExtendedSupport()\n if (r3 == 0) goto L_0x02f7\n boolean r4 = r3.isHEIFSupported()\n if (r4 == 0) goto L_0x02f7\n java.lang.String r4 = r1.suffix\n java.lang.String r5 = \"imgheiftag=0\"\n boolean r4 = r4.contains(r5)\n if (r4 != 0) goto L_0x02f7\n boolean r4 = android.text.TextUtils.isEmpty(r29)\n if (r4 != 0) goto L_0x02f7\n r4 = r29\n int r5 = r2.indexOf(r4)\n if (r5 < 0) goto L_0x02f9\n boolean r6 = r3.isHEIFPngSupported()\n if (r6 != 0) goto L_0x02e3\n java.lang.String r6 = r2.toString()\n java.lang.String r7 = \".png\"\n boolean r6 = r6.contains(r7)\n if (r6 == 0) goto L_0x02e3\n r6 = 73\n boolean r6 = com.taobao.tao.image.Logger.isLoggable(r6)\n if (r6 == 0) goto L_0x0248\n java.lang.String r6 = \"STRATEGY.ALL\"\n java.lang.StringBuilder r7 = new java.lang.StringBuilder\n r7.<init>()\n java.lang.String r8 = \"outString =\"\n r7.append(r8)\n r7.append(r2)\n java.lang.String r8 = \",\"\n r7.append(r8)\n r7.append(r5)\n java.lang.String r8 = \",\"\n r7.append(r8)\n int r8 = r4.length()\n int r5 = r5 + r8\n r7.append(r5)\n java.lang.String r5 = \",\"\n r7.append(r5)\n java.lang.String r5 = r13.mHeifImageDomain\n r7.append(r5)\n java.lang.String r5 = \",isHEIFPngSupported()=\"\n r7.append(r5)\n boolean r3 = r3.isHEIFPngSupported()\n r7.append(r3)\n java.lang.String r3 = r7.toString()\n r7 = 0\n java.lang.Object[] r5 = new java.lang.Object[r7]\n com.taobao.tao.image.Logger.i(r6, r3, r5)\n goto L_0x032f\n L_0x02e3:\n r7 = 0\n int r3 = r4.length()\n int r3 = r3 + r5\n java.lang.String r4 = r13.mHeifImageDomain\n r2.replace(r5, r3, r4)\n java.lang.String r8 = r13.mHeifImageDomain\n java.lang.String r3 = \"_.heic\"\n r2.append(r3)\n r4 = r8\n goto L_0x032f\n L_0x02f7:\n r4 = r29\n L_0x02f9:\n r7 = 0\n java.lang.String r3 = r1.suffix\n java.lang.String r5 = \"imgwebptag=0\"\n boolean r3 = r3.contains(r5)\n r3 = r3 ^ r0\n if (r18 == 0) goto L_0x030e\n boolean r5 = r18.isUseWebp()\n if (r5 == 0) goto L_0x030c\n goto L_0x030e\n L_0x030c:\n r5 = 0\n goto L_0x030f\n L_0x030e:\n r5 = 1\n L_0x030f:\n if (r3 == 0) goto L_0x032b\n java.lang.Boolean r3 = r33.isEnabledWebP()\n if (r3 != 0) goto L_0x0319\n if (r5 != 0) goto L_0x0329\n L_0x0319:\n java.lang.Boolean r3 = r33.isEnabledWebP()\n if (r3 == 0) goto L_0x032b\n java.lang.Boolean r3 = r33.isEnabledWebP()\n boolean r3 = r3.booleanValue()\n if (r3 == 0) goto L_0x032b\n L_0x0329:\n r3 = 1\n goto L_0x032c\n L_0x032b:\n r3 = 0\n L_0x032c:\n r13.decideUrlWebP(r2, r7, r3)\n L_0x032f:\n boolean r3 = com.taobao.tao.image.ImageStrategyConfig.isUseSpecialDomain\n if (r3 == 0) goto L_0x037a\n boolean r3 = android.text.TextUtils.isEmpty(r4)\n if (r3 != 0) goto L_0x037a\n java.lang.String r3 = r13.mDoMainDest\n boolean r3 = r4.equals(r3)\n if (r3 != 0) goto L_0x0349\n java.lang.String r3 = r13.mHeifImageDomain\n boolean r3 = r4.equals(r3)\n if (r3 == 0) goto L_0x037a\n L_0x0349:\n java.lang.String r3 = \"/\"\n int r3 = r14.lastIndexOf(r3)\n int r3 = r3 + r0\n if (r3 <= 0) goto L_0x037a\n int r5 = r31.length()\n if (r3 >= r5) goto L_0x037a\n java.lang.String r5 = r13.mSpecialDomain\n boolean r5 = android.text.TextUtils.isEmpty(r5)\n if (r5 != 0) goto L_0x037a\n java.lang.String r3 = r14.substring(r3)\n java.lang.String r5 = \"O1CNA1\"\n boolean r3 = r3.startsWith(r5)\n if (r3 == 0) goto L_0x037a\n int r3 = r2.indexOf(r4)\n int r4 = r4.length()\n int r4 = r4 + r3\n java.lang.String r5 = r13.mSpecialDomain\n r2.replace(r3, r4, r5)\n L_0x037a:\n java.lang.String r1 = r1.suffix\n r2.append(r1)\n java.lang.String r1 = r2.toString()\n r2 = 68\n boolean r2 = com.taobao.tao.image.Logger.isLoggable(r2)\n if (r2 == 0) goto L_0x03ac\n java.lang.String r2 = \"STRATEGY.ALL\"\n java.lang.String r3 = \"Dip=%.1f UISize=%d Area=%s\\nOriginUrl=%s\\nDecideUrl=%s\"\n r4 = 5\n java.lang.Object[] r4 = new java.lang.Object[r4]\n float r5 = r13.mDip\n java.lang.Float r5 = java.lang.Float.valueOf(r5)\n r4[r7] = r5\n java.lang.Integer r5 = java.lang.Integer.valueOf(r32)\n r4[r0] = r5\n r0 = 2\n r4[r0] = r24\n r0 = 3\n r4[r0] = r17\n r0 = 4\n r4[r0] = r1\n com.taobao.tao.image.Logger.d(r2, r3, r4)\n L_0x03ac:\n boolean r0 = com.taobao.tao.image.ImageStrategyConfig.isWebpDegrade\n if (r0 == 0) goto L_0x03e0\n int r0 = android.os.Build.VERSION.SDK_INT\n r2 = 28\n if (r0 != r2) goto L_0x03e0\n java.lang.String r0 = \".png\"\n boolean r0 = r1.contains(r0)\n if (r0 != 0) goto L_0x03e0\n java.lang.String r0 = \"O1CN\"\n boolean r0 = r1.contains(r0)\n if (r0 != 0) goto L_0x03ce\n java.lang.String r0 = \"jpg_.heic\"\n boolean r0 = r1.endsWith(r0)\n if (r0 != 0) goto L_0x03d6\n L_0x03ce:\n java.lang.String r0 = \"jpg_.webp\"\n boolean r0 = r1.endsWith(r0)\n if (r0 == 0) goto L_0x03e0\n L_0x03d6:\n int r0 = r1.length()\n int r0 = r0 + -6\n java.lang.String r1 = r1.substring(r7, r0)\n L_0x03e0:\n return r1\n L_0x03e1:\n return r17\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.tao.util.TaobaoImageUrlStrategy.decideUrl(java.lang.String, int, com.taobao.tao.image.ImageStrategyConfig):java.lang.String\");\n }", "private String generatePhotoUrl(Photo photo) {\n return String.format(\"https://farm%1$s.staticflickr.com/%2$s/%3$s_%4$s.jpg\", photo.getFarm(),\n photo.getServer(), photo.getId(), photo.getSecret());\n }", "private String fill(String url, String requestPath, String... parameters) {\n String filledUrl = url.replaceFirst(\"\\\\{url\\\\}\", requestPath.substring(1,requestPath.length()));\n for (String parameter : parameters) {\n filledUrl = filledUrl.replaceFirst(\"\\\\{[^}]*\\\\}\", parameter);\n }\n\n return filledUrl;\n }", "@Nonnull\n public String getUrl(int width, int height)\n {\n Checks.positive(width, \"Image width\");\n Checks.positive(height, \"Image height\");\n\n return getUrl() + \"?width=\" + width + \"&height=\" + height;\n }", "private static URL buildURL(List<String> args) throws MalformedURLException {\n\n\t\tfinal String IDList = args.stream().map(id -> id.toString() + \",\").reduce(\"\", String::concat);\n\n\t\treturn new URL(String.format(BASE_URL, IDList));\n\t}", "public String getUrlImagen(){\n\t\treturn urlImagen;\n\t}", "private void m10994a(String str, int i) {\n View reusedImageView = getReusedImageView();\n reusedImageView.setTag(str);\n reusedImageView.setId(i);\n reusedImageView.setOnClickListener(this);\n Object obj = str.startsWith(\"http://\") ? str + \"?imageView2/2/w/\" + ((this.f9968i * 4) / 5) : \"file://\" + str;\n if (!TextUtils.isEmpty(obj)) {\n Picasso.with(this.f9965f).load(obj).fit().error(C1373R.drawable.bg_1b1b1b).placeholder(C1373R.drawable.bg_1b1b1b).centerCrop().into(reusedImageView);\n }\n this.f9972m.addView(reusedImageView, i);\n }", "String getImage();", "private void buildBS60Url() {\n url = \"http://q.lizone.net/index/index/BSline/res/60/label/\" + dataItem.label;//API 2.0\n }", "protected String constructURL(LatLng... points) {\n\t\tCalendar c = Calendar.getInstance();\n\t\tint hour = c.get(Calendar.HOUR_OF_DAY);\n\t\tlong time = Math.round(c.getTimeInMillis() / 1000);\n\t\tif(hour > 0 && hour < 6) {\n\t\t\ttime = 1343340000;\n\t\t}\n\t\tLatLng start = points[0];\n\t\tLatLng dest = points[1];\n\t\tString sJsonURL = \"http://maps.googleapis.com/maps/api/directions/json?\";\n\n\t\tfinal StringBuffer mBuf = new StringBuffer(sJsonURL);\n\t\tmBuf.append(\"origin=\");\n\t\tmBuf.append(start.latitude);\n\t\tmBuf.append(',');\n\t\tmBuf.append(start.longitude);\n\t\tmBuf.append(\"&destination=\");\n\t\tmBuf.append(dest.latitude);\n\t\tmBuf.append(',');\n\t\tmBuf.append(dest.longitude);\n\t\tmBuf.append(\"&sensor=true&mode=\");\n\t\tmBuf.append(_mTravelMode.getValue());\n\t\tmBuf.append(\"&departure_time=\");\n\t\tmBuf.append(time);\n\n return mBuf.toString();\n\t}", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "@java.lang.Deprecated\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public java.lang.String decideUrl(java.lang.String r31, int r32, java.lang.String r33, com.taobao.tao.util.TaobaoImageUrlStrategy.CutType r34, int r35, int r36, boolean r37, boolean r38, boolean r39) {\n /*\n r30 = this;\n r13 = r30\n r14 = r33\n r15 = 0\n if (r31 != 0) goto L_0x0012\n java.lang.String r0 = \"STRATEGY.ALL\"\n java.lang.String r1 = \"origin url is null\"\n java.lang.Object[] r2 = new java.lang.Object[r15]\n com.taobao.tao.image.Logger.i(r0, r1, r2)\n r0 = 0\n return r0\n L_0x0012:\n java.lang.String r0 = r30.changeUrl(r31)\n com.taobao.tao.util.TaobaoImageUrlStrategy$UriCDNInfo r1 = new com.taobao.tao.util.TaobaoImageUrlStrategy$UriCDNInfo\n r1.<init>(r0)\n com.taobao.tao.util.OssImageUrlStrategy r2 = com.taobao.tao.util.OssImageUrlStrategy.getInstance()\n java.lang.String r3 = r1.host\n boolean r2 = r2.isOssDomain(r3)\n if (r2 == 0) goto L_0x003c\n com.taobao.tao.util.OssImageUrlStrategy r1 = com.taobao.tao.util.OssImageUrlStrategy.getInstance()\n java.lang.String r2 = \"default\"\n com.taobao.tao.image.ImageStrategyConfig$Builder r2 = com.taobao.tao.image.ImageStrategyConfig.newBuilderWithName(r2)\n com.taobao.tao.image.ImageStrategyConfig r2 = r2.build()\n r12 = r32\n java.lang.String r0 = r1.decideUrl(r0, r12, r2)\n return r0\n L_0x003c:\n r12 = r32\n boolean r2 = r13.isCdnImage((com.taobao.tao.util.TaobaoImageUrlStrategy.UriCDNInfo) r1)\n r11 = 1\n if (r2 != 0) goto L_0x0051\n java.lang.String r1 = \"STRATEGY.ALL\"\n java.lang.String r2 = \"origin not cdn url:%s\"\n java.lang.Object[] r3 = new java.lang.Object[r11]\n r3[r15] = r0\n com.taobao.tao.image.Logger.w(r1, r2, r3)\n return r0\n L_0x0051:\n boolean r2 = r13.mDomainSwitch\n if (r2 == 0) goto L_0x005b\n java.lang.String[] r0 = r13.convergenceUrl(r1, r15)\n r0 = r0[r15]\n L_0x005b:\n r16 = r0\n com.taobao.tao.util.ImageStrategyExtra$ImageUrlInfo r10 = com.taobao.tao.util.ImageStrategyExtra.getBaseUrlInfo(r16)\n java.lang.String r0 = r10.base\n java.lang.String r1 = \"_sum.jpg\"\n boolean r0 = r0.endsWith(r1)\n if (r0 == 0) goto L_0x007c\n java.lang.String r0 = r10.base\n java.lang.String r1 = r10.base\n int r1 = r1.length()\n int r1 = r1 + -8\n java.lang.String r0 = r0.substring(r15, r1)\n r10.base = r0\n goto L_0x00a0\n L_0x007c:\n java.lang.String r0 = r10.base\n java.lang.String r1 = \"_m.jpg\"\n boolean r0 = r0.endsWith(r1)\n if (r0 != 0) goto L_0x0090\n java.lang.String r0 = r10.base\n java.lang.String r1 = \"_b.jpg\"\n boolean r0 = r0.endsWith(r1)\n if (r0 == 0) goto L_0x00a0\n L_0x0090:\n java.lang.String r0 = r10.base\n java.lang.String r1 = r10.base\n int r1 = r1.length()\n int r1 = r1 + -6\n java.lang.String r0 = r0.substring(r15, r1)\n r10.base = r0\n L_0x00a0:\n java.lang.String r0 = r10.base\n com.taobao.tao.util.ImageStrategyExtra.parseImageUrl(r0, r10)\n java.lang.StringBuffer r8 = new java.lang.StringBuffer\n java.lang.String r0 = r10.base\n int r0 = r0.length()\n int r0 = r0 + 27\n r8.<init>(r0)\n java.lang.String r0 = r10.base\n r8.append(r0)\n java.lang.String r0 = \"\"\n boolean r1 = r13.mIsLowQuality\n if (r1 == 0) goto L_0x00c4\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageQuality r1 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageQuality.q50\n L_0x00bf:\n java.lang.String r1 = r1.getImageQuality()\n goto L_0x00c7\n L_0x00c4:\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageQuality r1 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageQuality.q75\n goto L_0x00bf\n L_0x00c7:\n boolean r2 = r13.mIsLowQuality\n if (r2 == 0) goto L_0x00d2\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageQuality r2 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageQuality.q75\n L_0x00cd:\n java.lang.String r2 = r2.getImageQuality()\n goto L_0x00d5\n L_0x00d2:\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageQuality r2 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageQuality.q90\n goto L_0x00cd\n L_0x00d5:\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageSharpen r3 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageSharpen.non\n java.lang.String r3 = r3.getImageSharpen()\n com.taobao.tao.util.TaobaoImageUrlStrategy$ImageSharpen r4 = com.taobao.tao.util.TaobaoImageUrlStrategy.ImageSharpen.non\n java.lang.String r4 = r4.getImageSharpen()\n r5 = 4604480259023595110(0x3fe6666666666666, double:0.7)\n r17 = 4607182418800017408(0x3ff0000000000000, double:1.0)\n boolean r7 = r13.mGlobalSwitch\n if (r7 == 0) goto L_0x0131\n java.util.HashMap<java.lang.String, com.taobao.tao.util.TaobaoImageUrlStrategy$ServiceImageSwitch> r7 = r13.mServiceImageSwitchList\n if (r7 == 0) goto L_0x0131\n boolean r7 = android.text.TextUtils.isEmpty(r33)\n if (r7 != 0) goto L_0x0131\n java.util.HashMap<java.lang.String, com.taobao.tao.util.TaobaoImageUrlStrategy$ServiceImageSwitch> r7 = r13.mServiceImageSwitchList\n java.lang.Object r7 = r7.get(r14)\n com.taobao.tao.util.TaobaoImageUrlStrategy$ServiceImageSwitch r7 = (com.taobao.tao.util.TaobaoImageUrlStrategy.ServiceImageSwitch) r7\n if (r7 == 0) goto L_0x0131\n if (r39 == 0) goto L_0x0131\n boolean r0 = r7.isUseWebp()\n java.lang.String r1 = r7.getLowNetQ()\n java.lang.String r2 = r7.getHighNetQ()\n java.lang.String r3 = r7.getLowNetSharpen()\n java.lang.String r4 = r7.getHighNetSharpen()\n double r5 = r7.getLowNetScale()\n double r17 = r7.getHighNetScale()\n java.lang.String r7 = r7.getSuffix()\n r19 = r0\n r9 = r1\n r27 = r5\n r5 = r2\n r2 = r7\n r6 = r27\n r29 = r4\n r4 = r3\n r3 = r29\n goto L_0x013c\n L_0x0131:\n r19 = r37\n r9 = r1\n r6 = r5\n r5 = r2\n r2 = r0\n r27 = r4\n r4 = r3\n r3 = r27\n L_0x013c:\n r1 = 0\n r20 = 1\n r0 = r30\n r15 = r2\n r2 = r8\n r21 = r3\n r3 = r10\n r22 = r4\n r4 = r35\n r23 = r5\n r5 = r36\n r24 = r8\n r25 = r9\n r8 = r17\n r26 = r10\n r10 = r32\n r17 = 1\n r11 = r34\n r12 = r20\n boolean r0 = r0.decideUrlWH(r1, r2, r3, r4, r5, r6, r8, r10, r11, r12)\n if (r38 == 0) goto L_0x0177\n r3 = r23\n r1 = r24\n r2 = r25\n boolean r2 = r13.decideValueByNetwork(r0, r1, r2, r3)\n if (r2 != 0) goto L_0x0175\n if (r0 == 0) goto L_0x0173\n goto L_0x0175\n L_0x0173:\n r0 = 0\n goto L_0x0179\n L_0x0175:\n r0 = 1\n goto L_0x0179\n L_0x0177:\n r1 = r24\n L_0x0179:\n r4 = r21\n r3 = r22\n boolean r2 = r13.decideValueByNetwork(r0, r1, r3, r4)\n if (r2 != 0) goto L_0x0188\n if (r0 == 0) goto L_0x0186\n goto L_0x0188\n L_0x0186:\n r0 = 0\n goto L_0x0189\n L_0x0188:\n r0 = 1\n L_0x0189:\n r13.decideUrlSuffix(r0, r1, r15)\n if (r19 == 0) goto L_0x019c\n r0 = r26\n java.lang.String r2 = r0.suffix\n java.lang.String r3 = \"imgwebptag=0\"\n boolean r2 = r2.contains(r3)\n if (r2 != 0) goto L_0x019e\n r2 = 1\n goto L_0x019f\n L_0x019c:\n r0 = r26\n L_0x019e:\n r2 = 0\n L_0x019f:\n r3 = 0\n r13.decideUrlWebP(r1, r3, r2)\n java.lang.String r0 = r0.suffix\n r1.append(r0)\n java.lang.String r0 = r1.toString()\n r1 = 68\n boolean r1 = com.taobao.tao.image.Logger.isLoggable(r1)\n if (r1 == 0) goto L_0x01d6\n java.lang.String r1 = \"STRATEGY.ALL\"\n java.lang.String r2 = \"[Non-Config] Dip=%.1f UISize=%d Area=%s\\nOriginUrl=%s\\nDecideUrl=%s\"\n r3 = 5\n java.lang.Object[] r3 = new java.lang.Object[r3]\n float r4 = r13.mDip\n java.lang.Float r4 = java.lang.Float.valueOf(r4)\n r5 = 0\n r3[r5] = r4\n java.lang.Integer r4 = java.lang.Integer.valueOf(r32)\n r3[r17] = r4\n r4 = 2\n r3[r4] = r14\n r4 = 3\n r3[r4] = r16\n r4 = 4\n r3[r4] = r0\n com.taobao.tao.image.Logger.d(r1, r2, r3)\n L_0x01d6:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.tao.util.TaobaoImageUrlStrategy.decideUrl(java.lang.String, int, java.lang.String, com.taobao.tao.util.TaobaoImageUrlStrategy$CutType, int, int, boolean, boolean, boolean):java.lang.String\");\n }", "public String getImageUrl();", "private static URL buildFinalMovieDbURL(String urlString){\n Uri movieDbBuiltUri = Uri.parse(urlString).buildUpon()\n .appendQueryParameter(APIKEY_PARAM, BuildConfig.MOVIE_DB_API_KEY)\n .build();\n\n //Now creates an URL based on the created Uri\n URL finalMovieDbURL = null;\n\n try {\n finalMovieDbURL = new URL(movieDbBuiltUri.toString());\n } catch (MalformedURLException e) {\n Log.e(ERROR_TAG, e.getMessage());\n }\n\n return finalMovieDbURL;\n }", "public void createURL(){\n urlDB = ( PREFACE + server + \"/\" + database + options);\n }", "String getImagePath();", "String getImagePath();", "String generalFileName(String url);", "private String createBaseImageUrl(IViewingSession session, String baseURL)\n\t{\n\t\tString sessionIdPart = \"\"; //$NON-NLS-1$\n\t\t// Prepare image base url.\n\t\tif (session != null)\n\t\t{\n\t\t\tsessionIdPart = ParameterAccessor.PARAM_VIEWING_SESSION_ID\n\t\t\t\t\t+ \"=\" + session.getId() + \"&\"; //$NON-NLS-1$ //$NON-NLS-2$\n\t\t}\n\n\t\treturn baseURL\n\t\t\t\t+ IBirtConstants.SERVLET_PATH_PREVIEW\n\t\t\t\t+ \"?\" + sessionIdPart + ParameterAccessor.PARAM_IMAGEID + \"=\"; //$NON-NLS-1$ //$NON-NLS-2$\n\t}", "public static void main(String[] args) throws IOException {\n String strImg=\"iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAAAXNSR0IArs4c6QAAAARnQU1BAACx\\n\" +\n \"jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGMSURBVFhH7ZUxbsIwFIYZK7F17h06darEzsLQ\\n\" +\n \"E1RsXIAdMXIANrgAAzMT4go5kBs7/sOLY+e9tGksWxk+yXJ+XvI923hWFIUampfZh8H3LDaTcO5M\\n\" +\n \"wrkzCfs5q8Nqrg6X5vzn25eBzlX4836E2ctafZe5mt3Zn2MQCN/UaVO9JPRRTXE+/0SYtbLPTNWk\\n\" +\n \"30h3C9/3aqsLWzgBiHN5XFuy2rYpm716kPnHcVH+bqFOd5rlCQtDVnfRjjuFSR7inLCs9ljCFIlw\\n\" +\n \"yfvy1YA8xDW+vEFSO7SlnSZIGFQYQLxuQDkXFJfWtjkcge3x5s8x/Iuwm6fyLXFB7etOS9Ltiz+7\\n\" +\n \"tbo6WY5RhF2ouB531ra12itabeu+Kx1FmELFQSPTOr/ArnLPqymqML2eIN6SH3qF8VLfw5oRhGkW\\n\" +\n \"4npM5U0DTOYPZzimsKEjS8Wre3ceaIAc2ZaODBV36duAJIQBxEPyGq4BSQlTOHHgiicrDKTiIHlh\\n\" +\n \"IBXPRhhw4tkJg5C4WFh0XyfAJJw7k3DeFOoHaIAJVpYI2HsAAAAASUVORK5CYII=\";\n\n\n\n\n String base64Img=null;\n HttpRequester httprequest = new HttpRequester();\n\n CloseableHttpClient httpClient =null;\n String url=\"https://creditcard.ecitic.com/citiccard/cppnew/entry.do?func=entryebank&ebankPage=mainpage\";\n httpClient = HttpClients.createDefault();\n CookieStore cookieStore = new BasicCookieStore();\n HttpContext localContext = new BasicHttpContext();\n localContext.setAttribute(\"http.cookie-store\", cookieStore);\n RequestConfig.custom().setConnectTimeout(20000);\n RequestConfig.custom().setSocketTimeout(20000);\n RequestConfig.custom().setConnectionRequestTimeout(20000);\n RequestConfig requestConfig = RequestConfig.custom().build();\n Map<String, String> requestHeaderMap=new HashMap<String, String>();\n requestHeaderMap.put(\"Accept-Encoding\", \"gzip, deflate\");\n requestHeaderMap.put(\"Host\", \"creditcard.ecitic.com\");\n requestHeaderMap.put(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0\");\n requestHeaderMap.put(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\");\n requestHeaderMap.put(\"Connection\", \"Keep-Alive\");\n requestHeaderMap.put(\"Cache-Control\", \"private\");\n requestHeaderMap.put(\"Accept-Language\", \"zh-CN\");\n// if (!StringUtil.isEmpty(userIp)&&!userIp.equals(\"127.0.0.1\")) {\n// requestHeaderMap.put(\"X-Forwarded-For\", userIp);\n// }\n// logger.info(bean.getCuserId()+\"zhongxin userIp=\"+userIp);\n String content= HpClientUtil.httpGet(url, requestHeaderMap, httpClient, localContext, \"GBK\");\n\n String channel=content.substring(content.indexOf(\"var channel\"), content.indexOf(\"var source\"));\n String source =content.substring(content.indexOf(\"var source\"), content.indexOf(\"var from\"));\n channel=channel.substring(channel.indexOf(\"\\\"\")+1, channel.lastIndexOf(\"\\\"\"));\n source=source.substring(source.indexOf(\"\\\"\") + 1, source.lastIndexOf(\"\\\"\"));\n String vcodeUrl=\"https://creditcard.ecitic.com/citiccard/cppnew/jsp/valicode.jsp?time=\"+System.currentTimeMillis();\n\n\n BufferedImage localBufferedImage=null;\n localBufferedImage=HpClientUtil.getRandomImageOfJPEG(vcodeUrl, requestHeaderMap, httpClient, localContext, requestConfig);\n base64Img= BankHelper.GetImageBase64(localBufferedImage, \"jpeg\");\n System.out.println(base64Img);\n url = \"http://192.168.3.50:8080/captcha/hack?captcha=\";\n\n try {\n // url = java.net.URLDecoder.decode(url, \"utf-8\");\n strImg= java.net.URLEncoder.encode(base64Img, \"utf-8\");\n url = url +strImg + \"&bankid=2&imgtype=1\" ;\n HttpRespons hr = httprequest.sendGet(url);\n //获取招商银行的登录sessionID\n content=hr.getContent();\n System.out.println(content);\n JSONObject json=JSONObject.parseObject(content);\n System.out.println(json.getString(\"text\"));\n\n\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n System.out.println(url);\n GenerateImage(base64Img);\n }", "private void GotoGraficos(String data){\n Intent intent = new Intent(this, Graficos_Sesion.class);\n intent.putExtra(\"url\", data);\n startActivity(intent);\n }", "public static void main(String[] args) {\n ArrayList<String> listUrl = new ArrayList<String>();\n listUrl.add(\"http://minionomaniya.ru/wp-content/uploads/2016/01/%D0%9A%D0%B5%D0%B2%D0%B8%D0%BD.jpg\");\n listUrl.add(\"http://minionomaniya.ru/wp-content/uploads/2016/01/%D0%9A%D0%B5%D0%B2%D0%B8%D0%BD.jpg\");\n listUrl.add(\"http://minionomaniya.ru/wp-content/uploads/2016/01/%D0%9A%D0%B5%D0%B2%D0%B8%D0%BD.jpg\");\n listUrl.add(\"http://minionomaniya.ru/wp-content/uploads/2016/01/%D0%9A%D0%B5%D0%B2%D0%B8%D0%BD.jpg\");\n listUrl.add(\"http://minionomaniya.ru/wp-content/uploads/2016/01/%D0%9A%D0%B5%D0%B2%D0%B8%D0%BD.jpg\");\n listUrl.add(\"http://minionomaniya.ru/wp-content/uploads/2016/01/%D0%9A%D0%B5%D0%B2%D0%B8%D0%BD.jpg\");\n listUrl.add(\"http://minionomaniya.ru/wp-content/uploads/2016/01/%D0%9A%D0%B5%D0%B2%D0%B8%D0%BD.jpg\");\n for (String url : listUrl) {\n Thread thread = new Thread(new LoadImage(url));\n thread.start();\n }\n }", "@Override\n\tpublic String imageLists(String url, QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(url + param.toString());\n\t}", "public abstract String getUrl();", "private static String getImagePath(int size) {\n return \"images/umbrella\" + size + \".png\";\n }", "public interface Constants {\n\n String IMAGE_DOWNLOAD_LINK = \"http://appsculture.com/vocab/images/\";\n\n}", "private static String buildUrlString(String base, Map<String, String> params) {\n if (params == null || params.isEmpty()) return API_URL + base;\n //construct get parameters list\n StringBuilder get = new StringBuilder();\n boolean first = true;\n for (String param : params.keySet()) {\n if (!first) get.append('&'); else first = false;\n //add the parameter\n get.append(param);\n String value = params.get(param);\n if (value != null) {\n get.append('=');\n get.append(value);\n }\n }\n //return the full string\n if (get.length() == 0) return API_URL + base;\n return API_URL + base + \"?\" + get.toString();\n }", "Uri mo1686a();", "private static String buildUrl(LatLng minPoint, LatLng maxPoint, int page){\n Uri.Builder uriBuilder = END_POINT.buildUpon()\n .appendQueryParameter(\"method\", SEARCH_METHOD)\n .appendQueryParameter(\"bbox\", minPoint.longitude + \",\" + minPoint.latitude + \",\" + maxPoint.longitude + \",\" + maxPoint.latitude) // box in which we are searching\n .appendQueryParameter(\"extras\", \"geo, url_o, url_c, url_m, url_s, description\") // extra additional parameters\n .appendQueryParameter(\"page\", \"\" + page); // page number to return\n return uriBuilder.build().toString();\n }", "private String buildLink(String posterPath) {\n return \"http://image.tmdb.org/t/p/w92\" + posterPath;\n }", "private String makeImageUri(String name) {\n\t\tString image = name;\n\t\t// remove all white spaces\n\t\tString in = image.replaceAll(\"\\\\s+\", \"\");\n\t\t// turn to lower case\n\t\tString iname = in.toLowerCase();\n\t\tSystem.out.println(\"iName is: \" + iname);\n\t\tString mDrawableName = iname;\n\t\t// get the resId of the image\n\t\tint resID = getResources().getIdentifier(mDrawableName, \"drawable\",\n\t\t\t\tgetPackageName());\n\n\t\t// resID is notfound show default image\n\t\tif (resID == 0) {\n\t\t\tresID = getResources().getIdentifier(\"default_place\", \"drawable\",\n\t\t\t\t\tgetPackageName());\n\t\t}\n\n\t\t// make the uri\n\t\tUri imageURI = Uri.parse(\"android.resource://\" + getPackageName() + \"/\"\n\t\t\t\t+ resID);\n\t\timage = imageURI.toString();\n\t\treturn image;\n\t}", "void seTubeDownImage(String image);", "private URL createURL() {\n try {\n Log.d(\"URL\", \"create\");\n String urlString = \"http://cs262.cs.calvin.edu:8084/cs262dCleaningCrew/task/cjp27\";\n return new URL(urlString);\n } catch (Exception e) {\n Toast.makeText(this, getString(R.string.connection_error), Toast.LENGTH_SHORT).show();\n }\n\n return null;\n }", "private Drawable creaImmagineDaUrl(String urlImmagine)\n {\n try\n {\n InputStream is = (InputStream) new URL(urlImmagine).getContent();\n Drawable d = Drawable.createFromStream(is, null);\n return d;\n }catch (Exception e) {\n System.out.println(\"Exc=\"+e);\n return null;\n }\n }", "static String getImageUrl(final FlickrImage flickrImage) {\n Uri.Builder builder = new Uri.Builder();\n builder.scheme(\"https\")\n .authority(\"farm\" + flickrImage.getFarm() + \".static.flickr.com\")\n .appendPath(flickrImage.getServer())\n .appendPath(flickrImage.getFlickrId() + \"_\" + flickrImage.getSecret() + \".jpg\");\n\n return builder.build().toString();\n }", "@Override\n public void onClick(View v) {\n showImageView.setVisibility(View.VISIBLE);\n String imgUrl = \"http://210.42.121.241/servlet/GenImg\";\n new DownImgAsyncTask().execute(imgUrl);\n }", "private String generateUrl(String code) {\n return prefix + recognizeType(code) + code;\n }", "@Test\r\n public void testCreateImageUrl() throws MovieDbException {\r\n LOG.info(\"createImageUrl\");\r\n MovieDb movie = tmdb.getMovieInfo(ID_MOVIE_BLADE_RUNNER, \"\");\r\n String result = tmdb.createImageUrl(movie.getPosterPath(), \"original\").toString();\r\n assertTrue(\"Error compiling image URL\", !result.isEmpty());\r\n }", "static String getImage() {\n int rand = (int) (Math.random() * 13);\n return \"file:src/images/spaceships/\" + rand + \".png\";\n }", "private void fetchdriverimg(String result) throws IOException, JSONException {\n\n String url = \"http://www.mucaddam.pk/abdullah/vanapp/\" + result;\n Picasso.with(this).load(url).placeholder(R.drawable.driverico).error(R.drawable.driverico).into(dri_img, new com.squareup.picasso.Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError() {\n\n }\n });\n\n }", "private String getUrl(LatLng origin, LatLng dest) {\n\n // Origin of route\n String str_origin = \"origin=\" + origin.latitude + \",\" + origin.longitude;\n\n // Destination of route\n String str_dest = \"destination=\" + dest.latitude + \",\" + dest.longitude;\n\n // Sensor enabled\n String sensor = \"sensor=false\";\n\n // Building the parameters to the web service\n String parameters = str_origin + \"&\" + str_dest + \"&\" + sensor;\n\n // Output format\n String output = \"json\";\n\n// Log.e(\"URL\", \"https://maps.googleapis.com/maps/api/directions/\" + output + \"?\" + parameters);\n\n // Building the url to the web service\n return \"https://maps.googleapis.com/maps/api/directions/\" + output + \"?\" + parameters;\n }", "private String initUrlParameter() {\n StringBuffer url = new StringBuffer();\n url.append(URL).append(initPathParameter());\n return url.toString();\n }", "@Override\n\tpublic String imageGroup(String url, QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(url + param.toString());\n\t}", "public String makeURL(String destlat, String destlog) {\n return \"https://maps.googleapis.com/maps/api/directions/json\" + \"?origin=\" + String.valueOf(mLastLocation.getLatitude()) + \",\" + String.valueOf(mLastLocation.getLongitude()) + \"&destination=\" + destlat + \",\" + destlog + \"&sensor=false&mode=walking&alternatives=true&key=\" + getResources().getString(R.string.google_map_key_for_server);\n }", "public String getDefaultImgSrc(){return \"/students/footballstudentdefault.png\";}", "protected Bitmap doInBackground(String...urls){\n String urlOfImage = urls[0];\n Bitmap logo = null;\n try{\n InputStream is = new URL(urlOfImage).openStream();\n /*\n decodeStream(InputStream is)\n Decode an input stream into a bitmap.\n */\n logo = BitmapFactory.decodeStream(is);\n }catch(Exception e){ // Catch the download exception\n e.printStackTrace();\n }\n return logo;\n }", "private String generateUrlParameters(HashMap<String, String> parameters) {\n\n\t\tString urlAttachment = \"?\";\n\n\t\tObject[] keys = parameters.keySet().toArray();\n\n\t\tfor(Object key : keys)\n\n\t\t\turlAttachment += key.toString() + \"=\" + parameters.get(key) + \"&\";\n\n\t\treturn urlAttachment;\n\t}", "protected abstract String getUrl();", "public static URL buildurl(String url1)\n {\n URL url = null;\n try\n {\n url = new URL(url1.toString());\n\n }\n catch(MalformedURLException e)\n {\n e.printStackTrace();\n }\n return url;\n }", "public homegallery(String image_url)\n {\n this.image_url=image_url;\n }", "public void saveImage(){\n new Thread() {\n public void run() {\n String image_url = stuffRoomInfo.getStuffLink();\n Log.i(\"OGT\", \"image_url:in showImage \" + image_url);\n getOGTag(image_url);\n // Display a png image from the specified file\n ImageUrlSendServer();\n }\n }.start();\n }", "public String p1GetFront()\n {\n String str = \"\"; \n switch(WarCW.p1played.getSuitStr()){\n case \"SPADES\":\n {\n switch(WarCW.p1played.getRankStr()){\n case \"ACE\":\n {\n str = \"aces.jpg\";\n return str;\n } \n case \"TWO\":\n {\n str = \"2s.jpg\";\n return str;\n } \n case \"THREE\":\n {\n str = \"3s.jpg\";\n return str;\n } \n case \"FOUR\":\n {\n str = \"4s.jpg\";\n return str;\n } \n case \"FIVE\":\n {\n str = \"5s.jpg\";\n return str;\n } \n case \"SIX\":\n {\n str = \"6s.jpg\";\n return str;\n } \n case \"SEVEN\":\n {\n str = \"7s.jpg\";\n return str;\n } \n case \"EIGHT\":\n {\n str = \"8s.jpg\";\n return str;\n } \n case \"NINE\":\n {\n str = \"9s.jpg\";\n return str;\n } \n case \"TEN\":\n {\n str = \"10s.jpg\";\n return str;\n } \n case \"JACK\":\n {\n str = \"jacks.jpg\";\n return str;\n } \n case \"QUEEN\":\n {\n str = \"queens.jpg\";\n return str;\n } \n case \"KING\":\n {\n str = \"kings.jpg\";\n return str;\n } \n default:\n {\n str = \"joker.jpg\";\n return str;\n }\n } \n } \n case \"CLUBS\":\n {\n switch(WarCW.p1played.getRankStr()){\n case \"ACE\":\n {\n str = \"acec.jpg\";\n return str;\n } \n case \"TWO\":\n {\n str = \"2c.jpg\";\n return str;\n } \n case \"THREE\":\n {\n str = \"3c.jpg\";\n return str;\n } \n case \"FOUR\":\n {\n str = \"4c.jpg\";\n return str;\n } \n case \"FIVE\":\n {\n str = \"5c.jpg\";\n return str;\n } \n case \"SIX\":\n {\n str = \"6c.jpg\";\n return str;\n } \n case \"SEVEN\":\n {\n str = \"7c.jpg\";\n return str;\n } \n case \"EIGHT\":\n {\n str = \"8c.jpg\";\n return str;\n } \n case \"NINE\":\n {\n str = \"9c.jpg\";\n return str;\n } \n case \"TEN\":\n {\n str = \"10c.jpg\";\n return str;\n } \n case \"JACK\":\n {\n str = \"jackc.jpg\";\n return str;\n } \n case \"QUEEN\":\n {\n str = \"queenc.jpg\";\n return str;\n } \n case \"KING\":\n {\n str = \"kingc.jpg\";\n return str;\n } \n default:\n {\n str = \"joker.jpg\";\n return str;\n }\n }\n }\n \n case \"HEARTS\":\n {\n switch(WarCW.p1played.getRankStr()){\n case \"ACE\":\n {\n str = \"aceh.jpg\";\n return str;\n } \n case \"TWO\":\n {\n str = \"2h.jpg\";\n return str;\n } \n case \"THREE\":\n {\n str = \"3h.jpg\";\n return str;\n } \n case \"FOUR\":\n {\n str = \"4h.jpg\";\n return str;\n } \n case \"FIVE\":\n {\n str = \"5h.jpg\";\n return str;\n } \n case \"SIX\":\n {\n str = \"6h.jpg\";\n return str;\n } \n case \"SEVEN\":\n {\n str = \"7h.jpg\";\n return str;\n } \n case \"EIGHT\":\n {\n str = \"8h.jpg\";\n return str;\n } \n case \"NINE\":\n {\n str = \"9h.jpg\";\n return str;\n } \n case \"TEN\":\n {\n str = \"10h.jpg\";\n return str;\n } \n case \"JACK\":\n {\n str = \"jackh.jpg\";\n return str;\n } \n case \"QUEEN\":\n {\n str = \"queenh.jpg\";\n return str;\n } \n case \"KING\":\n {\n str = \"kingh.jpg\";\n return str;\n } \n default:\n {\n str = \"joker.jpg\";\n return str;\n }\n }\n } \n case \"DIAMONDS\":\n {\n switch(WarCW.p1played.getRankStr()){\n case \"ACE\":\n {\n str = \"aced.jpg\";\n return str;\n } \n case \"TWO\":\n {\n str = \"2d.jpg\";\n return str;\n } \n case \"THREE\":\n {\n str = \"3d.jpg\";\n return str;\n } \n case \"FOUR\":\n {\n str = \"4d.jpg\";\n return str;\n } \n case \"FIVE\":\n {\n str = \"5d.jpg\";\n return str;\n } \n case \"SIX\":\n {\n str = \"6d.jpg\";\n return str;\n } \n case \"SEVEN\":\n {\n str = \"7d.jpg\";\n return str;\n } \n case \"EIGHT\":\n {\n str = \"8d.jpg\";\n return str;\n } \n case \"NINE\":\n {\n str = \"9d.jpg\";\n return str;\n } \n case \"TEN\":\n {\n str = \"10d.jpg\";\n return str;\n } \n case \"JACK\":\n {\n str = \"jackd.jpg\";\n return str;\n } \n case \"QUEEN\":\n {\n str = \"queend.jpg\";\n return str;\n } \n case \"KING\":\n {\n str = \"kingd.jpg\";\n return str;\n } \n default:\n {\n str = \"joker.jpg\";\n return str;\n }\n }\n } \n default:\n {\n str = \"joker.jpg\";\n return str;\n }\n }\n }", "void mo36481a(int i, ImageView imageView, Uri uri);", "protected Bitmap doInBackground(String...urls){\n String urlOfImage = urls[0];\n Bitmap logo = null;\n try{\n InputStream is = new URL(urlOfImage).openStream();\n /*\n decodeStream(InputStream is)\n Decode an input stream into a bitmap.\n */\n logo = BitmapFactory.decodeStream(is);\n\n }catch(Exception e){ // Catch the download exception\n e.printStackTrace();\n }\n return logo;\n }", "private void buildKLineUrl(String cycle) {\n url = \"http://q.lizone.net/index/index/Kline/label/\" + dataItem.label + \"/res/\" + cycle;//api 2.0\n }", "public static String getPath() {\n\t\t// Lấy đường dẫn link\n\t\tAuthentication auth1 = SecurityContextHolder.getContext().getAuthentication();\n\t\tAgentconnection cus = (Agentconnection) auth1.getPrincipal();\n\t\t \n\t\t//String PATH_STRING_REAL = fileStorageProperties.getUploadDir()+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t String PATH_STRING_REAL = \"E:/ezcloud/upload/\"+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t return PATH_STRING_REAL;\n\t}", "public String makeURL(double sourcelat, double sourcelog, double destlat,\n\t\t\tdouble destlog) {\n\t\tStringBuilder urlString = new StringBuilder();\n\t\turlString.append(\"http://maps.googleapis.com/maps/api/directions/json\");\n\t\turlString.append(\"?origin=\");// from\n\t\turlString.append(Double.toString(sourcelat));\n\t\turlString.append(\",\");\n\t\turlString.append(Double.toString(sourcelog));\n\t\turlString.append(\"&destination=\");// to\n\t\turlString.append(Double.toString(destlat));\n\t\turlString.append(\",\");\n\t\turlString.append(Double.toString(destlog));\n\t\turlString.append(\"&sensor=false&mode=driving&alternatives=true\");\n\t\treturn urlString.toString();\n\t}", "void downloadImage(String imageURL, ImageView imageView);", "public String buildUrl(String text_of_audio) {\n String wit = \"https://api.wit.ai/message\";\n String google = \"https://www.google.com/\";\n Uri sendRequest_wit = Uri.parse(wit).buildUpon()\n .appendQueryParameter(\"q\", text_of_audio).build();\n\n\n try {\n url = new URL(sendRequest_wit.toString());\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n Log.d(\"url\",url.toString());\n\n try {\n audioStr = new WitQueryTask().execute(url).get();\n } catch (ExecutionException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return audioStr;\n\n }", "public String doInBackground(String... strings) {\n try {\n return HospitalMapsActivity.this.downloadUrl(strings[0]);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "public String downloadUrl(String string) throws IOException {\n HttpURLConnection connection = (HttpURLConnection) new URL(string).openConnection();\n connection.connect();\n BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n StringBuilder builder = new StringBuilder();\n String str = BuildConfig.FLAVOR;\n while (true) {\n String readLine = reader.readLine();\n String line = readLine;\n if (readLine != null) {\n builder.append(line);\n } else {\n String data = builder.toString();\n reader.close();\n return data;\n }\n }\n }", "public interface CeshiUrl {\n String SINGLE_URL = \"http://nq.website-art.com/app/category.php\";\n\n String TEST=\"http://nq.website-art.com/app/test.php\";\n}", "String makePlanCommunityUrl();", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public static void main(String[] args){\n\t\tString path = FileLogic.createDateSplitDirYYYYMMDDHH(\"d:/test\");\n\t\tNetworkUtil.downloadImage(\"http://www.51homevip.com/portal/web/images/home-top.png\", path + \"/gg.png\");\n\t}", "String getRandomSWFURL();", "java.lang.String getImage();", "public void rellenaImagen()\n {\n rellenaDatos(\"1\",\"Samsung\", \"cv3\", \"blanco\" , \"50\", 1200,2);\n rellenaDatos(\"2\",\"Samsung\", \"cv5\", \"negro\" , \"30\", 600,5);\n }", "@Test\n public void getImgByUri() {\n String uri = \"https://image.chosun.com/sitedata/image/201410/30/2014103000633_0.jpg\";\n\n\n// onView(withId(R.id.url_load_et)).perform(replaceText(uri));\n// onView(withId(R.id.url_load_btn)).perform(click());\n// onView(withId(R.id.save_btn)).perform(click());\n// Espresso.pressBack();\n }", "void mo36483b(int i, ImageView imageView, Uri uri);", "private String generateURL(Integer instanceID, String key) {\n\t\treturn \"http://\" + databaseInstances[instanceID] + \"/target?targetID=\" + key;\n\t}", "public static String getRandomImageUrl() {\n int index = RandomNumberGenerator.getRandomInt(0, images.length / 2 - 1);\n return images[index * 2 + 1];\n }", "public String getStaticPicture();", "void seTubeUpImage(String image);" ]
[ "0.6098934", "0.59439677", "0.5741479", "0.574104", "0.574104", "0.574104", "0.574104", "0.574104", "0.56723183", "0.5665484", "0.5645773", "0.56394315", "0.56392574", "0.5612285", "0.55727595", "0.55707073", "0.552996", "0.5505368", "0.549455", "0.54852855", "0.5481575", "0.5455115", "0.54467475", "0.54443276", "0.5443867", "0.5411039", "0.54005134", "0.5398056", "0.5396857", "0.5391427", "0.5391427", "0.5391427", "0.5391427", "0.5391427", "0.5391427", "0.538192", "0.53799146", "0.5357872", "0.5341877", "0.5337363", "0.5337363", "0.53336054", "0.5327106", "0.53106123", "0.527986", "0.52673954", "0.52637583", "0.5262909", "0.52448374", "0.52428424", "0.5228714", "0.52227736", "0.52093494", "0.520922", "0.52082455", "0.52027494", "0.52015203", "0.5199783", "0.5198029", "0.51927686", "0.5188875", "0.51707023", "0.5166686", "0.51619834", "0.5158671", "0.5155748", "0.5152129", "0.5149831", "0.51482916", "0.51469535", "0.5142385", "0.51389724", "0.5135083", "0.5134771", "0.5116176", "0.51158684", "0.51097655", "0.5108792", "0.51038647", "0.51031053", "0.50967896", "0.5082844", "0.5077868", "0.50777376", "0.5073202", "0.5070432", "0.5070233", "0.506989", "0.506989", "0.506989", "0.506989", "0.5065385", "0.5056507", "0.5053777", "0.5053697", "0.5048044", "0.50444955", "0.5041251", "0.5041059", "0.50402755", "0.503783" ]
0.0
-1
API to find the route from source to destination
@GetMapping("/connected") @Override public String findCity(@NotNull @RequestParam("origin") String origin, @NotNull @RequestParam("destination") String destination) throws DataNotFoundException { LOG.info("Source..." + origin +".....Destination.."+ destination); if (StringUtils.isNotBlank(origin) && StringUtils.isNotBlank(destination)) { Set<String> traversal = cityRouteService.findRoute(getLoadCitiesGraph().getGraph(),origin); if(traversal.contains(destination)) return "yes"; else return "no"; } else { throw new DataNotFoundException("Unable to process this request due to source or destination missing"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getRouteDest();", "String viewRouteDetails(String source, String destination);", "public RouteResponse findRoute(RouteRequest routeRequest);", "Destination getDestination();", "void onSucceedFindDirection(List<RouteBeetweenTwoPointsDTO> route);", "GetDestinationResult getDestination(GetDestinationRequest getDestinationRequest);", "public void findDestination() {\n\t\t\n\t}", "T getDestination(T nodeOrigin, F flow);", "int getDestination();", "public static List<Object> getDirectionBetweenTwoLocation(final String sourceAddress, final String destinationAddress, final String API_KEY) {\n\n final List<String> list = new ArrayList<>();\n final List<Object> directionList = new ArrayList<>();\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n\n URL url = new URL(\"https://maps.googleapis.com/maps/api/directions/json?\" + \"origin=\" + sourceAddress + \"&destination=\" + destinationAddress + \"&key=\" + API_KEY);\n HttpHandler handler = new HttpHandler();\n String jsonStr = handler.makeServiceCall(String.valueOf(url));\n\n if (jsonStr != null) {\n\n JSONObject jsonObject = new JSONObject(jsonStr);\n JSONArray jsonArray = jsonObject.getJSONArray(\"routes\");\n\n if (jsonArray != null && jsonArray.length() > 0) {\n JSONArray legsObject = jsonArray.getJSONObject(2).getJSONArray(\"legs\");\n if (legsObject != null) {\n JSONArray stepsArray = legsObject.getJSONObject(6).getJSONArray(\"steps\");\n if (stepsArray != null && stepsArray.length() > 0) {\n for (int i = 1; i < stepsArray.length(); i++) {\n JSONObject object = stepsArray.getJSONObject(i);\n System.out.println(\"response1\" + object);\n\n String maneuver = object.getString(\"maneuver\");\n list.add(maneuver);\n }\n directionList.addAll(list);\n }\n }\n }\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n thread.start();\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return directionList;\n }", "public String getDestination(){\r\n\t\treturn route.getDestination();\r\n\t}", "List<ConnectingFlights> getPossibleRoutes(int loc_start_id, int loc_end_id);", "Set<ConnectPoint> sourcesFor(McastRoute route);", "public Route getRoute();", "public List<Node> getShortestPathToDestination(Node destination) {\n List<Node> path = new ArrayList<Node>();\n\n\n\n for (Node node = destination; node != null; node = node.previous){\n Log.i(\"bbb\", \"get path \"+node._waypointName);\n path.add(node);\n }\n\n // reverse path to get correct order\n Collections.reverse(path);\n return path;\n }", "public List<Integer> getRoute(int start, int destination, Map<Transport, Integer> tickets) {\n\n List<Node<Integer>> nodes = graph.getNodes();\n //Initialisation\n Map<Node<Integer>, Double> unvisitedNodes = new HashMap<Node<Integer>, Double>();\n Map<Node<Integer>, Double> distances = new HashMap<Node<Integer>, Double>();\n Map<Node<Integer>, Node<Integer>> previousNodes = new HashMap<Node<Integer>, Node<Integer>>();\n Node<Integer> currentNode = graph.getNode(start);\n\n for (Node<Integer> node : nodes) {\n if (!currentNode.getIndex().equals(node.getIndex())) {\n distances.put(node, Double.POSITIVE_INFINITY);\n } else {\n distances.put(node, 0.0);\n }\n Integer location = node.getIndex();\n try {\n unvisitedNodes.put(node, (1/pageRank.getPageRank(location)));\n } catch (Exception e) {\n System.err.println(e);\n }\n previousNodes.put(node, null);\n }\n //Search through the graph\n while (unvisitedNodes.size() > 0) {\n Node<Integer> m = minDistance(distances, unvisitedNodes);\n if (m == null) break;\n currentNode = m;\n if (currentNode.getIndex().equals(destination)) break;\n unvisitedNodes.remove(currentNode);\n\n step(graph, distances, unvisitedNodes, currentNode, previousNodes, tickets);\n }\n\n //Move backwards finding the shortest route\n List<Integer> route = new ArrayList<Integer>();\n while (previousNodes.get(currentNode) != null) {\n route.add(0, currentNode.getIndex());\n currentNode = previousNodes.get(currentNode);\n }\n route.add(0, currentNode.getIndex());\n return route;\n }", "Path getPathFromNodeTo(Node destination);", "private void getRoute(Point origin, Point destination){\n NavigationRoute.builder(this)\n .profile(DirectionsCriteria.PROFILE_WALKING) //Change Here for car navigation\n .accessToken(Mapbox.getAccessToken())\n .origin(origin)\n .destination(destination)\n .build()\n .getRoute(new Callback<DirectionsResponse>() {\n @Override\n public void onResponse(Call<DirectionsResponse> call, Response<DirectionsResponse> response) {\n if(response.body() == null)\n {\n Log.e(TAG, \"No routes found, check right user and access token\");\n return;\n }else if (response.body().routes().size() == 0){\n Log.e(TAG,\"No routes found\");\n return;\n }\n\n currentRoute = response.body().routes().get(0);\n\n if(navigationMapRoute != null){\n navigationMapRoute.removeRoute();\n }\n else{\n navigationMapRoute = new NavigationMapRoute(null,mapView,map);\n }\n navigationMapRoute.addRoute(currentRoute);\n }\n\n @Override\n public void onFailure(Call<DirectionsResponse> call, Throwable t) {\n Log.e(TAG, \"Error:\" + t.getMessage());\n }\n });\n }", "List<Route> getDirectRoutes(String departure, String arrival);", "@RequestMapping(value = \"/flights/find/{source}/{destination}\", method = RequestMethod.GET)\n\tpublic ResponseEntity<List<Flight>> findAnOrder(@PathVariable(\"source\") String source,\n\t\t\t@PathVariable(\"destination\") String destination) {\n\n\t\treturn new ResponseEntity<List<Flight>>(flightRepo.SourceCityAndDestinationCityOrderByFareAscDuarationAsc(source, destination),\n\t\t\t\tHttpStatus.OK);\n\t}", "io.envoyproxy.envoy.type.metadata.v3.MetadataKind.Route getRoute();", "@Test\n public void getRouteOriginDestinationTest() throws ApiException {\n\n final List<Integer> avoid = null;\n final List<List<Integer>> connections = null;\n\n final List<Integer> response = api.getRouteOriginDestination(SOLARSYSTEM_ID_ALIKARA, SOLARSYSTEM_ID_JITA, avoid, connections, DATASOURCE, null, null);\n\n assertThat(response.size(), equalTo(3));\n }", "@GetMapping(path=\"/connected\")\r\n\tpublic String getConnectivity(@PathParam(\"origin\") String origin, @PathParam(\"destination\") String destination) throws Exception{\n\t\tRoute route = connectivityService.getRoute();\r\n\t\troute.setPathList(initializeRoute);\r\n\t\ttotalRouts = connectivityService.getCitiesConnectivityData(fileName);\r\n\t\t\r\n\t\tif(totalRouts == null)\r\n\t\t\tthrow new Exception(\"Cities connectivity service could not load the data.\");\r\n\t\t\r\n\t\tif(origin!=null && destination!=null) {\r\n\t\t\tconnectivityService.match(origin, destination, totalRouts); \r\n\t\t}else {\r\n\t\t\treturn \"Origin/Destination missing in uri path\";\r\n\t\t}\r\n\t\tSystem.out.println(\"getFoundMessage :\"+route.getFoundMessage());\r\n\t\t\t\r\n\t\treturn route.getPathList()!=null? route.getPathList().toString():\"No connectivity found for requested route\";\r\n\t}", "private void processDetect(String destinationIP) {\n WeightedGraph graph = WeightedGraph.createFromLSD(this.routerDesc, this.lsd);\n WeightedGraph.Vertex root = graph.getVertex(this.routerDesc.simulatedIPAddress);\n WeightedGraph.Vertex target = graph.getVertex(destinationIP);\n\n if(target == null) {\n LOG.info(\"No target found\");\n return;\n }\n\n graph.execute(root);\n\n List<WeightedGraph.Vertex> path = graph.getPath(target);\n if(path == null) {\n LOG.info(\"No path found\");\n } else {\n WeightedGraph.Vertex from = null;\n StringBuilder pathBuild = new StringBuilder();\n\n for(WeightedGraph.Vertex v : path) {\n if(from != null) {\n WeightedGraph.Edge e = graph.getEdge(from, v);\n pathBuild.append(\" ->(\").append(e.cost).append(\") \");\n }\n\n pathBuild.append(v.value + \" \");\n from = v;\n }\n\n LOG.info(pathBuild.toString());\n }\n }", "public List<node_info> shortestPath(int src, int dest);", "public static String getDirections(String origin, String[] dest)\n\t\tthrows IOException, SAXException, ParserConfigurationException {\n\n\t\tString start = origin.replace(\"\\\\s\", \"%20\");\n\t\tString end = dest[0] + \",\" + dest[1] + \",\" + dest[2];\n\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory\n\t\t\t.newInstance();\n\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\tDocument doc = dBuilder.parse(directionsURL + start\n\t\t\t+ \"&destination=\" + end + \"&sensor=false\");\n\t\tdoc.getDocumentElement().normalize();\n\n\t\tNodeList steps = doc.getElementsByTagName(\"step\");\n\n\t\tString out = \"The routing directions: \\n\";\n\n\t\tfor (int i = 0; i < steps.getLength(); i++) {\n\t\t\tNode currStep = steps.item(i);\n\t\t\tNodeList stepInfo = currStep.getChildNodes();\n\t\t\tString line = stepInfo.item(11).getTextContent();\n\t\t\tStringBuilder temp = new StringBuilder();\n\t\t\tBoolean del = false;\n\t\t\tBoolean needSpace = false;\n\t\t\tfor (int j = 0; j < line.length(); j++) {\n\t\t\t\tif (line.charAt(j) == '<') {\n\t\t\t\t\tdel = true;\n\t\t\t\t\tif (needSpace) {\n\t\t\t\t\t\ttemp.append(\" \");\n\t\t\t\t\t\tneedSpace = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (line.charAt(j) == '>') {\n\t\t\t\t\tdel = false;\n\t\t\t\t\tneedSpace = true;\n\t\t\t\t}\n\t\t\t\telse if (del) {\n\t\t\t\t\t// Do nothing\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttemp.append(line.charAt(j));\n\t\t\t\t\tneedSpace = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (temp.indexOf(\"Destination\") != -1) {\n\t\t\t\tint index = temp.indexOf(\"Destination\");\n\t\t\t\ttemp.insert(index, \"\\n\");\n\t\t\t}\n\n\t\t\tout += temp + \"\\n\";\n\n\t\t}\n\t\treturn out;\n\t}", "Set<ConnectPoint> sourcesFor(McastRoute route, HostId hostId);", "public void findBestRoute(Node src, Node dst) {\r\n\t\tArrayList<Node> route = new ArrayList<>();\r\n\t\tNode curr = src;\r\n\t\twhile (!curr.getName().equals(dst.getName())) {\r\n\t\t\tcurr = curr.getForwardingTable().get(dst);\r\n\t\t\troute.add(curr);\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\"Best route so far is: \");\r\n\t\tfor (Node node : route) {\r\n\t\t\tSystem.out.print(node.getName() + \" \");\r\n\t\t}\r\n\t}", "private String getDirectionsUrl(String origin, String dest){\n\n // Origin of route\n String str_origin = \"origin=\"+origin;\n\n // Destination of route\n String str_dest = \"destination=\"+dest;\n\n // Sensor enabled\n String sensor = \"sensor=false\";\n\n // Building the parameters to the web service\n String parameters = str_origin+\"&\"+str_dest+\"&\"+sensor;\n\n // Output format\n String output = \"xml\";\n\n // Building the url to the web service\n String url = \"https://maps.googleapis.com/maps/api/directions/\"+output+\"?\"+parameters;\n\n return url;\n }", "public OverlayResponse route(Point fromPoint, Point toPoint) throws NodeCodeNotInOverlayGraphException {\n ArrayList<Point> originNeighbours = null;\n ArrayList<Point> destinationNeighbours = null;\n OverlayResponse response = new OverlayResponse(fromPoint, toPoint);\n\n try {\n response.setOriginCode(graph.pointPresentIntoGraph(fromPoint).getCode());\n originNeighbours = new ArrayList<>();\n originNeighbours.add(fromPoint);\n } catch (NodeNotInOverlayGraphException e) {\n originNeighbours = new ArrayList<>(graph.searchNeighbour(fromPoint));\n if(angleNeighboursHint)\n originNeighbours.addAll(graph.\n searchNeighbourWithAngleHint(fromPoint, AngleCalculator.getAngle(fromPoint, toPoint)));\n response.setStartingStep();\n }\n try {\n response.setDestinationCode(graph.pointPresentIntoGraph(toPoint).getCode());\n destinationNeighbours = new ArrayList<>();\n destinationNeighbours.add(toPoint);\n } catch (NodeNotInOverlayGraphException e) {\n destinationNeighbours = new ArrayList<>(graph.searchNeighbour(toPoint));\n if(angleNeighboursHint)\n destinationNeighbours.addAll(graph.\n searchNeighbourWithAngleHint(toPoint, AngleCalculator.getAngle(toPoint, fromPoint)));\n response.setFinalStep();\n }\n return neighboursComputation(response, originNeighbours, destinationNeighbours);\n }", "boolean hasRouteDest();", "private String getUrl(LatLng origin, LatLng dest) {\n\n // Origin of route\n String str_origin = \"origin=\" + origin.latitude + \",\" + origin.longitude;\n\n // Destination of route\n String str_dest = \"destination=\" + dest.latitude + \",\" + dest.longitude;\n\n // Sensor enabled\n String sensor = \"sensor=false\";\n\n // Building the parameters to the web service\n String parameters = str_origin + \"&\" + str_dest + \"&\" + sensor;\n\n // Output format\n String output = \"json\";\n\n// Log.e(\"URL\", \"https://maps.googleapis.com/maps/api/directions/\" + output + \"?\" + parameters);\n\n // Building the url to the web service\n return \"https://maps.googleapis.com/maps/api/directions/\" + output + \"?\" + parameters;\n }", "public ArrayList<Location> getRoute(Location start, Location end) throws LocationNotFound{\n ArrayList<Location> route = new ArrayList<>();\n Location currentLoc = end;\n route.add(end);\n while (!currentLoc.equals(start)) {\n Location parentLoc = currentLoc.getParentLoc();\n route.add(parentLoc);\n currentLoc = parentLoc;\n }\n Collections.reverse(route);\n return route;\n }", "@Override\n public ArrayList<GraphEdge> getRoute(GraphNode a, GraphNode b) {\n \tHashMap<GraphNode, Double> distances = new HashMap<GraphNode, Double>();\n \tHashMap<GraphNode, GraphEdge> predecessor = new HashMap<GraphNode, GraphEdge>();\n \tHashSet<GraphNode> visited = new HashSet<GraphNode>();\n \t\n \tArrayList<GraphEdge> result = new ArrayList<GraphEdge>();\n\t\n \t//Initialize distances, predecessor, and visited\n \tfor(GraphNode g : drivableNodes) {\n \t distances.put(g, Double.MAX_VALUE);\n \t predecessor.put(g, null);\n \t}\n \t\n \tint remaining = drivableNodes.size();\n \t\n \t//Put starting node\n \tdistances.put(a, 0.0);\n \t//predecessor.put(a, null);\n \t\n \t//Main loop\n \twhile(remaining > 0) {\n \t GraphNode closest = null;\n \t double minDist = Double.MAX_VALUE;\n\n \t for(GraphNode n : distances.keySet()) {\n \t\tdouble dist = distances.get(n);\n \t\tif(!visited.contains(n) &&\n \t\t\tdist != Double.MAX_VALUE &&\n \t\t\t(minDist == Double.MAX_VALUE || dist < minDist)) {\n \t\t closest = n;\n \t\t minDist = dist;\n \t\t}\n \t }\n \t \n \t if(closest == null)\n \t\treturn null;\n \t \n \t if(closest.equals(b))\n \t\tbreak;\n \t \n \t visited.add(closest);\n \t \n \t for(GraphEdge edge : closest.getEdges()) {\n \t\tGraphNode adjacent = edge.getOtherNode(closest);\n \t\tif(adjacent != null && !visited.contains(adjacent)) {\n \t\t //Map distance value for the other Node\n \t\t double otherDist = distances.get(adjacent);\n \t\t //Weight of edge from closest node to adjacent node\n \t\t double weight = edge.getWeight();\n \t\t String way = edge.getWay();\n \t\t \n \t\t if(otherDist == Double.MAX_VALUE ||\n \t\t\t weight + minDist < otherDist) {\n \t\t\tdistances.put(adjacent, weight + minDist);\n \t\t\t\n \t\t\t//Make new edge in correct order\n \t\t\tGraphEdge corrected = new GraphEdge(closest, adjacent, weight, way);\n \t\t\t\n \t\t\tpredecessor.put(adjacent, corrected);\n \t\t }\n \t\t}\n \t }\n\n \t remaining--;\n \t}\n \t\n \t//Backtrack to build route\n \tif(distances.get(b) == Double.MAX_VALUE) {\n \t return null;\n \t} else {\n \t //buildPath(predecessor, a, b, result);\n \t //Non recursive version\n \t Stack<GraphEdge> stack = new Stack<GraphEdge>(); \n \t while(!b.equals(a)) {\n \t\tGraphEdge edge = predecessor.get(b);\n \t\t\n \t\t//Make sure vertices are in correct order\n \t\tGraphNode start = edge.getOtherNode(b);\n \t\t//double weight = edge.getWeight();\n \t\t//GraphEdge corrected = new GraphEdge(start, b, weight);\n \t\t\n \t\tstack.push(edge);\n \t\tb = start;\n \t }\n \t \n \t while(!stack.isEmpty()) {\n \t\tGraphEdge edge = stack.pop();\n \t\tresult.add(edge);\n \t }\n \t}\n \t\n\treturn result;\n }", "public Route getRoute() throws SQLException {\n\t\tsortedOrders = sortReadyOrders();\n\t\tList<Vertex> verts = bgCtr.getVertList();\n\t\tList<Vertex> vertsForRoute = new LinkedList<>();\n\t\tList<Vertex> routeList = new LinkedList<>();\n\n\t\tVertex hansGrillBar = bgCtr.getVertList().get(0);\n\n\t\tvertsForRoute.add(hansGrillBar);\n\n\t\tfor (int i = 0; i < sortedOrders.size(); i++) {\n\t\t\tString address = sortedOrders.get(i).getPers().getAddress();\n\t\t\tfor (int j = 0; j < verts.size(); j++) {\n\t\t\t\tif (verts.get(j).getName().equalsIgnoreCase(address)) {\n\t\t\t\t\tvertsForRoute.add(verts.get(j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < vertsForRoute.size(); i++) {\n\t\t\tint count = i + 1;\n\t\t\tList<Vertex> tempRouteList = new LinkedList<>();\n\t\t\tif (!(count >= vertsForRoute.size())) {\n\t\t\t\tVertex source = vertsForRoute.get(i);\n\t\t\t\tVertex target = vertsForRoute.get(count);\n\t\t\t\ttempRouteList = generateTempRouteList(source, target);\n\t\t\t\tif (!source.equals(target)) {\n\t\t\t\t\tfor (int j = 0; j < tempRouteList.size(); j++) {\n\t\t\t\t\t\tif (!source.equals(tempRouteList.get(j))) {\n\t\t\t\t\t\t\tif (routeList.isEmpty()) {\n\t\t\t\t\t\t\t\trouteList.add(tempRouteList.get(j));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\trouteList.add(tempRouteList.get(j));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tRoute route = new Route(routeList);\n\t\tcreateRoute(route);\n\t\treturn route;\n\t}", "private void source_to_dest_path(int source, int dest, int[] forward_dist_tab, int[] list_Prevoius_Node, ArrayList<Integer> del_router)\n\t{\n\t\tif(del_router != null && del_router.contains(dest))\n\t\t\tSystem.out.println(\"Router \"+ (dest+1) +\" is deleted\");\n\t\telse if(del_router != null && del_router.contains(source))\n\t\t\tSystem.out.println(\"Router \"+ (source+1) +\" is deleted\");\n\t\telse\n\t\t{\n\t\t\tint[] prevNodes_List = list_Prevoius_Node;\n\t\t\tint k = dest;\n\t\t\tString path = \"\" + (dest+1);\n\t\t\t\n\t\t\t//Check if node is reachable that if it is connected in the graph then only proceed further\n\t\t\tif(forward_dist_tab[dest] != INFINITE_DIST)\n\t\t\t{\n\t\t\t\twhile(prevNodes_List[k] != source)\n\t\t\t\t{\n\t\t\t\t\tpath += \" >- \" + (prevNodes_List[k] + 1);\n\t\t\t\t\tk = prevNodes_List[k];\n\t\t\t\t}\n\t\t\t\t//for source node\n\t\t\t\tpath += \" >- \" + (source+1);\n\t\t\t\t\n\t\t\t\t//Back traversal is done using the previous node list\n\t\t\t\tString disp_path= new StringBuilder(path).reverse().toString();\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\\nShortest distance from \"+ (source+1) +\" to \"+ (dest+1) +\":\");\n\t\t\t\tSystem.out.println(\"PATH: \"+ disp_path);\n\t\t\t\tSystem.out.println(\"COST: \" + forward_dist_tab[dest]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"\\nRouter \"+ (dest+1) +\" is dead or unreachable.\");\n\t\t\t}\n\t\t}\n\t}", "private String getDirectionsUrl(LatLng origin, LatLng dest) {\n // Parameter toa do nguon\n String str_origin = \"origin=\" + origin.latitude + \",\" + origin.longitude;\n // Parameter toa do dich\n String str_dest = \"destination=\" + dest.latitude + \",\" + dest.longitude;\n // Parameter sensor\n String sensor = \"sensor=false\";\n // Parameter di bo\n String mode = \"mode=walking\";\n // Parameter api key\n String key = \"key=\" + getString(R.string.map_api_key);\n // Gop tat ca parameter lai\n String parameters = str_origin + \"&\" + str_dest + \"&\" + sensor + \"&\" + mode + \"&\" + key;\n // Parameter ket qua tra ve dang json\n String output = \"json\";\n // Duong link sinh ra\n String url = \"https://maps.googleapis.com/maps/api/directions/\" + output + \"?\" + parameters;\n return url;\n }", "public Object getDestination() {\n/* 339 */ return this.peer.getTarget();\n/* */ }", "Set<ConnectPoint> sinksFor(McastRoute route);", "private int findAllRoutesBetweenTowns(Town origin, \n\t\t\tTown destination, int weight, \n\t\t\tint maxDistance) {\n\t\tint routes = 0;\n\t\tif (this.routingTable.containsKey(origin) && \n\t\t\t\tthis.routingTable.containsKey(\n\t\t\t\t\t\tdestination)) {\n\n\t\t\tEdge edge = this.routingTable.get(origin);\n\t\t\twhile (edge != null) {\n\t\t\t\tweight += edge.weight;\n\t\t\t\tif (weight <= maxDistance) {\n\t\t\t\t\tif (edge.destination.equals(\n\t\t\t\t\t\t\tdestination)) {\n\t\t\t\t\t\troutes++;\n\t\t\t\t\t\troutes += \n\t\t\t\t\t\t\tfindAllRoutesBetweenTowns(\n\t\t\t\t\t\t\t\tedge.destination, \n\t\t\t\t\t\t\t\tdestination, weight, \n\t\t\t\t\t\t\t\tmaxDistance);\n\t\t\t\t\t\tedge = edge.next;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\troutes += \n\t\t\t\t\t\t\tfindAllRoutesBetweenTowns(\n\t\t\t\t\t\t\t\tedge.destination, \n\t\t\t\t\t\t\t\tdestination, weight, \n\t\t\t\t\t\t\t\tmaxDistance);\n\t\t\t\t\t\tweight -= edge.weight;\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t\tweight -= edge.weight;\n\n\t\t\t\tedge = edge.next;\n\t\t\t}\n\t\t} else {\n\t\t\tnoRouteException();\n\n\t\t}\n\t\treturn routes;\n\n\t}", "com.google.protobuf.ByteString\n getRouteDestBytes();", "public void findShortestRoute(Point2D start, Point2D end){\n fastestPath = null;\n try {\n RouteFinder routeFinder = new RouteFinder(start, end);\n travelMethod(routeFinder);\n routeFinder.setShortestRoute();\n shortestPath = routeFinder.getShortestPath();\n setTravelInfo(routeFinder);\n RoutePlanner routePlanner = new RoutePlanner(shortestPath);\n addToDirectionPane(routePlanner.getDirections());\n }catch(IllegalArgumentException | NullPointerException e){\n addToDirectionPane(new String[]{\"No shortest path between the two locations was found\"});\n setTravelInfo(null);\n shortestPath = null;\n }\n\n repaint();\n\n }", "public List<String> getShortestRoute(String start, String end) {\n\t\tif (!vertices.contains(start)) return null;\n\t\tMap<String, Vertex> verticesWithDistance = new HashMap<String, Vertex>();\n\t\tVertex starting = new Vertex(start, 0);\n\t\tverticesWithDistance.put(start, starting);\n\t\tstarting.route.add(starting.name);\n\t\tfor (String v : vertices) {\n\t\t\tif (!v.equals(start))\n\t\t\t\tverticesWithDistance.put(v, new Vertex(v, -1));\n\t\t}\n\t\treturn searchByDijkstra(starting, end , verticesWithDistance);\n\t}", "public IAirport getDestination();", "private Path findShortestPath(Address start, Address destination) throws Exception{\n HashMap<Intersection, Segment> pi = dijkstra(start);\n Segment seg = pi.get(destination);\n if(seg == null){\n throw new Exception();\n }\n LinkedList<Segment> newPathComposition = new LinkedList<>();\n Path newPath = new Path(start, destination, newPathComposition);\n newPathComposition.add(seg);\n while (!seg.getOrigin().equals(start)) {\n Intersection s = seg.getOrigin();\n seg = pi.get(s);\n if(seg == null){\n throw new Exception();\n }\n newPathComposition.add(seg);\n }\n Collections.reverse(newPathComposition);\n newPath.setSegmentsOfPath(newPathComposition);\n return newPath;\n }", "public BestPath getBestPath(String origin, String destination, FlightCriteria criteria) {\r\n\t\tint originIndex = 0;\r\n\t\tif(airportNames.contains(origin)){\r\n\t\t\toriginIndex = airportNames.indexOf(origin);\r\n\t\t}\r\n\t\tint destinationIndex = 0;\r\n\t\tif(airportNames.contains(destination)){\r\n\t\t\tdestinationIndex = airportNames.indexOf(destination);\r\n\t\t}\r\n\t\tAirport start = allAirports.get(originIndex);\r\n\t\tAirport goal = allAirports.get(destinationIndex);\r\n\r\n\t\tPriorityQueue<Airport> queue = new PriorityQueue<Airport>();\r\n\t\tLinkedList<String> path = new LinkedList<String>();\r\n\r\n\t\tstart.setWeight(0);\r\n\t\tqueue.add(start);\r\n\t\tAirport current;\r\n\t\twhile(!queue.isEmpty()) {\r\n\t\t\tcurrent = queue.poll();\r\n\t\t\tif(current.compareTo(goal) == 0) {\r\n\t\t\t\tdouble finalWeight = current.getWeight();\r\n\t\t\t\twhile(current.compareTo(start) != 0){\r\n\t\t\t\t\tpath.addFirst(current.getAirport());\r\n\t\t\t\t\tcurrent = current.getPrevious();\r\n\t\t\t\t}\r\n\t\t\t\tpath.addFirst(start.getAirport());\r\n\t\t\t\tBestPath bestPath = new BestPath(path, finalWeight);\r\n\t\t\t\treturn bestPath;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent.visited = true;\r\n\t\t\tAirport neighbor = current;\r\n\t\t\tArrayList<Flight> currentFlights;\r\n\t\t\tfor (int i = 0; i < current.size(); i++){\r\n\t\t\t\tcurrentFlights = new ArrayList<Flight>();\r\n\t\t\t\tcurrentFlights = current.getOutgoingFlights();\r\n\t\t\t\tneighbor = currentFlights.get(i).getDestination();\r\n\t\t\t\t\r\n\t\t\t\tdouble neighborWeight = neighbor.getWeight();\r\n\t\t\t\tcurrentFlights.get(i).setWeight(criteria);\r\n\t\t\t\tdouble flightWeight = currentFlights.get(i).getFlightWeight();\r\n\t\t\t\tif(neighborWeight > (current.getWeight() + flightWeight)){\r\n\t\t\t\t\tqueue.add(neighbor);\r\n\t\t\t\t\tneighbor.setPrevious(current);\r\n\t\t\t\t\tneighbor.setWeight(current.getWeight() + flightWeight);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "protected MoveToTask searchAccessPoint(final Point start, final Point target, final Goblin goblin) {\n\t\tObjects.requireNonNull(start, \"start must not be null!\");\n\t\tObjects.requireNonNull(target, \"target must not be null!\");\n\t\tObjects.requireNonNull(goblin, \"goblin must not be null!\");\n\n\t\tfor (Point neighbour : target.getNeighbours()) {\n\t\t\tif (goblin.getAI().getBlockadeMap().isBlocked(neighbour)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tMoveToTask path = new MoveToTask(start, neighbour, goblin, goblin.getAI().getBlockadeMap());\n\n\t\t\tif (path.hasPath()) {\n\t\t\t\treturn path;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "private String getUrl(LatLng origin, LatLng dest, String directionMode) {\n // Origin of route\n str_origin = \"origin=\" + origin.latitude + \",\" + origin.longitude;\n // Destination of route\n str_dest = \"destination=\" + dest.latitude + \",\" + dest.longitude;\n // Mode\n String mode = \"mode=\" + directionMode;\n // Building the parameters to the web service\n String parameters = str_origin + \"&\" + str_dest + \"&\" + mode;\n // Output format\n String output = \"json\";\n // Building the url to the web service\n String url = \"https://maps.googleapis.com/maps/api/directions/\" + output + \"?\" + parameters + \"&key=\" + getString(R.string.google_maps_key);\n return url;\n }", "private DirectionsResult getDirectionsDetails(String origin,String destination,TravelMode mode) {\n DateTime now = new DateTime();\n try {\n //Here we request the route from the Directions API. GeoContext is just a verifier for DirectionsAPI\n //so it doesn't take some random requests. It knows this API is trying to access the API and will return the route\n return DirectionsApi.newRequest(getGeoContext())\n //Pass in the MODE, origin, destination, and time. Time is set to right now based on the the line of code above\n .mode(mode)\n .origin(origin)\n .destination(destination)\n .departureTime(now)\n .await();\n } catch (ApiException e) {\n e.printStackTrace();\n return null;\n } catch (InterruptedException e) {\n e.printStackTrace();\n return null;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "public interface RoutingAlgorithm {\n public void initMapInfo(int[][] map);\n public int getShortestPath(int start,int end);\n}", "List<Route> getRoutesByArrival(String arrival);", "public int shortestRouteBetweenTowns(Town origin, \n\t\t\tTown destination) {\n\t\treturn findShortestRoute(origin, \n\t\t\t\tdestination, 0, 0);\n\t}", "public void findFastestRoute(Point2D start, Point2D end){\n shortestPath = null;\n try {\n RouteFinder routeFinder = new RouteFinder(start, end); //Create a RouteFinder and let it handle it.\n travelMethod(routeFinder);\n routeFinder.setFastestRoute();\n fastestPath = routeFinder.getFastestPath(); //retrieve the fastest route from it\n setTravelInfo(routeFinder);\n RoutePlanner routePlanner = new RoutePlanner(fastestPath); //create a routePlanner to get direction for path\n addToDirectionPane(routePlanner.getDirections());\n }catch(IllegalArgumentException | NullPointerException e){\n addToDirectionPane(new String[]{\"No fastest path between the two locations was found\"});\n setTravelInfo(null);\n fastestPath = null;\n\n }\n\n repaint();\n\n }", "public List<Route> findRoutesByCountries(String fromCountry, String toCountry) {\n List<Route> res = em.createQuery(\r\n \"SELECT rt FROM Route as rt \" + \" JOIN FETCH rt.routeId.source as src \"\r\n + \" JOIN FETCH rt.routeId.destination dst \" + \"WHERE src.country=:from AND dst.country=:to\",\r\n Route.class).setParameter(\"from\", fromCountry).setParameter(\"to\", toCountry).getResultList();\r\n return res;\r\n }", "@Override\n public void calcRoute(final GeoPoint origin, final GeoPoint destination, double bearing, CallbackOnlineRouteReceiver callback){\n final String origLatLong = origin.getLatitude() + \",\" + origin.getLongitude();\n String destLatLong = destination.getLatitude() + \",\" + destination.getLongitude();\n\n // converting the heading to a string\n String heading = String.valueOf(bearing).split(\"\\\\.\")[0];\n\n // then we make the request to Bing API\n BingRequests mapsService = RoutingAPIs.getInstance().connectToBingMaps();\n Call<BingRespGetRoute> responseGetRoute =\n mapsService.requestDirections(\n origLatLong,\n destLatLong,\n heading,\n NavConfig.getLanguageTag(),\n NavConfig.API_KEY);\n\n // enqueuing the response\n responseGetRoute.enqueue(new Callback<BingRespGetRoute>() {\n @Override\n public void onResponse(@NonNull Call<BingRespGetRoute> call, @NonNull Response<BingRespGetRoute> response) {\n\n if (response.isSuccessful() && response.body() != null) {\n // once we get a successful response...\n List<RoutePoint> routePoints = new ArrayList<>(); // we start a new list of RoutePoints, that will be returned\n\n try {\n // we get a list of all the route points\n List<GeoPoint> routeGeoPoints = response.body()\n .getBingRouteResourceSets()[0]\n .getResources()[0]\n .getRoutePath()\n .getLine()\n .getLinePoints();\n\n // then we get a list of all pertinent data from the Bing API\n BingRouteLeg[] bingRouteLegs = response.body()\n .getBingRouteResourceSets()[0]\n .getResources()[0]\n .getRouteLegs();\n\n List<BingItineraryItem> allItems = new ArrayList<>();\n for (BingRouteLeg currentLeg : bingRouteLegs) {\n // adding all itinerary items on the same list (itinerary items encapsulate traffic info, instructions, ...)\n allItems.addAll(Arrays.asList(currentLeg.getItineraryItems()));\n }\n\n // we create a final version of our items list\n final List<BingItineraryItem> allInstructions = new ArrayList<>(allItems);\n\n // finally, we create a string with all route point coordinates to feed the snap to roads request\n String pointsString = \"\";\n for (GeoPoint point : routeGeoPoints) {\n pointsString = pointsString.concat(String.valueOf(point.getLatitude()))\n .concat(\",\")\n .concat(String.valueOf(point.getLongitude()))\n .concat(\";\");\n }\n // for the last point, we simply remove the final \";\"\n pointsString = pointsString.substring(0, pointsString.length() - 1);\n\n Log.d(TAG, \"Bing request Get Route was successful. Requesting snap to roads.\");\n // once we get a successful response, we make a new snap to roads request\n Call<BingRespSnapToRoad> responseSnapToRoad =\n mapsService.requestSnapToRoad(\n pointsString,\n NavConfig.API_KEY);\n\n // enqueuing the snap to roads response\n responseSnapToRoad.enqueue(new Callback<BingRespSnapToRoad>() {\n\n @Override\n public void onResponse(Call<BingRespSnapToRoad> call, Response<BingRespSnapToRoad> response) {\n\n try {\n\n BingSnappedPoint[] snappedPoints\n = response.body()\n .getBingSnapResourceSets()[0]\n .getResources()[0]\n .getSnappedPoints();\n\n List<RoutePoint> allRoutePoints = new ArrayList<>();\n\n // now we build each RoutePoint\n for (BingSnappedPoint point : snappedPoints) {\n\n double latitude = point.getCoordinates().getLatitude();\n double longitude = point.getCoordinates().getLongitude();\n\n GeoPoint gp = new GeoPoint(latitude, longitude);\n RoutePoint newRP = new RoutePoint(gp);\n\n newRP.setStreetName(point.getStreetName());\n newRP.setRecommendedSpeed(String.valueOf(point.getSpeedLimit()));\n\n allRoutePoints.add(newRP);\n }\n\n /* we end up with two parallel lists. One with all the points (allRoutePoints) and another\n with all the instruction data (allInstructions). We have to join them together. We'll cycle\n through all instructions and, for each one, we'll find the closest RoutePoint. Once we do,\n we simply assign all the instructions to that point */\n\n for (BingItineraryItem currentItem : allInstructions) {\n\n // for each item, we find its closest RoutePoint\n RoutePoint closestPoint = findClosestRoutePoint(currentItem, allRoutePoints);\n\n // and complement it\n if (closestPoint != null)\n complementRoutePointFromItem(closestPoint, currentItem);\n\n }\n callback.returnSuccess(allRoutePoints);\n\n } catch (Exception e) {\n Log.e(TAG, \"Exception while retrieving snap to roads: \" + response.message());\n Log.e(TAG, \"Processing original request\");\n e.printStackTrace();\n\n // On failure, we process our original response, without the snapped points\n List<RoutePoint> originalResponseRPs = processOriginalResponse(routeGeoPoints, allInstructions);\n callback.returnSuccess(originalResponseRPs);\n }\n }\n\n @Override\n public void onFailure(Call<BingRespSnapToRoad> call, Throwable throwable) {\n Log.e(TAG, \"ERROR while retrieving Bing snap to roads request. Processing original request\");\n // On failure, we process our original response, without the snapped points\n List<RoutePoint> originalResponseRPs = processOriginalResponse(routeGeoPoints, allInstructions);\n callback.returnSuccess(originalResponseRPs);\n }\n });\n\n } catch (Exception e) {\n Log.e(TAG, \"Exception while retrieving route: \" + response.message());\n e.printStackTrace();\n callback.returnFailure(origin, destination); // calculate an offline route on failure\n }\n } else {\n Log.e(TAG, \"Route request not accepted: \" + response.message());\n callback.returnFailure(origin, destination); // calculate an offline route on failure\n }\n }\n @Override\n public void onFailure(@NonNull Call<BingRespGetRoute> call, @NonNull Throwable t) {\n Log.w(TAG, \"No connection.\");\n callback.returnFailure(origin, destination); // calculate an offline route on failure\n }\n });\n }", "public String getDestination() {\r\n return this.destination;\r\n }", "List<Destination> findAllDestinations();", "Route(String source,String destination,String departingDate,String returningDate)\r\n {\r\n this.Source=source;\r\n this.destination=destination;\r\n this.departingDate=departingDate;\r\n this.returningDate=returningDate;\r\n }", "public void calculateRoute() {\n SKRouteSettings route = new SKRouteSettings();\n route.setStartCoordinate(start);\n route.setDestinationCoordinate(end);\n route.setNoOfRoutes(1);\n switch (routingType) {\n case SHORTEST:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_SHORTEST);\n break;\n case FASTEST:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_FASTEST);\n break;\n case QUIET:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_QUIETEST);\n break;\n }\n route.setRouteExposed(true);\n SKRouteManager.getInstance().calculateRoute(route);\n }", "public java.lang.String getDestination(){return this.destination;}", "protected abstract Deque<Vertex<AtomicReference>> getVehicleRoute(int entry, int exit);", "List<Route> getAllRoute();", "public Location getDestination()\r\n\t{ return this.destination; }", "private String getUrl(LatLng origin, LatLng destination, String directionMode) {\n // Origin of route\n String str_origin = \"origin=\" + origin.latitude + \",\" + origin.longitude;\n // Destination of route\n String str_dest = \"destination=\" + destination.latitude + \",\" + destination.longitude;\n // Mode of transport\n String mode = \"mode=\" + directionMode;\n // Building the parameters to the web service\n String parameters = str_origin + \"&\" + str_dest + \"&\" + mode;\n // Output format\n String output = \"json\";\n // Building the url to the web service\n String url = \"https://maps.googleapis.com/maps/api/directions/\" + output + \"?\" + parameters + \"&key=\" + getString(R.string.google_directions_key);\n return url;\n }", "public List<RangerRequest> createSourceToDestinationRequests(URI source, URI destination) {\n List<RangerRequest> ret = new ArrayList<>();\n ret.add(new RangerRequest(user, userGroups, getObjectPath(source), READ));\n ret.add(new RangerRequest(user, userGroups, getObjectDirPath(destination), WRITE));\n return ret;\n }", "boolean hasRoute(Node to);", "public static List<CampusGraph.Edges<String, String>> findPath(CampusGraph<String, String> cg, String start, String destination) {\n if (cg == null || start == null || destination == null) {\n throw new IllegalArgumentException();\n }\n Queue<String> visitedNodes = new LinkedList<>();\n Map<String, List<CampusGraph.Edges<String, String>>> paths = new HashMap<>();\n visitedNodes.add(start); // Add start to Q\n paths.put(start, new LinkedList<>()); // Add start->[] to M (start mapped to an empty list)\n\n while (!visitedNodes.isEmpty()) {\n String currentNode = visitedNodes.remove();\n if (currentNode.equals(destination)) { // found the path\n return paths.get(currentNode);\n } else {\n List<CampusGraph.Edges<String, String>> neighbors = cg.getAllChildren(currentNode);\n neighbors.sort(new Comparator<CampusGraph.Edges<String, String>>() {\n @Override\n public int compare(CampusGraph.Edges<String, String> o1, CampusGraph.Edges<String, String> o2) {\n int cmpEndNode = o1.getEndTag().compareTo(o2.getEndTag());\n if (cmpEndNode == 0) {\n return o1.getEdgeLabel().compareTo(o2.getEdgeLabel());\n }\n return cmpEndNode;\n }\n }); // ascending list. Sort characters and books names all at once??\n\n for (CampusGraph.Edges<String, String> e: neighbors) {\n String neighbor = e.getEndTag();\n if (!paths.containsKey(neighbor)) { // i.e. if the neighbor is unvisited\n List<CampusGraph.Edges<String, String>> pathCopy = new LinkedList<>(paths.get(currentNode));\n pathCopy.add(e);\n paths.put(neighbor, pathCopy); // add the path exclusive to this neighbor\n visitedNodes.add(neighbor); // then, mark the neighbor as visited\n }\n }\n }\n }\n return null; // No destination found\n }", "private void getPathToMRT(LatLng origin, LatLng des) {\n\t\tStringBuilder sb = new StringBuilder(URL_GOOGLE_DIRECTIONS_API);\n\t\tsb.append(PARAM_ORIGIN + String.valueOf(origin.latitude) + \",\"\n\t\t\t\t+ String.valueOf(origin.longitude));\n\t\tsb.append(PARAM_DEST + String.valueOf(des.latitude) + \",\"\n\t\t\t\t+ String.valueOf(des.longitude));\n\t\tsb.append(PARAM_MODE);// distance less than 1km\n\t\tsb.append(PARAM_SENSOR);\n\n\t\tif (D)\n\t\t\tLog.d(TAG, \"the request sent was \" + sb.toString());\n\t\t// sb.append(\"&rankby=distance\");\n\t\t// sb.append(\"&key=AIzaSyCCPl_JtGPUQaQ9yZIyK-dvsduyWZy4ZAs\");\n\n\t\t// Creating a new non-ui thread task to download Google place json data\n\t\t// DirectionsTask dirTask = new DirectionsTask();\n\t\tJsonTask jsonTask = new JsonTask(this, TASK_DIRECTIONS_DOWNLOAD);\n\n\t\t// Invokes the \"doInBackground()\" method of the class PlaceTask\n\t\tjsonTask.execute(sb.toString());\n\t}", "public RouteObject(\n NsiTopology topology,\n SimpleStp srcStpId,\n SimpleStp dstStpId,\n DirectionalityType directionality,\n Optional<StpListType> ero) throws WebApplicationException {\n\n // Each segment of the a path is assigned a route object with an A and Z end.\n Route route = new Route();\n\n // Get the set of possible source STP identifiers (a range could be provided).\n StpTypeBundle srcBundle = new StpTypeBundle(topology, srcStpId, directionality);\n if (srcBundle.isEmpty()) {\n log.error(\"RouteObject: source STP does not exist in topology: \" + srcStpId.toString());\n throw Exceptions.stpResolutionError(srcStpId.toString());\n }\n\n route.setBundleA(srcBundle);\n\n // Now we process any ERO elements if present.\n if (ero.isPresent()) {\n // We need to process the ERO in order that it was specified.\n List<OrderedStpType> orderedSTP = ero.get().getOrderedSTP();\n Collections.sort(orderedSTP, new CustomComparator());\n\n // Our first processed segment starts with our source STP.\n SimpleStp lastStp = srcStpId;\n\n for (OrderedStpType stp : orderedSTP) {\n // Parse this STP and generate a bundle enumerating all the STP. The\n // specified STP must exist in topology for a bundle to be generated.\n SimpleStp nextStp = new SimpleStp(stp.getStp());\n StpTypeBundle nextBundle = new StpTypeBundle(topology, nextStp, directionality);\n\n // If we did not find an associated bundle the specified ERO STP may\n // be an internal STP used for a domain's internal path computation.\n if (nextBundle.isEmpty()) {\n // The one rule we have is that an internal STP must be bounded by\n // at least one externally visible STP from the same domain. This\n // check is to see if the previous STP was in the same domain.\n //if (!nextStp.getNetworkId().equalsIgnoreCase(lastStp.getNetworkId())) {\n //log.error(\"RouteObject: Internal STP not bounded by external STP: \" + stp.getStp());\n //throw Exceptions.invalidEroError(stp.getStp());\n //}\n\n // Save this internal STP.\n route.addInternalStp(stp.getStp());\n }\n else {\n // We have an inter-domain STP so save it and get the SDP\n // so we know the STP on far end. We may need to filter some\n // of these out if there is no corresponding SDP (mismatching\n // labels on each end of the link).\n nextBundle = nextBundle.getPeerReducedBundle();\n if (nextBundle.isEmpty()) {\n log.error(\"RouteObject: ERO STP not associated with SDP: \" + stp.getStp());\n throw Exceptions.invalidEroError(stp.getStp());\n }\n\n // We have completed this path segment by finding a external\n // interdomain STP.\n route.setBundleZ(nextBundle);\n routes.add(route);\n\n // Now create the bundle associated with the other end of SDP.\n route = new Route();\n\n StpTypeBundle lastBundle = new StpTypeBundle();\n\n for (StpType member : nextBundle.values()) {\n SdpType sdp = topology.getSdp(member.getSdp().getId());\n if (sdp == null) {\n log.error(\"RouteObject: ERO STP not associated with valid SDP in context of request: \" + stp.getStp());\n throw Exceptions.invalidEroMember(stp.getStp());\n }\n if (member.getId().equalsIgnoreCase(sdp.getDemarcationA().getStp().getId())) {\n lastBundle.addStpType(topology.getStp(sdp.getDemarcationZ().getStp().getId()));\n }\n else {\n lastBundle.addStpType(topology.getStp(sdp.getDemarcationA().getStp().getId()));\n }\n }\n\n if (lastBundle.isEmpty()) {\n log.error(\"RouteObject: ERO STP not associated with SDP: \" + stp.getStp());\n throw Exceptions.invalidEroError(stp.getStp());\n }\n\n route.setBundleA(lastBundle);\n lastStp = lastBundle.getSimpleStp();\n }\n }\n }\n\n // Add the original destination endpoint after any inserted ERO points.\n StpTypeBundle dstBundle = new StpTypeBundle(topology, dstStpId, directionality);\n if (dstBundle.isEmpty()) {\n log.error(\"RouteObject: destination STP does not exist in topology: \" + dstStpId.toString());\n throw Exceptions.stpResolutionError(dstStpId.toString());\n }\n\n route.setBundleZ(dstBundle);\n\n // Add this last route to our list of one or more routes.\n routes.add(route);\n\n // We have completed building the ERO but need to check for internal\n // consistency.\n routes.forEach(r -> {\n StpTypeBundle bundleA = r.getBundleA();\n StpTypeBundle bundleZ = r.getBundleZ();\n SimpleStp stpA = bundleA.getSimpleStp();\n SimpleStp stpZ = bundleZ.getSimpleStp();\n\n String network = stpA.getNetworkId();\n for (OrderedStpType internalStp : r.getInternalStp()) {\n SimpleStp istp = new SimpleStp(internalStp.getStp());\n if (!istp.getNetworkId().equalsIgnoreCase(network)) {\n network = stpZ.getNetworkId();\n if (!istp.getNetworkId().equalsIgnoreCase(network)) {\n log.error(\"RouteObject: internal STP {} not a member of networkA {} or networkZ {}\",\n istp.getStpId(), stpA.getNetworkId(), stpZ.getNetworkId());\n throw Exceptions.invalidEroError(istp.getStpId());\n }\n }\n }\n });\n }", "public Collection<RouteBean> findDestinations(String origin) {\n\t\tRouteBean rb = null;\n\t\tCollection<RouteBean> rbs = new ArrayList<RouteBean>();\n\n\t\ttry {\n\t\t\tStatement st = conn.createStatement();\n\t\t\tResultSet rs = null;\n\t\t\trs = st.executeQuery(\"SELECT DISTINCT(destination) FROM route r,bus b where r.rid=b.rid AND origin='\"+origin+\"'\");\n\t\t\twhile (rs.next()) {\n\t\t\t\trb = new RouteBean();\n\t\t\t\trb.setDestination(rs.getString(\"destination\"));\n\t\t\t\trbs.add(rb);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn rbs;\n\t}", "public BestPath getBestPath(String origin, String destination, FlightCriteria criteria, String airliner) {\r\n\t\tint originIndex = 0;\r\n\t\tif(airportNames.contains(origin)){\r\n\t\t\toriginIndex = airportNames.indexOf(origin);\r\n\t\t}\r\n\t\tint destinationIndex = 0;\r\n\t\tif(airportNames.contains(destination)){\r\n\t\t\tdestinationIndex = airportNames.indexOf(destination);\r\n\t\t}\r\n\t\tAirport start = allAirports.get(originIndex);\r\n\t\tAirport goal = allAirports.get(destinationIndex);\r\n\r\n\t\tPriorityQueue<Airport> queue = new PriorityQueue<Airport>();\r\n\t\r\n\t\tLinkedList<String> path = new LinkedList<String>();\r\n\r\n\t\tstart.setWeight(0);\r\n\t\tqueue.add(start);\r\n\t\tAirport current;\r\n\t\twhile(!queue.isEmpty()) {\r\n\t\t\tcurrent = queue.poll();\r\n\t\t\t\r\n\t\t\tif(current.compareTo(goal) == 0) {\r\n\t\t\t\tdouble finalWeight = current.getWeight();\r\n\t\t\t\t\r\n\t\t\t\twhile(current.compareTo(start) != 0){\r\n\t\t\t\t\t\r\n\t\t\t\t\tpath.addFirst(current.getAirport());\r\n\t\t\t\t\tcurrent = current.getPrevious();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tpath.addFirst(start.getAirport());\r\n\t\t\t\tBestPath bestPath = new BestPath(path, finalWeight);\r\n\t\t\t\treturn bestPath;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent.visited = true;\r\n\t\t\tAirport neighbor = current;\r\n\t\t\tArrayList<Flight> currentFlights;\r\n\t\t\tfor (int i = 0; i < current.size(); i++){\r\n\t\t\t\tcurrentFlights = new ArrayList<Flight>();\r\n\t\t\t\tcurrentFlights = current.getOutgoingFlights();\r\n\t\t\t\tneighbor = currentFlights.get(i).getDestination();\r\n\t\t\t\tdouble neighborWeight = neighbor.getWeight();\r\n\t\t\t\tcurrentFlights.get(i).setWeight(criteria);\r\n\t\t\t\tdouble flightWeight = currentFlights.get(i).getFlightWeight();\r\n\t\t\t\tif((neighborWeight > (current.getWeight() + flightWeight)) && currentFlights.get(i).getCarrier() == airliner){\r\n\t\t\t\t\tqueue.add(neighbor);\r\n\t\t\t\t\tneighbor.setPrevious(current);\r\n\t\t\t\t\tneighbor.setWeight(current.getWeight() + flightWeight);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Location getDestination() {\r\n return destination;\r\n }", "public static APIRequestTask requestDirections(String from, String to) {\n\t\tURLParameter _from = new URLParameter(\"origin\", from);\n\t\tURLParameter _to = new URLParameter(\"destination\", to);\n\t\tURLParameter _sensor = new URLParameter(\"sensor\", \"false\");\n\n\t\tAPIRequestTask task = new APIRequestTask(directions_url);\n\t\ttask.execute(_from, _to, _sensor);\n\t\treturn task;\n\t}", "public List<Node> computeDijkstraShortestPath(Node source, Node destination) {\n\n source.minDistance = 0.;\n PriorityQueue<Node> nodeQueue = new PriorityQueue<Node>();\n nodeQueue.add(source);\n\n int destinationGroup = destination._groupID;\n\n while (!nodeQueue.isEmpty()) {\n Node v = nodeQueue.poll();\n\n Log.i(\"bbb\", \"In dijsk node name \"+ v._waypointName);\n //Stop searching when reach the destination node\n\n\n if(destinationGroup!=0){\n\n if(v._groupID==destinationGroup){\n destination = navigationGraph.get(navigationGraph.size()-1).nodesInSubgraph.get(v._waypointID);\n Log.i(\"bbb\", \"destination is: \"+destination._waypointName);\n\n break;\n }\n\n }\n\n if (v._waypointID.equals(destination._waypointID))\n break;\n\n\n // Visit each edge that is adjacent to v\n for (Edge e : v._edges) {\n Node a = e.target;\n Log.i(\"bbb\", \"node a \"+a._waypointName);\n double weight = e.weight;\n double distanceThroughU = v.minDistance + weight;\n if (distanceThroughU < a.minDistance) {\n nodeQueue.remove(a);\n a.minDistance = distanceThroughU;\n a.previous = v;\n Log.i(\"bbb\", \"set previous\");\n nodeQueue.add(a);\n }\n }\n }\n\n Log.i(\"bbb\", \"destination is: \"+destination._waypointName);\n\n return getShortestPathToDestination(destination);\n }", "public Sommet destination() {\n return destination;\n }", "@Override\r\n public List<V> shortestPath(V start, V destination) {\r\n Vertex a = null, b = null;\r\n try {\r\n Iterator<Vertex> vertexIterator = map.values().iterator();\r\n\r\n while (vertexIterator.hasNext()) {\r\n Vertex v = vertexIterator.next();\r\n if (start.compareTo(v.vertexName) == 0)\r\n a = v;\r\n if (destination.compareTo(v.vertexName) == 0)\r\n b = v;\r\n }\r\n if (a == null || b == null) {\r\n vertexIterator.next();\r\n }\r\n\r\n } catch (NoSuchElementException e) {\r\n throw e;\r\n }\r\n\r\n computePaths(map.get(start), destination);\r\n return getShortestPathTo(destination, start);\r\n }", "public LatLng getDestination () {\n return destination;\n }", "@Override\n public GetDestinationResult getDestination(GetDestinationRequest request) {\n request = beforeClientExecution(request);\n return executeGetDestination(request);\n }", "Destination findOneByDestinationId(Long destinationId);", "private List<Vertex> generateTempRouteList(Vertex source, Vertex target) throws SQLException {\n\n\t\tList<Vertex> verts = bgCtr.getVertList();\n\t\tList<LinkedList<Edge>> adjas = bgCtr.getAdjaList();\n\t\tList<Vertex> routeList;\n\n\t\tDijkstra dijkstra = new Dijkstra(verts, adjas);\n\n\t\tdijkstra.setupRoutePlanning(source);\n\n\t\trouteList = dijkstra.getPath(target);\n\n\t\treturn routeList;\n\t}", "public static List<Object> getMidLocationBetweenTwoLocation(final String sourceAddress, final String destinationAddress, final String API_KEY) {\n\n\n final List<String> list = new ArrayList<>();\n final List<Object> midPointList = new ArrayList<>();\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n\n URL url = new URL(\"https://maps.googleapis.com/maps/api/directions/json?\" + \"origin=\" + sourceAddress + \"&destination=\" + destinationAddress + \"&key=\" + API_KEY);\n HttpHandler handler = new HttpHandler();\n String jsonStr = handler.makeServiceCall(String.valueOf(url));\n\n if (jsonStr != null) {\n\n JSONObject jsonObject = new JSONObject(jsonStr);\n JSONArray jsonArray = jsonObject.getJSONArray(\"routes\");\n\n System.out.println(\"response:\" + jsonArray);\n\n if (jsonArray != null && jsonArray.length() > 0) {\n JSONArray legsObject = jsonArray.getJSONObject(2).getJSONArray(\"legs\");\n if (legsObject != null) {\n JSONArray stepsArray = legsObject.getJSONObject(6).getJSONArray(\"steps\");\n if (stepsArray != null && stepsArray.length() > 0) {\n for (int i = 0; i < stepsArray.length(); i++) {\n JSONObject object = stepsArray.getJSONObject(i);\n\n if (object.has(\"end_location\")) {\n JSONObject end_locationObject = object.getJSONObject(\"end_location\");\n double lat = end_locationObject.getDouble(\"lat\");\n double lng = end_locationObject.getDouble(\"lng\");\n\n URL lat_lng_url = new URL(\"https://maps.googleapis.com/maps/api/geocode/json?\" + \"latlng=\" + lat + \",\" + lng + \"&key=\" + API_KEY);\n\n JSONObject latlngObject = new JSONObject(String.valueOf(lat_lng_url));\n\n JSONArray latlngArray = latlngObject.getJSONArray(\"results\");\n\n if (latlngArray != null && latlngArray.length() > 0) {\n JSONObject addressObj = latlngArray.getJSONObject(1);\n String formatted_address = addressObj.getString(\"formatted_address\");\n list.add(formatted_address);\n }\n }\n }\n midPointList.addAll(list);\n }\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n thread.start();\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return midPointList;\n }", "Set<McastRoute> getRoutes();", "public String getDestination() {\n return this.destination;\n }", "@GET(\"/routecollection/{startLocation}\")\n void getRoutes(@Path(\"startLocation\")String startLocation, Callback<Routes> routes);", "public double shortestPathDist(int src, int dest);", "@Override\n\tpublic List<Path> getShortestRoute(Location src, Location dest, String edgePropertyName) {\n\t\t//array to keep track of visited vertexes\n\t\tboolean[] visited = new boolean[locations.size()];\n\t\t//array to store weights\n\t\tdouble[] weight = new double[locations.size()];\n\t\t//array to store predecessors\n\t\tLocation[] pre = new Location[locations.size()];\n\t\t//creates priority queue\n\t\tPriorityQueue<LocWeight> pq = new PriorityQueue<LocWeight>();\n\t\t// initializes every vertex misted mark to false\n\t\tfor (int i = 0; i < visited.length; i++)\n\t\t\tvisited[i] = false;\n\t\t// initializes every vertex's total weight to infinity\n\t\tfor (int i = 0; i < weight.length; i++)\n\t\t\tweight[i] = Double.POSITIVE_INFINITY;\n\t\t// initializes every vertex's predecessor to null\n\t\tfor (int i = 0; i < pre.length; i++)\n\t\t\tpre[i] = null;\n\t\t//sets start vertex's total weight to 0\n\t\tweight[locations.indexOf(src)] = 0;\n\t\t//insert start vertex in priroty queue\n\t\tpq.add(new LocWeight(src, 0.0));\n\t\t\n\t\tString[] edgeNames = getEdgePropertyNames();\n\t\tint indexProp = 0;\n\t\tfor (int i = 0; i < edgeNames.length; i++) {\n\t\t\tif (edgeNames[i].equalsIgnoreCase(edgePropertyName))\n\t\t\t\tindexProp = i;\n\t\t}\n\t\twhile (!pq.isEmpty()) {\n\t\t\tLocWeight c = pq.remove();\n\t\t\t//set C's visited mark to true\n\t\t\tvisited[locations.indexOf(c)] = true;\n\n\t\t\tList<Location> neighbors = getNeighbors(c.getLocation());\n\t\t\t//for each unvisited successor adjacent to C\n\t\t\tfor (int i = 0; i < neighbors.size(); i++) {\n\t\t\t\tif (visited[locations.indexOf(neighbors.get(i))] == false) {\n\t\t\t\t\t//change successor's total weight to equal C's weight + edge weight from C to successor\n\t\t\t\t\tweight[locations.indexOf(neighbors.get(i))] = c.getWeight() + getEdgeIfExists(c.getLocation(), neighbors.get(i)).getProperties().get(indexProp);\n\t\t\t\t\tpre[locations.indexOf(neighbors.get(i))] = c.getLocation();\n\t\t\t\t\tLocWeight succ = new LocWeight(neighbors.get(i), weight[locations.indexOf(neighbors.get(i))]);\n\t\t\t\t\t//if successor is already in pq, update its total weight\n\t\t\t\t\tif (pq.contains(succ)) {\n\t\t\t\t\t\tpq.remove(succ);\n\t\t\t\t\t}\n\t\t\t\t\t//if not already there, add\n\t\t\t\t\tpq.add(succ);\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t\n\n\n\t\t}\n\t\t\n\t\tArrayList<Path> path = new ArrayList<Path>();\n\t\t//find predecessor of each vertex and construct shortest path then return it\n\t\tLocation curr1 = dest;\n\t\twhile (pre[locations.indexOf(curr1)] != null) {\n\t\t\tpath.add(getEdgeIfExists(pre[locations.indexOf(curr1)], curr1));\n\t\t\tcurr1 = pre[locations.indexOf(curr1)];\n\t\t}\n\t\t//to show path from the start\n\t\tfor (int i = path.size() - 1; i >= 0; i--)\n\t\t\tpath.add(path.remove(i));\n\n\n\t\treturn path;\n\t}", "public static List<MapTile> findPath(MovableObject mO, GameObject destination) {\n List<MapTile> openList = new LinkedList<>();\n List<MapTile> closedList = new LinkedList<>();\n List<MapTile> neighbours = new ArrayList<>();\n Point objectTileCoord = mO.getGridCoordinates();\n Point destinationTileCoord = destination.getGridCoordinates();\n MapTile currentTile;\n try {\n currentTile = mapGrid.mapGrid[objectTileCoord.x][objectTileCoord.y];\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.print(\"Error while getting current tile for pathfinding. Trying to adapt coords.\");\n if (mO.getX() >= MapManager.getWorldWidth()) {\n objectTileCoord.x -= 1;\n }\n if (mO.getY() >= MapManager.getWorldHeight()) {\n objectTileCoord.y -= 1;\n }\n if (mO.getY() >= MapManager.getWorldHeight() && mO.getX() >= MapManager.getWorldWidth()) {\n objectTileCoord.x -= 1;\n objectTileCoord.y -= 1;\n }\n currentTile = mapGrid.mapGrid[objectTileCoord.x][objectTileCoord.y];\n }\n\n currentTile.setParentMapTile(null);\n currentTile.totalMovementCost = 0;\n openList.add(currentTile);\n\n boolean notDone = true;\n\n while (notDone) {\n neighbours.clear();\n currentTile = getLowestCostTileFromOpenList(openList, currentTile);\n closedList.add(currentTile);\n openList.remove(currentTile);\n\n //ReachedGoal?\n if ((currentTile.xTileCoord == destinationTileCoord.x) && (currentTile.yTileCoord == destinationTileCoord.y)) {\n try {\n return getResultListOfMapTiles(currentTile);\n } catch (Exception e) {\n System.out.println(\"closed list size: \" + closedList.size());\n throw e;\n }\n }\n\n neighbours.addAll(currentTile.getNeighbourTiles());\n neighbours.removeAll(closedList);\n\n for (MapTile mapTile : neighbours) {\n if (openList.contains(mapTile)) {\n // compare total movement costs.\n if (mapTile.totalMovementCost > currentTile.getMovementCostToTile(mapTile) + currentTile.totalMovementCost) {\n mapTile.setParentMapTile(currentTile);\n mapTile.totalMovementCost = currentTile.getMovementCostToTile(mapTile) + currentTile.totalMovementCost;\n }\n } else {\n mapTile.setParentMapTile(currentTile);\n mapTile.totalMovementCost = currentTile.totalMovementCost + currentTile.getMovementCostToTile(mapTile);\n openList.add(mapTile);\n }\n }\n }\n return null;\n }", "public Vertex getDestination() {\n return destination;\n }", "Route getRouteById(Long id_route) throws RouteNotFoundException;", "long getDestinationId();", "public String getDestination() {\r\n return destination;\r\n }", "@Override\n public String toString() {\n return source + \" \" + destination;\n }", "public static RouteDetails findShortestRoute(Graph g, String start, String end) {\n\t\tAlgorithmGraph ag = new AlgorithmGraph(g);\n\t\treturn ag.getShortestRoute(start, end);\n\t}", "public void getDirections(Location startLocation, Location endLocation) {\n getDirections(startLocation.getCoordinates(), endLocation.getCoordinates());\n }", "private void QueryDirections() {\n\t\tshowProgress(true, \"正在搜索导航路线...\");\n\t\t// Spawn the request off in a new thread to keep UI responsive\n\t\tfor (final FloorInfo floorInfo : floorList) {\n\t\t\tif (floorInfo.getPoints() != null\n\t\t\t\t\t&& floorInfo.getPoints().length >= 2) {\n\n\t\t\t\tThread t = new Thread() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Start building up routing parameters\n\t\t\t\t\t\t\tRouteTask routeTask = RouteTask\n\t\t\t\t\t\t\t\t\t.createOnlineRouteTask(\n\t\t\t\t\t\t\t\t\t\t\tfloorInfo.getRouteServerPath(),\n\t\t\t\t\t\t\t\t\t\t\tnull);\n\n\t\t\t\t\t\t\tRouteParameters rp = routeTask\n\t\t\t\t\t\t\t\t\t.retrieveDefaultRouteTaskParameters();\n\t\t\t\t\t\t\tNAFeaturesAsFeature rfaf = new NAFeaturesAsFeature();\n\t\t\t\t\t\t\t// Convert point to EGS (decimal degrees)\n\t\t\t\t\t\t\t// Create the stop points (start at our location, go\n\t\t\t\t\t\t\t// to pressed location)\n\t\t\t\t\t\t\t// StopGraphic point1 = new StopGraphic(mLocation);\n\t\t\t\t\t\t\t// StopGraphic point2 = new StopGraphic(p);\n\t\t\t\t\t\t\trfaf.setFeatures(floorInfo.getPoints());\n\t\t\t\t\t\t\trfaf.setCompressedRequest(true);\n\t\t\t\t\t\t\trp.setStops(rfaf);\n\n\t\t\t\t\t\t\t// Set the routing service output SR to our map\n\t\t\t\t\t\t\t// service's SR\n\t\t\t\t\t\t\trp.setOutSpatialReference(wm);\n\t\t\t\t\t\t\trp.setFindBestSequence(true);\n\t\t\t\t\t\t\trp.setPreserveFirstStop(true);\n\t\t\t\t\t\t\tif (floorInfo.getEndPoint() != null) {\n\t\t\t\t\t\t\t\trp.setPreserveLastStop(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Solve the route and use the results to update UI\n\t\t\t\t\t\t\t// when received\n\t\t\t\t\t\t\tfloorInfo.setRouteResult(routeTask.solve(rp));\n\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tmException = e;\n\t\t\t\t\t\t\t// mHandler.post(mUpdateResults);\n\t\t\t\t\t\t}\n\t\t\t\t\t\trouteIndex++;\n\t\t\t\t\t\tif (routeIndex >= routeCount) {\n\t\t\t\t\t\t\tmHandler.post(mSetCheckMap);\n\t\t\t\t\t\t\tmHandler.post(mUpdateResults);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t// Start the operation\n\t\t\t\tt.start();\n\t\t\t}\n\t\t}\n\n\t}", "void storeSource(McastRoute route, HostId hostId, Set<ConnectPoint> connectPoints);", "public Actor getDestination()\r\n\t{\r\n\t\treturn destinationActor;\t\r\n\t}", "public ArrayList<ArcGraph> getPath( GraphNode pNodeDestiny){\n ArrayList<ArcGraph> result = new ArrayList<ArcGraph>();\n \n int pos_destiny = findNode(pNodeDestiny); //Returns the position of the destiny node -> used to get the arc of the shortest path\n GraphNode temp_node = Nodes.get(pos_destiny); //the node that we will use to go back\n while (!temp_node.equals(Source)){ //until the source node equals the one we want to find\n result.add(References.get(pos_destiny)); //adds the arc to the reference list -> result list\n temp_node = References.get(pos_destiny).getSource(); //returns the source of the arc -> so we can find our source node\n pos_destiny = findNode(temp_node);\n }\n \n \n return result;\n }", "public Call<String> getDirection(LatLng mOriginLatLng, LatLng mDestinationLatLng){\n String base= \"https://maps.googleapis.com\";\n //Esta parte ya es la URL completa tenemos que modificarle varios aspectos como el Origen, Destino y La Api key\n String query= \"/maps/api/directions/json?mode=driving&transit_routing_preferences=less_driving&\"\n + \"origin=\" + mOriginLatLng.latitude + \",\" + mOriginLatLng.longitude + \"&\"\n + \"destination=\" + mDestinationLatLng.latitude + \",\" + mDestinationLatLng.longitude + \"&\"\n + \"key=\" + context.getResources().getString(R.string.google_maps_api);\n //Analizar bien como Funciona esta linea ya que no estoy completamente seguro solo se que al final retorna Call<String>\n //Con los datos que mandamos a llamar del url\n return RetrofitClient.getClient(base).create(IGoogleApi.class).getDirection(base + query);\n }", "private Route calculate(String fromStation, String toStation) {\n\t\tif (stations==null){\r\n\t\t\tSystem.out.println(\"DEBUG RUN OF DIJKSTRA.\");\r\n\t\t\tstations = new ArrayList<Station>();\r\n\t\t\tcreateDebugMap(stations);\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Check if the stations exists\r\n\t\t */\r\n\t\tStation startStation = null, endStation = null;\r\n\r\n\t\t// Find starting station\r\n\t\tfor (Station thisStation : stations) {\r\n\t\t\tif (thisStation.stationName.equals(fromStation)) {\r\n\t\t\t\tSystem.out.println(\"Found startStaion in the Database\");\r\n\t\t\t\tstartStation = thisStation;\r\n\t\t\t}\r\n\t\t\tif (thisStation.stationName.equals(toStation)) {\r\n\t\t\t\tSystem.out.println(\"Found endStation in the Database\");\r\n\t\t\t\tendStation = thisStation;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Station not found. Break\r\n\t\tif (startStation == null || endStation == null) {\r\n\t\t\tSystem.out.println(\"Shit! One of the stations could not be found\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Declare the variables for the algorithm\r\n\t\t */\r\n\r\n\t\t// ArrayList for keeping track of stations we have visited.\r\n\t\tArrayList<Station> visitedStations = new ArrayList<Station>();\r\n\t\t// Array for the DijkstraStations. This type holds the current best cost and best link to it.\r\n\t\tArrayList<DijkstraStation> dijkstraStations = new ArrayList<DijkstraStation>();\r\n\r\n\t\t// The station we are examining neighbors from.\r\n\t\tDijkstraStation currentStation = new DijkstraStation(new Neighbor(startStation, 0, 0), 0, startStation);\r\n\r\n\t\t// PriorityQueue for sorting unvisited DijkstraStations.\r\n\t\tNeighBorDijktstraComparetor Dijkcomparator = new NeighBorDijktstraComparetor();\r\n\t\tPriorityQueue<DijkstraStation> unvisitedDijkstraStations;\r\n\t\tunvisitedDijkstraStations = new PriorityQueue<DijkstraStation>(100, Dijkcomparator);\r\n\r\n\t\t// Variable to keep track of the goal\r\n\t\tboolean goalFound = false; // did we find the goal yet\r\n\t\tint goalBestCost = Integer.MAX_VALUE; // did we find the goal yet\r\n\r\n\t\t// Add the start staion to the queue so that the loop will start with this staiton\r\n\t\tunvisitedDijkstraStations.add(currentStation);\r\n\t\tdijkstraStations.add(currentStation);\r\n\r\n\t\t/***************************\r\n\t\t * The Dijkstra algorithm loop.\r\n\t\t ***************************/\r\n\r\n\t\twhile (!unvisitedDijkstraStations.isEmpty()) {\r\n\t\t\t// Take the next station to examine from the queue and set the next station as the currentStation\r\n\t\t\tcurrentStation = unvisitedDijkstraStations.poll();\r\n\r\n\t\t\tSystem.out.println(\"\\n============= New loop passtrough =============\");\r\n\t\t\tSystem.out.println(\"Analysing neighbors of \" + currentStation.stationRef.stationName + \". Cost to this station is: \" + currentStation.totalCost);\r\n\r\n\t\t\t// Add visited so we dont visit again.\r\n\t\t\tvisitedStations.add(currentStation.stationRef);\r\n\r\n\t\t\t// break the algorithm if the current stations totalcost if bigger than the best cost of the goal\r\n\t\t\tif (goalBestCost < currentStation.totalCost) {\r\n\t\t\t\tSystem.out.println(\"Best route to the goal has been found. Best cost is: \" + goalBestCost\r\n\t\t\t\t\t\t+ \" (To reach current station is: \" + currentStation.totalCost + \")\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Check all neighbors from the currentStation to the neighBorQueue so we can examine them\r\n\t\t\tfor (Neighbor thisNeighbor : currentStation.stationRef.neighbors) {\r\n\r\n\t\t\t\t// Skip stations we have already visited\r\n\t\t\t\tif (!visitedStations.contains(thisNeighbor.stationRef)) {\r\n\t\t\t\t\t// If we havent seen this station before\r\n\t\t\t\t\t// Add it to the list of Dijkstrastations and to the PriorityQueue of unvisited stations\r\n\t\t\t\t\tif (getDijkstraStationByID(thisNeighbor.stationRef.stationid, dijkstraStations) == null) {\r\n\t\t\t\t\t\tDijkstraStation thisDijkstraStation = new DijkstraStation(thisNeighbor, currentStation.totalCost\r\n\t\t\t\t\t\t\t\t+ thisNeighbor.cost, currentStation.stationRef);\r\n\t\t\t\t\t\tdijkstraStations.add(thisDijkstraStation);\r\n\t\t\t\t\t\tunvisitedDijkstraStations.offer(thisDijkstraStation);\r\n\r\n\t\t\t\t\t\tif (thisNeighbor.stationRef.equals(endStation)) {\r\n\t\t\t\t\t\t\tgoalFound = true;\r\n\t\t\t\t\t\t\tgoalBestCost = (int) thisDijkstraStation.totalCost;\r\n\t\t\t\t\t\t\tSystem.out.println(\"Goal station found :) Cost to goal is: \" + goalBestCost);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSystem.out.println(\"New station seen: \" + thisDijkstraStation);\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Station has been seen before.\r\n\r\n\t\t\t\t\t\t// Get the station as a DijkstraStation from the array\r\n\t\t\t\t\t\tDijkstraStation thisDijkstraStation = getDijkstraStationByID(thisNeighbor.stationRef.stationid,\r\n\t\t\t\t\t\t\t\tdijkstraStations);\r\n\r\n\t\t\t\t\t\t// Check if the connection is better than the one we already know\r\n\t\t\t\t\t\tif (currentStation.totalCost + thisNeighbor.cost < thisDijkstraStation.totalCost) {\r\n\r\n\t\t\t\t\t\t\t// New best link found\r\n\t\t\t\t\t\t\tSystem.out.println(\"New best route found for \" + thisNeighbor.stationRef.stationName);\r\n\t\t\t\t\t\t\tSystem.out.println(\"Old cost:\" + thisDijkstraStation.totalCost + \", New cost: \"\r\n\t\t\t\t\t\t\t\t\t+ (currentStation.totalCost + thisNeighbor.cost));\r\n\r\n\t\t\t\t\t\t\t// update the cost and via station on the DijkstraStation\r\n\t\t\t\t\t\t\tthisDijkstraStation.updateBestLink((int) (currentStation.totalCost + thisNeighbor.cost),\r\n\t\t\t\t\t\t\t\t\tcurrentStation.stationRef, thisNeighbor);\r\n\r\n\t\t\t\t\t\t\t// if this is the goal station, update the totalCost\r\n\t\t\t\t\t\t\tif (thisNeighbor.stationRef.equals(endStation)) {\r\n\t\t\t\t\t\t\t\tgoalBestCost = (int) thisDijkstraStation.totalCost;\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Updated cost for the goal to : \" + goalBestCost);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}// End while\r\n\r\n\t\t// Print the World:\r\n//\t\t System.out.println();\r\n//\t\t System.out.println(\"################# Printing the world ###################\");\r\n//\t\t for (DijkstraStation thisDijkstraStation : dijkstraStations) {\r\n//\t\t System.out.println(thisDijkstraStation.toString());\r\n//\t\t DijkstraStation tempStation = thisDijkstraStation;\r\n//\t\t System.out.print(\"BackTracking route =>\");\r\n//\t\t while (!tempStation.stationRef.equals(startStation)) {\r\n//\t\t System.out.print(\" \" + tempStation.cost + \" to \" + tempStation.viaStation.stationName + \" #\");\r\n//\t\t\r\n//\t\t tempStation = getDijkstraStationByID(tempStation.viaStation.stationid, dijkstraStations);\r\n//\t\t }\r\n//\t\t System.out.print(\" End\");\r\n//\t\t System.out.print(\"\\n\\n\");\r\n//\t\t }\r\n//\r\n\t\tif (goalFound) {\r\n\t\t\tSystem.out.println(\"Generating route to goal\");\r\n\t\t\t// create a route object with all the stations.\r\n\t\t\tRoute routeToGoal = new Route(fromStation, toStation);\r\n\t\t\t// get the goalStation as a DijkstraStation Type\r\n\t\t\tDijkstraStation goalStation = getDijkstraStationByID(endStation.stationid, dijkstraStations);\r\n\r\n\t\t\trouteToGoal.cost = goalStation.totalCost;\r\n\t\t\trouteToGoal.price = (int) goalStation.totalCost;\r\n\r\n\t\t\t// Find the route to the goal\r\n\t\t\tDijkstraStation tempStation = goalStation;\r\n\r\n\t\t\twhile (!tempStation.stationRef.equals(startStation)) {\r\n\t\t\t\t// Add the station to the route table\r\n\t\t\t\tSerializableStation thisStation = new SerializableStation(tempStation.cost, tempStation.cost,\r\n\t\t\t\t\t\ttempStation.stationRef.stationName, tempStation.stationRef.stationid);\r\n\t\t\t\t\r\n\t\t\t\t//Fix region string\r\n\t\t\t\tString regionString=\"\";\r\n\t\t\t\tfor (Integer regionID : tempStation.stationRef.region) {\r\n\t\t\t\t\tregionString.concat(regionID+ \",\");\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\tthisStation.region = regionString.substring(0, regionString.length() - 1);\r\n\t\t\t\t\r\n\t\t\t\t//Add the station\r\n\t\t\t\trouteToGoal.route.add(0, thisStation);\r\n\t\t\t\t// Go to the previous station\r\n\t\t\t\ttempStation = getDijkstraStationByID(tempStation.viaStation.stationid, dijkstraStations);\r\n\t\t\t}\r\n\t\t\t// add the starting station\r\n\t\t\tSerializableStation thisStation = new SerializableStation(tempStation.stationRef.latitude, tempStation.stationRef.longitude, tempStation.stationRef.stationName,\r\n\t\t\t\t\ttempStation.stationRef.stationid);\r\n\t\t\trouteToGoal.route.add(0, thisStation);\r\n\r\n\t\t\t// print the route\r\n\t\t\t//System.out.println(\"Printing best route to the Goal:\\n\" + routeToGoal.toString());\r\n\r\n\t\t\treturn routeToGoal;\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}" ]
[ "0.7210564", "0.71713567", "0.68792194", "0.6808037", "0.679137", "0.67657197", "0.6723108", "0.6701881", "0.6628586", "0.65636426", "0.65315676", "0.6524192", "0.650772", "0.6429105", "0.640533", "0.63635075", "0.6342403", "0.6331235", "0.63119376", "0.6247927", "0.6126242", "0.61124295", "0.6098803", "0.60932964", "0.60915166", "0.6065791", "0.60623205", "0.60609925", "0.6051418", "0.6029507", "0.6019192", "0.6018707", "0.60027975", "0.5977416", "0.5974109", "0.59543973", "0.59471554", "0.59310704", "0.5924311", "0.59158224", "0.5857909", "0.5856587", "0.58540714", "0.58443207", "0.5836566", "0.58196", "0.5809962", "0.5808088", "0.5807943", "0.5805672", "0.5804483", "0.57952654", "0.57899135", "0.5776811", "0.5771782", "0.576436", "0.5758683", "0.5747197", "0.57429814", "0.57395244", "0.57345676", "0.5719457", "0.57194215", "0.57122433", "0.5711886", "0.5704711", "0.56977147", "0.5693818", "0.5690764", "0.56836903", "0.5683648", "0.56823426", "0.5676282", "0.5676098", "0.56697315", "0.5665494", "0.5662172", "0.5652542", "0.5640869", "0.5638151", "0.56367135", "0.563605", "0.56288755", "0.56033933", "0.560232", "0.56008756", "0.5595428", "0.559167", "0.5588998", "0.5588767", "0.5582195", "0.55807257", "0.5578233", "0.5561018", "0.5556816", "0.55411637", "0.55375886", "0.5526364", "0.55209446", "0.55184" ]
0.6057437
28
Getter method for load cities
public LoadCities getLoadCitiesGraph() { return loadCitiesGraph; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public List<String> getCities() {\n\n List<Rout> routs = routDAO.getAll();\n HashSet<String> citiesSet = new HashSet<>();\n for (Rout r : routs) {\n citiesSet.add(r.getCity1());\n }\n List<String> cities = new ArrayList<>(citiesSet);\n\n return cities;\n }", "String getCity();", "List<City> findCities();", "public Vector<Site> getCities(){\n return cities;\n }", "public List<City> getAll() throws Exception;", "public abstract String getCity();", "@Override\n\tpublic ArrayList<String> getCityList() {\n\t\treturn constantPO.getCityList();\n\t}", "TrackerCity loadTrackerCity(final Integer id);", "private static Map<String, List<String>> loadCitiesByLanguage() {\n String resource = Config.get(\"generate.geography.foreign.birthplace.default_file\",\n \"geography/foreign_birthplace.json\");\n return loadCitiesByLanguage(resource);\n }", "public List<String> getCities() {\n\t\treturn cities;\n\t}", "@Override\r\n\tpublic List <City> getAllCities() {\r\n\t\tSystem.out.println(\"Looking for all cities...\");\r\n\t\tConnection con = ConnectionFactory.getConnection();\r\n\t\ttry {\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(\"SELECT * FROM city\");\r\n\t\t\tList<City> cityList = new ArrayList<City>();\r\n\r\n\t\t\twhile(rs.next())\r\n\t\t\t{\r\n\t\t\t\tCity ci = new City();\r\n\t\t\t\tci.setCityId(rs.getInt(\"cityid\"));\r\n\t\t\t\tci.setName(rs.getString(\"name\"));\r\n\t\t\t\tci.setCapital(rs.getBoolean(\"iscapital\"));\r\n\t\t\t\tcityList.add(ci);\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t\treturn cityList;\r\n\t\t} catch (SQLException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@RequestMapping(value = \"/cityDetails\", method = RequestMethod.GET)\n public ResponseEntity<City> getCityDetails()\n {\n logger.info(\"Calling getCityDetails() method\");\n if(city.getCity() != null)\n {\n for (String item: city.getCity()\n ) {\n logger.debug(\"This are the cities \" + item);\n }\n }\n\n return new ResponseEntity<City>(city, HttpStatus.OK);\n }", "public List<City> getCities(){\n waitFor(visibilityOfAllElements(cities));\n return cities.stream().map(City::new).collect(toList());\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public void getCity(){\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public City getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity()\n {\n \treturn city;\n }", "public List<WeatherCitySummary> findAllCity(){\n return weatherCityRepository.findAllCity();\n }", "public LiveData<CityData> getCityDetails() {\n\n //if the list is null\n if (cityList == null) {\n cityList = new MutableLiveData<CityData>();\n loadCityDetails(); //we will load it asynchronously from server in this method\n }\n return cityList; //finally we will return the list\n }", "public String getCity() {\n return (String) get(\"city\");\n }", "@Override\n public String getCity() {\n return this.city;\n }", "public String getCity() {\n return City;\n }", "public Vector<City> getCities(){\r\n\t\tif (map.getVerteices()==null){\r\n\t\t\treturn new Vector<City>();\r\n\t\t}\r\n\t\treturn map.getVerteices();\r\n\t}", "@Override\n\tpublic ArrayList getAllCities() {\n\t\tConnection conn = MySQLDAOFactory.getConnection(); \n\t\t//ResultSet rs = MySQLDAOFactory.executeStatement(conn, \"SELECT * FROM world.city where world.city.CountryCode = 'AFG'\");\n\t Statement stmt = null; \n\t ResultSet rs = null;\n\t\ttry {\n\t\t\tstmt = (Statement)conn.createStatement();\n\t\t} catch (SQLException e2) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te2.printStackTrace();\n\t\t}\n\t String sql;\n\t sql = \"SELECT * FROM world.city where world.city.CountryCode = 'AFG'\";\n\t\ttry {\n\t\t\trs = stmt.executeQuery(sql);\n\t\t} catch (SQLException e2) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te2.printStackTrace();\n\t\t}\n\n\t\tArrayList<Cities> p = new ArrayList<Cities>();\n\t try {\n\t\t\twhile(rs.next()){\n\t\t\t //Retrieve by column name\n\t\t\t int id = rs.getInt(\"id\");\t \n\t\t\t String name = rs.getString(\"name\");\n\t\t\t String district = rs.getString(\"district\");\n\t\t\t long population = rs.getLong(\"population\");\n\t\t\t Cities tmp = new Cities(); \n\t\t\t tmp.setId(id);\n\t\t\t tmp.setName(name);\n\t\t\t tmp.setDistrict(district);\n\t\t\t tmp.setPopulation(population);\n\t\t\t p.add(tmp); \n\t\t\t }\n\t\t\t//rs.close(); \n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\t//MySQLDAOFactory.closeConnection();\n\t return p; \n\t}", "public void getCityData(String cityName){\n\t\tICityDataService cityDataService = new CityDataService();\n\t\tcityData = cityDataService.getCityData(cityName);\n\t}", "java.lang.String getCityName();", "public String getCity() {\r\n\t\treturn city;\t\t\r\n\t}", "public String getCity(){\n return city;\n }", "public String getCity(){\n return city;\n }", "@Override\r\n\tpublic List<City> getCityById(int pid) {\n\t\treturn cd.getCityById(pid);\r\n\t}", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public java.lang.String getCity() {\r\n return city;\r\n }", "public String getCity() \n\t{\n\t\treturn city;\n\t}", "public String getCity()\n\t{\n\t\treturn city;\n\t}", "@Override\n\tpublic String getCity() {\n\t\treturn this.city;\n\t}", "@AutoEscape\n\tpublic String getCity();", "public void findCities() {\r\n\t\tpolygonMap.setCurrentPlayerID(client.getSettler().getID());\r\n\t\tint counter = 0;\r\n\t\tfor (int i = 0; i < island.getNodes().length; i++) {\r\n\t\t\tif (island.getNodes()[i].getBuilding() == Constants.SETTLEMENT\r\n\t\t\t\t\t&& island.getNodes()[i].getOwnerID() == client.getSettler()\r\n\t\t\t\t\t\t\t.getID()) {\r\n\t\t\t\tpolygonMap.setCityNodes(counter, i);\r\n\t\t\t\tcounter++;\r\n\t\t\t} else {\r\n\t\t\t\tpolygonMap.setCityNodes(counter, -1);\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public String getCity() {\n\t\treturn this.city;\n\t}", "public String getCity()\r\n\t{\r\n\t\treturn city.getModelObjectAsString();\r\n\t}", "public java.lang.String getCity() {\n return city;\n }", "public java.lang.String getCity() {\n return city;\n }", "@Override\n\tpublic ArrayList<CityPO> getAll() throws RemoteException {\n\t\t\n\t\t\n\t\treturn cities;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getLocationCity() {\n return locationCity;\n }", "public Integer getCity() {\n return city;\n }", "public Integer getCity() {\n return city;\n }", "List<City> getCityList(Integer countryId)throws EOTException;", "public String getCity()\n\t{\n\t\treturn City;\n\t\t\n\t}", "public List<City> getCityList(State state);", "public String getCityName() {\n return cityName;\n }", "public String getCityName() {\n return cityName;\n }", "public static String [] getCities(){\n\t\tString [] s = new String [cities.length]; \n\t\tfor (int i = 0; i < cities.length; i++)\n\t\t{\n\t\t\ts[i] = cities[i].getCity();\n\t\t}\n\t\treturn s;\n\t}", "Collection<? extends String> getHasCity();", "TrackerCity getTrackerCity(final Integer id);", "@Override\n\tpublic List<CityList> getCities() {\n\t\tList<CityList> citiesListDTO =null;\n\t\tList<com.svecw.obtr.domain.CityList> citiesListDomain = iCityListDAO.getCities();\n\t\t\n\t\tif(null!=citiesListDomain){\n\t\t\tcitiesListDTO = new ArrayList<CityList>();\n\t\t\tfor(com.svecw.obtr.domain.CityList cityListDomain : citiesListDomain){\n\t\t\t\tCityList cityListDTO = new CityList();\n\t\t\t\tcityListDTO.setCityId(cityListDomain.getCityId());\n\t\t\t\tcityListDTO.setCityName(cityListDomain.getCityName());\n\t\t\t\tcitiesListDTO.add(cityListDTO);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn citiesListDTO;\n\t}", "public java.lang.String getCity() {\n return City;\n }", "public String getCompanyCity() {\n return companyCity;\n }", "public String getCityId() {\n return cityId;\n }", "public String getCityname() {\n return cityname;\n }", "@Override\r\n\tpublic List<String> getCities() {\n \tList<Note> notes = this.noteRepository.findAll();\r\n \tfor (Note note : notes) {\r\n\t\t\tSystem.out.println(note.getTitle());\r\n\t\t}\r\n\t\treturn hotelBookingDao.getCities();\r\n\t}", "public String getCityId() {\r\n return cityId;\r\n }", "City city(int i) {\r\n\t\treturn tsp.cities[this.index[i]];\r\n\t}", "public java.lang.String getCity () {\n\t\treturn city;\n\t}", "@Override\n protected List<CityClass> doInBackground(String... strings) {\n return cityNames;\n }", "public ArrayList<String> showCity();", "private void loadCityDetails() {\n\n apiCall = ApiUtils.getCityDetails();\n\n Call<CityData> call = apiCall.getCityDetails();\n\n call.enqueue(new Callback<CityData>() {\n @Override\n public void onResponse(Call<CityData> call, Response<CityData> response) {\n\n //finally we are setting the list to our MutableLiveData\n cityList.setValue(response.body());\n\n }\n\n @Override\n public void onFailure(Call<CityData> call, Throwable t) {\n System.out.println(\"is failed\");\n }\n });\n }", "public CityEntry getCity(){\n\t\treturn (CityEntry)this.entryMap.get(ObjectGeoKeys.OBJ_GEO_CITY_LINK);\n\t}", "boolean hasHasCity();", "@Override\r\n\tpublic void buildCity() {\n\t\t\r\n\t}", "public String getCityCode() {\n return cityCode;\n }", "public String getCityCode() {\n return cityCode;\n }", "public Long getCitiesCityCode() {\n return citiesCityCode;\n }", "@Override\n public Stream<City> getAll() {\n return idToCity.values().stream();\n }", "@Override\n\tpublic java.lang.String getCity() {\n\t\treturn _candidate.getCity();\n\t}", "@Override\n\tpublic List<City> getCities(Long id, String query) {\n\t\tCityRootObject cityRootObject = restTemplate.getForObject(urlForDatabaseCities(id, query), CityRootObject.class);\n\n\t\treturn cityRootObject.getResponse().getItems();\n\t}", "@ApiMethod(name = \"getCity\", path = \"city/{id}\", httpMethod = ApiMethod.HttpMethod.GET)\n public City getCity(@Named(\"id\") Long id)\n throws NotFoundException {\n\n return mCityService.getById(id);\n }", "public void printAllCities()\n { // to be implemented in part (d) }\n }", "String getCityname(){\n \treturn city_name;\n }", "@Override\n public List<Map<String, Object>> getCityList(Map<String, Object> params)\n {\n return advertisementMapper.getCityList(params);\n }" ]
[ "0.71915656", "0.71474993", "0.7120165", "0.70405173", "0.69715077", "0.6967104", "0.69667387", "0.6935158", "0.69269305", "0.6901168", "0.6883386", "0.6856264", "0.6853241", "0.6844163", "0.6844163", "0.6844163", "0.68286157", "0.6828048", "0.6828048", "0.6828048", "0.68078804", "0.67992973", "0.67812693", "0.67812693", "0.67812693", "0.67812693", "0.67812693", "0.67812693", "0.67812693", "0.67812693", "0.67812693", "0.67812693", "0.6752553", "0.67493767", "0.6748623", "0.6743134", "0.6730763", "0.6715264", "0.6713767", "0.6709214", "0.6686558", "0.6670477", "0.6663998", "0.6636711", "0.6635031", "0.6635031", "0.6633058", "0.66140205", "0.66140205", "0.66110224", "0.6605442", "0.6599159", "0.65964025", "0.65860313", "0.65407276", "0.65375006", "0.6535419", "0.6521587", "0.6521587", "0.6518999", "0.6518499", "0.6518499", "0.6518499", "0.6518499", "0.6516604", "0.65146697", "0.65146697", "0.65100414", "0.65090555", "0.6497272", "0.6495266", "0.6495266", "0.64862496", "0.64804125", "0.64699775", "0.6450868", "0.6445882", "0.6435897", "0.6420576", "0.6418345", "0.64097136", "0.6395794", "0.6387042", "0.6382723", "0.6355895", "0.6352711", "0.6352623", "0.6339917", "0.6312258", "0.63059336", "0.62960184", "0.62960184", "0.6286282", "0.6273416", "0.62688863", "0.62562996", "0.6251626", "0.6249749", "0.6200643", "0.6192088" ]
0.6916842
9
TODO Autogenerated method stub
public static void main(String[] args) { ChromeMaximize(); browserMaximize(); browserMaximize1(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Tools.trace("locking " + this,1); super.lock();
public void lock() { while (true) { try { if (super.tryLock(2, TimeUnit.SECONDS)) return; } catch (InterruptedException e) { trace("caught " + e); } //trace("failed to get lock", 1); //trace("owning thread: " + getOwner(), 1); //Thread.dumpStack(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lock() {\r\n super.lock();\r\n }", "public void lock() {\n super.lock();\n }", "public void lock() {\n super.lock();\n }", "public void lock() {\n super.lock();\n }", "public void lock() {\n\n }", "public void lock() {\n\t\tlocked = true;\n\t}", "void lock();", "public abstract ReentrantLock getLock();", "public LockSync() {\n lock = new ReentrantLock();\n }", "@Override\n\tpublic boolean isLocked() { return true; }", "public Lock getLock();", "public Lock() {\r\n }", "public void lock() {\n/* 254 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tpublic boolean tryLock() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean tryLock() {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic void onLock(boolean lock) {\n\t\tthis.lock = lock;\r\n\t}", "@Override\n\tpublic void lock(Object entity, LockModeType lockMode) {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\tSystem.out.println(\"inside run() method.....\");\n\n\t\tlock();\n\n\t}", "@Override\n public void lock() {\n Preconditions.checkState(connection != null);\n if (!tryLock(lockGetTimeout(), TimeUnit.MILLISECONDS)) {\n Monitoring.increment(errorCounter.name(), (KeyValuePair<String, String>[]) null);\n throw new LockException(String.format(\"[%s][%s] Timeout getting lock.\", id().getNamespace(), id().getName()));\n }\n }", "public void synchronize(){ \r\n }", "protected void lock() {\n semaphore = new Semaphore(0);\n try {\n semaphore.acquire();\n }\n catch(InterruptedException e) {\n System.out.println(\"Trouble for request of semaphore acquirement\");\n e.printStackTrace();\n }\n }", "public void lock(int key);", "@Override\n\tpublic void lock() {\n\t\tSystem.out.println(\"Card in ATM1 is locked !\");\n\t}", "LockManager() {\n }", "@Override\n\tpublic void lockInterruptibly() throws InterruptedException {\n\t\t\n\t}", "@Override\n\tpublic void lockInterruptibly() throws InterruptedException {\n\t\t\n\t}", "protected boolean upgradeLocks() {\n \t\treturn false;\n \t}", "@Override\n public void setLockOwner(Object lockOwner) {\n }", "public void lock() {\n islandLocked = true;\n }", "public Lock getLock() {\n return lock;\n }", "@Override\n\tpublic void unlock() {\n\t\t\n\t}", "@Override\n\tpublic Lock getLock() {\n\t\treturn this.lock;\n\t}", "void m2() {\n\n boolean locked = false;\n try {\n locked = lock.tryLock(4, TimeUnit.SECONDS);\n\n //可以设置lock为可打断的\n //可以在主线程中调用interrupt方法打断,然后当做异常处理\n// lock.lockInterruptibly();\n\n System.out.println(locked);\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n if (locked) lock.unlock();\n }\n }", "@Override\n\tpublic void onLockMap(boolean arg0) {\n\t\t\n\t}", "ManagementLockObject.Update update();", "@Override\n public void unlock() {\n }", "@Override\n\tpublic void unLock() {\n\t\t\n\t}", "final public Lock test_get_lock() {\r\n\t\treturn lock_;\r\n\t}", "public Object getLock() {\n return dataLock;\n }", "Thread getLocker();", "void lock(Portal portal);", "@Override\n public boolean isLocked(Object o) {\n return false;\n }", "private Locks() {\n\t\tlockId = ObjectId.get().toString();\n\t}", "public void dataBaseLocked();", "void lock(String name) {\n execute(name, connection -> doLock(name, connection));\n }", "static Lock createLock() {\n return new /*Prio*/Lock();\n }", "protected boolean isLock() {\r\n return Lock.isLock(this.getBlock());\r\n }", "@Override\r\n\tpublic void addLockToken(String lt) {\n\t\t\r\n\t}", "public void lockThreadForClient()\n {\n masterThread.lockThreadForClient();\n }", "public void openLock(){\n /*Code to send an unlocking signal to the physical device Gate*/\n }", "LockLevel level();", "public LockCondilock() {\n this(newDefaultLock());\n }", "ManagementLockObject apply();", "@Test\n\tpublic void testTryLockAndRelockAndPass() {\n\n\t\tinstance.lock();\n\n\t\tassertTrue(instance.tryLock());\n\t}", "public boolean tryLock(long time, TimeUnit tu) throws\r\n InterruptedException {\n if (!super.tryLock(time, TimeUnit.SECONDS)) {\r\n traceLev(\"failed to get lock continueing .\", 1);\r\n traceLev(\"owning thread: \" + getOwner(), 1);\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean tryLock() {\n Preconditions.checkState(connection != null);\n checkThread();\n Monitoring.increment(callCounter.name(), (KeyValuePair<String, String>[]) null);\n try {\n return lockLatency.record(() -> {\n if (super.tryLock()) {\n if (locked) return true;\n Transaction tnx = session.beginTransaction();\n try {\n DbLockRecord record = checkExpiry(fetch(session, true, true));\n if (record.isLocked() && instanceId().compareTo(record.getInstanceId()) == 0) {\n session.save(record);\n tnx.commit();\n lockedTime = System.currentTimeMillis();\n locked = true;\n } else if (!record.isLocked()) {\n record.setInstanceId(instanceId());\n record.setLocked(true);\n record.setTimestamp(System.currentTimeMillis());\n session.update(record);\n tnx.commit();\n lockedTime = System.currentTimeMillis();\n locked = true;\n } else\n tnx.rollback();\n } catch (Exception ex) {\n tnx.rollback();\n throw ex;\n }\n }\n return locked;\n });\n } catch (Exception ex) {\n Monitoring.increment(errorCounter.name(), (KeyValuePair<String, String>[]) null);\n throw new LockException(ex);\n }\n }", "protected final Object getTreeLock() {\n return Component.LOCK;\n }", "void lockGranted(LockHandle lockHandle);", "ManagementLockObject refresh();", "public void acquireDeferredLock() {\r\n return;\r\n }", "public Object getHierarchyLock() {\n return hierarchyLock;\n }", "protected Lock(Block block) {\r\n this(block, null, null, null);\r\n }", "public boolean isLocked() {\r\n \treturn false;\r\n }", "public interface Lock {\n\n boolean acquire();\n\n boolean release();\n}", "public LockImpl(long id) {\n\t\tthis.id = id;\n\t}", "public void lock() {\n if (!locked) {\n locked = true;\n sortAndTruncate();\n }\n }", "public void lock_write() {\n boolean update = false;\n logger.log(Level.FINE,\"lock_write() \"+this.lockState+\".\");\n lock.lock();\n logger.log(Level.FINE,\"lock_write : taking mutex \"+this.lockState+\".\");\n switch(this.lockState){\n case WLC:\n this.lockState=State.WLT;\n logger.log(Level.INFO,\"writing with cache\");\n \t break;\n \t\t default: \t\n update = true;\n break;\n \t }\n lock.unlock();\n logger.log(Level.FINE,\"lock_write : the mutex with :\"+lockState+\".\");\n if(update){\n \tlogger.log(Level.INFO,\"Updating lock to WLT \"+lockState+\".\"); //Avant RLC\n \tthis.lockState=State.WLT; \n if(lockState!=State.WLT){\n logger.log(Level.SEVERE,\"Lock = \"+this.lockState+\" instead of WLT\"); //Bien mmis à WLT.\n }\n logger.log(Level.INFO,\"LockState was updated to \"+lockState+\".\");\n this.obj = client.lock_write(this.id); //BUG : se fait invalider en tant que reader et passe à NL entrant dans la boucle suivante \n // A mon avis : se fait invalider en tant que lecteur (d'ou un lock_incohérent = WLT). A voir \n // Est-ce qu'il s'auto-invalide, auquel cas, il faut vérifier invalidate_reader mais je crois qu'il y un test pour ce cas.\n // Quelqu'un d'autre l'invalide mais dans ce cas, le serveur devrait \"séquencer\" cette autre invalidation et le lock_write.\n if(lockState!=State.WLT){\n logger.log(Level.SEVERE,\"Lock = \"+this.lockState+\" instead of WLT\");\n }\n logger.log(Level.INFO,\"lock_write() : end with \"+lockState+\".\");\n }\n }", "public boolean isLock() {\n return isLock;\n }", "protected synchronized Lock acquireLock() {\n\t\tacquireReadLock();\n\t\treturn new Lock();\n\t}", "protected void beforeNormalAccess(RDVariable rdv, RDThread rdt) {\n\t\t/*\n\t\t * lock the explicit lock\n\t\t */\n\n\t\tif (DEBUG)\n\t\t\tRaceDetector.printDebug(\" explicit lock (\"\n\t\t\t\t\t+ System.identityHashCode(rdv) + \") try to be locked \"\n\t\t\t\t\t+ Thread.currentThread());\n\n\t\trdv.raceAvoidLock.lock();\n\n\t\tif (DEBUG)\n\t\t\tRaceDetector.printDebug(\" explicit lock (\"\n\t\t\t\t\t+ System.identityHashCode(rdv) + \") locked \"\n\t\t\t\t\t+ Thread.currentThread());\n\t}", "void lock(String resourceName) throws InterruptedException;", "protected final void lockRead() {\n m_lock.readLock().lock();\n }", "public final long lock() {\n explicitlyLocked = true;\n return byteBase.longLockPointer();\n }", "protected final void lock(boolean writeLock) {\n Lock lock = writeLock ? m_lock.writeLock() : m_lock.readLock();\n lock.lock();\n }", "final Object getLockObject() {\n return timeManager;\n }", "void lockExpired(String lock);", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tsynchronized (lock2) {\n\t\t\t\t\tSystem.out.println(\"This is the lock1\");\n\t\t\t\t\tsynchronized (lock1) {\n\t\t\t\t\t\tSystem.out.println(\"This is the lock2\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public interface Lock {\n\n void lock();\n\n void unlock();\n}", "private void wtfIfInLock() {\n if (Thread.holdsLock(mLockDoNoUseDirectly)) {\n Slogf.wtfStack(LOG_TAG, \"Shouldn't be called with DPMS lock held\");\n }\n }", "@Pointcut(value = \"@annotation(lock)\", argNames = \"lock\")\n public void lockPointcut(Lock lock) {\n }", "public abstract void unlock();", "public void lockGarage()\n {\n m_bGarageLock = true;\n }", "public void lockPassword() {\n passwordLock.lock();\n }", "@Override\n\tpublic boolean tryLock(long arg0, TimeUnit arg1)\n\t\t\tthrows InterruptedException {\n\t\treturn false;\n\t}", "@Override\n\tpublic void lock(Object entity, LockModeType lockMode, Map<String, Object> properties) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tsynchronized (lock1) {\n\t\t\t\t\tSystem.out.println(\"This is the lock1\");\n\t\t\t\t\tsynchronized (lock2) {\n\t\t\t\t\t\tSystem.out.println(\"This is the lock2\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public abstract String lock(String oid) throws OIDDoesNotExistException, LockNotAvailableException;", "public @NotNull ReentrantLock getLock() {\n return lock;\n }", "public Path lock(\n ) {\n return this;\n }", "public void setLockEnabled(boolean lockEnabled) {\r\n\t\tthis.lockEnabled = lockEnabled;\r\n\t}", "public InputLock(InputMultiplexer input) {\r\n\t\tthis(input, true, true, true, true, true, true, true, true);\r\n\t}", "public Lock delegate() {\n return this.delegate;\n }", "LockRecord(Record record, String workspace) {\n super(record, workspace);\n }", "void lock(Object obj, Object owner, int timeout)\r\n throws LockNotGrantedException, ClassCastException, ChannelException;", "public interface PreemptiveLock {\n\n /**\n * 尝试获得锁\n * @return 是否成功获得锁\n * @param lock\n */\n boolean getLock(String lock);\n\n /**\n * 释放锁\n * @param lock\n */\n void releaseLock(String lock);\n}", "@Override\n\tpublic void run() {\n\t\t\tfor(int i = 0; i<2;i++){\n\t\t\t\tsynchronized (this) {\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSystem.out.println(Thread.currentThread().getName()+\"正在等待\");\n\t\t\t\t\t\t//rl.lock();\n\t\t\t\t\t\tSystem.out.println(Thread.currentThread().getName()+\"得到锁\");\n\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}finally {\n\t\t\t\t\t\t//rl.unlock();\n\t\t\t\t\t\tSystem.out.println(Thread.currentThread().getName()+\"释放锁\");\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"=============\");\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t}", "public void lock_read() {\n boolean update = false;\n logger.log(Level.INFO,\"lock_read()\"+this.lockState);\n lock.lock();\n logger.log(Level.INFO,\"lock_read : taking mutex : \"+this.lockState);\n \t\tswitch(this.lockState){\n \t\t\tcase RLC :\n \t\t\t\tthis.lockState=State.RLT;\n logger.log(Level.INFO,\"reading in cache\");\n \t\t\tbreak;\n \t\t\tcase WLC:\n \t\t\t\tthis.lockState=State.RLT_WLC;\n \t\t\t\tlogger.log(Level.INFO,\"reading in cache as previous writer\");\n \t\t\tbreak;\n \t\t\tdefault:\n update = true;\n \t\t\tbreak;\t\t\t\t\t\n \t\t}\n lock.unlock();\n logger.log(Level.FINE,\"lock_read : release the lock with :\"+lockState+\".\");\n if(update){\n logger.log(Level.INFO,\"Updating lockState to RLT\");\n \tthis.lockState=State.RLT;\n logger.log(Level.INFO,\"Lockstate was updated to \"+lockState);\n if(this.lockState!=State.RLT){\n logger.log(Level.SEVERE,\"Lock = \"+lockState+\" instead of RLT\");\n }\n this.obj = client.lock_read(this.id);\n if(this.lockState!=State.RLT){\n logger.log(Level.SEVERE,\"Lock = \"+lockState+\" instead of RLT\");\n }\n logger.log(Level.INFO,\"lock_read(): end with \"+lockState);\n }\n \t}", "public boolean getlock()\r\n\t{\r\n\t\tif(cnt > 10)\r\n\t\t{\r\n\t\t\tcnt = 0;\r\n\t\t\treturn unlocked;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "protected final void lockWrite() {\n m_lock.writeLock().lock();\n }", "@Override\r\n\tpublic boolean unlockIt() {\n\t\treturn false;\r\n\t}" ]
[ "0.85806525", "0.8537585", "0.8537585", "0.8537585", "0.8271583", "0.7629762", "0.75773764", "0.73428196", "0.7291354", "0.71856725", "0.7123367", "0.70339125", "0.7027186", "0.6961583", "0.6961583", "0.6874365", "0.6860122", "0.6782606", "0.67816657", "0.67090195", "0.67077225", "0.6703261", "0.66922504", "0.66806614", "0.66699106", "0.66699106", "0.6659207", "0.6656555", "0.66294473", "0.66222733", "0.66208106", "0.66200733", "0.6610165", "0.659264", "0.6584807", "0.65778077", "0.6569316", "0.6551684", "0.6550861", "0.65298164", "0.6525264", "0.65245235", "0.65083283", "0.648656", "0.6467214", "0.6466074", "0.6444747", "0.64361006", "0.6434709", "0.6418422", "0.6348267", "0.63466454", "0.63453305", "0.63438815", "0.6319924", "0.6298258", "0.6285981", "0.62743515", "0.6271124", "0.6256953", "0.6253808", "0.62386286", "0.6237529", "0.6233277", "0.62244606", "0.621338", "0.6206624", "0.6196671", "0.61934125", "0.6177026", "0.6148312", "0.61469805", "0.6145597", "0.61436456", "0.61422485", "0.61414564", "0.6132261", "0.6131643", "0.61308265", "0.61263794", "0.612135", "0.61166024", "0.6112459", "0.60996217", "0.6096819", "0.6094924", "0.60828763", "0.6077378", "0.60745955", "0.6071606", "0.6062503", "0.6054056", "0.60535", "0.60430956", "0.6042487", "0.6039426", "0.6036221", "0.6031784", "0.60266954", "0.60180545" ]
0.7648605
5
Tools.trace("locking " + this,1);
public boolean tryLock(long time, TimeUnit tu) throws InterruptedException { if (!super.tryLock(time, TimeUnit.SECONDS)) { traceLev("failed to get lock continueing .", 1); traceLev("owning thread: " + getOwner(), 1); return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lock() {\n\n }", "void lock();", "public void lock() {\n/* 254 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void lock() {\n\t\tlocked = true;\n\t}", "public void lock() {\r\n super.lock();\r\n }", "public void lock() {\n super.lock();\n }", "public void lock() {\n super.lock();\n }", "public void lock() {\n super.lock();\n }", "public Lock getLock();", "public void synchronize(){ \r\n }", "public void lock() {\n while (true) {\r\n try {\r\n if (super.tryLock(2, TimeUnit.SECONDS))\r\n return;\r\n } catch (InterruptedException e) {\r\n trace(\"caught \" + e);\r\n }\r\n //trace(\"failed to get lock\", 1);\r\n //trace(\"owning thread: \" + getOwner(), 1);\r\n //Thread.dumpStack();\r\n }\r\n }", "void lock(Portal portal);", "@Override\n\tpublic boolean isLocked() { return true; }", "Thread getLocker();", "void lockGranted(LockHandle lockHandle);", "public Lock() {\r\n }", "public void lock(int key);", "ManagementLockObject.Update update();", "public LockSync() {\n lock = new ReentrantLock();\n }", "private Locks() {\n\t\tlockId = ObjectId.get().toString();\n\t}", "@Override\n\tpublic void run() {\n\t\tSystem.out.println(\"inside run() method.....\");\n\n\t\tlock();\n\n\t}", "LockManager() {\n }", "public abstract ReentrantLock getLock();", "public void dataBaseLocked();", "@Override\n\tpublic void onLockMap(boolean arg0) {\n\t\t\n\t}", "public void lock() {\n islandLocked = true;\n }", "LockLevel level();", "private void wtfIfInLock() {\n if (Thread.holdsLock(mLockDoNoUseDirectly)) {\n Slogf.wtfStack(LOG_TAG, \"Shouldn't be called with DPMS lock held\");\n }\n }", "@Override\n\tpublic void lock() {\n\t\tSystem.out.println(\"Card in ATM1 is locked !\");\n\t}", "@Override\n\tpublic boolean tryLock() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean tryLock() {\n\t\treturn false;\n\t}", "final public Lock test_get_lock() {\r\n\t\treturn lock_;\r\n\t}", "void m2() {\n\n boolean locked = false;\n try {\n locked = lock.tryLock(4, TimeUnit.SECONDS);\n\n //可以设置lock为可打断的\n //可以在主线程中调用interrupt方法打断,然后当做异常处理\n// lock.lockInterruptibly();\n\n System.out.println(locked);\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n if (locked) lock.unlock();\n }\n }", "@Override\r\n\tpublic void addLockToken(String lt) {\n\t\t\r\n\t}", "void lock(String name) {\n execute(name, connection -> doLock(name, connection));\n }", "@Pointcut(value = \"@annotation(lock)\", argNames = \"lock\")\n public void lockPointcut(Lock lock) {\n }", "ManagementLockObject apply();", "@Override\n\tpublic void unlock() {\n\t\t\n\t}", "public interface Lock {\n\n boolean acquire();\n\n boolean release();\n}", "protected boolean upgradeLocks() {\n \t\treturn false;\n \t}", "@Override\r\n\tpublic void onLock(boolean lock) {\n\t\tthis.lock = lock;\r\n\t}", "@Override\n\tpublic void lock(Object entity, LockModeType lockMode) {\n\t\t\n\t}", "public void testAddLockToken() {\n \n String lock = \"some lock\";\n session.addLockToken(lock);\n \n sessionControl.replay();\n sfControl.replay();\n \n jt.addLockToken(lock);\n \n }", "@Test\n\tpublic void testTryLockAndRelockAndPass() {\n\n\t\tinstance.lock();\n\n\t\tassertTrue(instance.tryLock());\n\t}", "@Override\n public boolean isLocked(Object o) {\n return false;\n }", "public Lock getLock() {\n return lock;\n }", "@Override\n public void unlock() {\n }", "static Lock createLock() {\n return new /*Prio*/Lock();\n }", "private void RecordStoreLockFactory() {\n }", "public void openLock(){\n /*Code to send an unlocking signal to the physical device Gate*/\n }", "public static synchronized void foo() {\n\n }", "public Object getLock() {\n return dataLock;\n }", "void lock(String resourceName) throws InterruptedException;", "@Override\n\tpublic void unLock() {\n\t\t\n\t}", "void lockExpired(String lock);", "public interface Lock {\n\n void lock();\n\n void unlock();\n}", "public void unlock() {\n/* 246 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tpublic void lockInterruptibly() throws InterruptedException {\n\t\t\n\t}", "@Override\n\tpublic void lockInterruptibly() throws InterruptedException {\n\t\t\n\t}", "protected void lock() {\n semaphore = new Semaphore(0);\n try {\n semaphore.acquire();\n }\n catch(InterruptedException e) {\n System.out.println(\"Trouble for request of semaphore acquirement\");\n e.printStackTrace();\n }\n }", "public LockImpl(long id) {\n\t\tthis.id = id;\n\t}", "@Override\n public void setLockOwner(Object lockOwner) {\n }", "public final void mo34030a() {\n this.f590g.lock();\n }", "public void lock(String x)\n {\n if(x.equals(((DataStore1)ds).temp_p))\n m.Lock();\n else\n m.IncorrectLock();\n }", "public void visitKeylock( DevCat devCat ) {}", "public boolean holdsLock(TransactionId tid, PageId p) {\n // some code goes here\n // not necessary for lab1|lab2\n return false;\n }", "public void lockAdd(){\n\t\tthis.canAdd = false;\n\t}", "ManagementLockObject refresh();", "public void acquireDeferredLock() {\r\n return;\r\n }", "public void lock_write() {\n boolean update = false;\n logger.log(Level.FINE,\"lock_write() \"+this.lockState+\".\");\n lock.lock();\n logger.log(Level.FINE,\"lock_write : taking mutex \"+this.lockState+\".\");\n switch(this.lockState){\n case WLC:\n this.lockState=State.WLT;\n logger.log(Level.INFO,\"writing with cache\");\n \t break;\n \t\t default: \t\n update = true;\n break;\n \t }\n lock.unlock();\n logger.log(Level.FINE,\"lock_write : the mutex with :\"+lockState+\".\");\n if(update){\n \tlogger.log(Level.INFO,\"Updating lock to WLT \"+lockState+\".\"); //Avant RLC\n \tthis.lockState=State.WLT; \n if(lockState!=State.WLT){\n logger.log(Level.SEVERE,\"Lock = \"+this.lockState+\" instead of WLT\"); //Bien mmis à WLT.\n }\n logger.log(Level.INFO,\"LockState was updated to \"+lockState+\".\");\n this.obj = client.lock_write(this.id); //BUG : se fait invalider en tant que reader et passe à NL entrant dans la boucle suivante \n // A mon avis : se fait invalider en tant que lecteur (d'ou un lock_incohérent = WLT). A voir \n // Est-ce qu'il s'auto-invalide, auquel cas, il faut vérifier invalidate_reader mais je crois qu'il y un test pour ce cas.\n // Quelqu'un d'autre l'invalide mais dans ce cas, le serveur devrait \"séquencer\" cette autre invalidation et le lock_write.\n if(lockState!=State.WLT){\n logger.log(Level.SEVERE,\"Lock = \"+this.lockState+\" instead of WLT\");\n }\n logger.log(Level.INFO,\"lock_write() : end with \"+lockState+\".\");\n }\n }", "public boolean isLock() {\n return isLock;\n }", "public void addLock(I_MemoryLock lock);", "public boolean isLocked() {\r\n \treturn false;\r\n }", "protected boolean isLock() {\r\n return Lock.isLock(this.getBlock());\r\n }", "protected void beforeNormalAccess(RDVariable rdv, RDThread rdt) {\n\t\t/*\n\t\t * lock the explicit lock\n\t\t */\n\n\t\tif (DEBUG)\n\t\t\tRaceDetector.printDebug(\" explicit lock (\"\n\t\t\t\t\t+ System.identityHashCode(rdv) + \") try to be locked \"\n\t\t\t\t\t+ Thread.currentThread());\n\n\t\trdv.raceAvoidLock.lock();\n\n\t\tif (DEBUG)\n\t\t\tRaceDetector.printDebug(\" explicit lock (\"\n\t\t\t\t\t+ System.identityHashCode(rdv) + \") locked \"\n\t\t\t\t\t+ Thread.currentThread());\n\t}", "public Object getHierarchyLock() {\n return hierarchyLock;\n }", "@Override\n\tpublic Lock getLock() {\n\t\treturn this.lock;\n\t}", "public void setPoolLocked(boolean lockingState){poolLocked=lockingState;}", "public void lockPassword() {\n passwordLock.lock();\n }", "public void viewListofLocks() {\n\t\ttry {\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Failed to get list of locks\");\n\t\t\tSystem.out.println(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to get list of locks\");\n\t\t}\n\t}", "protected final Object getTreeLock() {\n return Component.LOCK;\n }", "public void lockGarage()\n {\n m_bGarageLock = true;\n }", "void lock(Object obj, Object owner, int timeout)\r\n throws LockNotGrantedException, ClassCastException, ChannelException;", "@Override\n public void lock() {\n Preconditions.checkState(connection != null);\n if (!tryLock(lockGetTimeout(), TimeUnit.MILLISECONDS)) {\n Monitoring.increment(errorCounter.name(), (KeyValuePair<String, String>[]) null);\n throw new LockException(String.format(\"[%s][%s] Timeout getting lock.\", id().getNamespace(), id().getName()));\n }\n }", "protected void onBSLock() {\n\n }", "@Override\n public void run() {\n if(Thread.currentThread().getName().equals(\"t1\")){\n synchronized(obj){\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n System.out.println(\"t1拿到了obj的锁\");\n synchronized(obj2){\n\n }\n }\n }\n //当线程名等于t2 时 进入此方法\n if(Thread.currentThread().getName().equals(\"t2\")){\n // 线程t2 拿到obj2 的锁 然后线程进入休眠一秒状态 \n synchronized(obj2){\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n System.out.println(\"t2拿到了obj2的锁\");\n synchronized(obj){\n\n }\n }\n }\n }", "public final long lock() {\n explicitlyLocked = true;\n return byteBase.longLockPointer();\n }", "public void lockThreadForClient()\n {\n masterThread.lockThreadForClient();\n }", "@DefaultMessage(\"Locking record for Update...\")\n @Key(\"gen.lockForUpdate\")\n String gen_lockForUpdate();", "@RequiresLock(\"SeaLock\")\r\n protected void invalidate_internal() {\n }", "@Override\r\n\tpublic boolean unlockIt() {\n\t\treturn false;\r\n\t}", "final Object getLockObject() {\n return timeManager;\n }", "public boolean isLocked();", "public abstract void unlock();", "final void ensureLocked() {\n if (Thread.holdsLock(mLockDoNoUseDirectly)) {\n return;\n }\n Slogf.wtfStack(LOG_TAG, \"Not holding DPMS lock.\");\n }", "public interface PreemptiveLock {\n\n /**\n * 尝试获得锁\n * @return 是否成功获得锁\n * @param lock\n */\n boolean getLock(String lock);\n\n /**\n * 释放锁\n * @param lock\n */\n void releaseLock(String lock);\n}", "LockRecord(Record record, String workspace) {\n super(record, workspace);\n }", "public abstract String lock(String oid) throws OIDDoesNotExistException, LockNotAvailableException;", "@DSComment(\"Package priviledge\")\n @DSBan(DSCat.DEFAULT_MODIFIER)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:56:28.357 -0500\", hash_original_method = \"E049D119A7B4A553F02CF8223BDECCF5\", hash_generated_method = \"69F031F83675ABF5D78C26020D90F3C7\")\n \n boolean holdsLock(Object object){\n \t//Formerly a native method\n \taddTaint(object.getTaint());\n \treturn getTaintBoolean();\n }", "public void lock() {\n if (!locked) {\n locked = true;\n sortAndTruncate();\n }\n }", "public boolean getlock()\r\n\t{\r\n\t\tif(cnt > 10)\r\n\t\t{\r\n\t\t\tcnt = 0;\r\n\t\t\treturn unlocked;\r\n\t\t}\r\n\t\treturn false;\r\n\t}" ]
[ "0.7799809", "0.71946126", "0.7125515", "0.710813", "0.7094893", "0.70490783", "0.70490783", "0.70490783", "0.66335124", "0.6588006", "0.65394855", "0.652225", "0.6461015", "0.6427346", "0.6412503", "0.63748825", "0.6340975", "0.6335284", "0.6283229", "0.62688524", "0.62466055", "0.62462443", "0.62443495", "0.6225546", "0.62076116", "0.6191471", "0.6179134", "0.61713004", "0.6166561", "0.6160469", "0.6160469", "0.6159244", "0.6123957", "0.611271", "0.6094037", "0.60912085", "0.60847235", "0.60769904", "0.60394484", "0.60189843", "0.6012351", "0.6011826", "0.60032797", "0.5997255", "0.5994273", "0.5982984", "0.5981995", "0.5980877", "0.59741426", "0.597335", "0.5968417", "0.59399587", "0.5936963", "0.59353596", "0.5929573", "0.59146523", "0.58918893", "0.58751017", "0.58751017", "0.5866207", "0.5856679", "0.584967", "0.5837156", "0.58266187", "0.58242214", "0.5821558", "0.58124757", "0.5811186", "0.5807231", "0.58063495", "0.5798195", "0.57898664", "0.5784964", "0.5760488", "0.57532656", "0.57491213", "0.5743842", "0.5743767", "0.57384896", "0.5737326", "0.57138926", "0.56944597", "0.5691213", "0.56845427", "0.56753594", "0.5660146", "0.5658006", "0.5652669", "0.56456643", "0.5638952", "0.5638462", "0.56301737", "0.5623309", "0.561762", "0.56149065", "0.56070477", "0.56068027", "0.5601624", "0.5600767", "0.5577864", "0.5572973" ]
0.0
-1
trace("adding Idler " + inst);
public static void registerIdle(Idler inst) { iList.add(inst); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void id() {}", "public void addInstruction(){\n\n }", "private AddHarnessIdInterceptor() {}", "void id(int id) {}", "private void addAI(){\n\n }", "LWJGLProgramHandler()\r\n {\r\n //instance = this;\r\n }", "void setInstId(String instId);", "private void add() {\n\n\t}", "void addId(II identifier);", "public void emitIadd() {\n\t\tlines.append(\"iadd\\n\");\n\t}", "public static void main(String[] args) {\n\t\tSigleton s=Sigleton.getInstance();\r\n\t\t\r\n\t\tSystem.out.println(s);\r\n\t\t\r\n\t\tSigleton s1=Sigleton.getInstance();\r\n\t\tSystem.out.println(s1);\r\n\t\t\r\n\t\t\r\n\t\tSigleton s2=Sigleton.getInstance();\r\n\t\tSystem.out.println(s2);\r\n\t\t\r\n\t}", "void addInstance(Instance instance);", "public void addToBlock(Instruction instn){\n\t\tinstns.add(instn);\n\t}", "public void instatnceMethod() {\n System.out.println(\"instatnMethod\");\n System.out.println(\"count = \" + count);\n displayMessage(\"hello from instance methods\");\n }", "private Infer() {\n\n }", "private Registry() {\n dbgLog.fine(\"Registry constructor is called\");\n }", "id() {}", "II addId();", "public void identify() {\n\n\t}", "public interface IDogManager extends IInterface {\n String DESCRIPTOR = \"com.afollestad.aidlexample.IDogManager\";\n\n int TRANSACTION_getDogList= IBinder.FIRST_CALL_TRANSACTION+0;\n int TRANSACTION_addDog= IBinder.FIRST_CALL_TRANSACTION+1;\n List<Dog> getDogList() throws RemoteException;\n\n void addDog(Dog dog) throws RemoteException;\n}", "public void addDynmaicClass(String id, _AJAXHandler instance) {\n\n\t}", "@Override\n\tpublic InvocationInstrumenter newInvocationInstrumenter() {\n\t\treturn AuthInfoContext.current()\n\t\t\t\t.map(LocalInstrumenter::new)\n\t\t\t\t.orElse(null);\n\t}", "private JDBCMiddler() {\n System.out.println(\"new EJB[\" + this.hashCode() + \"]\");\n }", "@Override\n\tpublic void onStartInstrExecution(Instruction instr) {\n\t\t\n\t}", "public void ajouter(Instrument i){\n\n }", "int getIdInstance();", "int id();", "private EagerlySinleton()\n\t{\n\t}", "public Climber(){\n\t\tinst = this;\n\t}", "InstCast createInstCast();", "private Add() {}", "private Add() {}", "public static void main(String[] args) {\n\t\t\r\ni o=new interface_cl();\r\no.show();\r\n\t}", "private DAOLogger() {\n\t}", "public void testSetInsDyn() {\n }", "void add(T instance);", "public _cls_script_13( AutomatonInstance ta,UserAccount _ua,UserInfo _ui) {\nparent = _cls_script_12._get_cls_script_12_inst( _ua,_ui);\nthis.ta = ta;\n}", "IPayerEntry addId(II value);", "private InstructGui() {\n }", "public void add() {\n\t\tSystem.out.println(\"I am from Add method\");\n\t}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public String getInstId() {\r\n return instId;\r\n }", "void add(I i);", "@Override\n public void addLoaders(WorldLoader wl, WorldInfo info) {\n }", "void instanceCreated(String pid, IDefinition definition);", "@Override\n\tpublic void insertInvoker(Invoker<?> invoker) {\n\t\t\n\t}", "public interface NakedObjectMemberPeer extends Identified {\r\n\r\n void debugData(DebugString debugString);\r\n\r\n}", "void hook() {\n\t}", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "long getInstanceID();", "private ScriptInstanceManager() {\n\t\tsuper();\n\t}", "public interface Instrumentor {\n\n InstrumentionClass getInstrucmentClass(ClassLoader loader, String className, byte[] classfileBuffer);\n\n}", "private AlgorithmRegistryCLI() {\n super();\n }", "String getInstanceID();", "@Override\n\tpublic void entry() {\n\n\t}", "public void addInstruction(Instruction inst) {\n if (encodedProgram != null) {\n throw new AssertionError(\"Trying to add instructions after program has been linked\");\n }\n\n if (program == null) {\n program = new LinkedHashMap<>(128);\n encodedProgram = null;\n }\n\n inst.setAddress(programCntr);\n String key = inst.getLabel();\n if (key == null) {\n key = \"_pc\" + programCntr; // illegal label, could never interfere with a real program\n }\n if ((program.put(key, inst)) != null) {\n throw new RuntimeException(\"Duplicate label: \" + key);\n }\n programCntr++;\n }", "public static void main(String... args) {\n Singletone singletone = Singletone.getInstance();\n try {\n // create obj for Singletone by Accessing private Constructor of\n Class clazz = Class.forName(\"com.krushidj.singletone.Singletone\");\n // get All consturctors of the class\n Constructor[] cons = clazz.getDeclaredConstructors();\n // provide access to private constructor\n cons[0].setAccessible(true);\n Field f = (Singletone.class).getDeclaredField(\"isInstantiated\");\n f.setAccessible(true);\n f.set(true, false);\n // creating obj using the Accessed constructor\n Singletone singletone1 = (Singletone) cons[0].newInstance(null);\n System.out.println(\"singletone hashCode:::\" + singletone.hashCode());\n System.out.println(\"singletone1 hashCode:::\" + singletone1.hashCode());\n } // try\n catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "private void inject() {\n }", "@Override\n\tprotected void initHook() {\n\t}", "public Performer() \r\n {\r\n name = \"Sally\";\r\n ID = 111;\r\n type = \"\";\r\n }", "Tank() {\n\n print(\"Tank \" + id + \" is created!\");\n print(\"Tank \" + id + \" is created!\");\n }", "public void add() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\tSystem.out.println(\"init\");\n\t}", "public void addListener(AlgorithmInterface obj) {\r\n objectList.addElement(obj);\r\n }", "public static void thisDemo() {\n\t}", "@Override\n\tpublic void add() {\n\t\tSystem.out.println(\"Injection to database : Oracle\");\n\t}" ]
[ "0.5953845", "0.5820281", "0.5737012", "0.5657399", "0.56541306", "0.5542223", "0.5541435", "0.5510179", "0.5459467", "0.54194665", "0.53512275", "0.5349265", "0.53393227", "0.5330403", "0.53231055", "0.52842283", "0.524908", "0.5245646", "0.524211", "0.5224849", "0.52201736", "0.5217482", "0.5206269", "0.52058476", "0.520248", "0.5199018", "0.51938546", "0.5184494", "0.5181028", "0.51601464", "0.51580477", "0.51580477", "0.51480544", "0.5142012", "0.51358336", "0.51174766", "0.5114867", "0.5113816", "0.5111085", "0.51059085", "0.5101469", "0.5101469", "0.5101469", "0.5101469", "0.5101469", "0.5101469", "0.5101469", "0.5101469", "0.5101469", "0.5101469", "0.5101469", "0.5101469", "0.50956076", "0.5060883", "0.50583637", "0.5054415", "0.5044575", "0.5043798", "0.50264126", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50227827", "0.50186294", "0.50171113", "0.5016282", "0.5002466", "0.4990507", "0.49856398", "0.49695963", "0.49680755", "0.4967393", "0.4966802", "0.49664485", "0.49613225", "0.4960678", "0.49598873", "0.4958252", "0.4955732", "0.49544936" ]
0.6284305
0
trace("inserting " + e);
public static synchronized void insert(JeyEvent e) { queue.addLast(e); EventQueue.class.notifyAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insert(E e);", "public void insert()\n\t{\n\t}", "@Override\n\tpublic void insert() {\n\t\t\n\t}", "@Override\n\tpublic void insertProcess() {\n\t\t\n\t}", "@Override\r\n\tpublic String insert() {\n\t\treturn \"insert\";\r\n\t}", "public void insertUpdate(DocumentEvent e) {\n }", "int insertSelective(TbExpressTrace record);", "int insert(YzStiveExplosion record);", "@Override\n\tpublic void preInsert() {\n\n\t}", "int insert(PfCombElementEvent record);", "boolean insert(E e);", "int insert(Position record);", "int insert(TerminalInfo record);", "@Override\n\tpublic void insert(String... args) throws SQLException {\n\t\t\n\t}", "@Override\n\tpublic void insertUpdate(DocumentEvent de) {\n\n\t}", "int insertSelective(PfCombElementEvent record);", "public void insert(E item) {\n // FILL IN\n }", "int insert(Engine record);", "public abstract String insert(Object obj) ;", "@Override\n\tpublic void insertUpdate(DocumentEvent e) {\n\t\tif(!listenChange) return;\n\t\tdisplaySelf = false;\n\t\tDocument doc = e.getDocument();\n\t\ttry {\n\t\t\tint offset = e.getOffset();\n\t\t\tString text = doc.getText(0, doc.getLength());\n\t\t\tfor(int i = 0; i < e.getLength(); ++i) {\n\t\t\t\tthis.processInsert(offset+i, text.charAt(offset+i));\n\t\t\t}\n\t\t\t//System.out.println(text.substring(offset, offset+e.getLength()));\n\t\t} catch (BadLocationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "int insertSelective(EventDetail record);", "int insert(Notice record);", "int insert(BehaveLog record);", "void insert(TbMessage record);", "@Override\n\tpublic void insertar() {\n\t\t\n\t}", "int insertSelective(YzStiveExplosion record);", "public void insertUpdate(DocumentEvent e) {\r\n changed();\r\n }", "int insert(Enfermedad record);", "int insert(Assist_table record);", "void insert(T t);", "public void insertUpdate(DocumentEvent e)\n {\n performFlags();\n }", "int insert(HotspotLog record);", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\ttry {\n\t\t\t\tinsert();\n\t\t\t} catch (MyException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "int insert(FunctionInfo record);", "int insert(Miss_control_log record);", "protected void startInsertRunnable() {\n\t}", "int insert(Alert record);", "@Override\r\n\tpublic void insertObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "int insert(HelpInfo record);", "int insert(ParseTableLog record);", "int insertSelective(Alert record);", "int insert(SysNotice record);", "int insert(MenuInfo record);", "void insert(Mi004 record);", "int insertSelective(Engine record);", "public void insert(Conge conge) ;", "public void insert(T o);", "void insert(EntryPair entry);", "@Override\n\t\tpublic void insert() {\n\t\t\tSystem.out.println(\"새로운 등록\");\n\t\t}", "Long insert(EventDetail record);", "int insertSelective(TerminalInfo record);", "@Override\n\tpublic String insertStatement() throws Exception {\n\t\treturn null;\n\t}", "public void insert(T x);", "int insert(QtActivitytype record);", "@Override\n\tpublic boolean insert(E e) {\n\t\treturn add(e);\n\t}", "void insert(int pos, String s);", "int insert(trackcomment record);", "int insert(ComplainNoteDO record);", "int insert(NjOrderCallbackLog record);", "int insert(DictDoseUnit record);", "int insert(TDwBzzxBzflb record);", "int insert(Message record);", "int insertSelective(Miss_control_log record);", "@Override\n\tpublic void e() {\n\n\t}", "int insert(PointsExchangeRecord record);", "int insert(Goodexistsingle record);", "int insertSelective(Assist_table record);", "int insert(TLinkman record);", "int insert(AdminTab record);", "int insertSelective(Notice record);", "@Override\n\tpublic void insert(DhtmlxGridForm f) throws Exception {\n\t\t\n\t}", "void insert(VRpDyCellBh record);", "int insert(Massage record);", "int insert(Abum record);", "public void insert() throws SQLException;", "void insert(VRpMnBscHoIbc record);", "int insertSelective(AlertQueue record);", "int insertSelective(NjOrderCallbackLog record);", "int insert(Ltsprojectpo record);", "public void insert(Object item);", "int insert(MsgContent record);", "public void insertUpdate(DocumentEvent ev) {\n String stack = Log.getStack(Log.FULL_STACK);\n if (stack.indexOf(\"JTextComponent.setText\") != -1) {\n revertText = textField.getText();\n }\n if (continuousFire) {\n fireActionPerformed(ACTION_TEXT_INSERTED);\n }\n }", "int insert(Basicinfo record);", "int insert(UsrMmenus record);", "int insert(Ttoken record);", "@Override\n\tpublic int insert(Message t) {\n\t\treturn 0;\n\t}", "int insert(TCpySpouse record);", "public void insert(JspElement e) {\r\n\tif (_first == null) {\r\n\t\t_first = e;\r\n\t\t_last = e;\r\n\t\te.setNext(null);\r\n\t}\t\r\n\telse {\r\n\t\te.setNext(_first);\r\n\t\t_first = e;\r\n\t}\r\n}", "int insert(TestEntity record);", "int insert(TagData record);", "void insert(VRpMnCellHoBhIbc record);", "public void insert(K k, E e) \n\t{\n\t\troot = inserthelp(root, k, e);\n\t\tnodecount++;\n\t}", "int insert(Storydetail record);", "int insert(ToolsOutIn record);", "int insert(RepStuLearning record);", "void insert(XdSpxx record);", "int insert(TbSnapshot record);", "int insert(Commet record);", "int insert(ArticleTag record);", "int insert(Yqbd record);", "int insert(FeiWenComment record);" ]
[ "0.7060001", "0.70021623", "0.69914746", "0.6653964", "0.6568102", "0.6548939", "0.6447591", "0.642574", "0.6387557", "0.6363948", "0.63409483", "0.6338697", "0.62257695", "0.62213904", "0.6219722", "0.61948544", "0.61945504", "0.6179952", "0.6156488", "0.61489975", "0.61304796", "0.6130477", "0.61293024", "0.61189204", "0.6095095", "0.60504603", "0.6043924", "0.6039719", "0.6034656", "0.6034014", "0.60273796", "0.6020153", "0.6019522", "0.6013416", "0.6000684", "0.59947723", "0.59941363", "0.59929216", "0.59787923", "0.5977544", "0.59711725", "0.5955881", "0.5948623", "0.5937162", "0.592621", "0.59195065", "0.591719", "0.5903896", "0.5903291", "0.59004706", "0.5898202", "0.58926183", "0.5856951", "0.5851986", "0.58348733", "0.5829867", "0.58290446", "0.5828663", "0.58252764", "0.5822616", "0.5821436", "0.5810883", "0.5804613", "0.58002377", "0.57966137", "0.5791055", "0.57863384", "0.5774572", "0.57702947", "0.57574975", "0.57557416", "0.5751758", "0.5748961", "0.57437736", "0.5742366", "0.5739896", "0.5738865", "0.57380986", "0.57379085", "0.57343364", "0.5733478", "0.57286936", "0.5725759", "0.57200396", "0.57189953", "0.57171416", "0.57102615", "0.5709395", "0.5708916", "0.5704425", "0.5703374", "0.5703023", "0.570252", "0.5700052", "0.5699899", "0.5691924", "0.56902546", "0.5688288", "0.56875116", "0.56849486", "0.56807864" ]
0.0
-1
trace("inserting " + e);
public static synchronized void insert(IEvent e) { queue.addLast(e); EventQueue.class.notifyAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insert(E e);", "public void insert()\n\t{\n\t}", "@Override\n\tpublic void insert() {\n\t\t\n\t}", "@Override\n\tpublic void insertProcess() {\n\t\t\n\t}", "@Override\r\n\tpublic String insert() {\n\t\treturn \"insert\";\r\n\t}", "public void insertUpdate(DocumentEvent e) {\n }", "int insertSelective(TbExpressTrace record);", "int insert(YzStiveExplosion record);", "@Override\n\tpublic void preInsert() {\n\n\t}", "int insert(PfCombElementEvent record);", "boolean insert(E e);", "int insert(Position record);", "int insert(TerminalInfo record);", "@Override\n\tpublic void insert(String... args) throws SQLException {\n\t\t\n\t}", "@Override\n\tpublic void insertUpdate(DocumentEvent de) {\n\n\t}", "int insertSelective(PfCombElementEvent record);", "public void insert(E item) {\n // FILL IN\n }", "int insert(Engine record);", "public abstract String insert(Object obj) ;", "@Override\n\tpublic void insertUpdate(DocumentEvent e) {\n\t\tif(!listenChange) return;\n\t\tdisplaySelf = false;\n\t\tDocument doc = e.getDocument();\n\t\ttry {\n\t\t\tint offset = e.getOffset();\n\t\t\tString text = doc.getText(0, doc.getLength());\n\t\t\tfor(int i = 0; i < e.getLength(); ++i) {\n\t\t\t\tthis.processInsert(offset+i, text.charAt(offset+i));\n\t\t\t}\n\t\t\t//System.out.println(text.substring(offset, offset+e.getLength()));\n\t\t} catch (BadLocationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "int insertSelective(EventDetail record);", "int insert(Notice record);", "int insert(BehaveLog record);", "void insert(TbMessage record);", "@Override\n\tpublic void insertar() {\n\t\t\n\t}", "int insertSelective(YzStiveExplosion record);", "public void insertUpdate(DocumentEvent e) {\r\n changed();\r\n }", "int insert(Enfermedad record);", "int insert(Assist_table record);", "void insert(T t);", "public void insertUpdate(DocumentEvent e)\n {\n performFlags();\n }", "int insert(HotspotLog record);", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\ttry {\n\t\t\t\tinsert();\n\t\t\t} catch (MyException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "int insert(FunctionInfo record);", "int insert(Miss_control_log record);", "protected void startInsertRunnable() {\n\t}", "int insert(Alert record);", "@Override\r\n\tpublic void insertObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "int insert(HelpInfo record);", "int insert(ParseTableLog record);", "int insertSelective(Alert record);", "int insert(SysNotice record);", "int insert(MenuInfo record);", "void insert(Mi004 record);", "int insertSelective(Engine record);", "public void insert(Conge conge) ;", "public void insert(T o);", "void insert(EntryPair entry);", "@Override\n\t\tpublic void insert() {\n\t\t\tSystem.out.println(\"새로운 등록\");\n\t\t}", "Long insert(EventDetail record);", "int insertSelective(TerminalInfo record);", "@Override\n\tpublic String insertStatement() throws Exception {\n\t\treturn null;\n\t}", "public void insert(T x);", "int insert(QtActivitytype record);", "@Override\n\tpublic boolean insert(E e) {\n\t\treturn add(e);\n\t}", "void insert(int pos, String s);", "int insert(trackcomment record);", "int insert(ComplainNoteDO record);", "int insert(NjOrderCallbackLog record);", "int insert(DictDoseUnit record);", "int insert(TDwBzzxBzflb record);", "int insert(Message record);", "int insertSelective(Miss_control_log record);", "@Override\n\tpublic void e() {\n\n\t}", "int insert(PointsExchangeRecord record);", "int insert(Goodexistsingle record);", "int insertSelective(Assist_table record);", "int insert(TLinkman record);", "int insert(AdminTab record);", "int insertSelective(Notice record);", "@Override\n\tpublic void insert(DhtmlxGridForm f) throws Exception {\n\t\t\n\t}", "void insert(VRpDyCellBh record);", "int insert(Massage record);", "int insert(Abum record);", "public void insert() throws SQLException;", "void insert(VRpMnBscHoIbc record);", "int insertSelective(AlertQueue record);", "int insertSelective(NjOrderCallbackLog record);", "int insert(Ltsprojectpo record);", "public void insert(Object item);", "int insert(MsgContent record);", "public void insertUpdate(DocumentEvent ev) {\n String stack = Log.getStack(Log.FULL_STACK);\n if (stack.indexOf(\"JTextComponent.setText\") != -1) {\n revertText = textField.getText();\n }\n if (continuousFire) {\n fireActionPerformed(ACTION_TEXT_INSERTED);\n }\n }", "int insert(Basicinfo record);", "int insert(UsrMmenus record);", "int insert(Ttoken record);", "@Override\n\tpublic int insert(Message t) {\n\t\treturn 0;\n\t}", "int insert(TCpySpouse record);", "public void insert(JspElement e) {\r\n\tif (_first == null) {\r\n\t\t_first = e;\r\n\t\t_last = e;\r\n\t\te.setNext(null);\r\n\t}\t\r\n\telse {\r\n\t\te.setNext(_first);\r\n\t\t_first = e;\r\n\t}\r\n}", "int insert(TestEntity record);", "int insert(TagData record);", "void insert(VRpMnCellHoBhIbc record);", "public void insert(K k, E e) \n\t{\n\t\troot = inserthelp(root, k, e);\n\t\tnodecount++;\n\t}", "int insert(Storydetail record);", "int insert(ToolsOutIn record);", "int insert(RepStuLearning record);", "void insert(XdSpxx record);", "int insert(TbSnapshot record);", "int insert(Commet record);", "int insert(ArticleTag record);", "int insert(Yqbd record);", "int insert(FeiWenComment record);" ]
[ "0.7060001", "0.70021623", "0.69914746", "0.6653964", "0.6568102", "0.6548939", "0.6447591", "0.642574", "0.6387557", "0.6363948", "0.63409483", "0.6338697", "0.62257695", "0.62213904", "0.6219722", "0.61948544", "0.61945504", "0.6179952", "0.6156488", "0.61489975", "0.61304796", "0.6130477", "0.61293024", "0.61189204", "0.6095095", "0.60504603", "0.6043924", "0.6039719", "0.6034656", "0.6034014", "0.60273796", "0.6020153", "0.6019522", "0.6013416", "0.6000684", "0.59947723", "0.59941363", "0.59929216", "0.59787923", "0.5977544", "0.59711725", "0.5955881", "0.5948623", "0.5937162", "0.592621", "0.59195065", "0.591719", "0.5903896", "0.5903291", "0.59004706", "0.5898202", "0.58926183", "0.5856951", "0.5851986", "0.58348733", "0.5829867", "0.58290446", "0.5828663", "0.58252764", "0.5822616", "0.5821436", "0.5810883", "0.5804613", "0.58002377", "0.57966137", "0.5791055", "0.57863384", "0.5774572", "0.57702947", "0.57574975", "0.57557416", "0.5751758", "0.5748961", "0.57437736", "0.5742366", "0.5739896", "0.5738865", "0.57380986", "0.57379085", "0.57343364", "0.5733478", "0.57286936", "0.5725759", "0.57200396", "0.57189953", "0.57171416", "0.57102615", "0.5709395", "0.5708916", "0.5704425", "0.5703374", "0.5703023", "0.570252", "0.5700052", "0.5699899", "0.5691924", "0.56902546", "0.5688288", "0.56875116", "0.56849486", "0.56807864" ]
0.0
-1
Queue that tracks consuming of the elements and may readd elements that were attempted to be consumed. E.g. when consumer fails to ack finish of processing of the element. TODO: consider making generic, current implementation works only with Strings
public interface TrackingQueue { /** * Adds element to the queue. * * @param element to add * @return future of the consuming result. It will be set when consuming is successfully reported to be completed */ ListenableFuture<String> add(Element element); /** * Take next available element from the queue act on it. * <p> * After element is taken it is no longer available for others to take unless it is not placed back to queue. * Element can be placed back in the following cases: * <ul> * <li> * By invoking {@link #add(Element)} method. In this case element will * be considered a new element never seen before. * Element will not be removed from list of "in-progress" elements list automatically. * </li> * <li> * By reporting {@link ConsumingStatus#FAILED} status via * {@link #recordProgress(String, String, ConsumingStatus, String)}. * Element will be rescheduled automatically and removed from the "in-progress" list. * </li> * <li> * Element can be rescheduled automatically based on the implementation logic of subclasses. * </li> * </ul> * </p> * * @param consumerId element consumer * @return next available element, or null if no element is available */ Element take(String consumerId); /** * Records progress of consuming the element. If element no longer belongs to this consumer this will be noted in * returned possession state as {@link PossessionState#NOT_POSSESSES}. This may happen e.g. if {@link TrackingQueue} * implementation decided that this consumer is dead and put it back to queue. * <p> * If {@link ConsumingStatus#FAILED} status is reported, * element will be placed back to queue automatically * </p> * <p> * If {@link ConsumingStatus#FINISHED_SUCCESSFULLY} status is reported * the queue no longer tracks the element consuming status. * </p> * * @param consumerId consumer that is processing the element and reporting the progress * @param elementId element to report progress on * @param status status of the consuming. * @param result current value of the result of consuming. * @return true if this consumer still possesses the element and can continue processing it. */ PossessionState recordProgress(String consumerId, String elementId, ConsumingStatus status, String result); /** * Removes element from the queue by element id. If element was being consumed, * @param elementId id of the element to remove * @return true if removed successfully or element was not present in the queue, false otherwise */ boolean remove(String elementId); /** * Removes all elements from the queue. See {@link #remove(String)} for more details. * @return true if all removed successfully, false otherwise */ boolean removeAll(); /** * Promotes element to the top of the queue. * @param elementId id of the element to promote * @return true if promoted successfully */ boolean toHighestPriority(String elementId); /** * Get all {@link QueuedElement} in the queue that are not being consumed. * * @return an iterator over the queued (but not being consumed) elements in this queue. The iterator returns elements * ordered in the way they are offered to be consumed starting with the top of the queue. */ Iterator<QueuedElement> getQueued(); /** * Get all {@link QueuedElement} that are being consumed. * * @return an iterator over the queue elements that are being consumed. */ Iterator<QueuedElement> getBeingConsumed(); /** * Get the size of the queue (both queued and being consumed). * * @return size of queue (both queued and being consumed). */ int size(); /** * Defines Tracking Queue Consuming Status. */ static enum ConsumingStatus { IN_PROGRESS, FINISHED_SUCCESSFULLY, FAILED } /** * Defines PossessionState. */ static enum PossessionState { POSSESSES, NOT_POSSESSES } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void requeue() {\n\t\tenqueue(queue.removeFirst());\n\t}", "@Override\r\n\tpublic void enqueueRear(E element) {\n\t\tif(sizeDeque == CAPACITY) return;\r\n\t\tif(sizeDeque == 0) {\r\n\t\t\tdata[backDeque] = element;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tbackDeque = (backDeque + 1)%CAPACITY;\r\n\t\t\tdata[backDeque] = element;\r\n\t\t}\r\n\t\t\r\n\t\tsizeDeque++;\r\n\t}", "@Override\n\tpublic void addToQueue() {\n\t}", "public void enqueue (E element);", "public void dequeue() {\n\t\tObject ret_val = todequeue();\n\t\tif(ret_val == null)\n\t\t\tSystem.out.println(\"The queue is empty\");\n\t\telse\n\t\t\tSystem.out.println(\"Removed: \" + ret_val);\n\t}", "void drainFused() {\n int n;\n int n2 = 1;\n Subscriber<T> subscriber = this.actual;\n SimpleQueueWithConsumerIndex<Object> simpleQueueWithConsumerIndex = this.queue;\n do {\n if (this.cancelled) {\n simpleQueueWithConsumerIndex.clear();\n return;\n }\n Throwable throwable = (Throwable)this.error.get();\n if (throwable != null) {\n simpleQueueWithConsumerIndex.clear();\n subscriber.onError(throwable);\n return;\n }\n n = simpleQueueWithConsumerIndex.producerIndex() == this.sourceCount ? 1 : 0;\n if (!simpleQueueWithConsumerIndex.isEmpty()) {\n subscriber.onNext(null);\n }\n if (n != 0) {\n subscriber.onComplete();\n return;\n }\n n2 = n = this.addAndGet(-n2);\n } while (n != 0);\n }", "@Override\n public void enqueue(E e) {\n array.addLast(e);\n }", "@Test\n public void test() {\n int queueSize = 10;\n\n String numbers[] = new String[queueSize];\n\n for (int i = 0; i < numbers.length; i++)\n numbers[i] = String.format(\"%02d\", ((int) (Math.random() * 100)));\n\n Queue queue = new CircularArrayQueue();\n\n // Fill the Circular Queue\n for (String number : numbers)\n queue.add(number);\n\n System.out.println(\"Queue Size: \" + queue.size());\n\n queue.print();\n\n String var = \"\";\n\n var = (String) queue.remove();\n\n System.out.println(\"Dequeue: \" + var + \" : new queue size: \" + queue.size());\n\n queue.add(var);\n System.out.println(\"Re-enqueue: \" + var + \" : new queue size: \" + queue.size());\n\n // Clear the Circular Queue\n while (queue.size() > 1)\n System.out.println(\"Dequeue: \" + queue.remove() + \" : New queue Size: \" + queue.size());\n\n System.out.println(\"Final Queue Size: \" + queue.size());\n }", "private void re_queue() {\n\n Queue<String> queue = new LinkedList<>();\n queue.offer(\"我\");\n queue.offer(\"爱\");\n queue.offer(\"刷\");\n queue.offer(\"题\");\n queue.offer(\"呵呵\");\n\n System.out.println(\"*********queue*********\");\n System.out.println(queue);\n System.out.println(\"*********queue*********\");\n System.out.println(\"查看队首元素,不改变队列结构:\" + queue.peek());\n System.out.println(queue.size());\n System.out.println(\"*********queue*********\");\n System.out.println(\"取出队首元素,改变队列结构:\" + queue.poll());\n System.out.println(queue.size());\n System.out.println(\"*********queue*********\");\n while (queue.size() > 0) {\n System.out.println(queue.poll());\n System.out.println(queue);\n }\n }", "E dequeue();", "E dequeue();", "E dequeue();", "public E poll() {\n\t\twhile (true) {\n\t\t\tlong f = front.get();\n\t\t\tint i = (int)(f % elements.length());\n\t\t\tE x = elements.get(i);\n\t\t\t//Did front change while we were reading x?\n\t\t\tif (f != front.get())\n\t\t\t\tcontinue;\n\t\t\t//Is the queue empty?\n\t\t\tif (f == rear.get())\n\t\t\t\treturn null; //Don't retry; fail the poll.\n\n\t\t\tif (x != null) {//Is the front nonempty?\n\t\t\t\tif (elements.compareAndSet(i, x, null)) {//Try to remove an element.\n\t\t\t\t\t//Try to increment front. If we fail, other threads will\n\t\t\t\t\t//also try to increment before any further removals, so we\n\t\t\t\t\t//don't need to loop.\n\t\t\t\t\tfront.compareAndSet(f, f+1);\n\t\t\t\t\treturn x;\n\t\t\t\t}\n\t\t\t} else //front empty. Try to help other threads.\n\t\t\t\tfront.compareAndSet(f, f+1);\n\n\t\t\t//If we get here, we failed at some point. Try again.\n\t\t}\n\t}", "public E dequeue();", "public void drain() {\r\n if (getAndIncrement() == 0) {\r\n SimpleQueue<T> simpleQueue = this.queue;\r\n int i = this.consumed;\r\n int i2 = this.bufferSize;\r\n int i3 = i2 - (i2 >> 2);\r\n boolean z = this.sourceMode != 1;\r\n int i4 = 1;\r\n int i5 = i;\r\n SimpleQueue<T> simpleQueue2 = simpleQueue;\r\n int i6 = i5;\r\n while (true) {\r\n if (simpleQueue2 != null) {\r\n long j = LongCompanionObject.MAX_VALUE;\r\n InnerSubscription[] innerSubscriptionArr = (InnerSubscription[]) this.subscribers.get();\r\n boolean z2 = false;\r\n for (InnerSubscription innerSubscription : innerSubscriptionArr) {\r\n long j2 = innerSubscription.get();\r\n if (j2 != Long.MIN_VALUE) {\r\n j = Math.min(j2 - innerSubscription.emitted, j);\r\n z2 = true;\r\n }\r\n }\r\n long j3 = 0;\r\n if (!z2) {\r\n j = 0;\r\n }\r\n while (true) {\r\n if (j == j3) {\r\n break;\r\n }\r\n boolean z3 = this.done;\r\n try {\r\n Object poll = simpleQueue2.poll();\r\n boolean z4 = poll == null;\r\n if (!checkTerminated(z3, z4)) {\r\n if (z4) {\r\n break;\r\n }\r\n int length = innerSubscriptionArr.length;\r\n for (int i7 = 0; i7 < length; i7++) {\r\n InnerSubscription innerSubscription2 = innerSubscriptionArr[i7];\r\n if (!innerSubscription2.isCancelled()) {\r\n innerSubscription2.downstream.onNext(poll);\r\n innerSubscription2.emitted++;\r\n }\r\n }\r\n if (z) {\r\n i6++;\r\n if (i6 == i3) {\r\n ((Subscription) this.upstream.get()).request((long) i3);\r\n i6 = 0;\r\n }\r\n }\r\n j--;\r\n if (innerSubscriptionArr != this.subscribers.get()) {\r\n break;\r\n }\r\n j3 = 0;\r\n } else {\r\n return;\r\n }\r\n } catch (Throwable th) {\r\n Throwable th2 = th;\r\n Exceptions.throwIfFatal(th2);\r\n ((Subscription) this.upstream.get()).cancel();\r\n simpleQueue2.clear();\r\n this.done = true;\r\n signalError(th2);\r\n return;\r\n }\r\n }\r\n if (checkTerminated(this.done, simpleQueue2.isEmpty())) {\r\n return;\r\n }\r\n }\r\n this.consumed = i6;\r\n i4 = addAndGet(-i4);\r\n if (i4 != 0) {\r\n if (simpleQueue2 == null) {\r\n simpleQueue2 = this.queue;\r\n }\r\n } else {\r\n return;\r\n }\r\n }\r\n }\r\n }", "public interface Queue {\n\tpublic Set getGatheredElements();\n\tpublic Set getProcessedElements();\n\tpublic int getQueueSize(int level);\n\tpublic int getProcessedSize();\n\tpublic int getGatheredSize();\n\tpublic void setMaxElements(int elements);\n\tpublic Object pop(int level);\n\tpublic boolean push(Object task, int level);\n\tpublic void clear();\n}", "private void addFromQueue()\n\t{\n\t\twhile( humanQueue.size()>0 )\n\t\t\thumans.add(humanQueue.remove(0));\n\t\twhile( zombieQueue.size()>0 )\n\t\t\tzombies.add(zombieQueue.remove(0));\n\t}", "@Override\r\n\tpublic void enqueueFront(E element) {\n\t\tif(sizeDeque == CAPACITY) return;\r\n\t\tif(sizeDeque == 0) {\r\n\t\t\tdata[frontDeque] = element;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tfrontDeque = (frontDeque - 1 + CAPACITY) % CAPACITY;\r\n\t\t\tdata[frontDeque] = element;\r\n\t\t}\r\n\t\t\r\n\t\tsizeDeque++;\r\n\t}", "public void queueUsage() {\n\t\t//use LinkedList as a queue\n\t\tQueue<String> q = new LinkedList<String>();\n\t\tq.add(\"1\");\n\t\tq.add(\"2\");\n\t\tq.add(\"3\");\n\t\tq.add(\"10\");\n\t\tq.add(\"11\");\n\t\tint[] a;\n\n\t\tLinkedBlockingQueue<String> bq = new LinkedBlockingQueue<String>();\n\t\t\n\t\t//ArrayBlockingQueue needs to set the size when created.\n\t\tArrayBlockingQueue<String> aq = new ArrayBlockingQueue<String>(100);\n\t\t\n\t\tPriorityBlockingQueue<String> pq = new PriorityBlockingQueue<String>();\n\t\t\n//\t\tDelayQueue<String> dq = new DelayQueue<String>(); \n\t\t\n\t}", "public interface MinimalStringQueue {\n\t \n\t/** Adds a new String to the end of the queue */ \n\tpublic void add(String str); \n\t \n\t/** Removes and returns the first String (or null if queue is empty) */ \n\tpublic String poll(); \n\t \n\t/** Returns the number of entries in the queue. */ \n\tpublic int size(); \n\t \n\n}", "public void enqueue(T element);", "public void onQueue();", "private void processQueue() {\n WeakValue<V, K> weakValue;\n while ((weakValue = (WeakValue<V, K>) queue.poll()) != null) {\n // remove it from the cache\n weakCache.remove(weakValue.key);\n }\n }", "public void dequeue()\n\t{\n\t\tq.removeFirst();\n\t}", "void processQueue();", "public void queue(Object newItem){\n if(isFull()){\n System.out.println(\"queue is full\");\n return;\n }\n ArrayQueue[++rear] = newItem;\n if(front == -1)\n front = 0;\n \n }", "Object dequeue();", "Object dequeue();", "public void add(E e) throws FileQueueClosedException;", "private void putOneQueue(BlockingQueue q, List buffer) throws InterruptedException {\n q.put(buffer);\n// System.err.println(Thread.currentThread().getName() + \"[MC] puts \" + buffer.size() + \" on \" + q.hashCode() + \" done\");\n// System.err.println(Thread.currentThread().getName() + \"[MC] puts \" + buffer.size() + \" on \" + q.hashCode() + \" first record \" + buffer.get(0));\n }", "@Test\n @DisplayName(\"Testing element StringQueue\")\n public void testElementStringQueue() {\n assertThrows(NoSuchElementException.class, () -> {\n queue.element();\n });\n\n queue.offer(\"Test\");\n assertEquals(queue.element(), \"Test\");\n\n }", "public void enqueue(E element) {\n\t\tadd(element);\n\t}", "void enqueue(E el);", "@Test\n @DisplayName(\"Testing remove StringQueue\")\n public void testRemoveStringQueue() {\n queue.offer(\"Test\");\n assertEquals(queue.remove(), \"Test\");\n\n assertThrows(NoSuchElementException.class, () -> {\n queue.remove();\n });\n }", "public void enqueue(E e) {\n\t\tlist.addLast(e);\n\t}", "public static void main(String[] args) {\n Queue<QueueData> q1 = new LinkedList<>();\n List<String> testArList = new ArrayList<>();\n testArList.add(0, \"1\");\n for (int i = 0; i < 10; i++){\n // ArrayList의 add와 같은 기능을 가졌다.\n // 하지만, 자료구조의 특성상, 특정 인덱스에 add하는 메소드는 없다.\n q1.add(new QueueData(i, (int) (Math.random() * 1000)));\n }\n System.out.println(q1);\n // peek() : 0번째 인덱스 즉 head에 해당하는 데이터를 살펴본다. 해당 데이터가 없을 경우\n // null이 출력된다. 검색된 데이터는 삭제되지 않고 그대로 남는다.\n System.out.println(q1.peek());\n System.out.println(\"peek\");\n System.out.println(q1);\n\n // element() : peek과 동일한 기능을 가졌지만, 차이점은 해당 데이터가 없을때,\n // 예외처리를 해준다.\n System.out.println(q1.element());\n System.out.println(\"element\");\n System.out.println(q1);\n\n // Enqueue : 추가\n q1.offer(new QueueData(q1.size(), (int) (Math.random() * 1000))); // 실패시 예외발생\n System.out.println(\"offer\");\n System.out.println(q1);\n q1.add(new QueueData(q1.size(), (int) (Math.random() * 1000))); // 실패시 false 리턴\n System.out.println(\"add\");\n System.out.println(q1);\n\n // Dequeue : 삭제\n q1.remove(); // 삭제 실패시, 예외 발생\n System.out.println(\"remove\");\n System.out.println(q1);\n System.out.println(\"poll\");\n q1.poll(); // 실패시 false 리턴\n System.out.println(q1);\n \n // 조건부 삭제\n System.out.println(\"remove if idx % 10 == 0\");\n q1.removeIf(queueData -> queueData.idx % 10 == 0);\n System.out.println(q1);\n\n // priority Queue(우선순위 큐)\n // 가장 가중치가 낮은 순서로 poll, peek()을 할 수 있는 자료구조다.\n // Min Heap로 데이터를 sort 시켜놓고 출력하는 자료구조.\n // 데이터의 크기를 뒤죽박죽 아무렇게 넣어도 의도에 따라 오름차순 혹은 내림차순으로\n // poll(), peek() 할 수 있다.\n Queue<QueueData> pQueue = new PriorityQueue<>();\n pQueue.add(new QueueData(0, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(9, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(2, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(5, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(4, (int) (Math.random() * 1000)));\n\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.remove()); // 더이상 삭제할 수 없을 때, 예외처리(프로그램 종료)\n System.out.println(pQueue.poll()); // 더이상 삭제할 수 없을 때, null 출력\n System.out.println(pQueue.size());\n }", "public void consume() throws InterruptedException {\n\t\temptyQueueTime = queue.peek().getProcessedTime();\n\t\tThread.sleep(queue.peek().getProcessedTime());\n\t\tqueue.peek().setFinalTime(System.nanoTime() / Controller.divider - Controller.startTime);\n\t\tqueueEfficency.lazySet((int) (queue.peek().getFinalTime() - queue.peek().getArrivalTime()));\n\t\tqueueAverageWaitingTime = queueEfficency.get() / (10 * dividerOfClients++);\n\t\tBufferedWriter out = null;\n\t\ttry {\n\t\t\tFileWriter fstream = new FileWriter(\"out.txt\", true); // true tells\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to append\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// data.\n\t\t\tout = new BufferedWriter(fstream);\n\t\t\tout.write(queue.peek().toString2());\n\t\t\tout.newLine();\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t} finally {\n\t\t\tif (out != null) {\n\t\t\t\ttry {\n\t\t\t\t\tout.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tqueue.take();\n\t}", "void enqueue(E e);", "void enqueue(Object elem);", "protected void addChannelToReadCompletePendingQueue() {\n/* 354 */ while (!Http2MultiplexHandler.this.readCompletePendingQueue.offer(this)) {\n/* 355 */ Http2MultiplexHandler.this.processPendingReadCompleteQueue();\n/* */ }\n/* */ }", "private void workOnQueue() {\n }", "String dequeue();", "private E dequeue() {\n final Object[] items = this.items;\n @SuppressWarnings(\"unchecked\")\n E x = (E) items[takeIndex];\n items[takeIndex] = null;\n if (++takeIndex == items.length) takeIndex = 0;\n count--;\n notFull.signal();\n return x;\n }", "@Override\n public PaintOrder remove() {\n if (!queue.isEmpty()) {\n var temp = queue.remove();\n processedOrders ++;\n currentOrders --;\n queuedOrders --;\n return temp; \n }\n return null;\n }", "void enqueue(E newEntry);", "@Override\n public E poll() {\n E tmp = (E)queue[0];\n System.arraycopy(queue, 1, queue, 0, size - 1);\n size--;\n return tmp;\n }", "@Test\n public void queue() {\n\n Queue<String> q = new LinkedList<>();\n q.offer(\"1\");\n q.offer(\"2\");\n q.offer(\"3\");\n System.out.println(q.offer(\"4\"));\n System.out.println(q.add(\"2\"));\n System.out.println(q.toString());\n System.out.println(\"peek \" + q.peek()); // 1, peek() means get the first element in the queue\n System.out.println(\"size \" + q.size()); // 4\n System.out.println(\"poll \" + q.poll()); // 1\n System.out.println(\"size \" + q.size()); // 3\n\n\n }", "String addReceiveQueue();", "private int consumeElement(int index) throws InterruptedException {\n\t while (sharedBuffer.isEmpty()) {\r\n\t synchronized (sharedBuffer) {\r\n\t \tString msg=\"Queue is empty \" + Thread.currentThread().getName()\r\n + \" is waiting , size: \" + sharedBuffer.size();\r\n\t \t\r\n\t // \t System.out.println(msg);\r\n\t\t writeLn(msg);\r\n\r\n\t sharedBuffer.wait();\r\n\t \r\n\t }\r\n\t }\r\n\r\n\t // Consume data from Buffer and Notify Producer that Data has been consumed from Buffer\r\n\t synchronized (sharedBuffer) {\r\n\t \tsharedBuffer.notifyAll();\r\n\t \t\r\n\t return (Integer) sharedBuffer.poll();\r\n\t }\r\n\t }", "public void enqueue(E e) {\n\t\tsynchronized(mutex){\n\t\t\ttry {\n\t\t\t\tqueue.add(e);\n\t\t\t} catch(NullPointerException ex) {\n\t\t\t\tthrow new NullPointerException(\"enqueued null element\");\n\t\t\t} catch (ClassCastException ex) {\n\t\t\t\tthrow new ClassCastException(\"enqueued element is incompetible type\");\n\t\t\t}\n\t\t\tsem.release();\n\t\t}\n\t}", "public interface Queue {\n /***** Setting class functions *******/\n\n /* Add element to end of queue function\n * PRE: elem != null && queue != null\n * POST: queue[size] = elem && size` = size + 1 && other imutabled\n */\n void enqueue(Object elem);\n\n /* Delete and return first element in queue function\n * PRE: size > 0\n * POST: R = queue[0] && queue[i] = queue[i + 1] && size` = size - 1 && other imutabled\n */\n Object dequeue();\n\n /* Add element to begin of queue\n * PRE: elem != null\n * POST: queue[i] = queue[i - 1](size >= i > 0) && queue[0] = elem && size` = size + 1 && other imutabled\n */\n void push(Object elem);\n\n /* Delete and return last element in queue function\n * PRE: size > 0\n * POST: R = queue[size - 1] && size` = size - 1 && other imutabled\n */\n Object remove();\n\n /***** Getting class functions *******/\n\n /* Get first element of queue function\n * PRE: size > 0\n * POST: R = queue[0] && all elements imutabled\n */\n Object element();\n\n /* Get last element of queue function\n * PRE: size > 0\n * POST: R = queue[size - 1] && all elements imutabled\n */\n Object peek();\n\n /* Get size function\n * PRE: True\n * POST: R = size && all imutabled\n */\n int size();\n\n /* Check for empty queue function\n * PRE: True\n * POST: R = (size == 0) && all imutabled\n */\n boolean isEmpty();\n\n /* Delete all elements from queue function\n * PRE: True\n * POST: size = 0\n */\n void clear();\n\n /******* Modification *******/\n /* Create queue with elements like predicate\n * PRE: correct predicate && queue != null\n * POST: all imutabled && R = {R[0]...R[new_size] : new_size <= size && predicate(R[i]) = 1 && R - the same type of queue}\n * : && exist sequence i[0] ... i[k] (i[0] < ... < i[k]) : R[it] = queue[i[it]](0 <= it < k) && k - max\n */\n Queue filter(Predicate predicate);\n\n /* Create queue with elements like predicate\n * PRE: correct function && queue != null\n * POST: all imutabled && R = {y[i] | y[i] = function(queue[i])} size(R) = size(queue) && R is the same type of queue\n */\n Queue map(Function function);\n}", "private void pollQueue(AtomicLong wip, AtomicLong requested, Queue<Object> queue, Subscriber<? super T> child) {\n if (requested.get() > 0) {\n // only one draining at a time\n try {\n /*\n * This needs to protect against concurrent execution because `request` and `on*` events can come concurrently.\n */\n if (wip.getAndIncrement() == 0) {\n while (true) {\n if (requested.getAndDecrement() != 0) {\n Object o = queue.poll();\n if (o == null) {\n // nothing in queue\n requested.incrementAndGet();\n return;\n }\n on.accept(child, o);\n } else {\n // we hit the end ... so increment back to 0 again\n requested.incrementAndGet();\n return;\n }\n }\n }\n\n } finally {\n wip.decrementAndGet();\n }\n }\n }", "public void consume() throws InterruptedException {\n int count = 0;\n while (true) {\n synchronized (this) {\n // consumer thread waits while list\n // is empty\n while (hydrogen.size() <= 1 || oxygen.size() == 0)\n wait();\n\n // to retrive the ifrst job in the list\n hydrogen.removeFirst();\n hydrogen.removeFirst();\n oxygen.removeFirst();\n count += 1;\n\n\n System.out.println(\"Consumer consumed-\"\n + count);\n\n // Wake up producer thread\n notify();\n\n // and sleep\n Thread.sleep(5000);\n }\n }\n }", "void enqueue(E item);", "private static Flux<ByteBuffer> dequeuingFlux(Queue<ByteBuffer> queue) {\n return Flux.generate(sink -> {\n ByteBuffer buffer = queue.poll();\n if (buffer != null) {\n sink.next(buffer);\n } else {\n sink.complete();\n }\n });\n }", "public interface FifoQueue {\n\n /**\n * Push the item to the tail of the queue.\n * @param queueName Target queue.\n * @param item Item to be added\n */\n public void push(final String queueName, final String item);\n\n /**\n * Remove the item from the queue.\n * @param queueName Queue name.\n * @param item Target item.\n * @return <code>true</code> item removed, otherwise <code>false</code>\n */\n public boolean remove(final String queueName, final String item);\n\n /**\n * Get top items.\n * @param queueName Delay queue name.\n * @param end End index.\n * @return Delayed items.\n */\n public Collection<String> pop(final String queueName, final int end);\n}", "@Override\n public void enqueue(Object element) {\n LinkedNode<T> node = new LinkedNode<T>((T) element);\n if (isEmpty()) {\n front = node;\n } else {\n rear.setNext(node);\n }\n rear = node;\n count++;\n\n }", "private void consume()\r\n\t{\r\n\t\twhile (true)\r\n\t\t{\r\n\t\t\tSubscriberMessage sifMsg = queue.blockingPull();\t\t\t\t\r\n\t\t\tif (sifMsg != null)\r\n\t\t\t{\r\n\t\t\t\tlogger.debug(consumerID+\" has receive a message from its SubscriberQueue.\");\r\n\t\t\t\tif (sifMsg.isEvent())\r\n\t\t\t\t{\r\n\t\t\t\t\tSIFEvent sifEvent = new SIFEvent(sifMsg.getSIFObject(), sifMsg.getEventAction());\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsubscriber.processEvent(sifEvent, sifMsg.getZone(), sifMsg.getMappingInfo(), consumerID);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception ex)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlogger.error(\"Failed processing SIF Event for subscriber \"+subscriber.getId()+\": \"+ex.getMessage()+\"\\nEvent Data:\\n\"+sifEvent, ex);\t\t\t\t\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{\r\n\t\t\t\t\tSIFDataObject sifObj = sifMsg.getSIFObject();\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsubscriber.processResponse(sifObj, sifMsg.getZone(), sifMsg.getMappingInfo(), consumerID);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception ex)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlogger.error(\"Failed processing SIF Object for subscriber \"+subscriber.getId()+\": \"+ex.getMessage()+\"\\nSIF Object Data:\\n\"+((sifObj == null) ? \"null\" : sifObj.toXML()), ex);\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tlogger.error(consumerID+\" has encountered a problem receiving a message from its SubscriberQueue.\");\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "@Test\n @DisplayName(\"Testing peek StringQueue\")\n public void testPeekStringQueue() {\n assertEquals(queue.peek(), null);\n\n queue.offer(\"Test\");\n assertEquals(queue.peek(), \"Test\");\n\n }", "@Override\n\tpublic void enqueue(E e) {\n\t\tint index = (pos + size) % queue.length;\n\t\tqueue[index] = e;\n\t\tsize++;\n\t}", "private void dequeueMessages()\n\t{\n\t\twhile (_msg_queue.size() > 0)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t_ml.messageReceived( (Serializable) _msg_queue.removeFirst());\n\t\t\t}\n\t\t\tcatch (RuntimeException rte)\n\t\t\t{\n\t\t\t\trte.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public O consume(BoundedInMemoryQueue<?, I> queue) throws Exception {\n Iterator<I> iterator = queue.iterator();\n\n while (iterator.hasNext()) {\n consumeOneRecord(iterator.next());\n }\n\n // Notifies done\n finish();\n\n return getResult();\n }", "synchronized A consume() {\n try {\r\n if ((noMore && slack >= 0) || consumedAll) {\r\n notifyAll();\r\n consumedAll = true;\r\n return null;\r\n }\r\n while (slack != -1) {\r\n wait();\r\n }\r\n A tmp;\r\n\r\n int bSize = CodecUtil.slackOrSize(consumerBuffer, codec);\r\n if(bSize < 0 && endOfStream) {\r\n bSize = Math.abs(bSize);\r\n }\r\n if (bSize <= 0) {\r\n slack = Math.abs(bSize);\r\n notifyAll();\r\n return null;\r\n }\r\n tmp = codec.from(consumerBuffer);\r\n totConsumed += bSize;\r\n notifyAll();\r\n return tmp;\r\n }\r\n catch (InterruptedException e) {\r\n }\r\n return null;\r\n }", "public interface Queue<E> {\r\n\r\n /**\r\n * Adds the given item to the end of the queue.\r\n * \r\n * @pre The queue is not full and the item to be added is not null\r\n * @post The item is added at the end of the queue\r\n * @param item\r\n * The item to be added to the queue\r\n */\r\n void enqueue(E item);\r\n\r\n /**\r\n * Removes and returns the item from the beginning of the queue.\r\n * \r\n * @pre The queue is not full\r\n * @post The item is removed queue\r\n * @return the item removed from the queue or null if the queue is empty\r\n */\r\n E dequeue();\r\n\r\n}", "void enqueue(String object);", "public String dequeue() {\n return null;\n }", "public interface QueueService {\n\n /**\n * 添加元素\n *\n * @param messageQueue\n */\n void add(MessageQueue messageQueue);\n\n\n /**\n * 弹出元素\n */\n MessageQueue poll();\n\n Iterator<MessageQueue> iterator();\n\n\n}", "public interface IQueue {\n public void clear();\n public boolean isEmpty();\n public int length();\n public Object peek();\n public void offer(Object x) throws Exception;\n public Object poll();\n}", "void consume(List<E> elements) throws Exception;", "Queue<IMotion> addToQueue(Queue<IMotion> motionQueue);", "public void newQueue(){\r\n\t\tgenerateQueue();\r\n\t\trefreshLeft = true;\r\n\t}", "public Queue<E> uniquify() {\n String items = \"\";\n int countBot = 0; \n while (!isEmpty()) {\n items += dequeue() + \",\";\n countBot++;\n }\n Queue<E> toBeRetured = new LinkedQueue<>();\n String temporary = \"\";\n for (int x = 0; x < countBot; x++) {\n String itemCurrent = items.split(\",\")[x];\n E item = (E) itemCurrent;\n enqueue(item);\n\n if (x == 0) {\n temporary = itemCurrent;\n E toAdd = (E) itemCurrent;\n toBeRetured.enqueue(toAdd);\n\n }\n if (x != 0) {\n if (!itemCurrent.equals(temporary)) {\n E toAdd = (E) itemCurrent;\n toBeRetured.enqueue(toAdd);\n }\n temporary = itemCurrent;\n }\n\n }\n\n return toBeRetured;\n //throw new UnsupportedOperationException( \"not implemented yet!\" );\n }", "public T dequeue();", "public void dequeue() {\r\n saf.remove(0);\r\n }", "@Override\n\tpublic void enqueue(E e) {\n\t\tif(size==data.length-1){\n\t\t\tresize();\n\t\t}\n\t\tif(rear==data.length-1){\n\t\t\tdata[rear]=e;\n\t\t\tsize++;\n\t\t\trear=(rear+1)%data.length;\n\t\t}else{\n\t\t\tsize++;\n\t\t\tdata[rear++]=e;\n\t\t}\n\t\t\n\t\t\n\t}", "public static void enQueue(Queue q, String entry){ \n if (q.queuesize < q.names.length){ //If the queue isn't full - Size of queue is less than the set array size \n q.names[q.queuesize] = entry; //Set the value at the index of queue size to the input (Using the array in the Queue class to store this)\n q.queuesize +=1; //Increment the size of queue \n }\n }", "private void enqueue(E x) {\n final Object[] items = this.items;\n items[putIndex] = x;\n if (++putIndex == items.length) putIndex = 0;\n count++;\n notEmpty.signal();\n }", "public void sendMessage(Event event){\n // find the last queue and add the message to that\n // if the last queue is full then create a new queue and add to that\n if(messageQueues.size() <= 0){\n Queue<Event> newQueue = new LinkedList<>();\n Queue<Event> newBackupQueue = new LinkedList<>();\n messageQueues.add(newQueue);\n backupMessageQueues.add(newBackupQueue);\n// System.out.println(\"Size of new Q: \" + messageQueues.size());\n }\n\n // getting hold of the working queue and the backup queue.\n Queue<Event> queue = messageQueues.get(messageQueues.size() - 1);\n Queue<Event> backupQueue = backupMessageQueues.get(backupMessageQueues.size() - 1);\n\n try{\n if(queue.size() >= queueSize){\n Queue<Event> newQueue = new LinkedList<>();\n Queue<Event> newBackupQueue = new LinkedList<>();\n // throw an excpetion for a certain message\n if(event.payload.trim().equals(\"CrashQueue\"))\n // this is done to simulate the queue crashing when it tries to add messages\n throw new Exception(\"Queue has been crashed\");\n // adding the message to both the backup and the main queue\n newQueue.add(event);\n messageQueues.add(newQueue);\n\n newBackupQueue.add(event);\n backupMessageQueues.add(newBackupQueue);\n } else {\n if(event.payload.trim().equals(\"CrashQueue\"))\n // this is done to simulate the queue crashing when it tries to add messages\n throw new Exception(\"Queue has been crashed\");\n queue.add(event);\n backupQueue.add(event);\n }\n }catch(Exception e){\n System.out.println(\"Queue crashed, switching it with the backup queue\");\n // if the queue fails then switch it with the backup queue and create a new backup\n messageQueues = backupMessageQueues;\n // create a duplicate backup message queue\n }\n// System.out.println(\"The message queuesss are : \" + messageQueues);\n }", "T dequeue();", "T dequeue();", "private synchronized void refreshQueuePriority() {\n BlockingQueue<Message> newQueue;\n if(highPriorityMode) {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, HighPriorityModeComparator.COMPARATOR);\n } else {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, NoPriorityModeComparator.COMPARATOR);\n }\n this.queue.drainTo(newQueue);\n this.queue = newQueue;\n latch.countDown();\n }", "private void queueResize() {\n queue = Arrays.copyOf(queue, queue.length + 1);\n }", "private void growQueue() {\n Runnable[] oldQ = queue;\n int oldSize = oldQ.length;\n int newSize = oldSize << 1;\n if (newSize > MAXIMUM_QUEUE_CAPACITY)\n throw new RejectedExecutionException(\"Queue capacity exceeded\");\n Runnable[] newQ = queue = new Runnable[newSize];\n\n int b = base;\n int bf = b + oldSize;\n int oldMask = oldSize - 1;\n int newMask = newSize - 1;\n do {\n int oldIndex = b & oldMask;\n Runnable t = oldQ[oldIndex];\n if (t != null && !casSlotNull(oldQ, oldIndex, t))\n t = null;\n setSlot(newQ, b & newMask, t);\n } while (++b != bf);\n pool.signalWork();\n }", "public boolean offer(E element) {\n\t\tif (element == null)\n\t\t\tthrow new NullPointerException();\n\t\twhile (true) {\n\t\t\tlong r = rear.get();\n\t\t\tint i = (int)(r % elements.length());\n\t\t\tE x = elements.get(i);\n\t\t\t//Did rear change while we were reading x?\n\t\t\tif (r != rear.get())\n\t\t\t\tcontinue;\n\t\t\t//Is the queue full?\n\t\t\tif (r == front.get() + elements.length())\n\t\t\t\treturn false; //Don't retry; fail the offer.\n\n\t\t\tif (x == null) {//Is the rear empty?\n\t\t\t\tif (elements.compareAndSet(i, x, element)) {//Try to store an element.\n\t\t\t\t\t//Try to increment rear. If we fail, other threads will\n\t\t\t\t\t//also try to increment before any further insertions, so we\n\t\t\t\t\t//don't need to loop.\n\t\t\t\t\trear.compareAndSet(r, r+1);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else //rear not empty. Try to help other threads.\n\t\t\t\trear.compareAndSet(r, r+1);\n\n\t\t\t//If we get here, we failed at some point. Try again.\n\t\t}\n\t}", "T dequeue() throws RuntimeException;", "T dequeue() throws RuntimeException;", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in, \"utf-8\");\n CircularLinkedList<String> q = new CircularLinkedList<String>();\n while (sc.hasNext()) {\n q.append(sc.next());\n System.out.println(\"Elements in queue:\\t\\t\\t\" + q);\n System.out.println(\"Number of elements in queue:\\t\\t\" + q.size());\n }\n while (! q.isEmpty()) {\n System.out.println(\"Returned element from queue:\\t\\t\" + q.getFirst());\n System.out.println(\"Elements in queue:\\t\\t\\t\" + q);\n System.out.println(\"Number of elements in queue:\\t\\t\" + q.size());\n }\n\n sc = new Scanner(System.in, \"utf-8\");\n while (sc.hasNext()) {\n q.prepend(sc.next());\n System.out.println(\"Elements in queue:\\t\\t\\t\" + q);\n System.out.println(\"Number of elements in queue:\\t\\t\" + q.size());\n }\n while (! q.isEmpty()) {\n System.out.println(\"Returned element from queue:\\t\\t\" + q.getLast());\n System.out.println(\"Elements in queue:\\t\\t\\t\" + q);\n System.out.println(\"Number of elements in queue:\\t\\t\" + q.size());\n }\n }", "public void add(Object element) {\n queue.put( new DelayedElement( element ) );\n }", "public void demoArrayDeque() {\n System.out.println(\"***Demonstrating an ArrayDeque\");\n Deque<String> veggies = new ArrayDeque<String>();\n //Add will throw an exception if the capacity is limited and its out of room\n //Our example, is variable capacity\n veggies.add(\"tomatoes\");\n veggies.addFirst(\"peppers\");\n veggies.add(\"eggplant\");\n veggies.add(\"squash\");\n veggies.add(\"cucumbers\");\n veggies.addLast(\"broccoli\");\n //Offer returns false if it can't add because it was out of room\n //But our example ArrayDeque is variable length, so they are functionally identical to\n //the add methods.\n veggies.offer(\"green beans\");\n veggies.offerFirst(\"beets\");\n veggies.offerLast(\"carrots\");\n //As with other collections, the size() method gives the size of the deque\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //Determine if the deque contains a given object\n System.out.println(String.format(\"Veggies contains 'beets': %b\", veggies.contains(\"beets\")));\n System.out.println();\n \n //element() shows but does not remove the first item, throw exception if empty\n System.out.println(String.format(\"First veggie (element()): %s\", veggies.element()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //getFirst() same as element()\n System.out.println(String.format(\"First veggie (getFirst()): %s\", veggies.getFirst()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //getLast() gets but doesn't remove last item, throws exception if empty\n System.out.println(String.format(\"Last veggie (getLast()): %s\", veggies.getLast()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //peek() gets but does not remove the first item, returns null if empty\n System.out.println(String.format(\"First veggie (peek()): %s\", veggies.peek()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //peekFirst() gets but does not remove the first item, returns null if empty\n System.out.println(String.format(\"First veggie (peekFirst()): %s\", veggies.peekFirst()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //peekLast() gets but doesn't remove last item, returns null if empty\n System.out.println(String.format(\"Last veggie (peekLast()): %s\", veggies.peekLast()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //Java 5 and above\n System.out.println(\"--Iterating using the Enhanced for loop\");\n for(String veggie : veggies) {\n System.out.println(veggie);\n }\n System.out.println();\n \n //poll() gets the first item and removes it, returns null if empty\n System.out.println(String.format(\"First veggie (poll()): %s\", veggies.poll()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //pollFirst() gets the first item and removes it, returns null if empty\n System.out.println(String.format(\"First veggie (pollFirst()): %s\", veggies.pollFirst()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //pollLast() gets the last item and removes it, returns null if empty\n System.out.println(String.format(\"Last veggie (pollLast()): %s\", veggies.pollLast()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n System.out.println(\"--Iterating using the iterator\");\n for(Iterator<String> it = veggies.iterator(); it.hasNext();) {\n String veggie = it.next();\n System.out.println(veggie);\n }\n System.out.println();\n \n //pop() gets and removes the first item, throws an exception if empty\n System.out.println(String.format(\"First veggie (pop()): %s\", veggies.pop()));\n System.out.println(String.format(\"Length of veggies: %d\", veggies.size()));\n System.out.println();\n \n //iterates starting at the end of the deque\n System.out.println(\"--Iterating using the descending iterator\");\n for(Iterator<String> it = veggies.descendingIterator(); it.hasNext();) {\n String veggie = it.next();\n System.out.println(veggie);\n }\n System.out.println();\n\n //will throw exception for capacity restrictions\n veggies.push(\"cabbage\");\n \n //Java 8 and above\n System.out.println(\"--Iterating with forEach\");\n veggies.forEach(System.out::println);\n }", "@Override\n public void enqueue(T value) {\n myQ[myLength] = value;\n myLength++;\n }", "@Override\n\tpublic void addQueues(Queue... queue) {\n\t\tsuper.addQueues(queue);\n\t\tqueuesChanged();\n\t}", "private Queue(){\r\n\t\tgenerateQueue();\r\n\t}", "public E poll(){\n int cnt = 0;\n long expect = front;\n int index;\n int curTryNum = tryNum;\n E e ;\n for(;;) {\n HighPerformanceQueue q = this;\n expect = front;\n index = (int)(expect&(max_size-1));\n if(available[index]) {\n e = (E) data[index];\n //TODO Additional write burden is added to the read operation\n available[index] = false;\n if (help.compareAndSwapLong(q, frontOffset, expect, expect + 1)) {\n // TODO Dynamic maintenance retries\n break;\n }\n available[index] = true;\n }\n cnt++;\n if(cnt==tryNum){\n return null;\n }\n }\n return e;\n }", "public interface UnboundedQueue<T> {\n \n\t/**\n\t * This method inserts a generic type element to the back of the Queue, increasing the\n\t * size by one. \n\t * \n\t * @param o Generic type to be added to the back of the Queue.\n\t */\n public void insert(T o);\n \n /**\n * This method removes a generic type element from the front of the Queue thereby decreasing the\n * size by one. Throws an EmptyQueueException if the Queue is empty and there is no\n * element to remove.\n * \n * @return Object removed from the front of the Queue\n * @throws EmptyQueueException if Queue is empty and there is no object to remove\n */\n public T remove() throws EmptyQueueException;\n \n /**\n * This method makes a copy of the element at the front of the Queue. Size stays the same.\n * \n * @return copy of the element at the front of the Queue.\n * @throws EmptyQueueException thrown if the Queue is empty and there is no elment at the front\n */\n public T front() throws EmptyQueueException;\n \n /**\n * This method returns true if the Queue has a front element and therefore is \n * not empty.\n * \n * @return true if the Queue has a front element\n */\n public boolean hasFront();\n \n /**\n * This method returns the number of elements currently stored in the structure (Queue).\n * \n * \n * @return int number of elements stored in the Queue\n */\n public int size();\n\n /**\n * This method creates a String representation of the Queue.\n * \n * @return String which represents the Queue\n */\n public String toString();\n \n}", "public ResizingArrayQueueOfStrings(){\n s = (Item[]) new Object[2];\n n = 0;\n first = 0;\n last = 0;\n }", "public void enqueue(E e) {\n if (e == null){\n throw new NullPointerException();\n }\n\n int x = size;\n size++;\n\n if (x+1 >= queue.length-1){\n this.queue = resize((E[])queue, queue.length*2);\n }\n //size = size + 1;\n if (x == 0){\n queue[0] = e;\n }else{\n\n if (size == queue.length){\n resize((E[])queue, queue.length*2);\n }\n queue[findNull()] = e;\n shift();\n\n }\n }", "myQueue(){\n }", "@Override\n\tpublic E dequeue() {\n\t\tif(isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tE data = queue[pos];\n\t\tqueue[pos] = null;\n\t\tpos = (pos+1) % queue.length;\n\t\tsize--;\n\t\treturn data;\n\t}", "@Override\r\n\tpublic void run() {\n\t\twhile (true) {\r\n\t\t\tsynchronized (this.queue) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t\r\n\t\t\t\t\tqObj = queue.getQueue().peek();\r\n\t\t\t\t\tif (qObj != null && qObj instanceof String) {\r\n\t\t\t\t\t\tString t = (String) queue.getQueue().poll();\r\n\t\t\t\t\t\tSystem.out.println(\"TextProcessor:\" + t + \"\\tsize: \" + queue.getQueue().size());\r\n\t\t\t\t\t\tqueue.notifyAll();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tqueue.wait();\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void basicQueueOfStacksTest() {\n \n QueueOfStacks<String> tempQueue = new QueueOfStacks<String>();\n String tempCurrentElement;\n \n assertTrue(\"Element not in queue\", tempQueue.isEmpty());\n tempQueue.add(\"a\");\n assertTrue(\"Element not in queue\", !tempQueue.isEmpty());\n tempQueue.add(\"b\");\n assertTrue(\"Number of elements not correct\", tempQueue.size() == 2);\n \n tempCurrentElement = tempQueue.peek();\n assertTrue(\"Element not correct\", tempCurrentElement.equals(\"a\"));\n\n tempCurrentElement = tempQueue.remove();\n assertTrue(\"Element not correct\", tempCurrentElement.equals(\"a\") &&\n tempQueue.size() == 1);\n \n tempQueue.add(\"c\");\n assertTrue(\"Number of elements not correct\", tempQueue.size() == 2);\n \n tempCurrentElement = tempQueue.remove();\n assertTrue(\"Element not correct\", tempCurrentElement.equals(\"b\") &&\n tempQueue.size() == 1 &&\n !tempQueue.isEmpty());\n \n tempCurrentElement = tempQueue.remove();\n assertTrue(\"Element not correct\", tempCurrentElement.equals(\"c\") &&\n tempQueue.size() == 0 &&\n tempQueue.isEmpty());\n \n }" ]
[ "0.629704", "0.6253577", "0.61837125", "0.60614836", "0.5977534", "0.59772587", "0.5935156", "0.5863693", "0.5824093", "0.5822045", "0.5822045", "0.5822045", "0.5792678", "0.57681215", "0.5765364", "0.5741769", "0.5723115", "0.5722603", "0.57213324", "0.57163614", "0.5694875", "0.56866574", "0.56848264", "0.56844366", "0.5683681", "0.56753063", "0.5666032", "0.5666032", "0.56620246", "0.5661118", "0.5658448", "0.56544816", "0.56414", "0.56321996", "0.5625577", "0.5609331", "0.560137", "0.5596088", "0.5590018", "0.558763", "0.5581368", "0.554692", "0.55433923", "0.55431455", "0.5522679", "0.55219144", "0.55174464", "0.5514381", "0.55089325", "0.55047834", "0.5502924", "0.5497761", "0.5490127", "0.54870343", "0.5480644", "0.54761934", "0.5466789", "0.5442756", "0.5440196", "0.5439068", "0.5434593", "0.543391", "0.5432274", "0.5431192", "0.5427248", "0.5418503", "0.54166806", "0.5409789", "0.5407503", "0.5405834", "0.5404803", "0.5398663", "0.5391972", "0.5382601", "0.5382009", "0.538095", "0.53801286", "0.53774947", "0.5375305", "0.5375305", "0.5369511", "0.5368322", "0.53613216", "0.53580344", "0.5357309", "0.5357309", "0.5356945", "0.53441197", "0.5329142", "0.53282285", "0.53113383", "0.53035045", "0.5302776", "0.5299372", "0.5292578", "0.5291842", "0.52915347", "0.52763176", "0.52706885", "0.5258986" ]
0.6606866
0
Adds element to the queue.
ListenableFuture<String> add(Element element);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void add(Object element) {\n queue.put( new DelayedElement( element ) );\n }", "public void add(E element){\n\t\tArrayQueue<E> temp = new ArrayQueue<E>();\n\t\ttemp.enqueue(element);\n\t\tQ.enqueue(temp);\n\t}", "@Override\n\tpublic void addToQueue() {\n\t}", "public void enqueue(E element) {\n\t\tadd(element);\n\t}", "public void enqueue (E element);", "public void enqueue(T element);", "public void push(Object element)\n\t{\n\t\tensureCapacity();\n\t\telements[size++] = element;\n\t}", "public void enqueue(E e) {\n\t\tsynchronized(mutex){\n\t\t\ttry {\n\t\t\t\tqueue.add(e);\n\t\t\t} catch(NullPointerException ex) {\n\t\t\t\tthrow new NullPointerException(\"enqueued null element\");\n\t\t\t} catch (ClassCastException ex) {\n\t\t\t\tthrow new ClassCastException(\"enqueued element is incompetible type\");\n\t\t\t}\n\t\t\tsem.release();\n\t\t}\n\t}", "public void enqueue(E e) {\n\t\tlist.addLast(e);\n\t}", "public void push(E element) {\r\n items.add(0, element);\r\n }", "@Override\n public void enqueue(E e) {\n array.addLast(e);\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic void push(Object element) {\n\t\tif(size == capacity) {\n\t\t\tthrow new IllegalArgumentException(\"Capacity has been reached.\");\n\t\t}\n\t\tlist.add(0, (E) element);\n\t\tsize++;\n\t\t\n\t}", "void enqueue(E item);", "void enqueue(E el);", "@Override\r\n\tpublic void enqueue(T element)\r\n\t{\r\n\t\tLinkedNode<T> n = new LinkedNode<>(element);\r\n\r\n\t\t// if the only element in the queue, it becomes the first element\r\n\t\tif (head == null)\r\n\t\t{\r\n\t\t\thead = n;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// otherwise, the tail's next receives the new node\r\n\t\t\t// because later, tail will be the new node\r\n\t\t\ttail.next = n;\r\n\t\t}\r\n\r\n\t\t// always add at the end of the list\r\n\t\ttail = n;\r\n\t\tcount++;\r\n\t}", "public void enqueue(E item) {\n addLast(item);\n }", "void enqueue(Object elem);", "void add(int list) {\n\t\t\n\t\t// check if element can be added to the queue\n\t\tif (!canPush)\n\t\t\tthrow new IllegalStateException(\"Queue capacity is excided!\");\n\t\t\n\t\t// add element into the cell push-pointer points to and shift pointer\n\t\tqueue[qPush++] = list;\n\t\t\n\t\t// set poll-flag, cuz there's now at least one element in the queue\n\t\tcanPoll = true;\n\t\t\n\t\t/*\n\t\t * If poll pointer went beyond array bounds - return it to the first position\n\t\t */\n\t\t\n\t\tif (qPush == queue.length)\n\t\t\tqPush = 0;\n\t\t\n\t\t/*\n\t\t * If push pointer now points to the poll pointer - then queue is full\n\t\t * Set flag\n\t\t */\n\t\t\n\t\tif (qPush == qPoll)\n\t\t\tcanPush = false;\n\t}", "public void add(IEvent event){\r\n\t\tqueue.add(event);\r\n\t}", "void enqueue(E newEntry);", "public void push(Object element) {\r\n\t\tal.add(element, al.listSize);\r\n\t}", "@Override\n public void enqueue(Object element) {\n LinkedNode<T> node = new LinkedNode<T>((T) element);\n if (isEmpty()) {\n front = node;\n } else {\n rear.setNext(node);\n }\n rear = node;\n count++;\n\n }", "public void enqueue(Object value)\n {\n queue.insertLast(value);\n }", "@Override\n public void add(T element) {\n add(size(), element);\n }", "@Override\r\n\tpublic void enqueue(Object element){\r\n\t\tif(head == null) {\r\n\t\t\thead = new Node(element);\r\n\t\t\ttail = head;\r\n\t\t}else {\r\n\t\t\ttail.next = new Node(element);\r\n\t\t\ttail = tail.next;\r\n\t\t}\r\n\t\tsize++;\r\n\t}", "@Override\r\n\tpublic boolean enqueue(T e) throws QueueOverflowException {\r\n\t\tif (this.isFull()) {\r\n\t\t\tthrow new QueueOverflowException(\"The queue is full\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdata.add(data.size(), e);\r\n\t\t}\r\n\t\t// Add element to the end of the Queue\t\t\r\n\t\treturn true;\r\n\t}", "public synchronized boolean add(T obj) throws InterruptedException {\n\t\t\tnotify();\n\t\t\tif (maxSize == queue.size()) {\n\t\t\t\tSystem.out.println(\"Queue is full, producer is waiting.\");\n\t\t\t\twait();\n\t\t\t}\n\t\t\treturn queue.add(obj);\n\t\t}", "public void add( int item ) \n {\n\t//queue is empty\n\tif ( queue.isEmpty() ) {\n\t queue.add( item );\n\t return;\n\t}\n\t\n\t//queue is not empty\n\telse {\n\t //find spot of insetion\n\t for ( int i = 0; i < queue.size(); i++ ) {\t\t\t \n\t\tif ( (int) queue.get(i) < item ) {\n\t\t queue.add( i, item );\n\t\t return;\n\t\t}\t\t\n\t }\n\t}\n }", "public void push(E e) throws InterruptedException {\n while (!isFree) {\n synchronized (this) {\n wait();\n }\n }\n\n synchronized (this) {\n if (queue != null) {\n queue.add(e);\n }\n isFree = true;\n notifyAll();\n }\n }", "public void push(T element) {\n\t\t//add the new element\n\t\telements.add(element);\n\n\t}", "@Override\n\tpublic void enqueue(E e) {\n\t\tint index = (pos + size) % queue.length;\n\t\tqueue[index] = e;\n\t\tsize++;\n\t}", "public void push(E element);", "public synchronized void add(Object object) {\n\n if (_queue.size() == 0) {\n // no elements then simply add it here\n _queue.addElement(object);\n } else {\n int start = 0;\n int end = _queue.size() - 1;\n\n if (_comparator.compare(object,\n _queue.firstElement()) < 0) {\n // it need to go before the first element\n _queue.insertElementAt(object, 0);\n } else if (_comparator.compare(object,\n _queue.lastElement()) > 0) {\n // add to the end of the queue\n _queue.addElement(object);\n } else {\n // somewhere in the middle\n while (true) {\n int midpoint = start + (end - start) / 2;\n if (((end - start) % 2) != 0) {\n midpoint++;\n }\n\n int result = _comparator.compare(\n object, _queue.elementAt(midpoint));\n\n if (result == 0) {\n _queue.insertElementAt(object, midpoint);\n break;\n } else if ((start + 1) == end) {\n // if the start and end are next to each other then\n // insert after at the end\n _queue.insertElementAt(object, end);\n break;\n } else {\n if (result > 0) {\n // musty be in the upper half\n start = midpoint;\n } else {\n // must be in the lower half\n end = midpoint;\n }\n }\n }\n }\n }\n }", "public void addToQueue(Unit unit) {\n if (units.size() < maxStock) {\n endTime = System.currentTimeMillis() + unit.getBuildTime();\n units.add(unit);\n }\n }", "private void enqueue(E x) {\n final Object[] items = this.items;\n items[putIndex] = x;\n if (++putIndex == items.length) putIndex = 0;\n count++;\n notEmpty.signal();\n }", "public synchronized void add(T object) throws InterruptedException {\n\t\twhile (store.size() == capacity) {\n\t\t\tLOG.info(\"No more space\");\n\t\t\twait();\n\t\t}\n\t\tstore.add(object);\n\t\tLOG.info(\"Added product\" + store.size());\n\t\tnotify();\n\t}", "public void addIntoQueue(Integer block_id){\n if(this.queue_set){\n if(this.queue.contains(block_id) == false){\n this.queue.add(block_id);\n }\n }\n }", "void enqueue(E e);", "public void enqueue(Integer elem) {\n\t\t // add to end of array\n\t\t // increase size\n\t\t // create a recursive helper, percolateUp,\n\t\t // that allows you puts the inserted val \n\t\t // in the right place\n\t\t if(size == capacity) {\n\t\t\t ensureCapacity(size);\n\t\t }\n\t\t data[size] = elem;\n\t\t size++;\n\t\t percolateUp(size-1); \n\t }", "public void add(Object o) {\n Logger.log(\"DEBUG\", \"Data to add to queue: \" + o.toString());\n while(isLocked()) {\n try {\n Thread.sleep(10);\n }\n catch(InterruptedException ie) {\n // do nothing\n }\n }\n addToTail(o);\n LAST_WRITE_TIME = now();\n }", "public boolean putQueue(Object obj)\r\n {\r\n boolean returnval = false;\r\n\r\n try\r\n {\r\n returnval = event_q.add(obj);\r\n } catch (Exception ex)\r\n {\r\n return returnval;\r\n }\r\n\r\n return returnval;\r\n }", "public void push(E elem) {\n if (elem != null) {\r\n contents[++top] = elem;\r\n }\r\n\r\n // Usually better to resize after an addition rather than before for\r\n // multi-threading reasons. Although, that is not important for this class.\r\n if (top == contents.length-1) resize();\r\n }", "public static void enqueue(Object object) {\n queue.addLast(object);\n }", "public void push (E element);", "@Override\r\n\tpublic boolean enqueue(T element) {\r\n\t\t\r\n\t\t// checking if queue is already full or not\r\n\t\tif (isFull()) {\r\n\t\t\tthrow new AssertionError(\"Queue is full\");\r\n\t\t} else {\r\n\t\t\tif (this.front == -1) {\r\n\t\t\t\tthis.front = 0;\r\n\t\t\t}\r\n\t\t\tthis.rear = (this.rear + 1) % this.size;\r\n\t\t\tthis.array[this.rear] = (Integer)element;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public void queue(Object newItem){\n if(isFull()){\n System.out.println(\"queue is full\");\n return;\n }\n ArrayQueue[++rear] = newItem;\n if(front == -1)\n front = 0;\n \n }", "public void enqueue(E e) {\n\t\t\tsynchronized (this.pq) {\n\t\t\t\tthis.pq.add(e);\n//\t\t\t\tSystem.out.println(\"insert \" + e);\n\t\t\t}\n\t\t\tthis.sem.release();\n\t}", "public boolean add(T item) {\n // offer(T e) is used here simply to eliminate exceptions. add returns false only\n // if adding the item would have exceeded the capacity of a bounded queue.\n return q.offer(item);\n }", "public void offer(E e) {\n if (e == null) throw new NullPointerException();\n queue[currentPos++] = e;\n size++;\n\n if (currentPos == queue.length) resize();\n }", "public void push(T element);", "public void push(T element);", "private void addToMoveQueue() {\n\t\tSimulation.INSTANCE.getMoveQueue().offer(new Move(prevNode, currentNode));\n\t}", "@Override\r\n\tpublic void add(T element) {\n\t\tthis._list.add(element);\r\n\t}", "@Override\n public synchronized void add(E element) {\n if (this.pointer == this.capacity) {\n int newCapacity = this.capacity + (this.capacity >> 1);\n Object[] arr = Arrays.copyOf(this.container, newCapacity);\n this.capacity = newCapacity;\n this.container = arr;\n }\n this.container[this.pointer++] = element;\n }", "public void add(T element) {\r\n if (element == null) {\r\n throw new IllegalArgumentException(); \r\n } \r\n if (size == elements.length) { \r\n resize(elements.length * 2); \r\n }\r\n elements[size()] = element; \r\n size++; \r\n }", "@Override\n public boolean add(final T element) {\n if (this.size > this.data.length - 1) {\n this.doubleArraySizeBy(2);\n }\n\n this.data[this.size++] = element;\n return true;\n }", "public void addQueuedObject(Obstacle obj) {\n\t\tassert inBounds(obj) : \"Object is not in bounds\";\n\t\taddQueue.add(obj);\n\t}", "private void add(Pair<MarketDataRequestAtom,Event> inData)\n {\n getQueue().add(inData);\n }", "public void add(E element) {\n\t\t// your code here\n\t}", "public boolean add(ElementType element){\n if(this.contains(element)){\n return false;\n }\n else{\n if(size==capacity){\n reallocate();\n }\n elements[size]=element;\n size++;\n }\n return true;\n }", "public boolean add(T element) {\n if (this.position >= this.container.length) {\n this.enlargeCapacity();\n }\n this.container[this.position++] = element;\n return true;\n }", "public Node<T> add(T element) {\n // Get a free node.\n Node<T> freeNode = getFree();\n if (freeNode != null) {\n // Attach the element.\n return freeNode.attach(element);\n } else {\n // Failed!\n throw new IllegalStateException(\"Capacity exhausted.\");\n }\n }", "public void add(E element) {\n\n\t\tif (size == capacity) {\n\t\t\tgrowArray();\n\t\t}\n\n\t\tlist[size] = element;\n\t\tsize++;\n\t}", "public void push(T element){\n\t\tarray[noOfElements] = element;\n\t\tnoOfElements ++;\t\t\n\t}", "void enqueue(T item) {\n contents.addAtTail(item);\n }", "public synchronized void enqueue(Object msg) {\n\t\tqueue.add(msg);\n\n\t\t// if any threads wait on empty queue then wake them up\n\t\tnotifyAll();\n\t}", "public void add(Object e)\n {\n if(numElements == maxElements)\n doubleCapacity();\n \n // Add element\n if(!contains(e))\n elements[numElements++] = e;\n }", "public void enqueue ()\n {\n count++;\n questionList.add(newQuestion);\n //System.out.println(\"Question #\"+ totNumQ + \" is added to the queue.\");\n }", "public void enqueue(Object value);", "public @Override boolean add(E element) {\n \tappend(element);\n \treturn true;\n }", "public void enqueue(Object o) {\n queue.enqueue(o);\n }", "public void add(Square s) {\n\t\tqueue.enqueue(s);\n\t}", "@Override\n public void enqueue(T value) {\n myQ[myLength] = value;\n myLength++;\n }", "public void add(E e) throws FileQueueClosedException;", "public void add(E element){\n if(size==capacity){\n capacity *=2;\n E[] array2 = (E[]) new Object[capacity];\n if (size >= 0) System.arraycopy(array, 0, array2, 0, size);\n array2[size]=element;\n array=array2;\n }else{\n array[size]=element;\n }\n size++;\n }", "public void enqueue(Message msg){\n\t\tqueue.add(msg);\n\t}", "public void put(T element) {\n\t\tcheckCapacity(size + 1);\n\t\tdata[size++] = element;\n\t}", "public void enqueue(T item) {\n\t\tif(rear == capacity)\n\t\t\treSize();\n\t\tarr[rear] = item;\n\t\tSystem.out.println(\"Added: \" + item);\n\t\trear++;\n\t\tsize++;\n\t}", "public void enqueue(T pushed)\n\t{insert(pushed);}", "public void add(T e){\n ensureCapacity(size + 1);\n data[size++] = e;\n }", "public void add(final E obj)\n {\n final Queue<E> level = getTailLevel();\n level.add(obj);\n size++;\n }", "public synchronized void push(Object o) {\n itemcount++;\n addElement(o);\n notify();\n }", "public void add(T element);", "public void add(T element);", "@Override\n public void add(PaintOrder order) {\n queue.add(order);\n queuedOrders ++;\n }", "public void push(int x) {\n queue.add(x);\n }", "public void push(int x) {\n queue.add(x);\n }", "public synchronized boolean add(Cincamimis message) throws QueueException\r\n {\r\n if(message==null) return false;\r\n if(measurementQueue==null) throw new QueueException(\"CINCAMIMIS Queue not found\");\r\n \r\n boolean rdo=measurementQueue.offer(message);\r\n \r\n if(rdo)\r\n {\r\n this.notifyObservers();\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "@Override\n public void addElement(T element) {\n // TODO. \n // Pseudocode: \n // Check if array is at capacity, if so expand it. \n // add element to the array\n // increment count\n // if this is not the first element, then call heapifyAdd to check if the newly added\n // element needs to be swapped up the heap\n if (count == heap.length) {\n expandCapacity();\n\n }\n heap[count] = element;\n count++;\n\n if (count > 1) {\n heapifyAdd();\n }\n\n }", "@Override\r\n\tpublic void enqueueRear(E element) {\n\t\tif(sizeDeque == CAPACITY) return;\r\n\t\tif(sizeDeque == 0) {\r\n\t\t\tdata[backDeque] = element;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tbackDeque = (backDeque + 1)%CAPACITY;\r\n\t\t\tdata[backDeque] = element;\r\n\t\t}\r\n\t\t\r\n\t\tsizeDeque++;\r\n\t}", "public void enqueue(int element) {\n\tr++;\n\tif(r-f==100){\n\t\tSystem.out.println(\"Queue Full\"); return;\n\t}\n\tmyarray[r%100]=element;\n\t\t// ..... fill the stub function ......\n\t}", "@Override\r\n\tpublic void enqueue(Item item) {\r\n\t\tif (item == null)\r\n\t\t\tthrow new NullPointerException(\"You cannot put a 'null' element inside the queue\");\r\n\t\tif (count == arr.length)\r\n\t\t\tresize(arr.length * 2);\r\n\t\tarr[count++] = item;\r\n\t}", "public ImmutableQueue<T> enQueue(T element) {\r\n\t\tif (element == null)\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t\treturn new ImmutableQueue<T>(this.enqueueStack.push(element), this.dequeueStack);\r\n\t}", "public void add (T element);", "@Override\n\tpublic void queue(T element) {\n\t\tLinkElement<T> linkElement = new LinkElement<T>(element);\n\n\t\tif ( last != null )\n\t\t\tlast.setPrevLinkElement(linkElement);\t// ensure previous last element refers to new last element.\n\t\t\n\t\tlast = linkElement;\n\t\t\n\t\tif (head == null)\n\t\t\thead = linkElement;\t// the first element on the queue, so becomes the head.\n\t}", "public void push(T ele)\n\t{\n\t\tif (ele == null)\n\t\t\tthrow new IllegalArgumentException(\"Tried to add a NULL element!\");\n\t\t\n\t\tlist.addFirst(ele);\n\t}", "public void add(T element){\r\n if (element == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n \r\n // If array is full, double the size\r\n if (size == elements.length) {\r\n resize(elements.length * 2);\r\n }\r\n \r\n elements[size] = element;\r\n size++;\r\n }", "public static synchronized void insert(JeyEvent e) {\n queue.addLast(e);\r\n EventQueue.class.notifyAll();\r\n }", "public void enqueue (int elemento) {\n if(!isFull()){\n data[last] = elemento;\n count++;\n if(last == data.length-1) {\n last = 0;\n } else {\n last++;\n }\n }else{\n throw new RuntimeException(\"A fila está cheia\");\n }\n\n }", "public void enqueue(E e) {\n if (e == null){\n throw new NullPointerException();\n }\n\n int x = size;\n size++;\n\n if (x+1 >= queue.length-1){\n this.queue = resize((E[])queue, queue.length*2);\n }\n //size = size + 1;\n if (x == 0){\n queue[0] = e;\n }else{\n\n if (size == queue.length){\n resize((E[])queue, queue.length*2);\n }\n queue[findNull()] = e;\n shift();\n\n }\n }", "public void push(TYPE element);" ]
[ "0.7995981", "0.7829296", "0.7755941", "0.773302", "0.76983577", "0.74867326", "0.7179399", "0.7178945", "0.71731925", "0.7154764", "0.7039443", "0.7038005", "0.70306444", "0.7018691", "0.69878143", "0.6962852", "0.6951072", "0.6930302", "0.69261384", "0.6919595", "0.69033074", "0.68956923", "0.689524", "0.6844352", "0.6837776", "0.68334985", "0.6811483", "0.68079275", "0.67843187", "0.67799175", "0.67694676", "0.67527694", "0.6738281", "0.6724114", "0.6721574", "0.6716276", "0.671606", "0.67033976", "0.6692306", "0.669064", "0.6683034", "0.6677931", "0.66719764", "0.66651803", "0.66622186", "0.6659117", "0.6640488", "0.6627711", "0.66165084", "0.6615884", "0.6615884", "0.6615117", "0.66140527", "0.6612467", "0.6600725", "0.6596831", "0.65949506", "0.65766174", "0.6576548", "0.65650827", "0.656403", "0.6563028", "0.65615225", "0.6559423", "0.6547499", "0.6543714", "0.65410763", "0.6541058", "0.6540031", "0.653416", "0.65308297", "0.65242416", "0.65205514", "0.65161115", "0.6512234", "0.6505708", "0.6490563", "0.64864874", "0.6476531", "0.6474843", "0.64718807", "0.6449098", "0.64486766", "0.64486766", "0.6440687", "0.6435325", "0.6435325", "0.6434546", "0.64335555", "0.6430122", "0.64298207", "0.6411154", "0.6404886", "0.6401782", "0.6390513", "0.63790566", "0.6378074", "0.637806", "0.6374682", "0.6374192", "0.6371415" ]
0.0
-1
Removes element from the queue by element id. If element was being consumed,
boolean remove(String elementId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remove() {\n\t\tprocess temp = queue.removeFirst();\n\t}", "public void deleteFromQueue(Integer block_id){\n if(this.queue_set){\n if(this.queue.contains(block_id) == true){\n this.queue.remove(block_id);\n }\n if(this.queue.isEmpty())\n {\n System.out.println(\"All blocks were computed!\");\n this.msgAllExecuted();\n this.queue_set = false;\n }\n }\n }", "void removeReceiveQueue(final String receiveQueueId);", "void remove(int id);", "E remove(Id id);", "@Override\n\tpublic void remove(int id) {\n\t}", "public void remove(Integer id) {\n\r\n\t}", "public void removeItem(int id);", "void remove(String id);", "void remove(String id);", "void remove(String id);", "@Override\n\tpublic void remove(int id) {\n\n\t}", "public abstract void removeElement(int id) throws PositionEX;", "public void remove(Integer id) {\n\t\t\r\n\t}", "public void pop() {\n queue.remove();\n }", "public void dequeue() {\n\t\tObject ret_val = todequeue();\n\t\tif(ret_val == null)\n\t\t\tSystem.out.println(\"The queue is empty\");\n\t\telse\n\t\t\tSystem.out.println(\"Removed: \" + ret_val);\n\t}", "@Override\r\n\tpublic T pop(int id) {\r\n\t\tlogger.debug(\"Removing the last element from the \" + id + \" stack\");\r\n\t\tT element;\r\n\t\t//for the supplied id...\r\n\t\tswitch(id){\r\n\t\t//if the id is equal to DataLayer.INPUT\r\n\t\tcase DataLayer.INPUT:\r\n\t\t\t//block for the input lock\r\n\t\t\tsynchronized(dataInLock){\r\n\t\t\t\t//pop the oldest element in the input stack\r\n\t\t\t\telement = dataInStack.pollLast();\r\n\t\t\t}\r\n\t\t\tsetChanged();\r\n\t\t\tbreak;\r\n\t\t//if the id is equal to DataLayer.OUTPUT\r\n\t\tcase DataLayer.OUTPUT:\r\n\t\t\t//block for the output lock\r\n\t\t\tsynchronized(dataOutLock){\r\n\t\t\t\t//pop the oldest element in the output stack\r\n\t\t\t\telement = dataOutStack.pollLast();\r\n\t\t\t}\r\n\t\t\tsetChanged();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t//set element to null.\r\n\t\t\telement = null;\r\n\t\t}\r\n\t\tnotifyObservers(element);\r\n\t\treturn element;\r\n\t}", "public void dequeue()\n\t{\n\t\tq.removeFirst();\n\t}", "void remove(Long id);", "void remove(Long id);", "void remove(K id);", "private E remove() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n size--;\n return (E) queue[startPos++];\n }", "E dequeue();", "E dequeue();", "E dequeue();", "Object dequeue();", "Object dequeue();", "public void remove (Object id) throws NoSuchElementException {\n\t\tlong start = System.nanoTime();\n\t\topen();\n\t\ttry {\n\t\t\tlong offset = ((Number)id).longValue();\n\t\t\tint b;\n\n\t\t\tif (!isUsedInternal(id)) // LX\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tif (--size==0)\n\t\t\t\treset();\n\t\t\telse {\n\t\t\t\treservedBitMap.seek(offset/blockSize/8);\n\t\t\t\tb = reservedBitMap.read();\n\t\t\t\treservedBitMap.seek(reservedBitMap.getFilePointer()-1);\n\t\t\t\treservedBitMap.write(b&~(1<<(offset/blockSize%8)));\n\t\t\t\tupdatedBitMap.seek(offset/blockSize/8);\n\t\t\t\tb = updatedBitMap.read();\n\t\t\t\tupdatedBitMap.seek(updatedBitMap.getFilePointer()-1);\n\t\t\t\tupdatedBitMap.write(b&~(1<<(offset/blockSize%8)));\n\t\t\t\tif (offset+blockSize==container.length()) {\n\t\t\t\t\twhile (!isUsedInternal(new Long(offset -= blockSize))); // LX\n\t\t\t\t\treservedBitMap.setLength(offset/blockSize/8+1);\n\t\t\t\t\tupdatedBitMap.setLength(offset/blockSize/8+1);\n\t\t\t\t\tif (container.length()>offset+blockSize)\n\t\t\t\t\t\tcontainer.setLength(offset+blockSize);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfreeList.seek(freeList.length());\n\t\t\t\t\tfreeList.writeLong(offset);\n\t\t\t\t}\n\t\t\t}\n\t\t\tioTime += System.nanoTime() - start;\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t}\n\t}", "public void removeByid_(long id_);", "public T remove (T element);", "public void remove(String id) {\n\t\t\n\t}", "E remove(E element) {\n\t\t\tshort index = (short)((element.hashCode() >> 24) & 0x000000FF);\n\t\t\tE obj = nodes[index].remove(this, element.hashCode(), (byte) 1);\n\t\t\tif (obj != null) {\n\t\t\t\tsize--;\n\t\t\t}\n\t\t\treturn obj;\n\t\t}", "void remove(int id)throws IllegalArgumentException;", "public static void removeMonitorFromQueue(BlockingQueue<UserMonitorData> queue, MonitorID monitorID) throws AiravataMonitorException {\n Iterator<UserMonitorData> iterator = queue.iterator();\n while (iterator.hasNext()) {\n UserMonitorData next = iterator.next();\n if (next.getUserName().equals(monitorID.getUserName())) {\n // then this is the right place to update\n List<HostMonitorData> hostMonitorData = next.getHostMonitorData();\n Iterator<HostMonitorData> iterator1 = hostMonitorData.iterator();\n while (iterator1.hasNext()) {\n HostMonitorData iHostMonitorID = iterator1.next();\n if (iHostMonitorID.getHost().toXML().equals(monitorID.getHost().toXML())) {\n Iterator<MonitorID> iterator2 = iHostMonitorID.getMonitorIDs().iterator();\n while (iterator2.hasNext()) {\n MonitorID iMonitorID = iterator2.next();\n if (iMonitorID.getJobID().equals(monitorID.getJobID())\n || iMonitorID.getJobName().equals(monitorID.getJobName())) {\n // OK we found the object, we cannot do list.remove(object) states of two objects\n // could be different, thats why we check the jobID\n iterator2.remove();\n logger.infoId(monitorID.getJobID(), \"Removed the jobId: {} JobName: {} from monitoring last \" +\n \"status:{}\", monitorID.getJobID(),monitorID.getJobName(), monitorID.getStatus().toString());\n if (iHostMonitorID.getMonitorIDs().size() == 0) {\n iterator1.remove();\n logger.debug(\"Removed host {} from monitoring queue\", iHostMonitorID.getHost()\n .getType().getHostAddress());\n if (hostMonitorData.size() == 0) {\n // no useful data so we have to remove the element from the queue\n queue.remove(next);\n logger.debug(\"Removed user {} from monitoring.\", next.getUserName());\n }\n }\n return;\n }\n }\n }\n }\n }\n }\n logger.info(\"Cannot find the given MonitorID in the queue with userName \" +\n monitorID.getUserName() + \" and jobID \" + monitorID.getJobID());\n logger.info(\"This might not be an error because someone else removed this job from the queue\");\n }", "public void removeElement(int id) {\n for (int i = 0; i < data.size(); i++) {\n if (data.get(i).id == id) {\n data.remove(data.get(i));\n }\n }\n System.out.println(\"there are \" + data.size() + \" balls left from the server\");\n }", "void deleteElement(int elementId);", "public T remove() throws EmptyQueueException;", "public E dequeue();", "public boolean remove(final String queueName, final String item);", "public void pop() {\n queue.remove(0);\n }", "public Passenger removeNextPassenger(int queueId) throws NoSuchElementException{\n\t\tPassenger removed = null;\n\t\tLogging log = Logging.getInstance();\n \t//sync on the specific queue\n \tsynchronized(queues.get(queueId)) {\n\t\t\t\n\t \tif(PassengerList.getInstance().getNoNotQueued() > 0) {\n\t\t while(queues.get(queueId).size() < 1 && !closed){ \n\t\t \t\ttry{\n\t\t\t\t\t\t queues.get(queueId).wait();\n\t\t\t\t\t\t}catch(InterruptedException e){log.writeEvent(\"Remove next passenger: Thread was interupted\");}\n\t\t } \n\t \t}\n\t \t//get and remove Passenger\n\t \tremoved = queues.get(queueId).remove();\n \t}\n \t\n \tnotifyObservers();\n \treturn removed;\n }", "@Override\r\n\tpublic void removeElement(K key) {\n\t\tque.remove(key);\r\n\t\thashMap.remove(key);\r\n\t}", "public static Object dequeue() {\t \n if(queue.isEmpty()) {\n System.out.println(\"The queue is already empty. No element can be removed from the queue.\"); \n return -1;\n }\n return queue.removeFirst();\n }", "@Override\n\tpublic int remove(String id) {\n\t\treturn 0;\n\t}", "boolean remove (I id);", "public T remove() throws NoSuchElementException {\n\tT result = poll();\n\tif(result == null) {\n\t throw new NoSuchElementException(\"Priority queue is empty\");\n\t} else {\n\t return result;\n\t}\n }", "boolean removeObject(String id);", "public Object remove(int index){\r\n return dequeue(); //calls the dequeue method\r\n }", "@Override\n public PaintOrder remove() {\n if (!queue.isEmpty()) {\n var temp = queue.remove();\n processedOrders ++;\n currentOrders --;\n queuedOrders --;\n return temp; \n }\n return null;\n }", "@Override\n\tpublic E deQueue() {\n\t\treturn list.removeFirst();\n\t}", "public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }", "public void remove(T element);", "public E remove(){\r\n if(isEmpty())\r\n return null;\r\n \r\n //since the array is ordered, the highest priority will always be at the end of the queue\r\n //--currentSize will find the last index (highest priority) and remove it\r\n return queue[--currentSize];\r\n }", "T dequeue();", "T dequeue();", "public E remove() throws FileQueueClosedException;", "public Object dequeue()\n {\n return queue.removeFirst();\n }", "public void skipToQueueItem(long id) {\n try {\n mSessionBinder.skipToQueueItem(mContext.getPackageName(), mCbStub, id);\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling skipToItem(\" + id + \").\", e);\n }\n }", "public int dequeue() {\n\t\tif (isEmpty()) throw new IllegalStateException(\"\\nQueue is empty!\\n\");\n\t\tint removedItem = bq[head];\n\t\tif (head == bq.length - 1) head = 0; // wraparound\n\t\telse head++;\n\t\tsize--;\n\t\treturn removedItem;\t\n\t}", "public T remove() throws NoSuchElementException {\n T result = poll();\n if (result == null) {\n throw new NoSuchElementException(\"Priority queue is empty\");\n } else {\n return result;\n }\n }", "public E blockingPop() throws InterruptedException\n {\n _lock.lock();\n try\n {\n //Wait for an item to be offered to the queue\n try\n {\n //This loop is necessary because it is possible to be awoken erroneously; however, empty will still\n //be false and so the thread will go back to sleep\n while(_empty)\n {\n _notEmptyCondition.await();\n }\n }\n //Propogate to a non-interrupted thread\n //The situation of multiple consumer threads is not currently used in cakehat\n catch(InterruptedException e)\n {\n _notEmptyCondition.signal();\n throw e;\n }\n \n //Retrieve and remove next element\n Iterator<TaggedElement<T, E>> iterator = _elements.iterator();\n TaggedElement<T, E> taggedElement = iterator.next();\n iterator.remove();\n _empty = !iterator.hasNext();\n \n //If the element was tagged, remove it from the set of elements with that tag\n if(taggedElement.getTag() != null)\n {\n _tagMap.get(taggedElement.getTag()).remove(taggedElement);\n }\n \n return taggedElement.getElement();\n }\n finally\n {\n _lock.unlock();\n }\n }", "public T dequeue();", "public Integer remove() {\n while (true) {\n\n if (buffer.isEmpty()) {\n System.out.println(\"List is empty! Waiting..\");\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n System.out.println(e.getMessage());\n }\n } else {\n full.waiting();\n mutex.waiting();\n int back = buffer.removeFirst();\n mutex.signal();\n empty.signal();\n return back;\n\n }\n }\n\n\n }", "public process dequeue() {\n\t\treturn queue.removeFirst();\n\t}", "public void dequeue() {\r\n saf.remove(0);\r\n }", "public synchronized boolean remove(Object object) {\n return _queue.remove(object);\n }", "public void remove(){\n\t\tqueueArray[1][0] = null;\n\t\tqueueArray[1][1] = null;\n\t}", "public void eliminarReceiver(Long id){\r\n persistence.remove(id);\r\n }", "private GameAction pull() {\n if (this.queue.size() > 0) {\n return this.queue.remove(0);\n } else {\n return null;\n }\n }", "void remover(Long id);", "void remover(Long id);", "public synchronized Integer remove() {\r\n while (true) {\r\n if (buffer.size() == 0) {\r\n try {\r\n wait();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n Integer back = buffer.removeFirst();\r\n notifyAll();\r\n return back;\r\n }\r\n }", "public T remove(T element) throws EmptyCollectionException, ElementNotFoundException;", "public E remove () throws NoSuchElementException;", "@Override\n public E removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[head];\n dequeue[head] = null;\n head = ++head % dequeue.length;\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }", "public void pop() {\n int size = q.size();\n for(int i = 1; i<size;i++){\n q.offer(q.poll());\n }\n q.poll();\n }", "@Override\n public E dequeue() {\n if(array.isEmpty()) {\n throw new NoSuchElementException(\"Cannot dequeue from an empty queue.\");\n }\n return array.removeFirst();\n }", "public E remove();", "public E remove();", "public void testRemove() {\n SynchronousQueue q = new SynchronousQueue();\n try {\n q.remove();\n shouldThrow();\n } catch (NoSuchElementException success){\n\t}\n }", "public long remove(){\n\t\t\r\n\t\t\tlong temp = queueArray[front]; //retrieves and stores the front element\r\n\t\t\tfront++;\r\n\t\t\tif(front == maxSize){ //To set front = 0 and use it again\r\n\t\t\t\tfront = 0;\r\n\t\t\t}\r\n\t\t\tnItems--;\r\n\t\t\treturn temp;\r\n\t\t}", "@Test(expected = IllegalStateException.class)\n public void removeOne() {\n this.reset();\n this.bps.remove(6, 2, 6, 6);\n }", "public Object remove();", "public boolean removeElement(Object obj);", "@Override\n\tpublic E dequeue() {\n\t\tif(isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tE data = queue[pos];\n\t\tqueue[pos] = null;\n\t\tpos = (pos+1) % queue.length;\n\t\tsize--;\n\t\treturn data;\n\t}", "public int pop() {\n return queue.poll();\n }", "public int pop() {\n int size = queue.size();\n for (int i = 0; i < size - 1; i++) {\n Integer poll = queue.poll();\n queue.offer(poll);\n }\n return queue.poll();\n }", "public T removeById (UUID id) {\n for (Node<T> i : this.nodeInOrder(this.root, new ArrayList<>())) {\n if (i.id.compareTo(id) == 0) {\n return this.remove(i.data);\n }\n }\n return null;\n }", "private void removeProduct(int id)\n {\n manager.removeProduct(id);\n }", "@Override\r\n\tpublic T dequeue() throws QueueUnderflowException {\r\n\r\n\t\tif (this.isEmpty()) {\r\n\t\t\tthrow new QueueUnderflowException(\"The queue is empty\");\r\n\t\t}\r\n\t\t// Remove the first element\t\t\r\n\t\treturn data.remove(0);\r\n\t}", "public Producer removeProducer(String id) {\n return (Producer) producers.remove(id);\n }", "private E dequeue() {\n final Object[] items = this.items;\n @SuppressWarnings(\"unchecked\")\n E x = (E) items[takeIndex];\n items[takeIndex] = null;\n if (++takeIndex == items.length) takeIndex = 0;\n count--;\n notFull.signal();\n return x;\n }", "@Override\r\n public CustomProcess removeBest() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException(\"queue is empty, cannot remove from empty queue\");\r\n }\r\n CustomProcess best = data[0]; // process to be removed\r\n data[0] = data[size - 1];\r\n data[size - 1] = null;\r\n minHeapPercolateDown(0); // Percolate down on first index\r\n size--;\r\n return best;\r\n }", "public void removeFromQueue(Player player) {\n }", "Object remove();", "@Override\n public synchronized void delete(String queueName, QueueMessage message) {\n if(message == null) {\n return;\n }\n\n // If we process FIFO this makes it slightly faster\n // to find the next message to process\n this.readQueueLocation = message.getQueueLocation();\n\n this.ringBufferQueue[message.getQueueLocation()] = null;\n this.itemsInQueue--;\n }", "Form removeElement(String id);", "@Override\r\n\tpublic void Dequeue() {\n\t\tif (IsEmpty())\r\n\t throw new NoSuchElementException(\"Underflow Exception\");\r\n\t else \r\n\t {\r\n\t \tlen--;\r\n\t int data = queue[front];\r\n\t System.out.println(\"The Dequed Element is \"+data);\r\n\t if ( front == rear) \r\n\t {\r\n\t front = -1;\r\n\t rear = -1;\r\n\t }\r\n\t else\r\n\t front++;\r\n\t }\r\n\t\t\r\n\t}", "void removeFromQueue(ActionEvent event){\n model.getQueueList().remove(podcast);\n podcast.setQueued(false);\n podcast.togglePlaying();\n cm.hide();\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic T dequeue() {\r\n\t\tT data;\r\n\t\t\r\n\t\t// checking if queue is empty or not\r\n\t\tif (isEmtpy()) {\r\n\t\t\tthrow new AssertionError(\"Queue is empty\");\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\t// remove element\r\n\t\t\tdata = (T)(Integer)this.array[this.front];\r\n\t\t\t\r\n\t\t\t// adjust both front and rear of queue\r\n\t\t\tif (this.front == this.rear) {\r\n\t\t\t\tthis.front = this.rear = -1;\r\n\t\t\t} else {\r\n\t\t\t\tthis.front = (this.front + 1) % this.size;\r\n\t\t\t}\r\n\t\t\treturn (T)data;\r\n\t\t}\r\n\t}" ]
[ "0.68044746", "0.6712099", "0.66841173", "0.6603812", "0.65722877", "0.6491674", "0.64834523", "0.64793503", "0.6453721", "0.6453721", "0.6453721", "0.6438762", "0.6430852", "0.64165676", "0.64141375", "0.6377938", "0.63529414", "0.63390905", "0.63270515", "0.63270515", "0.63200265", "0.6313629", "0.628127", "0.628127", "0.628127", "0.62695414", "0.62695414", "0.62594527", "0.62586445", "0.6247473", "0.62464046", "0.6242892", "0.6233192", "0.62117434", "0.6174561", "0.61524844", "0.61504394", "0.61411107", "0.6134606", "0.61323345", "0.6121332", "0.60903364", "0.60886896", "0.60807586", "0.6069651", "0.6038161", "0.6036107", "0.60339916", "0.60300684", "0.6010861", "0.6002196", "0.5994006", "0.5983022", "0.5964542", "0.5964542", "0.5929978", "0.59184575", "0.59137803", "0.5905695", "0.5902128", "0.587536", "0.58746547", "0.5873833", "0.58687305", "0.5868579", "0.58382696", "0.5834912", "0.58232737", "0.5823249", "0.58157456", "0.58157456", "0.5813552", "0.57977283", "0.5771378", "0.57674664", "0.57634217", "0.5754622", "0.57497615", "0.57497615", "0.5733765", "0.5725671", "0.5725442", "0.5724804", "0.572056", "0.5719646", "0.5703791", "0.5703674", "0.57023644", "0.56999063", "0.5693114", "0.5689848", "0.56880605", "0.5682399", "0.568013", "0.5677712", "0.56773543", "0.56762785", "0.5671902", "0.5663582", "0.5659772" ]
0.6961148
0
Promotes element to the top of the queue.
boolean toHighestPriority(String elementId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public E poll() {\n E tmp = (E)queue[0];\n System.arraycopy(queue, 1, queue, 0, size - 1);\n size--;\n return tmp;\n }", "public synchronized void promote(Tile tile) {\r\n if(tileQueue.contains(tile)) {\r\n try {\r\n tileQueue.remove(tile);\r\n tile.setPriority(Tile.Priority.High);\r\n tileQueue.put(tile);\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }", "public void pop() {\n int size = q.size();\n for(int i = 1; i<size;i++){\n q.offer(q.poll());\n }\n q.poll();\n }", "public int top() {\n int size=queue.size();\n for (int i = 0; i < size-1; i++) {\n int temp=queue.poll();\n queue.add(temp);\n }\n int top=queue.poll();\n queue.add(top);\n return top;\n }", "public void requeue() {\n\t\tenqueue(queue.removeFirst());\n\t}", "@Override\n public E peek() {\n return (E)queue[0];\n }", "private void putToTop()\r\n {\r\n OrderManager manager = myOrderManagerRegistry.getOrderManager(ourKey);\r\n manager.activateParticipant(ourKey);\r\n manager.moveToTop(ourKey);\r\n }", "public int top() {\n int size = queue.size();\n for (int i = 0; i < size - 1; i++) {\n Integer poll = queue.poll();\n queue.offer(poll);\n }\n Integer poll = queue.poll();\n queue.offer(poll);\n return poll;\n }", "public void enqueue (E element);", "public T poll() {\n if(size==0)\n return null;\n else {\n T temp= (T) pq[0];\n pq[0]=pq[size-1];\n size--;\n percolateDown(0);\n return temp;\n\n\n }\n }", "public void dequeue()\n\t{\n\t\tq.removeFirst();\n\t}", "void enqueue(Object elem);", "public synchronized void enqueue(Object o) {\r\n insertAtBack(o);\r\n }", "@Override\r\n public CustomProcess peekBest() {\r\n if (data[0] == null || isEmpty()) {\r\n throw new NoSuchElementException(\"queue is empty\");\r\n }\r\n return data[0];\r\n }", "public void pop() {\n move();\n reverseQueue.poll();\n }", "private synchronized void refreshQueuePriority() {\n BlockingQueue<Message> newQueue;\n if(highPriorityMode) {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, HighPriorityModeComparator.COMPARATOR);\n } else {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, NoPriorityModeComparator.COMPARATOR);\n }\n this.queue.drainTo(newQueue);\n this.queue = newQueue;\n latch.countDown();\n }", "private void enterToRunwayQueue() {\n\t\tqueue.insert(this);\n\t}", "private void shift(){\n if (queue.length < 1){\n throw new Error(\"Table self destruction!\");\n }\n if (size <= 0){\n return;\n }\n\n if (queue[0] == null){\n E best = null;\n int bestAT = -1;\n for (int x = 0 ; x < queue.length; x++){\n E cur = (E)queue[x];\n if (cur == null){\n continue;\n }\n if (best == null || cur.compareTo(best) > 0){\n best = cur;\n bestAT = x;\n }\n }\n // Not put best at front;\n queue[bestAT] = null;\n queue[0] = best;\n }\n\n }", "public void pop() {\n \n q1.poll();\n }", "public void remove() {\n\t\tprocess temp = queue.removeFirst();\n\t}", "public int top() {\n move();\n return reverseQueue.peek();\n }", "public void enqueue(T element);", "public void enqueue(Comparable item);", "public Runnable popTop() {\n int[] stamp = new int[1];\n int oldTop = top.get(stamp), newTop = oldTop + 1;\n int oldStamp = stamp[0], newStamp = oldStamp + 1;\n if (bottom <= oldTop) // empty\n return null;\n Runnable r = tasks[oldTop];\n if (top.compareAndSet(oldTop, newTop, oldStamp, newStamp))\n return r;\n return null;\n }", "public void push(int x) {\n Integer elem = x;\n queue.offer(elem);\n topElem = elem;\n }", "void enqueue(E item);", "Object dequeue();", "Object dequeue();", "public int top() {\n return queue.element();\n }", "public T poll() {\n if (this.size > 0) {\n T min = (T) pq[0];\n pq[0] = pq[this.size - 1];\n size--;\n percolateDown(0);\n return min;\n } else {\n return null;\n }\n }", "public void push(int x) {\r\n this.queueMain.offer(x);\r\n }", "public void pop() {\n one.poll();\n \n }", "void enqueue(E el);", "public E popTop() {\n // FILL IN\n }", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public int top() {\n int size = q.size();\n for(int i = 1; i<size;i++){\n q.offer(q.poll());\n }\n int value = q.peek();\n q.offer(q.poll());\n \n return value;\n }", "public void push(int x) {\n q.offer(x);\n }", "public void pop() {\n queue.remove(0);\n }", "public void pop() {\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\twhile (!queue.isEmpty())\n\t\t\tlist.add(queue.poll());\n\t\tfor (int i = 0; i < list.size() - 1; i++)\n\t\t\tqueue.add(list.get(i));\n\t}", "@Override\n public T dequeue() {\n if (!isEmpty()) {\n return heap.remove();\n } else {\n throw new NoSuchElementException(\"Priority Queue is null\");\n }\n }", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public Item peek(){\n if(isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\n return first.item;\n }", "int poll() {\n\n\t\t// check if element can be polled from the queue\n\t\tif (!canPoll)\n\t\t\tthrow new IllegalStateException(\"Queue is Empty!\");\n\n\t\t// poll element into variable and shift pointer\n\t\tint result = queue[qPoll++];\n\t\t\n\t\t// set canPush flag, cuz there's now at least one empty space in the queue\n\t\tcanPush = true;\n\t\t\n\t\t/*\n\t\t * If poll pointer went beyond array bounds - return it to the first position\n\t\t */\n\t\t\n\t\tif (qPoll == queue.length)\n\t\t\tqPoll = 0;\n\t\t\n\t\t/*\n\t\t * If poll pointer now points to the push pointer - then queue is empty\n\t\t * Set flag\n\t\t */\n\t\t\n\t\tif (qPoll == qPush)\n\t\t\tcanPoll = false;\n\t\t\n\t\t// return previously saved element\n\t\t\n\t\treturn result;\n\t}", "@Override\r\n public CustomProcess removeBest() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException(\"queue is empty, cannot remove from empty queue\");\r\n }\r\n CustomProcess best = data[0]; // process to be removed\r\n data[0] = data[size - 1];\r\n data[size - 1] = null;\r\n minHeapPercolateDown(0); // Percolate down on first index\r\n size--;\r\n return best;\r\n }", "public int useQueue(){\t\r\n\t\t//save the top of the queue\r\n\t\tint top = queue[0];\r\n\t\t//move the queue up 1 space\r\n\t\tfor (int x = 0; x < queue.length - 1; x++){\r\n\t\t\tqueue[x] = queue[x+1];\r\n\t\t}\r\n\t\t//generate a new value at the bottom of the queue\r\n\t\tqueue[queue.length-1] = random.nextInt(10);\r\n\t\treturn top;\r\n\t}", "@Override\n\tpublic synchronized T take() throws InterruptedException {\n try {\n while (queue.size()==0) wait();\n //if(debug) System.out.println(\"take: \"+queue.get(0));\n }\n catch (InterruptedException ie) {\n System.err.println(\"heh, who woke me up too soon?\");\n }\n // we have the lock and state we're seeking; remove, return element\n T o = queue.get(0);\n\n queue.remove(0);\n //this.data[] = null; // kill the old data\n notifyAll();\n return o;\n\t}", "public void puke(){\r\n top = null;\r\n size = 0;\r\n \r\n }", "private E dequeue() {\n final Object[] items = this.items;\n @SuppressWarnings(\"unchecked\")\n E x = (E) items[takeIndex];\n items[takeIndex] = null;\n if (++takeIndex == items.length) takeIndex = 0;\n count--;\n notFull.signal();\n return x;\n }", "public static Object peek() {\t \n if(queue.isEmpty()) { \n System.out.println(\"The queue is empty so we can't see the front item of the queue.\"); \n return -1;\n }\t \n else {\n System.out.println(\"The following element is the top element of the queue:\" + queue.getFirst()); \t \n }\n return queue.getFirst();\n }", "public void offer(E e) {\n if (e == null) throw new NullPointerException();\n queue[currentPos++] = e;\n size++;\n\n if (currentPos == queue.length) resize();\n }", "@Override\n\tpublic E first() {\n\t\treturn queue[pos];\n\t}", "public void push(int x) {\r\n queue1.add(x);\r\n top = x;\r\n }", "public void push(int x) {\r\n queue1.add(x);\r\n top = x;\r\n }", "public void enqueue(Item item) throws NoSuchElementException {\r\n // Usar el metodo upHeap para corregir la condicion de\r\n // Min Heap\r\n\r\n\r\n if (size == 0){\r\n heap[1] = item;\r\n size = 1;\r\n return;\r\n }\r\n int cur = size + 1;\r\n int par = cur/2;\r\n\r\n heap[cur] = item;\r\n size++;\r\n\r\n if (heap[cur].compareTo(heap[par]) > 0){\r\n upHeap(cur);\r\n }\r\n\r\n\r\n }", "private void enqueue(E x) {\n final Object[] items = this.items;\n items[putIndex] = x;\n if (++putIndex == items.length) putIndex = 0;\n count++;\n notEmpty.signal();\n }", "public void push(int x) {\n queue.offer(x);\n }", "public Object peek()\n {\n if(this.isEmpty()){throw new QueueUnderflowException();}\n return front.getData();\n }", "E dequeue();", "E dequeue();", "E dequeue();", "public T poll() {\n if (size == 0)\n return null;\n int s = --size;\n T result = (T) heap[0];\n T backup = (T) heap[s];\n heap[s] = null; // delete\n if (s != 0)\n siftDown(0, backup);\n return result;\n }", "void enqueue(E e);", "public Object dequeue()\n {\n return queue.removeFirst();\n }", "public void push_front(T element);", "public E peek(){\r\n if(isEmpty())\r\n return null;\r\n\r\n return queue[currentSize-1]; //return the object without removing it\r\n }", "public void enqueue(T pushed)\n\t{insert(pushed);}", "public void enqueue(E e) {\n\t\t\tsynchronized (this.pq) {\n\t\t\t\tthis.pq.add(e);\n//\t\t\t\tSystem.out.println(\"insert \" + e);\n\t\t\t}\n\t\t\tthis.sem.release();\n\t}", "public void enqueue(Object value)\n {\n queue.insertLast(value);\n }", "public void pop() {\n queue.remove();\n }", "public void push(int x) {\n queue2.offer(x);\n while (!queue1.isEmpty()) {\n queue2.offer(queue1.poll());\n }\n Queue<Integer> temp = queue1;\n queue1 = queue2;\n queue2 = temp;\n\n\n }", "public void enqueue (T item) {\n leftStack.push(item);\n }", "public E dequeue();", "public void enqueue(Object value);", "public T poll() {\n if (size == 0) {\n return null;\n }\n\n // set returned value to queue[0]\n T value = (T) array[0];\n\n // decrease size - we are removing element\n size--;\n\n // move queue 1 place left\n System.arraycopy(array, 1, array, 0, size);\n\n // clear last element\n array[size] = null;\n\n return value;\n }", "private GameAction pull() {\n if (this.queue.size() > 0) {\n return this.queue.remove(0);\n } else {\n return null;\n }\n }", "public int top() {\n // Write your code here\n int ret = 0;\n if (!queue1.isEmpty()) {\n while (queue1.size() > 1) {\n queue2.offer(queue1.poll());\n }\n ret = queue1.peek();\n queue2.offer(queue1.poll());\n } else if (!queue2.isEmpty()) {\n while (queue2.size() > 1) {\n queue1.offer(queue2.poll());\n }\n ret = queue2.peek();\n queue1.offer(queue2.poll());\n }\n return ret;\n }", "public void enqueue (Item item){\n Node<Item> oldLast = last;\n last = new Node<Item>();\n last.item = item;\n last.next = null;\n if(isEmpty()) {first = last;}\n else oldLast.next = last;\n N++;\n }", "T peek(){\n if(isEmpty()){\n return null;\n }\n return (T)queueArray[0];\n }", "public Item dequeue() throws NoSuchElementException {\r\n // Usar el metodo downHeap para corregir la condicion\r\n // de Min Heap\r\n\r\n\r\n Item ret = heap[1];\r\n\r\n heap[1] = heap[size];\r\n downHeap(1);\r\n\r\n heap[size] = null;\r\n size--;\r\n\r\n return ret;\r\n }", "@Test\n @SuppressWarnings({\"unchecked\"})\n public void moveUp() {\n exQ.moveUp(JobIdFactory.newId());\n Mockito.verify(queue, Mockito.times(0)).swap( Mockito.any(PrioritizableRunnable.class),Mockito.any(PrioritizableRunnable.class));\n //the first shouldent be moved\n exQ.moveUp(this.ids.get(0));\n Mockito.verify(queue, Mockito.times(0)).swap( Mockito.any(PrioritizableRunnable.class),Mockito.any(PrioritizableRunnable.class));\n //otherwise move it up\n exQ.moveUp(this.ids.get(1));\n Mockito.verify(queue, Mockito.times(1)).swap(this.runnables.get(1),this.runnables.get(0));\n }", "public E poll() {\n\t\tif (apq.isEmpty())\n\t\t\treturn null;\n\t\tE retValue = apq.get(1);\n\t\tswap(1, apq.size() - 1); // -1 changed, change back if it doesnt work\n\t\tapq.remove(apq.size() - 1); // -1 changed, change back if it doesnt work\n\t\tdownheap(1);\n\t\treturn retValue; // implement this method\n\t}", "public int top() {\n\t\tIterator<Integer> iter = queue.iterator();\n\t\tint temp = 0;\n\t\twhile (iter.hasNext())\n\t\t\ttemp = iter.next();\n\t\treturn temp;\n\t}", "public void push(int x) {\n // Write your code here\n if (queue1.isEmpty() && queue2.isEmpty()) {\n queue1.offer(x);\n } else if (!queue1.isEmpty()) {\n queue1.offer(x);\n } else {\n queue2.offer(x);\n }\n }", "public int top() {\n if(queueA.isEmpty() && queueB.isEmpty()){\n return -1;\n }\n int res;\n if(!queueA.isEmpty()){\n while(queueA.size()!=1){\n queueB.add(queueA.poll());\n }\n res = queueA.poll();\n queueB.add(res);\n }else{\n while(queueB.size()!=1){\n queueA.add(queueB.poll());\n }\n res = queueB.poll();\n queueA.add(res);\n }\n return res;\n }", "public void enqueue(E e) {\n\t\tlist.addLast(e);\n\t}", "public int top() {\r\n int size = this.queueMain.size();\r\n if(size == 1) return this.queueMain.element();\r\n // 转移n-1\r\n while(size != 1){\r\n this.queueHelp.offer(this.queueMain.poll());\r\n size--;\r\n }\r\n // 然后取出第n个元素\r\n int res = this.queueHelp.element();\r\n // 转移到辅助队列\r\n this.queueHelp.offer(this.queueMain.poll());\r\n // 再调换\r\n Queue<Integer> temp = this.queueMain;\r\n this.queueMain = this.queueHelp;\r\n this.queueHelp = temp;\r\n\r\n return res;\r\n }", "public Object peek()\n {\n return queue.peekLast();\n }", "void enqueue(T x);", "public int top() {\n\t return q.peek();\n\t }", "T poll(){\n if(isEmpty()){\n return null;\n }\n T temp = (T) queueArray[0];\n for(int i=0; i<tail-1;i++){\n queueArray[i] = queueArray[i+1];\n }\n tail--;\n return temp;\n }", "public interface PQueue<T> {\n\n void add(T item, int priority) throws InterruptedException;\n\n T removeMin();\n\n}", "public void push(E item) {\n if (!isFull()) {\n this.stack[top] = item;\n top++;\n } else {\n Class<?> classType = this.queue.getClass().getComponentType();\n E[] newArray = (E[]) Array.newInstance(classType, this.stack.length*2);\n System.arraycopy(stack, 0, newArray, 0, this.stack.length);\n this.stack = newArray;\n\n this.stack[top] = item;\n top++;\n }\n }", "private void push() {\n ImmutableSortedSet<T> myAvailable = _outstanding.apply(\n new Syncd.Transformer<ImmutableSortedSet<T>, ImmutableSortedSet<T>>() {\n public Tuple<ImmutableSortedSet<T>, ImmutableSortedSet<T>> apply(ImmutableSortedSet<T> aBefore) {\n final SortedSet<T> myRemaining = new TreeSet<>(new MessageComparator<T>());\n\n // Identify those messages that are sequentially contiguous from _floor and can be passed on\n //\n ImmutableSortedSet<T> myAccessible =\n new ImmutableSortedSet.Builder<>(new MessageComparator<T>()).addAll(\n Iterables.filter(aBefore, new Predicate<T>() {\n public boolean apply(T aMessage) {\n Long myCurrent = _floor.get();\n\n if (aMessage.getSeq() == myCurrent) {\n // This message can be sent out to listeners so long as we're first to try\n //\n if (_floor.testAndSet(myCurrent, myCurrent + 1))\n return true;\n } else\n // This message must remain\n //\n myRemaining.add(aMessage);\n\n // Couldn't send message out or it must remain\n //\n return false;\n }\n })\n ).build();\n\n return new Tuple<>(new ImmutableSortedSet.Builder<>(\n new MessageComparator<T>()).addAll(myRemaining).build(),\n myAccessible);\n }\n }\n );\n\n send(myAvailable);\n archive(myAvailable);\n }", "public int queue_top() {\n\t\tif (isEmpty()) error(\"Queue is Empty!\");\n\t\treturn data[(front + 1) % MAX_QUEUE_SIZE];\n\t}", "public Object firstElement() {\n return _queue.firstElement();\n }", "public void push(E elem) {\n if (elem != null) {\r\n contents[++top] = elem;\r\n }\r\n\r\n // Usually better to resize after an addition rather than before for\r\n // multi-threading reasons. Although, that is not important for this class.\r\n if (top == contents.length-1) resize();\r\n }", "public void push(int x) {\n\t int size=q.size();\n\t q.offer(x);\n\t for(int i=0;i<size;i++){\n\t q.offer(q.poll());\n\t }\n\t \n\t }", "public T dequeue();", "public int viewTop(){\r\n\t\treturn queue[0];\r\n\t}" ]
[ "0.6552587", "0.65491444", "0.6474043", "0.64601696", "0.6374938", "0.63328546", "0.63017386", "0.62666714", "0.62575924", "0.62519413", "0.6235655", "0.6233128", "0.6201622", "0.61944205", "0.6186225", "0.61630166", "0.61620873", "0.61433506", "0.6135839", "0.61289567", "0.6128331", "0.6110421", "0.610375", "0.61028236", "0.6086299", "0.60848486", "0.60712355", "0.60712355", "0.6064882", "0.6061094", "0.60575557", "0.6055249", "0.60411775", "0.60354316", "0.6032398", "0.6032398", "0.60246074", "0.6022172", "0.60131675", "0.59941214", "0.59909225", "0.59894735", "0.59894735", "0.5988199", "0.5982439", "0.5981681", "0.5980157", "0.5978275", "0.5976766", "0.597612", "0.59741455", "0.59687465", "0.59582293", "0.5955848", "0.5955848", "0.59460676", "0.593596", "0.5930643", "0.59256154", "0.59168506", "0.59168506", "0.59168506", "0.59130335", "0.5911145", "0.58997226", "0.5898539", "0.58944166", "0.58885074", "0.5886587", "0.588623", "0.588301", "0.5869574", "0.5866108", "0.58599734", "0.58593965", "0.5849843", "0.58482575", "0.58340997", "0.5831483", "0.58309853", "0.58305895", "0.58270454", "0.58259565", "0.5820217", "0.5815949", "0.5815303", "0.58145773", "0.58133703", "0.58085203", "0.58078915", "0.5807801", "0.5804975", "0.58045465", "0.57980716", "0.57873696", "0.5785898", "0.5785704", "0.57704645", "0.5767864", "0.5765005", "0.5757191" ]
0.0
-1
Get the size of the queue (both queued and being consumed).
int size();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getQueueSize(){\n return queue.size();\n }", "int getQueueSize();", "public int getQueueSize() {\n return queue.getQueueSize();\n }", "public int getQueueSize() {\r\n\t\treturn this.queue.size();\r\n\t}", "public int queueSize() {\n\t\treturn queue.size();\t\n\t}", "public static int size() {\n System.out.println();\n System.out.println(\"The size of the queue is: \" + queue.size());\t \n return queue.size();\n }", "public int size() {\n return this.queue.size();\n }", "public int size() {\n return _queue.size();\n }", "public int size() {\n return queue.size();\n }", "public int size(){\r\n\t\treturn queue.size();\r\n\t}", "public int size() {\n\t\treturn queue.size();\n\t}", "final int getQueueSize() {\n // suppress momentarily negative values\n return Math.max(0, sp - base);\n }", "public int queueSize() {\n return executor.getQueue().size();\n }", "public abstract int getQueueLength();", "public int getOutgoingQueueSize();", "public int size()\n\t{\n\t\treturn requestQueue != null ? requestQueue.size() : 0;\n\t}", "public int size() \r\n {\r\n if(measurementQueue==null) return 0;\r\n \r\n return measurementQueue.size();\r\n }", "public int inputQueueSize() {\n\t\tsynchronized (inputQueue) {\n\t\t\treturn inputQueue.size();\n\t\t}\n\t}", "public synchronized int getSize() {\r\n\t\treturn queueManagers.size();\r\n\t}", "public int size() {\n processQueue();\n return weakCache.size();\n }", "@Override\n public int queueLength() {\n return this.job_queue.size();\n }", "public int size()\n\t{\n\t\tif(isEmpty())\n\t\t\treturn 0;\n\t\tif(isFull())\n\t\t\treturn queueArray.length;\n\t\t\n\t\tint i=front;\n\t\tint sz=0;\n\t\tif(front<=rear)\n\t\t\twhile(i<=rear)\n\t\t\t{\n\t\t\t\tsz++;\n\t\t\t\ti++;\n\t\t\t}\n\t\telse\n\t\t{\n\t\t\twhile(i<=queueArray.length-1)\n\t\t\t{\n\t\t\t\tsz++;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\ti=0;\n\t\t\twhile(i<=rear)\n\t\t\t{\n\t\t\t\tsz++;\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn sz;\n\t}", "public int getCount() {\n return queue.size();\n }", "public final int size()\r\n/* 41: */ {\r\n/* 42:215 */ long after = lvConsumerIndex();\r\n/* 43: */ for (;;)\r\n/* 44: */ {\r\n/* 45:219 */ long before = after;\r\n/* 46:220 */ long currentProducerIndex = lvProducerIndex();\r\n/* 47:221 */ after = lvConsumerIndex();\r\n/* 48:222 */ if (before == after)\r\n/* 49: */ {\r\n/* 50:224 */ long size = currentProducerIndex - after >> 1;\r\n/* 51:225 */ break;\r\n/* 52: */ }\r\n/* 53: */ }\r\n/* 54: */ long size;\r\n/* 55:230 */ if (size > 2147483647L) {\r\n/* 56:232 */ return 2147483647;\r\n/* 57: */ }\r\n/* 58:236 */ return (int)size;\r\n/* 59: */ }", "public int size() {\n return qSize;\n }", "public int getQueueSize(String walGroupId) {\n Queue<Path> queue = queues.get(walGroupId);\n if (queue == null) {\n return 0;\n }\n return queue.size();\n }", "public int queueArrayLength(){\n\t\treturn queueArray.length;\n\t}", "public static int size(ArrayQueueADT arrayQueue) {\n return arrayQueue.size;\n }", "long getWriterQueueLength();", "public long getSize() {\n return size.get();\n }", "int getNumBufferedBytes() {\n ChannelBuffer buf;\n int IOQueued;\n for (IOQueued = 0, buf = inQueueHead;\n buf != null; buf = buf.next) {\n IOQueued += buf.nextAdded - buf.nextRemoved;\n }\n return IOQueued;\n }", "public synchronized long size() {\n\t\treturn size;\n\t}", "public int remainingCapacity() throws QueueException\r\n {\r\n if(measurementQueue==null) throw new QueueException(\"CINCAMIMIS Queue not found\");\r\n \r\n return measurementQueue.remainingCapacity();\r\n }", "public int getNumQueues() {\n return queues.size();\n }", "public Integer getThreadPoolBlockingQueueSize() {\n String tc = getConfig().getProperty(THREAD_POOL_BLOCKING_QUEUE_SIZE).getValue();\n Integer ret = new Integer(DEFAULT_THREAD_POOL_BLOCKING_QUEUE_SIZE);\n if (tc != null){\n try {\n ret = Integer.valueOf(tc);\n } catch (Exception ex){\n ret = new Integer(DEFAULT_THREAD_POOL_BLOCKING_QUEUE_SIZE);\n }\n }\n return ret;\n }", "public long size() {\n\t\treturn size;\n\t}", "public int size() {\n\t\t//Because we're the only consumer, we know nothing will be removed while\n\t\t//we're computing the size, so we know there are at least (rear - front)\n\t\t//elements already added.\n\t\treturn (int)(rear.get() - front.get());\n\t}", "public int size() {\r\n if (NumItems > Integer.MAX_VALUE) {\r\n return Integer.MAX_VALUE;\r\n }\r\n return NumItems;\r\n }", "public synchronized int size() {\r\n return size;\r\n }", "@Override\n\tpublic long size() {\n\t\treturn this.currentLength.get();\n\t}", "public int size() { return dequeSize; }", "public synchronized int getSize() {\n\t\treturn this.size;\n\t}", "public int getRunnableCount() {\n return queue.size();\n }", "@Test\n public void testGetSize() {\n Queue queue = new Queue();\n queue.enqueue(testParams[1]);\n queue.enqueue(testParams[2]);\n queue.enqueue(testParams[1]);\n queue.enqueue(testParams[2]);\n\n int expResult = 4;\n\n // call tested method\n int actualResult = queue.getSize();\n\n // compare expected result with actual result\n assertEquals(expResult, actualResult);\n }", "public int get_size()\r\n\t{\r\n\t\treturn this.size;\r\n\t}", "@Test\n public void sizeTest() {\n assertThat(4, is(this.queue.size()));\n }", "public int getDequeueCount() {\n\t\treturn m_DequeueCount;\n\t}", "public int get_size();", "public int get_size();", "public int getQueueDepth() throws Exception\n {\n return destination.queue.getQueueDepth();\n }", "public Integer getSize() {\n return size;\n }", "public int size() {\n return doSize();\n }", "public int size()\n {\n return currentSize;\n }", "public int getTotalSize();", "public int size()\r\n\t{\r\n\t\treturn currentSize;\r\n\t}", "int getSize() {\n synchronized (lock) {\n return cache.size();\n }\n }", "public long getSize() {\n\t\treturn size;\n\t}", "public int eventQueueCapacity() {\n return eventQueueCapacity_;\n }", "public int numVehiclesInQueue() {\r\n\t\treturn vehiclesInQueue.size();\r\n\t}", "protected long getLiveSetSize() {\n\t\t// Sum of bytes removed from the containers.\n\t\tlong removed = 0;\n\n\t\tfor (int i = 0; i < sets.length; i++)\n\t\t\tremoved += sets[i].getContainer().getBytesRemoved();\n\n\t\t/*\n\t\t * The total number of butes still alive is the throughput minus the number of\n\t\t * bytes either removed from the container or never added in the first place.\n\t\t */\n\t\tlong size = getThroughput() - removed - producerThreadPool.getBytesNeverAdded();\n\n\t\treturn (size > 0) ? size : 0;\n\t}", "public final int getSize() {\n return size;\n }", "public long getSize() {\r\n\t\treturn size;\r\n\t}", "public int getSize() {\n\t\treturn this.size;\n\t}", "public int getSize() {\n\t\treturn this.size;\n\t}", "public int getSize() {\n\t\treturn this.size;\n\t}", "public int getSize() {\n\t\treturn this.size;\n\t}", "public int getSize() {\n\t\treturn this.size;\n\t}", "public int size() {\n // DO NOT MODIFY!\n return size;\n }", "public int size() {\n // DO NOT MODIFY THIS METHOD!\n return size;\n }", "public int getSize() {\n\t\treturn _size;\n\t}", "public int size () {\r\n return this.size;\r\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public int size() {\n synchronized (this.base) {\n return this.base.size();\n }\n }", "int getTotalSize();", "public TSizeInBytes getSize() {\n\n\t\treturn size;\n\t}", "public final int bytesConsumed() {\n/* 218 */ return this.bytesConsumed;\n/* */ }", "public int getSize()\n\t{\n\t\treturn this.size;\n\t}", "@Override\n\tpublic long size() {\n\t\t\n\t\treturn mySize;\n\t}", "public long getSize() {\r\n return size;\r\n }", "public int size () {\n\t\treturn size;\n\t}", "public int size () {\n\t\treturn size;\n\t}", "public int getSize() {\n return this.serialize().limit();\n }", "public int size() {\n\t\treturn currentSize;\n\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int size()\r\n {\r\n return size;\r\n }", "public int size()\r\n {\r\n return size;\r\n }" ]
[ "0.8587164", "0.8567968", "0.85299236", "0.8496907", "0.84856105", "0.82720935", "0.82574844", "0.8231695", "0.8209418", "0.8203683", "0.8183819", "0.80774426", "0.80271804", "0.7908587", "0.7836789", "0.7764816", "0.7689206", "0.7687055", "0.7644499", "0.75702745", "0.75607264", "0.7513884", "0.7312885", "0.72463673", "0.71725464", "0.7152354", "0.71495414", "0.70608634", "0.7007258", "0.6951561", "0.692407", "0.68893564", "0.6882824", "0.6864204", "0.6862167", "0.6825985", "0.6821544", "0.680721", "0.68013996", "0.6769689", "0.6741927", "0.67402834", "0.6737565", "0.67358124", "0.6729644", "0.6706351", "0.6699852", "0.6697992", "0.6697992", "0.6642739", "0.6616559", "0.66163623", "0.6606677", "0.66033876", "0.6594895", "0.6594232", "0.6582747", "0.6567406", "0.656693", "0.6563955", "0.65620697", "0.65568215", "0.65182734", "0.65182734", "0.65182734", "0.65182734", "0.65182734", "0.65142834", "0.65118635", "0.6510975", "0.6510385", "0.65065384", "0.65065384", "0.65065384", "0.65065384", "0.65062106", "0.6505225", "0.6499951", "0.6492814", "0.6485442", "0.64797175", "0.64796126", "0.6476224", "0.6476224", "0.6475309", "0.646714", "0.6465125", "0.6465125", "0.6465125", "0.6465125", "0.6465125", "0.6465125", "0.6465125", "0.6465125", "0.6465125", "0.6465125", "0.6465125", "0.6465125", "0.6465125", "0.6458183", "0.6458183" ]
0.0
-1
The class holding records for this type
@Override public Class<JIssueGroupRecord> getRecordType() { return JIssueGroupRecord.class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RecordRecord() {\n\t\tsuper(org.jooq.examples.cubrid.demodb.tables.Record.RECORD);\n\t}", "public Class<?> getRecordClass() \n\t{\n\t return recordClass ;\n\t}", "public DataRecord() {\n super(DataTable.DATA);\n }", "@Override\n public Class<Record> getRecordType() {\n return Record.class;\n }", "@Override\n public Class<Record> getRecordType() {\n return Record.class;\n }", "@Override\n public Class<Record> getRecordType() {\n return Record.class;\n }", "@Override\n public Class<Record> getRecordType() {\n return Record.class;\n }", "public Record() {\n data = new int[DatabaseManager.fieldNames.length];\n }", "@Override\n public Class<PgClassRecord> getRecordType() {\n return PgClassRecord.class;\n }", "@Override\n public Class<ModelRecord> getRecordType() {\n return ModelRecord.class;\n }", "@Override\n\tpublic java.lang.Class<org.jooq.Record> getRecordType() {\n\t\treturn __RECORD_TYPE;\n\t}", "@Override\n\tpublic java.lang.Class<org.jooq.Record> getRecordType() {\n\t\treturn __RECORD_TYPE;\n\t}", "@Override\n\tpublic java.lang.Class<org.jooq.Record> getRecordType() {\n\t\treturn __RECORD_TYPE;\n\t}", "public ARecord() {\n super(A.A);\n }", "@Override\n\tpublic java.lang.Class<org.jooq.Record> getRecordType() {\n\t\treturn org.jooq.Record.class;\n\t}", "@Override\n\tpublic java.lang.Class<org.jooq.Record> getRecordType() {\n\t\treturn org.jooq.Record.class;\n\t}", "@Override\n\tpublic java.lang.Class<org.jooq.Record> getRecordType() {\n\t\treturn org.jooq.Record.class;\n\t}", "public ObjectRecord() {\n\t\tsuper(org.jooq.test.hsqldb.generatedclasses.tables.Object.OBJECT);\n\t}", "public WERecordDataModel()\n\t{\n\t\tsuper();\n\t\tsetEqFileName(RECORD_NAME);\n\t\tinitMessages();\n\t}", "public Record toRecord() {\n return new Record().setColumns(this);\n }", "DataHRecordData() {}", "@Override\n public Class<ResourcesRecord> getRecordType() {\n return ResourcesRecord.class;\n }", "public GO_RecordType() {\n }", "@Override\n public Class<QsRecord> getRecordType() {\n return QsRecord.class;\n }", "public ItemRecord() {\n super(Item.ITEM);\n }", "public Record getRecord() {\n return record;\n }", "public Record getRecord() {\n return record;\n }", "@Override\n\tpublic Class<Record> getRecordType() {\n\t\treturn Record.class;\n\t}", "@Override\n\tpublic Class<Record> getRecordType() {\n\t\treturn Record.class;\n\t}", "@Override\n public Class<LinearmodelRecord> getRecordType() {\n return LinearmodelRecord.class;\n }", "@JsonProperty(\"Records\") abstract List<?> getRecords();", "public Item_Record() {\n super(Item_.ITEM_);\n }", "@Override\n public Class<MytableRecord> getRecordType() {\n return MytableRecord.class;\n }", "@Override\n protected Class<RecordType> getBoundType() {\n return RecordType.class;\n }", "@Override\n public Class<PatientRecord> getRecordType() {\n return PatientRecord.class;\n }", "public interface CollectionRecord {\n\n\t/**\n\t * Gets the id attribute of the CollectionRecord object\n\t *\n\t * @return The id value\n\t */\n\tpublic String getId();\n\n\n\t/**\n\t * Gets the setSpec attribute of the CollectionRecord object\n\t *\n\t * @return The setSpec value\n\t */\n\tpublic String getSetSpec();\n\n\n\t/**\n\t * Gets the metadataHandle attribute of the CollectionRecord object\n\t *\n\t * @param collectionSetSpec setSpec (e.g., \"dcc\")\n\t * @return The metadataHandle value\n\t * @exception Exception if there is a webservice error\n\t */\n\tpublic String getMetadataHandle(String collectionSetSpec) throws Exception;\n\n\n\t/**\n\t * Gets the handleServiceBaseUrl attribute of the CollectionRecord object\n\t *\n\t * @return The handleServiceBaseUrl value\n\t */\n\tpublic String getHandleServiceBaseUrl();\n\n\t/* \tpublic String getNativeFormat();\n\tpublic DcsDataRecord getDcsDataRecord();\n\tpublic MetaDataFramework getMetaDataFramework();\n\tpublic Document getLocalizedDocument(); */\n}", "@Override\n\tpublic Class<QuotesRecord> getRecordType() {\n\t\treturn QuotesRecord.class;\n\t}", "@Override\n public Class<AnalysisRecord> getRecordType() {\n return AnalysisRecord.class;\n }", "public Record() {\n this.symptoms = new LinkedHashSet<>();\n this.diagnoses = new LinkedHashSet<>();\n this.prescriptions = new LinkedHashSet<>();\n }", "public OpenERPRecordSet() {\r\n\t\trecords = new Vector<OpenERPRecord>();\r\n\t}", "@Override\n public Class<QuestionForBuddysRecord> getRecordType() {\n return QuestionForBuddysRecord.class;\n }", "public QuestionsRecord() {\n\t\tsuper(sooth.entities.tables.Questions.QUESTIONS);\n\t}", "public Data() {\n this.customers = new HashMap<>();\n this.orders = new HashMap<>();\n this.siteVisits = new HashMap<>();\n this.imageUploads = new HashMap<>();\n }", "public GenericData.Record serialize() {\n return null;\n }", "public GenericTcalRecord() {\n this(-1);\n }", "public StudentRecord() {\n\t\tscores = new ArrayList<>();\n\t\taverages = new double[5];\n\t}", "@Override\n public Class<CarmodelRecord> getRecordType() {\n return CarmodelRecord.class;\n }", "@Override\n public Class<MemberRecord> getRecordType() {\n return MemberRecord.class;\n }", "public BookRecord() {\n super(Book.BOOK);\n }", "@Override\n public Class<SearchLogsRecord> getRecordType() {\n return SearchLogsRecord.class;\n }", "@Override\n public Class<EasytaxTaxationsRecord> getRecordType() {\n return EasytaxTaxationsRecord.class;\n }", "public SalesRecords() {\n super();\n }", "public SongRecord(){\n\t}", "@Override\n public Class<LangsRecord> getRecordType() {\n return LangsRecord.class;\n }", "public PersonRecord(){\n\t\tlistNames = new ArrayList<String>();\n\t}", "@Override\n public Class<RoomRecord> getRecordType() {\n return RoomRecord.class;\n }", "@Override\n public Class<CalcIndicatorAccRecordInstanceRecord> getRecordType() {\n return CalcIndicatorAccRecordInstanceRecord.class;\n }", "public ArrayList<Record> getRecords() {\r\n\t\treturn records;\r\n\t}", "@Override\n public Class<CourseRecord> getRecordType() {\n return CourseRecord.class;\n }", "@Override\n public Class<CabTripDataRecord> getRecordType() {\n return CabTripDataRecord.class;\n }", "@Override\n public Class<TripsRecord> getRecordType() {\n return TripsRecord.class;\n }", "public Item_Record(Integer _Id_, String name_, String description_, String code_, Double price_, Double retailPrice_, Double costPrice_, Object _Search_, String[] _Types_, String _LastModified_, Integer _Version_) {\n super(Item_.ITEM_);\n\n set(0, _Id_);\n set(1, name_);\n set(2, description_);\n set(3, code_);\n set(4, price_);\n set(5, retailPrice_);\n set(6, costPrice_);\n set(7, _Search_);\n set(8, _Types_);\n set(9, _LastModified_);\n set(10, _Version_);\n }", "@Override\r\n\tpublic List<T> getRecords() {\n\t\treturn null;\r\n\t}", "@Override\n public Class<StudentCourseRecord> getRecordType() {\n return StudentCourseRecord.class;\n }", "@Override\n public Class<ZTest1Record> getRecordType() {\n return ZTest1Record.class;\n }", "public OfcRecordRecord() {\n\t\tsuper(org.openforis.collect.persistence.jooq.tables.OfcRecord.OFC_RECORD);\n\t}", "public Class<gDBR> getRecordClass() \n {\n return this.rcdClass;\n }", "public RecordingRepository() {\r\n recordings = new ArrayList<>();\r\n recordingMap = new HashMap<>();\r\n recordingsByMeetingIDMap = new HashMap<>();\r\n update();\r\n }", "@Override\n public Class<GchCarLifeBbsRecord> getRecordType() {\n return GchCarLifeBbsRecord.class;\n }", "@Override\n\tpublic java.lang.Class<nesi.jobs.tables.records.HourlyRecordRecord> getRecordType() {\n\t\treturn nesi.jobs.tables.records.HourlyRecordRecord.class;\n\t}", "@Override\n public Class<AccountRecord> getRecordType() {\n return AccountRecord.class;\n }", "public ExperimentRecord() {\n super(Experiment.EXPERIMENT);\n }", "public MealRecord() {\n\t\tsuper(Meal.MEAL);\n\t}", "@Override\n public Class<StaffRecord> getRecordType() {\n return StaffRecord.class;\n }", "public LateComingRecord() {\n\t\t}", "@Override\n public Class<AssessmentStudenttrainingworkflowRecord> getRecordType() {\n return AssessmentStudenttrainingworkflowRecord.class;\n }", "public UsersRecord() {\n super(Users.USERS);\n }", "@Override\n public Class<MyMenuRecord> getRecordType() {\n return MyMenuRecord.class;\n }", "public DataPersistence() {\n storage = new HashMap<>();\n idCounter = 0;\n }", "public AnswerRecord() {\n super(Answer.ANSWER);\n }", "public DatasetReader()\n\t{\n\t\treviews = new ArrayList<Review>();\n\t\tratings = new HashMap<Double,List<Double>>();\n\t\tproducts = new HashMap<String, Map<String,Double>>();\n\t\tproductRatings = new HashMap<String, List<Double>>();\n\t\treInstanceList = new ArrayList<ReviewInstance>();\n\t\treInstanceMap = new HashMap<String, ReviewInstance>();\n\t}", "@Override\n public Class<JournalEntryLineRecord> getRecordType() {\n return JournalEntryLineRecord.class;\n }", "@Override\n public Class<CommentsRecord> getRecordType() {\n return CommentsRecord.class;\n }", "@Override\n public Class<SpeedAlertsHistoryRecord> getRecordType() {\n return SpeedAlertsHistoryRecord.class;\n }", "@Override\n public Class<RatingsRecord> getRecordType() {\n return RatingsRecord.class;\n }", "@Override\n public Class<TOpLogsRecord> getRecordType() {\n return TOpLogsRecord.class;\n }", "@Override\n\tpublic java.lang.Class<net.user1.union.zz.common.model.tables.records.ZzcronRecord> getRecordType() {\n\t\treturn __RECORD_TYPE;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic RelationClass() {\n\t\t\n\t\tParser pars = new Parser(FILE_NAME); \t\t\t\t\t\t\t\n\t\tint bucketlength = 0;\n\t\tbucketlength = (int) (pars.getNumOfLines()*BUCKET_MULTIPLIER);\n\t\tbuckets = (Node<k,v>[]) new Node<?,?>[bucketlength];\n\t\tpars.process(this);\t\t\t\t\t\t\t\t\t\t\t\t\n\t}", "@Override\n\tpublic java.lang.Class<persistencia.tables.records.AsientoRecord> getRecordType() {\n\t\treturn persistencia.tables.records.AsientoRecord.class;\n\t}", "@Override\n public Class<StatsRecord> getRecordType() {\n return StatsRecord.class;\n }", "@Override\n\tpublic Class<QuestionRecord> getRecordType() {\n\t\treturn QuestionRecord.class;\n\t}", "public MetricSchemaRecord() { }", "public PedidoRecord() {\n super(Pedido.PEDIDO);\n }", "@Override\n public Class<DynamicSchemaRecord> getRecordType() {\n return DynamicSchemaRecord.class;\n }", "public PersonRecord() {}", "@Override\n\tpublic Class<RentalRecord> getRecordType() {\n\t\treturn RentalRecord.class;\n\t}", "public PagesRecord() {\n super(Pages.PAGES);\n }", "@Override\n public Class<AbsenceRecord> getRecordType() {\n return AbsenceRecord.class;\n }", "@Override\n public Class<RedpacketConsumingRecordsRecord> getRecordType() {\n return RedpacketConsumingRecordsRecord.class;\n }", "@Override\n\tpublic java.lang.Class<jooq.model.tables.records.TBasicSalaryRecord> getRecordType() {\n\t\treturn jooq.model.tables.records.TBasicSalaryRecord.class;\n\t}", "public YearlyRecord() {\n this.wordToCount = new HashMap<String, Integer>();\n this.wordToRank = new HashMap<String, Integer>();\n this.countToWord = new HashMap<Integer, Set<String>>();\n }" ]
[ "0.68004626", "0.66954035", "0.64103794", "0.6398801", "0.6398801", "0.6398801", "0.6398801", "0.6393993", "0.6354873", "0.6192012", "0.61258304", "0.61258304", "0.61258304", "0.6104736", "0.60470754", "0.60470754", "0.60470754", "0.6040716", "0.6029211", "0.6020949", "0.6008978", "0.60082155", "0.6006576", "0.59716636", "0.59703285", "0.5949182", "0.5949182", "0.59396815", "0.59396815", "0.5936131", "0.5935658", "0.5895888", "0.5895527", "0.5893964", "0.5884042", "0.58751285", "0.58681023", "0.5865894", "0.5864961", "0.5855157", "0.5851545", "0.58495414", "0.58392423", "0.58338994", "0.58154637", "0.58069575", "0.57927567", "0.578939", "0.57841045", "0.5779981", "0.5753099", "0.5741735", "0.57333666", "0.57321835", "0.5731796", "0.57317585", "0.572287", "0.5720141", "0.5712233", "0.56939065", "0.56927073", "0.5685293", "0.56847894", "0.5683809", "0.56834316", "0.56828403", "0.56666017", "0.56607187", "0.56579894", "0.5648655", "0.56438047", "0.5620551", "0.561873", "0.5609984", "0.55931836", "0.55871445", "0.5586237", "0.55789423", "0.55779636", "0.55737203", "0.55702287", "0.55692416", "0.5561011", "0.5559403", "0.5543905", "0.5541634", "0.5536858", "0.5522634", "0.5517553", "0.5517258", "0.5512109", "0.5509594", "0.55070907", "0.5496529", "0.54921997", "0.5491354", "0.5486711", "0.5481696", "0.54758567", "0.5471066", "0.54659206" ]
0.0
-1
Create a public.issue_group table reference
public JIssueGroup() { this(DSL.name("issue_group"), null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void allocateGroupId(){\n\t\trecords.add(new pair(this.groupname,currentId));\n\t\tthis.groupid = currentId;\n\t\tcurrentId++;\n\t\tConnection c = null;\n\t\tStatement stmt = null;\n\t\ttry{\n\t\t\tSystem.out.println(\"group setup\");\n\t\t\tSystem.out.println(this.groupid);\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\tc = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/ifoundclassmate\");\n\t\t\tc.setAutoCommit(false);\n\t\t\tstmt = c.createStatement();\n\t\t\tString sql = \"INSERT INTO GROUPS (GROUPID,GROUPNAME,DESCRIPTION) \"+\n\t\t\t\t\t\"VALUES (\" + this.groupid + \", \" + \"'\" +this.groupname + \"'\"\n\t\t\t\t\t+\" , \" + \"'\" + this.description + \"' \" + \");\" ;\n\t\t\tstmt.executeUpdate(sql);\n\t\t\t\n\t\t\tstmt.close();\n\t\t\tc.commit();\n\t\t\tc.close();\n\t\t} catch (Exception e ){\n\t\t\tSystem.out.println(e.getClass().getName() + e.getMessage() );\n\t\t\treturn;\n\t\t}\n\t\treturn;\n\t}", "GroupRefType createGroupRefType();", "GroupCell createGroupCell();", "HttpStatus createGroup(final String groupName);", "private void CreateNewGroup(String group, String current_uid, String push_id) {\n\n mDatabaseInfo = FirebaseDatabase.getInstance().getReference().child(\"Groups\").child(current_uid).child(push_id).child(\"groupinfo\");\n\n HashMap<String, String> userMap = new HashMap<>();\n userMap.put(\"name\", group);\n userMap.put(\"admin\", current_uid);\n userMap.put(\"groupid\", push_id);\n mDatabaseInfo.setValue(userMap);\n\n mDatabaseMember = FirebaseDatabase.getInstance().getReference().child(\"Groups\").child(current_uid).child(push_id).child(\"member\").child(current_uid);\n\n HashMap<String, String> adminMap = new HashMap<>();\n adminMap.put(\"seen\", \"false\");\n mDatabaseMember.setValue(adminMap);\n }", "UserGroup createGroup(String companyId, String name, String groupLead);", "public void createGroup(String group_name){\r\n\t\t/* \r\n\t\t * Create a new entry in group database using the information\r\n\t\t * given by the parameters\r\n\t\t */\r\n\t\tSQLiteDatabase db = this.getWritableDatabase();\r\n \tContentValues values = new ContentValues();\r\n \t\r\n\t\tvalues.put(DBHelper.COLUMN_GROUPNAME, group_name);\r\n\t\t\r\n\t\tdb.insert(DBHelper.GROUP_TABLE_NAME, null, values);\r\n\t\tdb.close();\r\n\t}", "public com.walgreens.rxit.ch.cda.StrucDocColgroup insertNewColgroup(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.StrucDocColgroup target = null;\n target = (com.walgreens.rxit.ch.cda.StrucDocColgroup)get_store().insert_element_user(COLGROUP$4, i);\n return target;\n }\n }", "public void setGroupTable(String name) throws BuildException {\n dbTable.setGroupTable(name);\n }", "UserGroup createGroup(String companyId, String name);", "GroupType createGroupType();", "GroupType createGroupType();", "ID create(NewRoamingGroup group);", "@Override\n\tpublic LinkGroup create(long linkgroupId) {\n\t\tLinkGroup linkGroup = new LinkGroupImpl();\n\n\t\tlinkGroup.setNew(true);\n\t\tlinkGroup.setPrimaryKey(linkgroupId);\n\n\t\tlinkGroup.setCompanyId(companyProvider.getCompanyId());\n\n\t\treturn linkGroup;\n\t}", "protected void createGroup(int id, int parentGroupID) {\n\t\tsendMessage(\"/g_new\", new Object[] { id, 0, parentGroupID });\n\n\t}", "ExprGroup createExprGroup();", "public boolean createGroups(int assignmentToGroup, int otherAssignment,\n String repoPrefix) {\n \ttry{\n\n\t\t}catch (Exception se){\n\t\t\t\tSystem.err.println(\"SQL Exception.\" +\n\t\t\t\t\t\t\"<Message>: \" + se.getMessage());\n\t\t}\n // Replace this return statement with an implementation of this method!\n return false;\n }", "public com.ext.portlet.model.ModelInputGroup create(long modelInputGroupPK);", "GroupsType createGroupsType();", "protected void createGroup(int id) {\n\t\tcreateGroup(id, _motherGroupID);\n\t}", "ExpRunGroupMapTable createRunGroupMapTable(String name, UserSchema schema, ContainerFilter cf);", "ContactGroup createUnresolvedContactGroup(String groupUID, String persistentData, ContactGroup parentGroup);", "public JIssueGroup(Name alias) {\n this(alias, ISSUE_GROUP);\n }", "int insert(CmGroupRelIndustry record);", "public JIssueGroup(String alias) {\n this(DSL.name(alias), ISSUE_GROUP);\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.FinancialStatement addNewFinancialStatementsGroup();", "public void joinGroup(Group group) {\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS_GROUPS WHERE USER_ID=? AND GROUP_ID=?\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ResultSet rs = ps.executeQuery();\n if (rs.next()) return;\n\n ps = conn.prepareStatement(\"INSERT INTO USERS_GROUPS(USER_ID, GROUP_ID) VALUES(?, ?)\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public UsersGroupsRecord() {\n\t\tsuper(org.kallithea.ldap.sync.jooq.tables.UsersGroups.USERS_GROUPS);\n\t}", "public void newGroup() {\n addGroup(null, true);\n }", "protected abstract Group createIface ();", "int insert(SbGroupDetail record);", "public com.walgreens.rxit.ch.cda.StrucDocColgroup addNewColgroup()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.StrucDocColgroup target = null;\n target = (com.walgreens.rxit.ch.cda.StrucDocColgroup)get_store().add_element_user(COLGROUP$4);\n return target;\n }\n }", "void setGroupId(String groupId);", "private void createNewGroup() {\r\n if(selectedNode != null) { \r\n DefaultMutableTreeNode nextNode = (DefaultMutableTreeNode)selectedNode.getNextNode();\r\n if(selectedNode.isLeaf() && !selectedNode.getAllowsChildren()) {\r\n CoeusOptionPane.showInfoDialog(coeusMessageResources.parseMessageKey(\"maintainSponsorHierarchy_exceptionCode.1254\"));\r\n return;\r\n } else if(selTreePath.getPathCount() == 10) {\r\n CoeusOptionPane.showInfoDialog(coeusMessageResources.parseMessageKey(\"maintainSponsorHierarchy_exceptionCode.1255\"));\r\n return;\r\n }else if (nextNode != null && nextNode.isLeaf()) {\r\n CoeusOptionPane.showInfoDialog(\"The group '\"+selectedNode.toString()+\"' has sponsors assigned to it. \\nCannot create subgroups for this group.\");\r\n return;\r\n }else {\r\n nextNode = new DefaultMutableTreeNode(\"New Group - \"+(selectedNode.getLevel()+1)+\".\"+selectedNode.getChildCount(),true);\r\n model.insertNodeInto(nextNode, selectedNode, selectedNode.getChildCount());\r\n TreePath newSelectionPath = selTreePath.pathByAddingChild(nextNode);\r\n sponsorHierarchyTree.clearSelection();\r\n sponsorHierarchyTree.addSelectionPath(newSelectionPath);\r\n sponsorHierarchyTree.startEditingAtPath(newSelectionPath);\r\n newGroup = true;\r\n saveRequired = true;\r\n }\r\n }\r\n }", "protected void setTableGroup(int num)\n\t\t{\n\t\t\tGroup = num ;\n\t\t}", "private GroupParticipationTable() {\n }", "public void createGroup() {\n\t\tString name = JOptionPane\n\t\t\t\t.showInputDialog(\"Please Enter a new group name:\");\n\t\tif (name.equals(\"\"))\n\t\t\treturn;\n\n\t\tDefaultMutableTreeNode node = (DefaultMutableTreeNode) getLastSelectedPathComponent();\n\t\tEllowFile pfile = (EllowFile) node.getUserObject(), file;\n\t\tif (pfile.isDirectory()) {\n\t\t\tfile = new EllowFile(pfile.getAbsolutePath() + \"\\\\\\\\\" + name);\n\t\t\tfile.mkdirs();\n\t\t\tmodel.insertNodeInto(new DefaultMutableTreeNode(file), node,\n\t\t\t\t\tnode.getChildCount());\n\t\t} else {\n\t\t\tfile = new EllowFile(pfile.getParent() + \"\\\\\\\\\" + name);\n\t\t\tfile.mkdirs();\n\t\t\tnode = ((DefaultMutableTreeNode) node.getParent());\n\t\t\tmodel.insertNodeInto(new DefaultMutableTreeNode(file), node,\n\n\t\t\tnode.getChildCount());\n\t\t}\n\t\tfile.parentProject = pfile.parentProject;\n\t\tpfile.parentProject.rebuild();\n\t\tmodel.nodeChanged(root);\n\t}", "public ServiceGroup create(String shortName, String title, int cid) throws Exception;", "public Group createGroup(Group group) throws RepositoryAccessException {\r\n Connection conn = null;\r\n try {\r\n conn = openTransaction();\r\n GroupProxy proxy = new GroupProxy(conn);\r\n proxy.createGroup(group);\r\n conn.commit();\r\n } catch (Exception ex) {\r\n rollback(conn);\r\n String msg = \"Could not create group.\" + ex.getMessage();\r\n \r\n LogService.logWarn(msg, LOGGER);\r\n throw new RepositoryAccessException(msg, ex);\r\n } finally {\r\n close(conn);\r\n }\r\n \r\n return group;\r\n }", "private void createGroup(String groupName, String description, List<String> tags) {\n trCreateNewGroup.setGroupName(groupName);\n trCreateNewGroup.setOwner(user);\n trCreateNewGroup.setDescription(description);\n trCreateNewGroup.setTags(tags);\n\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-d\");\n Date date = new Date();\n String strData = dateFormat.format(date);\n\n trCreateNewGroup.setCreationDate(DateTime.Builder.buildDateString(strData));\n\n try {\n trCreateNewGroup.execute();\n } catch (GroupAlreadyExistingException e) {\n Toast toast = Toast.makeText(this, getString(R.string.group_already_created), Toast.LENGTH_LONG);\n toast.show();\n }\n\n updateMedalProgress(UserAchievement.FOUNDER);\n }", "public Group()\r\n {\r\n endpoints = new ArrayList<>();\r\n name = \"NewGroup\";\r\n }", "int insert(ProjGroup record);", "@Test\n public void createSubjectGroupTest() throws Exception\n {\n SubjectKey userKey = getUserKey(\"jdoe\");\n IPSubject ip = new IPSubject();\n \n SubjectGroup subjectGroup = new SubjectGroup();\n subjectGroup.setSubjectGroupName(\"network\");\n subjectGroup.setSubjectType(\"IP\");\n subjectGroup.setApplyToAll(Boolean.valueOf(true));\n subjectGroup.setApplyToEach(Boolean.valueOf(true));\n \n SubjectGroupEditObject sgEditObj = new SubjectGroupEditObject();\n List<Long> addList = sgEditObj.getAddSubjectList();\n addList.add(ip.getSubjectByName(\"workstation\").keySet().toArray(new Long[1])[0]);\n addList.add(ip.getSubjectByName(\"gateway\").keySet().toArray(new Long[1])[0]);\n \n SubjectGroupKey groupKey = ip.createSubjectGroup(subjectGroup, sgEditObj, userKey);\n \n EntityManagerContext.open(factory);\n try {\n org.ebayopensource.turmeric.policyservice.model.SubjectGroup savedSubjectGroup =\n EntityManagerContext.get().find(\n org.ebayopensource.turmeric.policyservice.model.SubjectGroup.class, \n groupKey.getSubjectGroupId());\n assertNotNull(savedSubjectGroup);\n } finally {\n EntityManagerContext.close();\n }\n }", "public void setGroup(entity.Group value);", "public static Group initGroupObject(){\n Group test_group = new Group(\"testGroup\");\n return test_group;\n }", "public GroupCreateBean() {\n\t\tsuper();\n\t\tthis.initializeNumbers();\t\t\n\t}", "private void createRpBlockConsistencyGroups() {\n DbClient dbClient = this.getDbClient();\n List<URI> protectionSetURIs = dbClient.queryByType(ProtectionSet.class, false);\n\n Iterator<ProtectionSet> protectionSets =\n dbClient.queryIterativeObjects(ProtectionSet.class, protectionSetURIs);\n\n while (protectionSets.hasNext()) {\n ProtectionSet ps = protectionSets.next();\n Project project = dbClient.queryObject(Project.class, ps.getProject());\n\n BlockConsistencyGroup cg = new BlockConsistencyGroup();\n cg.setId(URIUtil.createId(BlockConsistencyGroup.class));\n cg.setLabel(ps.getLabel());\n cg.setDeviceName(ps.getLabel());\n cg.setType(BlockConsistencyGroup.Types.RP.toString());\n cg.setProject(new NamedURI(project.getId(), project.getLabel()));\n cg.setTenant(project.getTenantOrg());\n\n dbClient.createObject(cg);\n\n log.debug(\"Created ConsistencyGroup (id={}) based on ProtectionSet (id={})\",\n cg.getId().toString(), ps.getId().toString());\n\n // Organize the volumes by replication set\n for (String protectionVolumeID : ps.getVolumes()) {\n URI uri = URI.create(protectionVolumeID);\n Volume protectionVolume = dbClient.queryObject(Volume.class, uri);\n protectionVolume.addConsistencyGroup(cg.getId().toString());\n\n dbClient.persistObject(protectionVolume);\n\n log.debug(\"Volume (id={}) added to ConsistencyGroup (id={})\",\n protectionVolume.getId().toString(), cg.getId().toString());\n }\n }\n }", "public void setGroupId(String newValue);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "private void newGroup()\n\t{\n\t\t// There is no need anymore to take care of the meta-data.\n\t\t// That is done once in DenormaliserMeta.getFields()\n\t\t//\n data.targetResult = new Object[meta.getDenormaliserTargetFields().length];\n \n for (int i=0;i<meta.getDenormaliserTargetFields().length;i++)\n {\n data.targetResult[i] = null;\n\n data.counters[i]=0L; // set to 0\n data.sum[i]=null;\n }\n\t}", "public void writeGroup( String groupName )\n\t{\n\t\ttry {\n\t\t\t\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder;\n\t\t\tdocBuilder = docFactory.newDocumentBuilder();\n\t\t\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement schema = doc.createElement( \"xs:schema\" );\n\t\t\tschema.setAttribute( \"xmlns:tns\", \"http://unicredit.eu/PLCredits/V1/\" + groupName + \"/xsd\" );\n\t\t\tschema.setAttribute( \"xmlns:xs\", \"http://www.w3.org/2001/XMLSchema\" );\n\t\t\tschema.setAttribute( \"xmlns:pn\", \"http://unicredit.eu/PLCredits/V1/ProposalNumber/xsd\" );\n\t\t\tschema.setAttribute( \"xmlns:head\", \"http://unicredit.eu/PLCredits/header/xsd\" );\n\t\t\tschema.setAttribute( \"xmlns:rstat\", \"http://unicredit.eu/PLCredits/responseStatus/xsd\" );\t\t\n\t\t\tschema.setAttribute( \"xmlns:ci\", \"http://unicredit.eu/PLCredits/V1/CustomerIdentifier/xsd\" );\n\t\t\tschema.setAttribute( \"xmlns:crecod3\", \"http://unicredit.eu/xmlns/CreditCode3/V1\");\t\t\n\t\t\tschema.setAttribute( \"xmlns:cretecfor\", \"http://unicredit.eu/xmlns/CreditTechnicalForm/V1\");\t\t\n\t\t\tschema.setAttribute( \"xmlns:posamo\", \"http://unicredit.eu/xmlns/PositiveAmount/V1\");\t\t\n\t\t\tschema.setAttribute( \"xmlns:isodat\", \"http://unicredit.eu/xmlns/ISODate/V1\");\t\t\n\t\t\tschema.setAttribute( \"xmlns:proarrtyp\", \"http://unicredit.eu/xmlns/ProductArrangementType/V1\");\t\n\t\t\tschema.setAttribute( \"elementFormDefault\", \"qualified\");\n\t\t\tschema.setAttribute( \"attributeFormDefault\", \"unqualified\");\n\t\t\tschema.setAttribute( \"targetNamespace\", \"http://unicredit.eu/PLCredits/V1/CollateralAssetAdministrationResourceItem/xsd\");\t\t\n\t\t\tschema.setAttribute( \"version\", \"1.0\");\n\n\t\t\tElement xsImport = doc.createElement( \"xs:import\" );\n\t\t\txsImport.setAttribute(\"namespace\", \"http://unicredit.eu/PLCredits/V1/ProposalNumber/xsd\");\n\t\t\txsImport.setAttribute(\"schemaLocation\", \"ProposalNumberSchema.xsd\");\n\t\t\tschema.appendChild(xsImport);\n\t\t\t\n\t\t\txsImport = doc.createElement( \"xs:import\" );\n\t\t\txsImport.setAttribute(\"namespace\", \"http://unicredit.eu/PLCredits/header/xsd\");\n\t\t\txsImport.setAttribute(\"schemaLocation\", \"header-v0.2.xsd\");\n\t\t\tschema.appendChild(xsImport);\n\t\t\t\n\t\t\txsImport = doc.createElement( \"xs:import\" );\n\t\t\txsImport.setAttribute(\"namespace\", \"http://unicredit.eu/PLCredits/responseStatus/xsd\");\n\t\t\txsImport.setAttribute(\"schemaLocation\", \"responseStatus.xsd\");\n\t\t\tschema.appendChild(xsImport);\n\n\t\t\txsImport = doc.createElement( \"xs:import\" );\n\t\t\txsImport.setAttribute(\"namespace\", \"http://unicredit.eu/PLCredits/V1/CustomerIdentifier/xsd\");\n\t\t\txsImport.setAttribute(\"schemaLocation\", \"CustomerIdentifierSchema.xsd\");\n\t\t\tschema.appendChild(xsImport);\n\t\t\t\n\t\t\txsImport = doc.createElement( \"xs:import\" );\n\t\t\txsImport.setAttribute(\"namespace\", \"http://unicredit.eu/xmlns/CreditCode3/V1\");\n\t\t\txsImport.setAttribute(\"schemaLocation\", \"cmm_CreditCode3.xsd\");\n\t\t\tschema.appendChild(xsImport);\n\n\t\t\txsImport = doc.createElement( \"xs:import\" );\n\t\t\txsImport.setAttribute(\"namespace\", \"http://unicredit.eu/xmlns/CreditTechnicalForm/V1\");\n\t\t\txsImport.setAttribute(\"schemaLocation\", \"cmm_CreditTechnicalForm.xsd\");\n\t\t\tschema.appendChild(xsImport);\n\t\t\t\n\t\t\txsImport = doc.createElement( \"xs:import\" );\n\t\t\txsImport.setAttribute(\"namespace\", \"http://unicredit.eu/xmlns/PositiveAmount/V1\");\n\t\t\txsImport.setAttribute(\"schemaLocation\", \"cmm_PositiveAmount.xsd\");\n\t\t\tschema.appendChild(xsImport);\n\n\t\t\txsImport = doc.createElement( \"xs:import\" );\n\t\t\txsImport.setAttribute(\"namespace\", \"http://unicredit.eu/xmlns/ISODate/V1\");\n\t\t\txsImport.setAttribute(\"schemaLocation\", \"cmm_ISODate.xsd\");\n\t\t\tschema.appendChild(xsImport);\n\t\t\t\n\t\t\txsImport = doc.createElement( \"xs:import\" );\n\t\t\txsImport.setAttribute(\"namespace\", \"http://unicredit.eu/xmlns/ProductArrangementType/V1\");\n\t\t\txsImport.setAttribute(\"schemaLocation\", \"cmm_ProductArrangementType.xsd\");\n\t\t\tschema.appendChild(xsImport);\n\n\t\t\txsImport = doc.createElement( \"xs:import\" );\n\t\t\txsImport.setAttribute(\"namespace\", \"http://unicredit.eu/xmlns/CreditProposalIdentifier8/V1\");\n\t\t\txsImport.setAttribute(\"schemaLocation\", \"cmm_CreditProposalIdentifier8.xsd\");\n\t\t\tschema.appendChild(xsImport);\n\t\t\t\n\t\t\t\t\t\n\t\t\tdoc.appendChild(schema);\n\t\t\t\n\t\t\t\n\t\t\t// write the content into xml file\n \t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n \t\tTransformer transformer = transformerFactory.newTransformer();\n \t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\n \t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n \t\ttransformer.setOutputProperty(\n \t\t\t\t \"{http://xml.apache.org/xslt}indent-amount\", \"5\");\n \t\tDOMSource source = new DOMSource(doc);\n \t\tString fileOutput = \"result\\\\resultGroup.xsd\";\n \t\tStreamResult result = new StreamResult(new File( fileOutput ));\n\n \t\t// Output to console for testing\n \t\t// StreamResult result = new StreamResult(System.out);\n\n \t\ttransformer.transform(source, result);\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerConfigurationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void createTable(Database db, boolean ifNotExists) {\n String constraint = ifNotExists? \"IF NOT EXISTS \": \"\";\n db.execSQL(\"CREATE TABLE \" + constraint + \"\\\"GROUP_INFO_BEAN\\\" (\" + //\n \"\\\"GROUP_ID\\\" TEXT PRIMARY KEY NOT NULL ,\" + // 0: GroupID\n \"\\\"GROUP_NAME\\\" TEXT,\" + // 1: GroupName\n \"\\\"HEAD_ICON\\\" TEXT,\" + // 2: HeadIcon\n \"\\\"ALL_COUNT\\\" INTEGER NOT NULL ,\" + // 3: AllCount\n \"\\\"ON_LINE_COUNT\\\" INTEGER NOT NULL ,\" + // 4: OnLineCount\n \"\\\"USER_ID\\\" TEXT);\"); // 5: userId\n }", "BigInteger getReportGroup();", "@Override\r\n\tpublic int createTable() {\r\n\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"--This method returns an integer containing the number of rows\");\r\n\t\tSystem.out.println(\"--that were created.\");\r\n\r\n\t\tif (!doesGroupsTableExist()) {\r\n\t\t\tJOptionPane\r\n\t\t\t\t\t.showMessageDialog(null,\r\n\t\t\t\t\t\t\t\"Error: Table 'groups' does not exist! A new table will be created now.\");\r\n\r\n\t\t\t// Variable Declarations\r\n\t\t\tConnection conn = null;\r\n\t\t\tPreparedStatement stmt = null;\r\n\r\n\t\t\tint rows = 0;\r\n\r\n\t\t\ttry {\r\n\r\n\t\t\t\t// Connect to Database\r\n\t\t\t\tClass.forName(JDBC_DRIVER);\r\n\t\t\t\tconn = DriverManager.getConnection(DATABASE, USER, PASS);\r\n\r\n\t\t\t\t// Create SQL Statement\r\n\t\t\t\tString sql = \"CREATE TABLE IF NOT EXISTS groups\"\r\n\t\t\t\t\t\t+ \"('id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,\"\r\n\t\t\t\t\t\t+ \"'name' VARCHAR NOT NULL,\"\r\n\t\t\t\t\t\t+ \"'created' DATETIME NOT NULL,\"\r\n\t\t\t\t\t\t+ \"'modified' DATETIME)\";\r\n\r\n\t\t\t\tstmt = conn.prepareStatement(sql);\r\n\t\t\t\trows = stmt.executeUpdate();\r\n\r\n\t\t\t\t// Close Query and Database Connection\r\n\t\t\t\tstmt.close();\r\n\t\t\t\tconn.close();\r\n\r\n\t\t\t} catch (SQLException se) {\r\n\t\t\t\t// Handle Errors for JDBC\r\n\t\t\t\tse.printStackTrace();\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t\t// Handle Errors for Class\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t} finally {\r\n\r\n\t\t\t\t// Close Resources\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (stmt != null)\r\n\t\t\t\t\t\tstmt.close();\r\n\t\t\t\t} catch (SQLException se2) {\r\n\t\t\t\t\tse2.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (conn != null)\r\n\t\t\t\t\t\tconn.close();\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\tse.printStackTrace();\r\n\t\t\t\t} // End Finally Try/Catch\r\n\t\t\t} // End Try/Catch\r\n\r\n\t\t\treturn rows;\r\n\t\t} else {\r\n\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public void clickOnNewGroupButton()\n\t{\n\t\twaitForElement(newGroupButton);\n\t\tclickOn(newGroupButton);\n\t}", "Group getGroupById(String id);", "public void setGroupID(Long newGroupID)\n {\n this.groupID = newGroupID;\n }", "PlayerGroup createPlayerGroup();", "public static void createTable(Database db, boolean ifNotExists) {\n String constraint = ifNotExists? \"IF NOT EXISTS \": \"\";\n db.execSQL(\"CREATE TABLE \" + constraint + \"\\\"GROUP_INFO_ENTITY\\\" (\" + //\n \"\\\"_id\\\" INTEGER PRIMARY KEY AUTOINCREMENT ,\" + // 0: id\n \"\\\"GROUP_ID\\\" TEXT UNIQUE ,\" + // 1: groupId\n \"\\\"GROUP_NAME\\\" TEXT,\" + // 2: groupName\n \"\\\"GROUP_AVATA\\\" TEXT);\"); // 3: groupAvata\n }", "@Override\n public Group buildEntity(ResultSet resultSet) throws DAOExceptions {\n Group group = new Group();\n\n try{\n int id = resultSet.getInt(ID_COLUMN_LABEL);\n group.setId(id);\n\n int adminId = resultSet.getInt(ADMIN_ID_COLUMN_LABEL);\n group.setAdminId(adminId);\n\n String name = resultSet.getString(NAME__COLUMN_LABEL);\n group.setGroupName(name);\n\n Date dateCreate = resultSet.getDate(DATE_CREATED_COLUMN_LABEL);\n group.setDateCreated(dateCreate);\n\n String groupDescription = resultSet.getString(GROUP_DESCRIPTION_COLUMN_LABEL);\n group.setGroupDescription(groupDescription);\n }\n catch (SQLException exception){\n throw new DAOExceptions(exception.getMessage(), exception);\n }\n return group;\n }", "public boolean createGroup(GroupsGen group) {\n \n super.create(group);\n return true;\n }", "protected int createGroup() {\n\t\tint id = _motherGroupID + 1;\n\t\twhile (_soundNodes.containsKey(id)) { id++; }\n\t\tcreateGroup(id);\n\t\treturn id;\n\t}", "int insert(SeGroup record);", "ch.crif_online.www.webservices.crifsoapservice.v1_00.FinancialStatement insertNewFinancialStatementsGroup(int i);", "public void createGroupAssignedDocs(long parentGroupId, String allowedDocs ) throws PersistenceException {\n\t\tPreparedStatement preparedINSERTStatement;\n\t\t\n\t\t// get the connection\n\t\tConnection conn = openConnection();\n\t\t\n\t\n\t\t// create the query for user\n\t\t// create the query\n\t\tString insertQuery = \" INSERT INTO group_allowed_doctype_rel (\"\n\t\t\t\t+ \"parent_group_type_id, \"\n\t\t\t\t+ \"doc_type_ids \"\n\t\t\t\t+ \")\"\n\t\t + \" values (?,?)\";\n\t\t\n\t\t// execute the statement \n\t\t//\n\t\t// create the user data\n\t\ttry {\n\t\t\tpreparedINSERTStatement = conn\n\t\t\t .prepareStatement(insertQuery, Statement.RETURN_GENERATED_KEYS);\n\t\t\t\n\t\t\t// get the data\n\t\t\tlong parentStageId = parentGroupId;\n\t\t\tString allowedDocPermissions = allowedDocs;\n\t\t\t\n\t\t\t// execute the statement \n\t\t\tpreparedINSERTStatement.setLong(1, parentStageId);\n\t\t\tpreparedINSERTStatement.setString(2,allowedDocPermissions);\n\t\t\t\n\t\t\t\n\t\t\tpreparedINSERTStatement.executeUpdate();\n\t\t\tgetLog().debug(\"Creating Allowed Docs Stage Entry for Stage: \" + parentStageId);\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tgetLog().error(\"Error Creating new Allowed Doc for Stages: - \" + e);\n\t\t}\n\t\t\n\n\t\t// release the connection\n\t\tcloseConnection(conn);\n\t}", "public ScGridColumn<AcActionAutoCorrectedLog> newSourceGroupColumn()\n {\n return newSourceGroupColumn(\"Source Group\");\n }", "public FacetRequestGroup createGroup(String groupName) {\n FacetRequestGroup group = new FacetRequestGroup(\n groupName, order, reverse, locale, maxTags, minCount, offset, prefix,\n hierarchical, levels, delimiter, startPath);\n groups.add(group);\n return group;\n }", "protected int getTableGroup()\n\t\t{\n\t\t\treturn Group ;\n\t\t}", "@PostMapping(\"/skillgroups\")\n @Timed\n public ResponseEntity<Skillgroup> createSkillgroup(@RequestBody Skillgroup skillgroup) throws URISyntaxException {\n log.debug(\"REST request to save Skillgroup : {}\", skillgroup);\n if (skillgroup.getId() != null) {\n throw new BadRequestAlertException(\"A new skillgroup cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n Skillgroup result = skillgroupService.save(skillgroup);\n return ResponseEntity.created(new URI(\"/api/skillgroups/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "public void setGroupName(String newGroupName)\n {\n this.groupName = newGroupName;\n }", "public ArticleGroup(int id, String grn) {\n this(id, grn, new Vector<Article>());\n }", "private void group(String[] args){\n String name;\n \n switch(args[1]){\n case \"view\":\n this.checkArgs(args,2,2);\n ms.listGroups(this.groups);\n break;\n case \"add\":\n this.checkArgs(args,3,2);\n name = args[2];\n db.createGroup(name);\n break;\n case \"rm\":\n this.checkArgs(args,3,2);\n name = args[2];\n Group g = this.findGroup(name);\n if(g == null)\n ms.err(4);\n db.removeGroup(g);\n break;\n default:\n ms.err(3);\n break;\n }\n }", "@Transactional\n public synchronized GroupEntity createGroup(String groupName, GroupType groupType) {\n // create an admin principal to represent this group\n PrincipalTypeEntity principalTypeEntity = principalTypeDAO.findById(PrincipalTypeEntity.GROUP_PRINCIPAL_TYPE);\n if (principalTypeEntity == null) {\n principalTypeEntity = new PrincipalTypeEntity();\n principalTypeEntity.setId(PrincipalTypeEntity.GROUP_PRINCIPAL_TYPE);\n principalTypeEntity.setName(PrincipalTypeEntity.GROUP_PRINCIPAL_TYPE_NAME);\n principalTypeDAO.create(principalTypeEntity);\n }\n PrincipalEntity principalEntity = new PrincipalEntity();\n principalEntity.setPrincipalType(principalTypeEntity);\n principalDAO.create(principalEntity);\n\n final GroupEntity groupEntity = new GroupEntity();\n groupEntity.setGroupName(groupName);\n groupEntity.setPrincipal(principalEntity);\n groupEntity.setGroupType(groupType);\n\n groupDAO.create(groupEntity);\n return groupEntity;\n }", "private static void insertOneGroupEntry(Cursor groupCursor, ArrayList<GroupInfo> groupList, Context context) {\n String title = groupCursor.getString(COL_TITLE);\n String titleDisplay = \"\";\n titleDisplay = title;\n\n GroupInfo pinfo = new GroupInfo();\n pinfo.groupId = -1;\n pinfo.title = title;\n pinfo.titleDisplay = titleDisplay;\n groupList.add(pinfo);\n }", "public Group(Hashtable group) {\n\t\tisReadOnly = false;\n\t\tisSystemGroup = false;\n\t\t\n\t\tif (null == group) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tgroupIDs = new long[1];\n\t\tgroupNames = new String[1];\n\t\tgroupNetworks = new String[1];\n\t\t\n\t\t\n\t\tif (group.containsKey(KEY_GROUP_ID)) {\n\t\t\ttry {\n\t\t\t\tgroupIDs[0] = ((Long) group.get(KEY_GROUP_ID)).longValue();\n\t\t\t} catch (Exception e) {\n\t\t\t\t//#debug error\n\t\t\t\tSystem.out.println(\"Failed parsing group id\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (group.containsKey(KEY_GROUP_NAME)) {\n\t\t\ttry {\n\t\t\t\tgroupNames[0] = (String) group.get(KEY_GROUP_NAME);\n\t\t\t\t\n\t\t\t\t//#debug debug\n\t\t\t\tSystem.out.println(\"Added group \" + groupNames[0]);\n\t\t\t} catch (Exception e) {\n\t\t\t\t//#debug error\n\t\t\t\tSystem.out.println(\"Failed parsing group name\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (group.containsKey(KEY_READ_ONLY)) {\n\t\t\ttry {\n\t\t\t\tisReadOnly = \n\t\t\t\t\t((Boolean) group.get(KEY_READ_ONLY)).booleanValue();\n\t\t\t} catch (Exception e) {\n\t\t\t\t//#debug info\n\t\t\t\tSystem.out.println(\"Failed parsing read only\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (group.containsKey(KEY_SYSTEM_GROUP)) {\n\t\t\ttry {\n\t\t\t\tisSystemGroup = \n\t\t\t\t\t((Boolean) group.get(KEY_SYSTEM_GROUP)).booleanValue();\n\t\t\t\t//#debug debug\n\t\t\t\tSystem.out.println(\"isSystemGroup: \" + isSystemGroup);\n\t\t\t} catch (Exception e) {\n\t\t\t\t//#debug error\n\t\t\t\tSystem.out.println(\"Failed parsing system group\");\n\t\t\t}\n\t\t}\n\n\t\tif (group.containsKey(KEY_NETWORK)) {\n\t\t\ttry {\n\t\t\t\tgroupNetworks[0] = (String) group.get(KEY_NETWORK);\n\t\t\t\t//#debug debug\n\t\t\t\tSystem.out.println(\"Added group with network \" + groupNetworks[0]);\n\t\t\t} catch (Exception e) {\n\t\t\t\t//#debug error\n\t\t\t\tSystem.out.println(\"Failed parsing group network\");\n\t\t\t}\n\t\t}\n\n\t\t\n\t\t\n\t}", "public Group createOrganizationGroup(Group groupOrganization) throws Exception{\n\t\tPreparedStatement preparedINSERTstatement;\n\t\tlong returnId=0;\n\t\t\n\t\t// look up the user by name which should be unique\n\t\t//\n\t\t\n\t\t// get the connection\n\t\tConnection conn = openConnection();\n\t\t\n\t\t// \n\t\t// process the request\n\t\t\n\t\t// get first all the \n\t\t\n\t\t// create the statement to get all JOINS of the different tree elements\n\t\tString insertQuery = \" insert into group_data (\"\n\t\t\t\t+ \"name, \"\n\t\t\t\t+ \"description, \"\n\t\t\t\t+ \"group_data_type_id \"\n\t\t\t\t+ \")\"\n\t\t + \" values (?,?,?)\";\n\n\t\t// execute the statement \n\t\t//\n\t\t// create the user data\n\t\ttry {\n\t\t\tpreparedINSERTstatement = conn\n\t\t\t .prepareStatement(insertQuery, Statement.RETURN_GENERATED_KEYS);\n\t\t\t\n\t\t\t// get the data\n\t\t\tString groupOrganizationName = groupOrganization.getName();\n\t\t\tString groupOrganizationDescription = groupOrganization.getDescription();\n\t\t\tlong groupOrganizationTypeId = groupOrganization.getGroupType().getId();\n\t\t\t\n\t\t\t// execute the statement \n\t\t\tpreparedINSERTstatement.setString(1, groupOrganizationName);\n\t\t\tpreparedINSERTstatement.setString(2,groupOrganizationDescription);\n\t\t\tpreparedINSERTstatement.setLong(3,groupOrganizationTypeId);\n\t\t\t\n\t\t\t\n\t\t\tpreparedINSERTstatement.executeUpdate();\n\t\t\t\n\t\t\t// get the id of the created \n\t\t\tResultSet rs = preparedINSERTstatement.getGeneratedKeys();\n\t\t\tif (rs.next()){\n\t\t\t\treturnId=rs.getLong(1);\n\t\t\t\tgroupOrganization.setId(returnId);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// release the connection\n\t\tcloseConnection(conn);\n\t\t\t\t\n\t\t// return the result\n\t\treturn groupOrganization;\n\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tString groupname = txtGroupname.getText().toString();\n\t\t\tGroup group = new Group();\n\t\t\tgroup.setName(groupname);\n\t\t\tmClient.getTable(Group.class).insert(group, new TableOperationCallback<Group>(){\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onCompleted(final Group item, Exception exception,\n\t\t\t\t\t\tServiceFilterResponse service) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tif(exception == null){\n\t\t\t\t\t\tLog.e(\"Message (group)\", \"Add group successful\" + item.getGroupId());\n\t\t\t\t\t\tclearFields();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tDisasterPlanSample template = new DisasterPlanSample();\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(WorkItem i:template.getPlans()){\n\t\t\t\t\t\t\ti.setGroupId(item.getGroupId());\n\t\t\t\t\t\t\tmClient.getTable(WorkItem.class).insert(i, new TableOperationCallback<WorkItem>(){\n\t\t\t\t\t\t\t\tpublic void onCompleted(WorkItem work,Exception exception2,ServiceFilterResponse response2) {\n\t\t\t\t\t\t\t\t\tif(exception2==null){\n\t\t\t\t\t\t\t\t\t\tLog.e(\"Add Work Item\", \"Success\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tmember.setGroupId(item.getGroupId());\n\t\t\t\t\t\tmMemberTable = mClient.getTable(Member.class);\n\t\t\t\t\t\tmMemberTable.update(member, new TableOperationCallback<Member>(){\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onCompleted(Member member,\n\t\t\t\t\t\t\t\t\tException exception, ServiceFilterResponse service) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tif(exception==null){\n\t\t\t\t\t\t\t\t\tLog.e(\"Message Update\", \"Update is successful\");\n\t\t\t\t\t\t\t\t\tcreateDialog(\"Succesfully created group \" + item.getName()).show();\t\n\t\t\t\t\t\t\t\t\tIntent i = new Intent(getApplicationContext(),MenuActivity.class);\n\t\t\t\t\t\t\t\t\ti.putExtra(\"user\", member);\n\t\t\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLog.e(\"Message (group)\", \"Add group failed\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t}", "interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup<WithCreate> {\n }", "int insert(PolicyGroup record);", "@POST\n @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n public BlockConsistencyGroupRestRep createConsistencyGroup(\n final BlockConsistencyGroupCreate param) {\n checkForDuplicateName(param.getName(), BlockConsistencyGroup.class);\n\n // Validate name\n ArgValidator.checkFieldNotEmpty(param.getName(), \"name\");\n\n // Validate name not greater than 64 characters\n ArgValidator.checkFieldLengthMaximum(param.getName(), CG_MAX_LIMIT, \"name\");\n\n // Validate project\n ArgValidator.checkFieldUriType(param.getProject(), Project.class, \"project\");\n final Project project = _dbClient.queryObject(Project.class, param.getProject());\n ArgValidator\n .checkEntity(project, param.getProject(), isIdEmbeddedInURL(param.getProject()));\n // Verify the user is authorized.\n verifyUserIsAuthorizedForRequest(project);\n\n // Create Consistency Group in db\n final BlockConsistencyGroup consistencyGroup = new BlockConsistencyGroup();\n consistencyGroup.setId(URIUtil.createId(BlockConsistencyGroup.class));\n consistencyGroup.setLabel(param.getName());\n consistencyGroup.setProject(new NamedURI(project.getId(), project.getLabel()));\n consistencyGroup.setTenant(project.getTenantOrg());\n // disable array consistency if user has selected not to create backend replication group\n consistencyGroup.setArrayConsistency(param.getArrayConsistency());\n\n _dbClient.createObject(consistencyGroup);\n\n return map(consistencyGroup, null, _dbClient);\n\n }", "ConsumerGroup createConsumerGroup(String name) throws RegistrationException;", "public void addGroup(GroupUser group) {\n try {\n PreparedStatement s = sql.prepareStatement(\"INSERT INTO Groups (groupName, members) VALUES (?,?);\");\n s.setString(1, group.getId());\n\n s.setString(2, group.getMembers().toString());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "private void createGroupState(ConnectionGroup connectionGroup, String connectionEntityAddress, LocalDate modificationDate,\n Integer validityDuration) {\n energy.usef.core.model.Connection connection = connectionRepository.findOrCreate(connectionEntityAddress);\n\n // create new state\n ConnectionGroupState newConnectionGroupState = new ConnectionGroupState();\n newConnectionGroupState.setConnection(connection);\n newConnectionGroupState.setConnectionGroup(connectionGroup);\n newConnectionGroupState.setValidFrom(modificationDate);\n newConnectionGroupState.setValidUntil(modificationDate.plusDays(validityDuration));\n connectionGroupStateRepository.persist(newConnectionGroupState);\n }", "void setGroupName(String groupName) {\n this.groupName = new String(groupName);\n }", "public static RvRuleGroup createEntity(EntityManager em) {\n RvRuleGroup rvRuleGroup = new RvRuleGroup()\n .ruleGroupName(DEFAULT_RULE_GROUP_NAME);\n return rvRuleGroup;\n }", "private void _generateAResearchGroup(int index) {\n String id;\n id = _getId(CS_C_RESEARCHGROUP, index);\n if(globalVersionTrigger){\t \t \n \t writer_log.addPropertyInstance(id, RDF.type.getURI(), ontology+\"#ResearchGroup\", true);\t \t \t \t \n }\n writer_.startSection(CS_C_RESEARCHGROUP, id);\n writer_.addProperty(CS_P_SUBORGANIZATIONOF,\n _getId(CS_C_DEPT, instances_[CS_C_DEPT].count - 1), true);\n if(globalVersionTrigger){\t \t \n \t writer_log.addPropertyInstance(id, ontology+\"#subOrganizationOf\", _getId(CS_C_DEPT, instances_[CS_C_DEPT].count - 1), true);\t \t \t \t \n }\n writer_.endSection(CS_C_RESEARCHGROUP);\n }", "@Test\n public void testGroupFamilyLayoutWithNoReference() throws Exception {\n RowKeyFormat2 format = makeHashPrefixedRowKeyFormat();\n final TableLayoutDesc desc = TableLayoutDesc.newBuilder()\n .setName(\"table_name\")\n .setKeysFormat(format)\n .setVersion(TABLE_LAYOUT_VERSION)\n .setLocalityGroups(Lists.newArrayList(\n makeMinimalLocalityGroup()))\n .build();\n final FijiTableLayout layout = FijiTableLayout.newLayout(desc);\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout fLayout =\n layout.getFamilyMap().get(\"family_name\");\n assertNotNull(fLayout);\n assertTrue(fLayout.isGroupType());\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout.ColumnLayout cLayout =\n fLayout.getColumnMap().get(\"column_name\");\n assertNotNull(cLayout);\n assertEquals(cLayout, fLayout.getColumns().iterator().next());\n\n assertEquals(SchemaStorage.UID,\n layout.getCellFormat(FijiColumnName.create(\"family_name:column_name\")));\n assertEquals(Schema.Type.STRING,\n layout.getSchema(FijiColumnName.create(\"family_name:column_name\")).getType());\n }", "public NCDGroupDB(ConnectionInf db)\n {\n theConnectionInf = db;\n dbObj = new NCDGroup();\n initConfig();\n }", "private GroupPC buildFHIRGroupFromMatrixRoomEvent(JSONObject roomEvent)\r\n {\r\n LOG.debug(\".buildDefaultGroupElement() for Event --> \" + roomEvent);\r\n // Create the empty Pegacorn::FHIR::R4::Group entity.\r\n GroupPC theTargetGroup = new GroupPC();\r\n // Add the FHIR::Group.Identifier (type = FHIR::Identifier) Set\r\n theTargetGroup.addIdentifier(this.groupAttributeBuilders.buildGroupIdentifier(roomEvent.getString(\"room_id\")));\r\n // Set the group type --> PRACTITIONER (all our groups are based on Practitioners)\r\n theTargetGroup.setType(Group.GroupType.PRACTITIONER);\r\n // The group is active\r\n theTargetGroup.setActual(true);\r\n\r\n LOG.trace(\"buildGroupEntity(): Extracting -content- subfield set\");\r\n JSONObject roomCreateContent = roomEvent.getJSONObject(\"content\");\r\n\r\n switch (roomEvent.getString(\"type\")) {\r\n case \"m.room.create\":\r\n LOG.trace(\"buildGroupEntity(): Is a m.room.create event\");\r\n Reference roomManager = this.groupAttributeBuilders.buildGroupManagerReference(roomCreateContent);\r\n LOG.trace(\"buildGroupEntity(): Adding the Group Manager --> {} \", roomManager);\r\n theTargetGroup.setManagingEntity(roomManager);\r\n if (roomCreateContent.has(\"m.federate\")) {\r\n LOG.trace(\"buildGroupEntity(): Setting the Federated Flag Extension\");\r\n theTargetGroup.setFederationStatus(roomCreateContent.getBoolean(\"m.federate\"));\r\n }\r\n if (roomCreateContent.has(\"room_version\")) {\r\n LOG.trace(\"buildGroupEntity(): Setting the Room Version Extension\");\r\n theTargetGroup.setChatGroupVersion(roomCreateContent.getInt(\"room_version\"));\r\n }\r\n break;\r\n case \"m.room.join_rules\":\r\n LOG.trace(\"buildGroupEntity(): Is a m.room.join_rules event\");\r\n if (roomCreateContent.has(\"join_rule\")) {\r\n LOG.trace(\"buildGroupEntity(): Setting the Join Rule Extension\");\r\n switch (roomCreateContent.getString(\"join_rule\")) {\r\n case \"public\":\r\n LOG.trace(\"buildGroupEntity(): Setting Group -join_rule- to --> {}\", GroupJoinRuleStatusEnum.JOINRULE_STATUS_PUBLIC);\r\n theTargetGroup.setJoinRule(GroupJoinRuleStatusEnum.JOINRULE_STATUS_PUBLIC);\r\n break;\r\n case \"knock\":\r\n LOG.trace(\"buildGroupEntity(): Setting Group -join_rule- to --> {}\", GroupJoinRuleStatusEnum.JOINRULE_STATUS_KNOCK);\r\n theTargetGroup.setJoinRule(GroupJoinRuleStatusEnum.JOINRULE_STATUS_KNOCK);\r\n break;\r\n case \"invite\":\r\n LOG.trace(\"buildGroupEntity(): Setting Group -join_rule- to --> {}\", GroupJoinRuleStatusEnum.JOINRULE_STATUS_INVITE);\r\n theTargetGroup.setJoinRule(GroupJoinRuleStatusEnum.JOINRULE_STATUS_INVITE);\r\n break;\r\n case \"private\":\r\n default:\r\n LOG.trace(\"buildGroupEntity(): Setting Group -join_rule- to --> {}\", GroupJoinRuleStatusEnum.JOINRULE_STATUS_PRIVATE);\r\n theTargetGroup.setJoinRule(GroupJoinRuleStatusEnum.JOINRULE_STATUS_PRIVATE);\r\n break;\r\n }\r\n }\r\n break;\r\n case \"m.room.canonical_alias\":\r\n LOG.trace(\"buildGroupEntity(): Is a m.room.canonical_alias event\");\r\n if (roomCreateContent.has(\"alias\")) {\r\n LOG.trace(\"buildGroupEntity(): Adding {} as the Canonical Alias Extension + adding it as another Identifier\", roomCreateContent.get(\"alias\"));\r\n Identifier additionalIdentifier = this.groupAttributeBuilders.buildGroupIdentifier(roomCreateContent.getString(\"alias\"));\r\n theTargetGroup.addIdentifier(additionalIdentifier);\r\n theTargetGroup.setCanonicalAlias(additionalIdentifier);\r\n }\r\n break;\r\n case \"m.room.aliases\":\r\n LOG.trace(\"buildGroupEntity(): Is a m.room.aliases event\");\r\n if (roomCreateContent.has(\"aliases\")) {\r\n LOG.trace(\"buildGroupEntity(): Adding {} as the Alias to room (i.e. a new Identifier for each Alias) --> {}\", roomCreateContent.get(\"aliases\"));\r\n JSONArray aliasSet = roomCreateContent.getJSONArray(\"aliases\");\r\n LOG.trace(\"buildGroupEntity(): There are {} new aliases, now creating the Iterator\", aliasSet.length());\r\n Iterator aliasSetIterator = aliasSet.iterator();\r\n while (aliasSetIterator.hasNext()) {\r\n String newAlias = aliasSetIterator.next().toString();\r\n LOG.trace(\"buildGroupEntity(): Adding Alias --> {}\", newAlias);\r\n Identifier additionalIdentifier = this.groupAttributeBuilders.buildGroupIdentifier(newAlias);\r\n theTargetGroup.addIdentifier(additionalIdentifier);\r\n }\r\n }\r\n break;\r\n case \"m.room.member\":\r\n LOG.trace(\"buildGroupEntity(): is a m.room.member event\");\r\n Group.GroupMemberComponent newMembershipComponent = this.groupAttributeBuilders.buildMembershipComponent(roomEvent);\r\n theTargetGroup.addMember(newMembershipComponent);\r\n break;\r\n case \"m.room.redaction\":\r\n LOG.trace(\"buildGroupEntity(): is a m.room.redaction event\");\r\n LOG.debug(\"buildGroupEntity(): Exit, if the event is a m.room.redaction, we ignore it (so returning null)!\");\r\n return (null);\r\n case \"m.room.power_levels\":\r\n LOG.trace(\"buildGroupEntity(): is a m.room.power_levels event\");\r\n LOG.debug(\"buildGroupEntity(): Exit, if the event is a m.room.power_levels, we ignore it (so returning null)!\");\r\n return (null);\r\n default:\r\n LOG.trace(\"buildGroupEntity(): default for room event type, do nothing\");\r\n LOG.debug(\"buildGroupEntity(): Exit, if the event is not of interested, we ignore it (so returning null)!\");\r\n return (null);\r\n }\r\n LOG.debug(\".buildDefaultGroupElement(): Created Identifier --> \" + theTargetGroup.toString());\r\n return (theTargetGroup);\r\n }", "@Override\n public Class<JIssueGroupRecord> getRecordType() {\n return JIssueGroupRecord.class;\n }", "public UUID createGroup(Group group) throws JsonProcessingException, IOException, NdexException{\n\t\tJsonNode postData = objectMapper.valueToTree(group);\n\t\treturn ndexRestClient.createNdexObjectByPost(NdexApiVersion.v2 + \"/group\", postData);\n\t}", "private void createGroup(View view) {\r\n\r\n // Creates necessary elements of the dialog with input limit of length 30\r\n final int MAX_LENGTH = 30;\r\n AlertDialog.Builder dialogGroup = new AlertDialog.Builder(getActivity());\r\n dialogGroup.setTitle(\"Create group\");\r\n final EditText editGroupName = new EditText(getActivity());\r\n editGroupName.setHint(\"Group name\");\r\n editGroupName.setInputType(InputType.TYPE_TEXT_FLAG_CAP_WORDS);\r\n InputFilter[] FilterArray = new InputFilter[1];\r\n FilterArray[0] = new InputFilter.LengthFilter(MAX_LENGTH);\r\n editGroupName.setFilters(FilterArray);\r\n\r\n // Creates padding for the dialog (for aesthetic)\r\n final int AMOUNT_PADDING = 20;\r\n editGroupName.setSingleLine();\r\n FrameLayout container = new FrameLayout(getActivity());\r\n FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\r\n params.topMargin = convertDpToPx(AMOUNT_PADDING);\r\n params.bottomMargin = convertDpToPx(AMOUNT_PADDING);\r\n params.leftMargin = convertDpToPx(AMOUNT_PADDING);\r\n params.rightMargin = convertDpToPx(AMOUNT_PADDING);\r\n editGroupName.setLayoutParams(params);\r\n container.addView(editGroupName);\r\n\r\n dialogGroup.setView(container);\r\n\r\n // Create group in database if they click \"create\"\r\n dialogGroup.setPositiveButton(\"Create\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n groupName = editGroupName.getText().toString().trim();\r\n\r\n AsyncHttpClient client = new AsyncHttpClient();\r\n\r\n JSONObject group;\r\n StringEntity entity;\r\n try {\r\n group = new JSONObject();\r\n group.put(\"action\", \"create\");\r\n group.put(\"groupName\", groupName);\r\n group.put(\"owner\", currentUser);\r\n entity = new StringEntity(group.toString(), \"UTF-8\");\r\n }\r\n catch (JSONException e) {\r\n throw new IllegalArgumentException(\"unexpected error\", e);\r\n }\r\n\r\n client.post(getActivity().getApplicationContext(), myURL, entity, \"application/json\", new AsyncHttpResponseHandler() {\r\n @Override\r\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\r\n int duration = Toast.LENGTH_SHORT;\r\n CharSequence message = \"Success!\";\r\n Toast.makeText(getActivity().getApplicationContext(), message, duration).show();\r\n\r\n // Refresh page so that it updates when you create group\r\n FragmentTransaction ft = getFragmentManager().beginTransaction();\r\n ft.detach(GroupsFragment.this).attach(GroupsFragment.this).commit();\r\n }\r\n\r\n @Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\r\n int duration = Toast.LENGTH_SHORT;\r\n CharSequence text;\r\n\r\n if (statusCode == 400) {\r\n text = \"Invalid group\";\r\n }\r\n else {\r\n text = \"Error \" + statusCode + \": \" + error;\r\n }\r\n Toast.makeText(getActivity().getApplicationContext(), text, duration).show();\r\n }\r\n });\r\n }\r\n });\r\n\r\n dialogGroup.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.cancel();\r\n }\r\n });\r\n\r\n dialogGroup.show();\r\n }", "public ParticipationGroupData addParticipationGroupData(ParticipationGroupData group) \n { \n Connection con = null;\n PreparedStatement ps1 = null;\n PreparedStatement ps2 = null;\n Integer groupPk = null;\n \n try {\n \n con = DBUtil.getConnection();\n \n // insert into Participation_Cd_Group\n ps1 = con.prepareStatement(SQL_INSERT_PARTICIPATION_CD_GROUP);\n\n //set the values to insert\n ps1.setString(1, group.getName());\n DBUtil.setNullableVarchar(ps1, 2, group.getDescription());\n groupPk = DBUtil.insertAndGetIdentity(con, ps1);\n \n //if successful, set the pk\n group.setGroupPk(groupPk);\n \n // DEBUG\n if (logger.isDebugEnabled())\n logger.debug(\"Insert statement: [\" + SQL_INSERT_PARTICIPATION_CD_TYPE + \"] \");\n \n // insert the default Participation_Cd_Type for a new Group...\n ps2 = con.prepareStatement(SQL_INSERT_PARTICIPATION_CD_TYPE);\n\n ps2.setString(1, ParticipationTypeData.TYPE_GENERAL);\n ps2.setNull(2, Types.VARCHAR);\n ps2.setInt(3, groupPk.intValue());\n \n // insert into Participation_Cd_Type\n ps2.executeUpdate();\n \n } catch (SQLException e) {\n throw new EJBException(\"Error inserting participation group in MaintainParticipationGroupsBean.addParticipationGroupData()\", e);\n } finally {\n DBUtil.cleanup(null, ps1, null);\n DBUtil.cleanup(con, ps2, null);\n }\n \n //return the group data with new PK\n return group;\n }", "public final void rule__TableInstance__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:2679:1: ( rule__TableInstance__Group__0__Impl rule__TableInstance__Group__1 )\n // InternalBSQL2Java.g:2680:2: rule__TableInstance__Group__0__Impl rule__TableInstance__Group__1\n {\n pushFollow(FOLLOW_36);\n rule__TableInstance__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__TableInstance__Group__1();\n\n state._fsp--;\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 }", "Long insert(MessageGroup record);" ]
[ "0.61252534", "0.6073808", "0.59836304", "0.588585", "0.58202463", "0.5775224", "0.5765524", "0.57145476", "0.5710131", "0.5651284", "0.5596132", "0.5596132", "0.55160624", "0.5473704", "0.544555", "0.5438455", "0.5434325", "0.5408774", "0.539379", "0.5335958", "0.53281176", "0.53150064", "0.5311164", "0.5310286", "0.5301671", "0.5238891", "0.5235845", "0.52317065", "0.5219646", "0.5206601", "0.5199267", "0.51944864", "0.51871085", "0.5165517", "0.5132612", "0.51316446", "0.51312006", "0.50769866", "0.5067637", "0.5067332", "0.506408", "0.5063279", "0.50311923", "0.503108", "0.50154227", "0.5006183", "0.49938306", "0.4982568", "0.4977116", "0.4977116", "0.4977116", "0.4977116", "0.4977116", "0.4977116", "0.49714518", "0.49582452", "0.4956436", "0.49543774", "0.49491554", "0.49490273", "0.49485177", "0.49446285", "0.49425238", "0.49419442", "0.49314955", "0.49165663", "0.49082795", "0.49064666", "0.4894545", "0.4893308", "0.48898333", "0.48789224", "0.48717806", "0.48520905", "0.48489767", "0.48321587", "0.48293892", "0.48156765", "0.48136193", "0.4810033", "0.4808517", "0.4808146", "0.48067355", "0.48038164", "0.48027545", "0.48026899", "0.47999388", "0.47980392", "0.47954372", "0.47929958", "0.47911215", "0.47887313", "0.4788582", "0.4774483", "0.47655857", "0.47632426", "0.47618634", "0.4760326", "0.47575942", "0.47570792" ]
0.6311255
0
Create an aliased public.issue_group table reference
public JIssueGroup(String alias) { this(DSL.name(alias), ISSUE_GROUP); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GroupRefType createGroupRefType();", "public JIssueGroup(Name alias) {\n this(alias, ISSUE_GROUP);\n }", "public JIssueGroup() {\n this(DSL.name(\"issue_group\"), null);\n }", "GroupCell createGroupCell();", "public void setGroupTable(String name) throws BuildException {\n dbTable.setGroupTable(name);\n }", "ExprGroup createExprGroup();", "public ScGridColumn<AcActionAutoCorrectedLog> newSourceGroupColumn()\n {\n return newSourceGroupColumn(\"Source Group\");\n }", "GroupByColumnFull createGroupByColumnFull();", "public void allocateGroupId(){\n\t\trecords.add(new pair(this.groupname,currentId));\n\t\tthis.groupid = currentId;\n\t\tcurrentId++;\n\t\tConnection c = null;\n\t\tStatement stmt = null;\n\t\ttry{\n\t\t\tSystem.out.println(\"group setup\");\n\t\t\tSystem.out.println(this.groupid);\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\tc = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/ifoundclassmate\");\n\t\t\tc.setAutoCommit(false);\n\t\t\tstmt = c.createStatement();\n\t\t\tString sql = \"INSERT INTO GROUPS (GROUPID,GROUPNAME,DESCRIPTION) \"+\n\t\t\t\t\t\"VALUES (\" + this.groupid + \", \" + \"'\" +this.groupname + \"'\"\n\t\t\t\t\t+\" , \" + \"'\" + this.description + \"' \" + \");\" ;\n\t\t\tstmt.executeUpdate(sql);\n\t\t\t\n\t\t\tstmt.close();\n\t\t\tc.commit();\n\t\t\tc.close();\n\t\t} catch (Exception e ){\n\t\t\tSystem.out.println(e.getClass().getName() + e.getMessage() );\n\t\t\treturn;\n\t\t}\n\t\treturn;\n\t}", "public com.walgreens.rxit.ch.cda.StrucDocColgroup insertNewColgroup(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.StrucDocColgroup target = null;\n target = (com.walgreens.rxit.ch.cda.StrucDocColgroup)get_store().insert_element_user(COLGROUP$4, i);\n return target;\n }\n }", "ExpRunGroupMapTable createRunGroupMapTable(String name, UserSchema schema, ContainerFilter cf);", "HttpStatus createGroup(final String groupName);", "public com.walgreens.rxit.ch.cda.StrucDocColgroup addNewColgroup()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.StrucDocColgroup target = null;\n target = (com.walgreens.rxit.ch.cda.StrucDocColgroup)get_store().add_element_user(COLGROUP$4);\n return target;\n }\n }", "GroupType createGroupType();", "GroupType createGroupType();", "public String getGroupTable() {\n return dbTable.getGroupTable();\n }", "public void joinGroup(Group group) {\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS_GROUPS WHERE USER_ID=? AND GROUP_ID=?\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ResultSet rs = ps.executeQuery();\n if (rs.next()) return;\n\n ps = conn.prepareStatement(\"INSERT INTO USERS_GROUPS(USER_ID, GROUP_ID) VALUES(?, ?)\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "OrGroupByColumn createOrGroupByColumn();", "BigInteger getReportGroup();", "GroupsType createGroupsType();", "public UsersGroupsRecord() {\n\t\tsuper(org.kallithea.ldap.sync.jooq.tables.UsersGroups.USERS_GROUPS);\n\t}", "UserGroup createGroup(String companyId, String name, String groupLead);", "public void setGroupName(String newGroupName)\n {\n this.groupName = newGroupName;\n }", "void setGroupName(String groupName) {\n this.groupName = new String(groupName);\n }", "GroupQuery createQuery();", "void setGroupId(String groupId);", "@Test\n public void testGroupFamilyLayoutWithNoReference() throws Exception {\n RowKeyFormat2 format = makeHashPrefixedRowKeyFormat();\n final TableLayoutDesc desc = TableLayoutDesc.newBuilder()\n .setName(\"table_name\")\n .setKeysFormat(format)\n .setVersion(TABLE_LAYOUT_VERSION)\n .setLocalityGroups(Lists.newArrayList(\n makeMinimalLocalityGroup()))\n .build();\n final FijiTableLayout layout = FijiTableLayout.newLayout(desc);\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout fLayout =\n layout.getFamilyMap().get(\"family_name\");\n assertNotNull(fLayout);\n assertTrue(fLayout.isGroupType());\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout.ColumnLayout cLayout =\n fLayout.getColumnMap().get(\"column_name\");\n assertNotNull(cLayout);\n assertEquals(cLayout, fLayout.getColumns().iterator().next());\n\n assertEquals(SchemaStorage.UID,\n layout.getCellFormat(FijiColumnName.create(\"family_name:column_name\")));\n assertEquals(Schema.Type.STRING,\n layout.getSchema(FijiColumnName.create(\"family_name:column_name\")).getType());\n }", "@Test\n public void testIdAssignmentWithNoReference() throws Exception {\n RowKeyFormat2 format = makeHashPrefixedRowKeyFormat();\n // Reference layout with a single column: \"family_name:column_name\"\n final TableLayoutDesc desc = TableLayoutDesc.newBuilder()\n .setName(\"table_name\")\n .setKeysFormat(format)\n .setVersion(TABLE_LAYOUT_VERSION)\n .setLocalityGroups(Lists.newArrayList(\n LocalityGroupDesc.newBuilder()\n .setName(\"locality_group_name\")\n .setInMemory(false)\n .setTtlSeconds(84600)\n .setMaxVersions(1)\n .setCompressionType(CompressionType.GZ)\n .setFamilies(Lists.newArrayList(\n FamilyDesc.newBuilder()\n .setName(\"family_name\")\n .setColumns(Lists.newArrayList(\n ColumnDesc.newBuilder()\n .setName(\"column_name\")\n .setColumnSchema(CellSchema.newBuilder()\n .setStorage(SchemaStorage.UID)\n .setType(SchemaType.INLINE)\n .setValue(\"\\\"string\\\"\")\n .build())\n .build(),\n ColumnDesc.newBuilder()\n .setName(\"column2_name\")\n .setColumnSchema(CellSchema.newBuilder()\n .setStorage(SchemaStorage.UID)\n .setType(SchemaType.INLINE)\n .setValue(\"\\\"bytes\\\"\")\n .build())\n .build()\n ))\n .build(),\n FamilyDesc.newBuilder()\n .setName(\"family2_name\")\n .setMapSchema(CellSchema.newBuilder()\n .setStorage(SchemaStorage.FINAL)\n .setType(SchemaType.COUNTER)\n .build())\n .build()\n ))\n .build(),\n LocalityGroupDesc.newBuilder()\n .setName(\"locality_group2_name\")\n .setInMemory(false)\n .setTtlSeconds(84600)\n .setMaxVersions(1)\n .setCompressionType(CompressionType.GZ)\n .setFamilies(Lists.newArrayList(\n FamilyDesc.newBuilder()\n .setName(\"family3_name\")\n .setMapSchema(CellSchema.newBuilder()\n .setStorage(SchemaStorage.FINAL)\n .setType(SchemaType.COUNTER)\n .build())\n .build()\n ))\n .build()\n ))\n .build();\n\n final FijiTableLayout layout = FijiTableLayout.newLayout(desc);\n final FijiTableLayout.LocalityGroupLayout lgLayout =\n layout.getLocalityGroupMap().get(\"locality_group_name\");\n assertEquals(1, lgLayout.getId().getId());\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout fLayout =\n lgLayout.getFamilyMap().get(\"family_name\");\n assertEquals(1, fLayout.getId().getId());\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout.ColumnLayout cLayout =\n fLayout.getColumnMap().get(\"column_name\");\n assertEquals(1, cLayout.getId().getId());\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout.ColumnLayout c2Layout =\n fLayout.getColumnMap().get(\"column2_name\");\n assertEquals(2, c2Layout.getId().getId());\n\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout f2Layout =\n lgLayout.getFamilyMap().get(\"family2_name\");\n assertEquals(2, f2Layout.getId().getId());\n\n final FijiTableLayout.LocalityGroupLayout lg2Layout =\n layout.getLocalityGroupMap().get(\"locality_group2_name\");\n assertEquals(2, lg2Layout.getId().getId());\n }", "public interface GroupReference extends ComplexExtensionDefinition,\n SequenceDefinition, ComplexTypeDefinition, SchemaComponent {\n public static final String REF_PROPERTY = \"ref\";\n public static final String MAX_OCCURS_PROPERTY = \"maxOccurs\";\n public static final String MIN_OCCURS_PROPERTY = \"minOccurs\";\n\n String getMaxOccurs();\n void setMaxOccurs(String max);\n String getMaxOccursDefault();\n String getMaxOccursEffective();\n \n Integer getMinOccurs();\n void setMinOccurs(Integer min);\n int getMinOccursDefault();\n int getMinOccursEffective();\n \n NamedComponentReference<GlobalGroup> getRef();\n void setRef(NamedComponentReference<GlobalGroup> def);\n}", "GroupQueryBuilder setName(String name);", "protected void setTableGroup(int num)\n\t\t{\n\t\t\tGroup = num ;\n\t\t}", "public void setGroupId(String newValue);", "@Override\n\tpublic LinkGroup create(long linkgroupId) {\n\t\tLinkGroup linkGroup = new LinkGroupImpl();\n\n\t\tlinkGroup.setNew(true);\n\t\tlinkGroup.setPrimaryKey(linkgroupId);\n\n\t\tlinkGroup.setCompanyId(companyProvider.getCompanyId());\n\n\t\treturn linkGroup;\n\t}", "private void CreateNewGroup(String group, String current_uid, String push_id) {\n\n mDatabaseInfo = FirebaseDatabase.getInstance().getReference().child(\"Groups\").child(current_uid).child(push_id).child(\"groupinfo\");\n\n HashMap<String, String> userMap = new HashMap<>();\n userMap.put(\"name\", group);\n userMap.put(\"admin\", current_uid);\n userMap.put(\"groupid\", push_id);\n mDatabaseInfo.setValue(userMap);\n\n mDatabaseMember = FirebaseDatabase.getInstance().getReference().child(\"Groups\").child(current_uid).child(push_id).child(\"member\").child(current_uid);\n\n HashMap<String, String> adminMap = new HashMap<>();\n adminMap.put(\"seen\", \"false\");\n mDatabaseMember.setValue(adminMap);\n }", "public String createHrefForGroup(final String name) {\n\t\treturn this.groupUrlPrefix + name;\n\t}", "protected abstract Group createIface ();", "private GroupBinding compile (Schema.Group origin)\n throws BlinkException\n {\n \n for (Schema.Group g = origin; g != null; g = g.getSuperGroup ())\n {\n GroupBinding b = createGroupBinding (g, origin);\n if (b != null)\n return b;\n }\n\n unboundByName.put (origin.getName (), origin);\n unboundByTid.put (getCompactTid (origin), origin);\n\n return null;\n }", "public Relation group(ArrayList<String> params, ArrayList<String> aggregates, ArrayList<String> groupBy){\n Relation table = new Relation();\n\n // Create columns for new table\n for(int i = 0; i < params.size(); i++){\n Col c = getColumnByName(params.get(i));\n\n String name = params.get(i);\n\n if(!aggregates.get(i).isEmpty()){\n name += \"-\" + aggregates.get(i);\n }\n\n table.insertColumn(new Col(name, c.getType(), c.getMaxLength(), c.getDecimalsAllowed(), false));\n }\n\n if(groupBy.size() == 1 && groupBy.get(0).charAt(0) == '('){\n\n Relation r = select(params, EMPTY_LIST, EMPTY_LIST);\n ArrayList<String> values = new ArrayList<>();\n\n for(int i = 0; i < params.size(); i++){\n\n if(aggregates.get(i).isEmpty()){\n values.add(r.getColumnByName(params.get(i)).getRec(0).getLastEntry().getData());\n }\n else{\n if(aggregates.get(i).equals(\"avg\")){\n values.add(Double.toString(r.average(params.get(i))));\n }\n else if(aggregates.get(i).equals(\"count\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Integer.toString(r.count(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"sum\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.sum(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"min\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.min(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"max\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.max(p, c, a)));\n\n }\n else{\n System.out.println(\"Relation.group: Unexpected scenerio occurred\");\n System.exit(2);\n }\n }\n\n }\n\n table.insert(values);\n values.clear();\n\n return table;\n }\n\n //Get distinct group values\n HashSet<String> distinct = new HashSet<>();\n HashMap<String, Relation> tables = new HashMap<>();\n Relation temp = new Relation();\n\n ArrayList<Col> columns = new ArrayList<>();\n for(String group : groupBy){\n columns.add(getColumnByName(group));\n temp.insertColumn(getColumnByName(group));\n }\n\n for(int i = 0; i < columns.get(0).size(); i++){\n ArrayList<Rec> rec = temp.getRecordsByRowIndex(i);\n String groups = \"\";\n\n for(Rec value : rec){\n groups += value.getLastEntry().getData() + \",\";\n }\n\n groups = groups.substring(0, groups.length()-1);\n\n distinct.add(groups);\n }\n\n /*Col col = getColumnByName(groupBy);\n for(Rec rec : col.getRecs()){\n distinct.add(rec.getLastEntry().getData());\n }*/\n\n for(String d : distinct) {\n\n ArrayList<String> p = new ArrayList<>();\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int i = 0; i < split.length; i++) {\n c.add(groupBy.get(i) + \" = \" + split[i]);\n }\n\n for(int i = 1; i < split.length; i++){\n a.add(\"AND\");\n }\n\n Relation r = this.select(p, c, a);\n tables.put(d, r);\n }\n\n for(String d : distinct){\n\n Relation r = tables.get(d);\n ArrayList<String> values = new ArrayList<>();\n\n for(int i = 0; i < params.size(); i++){\n\n if(aggregates.get(i).isEmpty()){\n values.add(r.getColumnByName(params.get(i)).getRec(0).getLastEntry().getData());\n }\n else{\n if(aggregates.get(i).equals(\"avg\")){\n values.add(Double.toString(r.average(params.get(i))));\n }\n else if(aggregates.get(i).equals(\"count\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int j = 0; j < split.length; j++) {\n c.add(groupBy.get(j) + \" = \" + split[j]);\n }\n\n for(int j = 1; j < split.length; j++){\n a.add(\"AND\");\n }\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Integer.toString(r.count(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"sum\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int j = 0; j < split.length; j++) {\n c.add(groupBy.get(j) + \" = \" + split[j]);\n }\n\n for(int j = 1; j < split.length; j++){\n a.add(\"AND\");\n }\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.sum(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"min\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int j = 0; j < split.length; j++) {\n c.add(groupBy.get(j) + \" = \" + split[j]);\n }\n\n for(int j = 1; j < split.length; j++){\n a.add(\"AND\");\n }\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.min(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"max\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int j = 0; j < split.length; j++) {\n c.add(groupBy.get(j) + \" = \" + split[j]);\n }\n\n for(int j = 1; j < split.length; j++){\n a.add(\"AND\");\n }\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.max(p, c, a)));\n\n }\n else{\n System.out.println(\"Relation.group: Unexpected scenerio occurred\");\n System.exit(2);\n }\n }\n\n }\n\n table.insert(values);\n values.clear();\n\n }\n\n return table;\n\n }", "private GroupBinding createGroupBinding (Schema.Group g, Class<?> tgtType,\n Schema.Group origin)\n throws BlinkException\n {\n ArrayList<Field> bindingFields = new ArrayList<Field> ();\n GroupBinding b = new GroupBindingImpl (origin, tgtType, bindingFields);\n grpBndByName.put (origin.getName (), b);\n grpBndByClass.put (tgtType, b);\n\n long tid = b.getCompactTypeId ();\n if (grpBndByTid.containsKey (tid))\n {\n addAmbiguousTypeIdError (origin, tid);\n grpBndByTid.remove (tid);\n }\n else\n {\n if (! conflictByTid.containsKey (tid))\n grpBndByTid.put (tid, b);\n }\n\n HashMap<String, Method> allMethods = new HashMap<String, Method> ();\n getAllMethods (tgtType, allMethods);\n mapFields (g, allMethods, bindingFields);\n return b;\n }", "ContactGroup createUnresolvedContactGroup(String groupUID, String persistentData, ContactGroup parentGroup);", "public void createGroup(String group_name){\r\n\t\t/* \r\n\t\t * Create a new entry in group database using the information\r\n\t\t * given by the parameters\r\n\t\t */\r\n\t\tSQLiteDatabase db = this.getWritableDatabase();\r\n \tContentValues values = new ContentValues();\r\n \t\r\n\t\tvalues.put(DBHelper.COLUMN_GROUPNAME, group_name);\r\n\t\t\r\n\t\tdb.insert(DBHelper.GROUP_TABLE_NAME, null, values);\r\n\t\tdb.close();\r\n\t}", "private String buildWalkerGroup(WalkerGroup group, PersistentContext context) {\n final StringBuilder xml = new StringBuilder();\n xml.append(\"<walker_group>\\n\");\n xml.append(tab(walkerBuilder.buildWalker(group, context)));\n xml.append(\"\\t<walker_group_name>\").append(escape(group.getName())).append(\"</walker_group_name>\\n\");\n for (final DiagramWalker walker : group.getDiagramWalkerList()) {\n final String nodeId = context.walkerMap.get(((ERVirtualTable) walker).getRawTable());\n xml.append(\"\\t<diagram_walker>\").append(nodeId).append(\"</diagram_walker>\\n\");\n }\n xml.append(\"</walker_group>\\n\");\n return xml.toString();\n }", "@Override\n public Group buildEntity(ResultSet resultSet) throws DAOExceptions {\n Group group = new Group();\n\n try{\n int id = resultSet.getInt(ID_COLUMN_LABEL);\n group.setId(id);\n\n int adminId = resultSet.getInt(ADMIN_ID_COLUMN_LABEL);\n group.setAdminId(adminId);\n\n String name = resultSet.getString(NAME__COLUMN_LABEL);\n group.setGroupName(name);\n\n Date dateCreate = resultSet.getDate(DATE_CREATED_COLUMN_LABEL);\n group.setDateCreated(dateCreate);\n\n String groupDescription = resultSet.getString(GROUP_DESCRIPTION_COLUMN_LABEL);\n group.setGroupDescription(groupDescription);\n }\n catch (SQLException exception){\n throw new DAOExceptions(exception.getMessage(), exception);\n }\n return group;\n }", "private void newGroup()\n\t{\n\t\t// There is no need anymore to take care of the meta-data.\n\t\t// That is done once in DenormaliserMeta.getFields()\n\t\t//\n data.targetResult = new Object[meta.getDenormaliserTargetFields().length];\n \n for (int i=0;i<meta.getDenormaliserTargetFields().length;i++)\n {\n data.targetResult[i] = null;\n\n data.counters[i]=0L; // set to 0\n data.sum[i]=null;\n }\n\t}", "public boolean createGroups(int assignmentToGroup, int otherAssignment,\n String repoPrefix) {\n \ttry{\n\n\t\t}catch (Exception se){\n\t\t\t\tSystem.err.println(\"SQL Exception.\" +\n\t\t\t\t\t\t\"<Message>: \" + se.getMessage());\n\t\t}\n // Replace this return statement with an implementation of this method!\n return false;\n }", "public void setDefgrp_name(CArrayFacade<Byte> defgrp_name) throws IOException\n\t{\n\t\tlong __dna__offset;\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__dna__offset = 128;\n\t\t} else {\n\t\t\t__dna__offset = 108;\n\t\t}\n\t\tif (__io__equals(defgrp_name, __io__address + __dna__offset)) {\n\t\t\treturn;\n\t\t} else if (__io__same__encoding(this, defgrp_name)) {\n\t\t\t__io__native__copy(__io__block, __io__address + __dna__offset, defgrp_name);\n\t\t} else {\n\t\t\t__io__generic__copy( getDefgrp_name(), defgrp_name);\n\t\t}\n\t}", "UserGroup createGroup(String companyId, String name);", "private GroupParticipationTable() {\n }", "protected int getTableGroup()\n\t\t{\n\t\t\treturn Group ;\n\t\t}", "public void setGroup(entity.Group value);", "private String formatGroupName (String groupName) {\n\t\treturn groupName;\n\t}", "public final void rule__UniformReference__Group__1() 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:7177:1: ( rule__UniformReference__Group__1__Impl )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7178:2: rule__UniformReference__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__UniformReference__Group__1__Impl_in_rule__UniformReference__Group__114074);\n rule__UniformReference__Group__1__Impl();\n\n state._fsp--;\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 TblrefCityGroupRecord() {\n super(TblrefCityGroup.TBLREF_CITY_GROUP);\n }", "public AggregateLayout(String aggrGroup) {\r\n super(aggrGroup);\r\n }", "private List<Expression<?>> constructGroupBy(CriteriaBuilderImpl cb, AbstractQuery<?> q, Tree groupByDef) {\n \t\tfinal List<Expression<?>> groupBy = Lists.newArrayList();\n \n \t\tfor (int i = 0; i < groupByDef.getChildCount(); i++) {\n \t\t\tgroupBy.add(this.getExpression(cb, q, groupByDef.getChild(i), null));\n \t\t}\n \n \t\treturn groupBy;\n \t}", "public void addGroup(String groupName) throws UnsupportedOperationException;", "static String getAlterArtifactInstancesAddAccountIdConstraintTemplate() {\n // Each \"%s\" will be replaced with the relevant TYPE_instances table name.\n return \"ALTER TABLE %s\"\n + \" ADD CONSTRAINT account_id_fk foreign key (account_id) references accounts(id)\";\n }", "@NotNull\n private static List<TableLabel> generateLabelsForGroup(final List<EditedStyleItem> source, final List<EditedStyleItem> sink) {\n Multimap<String, EditedStyleItem> classes =\n Multimaps.newListMultimap(new TreeMap<String, Collection<EditedStyleItem>>(), new Supplier<List<EditedStyleItem>>() {\n @Override\n public List<EditedStyleItem> get() {\n return new ArrayList<EditedStyleItem>();\n }\n });\n for (EditedStyleItem item : source){\n String group = item.getAttrGroup();\n classes.put(group, item);\n }\n\n final List<TableLabel> labels = new ArrayList<TableLabel>();\n int offset = 0;\n sink.clear();\n for (String group : classes.keySet()) {\n final int size = classes.get(group).size();\n sink.addAll(classes.get(group));\n if (size != 0) {\n labels.add(new TableLabel(group, offset));\n }\n offset += size;\n }\n return labels;\n }", "public static final String getAuthCollabOverKWTableCreationSQL(String shortname) {\r\n\t\tString crTopicTableSQL = \"CREATE TABLE IF NOT EXISTS dblp_authcollabkw_\" +shortname +\r\n\t\t\"(keyword varchar(255) NOT NULL, \" + \r\n\t\t\"author varchar(70) NOT NULL, \" + \r\n\t\t\" collabauth varchar(70) NOT NULL, \" +\r\n\t\t\"collabcnt int NOT NULL\" +\r\n\t\t\" ) \";\r\n\t\treturn crTopicTableSQL;\r\n\t}", "public void newGroup() {\n addGroup(null, true);\n }", "public void setGroupID(Long newGroupID)\n {\n this.groupID = newGroupID;\n }", "Group getGroupById(String id);", "@Override\n\tpublic String getGroup() {\n\t\treturn \"Group_\"+SliceName(stdClass);\n\t}", "public static void execute(ColumnRef sourceRef, int nrGroups,\n\t\t\tColumnRef groupRef, ColumnRef targetRef) throws Exception {\n\t\t// Get information about source column\n\t\tString srcRel = sourceRef.aliasName;\n\t\tSQLtype srcType = CatalogManager.getColumn(sourceRef).type;\n\t\tint srcCard = CatalogManager.getCardinality(srcRel);\n\t\tColumnData srcData = BufferManager.getData(sourceRef);\n\t\t// Create row to group assignments\n\t\tboolean grouping = groupRef != null;\n\t\tint[] groups = grouping?((IntData)\n\t\t\t\tBufferManager.getData(groupRef)).data:\n\t\t\t\t\tnew int[srcCard];\n\t\t// Generate target column\n\t\tint targetCard = grouping ? nrGroups:1;\n\t\tColumnData genericTarget = null;\n\t\tIntData intTarget = null;\n\t\tLongData longTarget = null;\n\t\tDoubleData doubleTarget = null;\n\t\tswitch (srcType) {\n\t\tcase INT:\n\t\t\tintTarget = new IntData(targetCard);\n\t\t\tgenericTarget = intTarget;\n\t\t\tBufferManager.colToData.put(targetRef, intTarget);\n\t\t\tbreak;\n\t\tcase LONG:\n\t\t\tlongTarget = new LongData(targetCard);\n\t\t\tgenericTarget = longTarget;\n\t\t\tBufferManager.colToData.put(targetRef, longTarget);\n\t\t\tbreak;\n\t\tcase DOUBLE:\n\t\t\tdoubleTarget = new DoubleData(targetCard);\n\t\t\tgenericTarget = doubleTarget;\n\t\t\tBufferManager.colToData.put(targetRef, doubleTarget);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new Exception(\"Error - no sum over \" + \n\t\t\t\t\tsrcType + \" allowed\");\n\t\t}\n\t\t// Register target column in catalog\n\t\tString targetRel = targetRef.aliasName;\n\t\tString targetCol = targetRef.columnName;\n\t\tTableInfo targetRelInfo = CatalogManager.\n\t\t\t\tcurrentDB.nameToTable.get(targetRel);\n\t\tColumnInfo targetColInfo = new ColumnInfo(targetCol, \n\t\t\t\tsrcType, false, false, false, false);\n\t\ttargetRelInfo.addColumn(targetColInfo);\n\t\t// Update catalog statistics on result table\n\t\tCatalogManager.updateStats(targetRel);\n\t\t// Set target values to null\n\t\tfor (int row=0; row<targetCard; ++row) {\n\t\t\tgenericTarget.isNull.set(row);\n\t\t}\n\t\t// Switch according to column type (to avoid casts)\n\t\tswitch (srcType) {\n\t\tcase INT:\n\t\t{\n\t\t\tIntData intSrc = (IntData)srcData;\n\t\t\t// Iterate over input column\n\t\t\tfor (int row=0; row<srcCard; ++row) {\n\t\t\t\t// Check for null values\n\t\t\t\tif (!srcData.isNull.get(row)) {\n\t\t\t\t\tint group = groups[row];\n\t\t\t\t\tgenericTarget.isNull.set(group, false);\n\t\t\t\t\tintTarget.data[group] += intSrc.data[row];\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\tbreak;\n\t\tcase LONG:\n\t\t\tLongData longSrc = (LongData)srcData;\n\t\t\t// Iterate over input column\n\t\t\tfor (int row=0; row<srcCard; ++row) {\n\t\t\t\t// Check for null values\n\t\t\t\tif (!srcData.isNull.get(row)) {\n\t\t\t\t\tint group = groups[row];\n\t\t\t\t\tgenericTarget.isNull.set(group, false);\n\t\t\t\t\tlongTarget.data[group] += longSrc.data[row];\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\tbreak;\n\t\tcase DOUBLE:\n\t\t\tDoubleData doubleSrc = (DoubleData)srcData;\n\t\t\t// Iterate over input column\n\t\t\tfor (int row=0; row<srcCard; ++row) {\n\t\t\t\t// Check for null values\n\t\t\t\tif (!srcData.isNull.get(row)) {\n\t\t\t\t\tint group = groups[row];\n\t\t\t\t\tgenericTarget.isNull.set(group, false);\n\t\t\t\t\tdoubleTarget.data[group] += doubleSrc.data[row];\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new Exception(\"Unsupported type: \" + srcType);\n\t\t}\n\t}", "GroupQueryBuilder reset();", "public static RvRuleGroup createEntity(EntityManager em) {\n RvRuleGroup rvRuleGroup = new RvRuleGroup()\n .ruleGroupName(DEFAULT_RULE_GROUP_NAME);\n return rvRuleGroup;\n }", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "private static String walGroupIdToKey(int grpId, boolean local) {\n if (local)\n return WAL_LOCAL_KEY_PREFIX + grpId;\n else\n return WAL_GLOBAL_KEY_PREFIX + grpId;\n }", "@Override\n public void modify( MemoryGroupByMeta someMeta ) {\n someMeta.allocate( 5, 5 );\n }", "public final void rule__Reference__Group__1() 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:2771:1: ( rule__Reference__Group__1__Impl )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2772:2: rule__Reference__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__Reference__Group__1__Impl_in_rule__Reference__Group__15461);\n rule__Reference__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public static String specifyGroup() {\n return holder.format(\"specifyGroup\");\n }", "public Group createGroup(Group group) throws RepositoryAccessException {\r\n Connection conn = null;\r\n try {\r\n conn = openTransaction();\r\n GroupProxy proxy = new GroupProxy(conn);\r\n proxy.createGroup(group);\r\n conn.commit();\r\n } catch (Exception ex) {\r\n rollback(conn);\r\n String msg = \"Could not create group.\" + ex.getMessage();\r\n \r\n LogService.logWarn(msg, LOGGER);\r\n throw new RepositoryAccessException(msg, ex);\r\n } finally {\r\n close(conn);\r\n }\r\n \r\n return group;\r\n }", "public void addGroup(SymbolGroup group) {\n this.groups.add(group);\n group.setProject(this);\n }", "OperandListGroup createOperandListGroup();", "ID create(NewRoamingGroup group);", "public void setGroup (String columnName)\n\t{\n\t\tsetGroup(getColumnIndex(columnName));\n\t}", "GroupId groupId();", "public void setGroup(String column, int num)\n\t{\n\t\t//#CM708946\n\t\t// Disregard it when the key which does not exist in Effective is specified. \n\t\tKey Eky = getKey(column) ;\n\t\tif (Eky == null)\n\t\t\treturn ;\n\n\t\tEky.setTableGroup(num) ;\n\t\tsetGroupKey(Eky) ;\n\t}", "GroupQueryBuilder setNameAndType(String name, String type);", "protected abstract FlowRule.Builder setDefaultTableIdForFlowObjective(Builder ruleBuilder);", "public abstract String getDefaultGroup();", "public void setGroupcode(java.lang.Integer newGroup) {\n\tgroupcode = newGroup;\n}", "public String defineNameGroups(int[] idGroups) {\n int counter = 0;\n String result = \"\";\n for (Group group : listGroups) {\n for (int id : idGroups) {\n if (id == group.getId()) {\n result += counter + \") \" + group.getName() + \"\\n\";\n counter++;\n }\n }\n }\n return result;\n }", "public final void rule__Tab__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1590:1: ( ( '[' ) )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1591:1: ( '[' )\n {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1591:1: ( '[' )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1592:1: '['\n {\n before(grammarAccess.getTabAccess().getLeftSquareBracketKeyword_1()); \n match(input,24,FOLLOW_24_in_rule__Tab__Group__1__Impl3158); \n after(grammarAccess.getTabAccess().getLeftSquareBracketKeyword_1()); \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 String getGroupName();", "public void setGroupname(java.lang.String newGroupname) {\n\tgroupname = newGroupname;\n}", "private void _generateAResearchGroup(int index) {\n String id;\n id = _getId(CS_C_RESEARCHGROUP, index);\n if(globalVersionTrigger){\t \t \n \t writer_log.addPropertyInstance(id, RDF.type.getURI(), ontology+\"#ResearchGroup\", true);\t \t \t \t \n }\n writer_.startSection(CS_C_RESEARCHGROUP, id);\n writer_.addProperty(CS_P_SUBORGANIZATIONOF,\n _getId(CS_C_DEPT, instances_[CS_C_DEPT].count - 1), true);\n if(globalVersionTrigger){\t \t \n \t writer_log.addPropertyInstance(id, ontology+\"#subOrganizationOf\", _getId(CS_C_DEPT, instances_[CS_C_DEPT].count - 1), true);\t \t \t \t \n }\n writer_.endSection(CS_C_RESEARCHGROUP);\n }", "@Test\n public void testLayoutWithNoReference() throws Exception {\n RowKeyFormat2 format = makeHashPrefixedRowKeyFormat();\n final TableLayoutDesc desc = TableLayoutDesc.newBuilder()\n .setName(\"table_name\")\n .setKeysFormat(format)\n .setVersion(TABLE_LAYOUT_VERSION)\n .setLocalityGroups(Lists.newArrayList(\n LocalityGroupDesc.newBuilder()\n .setName(\"locality_group_name\")\n .setInMemory(false)\n .setTtlSeconds(84600)\n .setMaxVersions(1)\n .setCompressionType(CompressionType.GZ)\n .build()))\n .build();\n final FijiTableLayout layout = FijiTableLayout.newLayout(desc);\n final FijiTableLayout.LocalityGroupLayout lgLayout =\n layout.getLocalityGroupMap().get(\"locality_group_name\");\n assertNotNull(lgLayout);\n assertEquals(1, layout.getLocalityGroups().size());\n assertEquals(lgLayout, layout.getLocalityGroups().iterator().next());\n assertTrue(lgLayout.getName().equals(\"locality_group_name\"));\n assertTrue(lgLayout.getFamilies().isEmpty());\n assertTrue(layout.getFamilies().isEmpty());\n assertTrue(layout.getFamilyMap().isEmpty());\n }", "public final void rule__Database__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1461:1: ( ( '[' ) )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1462:1: ( '[' )\n {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1462:1: ( '[' )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1463:1: '['\n {\n before(grammarAccess.getDatabaseAccess().getLeftSquareBracketKeyword_1()); \n match(input,24,FOLLOW_24_in_rule__Database__Group__1__Impl2908); \n after(grammarAccess.getDatabaseAccess().getLeftSquareBracketKeyword_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private IColumnGroup getMaterialColumnGroup(TypedTableModelBuilder<WellContent> builder,\n IEntityProperty materialProperty)\n {\n return builder.columnGroup(WellSearchGridColumnIds\n .getWellMaterialColumnGroupPrefix(materialProperty));\n }", "public org.dhis2.ns.schema.dxf2.IndicatorGroupDocument.IndicatorGroup addNewIndicatorGroup()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.dhis2.ns.schema.dxf2.IndicatorGroupDocument.IndicatorGroup target = null;\n target = (org.dhis2.ns.schema.dxf2.IndicatorGroupDocument.IndicatorGroup)get_store().add_element_user(INDICATORGROUP$0);\n return target;\n }\n }", "public ShapeGroupShape(drawit.shapegroups1.ShapeGroup group) {\n this.referencedShapeGroup = group;\n }", "void add(R group);", "java.lang.String getGroupId();", "java.lang.String getGroupId();" ]
[ "0.57484174", "0.5690282", "0.5627831", "0.55854034", "0.55520785", "0.554511", "0.5268504", "0.52354777", "0.51054686", "0.4973432", "0.49726218", "0.49364522", "0.48586476", "0.485327", "0.485327", "0.48269066", "0.48108566", "0.4807659", "0.4766543", "0.4755757", "0.4747429", "0.47226083", "0.47176704", "0.47077549", "0.4692318", "0.46909425", "0.46899998", "0.46722332", "0.46690294", "0.46611658", "0.46528336", "0.4649449", "0.4644641", "0.46409875", "0.46388465", "0.46309802", "0.46253723", "0.46111172", "0.45985004", "0.45905542", "0.45538926", "0.45523745", "0.45473674", "0.4540307", "0.45303994", "0.45251063", "0.4509014", "0.45029318", "0.4488387", "0.4473564", "0.44725928", "0.44722438", "0.44624445", "0.44588634", "0.44560787", "0.4453465", "0.444957", "0.44469535", "0.44426486", "0.4440174", "0.44142312", "0.44135654", "0.44072846", "0.44015282", "0.43962792", "0.43898985", "0.4381277", "0.4381277", "0.4381277", "0.4381277", "0.4381277", "0.4381277", "0.43782043", "0.43679532", "0.43649027", "0.43629178", "0.4359904", "0.43563816", "0.4346914", "0.43354908", "0.4324113", "0.43156308", "0.43106017", "0.4299839", "0.4298182", "0.42867002", "0.4277051", "0.42755663", "0.42747337", "0.4268636", "0.4263042", "0.42564598", "0.42553237", "0.42508617", "0.42414826", "0.42343962", "0.42253295", "0.42230955", "0.4217352", "0.4217352" ]
0.58015984
0
Create an aliased public.issue_group table reference
public JIssueGroup(Name alias) { this(alias, ISSUE_GROUP); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JIssueGroup(String alias) {\n this(DSL.name(alias), ISSUE_GROUP);\n }", "GroupRefType createGroupRefType();", "public JIssueGroup() {\n this(DSL.name(\"issue_group\"), null);\n }", "GroupCell createGroupCell();", "public void setGroupTable(String name) throws BuildException {\n dbTable.setGroupTable(name);\n }", "ExprGroup createExprGroup();", "public ScGridColumn<AcActionAutoCorrectedLog> newSourceGroupColumn()\n {\n return newSourceGroupColumn(\"Source Group\");\n }", "GroupByColumnFull createGroupByColumnFull();", "public void allocateGroupId(){\n\t\trecords.add(new pair(this.groupname,currentId));\n\t\tthis.groupid = currentId;\n\t\tcurrentId++;\n\t\tConnection c = null;\n\t\tStatement stmt = null;\n\t\ttry{\n\t\t\tSystem.out.println(\"group setup\");\n\t\t\tSystem.out.println(this.groupid);\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\tc = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/ifoundclassmate\");\n\t\t\tc.setAutoCommit(false);\n\t\t\tstmt = c.createStatement();\n\t\t\tString sql = \"INSERT INTO GROUPS (GROUPID,GROUPNAME,DESCRIPTION) \"+\n\t\t\t\t\t\"VALUES (\" + this.groupid + \", \" + \"'\" +this.groupname + \"'\"\n\t\t\t\t\t+\" , \" + \"'\" + this.description + \"' \" + \");\" ;\n\t\t\tstmt.executeUpdate(sql);\n\t\t\t\n\t\t\tstmt.close();\n\t\t\tc.commit();\n\t\t\tc.close();\n\t\t} catch (Exception e ){\n\t\t\tSystem.out.println(e.getClass().getName() + e.getMessage() );\n\t\t\treturn;\n\t\t}\n\t\treturn;\n\t}", "public com.walgreens.rxit.ch.cda.StrucDocColgroup insertNewColgroup(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.StrucDocColgroup target = null;\n target = (com.walgreens.rxit.ch.cda.StrucDocColgroup)get_store().insert_element_user(COLGROUP$4, i);\n return target;\n }\n }", "ExpRunGroupMapTable createRunGroupMapTable(String name, UserSchema schema, ContainerFilter cf);", "HttpStatus createGroup(final String groupName);", "public com.walgreens.rxit.ch.cda.StrucDocColgroup addNewColgroup()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.StrucDocColgroup target = null;\n target = (com.walgreens.rxit.ch.cda.StrucDocColgroup)get_store().add_element_user(COLGROUP$4);\n return target;\n }\n }", "GroupType createGroupType();", "GroupType createGroupType();", "public String getGroupTable() {\n return dbTable.getGroupTable();\n }", "public void joinGroup(Group group) {\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS_GROUPS WHERE USER_ID=? AND GROUP_ID=?\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ResultSet rs = ps.executeQuery();\n if (rs.next()) return;\n\n ps = conn.prepareStatement(\"INSERT INTO USERS_GROUPS(USER_ID, GROUP_ID) VALUES(?, ?)\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "OrGroupByColumn createOrGroupByColumn();", "BigInteger getReportGroup();", "GroupsType createGroupsType();", "public UsersGroupsRecord() {\n\t\tsuper(org.kallithea.ldap.sync.jooq.tables.UsersGroups.USERS_GROUPS);\n\t}", "UserGroup createGroup(String companyId, String name, String groupLead);", "public void setGroupName(String newGroupName)\n {\n this.groupName = newGroupName;\n }", "void setGroupName(String groupName) {\n this.groupName = new String(groupName);\n }", "GroupQuery createQuery();", "void setGroupId(String groupId);", "@Test\n public void testGroupFamilyLayoutWithNoReference() throws Exception {\n RowKeyFormat2 format = makeHashPrefixedRowKeyFormat();\n final TableLayoutDesc desc = TableLayoutDesc.newBuilder()\n .setName(\"table_name\")\n .setKeysFormat(format)\n .setVersion(TABLE_LAYOUT_VERSION)\n .setLocalityGroups(Lists.newArrayList(\n makeMinimalLocalityGroup()))\n .build();\n final FijiTableLayout layout = FijiTableLayout.newLayout(desc);\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout fLayout =\n layout.getFamilyMap().get(\"family_name\");\n assertNotNull(fLayout);\n assertTrue(fLayout.isGroupType());\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout.ColumnLayout cLayout =\n fLayout.getColumnMap().get(\"column_name\");\n assertNotNull(cLayout);\n assertEquals(cLayout, fLayout.getColumns().iterator().next());\n\n assertEquals(SchemaStorage.UID,\n layout.getCellFormat(FijiColumnName.create(\"family_name:column_name\")));\n assertEquals(Schema.Type.STRING,\n layout.getSchema(FijiColumnName.create(\"family_name:column_name\")).getType());\n }", "@Test\n public void testIdAssignmentWithNoReference() throws Exception {\n RowKeyFormat2 format = makeHashPrefixedRowKeyFormat();\n // Reference layout with a single column: \"family_name:column_name\"\n final TableLayoutDesc desc = TableLayoutDesc.newBuilder()\n .setName(\"table_name\")\n .setKeysFormat(format)\n .setVersion(TABLE_LAYOUT_VERSION)\n .setLocalityGroups(Lists.newArrayList(\n LocalityGroupDesc.newBuilder()\n .setName(\"locality_group_name\")\n .setInMemory(false)\n .setTtlSeconds(84600)\n .setMaxVersions(1)\n .setCompressionType(CompressionType.GZ)\n .setFamilies(Lists.newArrayList(\n FamilyDesc.newBuilder()\n .setName(\"family_name\")\n .setColumns(Lists.newArrayList(\n ColumnDesc.newBuilder()\n .setName(\"column_name\")\n .setColumnSchema(CellSchema.newBuilder()\n .setStorage(SchemaStorage.UID)\n .setType(SchemaType.INLINE)\n .setValue(\"\\\"string\\\"\")\n .build())\n .build(),\n ColumnDesc.newBuilder()\n .setName(\"column2_name\")\n .setColumnSchema(CellSchema.newBuilder()\n .setStorage(SchemaStorage.UID)\n .setType(SchemaType.INLINE)\n .setValue(\"\\\"bytes\\\"\")\n .build())\n .build()\n ))\n .build(),\n FamilyDesc.newBuilder()\n .setName(\"family2_name\")\n .setMapSchema(CellSchema.newBuilder()\n .setStorage(SchemaStorage.FINAL)\n .setType(SchemaType.COUNTER)\n .build())\n .build()\n ))\n .build(),\n LocalityGroupDesc.newBuilder()\n .setName(\"locality_group2_name\")\n .setInMemory(false)\n .setTtlSeconds(84600)\n .setMaxVersions(1)\n .setCompressionType(CompressionType.GZ)\n .setFamilies(Lists.newArrayList(\n FamilyDesc.newBuilder()\n .setName(\"family3_name\")\n .setMapSchema(CellSchema.newBuilder()\n .setStorage(SchemaStorage.FINAL)\n .setType(SchemaType.COUNTER)\n .build())\n .build()\n ))\n .build()\n ))\n .build();\n\n final FijiTableLayout layout = FijiTableLayout.newLayout(desc);\n final FijiTableLayout.LocalityGroupLayout lgLayout =\n layout.getLocalityGroupMap().get(\"locality_group_name\");\n assertEquals(1, lgLayout.getId().getId());\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout fLayout =\n lgLayout.getFamilyMap().get(\"family_name\");\n assertEquals(1, fLayout.getId().getId());\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout.ColumnLayout cLayout =\n fLayout.getColumnMap().get(\"column_name\");\n assertEquals(1, cLayout.getId().getId());\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout.ColumnLayout c2Layout =\n fLayout.getColumnMap().get(\"column2_name\");\n assertEquals(2, c2Layout.getId().getId());\n\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout f2Layout =\n lgLayout.getFamilyMap().get(\"family2_name\");\n assertEquals(2, f2Layout.getId().getId());\n\n final FijiTableLayout.LocalityGroupLayout lg2Layout =\n layout.getLocalityGroupMap().get(\"locality_group2_name\");\n assertEquals(2, lg2Layout.getId().getId());\n }", "public interface GroupReference extends ComplexExtensionDefinition,\n SequenceDefinition, ComplexTypeDefinition, SchemaComponent {\n public static final String REF_PROPERTY = \"ref\";\n public static final String MAX_OCCURS_PROPERTY = \"maxOccurs\";\n public static final String MIN_OCCURS_PROPERTY = \"minOccurs\";\n\n String getMaxOccurs();\n void setMaxOccurs(String max);\n String getMaxOccursDefault();\n String getMaxOccursEffective();\n \n Integer getMinOccurs();\n void setMinOccurs(Integer min);\n int getMinOccursDefault();\n int getMinOccursEffective();\n \n NamedComponentReference<GlobalGroup> getRef();\n void setRef(NamedComponentReference<GlobalGroup> def);\n}", "GroupQueryBuilder setName(String name);", "protected void setTableGroup(int num)\n\t\t{\n\t\t\tGroup = num ;\n\t\t}", "public void setGroupId(String newValue);", "@Override\n\tpublic LinkGroup create(long linkgroupId) {\n\t\tLinkGroup linkGroup = new LinkGroupImpl();\n\n\t\tlinkGroup.setNew(true);\n\t\tlinkGroup.setPrimaryKey(linkgroupId);\n\n\t\tlinkGroup.setCompanyId(companyProvider.getCompanyId());\n\n\t\treturn linkGroup;\n\t}", "private void CreateNewGroup(String group, String current_uid, String push_id) {\n\n mDatabaseInfo = FirebaseDatabase.getInstance().getReference().child(\"Groups\").child(current_uid).child(push_id).child(\"groupinfo\");\n\n HashMap<String, String> userMap = new HashMap<>();\n userMap.put(\"name\", group);\n userMap.put(\"admin\", current_uid);\n userMap.put(\"groupid\", push_id);\n mDatabaseInfo.setValue(userMap);\n\n mDatabaseMember = FirebaseDatabase.getInstance().getReference().child(\"Groups\").child(current_uid).child(push_id).child(\"member\").child(current_uid);\n\n HashMap<String, String> adminMap = new HashMap<>();\n adminMap.put(\"seen\", \"false\");\n mDatabaseMember.setValue(adminMap);\n }", "public String createHrefForGroup(final String name) {\n\t\treturn this.groupUrlPrefix + name;\n\t}", "protected abstract Group createIface ();", "private GroupBinding compile (Schema.Group origin)\n throws BlinkException\n {\n \n for (Schema.Group g = origin; g != null; g = g.getSuperGroup ())\n {\n GroupBinding b = createGroupBinding (g, origin);\n if (b != null)\n return b;\n }\n\n unboundByName.put (origin.getName (), origin);\n unboundByTid.put (getCompactTid (origin), origin);\n\n return null;\n }", "public Relation group(ArrayList<String> params, ArrayList<String> aggregates, ArrayList<String> groupBy){\n Relation table = new Relation();\n\n // Create columns for new table\n for(int i = 0; i < params.size(); i++){\n Col c = getColumnByName(params.get(i));\n\n String name = params.get(i);\n\n if(!aggregates.get(i).isEmpty()){\n name += \"-\" + aggregates.get(i);\n }\n\n table.insertColumn(new Col(name, c.getType(), c.getMaxLength(), c.getDecimalsAllowed(), false));\n }\n\n if(groupBy.size() == 1 && groupBy.get(0).charAt(0) == '('){\n\n Relation r = select(params, EMPTY_LIST, EMPTY_LIST);\n ArrayList<String> values = new ArrayList<>();\n\n for(int i = 0; i < params.size(); i++){\n\n if(aggregates.get(i).isEmpty()){\n values.add(r.getColumnByName(params.get(i)).getRec(0).getLastEntry().getData());\n }\n else{\n if(aggregates.get(i).equals(\"avg\")){\n values.add(Double.toString(r.average(params.get(i))));\n }\n else if(aggregates.get(i).equals(\"count\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Integer.toString(r.count(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"sum\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.sum(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"min\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.min(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"max\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.max(p, c, a)));\n\n }\n else{\n System.out.println(\"Relation.group: Unexpected scenerio occurred\");\n System.exit(2);\n }\n }\n\n }\n\n table.insert(values);\n values.clear();\n\n return table;\n }\n\n //Get distinct group values\n HashSet<String> distinct = new HashSet<>();\n HashMap<String, Relation> tables = new HashMap<>();\n Relation temp = new Relation();\n\n ArrayList<Col> columns = new ArrayList<>();\n for(String group : groupBy){\n columns.add(getColumnByName(group));\n temp.insertColumn(getColumnByName(group));\n }\n\n for(int i = 0; i < columns.get(0).size(); i++){\n ArrayList<Rec> rec = temp.getRecordsByRowIndex(i);\n String groups = \"\";\n\n for(Rec value : rec){\n groups += value.getLastEntry().getData() + \",\";\n }\n\n groups = groups.substring(0, groups.length()-1);\n\n distinct.add(groups);\n }\n\n /*Col col = getColumnByName(groupBy);\n for(Rec rec : col.getRecs()){\n distinct.add(rec.getLastEntry().getData());\n }*/\n\n for(String d : distinct) {\n\n ArrayList<String> p = new ArrayList<>();\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int i = 0; i < split.length; i++) {\n c.add(groupBy.get(i) + \" = \" + split[i]);\n }\n\n for(int i = 1; i < split.length; i++){\n a.add(\"AND\");\n }\n\n Relation r = this.select(p, c, a);\n tables.put(d, r);\n }\n\n for(String d : distinct){\n\n Relation r = tables.get(d);\n ArrayList<String> values = new ArrayList<>();\n\n for(int i = 0; i < params.size(); i++){\n\n if(aggregates.get(i).isEmpty()){\n values.add(r.getColumnByName(params.get(i)).getRec(0).getLastEntry().getData());\n }\n else{\n if(aggregates.get(i).equals(\"avg\")){\n values.add(Double.toString(r.average(params.get(i))));\n }\n else if(aggregates.get(i).equals(\"count\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int j = 0; j < split.length; j++) {\n c.add(groupBy.get(j) + \" = \" + split[j]);\n }\n\n for(int j = 1; j < split.length; j++){\n a.add(\"AND\");\n }\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Integer.toString(r.count(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"sum\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int j = 0; j < split.length; j++) {\n c.add(groupBy.get(j) + \" = \" + split[j]);\n }\n\n for(int j = 1; j < split.length; j++){\n a.add(\"AND\");\n }\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.sum(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"min\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int j = 0; j < split.length; j++) {\n c.add(groupBy.get(j) + \" = \" + split[j]);\n }\n\n for(int j = 1; j < split.length; j++){\n a.add(\"AND\");\n }\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.min(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"max\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int j = 0; j < split.length; j++) {\n c.add(groupBy.get(j) + \" = \" + split[j]);\n }\n\n for(int j = 1; j < split.length; j++){\n a.add(\"AND\");\n }\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.max(p, c, a)));\n\n }\n else{\n System.out.println(\"Relation.group: Unexpected scenerio occurred\");\n System.exit(2);\n }\n }\n\n }\n\n table.insert(values);\n values.clear();\n\n }\n\n return table;\n\n }", "private GroupBinding createGroupBinding (Schema.Group g, Class<?> tgtType,\n Schema.Group origin)\n throws BlinkException\n {\n ArrayList<Field> bindingFields = new ArrayList<Field> ();\n GroupBinding b = new GroupBindingImpl (origin, tgtType, bindingFields);\n grpBndByName.put (origin.getName (), b);\n grpBndByClass.put (tgtType, b);\n\n long tid = b.getCompactTypeId ();\n if (grpBndByTid.containsKey (tid))\n {\n addAmbiguousTypeIdError (origin, tid);\n grpBndByTid.remove (tid);\n }\n else\n {\n if (! conflictByTid.containsKey (tid))\n grpBndByTid.put (tid, b);\n }\n\n HashMap<String, Method> allMethods = new HashMap<String, Method> ();\n getAllMethods (tgtType, allMethods);\n mapFields (g, allMethods, bindingFields);\n return b;\n }", "ContactGroup createUnresolvedContactGroup(String groupUID, String persistentData, ContactGroup parentGroup);", "public void createGroup(String group_name){\r\n\t\t/* \r\n\t\t * Create a new entry in group database using the information\r\n\t\t * given by the parameters\r\n\t\t */\r\n\t\tSQLiteDatabase db = this.getWritableDatabase();\r\n \tContentValues values = new ContentValues();\r\n \t\r\n\t\tvalues.put(DBHelper.COLUMN_GROUPNAME, group_name);\r\n\t\t\r\n\t\tdb.insert(DBHelper.GROUP_TABLE_NAME, null, values);\r\n\t\tdb.close();\r\n\t}", "private String buildWalkerGroup(WalkerGroup group, PersistentContext context) {\n final StringBuilder xml = new StringBuilder();\n xml.append(\"<walker_group>\\n\");\n xml.append(tab(walkerBuilder.buildWalker(group, context)));\n xml.append(\"\\t<walker_group_name>\").append(escape(group.getName())).append(\"</walker_group_name>\\n\");\n for (final DiagramWalker walker : group.getDiagramWalkerList()) {\n final String nodeId = context.walkerMap.get(((ERVirtualTable) walker).getRawTable());\n xml.append(\"\\t<diagram_walker>\").append(nodeId).append(\"</diagram_walker>\\n\");\n }\n xml.append(\"</walker_group>\\n\");\n return xml.toString();\n }", "@Override\n public Group buildEntity(ResultSet resultSet) throws DAOExceptions {\n Group group = new Group();\n\n try{\n int id = resultSet.getInt(ID_COLUMN_LABEL);\n group.setId(id);\n\n int adminId = resultSet.getInt(ADMIN_ID_COLUMN_LABEL);\n group.setAdminId(adminId);\n\n String name = resultSet.getString(NAME__COLUMN_LABEL);\n group.setGroupName(name);\n\n Date dateCreate = resultSet.getDate(DATE_CREATED_COLUMN_LABEL);\n group.setDateCreated(dateCreate);\n\n String groupDescription = resultSet.getString(GROUP_DESCRIPTION_COLUMN_LABEL);\n group.setGroupDescription(groupDescription);\n }\n catch (SQLException exception){\n throw new DAOExceptions(exception.getMessage(), exception);\n }\n return group;\n }", "private void newGroup()\n\t{\n\t\t// There is no need anymore to take care of the meta-data.\n\t\t// That is done once in DenormaliserMeta.getFields()\n\t\t//\n data.targetResult = new Object[meta.getDenormaliserTargetFields().length];\n \n for (int i=0;i<meta.getDenormaliserTargetFields().length;i++)\n {\n data.targetResult[i] = null;\n\n data.counters[i]=0L; // set to 0\n data.sum[i]=null;\n }\n\t}", "public boolean createGroups(int assignmentToGroup, int otherAssignment,\n String repoPrefix) {\n \ttry{\n\n\t\t}catch (Exception se){\n\t\t\t\tSystem.err.println(\"SQL Exception.\" +\n\t\t\t\t\t\t\"<Message>: \" + se.getMessage());\n\t\t}\n // Replace this return statement with an implementation of this method!\n return false;\n }", "public void setDefgrp_name(CArrayFacade<Byte> defgrp_name) throws IOException\n\t{\n\t\tlong __dna__offset;\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__dna__offset = 128;\n\t\t} else {\n\t\t\t__dna__offset = 108;\n\t\t}\n\t\tif (__io__equals(defgrp_name, __io__address + __dna__offset)) {\n\t\t\treturn;\n\t\t} else if (__io__same__encoding(this, defgrp_name)) {\n\t\t\t__io__native__copy(__io__block, __io__address + __dna__offset, defgrp_name);\n\t\t} else {\n\t\t\t__io__generic__copy( getDefgrp_name(), defgrp_name);\n\t\t}\n\t}", "UserGroup createGroup(String companyId, String name);", "private GroupParticipationTable() {\n }", "protected int getTableGroup()\n\t\t{\n\t\t\treturn Group ;\n\t\t}", "public void setGroup(entity.Group value);", "private String formatGroupName (String groupName) {\n\t\treturn groupName;\n\t}", "public final void rule__UniformReference__Group__1() 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:7177:1: ( rule__UniformReference__Group__1__Impl )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7178:2: rule__UniformReference__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__UniformReference__Group__1__Impl_in_rule__UniformReference__Group__114074);\n rule__UniformReference__Group__1__Impl();\n\n state._fsp--;\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 TblrefCityGroupRecord() {\n super(TblrefCityGroup.TBLREF_CITY_GROUP);\n }", "public AggregateLayout(String aggrGroup) {\r\n super(aggrGroup);\r\n }", "private List<Expression<?>> constructGroupBy(CriteriaBuilderImpl cb, AbstractQuery<?> q, Tree groupByDef) {\n \t\tfinal List<Expression<?>> groupBy = Lists.newArrayList();\n \n \t\tfor (int i = 0; i < groupByDef.getChildCount(); i++) {\n \t\t\tgroupBy.add(this.getExpression(cb, q, groupByDef.getChild(i), null));\n \t\t}\n \n \t\treturn groupBy;\n \t}", "public void addGroup(String groupName) throws UnsupportedOperationException;", "static String getAlterArtifactInstancesAddAccountIdConstraintTemplate() {\n // Each \"%s\" will be replaced with the relevant TYPE_instances table name.\n return \"ALTER TABLE %s\"\n + \" ADD CONSTRAINT account_id_fk foreign key (account_id) references accounts(id)\";\n }", "@NotNull\n private static List<TableLabel> generateLabelsForGroup(final List<EditedStyleItem> source, final List<EditedStyleItem> sink) {\n Multimap<String, EditedStyleItem> classes =\n Multimaps.newListMultimap(new TreeMap<String, Collection<EditedStyleItem>>(), new Supplier<List<EditedStyleItem>>() {\n @Override\n public List<EditedStyleItem> get() {\n return new ArrayList<EditedStyleItem>();\n }\n });\n for (EditedStyleItem item : source){\n String group = item.getAttrGroup();\n classes.put(group, item);\n }\n\n final List<TableLabel> labels = new ArrayList<TableLabel>();\n int offset = 0;\n sink.clear();\n for (String group : classes.keySet()) {\n final int size = classes.get(group).size();\n sink.addAll(classes.get(group));\n if (size != 0) {\n labels.add(new TableLabel(group, offset));\n }\n offset += size;\n }\n return labels;\n }", "public static final String getAuthCollabOverKWTableCreationSQL(String shortname) {\r\n\t\tString crTopicTableSQL = \"CREATE TABLE IF NOT EXISTS dblp_authcollabkw_\" +shortname +\r\n\t\t\"(keyword varchar(255) NOT NULL, \" + \r\n\t\t\"author varchar(70) NOT NULL, \" + \r\n\t\t\" collabauth varchar(70) NOT NULL, \" +\r\n\t\t\"collabcnt int NOT NULL\" +\r\n\t\t\" ) \";\r\n\t\treturn crTopicTableSQL;\r\n\t}", "public void newGroup() {\n addGroup(null, true);\n }", "public void setGroupID(Long newGroupID)\n {\n this.groupID = newGroupID;\n }", "Group getGroupById(String id);", "@Override\n\tpublic String getGroup() {\n\t\treturn \"Group_\"+SliceName(stdClass);\n\t}", "public static void execute(ColumnRef sourceRef, int nrGroups,\n\t\t\tColumnRef groupRef, ColumnRef targetRef) throws Exception {\n\t\t// Get information about source column\n\t\tString srcRel = sourceRef.aliasName;\n\t\tSQLtype srcType = CatalogManager.getColumn(sourceRef).type;\n\t\tint srcCard = CatalogManager.getCardinality(srcRel);\n\t\tColumnData srcData = BufferManager.getData(sourceRef);\n\t\t// Create row to group assignments\n\t\tboolean grouping = groupRef != null;\n\t\tint[] groups = grouping?((IntData)\n\t\t\t\tBufferManager.getData(groupRef)).data:\n\t\t\t\t\tnew int[srcCard];\n\t\t// Generate target column\n\t\tint targetCard = grouping ? nrGroups:1;\n\t\tColumnData genericTarget = null;\n\t\tIntData intTarget = null;\n\t\tLongData longTarget = null;\n\t\tDoubleData doubleTarget = null;\n\t\tswitch (srcType) {\n\t\tcase INT:\n\t\t\tintTarget = new IntData(targetCard);\n\t\t\tgenericTarget = intTarget;\n\t\t\tBufferManager.colToData.put(targetRef, intTarget);\n\t\t\tbreak;\n\t\tcase LONG:\n\t\t\tlongTarget = new LongData(targetCard);\n\t\t\tgenericTarget = longTarget;\n\t\t\tBufferManager.colToData.put(targetRef, longTarget);\n\t\t\tbreak;\n\t\tcase DOUBLE:\n\t\t\tdoubleTarget = new DoubleData(targetCard);\n\t\t\tgenericTarget = doubleTarget;\n\t\t\tBufferManager.colToData.put(targetRef, doubleTarget);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new Exception(\"Error - no sum over \" + \n\t\t\t\t\tsrcType + \" allowed\");\n\t\t}\n\t\t// Register target column in catalog\n\t\tString targetRel = targetRef.aliasName;\n\t\tString targetCol = targetRef.columnName;\n\t\tTableInfo targetRelInfo = CatalogManager.\n\t\t\t\tcurrentDB.nameToTable.get(targetRel);\n\t\tColumnInfo targetColInfo = new ColumnInfo(targetCol, \n\t\t\t\tsrcType, false, false, false, false);\n\t\ttargetRelInfo.addColumn(targetColInfo);\n\t\t// Update catalog statistics on result table\n\t\tCatalogManager.updateStats(targetRel);\n\t\t// Set target values to null\n\t\tfor (int row=0; row<targetCard; ++row) {\n\t\t\tgenericTarget.isNull.set(row);\n\t\t}\n\t\t// Switch according to column type (to avoid casts)\n\t\tswitch (srcType) {\n\t\tcase INT:\n\t\t{\n\t\t\tIntData intSrc = (IntData)srcData;\n\t\t\t// Iterate over input column\n\t\t\tfor (int row=0; row<srcCard; ++row) {\n\t\t\t\t// Check for null values\n\t\t\t\tif (!srcData.isNull.get(row)) {\n\t\t\t\t\tint group = groups[row];\n\t\t\t\t\tgenericTarget.isNull.set(group, false);\n\t\t\t\t\tintTarget.data[group] += intSrc.data[row];\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\tbreak;\n\t\tcase LONG:\n\t\t\tLongData longSrc = (LongData)srcData;\n\t\t\t// Iterate over input column\n\t\t\tfor (int row=0; row<srcCard; ++row) {\n\t\t\t\t// Check for null values\n\t\t\t\tif (!srcData.isNull.get(row)) {\n\t\t\t\t\tint group = groups[row];\n\t\t\t\t\tgenericTarget.isNull.set(group, false);\n\t\t\t\t\tlongTarget.data[group] += longSrc.data[row];\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\tbreak;\n\t\tcase DOUBLE:\n\t\t\tDoubleData doubleSrc = (DoubleData)srcData;\n\t\t\t// Iterate over input column\n\t\t\tfor (int row=0; row<srcCard; ++row) {\n\t\t\t\t// Check for null values\n\t\t\t\tif (!srcData.isNull.get(row)) {\n\t\t\t\t\tint group = groups[row];\n\t\t\t\t\tgenericTarget.isNull.set(group, false);\n\t\t\t\t\tdoubleTarget.data[group] += doubleSrc.data[row];\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new Exception(\"Unsupported type: \" + srcType);\n\t\t}\n\t}", "GroupQueryBuilder reset();", "public static RvRuleGroup createEntity(EntityManager em) {\n RvRuleGroup rvRuleGroup = new RvRuleGroup()\n .ruleGroupName(DEFAULT_RULE_GROUP_NAME);\n return rvRuleGroup;\n }", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "public void setGroupId(long groupId);", "private static String walGroupIdToKey(int grpId, boolean local) {\n if (local)\n return WAL_LOCAL_KEY_PREFIX + grpId;\n else\n return WAL_GLOBAL_KEY_PREFIX + grpId;\n }", "@Override\n public void modify( MemoryGroupByMeta someMeta ) {\n someMeta.allocate( 5, 5 );\n }", "public final void rule__Reference__Group__1() 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:2771:1: ( rule__Reference__Group__1__Impl )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2772:2: rule__Reference__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__Reference__Group__1__Impl_in_rule__Reference__Group__15461);\n rule__Reference__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public static String specifyGroup() {\n return holder.format(\"specifyGroup\");\n }", "public Group createGroup(Group group) throws RepositoryAccessException {\r\n Connection conn = null;\r\n try {\r\n conn = openTransaction();\r\n GroupProxy proxy = new GroupProxy(conn);\r\n proxy.createGroup(group);\r\n conn.commit();\r\n } catch (Exception ex) {\r\n rollback(conn);\r\n String msg = \"Could not create group.\" + ex.getMessage();\r\n \r\n LogService.logWarn(msg, LOGGER);\r\n throw new RepositoryAccessException(msg, ex);\r\n } finally {\r\n close(conn);\r\n }\r\n \r\n return group;\r\n }", "public void addGroup(SymbolGroup group) {\n this.groups.add(group);\n group.setProject(this);\n }", "OperandListGroup createOperandListGroup();", "ID create(NewRoamingGroup group);", "public void setGroup (String columnName)\n\t{\n\t\tsetGroup(getColumnIndex(columnName));\n\t}", "GroupId groupId();", "public void setGroup(String column, int num)\n\t{\n\t\t//#CM708946\n\t\t// Disregard it when the key which does not exist in Effective is specified. \n\t\tKey Eky = getKey(column) ;\n\t\tif (Eky == null)\n\t\t\treturn ;\n\n\t\tEky.setTableGroup(num) ;\n\t\tsetGroupKey(Eky) ;\n\t}", "GroupQueryBuilder setNameAndType(String name, String type);", "protected abstract FlowRule.Builder setDefaultTableIdForFlowObjective(Builder ruleBuilder);", "public abstract String getDefaultGroup();", "public void setGroupcode(java.lang.Integer newGroup) {\n\tgroupcode = newGroup;\n}", "public String defineNameGroups(int[] idGroups) {\n int counter = 0;\n String result = \"\";\n for (Group group : listGroups) {\n for (int id : idGroups) {\n if (id == group.getId()) {\n result += counter + \") \" + group.getName() + \"\\n\";\n counter++;\n }\n }\n }\n return result;\n }", "public final void rule__Tab__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1590:1: ( ( '[' ) )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1591:1: ( '[' )\n {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1591:1: ( '[' )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1592:1: '['\n {\n before(grammarAccess.getTabAccess().getLeftSquareBracketKeyword_1()); \n match(input,24,FOLLOW_24_in_rule__Tab__Group__1__Impl3158); \n after(grammarAccess.getTabAccess().getLeftSquareBracketKeyword_1()); \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 String getGroupName();", "public void setGroupname(java.lang.String newGroupname) {\n\tgroupname = newGroupname;\n}", "private void _generateAResearchGroup(int index) {\n String id;\n id = _getId(CS_C_RESEARCHGROUP, index);\n if(globalVersionTrigger){\t \t \n \t writer_log.addPropertyInstance(id, RDF.type.getURI(), ontology+\"#ResearchGroup\", true);\t \t \t \t \n }\n writer_.startSection(CS_C_RESEARCHGROUP, id);\n writer_.addProperty(CS_P_SUBORGANIZATIONOF,\n _getId(CS_C_DEPT, instances_[CS_C_DEPT].count - 1), true);\n if(globalVersionTrigger){\t \t \n \t writer_log.addPropertyInstance(id, ontology+\"#subOrganizationOf\", _getId(CS_C_DEPT, instances_[CS_C_DEPT].count - 1), true);\t \t \t \t \n }\n writer_.endSection(CS_C_RESEARCHGROUP);\n }", "@Test\n public void testLayoutWithNoReference() throws Exception {\n RowKeyFormat2 format = makeHashPrefixedRowKeyFormat();\n final TableLayoutDesc desc = TableLayoutDesc.newBuilder()\n .setName(\"table_name\")\n .setKeysFormat(format)\n .setVersion(TABLE_LAYOUT_VERSION)\n .setLocalityGroups(Lists.newArrayList(\n LocalityGroupDesc.newBuilder()\n .setName(\"locality_group_name\")\n .setInMemory(false)\n .setTtlSeconds(84600)\n .setMaxVersions(1)\n .setCompressionType(CompressionType.GZ)\n .build()))\n .build();\n final FijiTableLayout layout = FijiTableLayout.newLayout(desc);\n final FijiTableLayout.LocalityGroupLayout lgLayout =\n layout.getLocalityGroupMap().get(\"locality_group_name\");\n assertNotNull(lgLayout);\n assertEquals(1, layout.getLocalityGroups().size());\n assertEquals(lgLayout, layout.getLocalityGroups().iterator().next());\n assertTrue(lgLayout.getName().equals(\"locality_group_name\"));\n assertTrue(lgLayout.getFamilies().isEmpty());\n assertTrue(layout.getFamilies().isEmpty());\n assertTrue(layout.getFamilyMap().isEmpty());\n }", "public final void rule__Database__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1461:1: ( ( '[' ) )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1462:1: ( '[' )\n {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1462:1: ( '[' )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:1463:1: '['\n {\n before(grammarAccess.getDatabaseAccess().getLeftSquareBracketKeyword_1()); \n match(input,24,FOLLOW_24_in_rule__Database__Group__1__Impl2908); \n after(grammarAccess.getDatabaseAccess().getLeftSquareBracketKeyword_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private IColumnGroup getMaterialColumnGroup(TypedTableModelBuilder<WellContent> builder,\n IEntityProperty materialProperty)\n {\n return builder.columnGroup(WellSearchGridColumnIds\n .getWellMaterialColumnGroupPrefix(materialProperty));\n }", "public org.dhis2.ns.schema.dxf2.IndicatorGroupDocument.IndicatorGroup addNewIndicatorGroup()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.dhis2.ns.schema.dxf2.IndicatorGroupDocument.IndicatorGroup target = null;\n target = (org.dhis2.ns.schema.dxf2.IndicatorGroupDocument.IndicatorGroup)get_store().add_element_user(INDICATORGROUP$0);\n return target;\n }\n }", "public ShapeGroupShape(drawit.shapegroups1.ShapeGroup group) {\n this.referencedShapeGroup = group;\n }", "void add(R group);", "java.lang.String getGroupId();", "java.lang.String getGroupId();" ]
[ "0.58015984", "0.57484174", "0.5627831", "0.55854034", "0.55520785", "0.554511", "0.5268504", "0.52354777", "0.51054686", "0.4973432", "0.49726218", "0.49364522", "0.48586476", "0.485327", "0.485327", "0.48269066", "0.48108566", "0.4807659", "0.4766543", "0.4755757", "0.4747429", "0.47226083", "0.47176704", "0.47077549", "0.4692318", "0.46909425", "0.46899998", "0.46722332", "0.46690294", "0.46611658", "0.46528336", "0.4649449", "0.4644641", "0.46409875", "0.46388465", "0.46309802", "0.46253723", "0.46111172", "0.45985004", "0.45905542", "0.45538926", "0.45523745", "0.45473674", "0.4540307", "0.45303994", "0.45251063", "0.4509014", "0.45029318", "0.4488387", "0.4473564", "0.44725928", "0.44722438", "0.44624445", "0.44588634", "0.44560787", "0.4453465", "0.444957", "0.44469535", "0.44426486", "0.4440174", "0.44142312", "0.44135654", "0.44072846", "0.44015282", "0.43962792", "0.43898985", "0.4381277", "0.4381277", "0.4381277", "0.4381277", "0.4381277", "0.4381277", "0.43782043", "0.43679532", "0.43649027", "0.43629178", "0.4359904", "0.43563816", "0.4346914", "0.43354908", "0.4324113", "0.43156308", "0.43106017", "0.4299839", "0.4298182", "0.42867002", "0.4277051", "0.42755663", "0.42747337", "0.4268636", "0.4263042", "0.42564598", "0.42553237", "0.42508617", "0.42414826", "0.42343962", "0.42253295", "0.42230955", "0.4217352", "0.4217352" ]
0.5690282
2
Getter method for the Access Token
public static String getAccessToken() { return accessToken; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAccessToken();", "String getAccessToken();", "String getAccessToken();", "public AccessToken getAccessToken() {\n return token;\n }", "public String getAccessToken() {\n return accessToken;\n }", "public String getAccessToken() {\n return accessToken;\n }", "public String getAccess_token() {\r\n\t\treturn access_token;\r\n\t}", "public String getAccessToken() {\n return accessToken;\n }", "protected AccessToken getAccessToken() \n\t{\n\t\treturn accessToken;\n\t}", "public String getAccessToken()\n {\n if (accessToken == null)\n {\n if (DEBUG)\n {\n System.out.println(\"Access token is empty\");\n }\n try\n {\n FileReader fileReader = new FileReader(getCache(\"token\"));\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n accessToken = bufferedReader.readLine();\n if (DEBUG)\n {\n System.out.println(\"BufferReader line: \" + accessToken);\n }\n } catch (FileNotFoundException e)\n {\n e.printStackTrace();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return accessToken;\n }", "public String getAccessToken () {\n\t\treturn this.accessToken;\n\t}", "public String getAccessToken() {\n\t\treturn accessToken;\n\t}", "public String getAccessToken() {\n\t\treturn accessToken;\n\t}", "@Nullable\n public String getAccessToken() {\n return accessToken;\n }", "public String getAccessToken() {\n readLock.lock();\n try {\n return accessToken;\n } finally {\n readLock.unlock();\n }\n }", "public String getAccessToken() {\n\t\t\n\t\tString access_token = \"\";\n\t\t\n\t\tif (securityContext != null) {\n\t\t\taccess_token = securityContext.getTokenString();\n\t\t}\n\t\t\n\t\treturn access_token;\n\t}", "@Api(1.0)\n @NonNull\n public String getAccessToken() {\n return mAccessToken;\n }", "public String getAccessToken(){\n //return \"3be8b617e076b96b2b0fa6369b6c72ed84318d72\";\n return MobileiaAuth.getInstance(mContext).getCurrentUser().getAccessToken();\n }", "@Transient\n\tpublic String getAccessToken() {\n\t\treturn accessToken;\n\t}", "public String getAccessToken() {\n if (accessToken == null || (System.currentTimeMillis() > (expirationTime - 60 * 1000))) {\n if (refreshToken != null) {\n try {\n this.refreshAccessToken();\n } catch (IOException e) {\n log.error(\"Error fetching access token\", e);\n }\n }\n }\n\n return accessToken;\n }", "String getAuthorizerAccessToken(String appId);", "public static String getAccessToken() {\n return \"\";\n }", "String getComponentAccessToken();", "@Override\n public Object getCredentials() {\n return token;\n }", "protected final String getAccessToken() {\n Session currentSession = sessionTracker.getOpenSession();\n return (currentSession != null) ? currentSession.getAccessToken() : null;\n }", "public java.lang.String getOauth_token(){\r\n return localOauth_token;\r\n }", "private CdekAuthToken getAuthToken()\n {\n String authEndpoint = conf.ENDPOINT + \"/oauth/token?grant_type={grant_type}&client_id={client_id}&client_secret={client_secret}\";\n\n HttpHeaders defaultHeaders = new HttpHeaders();\n HttpEntity req = new HttpEntity(defaultHeaders);\n\n return rest.postForObject(authEndpoint, req, CdekAuthToken.class, conf.getAuthData());\n }", "public OAuthTokenResponse getToken() {\n return token;\n }", "public String accessKey() {\n return this.accessKey;\n }", "AccessToken getOAuthAccessToken(RequestToken requestToken) throws MoefouException;", "OAuth2Token getToken();", "public static String getAccessToken(Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\treturn prefs.getString(TWITTER_ACCESS_TOKEN, null);\n\t\t}", "public String generateAccessToken() {\n return accessTokenGenerator.generate().toString();\n }", "private void getAccessToken() {\n\n\t\tMediaType mediaType = MediaType.parse(\"application/x-www-form-urlencoded\");\n\t\tRequestBody body = RequestBody.create(mediaType,\n\t\t\t\t\"client_id=\" + CONSUMER_KEY + \"&client_secret=\" + CONSUMER_SECRET + \"&grant_type=client_credentials\");\n\t\tRequest request = new Request.Builder().url(\"https://api.yelp.com/oauth2/token\").post(body)\n\t\t\t\t.addHeader(\"cache-control\", \"no-cache\").build();\n\n\t\ttry {\n\t\t\tokhttp3.Response response = client.newCall(request).execute();\n\t\t\tString respbody = response.body().string().trim();\n\t\t\tJSONParser parser = new JSONParser();\n\t\t\tJSONObject json = (JSONObject) parser.parse(respbody);\n\t\t\taccessToken = (String) json.get(\"access_token\");\n\t\t} catch (IOException | ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private String retrieveToken(String accessCode) throws IOException {\n OAuthApp app = new OAuthApp(asanaCredentials.getClientId(), asanaCredentials.getClientSecret(),\n asanaCredentials.getRedirectUri());\n Client.oauth(app);\n String accessToken = app.fetchToken(accessCode);\n\n //check if user input is valid by testing if accesscode given by user successfully authorises the application\n if (!(app.isAuthorized())) {\n throw new IllegalArgumentException();\n }\n\n return accessToken;\n }", "private String getToken() {\n String keyFilePath = System.getenv(\"APE_API_KEY\");\n if (Strings.isNullOrEmpty(keyFilePath)) {\n File globalKeyFile = GlobalConfiguration.getInstance().getHostOptions().\n getServiceAccountJsonKeyFiles().get(GLOBAL_APE_API_KEY);\n if (globalKeyFile == null || !globalKeyFile.exists()) {\n CLog.d(\"Unable to fetch the service key because neither environment variable \" +\n \"APE_API_KEY is set nor the key file is dynamically downloaded.\");\n return null;\n }\n keyFilePath = globalKeyFile.getAbsolutePath();\n }\n if (Strings.isNullOrEmpty(mApiScope)) {\n CLog.d(\"API scope not set, use flag --business-logic-api-scope.\");\n return null;\n }\n try {\n Credential credential = GoogleCredential.fromStream(new FileInputStream(keyFilePath))\n .createScoped(Collections.singleton(mApiScope));\n credential.refreshToken();\n return credential.getAccessToken();\n } catch (FileNotFoundException e) {\n CLog.e(String.format(\"Service key file %s doesn't exist.\", keyFilePath));\n } catch (IOException e) {\n CLog.e(String.format(\"Can't read the service key file, %s\", keyFilePath));\n }\n return null;\n }", "public String userToken() {\n return userToken;\n }", "public String getAuthtoken() {\n return authtoken;\n }", "public static String getCurrentAccessToken() {\n if (StringUtils.isNotNull(cacheAccessToken))\n return cacheAccessToken;\n\n String accessToken = null;\n User user = getCurrentUser();\n if (user != null)\n accessToken = user.secret;\n if (accessToken != null)\n cacheAccessToken = accessToken;\n\n return cacheAccessToken;\n }", "public AuthorizationToken retrieveToken(String token);", "private String GetAccessToken() {\n final String grantType = \"password\";\n final String resourceId = \"https%3A%2F%2Fgraph.microsoft.com%2F\";\n final String tokenEndpoint = \"https://login.microsoftonline.com/common/oauth2/token\";\n\n try {\n URL url = new URL(tokenEndpoint);\n HttpURLConnection conn;\n if (configuration.isProxyUsed()) {\n Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(configuration.getProxyServer(), configuration.getProxyPort()));\n conn = (HttpURLConnection) url.openConnection(proxy);\n } else {\n conn = (HttpURLConnection) url.openConnection();\n }\n\n String line;\n StringBuilder jsonString = new StringBuilder();\n\n conn.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n conn.setRequestMethod(\"POST\");\n conn.setDoInput(true);\n conn.setDoOutput(true);\n conn.setInstanceFollowRedirects(false);\n conn.connect();\n\n try (OutputStreamWriter outputStreamWriter = new OutputStreamWriter(conn.getOutputStream(), StandardCharsets.UTF_8)) {\n String payload = String.format(\"grant_type=%1$s&resource=%2$s&client_id=%3$s&username=%4$s&password=%5$s\",\n grantType,\n resourceId,\n clientId,\n username,\n password);\n outputStreamWriter.write(payload);\n }\n\n try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n while((line = br.readLine()) != null) {\n jsonString.append(line);\n }\n }\n\n conn.disconnect();\n\n JsonObject res = new GsonBuilder()\n .create()\n .fromJson(jsonString.toString(), JsonObject.class);\n\n return res\n .get(\"access_token\")\n .toString()\n .replaceAll(\"\\\"\", \"\");\n\n } catch (IOException e) {\n throw new IllegalAccessError(\"Unable to read authorization response: \" + e.getLocalizedMessage());\n }\n }", "public String getToken();", "public static Oauth2AccessToken readAccessToken() {\n Oauth2AccessToken token = new Oauth2AccessToken();\n SharedPrefWrapper sharedPref = SharedPrefWrapper.getInstance();\n\n token.setUid(sharedPref.getWeiboUID());\n token.setToken(sharedPref.getWeiboAccessToken());\n token.setExpiresTime(sharedPref.getWeiboExpiresTime());\n return token;\n }", "public String getToken() {\n return token.get();\n }", "Future<String> getAccessToken(OkapiConnectionParams params);", "public String getToken()\n {\n return token;\n }", "public String getAccessTokenUri() {\n return accessTokenUri;\n }", "public static String getToken() {\n \treturn mToken;\n }", "public String getClientToken() {\n return clientToken;\n }", "public String getClientToken() {\n return clientToken;\n }", "AccessToken getOAuthAccessToken() throws MoefouException;", "public Pokemon.RequestEnvelop.AuthInfo.JWT getToken() {\n return token_;\n }", "public String getToken() {\n return this.token;\n }", "public LoginToken getLoginToken() {\n return loginToken;\n }", "private String getApiToken(final Account account) {\r\n return account.getStringProperty(PROPERTY_ACCOUNT_api_token);\r\n }", "public String getToken() {\r\n return token;\r\n }", "public String getToken() {\r\n return token;\r\n }", "String getAuthorizerRefreshToken(String appId);", "public String getToken() {\n return instance.getToken();\n }", "public String getToken() {\n return instance.getToken();\n }", "public String getToken() {\n return instance.getToken();\n }", "GetToken.Res getGetTokenRes();", "public String getClientToken() {\n return this.clientToken;\n }", "public String getClientToken() {\n return this.clientToken;\n }", "public String getClientToken() {\n return this.clientToken;\n }", "public String getClientToken() {\n return this.clientToken;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "public String getToken() {\n return token;\n }", "GetToken.Req getGetTokenReq();", "public String getToken() {\n return this.token;\n }", "void onGetTokenSuccess(AccessTokenData token);", "public String getAppToken() {\r\n return appToken;\r\n }", "public String getToken()\n {\n return ssProxy.getToken();\n }", "public String getLoginToken() {\n return loginToken;\n }", "public Pokemon.RequestEnvelop.AuthInfo.JWT getToken() {\n if (tokenBuilder_ == null) {\n return token_;\n } else {\n return tokenBuilder_.getMessage();\n }\n }", "public String getToken() {\n return this.token;\n }", "public String getToken(String name){\n\n return credentials.get(name, token);\n }", "public String getToken() {\n\n return this.token;\n }", "public static String getTeacherToken() {\n\n RestAssured.baseURI = \"https://cybertek-reservation-api-qa.herokuapp.com\";\n\n Response response = given().log().all().\n param(\"email\", \"[email protected]\").\n param(\"password\", \"maxpayne\").\n get(\"/sign\");\n response.then().log().all().\n assertThat().statusCode(200);\n\n return response.jsonPath().get(\"accessToken\");\n\n }", "public Guid getUserToken() {\n return localUserToken;\n }", "public Guid getUserToken() {\n return localUserToken;\n }", "public Guid getUserToken() {\n return localUserToken;\n }", "public String getUserToken() {\n if (userinfo == null)\n return null;\n return userinfo.token;\n }", "public String getApiToken() {\n return apiToken;\n }", "private static Tuple<Integer, String> getToken() {\n\t\tTuple<Integer, String> result = new Tuple<Integer, String>();\n\t\tresult = GETRequest(AUTH_URL, AUTH_HEADER, \"\", \"\");\n\t\treturn result;\n\t}", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "public String getToken() {\n return token_;\n }", "public String getToken() {\n return token_;\n }", "public String getToken() {\n return token_;\n }", "public Token getToken() {\r\n return _token;\r\n }", "@Override\n public AbstractToken getAccessToken(String tokenCode) {\n\n String hashedTokenCode = TokenHashUtil.hash(tokenCode);\n\n final IdToken idToken = getIdToken();\n if (idToken != null) {\n if (idToken.getCode().equals(hashedTokenCode)) {\n return idToken;\n }\n }\n\n final AccessToken longLivedAccessToken = getLongLivedAccessToken();\n if (longLivedAccessToken != null) {\n if (longLivedAccessToken.getCode().equals(hashedTokenCode)) {\n return longLivedAccessToken;\n }\n }\n\n return accessTokens.get(hashedTokenCode);\n }", "public T getToken() {\n return this.token;\n }" ]
[ "0.80908877", "0.7991717", "0.7991717", "0.7991017", "0.7867155", "0.7837911", "0.7798234", "0.77658975", "0.7697761", "0.7695888", "0.76569015", "0.76197064", "0.76197064", "0.7547032", "0.75083554", "0.7474643", "0.7414986", "0.7312742", "0.72672695", "0.7141458", "0.709224", "0.70697904", "0.6945851", "0.6944793", "0.6928911", "0.6889022", "0.6856129", "0.6842608", "0.68379223", "0.6824542", "0.6816953", "0.68164736", "0.6811459", "0.67644775", "0.67179203", "0.6691061", "0.66863906", "0.6640132", "0.66244316", "0.6622821", "0.66193926", "0.66071403", "0.65674555", "0.656227", "0.6557377", "0.65458757", "0.6530364", "0.6512354", "0.64861536", "0.64861536", "0.6468944", "0.64641154", "0.64626527", "0.6458178", "0.64352715", "0.6424137", "0.6424137", "0.64234436", "0.6420162", "0.6420162", "0.6420162", "0.6417766", "0.6408533", "0.6408533", "0.6408533", "0.6408533", "0.6407444", "0.6407444", "0.6407444", "0.6407444", "0.6407444", "0.6406924", "0.6402041", "0.6398739", "0.63948166", "0.6384097", "0.6383541", "0.63785875", "0.63722634", "0.63711107", "0.6370564", "0.63685", "0.6366543", "0.6366543", "0.6366543", "0.6355659", "0.63453877", "0.63321817", "0.6326201", "0.6326201", "0.6326201", "0.6326201", "0.6326201", "0.6326201", "0.6323427", "0.6323427", "0.6323427", "0.6303459", "0.6298903", "0.6297019" ]
0.7808448
6
Kickoff the application and request for access token using Spotify Android SDK
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); loadMainActivity = (ProgressBar) findViewById(R.id.load_mainactivity); recyclerView = (RecyclerView)findViewById(R.id.recyclerview_for_main_activity); toolbar_main_activity = (Toolbar) findViewById(R.id.activity_main_toolbar); setSupportActionBar(toolbar_main_activity); AuthenticationRequest.Builder builder = new AuthenticationRequest.Builder (clientId, AuthenticationResponse.Type.TOKEN, redirectUri); AuthenticationRequest request = builder.build(); AuthenticationClient.openLoginActivity(this, request_Code, request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if(requestCode==request_Code){\n AuthenticationResponse response = AuthenticationClient.getResponse(resultCode,data);\n if(response.getType()==AuthenticationResponse.Type.TOKEN){\n accessToken = response.getAccessToken();\n }else{\n }\n }\n new SpotifyNewRelease(accessToken).execute();\n }", "public SpotifyService getSpotifyService(){\n //Creates and configures a REST adapter for Spotify Web API.\n SpotifyApi wrapper = new SpotifyApi();\n if(!getAccessToken().equals(\"\") && getAccessToken()!=null) {\n wrapper.setAccessToken(getAccessToken());\n }else{\n Log.d(\"SpotifyNewRelease\",\"Invalid Access Token\");\n }\n SpotifyService spotifyService = wrapper.getService();\n return spotifyService;\n }", "private void retrieveAccessToken() {\n Log.d(TAG, \"at retreiveAccessToken\");\n String accessURL = TWILIO_ACCESS_TOKEN_SERVER_URL + \"&identity=\" + \"1234\" + \"a\";\n Log.d(TAG, \"accessURL \" + accessURL);\n Ion.with(this).load(accessURL).asString().setCallback(new FutureCallback<String>() {\n @Override\n public void onCompleted(Exception e, String accessToken) {\n if (e == null) {\n Log.d(TAG, \"Access token: \" + accessToken);\n MainActivity.this.accessToken = accessToken;\n registerForCallInvites();\n } else {\n Toast.makeText(MainActivity.this,\n \"Error retrieving access token. Unable to make calls\",\n Toast.LENGTH_LONG).show();\n Log.d(TAG, e.toString());\n }\n }\n });\n }", "private void requestToken(){\n APIAuth auth = new APIAuth(this.prefs.getString(\"email\", \"\"), this.prefs.getString(\"password\", \"\"), this.prefs.getString(\"fname\", \"\") + \" \" +this.prefs.getString(\"lname\", \"\"), this.prefs, null);\n auth.authenticate();\n }", "public void retrieveAccessToken(Context context) {\n PBookAuth mPBookAuth = mApplicationPreferences.getPBookAuth();\n if (mPBookAuth == null || TextUtils.isEmpty(mPBookAuth.getClientName())) {\n view.onReturnAccessToken(null, false);\n return;\n }\n Ion.with(context).load(ACCESS_TOKEN_SERVICE_URL).setBodyParameter(\"client\", mPBookAuth.getClientName()).setBodyParameter(\"phoneNumber\", mPBookAuth.getPhoneNumber()).setBodyParameter(\"platform\", PLATFORM_KEY).asString().setCallback(new FutureCallback<String>() {\n @Override\n public void onCompleted(Exception e, String accessToken) {\n if (e == null || !TextUtils.isEmpty(accessToken)) {\n mApplicationPreferences.setTwilioToken(accessToken);\n view.onReturnAccessToken(accessToken, true);\n } else {\n view.onReturnAccessToken(accessToken, false);\n }\n }\n });\n }", "public int getTokenViaClientCredentials(){\n\t\t//Do we have credentials?\n\t\tif (Is.nullOrEmpty(clientId) || Is.nullOrEmpty(clientSecret)){\n\t\t\treturn 1;\n\t\t}\n\t\ttry{\n\t\t\t//Build auth. header entry\n\t\t\tString authString = \"Basic \" + Base64.getEncoder().encodeToString((clientId + \":\" + clientSecret).getBytes());\n\t\t\t\n\t\t\t//Request headers\n\t\t\tMap<String, String> headers = new HashMap<>();\n\t\t\theaders.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\theaders.put(\"Authorization\", authString);\n\t\t\t\n\t\t\t//Request data\n\t\t\tString data = ContentBuilder.postForm(\"grant_type\", \"client_credentials\");\n\t\t\t\n\t\t\t//Call\n\t\t\tlong tic = System.currentTimeMillis();\n\t\t\tthis.lastRefreshTry = tic;\n\t\t\tJSONObject res = Connectors.httpPOST(spotifyAuthUrl, data, headers);\n\t\t\tStatistics.addExternalApiHit(\"SpotifyApi getTokenViaClientCredentials\");\n\t\t\tStatistics.addExternalApiTime(\"SpotifyApi getTokenViaClientCredentials\", tic);\n\t\t\t//System.out.println(res.toJSONString()); \t\t//DEBUG\n\t\t\tif (!Connectors.httpSuccess(res)){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\tString token = JSON.getString(res, \"access_token\");\n\t\t\tString tokenType = JSON.getString(res, \"token_type\");\n\t\t\tlong expiresIn = JSON.getLongOrDefault(res, \"expires_in\", 0);\n\t\t\tif (Is.nullOrEmpty(token)){\n\t\t\t\treturn 4;\n\t\t\t}else{\n\t\t\t\tthis.token = token;\n\t\t\t\tthis.tokenType = tokenType;\n\t\t\t\tthis.tokenValidUntil = System.currentTimeMillis() + (expiresIn * 1000);\n\t\t\t}\n\t\t\treturn 0;\n\t\t\t\n\t\t}catch (Exception e){\n\t\t\tStatistics.addExternalApiHit(\"SpotifyApi-error getTokenViaClientCredentials\");\n\t\t\treturn 3;\n\t\t}\n\t}", "public static void requestToken(String username, String password, Context context) {\n SharedPreferences preferences = context.getSharedPreferences(token_storage, 0);\n SharedPreferences.Editor editor = preferences.edit();\n Call<Token> call = kedronService.getToken(\"password\", username, password);\n\n try {\n Log.d(\"Service\", \"Using a new token\");\n auth_token = call.execute().body();\n\n Log.d(\"Service\", \"Token received\");\n\n isTokenPresent = true;\n } catch (IOException e) {\n Log.e(\"TOKEN\", \"Failed to retrieve the token\", e);\n }\n\n header_token = \"Bearer \" + auth_token;\n\n editor.putString(\"token\", auth_token.getToken());\n editor.apply();\n\n bindToken();\n }", "public void startToNormalFlow() {\n new AppController().setConnectivityListener(this);\r\n\r\n try {\r\n objLocationDetails = new LocationDetails(LoginActivity.this);\r\n objLocationDetails.startTracking();\r\n } catch (NullPointerException ne) {\r\n ne.printStackTrace();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n arrPermission = Arrays.asList(\"public_profile\", \"email\", \"user_friends\");\r\n\r\n objSharedPreferences = getSharedPreferences(Constants.PROFILE_PREFERENCES, MODE_PRIVATE);\r\n\r\n try {\r\n PackageInfo info = getPackageManager().getPackageInfo(\"com.shout.shout_test\", PackageManager.GET_SIGNATURES);\r\n for (Signature signature : info.signatures) {\r\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\r\n md.update(signature.toByteArray());\r\n Log.d(\"KeyHash:\", Base64.encodeToString(md.digest(), Base64.DEFAULT));\r\n }\r\n } catch (PackageManager.NameNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (NoSuchAlgorithmException e) {\r\n e.printStackTrace();\r\n }\r\n try {\r\n// LoginManager.getInstance().logOut();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n\r\n\r\n /*mRegistrationBroadcastReceiver = new BroadcastReceiver() {\r\n @Override\r\n public void onReceive(Context context, Intent intent) {\r\n boolean sentToken = objSharedPreferences.getBoolean(Constants.SENT_TOKEN_TO_SERVER, false);\r\n if (sentToken) {\r\n // Get sentToken\r\n //setResultCode(Activity.RESULT_OK);\r\n } else {\r\n // Token Error\r\n }\r\n }\r\n };*/\r\n\r\n Intent intent = new Intent(this, MyInstanceIDListenerService.class);\r\n startService(intent);\r\n\r\n /*if (Utils.checkPlayServices(LoginActivity.this)) {\r\n // Start IntentService to register this application with GCM.\r\n Intent intent = new Intent(this, MyInstanceIDListenerService.class);\r\n startService(intent);\r\n }*/\r\n init();\r\n\r\n\r\n arrIntroPagerModel = new ArrayList<IntroPagerModel>();\r\n\r\n for (int index = 0; index < 5; index++) {\r\n IntroPagerModel objIntroPagerModel = null;\r\n switch (index) {\r\n case 0:\r\n objIntroPagerModel = new IntroPagerModel(R.drawable.slide1, \"example\");\r\n arrIntroPagerModel.add(objIntroPagerModel);\r\n break;\r\n case 1:\r\n objIntroPagerModel = new IntroPagerModel(R.drawable.slide3, \"example\");\r\n arrIntroPagerModel.add(objIntroPagerModel);\r\n break;\r\n case 2:\r\n objIntroPagerModel = new IntroPagerModel(R.drawable.slide4, \"example\");\r\n arrIntroPagerModel.add(objIntroPagerModel);\r\n break;\r\n case 3:\r\n objIntroPagerModel = new IntroPagerModel(R.drawable.slide5, \"example\");\r\n arrIntroPagerModel.add(objIntroPagerModel);\r\n break;\r\n case 4:\r\n objIntroPagerModel = new IntroPagerModel(R.drawable.slide6, \"example\");\r\n arrIntroPagerModel.add(objIntroPagerModel);\r\n break;\r\n }\r\n }\r\n objIntroPagerAdapter = new IntroPagerAdapter(LoginActivity.this, arrIntroPagerModel);\r\n viewPagerIntroSlider.setAdapter(objIntroPagerAdapter);\r\n if (arrIntroPagerModel.size() > 0) {\r\n relativeIntroBackground.setBackgroundResource(R.drawable.slide2);\r\n objViewPagerIndicator.setUnSelectedColor(getResources().getColor(R.color.color_unselected_indicator));\r\n objViewPagerIndicator.setSelectedColor(getResources().getColor(R.color.color_selected_indicator));\r\n objViewPagerIndicator.build(arrIntroPagerModel.size());\r\n objViewPagerIndicator.showIndicator(0);\r\n }\r\n viewPagerIntroSlider.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {\r\n @Override\r\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\r\n\r\n }\r\n\r\n @Override\r\n public void onPageSelected(int position) {\r\n objViewPagerIndicator.showIndicator(position);\r\n }\r\n\r\n @Override\r\n public void onPageScrollStateChanged(int state) {\r\n\r\n }\r\n });\r\n\r\n viewPagerIntroSlider.setPageTransformer(true, new ViewPager.PageTransformer() {\r\n @Override\r\n public void transformPage(View view, float position) {\r\n System.out.print(\"SCROLLED POSITION : \" + position);\r\n\r\n if (position <= -1.0F || position >= 1.0F) {\r\n view.setTranslationX(view.getWidth() * position);\r\n view.setAlpha(0.0F);\r\n } else if (position == 0.0F) {\r\n view.setTranslationX(view.getWidth() * position);\r\n view.setAlpha(1.0F);\r\n } else {\r\n // position is between -1.0F & 0.0F OR 0.0F & 1.0F\r\n view.setTranslationX(view.getWidth() * -position);\r\n view.setAlpha(1.0F - Math.abs(position));\r\n }\r\n /* view.setAlpha(1 - Math.abs(position));\r\n if (position < 0) {\r\n view.setScrollX((int) ((float) (view.getWidth()) * position));\r\n } else if (position > 0) {\r\n view.setScrollX(-(int) ((float) (view.getWidth()) * -position));\r\n } else {\r\n view.setScrollX(0);\r\n }*/\r\n }\r\n });\r\n }", "private void mtd_refresh_token() {\n RxClient.get(FeedActivity.this).Login(new loginreq(sharedpreferences.\n getString(SharedPrefUtils.SpEmail, \"\"),\n sharedpreferences.getString(SharedPrefUtils.SpPassword, \"\")), new Callback<loginresp>() {\n @Override\n public void success(loginresp loginresp, Response response) {\n\n if (loginresp.getStatus().equals(\"200\")){\n\n editor.putString(SharedPrefUtils.SpRememberToken,loginresp.getToken().toString());\n editor.commit();\n\n final Handler handler = new Handler();\n final Runnable runnable = new Runnable() {\n @Override\n public void run() {\n wbService(tmpansList);\n progressBar.setVisibility(View.INVISIBLE);\n }\n };\n handler.postDelayed(runnable, 500);\n\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n progressBar.setVisibility(View.INVISIBLE);\n Log.d(\"refresh token\", \"refresh token error\");\n Toast.makeText(FeedActivity.this, \"Service not response\",\n Toast.LENGTH_LONG).show();\n finish();\n }\n });\n\n }", "@Override\n\t\tprotected Void doInBackground(Uri...params) {\n\t\t\tfinal Uri uri = params[0];\n\t\t\tfinal String oauth_verifier = uri.getQueryParameter(OAuth.OAUTH_VERIFIER);\n\n\t\t\ttry {\n\t\t\t\tprovider.retrieveAccessToken(consumer, oauth_verifier);\n\n\t\t\t\tfinal Editor edit = prefs.edit();\n\t\t\t\tedit.putString(OAuth.OAUTH_TOKEN, consumer.getToken());\n\t\t\t\tedit.putString(OAuth.OAUTH_TOKEN_SECRET, consumer.getTokenSecret());\n\t\t\t\tedit.commit();\n\t\t\t\t\n\t\t\t\tString token = prefs.getString(OAuth.OAUTH_TOKEN, \"\");\n\t\t\t\tString secret = prefs.getString(OAuth.OAUTH_TOKEN_SECRET, \"\");\n\t\t\t\t\n\t\t\t\tconsumer.setTokenWithSecret(token, secret);\n\t\t\t\tstartActivity(new Intent(context,ViewListingActivity.class));\n\n\t\t\t\texecuteAfterAccessTokenRetrieval();\n\t\t\t\t\n\t\t\t\tLog.i(TAG, \"OAuth - Access Token Retrieved\");\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(TAG, \"OAuth - Access Token Retrieval Error\", e);\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "void start(SignedObject accessToken) throws RemoteException, AuthenticationException;", "@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n\n String token = PreferenceConnector.readString(getApplicationContext(), ApplicationConstants.API_ACCESS_TOKEN, null);\n if (token != null) {\n Intent i = new Intent(SplashScreen.this, InstagramDemoMainFragment.class);\n // Intent i = new Intent(SplashScreen.this, graph.class);\n startActivity(i);\n } else {\n Intent i = new Intent(SplashScreen.this, InstagramAutho.class);\n // Intent i = new Intent(SplashScreen.this, graph.class);\n startActivity(i);\n }\n // close this activity\n finish();\n }", "void setAccessToken(String accessToken);", "@Override\n public void onTokenRefresh() {\n // Fetch updated Instance ID token and notify our app's server of any changes (if applicable).\n startService(new Intent(this, RegistrationIntentService.class));\n }", "@Override\n public void onRequestToken() {\n Toast.makeText(getApplicationContext(), \"Your token has expired\", Toast.LENGTH_LONG).show();\n Log.i(\"Video_Call_Tele\", \"The token as expired..\");\n // mRtcEngine.renewToken(token);\n // https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#af1428905e5778a9ca209f64592b5bf80\n // Renew token - TODO\n }", "void setOAuthAccessToken(AccessToken accessToken);", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tgetAccessTokenFromGoogle(code);\n\t\t\t\t\t}", "String getAccessToken();", "String getAccessToken();", "AccessToken getOAuthAccessToken(RequestToken requestToken) throws MoefouException;", "public void signIn()\r\n {\r\n FoodCenterRequestFactory factory = AndroidRequestUtils.getFoodCenterRF(context);\r\n ClientServiceRequest service = factory.getClientService();\r\n\r\n service.login(regId).fire(this);\r\n }", "public String getAccessToken();", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t fOAuth = sActivity.getOAuthToken();\n\t\t\t\t\tOAuthTask task = new OAuthTask (mactivity);\n\t\t\t\t\ttask.execute();\t\t\t\t\n\t\t\t}", "@Override\n public void onTokenRefresh(){\n // start Gcm registration service\n Intent intent = new Intent(this, GcmRegistrationIntentService.class);\n startService(intent);\n }", "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tAccountService accountService = (AccountService)BeanUtil.getBeanByName(\"accountService\");\n\t\t} catch (Exception e2) {\n\t\t\t\n\t\t\te2.printStackTrace();\n\t\t}\n\t\t//获取不了accountService\n\t\ttry {\n\t\t\t\n\t\t\tAccount account = new Account();\n\t\t\t\n\t\t\taccount.setAppId(Keys.APP_ID);\n\t\t\taccount.setAppSecret(Keys.APP_SECRET);\n\t\t\taccount.setName(\"中国好电工\");\n\t\t\tAccessToken accessToken = new AccessToken();\n\t\t\tint count = 0;\n\t\t\twhile (true) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\taccessToken = WeChatUtil.createAccessToKen(account.getAppId(), account.getAppSecret());\n\t\t\t\tif(!\"\".equals(accessToken.getAccessToken()) && accessToken.getAccessToken()!= null )\n\t\t\t\t{\n\t\t\t\t\tString ticket=\"\";\n\t\t\t\t\tString url2 = \"https://api.weixin.qq.com/cgi-bin/ticket/getticket\";//请求URL\n\t\t\t\t\tString data2 = \"access_token=\"+accessToken.getAccessToken()+\"&type=jsapi\";//设置参数\n\t\t\t\t\tJSONObject jsonObject2 = WeChatUtil.httpRequest(url2, data2);\n\t\t\t\t\tif(\"ok\".equals(jsonObject2.getString(\"errmsg\"))){\n\t\t\t\t\t\tticket=jsonObject2.getString(\"ticket\");\n\t\t\t\t\t}\n\t\t\t\t\tWeChatUtil.updateAccessToKen(account.getAppId(), account.getAppSecret());\n\t\t\t\t\t////System.out.println(\"公众账号: \"+account.getName()+\" 获取access_token成功,有效时长秒 token:\"+ accessToken.getExpiresIn());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"TokenThread 获取access_token失败!\");\n\t\t\t\t}\n\t\t\t\n\t\t\tThread.sleep(7200 * 1000);\n\t\t\t////System.out.println(\"重新获取access_token!\");\n\t\t\t\t\t\t\n\t\t\t}\t\n\t\t\t\t\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(50 * 1000);\n\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(\"error\"+ e);\n\t\t\t} catch (Exception 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 performOAuthLogin(View arg) {\n hideKeyboard(arg);\n // Pass the username and password to the OAuth login activity for OAuth login.\n // Once the login is successful, we automatically check in the merchant in the OAuth activity.\n Intent intent = new Intent(LoginScreenActivity.this, OAuthLoginActivity.class);\n intent.putExtra(\"username\", mUsername);\n intent.putExtra(\"password\", mPassword);\n String serverName = mServerName;\n if(null != serverName && serverName.equals(PayPalHereSDK.ControlledSandbox)){\n serverName = PayPalHereSDK.Live;\n }\n intent.putExtra(\"servername\",serverName);\n startActivity(intent);\n\n }", "@Override\n\tpublic void login() {\n\t\tAccountManager accountManager = AccountManager.get(context);\n\t\tAccount[] accounts = accountManager.getAccountsByType(GOOGLE_ACCOUNT_TYPE);\n\t\tif(accounts.length < 1) throw new NotAccountException(\"This device not has account yet\");\n\t\tfinal String userName = accounts[0].name;\n\t\tfinal String accountType = accounts[0].type;\n\t\tBundle options = new Bundle();\n\t\tif(comService.isOffLine()){\n\t\t\tsetCurrentUser(new User(userName, userName, accountType));\n\t\t\treturn;\n\t\t}\n\t\taccountManager.getAuthToken(accounts[0], AUTH_TOKEN_TYPE, options, (Activity)context, \n\t\t\t\tnew AccountManagerCallback<Bundle>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run(AccountManagerFuture<Bundle> future) {\n\t\t\t\t\t\tString token = \"\";\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tBundle result = future.getResult();\n\t\t\t\t\t\t\ttoken = result.getString(AccountManager.KEY_AUTHTOKEN);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsetCurrentUser(new User(userName, userName, accountType, token));\n\t\t\t\t\t\t} catch (OperationCanceledException e) {\n\t\t\t\t\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tLog.d(\"Login\", \"Token: \" + token);\n\t\t\t\t\t}\n\t\t\t\t}, new Handler(new Handler.Callback() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean handleMessage(Message msg) {\n\t\t\t\t\t\tLog.d(\"Login\", msg.toString());\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}));\n\t}", "@Override\r\n public void onTokenRefresh() {\n App.sendToken();\r\n }", "private void getUserInfo(boolean checkAccessTokenResult, final AccessToken accessToken) {\n if (!checkAccessTokenResult) {\n //access token is not valid refresh\n RequestParams params = new RequestParams(WeChatManager.getRefreshAccessTokenUrl(sURLRefreshAccessToken, accessToken));\n x.http().request(HttpMethod.GET, params, new Callback.CommonCallback<String>() {\n @Override\n public void onSuccess(String result) {\n parseRefreshAccessTokenResult(result);\n }\n\n @Override\n public void onError(Throwable ex, boolean isOnCallback) {\n }\n\n @Override\n public void onCancelled(CancelledException cex) {\n }\n\n @Override\n public void onFinished() {\n }\n });\n }\n\n showLoading();\n //get userinfo\n RequestParams requestParams = new RequestParams(WeChatManager.getUserInfoUrl(sURLUserInfo, accessToken));\n x.http().request(HttpMethod.GET, requestParams, new Callback.CommonCallback<String>() {\n @Override\n public void onSuccess(String result) {\n userinfo = new Gson().fromJson(result, UserInfoWX.class);\n\n String device_id= JPushInterface.getRegistrationID(LoginActivity.this);\n RequestParams entity = new RequestParams(Configurations.URL_THIRD_PARTY_LOGIN);\n entity.addParameter(Configurations.OPEN_ID, userinfo.getUnionid());\n entity.addParameter(Configurations.NICKNAME, userinfo.getNickname());\n entity.addParameter(Configurations.AVATOR, userinfo.getHeadimgurl());\n entity.addParameter(\"from\", \"wx\");\n entity.addParameter(Configurations.REG_ID,device_id);\n\n\n long timeStamp= TimeUtil.getCurrentTime();\n entity.addParameter(Configurations.TIMESTAMP, String.valueOf(timeStamp));\n entity.addParameter(Configurations.DEVICE_ID,device_id );\n\n Map<String,String> map=new TreeMap<>();\n map.put(Configurations.OPEN_ID, userinfo.getUnionid());\n map.put(Configurations.NICKNAME, userinfo.getNickname());\n map.put(Configurations.AVATOR, userinfo.getHeadimgurl());\n map.put(\"from\", \"wx\");\n map.put(Configurations.REG_ID,device_id);\n entity.addParameter(Configurations.SIGN, SignUtils.createSignString(device_id,timeStamp,map));\n\n\n x.http().request(HttpMethod.POST, entity, new CommonCallback<String>() {\n @Override\n public void onSuccess(String result) {\n LogUtil.d(TAG, result);\n hideLoading();\n\n try {\n JSONObject object = new JSONObject(result);\n if (object.getInt(Configurations.STATUSCODE) == 200) {\n User user = JSON.parseObject(object.getJSONObject(\"results\").getString(\"user\"), User.class);\n SharedPrefUtil.loginSuccess(SharedPrefUtil.LOGIN_VIA_WECHAT);\n UserUtils.saveUserInfo(user);\n\n MobclickAgent.onProfileSignIn(\"WeChat\", user.getNickname());\n finish();\n } else {\n ToastUtil.showShort(LoginActivity.this, object.getString(Configurations.STATUSMSG));\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n\n @Override\n public void onError(Throwable ex, boolean isOnCallback) {\n hideLoading();\n }\n\n @Override\n public void onCancelled(CancelledException cex) {\n }\n\n @Override\n public void onFinished() {\n }\n });\n\n\n }\n\n @Override\n public void onError(Throwable ex, boolean isOnCallback) {\n }\n\n @Override\n public void onCancelled(CancelledException cex) {\n }\n\n @Override\n public void onFinished() {\n }\n });\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(2000);\r\n\t\t\t\t\tIntent intent =null;\r\n\t\t\t\t\tChainApplication application = (ChainApplication) getApplicationContext();\r\n\t\t\t\t\tUser user = application.getUserInfo();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(StringUtils.isEmpty(user.getUser_Name()) && StringUtils.isEmpty(HttpManager.getInstance().getToken(HttpManager.KEY_TOKEN))){\r\n\t\t\t\t\t\tintent = new Intent(getActivity(),LoginActivity.class);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tintent = new Intent(getActivity(), MainActivity.class);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "public void sendTokenToRemote() { }", "AccessToken getOAuthAccessToken() throws MoefouException;", "@Override\n public void onCreate() {\n super.onCreate();\n //是不是第一次打开此app\n// initSplashed();\n //缓存文件\n// initCache();\n\n// initUser();\n\n// initAccessToken();\n }", "public void setCurrentAccessToken() {\n String userAccessToken = null;\n String moderatorAccessToken = null;\n // Get tokens of local user and logged in moderator if existing.\n localUser = getLocalUser();\n if (localUser != null) {\n userAccessToken = localUser.getServerAccessToken();\n }\n if (loggedInModerator != null) {\n moderatorAccessToken = loggedInModerator.getServerAccessToken();\n }\n // Use the access token of the local moderator if available (logged in).\n accessToken = moderatorAccessToken;\n if (accessToken == null) {\n // Otherwise, use the access token of the local user.\n accessToken = userAccessToken;\n }\n }", "private void getAccessToken() {\n\n\t\tMediaType mediaType = MediaType.parse(\"application/x-www-form-urlencoded\");\n\t\tRequestBody body = RequestBody.create(mediaType,\n\t\t\t\t\"client_id=\" + CONSUMER_KEY + \"&client_secret=\" + CONSUMER_SECRET + \"&grant_type=client_credentials\");\n\t\tRequest request = new Request.Builder().url(\"https://api.yelp.com/oauth2/token\").post(body)\n\t\t\t\t.addHeader(\"cache-control\", \"no-cache\").build();\n\n\t\ttry {\n\t\t\tokhttp3.Response response = client.newCall(request).execute();\n\t\t\tString respbody = response.body().string().trim();\n\t\t\tJSONParser parser = new JSONParser();\n\t\t\tJSONObject json = (JSONObject) parser.parse(respbody);\n\t\t\taccessToken = (String) json.get(\"access_token\");\n\t\t} catch (IOException | ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tnew Thread(){\n\t\t\t\t\tpublic void run(){\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmAuth.fetchToken();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t}.start();\n\t\t\t}", "public static void setAccessToken(String accessToken) {\n }", "public static void setAccessToken(String token, Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_ACCESS_TOKEN, token);\n\t\t\tprefEditor.commit();\n\t\t\t\n\t\t}", "public Future<Void> initialize(String token)\r\n\t{\r\n\t\tthis.api.getApiClient().addDefaultHeader(\"Authorization\", String.format(\"Bearer %s\", token));\r\n\t\tfinal SettableFuture<Void> future = SettableFuture.create();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfinal ApiClient client = new ApiClient();\r\n\t\t\tclient.getHttpClient().setProxy(proxy);\r\n\t\t\tList<Interceptor> interceptors = client.getHttpClient().interceptors();\r\n\t\t\tinterceptors.add(new TraceInterceptor());\r\n\r\n\t\t\tfinal HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(new HttpLoggingInterceptor.Logger()\r\n\t\t\t{\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void log(String message)\r\n\t\t\t\t{\r\n\t\t\t\t\tlogger.debug(message);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tloggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\r\n\t\t\tinterceptors.add(loggingInterceptor);\r\n\r\n\t\t\tCookieStoreImpl cookieStore = new CookieStoreImpl()\r\n\t\t\t{\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void add(URI uri, HttpCookie cookie)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (!future.isDone() && SESSION_COOKIE.equalsIgnoreCase(cookie.getName()))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString value = cookie.getValue();\r\n\t\t\t\t\t\tlogger.debug(\"Session created: {}; {}\", value, cookie.getPath());\r\n\r\n\t\t\t\t\t\tfuture.set(null);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tsuper.add(uri, cookie); //To change body of generated methods, choose Tools | Templates.\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tclient.getHttpClient().setCookieHandler(new CookieManager(cookieStore, CookiePolicy.ACCEPT_ALL));\r\n\t\t\tclient.setBasePath(serviceUrl);\r\n\t\t\tclient.addDefaultHeader(\"x-api-key\", apiKey);\r\n\t\t\tclient.addDefaultHeader(\"Authorization\", String.format(\"Bearer %s\", token));\r\n\r\n\t\t\tapi.setApiClient(client);\r\n\r\n\t\t\tnotifications.setCookieStore(cookieStore);\r\n\t\t\tnotifications.subscribe(\"/statistics/v3/service\", new Notifications.NotificationListener()\r\n\t\t\t{\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onNotification(String channel, Map<String, Object> data)\r\n\t\t\t\t{\r\n\t\t\t\t\tonServiceChange(data);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tnotifications.subscribe(\"/statistics/v3/updates\", new Notifications.NotificationListener()\r\n\t\t\t{\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onNotification(String channel, Map<String, Object> data)\r\n\t\t\t\t{\r\n\t\t\t\t\tonValues(data);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tnotifications.initialize(serviceUrl + \"/notifications\", apiKey, token, notificationOptions);\r\n\t\t}\r\n\t\tcatch (Exception ex)\r\n\t\t{\r\n\t\t\tfuture.setException(ex);\r\n\t\t}\r\n\r\n\t\treturn future;\r\n\t}", "static void startSession() {\n /*if(ZeTarget.isDebuggingOn()){\n Log.d(TAG,\"startSession() called\");\n }*/\n if (!isContextAndApiKeySet(\"startSession()\")) {\n return;\n }\n final long now = System.currentTimeMillis();\n\n runOnLogWorker(new Runnable() {\n @Override\n public void run() {\n logWorker.removeCallbacks(endSessionRunnable);\n long previousEndSessionId = getEndSessionId();\n long lastEndSessionTime = getEndSessionTime();\n if (previousEndSessionId != -1\n && now - lastEndSessionTime < Constants.Z_MIN_TIME_BETWEEN_SESSIONS_MILLIS) {\n DbHelper dbHelper = DbHelper.getDatabaseHelper(context);\n dbHelper.removeEvent(previousEndSessionId);\n }\n //startSession() can be called in every activity by developer, hence upload events and sync datastore\n // only if it is a new session\n //syncToServerIfNeeded(now);\n startNewSessionIfNeeded(now);\n\n openSession();\n\n // Update last event time\n setLastEventTime(now);\n //syncDataStore();\n //uploadEvents();\n\n }\n });\n }", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\t\n\t\t\n\t\tauthorizeBtn.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t fOAuth = sActivity.getOAuthToken();\n\t\t\t\t\tOAuthTask task = new OAuthTask (mactivity);\n\t\t\t\t\ttask.execute();\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t}", "Pokemon.RequestEnvelop.AuthInfo.JWT getToken();", "public void requestToken(View pView){\n mAttestation.fetchApproovToken();\n }", "@Override\n protected String doInBackground(Void... params) {\n if(myApiService == null) {\n MyApi.Builder builder = new MyApi.Builder(AndroidHttp.newCompatibleTransport(), new AndroidJsonFactory(), null)\n // Local testing url (emulator is 10.0.2.2 or use local machine ip)\n // .setRootUrl(\"http://10.0.2.2:8080/_ah/api/\")\n .setRootUrl(\"https://androidjokes-155120.appspot.com/_ah/api/\");\n\n myApiService = builder.build();\n }\n\n // Grab a joke\n try {\n return myApiService.getJoke().execute().getData();\n } catch (IOException e) {\n return e.getMessage();\n }\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n mAuth = new Auth(this.getFilesDir().getAbsolutePath());\n \n mToken = (Button)findViewById(R.id.token);\n mToken.setOnClickListener(new OnClickListener(){\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tnew Thread(){\n\t\t\t\t\tpublic void run(){\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmAuth.fetchToken();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t}.start();\n\t\t\t}\n \t\n });\n \n mReqauth = (Button)findViewById(R.id.reqauth);\n mReqauth.setOnClickListener(new OnClickListener(){\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tString url = mAuth.getAuthUrl();\n\t\t\t\tshowPopUp(url);\n\t\t\t}\n \t\n });\n mSessionKey = (Button)findViewById(R.id.sk);\n mSessionKey.setOnClickListener(new OnClickListener(){\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tnew Thread(){\n\t\t\t\t\tpublic void run(){\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmAuth.fetchSessionkey();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}.start();\n\n\t\t\t}\n \t\n });\n setTitle(getPackageManager().getApplicationLabel(getApplicationInfo()));\n }", "public void requestJoke(){\n SharedPreferences preferences = activity.getPreferences(Activity.MODE_PRIVATE);\r\n String firstName = activity.getResources().getString(R.string.default_first_name);\r\n String lastName = activity.getResources().getString(R.string.default_last_name);\r\n jokeRetriever.getJoke(firstName, lastName, this);\r\n }", "private void getAccessToken(final String code, final OperationCallback<User> callback) {\n \n new Thread() {\n @Override\n public void run() {\n Log.i(TAG, \"Getting access token\");\n try {\n String postData = \"client_id=\" + CLIENT_ID + \"&client_secret=\" + CLIENT_SECRET +\n \"&grant_type=authorization_code\" + \"&redirect_uri=\" + CALLBACK_URL + \"&code=\" + code;\n String response = postRequest(TOKEN_URL, postData);\n \n Log.i(TAG, \"response \" + response);\n JSONObject jsonObj = (JSONObject) new JSONTokener(response).nextValue();\n \n mAccessToken = jsonObj.getString(\"access_token\");\n Log.i(TAG, \"Got access token: \" + mAccessToken);\n \n Gson gson = new Gson();\n User user = gson.fromJson(jsonObj.getJSONObject(\"user\").toString(), User.class);\n user.setAccessToken(mAccessToken);\n \n callback.notifyCompleted(user);\n } catch (Exception ex) {\n callback.notifyError(ex);\n Log.e(TAG, \"Error getting access token\", ex);\n }\n \n }\n }.start();\n }", "@Override\n public void onClick(View view) {\n if (NetworkUtility.isNetworkAvailable(getApplicationContext()))\n {\n if (session.checkLogin()) {\n\n System.out.println(\"MainActivity: ---> AirVantageLoginActivity\");\n Intent intent = new Intent(getApplicationContext(), AirVantageLoginActivity.class);\n\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n startActivity(intent);\n overridePendingTransition(R.transition.slide_from_right, R.transition.slide_to_left);\n finish();\n\n }\n else\n {\n System.out.println(\"MainActivity: ---> MainTabDataViewActivity\");\n\n HashMap<String, String> userCredentials = session.getUserCredentials();\n AccessToken accessToken = session.getAccessToken();\n\n String access_token = accessToken.getAccess_token();\n String token_type = accessToken.getToken_type();\n String refresh_token = accessToken.getRefresh_token();\n Integer expires_in = accessToken.getExpires_in();\n\n (new RefreshTokenTask(refresh_token, userCredentials.get(\"systemUid\"), userCredentials.get(\"clientId\"), userCredentials.get(\"clientSecret\"))).execute();\n }\n }\n else\n {\n Toast.makeText(getApplicationContext(), \"No network connection!\",Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.login); \n//\tYouTubeService service = new YouTubeService(clientId, developer_key);\n\n \n \n \n }", "private void startCall() {\n // If firebase isn't auth don't call\n if (mUser == null) return;\n setupLocalVideo();\n joinChannel();\n }", "private void logIn(LogSignTemplate credentials){\n Call<LogSignTemplate> callNewTrack = nightAPI.authorize(credentials);\n callNewTrack.enqueue(new Callback<LogSignTemplate>() {\n @Override\n public void onResponse(Call<LogSignTemplate> call, Response<LogSignTemplate> response) {\n if(response.isSuccessful()){\n Log.d(\"QuestionsCallback\", \"//////////////////////////////////// SUCCESFUL LOGIN !!!!!!!!!!!!!!! /////////////////////////////////////\");\n Toasty.success(getContext(), \"Succes, welcome.\", Toast.LENGTH_SHORT, true).show();\n Intent intent = new Intent(getContext(), MenuActivity.class);\n startActivity(intent);\n }\n else{\n Log.d(\"QuestionsCallback\", \"//////////////////////////////////// NO SUCCESFUL RESPONSE /////////////////////////////////////\");\n Toasty.error(getContext(), \"Incorrect username or password.\", Toast.LENGTH_SHORT, true).show();\n }\n }\n\n @Override\n public void onFailure(Call<LogSignTemplate> call, Throwable t) {\n Log.d(\"QuestionsCallback\", \"//////////////////////////////////////// ERROR /////////////////////////////////\");\n Toasty.error(getContext(), \"Error while validating..\", Toast.LENGTH_SHORT, true).show();\n t.printStackTrace();\n }\n });\n }", "AccessToken getOAuthAccessToken(RequestToken requestToken, String oauthVerifier) throws MoefouException;", "@Override\n protected String doInBackground(Void... voids) {\n RequestHandler requestHandler = new RequestHandler(AppController.getAppContext());\n\n\n\n try {\n JSONObject response = requestHandler.sendPostRequest(URLs.URL_UPDATE_TOKEN_DAILY, null, Request.Method.POST);\n return response.toString();\n\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n\n return null;\n }", "void onGetTokenSuccess(AccessTokenData token);", "private void doLogin() {\n\t\tSharedPreferences.Editor prefEditor = mSP.edit();\n\t\tSession.FirstLogin = true;\n\t\tmUserPin = et_password.getText().toString();\n\t\t// Time to update the session\n\t\tif (inTruckMode) {\n\t\t\tSession.setVehicle(vehicle);\n\t\t\tSession.setDriver(userDao.getByPin(mUserPin));\n\n\t\t\tprefEditor.putString(Config.VEHICLE_ID_KEY, vehicle.getId());\n\t\t\tprefEditor.putString(Config.LAST_VEHICLE_KEY, vehicle.getId());\n\t\t\tprefEditor.putString(Config.SITE_ID_KEY, null);\n\n\t\t\tSession.setType(SessionType.VEHICLE_SESSION);\n\t\t} else {\n\t\t\tSession.setSite(site);\n\t\t\tSession.setDriver(userDao.getByPin(mUserPin));\n\n\t\t\tprefEditor.putString(Config.VEHICLE_ID_KEY, null);\n\t\t\tprefEditor.putString(Config.LAST_VEHICLE_KEY, null);\n\t\t\tprefEditor.putString(Config.SITE_ID_KEY, site.getId());\n\n\t\t\tSession.setType(SessionType.SITE_SESSION);\n\t\t}\n\n\t\tstartupSync();\n\t\tstartSync();\n\n\t\tprefEditor.putString(Config.USER_PIN_KEY, mUserPin);\n\t\tprefEditor.putString(Config.LAST_USER_PIN_KEY, mUserPin);\n\t\tprefEditor.putString(Config.SYNC_SERVICE_KEY, \"yes\");\n\t\tprefEditor.commit();\n\n\t\t// if no VIMEI associated with truck, starting GPSService on SB device\n\t\tif (!vehiclesDao.xergoEsn(getApplicationContext())) {\n\t\t\tvimei = vehiclesDao.getVimei(this);\n\n\t\t\tIntent intent = new Intent();\n\t\t\tintent.setAction(GPSService.UPDATE_IMEI_EVENT);\n\t\t\tintent.putExtra(\"Value\", vimei);\n\t\t\tsendBroadcast(intent);\n\n\t\t\tintent = new Intent();\n\t\t\tintent.setAction(GPSService.SEND_IGNITION_ON_EVENT);\n\t\t\tsendBroadcast(intent);\n\t\t}\n\n\t\tstartSession(mUserPin);\n\t\tIntent intent = new Intent(this, MapActivity.class);\n\t\tthis.startActivity(intent);\n\t\tfinish();\n\t}", "@Override\n public void onResponse(String response) {\n\n try {\n\n SharedPreferences.Editor editor = prefs.edit();\n JSONObject data= new JSONObject(response);\n String token = data.getString(\"access_token\");\n editor.putString(\"token\", token);\n\n getDatosUser(usuario,token);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }", "public static void setRequestToken(String token, Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_REQUEST_TOKEN, token);\n\t\t\tprefEditor.commit();\n\t\t\t\n\t\t}", "@Override\n public void onTokenRefresh() {\n // Fetch updated Instance ID token and notify of changes\n Intent intent = new Intent(this, RegistrationIntentService.class);\n intent.putExtra(\"SOURCE\", \"GCM\");\n startService(intent);\n }", "void removeAccessToken() {\n SharedPreferences prefs = // because rest also needs token\n context.getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE);\n prefs.edit()\n .remove(KEY_ACCESS_TOKEN)\n .apply();\n // notification to all listeners\n state.onNext(new AuthState(false));\n\n }", "@Override\n public void onTokenRefresh() {\n Log.d(\"MyInstanceIDService\", \"onTokenRefresh\");\n// new GCMDoRequest().execute(new GCMRequest(this, GCMCommand.GET_TOKEN));\n }", "public static void retrieveMediaAsync(final Callback callback) {\n Log.d(\"MusicLibrary\", \"retrieveMediaAsync called\");\n if (currentState == State.INITIALIZED) {\n if (callback != null) {\n // Nothing to do, execute callback immediately\n callback.onMusicCatalogReady(true);\n }\n return;\n }\n\n String code = SharedPrefManager.getInstance().readSharedPrefString(R.string.oauth_token);\n String scope = SharedPrefManager.getInstance().readSharedPrefString(R.string.oauth_scope);\n\n if (!\"\".equals(code) && !\"\".equals(scope)) {\n AccessToken token = new AccessToken(code, scope);\n SoundCloudClient client = ServiceGenerator.createService(SoundCloudClient.class, token);\n SoundCloud2Client client2 = ServiceGenerator.createService(SoundCloud2Client.class, token);\n\n // Asynchronously load the music catalog in a separate thread\n// Call<List<Track>> call = client.getMyFavorites(100);\n// call.enqueue(new retrofit2.Callback<List<Track>>() {\n// @Override\n// public void onResponse(Call<List<Track>> call, Response<List<Track>> response) {\n// Log.d(\"MusicLibrary\", response.message());\n// Log.d(\"MusicLibrary\", response.code() + \"\");\n// Log.d(\"MusicLibrary\", response.headers().toString());\n// List<Track> tracks = response.body();\n// if (tracks != null) {\n// for (Track track : tracks) {\n// Log.d(\"MusicLibrary\",\n// track.user.username + \" (\" + track.title + \")\");\n// createAndAddMediaMetadata(track, true);\n// }\n// }\n// currentState = State.INITIALIZED;\n// callback.onMusicCatalogReady(currentState == State.INITIALIZED);\n// }\n//\n// @Override\n// public void onFailure(Call<List<Track>> call, Throwable t) {\n// Log.d(\"MusicLibrary\", \"Failure\");\n// Log.d(\"MusicLibrary\", t.getMessage());\n// currentState = State.NON_INITIALIZED;\n// callback.onMusicCatalogReady(currentState == State.INITIALIZED);\n// }\n// });\n\n Call<AffiliatedActivities> call = client2.getMyFavorites(AutoCloudApplication.CLIENT_ID_WEB, 100);\n call.enqueue(new retrofit2.Callback<AffiliatedActivities>() {\n @Override\n public void onResponse(Call<AffiliatedActivities> call, Response<AffiliatedActivities> response) {\n Log.d(\"MusicLibrary\", response.message());\n Log.d(\"MusicLibrary\", response.code() + \"\");\n Log.d(\"MusicLibrary\", response.headers().toString());\n List<Activity> activities = response.body().collection;\n if (activities != null) {\n //trackList.clear();\n for (Activity activity : activities) {\n // activity.origin can be null, we don't want to show type playlist, unable to extract data out of that currently\n if (activity.origin != null && !activity.type.equals(\"playlist\")) {\n Log.d(\"MusicLibrary\",\n activity.track.user.username + \" (\" + activity.track.title + \")\");\n //trackList.add(activity.origin);\n MusicLibrary.createAndAddMediaMetadata(activity.track, true);\n }\n }\n //trackAdapter.notifyDataSetChanged();\n }\n currentState = State.INITIALIZED;\n callback.onMusicCatalogReady(currentState == State.INITIALIZED);\n }\n\n @Override\n public void onFailure(Call<AffiliatedActivities> call, Throwable t) {\n Log.d(\"MusicLibrary\", \"Failure\");\n Log.d(\"MusicLibrary\", t.getMessage());\n currentState = State.NON_INITIALIZED;\n callback.onMusicCatalogReady(currentState == State.INITIALIZED);\n }\n });\n\n Call<AffiliatedActivities> call2 = client2.getStreamTracks(AutoCloudApplication.CLIENT_ID_WEB, 100);\n call2.enqueue(new retrofit2.Callback<AffiliatedActivities>() {\n @Override\n public void onResponse(Call<AffiliatedActivities> call, Response<AffiliatedActivities> response) {\n Log.d(\"MusicLibrary\", response.message());\n Log.d(\"MusicLibrary\", response.code() + \"\");\n Log.d(\"MusicLibrary\", response.headers().toString());\n List<Activity> activities = response.body().collection;\n if (activities != null) {\n //trackList.clear();\n for (Activity activity : activities) {\n // activity.origin can be null, we don't want to show type playlist, unable to extract data out of that currently\n if (activity.track != null && !activity.type.equals(\"playlist\")) {\n Log.d(\"MusicLibrary\",\n activity.track.user.username + \" (\" + activity.track.title + \")\");\n //trackList.add(activity.origin);\n MusicLibrary.createAndAddMediaMetadata(activity.track, false);\n }\n }\n //trackAdapter.notifyDataSetChanged();\n }\n\n\n }\n\n @Override\n public void onFailure(Call<AffiliatedActivities> call, Throwable t) {\n Log.d(\"MusicLibrary\", \"Failure\");\n Log.d(\"MusicLibrary\", t.getMessage());\n }\n });\n currentState = State.INITIALIZING;\n\n\n } else {\n if (callback != null) {\n callback.onMusicCatalogReady(currentState == State.INITIALIZED);\n }\n }\n }", "public static void retrieveMediaAsync2(final Callback callback) {\n Log.d(\"MusicLibrary\", \"retrieveMediaAsync2 called\");\n if (currentState == State.INITIALIZED) {\n if (callback != null) {\n // Nothing to do, execute callback immediately\n callback.onMusicCatalogReady(true);\n }\n return;\n }\n\n String code = SharedPrefManager.getInstance().readSharedPrefString(R.string.oauth_token);\n String scope = SharedPrefManager.getInstance().readSharedPrefString(R.string.oauth_scope);\n\n if (!\"\".equals(code) && !\"\".equals(scope)) {\n AccessToken token = new AccessToken(code, scope);\n SoundCloudClient client = ServiceGenerator.createService(SoundCloudClient.class, token);\n\n // Asynchronously load the music catalog in a separate thread\n Call<AffiliatedActivities> call = client.getStreamTracks(100);\n call.enqueue(new retrofit2.Callback<AffiliatedActivities>() {\n @Override\n public void onResponse(Call<AffiliatedActivities> call, Response<AffiliatedActivities> response) {\n Log.d(\"MusicLibrary\", response.message());\n Log.d(\"MusicLibrary\", response.code() + \"\");\n Log.d(\"MusicLibrary\", response.headers().toString());\n List<Activity> activities = response.body().collection;\n if (activities != null) {\n //trackList.clear();\n for (Activity activity : activities) {\n Log.d(\"MainActivity\",\n activity.origin.user.username + \" (\" + activity.origin.title + \")\");\n //trackList.add(activity.origin);\n MusicLibrary.createAndAddMediaMetadata(activity.origin, false);\n }\n //trackAdapter.notifyDataSetChanged();\n }\n\n }\n\n @Override\n public void onFailure(Call<AffiliatedActivities> call, Throwable t) {\n Log.d(\"MainActivity\", \"Failure\");\n Log.d(\"MainActivity\", t.getMessage());\n }\n });\n currentState = State.INITIALIZING;\n\n\n } else {\n if (callback != null) {\n callback.onMusicCatalogReady(currentState == State.INITIALIZED);\n }\n }\n }", "private void login() {\n User user;\n SharedPreferences preferences = context.getSharedPreferences(context.getString(R.string.user_shared_preferences), MODE_PRIVATE);\n preferences.edit().putLong(context.getString(R.string.user_id), -1).apply();\n if(preferences.getLong(context.getString(R.string.user_id), -1) != -1){\n user = User.getUser();\n }\n else{\n Globals.showDialog(\"New User\",\"Choose a user name\", LoginActivity.this);\n\n }\n user = new User();\n\n HttpUserService userService = new HttpUserService();\n Call<User> call = userService.login(user.getId());\n\n call.enqueue(new Callback<User>() {\n @Override\n public void onResponse(Call<User> call, Response<User> response) {\n asyncLogin(response);\n\n\n }\n\n @Override\n public void onFailure(Call<User> call, Throwable t) {\n Globals.showConnectionDialog(LoginActivity);\n\n }\n });\n }", "public synchronized void acquireTokenAsync() {\n if (this.mCallback == null) {\n String str = Analytics.LOG_TAG;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Calling token provider=\");\n sb.append(this.mType);\n sb.append(\" callback.\");\n AppCenterLog.debug(str, sb.toString());\n this.mCallback = new AuthenticationCallback() {\n public void onAuthenticationResult(String str, Date date) {\n AuthenticationProvider.this.handleTokenUpdate(str, date, this);\n }\n };\n this.mTokenProvider.acquireToken(this.mTicketKey, this.mCallback);\n }\n }", "@Override\n public void run() {\n PreferenceManager.getDefaultSharedPreferences(AuthenticatorExample.this)\n .edit().putBoolean(\"is_authenticated\", true).commit();\n // Notify the service that authentication is complete\n notifyAuthenticated();\n // Close the Activity\n finish();\n }", "interface PodAuthService {\n @FormUrlEncoded\n @POST(\"/oauth/token\")\n Observable<Auth> authenticate(\n @Field(\"grant_type\") String grantType,\n @Field(\"username\") String username,\n @Field(\"password\") String password,\n @Field(\"client_id\") String clientId,\n @Field(\"client_secret\") String clientSecret\n );\n\n @FormUrlEncoded\n @POST(\"/oauth/token\")\n Observable<Auth> refreshToken(\n @Field(\"grant_type\") String grantType,\n @Field(\"client_id\") String clientId,\n @Field(\"client_secret\") String clientSecret,\n @Field(\"refresh_token\") String refreshToken\n );\n}", "public void setToken(){\n token=null;\n try {\n OkHttpClient client = new OkHttpClient();\n RequestBody reqbody = RequestBody.create(null, new byte[0]); \n Request request = new Request.Builder()\n .url(\"https://api.mercadolibre.com/oauth/token?grant_type=client_credentials&client_id=\"+clienteID +\"&client_secret=\"+secretKey)\n .post(reqbody)\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"cache-control\", \"no-cache\")\n .addHeader(\"postman-token\", \"67053bf3-5397-e19a-89ad-dfb1903d50c4\")\n .build();\n \n Response response = client.newCall(request).execute();\n String respuesta=response.body().string();\n token=respuesta.substring(respuesta.indexOf(\"APP\"),respuesta.indexOf(\",\")-1);\n System.out.println(token);\n } catch (IOException ex) {\n Logger.getLogger(MercadoLibreAPI.class.getName()).log(Level.SEVERE, null, ex);\n token=null;\n }\n }", "@Override\n public void onSuccess(final Credentials credentials) {\n Intent intent = new Intent(LoginActivity.this, MainActivity.class);\n intent.putExtra(EXTRA_ACCESS_TOKEN, credentials.getAccessToken());\n intent.putExtra(EXTRA_ID_TOKEN, credentials.getIdToken());\n\n startActivity(intent);\n finish();\n }", "public AudioService(Context context) {\n this.sharedPreferences = context.getSharedPreferences(\"SPOTIFY\", 0);\n queue = Volley.newRequestQueue(context);\n }", "RequestToken getOAuthRequestToken() throws MoefouException;", "protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n super.onActivityResult(requestCode, resultCode, intent);\n\n // Check if result comes from the correct activity\n if (requestCode == REQUEST_CODE) {\n AuthenticationResponse response = AuthenticationClient.getResponse(resultCode, intent);\n\n switch (response.getType()) {\n // Successful response, token received\n case TOKEN:\n // Store access token for later use\n editor = getSharedPreferences(\"SPOTIFY\", 0).edit();\n editor.putString(\"token\", response.getAccessToken());\n editor.apply();\n\n // Move to genre list activity if authentication was successful\n Intent genreIntent = new Intent(SpotifyAuthActivity.this, GenreListActivity.class);\n startActivity(genreIntent);\n break;\n\n case ERROR:\n Toast.makeText(SpotifyAuthActivity.this, \"ERROR\", Toast.LENGTH_LONG);\n break;\n\n default:\n Toast.makeText(SpotifyAuthActivity.this, \"CANCELLED\", Toast.LENGTH_LONG);\n }\n }\n }", "@Override\n public void onComplete(Bundle values) {\n final SharedPreferences.Editor editor = mPrefs.edit();\n editor.putString(\"access_token\", facebook.getAccessToken());\n editor.putLong(\"access_expires\", facebook.getAccessExpires());\n editor.commit();\n\n final RequestParams params=new RequestParams();\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n JSONObject meResponse;\n String appAccessToken;\n \n try {\n meResponse=new JSONObject(facebook.request(\"me\"));\n\n Facebook appTokenGetter=new Facebook(facebook.getAppId());\n\n Bundle appTokenParams=new Bundle();\n appTokenParams.putString(\"client_id\", \"220182624731035\");\n appTokenParams.putString(\"client_secret\", \"4eaad26ffa800e232438647bbc8af28f\");\n appTokenParams.putString(\"grant_type\", \"client_credentials\");\n\n appAccessToken=appTokenGetter.request(\"oauth/access_token\", appTokenParams);\n\n editor.putString(\"app_access_token\", appAccessToken.replace(\"access_token=\", \"\"));\n\n Log.d(\"ScoreboardActivity\", \"Received app access token: \" + appAccessToken);\n\n editor.putString(\"facebook_id\", meResponse.getString(\"id\"));\n editor.commit();\n\n params.put(\"facebook_id\", meResponse.getString(\"id\"));\n params.put(\"name\", meResponse.getString(\"name\"));\n params.put(\"avatar\", \"http://graph.facebook.com/\"+meResponse.getString(\"id\")+\"/picture\");\n }\n catch(Exception e)\n {\n\n }\n\n GetBonkersAPI.post(\"/admin/players/\"+GetBonkersAPI.getPlayerUUID(getApplicationContext()), params, getApplicationContext(), new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(String response)\n {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n wait.dismiss();\n if(mode==1)\n {\n finish();\n }\n else\n {\n updateScoreboard();\n rightSelectorTapped(null);\n }\n }\n });\n }\n\n @Override\n public void onFailure(Throwable error)\n {\n wait.dismiss();\n }\n });\n\n }\n }).start();\n\n\n }", "RequestToken getOAuthRequestToken(String callbackURL) throws MoefouException;", "public static void pushRequestDeviceToken(Context context) {\n PushRegistration.RegisterTask task = new PushRegistration.RegisterTask(context);\n executorService.submit(task);\n }", "void authorizeApplication(@Nullable String scope, @Nullable ResponseCallback<ApplicationAccessToken> callback);", "public void onClick(View v) {\n Toast toast = Toast.makeText(getApplicationContext(), \"This button will launch my Spotify Streamer app!\", Toast.LENGTH_SHORT);\n toast.show();\n }", "@Override\n\tpublic void onLoginSuccess() {\n\t\tIntent i = new Intent(this, TweetListActivity.class);\n\t\ti.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\tstartActivity(i);\n\t\ttwitterClient = new TwitterClient(this);\n//\t\tfetchTweets();\n\t}", "public APIToken() {\n super();\n }", "private void refreshAccessToken() throws IOException {\n\n if (clientId == null) fetchOauthProperties();\n\n URL url = new URL(tokenURI);\n\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"refresh_token\", refreshToken);\n params.put(\"client_id\", clientId);\n params.put(\"client_secret\", clientSecret);\n params.put(\"grant_type\", \"refresh_token\");\n\n String response = HttpUtils.getInstance().doPost(url, params);\n JsonParser parser = new JsonParser();\n JsonObject obj = parser.parse(response).getAsJsonObject();\n\n JsonPrimitive atprim = obj.getAsJsonPrimitive(\"access_token\");\n if (atprim != null) {\n accessToken = obj.getAsJsonPrimitive(\"access_token\").getAsString();\n expirationTime = System.currentTimeMillis() + (obj.getAsJsonPrimitive(\"expires_in\").getAsInt() * 1000);\n fetchUserProfile();\n } else {\n // Refresh token has failed, reauthorize from scratch\n reauthorize();\n }\n\n }", "public void onClicked(View check, View emailTxt, View passwordTxt) {\n\n try {\n email = ((EditText) emailTxt).getText().toString();\n password = ((EditText) passwordTxt).getText().toString();\n CheckBox checkbox = ((CheckBox) check);\n\n\n if (!email.isEmpty() && !password.isEmpty()) {\n\n SharedPreference_Login login=new SharedPreference_Login(activity);\n\n //check the auth data saved\n if (new SharedPreference_Auth(activity).IsExpired()\n && (email.equals(login.emailOriginal())&&password.equals(login.passwordOriginal())))\n {\n\n Intent intent = new Intent(activity, ActivityMain.class);\n activity.startActivity(intent);\n activity.finish();\n\n\n } else {\n JsonReceiver jsonReceiver = new JsonReceiver(activity, \"https://puresoftware.org/user/en/oauth2/access/token.json\");\n Map<String, String> parser = new HashMap<String, String>();\n parser.put(\"grant_type\", \"password\");\n parser.put(\"username\", email);\n parser.put(\"password\", password);\n parser.put(\"scope\", \"climax\");\n jsonReceiver.post(parser,processor);\n }\n } else {\n checkbox.setChecked(false);\n ((EditText) emailTxt).getText().clear();\n ((EditText) passwordTxt).getText().clear();\n Toast.makeText(activity, \"please fill text boxes\", Toast.LENGTH_LONG).show();\n }\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "OAuth2Token getToken();", "protected void checkToken(){\n DBManager dao = new DBManager(appContext);\n dao= dao.open();\n Cursor c = dao.selectionner();\n if (c.getCount()>0) {\n System.out.println(\"Base activity token:\"+c.getCount());\n System.out.println(\"Base activity token:\"+c.getString(0));\n Intent main =new Intent(this, SplashScreenActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(main);\n } else {\n System.out.println(\"No token Found\");\n Intent main = new Intent(this, LoginActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(main);\n }\n }", "public java.lang.String getOauth_token(){\r\n return localOauth_token;\r\n }", "private void sendToAPI(final View v, JSONObject jsonLogin){\n APIClient apiClient = new APIClient();\n Service apiService = apiClient.getClient().create(Service.class);\n Call<User> call = apiService.login(new Login(\"efef\",\"dfwd\"));\n call.enqueue(new Callback<User>() {\n @Override\n public void onResponse(Call<User> call, Response<User> response) {\n if (response.isSuccessful()) {\n new CustomToast().displyToast(getContext(), v, \"Error:\"+response.code()+\" \"+response.body().getMessage()+\n \"Token is: \"+response.body().getAccessToken());\n }\n else{\n new CustomToast().displyToast(getContext(), v, \"Error: \"+response.code()+\" \"+\n response.headers()+ \"...Incorrect username or password!\");\n }\n }\n\n @Override\n public void onFailure(Call<User> call, Throwable t) {\n new CustomToast().displyToast(getContext(), v, \"Server unreachable, Please retry again later\");\n }\n });\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n //get the preferences for the app\n emyPrefs = getSharedPreferences(\"myTwitterClientPrefs\", 0);\n\n //find out if the user preferences are set\n if (emyPrefs.getString(\"user_token\", null) == null) {\n new RetrieveFeedTask().execute();\n //no user preferences so prompt to sign in\n setContentView(R.layout.activity_login);\n //setup button for click listener\n Button signIn = (Button) findViewById(R.id.signin);\n signIn.setOnClickListener(LoginActivity.this);\n\n\n } else {\n //user preferences are set - get timeline\n //status load\n\n //setupTimeline();\n startFollowersActivity();\n }\n }", "@Override\n protected void onPostExecute(final JSONObject response) {\n if (response == null)\n {\n Toast.makeText(getApplicationContext(), \"Something wrong...\",Toast.LENGTH_LONG).show();\n return;\n }\n if (response.has(\"error\") && response.has(\"error_description\")) {\n\n Toast.makeText(getApplicationContext(), \"Something wrong...\",Toast.LENGTH_LONG).show();\n finish();\n\n } else {\n if (response.has(\"access_token\") && response.has(\"token_type\") && response.has(\"refresh_token\") && response.has(\"expires_in\"))\n {\n\n try {\n Intent intent = new Intent(getApplicationContext(), MainTabDataViewActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n String access_token = response.getString(\"access_token\");\n String token_type = response.getString(\"token_type\");\n String refresh_token = response.getString(\"refresh_token\");\n Integer expires_in = response.getInt(\"expires_in\");\n\n session.refreshAccessToken(access_token, refresh_token, token_type, expires_in);\n\n intent.putExtra(\"systemUid\", this.systemUid);\n System.out.println(\"System UID: \" + this.systemUid);\n intent.putExtra(\"access_token\", access_token);\n intent.putExtra(\"token_type\", token_type);\n intent.putExtra(\"refresh_token\", refresh_token);\n intent.putExtra(\"expires_in\", expires_in);\n\n startActivity(intent);\n overridePendingTransition(R.transition.slide_from_right, R.transition.slide_to_left);\n finish();\n\n } catch (JSONException e) {\n e.printStackTrace();\n Toast.makeText(getApplicationContext(), \"Something wrong...\",Toast.LENGTH_LONG).show();\n finish();\n }\n }\n else\n {\n Toast.makeText(getApplicationContext(), \"Something wrong...\",Toast.LENGTH_LONG).show();\n }\n }\n }", "@Override\n public void onTokenRefresh() {\n }", "private void initializeCurrentUser() {\n if (enableLoginActivity && mAuth.getCurrentUser() != null) {\n try {\n initializeUser();\n refreshGoogleCalendarToken();\n } catch (PetRepeatException e) {\n Toast toast = Toast.makeText(this, getString(R.string.error_pet_already_existing),\n Toast.LENGTH_LONG);\n toast.show();\n }\n\n if (mAuth.getCurrentUser() != null) {\n mAuth.getCurrentUser().getIdToken(false).addOnCompleteListener(task -> {\n user.setToken(Objects.requireNonNull(task.getResult()).getToken());\n });\n }\n }\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tnew Thread(){\n\t\t\t\t\tpublic void run(){\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmAuth.fetchSessionkey();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}.start();\n\n\t\t\t}", "public YelpAPI() {\n\t\tgetAccessToken();\n\t}", "@Override\r\n protected void onPostExecute(JSONObject jso) {\r\n try {\r\n dlg.dismiss();\r\n } catch (Exception e) { \r\n // Ignore this error \r\n }\r\n if (jso != null) {\r\n try {\r\n boolean succeeded = jso.getBoolean(\"succeeded\");\r\n String message = jso.getString(\"message\");\r\n \r\n if (succeeded) {\r\n String accountName = state.getAccount().getAccountName();\r\n MyAccount.initialize(MyPreferences.getContext());\r\n state.builder = MyAccount.Builder.newOrExistingFromAccountName(accountName, TriState.TRUE);\r\n showUserPreferences();\r\n new OAuthAcquireRequestTokenTask().execute();\r\n // and return back to default screen\r\n overrideBackButton = true;\r\n } else {\r\n Toast.makeText(AccountSettingsActivity.this, message, Toast.LENGTH_LONG).show();\r\n \r\n state.builder.setCredentialsVerificationStatus(CredentialsVerificationStatus.FAILED);\r\n showUserPreferences();\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "public static String getAccessToken() {\n return \"\";\n }", "@Override\n public void onSuccess(AuthorizeResult result) {\n // Your app is now authorized for the requested scopes\n System.out.println(\"Success \" + result);\n getAmazonToken();\n\n }", "@Override\n public void authenticate() throws IOException, BadAccessIdOrKeyException {\n try{\n HttpPost post = new HttpPost(Constants.FRGXAPI_TOKEN);\n List<NameValuePair> params = new ArrayList<>();\n params.add(new BasicNameValuePair(\"grant_type\", \"apiAccessKey\"));\n params.add(new BasicNameValuePair(\"apiAccessId\", accessId));\n params.add(new BasicNameValuePair(\"apiAccessKey\", accessKey));\n post.setEntity(new UrlEncodedFormEntity(params, \"UTF-8\"));\n\n HttpResponse response = client.execute(post);\n String a = response.getStatusLine().toString();\n\n if(a.equals(\"HTTP/1.1 400 Bad Request\")){\n throw (new BadAccessIdOrKeyException(\"Bad Access Id Or Key\"));\n }\n HttpEntity entity = response.getEntity();\n String responseString = EntityUtils.toString(response.getEntity());\n\n JsonParser jsonParser = new JsonParser();\n JsonObject jo = (JsonObject) jsonParser.parse(responseString);\n if(jo.get(\"access_token\") == null){\n throw new NullResponseException(\"The Access Token you get is null.\");\n }\n String accessToken = jo.get(\"access_token\").getAsString();\n List<Header> headers = new ArrayList<>();\n headers.add(new BasicHeader(HttpHeaders.CONTENT_TYPE, \"application/json\"));\n headers.add(new BasicHeader(\"Authorization\", \"Bearer \" + accessToken));\n\n client = HttpClients.custom().setDefaultHeaders(headers).build();\n } catch (NullResponseException e) {\n System.out.println(e.getMsg());\n }\n }", "public static void main(String[] args) throws Exception {\n if (args.length != 2) {\n throw new java.lang.RuntimeException(\"Please supply your key & secret\");\n }\n String apiKey = args[0];\n String apiSecret = args[1];\n\n OAuthConsumer consumer = new DefaultOAuthConsumer(apiKey, apiSecret);\n OAuthProvider provider = new DefaultOAuthProvider(\n \"https://api.audioboom.com/oauth/request_token\",\n \"https://api.audioboom.com/oauth/access_token\",\n \"https://api.audioboom.com/oauth/authorize\");\n\n System.out.println(\"Fetching request token from audioBoom...\");\n\n // we do not support callbacks, thus pass OOB\n String authUrl = provider.retrieveRequestToken(consumer, OAuth.OUT_OF_BAND);\n\n System.out.println(\"Request token: \" + consumer.getToken());\n System.out.println(\"Token secret: \" + consumer.getTokenSecret());\n\n System.out.println(\"Now visit:\\n\" + authUrl + \"\\n... and grant this app authorization\");\n System.out.println(\"Enter the PIN code and hit ENTER when you're done:\");\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String pin = br.readLine();\n\n System.out.println(\"Fetching access token from Audioboo...\");\n\n provider.retrieveAccessToken(consumer, pin);\n System.out.println(\"Access token: \" + consumer.getToken());\n System.out.println(\"Token secret: \" + consumer.getTokenSecret());\n\n // Now that we have an access token we can use it to make authenticated requests to the API. For example, fetching account details from https://api.audioboom.com/account \n\n System.out.println(\"Fetching account details...\");\n URL url = new URL(\"https://api.audioboom.com/account\");\n HttpURLConnection request = (HttpURLConnection) url.openConnection();\n consumer.sign(request);\n request.connect();\n\n BufferedReader responseBody = new BufferedReader(new InputStreamReader(request.getInputStream()));\n String responseLine;\n while ((responseLine = responseBody.readLine()) != null)\n System.out.println(responseLine);\n }", "private void preferences() {\n\tstartActivity (new Intent(getApplicationContext(), PushPreferencesActivity.class));\n}", "@Override\n protected void onCurrentAccessTokenChanged(AccessToken oldAccessToken, AccessToken currentAccessToken) {\n useLoginInformation(currentAccessToken);\n }", "private TokenBroadcastReceiver() { }", "private void login_finally(String token, String user_name){\n RequestBody requestBody = new FormBody.Builder()\r\n .add(\"username\", user_name)\r\n .add(\"password\", password)\r\n .build();\r\n\r\n HttpUtil.sendOkHttpRequest(Login.this, login_url, requestBody, new Callback(){\r\n int check_login_user = 0;\r\n String user_name;\r\n\r\n @Override\r\n public void onResponse(Call call, Response response) throws IOException{\r\n Slog.d(TAG, \"========header :\"+response.headers());\r\n String responseText = response.body().string();\r\n Slog.d(TAG, \"login response : \"+responseText);\r\n if(!TextUtils.isEmpty(responseText)){\r\n try {\r\n JSONObject login_response= new JSONObject(responseText);\r\n String sessionId = login_response.getString(\"sessid\");\r\n String session_name = login_response.getString(\"session_name\");\r\n JSONObject user = login_response.getJSONObject(\"user\");\r\n Slog.d(TAG, \"sessionId: \"+sessionId+\"===session name: \"+session_name);\r\n\r\n SharedPreferences.Editor editor = getSharedPreferences(\"session\", MODE_PRIVATE).edit();\r\n editor.putString(\"sessionId\", sessionId);\r\n editor.putString(\"sessionName\", session_name);\r\n editor.putInt(\"uid\", user.getInt(\"uid\"));\r\n editor.apply();\r\n\r\n Intent intent = new Intent(Login.this, MainActivity.class);\r\n startActivity(intent);\r\n\r\n\r\n }catch (JSONException e){\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n\r\n @Override\r\n public void onFailure(Call call, IOException e){\r\n runOnUiThread(new Runnable(){\r\n @Override\r\n public void run(){\r\n closeProgressDialog();\r\n Toast.makeText(Login.this, \"登录失败\", Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n }\r\n });\r\n }", "private void authentication() {\n if(getSmartApplication().readSharedPreferences().getString(SP_LAST_REQUEST_TIME,\"\").length()<=0){\n lnrSync.setVisibility(View.VISIBLE);\n txtSync.setText(getString(R.string.sync_with_server));\n globalConfiguration.loadGlobalConfiguration(new WebCallListener() {\n\n @Override\n public void onProgressUpdate(int progressCount) {\n }\n\n @Override\n public void onCallComplete(int responseCode, String errorMessage,\n ArrayList<HashMap<String, String>> data1, Object data2) {\n if (responseCode == 200) {\n globalConfiguration.loadAllData(true,\"1\",getLastRequestTime(),new WebCallListener() {\n @Override\n public void onCallComplete(final int responseCode, String errorMessage, ArrayList<HashMap<String, String>> data1, Object data2) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (responseCode == 200) {\n setLastRequestTime();\n getSmartApplication().writeSharedPreferences(SP_LAST_REQUEST_TIME,getLastRequestTime());\n lnrSync.setVisibility(View.GONE);\n lnrMain.setVisibility(View.VISIBLE);\n txtLoadingMsg.setText(getString(R.string.alert_loading_media));\n skProgress.setProgress(0);\n txtProgress.setText(\"0/0\");\n getSmartApplication().writeSharedPreferences(SP_ALLIMAGEDOWNLOADED,\"false\");\n new SobiproCategoriesDataProvider(IjoomerSplashActivity.this).startDownloadEntryImages(new ImageDownloadListener(){\n @Override\n public void onImgeDownload(int total, int countProgress) {\n if (countProgress < 0) {\n IjoomerUtilities.getCustomOkDialog(getString(R.string.splash),\n getString(getResources().getIdentifier(\"code\" + (599), \"string\", getPackageName())),\n getString(R.string.ok), R.layout.ijoomer_ok_dialog, new CustomAlertNeutral() {\n\n @Override\n public void NeutralMethod() {\n finish();\n }\n });\n } else {\n skProgress.setMax(total);\n skProgress.setProgress(countProgress);\n txtProgress.setText((countProgress) + \"/\" + (total));\n }\n }\n\n @Override\n public void onTaskComplete() {\n lnrMain.setVisibility(View.GONE);\n getSmartApplication().writeSharedPreferences(SP_ALLIMAGEDOWNLOADED,\"true\");\n try {\n loadNew(IjoomerHomeActivity.class,\n IjoomerSplashActivity.this, true,\n \"IN_USERID\", \"0\", \"IN_PRIVIOUS_ACTIVITY\",IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n });\n\n }else{\n responseMessageHandler(responseCode, true);\n }\n }\n });\n\n }\n\n @Override\n public void onProgressUpdate(final int progressCount) {\n\n }\n });\n }else{\n responseMessageHandler(responseCode, true);\n }\n }\n });\n }else{\n lnrSync.setVisibility(View.VISIBLE);\n txtSync.setText(getString(R.string.sync_with_server));\n if(SmartApplication.REF_SMART_APPLICATION.readSharedPreferences().getString(SP_LNAGUAGE,\"\").equals(\"es\")){\n globalConfiguration.loadConfigurationForSpanish(new WebCallListener() {\n\n @Override\n public void onProgressUpdate(int progressCount) {\n }\n\n @Override\n public void onCallComplete(int responseCode, String errorMessage,ArrayList<HashMap<String, String>> data1, Object data2) {\n if(responseCode==599){\n lnrSync.setVisibility(View.GONE);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n try {\n loadNew(IjoomerHomeActivity.class,IjoomerSplashActivity.this, true,\"IN_USERID\", \"0\",\"IN_PRIVIOUS_ACTIVITY\",IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n },1000);\n\n }else{\n globalConfiguration.loadAllData(false, \"0\", getLastRequestTime(), new WebCallListener() {\n @Override\n public void onCallComplete(int responseCode, String errorMessage, ArrayList<HashMap<String, String>> data1, Object data2) {\n getSmartApplication().writeSharedPreferences(SP_LAST_REQUEST_TIME, getLastRequestTime());\n if (responseCode == 200) {\n setLastRequestTime();\n if(getSmartApplication().readSharedPreferences().getString(SP_ALLIMAGEDOWNLOADED,\"false\").equals(\"false\")){\n lnrMain.setVisibility(View.VISIBLE);\n txtLoadingMsg.setText(getString(R.string.alert_loading_media));\n skProgress.setProgress(0);\n txtProgress.setText(\"0/0\");\n getSmartApplication().writeSharedPreferences(SP_ALLIMAGEDOWNLOADED,\"false\");\n new SobiproCategoriesDataProvider(IjoomerSplashActivity.this).startDownloadEntryImages(new ImageDownloadListener(){\n @Override\n public void onImgeDownload(int total, int countProgress) {\n if (countProgress < 0) {\n IjoomerUtilities.getCustomOkDialog(getString(R.string.splash),\n getString(getResources().getIdentifier(\"code\" + (599), \"string\", getPackageName())),\n getString(R.string.ok), R.layout.ijoomer_ok_dialog, new CustomAlertNeutral() {\n\n @Override\n public void NeutralMethod() {\n finish();\n }\n });\n } else {\n skProgress.setMax(total);\n skProgress.setProgress(countProgress);\n txtProgress.setText((countProgress) + \"/\" + (total));\n }\n }\n\n @Override\n public void onTaskComplete() {\n lnrMain.setVisibility(View.GONE);\n getSmartApplication().writeSharedPreferences(SP_ALLIMAGEDOWNLOADED,\"true\");\n try {\n loadNew(IjoomerHomeActivity.class,\n IjoomerSplashActivity.this, true,\n \"IN_USERID\", \"0\",\"IN_PRIVIOUS_ACTIVITY\",IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n });\n }else {\n new SobiproCategoriesDataProvider(IjoomerSplashActivity.this).startDownloadEntryImages(new ImageDownloadListener() {\n @Override\n public void onImgeDownload(int total, int countProgress) {\n\n }\n\n @Override\n public void onTaskComplete() {\n lnrSync.setVisibility(View.GONE);\n try {\n loadNew(IjoomerHomeActivity.class, IjoomerSplashActivity.this, true, \"IN_USERID\", \"0\", \"IN_PRIVIOUS_ACTIVITY\", IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n });\n\n }\n } else {\n lnrSync.setVisibility(View.GONE);\n try {\n loadNew(IjoomerHomeActivity.class, IjoomerSplashActivity.this, true, \"IN_USERID\", \"0\", \"IN_PRIVIOUS_ACTIVITY\", IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n }\n\n @Override\n public void onProgressUpdate(int progressCount) {\n\n }\n });\n\n\n\n }\n\n }\n });\n }else{\n globalConfiguration.loadConfigurationForEnglish(new WebCallListener() {\n\n @Override\n public void onProgressUpdate(int progressCount) {\n }\n\n @Override\n public void onCallComplete(int responseCode, String errorMessage,ArrayList<HashMap<String, String>> data1, Object data2) {\n if(responseCode==599){\n lnrSync.setVisibility(View.GONE);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n try {\n loadNew(IjoomerHomeActivity.class,IjoomerSplashActivity.this, true,\"IN_USERID\", \"0\",\"IN_PRIVIOUS_ACTIVITY\",IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n },1000);\n\n }else{\n globalConfiguration.loadAllData(false, \"0\", getLastRequestTime(), new WebCallListener() {\n @Override\n public void onCallComplete(int responseCode, String errorMessage, ArrayList<HashMap<String, String>> data1, Object data2) {\n getSmartApplication().writeSharedPreferences(SP_LAST_REQUEST_TIME, getLastRequestTime());\n if (responseCode == 200) {\n setLastRequestTime();\n if(getSmartApplication().readSharedPreferences().getString(SP_ALLIMAGEDOWNLOADED,\"false\").equals(\"false\")){\n lnrMain.setVisibility(View.VISIBLE);\n txtLoadingMsg.setText(getString(R.string.alert_loading_media));\n skProgress.setProgress(0);\n txtProgress.setText(\"0/0\");\n getSmartApplication().writeSharedPreferences(SP_ALLIMAGEDOWNLOADED,\"false\");\n new SobiproCategoriesDataProvider(IjoomerSplashActivity.this).startDownloadEntryImages(new ImageDownloadListener(){\n @Override\n public void onImgeDownload(int total, int countProgress) {\n if (countProgress < 0) {\n IjoomerUtilities.getCustomOkDialog(getString(R.string.splash),\n getString(getResources().getIdentifier(\"code\" + (599), \"string\", getPackageName())),\n getString(R.string.ok), R.layout.ijoomer_ok_dialog, new CustomAlertNeutral() {\n\n @Override\n public void NeutralMethod() {\n finish();\n }\n });\n } else {\n skProgress.setMax(total);\n skProgress.setProgress(countProgress);\n txtProgress.setText((countProgress) + \"/\" + (total));\n }\n }\n\n @Override\n public void onTaskComplete() {\n lnrMain.setVisibility(View.GONE);\n getSmartApplication().writeSharedPreferences(SP_ALLIMAGEDOWNLOADED,\"true\");\n try {\n loadNew(IjoomerHomeActivity.class,\n IjoomerSplashActivity.this, true,\n \"IN_USERID\", \"0\",\"IN_PRIVIOUS_ACTIVITY\",IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n });\n }else {\n new SobiproCategoriesDataProvider(IjoomerSplashActivity.this).startDownloadEntryImages(new ImageDownloadListener() {\n @Override\n public void onImgeDownload(int total, int countProgress) {\n\n }\n\n @Override\n public void onTaskComplete() {\n lnrSync.setVisibility(View.GONE);\n try {\n loadNew(IjoomerHomeActivity.class, IjoomerSplashActivity.this, true, \"IN_USERID\", \"0\", \"IN_PRIVIOUS_ACTIVITY\", IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n });\n\n }\n } else {\n lnrSync.setVisibility(View.GONE);\n try {\n loadNew(IjoomerHomeActivity.class, IjoomerSplashActivity.this, true, \"IN_USERID\", \"0\", \"IN_PRIVIOUS_ACTIVITY\", IN_PRIVIOUS_ACTIVITY);\n } catch (Throwable e1) {\n e1.printStackTrace();\n }\n }\n }\n\n @Override\n public void onProgressUpdate(int progressCount) {\n\n }\n });\n\n\n\n }\n\n }\n });\n }\n }\n\n\n }" ]
[ "0.6716623", "0.6676525", "0.6268245", "0.6144993", "0.5850179", "0.56656903", "0.5647591", "0.5607106", "0.5605502", "0.55221134", "0.54479015", "0.54046786", "0.5398968", "0.5378022", "0.53473806", "0.5335448", "0.5332855", "0.53147024", "0.53147024", "0.53018695", "0.5301294", "0.52926713", "0.528707", "0.5280992", "0.5257757", "0.5246526", "0.52366954", "0.5232916", "0.52064574", "0.5192044", "0.51691777", "0.5145737", "0.5131751", "0.5130864", "0.5124368", "0.5117297", "0.5107868", "0.50921756", "0.5086165", "0.5078615", "0.5052362", "0.50515044", "0.5049884", "0.5047498", "0.5042651", "0.50406635", "0.50406367", "0.5036377", "0.50208825", "0.5019843", "0.50195354", "0.5016731", "0.50094265", "0.49920803", "0.49879852", "0.49840346", "0.49833634", "0.497895", "0.4978076", "0.4974928", "0.49690598", "0.49597266", "0.49576563", "0.4953616", "0.49530208", "0.49485728", "0.49420622", "0.49378613", "0.49359113", "0.49334314", "0.49277285", "0.49230704", "0.4915483", "0.49139637", "0.49023455", "0.4897474", "0.48813233", "0.48811194", "0.48750743", "0.48645207", "0.48639986", "0.4858943", "0.48568094", "0.48557755", "0.485523", "0.48454654", "0.48438555", "0.4841369", "0.48409423", "0.48331133", "0.4828231", "0.4826549", "0.4826027", "0.48234054", "0.4819725", "0.48146114", "0.48078227", "0.4796522", "0.47962585", "0.4790026" ]
0.49258202
71
Fetch the authentication token using the Spotify Android SDK
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if(requestCode==request_Code){ AuthenticationResponse response = AuthenticationClient.getResponse(resultCode,data); if(response.getType()==AuthenticationResponse.Type.TOKEN){ accessToken = response.getAccessToken(); }else{ } } new SpotifyNewRelease(accessToken).execute(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getTokenViaClientCredentials(){\n\t\t//Do we have credentials?\n\t\tif (Is.nullOrEmpty(clientId) || Is.nullOrEmpty(clientSecret)){\n\t\t\treturn 1;\n\t\t}\n\t\ttry{\n\t\t\t//Build auth. header entry\n\t\t\tString authString = \"Basic \" + Base64.getEncoder().encodeToString((clientId + \":\" + clientSecret).getBytes());\n\t\t\t\n\t\t\t//Request headers\n\t\t\tMap<String, String> headers = new HashMap<>();\n\t\t\theaders.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t\theaders.put(\"Authorization\", authString);\n\t\t\t\n\t\t\t//Request data\n\t\t\tString data = ContentBuilder.postForm(\"grant_type\", \"client_credentials\");\n\t\t\t\n\t\t\t//Call\n\t\t\tlong tic = System.currentTimeMillis();\n\t\t\tthis.lastRefreshTry = tic;\n\t\t\tJSONObject res = Connectors.httpPOST(spotifyAuthUrl, data, headers);\n\t\t\tStatistics.addExternalApiHit(\"SpotifyApi getTokenViaClientCredentials\");\n\t\t\tStatistics.addExternalApiTime(\"SpotifyApi getTokenViaClientCredentials\", tic);\n\t\t\t//System.out.println(res.toJSONString()); \t\t//DEBUG\n\t\t\tif (!Connectors.httpSuccess(res)){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\tString token = JSON.getString(res, \"access_token\");\n\t\t\tString tokenType = JSON.getString(res, \"token_type\");\n\t\t\tlong expiresIn = JSON.getLongOrDefault(res, \"expires_in\", 0);\n\t\t\tif (Is.nullOrEmpty(token)){\n\t\t\t\treturn 4;\n\t\t\t}else{\n\t\t\t\tthis.token = token;\n\t\t\t\tthis.tokenType = tokenType;\n\t\t\t\tthis.tokenValidUntil = System.currentTimeMillis() + (expiresIn * 1000);\n\t\t\t}\n\t\t\treturn 0;\n\t\t\t\n\t\t}catch (Exception e){\n\t\t\tStatistics.addExternalApiHit(\"SpotifyApi-error getTokenViaClientCredentials\");\n\t\t\treturn 3;\n\t\t}\n\t}", "public String getAccessToken();", "String getAccessToken();", "String getAccessToken();", "private void requestToken(){\n APIAuth auth = new APIAuth(this.prefs.getString(\"email\", \"\"), this.prefs.getString(\"password\", \"\"), this.prefs.getString(\"fname\", \"\") + \" \" +this.prefs.getString(\"lname\", \"\"), this.prefs, null);\n auth.authenticate();\n }", "public SpotifyService getSpotifyService(){\n //Creates and configures a REST adapter for Spotify Web API.\n SpotifyApi wrapper = new SpotifyApi();\n if(!getAccessToken().equals(\"\") && getAccessToken()!=null) {\n wrapper.setAccessToken(getAccessToken());\n }else{\n Log.d(\"SpotifyNewRelease\",\"Invalid Access Token\");\n }\n SpotifyService spotifyService = wrapper.getService();\n return spotifyService;\n }", "public void retrieveAccessToken(Context context) {\n PBookAuth mPBookAuth = mApplicationPreferences.getPBookAuth();\n if (mPBookAuth == null || TextUtils.isEmpty(mPBookAuth.getClientName())) {\n view.onReturnAccessToken(null, false);\n return;\n }\n Ion.with(context).load(ACCESS_TOKEN_SERVICE_URL).setBodyParameter(\"client\", mPBookAuth.getClientName()).setBodyParameter(\"phoneNumber\", mPBookAuth.getPhoneNumber()).setBodyParameter(\"platform\", PLATFORM_KEY).asString().setCallback(new FutureCallback<String>() {\n @Override\n public void onCompleted(Exception e, String accessToken) {\n if (e == null || !TextUtils.isEmpty(accessToken)) {\n mApplicationPreferences.setTwilioToken(accessToken);\n view.onReturnAccessToken(accessToken, true);\n } else {\n view.onReturnAccessToken(accessToken, false);\n }\n }\n });\n }", "public java.lang.String getOauth_token(){\r\n return localOauth_token;\r\n }", "OAuth2Token getToken();", "private static Tuple<Integer, String> getToken() {\n\t\tTuple<Integer, String> result = new Tuple<Integer, String>();\n\t\tresult = GETRequest(AUTH_URL, AUTH_HEADER, \"\", \"\");\n\t\treturn result;\n\t}", "private void retrieveAccessToken() {\n Log.d(TAG, \"at retreiveAccessToken\");\n String accessURL = TWILIO_ACCESS_TOKEN_SERVER_URL + \"&identity=\" + \"1234\" + \"a\";\n Log.d(TAG, \"accessURL \" + accessURL);\n Ion.with(this).load(accessURL).asString().setCallback(new FutureCallback<String>() {\n @Override\n public void onCompleted(Exception e, String accessToken) {\n if (e == null) {\n Log.d(TAG, \"Access token: \" + accessToken);\n MainActivity.this.accessToken = accessToken;\n registerForCallInvites();\n } else {\n Toast.makeText(MainActivity.this,\n \"Error retrieving access token. Unable to make calls\",\n Toast.LENGTH_LONG).show();\n Log.d(TAG, e.toString());\n }\n }\n });\n }", "private void getAccessToken() {\n\n\t\tMediaType mediaType = MediaType.parse(\"application/x-www-form-urlencoded\");\n\t\tRequestBody body = RequestBody.create(mediaType,\n\t\t\t\t\"client_id=\" + CONSUMER_KEY + \"&client_secret=\" + CONSUMER_SECRET + \"&grant_type=client_credentials\");\n\t\tRequest request = new Request.Builder().url(\"https://api.yelp.com/oauth2/token\").post(body)\n\t\t\t\t.addHeader(\"cache-control\", \"no-cache\").build();\n\n\t\ttry {\n\t\t\tokhttp3.Response response = client.newCall(request).execute();\n\t\t\tString respbody = response.body().string().trim();\n\t\t\tJSONParser parser = new JSONParser();\n\t\t\tJSONObject json = (JSONObject) parser.parse(respbody);\n\t\t\taccessToken = (String) json.get(\"access_token\");\n\t\t} catch (IOException | ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private String getToken() {\n String keyFilePath = System.getenv(\"APE_API_KEY\");\n if (Strings.isNullOrEmpty(keyFilePath)) {\n File globalKeyFile = GlobalConfiguration.getInstance().getHostOptions().\n getServiceAccountJsonKeyFiles().get(GLOBAL_APE_API_KEY);\n if (globalKeyFile == null || !globalKeyFile.exists()) {\n CLog.d(\"Unable to fetch the service key because neither environment variable \" +\n \"APE_API_KEY is set nor the key file is dynamically downloaded.\");\n return null;\n }\n keyFilePath = globalKeyFile.getAbsolutePath();\n }\n if (Strings.isNullOrEmpty(mApiScope)) {\n CLog.d(\"API scope not set, use flag --business-logic-api-scope.\");\n return null;\n }\n try {\n Credential credential = GoogleCredential.fromStream(new FileInputStream(keyFilePath))\n .createScoped(Collections.singleton(mApiScope));\n credential.refreshToken();\n return credential.getAccessToken();\n } catch (FileNotFoundException e) {\n CLog.e(String.format(\"Service key file %s doesn't exist.\", keyFilePath));\n } catch (IOException e) {\n CLog.e(String.format(\"Can't read the service key file, %s\", keyFilePath));\n }\n return null;\n }", "@Override\n public Object getCredentials() {\n return token;\n }", "java.lang.String getRemoteToken();", "public static void requestToken(String username, String password, Context context) {\n SharedPreferences preferences = context.getSharedPreferences(token_storage, 0);\n SharedPreferences.Editor editor = preferences.edit();\n Call<Token> call = kedronService.getToken(\"password\", username, password);\n\n try {\n Log.d(\"Service\", \"Using a new token\");\n auth_token = call.execute().body();\n\n Log.d(\"Service\", \"Token received\");\n\n isTokenPresent = true;\n } catch (IOException e) {\n Log.e(\"TOKEN\", \"Failed to retrieve the token\", e);\n }\n\n header_token = \"Bearer \" + auth_token;\n\n editor.putString(\"token\", auth_token.getToken());\n editor.apply();\n\n bindToken();\n }", "public OAuthTokenResponse getToken() {\n return token;\n }", "@Nullable\n private String fetchToken() throws IOException {\n try {\n return GoogleAuthUtil.getToken(mActivity, mEmail, mScope);\n } catch (UserRecoverableAuthException ex) {\n // GooglePlayServices.apk is either old, disabled, or not present\n // so we need to show the user some UI in the activity to recover.\n // TODO: complain about old version\n Log.e(\"aqx1010\", \"required Google Play version not found\", ex);\n } catch (GoogleAuthException fatalException) {\n // Some other type of unrecoverable exception has occurred.\n // Report and log the error as appropriate for your app.\n Log.e(\"aqx1010\", \"fatal authorization exception\", fatalException);\n }\n return null;\n }", "static String getToken(Context context) {\r\n SharedPreferences preferences = context.getSharedPreferences(context.getString(R.string.shared_preferences), MODE_PRIVATE);\r\n return preferences.getString(context.getString(R.string.token), null);\r\n }", "Pokemon.RequestEnvelop.AuthInfo.JWT getToken();", "void onGetTokenSuccess(AccessTokenData token);", "AccessToken getOAuthAccessToken(RequestToken requestToken) throws MoefouException;", "public AuthorizationToken retrieveToken(String token);", "String getToken(String scope, String username, String password) throws AuthorizationException;", "public AccessToken getAccessToken() {\n return token;\n }", "public String getAccessToken() {\n return accessToken;\n }", "public String getAccessToken() {\n return accessToken;\n }", "Future<String> getAccessToken(OkapiConnectionParams params);", "public String getAccessToken(){\n //return \"3be8b617e076b96b2b0fa6369b6c72ed84318d72\";\n return MobileiaAuth.getInstance(mContext).getCurrentUser().getAccessToken();\n }", "@FormUrlEncoded\n @POST(\"/oauth/access_token\")\n Flowable<ResponseBody> getAccessToken(@Field(\"oauth_verifier\") String oauthVerifier);", "public static String getAccessToken() {\n return accessToken;\n }", "public RetrieveTokenApi getRetrieveToken() {\n return retrieveTokenApi;\n }", "AccessToken getOAuthAccessToken(RequestToken requestToken, String oauthVerifier) throws MoefouException;", "String getComponentAccessToken();", "AccessToken getOAuthAccessToken() throws MoefouException;", "interface PodAuthService {\n @FormUrlEncoded\n @POST(\"/oauth/token\")\n Observable<Auth> authenticate(\n @Field(\"grant_type\") String grantType,\n @Field(\"username\") String username,\n @Field(\"password\") String password,\n @Field(\"client_id\") String clientId,\n @Field(\"client_secret\") String clientSecret\n );\n\n @FormUrlEncoded\n @POST(\"/oauth/token\")\n Observable<Auth> refreshToken(\n @Field(\"grant_type\") String grantType,\n @Field(\"client_id\") String clientId,\n @Field(\"client_secret\") String clientSecret,\n @Field(\"refresh_token\") String refreshToken\n );\n}", "public void getGoogleToken() {\n String googleEmail = sharedpreferences.getString(\"GoogleEmail\", \"\");\n String scopes = sharedpreferences.getString(\"GoogleScopes\", \"\");\n if (!\"\".equals(googleEmail)) {\n MyAsyncTask asyncTask = new MyAsyncTask(googleEmail, scopes, this.getBaseContext());\n asyncTask.delegate = this;\n asyncTask.execute();\n }\n }", "public String getAccessToken() {\n return accessToken;\n }", "AccessToken getOAuthAccessToken(String oauthVerifier) throws MoefouException;", "GetToken.Req getGetTokenReq();", "@Test\n public void cTestGetLoginToken() {\n token = given()\n .param(\"username\", \"playlist\")\n .param(\"password\", \"playlist\")\n .post(\"/login\")\n .jsonPath().getString(\"token\");\n }", "private static String getCloudAuth(String accessToken) {\n\t\ttry {\n\t\t\tURL urlResource = new URL(\"https://myapi.pathomation.com/api/v1/authenticate\");\n\t\t\tURLConnection conn = urlResource.openConnection();\n\t\t\tconn.setRequestProperty( \"Authorization\", \"Bearer \" + accessToken);\n\t\t\tconn.setUseCaches( false );\n\t\t\treturn getResponseString(conn);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "public static String getAccessToken() {\n return \"\";\n }", "public synchronized void acquireTokenAsync() {\n if (this.mCallback == null) {\n String str = Analytics.LOG_TAG;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Calling token provider=\");\n sb.append(this.mType);\n sb.append(\" callback.\");\n AppCenterLog.debug(str, sb.toString());\n this.mCallback = new AuthenticationCallback() {\n public void onAuthenticationResult(String str, Date date) {\n AuthenticationProvider.this.handleTokenUpdate(str, date, this);\n }\n };\n this.mTokenProvider.acquireToken(this.mTicketKey, this.mCallback);\n }\n }", "private CdekAuthToken getAuthToken()\n {\n String authEndpoint = conf.ENDPOINT + \"/oauth/token?grant_type={grant_type}&client_id={client_id}&client_secret={client_secret}\";\n\n HttpHeaders defaultHeaders = new HttpHeaders();\n HttpEntity req = new HttpEntity(defaultHeaders);\n\n return rest.postForObject(authEndpoint, req, CdekAuthToken.class, conf.getAuthData());\n }", "RequestToken getOAuthRequestToken() throws MoefouException;", "Pokemon.RequestEnvelop.AuthInfo.JWTOrBuilder getTokenOrBuilder();", "@GET(\"users/signin\")\r\n Call<User> signIn(@Header(\"Authorization\") String token);", "public static String getAccessToken(Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\treturn prefs.getString(TWITTER_ACCESS_TOKEN, null);\n\t\t}", "Pokemon.RequestEnvelop.AuthInfo getAuth();", "GoogleAuthenticatorKey createCredentials();", "static @NonNull String getAuthToken(@NonNull Context context) throws AuthException {\n final long startTime = System.currentTimeMillis();\n final GoogleApiClient googleApiClient = getClient(context);\n try {\n final ConnectionResult result = googleApiClient.blockingConnect();\n if (result.isSuccess()) {\n final GoogleSignInResult googleSignInResult = Auth.GoogleSignInApi.silentSignIn(googleApiClient).await();\n final GoogleSignInAccount account = googleSignInResult.getSignInAccount();\n if(account != null) {\n final String authToken = account.getIdToken();\n if(authToken != null) {\n Log.i(TAG, \"Got auth token in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n return authToken;\n } else {\n throw new AuthException(\"Failed to get auth token\");\n }\n } else {\n throw new AuthException(\"Not signed in\");\n }\n } else {\n throw new AuthException(\"Sign in connection error\");\n }\n } finally {\n googleApiClient.disconnect();\n }\n }", "public String getAuthtoken() {\n return authtoken;\n }", "void onAuthenticationSucceeded(String token);", "public String getAccessToken () {\n\t\treturn this.accessToken;\n\t}", "public String getToken();", "public static Oauth2AccessToken readAccessToken() {\n Oauth2AccessToken token = new Oauth2AccessToken();\n SharedPrefWrapper sharedPref = SharedPrefWrapper.getInstance();\n\n token.setUid(sharedPref.getWeiboUID());\n token.setToken(sharedPref.getWeiboAccessToken());\n token.setExpiresTime(sharedPref.getWeiboExpiresTime());\n return token;\n }", "public static String getRequestToken(Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\treturn prefs.getString(TWITTER_REQUEST_TOKEN, null);\n\t\t}", "public String getAccessToken() {\n\t\treturn accessToken;\n\t}", "public String getAccessToken() {\n\t\treturn accessToken;\n\t}", "@Override\n public void authenticate() throws IOException, BadAccessIdOrKeyException {\n try{\n HttpPost post = new HttpPost(Constants.FRGXAPI_TOKEN);\n List<NameValuePair> params = new ArrayList<>();\n params.add(new BasicNameValuePair(\"grant_type\", \"apiAccessKey\"));\n params.add(new BasicNameValuePair(\"apiAccessId\", accessId));\n params.add(new BasicNameValuePair(\"apiAccessKey\", accessKey));\n post.setEntity(new UrlEncodedFormEntity(params, \"UTF-8\"));\n\n HttpResponse response = client.execute(post);\n String a = response.getStatusLine().toString();\n\n if(a.equals(\"HTTP/1.1 400 Bad Request\")){\n throw (new BadAccessIdOrKeyException(\"Bad Access Id Or Key\"));\n }\n HttpEntity entity = response.getEntity();\n String responseString = EntityUtils.toString(response.getEntity());\n\n JsonParser jsonParser = new JsonParser();\n JsonObject jo = (JsonObject) jsonParser.parse(responseString);\n if(jo.get(\"access_token\") == null){\n throw new NullResponseException(\"The Access Token you get is null.\");\n }\n String accessToken = jo.get(\"access_token\").getAsString();\n List<Header> headers = new ArrayList<>();\n headers.add(new BasicHeader(HttpHeaders.CONTENT_TYPE, \"application/json\"));\n headers.add(new BasicHeader(\"Authorization\", \"Bearer \" + accessToken));\n\n client = HttpClients.custom().setDefaultHeaders(headers).build();\n } catch (NullResponseException e) {\n System.out.println(e.getMsg());\n }\n }", "GetToken.Res getGetTokenRes();", "java.lang.String getAuth();", "java.lang.String getAuth();", "java.lang.String getAuth();", "@Api(1.0)\n @NonNull\n public String getAccessToken() {\n return mAccessToken;\n }", "public String getToken()\n {\n return ssProxy.getToken();\n }", "RequestToken getOAuthRequestToken(String callbackURL) throws MoefouException;", "private String m2194g() {\n return this.f980b.m1158c().getSharedPreferences(\"com.facebook.login.AuthorizationClient.WebViewAuthHandler.TOKEN_STORE_KEY\", 0).getString(\"TOKEN\", \"\");\n }", "public java.lang.String getAccessToken(java.lang.String userName, java.lang.String password) throws java.rmi.RemoteException;", "private static String getAppTokenId() {\n if (appTokenId == null) {\n synchronized (DefaultEntityManagerImpl.class) {\n if (appTokenId == null) {\n try {\n if (OAuthProperties.isServerMode()) {\n appTokenId = OAuthServiceUtils.getAdminTokenId();\n }\n else {\n final String username =\n OAuthProperties.get(PathDefs.APP_USER_NAME);\n final String password =\n OAuthProperties.get(PathDefs.APP_USER_PASSWORD);\n appTokenId =\n OAuthServiceUtils.authenticate(username, password, false);\n }\n }\n catch (final OAuthServiceException oe) {\n Logger.getLogger(DefaultEntityManagerImpl.class.getName()).log(\n Level.SEVERE, null, oe);\n throw new WebApplicationException(oe);\n }\n }\n }\n }\n return appTokenId;\n }", "public interface OAuthTokenStoreAdapter {\n\n void storeAccessToken(AccessToken token);\n AccessToken retrieveAccessToken(String value);\n\n void storeRefreshToken(RefreshToken token);\n RefreshToken retrieveRefreshToken(String value);\n}", "@GET(\"sdk/v5/sessions\")\n Call<SessionResponse> getSession(@Header(\"Authorization\") String Authorization);", "public UserInfo getUserInfoByToken(String token) {\n LOGGER.debug(\"Start user info request to OAuth service\");\n\n try {\n HttpHeaders headers = new HttpHeaders();\n headers.setBearerAuth(token);\n HttpEntity<Object> applicationRequest = new HttpEntity<>(headers);\n return UserInfoBuilder.buildWithEnv(env,\n restTemplate\n .exchange(userInfoUrl,\n HttpMethod.GET,\n applicationRequest,\n JsonNode.class)\n .getBody());\n } catch (ResourceAccessException | HttpStatusCodeException e) {\n throw new AuthenticationServiceException(\"Error during request\", e);\n }\n }", "protected AccessToken getAccessToken() \n\t{\n\t\treturn accessToken;\n\t}", "public interface AuthAPIService {\n\n @FormUrlEncoded\n @POST(\"/oauth/token\")\n public Observable<Tokens> getAccessTokensObs(@Field(\"grant_type\") String grantType,\n @Field(\"scope\") String manageProject,\n @Header(\"Authorization\") String authHeader);\n\n}", "@Override\n\tpublic void login() {\n\t\tAccountManager accountManager = AccountManager.get(context);\n\t\tAccount[] accounts = accountManager.getAccountsByType(GOOGLE_ACCOUNT_TYPE);\n\t\tif(accounts.length < 1) throw new NotAccountException(\"This device not has account yet\");\n\t\tfinal String userName = accounts[0].name;\n\t\tfinal String accountType = accounts[0].type;\n\t\tBundle options = new Bundle();\n\t\tif(comService.isOffLine()){\n\t\t\tsetCurrentUser(new User(userName, userName, accountType));\n\t\t\treturn;\n\t\t}\n\t\taccountManager.getAuthToken(accounts[0], AUTH_TOKEN_TYPE, options, (Activity)context, \n\t\t\t\tnew AccountManagerCallback<Bundle>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run(AccountManagerFuture<Bundle> future) {\n\t\t\t\t\t\tString token = \"\";\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tBundle result = future.getResult();\n\t\t\t\t\t\t\ttoken = result.getString(AccountManager.KEY_AUTHTOKEN);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsetCurrentUser(new User(userName, userName, accountType, token));\n\t\t\t\t\t\t} catch (OperationCanceledException e) {\n\t\t\t\t\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tLog.d(\"Login\", \"Token: \" + token);\n\t\t\t\t\t}\n\t\t\t\t}, new Handler(new Handler.Callback() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean handleMessage(Message msg) {\n\t\t\t\t\t\tLog.d(\"Login\", msg.toString());\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}));\n\t}", "@Override\n\t\tprotected Void doInBackground(Uri...params) {\n\t\t\tfinal Uri uri = params[0];\n\t\t\tfinal String oauth_verifier = uri.getQueryParameter(OAuth.OAUTH_VERIFIER);\n\n\t\t\ttry {\n\t\t\t\tprovider.retrieveAccessToken(consumer, oauth_verifier);\n\n\t\t\t\tfinal Editor edit = prefs.edit();\n\t\t\t\tedit.putString(OAuth.OAUTH_TOKEN, consumer.getToken());\n\t\t\t\tedit.putString(OAuth.OAUTH_TOKEN_SECRET, consumer.getTokenSecret());\n\t\t\t\tedit.commit();\n\t\t\t\t\n\t\t\t\tString token = prefs.getString(OAuth.OAUTH_TOKEN, \"\");\n\t\t\t\tString secret = prefs.getString(OAuth.OAUTH_TOKEN_SECRET, \"\");\n\t\t\t\t\n\t\t\t\tconsumer.setTokenWithSecret(token, secret);\n\t\t\t\tstartActivity(new Intent(context,ViewListingActivity.class));\n\n\t\t\t\texecuteAfterAccessTokenRetrieval();\n\t\t\t\t\n\t\t\t\tLog.i(TAG, \"OAuth - Access Token Retrieved\");\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(TAG, \"OAuth - Access Token Retrieval Error\", e);\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "public static void GetAuthToken() throws IOException, ClassNotFoundException {\n Socket client = ConnectionToServer();\n\n // connects to the server with information and attempts to get the auth token for the user after successful Login\n if (client.isConnected()) {\n\n OutputStream outputStream = client.getOutputStream();\n InputStream inputStream = client.getInputStream();\n\n ObjectOutputStream send = new ObjectOutputStream(outputStream);\n ObjectInputStream receiver = new ObjectInputStream(inputStream);\n\n send.writeUTF(\"AuthToken\");\n send.writeUTF(loggedInUser);\n send.flush(); // Must be done before switching to reading state\n\n // Store the auth token for the user\n token = (String) receiver.readObject();\n// System.out.println(token);\n\n// End connections\n send.close();\n receiver.close();\n client.close();\n }\n }", "List<ExposedOAuthCredentialModel> readExposedOAuthCredentials();", "public String getToken(String name){\n\n return credentials.get(name, token);\n }", "protected final String getAccessToken() {\n Session currentSession = sessionTracker.getOpenSession();\n return (currentSession != null) ? currentSession.getAccessToken() : null;\n }", "Object getAuthInfoKey();", "public String getAccessToken()\n {\n if (accessToken == null)\n {\n if (DEBUG)\n {\n System.out.println(\"Access token is empty\");\n }\n try\n {\n FileReader fileReader = new FileReader(getCache(\"token\"));\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n accessToken = bufferedReader.readLine();\n if (DEBUG)\n {\n System.out.println(\"BufferReader line: \" + accessToken);\n }\n } catch (FileNotFoundException e)\n {\n e.printStackTrace();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return accessToken;\n }", "public String getAppAuthToken() {\n if (appTokenExpireTime == null || appTokenExpireTime.before(new Date())) {\n try {\n TokenResponse tokenResponse = authClient.authenticateApp(createAppAuthHeader(), WatsonWorkConstants.CLIENT_CREDENTIALS).execute().body();\n appTokenExpireTime = getDate(tokenResponse.getExpiresIn());\n appToken = tokenResponse.getAccessToken();\n } catch (Exception e) {\n log.error(e.getMessage());\n }\n }\n return WatsonWorkConstants.BEARER + appToken;\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n super.onActivityResult(requestCode, resultCode, intent);\n\n // Check if result comes from the correct activity\n if (requestCode == REQUEST_CODE) {\n AuthenticationResponse response = AuthenticationClient.getResponse(resultCode, intent);\n\n switch (response.getType()) {\n // Successful response, token received\n case TOKEN:\n // Store access token for later use\n editor = getSharedPreferences(\"SPOTIFY\", 0).edit();\n editor.putString(\"token\", response.getAccessToken());\n editor.apply();\n\n // Move to genre list activity if authentication was successful\n Intent genreIntent = new Intent(SpotifyAuthActivity.this, GenreListActivity.class);\n startActivity(genreIntent);\n break;\n\n case ERROR:\n Toast.makeText(SpotifyAuthActivity.this, \"ERROR\", Toast.LENGTH_LONG);\n break;\n\n default:\n Toast.makeText(SpotifyAuthActivity.this, \"CANCELLED\", Toast.LENGTH_LONG);\n }\n }\n }", "protected String getAuthMethod() {\n return \"Token\" ;// TODO this.conf.getAuthMethod();\n }", "@Override\n public void onResponse(String response) {\n\n try {\n\n SharedPreferences.Editor editor = prefs.edit();\n JSONObject data= new JSONObject(response);\n String token = data.getString(\"access_token\");\n editor.putString(\"token\", token);\n\n getDatosUser(usuario,token);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }", "public @NonNull MediaSession.Token getSessionToken() {\n return mToken;\n }", "public GoogleAuthHelper() {\n\t\t\n\t\tLoadType<ClientCredentials> credentials = ofy().load().type(ClientCredentials.class);\n\t\t\n\t\tfor(ClientCredentials credential : credentials) {\n\t\t\t// static ClientCredentials credentials = new ClientCredentials();\n\t\t\tCALLBACK_URI = credential.getCallBackUri();\n\t\t\tCLIENT_ID = credential.getclientId();\n\t\t\tCLIENT_SECRET = credential.getClientSecret();\n\t\t}\n\t\t\n\t\tflow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT,\n\t\t\t\tJSON_FACTORY, CLIENT_ID, CLIENT_SECRET, SCOPE).setAccessType(\n\t\t\t\t\"offline\").build();\n\t\tgenerateStateToken();\n\t}", "@Nullable\n public String getAccessToken() {\n return accessToken;\n }", "@Override\n public String refresh() {\n\n // Override the existing token\n setToken(null);\n\n // Get the identityId and token by making a call to your backend\n // (Call to your backend)\n\n // Call the update method with updated identityId and token to make sure\n // these are ready to be used from Credentials Provider.\n\n update(identityId, token);\n return token;\n\n }", "public String getAppToken() {\r\n return appToken;\r\n }", "@FormUrlEncoded\n @POST(\"oauth/request_token\")\n Flowable<ResponseBody> requestToken(@Field(\"oauth_callback\") String oauthCallback);", "public void makeCallGetWithToken(String url, Context context, String token, CompleteListener<String> mCompleteTaskListener) {\n //Instantiate the RequestQueue\n mCompleteTaskListener.setProgressBar(true);\n RequestQueue queue = Volley.newRequestQueue(context);\n //Request a string response from the provided URL\n StringRequest stringRequest = new StringRequest(Request.Method.GET, url,\n response -> {\n Log.v(TAG, \"Json result: > \" + response);\n //Listeners for use methods of activity\n mCompleteTaskListener.setProgressBar(false);\n mCompleteTaskListener.onTaskComplete(true, response);\n }, error -> {\n Log.e(TAG, context.getResources().getString(R.string.error_label));\n //Listeners for use methods of activity\n mCompleteTaskListener.setProgressBar(false);\n mCompleteTaskListener.onTaskComplete(false, context.getResources().getString(R.string.error_label));\n }) {\n //Set the header of the request\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headerMap = new HashMap<String, String>();\n headerMap.put(\"Content-Type\", \"application/json\");\n headerMap.put(\"Authorization\", \"Bearer \" + token);\n return headerMap;\n }\n };\n //Add the request to the RequestQueue\n queue.add(stringRequest);\n }", "public String getAccessToken() {\n readLock.lock();\n try {\n return accessToken;\n } finally {\n readLock.unlock();\n }\n }", "private String GetAccessToken() {\n final String grantType = \"password\";\n final String resourceId = \"https%3A%2F%2Fgraph.microsoft.com%2F\";\n final String tokenEndpoint = \"https://login.microsoftonline.com/common/oauth2/token\";\n\n try {\n URL url = new URL(tokenEndpoint);\n HttpURLConnection conn;\n if (configuration.isProxyUsed()) {\n Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(configuration.getProxyServer(), configuration.getProxyPort()));\n conn = (HttpURLConnection) url.openConnection(proxy);\n } else {\n conn = (HttpURLConnection) url.openConnection();\n }\n\n String line;\n StringBuilder jsonString = new StringBuilder();\n\n conn.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n conn.setRequestMethod(\"POST\");\n conn.setDoInput(true);\n conn.setDoOutput(true);\n conn.setInstanceFollowRedirects(false);\n conn.connect();\n\n try (OutputStreamWriter outputStreamWriter = new OutputStreamWriter(conn.getOutputStream(), StandardCharsets.UTF_8)) {\n String payload = String.format(\"grant_type=%1$s&resource=%2$s&client_id=%3$s&username=%4$s&password=%5$s\",\n grantType,\n resourceId,\n clientId,\n username,\n password);\n outputStreamWriter.write(payload);\n }\n\n try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n while((line = br.readLine()) != null) {\n jsonString.append(line);\n }\n }\n\n conn.disconnect();\n\n JsonObject res = new GsonBuilder()\n .create()\n .fromJson(jsonString.toString(), JsonObject.class);\n\n return res\n .get(\"access_token\")\n .toString()\n .replaceAll(\"\\\"\", \"\");\n\n } catch (IOException e) {\n throw new IllegalAccessError(\"Unable to read authorization response: \" + e.getLocalizedMessage());\n }\n }", "@Override\n\t\tprotected TokenRes doInBackground(Void... params) {\n\t\t\treturn JsonOA.getToken();\n\t\t}", "public interface TokenProvider {\n /**\n * @return an always valid access token.\n */\n String getAccessToken();\n\n /**\n * Forces a refresh of all tokens.\n *\n * @return the newly refreshed access token.\n */\n String refreshTokens();\n}", "public String getApiToken() {\n return apiToken;\n }" ]
[ "0.69330066", "0.6782733", "0.6770452", "0.6770452", "0.6749736", "0.6749552", "0.650303", "0.648835", "0.64834917", "0.64396393", "0.6311057", "0.6281432", "0.6210264", "0.6147989", "0.6095018", "0.6062734", "0.60540354", "0.6046713", "0.6045714", "0.6044652", "0.60184765", "0.6013158", "0.599232", "0.59909034", "0.5921084", "0.5903586", "0.589718", "0.58805364", "0.5879624", "0.5870778", "0.5868573", "0.58520484", "0.58267164", "0.5822269", "0.58214986", "0.5789523", "0.5770203", "0.57321715", "0.5727892", "0.5726368", "0.5726032", "0.5708022", "0.5694268", "0.569361", "0.5675985", "0.5672997", "0.5668564", "0.5661515", "0.5636983", "0.5593125", "0.55913734", "0.5590238", "0.55876184", "0.55868393", "0.5570462", "0.55612886", "0.5546221", "0.5533357", "0.5521455", "0.5521455", "0.55167156", "0.5502353", "0.5497353", "0.5497353", "0.5497353", "0.5488046", "0.548597", "0.5484775", "0.5468583", "0.5441333", "0.5437779", "0.54217833", "0.54186827", "0.5414478", "0.54127353", "0.5411236", "0.5405091", "0.53911585", "0.53856665", "0.5367033", "0.53651756", "0.5361362", "0.53526556", "0.53500277", "0.5348972", "0.53423995", "0.5341823", "0.53388953", "0.53361857", "0.5329356", "0.5327198", "0.53270054", "0.5325136", "0.5324118", "0.53181905", "0.5317448", "0.53145427", "0.5311573", "0.53064877", "0.5302451" ]
0.67090935
6
Hides all View elements until the page is loaded and shows the progress bar.
public void showProgress(){ loadMainActivity.setVisibility(View.VISIBLE); recyclerView.setVisibility(View.INVISIBLE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showLoading()\n {\n relLoadingPanel.setVisibility(View.VISIBLE);\n ViewHelper.setViewGroupEnabled(scrMainContainer, false);\n }", "private void hideLoading()\n {\n relLoadingPanel.setVisibility(View.GONE);\n ViewHelper.setViewGroupEnabled(scrMainContainer, true);\n }", "void hideProgress() {\n removeProgressView();\n removeScreenshotView();\n }", "public void showLoadingView() {\n handleLoadingContainer(false /* showContent */, false /* showEmpty */, false /* animate */);\n }", "private void showLoading() {\n hideNoNetwork();\n mRecipesBinding.fragmentRecipesProgressBar.setVisibility(View.VISIBLE);\n }", "protected void hideLoader() {\n\n if (progressBar != null) {\n progressBar.setVisibility(View.INVISIBLE);\n }\n if(getActivity()!=null) {\n getActivity().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n }\n\n }", "@Override\n protected void onPreExecute() {\n mLytContainerLayout.setVisibility(View.GONE);\n mToolbar.setVisibility(View.GONE);\n mPrgLoading.setVisibility(View.VISIBLE);\n }", "@Override\n public void hideProgressBar() {\n if (getActivity() != null) {\n getActivity().runOnUiThread(() -> {\n if (progressBarLayout != null && progressBar != null) {\n progressBar.setVisibility(View.GONE);\n progressBarLayout.setVisibility(View.GONE);\n }\n });\n }\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tloadingView.setVisibility(View.VISIBLE);\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressLayout.setVisibility(View.VISIBLE);\n\n\t\t}", "protected void showLoader() {\n if (progressBar != null) {\n progressBar.setVisibility(View.VISIBLE);\n }\n if(getActivity()!=null) {\n getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,\n WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n }\n }", "private void showLoading() {\n mRecycleView.setVisibility(View.INVISIBLE);\n /* Finally, show the loading indicator */\n mLoadingIndicator.setVisibility(View.VISIBLE);\n }", "private void hideLoadingAndUpdate() {\n image.setVisibility(View.VISIBLE);\n loadingBar.setVisibility(View.INVISIBLE);\n shareBtn.setVisibility(shareBtnVisibility);\n\n }", "public void showLoading() {\n loadingLayout.setVisibility(View.VISIBLE);\n mapView.setVisibility(View.GONE);\n errorLayout.setVisibility(View.GONE);\n }", "private void startProgressBar() {\n\t b_buscar.setVisibility(View.GONE);\n\t // wi_progreso.setVisibility(View.VISIBLE);\n\t ly_progreso.setVisibility(View.VISIBLE);\n\t}", "@Override\n public void hideLoading() {\n if (progressDialog!=null && progressDialog.isShowing()){\n progressDialog.dismiss();\n }\n }", "@Override\n protected void onStartLoading() {\n progressBar.setVisibility(View.VISIBLE);\n forceLoad();\n }", "@Override\n\tprotected void onPreExecute() {\n\t\tprogressBar.setVisibility(View.VISIBLE);\n\t\ttv.setVisibility(View.VISIBLE);\n\t\tsuper.onPreExecute();\n\t}", "@Override\r\n public void beforeTaskComplete() {\r\n if (recyclerView.getChildCount() < 1) {\r\n recyclerView.setVisibility(View.GONE);\r\n }\r\n progressBar.setVisibility(View.VISIBLE);\r\n }", "public void showProgressBar() {\n\t\tmProgressBarVisible = true;\n\t\tif (getView() != null) {\n\t\t\tLinearLayout progressLayout = (LinearLayout) getView()\n\t\t\t\t\t.findViewById(R.id.severity_list_progress_layout);\n\t\t\tif (progressLayout != null)\n\t\t\t\tprogressLayout.setVisibility(View.VISIBLE);\n\t\t}\n\t}", "public void showLoadingView() {\n mStateView.showViewLoading();\n }", "private void hideProgressIndicator() {\n setProgressBarIndeterminateVisibility(false);\n setProgressBarIndeterminate(false);\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tloadLayout.setVisibility(View.VISIBLE);\n\t\t}", "@Override\n protected void onPreExecute() {\n mProgressbar.setVisibility(View.VISIBLE);\n }", "@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tprogressBar.setVisibility(View.GONE);\n\t\t\t\t\t\t\t}", "@Override\n protected void onPreExecute() {\n mProgressBar.setVisibility(View.VISIBLE);\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tprogressBar.setVisibility(View.GONE);\n\t\t\t\t\t}", "private void hideProgress() {\n\n if(null != mErrorTextView) {\n mErrorTextView.setVisibility(View.GONE);\n }\n }", "public void infoProgressOff (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourInfoBinding.tourInfoProgress.getVisibility() != View.GONE) {\n tabTourInfoBinding.tourInfoProgress.setVisibility(View.GONE);\n }\n if (tabTourInfoBinding.tourInfoLayout.getVisibility() != View.VISIBLE) {\n tabTourInfoBinding.tourInfoLayout.setVisibility(View.VISIBLE);\n }\n }\n });\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n switch (pageViewsCount) {\n case 0:\n mHomeView.setVisibility(show ? View.GONE : View.VISIBLE);\n mHomeView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mHomeView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n break;\n case 1:\n mProfileView.setVisibility(show ? View.GONE : View.VISIBLE);\n mProfileView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProfileView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n break;\n case 2:\n mMessagesView.setVisibility(show ? View.GONE : View.VISIBLE);\n mMessagesView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mMessagesView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n break;\n case 3:\n mFeedbackView.setVisibility(show ? View.GONE : View.VISIBLE);\n mFeedbackView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mFeedbackView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n break;\n case 4:\n mPhotosView.setVisibility(show ? View.GONE : View.VISIBLE);\n mPhotosView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mPhotosView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n break;\n case 5:\n mSearchView.setVisibility(show ? View.GONE : View.VISIBLE);\n mSearchView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mSearchView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n break;\n }\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n switch (pageViewsCount) {\n case 0:\n mHomeView.setVisibility(show ? View.GONE : View.VISIBLE);\n break;\n case 1:\n mProfileView.setVisibility(show ? View.GONE : View.VISIBLE);\n break;\n case 2:\n mMessagesView.setVisibility(show ? View.GONE : View.VISIBLE);\n break;\n case 3:\n mFeedbackView.setVisibility(show ? View.GONE : View.VISIBLE);\n break;\n case 4:\n mPhotosView.setVisibility(show ? View.GONE : View.VISIBLE);\n break;\n case 5:\n mProgressView.setVisibility(show ? View.GONE : View.VISIBLE);\n break;\n }\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n }", "@Override\n public void onStart()\n {\n if (mProgressView != null)\n {\n mProgressView.setVisibility(View.VISIBLE);\n }\n }", "private void showProgressIndicator() {\n setProgressBarIndeterminateVisibility(true);\n setProgressBarIndeterminate(true);\n }", "void hideProgress();", "@Override\n public void onPageFinished(WebView view, String url) {\n super.onPageFinished(view, url);\n web.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n }", "@Override\n public void showProgress() {\n mCircleProgressThemeDetail.setVisibility(View.VISIBLE);\n mCircleProgressThemeDetail.spin();\n mRecyclerThemeDaily.setVisibility(View.GONE);\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\t//\t\t\tmProgress.setVisibility(View.VISIBLE);\n\t\t}", "public void infoProgressOn (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourInfoBinding.tourInfoProgress.getVisibility() != View.VISIBLE) {\n tabTourInfoBinding.tourInfoProgress.setVisibility(View.VISIBLE);\n }\n if (tabTourInfoBinding.tourInfoLayout.getVisibility() != View.GONE) {\n tabTourInfoBinding.tourInfoLayout.setVisibility(View.GONE);\n }\n }\n });\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n progress.setVisibility(ProgressBar.VISIBLE);\n }", "@Override\n public void hiddenLoading() {\n Log.i(Tag, \"hiddenLoading\");\n }", "private void setLoadingDisplay() {\n if (swipeRefreshing) {\n footer.clear();\n setRefreshing(true);\n } else if (loading) {\n footer.setLoading();\n }\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tlinlaHeaderProgress.setVisibility(View.VISIBLE);\n\t\t}", "public void showProgress() {\n img_left_action.setVisibility(View.GONE);\n search_progress.setAlpha(0.0f);\n search_progress.setVisibility(View.VISIBLE);\n ObjectAnimator.ofFloat(search_progress, \"alpha\", 0.0f, 1.0f).start();\n }", "public void hideProgress() {\n search_progress.setVisibility(View.GONE);\n img_left_action.setAlpha(0.0f);\n img_left_action.setVisibility(View.VISIBLE);\n ObjectAnimator.ofFloat(img_left_action, \"alpha\", 0.0f, 1.0f).start();\n }", "public void startLoading() {\n projects.clear();\n processContainer.setVisibility(View.VISIBLE);\n progressSpinner.setVisibility(View.VISIBLE);\n progressText.setVisibility(View.VISIBLE);\n progressText.setText(\"Getting Items...\"); // Text updated using SetProgress()\n listView.setVisibility(View.GONE);\n }", "void showProgress(final View progressView, final View progressIndicator, int delay) {\n TurbolinksLog.d(\"showProgress called\");\n\n // Don't show the progress view if a screenshot is available\n if (screenshotView != null && screenshotOrientation == getOrientation()) return;\n\n hideProgress();\n\n this.progressView = progressView;\n progressView.setClickable(true);\n addView(progressView);\n\n progressIndicator.setVisibility(View.GONE);\n\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n progressIndicator.setVisibility(View.VISIBLE);\n }\n }, delay);\n }", "@Override\n public void hideProgressBar() {\n MainActivity.sInstance.hideProgressBar();\n }", "void showLoading(boolean visible);", "@Override\r\n\tpublic void showLoading(boolean isLoading) {\r\n\t\tsetSupportProgressBarIndeterminateVisibility(isLoading);\r\n\t}", "@Override\n protected void onPreExecute() {\n mRecyclerView.startAnimation(fade_out);\n mRecyclerView.setVisibility(View.INVISIBLE);\n progressBar.startAnimation(fade_in2);\n progressBar.setVisibility(View.VISIBLE);\n }", "public void hideProgressDialog() {\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (progress.isShowing())\r\n\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t} catch (Throwable e) {\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}", "void hideMainLoadingWheel();", "private void removeProgressView() {\n if (progressView == null) return;\n\n removeView(progressView);\n TurbolinksLog.d(\"Progress view removed\");\n }", "@Override\n\tpublic void hideProgress() {\n\t\twaitDialog(false);\n\t}", "private void hideElements(){\n question.setVisibility(View.GONE);\n yes_for_joke.setVisibility(View.GONE);\n no_for_joke.setVisibility(View.GONE);\n progressBar.setVisibility(View.VISIBLE);\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\t//progreso.setVisibility(View.VISIBLE);\n\t\t\tsetProgressBarIndeterminateVisibility(true);\n\t\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n settLoadingScr.setVisibility(View.VISIBLE);\n\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n settLoadingScr.setVisibility(View.VISIBLE);\n\n }", "private void uploadingProgressBarInit() {\n uploadingProgressBar.setVisibility(VISIBLE);\n uploadingProgressBar.setProgress(0);\n }", "@Override\n public void onPageFinished(WebView view, String url) {\n super.onPageFinished(view, url);\n progressBar.setVisibility(View.GONE);\n }", "@Override\n\t protected void onPreExecute() {\n\t super.onPreExecute();\n\t //this method will be running on UI thread\n\t mProgressBar.setVisibility(View.VISIBLE);\n\t }", "private void showElements(){\n question.setVisibility(View.VISIBLE);\n yes_for_joke.setVisibility(View.VISIBLE);\n no_for_joke.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n }", "public final void showLoadingIndicator(boolean z) {\n if (z) {\n ProgressBar progressBar = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLoadingAuctionSaleList);\n Intrinsics.checkExpressionValueIsNotNull(progressBar, \"pbLoadingAuctionSaleList\");\n progressBar.setVisibility(0);\n return;\n }\n ProgressBar progressBar2 = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLoadingAuctionSaleList);\n Intrinsics.checkExpressionValueIsNotNull(progressBar2, \"pbLoadingAuctionSaleList\");\n progressBar2.setVisibility(8);\n }", "protected void showLoading()\n {\n progressBar = new ProgressDialog(this);\n progressBar.setTitle(\"Loading\");\n progressBar.setMessage(\"Wait while loading...\");\n progressBar.setCancelable(false); // disable dismiss by tapping outside of the dialog\n progressBar.show();\n }", "@Override\n public void onPageFinished(WebView view, String url) {\n super.onPageFinished(view, url);\n progressbar.setVisibility(View.GONE);\n }", "@Override\n public void onPageFinished(android.webkit.WebView view, String url) {\n super.onPageFinished(view, url);\n progressBar5.setVisibility(View.GONE);\n }", "@Override\n\t public void onPageFinished(WebView view, String url) {\n\t super.onPageFinished(view, url);\n\t \n\t progressBar.setVisibility(View.GONE);\n\t }", "@Override\n protected void onPreExecute() {\n pb.setVisibility(View.VISIBLE);\n }", "public final void showLoadingIndicator(boolean z) {\n if (z) {\n ProgressBar progressBar = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbReviewPayment);\n Intrinsics.checkExpressionValueIsNotNull(progressBar, \"pbReviewPayment\");\n progressBar.setVisibility(0);\n return;\n }\n ProgressBar progressBar2 = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbReviewPayment);\n Intrinsics.checkExpressionValueIsNotNull(progressBar2, \"pbReviewPayment\");\n progressBar2.setVisibility(8);\n }", "public void setUploading()\n {\n jPanel4.setVisible(false);\n th.start();\n }", "@Override\n public void esconderBarraProgresso(){\n progressbar.setVisibility(View.GONE);\n listView.setVisibility(View.VISIBLE);\n }", "public void goneProgress(){\n mProgressBar.setVisibility(View.GONE);\n }", "private static void waitForProgressBarToDisappear(){\n\t\tBy androidProgressBar = By.xpath(\"//*[@class=\\\"android.widget.ProgressBar\\\"]\");\n\t\tSystem.out.println(\"----->inside waitForProgressBarToDisappear\");\n\t\t//progress may flicker causing failures\n\t\ttry {\n\t\t\tThread.sleep(500);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(LocalDriverManagerMobile.INSTANCE.getDriver().findElements(androidProgressBar).size() > 0){\n\t\t\tSystem.out.println(\"----->inside waitForProgressBarToDisappear - progress Bar found and waiting for it to clear\");//TODO delete\n\t\t\ttry{\n\t\t\t\tnew WebDriverWait(LocalDriverManagerMobile.INSTANCE.getDriver(),20)\n\t\t\t\t\t\t.until(ExpectedConditions.invisibilityOfElementLocated(androidProgressBar));\n\t\t\t}catch (TimeoutException t){\n\t\t\t\tSystem.err.println(\"-----> Progress bar flickered or got stucked!!!\");\n\t\t\t}\n\t\t}\n\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n mLoadingIndicator.setVisibility(View.VISIBLE);\n }", "@Override\n public void onProgressChanged(WebView view, int newProgress) {\n binding.progressbar.setProgress(newProgress);\n if (newProgress==100){\n binding.progressbar.setVisibility(View.GONE);\n }\n }", "@Override\n\t\tpublic void onShutter() {\n\t\t\tmProgressContainer.setVisibility(View.VISIBLE);\n\t\t}", "private void displayLoader() {\n pDialog = new ProgressDialog(AddReviewActivity.this);\n pDialog.setMessage(\"Adding Review...Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "private void showLoadedResults() {\n recyclerView.setVisibility(View.VISIBLE);\n errorMessageDisplayView.setVisibility(View.INVISIBLE);\n }", "@Override\r\n public void onPreResponse() {\r\n findViewById(R.id.loader).setVisibility(View.VISIBLE);\r\n findViewById(R.id.mainContainer).setVisibility(View.GONE);\r\n findViewById(R.id.errorText).setVisibility(View.GONE);\r\n\r\n }", "@SuppressLint(\"InlinedApi\")\n private void show() {\n mVisible = true;\n\n // Schedule a runnable to display UI elements after a delay\n mHideHandler.removeCallbacks(mHidePart2Runnable);\n mHideHandler.postDelayed(mShowPart2Runnable, UI_ANIMATION_DELAY);\n }", "@Override public void searchStarted() {\n progressBar.setVisibility(View.VISIBLE);\n }", "@Override\n\t\tprotected void onPreExecute()\n\t\t{\n\t\t\t//Initialize the ViewSwitcher object\n\t viewSwitcher = new ViewSwitcher(LoadingScreenActivity.this);\n\t \n\t\t\tviewSwitcher.addView(ViewSwitcher.inflate(LoadingScreenActivity.this, R.layout.loadingscreen, null));\n\n\t\t\tpb_progressBar = (ProgressBar) viewSwitcher.findViewById(R.id.progressBar1);\n\t\t\t\n\t\t\tpb_progressBar.setMax(100);\n\n\t\t\tsetContentView(viewSwitcher);\n\t\t}", "@Override\n public void showLoading() {\n setRefresh(true);\n }", "private void showIndicator() {\n mProgressBarHolder.setVisibility(View.VISIBLE);\n mEmailView.setFocusableInTouchMode(false);\n mEmailView.setFocusable(false);\n mEmailView.setEnabled(false);\n mPasswordView.setFocusableInTouchMode(false);\n mPasswordView.setFocusable(false);\n mPasswordView.setEnabled(false);\n mRegister.setEnabled(false);\n mEmailSignInButton.setEnabled(false);\n }", "private void progressMode() {\n\t\t// lazily build the layout\n\t\tif (progressLayout == null) {\n\t\t\tprogressLayout = new DefaultVerticalLayout(true, true);\n\n\t\t\tprogressBar = new ProgressBar();\n\t\t\tprogressBar.setHeight(\"20px\");\n\t\t\tprogressLayout.add(progressBar);\n\n\t\t\tstatusLabel = new Text(\"\");\n\t\t\tprogressLayout.add(statusLabel);\n\t\t}\n\t\tprogressBar.setValue(0.0f);\n\t\tstatusLabel.setText(\"\");\n\n\t\tremoveAll();\n\t\tadd(progressLayout);\n\t}", "@Override\n public void showProgressBar() {\n MainActivity.sInstance.showProgressBar();\n }", "@Override\n public void onPageFinished(WebView view, String url) {\n super.onPageFinished(view, url);\n progressBusy.setVisibility(View.GONE);\n }", "public void showLoading() {\n }", "void hideNextEventsLoadingWheel();", "public void stopLoadAnim() {\n avi.smoothToHide();\n loadTv.setVisibility(View.INVISIBLE);\n loginContainer.setVisibility(View.VISIBLE);\n }", "@Override\r\n\t\tpublic void onPageFinished(WebView view, String url) {\n\t\t\tsuper.onPageFinished(view, url);\r\n\r\n\t\t\tprogressBar.setVisibility(View.GONE);\r\n\t\t}", "private void showNothing(){\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.INVISIBLE);\n }", "private void hideProgress() {\n \tif(mProgress!=null){\n \t\tmProgress.dismiss();\n \tmProgress=null;\n \t}\n }", "@Override\n\t\t\tpublic void onPageFinished(WebView view, String url) {\n\t\t\t\tsuper.onPageFinished(view, url);\n\t\t\t\tprogressBar.setVisibility(View.GONE);\n\t\t\t}", "public void dismissProgressBar() {\n\t\tmProgressBarVisible = false;\n\t\tif (getView() != null) {\n\t\t\tLinearLayout progressLayout = (LinearLayout) getView()\n\t\t\t\t\t.findViewById(R.id.severity_list_progress_layout);\n\t\t\tif (progressLayout != null) {\n\t\t\t\tprogressLayout.setVisibility(View.GONE);\n\t\t\t}\n\t\t\tProgressBar listProgress = (ProgressBar) getView().findViewById(\n\t\t\t\t\tR.id.severity_list_progress);\n\t\t\tlistProgress.setProgress(0);\n\t\t}\n\t}", "public void mapProgressOn (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourMapBinding.mapProgress.getVisibility() != View.VISIBLE) {\n tabTourMapBinding.mapProgress.setVisibility(View.VISIBLE);\n }\n if (tabTourMapBinding.mapLayout.getVisibility() != View.GONE) {\n tabTourMapBinding.mapLayout.setVisibility(View.GONE);\n }\n }\n });\n }", "@Override\r\n\t\tprotected void onPreExecute() {\r\n\t\t\tsuper.onPreExecute();\r\n\t\t\tshowLoading();\r\n\t\t}", "@Override\r\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\r\n\t\t\tivProfileProgress.setVisibility(View.VISIBLE);\r\n\t\t}", "public void mapProgressOff (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourMapBinding.mapProgress.getVisibility() != View.GONE) {\n tabTourMapBinding.mapProgress.setVisibility(View.GONE);\n }\n if (tabTourMapBinding.mapLayout.getVisibility() != View.VISIBLE) {\n tabTourMapBinding.mapLayout.setVisibility(View.VISIBLE);\n }\n }\n });\n }", "@Override\n\tpublic void showProgress() {\n\t\twaitDialog(true);\n\t}", "@Override\n\t\tprotected void onPostExecute(Object result) {\n\t\t\tView rootView =(View)result;\n\t\t\ttry {\n\t\t\t\tThread.sleep(400);\n\t\t\t} catch (InterruptedException e) {\t\t\t\t\n\t\t\t}\n\t\t\tsetContentView(rootView);\t\t\t\n\t\t\tgetProgressDialog().hide();\n\t\t}" ]
[ "0.7359385", "0.7327871", "0.72612727", "0.71239185", "0.7082534", "0.7078264", "0.6991439", "0.69697714", "0.69623977", "0.6957261", "0.6886361", "0.68624747", "0.6859377", "0.67613214", "0.6754566", "0.6734668", "0.66962755", "0.6677421", "0.66760343", "0.6648555", "0.6646795", "0.6615604", "0.65604043", "0.654874", "0.6538399", "0.65294933", "0.6514294", "0.650414", "0.65014035", "0.6497864", "0.64883494", "0.648418", "0.6480401", "0.6471555", "0.64682215", "0.64632154", "0.64620626", "0.6458095", "0.6456224", "0.64476806", "0.64248425", "0.64159644", "0.6414455", "0.6402598", "0.64021814", "0.6397851", "0.6394566", "0.63943636", "0.63895506", "0.6387874", "0.63747317", "0.6364773", "0.6359752", "0.6346687", "0.6341583", "0.63363296", "0.63363296", "0.63350415", "0.63136274", "0.6302593", "0.6298782", "0.6297898", "0.62658185", "0.6255649", "0.62348115", "0.62299067", "0.62210286", "0.6214381", "0.6209201", "0.62035596", "0.6188927", "0.6158043", "0.6153994", "0.6152229", "0.61511886", "0.61448807", "0.6135557", "0.61268085", "0.61162156", "0.6115895", "0.61079973", "0.6105142", "0.6094505", "0.6074495", "0.60710907", "0.6066505", "0.6052833", "0.6045103", "0.604229", "0.60376185", "0.60341734", "0.60313326", "0.6025523", "0.60082203", "0.60033834", "0.6003282", "0.5996913", "0.5989146", "0.59815407", "0.5968848" ]
0.7322872
2
Once the values of all View elements are loaded hides the progress bar and shows the data.
public void showData(){ loadMainActivity.setVisibility(View.INVISIBLE); recyclerView.setVisibility(View.VISIBLE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showProgress(){\n loadMainActivity.setVisibility(View.VISIBLE);\n recyclerView.setVisibility(View.INVISIBLE);\n }", "private void showDataView() {\n mLoadingIndicator.setVisibility(View.INVISIBLE);\n /* Finally, make sure the data is visible */\n mRecycleView.setVisibility(View.VISIBLE);\n }", "private void setDataVisibility() {\n boolean loaded = mRecipeList != null && mRecipeList.size() > 0;\n Logger.d(\"loaded: \" + loaded);\n mRefreshLayout.setRefreshing(false);\n\n mRecipesRecyclerView.setVisibility(loaded ? View.VISIBLE : View.GONE);\n mNoDataContainer.setVisibility(loaded ? View.GONE : View.VISIBLE);\n\n cookBookApplication.setIdleState(true);\n\n }", "@Override\n protected void onPreExecute() {\n mLytContainerLayout.setVisibility(View.GONE);\n mToolbar.setVisibility(View.GONE);\n mPrgLoading.setVisibility(View.VISIBLE);\n }", "public void infoProgressOn (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourInfoBinding.tourInfoProgress.getVisibility() != View.VISIBLE) {\n tabTourInfoBinding.tourInfoProgress.setVisibility(View.VISIBLE);\n }\n if (tabTourInfoBinding.tourInfoLayout.getVisibility() != View.GONE) {\n tabTourInfoBinding.tourInfoLayout.setVisibility(View.GONE);\n }\n }\n });\n }", "private void showLoading()\n {\n relLoadingPanel.setVisibility(View.VISIBLE);\n ViewHelper.setViewGroupEnabled(scrMainContainer, false);\n }", "private void showLoadedResults() {\n recyclerView.setVisibility(View.VISIBLE);\n errorMessageDisplayView.setVisibility(View.INVISIBLE);\n }", "private void showLoading() {\n hideNoNetwork();\n mRecipesBinding.fragmentRecipesProgressBar.setVisibility(View.VISIBLE);\n }", "void hideProgress() {\n removeProgressView();\n removeScreenshotView();\n }", "public void infoProgressOff (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourInfoBinding.tourInfoProgress.getVisibility() != View.GONE) {\n tabTourInfoBinding.tourInfoProgress.setVisibility(View.GONE);\n }\n if (tabTourInfoBinding.tourInfoLayout.getVisibility() != View.VISIBLE) {\n tabTourInfoBinding.tourInfoLayout.setVisibility(View.VISIBLE);\n }\n }\n });\n }", "@Override\r\n public void beforeTaskComplete() {\r\n if (recyclerView.getChildCount() < 1) {\r\n recyclerView.setVisibility(View.GONE);\r\n }\r\n progressBar.setVisibility(View.VISIBLE);\r\n }", "private void showElements(){\n question.setVisibility(View.VISIBLE);\n yes_for_joke.setVisibility(View.VISIBLE);\n no_for_joke.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n }", "private void hideLoading()\n {\n relLoadingPanel.setVisibility(View.GONE);\n ViewHelper.setViewGroupEnabled(scrMainContainer, true);\n }", "@Override\n protected void onStartLoading() {\n progressBar.setVisibility(View.VISIBLE);\n forceLoad();\n }", "@Override\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tloadingView.setProgress(values[0]);\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tloadingView.setVisibility(View.VISIBLE);\n\t\t}", "public void showLoadingView() {\n handleLoadingContainer(false /* showContent */, false /* showEmpty */, false /* animate */);\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n progress.setVisibility(View.VISIBLE);\n progress.setProgress(values[0]);\n super.onProgressUpdate(values);\n }", "private void showLoading() {\n mRecycleView.setVisibility(View.INVISIBLE);\n /* Finally, show the loading indicator */\n mLoadingIndicator.setVisibility(View.VISIBLE);\n }", "public void startLoading() {\n projects.clear();\n processContainer.setVisibility(View.VISIBLE);\n progressSpinner.setVisibility(View.VISIBLE);\n progressText.setVisibility(View.VISIBLE);\n progressText.setText(\"Getting Items...\"); // Text updated using SetProgress()\n listView.setVisibility(View.GONE);\n }", "private void initViews() {\n userNumberEditText = findViewById(R.id.numberEdittextactivityinfo);\n filterButton = findViewById(R.id.cirUploadDetailsBtn_activityinfo);\n filterButton.setOnClickListener(filterButtonClickListener());\n\n// progressDialog = new ProgressDialog(this);\n// progressDialog.setMessage(\"Loading...\");\n// progressDialog.setCancelable(false);\n\n// WaveLoadingView loadingView = findViewById(R.id.waveloadingviewfilterchat);\n// loadingView.setAnimDuration(10000);\n\n }", "private void setLoadingDisplay() {\n if (swipeRefreshing) {\n footer.clear();\n setRefreshing(true);\n } else if (loading) {\n footer.setLoading();\n }\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressLayout.setVisibility(View.VISIBLE);\n\n\t\t}", "@Override\n public void showProgress() {\n mCircleProgressThemeDetail.setVisibility(View.VISIBLE);\n mCircleProgressThemeDetail.spin();\n mRecyclerThemeDaily.setVisibility(View.GONE);\n }", "private void startProgressBar() {\n\t b_buscar.setVisibility(View.GONE);\n\t // wi_progreso.setVisibility(View.VISIBLE);\n\t ly_progreso.setVisibility(View.VISIBLE);\n\t}", "public void showLoading() {\n loadingLayout.setVisibility(View.VISIBLE);\n mapView.setVisibility(View.GONE);\n errorLayout.setVisibility(View.GONE);\n }", "private void hideLoadingAndUpdate() {\n image.setVisibility(View.VISIBLE);\n loadingBar.setVisibility(View.INVISIBLE);\n shareBtn.setVisibility(shareBtnVisibility);\n\n }", "@Override\n public void hiddenLoading() {\n Log.i(Tag, \"hiddenLoading\");\n }", "public void loadData() {\n if (this.model != null) {\n\n this.dataLayout.setVisibility(View.VISIBLE);\n this.emptyText.setVisibility(View.GONE);\n\n\n if (this.model.getSolution() != null) {\n this.solutionView.setText(this.model.getSolution());\n }\n if (this.model.getArguments() != null) {\n this.argumentsView.setText(this.model.getArguments());\n }\n if (this.model.getQuestion() != null) {\n this.questionView.setText(\n String.valueOf(this.model.getQuestion().getId()));\n }\n } else {\n this.dataLayout.setVisibility(View.GONE);\n this.emptyText.setVisibility(View.VISIBLE);\n }\n }", "@Override\n public void showLoading() {\n setRefresh(true);\n }", "@Override\n public void hideLoading() {\n if (progressDialog!=null && progressDialog.isShowing()){\n progressDialog.dismiss();\n }\n }", "private void hideElements(){\n question.setVisibility(View.GONE);\n yes_for_joke.setVisibility(View.GONE);\n no_for_joke.setVisibility(View.GONE);\n progressBar.setVisibility(View.VISIBLE);\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tloadLayout.setVisibility(View.VISIBLE);\n\t\t}", "@Override\n\tprotected void onPreExecute() {\n\t\tprogressBar.setVisibility(View.VISIBLE);\n\t\ttv.setVisibility(View.VISIBLE);\n\t\tsuper.onPreExecute();\n\t}", "@Override\n public void esconderBarraProgresso(){\n progressbar.setVisibility(View.GONE);\n listView.setVisibility(View.VISIBLE);\n }", "public void showLoadingView() {\n mStateView.showViewLoading();\n }", "private void showMoviesDataView()\n {\n mErrorMessageDisplay.setVisibility(View.INVISIBLE);\n mGridView.setVisibility(View.VISIBLE);\n }", "@Override\n protected void onPreExecute() {\n mRecyclerView.startAnimation(fade_out);\n mRecyclerView.setVisibility(View.INVISIBLE);\n progressBar.startAnimation(fade_in2);\n progressBar.setVisibility(View.VISIBLE);\n }", "protected void hideLoader() {\n\n if (progressBar != null) {\n progressBar.setVisibility(View.INVISIBLE);\n }\n if(getActivity()!=null) {\n getActivity().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n }\n\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n\n /** SHOW PROGRESS WHILE LOADING DATA **/\n linlaHeaderProgress.setVisibility(View.VISIBLE);\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n settLoadingScr.setVisibility(View.VISIBLE);\n\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n settLoadingScr.setVisibility(View.VISIBLE);\n\n }", "@Override\n protected void onPreExecute() {\n mProgressbar.setVisibility(View.VISIBLE);\n }", "@Override\n protected void onPreExecute() {\n mProgressBar.setVisibility(View.VISIBLE);\n }", "protected void showViewContents() {\n\t\tnoData.heightHint = 0;\n\t\tyesData.heightHint = -1;\n\n\t\tnoData.exclude = true;\n\t\tyesData.exclude = false;\n\n\t\tnoLabel.setVisible(false);\n\t\tyesComposite.setVisible(true);\n\t\tredraw();\n\t}", "private void populateUI() {\n\n tipPercentTextView.setText(Double.toString(tipPercent));\n noPersonsTextView.setText(Integer.toString(noPersons));\n populateResultsUI();\n }", "public void mapProgressOn (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourMapBinding.mapProgress.getVisibility() != View.VISIBLE) {\n tabTourMapBinding.mapProgress.setVisibility(View.VISIBLE);\n }\n if (tabTourMapBinding.mapLayout.getVisibility() != View.GONE) {\n tabTourMapBinding.mapLayout.setVisibility(View.GONE);\n }\n }\n });\n }", "public void populateView() {\n numBusinesses = 0;\n mTvRestaurants.setVisibility(View.VISIBLE);\n mTvMuseums.setVisibility(View.VISIBLE);\n mTvClubs.setVisibility(View.VISIBLE);\n mTvHotels.setVisibility(View.VISIBLE);\n rvRestaurants.setVisibility(View.VISIBLE);\n rvMuseums.setVisibility(View.VISIBLE);\n rvClubs.setVisibility(View.VISIBLE);\n rvHotels.setVisibility(View.VISIBLE);\n mNothingNearYou.setVisibility(View.INVISIBLE);\n\n for (int i = 0; i < mArrQueries.size(); i++) {\n mProgressBar.setVisibility(ProgressBar.VISIBLE);\n final int finalI = i;\n getAddress();\n if (mBusinessAddress != null) {\n mAddress.setText(mBusinessAddress);\n yelpService.findBusinesses(mBusinessAddress, mArrQueries.get(i), new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n e.printStackTrace();\n }\n\n @Override\n public void onResponse(Call call, Response response) {\n final ArrayList<Business> arrTemp = yelpService.processResults(response, mProgressBar);\n numBusinesses += arrTemp.size();\n mArrBusinesses.remove(finalI);\n mArrBusinesses.add(finalI, arrTemp);\n if (numBusinesses == 0 && finalI == 0) {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mNothingNearYou.setVisibility(View.VISIBLE);\n mProgressBar.setVisibility(ProgressBar.INVISIBLE);\n mTvRestaurants.setVisibility(View.INVISIBLE);\n mTvMuseums.setVisibility(View.INVISIBLE);\n mTvClubs.setVisibility(View.INVISIBLE);\n mTvHotels.setVisibility(View.INVISIBLE);\n }\n });\n }\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false);\n mArrRecyclerViews.get(finalI).setLayoutManager(linearLayoutManager);\n ListAdapter arrAdapter = new ListAdapter(getContext(), mArrBusinesses.get(finalI));\n mArrAdapters.remove(finalI);\n mArrAdapters.add(finalI, arrAdapter);\n mArrRecyclerViews.get(finalI).setAdapter(mArrAdapters.get(finalI));\n\n if (finalI == 0) {\n if (mArrBusinesses.get(finalI).size() == 0) {\n mTvRestaurants.setVisibility(View.GONE);\n rvRestaurants.setVisibility(View.GONE);\n } else {\n mTvRestaurants.setVisibility(View.VISIBLE);\n rvRestaurants.setVisibility(View.VISIBLE);\n }\n } else if (finalI == 1) {\n if (mArrBusinesses.get(finalI).size() == 0) {\n mTvMuseums.setVisibility(View.GONE);\n rvMuseums.setVisibility(View.GONE);\n } else {\n mTvMuseums.setVisibility(View.VISIBLE);\n rvMuseums.setVisibility(View.VISIBLE);\n }\n } else if (finalI == 2) {\n if (mArrBusinesses.get(finalI).size() == 0) {\n mTvHotels.setVisibility(View.GONE);\n rvHotels.setVisibility(View.GONE);\n } else {\n mTvHotels.setVisibility(View.VISIBLE);\n rvHotels.setVisibility(View.VISIBLE);\n }\n } else if (finalI == 3) {\n if (mArrBusinesses.get(finalI).size() == 0) {\n mTvClubs.setVisibility(View.GONE);\n rvClubs.setVisibility(View.GONE);\n } else {\n mTvClubs.setVisibility(View.VISIBLE);\n rvClubs.setVisibility(View.VISIBLE);\n }\n\n }\n }\n });\n }\n });\n }\n }\n }", "public void startLoading() {\r\n\t\tgetDisplay().setRowCount(0, true);\r\n\t\tlabel1.setHTML(\"\");\r\n\t\tlabel2.setHTML(\"\");\r\n\t}", "@Override\n protected void onPostExecute(Void result) {\n super.onPostExecute(result);\n\n listBook.setAdapter(adapter);\n\n /** HIDE PROGRESS AFTER LOADING DATA **/\n linlaHeaderProgress.setVisibility(View.GONE);\n\n\n }", "private void showProgressIndicator() {\n setProgressBarIndeterminateVisibility(true);\n setProgressBarIndeterminate(true);\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tlinlaHeaderProgress.setVisibility(View.VISIBLE);\n\t\t}", "@Override\n protected void onProgressUpdate(Integer ... values) {\n super.onProgressUpdate(values);\n searchButton.setVisibility(View.INVISIBLE);\n progressBar.setVisibility(View.VISIBLE);\n progressBar.setProgress(values[0]);\n }", "@Override\n public void hideProgressBar() {\n if (getActivity() != null) {\n getActivity().runOnUiThread(() -> {\n if (progressBarLayout != null && progressBar != null) {\n progressBar.setVisibility(View.GONE);\n progressBarLayout.setVisibility(View.GONE);\n }\n });\n }\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\t//\t\t\tmProgress.setVisibility(View.VISIBLE);\n\t\t}", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showProgress(final boolean show) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);\n switch (pageViewsCount) {\n case 0:\n mHomeView.setVisibility(show ? View.GONE : View.VISIBLE);\n mHomeView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mHomeView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n break;\n case 1:\n mProfileView.setVisibility(show ? View.GONE : View.VISIBLE);\n mProfileView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProfileView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n break;\n case 2:\n mMessagesView.setVisibility(show ? View.GONE : View.VISIBLE);\n mMessagesView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mMessagesView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n break;\n case 3:\n mFeedbackView.setVisibility(show ? View.GONE : View.VISIBLE);\n mFeedbackView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mFeedbackView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n break;\n case 4:\n mPhotosView.setVisibility(show ? View.GONE : View.VISIBLE);\n mPhotosView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mPhotosView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n break;\n case 5:\n mSearchView.setVisibility(show ? View.GONE : View.VISIBLE);\n mSearchView.animate().setDuration(shortAnimTime).alpha(\n show ? 0 : 1).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mSearchView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n });\n break;\n }\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n mProgressView.animate().setDuration(shortAnimTime).alpha(\n show ? 1 : 0).setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n });\n } else {\n switch (pageViewsCount) {\n case 0:\n mHomeView.setVisibility(show ? View.GONE : View.VISIBLE);\n break;\n case 1:\n mProfileView.setVisibility(show ? View.GONE : View.VISIBLE);\n break;\n case 2:\n mMessagesView.setVisibility(show ? View.GONE : View.VISIBLE);\n break;\n case 3:\n mFeedbackView.setVisibility(show ? View.GONE : View.VISIBLE);\n break;\n case 4:\n mPhotosView.setVisibility(show ? View.GONE : View.VISIBLE);\n break;\n case 5:\n mProgressView.setVisibility(show ? View.GONE : View.VISIBLE);\n break;\n }\n mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);\n }\n }", "protected void showLoader() {\n if (progressBar != null) {\n progressBar.setVisibility(View.VISIBLE);\n }\n if(getActivity()!=null) {\n getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,\n WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n }\n }", "@Override\n public void onTaskComplete(Movie[] movies) {\n viewModel.init(movies, currentSelection);\n\n //hide loading button\n loadingIndicatorPB.setVisibility(View.INVISIBLE);\n //Update UI\n updateUI(movies);\n\n\n }", "public void mapProgressOff (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourMapBinding.mapProgress.getVisibility() != View.GONE) {\n tabTourMapBinding.mapProgress.setVisibility(View.GONE);\n }\n if (tabTourMapBinding.mapLayout.getVisibility() != View.VISIBLE) {\n tabTourMapBinding.mapLayout.setVisibility(View.VISIBLE);\n }\n }\n });\n }", "private void mostrarDatosPeliculas() {\n this.mBinding.tvMostrarError.setVisibility(View.GONE);\n /* Then, make sure the weather data is visible */\n this.mBinding.rvPeliculas.setVisibility(View.VISIBLE);\n }", "@Override\n public void onStart()\n {\n if (mProgressView != null)\n {\n mProgressView.setVisibility(View.VISIBLE);\n }\n }", "private void setAllGone() {\n ivOne.setVisibility(View.GONE);\n ivTwo.setVisibility(View.GONE);\n ivThree.setVisibility(View.GONE);\n ivFour.setVisibility(View.GONE);\n ivFive.setVisibility(View.GONE);\n ivSix.setVisibility(View.GONE);\n ivSeven.setVisibility(View.GONE);\n ivEight.setVisibility(View.GONE);\n ivNine.setVisibility(View.GONE);\n }", "void showLoading(boolean visible);", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\t//progreso.setVisibility(View.VISIBLE);\n\t\t\tsetProgressBarIndeterminateVisibility(true);\n\t\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n progress.setVisibility(ProgressBar.VISIBLE);\n }", "public void showProgressBar() {\n\t\tmProgressBarVisible = true;\n\t\tif (getView() != null) {\n\t\t\tLinearLayout progressLayout = (LinearLayout) getView()\n\t\t\t\t\t.findViewById(R.id.severity_list_progress_layout);\n\t\t\tif (progressLayout != null)\n\t\t\t\tprogressLayout.setVisibility(View.VISIBLE);\n\t\t}\n\t}", "private void showWeatherDataView() {\n /* First, to make sure the error is invisible */\n mErrorMessageDisplay.setVisibility(View.INVISIBLE);\n /* Then, to make sure the weather data is visible */\n mRecyclerView.setVisibility(View.VISIBLE);\n mLayout.setVisibility(View.VISIBLE);\n }", "private void displayLoader() {\n pDialog = new ProgressDialog(DangKyActivity.this);\n pDialog.setMessage(\"Vui lòng đợi trong giây lát...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "private void updateUI() {\n swipeRefreshLayout.setRefreshing(false);\n adapter.clearItems();\n itemList.addAll(DatabaseController.getInstance(getApplicationContext()).getItems());\n if (itemList.size() > 0){\n emptyTextView.setVisibility(View.GONE);\n adapter.notifyDataSetChanged();\n } else {\n emptyTextView.setVisibility(View.VISIBLE);\n }\n }", "@Override\r\n public void onPreResponse() {\r\n findViewById(R.id.loader).setVisibility(View.VISIBLE);\r\n findViewById(R.id.mainContainer).setVisibility(View.GONE);\r\n findViewById(R.id.errorText).setVisibility(View.GONE);\r\n\r\n }", "private void displayData() {\n playButton.setEnabled(false);\n boxer.setData(getApplicationContext(), R.raw.wsbfv_round1);/*seting the data in the object*/\n HashMap<Integer, Float> intensityPunches = boxer.getIntensityPunches(); /*getting the */\n\n\n canvasView.setIntensityPunches(intensityPunches);/*setting the data in the canvas*/\n //seting the data in the textviews\n punches.setText(String.valueOf( boxer.getPunches()));\n speed.setText(String.format(\"%.1f\", boxer.getSpeedAvg()));\n power.setText(String.format(\"%.1f\", boxer.getPowerAvg()));\n\n lefthpJabText.setText(String.valueOf(boxer.getLeftHandPunchesJab()));\n lefthpHookText.setText(String.valueOf(boxer.getLeftHandPunchesHook()));\n lefthpUppercutText.setText(String.valueOf(boxer.getLeftHandPunchesUppercut()));\n\n int visibility = 0;\n\n ViewGroup.LayoutParams params = lefthpJabProgressBar.getLayoutParams();\n params.width = (int) params.width * boxer.getLeftHandPunchesJab() / boxer.getMaxTypePunch();\n lefthpJabProgressBar.setLayoutParams(params);\n visibility = params.width == 0 ? View.GONE : View.VISIBLE;\n lefthpJabProgressBar.setVisibility(visibility);\n\n\n params = lefthpHookProgressBar.getLayoutParams();\n params.width = (int) params.width * boxer.getLeftHandPunchesHook() / boxer.getMaxTypePunch();\n lefthpHookProgressBar.setLayoutParams(params);\n visibility = params.width == 0 ? View.GONE : View.VISIBLE;\n lefthpHookProgressBar.setVisibility(visibility);\n\n params = lefthpUppercutProgressBar.getLayoutParams();\n params.width = (int) params.width * boxer.getLeftHandPunchesUppercut() / boxer.getMaxTypePunch();\n lefthpUppercutProgressBar.setLayoutParams(params);\n visibility = params.width == 0 ? View.GONE : View.VISIBLE;\n lefthpUppercutProgressBar.setVisibility(visibility);\n\n\n righthpCrossText.setText(String.valueOf(boxer.getRightHandPunchesCross()));\n righthpHookText.setText(String.valueOf(boxer.getRightHandPunchesHook()));\n righthpUppercutText.setText(String.valueOf(boxer.getRightHandPunchesUppercut()));\n\n\n params = righthpCrossProgressBar.getLayoutParams();\n params.width = (int) params.width * boxer.getRightHandPunchesCross() / boxer.getMaxTypePunch();\n righthpCrossProgressBar.setLayoutParams(params);\n visibility = params.width == 0 ? View.GONE : View.VISIBLE;\n righthpCrossProgressBar.setVisibility(visibility);\n\n\n params = righthpHookProgressBar.getLayoutParams();\n params.width = (int) params.width * boxer.getRightHandPunchesHook() / boxer.getMaxTypePunch();\n righthpHookProgressBar.setLayoutParams(params);\n visibility = params.width == 0 ? View.GONE : View.VISIBLE;\n righthpHookProgressBar.setVisibility(visibility);\n\n params = righthpUppercutProgressBar.getLayoutParams();\n params.width = (int) params.width * boxer.getRightHandPunchesUppercut() / boxer.getMaxTypePunch();\n righthpUppercutProgressBar.setLayoutParams(params);\n visibility = params.width == 0 ? View.GONE : View.VISIBLE;\n righthpUppercutProgressBar.setVisibility(visibility);\n\n String seconds = boxer.getTimerCounter()%60<10 ? \"0\"+(int) boxer.getTimerCounter()%60 :\"\"+(int) boxer.getTimerCounter()%60;\n timeCounter.setText((int) boxer.getTimerCounter()/60+\":\"+seconds);\n\n\n progressBarCounter.setProgress((int)(boxer.getTimerCounter()/180*100));\n progressBarCounter.getProgressDrawable().setColorFilter(Color.RED, android.graphics.PorterDuff.Mode.SRC_IN);\n\n speedAvgImage.setVisibility(View.VISIBLE);\n powerAvgImage.setVisibility(View.VISIBLE);\n\n }", "private void hideProgressIndicator() {\n setProgressBarIndeterminateVisibility(false);\n setProgressBarIndeterminate(false);\n }", "@Override\n protected void onPreExecute() {\n pb.setVisibility(View.VISIBLE);\n }", "private void displayLoader() {\n pDialog = new ProgressDialog(AddReviewActivity.this);\n pDialog.setMessage(\"Adding Review...Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "public void showContent() {\n\n mapView.setVisibility(View.VISIBLE);\n loadingLayout.setVisibility(View.GONE);\n errorLayout.setVisibility(View.GONE);\n\n }", "private void completeLoad() {\n if (boardFragment == null) {\n FragmentManager fm = getSupportFragmentManager();\n boardFragment = (BoardFragment) fm.findFragmentById(android.R.id.content);\n }\n boardFragment.setData(posts, threadLinks);\n\n setProgressBarIndeterminateVisibility(false);\n if (refreshItem != null) {\n refreshItem.setVisible(true);\n }\n }", "public final void showLoadingIndicator(boolean z) {\n if (z) {\n ProgressBar progressBar = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLoadingAuctionSaleList);\n Intrinsics.checkExpressionValueIsNotNull(progressBar, \"pbLoadingAuctionSaleList\");\n progressBar.setVisibility(0);\n return;\n }\n ProgressBar progressBar2 = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLoadingAuctionSaleList);\n Intrinsics.checkExpressionValueIsNotNull(progressBar2, \"pbLoadingAuctionSaleList\");\n progressBar2.setVisibility(8);\n }", "@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tprogressBar.setVisibility(View.GONE);\n\t\t\t\t\t\t\t}", "private void uploadingProgressBarInit() {\n uploadingProgressBar.setVisibility(VISIBLE);\n uploadingProgressBar.setProgress(0);\n }", "@Override\n public void onFragmentVisible() {\n db = LegendsDatabase.getInstance(getContext());\n\n refreshCursor();\n\n if (emptyView.isShown()) {\n Crossfader.crossfadeView(emptyView, loadingView);\n }\n else {\n Crossfader.crossfadeView(listView, loadingView);\n }\n }", "private void clearViews()\n {\n prepareNumbers();\n }", "@Override\n protected void onPreExecute() {\n examsActivity.findViewById(R.id.pbLoadingExamsList).setVisibility(View.VISIBLE);\n examsActivity.findViewById(R.id.btnAddExam).setVisibility(View.GONE);\n examsActivity.findViewById(R.id.lvExams).setVisibility(View.GONE);\n }", "@Override\n\t\t\tpublic void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n\t\t\t\tif (progressbar != null)\n\t\t\t\t\tprogressbar.setVisibility(View.GONE);\n\t\t\t}", "private void showMovieDataView() {\n /* First, make sure the error is invisible */\n mErrorMessageDisplay.setVisibility(View.INVISIBLE);\n /* Then, make sure the weather data is visible */\n mRecyclerView.setVisibility(View.VISIBLE);\n }", "private void initialiseView() {\n \tnoTasksMessageView = (TextView)findViewById(R.id.noTasksRunning);\r\n \ttaskKillWarningView = (TextView)findViewById(R.id.progressStatusMessage);\r\n\r\n \tIterator<Progress> jobsIterator = JobManager.iterator();\r\n \twhile (jobsIterator.hasNext()) {\r\n \t\tProgress job = jobsIterator.next();\r\n \t\tfindOrCreateUIControl(job);\r\n \t}\r\n\r\n // allow call back and continuation in the ui thread after JSword has been initialised\r\n \tfinal Handler uiHandler = new Handler();\r\n \tfinal Runnable uiUpdaterRunnable = new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n \t\t\tProgress prog = progressNotificationQueue.poll();\r\n \t\t\tif (prog!=null) {\r\n \t\t\t\tupdateProgress(prog);\r\n \t\t\t}\r\n\t\t\t}\r\n };\r\n\r\n // listen for Progress changes and call the above Runnable to update the ui\r\n\t\tworkListener = new WorkListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void workProgressed(WorkEvent ev) {\r\n\t\t\t\tcallUiThreadUpdateHandler(ev);\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void workStateChanged(WorkEvent ev) {\r\n\t\t\t\tcallUiThreadUpdateHandler(ev);\r\n\t\t\t}\r\n\t\t\tprivate void callUiThreadUpdateHandler(WorkEvent ev) {\r\n\t\t\t\tProgress prog = ev.getJob();\r\n\t\t\t\tprogressNotificationQueue.offer(prog);\r\n \t\t\t// switch back to ui thread to continue\r\n \t\t\tuiHandler.post(uiUpdaterRunnable);\r\n\t\t\t}\r\n\t\t};\r\n\t\tJobManager.addWorkListener(workListener);\r\n\r\n\t\t// give new jobs a chance to start then show 'No Job' msg if nothing running\r\n\t\tuiHandler.postDelayed(\r\n\t\t\tnew Runnable() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tif (!JobManager.iterator().hasNext()) {\r\n\t\t\t\t\t\tshowNoTaskMsg(true);\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, 4000);\r\n }", "private void showNothing(){\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.INVISIBLE);\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tprogressBar.setVisibility(View.GONE);\n\t\t\t\t\t}", "@Override\n public void onDataFinish(Object object) {\n mExtraInfoProgressBar_II.setVisibility(View.GONE);\n updateSummaryView((StockSummary) object);\n mbLoadedSummaryView = true;\n }", "private void showWeatherDataView() {\n /* First, make sure the error is invisible */\n mErrorMessageDisplay.setVisibility(View.INVISIBLE);\n /* Then, make sure the weather data is visible */\n mRecyclerView.setVisibility(View.VISIBLE);\n }", "private void hideProgress() {\n\n if(null != mErrorTextView) {\n mErrorTextView.setVisibility(View.GONE);\n }\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n mLoadingIndicator.setVisibility(View.VISIBLE);\n }", "protected void hideViewContents() {\n\t\tnoData.heightHint = -1;\n\t\tyesData.heightHint = 0;\n\n\t\tnoData.exclude = false;\n\t\tyesData.exclude = true;\n\n\t\tnoLabel.setVisible(true);\n\t\tyesComposite.setVisible(false);\n\t\tredraw();\n\t}", "@Override\r\n\tpublic void showLoading(boolean isLoading) {\r\n\t\tsetSupportProgressBarIndeterminateVisibility(isLoading);\r\n\t}", "@Override\n public void onTaskComplete(Movie[] movies) {\n viewModel.init(movies, currentSelection);\n\n //hide loading button\n loadingIndicatorPB.setVisibility(View.INVISIBLE);\n\n //update UI with loaded Fav movies\n updateUI(movies);\n }", "public void showProgress() {\n img_left_action.setVisibility(View.GONE);\n search_progress.setAlpha(0.0f);\n search_progress.setVisibility(View.VISIBLE);\n ObjectAnimator.ofFloat(search_progress, \"alpha\", 0.0f, 1.0f).start();\n }", "private void progressStuff() {\n cd = new ConnectionDetector(getActivity());\n parser = new JSONParser();\n progress = new ProgressDialog(getActivity());\n progress.setMessage(getResources().getString(R.string.loading));\n progress.setIndeterminate(false);\n progress.setCancelable(true);\n // progress.show();\n }", "private void progressMode() {\n\t\t// lazily build the layout\n\t\tif (progressLayout == null) {\n\t\t\tprogressLayout = new DefaultVerticalLayout(true, true);\n\n\t\t\tprogressBar = new ProgressBar();\n\t\t\tprogressBar.setHeight(\"20px\");\n\t\t\tprogressLayout.add(progressBar);\n\n\t\t\tstatusLabel = new Text(\"\");\n\t\t\tprogressLayout.add(statusLabel);\n\t\t}\n\t\tprogressBar.setValue(0.0f);\n\t\tstatusLabel.setText(\"\");\n\n\t\tremoveAll();\n\t\tadd(progressLayout);\n\t}", "@Override\n public void hideProgressBar() {\n MainActivity.sInstance.hideProgressBar();\n }", "private void showEmptyView() {\n mEmptyView.setVisibility(View.VISIBLE);\n mDashboardList.setVisibility(View.INVISIBLE);\n }", "public void mapImageProgressOn (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourMapImageBinding.tourMapImageProgress.getVisibility() != View.VISIBLE) {\n tabTourMapImageBinding.tourMapImageProgress.setVisibility(View.VISIBLE);\n }\n if (tabTourMapImageBinding.tourMapImageLayout.getVisibility() != View.GONE) {\n tabTourMapImageBinding.tourMapImageLayout.setVisibility(View.GONE);\n }\n }\n });\n }" ]
[ "0.716416", "0.70276207", "0.69267", "0.68598145", "0.6847024", "0.6836971", "0.6813717", "0.6799597", "0.67912143", "0.6768747", "0.67538786", "0.6746012", "0.6736742", "0.6698788", "0.66544867", "0.6652294", "0.66513336", "0.6620093", "0.65900946", "0.65895075", "0.65688425", "0.65565306", "0.6549995", "0.6536466", "0.6531891", "0.65135497", "0.650829", "0.6490262", "0.6477108", "0.6466451", "0.6447806", "0.6440776", "0.6430643", "0.6419243", "0.6413142", "0.64100194", "0.64060414", "0.63770986", "0.6360228", "0.6353307", "0.634184", "0.634184", "0.6338626", "0.6319066", "0.6309335", "0.63046205", "0.6294895", "0.62939996", "0.62781674", "0.6272254", "0.6271531", "0.62709564", "0.627039", "0.6246441", "0.62407964", "0.6224959", "0.6218724", "0.6215796", "0.62024266", "0.6196", "0.61927336", "0.61911446", "0.6187555", "0.6186974", "0.61853087", "0.61788666", "0.61783457", "0.61758995", "0.61748785", "0.61671066", "0.615637", "0.6155486", "0.61392367", "0.6132323", "0.61212265", "0.61188424", "0.611402", "0.6109738", "0.61044794", "0.6102966", "0.61021185", "0.60820526", "0.6080394", "0.60796505", "0.6078393", "0.60711455", "0.6051938", "0.6046823", "0.6043342", "0.6041034", "0.6038223", "0.60374135", "0.60309076", "0.60247254", "0.60244805", "0.60225797", "0.6014261", "0.60093254", "0.5997113", "0.5996674" ]
0.6741112
12
Set the adapter for the MainActivity RecyclerView with data.
public void loadSpotifyNewReleaseData(List<CardAlbum> cardAlbumList){ //Setting the LayoutManager for the RecyclerView recyclerView.setLayoutManager(new LinearLayoutManager(this)); //Instantiating CardAdapter class using the defined constructor if(cardAlbumList.size() > 0) { cardAdapter = new CardAdapter(cardAlbumList, this); }else{ Log.d("NULLList","We are getting a Null List from the background thread !!!"); } //Giving the reference of the Adapter class instance to the RecyclerView recyclerView.setAdapter(cardAdapter); //Giving the reference of the Callback interface to the Card Adapter so that the CallbackInterface methods can be called upon events. cardAdapter.setCardClickCallBack(this); Toast.makeText(MainActivity.this,"New Releases from Spotify",Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setRecyclerAdapter() {\n if (mRecyclerAdapter == null) {\n mRecyclerAdapter = new IssueResultsRecyclerAdapter(this, issueResult, mNation);\n mRecyclerView.setAdapter(mRecyclerAdapter);\n } else {\n ((IssueResultsRecyclerAdapter) mRecyclerAdapter).setContent(issueResult, mNation);\n }\n }", "private void setAdapter() {\n adapter = new MessageAdapter(messages);\n RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());\n recyclerView.setLayoutManager(mLayoutManager);\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n recyclerView.setAdapter(adapter);\n }", "private void setAdapter(){\n ArrayList<Veranstaltung>ver = new ArrayList<>(studium.getLVS());\n recyclerView = findViewById(R.id.rc);\n LinearLayoutManager manager = new LinearLayoutManager(this);\n recyclerView.setLayoutManager(manager);\n recyclerView.setHasFixedSize(true);\n adapter = new StudiumDetailsRecylerAdapter(ver);\n recyclerView.setAdapter(adapter);\n }", "private void populateAdapter(){\n mAdapter = new MovieRecyclerAdapter(context, moviesList, this);\n mRecyclerView.setAdapter(mAdapter);\n }", "private void setupRecyclerView(@NonNull RecyclerView recyclerView) {\r\n myAdapter = new SimpleItemRecyclerViewAdapter(model.getShelters());\r\n recyclerView.setAdapter(myAdapter);\r\n }", "private void setDataInRecyclerView() {\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());\n recyclerView.setLayoutManager(linearLayoutManager);\n // call the constructor of UsersAdapter to send the reference and data to Adapter\n UsersAdapter usersAdapter = new UsersAdapter(getActivity(), userListResponseData);\n recyclerView.setAdapter(usersAdapter); // set the Adapter to RecyclerView\n }", "private void setDataInRecyclerView(){\n KorisniciAdapter adapter = new KorisniciAdapter(this, korisniciList);\n recyclerView.setAdapter(adapter); // set the Adapter to RecyclerView\n }", "public void setAdapter() {\n final ArrayList<Item> list = new ArrayList<>();\n setList(list);\n\n MainAdapter adapter = new MainAdapter(this, list);\n ListView listView = findViewById(R.id.main_list);\n listView.setAdapter(adapter);\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n public void onItemClick(AdapterView<?> parent, final View view, int position, long id) {\n Item item = list.get(position);\n Intent intent = new Intent(MainActivity.this, item.mClass);\n if (item.mItem == R.string.apply)\n intent.putExtra(getString(R.string.apply), getString(R.string.apply));\n startActivity(intent);\n }\n });\n Timber.v(\"Adapter set!\");\n }", "private void setDataInRecyclerView() {\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());\n recyclerView.setLayoutManager(linearLayoutManager);\n // call the constructor of UsersAdapter to send the reference and data to Adapter\n ReviewAdapter reviewAdapter = new ReviewAdapter(reviewListResponseData, this);\n recyclerView.setAdapter(reviewAdapter); // set the Adapter to RecyclerView\n }", "private void setRecyclerViewData() {\n }", "public void initRecyclerView() {\n rvTodos = (RecyclerView) findViewById(R.id.rvTodos);\n\n // Create adapter passing in the sample user data\n TodoAdapter adapter = new TodoAdapter(todos, this);\n // Attach the adapter to the recyclerview to populate items\n rvTodos.setAdapter(adapter);\n // Set layout manager to position the items\n LinearLayoutManager mLayoutManager = new LinearLayoutManager(this);\n mLayoutManager.setReverseLayout(true);\n mLayoutManager.setStackFromEnd(true);\n rvTodos.setLayoutManager(mLayoutManager);\n // That's all!\n }", "private void initRecyclerview() {\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this);\n recyclerView.setLayoutManager(layoutManager);\n\n mAdapter = new MovieAdapter(this);\n recyclerView.setAdapter(mAdapter);\n }", "public void setupAdapter() {\n recyclerAdapter = new PhotosAdapter(this);\n recyclerViewPhotos.setAdapter(recyclerAdapter);\n }", "public void setRecyclerView(){\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\n RealmResults<TodoItemModel> toDoItems = realm.where(TodoItemModel.class).findAllAsync();\n TodoItemAdapter adapter = new TodoItemAdapter(this, toDoItems);\n recyclerView.setHasFixedSize(true);\n recyclerView.addItemDecoration(new SimpleDividerItemDecoration(this));\n recyclerView.setAdapter(adapter);\n }", "private void setRecyclerViewAdapter(List<Task> tasks){\n adapter = new DataAdapter(ViewTaskActivity.this, tasks);\n recyclerView.setAdapter(adapter);\n recyclerView.setLayoutManager(layoutManager);\n }", "private void configureRecyclerView(){\r\n // - Reset list\r\n this.users = new ArrayList<>();\r\n // - Create adapter passing the list of Restaurants\r\n this.mCoworkerAdapter = new CoWorkerAdapter(this.users, Glide.with(this), true);\r\n // - Attach the adapter to the recyclerview to populate items\r\n this.recyclerView.setAdapter(this.mCoworkerAdapter);\r\n // - Set layout manager to position the items\r\n this.recyclerView.setLayoutManager(new LinearLayoutManager(RestaurantDetailActivity.this));\r\n }", "private void setRecyclerViewData() {\n\n itemList = new ArrayList<ListItem>();\n itemList.add(new RememberCardView(\"Du musst 12€ zahlen\"));\n itemList.add(new DateCardItem(\"Mo\", \"29.07.\", \"Training\", \"20:00\", \"21:45\"));\n itemList.add(new VoteCardItem(\"Welche Trikotfarbe ist besser?\"));\n }", "private void setupRecyclerView(@NonNull RecyclerView recyclerView) {\n if(mForumList != null) {\n recyclerView.setAdapter(new SimpleItemRecyclerViewAdapter((HomeActivity) getActivity(), mForumList, mTwoPane));\n }\n }", "private void setupRecyclerView() {\r\n\r\n LinearLayoutManager layoutManager = new LinearLayoutManager\r\n (getContext(), LinearLayoutManager.VERTICAL, false);\r\n if (adapter == null) {\r\n adapter = new SchoolAdapter(getContext(), schoolList);\r\n recyclerView.setLayoutManager(layoutManager);\r\n recyclerView.setAdapter(adapter);\r\n recyclerView.setItemAnimator(new DefaultItemAnimator());\r\n recyclerView.setNestedScrollingEnabled(true);\r\n } else {\r\n adapter.notifyDataSetChanged();\r\n }\r\n }", "private void setAdapter() {\n resultsRv.setLayoutManager(new LinearLayoutManager(getActivity()));\n resultsRv.setHasFixedSize(true);\n resultsRv.setItemAnimator(new DefaultItemAnimator());\n resultsRv.setAdapter(resultsListAdapter);\n }", "public AdapterForDisplayRecipes(Context context, ArrayList<RecipeModel> data) {\n mMainActivity = (MainActivity) context;\n this.mInflater = LayoutInflater.from(context);\n this.mData = data;\n// this.listener = listener;\n }", "@Override\n protected void initData() {\n this.classes = new ArrayList<>();\n this.classes.add(SmartRouterSampleActivity.class);\n this.classes.add(CustomRouterActivity.class);\n this.classes.add(RouterCenterActivity.class);\n this.adapter = new MenuRecyclerViewAdapter();\n this.adapter.setList(classes);\n this.recyclerView.setAdapter(adapter);\n }", "private void setupRecyclerView() {\r\n recyclerView = rootView.findViewById(R.id.recycler_view);\r\n animeAdapter = new AnimeAdapter(this, this);\r\n recyclerView.setAdapter(animeAdapter);\r\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\r\n }", "@Override\n public void setRecyclerViewAdapter() {\n recyclerView.setAdapter(favouritePageRecyclerViewAdapter);\n\n }", "public void setRecycler(){\n GridLayoutManager manager=new GridLayoutManager(context,2,LinearLayoutManager.HORIZONTAL,\n false);\n\n recyclerView.setLayoutManager(manager);\n recyclerView.setHasFixedSize(true);\n MainMenuAdapter mainMenuAdapter=new MainMenuAdapter(menuRows,context,true);\n recyclerView.setAdapter(mainMenuAdapter);\n }", "@Override\n public void run() {\n\n\n RecyclerView.Adapter adapter = new RecyclerViewAdapter(aa,aa1,aa4,aa5,aa6,aa7,aa8,aa9);\n\n recyclerview.setAdapter(adapter);\n\n\n\n }", "private void setupRecycler() {\n final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());\n RecyclerView attractionsRecycler = (RecyclerView) getActivity().findViewById(R.id.contentMain_attractionsRecycler);\n attractionsRecycler.setLayoutManager(linearLayoutManager);\n\n attractionsAdapter = new AttractionRowAdapter(getActivity(), FavouritesListFragment.this, DataManager.currentFavouritesList);\n attractionsRecycler.setAdapter(attractionsAdapter);\n }", "public void setRecyclerView() {\n mRecyclerView = view.findViewById(R.id.fragment_notifications_today_rv); //instantiating the recyclerview\n mRecyclerView.setHasFixedSize(true); //\n\n // Setting the layout manager for the recycler view\n mLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false); //instantiates how the layout should look like for recyclerview\n mRecyclerView.setLayoutManager(mLayoutManager); //sets the layout manager to one chosen\n\n // Setting the custom adapter for the recycler view\n mAdapter = new NotificationsTodayAdapter(this,\n (NotificationsTodayContract.Presenter.AdapterAPI) mPresenter); //instantiates the adapter\n mRecyclerView.setAdapter(mAdapter); //sets the adapter\n //notificationsScreenController.listenTodayRecyclerView(mRecyclerView, notificationResponse);\n// mPresenter.listenTodayRecyclerView(mRecyclerView, notificationResponse);\n }", "private void iniRecyclerView() {\n// RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recycler_view);\n// recyclerView.setHasFixedSize(true);\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\n recyclerView.setAdapter(presAdapter);\n }", "private void initRecyclerView() {\n RecyclerView recyclerview = findViewById(R.id.projectList);\n RecyclerViewAdapter adapter = new RecyclerViewAdapter(projectNames, this);\n recyclerview.setAdapter(adapter);\n final LinearLayoutManager layoutManager = new LinearLayoutManager(this);\n layoutManager.setOrientation(LinearLayoutManager.VERTICAL);\n recyclerview.setLayoutManager(layoutManager);\n }", "private void setAdaptersForDataToShow() {\n LinearLayoutManager linearLayoutManager_SectionOfDays = new LinearLayoutManager(this);\n linearLayoutManager_SectionOfDays.setOrientation(LinearLayoutManager.HORIZONTAL);\n recyclerView_sectionOfDays.setLayoutManager(linearLayoutManager_SectionOfDays);\n recyclerView_sectionOfDays.setAdapter(new SectionOfDays_RecyclerViewAdapter(this, daysArray, this));\n\n /**\n * Vertical Recycler View showing List Of Trains\n */\n LinearLayoutManager linearLayoutManager_ListOfTrains = new LinearLayoutManager(this);\n linearLayoutManager_ListOfTrains.setOrientation(LinearLayoutManager.VERTICAL);\n recyclerView_listOfTrains.setLayoutManager(linearLayoutManager_ListOfTrains);\n setAdapter_ListOfTrains_Vertical_RecyclerView(0);\n }", "private void setUpRecyclerView() {\n\n if (listOfPlants.size() == 0) {\n populatePlantList();\n }\n\n mRecyclerView.setHasFixedSize(true);\n mLayoutManager = new LinearLayoutManager(getContext());\n mAdapter = new RecyclerViewAdapter(listOfPlants, getActivity());\n mRecyclerView.setLayoutManager(mLayoutManager);\n mRecyclerView.setAdapter(mAdapter);\n }", "private void setUpRecycler() {\n recyclerView = (RecyclerView) findViewById(R.id.recycler_view);\n mAdapter = new ConverterAdapter(this, currencyList);\n RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());\n recyclerView.setLayoutManager(mLayoutManager);\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n ItemTouchHelper.Callback callback =\n new ItemMoveCallback(mAdapter);\n ItemTouchHelper touchHelper = new ItemTouchHelper(callback);\n touchHelper.attachToRecyclerView(recyclerView);\n recyclerView.setAdapter(mAdapter);\n }", "private void initRecyclerView() {\n mAdapter = new FriendAdapter(new ClickHandler<Author>() {\n @Override\n public void onClick(Author clickedItem) {\n\n // Start the UserActivity for the clicked user to allow the user to confirm this\n // is the person they are trying to connect with\n Intent intent = new Intent(SearchUserActivity.this, UserActivity.class);\n intent.putExtra(AUTHOR_KEY, clickedItem.firebaseId);\n\n startActivity(intent);\n }\n });\n mAdapter.showAddSocialButton(true);\n\n mBinding.searchUserLayout.searchUserRv.setLayoutManager(new LinearLayoutManager(this));\n mBinding.searchUserLayout.searchUserRv.setAdapter(mAdapter);\n }", "private void populate() {\n\n adapter = new DashboardRecyclerAdapter(getActivity(), getData());\n dashboardRecyclerView.setAdapter(adapter);\n dashboardRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n\n\n /*GridAdapter adapter = new GridAdapter(getActivity(), options);\n gridView.setAdapter(adapter);*/\n\n //setting up on click listener in gridview\n /*gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n switch (options[position]) {\n case \"Appliances\":\n startActivity(new Intent(getActivity(), AppliancesActivity.class));\n break;\n *//*case \"Electrical\":\n startActivity(new Intent(getActivity(), ElectricalActivity.class));\n break;*//*\n case \"Wiring\":\n startActivity(new Intent(getActivity(), WiringActivity.class));\n break;\n case \"Plumbing\":\n startActivity(new Intent(getActivity(), PlumbingActivity.class));\n break;\n }\n }\n\n });*/\n }", "public void setAdapter() {\n datalist = new ArrayList<>();\n\n adapter = new SoundListAdapter(context, datalist, new AdapterClickListener() {\n @Override\n public void onItemClick(View view, int pos, Object object) {\n\n SoundsModel item = (SoundsModel) object;\n\n if (view.getId() == R.id.done) {\n stopPlaying();\n downLoadMp3(item.id, item.sound_name, item.acc_path);\n } else if (view.getId() == R.id.fav_btn) {\n callApiForFavSound(pos, item);\n } else {\n if (thread != null && !thread.isAlive()) {\n stopPlaying();\n playaudio(view, item);\n } else if (thread == null) {\n stopPlaying();\n playaudio(view, item);\n }\n }\n }\n });\n\n recyclerView.setAdapter(adapter);\n\n\n }", "private void initRecyclerView(){\n facility_RCV_result.setHasFixedSize(true);\n layoutManager = new LinearLayoutManager(this.getContext());\n facility_RCV_result.setLayoutManager(layoutManager);\n mAdapter = new FacilityRecyclerViewAdapter(facilityArrayList);\n facility_RCV_result.setAdapter(mAdapter);\n }", "@Override\n public void run() {\n myAdapter = new MyAdapter(thisCnxt, data);\n recyclerView.setAdapter(myAdapter);\n }", "private void initRecyclerView() {\n Log.d(TAG, \"initRecyclerView: init recyclerView.\");\n RecyclerView recyclerView = findViewById(R.id.homepage_recycview);\n\n //Create an adapter to display the groups' information in a recyclerview\n GroupRVA adapter = new GroupRVA(this, results, GroupProfile.class);\n recyclerView.setAdapter(adapter);\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\n }", "private void setUpRecyclerView() {\n noDataAvailableTextView = (TextView) findViewById(R.id.videoNoDataAvailableTextView);\n videoRecyclerView = (RecyclerView) findViewById(R.id.VideoRecyclerView);\n videoRecyclerView.setHasFixedSize(true);\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);\n videoRecyclerView.setLayoutManager(linearLayoutManager);\n }", "public void initialiseRecycler(ArrayList<String> deviceID, ArrayList<String>deviceNames){\r\n\r\n\r\n RecyclerView recyclerView = findViewById(R.id.recyclerView);\r\n\r\n\r\n adapterDevices= new MyDevicesAdapterView(this, deviceID, deviceNames);\r\n\r\n recyclerView.setAdapter(adapterDevices);\r\n\r\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\r\n\r\n\r\n }", "private void setAdapter() {\n AdapterSymptomList adapter = new AdapterSymptomList(allSymptomsList, ActivityRecordsListSymptoms.this);\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(ActivityRecordsListSymptoms.this);\n symptomRecyclerView.setLayoutManager(layoutManager);\n symptomRecyclerView.setItemAnimator(new DefaultItemAnimator());\n symptomRecyclerView.setAdapter(adapter);\n }", "private void setDataListReminder() {\n mReminderAdapter = new ReminderAdapter(mReminderDtoList, BaseActivity.this);\n RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(BaseActivity.this, LinearLayoutManager.VERTICAL, false);\n mRecyclerViewReminder.setLayoutManager(mLayoutManager);\n mReminderAdapter.notifyDataSetChanged();\n mRecyclerViewReminder.setAdapter(mReminderAdapter);\n }", "public MyRecyclerViewAdapter(Context context, ArrayList<itemView> data) {\n this.mInflater = LayoutInflater.from(context);\n this.mData = data;\n }", "public ModelRecyclerAdapter(Context context, ArrayList<Model> myDataset) {\n mDataset = myDataset;\n mContext = context.getApplicationContext();\n mInflater = LayoutInflater.from(context);\n }", "private void setupCategoryRecycler() {\n\t\t// Keep reference of the dataset (arraylist here) in the adapter\n\t\tcategoryRecyclerAdapter = new CategoryRecyclerAdapter(this, categories, this::onCategoryClick);\n\n\t\t// set up the RecyclerView for the categories of team\n\t\tRecyclerView categoryRecycler = findViewById(R.id.categoryRecycler);\n\t\tcategoryRecycler.setAdapter(categoryRecyclerAdapter);\n\t}", "private void iniAdapter(List<Task> tasks) {\n presAdapter = new TaskAdapter(tasks, this, 1);\n// recyclerView.setAdapter(presAdapter);\n }", "private void configureRecyclerView(){\n this.postAdapter = new PostAdapter(generateOptionsForAdapter(PostHelper.getAllMyPosts(BaseActivity.getUid())),\n Glide.with(this), this,false, false);\n\n\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n recyclerView.setAdapter(this.postAdapter);\n }", "public void setAdapter() {\n\t\tactivityAdapter = new ActivitiesAdapter(getActivity(), List,\n\t\t\t\ttotalmintxt);\n\t\tSystem.out.println(\"listsize=\" + List.size());\n\t\tif (List.size() > 0) {\n\t\t\tint totalmin = 0, totalcal = 0;\n\t\t\tfor (int i = 0; i < List.size(); i++) {\n\t\t\t\ttotalmin += Integer.parseInt(List.get(i).get(\n\t\t\t\t\t\tBaseActivity.total_time_minutes));\n\t\t\t\ttotalcal += Integer.parseInt(List.get(i).get(\n\t\t\t\t\t\tBaseActivity.calories_burned));\n\n\t\t\t}\n\t\t\ttotalmintxt.setText(\"\" + totalmin + \" min\");// calories_burned\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// calories_burned\n\t\t\ttotalcaltxt.setText(\"\" + totalcal + \" cal\");\n\t\t\tactivityListView.setAdapter(activityAdapter);\n\n\t\t\tcom.fitmi.utils.Constants.totalcal = totalcal;\n\n\t\t\tHomeFragment tosetCalory = new HomeFragment();\n\t\t\tNotificationCaloryBurn callBack = (NotificationCaloryBurn) tosetCalory;\n\n\t\t\tcallBack.setTotalCaloryBurn(com.fitmi.utils.Constants.totalcal);\n\t\t} else {\n\n\t\t\ttotalcaltxt.setText(\"0 cal\");\n\t\t\tactivityListView.setAdapter(activityAdapter);\n\t\t}\n\n\t\tsetActivitySpinner();\n\t}", "private void setupRecyclerview() {\n mQuery = FirebaseDatabase.getInstance().getReference(\"reports\").limitToLast(50).orderByKey();\n RecyclerView recyclerView = (RecyclerView) findViewById(R.id.sightings_master_recyclerview);\n mMyAdapter = new MyAdapter(mQuery, mAdapterItems, mAdapterKeys);\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\n recyclerView.setAdapter(mMyAdapter);\n }", "private void setRecycleView(){\n\n RecyclerView recyclerView = findViewById(R.id.recycler_view);\n RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());\n recyclerView.setLayoutManager(mLayoutManager);\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n recyclerView.setAdapter(multiViewAdapter);\n }", "public void initRecyclerView() {\n\r\n\r\n recyclerView.setHasFixedSize(true);\r\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\r\n\r\n\r\n adapter = new LokerAdapter(getContext(), itemList);\r\n recyclerView.setAdapter(adapter);\r\n\r\n }", "private void initView() {\n // set layout for recycle view\n //hasFixedSize true if adapter changes cannot affect the size of the RecyclerView\n recyclerView.setHasFixedSize(true);\n // this layout can be vertical or horizontal by change the second param\n // of LinearLayoutManager, and display up to down by set the third param false\n LinearLayoutManager layoutManager = new LinearLayoutManager(this,\n LinearLayoutManager.VERTICAL, false);\n\n recyclerView.setLayoutManager(layoutManager);\n importData();\n // set adapter for recycle view\n recyclerView.setAdapter(alarmAdapter);\n }", "private void refreshRecyclerView() {\n adapter = new AppWrapperAdapter(appList,\n new AppWrapperAdapter.FeedInteractionListener() {\n @Override\n public void onAppClicked(AppWrapper app, int index) {\n // TODO\n }\n });\n recyclerView.setAdapter(adapter);\n }", "public void configs() {\n adaptadorRecyclerView = new AdaptadorRecyclerView(new ArrayList<>(), this);//configuramos el adaptador; necesitamos implementar interfaz OnItemClickListener y sobreescribir sus metodos\n recyclerView.setLayoutManager(new LinearLayoutManager(this));//configuramos la recyclerView\n recyclerView.setAdapter(adaptadorRecyclerView);\n }", "private void init() {\n Log.d(TAG, \"init: init recyclerview\");\n mainRecyclerView = findViewById(R.id.mainRecyclerView);\n layoutManager = new LinearLayoutManager(getApplicationContext());\n CircleImageView profileImage = findViewById(R.id.displayProfileImage);\n profileImage.setVisibility(View.GONE);\n ImageView backArrow = findViewById(R.id.backArrow);\n backArrow.setVisibility(View.GONE);\n TextView title = findViewById(R.id.profileName);\n title.setText(getString(R.string.mock_messaging));\n usersDisplays.clear();\n usersDisplays = db.userDao().getAllUsersDisplay();\n recyclerAdapter = new MainRecyclerViewAdapter(usersDisplays);\n mainRecyclerView.setLayoutManager(layoutManager);\n mainRecyclerView.setAdapter(recyclerAdapter);\n recyclerAdapter.setOnItemClickListener(new MainRecyclerViewAdapter.OnItemClickListener() {\n @Override\n public void OnItemClick(int position) {\n ChatFragment chatFragment = ChatFragment.newInstance(usersDisplays.get(position).getUserName(),\n ImageConvert.convertByteArrayToImage(usersDisplays.get(position).getProfileImage()));\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.setCustomAnimations(R.anim.fragment_enter_from_rigth, R.anim.fragment_exit_to_right,\n R.anim.fragment_enter_from_rigth, R.anim.fragment_exit_to_right);\n fragmentTransaction.addToBackStack(\"ChatFragment\");\n fragmentTransaction.add(R.id.chat_container, chatFragment, \"CHAT_FRAGMENT\").commit();\n\n }\n });\n }", "private void ConfigRecyclerMovies(){\n movieRecyclerAdapter = new MovieRecyclerAdapter(this);\n popularMovieRecycler.setAdapter(movieRecyclerAdapter);\n popularMovieRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));\n }", "private void initRecyclerView() {\r\n visitsViewModel.setPlaceholderText(true);\r\n\r\n RecyclerView mRecyclerView = binding.gridRecyclerView;\r\n mRecyclerView.setHasFixedSize(true);\r\n mRecyclerView.setLayoutManager(new LinearLayoutManager(activity));\r\n\r\n visitsAdapter = new VisitsAdapter();\r\n mRecyclerView.setAdapter(visitsAdapter);\r\n\r\n visitsViewModel.visits.observe(getViewLifecycleOwner(), this::resetRecycler);\r\n }", "private void setUpAdapter(){\n customMovieAdapter= new CustomMovieAdapter(getActivity(),R.layout.list_movie_forecast,movieRowItemsList);\n gridView.setAdapter(customMovieAdapter);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n accessModels = new AccessModel();\n modelArrayList = accessModels.getModels();\n\n recyclerView = findViewById(R.id.feed);\n\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this);\n recyclerView.setLayoutManager(layoutManager);\n\n modelAdapter = new ModelAdapter(this, modelArrayList);\n recyclerView.setAdapter(modelAdapter);\n\n modelAdapter.notifyDataSetChanged();\n }", "private void setupRecycler() {\n realmRecycler.setHasFixedSize(true);\n // use a linear layout manager since the cards are vertically scrollable\n //final LinearLayoutManager layoutManager = new LinearLayoutManager(this);\n final LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());\n layoutManager.setOrientation(LinearLayoutManager.VERTICAL);\n realmRecycler.setLayoutManager(layoutManager);\n // create an empty adapter and add it to the recycler view\n //realmJarsAdapter = new JarsAdapter(this);\n realmJarsAdapter = new JarsAdapter(getContext());\n realmRecycler.setAdapter(realmJarsAdapter);\n }", "public void setAdapter() {\n binding.RvwalletAmount.setLayoutManager(new GridLayoutManager(getActivity(), 2));\n binding.RvwalletAmount.setHasFixedSize(true);\n WalletAdapter kyCuploadAdapter = new WalletAdapter(getActivity(), getListWallet(), this);\n binding.RvwalletAmount.setAdapter(kyCuploadAdapter);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_home, container, false);\n\n ApiServices apiServices = ApiClint.getRetrofit().create(ApiServices.class);\n\n Toolbar toolbar = view.findViewById(R.id.toolbar_home);\n ((AppCompatActivity) getActivity()).setSupportActionBar(toolbar);\n\n recyclerView = view.findViewById(R.id.rv_categories);\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());\n linearLayoutManager.setOrientation(RecyclerView.HORIZONTAL);\n linearLayoutManager.getReverseLayout();\n recyclerView.setLayoutManager(linearLayoutManager);\n\n\n mainRecycler = view.findViewById(R.id.main_recycler);\n mainRecycler.setLayoutManager(new LinearLayoutManager(getContext()));\n\n List<MainModel> mainList = new ArrayList<>();\n AdapterMain adapterMain = new AdapterMain(getContext(), mainList);\n\n mainRecycler.setAdapter(adapterMain);\n\n\n// List<Results> list = new ArrayList<>(5);\n// list.add(new Results(1, \"TItle\", \"Original\", 1, \"wef\", \"sdf\", \"\", \"\"));\n// list.add(new Results(1, \"TItle\", \"Original\", 1, \"wef\", \"sdf\", \"\", \"\"));\n// list.add(new Results(1, \"TItle\", \"Original\", 1, \"wef\", \"sdf\", \"\", \"\"));\n// list.add(new Results(1, \"TItle\", \"Original\", 1, \"wef\", \"sdf\", \"\", \"\"));\n// list.add(new Results(1, \"TItle\", \"Original\", 1, \"wef\", \"sdf\", \"\", \"\"));\n\n\n //categories api called:----------------------->\n Call<CategoriesGenres> genresCall = apiServices.getGenres(API_KEY);\n genresCall.enqueue(new Callback<CategoriesGenres>() {\n @Override\n public void onResponse(Call<CategoriesGenres> call, Response<CategoriesGenres> response) {\n if (response.isSuccessful()) {\n Log.d(TAG, \"onResponse: Categories: \" + response.isSuccessful());\n List<Genres> genres = response.body().getGenres();\n genres.add(new Genres(\"Recommends\", -1));\n AdapterCategories adapter = new AdapterCategories(genres);\n recyclerView.setAdapter(adapter);\n adapter.notifyDataSetChanged();\n } else {\n\n Log.d(TAG, \"Categories onResponse: \" + response.errorBody().toString());\n }\n }\n\n @Override\n public void onFailure(Call<CategoriesGenres> call, Throwable t) {\n Toast.makeText(getContext(), \"Internet Connection Error\", Toast.LENGTH_SHORT).show();\n Log.d(TAG, \"Categories onFailure: \" + t.getMessage());\n }\n });\n\n //Slider: Playing call part start now:------------------->\n\n Call<CategoriesPlaying> playingCall = apiServices.getPlaying(API_KEY);\n playingCall.enqueue(new Callback<CategoriesPlaying>() {\n @Override\n public void onResponse(Call<CategoriesPlaying> call, Response<CategoriesPlaying> response) {\n if (response.isSuccessful()) {\n Log.d(TAG, \"onResponse: Playing: \" + response.isSuccessful());\n mainList.add(0, new MainModel(response.body().getResults(), SLIDER_TYPE));\n adapterMain.notifyDataSetChanged();\n\n } else {\n Log.d(TAG, \"Playing onResponse: \" + response.message());\n\n\n }\n }\n\n @Override\n public void onFailure(Call<CategoriesPlaying> call, Throwable t) {\n Toast.makeText(getContext(), \"Internet Connection Error\", Toast.LENGTH_SHORT).show();\n Log.d(TAG, \"Playing onFailure: \" + t.getMessage());\n }\n });\n\n\n //Trending call part start now:------------------------------>\n\n Call<CategoriesPopular> trendingCall = apiServices.getTrending(API_KEY);\n trendingCall.enqueue(new Callback<CategoriesPopular>() {\n @Override\n public void onResponse(Call<CategoriesPopular> call, Response<CategoriesPopular> response) {\n if (response.isSuccessful()) {\n Log.d(TAG, \"onResponse: Trending: \" + response.isSuccessful());\n mainList.add(new MainModel(response.body().getResults(), \"Trending Movie\", POPULAR_TYPE, TYPE_TRENDING));\n\n\n adapterMain.notifyDataSetChanged();\n\n\n } else {\n Log.d(TAG, \"onResponse: Trending: \" + response.message());\n }\n }\n\n @Override\n public void onFailure(Call<CategoriesPopular> call, Throwable t) {\n Toast.makeText(getContext(), \"Internet Connection Error\", Toast.LENGTH_SHORT).show();\n Log.e(TAG, \"onFailure: Trending: \", t);\n }\n });\n\n\n //Popular call part start now:------------------------------>\n\n Call<CategoriesPopular> popularCall = apiServices.getPopular(API_KEY);\n popularCall.enqueue(new Callback<CategoriesPopular>() {\n @Override\n public void onResponse(Call<CategoriesPopular> call, Response<CategoriesPopular> response) {\n if (response.isSuccessful()) {\n Log.d(TAG, \"Popular onResponse: \" + response.isSuccessful());\n\n mainList.add(new MainModel(response.body().getResults(), \"Popular Movie\", POPULAR_TYPE, TYPE_POPULAR));\n adapterMain.notifyDataSetChanged();\n\n\n } else {\n Log.d(TAG, \"Popular onResponse: \" + response.message());\n }\n }\n\n @Override\n public void onFailure(Call<CategoriesPopular> call, Throwable t) {\n Toast.makeText(getContext(), \"Internet Connection Error\", Toast.LENGTH_SHORT).show();\n Log.e(TAG, \"onFailure: Popular: \", t);\n }\n });\n\n\n //Top rated call part start now:------------------------------>\n\n Call<CategoriesPopular> topRatedCall = apiServices.getTopRated(API_KEY);\n topRatedCall.enqueue(new Callback<CategoriesPopular>() {\n @Override\n public void onResponse(Call<CategoriesPopular> call, Response<CategoriesPopular> response) {\n if (response.isSuccessful()) {\n Log.d(TAG, \"Top Rated onResponse: \" + response.isSuccessful());\n\n mainList.add(new MainModel(response.body().getResults(), \"Top Rated Movie\", POPULAR_TYPE, TYPE_TOP_RATED));\n adapterMain.notifyDataSetChanged();\n\n\n } else {\n Log.d(TAG, \"Top Rated onResponse: \" + response.message());\n }\n }\n\n @Override\n public void onFailure(Call<CategoriesPopular> call, Throwable t) {\n Toast.makeText(getContext(), \"Internet Connection Error\", Toast.LENGTH_SHORT).show();\n Log.e(TAG, \"onFailure: Top Rated: \", t);\n }\n });\n\n\n //Up Coming call part start now:------------------------------>\n\n Call<CategoriesPopular> upComingCall = apiServices.getUpComing(API_KEY);\n upComingCall.enqueue(new Callback<CategoriesPopular>() {\n @Override\n public void onResponse(Call<CategoriesPopular> call, Response<CategoriesPopular> response) {\n if (response.isSuccessful()) {\n Log.d(TAG, \"Up Coming onResponse: \" + response.isSuccessful());\n\n mainList.add(new MainModel(response.body().getResults(), \"Up Coming Movie\", POPULAR_TYPE, TYPE_UP_COMING));\n adapterMain.notifyDataSetChanged();\n\n\n } else {\n Log.d(TAG, \"Up Coming onResponse: \" + response.message());\n }\n }\n\n @Override\n public void onFailure(Call<CategoriesPopular> call, Throwable t) {\n Toast.makeText(getContext(), \"Internet Connection Error\", Toast.LENGTH_SHORT).show();\n Log.e(TAG, \"onFailure: Up Coming : \", t);\n }\n });\n\n\n return view;\n }", "private void setUpRecycler(RecyclerView recyclerView) {\n\n recyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));\n FirebaseRecyclerOptions<Post> options = new FirebaseRecyclerOptions.Builder<Post>()\n .setQuery(DBUtils.getReferencePost(), Post.class).build();\n adapter = new PostAdapter(options, requireContext());\n recyclerView.setAdapter(adapter);\n }", "private void initData() {\n contents.clear();\n images.clear();\n contents.add(\"荣誉殿堂\");\n contents.add(getResources().getString(R.string.mine_item1));\n contents.add(getResources().getString(R.string.mine_item2));\n contents.add(getResources().getString(R.string.mine_item4));\n contents.add(getResources().getString(R.string.mine_item3));\n\n String sex = SPHelper.getDetailMsg(getActivity(), Cons.USER_INFO, getString(R.string.appsex_man));\n images.add(BGHelper.setButtonSetting(getActivity(), sex));\n images.add(BGHelper.setButtonNotify(getActivity(), sex));\n images.add(BGHelper.setButtonReport(getActivity(), sex));\n images.add(sex.equals(\"M\") ? R.drawable.ioc_mine_que_blue : R.drawable.ioc_mine_que_red);\n images.add(BGHelper.setButtonSetting(getActivity(), sex));\n\n\n adapter = new MineAdapter(getActivity(), contents, images, this);\n lv_mine.setAdapter(adapter);\n }", "private void llenaRecyclerView() {\n // De manera temporal muestra datos generados manualmente\n generaDatos();\n adapterInst = new InstitucionRecyclerViewAdapter(ListInstitucionActivity.this, mDatos);\n recyclerView.setAdapter(adapterInst);\n progressBar.setVisibility(View.GONE);\n }", "@Override\n protected void onPostExecute(Void result)\n {\n // close the progress dialog\n progressDialog.dismiss();\n\n // The onCreate part.\n setContentView(R.layout.activity_main);\n // initialize the View\n RecyclerView mRecyclerView = (RecyclerView) findViewById(R.id.card_list);\n\n // use this setting to improve performance if you know that changes\n mRecyclerView.setHasFixedSize(true);\n\n // use a linear layout manager\n LinearLayoutManager mlinearLayoutManager = new LinearLayoutManager(MainActivity.this);\n mlinearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);\n mRecyclerView.setLayoutManager(mlinearLayoutManager);\n\n // specify an adapter\n CardAdapter ca = new CardAdapter(events);\n mRecyclerView.setAdapter(ca);\n\n }", "public void getData() {\n String museums = \"museums\";\n categoriesArrayList = new KategorieDao().KategorieList(databaseHelper, museums);\n MuseumsAdapter adapter = new MuseumsAdapter(categoriesArrayList, getApplicationContext());\n ;\n museum_rv.setAdapter(adapter);\n }", "private void setUpRecycler() {\n Log.d(\"MainActivity\", \"setUpRecycler : start\");\n // Connecting the recyclerview to the view in the layout\n prayerRecyclerView = findViewById(R.id.recycler_main_movie);\n\n // Creating our custom adapter\n prayerRecyclerAdapter = new PrayerRecyclerAdapter(this, prayerList);\n Log.d(\"MainActivity\", \"setUpRecycler : prayerList = \" + prayerList.size());\n // Setting the adapter to our recyclerview\n prayerRecyclerView.setAdapter(prayerRecyclerAdapter);\n\n // Creating and setting a layout manager.\n // Note that the manager is VERTICAL, thus a vertical list\n LinearLayoutManager layout = new LinearLayoutManager(\n this, LinearLayoutManager.VERTICAL, false);\n prayerRecyclerView.setLayoutManager(layout);\n Log.d(\"MainActivity\", \"setUpRecycler : stop\");\n }", "private void initDashboardListRecyclerView() {\n GridLayoutManager gridLayoutManager;\n if (AppUtils.isTablet()) {\n gridLayoutManager = new GridLayoutManager(this, 3);\n } else {\n gridLayoutManager = new GridLayoutManager(this, 1);\n\n }\n /* setLayoutManager associates the gridLayoutManager with our RecyclerView */\n mDashboardList.setLayoutManager(gridLayoutManager);\n\n mDashboardList.setItemAnimator(new DefaultItemAnimator());\n\n /*\n * Use this setting to improve performance if you know that changes in content do not\n * change the child layout size in the RecyclerView\n */\n mDashboardList.setHasFixedSize(true);\n\n /*\n * The RecipesListAdapter is responsible for linking our recipes' data with the Views that\n * will end up displaying our recipe data.\n */\n mDashboardListAdapter = new DashboardListAdapter(this);\n\n /* Setting the adapter attaches it to the RecyclerView in our layout. */\n mDashboardList.setAdapter(mDashboardListAdapter);\n\n }", "public ChatRoomAdapter(ArrayList<String> myDataset, frag_chatrooms ctx) {\n mDataset = myDataset;\n interact = (InteractWithRecyclerView) ctx;\n }", "private void setup() {\n if (getSupportActionBar() != null) {\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n }\n\n subjectId = getIntent().getLongExtra(SUBJECT_EXTRA, 0);\n\n final RecyclerView recyclerView = findViewById(R.id.rv_students);\n students = new ArrayList<>();\n\n adapter = new StudentRecyclerAdapter(students);\n recyclerView.setAdapter(adapter);\n\n LinearLayoutManager layoutManager = new LinearLayoutManager(this);\n recyclerView.setLayoutManager(layoutManager);\n DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(recyclerView.getContext(), layoutManager.getOrientation());\n recyclerView.addItemDecoration(dividerItemDecoration);\n\n swipeRefreshStudents = findViewById(R.id.sr_students);\n swipeRefreshStudents.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n // Refresh items\n refreshItems();\n }\n });\n\n swipeRefreshStudents.setRefreshing(true);\n refreshItems();\n }", "private void initFAQRecyclerView() {\n mFaqAdapter = new FAQAdapter(mFaqs, this);\n mFAQRecyclerView.setAdapter(mFaqAdapter);\n }", "MyRecyclerViewAdapter(Context context, List<Integer> data) {\n this.mInflater = LayoutInflater.from(context);\n this.mData = data;\n }", "private void initObjects() {\n //listUsers = new ArrayList<>();\n //databaseHelper = new DatabaseHelper(activity);\n setUserData();\n\n usersRecyclerAdapter = new UsersRecyclerAdapter(currentUser);\n\n RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());\n recyclerViewUsers.setLayoutManager(mLayoutManager);\n recyclerViewUsers.setItemAnimator(new DefaultItemAnimator());\n recyclerViewUsers.setHasFixedSize(true);\n recyclerViewUsers.setAdapter(usersRecyclerAdapter);\n\n\n\n\n // String emailFromIntent = getIntent().getStringExtra(\"EMAIL\");\n\n // getDataFromSQLite();\n }", "public news_adapter(Context context,ArrayList<data> dataset) {\n mData=dataset;\n mInflater = LayoutInflater.from(context);\n }", "private void init() {\n initActionButton();\n mRecyclerView.setLayoutManager(new GridLayoutManager(this, 2));\n mAdapter = new MainAdapter(getApplicationContext(),getImages());\n mRecyclerView.setAdapter(mAdapter);\n mAdapter.setListener(new MainAdapter.OnClickListener() {\n @Override\n public void onClickItem(ImageItem selected, int position) {\n goToDetailScreen(position);\n }\n });\n }", "private void initAdapter() {\n GridLayoutManager layoutManager = new GridLayoutManager(this, 3);\n //设置布局管理器\n rv.setLayoutManager(layoutManager);\n //设置为垂直布局,这也是默认的\n layoutManager.setOrientation(OrientationHelper.VERTICAL);\n\n adapter1 = new CommomRecyclerAdapter(ChoiceCityActivity.this, stringList, R.layout.recy_country, new CommomRecyclerAdapter.OnItemClickListener() {\n @Override\n public void onItemClick(CommonRecyclerViewHolder holder, int postion) {\n //热门城市点击\n Map map = new HashMap();\n map.put(\"p1\",stringList.get(postion).getHotCity() );\n StatisticsManager.getInstance(mContext).addEventAidl(1812,map);\n\n Intent intent = new Intent(ChoiceCityActivity.this, MainActivity.class);\n intent.putExtra(\"country\", stringList.get(postion).getHotCountry());\n intent.putExtra(\"city\", stringList.get(postion).getHotCity());\n Constans.CITY = stringList.get(postion).getHotCity();\n Constans.COUNTRY = stringList.get(postion).getHotCountry();\n if (isFirst == 1) {\n isFirst=0;\n startActivity(intent);\n } else {\n setResult(RESULT_OK, intent);\n }\n finish();\n }\n }, null) {\n @Override\n public void convert(CommonRecyclerViewHolder holder, Object o, int position) {\n TextView tv_country_name = holder.getView(R.id.tv);\n tv_country_name.setText(stringList.get(position).getHotCity());\n }\n };\n rv.setAdapter(adapter1);\n\n\n }", "private void setupMemberRecycler() {\n\t\tRecyclerView memberRecycler = findViewById(R.id.memberRecycler);\n\n\t\t// Keep reference of the dataset (arraylist here) in the adapter\n\t\tmemberRecyclerAdapter = new MemberRecyclerAdapter(this, entity.getMembers());\n\t\tmemberRecyclerAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {\n\t\t\t@Override\n\t\t\tpublic void onItemRangeInserted(int positionStart, int itemCount) {\n\t\t\t\tmemberRecycler.getLayoutManager().smoothScrollToPosition(memberRecycler, null, memberRecyclerAdapter.getItemCount());\n\t\t\t}\n\t\t});\n\n\t\tmemberRecycler.setAdapter(memberRecyclerAdapter);\n\t}", "private void setAdapter(List<MovieList> listMovies) {\n adapter = new CardAdapter(listMovies, this);\n //Adding adapter to recyclerview\n AlphaInAnimationAdapter alphaAdapter = new AlphaInAnimationAdapter(adapter);\n alphaAdapter.setFirstOnly(false);\n recyclerView.setAdapter(alphaAdapter);\n// recyclerView.setAdapter(adapter);\n }", "protected void init_adapter()\n {\n manager = new GridLayoutManager(this, 2);\n recycler_view.setLayoutManager(manager);\n //recycler_view.setit\n\n adapter = new NasaApodAdapter();\n\n adapter.setOnItemClickListener(new NasaApodAdapter.OnItemClickListener()\n {\n @Override\n public void onItemClick(Photo photo)\n {\n Log.d(\"APOD\", photo.getImgSrc());\n\n intent = new Intent(getApplicationContext(), DetailActivity.class);\n intent.putExtra(\"photo\", photo);\n\n startActivity(intent);\n }\n });\n }", "public void cargarAdaptador(){\n gridLayoutManager = new GridLayoutManager(getContext(), 2);\n recyclerView.setLayoutManager(gridLayoutManager);\n adapterRecetas = new AdapterRecetas(getContext());\n recyclerView.setAdapter(adapterRecetas);\n }", "@Override\n\tpublic void setupUI() {\n\n\t\tprogressDialog = new ProgressDialog(this);\n\t\trecyclerView = findViewById(R.id.recycler_view);\n\n\t\tmovieList = new ArrayList<>();\n\t\tmoviesAdapter = new MoviesAdapter(movieList);\n\n\t\trecyclerView.setLayoutManager(new GridLayoutManager(this, 2));\n\t\trecyclerView.setAdapter(moviesAdapter);\n\n\t}", "@Override\n protected void initData() {\n\n setFragment(homeRecyclerFragment);\n }", "private void setupReviewsList() {\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(DetailActivity.this, RecyclerView.VERTICAL, false);\n reviewsRecyclerView.setLayoutManager(linearLayoutManager);\n reviewsRecyclerView.setHasFixedSize(true);\n\n //setting up adapter\n ReviewAdapter reviewAdapter = new ReviewAdapter(DetailActivity.this, reviewArrayList);\n reviewsRecyclerView.setAdapter(reviewAdapter);\n }", "private void setupUi() {\n //Set title\n setTitle(R.string.send_mms);\n\n //Set numbers recycler view\n RecyclerView recyclerView = mBinding.ownNumbersList;\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\n recyclerView.setHasFixedSize(true);\n\n NumbersAdapter numbersAdapter = new NumbersAdapter();\n numbersAdapter.watchSubscriptionIdData().observe(this, subscriptionId -> {\n mViewModel.setSubscriptionId(subscriptionId);\n });\n recyclerView.setAdapter(numbersAdapter);\n\n //Get data\n addToCompositeDisposable(mViewModel.getDeviceNumbersList());\n\n //Observe on data\n mViewModel.watchSimCardsList().observe(this, numbersAdapter::setData);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_test);\n mContext = TestActivity.this;\n // mAdapterINDEX = new OffersAdapters(this, movieList);\n\n // init adapter\n // recyclerViewINDEX = (RecyclerView) findViewById(R.id.recycler_view);\n // RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);\n // recyclerViewINDEX.setLayoutManager(mLayoutManager);\n // recyclerViewINDEX.setItemAnimator(new DefaultItemAnimator());\n //recyclerViewINDEX.setAdapter(mAdapterINDEX);\n initialize();\n\n// mQueAdapter = new QuestionAdapter(this, movieList);\n// RecyclerView.LayoutManager mLayoutManager2 = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false);\n// queRecyclerView.setLayoutManager(mLayoutManager2);\n// queRecyclerView.setItemAnimator(new DefaultItemAnimator());\n// queRecyclerView.setAdapter(mQueAdapter);\n// final LinearSnapHelper snapHelper = new LinearSnapHelper();\n// snapHelper.attachToRecyclerView(queRecyclerView);\n// queRecyclerView.setOnFlingListener(snapHelper);\n\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_wikipets);\n listaWikipets = (RecyclerView)findViewById(R.id.rvWikipets);\n listaWikipets.setLayoutManager(new LinearLayoutManager(this));\n listaPreguntas.add(getString(R.string.pregunta0));\n listaPreguntas.add(getString(R.string.pregunta1));\n listaPreguntas.add(getString(R.string.pregunta2));\n listaPreguntas.add(getString(R.string.pregunta3));\n listaPreguntas.add(getString(R.string.pregunta4));\n listaPreguntas.add(getString(R.string.pregunta5));\n listaPreguntas.add(getString(R.string.pregunta6));\n listaPreguntas.add(getString(R.string.pregunta7));\n listaPreguntas.add(getString(R.string.pregunta8));\n listaPreguntas.add(getString(R.string.pregunta9));\n\n //Al tocar un item de la lista\n listener = this;\n\n AdaptadorWikipets adaptador = new AdaptadorWikipets(listaPreguntas, this, listener);\n listaWikipets.setAdapter(adaptador);\n }", "private void InitializeAdapter() {\n arrayAdapter = new PlanListRVArrayAdapter(mPlanList);\n recyclerView.setAdapter(arrayAdapter);\n /* arrayAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {\n @Override\n public void onChanged() {\n super.onChanged();\n //arrayAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onItemRangeChanged(int positionStart, int itemCount) {\n // arrayAdapter.notifyItemRangeChanged(positionStart,itemCount);\n }\n\n @Override\n public void onItemRangeInserted(int positionStart, int itemCount) {\n // arrayAdapter.notifyItemRangeRemoved(positionStart,itemCount);\n }\n\n @Override\n public void onItemRangeRemoved(int positionStart, int itemCount) {\n // arrayAdapter.notifyItemRangeRemoved(positionStart,itemCount);\n }\n\n @Override\n public void onItemRangeMoved(int fromPosition, int toPosition, int itemCount) {\n // arrayAdapter.notifyItemMoved(fromPosition,toPosition);\n // TODO itemcount가 1일 경우이므로 1보다 크면 제대로 동작하지 않는다.\n }\n });\n*/\n\n }", "@Override\n public void run() {\n adapter = new DatabaseCitiesAdapter(getApplicationContext(), activity ,dbCities);\n recyclerView.setAdapter(adapter);\n recyclerView.invalidate();\n }", "private void init() {\n articleList = new ArrayList<>();\n newsAdapter = new NewsAdapter(getContext(), articleList, mListener, this);\n\n recyclerViewNews.setHasFixedSize(false);\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getContext());\n\n recyclerViewNews.setLayoutManager(layoutManager);\n recyclerViewNews.setAdapter(newsAdapter);\n }", "@Override\n public void onResume() {\n super.onResume();\n mAdapter = new MyAdapter(Goonlineactivity2.this,TITLES,ICONS,NAME,EMAIL,PROFILE); // Creating the Adapter of MyAdapter class(which we are going to see in a bit)\n // And passing the titles,icons,header view name, header view email,\n // and header view profile picture\n\n mRecyclerView.setAdapter(mAdapter);\n // getthetracker();\n }", "private void initRecycler() {\n\n databaseReference = FirebaseDatabase.getInstance().getReference().child(\"courses\");\n databaseReference.keepSynced(true);\n\n // Set the Firebase query to listen to\n options = new FirebaseRecyclerOptions.Builder<Course>().setQuery(databaseReference, Course.class).build();\n\n adapter = new FirebaseRecyclerAdapter<Course, CourseViewHolder>(options) {\n @Override\n protected void onBindViewHolder(@NonNull final CourseViewHolder holder, int position, @NonNull Course model) {\n\n holder.setBackgroundColorByPosition(position);\n holder.setMCourse(model.getId());\n holder.setMDescription(model.getDescription());\n holder.setMLib(model.getLibelle());\n\n holder.itemView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(CourseActivity.this,TutoringActivity.class);\n intent.putExtra(\"EXTRA_COURSE_ID\",holder.getMCourse().getText().toString());\n intent.putExtra(\"EXTRA_CURRENT_USER\",currentUser);\n startActivity(intent);\n }\n });\n }\n\n @NonNull\n @Override\n public CourseViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {\n return new CourseViewHolder(LayoutInflater.from(CourseActivity.this).inflate(R.layout.course_view, parent, false));\n }\n };\n\n mRecyclerCourse.setAdapter(adapter);\n\n }", "MyRecyclerViewAdapter(Context context, List<String> data,List<String> giorno,List<String> primo,List<String> secondo,List<String> contorno,List<String> dolce) {\n this.mInflater = LayoutInflater.from(context);\n this.mdata = data;\n this.mgiorno = giorno;\n this.mprimo = primo;\n this.msecondo = secondo;\n this.mcontorno = contorno;\n this.mdolce = dolce;\n\n\n\n }", "public void setAdapter() {\n // Create Custom Adapter\n Resources res = getResources();\n adapter = null;\n adapter = new WebsearchListAdapter(this, CustomListViewValuesArr, res);\n list.setAdapter(adapter);\n }", "public ExamsAdapter(AppCompatActivity context, List<Exam> data) {\n this.LayoutInflater = LayoutInflater.from(context);\n this.context = context;\n this.mData = data;\n }", "public ConversationsRecyclerViewAdapter(Context context, ArrayList<ConversationDMResponse> data) {\n this.mInflater = LayoutInflater.from(context);\n this.mData = data;\n }", "private void setupMealsRecycler() {\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getBaseActivity());\n mViewBinding.mMealsRec.setLayoutManager(layoutManager);\n mViewBinding.mMealsRec.setHasFixedSize(true);\n mViewBinding.mMealsRec.setAdapter(mMealsAdapter);\n mMealsAdapter.setListener(this);\n }", "private void setUpRecyclerView() {\n ItemTouchHelper itemTouchHelper = new ItemTouchHelper(new SwipeToDeleteCallback(this));\n itemTouchHelper.attachToRecyclerView(recyclerView);\n }", "public void setUpRecycler() {\n StaggeredGridLayoutManager gridManager = new StaggeredGridLayoutManager(3,StaggeredGridLayoutManager.VERTICAL);\n gvResults.setLayoutManager(gridManager);\n gvResults.addOnScrollListener(new EndlessRecyclerViewScrollListener(gridManager) {\n @Override\n public void onLoadMore(int page, int totalItemsCount) {\n fetchArticles(page,false);\n }\n });\n }", "public void initialzeAdapter() {\n // find grid view\n GridView gridView = (GridView) findViewById(R.id.gridView);\n\n // initialize and set adapter to grid view\n FriendsAdapter adapter = new FriendsAdapter(this, R.layout.grid_item, friends);\n gridView.setAdapter(adapter);\n }" ]
[ "0.69537103", "0.69452965", "0.6934804", "0.688377", "0.68702906", "0.68348104", "0.6801398", "0.6775367", "0.6772365", "0.6701616", "0.6697953", "0.6695618", "0.66951215", "0.6684455", "0.6671339", "0.66637164", "0.6651875", "0.66278386", "0.6567192", "0.6546217", "0.6488104", "0.6482656", "0.6482617", "0.6479372", "0.6463635", "0.64595526", "0.64360774", "0.64277357", "0.6390147", "0.6382411", "0.63658595", "0.6362981", "0.6361139", "0.63521", "0.63493323", "0.6328563", "0.6323343", "0.6321094", "0.63184553", "0.6309002", "0.62916255", "0.6285987", "0.6279321", "0.6273188", "0.6263966", "0.6263924", "0.62615347", "0.625692", "0.62511724", "0.62506974", "0.6236354", "0.6232173", "0.6227412", "0.6211558", "0.62036645", "0.61972934", "0.6192037", "0.61918396", "0.6189161", "0.6186971", "0.6185047", "0.61741436", "0.61592394", "0.61539704", "0.61472946", "0.6137807", "0.61342", "0.61250293", "0.61242336", "0.61218643", "0.61140513", "0.61087584", "0.6105186", "0.6084771", "0.6067113", "0.60495734", "0.6044193", "0.6036613", "0.60289186", "0.60209244", "0.6006997", "0.5981632", "0.5981607", "0.5972613", "0.5950343", "0.59387404", "0.59374464", "0.59345454", "0.59242046", "0.59121364", "0.58949125", "0.5894045", "0.5874952", "0.58728385", "0.5870583", "0.5860481", "0.58572894", "0.5851257", "0.5844979", "0.58422124", "0.58280486" ]
0.0
-1
Inflates the overflow menu at the toolbar
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.mainactivity_toolbar_overflowmenu,menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.toolbar, menu);\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "private void inflateToolbar() {\n\n mToolbar = (Toolbar) getView().findViewById(R.id.toolbar_fragment);\n\n if (mToolbar != null) {\n mToolbar.setNavigationIcon(ResourcesCompat.getDrawable(getResources(), R.drawable.ic_action_navigation_arrow_back, null));\n mToolbar.setTitleTextColor(getResources().getColor(R.color.white));\n mToolbar.setNavigationOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n handleNavigation();\n }\n });\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "public ToolBarManager initMenu(int menuResId,Toolbar.OnMenuItemClickListener onMenuItemClickListener,int overFlowResId){\n //Menu 设置 代替onCreateOptionsMenu方法\n mToolbar.inflateMenu(menuResId);\n //Menu 设置 代替onOptionsItemSelected方法\n if(onMenuItemClickListener!=null){\n mToolbar.setOnMenuItemClickListener(onMenuItemClickListener);\n mToolbar.setOverflowIcon(getDrawable(overFlowResId));\n }\n return instance;\n }", "public ToolBarManager initMenu(int menuResId,Toolbar.OnMenuItemClickListener onMenuItemClickListener,Drawable overFlowDrawable){\n //Menu 设置 代替onCreateOptionsMenu方法\n mToolbar.inflateMenu(menuResId);\n //Menu 设置 代替onOptionsItemSelected方法\n if(onMenuItemClickListener!=null){\n mToolbar.setOnMenuItemClickListener(onMenuItemClickListener);\n mToolbar.setOverflowIcon(overFlowDrawable);\n }\n return instance;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu)\n {\n /*Grabs the information from the overflow_menu resource in the menu folder and sets them\n to the action bar*/\n try {\n getMenuInflater().inflate(R.menu.overflow_menu, menu);\n return true;\n } catch ( Exception e ) {\n Toast.makeText(getApplicationContext(),\"EXCEPTION \" + e + \" occurred!\",Toast.LENGTH_SHORT).show();\n return false;\n }\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {\n\treturn inflater.inflate(R.layout.fragment_toolbar, container, false);\r\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n Log.e(\"debug\", \"in bigImageSlidePageFragment, creating toolbar for position: \"+ getArguments().getInt(\"position\"));\n menu.clear();\n inflater.inflate(R.menu.manu_image_details, menu);\n inflater.inflate(R.menu.menu_app_info, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater menuInflater = getMenuInflater();\n menuInflater.inflate(R.menu.toolbar_menu, menu);\n return true;\n }", "@AutoGenerated\n\tprivate HorizontalLayout buildHlToolbar() {\n\t\thlToolbar = new HorizontalLayout();\n\t\thlToolbar.setImmediate(false);\n\t\thlToolbar.setWidth(\"100.0%\");\n\t\thlToolbar.setHeight(\"100.0%\");\n\t\thlToolbar.setMargin(false);\n\t\t\n\t\t// btnFirstRegister\n\t\tbtnFirstRegister = new Button();\n\t\tbtnFirstRegister.setCaption(\"<<\");\n\t\tbtnFirstRegister.setImmediate(true);\n\t\tbtnFirstRegister.setWidth(\"-1px\");\n\t\tbtnFirstRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnFirstRegister);\n\t\t\n\t\t// btnPreviousRegister\n\t\tbtnPreviousRegister = new Button();\n\t\tbtnPreviousRegister.setCaption(\"<\");\n\t\tbtnPreviousRegister.setImmediate(true);\n\t\tbtnPreviousRegister.setWidth(\"-1px\");\n\t\tbtnPreviousRegister.setHeight(\"-1px\");\n\t\tbtnPreviousRegister.setTabIndex(1);\n\t\thlToolbar.addComponent(btnPreviousRegister);\n\t\t\n\t\t// lblCountRegister\n\t\tlblCountRegister = new Label();\n\t\tlblCountRegister.setStyleName(\"nav-toolbar-separator\");\n\t\tlblCountRegister.setImmediate(false);\n\t\tlblCountRegister.setWidth(\"50px\");\n\t\tlblCountRegister.setHeight(\"-1px\");\n\t\tlblCountRegister.setValue(\"1/1\");\n\t\thlToolbar.addComponent(lblCountRegister);\n\t\thlToolbar.setComponentAlignment(lblCountRegister, new Alignment(48));\n\t\t\n\t\t// btnNextRegister\n\t\tbtnNextRegister = new Button();\n\t\tbtnNextRegister.setCaption(\">\");\n\t\tbtnNextRegister.setImmediate(true);\n\t\tbtnNextRegister.setWidth(\"-1px\");\n\t\tbtnNextRegister.setHeight(\"-1px\");\n\t\tbtnNextRegister.setTabIndex(2);\n\t\thlToolbar.addComponent(btnNextRegister);\n\t\t\n\t\t// btnLastRegister\n\t\tbtnLastRegister = new Button();\n\t\tbtnLastRegister.setCaption(\">>\");\n\t\tbtnLastRegister.setImmediate(true);\n\t\tbtnLastRegister.setWidth(\"-1px\");\n\t\tbtnLastRegister.setHeight(\"-1px\");\n\t\tbtnLastRegister.setTabIndex(3);\n\t\thlToolbar.addComponent(btnLastRegister);\n\t\t\n\t\t// btnDownRegister\n\t\tbtnDownRegister = new Button();\n\t\tbtnDownRegister.setCaption(\"v\");\n\t\tbtnDownRegister.setImmediate(true);\n\t\tbtnDownRegister.setWidth(\"-1px\");\n\t\tbtnDownRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnDownRegister);\n\t\t\n\t\t// btnUpRegister\n\t\tbtnUpRegister = new Button();\n\t\tbtnUpRegister.setCaption(\"^\");\n\t\tbtnUpRegister.setImmediate(true);\n\t\tbtnUpRegister.setWidth(\"-1px\");\n\t\tbtnUpRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnUpRegister);\n\t\t\n\t\t// btnDisplayRegister\n\t\tbtnDisplayRegister = new Button();\n\t\tbtnDisplayRegister.setCaption(\"C\");\n\t\tbtnDisplayRegister.setImmediate(false);\n\t\tbtnDisplayRegister.setWidth(\"-1px\");\n\t\tbtnDisplayRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnDisplayRegister);\n\t\t\n\t\t// imgSeparator\n\t\timgSeparator = new Embedded();\n\t\timgSeparator.setImmediate(false);\n\t\timgSeparator.setWidth(\"-1px\");\n\t\timgSeparator.setHeight(\"-1px\");\n\t\timgSeparator.setSource(new ThemeResource(\n\t\t\t\t\"../konekti/images/separator.png\"));\n\t\timgSeparator.setType(1);\n\t\timgSeparator.setMimeType(\"image/png\");\n\t\thlToolbar.addComponent(imgSeparator);\n\t\t\n\t\t// btnRefreshRegister\n\t\tbtnRefreshRegister = new Button();\n\t\tbtnRefreshRegister.setCaption(\"R\");\n\t\tbtnRefreshRegister.setImmediate(true);\n\t\tbtnRefreshRegister.setWidth(\"-1px\");\n\t\tbtnRefreshRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnRefreshRegister);\n\t\t\n\t\t// btnAddRegister\n\t\tbtnAddRegister = new Button();\n\t\tbtnAddRegister.setCaption(\"A\");\n\t\tbtnAddRegister.setImmediate(true);\n\t\tbtnAddRegister.setWidth(\"-1px\");\n\t\tbtnAddRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnAddRegister);\n\t\t\n\t\t// btnEditRegister\n\t\tbtnEditRegister = new Button();\n\t\tbtnEditRegister.setCaption(\"U\");\n\t\tbtnEditRegister.setImmediate(true);\n\t\tbtnEditRegister.setWidth(\"-1px\");\n\t\tbtnEditRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnEditRegister);\n\t\t\n\t\t// btnDeleteRegister\n\t\tbtnDeleteRegister = new Button();\n\t\tbtnDeleteRegister.setCaption(\"D\");\n\t\tbtnDeleteRegister.setImmediate(true);\n\t\tbtnDeleteRegister.setWidth(\"-1px\");\n\t\tbtnDeleteRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnDeleteRegister);\n\t\t\n\t\t// imgSeparatorGroup\n\t\timgSeparatorGroup = new Embedded();\n\t\timgSeparatorGroup.setImmediate(false);\n\t\timgSeparatorGroup.setWidth(\"-1px\");\n\t\timgSeparatorGroup.setHeight(\"-1px\");\n\t\timgSeparatorGroup.setSource(new ThemeResource(\n\t\t\t\t\"../konekti/images/separator_group.png\"));\n\t\timgSeparatorGroup.setType(1);\n\t\timgSeparatorGroup.setMimeType(\"image/png\");\n\t\thlToolbar.addComponent(imgSeparatorGroup);\n\t\thlToolbar.setComponentAlignment(imgSeparatorGroup, new Alignment(48));\n\t\t\n\t\t// btnConfirmRegister\n\t\tbtnConfirmRegister = new Button();\n\t\tbtnConfirmRegister.setCaption(\"[]\");\n\t\tbtnConfirmRegister.setImmediate(true);\n\t\tbtnConfirmRegister.setWidth(\"-1px\");\n\t\tbtnConfirmRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnConfirmRegister);\n\t\t\n\t\t// btnCancelRegister\n\t\tbtnCancelRegister = new Button();\n\t\tbtnCancelRegister.setCaption(\"X\");\n\t\tbtnCancelRegister.setImmediate(true);\n\t\tbtnCancelRegister.setWidth(\"-1px\");\n\t\tbtnCancelRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnCancelRegister);\n\t\t\n\t\treturn hlToolbar;\n\t}", "public boolean onCreateOptionsMenu (Menu menu){\n getMenuInflater().inflate(R.menu.overflow, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_toolbar, menu);\n return true;\n }", "public void initToolbar(){\n //check if toolbar is already inflated\n if(mToolbar == null){\n //if null, inflate the toolbar\n mToolbar = (Toolbar)findViewById(mHouseKeeper.getToolbarId());\n //set support for toolbar, onCreateOptionsMenu() will be called\n setSupportActionBar(mToolbar);\n }\n }", "@Override\n protected void onFinishInflate() {\n super.onFinishInflate();\n mTitleContent = (TextView) findViewById(R.id.title_content);\n mLeftTv = (TextView) findViewById(R.id.title_left_tv);\n mRightTv = (TextView) findViewById(R.id.title_right_tv);\n mRightImg = (ImageView) findViewById(R.id.title_right_img);\n mMessageView = (RelativeLayout) findViewById(R.id.toolbar_message_view);\n mUnReadImg = (ImageView) findViewById(R.id.toolbar_message_unread_img);\n }", "@Override\n\tpublic Toolbar createToolbar() {\n\t\tLightVisualThemeToolbar lightVisualThemeToolbar = new LightVisualThemeToolbar();\n\t\treturn lightVisualThemeToolbar;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.toolbar_menu, menu);\n\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n MenuItem languageItem = menu.findItem(R.id.toolbar_ic_language);\n MenuItem currencyItem = menu.findItem(R.id.toolbar_ic_currency);\n MenuItem profileItem = menu.findItem(R.id.toolbar_edit_profile);\n MenuItem searchItem = menu.findItem(R.id.toolbar_ic_search);\n MenuItem cartItem = menu.findItem(R.id.toolbar_ic_cart);\n profileItem.setVisible(false);\n languageItem.setVisible(false);\n currencyItem.setVisible(false);\n searchItem.setVisible(false);\n cartItem.setVisible(false);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.heropagetoolbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.tool_bar, menu);\n return true;\n }", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "public void onFinishInflate() {\n super.onFinishInflate();\n bringChildToFront(this.menuButton);\n this.buttonsCount = getChildCount();\n createLabels();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.filtertoolbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.index_toolbar_menu, menu);\n return true;\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "public abstract MenuInflater mo2159d();", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_detail, null);\n\n if (getActivity() instanceof MainActivity) {\n ((MainActivity) getActivity()).toolbar.setTitle(mDescription[Data.UzaData.NAME.ordinal()]);\n ((MainActivity) getActivity()).toolbar.findViewById(\n R.id.spinner_toolbar).setVisibility(View.GONE);\n ((MainActivity) getActivity()).getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n ((MainActivity) getActivity()).getSupportActionBar().setHomeButtonEnabled(true);\n\n }\n setHasOptionsMenu(true);\n return setupView(v);\n }", "public void showToolbarAndSideMenu() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n // This unlocks the drawer so it can be opened\n drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);\n\n // Shows the toolbar\n ViewGroup.LayoutParams layoutParams = toolbar.getLayoutParams();\n layoutParams.height = dpToPx(56);\n toolbar.setLayoutParams(layoutParams);\n }\n });\n }", "void modifyToolbar(Toolbar toolbar){\r\n toolbar.setTitle(name);\r\n toolbar.inflateMenu(R.menu.menu_toolbar_package);\r\n\r\n //needed to send context to util classes\r\n final Context context = this;\r\n\r\n toolbar.setOnMenuItemClickListener(\r\n new Toolbar.OnMenuItemClickListener() {\r\n @Override\r\n public boolean onMenuItemClick(MenuItem item) {\r\n switch (item.getItemId())\r\n {\r\n case R.id.action_exit_fragment:\r\n onBackPressed();\r\n break;\r\n case R.id.action_phone:\r\n DialogUtil.makePhoneDialog(context,R.string.dialog_phone_title, R.string.dialog_phone_customer_positive, selectedTask.getReceiver().getPhone());\r\n break;\r\n case R.id.action_sms:\r\n DialogUtil.makeSMSDialog(context, selectedTask);\r\n break;\r\n default:break;\r\n }\r\n return true;\r\n }\r\n });\r\n\r\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n\t\tinflater.inflate(R.menu.forecastfragment, menu );\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t// Initializing parent scroll view and its children\r\n\t\tLayoutInflater inflater = LayoutInflater.from(this);\r\n\t\tmScrollView=(MyHorizontalScrollView) inflater.inflate(R.layout.horz_scroll_with_list_menu, null);\r\n\t\tsetContentView(mScrollView);\r\n\t\tmApp = inflater.inflate(R.layout.addcardinformation, null);\r\n\t\tmAddCardFreezeView = (Button) mApp.findViewById(R.id.addcard_freezeview);\r\n // Differentiating customer and store module and initializing respective views.\r\n\t\tif(getIntent().getExtras().getString(\"class_name\").equalsIgnoreCase(\"StoreOwner_Billing\")||getIntent().getExtras().getString(\"class_name\").equalsIgnoreCase(\"StoreOwner_PointOfSale\")){ // for store_owner module header initialization\r\n\t\t\tif(getIntent().getExtras().getString(\"class_name\").equalsIgnoreCase(\"StoreOwner_Billing\")){\r\n\t\t\t\tmStoreowner_leftmenu = new StoreOwner_LeftMenu(AddCreditCard.this,mScrollView, mLeftMenu, mMenuFlag=1, mAddCardFreezeView, mTAG);\r\n\t\t\t\tmLeftMenu = mStoreowner_leftmenu.intializeInflater();\r\n\t\t\t\tmStoreowner_leftmenu.clickListener(mLeftMenu);\r\n\t\t\t}else{\r\n\t\t\t\tmStoreowner_pointofsale_leftmenu = new StoreOwner_LeftMenu(AddCreditCard.this,mScrollView, mLeftMenu, mMenuFlag=1, mAddCardFreezeView, mTAG);\r\n\t\t\t\tmLeftMenu = mStoreowner_pointofsale_leftmenu.intializeInflater();\r\n\t\t\t\tmStoreowner_pointofsale_leftmenu.clickListener(mLeftMenu);\r\n\t\t\t}\r\n\t\t\t/* Header Tab Bar which contains logout,notification and home buttons*/\r\n\t\t\tmZouponsHeader = (Header) mApp.findViewById(R.id.storeowneraddcard_header);\r\n\t\t\tmZouponsHeader.intializeInflater(mScrollView, mLeftMenu, mMenuFlag=1, mAddCardFreezeView, mTAG);\r\n\t\t\tmZouponsHeader.mTabBarNotificationContainer.setVisibility(View.VISIBLE);\r\n\t\t\tfinal View[] children = new View[] { mLeftMenu, mApp };\r\n\t\t\t// Scroll to app (view[1]) when layout finished.\r\n\t\t\tint scrollToViewIdx = 1;\r\n\t\t\tmScrollView.initViews(children, scrollToViewIdx, new StoreOwnerSizeCallBackForMenu(mZouponsHeader.mLeftMenuBtnSlide));\r\n\t\t\tmAddCardFreezeView.setOnClickListener(new StoreOwnerClickListenerForScrolling(mScrollView, mLeftMenu, /*mRightMenu,*/ mMenuFlag, mAddCardFreezeView, mTAG));\r\n\t\t\tmNotificationReceiver = new NotifitcationReceiver(mZouponsHeader.mTabBarNotificationCountBtn);\r\n\t\t\t// Notitification pop up layout declaration\r\n\t\t\tmZouponsHeader.mTabBarNotificationImage.setOnClickListener(new ManageNotificationWindow(AddCreditCard.this,mZouponsHeader,mZouponsHeader.mTabBarNotificationTriangle,ZouponsConstants.sStoreModuleFlag));\r\n\t\t\tmZouponsHeader.mTabBarNotificationCountBtn.setOnClickListener(new ManageNotificationWindow(AddCreditCard.this,mZouponsHeader,mZouponsHeader.mTabBarNotificationTriangle,ZouponsConstants.sStoreModuleFlag));\r\n\t\t}else{ // for customer module header initialisation...\r\n\t\t\tmLeftMenu = inflater.inflate(R.layout.shopper_leftmenu, null);\r\n\t\t\tViewGroup leftMenuItems = (ViewGroup) mLeftMenu.findViewById(R.id.menuitems);\r\n\t\t\tmTabBarContainer = (ViewGroup) mApp.findViewById(R.id.addcard_tabBar);\r\n\t\t\tmLeftMenuScrollView = (ScrollView) mLeftMenu.findViewById(R.id.leftmenu_scrollview);\r\n\t\t\tmLeftMenuScrollView.fullScroll(View.FOCUS_UP);\r\n\t\t\tmLeftMenuScrollView.pageScroll(View.FOCUS_UP);\r\n\t\t\tmZouponsFont=Typeface.createFromAsset(getAssets(), \"helvetica.ttf\");\r\n\t\t\tgetWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);\t//code for hiding the keyboard while the activity is loading.//LeftMenu\r\n\t\t\tmAddCardHome = (LinearLayout) leftMenuItems.findViewById(R.id.mainmenu_home);\r\n\t\t\tmAddCardZpay = (LinearLayout) leftMenuItems.findViewById(R.id.mainmenu_zpay);\r\n\t\t\tmAddCardInvoiceCenter = (LinearLayout) leftMenuItems.findViewById(R.id.mainmenu_invoicecenter);\r\n\t\t\tmAddCardManageCards = (LinearLayout) leftMenuItems.findViewById(R.id.mainmenu_managecards);\r\n\t\t\tmAddCardReceipts = (LinearLayout) leftMenuItems.findViewById(R.id.mainmenu_receipts);\r\n\t\t\tmAddCardGiftCards = (LinearLayout) leftMenuItems.findViewById(R.id.mainmenu_zgiftcards);\r\n\t\t\tmAddCardMyFavourites = (LinearLayout) leftMenuItems.findViewById(R.id.mainmenu_myfavourites);\r\n\t\t\tmAddCardMyFriends = (LinearLayout) leftMenuItems.findViewById(R.id.mainmenu_myfriends);\r\n\t\t\tmAddCardChat = (LinearLayout) leftMenuItems.findViewById(R.id.mainmenu_customercenter);\r\n\t\t\tmAddCardRewards = (LinearLayout) leftMenuItems.findViewById(R.id.mainmenu_rewards);\r\n\t\t\tmAddCardSettings = (LinearLayout) leftMenuItems.findViewById(R.id.mainmenu_settings);\r\n\t\t\tmAddCardLogout = (LinearLayout) leftMenuItems.findViewById(R.id.mainmenu_logout);\r\n\t\t\tmAddCardHomeText = (TextView) leftMenuItems.findViewById(R.id.menuHome);\r\n\t\t\tmAddCardHomeText.setTypeface(mZouponsFont);\r\n\t\t\tmAddCardZpayText = (TextView) leftMenuItems.findViewById(R.id.menuZpay);\r\n\t\t\tmAddCardZpayText.setTypeface(mZouponsFont);\r\n\t\t\tmAddCardInvoiceCenterText = (TextView) leftMenuItems.findViewById(R.id.mainmenu_InvoiceCenter_text);\r\n\t\t\tmAddCardInvoiceCenterText.setTypeface(mZouponsFont);\r\n\t\t\tmAddCardManageCardsText = (TextView) leftMenuItems.findViewById(R.id.menuManageCards);\r\n\t\t\tmAddCardManageCardsText.setTypeface(mZouponsFont);\r\n\t\t\tmAddCardReceiptsText = (TextView) leftMenuItems.findViewById(R.id.menuReceipts);\r\n\t\t\tmAddCardReceiptsText.setTypeface(mZouponsFont);\r\n\t\t\tmAddCardGiftCardsText = (TextView) leftMenuItems.findViewById(R.id.menuGiftCards);\r\n\t\t\tmAddCardGiftCardsText.setTypeface(mZouponsFont);\r\n\t\t\tmAddCardMyFavoritesText = (TextView) leftMenuItems.findViewById(R.id.menufavorites);\r\n\t\t\tmAddCardMyFavoritesText.setTypeface(mZouponsFont);\r\n\t\t\tmAddCardMyFriendsText = (TextView) leftMenuItems.findViewById(R.id.menuMyFriends);\r\n\t\t\tmAddCardMyFriendsText.setTypeface(mZouponsFont);\r\n\t\t\tmAddCardChatText = (TextView) leftMenuItems.findViewById(R.id.menuCustomerCenter);\r\n\t\t\tmAddCardChatText.setTypeface(mZouponsFont);\r\n\t\t\tmAddCardRewardsText = (TextView) leftMenuItems.findViewById(R.id.menuRewards);\r\n\t\t\tmAddCardRewardsText.setTypeface(mZouponsFont);\r\n\t\t\tmAddCardSettingsText = (TextView) leftMenuItems.findViewById(R.id.menuSettings);\r\n\t\t\tmAddCardSettingsText.setTypeface(mZouponsFont);\r\n\t\t\tmAddCardLogoutText = (TextView) leftMenuItems.findViewById(R.id.menuLogout);\r\n\t\t\tmAddCardLogoutText.setTypeface(mZouponsFont);\r\n\t\t\tmBtnSlideImage = (ImageView) mTabBarContainer.findViewById(R.id.BtnSlide);\r\n\t\t\tmBtnSlideImage.setOnClickListener(new ClickListenerForScrolling(mScrollView, mLeftMenu, mAddCardFreezeView));\r\n\t\t\tmBtnLogout = (RelativeLayout) mTabBarContainer.findViewById(R.id.zoupons_logout_container);\r\n\t\t\tmLogoutImage = (ImageView) mBtnLogout.findViewById(R.id.zoupons_logout_btn);\r\n\t\t\tmNotificationImage = (ImageView) mBtnLogout.findViewById(R.id.zoupons_notificationImageId);\r\n\t\t\tmHeaderHomeImage = (ImageView) mBtnLogout.findViewById(R.id.zoupons_home);\r\n\t\t\tmHeaderHomeImage.setOnClickListener(new HeaderHomeClickListener(AddCreditCard.this));//ClickListener for Header Home image\r\n\t\t\tmCalloutTriangleImage = (ImageView) mBtnLogout.findViewById(R.id.zoupons_callout_triangle);\r\n\t\t\tmNotificationCount = (Button) mBtnLogout.findViewById(R.id.zoupons_notification_count);\r\n\t\t\tmTabBarLoginChoice = (ImageView) mBtnLogout.findViewById(R.id.store_header_loginchoice);\r\n\t\t\tnew LoginChoiceTabBarImage(AddCreditCard.this,mTabBarLoginChoice).setTabBarLoginChoiceImageVisibility();\r\n\t\t\t// Notitification pop up layout declaration\r\n\t\t\tmNotificationImage.setOnClickListener(new ManageNotificationWindow(AddCreditCard.this,mTabBarContainer, mCalloutTriangleImage,ZouponsConstants.sCustomerModuleFlag));\r\n\t\t\tmNotificationCount.setOnClickListener(new ManageNotificationWindow(AddCreditCard.this,mTabBarContainer, mCalloutTriangleImage,ZouponsConstants.sCustomerModuleFlag));\r\n\t\t\t// Click listener for sLeftmenu items and freeze view.\r\n\t\t\tmAddCardFreezeView.setOnClickListener(new ClickListenerForScrolling(mScrollView, mLeftMenu, mAddCardFreezeView));\r\n\t\t\tmAddCardHome.setOnClickListener(new MenuItemClickListener(leftMenuItems, AddCreditCard.this,POJOMainMenuActivityTAG.TAG=mTAG));\r\n\t\t\tmAddCardZpay.setOnClickListener(new MenuItemClickListener(leftMenuItems, AddCreditCard.this,POJOMainMenuActivityTAG.TAG=mTAG));\r\n\t\t\tmAddCardInvoiceCenter.setOnClickListener(new MenuItemClickListener(leftMenuItems, AddCreditCard.this,POJOMainMenuActivityTAG.TAG=mTAG));\r\n\t\t\tmAddCardGiftCards.setOnClickListener(new MenuItemClickListener(leftMenuItems,AddCreditCard.this,POJOMainMenuActivityTAG.TAG=mTAG));\r\n\t\t\tmAddCardManageCards.setOnClickListener(new MenuItemClickListener(leftMenuItems, AddCreditCard.this,POJOMainMenuActivityTAG.TAG=mTAG));\r\n\t\t\tmAddCardReceipts.setOnClickListener(new MenuItemClickListener(leftMenuItems, AddCreditCard.this,POJOMainMenuActivityTAG.TAG=mTAG));\r\n\t\t\tmAddCardMyFavourites.setOnClickListener(new MenuItemClickListener(leftMenuItems,AddCreditCard.this,POJOMainMenuActivityTAG.TAG=mTAG));\r\n\t\t\tmAddCardMyFriends.setOnClickListener(new MenuItemClickListener(leftMenuItems,AddCreditCard.this,POJOMainMenuActivityTAG.TAG=mTAG));\r\n\t\t\tmAddCardChat.setOnClickListener(new MenuItemClickListener(leftMenuItems,AddCreditCard.this,POJOMainMenuActivityTAG.TAG=mTAG));\r\n\t\t\tmAddCardRewards.setOnClickListener(new MenuItemClickListener(leftMenuItems,AddCreditCard.this,POJOMainMenuActivityTAG.TAG=mTAG));\r\n\t\t\tmAddCardSettings.setOnClickListener(new MenuItemClickListener(leftMenuItems,AddCreditCard.this,POJOMainMenuActivityTAG.TAG=mTAG));\r\n\t\t\t\r\n\t\t\tmAddCardLogout.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\tv.setBackgroundResource(R.drawable.gradient_bg_hover);\r\n\t\t\t\t\tif(NormalPaymentAsyncTask.mCountDownTimer!=null){\r\n\t\t\t\t\t\tNormalPaymentAsyncTask.mCountDownTimer.cancel();\r\n\t\t\t\t\t\tNormalPaymentAsyncTask.mCountDownTimer = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tnew LogoutSessionTask(AddCreditCard.this,\"FromManualLogOut\").execute();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tmLogoutImage.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\t// AsyncTask to call the logout webservice to end the login session\r\n\t\t\t\t\tnew LogoutSessionTask(AddCreditCard.this,\"FromManualLogOut\").execute();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tfinal View[] children = new View[] { mLeftMenu, mApp};\r\n\t\t\t// Scroll to app (view[1]) when layout finished.\r\n\t\t\tint scrollToViewIdx = 1;\r\n\t\t\tmScrollView.initViews(children, scrollToViewIdx, new SizeCallbackForMenu(mBtnSlideImage));\r\n\t\t\tmNotificationReceiver = new NotifitcationReceiver(mNotificationCount);\r\n\t\t}\r\n // Initializing progress dialog for webservice calls\r\n\t\tmProgressDialog=new ProgressDialog(this);\r\n\t\tmProgressDialog.setCancelable(true);\r\n\t\tmProgressDialog.setMessage(\"Loading...\");\r\n\t\tmProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\r\n\t\tmProgressDialog.setProgress(0);\r\n\t\tmProgressDialog.setMax(100);\r\n\t\tmZouponswebservice = new ZouponsWebService(AddCreditCard.this);\r\n\t\tmParsingclass = new ZouponsParsingClass(getApplicationContext());\r\n\t\tmConnectionAvailabilityChecking = new NetworkCheck();\r\n\t\tmSkip=(Button) mApp.findViewById(R.id.addcardinformation_skip);\r\n\t\t// Condition check for skip button visibility\r\n\t\tif(ManageCardAddPin_ClassVariables.mAddPinFlag.equals(\"true\")||ManageCardAddPin_ClassVariables.mEditCardFlag.equals(\"true\"))\t\t\t//Condition True when page load from managecards\r\n\t\t\tmSkip.setVisibility(View.GONE);\r\n\t\tmSave=(LinearLayout) mApp.findViewById(R.id.addcardinformation_save);\r\n\t\tmCardNo=(TextView) mApp.findViewById(R.id.addcardinformation_cardno);\r\n\t\tmCardNo.setTypeface(mZouponsFont);\r\n\t\tmExpirationDate=(TextView) mApp.findViewById(R.id.addcardinformation_expirationdate);\r\n\t\tmExpirationDate.setTypeface(mZouponsFont);\r\n\t\tmCVVNo=(TextView) mApp.findViewById(R.id.addcardinformation_cvvno);\r\n\t\tmCVVNo.setTypeface(mZouponsFont);\r\n\t\tmStreetNumber=(TextView) mApp.findViewById(R.id.addcardinformation_streetnumber);\r\n\t\tmStreetNumber.setTypeface(mZouponsFont);\r\n\t\tmZipCode=(TextView) mApp.findViewById(R.id.addcardinformation_zipcode);\r\n\t\tmZipCode.setTypeface(mZouponsFont);\r\n\t\tmCardNoValue1=(EditText) mApp.findViewById(R.id.addcardinformation_card_value1);\r\n\t\tmCardNoValue2=(EditText) mApp.findViewById(R.id.addcardinformation_card_value2);\r\n\t\tmCardNoValue3=(EditText) mApp.findViewById(R.id.addcardinformation_card_value3);\r\n\t\tmCardNoValue4=(EditText) mApp.findViewById(R.id.addcardinformation_card_value4);\r\n\t\tmCardNoValue4.setNextFocusDownId(R.id.addcardinformation_expirationdate_value);\r\n\t\tmExpirationDateValue = (EditText) mApp.findViewById(R.id.addcardinformation_expirationdate_value);\r\n\t\tmExpirationDateValue.setNextFocusDownId(R.id.addcardinformation_cvvno_value);\r\n\t\tmCVVNoValue=(EditText) mApp.findViewById(R.id.addcardinformation_cvvno_value);\r\n\t\tmCVVNoValue.setNextFocusDownId(R.id.addcardinformation_streetnumber_value);\r\n\t\tmStreetNumberValue = (EditText) mApp.findViewById(R.id.addcardinformation_streetnumber_value);\r\n\t\tmStreetNumberValue.setNextFocusDownId(R.id.addcardinformation_zipcode_value);\r\n\t\tmZipCodeValue=(EditText) mApp.findViewById(R.id.addcardinformation_zipcode_value);\r\n\t\tmAddCardBack=(LinearLayout) mApp.findViewById(R.id.addcardinformation_menubar_back);\r\n\t\tmAddCardMenuBar=(LinearLayout) mApp.findViewById(R.id.addcardinformation_menubarcontainer);\r\n\t\tmScanButton = (Button) mApp.findViewById(R.id.scan_card_numberButton);\r\n\t\t// Condition to check we have to show skip buttton\r\n\t\tif(getIntent().getExtras().getString(\"class_name\").equalsIgnoreCase(\"ManageWallets\")||getIntent().getExtras().getString(\"class_name\").equalsIgnoreCase(\"StoreOwner_Billing\")||getIntent().getExtras().getString(\"class_name\").equalsIgnoreCase(\"StoreOwner_PointOfSale\")||getIntent().getExtras().getString(\"class_name\").equalsIgnoreCase(\"MobilePay\")){\r\n\t\t\tmAddCardMenuBar.setVisibility(View.VISIBLE);\r\n\t\t\tmSkip.setVisibility(View.GONE);\r\n\t\t\tif(mTabBarContainer!= null){\r\n\t\t\t\tmTabBarContainer.setVisibility(View.VISIBLE);\t\r\n\t\t\t}else{\r\n\t\t\t\tmZouponsHeader.setVisibility(View.VISIBLE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(!getIntent().getExtras().getString(\"class_name\").equalsIgnoreCase(\"MobilePay\")){\r\n\t\t\tif((ManageCardAddPin_ClassVariables.mAddPinFlag.equals(\"true\")||ManageCardAddPin_ClassVariables.mEditCardFlag.equals(\"true\"))){\r\n\t\t\t\t// Intent from ManageWallets\r\n\t\t\t\tmAddCardMenuBar.setVisibility(View.VISIBLE);\r\n\t\t\t}\t\r\n\t\t}else{ // Intent from zpay step2 -- remove skip button and show back menu bar.\r\n\t\t\tmSkip.setVisibility(View.GONE);\r\n\t\t\tmAddCardMenuBar.setVisibility(View.VISIBLE);\r\n\t\t}\r\n\r\n\t\tmExpirationDateValue.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tmExpirationDateValue.setSelection(mExpirationDateValue.getText().toString().length());\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\t\t\r\n\t\tmAddCardBack.setOnClickListener(new View.OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tif(getIntent().getExtras().getString(\"class_name\").equalsIgnoreCase(\"ManageWallets\")){\r\n\t\t\t\t\tIntent intent_managecards = new Intent(getApplicationContext(),ManageWallets.class);\r\n\t\t\t\t\tintent_managecards.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\t\t\t\tstartActivity(intent_managecards);\r\n\t\t\t\t}else if(getIntent().getExtras().getString(\"class_name\").equalsIgnoreCase(\"StoreOwner_Billing\")){\r\n\t\t\t\t\tIntent intent_managecards = new Intent(getApplicationContext(),ManageWallets.class);\r\n\t\t\t\t\tintent_managecards.putExtra(\"FromStoreOwnerBilling\", true);\r\n\t\t\t\t\tintent_managecards.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\t\t\t\tstartActivity(intent_managecards);\r\n\t\t\t\t}else if(getIntent().getExtras().getString(\"class_name\").equalsIgnoreCase(\"StoreOwner_PointOfSale\")){\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t}else if(getIntent().getExtras().getString(\"class_name\").equalsIgnoreCase(\"MobilePay\")){\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmCardNoValue1.addTextChangedListener(new TextWatcher() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onTextChanged(CharSequence s, int start, int before, int count) {}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void beforeTextChanged(CharSequence s, int start, int count, int after) {}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void afterTextChanged(Editable s) {\r\n\t\t\t\tif(s.length()==4){\r\n\t\t\t\t\tmCardNoValue2.requestFocus(View.FOCUS_DOWN);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmCardNoValue2.addTextChangedListener(new TextWatcher() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onTextChanged(CharSequence s, int start, int before, int count) {}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void beforeTextChanged(CharSequence s, int start, int count, int after) {}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void afterTextChanged(Editable s) {\r\n\t\t\t\tif(s.length()==4){\r\n\t\t\t\t\tmCardNoValue3.requestFocus(View.FOCUS_DOWN);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmCardNoValue3.addTextChangedListener(new TextWatcher() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onTextChanged(CharSequence s, int start, int before, int count) {}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void beforeTextChanged(CharSequence s, int start, int count, int after) {}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void afterTextChanged(Editable s) {\r\n\t\t\t\tif(s.length()==4){\r\n\t\t\t\t\tmCardNoValue4.requestFocus(View.FOCUS_DOWN);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmCardNoValue4.addTextChangedListener(this);\r\n\r\n\t\tmSkip.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tstartActivity(new Intent(AddCreditCard.this,ShopperHomePage.class));\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmExpirationDateValue.addTextChangedListener(new DateValidator(AddCreditCard.this, mExpirationDateValue,mCVVNoValue));\r\n\r\n\t\tmExpirationDateValue.setOnFocusChangeListener(new OnFocusChangeListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onFocusChange(View v, boolean hasFocus) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tif(mExpirationDateValue.getText().toString().length() != 7){\r\n\t\t\t\t\tmExpirationDateValue.setTextColor(getResources().getColor(R.color.red));\r\n\t\t\t\t\tmExpirationDateValue.setTag(\"invalid\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(ManageCardAddPin_ClassVariables.mEditCardFlag.equals(\"true\")){\r\n\t\t\ttry{\r\n\t\t\t\tmScanButton.setVisibility(View.GONE);\r\n\t\t\t\tString[] splittedCardValue=null;\r\n\t\t\t\tif(!EditCardDetails_ClassVariables.cardNumber.equals(\"\")){\r\n\t\t\t\t\tif(EditCardDetails_ClassVariables.cardNumber.length()==19){\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\tsplittedCardValue=splitBySplitter(EditCardDetails_ClassVariables.cardNumber);\r\n\t\t\t\t\t\t}catch(Exception 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}\r\n\t\t\t\t}\r\n\t\t\t\ttry{\r\n\t\t\t\t\tmCardNoValue1.setText(splittedCardValue[0]);\r\n\t\t\t\t\tmCardNoValue2.setText(splittedCardValue[1]);\r\n\t\t\t\t\tmCardNoValue3.setText(splittedCardValue[2]);\r\n\t\t\t\t\tmCardNoValue4.setText(splittedCardValue[3]);\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tmCardNoValue1.setEnabled(false);\r\n\t\t\t\tmCardNoValue1.setBackgroundColor(getResources().getColor(R.color.searchbordercolor));\r\n\t\t\t\tmCardNoValue2.setEnabled(false);\r\n\t\t\t\tmCardNoValue2.setBackgroundColor(getResources().getColor(R.color.searchbordercolor));\r\n\t\t\t\tmCardNoValue3.setEnabled(false);\r\n\t\t\t\tmCardNoValue3.setBackgroundColor(getResources().getColor(R.color.searchbordercolor));\r\n\t\t\t\tmCardNoValue4.setEnabled(false);\r\n\t\t\t\tmCardNoValue4.setBackgroundColor(getResources().getColor(R.color.searchbordercolor));\r\n\t\t\t\tmCVVNoValue.setText(EditCardDetails_ClassVariables.cvv);\r\n\t\t\t\tmExpirationDateValue.setText(EditCardDetails_ClassVariables.expiryMonth +\" / \"+EditCardDetails_ClassVariables.expiryYear);\r\n\t\t\t\tmStreetNumberValue.setText(EditCardDetails_ClassVariables.StreetAddress);\r\n\t\t\t\tmZipCodeValue.setText(EditCardDetails_ClassVariables.zipCode);\r\n\t\t\t}catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tCardId_ClassVariable.cardid=\"\";\r\n\t\t\tEditCardDetails_ClassVariables.cardName =\"\";\r\n\t\t\tEditCardDetails_ClassVariables.cardNumber =\"\";\r\n\t\t\tEditCardDetails_ClassVariables.cvv =\"\";\r\n\t\t\tEditCardDetails_ClassVariables.expiryYear =\"\";\r\n\t\t\tEditCardDetails_ClassVariables.expiryMonth =\"\";\r\n\t\t\tEditCardDetails_ClassVariables.StreetAddress =\"\";\r\n\t\t\tEditCardDetails_ClassVariables.zipCode =\"\";\r\n\t\t}\r\n\r\n\t\tmScanButton.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tIntent scanIntent = new Intent(AddCreditCard.this, CardIOActivity.class);\r\n\t\t\t\t// required for authentication with card.io\r\n\t\t\t\tscanIntent.putExtra(CardIOActivity.EXTRA_APP_TOKEN, \"e84db94d4fac49709305dcf04a0fd153\");\r\n\t\t\t\t// customize these values to suit our needs.\r\n\t\t\t\tscanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_EXPIRY, true); // default: true\r\n\t\t\t\tscanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_CVV, true); // default: false\r\n\t\t\t\tscanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_POSTAL_CODE, false); // default: false\r\n\t\t\t\tscanIntent.putExtra(CardIOActivity.EXTRA_SUPPRESS_MANUAL_ENTRY, false);\r\n\t\t\t\tscanIntent.putExtra(CardIOActivity.EXTRA_USE_CARDIO_LOGO, false);\r\n\t\t\t\tscanIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\t\t\tstartActivityForResult(scanIntent, 100);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmSave.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\r\n\t\t\t\tif(mCardNoValue1.getText().toString().trim().length()<4||mCardNoValue2.getText().toString().trim().length()<4\r\n\t\t\t\t\t\t||mCardNoValue3.getText().toString().trim().length()<4||mCardNoValue4.getText().toString().trim().length()==0){\r\n\t\t\t\t\tsetvalidation(\"Enter 16 digit card number.\", 3, 'N');\r\n\t\t\t\t}else if(mCardNoValue4.getText().toString().trim().length()!=1&&mCardNoValue4.getText().toString().trim().length()!=3\r\n\t\t\t\t\t\t&&mCardNoValue4.getText().toString().trim().length()!=4){\r\n\t\t\t\t\tsetvalidation(\"Enter 16 digit card number.\", 7, 'N');\r\n\t\t\t\t}else if(mExpirationDateValue.getText().toString().equalsIgnoreCase(\"\")){\r\n\t\t\t\t\tsetvalidation(\"Please Enter expiration date\", 8, 'N');\r\n\t\t\t\t}else if(mExpirationDateValue.getTag().toString().equalsIgnoreCase(\"invalid\")){\r\n\t\t\t\t\tsetvalidation(\"Please Enter valid expiration date\", 8, 'N');\r\n\t\t\t\t}else if(mStreetNumberValue.getText().toString().trim().equals(\"\")){\r\n\t\t\t\t\tsetvalidation(\"Please Enter Street Number Value\", 1, 'N');\r\n\t\t\t\t}else if(mZipCodeValue.getText().toString().trim().equals(\"\")){\r\n\t\t\t\t\tsetvalidation(\"Please Enter Zipcode\", 15, 'N');\r\n\t\t\t\t}else if(mZipCodeValue.getText().toString().trim().length()<5){\r\n\t\t\t\t\tsetvalidation(\"Please Enter Valid Zipcode\", 20, 'N');\r\n\t\t\t\t}else if(mCVVNoValue.getText().toString().trim().equals(\"\")){\r\n\t\t\t\t\tsetvalidation(\"Please Enter CVV Value\", 10, 'N');\r\n\t\t\t\t}else if(mCVVNoValue.getText().toString().trim().length()<3){\r\n\t\t\t\t\tsetvalidation(\"Please Enter Correct CVV Value\", 11, 'N');\r\n\t\t\t\t}else if(checkingDuplicateCard(mCardNoValue4.getText().toString().trim()) && !ManageCardAddPin_ClassVariables.mEditCardFlag.equals(\"true\")){\r\n\t\t\t\t\tsetvalidation(\"Duplicate card number, Anyhow would you like to proceed.\", 21, 'N');\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmValidateResult='Y';\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(mValidateResult=='N'){\r\n\t\t\t\t\talertBox_validation(mAlertMsg, mValidateFlag);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//Calling funtion to save fields\r\n\t\t\t\t\tsaveFields();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\n public void onCreateContextMenu(ContextMenu menu, View view, ContextMenu.ContextMenuInfo menuInfo) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.lay_context, menu);\n }", "private void inflateViews() {\n toolbar = findViewById(R.id.toolbar);\n viewPager = findViewById(R.id.view_pager);\n tabLayout = findViewById(R.id.tab_layout);\n toolbar.setTitle(\"ChatApp\");\n setSupportActionBar(toolbar);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n /* Use AppCompatActivity's method getMenuInflater to get a handle on the menu inflater */\n MenuInflater inflater = getMenuInflater();\n /* Use the inflater's inflate method to inflate our visualizer_menu layout to this menu */\n inflater.inflate(R.menu.menu_movie, menu);\n /* Return true so that the visualizer_menu is displayed in the Toolbar */\n return true;\n }", "public Menu createViewMenu();", "private void createResponseToolbar ( ExpandableComposite parent ) {\n \t\trawAction = new ShowRawAction();\n \t\trawAction.setChecked(true);\n \t\tbrowserAction = new ShowInBrowserAction();\n \n \t\tToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);\n \t\tToolBar toolbar = toolBarManager.createControl(parent);\n \n \t\ttoolBarManager.add(new FileSaveAction());\n \t\ttoolBarManager.add(new OpenInXMLEditorAction());\n \t\ttoolBarManager.add(rawAction);\n \t\ttoolBarManager.add(browserAction);\n \n \t\ttoolBarManager.update(true);\n \n \t\tparent.setTextClient(toolbar);\n \t}", "public ToolBarManager initMenu(int menuResId,Toolbar.OnMenuItemClickListener onMenuItemClickListener){\n //Menu 设置 代替onCreateOptionsMenu方法\n mToolbar.inflateMenu(menuResId);\n //Menu 设置 代替onOptionsItemSelected方法\n if(onMenuItemClickListener!=null){\n mToolbar.setOnMenuItemClickListener(onMenuItemClickListener);\n }\n return instance;\n }", "private void defineToolBar() {\r\n //ARREGLO CON LOS BOTONES ORDENADOS POR POSICION\r\n tools = new ImageView[]{im_tool1,im_tool2,im_tool3,im_tool4,im_tool5,im_tool6,im_tool7,im_tool8,im_tool9,im_tool10,im_tool11,im_tool12}; \r\n //CARGA DE LA BD LA CONFIGURACION DE USUARIO PARA LA PANTALLA\r\n toolsConfig = Ln.getInstance().loadToolBar();\r\n // arreglo con cada etiqueta, ordenado por boton\r\n tooltips = new String[]{\r\n \"Nueva \" + ScreenName + \" \",\r\n \"Editar \" + ScreenName + \" \",\r\n \"Guardar \" + ScreenName + \" \",\r\n \"Cambiar Status de \" + ScreenName + \" \",\r\n \"Imprimir \" + ScreenName + \" \",\r\n \"Cancelar \",\r\n \"Sin Asignar \",\r\n \"Faltante en \" + ScreenName + \" \",\r\n \"Devolución en \" + ScreenName + \" \",\r\n \"Sin Asignar\",\r\n \"Sin Asignar\",\r\n \"Buscar \" + ScreenName + \" \"\r\n };\r\n //se asigna la etiqueta a su respectivo boton\r\n for (int i = 0; i < tools.length; i++) { \r\n Tooltip tip_tool = new Tooltip(tooltips[i]);\r\n Tooltip.install(tools[i], tip_tool);\r\n }\r\n \r\n im_tool7.setVisible(false);\r\n im_tool8.setVisible(false);\r\n im_tool9.setVisible(false);\r\n im_tool10.setVisible(false);\r\n im_tool11.setVisible(false);\r\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.activity_menu, container, false);\r\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_scrolling, menu);\r\n return true;\r\n }", "@Override\n public View onCreateView(final LayoutInflater inflater, final ViewGroup container,\n final Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_toolbar, container, false);\n init(view);\n return view;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "private void createToolbar() {\r\n // the visible toolbar is actually a toolbar next to a combobox.\r\n // That is why we need this extra composite, layout and numColums = 2.\r\n final Composite parent = new Composite(SHELL, SWT.FILL);\r\n final GridLayout layout = new GridLayout();\r\n layout.numColumns = 2;\r\n parent.setLayout(layout);\r\n\r\n final ToolBar bar = new ToolBar(parent, SWT.NONE);\r\n final GridData data = new GridData();\r\n data.heightHint = 55;\r\n data.grabExcessVerticalSpace = false;\r\n bar.setLayoutData(data);\r\n bar.setLayout(new GridLayout());\r\n\r\n createOpenButton(bar);\r\n\r\n createGenerateButton(bar);\r\n\r\n createSaveButton(bar);\r\n\r\n createSolveButton(bar);\r\n\r\n createAboutButton(bar);\r\n\r\n algorithmCombo = new AlgorithmCombo(parent);\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.editor_options_menu, menu);\n\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.editcontact_toolbar_ment, menu);\n return true;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n \n return inflater.inflate(R.layout.fragment_menu, container, false);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "private void createSwipeMenu() {\n //Create menu\n creator = new SwipeMenuCreator() {\n @Override\n public void create(SwipeMenu menu) {\n //Create open item\n SwipeMenuItem checkItem = new SwipeMenuItem(getActivity().getApplicationContext());\n //Configure open item\n checkItem.setBackground(R.color.background);\n // set item width\n checkItem.setWidth((int)(90*getContext().getResources().getDisplayMetrics().density+0.5f));\n // set item title\n checkItem.setTitle(R.string.pick);\n // set item title fontsize\n checkItem.setTitleSize(12);\n //set item icon\n checkItem.setIcon(R.mipmap.check_icon);\n // set item title font color\n checkItem.setTitleColor(getResources().getColor(R.color.colorAccent));\n // add to menu\n menu.addMenuItem(checkItem);\n\n // create \"delete\" item\n SwipeMenuItem deleteItem = new SwipeMenuItem(getActivity().getApplicationContext());\n // set item background\n deleteItem.setBackground(R.color.colorPrimary);\n // set item width\n deleteItem.setWidth((int)(90*getContext().getResources().getDisplayMetrics().density+0.5f));\n // set item title\n deleteItem.setTitle(R.string.delete_item);\n //set title text size\n deleteItem.setTitleSize(12);\n // set item title font color\n deleteItem.setTitleColor(getResources().getColor(R.color.colorAccent));\n // add to menu\n // set a icon\n deleteItem.setIcon(R.mipmap.delete);\n // add to menu\n menu.addMenuItem(deleteItem);\n }\n };\n }", "private void loadAppBar()\n\t{\n\t\tLayoutInflater inflator=(LayoutInflater)this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\tView v = inflator.inflate(R.layout.search_page_header, null);\n\t\t\t\n\t\tActionBar mActionBar = getActionBar();\n\t\tmActionBar.setDisplayShowHomeEnabled(false);\n\t\tmActionBar.setDisplayShowTitleEnabled(false);\n\t\tmActionBar.setDisplayUseLogoEnabled(false);\n\t\tmActionBar.setDisplayShowCustomEnabled(true);\n\t\tmActionBar.setCustomView(v);\n\t\tif (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n\t\t\ttry{\n\t\t\t\tToolbar parent = (Toolbar) v.getParent(); \n\t\t\t\tparent.setContentInsetsAbsolute(0, 0);\n\t\t\t} catch(ClassCastException e) {\n\t\t\t\te.printStackTrace(); \n\t\t\t}\n\t\t}\n\t\t\n\t\tImageView menuBtn \t= (ImageView) v.findViewById(R.id.iv_menu_btn);\n\t\tImageView ivLogo\t\t= (ImageView) v.findViewById(R.id.iv_logo);\n\t\tImageButton ibHome = (ImageButton) v.findViewById(R.id.ib_home);\n\t\t\n\t\tibHome.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (!loadingURL.contains(\"/Shared/ProgressPayment\")) {\n\t\t\t\t\tfinish();\n\t\t\t\t\tIntent home = new Intent(SearchPageActivity.this, MenuSelectionAcitivity.class);\n\t\t\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\tstartActivity(home);\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tivLogo.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (!loadingURL.contains(\"/Shared/ProgressPayment\")) {\n\t\t\t\t\tif (loadingURL.contains(\"/Flight/ShowTicket\") ||\n\t\t\t\t\t\t\tloadingURL.contains(\"/Hotel/Voucher\")) {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t\tIntent home = new Intent(SearchPageActivity.this, MenuSelectionAcitivity.class);\n\t\t\t\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\tstartActivity(home);\n\t\t\t\t\t} else if (wv1.canGoBack()) {\n\t\t\t\t\t\twv1.goBack();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t\n\t\tmenuBtn.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (!loadingURL.contains(\"/Shared/ProgressPayment\")) {\n\t\t\t\t\tif (loadingURL.contains(\"/Flight/ShowTicket\") ||\n\t\t\t\t\t\t\tloadingURL.contains(\"/Hotel/Voucher\")) {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t\tIntent home = new Intent(SearchPageActivity.this, MenuSelectionAcitivity.class);\n\t\t\t\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\tstartActivity(home);\n\t\t\t\t\t} else if (wv1.canGoBack()) {\n\t\t\t\t\t\twv1.goBack();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\t\t});\n\t\t\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_scrolling, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_scrolling, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_scrolling, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_scrolling, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_scrolling, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_scrolling, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_scrolling, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_scrolling, menu);\n return true;\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.optionsbar, menu);\n \treturn super.onPrepareOptionsMenu(menu);\n }", "@Override\n public void create(SwipeMenu menu) {\n SwipeMenuItem item1 = new SwipeMenuItem(\n getApplicationContext());\n item1.setBackground(new ColorDrawable(Color.DKGRAY));\n // set width of an option (px)\n item1.setWidth(200);\n item1.setTitle(\"Action 1\");\n item1.setTitleSize(18);\n item1.setTitleColor(Color.WHITE);\n menu.addMenuItem(item1);\n\n SwipeMenuItem item2 = new SwipeMenuItem(\n getApplicationContext());\n // set item background\n item2.setBackground(new ColorDrawable(Color.RED));\n item2.setWidth(200);\n item2.setTitle(\"Action 2\");\n item2.setTitleSize(18);\n item2.setTitleColor(Color.WHITE);\n menu.addMenuItem(item2);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n\n\n\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic void ShowToolBar(Context _in_context) {\n\t\tTypeSDKLogger.e( \"ShowToolBar\");\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic void ShowToolBar(Context _in_context) {\n\t\tTypeSDKLogger.e(\"ShowToolBar\");\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\tinflater=this.getActivity().getMenuInflater();\n\tSupportMenu menu_=(SupportMenu) menu;\n\tsuper.onCreateOptionsMenu(menu_, inflater);\n\tinflater.inflate(R.menu.event_adding, menu_);\n\t\t\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "private void initToolBar(){\n toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n }", "protected MenuBarView createMenuBuilder(Main mainFrameUtil) {\r\n return new MenuBarView(mainFrameUtil);\r\n }", "private Component createToolBar()\n {\n Component toolbarPanel = null;\n\n mainToolBar = new MainToolBar(this);\n\n boolean chatToolbarVisible\n = ConfigurationUtils.isChatToolbarVisible();\n\n if (OSUtils.IS_MAC)\n {\n UnifiedToolBar macToolbarPanel = new UnifiedToolBar();\n\n MacUtils.makeWindowLeopardStyle(getRootPane());\n\n macToolbarPanel.addComponentToLeft(mainToolBar);\n macToolbarPanel.addComponentToRight(contactPhotoPanel);\n macToolbarPanel.disableBackgroundPainter();\n macToolbarPanel.installWindowDraggerOnWindow(this);\n macToolbarPanel.getComponent()\n .setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));\n macToolbarPanel.getComponent().setVisible(chatToolbarVisible);\n\n toolbarPanel = macToolbarPanel.getComponent();\n }\n else\n {\n ToolbarPanel panel = new ToolbarPanel(new BorderLayout());\n\n panel.setBorder(BorderFactory.createEmptyBorder(3, 0, 3, 0));\n panel.add(mainToolBar, BorderLayout.CENTER);\n panel.add(contactPhotoPanel, BorderLayout.EAST);\n panel.setVisible(chatToolbarVisible);\n\n toolbarPanel = panel;\n }\n\n return toolbarPanel;\n }", "private void createCurrentMenu(RelativeLayout layout, String xmlFileName){\n \t\tMenuActions menu = null;\n \t\ttry {\n \t\t\tmenu = ParseUtils.parseMenuData(this, xmlFileName);\n \t\t\tList<MenuActionDataItem> listActions = menu.getList();\n \t\t\t\n \t\t\tif(listActions == null || listActions.isEmpty())\n \t\t\t\treturn;\n \t\t\t\n \t\t\tfor(int i=0; i < listActions.size(); i++){\n \t\t\t\tfinal MenuActionDataItem action = listActions.get(i);\n \t\t\t\t\t\n \t\t\t\tif( this.isEntryPoint == false || (\n \t\t\t\t\t\t(this.isEntryPoint == true & ( !action.getSystemAction().equals(\"home\") && \n \t\t\t\t\t\t!action.getSystemAction().equals(\"back\") ) ) ) ){\n \t\t\t\t\t\n \t\t\t\t\tfinal ImageButton btnAction = new ImageButton(this);\t\t\n \n \t\t\t\t\t//String resource = action.getImageName().split(\"\\\\.\")[0];\n \t\t\t\t\t//btnAction.setImageResource(getResources().getIdentifier(resource, \"drawable\", getPackageName()));\n \t\t\t\t\tDrawable imageButton = null;\n \t\t\t\t\ttry {\n \t\t\t\t\t\timageButton = ImagesUtils.getDrawable(activity, action.getImageName());\n \t\t\t\t\t\tbtnAction.setImageDrawable(imageButton);\n \t\t\t\t\t} catch (InvalidFileException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t//Ancho y alto del boton\n\t\t\t\t\tRelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(/*action.getWidthButton()*/LayoutParams.WRAP_CONTENT, /*action.getHeightButton()*/LayoutParams.WRAP_CONTENT);\n \t\t\t\t\tOnClickListener cl;\n \t\t\t\t\tif(action.getSystemAction().equals(\"sideMenu\")){\n \t\t\t\t\t\tlp.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);\n \t\t\t\t\t\t\n \t\t\t\t\t\t//Margen izquierdo\n \t\t\t\t\t\tlp.setMargins(action.getLeftMargin(), 10, 0, 10);\n \t\t\t\t\t\t\n \t\t\t this.sideMenuLayout = (LinearLayout) findViewById(R.id.sideMenuLayout);\n \t\t\t this.appLayout = (RelativeLayout) findViewById(R.id.backgroundLayout);\n \t\t\t\t\t\t\n \t\t\t\t\t\tcl= new ClickListener();\n \t\t\t\t\t}else{\t\n \t\t\t\t\t\tlp.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, RelativeLayout.TRUE);\n \t\t\t\t\t\t\n \t\t\t\t\t\t//Margen derecho\n \t\t\t\t\t\tint realMargin;\n \t\t\t\t\t\tif (imageButton!=null){\n \t\t\t\t\t\t\tint width = imageButton.getIntrinsicWidth();\n \t\t\t\t\t\t\trealMargin= width * i + action.getLeftMargin()*(i+1);\n \t\t\t\t\t\t}else{\n \t\t\t\t\t\t\trealMargin= action.getWidthButton()*i + action.getLeftMargin()*(i+1);\n \t\t\t\t\t\t}\n \t\t\t\t\t\t\n\t\t\t\t\t\tlp.setMargins(0, 10, realMargin, 10);\n \t\t\t\t\t\n \t\t\t\t\t\tcl= new View.OnClickListener() {\n \t\t\t\t\t public void onClick(View view) {\n \t\t\t\t\t \toptionSelected(action);\n \t\t\t\t\t }\n \t\t\t\t };\n \t\t\t\t\t}\n \n \t\t\t\t\tbtnAction.setLayoutParams(lp);\n \t\t\t\t\t\n \t\t\t\t\t//Añade la nueva opcion al menu\n \t\t\t\t\tlayout.addView(btnAction);\n \t\t\t\t\tbtnAction.setOnClickListener(cl);\n \t\t\t\t\t\n \t\t\t\t\ti++;\n \t\t\t\t}//End if\n \t\t\t}//End While\n \t\t} catch (InvalidFileException e) {\n \t\t\tLog.e(\"createCurrentMenu\", e.getMessage());\n \t\t}\t\t\n \t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.contenedor, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "public MainToolbar createToolbar()\r\n {\n WbSwingUtilities.invoke(this::_createToolbar);\r\n return toolbar;\r\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.tools, menu);\r\n return true;\r\n }", "public void initToolbar() {\r\n\r\n ((HomeActivity) getActivity()).setUpToolbar(getString(R.string.help), false, true, false,false);\r\n\r\n\r\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "private void setUpMenu() {\n\t\tresideMenu = new ResideMenu(this);\n\t\tresideMenu.setBackground(R.drawable.menu_background);\n\t\tresideMenu.attachToActivity(this);\n\t\tresideMenu.setMenuListener(menuListener);\n\t\t// valid scale factor is between 0.0f and 1.0f. leftmenu'width is\n\t\t// 150dip.\n\t\tresideMenu.setScaleValue(0.6f);\n\n\t\t// create menu items;\n\t\titemGame = new ResideMenuItem(this, R.drawable.icon_game,\n\t\t\t\tgetResources().getString(R.string.strGame));\n\t\titemBook = new ResideMenuItem(this, R.drawable.icon_book,\n\t\t\t\tgetResources().getString(R.string.strBook));\n\t\titemNews = new ResideMenuItem(this, R.drawable.icon_news,\n\t\t\t\tgetResources().getString(R.string.strNews));\n\t\t// itemSettings = new ResideMenuItem(this, R.drawable.icon_setting,\n\t\t// getResources().getString(R.string.strSetting));\n\t\titemLogin = new ResideMenuItem(this, R.drawable.icon_share,\n\t\t\t\tgetResources().getString(R.string.strShare));\n\t\titemBookPDF = new ResideMenuItem(this, R.drawable.icon_bookpdf,\n\t\t\t\tgetResources().getString(R.string.strBookPDF));\n\t\titemMore = new ResideMenuItem(this, R.drawable.icon_more,\n\t\t\t\tgetResources().getString(R.string.strMore));\n\n\t\titemGame.setOnClickListener(this);\n\t\titemBook.setOnClickListener(this);\n\t\titemNews.setOnClickListener(this);\n\t\t// itemSettings.setOnClickListener(this);\n\t\titemBookPDF.setOnClickListener(this);\n\t\titemMore.setOnClickListener(this);\n\t\titemLogin.setOnClickListener(this);\n\n\t\tresideMenu.addMenuItem(itemBookPDF, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemBook, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemNews, ResideMenu.DIRECTION_LEFT);\n\t\t// resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n\n\t\tresideMenu.addMenuItem(itemGame, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemLogin, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemMore, ResideMenu.DIRECTION_RIGHT);\n\n\t\t// You can disable a direction by setting ->\n\t\t// resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n\t\tfindViewById(R.id.title_bar_left_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tfindViewById(R.id.title_bar_right_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.forecastfragment, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater menuInflater = getMenuInflater();\n menuInflater.inflate(bmi_chart, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public void create(SwipeMenu menu) {\n SwipeMenuItem goodItem = new SwipeMenuItem(getContext());\n // set item background\n goodItem.setBackground(new ColorDrawable(Color.rgb(0x30, 0xB1, 0xF5)));\n // set item width\n goodItem.setWidth(dp2px(90));\n // set a icon\n goodItem.setIcon(R.mipmap.ic_action_good);\n // add to menu\n menu.addMenuItem(goodItem);\n // create \"delete\" item\n SwipeMenuItem deleteItem = new SwipeMenuItem(getContext());\n // set item background\n deleteItem.setBackground(new ColorDrawable(Color.rgb(0xF9, 0x3F, 0x25)));\n // set item width\n deleteItem.setWidth(dp2px(90));\n // set a icon\n deleteItem.setIcon(R.mipmap.ic_action_discard);\n // add to menu\n menu.addMenuItem(deleteItem);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.settings_main_toolbar_menu, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.activity_picture_toolbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.ficha_contenedor, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.menu_detail_, menu);\n }", "protected void createContents() {\n\t\tshell = new Shell(SWT.CLOSE | SWT.MIN);// 取消最大化与拖拽放大功能\n\t\tshell.setImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/MC.ico\"));\n\t\tshell.setBackgroundImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/back.jpg\"));\n\t\tshell.setBackgroundMode(SWT.INHERIT_DEFAULT);\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tshell.setSize(1157, 720);\n\t\tshell.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tshell.setLocation(Display.getCurrent().getClientArea().width / 2 - shell.getShell().getSize().x / 2,\n\t\t\t\tDisplay.getCurrent().getClientArea().height / 2 - shell.getSize().y / 2);\n\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/base.png\"));\n\t\tmenuItem.setText(\"\\u7A0B\\u5E8F\");\n\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\n\t\tMenuItem menuI_main = new MenuItem(menu_1, SWT.NONE);\n\t\tmenuI_main.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmenuI_main.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_BookShow window = new Admin_BookShow();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI_main.setText(\"\\u4E3B\\u9875\");\n\n\t\tMenuItem menu_exit = new MenuItem(menu_1, SWT.NONE);\n\t\tmenu_exit.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/reset.png\"));\n\t\tmenu_exit.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tWelcomPart window = new WelcomPart();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu_exit.setText(\"\\u9000\\u51FA\");\n\n\t\tMenuItem menubook = new MenuItem(menu, SWT.CASCADE);\n\t\tmenubook.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookTypeManager.png\"));\n\t\tmenubook.setText(\"\\u56FE\\u4E66\\u7BA1\\u7406\");\n\n\t\tMenu menu_2 = new Menu(menubook);\n\t\tmenubook.setMenu(menu_2);\n\n\t\tMenuItem menu1_add = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu1_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_add window = new Book_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_add.setText(\"\\u6DFB\\u52A0\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_select = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_select.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu1_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// 图书查询\n\t\t\t\tshell.close();\n\t\t\t\tBook_select window = new Book_select();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_select.setText(\"\\u67E5\\u8BE2\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_alter = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu1_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_alter window = new Book_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_alter.setText(\"\\u4FEE\\u6539\\u56FE\\u4E66\");\n\n\t\tMenuItem menuI1_delete = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuI1_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenuI1_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_del window = new Book_del();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI1_delete.setText(\"\\u5220\\u9664\\u56FE\\u4E66\");\n\n\t\tMenuItem menutype = new MenuItem(menu, SWT.CASCADE);\n\t\tmenutype.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookManager.png\"));\n\t\tmenutype.setText(\"\\u4E66\\u7C7B\\u7BA1\\u7406\");\n\n\t\tMenu menu_3 = new Menu(menutype);\n\t\tmenutype.setMenu(menu_3);\n\n\t\tMenuItem menu2_add = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu2_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_add window = new Booktype_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_add.setText(\"\\u6DFB\\u52A0\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_alter = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu2_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_alter window = new Booktype_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_alter.setText(\"\\u4FEE\\u6539\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_delete = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenu2_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_delete window = new Booktype_delete();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_delete.setText(\"\\u5220\\u9664\\u4E66\\u7C7B\");\n\n\t\tMenuItem menumark = new MenuItem(menu, SWT.CASCADE);\n\t\tmenumark.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/student.png\"));\n\t\tmenumark.setText(\"\\u501F\\u8FD8\\u8BB0\\u5F55\");\n\n\t\tMenu menu_4 = new Menu(menumark);\n\t\tmenumark.setMenu(menu_4);\n\n\t\tMenuItem menu3_borrow = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_borrow.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/edit.png\"));\n\t\tmenu3_borrow.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_borrowmark window = new Admin_borrowmark();\n\t\t\t\twindow.open();// 借书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_borrow.setText(\"\\u501F\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem menu3_return = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_return.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu3_return.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_returnmark window = new Admin_returnmark();\n\t\t\t\twindow.open();// 还书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_return.setText(\"\\u8FD8\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem mntmhelp = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmhelp.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmntmhelp.setText(\"\\u5173\\u4E8E\");\n\n\t\tMenu menu_5 = new Menu(mntmhelp);\n\t\tmntmhelp.setMenu(menu_5);\n\n\t\tMenuItem menu4_Info = new MenuItem(menu_5, SWT.NONE);\n\t\tmenu4_Info.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/me.png\"));\n\t\tmenu4_Info.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_Info window = new Admin_Info();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu4_Info.setText(\"\\u8F6F\\u4EF6\\u4FE1\\u606F\");\n\n\t\ttable = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttable.setFont(SWTResourceManager.getFont(\"黑体\", 10, SWT.NORMAL));\n\t\ttable.setLinesVisible(true);\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setBounds(10, 191, 1119, 447);\n\n\t\tTableColumn tableColumn = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn.setWidth(29);\n\n\t\tTableColumn tableColumn_id = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_id.setWidth(110);\n\t\ttableColumn_id.setText(\"\\u56FE\\u4E66\\u7F16\\u53F7\");\n\n\t\tTableColumn tableColumn_name = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_name.setWidth(216);\n\t\ttableColumn_name.setText(\"\\u56FE\\u4E66\\u540D\\u79F0\");\n\n\t\tTableColumn tableColumn_author = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_author.setWidth(117);\n\t\ttableColumn_author.setText(\"\\u56FE\\u4E66\\u79CD\\u7C7B\");\n\n\t\tTableColumn tableColumn_pub = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_pub.setWidth(148);\n\t\ttableColumn_pub.setText(\"\\u4F5C\\u8005\");\n\n\t\tTableColumn tableColumn_stock = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_stock.setWidth(167);\n\t\ttableColumn_stock.setText(\"\\u51FA\\u7248\\u793E\");\n\n\t\tTableColumn tableColumn_sortid = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_sortid.setWidth(79);\n\t\ttableColumn_sortid.setText(\"\\u5E93\\u5B58\");\n\n\t\tTableColumn tableColumn_record = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_record.setWidth(247);\n\t\ttableColumn_record.setText(\"\\u767B\\u8BB0\\u65F6\\u95F4\");\n\n\t\tCombo combo_way = new Combo(shell, SWT.NONE);\n\t\tcombo_way.add(\"图书编号\");\n\t\tcombo_way.add(\"图书名称\");\n\t\tcombo_way.add(\"图书作者\");\n\t\tcombo_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tcombo_way.setBounds(314, 157, 131, 28);\n\n\t\t// 遍历查询book表\n\t\tButton btnButton_select = new Button(shell, SWT.NONE);\n\t\tbtnButton_select.setImage(SWTResourceManager.getImage(Book_select.class, \"/images/search.png\"));\n\t\tbtnButton_select.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tbtnButton_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tBook book = new Book();\n\t\t\t\tSelectbook selectbook = new Selectbook();\n\t\t\t\ttable.removeAll();\n\t\t\t\tif (combo_way.getText().equals(\"图书编号\")) {\n\t\t\t\t\tbook.setBook_id(text_select.getText().trim());\n\t\t\t\t\tString str[][] = selectbook.ShowAidBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书名称\")) {\n\t\t\t\t\tbook.setBook_name(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAnameBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书作者\")) {\n\t\t\t\t\tbook.setBook_author(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAauthorBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().length() == 0) {\n\t\t\t\t\tString str[][] = selectbook.ShowAllBook();\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnButton_select.setBounds(664, 155, 98, 30);\n\t\tbtnButton_select.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tbtnButton_select.setText(\"查询\");\n\n\t\ttext_select = new Text(shell, SWT.BORDER);\n\t\ttext_select.setBounds(472, 155, 186, 30);\n\n\t\tLabel lblNewLabel_way = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_way.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel_way.setBounds(314, 128, 107, 30);\n\t\tlblNewLabel_way.setText(\"\\u67E5\\u8BE2\\u65B9\\u5F0F\\uFF1A\");\n\n\t\tLabel lblNewLabel_1 = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_1.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tlblNewLabel_1.setForeground(SWTResourceManager.getColor(255, 255, 255));\n\t\tlblNewLabel_1.setFont(SWTResourceManager.getFont(\"黑体\", 25, SWT.BOLD));\n\t\tlblNewLabel_1.setAlignment(SWT.CENTER);\n\t\tlblNewLabel_1.setBounds(392, 54, 266, 48);\n\n\t\tLabel lblNewLabel = new Label(shell, SWT.NONE);\n\t\tlblNewLabel.setText(\"\\u8F93\\u5165\\uFF1A\");\n\t\tlblNewLabel.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel.setBounds(472, 129, 76, 20);\n\n\t}" ]
[ "0.64358616", "0.6274379", "0.62235886", "0.6198345", "0.61840063", "0.611221", "0.6033061", "0.60060537", "0.6001635", "0.5916781", "0.59106165", "0.5893252", "0.58813167", "0.58740956", "0.5866247", "0.5855075", "0.5835665", "0.5779827", "0.57710534", "0.5716799", "0.5703849", "0.56880105", "0.56673914", "0.56499946", "0.5626983", "0.5623017", "0.5610061", "0.55776155", "0.5543878", "0.553697", "0.5525251", "0.55174875", "0.55169505", "0.5510655", "0.5507737", "0.55068505", "0.55065954", "0.5504199", "0.55017227", "0.5499606", "0.5496956", "0.54920506", "0.54910374", "0.5481947", "0.54817206", "0.5467786", "0.5465312", "0.5457908", "0.5457588", "0.545476", "0.5451576", "0.54393744", "0.54347044", "0.5433617", "0.5432149", "0.5432149", "0.5432149", "0.5432149", "0.5432149", "0.5432149", "0.5432149", "0.5432149", "0.54290307", "0.54273045", "0.5426197", "0.54187065", "0.5416661", "0.54161394", "0.54144406", "0.54128385", "0.54102474", "0.54100156", "0.54100156", "0.54041326", "0.54002935", "0.53969395", "0.53871405", "0.53834385", "0.5377593", "0.536864", "0.5368146", "0.5368146", "0.5368146", "0.5368013", "0.536565", "0.53651804", "0.53650266", "0.53620195", "0.53580225", "0.53579855", "0.535304", "0.535304", "0.5352259", "0.53470004", "0.53446674", "0.53441185", "0.5336573", "0.5335129", "0.5328124", "0.5326278" ]
0.67400426
0
Provides dummy implementation for the MainActivity overflow menu at the toolbar
@Override public boolean onOptionsItemSelected(MenuItem item) { int selectedItmId = item.getItemId(); switch (selectedItmId){ case (R.id.item_action_refresh): new SpotifyNewRelease(accessToken).execute(); return true; case (R.id.find_web): Toast.makeText(MainActivity.this,"Find In Web Selected",Toast.LENGTH_SHORT).show(); return true; default: return super.onOptionsItemSelected(item); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.mainactivity_toolbar_overflowmenu,menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu)\n {\n /*Grabs the information from the overflow_menu resource in the menu folder and sets them\n to the action bar*/\n try {\n getMenuInflater().inflate(R.menu.overflow_menu, menu);\n return true;\n } catch ( Exception e ) {\n Toast.makeText(getApplicationContext(),\"EXCEPTION \" + e + \" occurred!\",Toast.LENGTH_SHORT).show();\n return false;\n }\n }", "public boolean onCreateOptionsMenu (Menu menu){\n getMenuInflater().inflate(R.menu.overflow, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n\n\n\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);\n return true;\n\n}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main_activity_test,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.fake_main, menu);\n this.menu = menu;\n return true;\n }", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\ngetMenuInflater().inflate(R.menu.main, menu);\nreturn true;\n}", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return true;\n }", "private void showActionOverflowMenu() {\n try {\n ViewConfiguration config = ViewConfiguration.get(this);\n Field menuKeyField = ViewConfiguration.class.getDeclaredField(\"sHasPermanentMenuKey\");\n if (menuKeyField != null) {\n menuKeyField.setAccessible(true);\n menuKeyField.setBoolean(config, false);\n }\n } catch (Exception e) {\n Log.d(TAG, e.getLocalizedMessage());\n }\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n getMenuInflater().inflate(R.menu.main, menu);\r\n if (userType.equalsIgnoreCase(\"TSE\")) {\r\n MenuItem item = menu.findItem(R.id.home_button);\r\n item.setVisible(false);\r\n }\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.heropagetoolbar, menu);\n return true;\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n menu.add(Menu.NONE, MENU_HELP, Menu.NONE, getString(R.string.help)).setIcon(\r\n android.R.drawable.ic_menu_help).setAlphabeticShortcut('h');\r\n return super.onCreateOptionsMenu(menu);\r\n }", "@Override\n public void setToolbar(MToolBar arg0)\n {\n \n }", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n \t\treturn true;\n \t}", "@Override\n protected void hookContextMenu() {\n\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t getMenuInflater().inflate(R.menu.event_history, menu);\n\t \n\t if (ViewConfiguration.get(this).hasPermanentMenuKey()) {\n\t \t\n\t } else {\n\t new ShowcaseView.Builder(this, true)\n\t .setTarget(new ActionViewTarget(this, ActionViewTarget.Type.OVERFLOW))\n\t .setContentTitle(\"Täältä voit vaihtaa jaksoa\")\n\t .setContentText(\"Klikkaamalla tästä voit valita jakson, jonka suunnitelmat näytetään.\")\n\t .hideOnTouchOutside()\n\t .setStyle(R.style.ShowcaseView)\n\t .singleShot(CHANGE_SPRINT_HELP)\n\t .build();\n\t }\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.help, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\r\n public void onCreateContextMenu(ContextMenu menu, View v,\r\n ContextMenuInfo menuInfo) {\n return;\r\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.toolbar, menu);\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu){\n super.onCreateOptionsMenu(menu);\n MenuItem helpButton = menu.findItem(R.id.menu1);\n helpButton.setVisible(true);\n return true;\n }", "@Override\n public void com_android_internal_widget_FloatingToolbar__getVisibleAndEnabledMenuItems__Menu(ILTweaks.MethodParam param) {\n param.before(() -> {\n Menu menu = (Menu) param.args[0];\n for (int i = 0; i < menu.size(); ++i) {\n MenuItem item = menu.getItem(i);\n Intent intent = item.getIntent();\n if (intent != null && intent.getComponent() != null\n && PackageNames.L_TWEAKS.equals(intent.getComponent().getPackageName())) {\n item.setVisible(true);\n }\n }\n });\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return true;\n\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n\n onResume();\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_toolbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu){\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return true;\n\n }", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu paramMenu) {\n getMenuInflater().inflate(R.menu.main, paramMenu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.tool_bar, menu);\n return true;\n }", "@Override\n protected void onCreateContextMenu(ContextMenu menu) {\n super.onCreateContextMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_help_demo_start, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater menuInflater = getMenuInflater();\n menuInflater.inflate(R.menu.toolbar_menu, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\t public boolean onCreateOptionsMenu(Menu menu) {\n\t \n\t getMenuInflater().inflate(R.menu.main, menu);\n\t \n\t return true;\n\t }", "@Override\n\t\t\t\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\t\t\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.index_toolbar_menu, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.toolbar_menu, menu);\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n protected int getToolbarMenu() {\n return R.menu.menu_activity_create_estate;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(android.view.Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n MenuItem helpButton = menu.findItem(R.id.menu1);\n helpButton.setVisible(true);\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.test, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\n\t\t \n return true;\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n getMenuInflater().inflate(R.menu.main, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n menu.add(Menu.NONE, Menu.FIRST + 1, 0, \"帮助\"); \n menu.add(Menu.NONE, Menu.FIRST + 2, 0, \"关于XCL-Charts\"); \n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu){\n getMenuInflater().inflate(R.menu.main_menu, menu);\n this.menu = menu;\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_test_core, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\n\t public boolean onCreateOptionsMenu(Menu menu) {\n\t getMenuInflater().inflate(R.menu.main, menu);\n\t return true;\n\t }", "@Override\n\t public boolean onCreateOptionsMenu(Menu menu) {\n\t getMenuInflater().inflate(R.menu.main, menu);\n\t return true;\n\t }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n if(!isTablet) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n this.menu = menu;\n }\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.base, menu);\n this.mCustomMenu = menu;\n if (mTypeLayout) {\n AppSingleton.isChangelayout = true;\n menu.findItem(R.id.change_view_actionbar).setIcon(R.mipmap.ic_grid_on_white);\n } else {\n AppSingleton.isChangelayout = true;\n menu.findItem(R.id.change_view_actionbar).setIcon(R.mipmap.ic_list_white);\n }\n return true;\n }", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.activity_plex_app_main, menu);\n \t\tmenu.add(0, ABOUT, 0, R.string.options_main_about);\n \t\tmenu.add(0, CLEAR_CACHE, 0, R.string.options_main_clear_image_cache);\n \t\tmenu.add(0, TUTORIAL, 0, R.string.tutorial);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "public ToolBarManager initMenu(int menuResId,Toolbar.OnMenuItemClickListener onMenuItemClickListener,int overFlowResId){\n //Menu 设置 代替onCreateOptionsMenu方法\n mToolbar.inflateMenu(menuResId);\n //Menu 设置 代替onOptionsItemSelected方法\n if(onMenuItemClickListener!=null){\n mToolbar.setOnMenuItemClickListener(onMenuItemClickListener);\n mToolbar.setOverflowIcon(getDrawable(overFlowResId));\n }\n return instance;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n //getMenuInflater().inflate(R.menu.activity_main, menu);\n \tsuper.onCreateOptionsMenu(menu);\n getSupportMenuInflater().inflate(R.menu.actionbar, menu);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n BatteryIcon = (MenuItem)menu.findItem(R.id.acb_battery);\n setActBarBatteryIcon(Callbacksplit.getsavedBatteryStateIcon());\n ConnectIcon = (MenuItem)menu.findItem(R.id.acb_connect);\n setActBarConnectIcon();\n \n ((MenuItem)menu.findItem(R.id.acb_m_5)).setVisible(false);\n\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main_interface, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.activity_main, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.activity_main, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.activity_main, menu);\n return true;\n }" ]
[ "0.723903", "0.68693036", "0.65008336", "0.64156073", "0.6411865", "0.64010805", "0.63681066", "0.6359496", "0.6340766", "0.6340766", "0.6323382", "0.6289417", "0.6280418", "0.62760043", "0.62748975", "0.6272607", "0.6248695", "0.6243863", "0.6238674", "0.6235833", "0.6221422", "0.62165886", "0.6207331", "0.6198781", "0.6195629", "0.6186105", "0.6182361", "0.61812127", "0.617996", "0.6174295", "0.61735475", "0.6170221", "0.61657786", "0.61585695", "0.61585695", "0.6154667", "0.61483574", "0.6146066", "0.6144699", "0.6139479", "0.6139479", "0.6139479", "0.61383724", "0.6133225", "0.61311597", "0.612801", "0.6126491", "0.6120254", "0.6117387", "0.6113713", "0.6108892", "0.6108892", "0.61027837", "0.6095843", "0.60952693", "0.60909855", "0.60855883", "0.60855883", "0.60835445", "0.6081442", "0.60801417", "0.6079844", "0.6079327", "0.6079327", "0.6079327", "0.6079327", "0.6079327", "0.6079288", "0.60792", "0.6075797", "0.6075797", "0.6072184", "0.60686654", "0.6067747", "0.60675925", "0.6064416", "0.60625523", "0.6062513", "0.60611886", "0.60578465", "0.60578", "0.6057505", "0.6057505", "0.6057505", "0.6057505", "0.6057437", "0.6057039", "0.6057039", "0.60567576", "0.6056457", "0.6051058", "0.60510015", "0.60504705", "0.605003", "0.60491365", "0.60490847", "0.60454863", "0.604416", "0.6043808", "0.6043808", "0.6043808" ]
0.0
-1
Behavior of the Application upon clicking the Card
@Override public void onCardClick(int position) { CardAlbum cardAlbum = cardAlbumListData.get(position); /** * Putting the Data inside a bundle nd sending to the DetailActivity. */ Intent intent = new Intent(this,DetailActivity.class); Bundle bundle = new Bundle(); bundle.putString(EXTRA_ALBUM_ID,cardAlbum.getAlbumId()); bundle.putString(EXTRA_ALBUM_NAME,cardAlbum.getAlbumName()); bundle.putString(EXTRA_ALBUM_ARTIST_NAME,cardAlbum.getArtistName()); bundle.putString(EXTRA_ALBUM_IMAGE,cardAlbum.getAlbumImageURL()); bundle.putString(EXTRA_ALBUM_RELEASE_DATE,cardAlbum.getAlbumReleaseDate()); bundle.putString(EXTRA_SPOTIFY_ACCESS_TOKEN,getAccessToken()); intent.putExtra(BUNDLE_EXTRA,bundle); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(Card card) {\n }", "@Override\n public void onCardClick(String p) {\n }", "public void ActonCard() {\n\t}", "public void cardClicked(MouseEvent event) {\n try {\n // get current Stage\n Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n\n // get the card that was clicked\n HBox selectedCard = (HBox) event.getSource();\n\n // get the VBox that contains the 'invisible' room id\n VBox cardInfo = (VBox) selectedCard.getChildren().get(1);\n\n // get room id from that VBox and parse to int\n\n // set the currentRoomID such that the RoomView controller knows which room to show information from\n RoomViewController.currentRoomId = Integer.parseInt(((Text) cardInfo.getChildren().get(0)).getText());\n\n // load RoomView\n RoomView rv = new RoomView();\n rv.start(stage);\n } catch (Exception e) {\n logger.log(Level.SEVERE, e.toString());\n }\n }", "private void CardButtonMouseClicked(java.awt.event.MouseEvent evt) {// GEN-FIRST:event_CardButtonMouseClicked\r\n\t\t// risk.setState(RiskGameModel.TRADE_CARDS);\r\n\t\tGenerateCardPanel();\r\n\t\ttoggleCardButtonsPanel();\r\n\t\tjPanel1.repaint();\r\n\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 0;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\tcl.show(Menu.cardPanel, \"MAIN_SCREEN\");\r\n\t\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 4;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\t\r\n\t\t\tcl.show(Menu.cardPanel, \"MATCH_SLIPS_SCREEN\");\r\n\t\t}", "public boolean isCardClicked(){\n\t\treturn cardClicked;\n\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 2;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\tcl.show(Menu.cardPanel, \"MATCH_RESULTS_SCREEN\");\r\n\t\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 1;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\tprintPairings();\r\n\t\t}", "void onCardViewTap(View view, int position);", "@Override\n\tpublic void onCardClicked(CardUI card) {\n\t\tthis.onCanceled();\n\t}", "public boolean TapCard(float x, float y) { return false; }", "public void act() \n {\n super.checkClick();\n active(isActive);\n }", "@Override\n public void onClickCard(final long id , String inAddress, String outAddress, String date, int flag) {\n showCardDialog(id,inAddress,outAddress,date, flag);\n }", "public void mouseClicked(MouseEvent e) {\n //The source will always be a JLabel\n JLabel source = (JLabel)e.getSource();\n if(source == view.statusText){\n model.initGame();\n return;\n }\n for(int playerHand = 0; playerHand < view.playerHands.length; playerHand++){\n for(int card = 0; card < model.highCardGame.getHand(playerHand).getNumCards(); card++){\n if(view.playerHands[playerHand][card].getIcon() == View.GUICard.getBackCardIcon())\n continue;\n if(view.playerHands[playerHand][card] == source){\n //A card was clicked.\n Model.playCard(playerHand, card);\n return;\n }\n }\n }\n }", "public interface cardClickListener {\n\n void onCardClicked(View view, int position);\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tcard.next(bootpanel);\n\t\t\tSystem.out.println(\"next\");\n\t\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, CardapioActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent cardInt = new Intent(ViewOrderActivity.this, CardActivity.class);\n cardInt.putExtra(CardActivity.CARD, ca);\n // Start activity for result with a request code\n startActivityForResult(cardInt, 5);\n }", "public void containerPress(View view) {\n\n isQuestion = false;\n displayCard(deck.getCard(deckPos), isQuestion);\n }", "@Override\r\n\t\t\t\t\t\t\t\tpublic void click(CustomizedBean bean) {\n\t\t\t\t\t\t\t\t\tccb.room = bean.space;\r\n\t\t\t\t\t\t\t\t\tccb.area = bean.area;\r\n\t\t\t\t\t\t\t\t\tccb.chooselayoutid = bean.currentId;\r\n\t\t\t\t\t\t\t\t\tintent.putExtra(\"bean\", ccb);\r\n\t\t\t\t\t\t\t\t\tstartAcActivity(intent);\r\n\t\t\t\t\t\t\t\t}", "public interface OnCardClickListener {\n void onCardClick(String currCode, String fragType);\n }", "@Override\n\tprotected void OnClick() {\n\t\t\n\t}", "private void assignEvents(CardView cardView) {\n cardView.setOnMouseClicked(event -> {\n ClientManager.getInstance().cardSelected(cardView);\n });\n }", "public void crossPressed() {\n\t\tif (edit) {\n\t\t\tselectCard();\n\t\t} else {\n\t\t\tString command = activeNode.getCurrentChild().getName();\n\t\t\tif (command.equals(\"Edit\")) {\n\t\t\t\tSoundPlayer.playSound(SoundMap.MENU_ACCEPT);\n\t\t\t\tstartEditing(CHARACTER_DECK);\n\t\t\t} else if (command.equals(\"Back\")) {\n\t\t\t\tif (currentDeck != null) { \n\t\t\t\t\tcurrentDeck.setActive(false);\n\t\t\t\t\tcurrentDeck = null;\n\t\t\t\t}\n\t\t\t\tSoundPlayer.playSound(SoundMap.MENU_BACK);\n\t\t\t\tcirclePressed();\n\t\t\t}\n\t\t}\n\t}", "public void ClickedAtCardView(View view){\n //Initialize obj\n theoryHuruf = view.findViewById(R.id.card1);\n theoryHarakat = view.findViewById(R.id.card2);\n basicAdvancedTajwid = view.findViewById(R.id.card3);\n exercise = view.findViewById(R.id.card4);\n\n //When click at card view\n theoryHuruf.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(getActivity(), Theory_Huruf_Activity.class);\n startActivity(intent);\n }\n });\n }", "public void onClicked();", "public void editBtnOnclick()\r\n\t{\r\n\t\tif(cardSet.getCards().size() != 0)\r\n\t\t\tMainRunner.getSceneSelector().switchToCardEditor();\r\n\t}", "public void hitCard() {\n if (this.state == GameState.ROUNDACTIVE) {\n Seat s = this.getSeat(seatPlaying);\n if (s.hasPlayer()) {\n Hand h = s.getPlayer().getHands().get(0);\n h.addCard(this.deck.dealCard());\n if (h.getIsBusted()) {\n this.activeHandStand();\n }\n }\n repaintAll();\n }\n }", "@Override\n public void onClick(View view) {\n // Create a new intent to open the {@link NumbersActivity}\n Intent cardIntent = new Intent(MainActivity.this, cardActivity.class);\n\n // Start the new activity\n startActivity(cardIntent);\n }", "@Override\n\tpublic void onCardComfrim() {\n\t\tdialog = MessageUtils.showCommonDialog(\n\t\t\t\tactivity, \n\t\t\t\tactivity.getText(R.string.common_cardno_comfirm).toString(),\n\t\t\t\tbean.getPan(), \n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t// 确认\n\t\t\t\t\t\tdissmiss();\n\t\t\t\t\t\tonSucess();\n\t\t\t\t\t}\n\t\t\t\t}, \n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t// 取消\n\t\t\t\t\t\tdissmiss();\n\t\t\t\t\t\tonFail();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t30,\n\t\t\t\tTimeOutOper.CANCEL\n\t\t\t\t);\n\t}", "public void switchToCardMatching() {\n Intent cardMatching = new Intent(this, CardMatchingGameActivity.class);\n startActivity(cardMatching);\n }", "@Override\n public void onClick(View theView) {\n if(curIndex == deckOfCards.size()-1){\n ArrayList<FlashCard> newDeck = new ArrayList<FlashCard>();\n for(int i = 0; i < deckOfCards.size(); i++){\n newDeck.add(deckOfCards.get(i));\n }\n Intent intent = new Intent(getApplicationContext(), FinishScreenActivity.class);\n intent.putParcelableArrayListExtra(\"data\", newDeck);\n intent.putParcelableArrayListExtra(\"originalDeck\", originalCards);\n startActivity(intent);\n finish();\n }else{\n ++curIndex;\n curCard = deckOfCards.get(curIndex);\n Log.d(TAG, \"on card number \" + curIndex);\n refreshButtons();\n setFrontSide();\n }\n\n }", "public void chooseActionCards(View view) {\n\t\tIntent intent = new Intent(this, ActionCards.class);\n\t\tstartActivity(intent);\n\t}", "private void setSingleEvent(GridLayout mainGrid) {\n for (int i = 0; i < mainGrid.getChildCount(); i++) {\n //You can see , all child item is CardView , so we just cast object to CardView\n CardView cardView = (CardView) mainGrid.getChildAt(i);\n final int finalI = i;\n cardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (finalI == 0) {\n Intent intent = new Intent(MainActivity.this, SoundActivity.class);\n startActivity(intent);\n }\n else if (finalI == 1) {\n Intent intent = new Intent(MainActivity.this, LedActivity.class);\n startActivity(intent);\n }\n else if (finalI == 2) {\n Intent intent = new Intent(MainActivity.this, MagneticActivity.class);\n startActivity(intent);\n }\n else if (finalI == 3) {\n Intent intent = new Intent(MainActivity.this, LightActivity.class);\n startActivity(intent);\n }\n }\n });\n }\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}", "public void myProfileCardClicked(View view) {\n Intent myProfileIntent = new Intent(this, MyProfile.class);\n startActivity(myProfileIntent);\n }", "public void cardViewClick(View view) {\r\n Intent intent;\r\n\r\n switch (view.getId()) {\r\n case R.id.cardDietChart:\r\n intent = new Intent(this, DietChart.class);\r\n startActivity(intent);\r\n break;\r\n case R.id.cardMakeSubscription:\r\n intent = new Intent(this, MakeSubscription.class);\r\n intent.putExtra(\"name\", nameFromDB);\r\n intent.putExtra(\"phone\", phoneFromDB);\r\n startActivity(intent);\r\n break;\r\n case R.id.cardConsultNutritionist:\r\n intent = new Intent(this, ConsultWithNutritionist.class);\r\n startActivity(intent);\r\n break;\r\n case R.id.cardPayment:\r\n intent = new Intent(this, PaymentStatus.class);\r\n startActivity(intent);\r\n break;\r\n case R.id.cardUpdatePackage:\r\n intent = new Intent(this, Packages.class);\r\n startActivity(intent);\r\n break;\r\n case R.id.cardCancelSubscription:\r\n intent = new Intent(this, CancelSubscription.class);\r\n startActivity(intent);\r\n break;\r\n default:break;\r\n }//End of switch statement\r\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Override\n public void handle( MouseEvent e)\n {\n if( tradeBankGroup.isVisible() || domesticTradeGroup.isVisible())\n return;\n System.out.println( \"Buy card checkpoint\" + mainController.buyCard());\n refreshResources();\n refreshCardNumbers();\n }", "private void addCard() {\n Intent intent = new Intent(this, NewCard.class);\n intent.putExtra(\"cardSetId\", cardSetId);\n startActivity(intent);\n }", "@Override\n\tpublic void mouseReleased(MouseEvent e) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\t mouseReleased = true;\n\t\t cardClicked = false;\n\t\t mouseClick = false;\n\t\t \n\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "private void selectCard() {\n\t\tDeck from = isInMainDeck() ? mainDeck : c.getDeck();\n\t\tDeck to = isInMainDeck() ? c.getDeck() : mainDeck;\n\t\t\n\t\tselectedCard = from.getCurrent();\n\t\tif (selectedCard == null) {\n\t\t\treturn;\n\t\t}\n\t\tif (!to.isFull(animators.size())) {\n\t\t\tSoundPlayer.playSound(SoundMap.MENU_CHOOSE_CARD);\n\t\t\tVector3f p = from.getPosFor(selectedCard);\n\t\t\tfrom.removeCurrent();\n\t\t\tanimators.add(new Animator(selectedCard, p, isInMainDeck(), to, to.getLastPos()));\n\t\t} else {\n\t\t\tselectedCard = null;\n\t\t\tSoundPlayer.playSound(SoundMap.MENU_ERROR);\n\t\t}\n\t\tif (from.isEmpty()) {\n\t\t\tcirclePressed();\n\t\t}\n\t}", "protected void doScreenClick() {\r\n\t\tbtnColonyInfo.visible = btnButtons.down;\r\n\t\tbtnPlanet.visible = btnButtons.down;\r\n\t\tbtnStarmap.visible = btnButtons.down;\r\n\t\tbtnBridge.visible = btnButtons.down;\r\n\t\trepaint();\r\n\t}", "public void showCard(View view) {\n String cardID = view.getTag().toString();\n grimoire.setCard(cardID);\n\n Intent intent = new Intent(GrimoireCardSelectionActivity.this, GrimoireCardActivity.class);\n startActivity(intent);\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tMainActivity sct = (MainActivity) act;\n\t\t\t\t\t\t\t\t\tsct.onItemClick(posit2, 11);\n\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "private void addCard(){\n WebDriverHelper.clickElement(addCard);\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\tmCurriculumVitaeInterface.onComputer();\n\t\t\t\t\t\t}", "private void setSingleEvent(GridLayout mainGrid) {\n for (int i = 0; i < mainGrid.getChildCount(); i++) {\n //You can see , all child item is CardView , so we just cast object to CardView\n CardView cardView = (CardView) mainGrid.getChildAt(i);\n final int finalI = i;\n cardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n Intent intent = new Intent(BuyChoose.this,ActivityOne.class);\n intent.putExtra(\"info\",\"This is activity from card item index \"+finalI);\n startActivity(intent);\n\n }\n });\n }\n }", "public void actionPerformed (ActionEvent event) {\n RainRunGUI.c1.show(RainRunGUI.cards, RainRunGUI.MENUPANEL);\n }", "private void setSingleEvent(GridLayout mainGrid) {\n for (int i = 0; i < mainGrid.getChildCount(); i++) {\n //You can see , all child item is CardView , so we just cast object to CardView\n CardView cardView = (CardView) mainGrid.getChildAt(i);\n final int finalI = i;\n final int finalI1 = i;\n cardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Log.v(\"logmessage\",finalI+\"\");\n String bikeName = bikeList.get(finalI);\n Intent intent = new Intent(BrandListActivity.this, BikeListActivity.class);\n intent.putExtra(\"url\", bikeName);\n Log.v(\"logmessage\", bikeName);\n if (flag!=0){\n intent.putExtra(\"flag\", flag);\n startActivityForResult(intent, 101);\n }\n else {\n startActivity(intent);\n }\n\n }\n });\n }\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tmiddleCardLayout.show(centerPanel, \"2\");\n\t\t\t\t}", "@Override\n public void onClick(View theView) {\n --curIndex;\n curCard = deckOfCards.get(curIndex);\n refreshButtons();\n setFrontSide();\n\n }", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n public void clicked(InputEvent event, float x, float y) {\n\r\n \t\tGameDataInterface gameData = GameDataUtils.getInstance();\r\n \t\t\r\n \t\t/*\r\n \t\t * hardcoded a instance to send to the gameDataInterface\r\n \t\t */\r\n \t\tInstance instance = new Instance();\r\n \t\tinstance.setBoardId(1);\r\n \t\tinstance.setInstanceId(2);\r\n \t\tinstance.setMissionId(1);\r\n \t\tinstance.setTurnId(1);\r\n \t\t\r\n \t\tgameData.loadInstance(game,instance); \r\n \t\tgame.setScreen(game.board);\r\n }", "@Override\n public void onClick(View view) {\n mRepo.setIsEditingCard(Boolean.TRUE);\n mRepo.setCurrentCardTitle(model.getTitle());\n\n Navigation.findNavController(requireView()).navigate(R.id.action_editDeckFragment_to_submitCardFragment);\n }", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\treceive();\r\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t}", "@Override\r\n public void onLeftCardExit(Object dataObject) {\n Toast.makeText(MainActivity.this, \"Left\", Toast.LENGTH_SHORT).show();\r\n }", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t\t\t}", "void onChamaItemClicked(int position);", "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "void leftClickPressedOnDelivery();", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\n\t\t\t}", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase R.id.back:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tcase R.id.card_bank:\n\t\t\tif(isbankcard==0)\n\t\t\t{\n\t\t\tIntent intent_bank = new Intent(context, BankBundingActivity.class);\n\t\t\tstartActivity(intent_bank);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tIntent intent_bank = new Intent(context, BankActivity.class);\n\t\t\t\tstartActivity(intent_bank);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase R.id.card_logo:\n\t\t\t// 更改用户头像\n\t\t\tShowPickDialog();\n\t\t\tbreak;\n\t\tcase R.id.card_username:\n\t\t\tIntent intent_username = new Intent(context, UsernameActivity.class);\n\t\t\tstartActivityForResult(intent_username, 4);\n\t\t\tbreak;\n\t\tcase R.id.card_sex:\n\t\t\tSexPickDialog();\n\t\t\tbreak;\n\t\tcase R.id.card_phone:\n\t\t\tIntent intent_phone = new Intent(context, PhoneActivity.class);\n\t\t\tstartActivity(intent_phone);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "@FXML\n public void playFlashcards(MouseEvent e) {\n AnchorPane root = null;\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/learn_flashcards.fxml\"));\n try {\n root = loader.load();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n LearnFlashcardController controller = loader.getController();\n controller.initData(txtTitle.getText(), rootController, apnLearn);\n controller.initKeys();\n rootController.setActivity(root);\n\n }", "@Override\n public void onLearningCardItemClick(LearningCard learningCard) {\n Toast.makeText(this, \"Route Item has been clicked: \" + learningCard.getQuestion(), Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(MainActivity.this,DetailedLearningCardActivity.class);\n intent.putExtra(DetailedLearningCardActivity.EXTRA_LEARNING_CARD_ID, learningCard.getLearningCardId());\n intent.putExtra(DetailedLearningCardActivity.EXTRA_LEARNING_CARD_QUESTION, learningCard.getQuestion());\n intent.putExtra(DetailedLearningCardActivity.EXTRA_LEARNING_CARD_ANSWER, learningCard.getAnswer());\n intent.putExtra(DetailedLearningCardActivity.EXTRA_LEARNING_CARD_SUBJECT, learningCard.getSubject());\n intent.putExtra(DetailedLearningCardActivity.EXTRA_LEARNING_CARD_LEARNED, learningCard.getLearned());\n startActivityForResult(intent, DETAILED_LEARNING_CARD_ACTIVITY_REQUEST_CODE);\n }", "public void setActiveCard(String cardname){\n\t\tCardLayout cl = (CardLayout)(cards.getLayout());\n\t\tcl.show(cards, cardname);\n\t\t//note: if cardname is passed in that doesnt exist, nothing happens\n\t}", "public void flashCard(View view){\n Intent intent = new Intent(this, ModeMenu.class);\n String mode=\"\";\n boolean error=false;\n switch (view.getId()) {\n case R.id.home_learn_button:\n mode = getString(R.string.learn_label);\n break;\n case R.id.home_hone_button:\n mode = getString(R.string.hone_label);\n break;\n case R.id.home_ordeal_button:\n mode = getString(R.string.ordeal_label);\n break;\n }\n intent.putExtra(getString(R.string.mode_key),mode);\n startActivity(intent);\n\n }", "@Then(\"^user clicks on cards link$\")\r\n\tpublic void userClicksonCardsLink() {\r\n\t\tdbsdriver.findElement(By.xpath(\"//div[@id='flpHeader']//a[text()='Cards']\")).click();\r\n\t\ttest.log(LogStatus.INFO, \"user clicked on cards link\");\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(By.xpath(\"//a[starts-with(@data-flk-success,'atNodeInserted') and text()='Credit Cards']\")));\r\n\t}", "@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t}", "protected void doBridgeClick() {\r\n\t\tuiSound.playSound(\"Bridge\");\r\n\t\tif (onBridgeClicked != null) {\r\n\t\t\tonBridgeClicked.invoke();\r\n\t\t}\r\n\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tmiddleCardLayout.show(centerPanel, \"1\");\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\treceive();\r\n\t\t\t\t}", "public void mouseClicked(MouseEvent e)\n \t\t{\n \t\t\tif(cardIdSelected!=-1){\n \t\t\t\tif(!isRightSide(getFakePos(e.getX(), e.getY()).x)){\n \t\t\t\t\tlisteMissiles.add(getFakePos(e.getX(), e.getY()));\n \t\t\t\t\tcardIdSelected = -1;\n \t\t\t\t\trepaint();\n \t\t\t\t}\n \t\t\t}\n \t\t\tif(isRightSide(getFakePos(e.getX(), e.getY()).x))\n \t\t\t\tFill(e.getX(), e.getY(),(e.getX()+1*caseDim.x),(e.getY()+1*caseDim.y));\n\n \t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}" ]
[ "0.754555", "0.734828", "0.7215633", "0.7214966", "0.6938275", "0.6757888", "0.6752926", "0.66324407", "0.6627156", "0.6586627", "0.6549753", "0.65438205", "0.6463235", "0.6459754", "0.6451054", "0.63757306", "0.63684964", "0.6368261", "0.6341033", "0.6293409", "0.62755424", "0.62726533", "0.625473", "0.62543935", "0.62525105", "0.62446535", "0.62414396", "0.6236567", "0.6219084", "0.6204588", "0.6199577", "0.61951464", "0.6156342", "0.61473376", "0.61390805", "0.613376", "0.61318225", "0.61318225", "0.61318225", "0.6127558", "0.6125446", "0.61253446", "0.6124981", "0.6118053", "0.6106049", "0.6098206", "0.6098206", "0.6098206", "0.6098206", "0.6098206", "0.6098206", "0.6098206", "0.6098206", "0.6098206", "0.6098206", "0.6098206", "0.6082926", "0.6078316", "0.6074785", "0.60679597", "0.6062249", "0.6062249", "0.60599744", "0.60537994", "0.60471034", "0.604217", "0.604012", "0.6033001", "0.60326546", "0.60312", "0.6027959", "0.6026647", "0.6018504", "0.6009167", "0.6009167", "0.6009167", "0.6008248", "0.60082215", "0.60082215", "0.60082215", "0.60082215", "0.60002697", "0.5999188", "0.59968334", "0.5992703", "0.5988031", "0.59860414", "0.59833187", "0.59823805", "0.5971105", "0.5969465", "0.5960507", "0.5956998", "0.5954553", "0.5954519", "0.5953612", "0.59523946", "0.5951931", "0.59504664", "0.5949212", "0.5949212" ]
0.0
-1
Behavior of the Application upon clicking the Button
@Override public void onCardButtonClick(int position) { CardAlbum cardAlbum = cardAlbumListData.get(position); Intent intent = new Intent(this,ArtistActivity.class); Bundle bundle = new Bundle(); bundle.putString(EXTRA_ALBUM_ARTIST_ID,cardAlbum.getArtistId()); bundle.putString(EXTRA_ALBUM_ARTIST_NAME,cardAlbum.getArtistName()); bundle.putString(EXTRA_SPOTIFY_ACCESS_TOKEN,getAccessToken()); intent.putExtra(BUNDLE_EXTRA,bundle); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void buttonClicked();", "void mainButtonPressed();", "public void buttonClicked() {\n mSanitizorGame.buttonClicked();\n }", "public void onButtonAPressed();", "public void ipcallButtonPressed() {\n\t\tdialButtonPressed(true) ;\n\t}", "public void activateButton() {\n\t\tif (isBrowser) this.bringToBack();\r\n\t\tMainActivity.resetXY();\r\n\t}", "@Override\n\tprotected void OnClick() {\n\t\t\n\t}", "protected void execute() { \t\n// \tboolean toggle=true;\n// \tboolean grab = false;\n// \tif(toggle&&button.get()) {//execute once per button push\n// \t\ttoggle=false;//prevents code from being called again until button is released and pressed again\n// \t\tif(grab){\n// \t\t\tgrab=false;\n// \t\t\tclaw.open();\n// \t\t}else {\n// \t\t\tgrab=true;\n// \t\t\tclaw.close();\n// \t\t}\n// \t}else if(!button.get()) {\n// \t\ttoggle=true;//button has been released\n// \t}\n \tclaw.open();\n }", "@Override\n\tprotected void on_button_pressed(String button_name) {\n\n\t}", "@FXML\r\n\tvoid main_btn_clicked(MouseEvent event) {\r\n\r\n\t}", "@FXML\n\tvoid mainMenuBtnClicked(ActionEvent event) {\n\t\t// if submitted before exam time ends ask the user if he sure of that\n\t\tif (flag1 && flag2) {\n\t\t\tAlert alert = new Alert(AlertType.CONFIRMATION);\n\t\t\talert.setTitle(\"Warning\");\n\t\t\talert.setHeaderText(\"Leaving the exam means you submitting a blank exam\");\n\t\t\talert.setContentText(\"Are you sure you want to do that?\");\n\t\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\t\tif (result.get() == ButtonType.OK) {\n\t\t\t\tsummbitBlank();\n\t\t\t\ttry {\n\t\t\t\t\tFXMLutil.swapScene(event, window.StudentMenu.toString());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tFXMLutil.swapScene(event, window.StudentMenu.toString());\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void onMainClick(){\r\n\t\tmyView.advanceToMain();\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.getAppointView().updateUI();\n\t\t\t\tcontroller.getAppointView().display(true);\n\t\t\t}", "@Override\n public void onClick() {\n System.out.println(\"Button has been JUST clicked\");\n }", "@Override\r\n\tpublic void buttonClick(ClickEvent event) {\r\n\t\tString buttonId = event.getButton().getId();\r\n\t\t\r\n\t\tswitch(buttonId) {\r\n\t\t\r\n\t\t//opens the mainView if the user clicks the gefühlslage button\r\n\t\tcase \"gefuehlslage\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.MAIN_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the diaryView if the user clicks the diary button \r\n\t\tcase \"diary\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.DIARY_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the reportView if the user clicks the report button \r\n\t\tcase \"report\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.REPORT_VIEW);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t//opens the reminderView if the user clicks the reminder button\t\r\n\t\tcase \"reminder\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.REMINDER_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the medInfoView if the user clicks the medication information button \r\n\t\tcase \"medInfo\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.MEDICATION_INFORMATION_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the depErkView if the user clicks the definition depression button \r\n\t\tcase \"depErk\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.DEFINITION_DEPRESSION_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the settingsView if the user clicks the settings button \r\n\t\tcase \"settings\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.SETTINGS_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the sosView if the user clicks the sos button\r\n\t\tcase \"sos\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.SOS_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the chatView if the user clicks the chat button \r\n\t\tcase \"chat\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.CHAT_VIEW);\r\n\t\t break;\r\n\t\t}\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n Main.switchViews();\n }", "public void click() {\n\t\tSystem.out.println(\"LinuxButton Click\");\r\n\t}", "public void trigger() {\n button.release(true);\n }", "protected void doScreenClick() {\r\n\t\tbtnColonyInfo.visible = btnButtons.down;\r\n\t\tbtnPlanet.visible = btnButtons.down;\r\n\t\tbtnStarmap.visible = btnButtons.down;\r\n\t\tbtnBridge.visible = btnButtons.down;\r\n\t\trepaint();\r\n\t}", "public void btn_LearningActivity() {\r\n\t\tbtn_LearningActivity.click();\r\n\t}", "@Override\n public void pressMovieButton() {\n System.out.println(\"Home: You must pick an app to show movies.\");\n }", "public void settingBtnClick() {\n\t}", "void buttonGo_actionPerformed(ActionEvent e) {\n\n\n }", "public static void aboutApp(){\n\t\tAlert alertDialog = new Alert(Alert.AlertType.INFORMATION);\n\t\talertDialog.setTitle(\"My first java Desktop App\");\n\t\talertDialog.setHeaderText(\"Learning JavaFX\");\n\t\talertDialog.setContentText(\"I'm a beginner and soon i'll be a pro\");\n\n\t\t//to make custom buttons\n\t\tButtonType yesBtn = new ButtonType(\"yes\");\n\t\tButtonType noBtn = new ButtonType(\"No\");\n\t\talertDialog.getButtonTypes().setAll(yesBtn,noBtn);\n\n\t\t//to perform click event on buttons of the dilague box that opens and make buttons\n\t\tOptional<ButtonType> clickBtn=alertDialog.showAndWait();\n\t\tif(clickBtn.isPresent()&&clickBtn.get()==yesBtn){\n\t\t\t// code .......\n\t\t}\n\t\tif(clickBtn.get()==noBtn){\n\t\t\t//code..........\n\t\t}\n\n\t\talertDialog.show();\n\t}", "public void testing() {\n System.out.println(\"button pressed!\");\n }", "void onClick();", "public void sButton() {\n\n\n\n }", "private void clickOn() {\n\t\tll_returnbtn.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t}", "private void button1MouseClicked(MouseEvent e) {\n\t}", "@Override\n public void onClick(View theView) {\n setUp();\n\n\n }", "private void appointmentsButtonAction(ActionEvent event) {\r\n\t\t\ttry {\r\n\t\t\t\tParent root;\r\n\t\t\t\tStage stage = (Stage) appointmentsButton.getScene().getWindow();\r\n\t\t\t\troot = FXMLLoader.load(getClass().getResource(\"/views/AppointmentScreen.fxml\"));\r\n\t\t\t\tScene scene = new Scene(root);\r\n\t\t\t\tstage.setScene(scene);\r\n\t\t\t\tstage.setResizable(false);\r\n\t\t\t\tstage.show();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}", "public void buttonPress(ActionEvent event) {\r\n Button clickedButton = (Button) event.getSource();\r\n String selectedButton = clickedButton.getId();\r\n System.out.print(selectedButton);\r\n \r\n // If the user correctly guesses the winning button\r\n if (correctButtonName.equals(selectedButton)) {\r\n \r\n //Displays a popup alerting the user that they won the game.\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setTitle(\"You Win!\");\r\n alert.setHeaderText(\"Congratulations, you found the treasure!\");\r\n alert.setContentText(\"Would you like to play again?\");\r\n ButtonType okButton = new ButtonType(\"Play again\");\r\n ButtonType noThanksButton = new ButtonType(\"No Thanks!\");\r\n alert.getButtonTypes().setAll(okButton, noThanksButton);\r\n Optional<ButtonType> result = alert.showAndWait();\r\n \r\n //If the user selects \"Play again\" a new button will be randomly selected\r\n if (result.get() == okButton ){\r\n //Chooses a random button from the list of buttons\r\n correctButtonName = buttonList[(int)(Math.random() * buttonList.length)];\r\n }\r\n //If the user does not select \"Play again\", the application will be closed\r\n else {System.exit(0);}\r\n \r\n }\r\n \r\n //If the user chooses any button except for the winning button\r\n else if (!selectedButton.equals(correctButtonName)) {\r\n \r\n //Displays a popup alerting the user that they did not find the treasure.\r\n Alert alert2 = new Alert(Alert.AlertType.INFORMATION);\r\n alert2.setTitle(\"No treasure!\");\r\n alert2.setHeaderText(\"There was no treasure found on that island\");\r\n alert2.setContentText(\"Would you like to continue searching for treasure?\");\r\n ButtonType ayeCaptain = new ButtonType (\"Continue Searching\");\r\n ButtonType noCaptain = new ButtonType (\"Quit\");\r\n alert2.getButtonTypes().setAll(ayeCaptain,noCaptain);\r\n Optional<ButtonType> result2 = alert2.showAndWait();\r\n \r\n if (result2.get() == ayeCaptain){\r\n //The search for treasure continues!\r\n }\r\n else{ \r\n System.exit(0);\r\n }\r\n }\r\n }", "private void devBtnActionPerformed(ActionEvent evt) {\n }", "public void onClicked();", "public void onClick(View v) {\r\n if (b1.isPressed()) {\r\n Intent j = new Intent(getApplicationContext(), MainActivity.class);\r\n startActivity(j);\r\n setContentView(R.layout.activity_main);\r\n }\r\n\r\n }", "@FXML protected void MainMenuButtonClicked(ActionEvent event) {\n this.mainMenuCB.launchMainMenu();\r\n }", "@Override\n\tprotected void setOnClickForButtons() {\n\t\tthis.buttons[0].setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(getActivity(), MainScreenActivity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t\tMainFunctions.selectedOption = 1;\n\t\t\t\tdestroyServices();\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\n\t\t/* message box - onclick event */\n\t\tthis.buttons[1].setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdestroyServices();\n\t\t\t\tMainFunctions.selectedOption = 2;\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\t\n\t\t/* one tick sound */\n\t\tfor (int i = 0; i < this.totalButtons; i++){\n\t\t\tfinal String desc = buttons[i].getTag().toString();\n\t\t\tbuttons[i].setOnFocusChangeListener(new View.OnFocusChangeListener() {\n\t\t\t\tpublic void onFocusChange(View v, boolean hasFocus) {\n\t\t\t\t\tif (hasFocus) {\n\t\t\t\t\t\tLog.i(TAG, \"Button \" + desc + \" was selected\");\n\t\t\t\t\t\tlogFunctions.logTextFile(\"Button \" + desc + \" was selected\");\n\t\t\t\t\t\tspeakButton(desc, 1.0f, 1.0f);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "public void act() \n {\n super.checkClick();\n active(isActive);\n }", "private void ViewActionPerformed(ActionEvent e) {\n\t}", "void viewButton_actionPerformed(ActionEvent e) {\n doView();\n }", "@Override\r\n\tvoid start() {\n\t\tButton btnPayed = new Button(\"Paid\");\r\n\t\tButton btnCanceled = new Button(\"Canceled\");\r\n\t\t// Set button action events to the event methods of this class\r\n\t\tsetControlButton(btnPayed, \"Paid\");\r\n\t\tsetControlButton(btnCanceled, \"Canceled\");\r\n\r\n\t\ttextLabelDisplayed = new Label(\"\");\r\n\t\ttextLabelDisplayed.setPrefWidth(120);\r\n\r\n\t\tGridPane gridPaneAll = new GridPane();\r\n\t\tgridPaneAll.setVgap(10);\r\n\t\tGridPane gridPaneOrder = new GridPane();\r\n\t\tgridPaneOrder.setHgap(10);\r\n\t\tgridPaneOrder.add(btnPayed, 0, 0);\r\n\t\tgridPaneOrder.add(btnCanceled, 1, 0);\r\n\t\tgridPaneAll.add(gridPaneOrder, 0, 0);\r\n\t\tgridPaneAll.add(textLabelDisplayed, 0, 1);\r\n\r\n\t\twindow.addNodesAsChildrenToRoot(gridPaneAll);\r\n\r\n\t\t// Put the final touches and display the window.\r\n\t\twindow.start();\r\n\r\n\t\trefreshDisplay();\r\n\t}", "@Override\n public void onClick(View view) {\n if(buttonHandler != null)\n {\n //we send out to our button handler\n buttonHandler.handleEvolve(wid);\n }\n Toast.makeText(getContext(), \"Evolve please!\", Toast.LENGTH_SHORT).show();\n\n }", "public abstract void buttonPressed();", "public void goApp()\r\n {\n try\r\n {\r\n for (int y = 0; y < 16; y++)\r\n {\r\n for (int x = 0; x < 16; x++)\r\n {\r\n if (button[y][x].isSelected())\r\n {\r\n if (x > 0)\r\n {\r\n soundClip[x - 1].stop();\r\n soundClip[x].play();\r\n }\r\n else\r\n {\r\n soundClip[15].stop();\r\n soundClip[x].play();\r\n }\r\n\r\n }\r\n }\r\n Thread.sleep(tempo);\r\n }\r\n speedSlider.setToolTipText(\"The current speed is set to: \" + tempo);\r\n\r\n }\r\n catch (InterruptedException e)\r\n {\r\n }\r\n }", "@Override\n public void onBoomButtonClick(int index) {\n }", "public void pressMovieButton() {\n System.out.println(\"Home: You must pick an app to show movies.\\n\");\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"Button 1\", Toast.LENGTH_SHORT).show();\n\t\t\t}", "protected abstract void pressedOKButton( );", "@Override\n public void onClick(View view) {\n\n switch (view.getId()) {\n\n case R.id.app_1_button:\n mPresenter.openSpotifyStreamerApp();\n break;\n\n case R.id.app_2_button:\n mPresenter.openScoresApp();\n break;\n\n case R.id.app_3_button:\n mPresenter.openLibraryApp();\n break;\n\n case R.id.app_4_button:\n mPresenter.openBuildItBiggerApp();\n break;\n\n case R.id.app_5_button:\n mPresenter.openXyzReaderApp();\n break;\n\n case R.id.app_6_button:\n mPresenter.openCapstoneApp();\n break;\n }\n }", "@Override\n\tpublic void onClick() {\n\t\t\n\t}", "public void buttonClick() {\n if (soundToggle == true) {\n buttonClick.start();\n } // if\n }", "@Override\n public void buttonClick(ClickEvent event) {\n \tgetUI().getNavigator().navigateTo(NAME + \"/\" + contenView);\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tnew Main();\n\t\t\t\tdispose(); // 해당 프레임만 사라짐\n\t\t\t}", "@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tUI.getCurrent().getNavigator().navigateTo(\"CliPantallaBusquedaExpedientes\");\t \n\t\t\t}", "public void clickYes ();", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private void button1MouseClicked(MouseEvent e) {\n }", "public void pressTVButton() {\n System.out.println(\"Home: You must pick an app to show movies.\\n\");\n }", "public App() {\n\t\tContainer pane = getContentPane();\n\t\t\n\t\ttetapan = new JButton(\"Tetapan\");\n\t\tpane.add(tetapan);\n\t\ttetapan.setBounds(10, 20, 80, 30);\n\t\t// tetapan.addActionListener(arg0);\n\t\tcarian = new JTextField(\"Cari...\");\n\t\tpane.add(carian);\n\t\tcarian.setBounds(260, 20, 150, 30);\n\t\tcari = new JButton(\"Cari\");\n\t\tpane.add(cari);\n\t\tcari.setBounds(410, 20, 60, 30);\n\t\t// cari.addActionListener(arg0);\n\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tif(e.getButton()==MouseEvent.BUTTON1)\n\t\t\t\t{\n\t\t\t\t\tif(Conf.isbegin==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tConf.isbegin=0;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tConf.isbegin=1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(e.getButton()==MouseEvent.BUTTON3)\n\t\t\t\t{\n\t\t\t\t\tif(Conf.isreplay==1)\t\n\t\t\t\t\t{\n\t\t\t\t\t\tConf.isreplay=0;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tConf.isreplay=1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t\n\t\t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n frame.setVisible(false);//when user clicks financial assistant button the visibility of the frame for the home screen will be set to false\n new FinancialAssistant();//displays the financial assistant page\n }", "public void onButtonBPressed();", "@Override\n\tpublic void onClick() {\n\t\tSystem.out.println(\"전화를 겁니다\");\n\t}", "public void pressMainMenu() {\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \tapp.toggleLightMode();\n \tisDark = !isDark;\n }", "@Override\n public void pressTVButton() {\n System.out.println(\"Home: You must pick an app to show tv shows.\");\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tmsgsnd(\"start\");\r\n\t\t\t\ttoppanel.setVisible(true);\r\n\t\t\t\tbottompanel.setVisible(true);\r\n\t\t\t\tanswer.requestFocus();\r\n\t\t\t}", "public void clickButton()\n {\n fieldChangeNotify( 0 );\n }", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "public void act() \n {\n checkClicked();\n }", "@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tbindingSource.setItemId(this, true, bindingSource.getItemId());\n\t\t\t\t\n\t\t\t\t// fire the app event if it's implemented\n\t\t\t\tif (listenerDownButton != null)\n\t\t\t\t\tlistenerDownButton.downButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, 0));\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void onClick(Widget sender) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void buttonStatusChange() {\n\t\t\t\n\t\t}", "private void designBtnActionPerformed(ActionEvent evt) {\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tAndroidTools.PlaySound(getBaseContext(), R.raw.animalmath);\n\t\t\t\tAndroidTools.wait(1200);\n\t\t\t\tIntent learningScreenIntent = new Intent(MainPage.this, MathPage.class);\n\n\t\t\t\t//load screen\n\t\t\t\tMainPage.this.startActivity(learningScreenIntent);\n\t\t\t}", "@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tString appName = txtAppName.getText();\r\n\t\t\tString appTittle = txtAppTitle.getText();\r\n\t\t\tif ((appName != null) && (appTittle != null)\r\n\t\t\t\t\t&& (!appName.equals(\"\")) && (!appTittle.equals(\"\"))) {\r\n\r\n\t\t\t\t// Set up the callback object.\r\n\t\t\t\tAsyncCallback<Long> callback = new AsyncCallback<Long>() {\r\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t\t\t// TODO: Do something with errors.\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tpublic void onSuccess(Long result) {\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\tif (appObj == null){\r\n\t\t\t\t\tappObj = new Application(userId_);\r\n\t\t\t\t\tappObj.setAppName(appName);\r\n\t\t\t\t\tappObj.setAppTittle(appTittle);\r\n\t\t\t\t\tappScoreSvc.InsertApp(appObj, callback);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tappObj.setAppName(appName);\r\n\t\t\t\t\tappObj.setAppTittle(appTittle);\r\n\t\t\t\t\tappScoreSvc.UpdateApp(appObj, callback);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//GlobalServices.ComebackHome(true);\r\n\t\t\t\tHistory.newItem(\"root-application\");\r\n\t\t\t} else {\r\n\t\t\t\tWindow.alert(\"Please input fully application information.\");\r\n\t\t\t}\r\n\t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n frame.setVisible(false);//when user clicks health assistant button the visibility of the frame for the home screen will be set to false\n new HealthAssistant();//displays the health assistant page\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void onClick() {\n }", "@FXML\r\n private void handleButtonAction(ActionEvent event) {\n }", "abstract void botonDemo_actionPerformed(ActionEvent e);", "String handleButtonPress(Button button);", "@Override\r\n\tpublic void onButtonEvent(GlassUpEvent event, int contentId) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "void goMainScreen(){\n\t\tcheckSavePwd();\n\t\tActionEvent e = new ActionEvent();\n\t\te.sender = this;\n\t\te.action = ActionEventConstant.ACTION_SWITH_TO_CATEGORY_SCREEN;\n\t\tUserController.getInstance().handleSwitchActivity(e);\n\t}", "public void Open() {\r\n\t click();\r\n\t }", "@Override\n\t\t\t\n\t\t\tpublic void onClick(final View e) {\n\t\t\t\t\n\t\t\t\tif(e == buttonStartExam)\n\t \t{ \n\t\t\t\t\tbuttonStartExam.setBackgroundResource(R.drawable.btn4);\n\t }\n\t\t new Handler().postDelayed(new Runnable() {\n\t\t public void run() {\n\t\t \tif( e == buttonStartExam)\n\t\t \t{\n\t\t \t\tbuttonStartExam.setBackgroundResource(R.drawable.btn2);\n\t\t }\n\t\t }\n\t\t }, 100L); \n\t\t SharedPreferences setting = getSharedPreferences(\"Pref\", 0);\n\t\t String imported= setting.getString(\"imported\", \"\");\n\t\t if(imported.equals(\"Yes\"))\n\t\t {\n\t\t\t\tif(Chkagree.isChecked())\n\t\t\t\t{\n\t\t\tIntent mIntent = new Intent(RulesActivity.this, DispalyQuestion.class);\n\t\t\tstartActivity(mIntent);\n\t\t\tfinish();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tToast.makeText(RulesActivity.this, \"Please Agree\",Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t }\n\t\t else\n\t\t {\n\t\t \t Toast.makeText(RulesActivity.this, \"Answers not imported\",Toast.LENGTH_LONG).show();\n\t\t }\n\t\t\t}", "public void pressNewGame() {\n }", "void userPressConnectButton();", "protected void doBridgeClick() {\r\n\t\tuiSound.playSound(\"Bridge\");\r\n\t\tif (onBridgeClicked != null) {\r\n\t\t\tonBridgeClicked.invoke();\r\n\t\t}\r\n\t}", "@FXML\r\n\tvoid buttonApothekekontaktClick(ActionEvent event) {\r\n\t\tapotheke.setOnAction(e -> MobileApplication.getInstance().switchView(GluonApplication.APOTHEKEKONTAKT1_VIEW));\r\n\t}", "public void onYesButtonClicked() {\n changeAfterClientPick();\n }", "public void buttonClickHandler (ActionEvent evt) {\n\t\tButton clickedButton = (Button) evt.getTarget();\n\t\tString buttonLabel = clickedButton.getText();\n\t\t\n\t\tswitch(buttonLabel) {\n\t\t\tcase(\"Instructions\"): openInstructionsWindow(); break;\n\t\t\tcase(\"About\"): openAboutWindow(); break;\n\t\t\tcase(\"Quit\"): GameScreenController.quitWindow(); break;\n\t\t}\t\n\t}", "public abstract void executeRunButton();", "@Override\r\n\t\t\t\tpublic void onClick() {\n\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onClick() {\n\r\n\t\t\t\t}", "public void start() {\n\n /*\n Set up the button\n */\n\n //Instantiate button\n JButton button = new JButton();\n //set up the centroid and dimension of button\n button.setBounds(90, 65, 300, 300);\n //add button to the components for an action event\n button.addActionListener(this);\n //use lambda expression to print \"Hello User!\"\n button.addActionListener(e -> System.out.println(\"Hello User!\"));\n //set button's title to \"Click me\"\n button.setText(\"Click me\");\n //hide text focus on button\n button.setFocusable(false); //to hide border around the text in button\n //set up the font\n button.setFont(new Font(\"Comic Sans\", Font.BOLD, 45));\n\n /*\n Set up the frame\n */\n\n //add button into the frame\n this.add(button);\n //Instantiate icon\n ImageIcon icon = new ImageIcon(\"src/main/resources/gui/icon.png\");\n //add icon to frame\n this.setIconImage(icon.getImage());\n //set exit condition to the frame\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n //set window's title\n this.setTitle(\"Click the button\");\n //set frame size (width 500, height 500)\n this.setSize(500, 500);\n //set frame layout (null)\n this.setLayout(null);\n //set window show up in the middle of screen\n this.setLocationRelativeTo(null);\n //set frame visibility (true)\n this.setVisible(true);\n\n }", "public void click() {\n System.out.println(\"Click\");\n }" ]
[ "0.7080953", "0.70016867", "0.69626415", "0.6859956", "0.6707961", "0.66967905", "0.66490185", "0.6607892", "0.66042244", "0.6600499", "0.65380144", "0.65220064", "0.6510823", "0.64986664", "0.6491112", "0.64830065", "0.64708304", "0.64533", "0.6449266", "0.64413995", "0.64383024", "0.64337665", "0.64294046", "0.6423369", "0.6395712", "0.63715744", "0.6370442", "0.6370154", "0.6369342", "0.6343792", "0.63421535", "0.6326304", "0.63259405", "0.6325552", "0.6320094", "0.6317375", "0.6311396", "0.63061774", "0.6303657", "0.6301928", "0.62881476", "0.62873626", "0.62794846", "0.62730443", "0.6223593", "0.621993", "0.6210394", "0.6210394", "0.6210394", "0.62076455", "0.6207541", "0.6206584", "0.6205213", "0.6193631", "0.6193523", "0.61926824", "0.619124", "0.6189704", "0.6187733", "0.618353", "0.6178236", "0.61760676", "0.61758226", "0.6174535", "0.6171715", "0.6169729", "0.6165886", "0.61632127", "0.61537856", "0.6142325", "0.61400586", "0.6138861", "0.6138861", "0.61387336", "0.61359155", "0.61300737", "0.61274624", "0.6123", "0.61218095", "0.6119123", "0.6109636", "0.6108772", "0.61023045", "0.6099196", "0.6096453", "0.60960203", "0.6092765", "0.6088699", "0.60867834", "0.6085329", "0.60767347", "0.6073856", "0.6070386", "0.6066609", "0.6060373", "0.6060212", "0.60597044", "0.60588044", "0.60588044", "0.6057857", "0.6054647" ]
0.0
-1
Getter method for the accessToken
public String getAccessToken() { return accessToken; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAccessToken();", "public String getAccessToken() {\n return accessToken;\n }", "public String getAccessToken() {\n return accessToken;\n }", "String getAccessToken();", "String getAccessToken();", "public static String getAccessToken() {\n return accessToken;\n }", "protected AccessToken getAccessToken() \n\t{\n\t\treturn accessToken;\n\t}", "public String getAccessToken() {\n\t\treturn accessToken;\n\t}", "public String getAccessToken() {\n\t\treturn accessToken;\n\t}", "public String getAccessToken () {\n\t\treturn this.accessToken;\n\t}", "public String getAccessToken() {\n readLock.lock();\n try {\n return accessToken;\n } finally {\n readLock.unlock();\n }\n }", "@Nullable\n public String getAccessToken() {\n return accessToken;\n }", "public AccessToken getAccessToken() {\n return token;\n }", "public String getAccessToken()\n {\n if (accessToken == null)\n {\n if (DEBUG)\n {\n System.out.println(\"Access token is empty\");\n }\n try\n {\n FileReader fileReader = new FileReader(getCache(\"token\"));\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n accessToken = bufferedReader.readLine();\n if (DEBUG)\n {\n System.out.println(\"BufferReader line: \" + accessToken);\n }\n } catch (FileNotFoundException e)\n {\n e.printStackTrace();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return accessToken;\n }", "@Transient\n\tpublic String getAccessToken() {\n\t\treturn accessToken;\n\t}", "public String getAccessToken() {\n if (accessToken == null || (System.currentTimeMillis() > (expirationTime - 60 * 1000))) {\n if (refreshToken != null) {\n try {\n this.refreshAccessToken();\n } catch (IOException e) {\n log.error(\"Error fetching access token\", e);\n }\n }\n }\n\n return accessToken;\n }", "public String getAccessToken(){\n //return \"3be8b617e076b96b2b0fa6369b6c72ed84318d72\";\n return MobileiaAuth.getInstance(mContext).getCurrentUser().getAccessToken();\n }", "@Api(1.0)\n @NonNull\n public String getAccessToken() {\n return mAccessToken;\n }", "public String getAccessToken() {\n\t\t\n\t\tString access_token = \"\";\n\t\t\n\t\tif (securityContext != null) {\n\t\t\taccess_token = securityContext.getTokenString();\n\t\t}\n\t\t\n\t\treturn access_token;\n\t}", "String getAuthorizerAccessToken(String appId);", "protected final String getAccessToken() {\n Session currentSession = sessionTracker.getOpenSession();\n return (currentSession != null) ? currentSession.getAccessToken() : null;\n }", "String getComponentAccessToken();", "public String getAccess_token() {\r\n\t\treturn access_token;\r\n\t}", "public static String getAccessToken() {\n return \"\";\n }", "public static String getCurrentAccessToken() {\n if (StringUtils.isNotNull(cacheAccessToken))\n return cacheAccessToken;\n\n String accessToken = null;\n User user = getCurrentUser();\n if (user != null)\n accessToken = user.secret;\n if (accessToken != null)\n cacheAccessToken = accessToken;\n\n return cacheAccessToken;\n }", "public String getAccessTokenUri() {\n return accessTokenUri;\n }", "private void getAccessToken() {\n\n\t\tMediaType mediaType = MediaType.parse(\"application/x-www-form-urlencoded\");\n\t\tRequestBody body = RequestBody.create(mediaType,\n\t\t\t\t\"client_id=\" + CONSUMER_KEY + \"&client_secret=\" + CONSUMER_SECRET + \"&grant_type=client_credentials\");\n\t\tRequest request = new Request.Builder().url(\"https://api.yelp.com/oauth2/token\").post(body)\n\t\t\t\t.addHeader(\"cache-control\", \"no-cache\").build();\n\n\t\ttry {\n\t\t\tokhttp3.Response response = client.newCall(request).execute();\n\t\t\tString respbody = response.body().string().trim();\n\t\t\tJSONParser parser = new JSONParser();\n\t\t\tJSONObject json = (JSONObject) parser.parse(respbody);\n\t\t\taccessToken = (String) json.get(\"access_token\");\n\t\t} catch (IOException | ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public String generateAccessToken() {\n return accessTokenGenerator.generate().toString();\n }", "@Override\r\n\tpublic String accessToken() throws OAuthSystemException {\n\t\treturn null;\r\n\t}", "Future<String> getAccessToken(OkapiConnectionParams params);", "public static String getAccessToken(Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\treturn prefs.getString(TWITTER_ACCESS_TOKEN, null);\n\t\t}", "private String GetAccessToken() {\n final String grantType = \"password\";\n final String resourceId = \"https%3A%2F%2Fgraph.microsoft.com%2F\";\n final String tokenEndpoint = \"https://login.microsoftonline.com/common/oauth2/token\";\n\n try {\n URL url = new URL(tokenEndpoint);\n HttpURLConnection conn;\n if (configuration.isProxyUsed()) {\n Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(configuration.getProxyServer(), configuration.getProxyPort()));\n conn = (HttpURLConnection) url.openConnection(proxy);\n } else {\n conn = (HttpURLConnection) url.openConnection();\n }\n\n String line;\n StringBuilder jsonString = new StringBuilder();\n\n conn.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n conn.setRequestMethod(\"POST\");\n conn.setDoInput(true);\n conn.setDoOutput(true);\n conn.setInstanceFollowRedirects(false);\n conn.connect();\n\n try (OutputStreamWriter outputStreamWriter = new OutputStreamWriter(conn.getOutputStream(), StandardCharsets.UTF_8)) {\n String payload = String.format(\"grant_type=%1$s&resource=%2$s&client_id=%3$s&username=%4$s&password=%5$s\",\n grantType,\n resourceId,\n clientId,\n username,\n password);\n outputStreamWriter.write(payload);\n }\n\n try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {\n while((line = br.readLine()) != null) {\n jsonString.append(line);\n }\n }\n\n conn.disconnect();\n\n JsonObject res = new GsonBuilder()\n .create()\n .fromJson(jsonString.toString(), JsonObject.class);\n\n return res\n .get(\"access_token\")\n .toString()\n .replaceAll(\"\\\"\", \"\");\n\n } catch (IOException e) {\n throw new IllegalAccessError(\"Unable to read authorization response: \" + e.getLocalizedMessage());\n }\n }", "AccessToken getOAuthAccessToken(RequestToken requestToken) throws MoefouException;", "AccessToken getOAuthAccessToken() throws MoefouException;", "public String getAuthorizationStatus(){\n\t\treturn accessToken;\n\t}", "public java.lang.String getOauth_token(){\r\n return localOauth_token;\r\n }", "public synchronized String accessToken(String knownInvalidToken) {\n if (accessToken == null || (knownInvalidToken != null && accessToken.equals(knownInvalidToken))) {\n loadTokens();\n }\n\n return accessToken;\n }", "private String accessTokenForLog() {\n return StringUtils.isEmpty(accessToken) ? \"null/empty\" : \"present\";\n }", "private String retrieveToken(String accessCode) throws IOException {\n OAuthApp app = new OAuthApp(asanaCredentials.getClientId(), asanaCredentials.getClientSecret(),\n asanaCredentials.getRedirectUri());\n Client.oauth(app);\n String accessToken = app.fetchToken(accessCode);\n\n //check if user input is valid by testing if accesscode given by user successfully authorises the application\n if (!(app.isAuthorized())) {\n throw new IllegalArgumentException();\n }\n\n return accessToken;\n }", "public String accessKey() {\n return this.accessKey;\n }", "private static String getCloudAuth(String accessToken) {\n\t\ttry {\n\t\t\tURL urlResource = new URL(\"https://myapi.pathomation.com/api/v1/authenticate\");\n\t\t\tURLConnection conn = urlResource.openConnection();\n\t\t\tconn.setRequestProperty( \"Authorization\", \"Bearer \" + accessToken);\n\t\t\tconn.setUseCaches( false );\n\t\t\treturn getResponseString(conn);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "public static Oauth2AccessToken readAccessToken() {\n Oauth2AccessToken token = new Oauth2AccessToken();\n SharedPrefWrapper sharedPref = SharedPrefWrapper.getInstance();\n\n token.setUid(sharedPref.getWeiboUID());\n token.setToken(sharedPref.getWeiboAccessToken());\n token.setExpiresTime(sharedPref.getWeiboExpiresTime());\n return token;\n }", "@Override\n public Object getCredentials() {\n return token;\n }", "public void retrieveAccessToken(Context context) {\n PBookAuth mPBookAuth = mApplicationPreferences.getPBookAuth();\n if (mPBookAuth == null || TextUtils.isEmpty(mPBookAuth.getClientName())) {\n view.onReturnAccessToken(null, false);\n return;\n }\n Ion.with(context).load(ACCESS_TOKEN_SERVICE_URL).setBodyParameter(\"client\", mPBookAuth.getClientName()).setBodyParameter(\"phoneNumber\", mPBookAuth.getPhoneNumber()).setBodyParameter(\"platform\", PLATFORM_KEY).asString().setCallback(new FutureCallback<String>() {\n @Override\n public void onCompleted(Exception e, String accessToken) {\n if (e == null || !TextUtils.isEmpty(accessToken)) {\n mApplicationPreferences.setTwilioToken(accessToken);\n view.onReturnAccessToken(accessToken, true);\n } else {\n view.onReturnAccessToken(accessToken, false);\n }\n }\n });\n }", "public TrueNTHAccessTokenExtractor<JsonObject> getAccessTokenExtractor() {\n\n\treturn new TrueNTHAccessTokenExtractorJSon();\n }", "private static String getAccessToken() throws IOException {\n\t\t \t\n\t\t GoogleCredential googleCredential = GoogleCredential\n\t .fromStream(new FileInputStream(path))\n\t .createScoped(Arrays.asList(SCOPES));\n\t\t \tgoogleCredential.refreshToken();\n\t\t \treturn googleCredential.getAccessToken();\n\t}", "private String getToken() {\n String keyFilePath = System.getenv(\"APE_API_KEY\");\n if (Strings.isNullOrEmpty(keyFilePath)) {\n File globalKeyFile = GlobalConfiguration.getInstance().getHostOptions().\n getServiceAccountJsonKeyFiles().get(GLOBAL_APE_API_KEY);\n if (globalKeyFile == null || !globalKeyFile.exists()) {\n CLog.d(\"Unable to fetch the service key because neither environment variable \" +\n \"APE_API_KEY is set nor the key file is dynamically downloaded.\");\n return null;\n }\n keyFilePath = globalKeyFile.getAbsolutePath();\n }\n if (Strings.isNullOrEmpty(mApiScope)) {\n CLog.d(\"API scope not set, use flag --business-logic-api-scope.\");\n return null;\n }\n try {\n Credential credential = GoogleCredential.fromStream(new FileInputStream(keyFilePath))\n .createScoped(Collections.singleton(mApiScope));\n credential.refreshToken();\n return credential.getAccessToken();\n } catch (FileNotFoundException e) {\n CLog.e(String.format(\"Service key file %s doesn't exist.\", keyFilePath));\n } catch (IOException e) {\n CLog.e(String.format(\"Can't read the service key file, %s\", keyFilePath));\n }\n return null;\n }", "OAuth2Token getToken();", "public interface OauthAccessToken {\n byte[] getAuthentication();\n\n String getTokenId();\n\n String getAuthenticationId();\n\n byte[] getToken();\n\n void setTokenId(String tokenId);\n\n void setToken(byte[] token);\n\n void setAuthenticationId(String authenticationId);\n\n void setUsername(String username);\n\n void setAuthentication(byte[] authentication);\n\n void setRefreshToken(String refreshToken);\n\n void setClientId(String clientId);\n}", "public String getAuthtoken() {\n return authtoken;\n }", "@Override\n public AbstractToken getAccessToken(String tokenCode) {\n\n String hashedTokenCode = TokenHashUtil.hash(tokenCode);\n\n final IdToken idToken = getIdToken();\n if (idToken != null) {\n if (idToken.getCode().equals(hashedTokenCode)) {\n return idToken;\n }\n }\n\n final AccessToken longLivedAccessToken = getLongLivedAccessToken();\n if (longLivedAccessToken != null) {\n if (longLivedAccessToken.getCode().equals(hashedTokenCode)) {\n return longLivedAccessToken;\n }\n }\n\n return accessTokens.get(hashedTokenCode);\n }", "@Override\n public AbstractToken getAccessToken(String tokenCode) {\n final IdToken idToken = getIdToken();\n if (idToken != null) {\n if (idToken.getCode().equals(tokenCode)) {\n return idToken;\n }\n }\n\n final AccessToken longLivedAccessToken = getLongLivedAccessToken();\n if (longLivedAccessToken != null) {\n if (longLivedAccessToken.getCode().equals(tokenCode)) {\n return longLivedAccessToken;\n }\n }\n\n return accessTokens.get(tokenCode);\n }", "public String getAccessCookie(final String authCode) throws IOException,\n\t\t\tJSONException {\n\t\tCredential credential = getUsercredential(authCode);\n\t\tString accessToken = credential.getAccessToken();\n\t\tSystem.out.println(accessToken);\n\t\treturn accessToken;\n\t}", "public String getExtendedAccessToken(String accessToken) throws AuthenticationException {\n\t \n\t AccessToken extendedAccessToken = null;\n\t try {\n\t extendedAccessToken = fbClient.obtainExtendedAccessToken(Constants.appId, Constants.appSecret, Constants.accessToken);\n\n//\t if (log.isDebugEnabled()) {\n//\t log.debug(MessageFormat.format(\"Got long lived session token {0} for token {1}\", extendedAccessToken, accessToken));\n//\t }\n\t \n\t } catch (FacebookException e) {\n\t if (e.getMessage().contains(\"Error validating access token\")) {\n\t throw new AuthenticationException(\"Error validating access token\");\n\t }\n\t \n\t throw new RuntimeException(\"Error exchanging short lived token for long lived token\", e);\n\t }\n\t return extendedAccessToken.getAccessToken();\n\t}", "private void retrieveAccessToken() {\n Log.d(TAG, \"at retreiveAccessToken\");\n String accessURL = TWILIO_ACCESS_TOKEN_SERVER_URL + \"&identity=\" + \"1234\" + \"a\";\n Log.d(TAG, \"accessURL \" + accessURL);\n Ion.with(this).load(accessURL).asString().setCallback(new FutureCallback<String>() {\n @Override\n public void onCompleted(Exception e, String accessToken) {\n if (e == null) {\n Log.d(TAG, \"Access token: \" + accessToken);\n MainActivity.this.accessToken = accessToken;\n registerForCallInvites();\n } else {\n Toast.makeText(MainActivity.this,\n \"Error retrieving access token. Unable to make calls\",\n Toast.LENGTH_LONG).show();\n Log.d(TAG, e.toString());\n }\n }\n });\n }", "AccessToken getOAuthAccessToken(String oauthVerifier) throws MoefouException;", "public String userToken() {\n return userToken;\n }", "String getAuthorizerRefreshToken(String appId);", "AccessToken getOAuthAccessToken(RequestToken requestToken, String oauthVerifier) throws MoefouException;", "public OAuthTokenResponse getToken() {\n return token;\n }", "void onGetTokenSuccess(AccessTokenData token);", "public static String getAccessToken(String theCode) throws IOException {\n\t\tString authURL = getAccessTokenURL(theCode);\n\t\tURL token = new URL(authURL);\n\t\tString result = HTTP.readHttpURL(token);\n\t\tString accessToken = null;\n\t\tInteger expires = null;\n\t\tString[] pairs = result.split(\"&\");\n\t\tfor (String pair : pairs) {\n\t\t\tString[] kv = pair.split(\"=\");\n\t\t\tif (kv.length != 2) {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"Unexpected response in Facebook.getAccessToken()\");\n\t\t\t\treturn (\"Unexpected response\");\n\t\t\t} else {\n\t\t\t\tif (kv[0].equals(\"access_token\")) {\n\t\t\t\t\taccessToken = kv[1];\n\t\t\t\t}\n\t\t\t\tif (kv[0].equals(\"expires\")) {\n\t\t\t\t\texpires = Integer.valueOf(kv[1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (accessToken != null && expires != null) {\n\t\t\tSystem.out.println(\"Access token:\" + accessToken);\n\t\t\tSystem.out.println(\"Expires:\" + expires);\n\t\t}\n\t\tSystem.out\n\t\t\t\t.println(\"Access token retreived by Facebook.getAccessToken():\"\n\t\t\t\t\t\t+ accessToken);\n\t\treturn accessToken;\n\t}", "public AccessToken getAccessToken(\n String clientId,\n String accessToken) throws InternalException {\n Client client = database.findClientById(clientId);\n if (client == null) {\n throw new ClientNotFoundException(clientId);\n }\n\n AccessToken token = database.findAccessTokenByClientIdAndToken(clientId, accessToken);\n if (token == null) {\n throw new AccessTokenNotFoundException(clientId, accessToken);\n }\n\n return token;\n }", "private static String getAppTokenId() {\n if (appTokenId == null) {\n synchronized (DefaultEntityManagerImpl.class) {\n if (appTokenId == null) {\n try {\n if (OAuthProperties.isServerMode()) {\n appTokenId = OAuthServiceUtils.getAdminTokenId();\n }\n else {\n final String username =\n OAuthProperties.get(PathDefs.APP_USER_NAME);\n final String password =\n OAuthProperties.get(PathDefs.APP_USER_PASSWORD);\n appTokenId =\n OAuthServiceUtils.authenticate(username, password, false);\n }\n }\n catch (final OAuthServiceException oe) {\n Logger.getLogger(DefaultEntityManagerImpl.class.getName()).log(\n Level.SEVERE, null, oe);\n throw new WebApplicationException(oe);\n }\n }\n }\n }\n return appTokenId;\n }", "@Override\n public List<AccessToken> getAccessTokens() {\n return new ArrayList<AccessToken>(accessTokens.values());\n }", "@Override\n public List<AccessToken> getAccessTokens() {\n return new ArrayList<AccessToken>(accessTokens.values());\n }", "public interface TokenProvider {\n /**\n * @return an always valid access token.\n */\n String getAccessToken();\n\n /**\n * Forces a refresh of all tokens.\n *\n * @return the newly refreshed access token.\n */\n String refreshTokens();\n}", "public String getAccessSecret () {\n\t\treturn this.accessSecret;\n\t}", "public String getClientToken() {\n return clientToken;\n }", "public String getClientToken() {\n return clientToken;\n }", "public static String getTeacherToken() {\n\n RestAssured.baseURI = \"https://cybertek-reservation-api-qa.herokuapp.com\";\n\n Response response = given().log().all().\n param(\"email\", \"[email protected]\").\n param(\"password\", \"maxpayne\").\n get(\"/sign\");\n response.then().log().all().\n assertThat().statusCode(200);\n\n return response.jsonPath().get(\"accessToken\");\n\n }", "@Override\n public void acceptVisitor(AuthServiceVisitor visitor) {\n visitor.visitAccessToken(this);\n }", "private CdekAuthToken getAuthToken()\n {\n String authEndpoint = conf.ENDPOINT + \"/oauth/token?grant_type={grant_type}&client_id={client_id}&client_secret={client_secret}\";\n\n HttpHeaders defaultHeaders = new HttpHeaders();\n HttpEntity req = new HttpEntity(defaultHeaders);\n\n return rest.postForObject(authEndpoint, req, CdekAuthToken.class, conf.getAuthData());\n }", "private String getAccessToken(String url) {\n int accessTokenIndex = url.indexOf(\"access_token\");\n\n // url would be like www.example.com/access_token=abcd&otherparameters\n int loopStartIndex = accessTokenIndex + \"access_token\".length() + 1;\n int andIndex = url.indexOf(\"&\");\n StringBuilder sb = new StringBuilder(\"\");\n for (int i = loopStartIndex; i < andIndex; i++) {\n sb.append(url.charAt(i));\n }\n return sb.toString();\n }", "private String getApiToken(final Account account) {\r\n return account.getStringProperty(PROPERTY_ACCOUNT_api_token);\r\n }", "public interface BearerAuthCredentials {\r\n\r\n /**\r\n * String value for accessToken.\r\n * @return accessToken\r\n */\r\n String getAccessToken();\r\n\r\n /**\r\n * Checks if provided credentials matched with existing ones.\r\n * @param accessToken String value for credentials.\r\n * @return true if credentials matched.\r\n */\r\n boolean equals(String accessToken);\r\n}", "void setAccessToken(String accessToken);", "public String getClientToken() {\n return this.clientToken;\n }", "public String getClientToken() {\n return this.clientToken;\n }", "public String getClientToken() {\n return this.clientToken;\n }", "public String getClientToken() {\n return this.clientToken;\n }", "interface GetAccessTokenCallback {\n /**\n * Invoked on the UI thread if a token is provided by the AccountManager.\n *\n * @param token Access token, guaranteed not to be null.\n */\n void onGetTokenSuccess(AccessTokenData token);\n\n /**\n * Invoked on the UI thread if no token is available.\n *\n * @param isTransientError Indicates if the error is transient (network timeout or\n * unavailable, etc) or persistent (bad credentials, permission denied, etc).\n */\n void onGetTokenFailure(boolean isTransientError);\n }", "public static String getAccessTokenSecret(Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\treturn prefs.getString(TWITTER_ACCESS_TOKEN_SECRET, null);\n\t\t}", "public java.lang.String getAccessToken(java.lang.String userName, java.lang.String password) throws java.rmi.RemoteException;", "private String getCredentials() {\n String credentials = \"\";\n AccountManager accountManager = AccountManager.get(getContext());\n\n final Account availableAccounts[] = accountManager.getAccountsByType(AccountGeneral.ACCOUNT_TYPE);\n\n //there should be only one ERT account\n if(availableAccounts.length > 0) {\n Account account = availableAccounts[0];\n AccountManagerFuture<Bundle> future = accountManager.getAuthToken(account, AccountGeneral.AUTHTOKEN_TYPE_FULL_ACCESS, null, null, null, null);\n try {\n Bundle bundle = future.getResult();\n String accountName = bundle.getString(AccountManager.KEY_ACCOUNT_NAME);\n String token = bundle.getString(AccountManager.KEY_AUTHTOKEN);\n credentials = accountName + \":\" + token;\n } catch (OperationCanceledException | IOException | AuthenticatorException e) {\n Log.e(LOG_TAG, e.getMessage());\n }\n }\n return credentials;\n }", "public String getAccessTokenEndpoint(final TrueNTHOAuthConfig config) {\n\n\treturn config.getAccessTokenEndpoint();\n }", "public TokenResponse(String accessToken) {\n this.accessToken = accessToken;\n }", "@Api(1.0)\n @NonNull\n public String getAuthorization() {\n return mTokenType + \" \" + mAccessToken;\n }", "public String getGCalendarAccessToken( String gcalid, String emailID) {\n\t\t\n\t\tGoogleCredential credential = getGoogleCredential(emailID);\n\t\tif (credential == null) {\n\t\t\treturn null; // user not authorized\n\t\t}\n\t\telse{\n\t\t\treturn credential.getAccessToken();\n\t\t}\n\t}", "public String getToken(String name){\n\n return credentials.get(name, token);\n }", "public Configuration.Builder getAccessTokenBuilder() {\n String accessToken = getString(R.string.access_token);\n return new Configuration.Builder(accessToken);\n }", "java.lang.String getAuth();", "java.lang.String getAuth();", "java.lang.String getAuth();", "boolean equals(String accessToken);", "public static void setAccessToken(String accessToken) {\n }", "public String getUserToken() {\n if (userinfo == null)\n return null;\n return userinfo.token;\n }", "public String getApiToken() {\n return apiToken;\n }", "GetToken.Res getGetTokenRes();", "@GetMapping(\"/getaccesstoken1\")\n public Map<String, Object> getAccessToken1(){\n Map<String, Object> mapResponse=new HashMap<String, Object>();\n String accessToken=transAccessService.getAccessToken();\n mapResponse.put(\"key\", \"200\");\n mapResponse.put(\"status\", \"success\");\n mapResponse.put(\"access_token\", accessToken);\n return mapResponse;\n }" ]
[ "0.82807887", "0.8259645", "0.8256304", "0.82460165", "0.82460165", "0.8225857", "0.813776", "0.8075986", "0.8075986", "0.8053668", "0.7964199", "0.7926748", "0.7876816", "0.78689647", "0.78649616", "0.760743", "0.7517249", "0.7500676", "0.74170417", "0.73399603", "0.73354137", "0.7266555", "0.7256089", "0.7231104", "0.7184209", "0.7024222", "0.697968", "0.69601864", "0.69229364", "0.68722516", "0.68342006", "0.67742974", "0.67653817", "0.67448664", "0.67058784", "0.6658652", "0.66529745", "0.6644588", "0.658815", "0.6534792", "0.6491441", "0.6467214", "0.6446529", "0.64299446", "0.64243954", "0.6308928", "0.62975305", "0.6290201", "0.627623", "0.6270874", "0.6232258", "0.62180823", "0.6190663", "0.6189268", "0.6143544", "0.6143005", "0.61290663", "0.6125072", "0.61103696", "0.61097574", "0.61069053", "0.60884184", "0.6067536", "0.60538775", "0.6049793", "0.6049793", "0.60496134", "0.6047604", "0.6035541", "0.6035541", "0.6025967", "0.59906185", "0.5985059", "0.5983795", "0.5982483", "0.5978254", "0.59758", "0.5974196", "0.5974196", "0.5974196", "0.5974196", "0.59372854", "0.59362686", "0.5930349", "0.59267133", "0.5920997", "0.59080845", "0.59001386", "0.58994013", "0.5893129", "0.5889709", "0.58815044", "0.58815044", "0.58815044", "0.5873414", "0.5859923", "0.5856296", "0.5853497", "0.5850526", "0.58490014" ]
0.813606
7
Returns an instance of the Spotify Service
public SpotifyService getSpotifyService(){ //Creates and configures a REST adapter for Spotify Web API. SpotifyApi wrapper = new SpotifyApi(); if(!getAccessToken().equals("") && getAccessToken()!=null) { wrapper.setAccessToken(getAccessToken()); }else{ Log.d("SpotifyNewRelease","Invalid Access Token"); } SpotifyService spotifyService = wrapper.getService(); return spotifyService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface SpotService {\n\n String haveSpot(String spotName);\n\n JSONObject spotByName(String spotName);\n\n JSONObject spotById(Long id);\n\n JSONObject getSpotComment(Long id, int pageNum, int size);\n\n List<Spot> getAllSpot();\n\n void saveComment(SpotComment comment, HttpServletRequest request);\n\n JSONObject selectSpotByPage(int page, int rows, Spot spot);\n\n void update(Spot spot);\n\n void delSpot(Long[] ids);\n\n void addSpot(Spot spot);\n\n String uploadIndexImg(MultipartFile file, HttpServletRequest request) throws IOException;\n}", "public static ServiceListingList getInstance() {\n if (instance == null) {\n instance = new ServiceListingList();\n }\n return instance;\n }", "public PlaylistBusinessInterface getService() {\n\t\treturn service;\n\t}", "public static Service newInstance() {\n return newInstance(DEFAULT_PROVIDER_NAME);\n }", "public static ServiceProvider createServiceProvider() {\n \t//return new ActiveMQProvider();\n \treturn new RSPServiceProvider();\n }", "public static ShoppingCartService createShoppingCartService() {\n\t\treturn null;\r\n\t}", "public static IInventoryService getInstance() {\n if(mInstance == null) {\n mInstance = new InventoryService<>(IInventoryApiService.class);\n }\n \n return mInstance;\n }", "public static WPVService createInstance() {\n if ( CONFIG != null )\n return new WPVService( CONFIG );\n return null;\n }", "public static final RadiusServiceStarter getInstance() {\n return starter;\n }", "public ProviderService() {\r\n super(TAG, SASOCKET_CLASS);\r\n }", "public static LocationServices getInstance() {\n\t\tif (instance == null) {\t\n\t\t\tinstance = new LocationServices();\n\t\t}\n\t\treturn instance;\n\t}", "private SparkeyServiceSingleton(){}", "public ParkingSpot createSpot() {\n ParkingSpot spot = new ParkingSpot();\n spot.setTime(time);\n spot.setId(id);\n spot.setLongitude(longitude);\n spot.setLatitude(latitude);\n spot.setAccuracy(accuracy);\n return spot;\n }", "public static RetrofitClient getInstance() {\n return OUR_INSTANCE;\n }", "public static ProductsService getInstance() {\n\t\treturn productsService;\n\t}", "public static IMoFluS getService(){\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(MOFLUS_API_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n return retrofit.create(IMoFluS.class);\n }", "public static WPVService getInstance( WPVSConfiguration config ) {\n return new WPVService( config );\n }", "public AddFavouriteService() {\n super(\"AddFavouriteService\");\n }", "Sticker.Factory getStickerFactory();", "public AudioService(Context context) {\n this.sharedPreferences = context.getSharedPreferences(\"SPOTIFY\", 0);\n queue = Volley.newRequestQueue(context);\n }", "public static Retrofit serviceNowApi() {\n return new Retrofit.Builder()\n .baseUrl(BuildConfig.BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n }", "public static ServerServiceAsync getService() {\n\n return GWT.create(ServerService.class);\n }", "LocService getService() {\n return LocService.this;\n }", "public static Service getInstance()\n\t{\n\t\tif (serviceInstance == null)\n\t\t{\n\t\t\tserviceInstance = new Service(LocalDao.getInstance());\n\t\t}\n\t\treturn serviceInstance;\n\t}", "public final StarService invoke() {\n return (StarService) Net.createService(StarService.class);\n }", "public static LocalVpnService getInstance() {\n\n return instance;\n }", "public LocationService getService()\n {\n return LocationService.this;\n }", "@NotNull\n public static UsageTracker getInstance() {\n return ServiceManager.getService(UsageTracker.class);\n }", "SipInstanceManager getSipInstanceManager();", "public static RadioPlayerService getRadioPlayerService() {\n\n if (radioPlayerService == null) {\n radioPlayerService = new RadioPlayerService();\n }\n\n return radioPlayerService;\n\n }", "public SunshineService(String name) {\n super(\"SunshineService\");\n\n }", "public MusicServiceImpl(){}", "@Override\n\tprotected String getServiceName() {\n\t\treturn \"tv.matchstick.fling.service.FLING\";\n\t}", "public static ApiService getApiService()\n {\n return getRetrofit().create(ApiService.class);\n }", "public interface SoundcloudService {\n\n static final String CLIENT_ID=\"87012262b10d7bbb14bc0f1251523f82\";\n\n @GET(\"/tracks?client_id=\"+CLIENT_ID)\n public void searchSongs(@Query(\"q\") String query, Callback<List<Track>> cb);\n\n @GET(\"/tracks?client_id=\"+CLIENT_ID)\n public void mostRecentSongs(@Query(\"created_at[from]\") String dateFrom, Callback<List<Track>> cb);\n}", "public static IMarryService getInstance(ApplicationContext context) {\r\n\t\treturn (IMarryService) context.getBean(SERVICE_BEAN_ID);\r\n\t}", "public interface Provider {\n Service newService();\n }", "public static ServiceFactory getInstance(){\n\t\tif(instance == null)\n\t\t\tinstance = new ServiceFactory();\n\t\treturn instance;\n\t}", "public MediaPlayerService getService() {\n return MediaPlayerService.this;\n }", "private static synchronized ParticipantService getParticipantService()\n {\n if (participantService.get() == null) {\n participantService.set(new ParticipantService());\n }\n return participantService.get();\n }", "public static MusicPlayer getInstance()\n {\n return INSTANCE;\n }", "public CastRemote(){\n final Retrofit retrofit = new Retrofit.Builder()\n .addConverterFactory(GsonConverterFactory.create())\n .addCallAdapterFactory(RxJava2CallAdapterFactory.create())\n .baseUrl(Constants.BASE_URL)\n .client(createClient())\n .build();\n service = retrofit.create(CastService.class);\n }", "<P> LabyModPlayerService<P> getLabyPlayerService();", "public static QueryService getInstance() {\n\t \t// Use the service loader to load an implementation if one is available\n\t \t// Place a file called uk.ac.ox.it.ords.api.structure.service.CommentService in src/main/resources/META-INF/services\n\t \t// containing the classname to load as the CommentService implementation. \n\t \t// By default we load the Hibernate/Postgresql implementation.\n\t \t//\n\t \tif (provider == null){\n\t \t\tServiceLoader<QueryService> ldr = ServiceLoader.load(QueryService.class);\n\t \t\tfor (QueryService service : ldr) {\n\t \t\t\t// We are only expecting one\n\t \t\t\tprovider = service;\n\t \t\t}\n\t \t}\n\t \t//\n\t \t// If no service provider is found, use the default\n\t \t//\n\t \tif (provider == null){\n\t \t\tprovider = new QueryServiceImpl();\n\t \t}\n\t \t\n\t \treturn provider;\n\t }", "public static ServiceLocatorFactory getInstance() {\n return INSTANCE;\n }", "MediaService getService() {\n return MediaService.this;\n }", "public interface MusicService {\n Music getMusicById(Integer id);\n}", "public static SlavesHolder getInstance() {\n if (instance == null) {\n instance = new SlavesHolder();\n }\n return instance;\n }", "public static RssFeedServiceImpl getInstance()\n {\n if (single_instance == null)\n single_instance = new RssFeedServiceImpl();\n \n return single_instance;\n }", "public Service getService() {\n return serviceInstance;\n }", "public StockWidgetIntentService() {\n super(\"StockWidgetIntentService\");\n }", "SearchPlacesService getService() {\n return SearchPlacesService.this;\n }", "public static Stocks getInstance() {\r\n if (instance == null) {\r\n instance = new Stocks();\r\n }\r\n\r\n return instance;\r\n }", "private Service getService() {\n return service;\n }", "public RiftsawServiceLocator() {\n }", "private YouTube getService() throws GeneralSecurityException, IOException {\n final NetHttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport();\n return new YouTube.Builder(httpTransport, JSON_FACTORY, null)\n .setApplicationName(APPLICATION_NAME)\n .build();\n }", "Fog_Services createFog_Services();", "public TTSService getService() {\n return TTSService.this;\n }", "public static SignUpService getInstance() {\n\t\treturn singleton;\n\t}", "public static BaseApiService getAPIService(){\n return RetrofitClient.getClient(BASE_URL_HOSTING).create(BaseApiService.class);\n }", "public static MakeServiceProvidingRequestController getInstance() {\n return new MakeServiceProvidingRequestController();\n }", "public static PsmlManagerService getService() {\n return (PsmlManagerService) TurbineServices.getInstance().getService(\n PsmlManagerService.SERVICE_NAME);\n }", "public WeatherService() {\n super(\"WeatherService\");\n }", "TestpressService getService() {\n if (CommonUtils.isUserAuthenticated(activity)) {\n try {\n testpressService = serviceProvider.getService(activity);\n } catch (IOException | AccountsException e) {\n e.printStackTrace();\n }\n }\n return testpressService;\n }", "public interface PaTaskItemPointViewService extends Service<PaTaskItemPointView> {\n\n}", "public interface SoundCloudService {\r\n\r\n String CLIENT_ID = \"5f016c08c2201881c4217afd5f52e065\";\r\n String SOUND_ClOUD_API = \"http://api.soundcloud.com/\";\r\n\r\n @GET(\"resolve.json\")\r\n Observable<Track> getTrackInfo(@Query(\"url\") String url, @Query(\"client_id\") String clientId);\r\n\r\n\r\n @GET(\"resolve.json\")\r\n Observable<Playlist> getPlaylistInfo(@Query(\"url\") String url, @Query(\"client_id\") String clientId);\r\n\r\n\r\n @GET(\"i1/tracks/{id}/streams\")\r\n Observable<DownloadLink> getLink(@Path(\"id\") String trackId, @Query(\"client_id\") String clientId);\r\n\r\n}", "public LocationService() {\r\n\t\tSettings settings = Settings.getInstance();\r\n\t\tthis.location = settings.getLocation();\r\n\t\tthis.ebAddress = settings.getEbAddress();\r\n\t\tthis.ebPort = settings.getEbPort();\r\n\t\tloggedIn = false;\r\n\t\tobservers = new ArrayList<IObserver>();\r\n\t\tdbAdapter = InformationStorageFactory.getStorageAdapter();\r\n\t}", "public interface FlickrService {\n\n @GET(Constants.FLICKR_API_GET_RECENT)\n Observable<PhotosResponse> getRecentPhotos(\n @Query(\"per_page\") int perPage,\n @Query(\"page\") int page\n );\n\n @GET(Constants.FLICKR_API_SEARCH_TEXT)\n Observable<PhotosResponse> getPhotosByText(\n @Query(\"per_page\") int perPage,\n @Query(\"page\") int page,\n @Query(\"text\") String text\n );\n\n @GET(Constants.FLICKR_API_GET_INFO )\n Observable<PhotoInfoResponse> getPhotoInfo(\n @Query(\"photo_id\") String photoId\n );\n\n @GET(Constants.FLICKR_API_GET_COMMENTS )\n Observable<CommentsResponse> getPhotoComments(\n @Query(\"photo_id\") String photoId\n );\n\n\n class Creator {\n\n public static FlickrService newFlickrService() {\n Retrofit retrofit = new Retrofit.Builder()\n .addCallAdapterFactory(RxJavaCallAdapterFactory.create())\n .addConverterFactory(GsonConverterFactory.create())\n .baseUrl(Constants.FLICKR_API)\n .build();\n return retrofit.create(FlickrService.class);\n }\n }\n}", "public Object getService() {\n return service;\n }", "public GameService getGameService() {\n return gameService;\n }", "public GameService getGameService() {\n return gameService;\n }", "PubService getService() {\n return PubService.this;\n }", "public static ESPProvisionManager getInstance(Context context) {\n\n if (provision == null) {\n provision = new ESPProvisionManager(context);\n }\n return provision;\n }", "public go.micro.runtime.RuntimeOuterClass.Service getService() {\n return service_ == null ? go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance() : service_;\n }", "public go.micro.runtime.RuntimeOuterClass.Service getService() {\n return service_ == null ? go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance() : service_;\n }", "public go.micro.runtime.RuntimeOuterClass.Service getService() {\n return service_ == null ? go.micro.runtime.RuntimeOuterClass.Service.getDefaultInstance() : service_;\n }", "public static ShopManager getInstance(Context context) {\n mContext = context;\n if (instance == null) {\n synchronized (ShopManager.class) {\n if (instance == null) {\n instance = new ShopManager();\n }\n }\n }\n return instance;\n }", "public static ServiceLocator instance() {\n\t\tif(instance == null){\n\t\t\tinstance = new ServiceLocator();\n\t\t\tinstance.initializeCache();\n\n\t\t\tinstance.initializeCache();\n\t\t\tinstance.loadFileApplication(RESOURCE_BUNDLE_DEVELOPMENT);\n\t\t\t//instance.loadFileApplication(RESOURCE_BUNDLE_CHEMIN);\t\t\t\n\t\t}\n\n\t\treturn instance;\t\n\t}", "@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation1();\n\t\t}", "public LocationService(String name) {\n super(name);\n }", "public static FacadeCommandOfService getInstance(){\n if(facadeCommandOfService == null){\n facadeCommandOfService = new FacadeCommandOfService();\n }\n return facadeCommandOfService;\n }", "MyService getService() {\n return MyService.this;\n }", "public static IStrengthenService getInstance(ApplicationContext context) {\r\n\t\treturn (IStrengthenService) context.getBean(SERVICE_BEAN_ID);\r\n\t}", "private LocationService() {\n }", "public interface SearchClientService {\r\n\t/**\r\n\t * Get Search engine client\r\n\t * \r\n\t * @return\r\n\t */\r\n\tClient getClient();\r\n\r\n\tvoid setup();\r\n\r\n\tvoid shutdown();\r\n}", "@Service\npublic interface MusicService {\n public List<Music> getMusicList();\n}", "public IServerService getService() {\n return ServerService.this;\n }", "private SearchServiceFactory() {}", "private void setupApiService(){\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(InstagramAppData.BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n instaGramService = retrofit.create(InstaGramService.class);\n }", "public static PredictionServiceConnector createForLocalService() {\n return new PredictionServiceConnector(Environment.getPredictionURL(), Environment.getPredictionPort());\n }", "public SsoService ssoService() {\n\t\treturn ssoService;\n\t}", "private static VbxService getApiInstance() {\n HttpLoggingInterceptor logger = new HttpLoggingInterceptor();\n logger.setLevel(HttpLoggingInterceptor.Level.BODY);\n\n Interceptor setAcceptType = new Interceptor() {\n @Override\n public Response intercept(Chain chain) throws IOException {\n Request request = chain.request();\n Request typedRequest = request\n .newBuilder()\n .header(\"Accept\", \"application/json\")\n .build();\n return chain.proceed(typedRequest);\n }\n };\n\n Interceptor setAuthorization = new Interceptor() {\n @Override\n public Response intercept(Chain chain) throws IOException {\n Request request = chain.request();\n if(email != null && password != null) {\n String auth = Base64.encodeToString((email + \":\" + password).getBytes(), Base64.NO_WRAP);\n Request typedRequest = request\n .newBuilder()\n .header(\"Authorization\", String.format(\"Basic %s\", auth))\n .build();\n return chain.proceed(typedRequest);\n }\n return chain.proceed(request);\n }\n };\n\n OkHttpClient apiClient = new OkHttpClient.Builder()\n .addInterceptor(logger)\n .addInterceptor(setAcceptType)\n .addInterceptor(setAuthorization)\n .build();\n\n return new Retrofit.Builder()\n .baseUrl(endpoint)\n .client(apiClient)\n .addCallAdapterFactory(RxJavaCallAdapterFactory.create())\n .addConverterFactory(GsonConverterFactory.create())\n .build()\n .create(VbxService.class);\n }", "public static Retrofit getInstance() {\n if (instance==null)\n instance = new Retrofit.Builder()\n //.baseUrl(\"http://10.0.2.2:3000\")\n .baseUrl(url)\n .addConverterFactory(ScalarsConverterFactory.create())\n .addCallAdapterFactory(RxJava2CallAdapterFactory.create())\n .build();\n return instance;\n }", "public static BaseApiService getAPIService(){\n return RetrofitClient.getClient(BASE_URL_API).create(BaseApiService.class);\n }", "Service newService();", "public static <S> S createService(Context context, Class<S> serviceClass) {\n return ApiClient.getClient(RemoteConfiguration.BASE_URL).create(serviceClass);\n }", "public NotificationService() {\n super(\"NotificationService\");\n }", "public IGamePadAIDL create() {\n if (HwGameAssistGamePad.mService == null) {\n HwGameAssistGamePad.bindService();\n }\n return HwGameAssistGamePad.mService;\n }", "public interface Service {\n\n /**\n * Create a new Service\n *\n * @param hostIp database IP address\n * @param user database user name\n * @param password database password\n * @return a Service using the given credentials\n */\n static Service create(String hostIp, String user, String password) {\n return new ServiceImpl(hostIp, user, password);\n }\n\n\n /**\n * Retrieve historical data points for a given symbol.\n *\n * @param symbol Symbol we want history data for.\n * @param startTime Start time (inclusive)\n * @param endTime End time (inclusive)\n * @param numberOfPoints Approximate number of points to be returned\n * @return The stream of filtered data points of the given symbol and time interval\n */\n Stream<DataPoint> getHistoryData(Symbol symbol, LocalDateTime startTime, LocalDateTime endTime, int numberOfPoints);\n\n /**\n * @param symbol the symbol for which to get data\n * @return the most recent data point for the given symbol\n */\n Optional<DataPoint> getMostRecentDataPoint(Symbol symbol);\n\n /**\n * @return the stream of all symbols of the database\n */\n Stream<Symbol> getSymbols();\n\n /**\n * Select whether to use Speedment in memory acceleration when looking up data\n *\n * @param accelerate true for using Speedment in memory acceleration, false for direct SQL\n */\n Service withAcceleration(boolean accelerate);\n}", "ServiceProducer getServiceProvider(int id);" ]
[ "0.6127212", "0.598006", "0.5864511", "0.5858549", "0.5816003", "0.58039004", "0.58031386", "0.57682437", "0.57060474", "0.5696592", "0.56703764", "0.5660941", "0.5598903", "0.5586581", "0.55147123", "0.548542", "0.5453659", "0.54260963", "0.54250354", "0.54037577", "0.5400479", "0.53831506", "0.5331624", "0.53306115", "0.5326794", "0.5317772", "0.53127474", "0.5300779", "0.52848244", "0.527768", "0.5263964", "0.5240047", "0.52164376", "0.5215246", "0.52115977", "0.52096254", "0.5194891", "0.51927227", "0.51843184", "0.5182073", "0.51714426", "0.51703256", "0.516957", "0.5168471", "0.5144211", "0.51432157", "0.51422226", "0.5139814", "0.5137625", "0.5131672", "0.51242465", "0.5121466", "0.51212054", "0.51187193", "0.511502", "0.51102084", "0.51077574", "0.50827485", "0.50766474", "0.50765157", "0.50729537", "0.5071068", "0.5057685", "0.505078", "0.505005", "0.5041577", "0.50252295", "0.5018374", "0.5013101", "0.50103784", "0.50103784", "0.50084955", "0.5007855", "0.5004731", "0.5004731", "0.5004731", "0.50003505", "0.49828845", "0.49745217", "0.49660984", "0.49643525", "0.4959325", "0.49573305", "0.49512246", "0.49457014", "0.4944764", "0.49442822", "0.49360266", "0.4935839", "0.49279356", "0.4925398", "0.49201244", "0.49179983", "0.49136275", "0.4913371", "0.49111032", "0.4911057", "0.49056387", "0.49054423", "0.49039778" ]
0.8389045
0
Returns a specific Spotify Album Instance by Id
public Album getSpotifyAlbumById(String albumId){ SpotifyService spotifyService = getSpotifyService(); Album spotifyAlbum = spotifyService.getAlbum(albumId); return spotifyAlbum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "AlbumDTO findOne(Long id);", "@GET @Path(\"/id/{id}\")\n public Album findById(@PathParam(\"id\") String id) {\n return null;\n }", "SportAlbumPicture selectByPrimaryKey(String id);", "Artist getById(long id);", "@Override\n\tpublic Vn getSong(int id) {\n\t\treturn songDao.getSong(id);\n\t}", "@Override\n\tpublic Album findAlbumById(Long idAlbum) {\n\t\treturn _albumDao.findAlbumById(idAlbum);\n\t}", "public Album setId(String id) {\r\n this.id = id;\r\n return this;\r\n }", "@Override\n public Song getSong(long id) {\n Song s = null;\n try {\n s = em.createQuery(\"SELECT s FROM Song s WHERE s.id = :id\", Song.class)\n .setParameter(\"id\", id)\n .getSingleResult();\n } catch (NoResultException e) {\n\n }\n return s;\n }", "public Album loadAlbumNoSongs(int id) {\n\t\tAlbum album = null;\n\t\ttry {\n\t\t\tString sql = \"SELECT * FROM Album WHERE ID = ?;\";\n\t\t\tPreparedStatement statement = connection.prepareStatement(sql);\n\t\t\tstatement.setInt(1, id);\n\t\t\tResultSet set = statement.executeQuery();\n\t\t\tif (set.next()){\n\t\t\t\talbum = readAlbum(set);\n\t\t\t}\n\t\t\tstatement.close();\n\t\t\t//connection.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn album;\n\t}", "public Song getSingleSong(Long id) {\n\t\treturn this.songRepo.findById(id).orElse(null); //id is an optional(a boolean) (return everything or nothing)\n\t}", "@GET\n @Path(\"{photoAlbumId: \\\\d+}\")\n public PhotoAlbumDetailDTO getPhotoAlbum(@PathParam(\"photoAlbumId\") Long photoAlbumId) {\n PhotoAlbumEntity entity = photoAlbumLogic.getPhotoAlbum(photoAlbumId);\n if (entity.getBicycle() != null && !bicyclesId.equals(entity.getBicycle().getId())) {\n throw new WebApplicationException(404);\n }\n return new PhotoAlbumDetailDTO(entity);\n }", "public Song findSong(Long id) {\n\t\tOptional<Song> optionalSong = lookifyRepository.findById(id);\n\t\tif (optionalSong.isPresent()) {\n\t\t\treturn optionalSong.get();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "@GetMapping(\"images/album/{idOrTitle}\")\n\tprivate PhotosetEntity getAlbum(@PathVariable String idOrTitle) {\n\t\tList<PhotosetEntity> list = new ArrayList<PhotosetEntity>();\n\t\tPhotosetEntity photoset = null;\n\t\t\n\t\tlog.info(\"Request to retrieve photos from photoset...\");\n\t\t\n\t\t// Authorize edel-read or do not retrieve anything\n\t\tif (util.authEdelRead() != null) {\n\t\t\t\n\t\t\tphotoset = service.getPhotosetByIdOrTitle(idOrTitle);\n\t\t\t\n\t\t\t// If photoset is not null, set the list of PhotoEntity\n\t\t\tif (photoset != null) {\n\t\t\t\tphotoset.setPhotos(service.getPhotosFromPhotoset(photoset));\n\t\t\t\tlist.add(photoset);\n\t\t\t\tlog.info(\"Request completed with photoset.\");\n\t\t\t} else {\n\t\t\t\tlog.warn(\"Request completed with no photoset.\");\n\t\t\t}\n\t\t} else {\n\t\t\tlog.warn(\"Request completed with failed Authorization.\");\n\t\t}\n\t\t\n\t\treturn photoset;\n\t}", "public MusicData load(Long id) throws MusicAppException;", "List<AlbumImage> selectByAlbum(Integer albumId);", "Club getOne(Integer idClub);", "@GetMapping(\"/{id}\")\n\tpublic Song getById(@PathVariable(\"id\") int id) {\n\t\tSystem.out.println(\"Searching by id: \" + id);\n\t\tSong song = songService.findById(id);\n\t\tif (song == null) {\n\t\t\tSystem.out.println(\"ID song: \" + id + \" not found\");\n\t\t}\n\t\treturn song;\n\t}", "public SCSong getSong(String id) {\n\t\t\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\n//\t\tCursor cursor = db.query(SONG_TABLE_NAME, new String[] { SONG_KEY_ID, SONG_KEY_TITLE, SONG_KEY_ARTIST, SONG_KEY_ARTWORK_URL, SONG_KEY_DURATION, SONG_KEY_GERNE, SONG_KEY_STREAM_URL, SONG_KEY_TAG },\n//\t\t\t\tSONG_KEY_ID + \"=?\", new String[] { id}, null, null,\n//\t\t\t\tnull, null);\n\t\t\n\t\tString query = \"SELECT * FROM \" + SONG_TABLE_NAME + \" WHERE \" + SONG_KEY_ID + \"=\" + id;\n\t\tCursor cursor = db.rawQuery(query, new String[]{});\n\t\tif (cursor == null || cursor.getCount() == 0){\n\t\t\tdb.close();\n\t\t\treturn null;\n\t\t}\n\t\tif (cursor != null) {\n\t\t\tcursor.moveToFirst();\n\t\t}\n\t\tSCSong onlineSong = new SCSong(\n\t\t\t\tcursor.getString(cursor.getColumnIndex(SONG_KEY_ID)),\n\t\t\t\tcursor.getString(cursor.getColumnIndex(SONG_KEY_TITLE)),\n\t\t\t\t\"\",\n\t\t\t\t\"soundcloud.com\",\n\t\t\t\tcursor.getString(cursor.getColumnIndex(SONG_KEY_STREAM_URL)),\n\t\t\t\tLong.parseLong(cursor.getString(cursor.getColumnIndex(SONG_KEY_DURATION))));\n\t\t\n\t\tonlineSong.setGenre(cursor.getString(cursor.getColumnIndex(SONG_KEY_GERNE)));\n\t\tonlineSong.setTagList(cursor.getString(cursor.getColumnIndex(SONG_KEY_TAG)));\n\t\tonlineSong.setUserId(cursor.getString(cursor.getColumnIndex(SONG_KEY_ARTIST)));\n\t\t\n\t\tcursor.close();\n\t\tdb.close();\n\t\treturn onlineSong;\n\t}", "@GetMapping(\"/{id}\")\n\tpublic Song getPlaylist(@PathVariable(\"id\") long id){\n\t\treturn musicAppRepository.getOne(id);\n\t}", "public AlbumSet getAlbumsByArtist(String artistId) {\n\t\t//http://emby:8096/Items?SortBy=SortName&SortOrder=Ascending&IncludeItemTypes=MusicAlbum&Recursive=true&ArtistIds=3c328d23e110ee9d4fbe6b1302635e32\n\t\tAlbumSetQueryParams queryParams = new AlbumSetQueryParams(artistId);\n\t\tURI targetUrl= buildUriWithQueryParams(\"/\"+ EmbyUrlConstants.ITEMS, queryParams);\n\t\treturn restTemplate.getForObject(targetUrl, AlbumSet.class);\n\t}", "@Override\n\tpublic AtiPhoto findById(String id) {\n\t\treturn atiPhotoDao.findOne(id);\n\t}", "@Override\r\n\tpublic Album getMyImage(int id) throws SQLException {\n\t\treturn dao.getMyImage(id);\r\n\t}", "private static String getAlbum(String songID) throws SQLException {\n albumStatement = conn.createStatement();\n albumResultSet = albumStatement.executeQuery(\"SELECT * FROM album, trackAlbum WHERE trackAlbum.track_id = '\" + songID + \"' AND trackAlbum.album_id = album.id;\");\n albumResultSet.next();\n return albumResultSet.getString(\"name\");\n }", "@GET(\"/v1/albums/{albumId}\")\r\n void getAlbum( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n @Path(\"albumId\") String albumId, //\r\n Callback<AlbumData> callBack);", "@Override\r\n public Asset findOne(Long id) {\n return assetDao.findById(id);\r\n }", "public abstract MediaItem getMediaItem(String id);", "public Song find_song_by_id(int song_id) {\n\t\treturn lp.find_song_by_id(song_id);\n\t}", "Averia findAveriaById(Long id) throws BusinessException;", "@Transactional(propagation=Propagation.SUPPORTS,readOnly=true)\r\n\tpublic Music querySongById(Integer id) {\n\t\tMusic music = musicdao.selectSong(id);\r\n\t\treturn music;\r\n\t}", "@Test\n public void albumsIdPhotosGetTest() {\n Integer id = null;\n List<Photo> response = api.albumsIdPhotosGet(id);\n\n // TODO: test validations\n }", "Instance getInstance(String id);", "public BasicInfoSong(int id, String title) {\n this.id = id;\n this.title = title;\n }", "@Override\n\tpublic Album findAlbumByName(String name) {\n\t\treturn _albumDao.findAlbumByName(name);\n\t}", "public Film getFilmById(Integer id);", "public PodcastEntity getPodcastById(Long id);", "@GetMapping(\"/favourite-songs/{id}\")\n @Timed\n public ResponseEntity<FavouriteSong> getFavouriteSong(@PathVariable Long id) {\n log.debug(\"REST request to get FavouriteSong : {}\", id);\n FavouriteSong favouriteSong = favouriteSongRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(favouriteSong));\n }", "@RequestMapping(value = \"/get/{id}\", method = RequestMethod.GET)\n public Song getSongById(@PathVariable(\"id\") long id) {\n String message = messageSource.getMessage(\"song.get.id\", null,\"locale not found\", Locale.getDefault());\n logger.info(message);\n return songService.findById(id);\n }", "@Override\n public Optional<Track> getTrackById(int id) throws TrackNotFoundException{\n if(trackRepository.existsById(id)) {\n Optional<Track> getTrack = trackRepository.findById(id);\n return getTrack;\n }\n else\n {\n throw new TrackNotFoundException(\"Track not present\");\n }\n\n }", "Item findById(String id);", "public Library(String name, int id) {\n super(name); // invoking superclass constructor\n this.ID = id;\n this.albums = new HashSet<Album>();\n }", "@Override\n\tpublic List<Album> findAlbumsByIdSinger(Long idSinger) {\n\t\treturn _albumDao.findAlbumsByIdSinger(idSinger);\n\t}", "CatalogItem getItembyId(final Long id);", "public BankThing retrieve(String id);", "List<Album> getAlbumFromArtiste(Integer artisteId, Integer userId);", "private static String existingAlbumArt(Context context, long albumId) {\n\n if (albumId != -1) {\n\n Cursor albumArtCursor = context.getContentResolver().query(MediaStore.Audio.Albums.EXTERNAL_CONTENT_URI,\n new String[]{MediaStore.Audio.Albums.ALBUM_ART},\n MediaStore.Audio.Albums._ID + \"=?\", new String[]{String.valueOf(albumId)}, null);\n\n if (albumArtCursor != null) {\n if (albumArtCursor.moveToFirst()) {\n String existingArtLocation = albumArtCursor\n .getString(albumArtCursor.getColumnIndexOrThrow(MediaStore.Audio.Albums.ALBUM_ART));\n\n albumArtCursor.close();\n return existingArtLocation;\n }\n albumArtCursor.close();\n }\n }\n return null;\n }", "List<Album> getAlbumsByUserId(Integer userId);", "public Song searchById(String id) {\n Song selectedSong = null;\n\n for (int index = 0; index < this.songs.size(); index++) {\n if (this.songs.get(index).getId().equals(id)) {\n this.currentSongIndex = index;\n selectedSong = this.songs.get(index);\n }\n }\n\n return selectedSong;\n }", "Bird findById(String id);", "public static Photo getPhoto(String id) {\n ParseQuery<Photo> query = ParseQuery.getQuery(TAG);\n try {\n return query.get(id);\n }\n catch(ParseException e) {\n Log.d(TAG, \"Failed grabbing the Photo: \" + e);\n return null;\n }\n }", "@Override\n\tpublic Image findById(Long id) {\n\t\treturn imageRepository.findById(id).get();\n\t}", "private Album getAlbumByName(String albumName) {\r\n for (Album a : this.albums) {\r\n if (a.getName() == albumName) {\r\n return a;\r\n }\r\n }\r\n return null;\r\n }", "SysPic selectByPrimaryKey(Integer id);", "@Test\n public void testGetSong() {\n\n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), new HashMap<String,Rights>());\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), new HashMap<String,Rights>());\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n String songId = \"2\";\n\n Song result = library.getSong(songId);\n assertTrue(result.getTitle().equals(\"titre2\"));\n assertTrue(result.getAlbum().equals(\"album2\"));\n assertTrue(result.getArtist().equals(\"artiste2\"));\n assertTrue(result.getSongId().equals(\"2\"));\n\n }", "RiceCooker getById(long id);", "public AsxDataVO findOne(String id) {\n\t\t return (AsxDataVO) mongoTemplate.findOne(new Query(Criteria.where(\"id\").is(id)), AsxDataVO.class); \r\n\t}", "public Voto find(int id ) { \n\t\treturn em.find(Voto.class, id);\n\t}", "@Override\r\n\tpublic Botany show(int id) {\n\t\treturn dao.show(id);\r\n\t}", "private Album getAlbumByName(String albumName) {\n for (Album a : this.albums) {\n if (a.getName().equals(albumName)) {\n return a;\n }\n }\n return null;\n }", "public asset getAssetById(int id) {\n return assetRepository.findById(id).get();\n }", "public String getAlbum()\n {\n return album;\n }", "public void setLastAlbumRetrieved(String album, long id);", "public interface MusicService {\n Music getMusicById(Integer id);\n}", "private MusicVideo selectMusicVideoFromDB(int id){\n \n SessionFactory sessionFactory = (SessionFactory)servletContext.getAttribute(OpusApplication.HIBERNATE_SESSION_FACTORY) ;\n Session session = sessionFactory.openSession() ;\n \n try{\n \n Query<MusicVideo> query = session.createQuery(\"FROM MusicVideo WHERE id =:id\", MusicVideo.class) ;\n query.setParameter(\"id\", id) ;\n MusicVideo musicVideo = query.getSingleResult() ;\n session.close() ;\n return musicVideo ;\n }\n catch(NoResultException ex){\n \n session.close() ;\n return null ;\n }\n }", "Receta getByIdWithImages(long id);", "@Override\n\tpublic List<AlbumResponse> getAlbums(String albumToGet) {\n\t\tlogger.info(\"inside getAlbums method in service\");\n\t\ttry {\n\t\t\tif (albumToGet != null) {\n\t\t\t\tlogger.info(\"album id provided: \" + albumToGet + \", fetching the unique entry\");\n\t\t\t\tLong albumToGetInLong = Long.parseLong(albumToGet);\n\t\t\t\tOptional<Album> album = albumRepository.findById(albumToGetInLong);\n\t\t\t\tif (album.isPresent()) {\n\t\t\t\t\tlogger.info(\"corresponding album found in database\");\n\t\t\t\t\tList<AlbumResponse> responses = AlbumService.convertAlbumEntityToResponseModel(album.get(),\n\t\t\t\t\t\t\tResponseMessageConstants.FETCH_SUCCESSFUL);\n\t\t\t\t\treturn responses;\n\t\t\t\t} else {\n\t\t\t\t\tlogger.error(\"corresponsding album not found in database\");\n\t\t\t\t\tList<AlbumResponse> responses = Arrays\n\t\t\t\t\t\t\t.asList(new AlbumResponse(albumToGet, \"\", null, ResponseMessageConstants.FETCH_UNSUCCESSFUL\n\t\t\t\t\t\t\t\t\t+ \", \" + ResponseMessageConstants.NON_EXISITNG_ID_ERROR));\n\t\t\t\t\treturn responses;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlogger.info(\"album id not provided, fetching all the entries\");\n\t\t\t\tList<Album> albumList = albumRepository.findAll();\n\t\t\t\talbumList.stream().forEach(e -> e.setComments(ResponseMessageConstants.FETCH_SUCCESSFUL));\n\t\t\t\tList<AlbumResponse> responses = AlbumService.convertAlbumEntityToResponseModel(albumList);\n\t\t\t\treturn responses;\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\tlogger.error(\"exception while converting albumId from string to long\");\n\t\t\tList<AlbumResponse> responses = Arrays\n\t\t\t\t\t.asList(new AlbumResponse(albumToGet, \"\", null, ResponseMessageConstants.FETCH_UNSUCCESSFUL + \", \"\n\t\t\t\t\t\t\t+ ResponseMessageConstants.INCORRECT_ID_FORMAT_ERROR));\n\t\t\treturn responses;\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\tList<AlbumResponse> responses = Arrays.asList(new AlbumResponse(albumToGet, \"\", null,\n\t\t\t\t\tResponseMessageConstants.FETCH_UNSUCCESSFUL + \", \" + ResponseMessageConstants.UNKNOWN_EXCEPTION));\n\t\t\treturn responses;\n\t\t}\n\t}", "MemberFav selectByPrimaryKey(Long id);", "@Override\r\n\tpublic Animal getAnimalById(int id) {\n\t\treturn dao.findById(id).get();\r\n\t}", "public void get(String albumId, ResponseListener listener) {\n\t\tRequestParams params = new RequestParams();\n\t\tparams.put(Const.API_KEY, apiKey);\n\t\tparams.put(Const.AUTH_TOKEN, authToken);\n\n\t\tif (albumId != null) {\n\t\t\tString url = String.format(\"%s/%s\", API_ENDPOINT, albumId);\n\t\t\t\n\t\t\tLog.d(TAG, \"getAlbum: \" + url);\n\t\t\tLog.d(TAG, params.toString());\n\t\t\t\n\t\t\tgetInstance().get(url, params, new AlbumsResponseHandler(listener, Models.ALBUM));\n\t\t} else {\n\t\t\tErrorHandler.returnSimpleError(listener, Const.MISSING_PARAMS);\n\t\t}\n\t}", "@Override\n\tpublic Gasto findById(Integer id) {\n\t\treturn gastoModel.findById(id).orElseThrow(null);\n\t}", "public Data findById(Object id);", "Media getMedia(long mediaId);", "@Query(\"{ 'id': ?0}\")\n\tHero findById(Integer id);", "@GetMapping(\"/:id\")\n public ResponseEntity<Picture> picById(@PathVariable long id) {\n Optional<Picture> optionalPic = pictureManager.getById(id);\n if (optionalPic.isPresent()) {\n return ResponseEntity.ok(optionalPic.get());\n }\n\n return ResponseEntity.notFound().build();\n }", "public void onClick(DialogInterface dialog, int id) {\n goToAlbum();\n\n }", "@Override\n public Movie getFromId (Integer id) {return this.movies.get(id);}", "public Album getAlbumByTitle(String albumTitle)\r\n {\r\n\t// Loop over albums until album title found and then return the album\r\n\tfor (Album album : albumCollection)\r\n\t{\r\n\t if (album.getAlbumTitle().equals(albumTitle))\r\n\t {\r\n\t\treturn album;\r\n\t }\r\n\t}\r\n\t// If album not found return null\r\n\treturn null;\r\n }", "public Asset getAsset(int id) {\n\t\treturn assetRepo.findById(id).orElse(null);\r\n\t}", "Clothes getById(int id);", "public Singer find(int singerId);", "public AIObject getAIObject(String id) {\n return aiObjects.get(id);\n }", "@Override\n\tpublic Artist findByKey(Integer id) {\n\t\treturn null;\n\t}", "void loadAlbums();", "public List<Song> getSongInfo(int songid) {\n\t\treturn sd.getSonginfo(songid);\r\n\t}", "public BusinessObject getItem(Package pkg, String id);", "public Product get(String id);", "@Override\n\tpublic Carpo findCar(String id) {\n\t\treturn inList.find(id);\n\t}", "@Override\n\tpublic Banner getBanner(Long id) throws WynkServiceException{\n\t\tBooleanExpression expression = QBanner.banner.id.eq(id);\n\t\treturn bannerRepository.findOne(expression)\n\t\t\t\t.orElseThrow(()-> new com.wynk.exceptions.EntityNotFoundException(messageByLocaleService.getMessage(\"err.banner.notmatch\", String.valueOf(id))));\n\t}", "Movie findOne(@Param(\"id\") Long id);", "public Album getAlbumByName(String name){\n\t\tAlbum album = null;\n\t\ttry {\n\t\t\tString sql = \"SELECT * FROM Album WHERE Name = ?;\";\n\t\t\tPreparedStatement statement = connection.prepareStatement(sql);\n\t\t\tstatement.setString(1, name);\n\t\t\tResultSet set = statement.executeQuery();\n\t\t\tif (set.next()){\n\t\t\t\talbum = readAlbum(set);\n\t\t\t}\n\t\t\tstatement.close();\n\t\t\t//connection.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn album;\n\t}", "@Transactional(readOnly = true)\n public Optional<ItemInstance> findOne(Long id) {\n log.debug(\"Request to get ItemInstance : {}\", id);\n return itemInstanceRepository.findById(id);\n }", "public Ingredient getById(Long id) {\n return ingredientRepository.getOne(id);\n }", "public List<Album> getAlbums(Artist artist);", "Observable<Optional<AlbumInfo>> getAlbum(String albumId, String userId);", "@Test\n public void getAlbumsTest() {\n Integer id = null;\n Integer userId = null;\n List<Album> response = api.getAlbums(id, userId);\n\n // TODO: test validations\n }", "@Override\n public Media getMediaById(int id) {\n try {\n return mediaDao.getMediaById(id);\n } catch (ObjectNotFoundException e) {\n throw new RuntimeException(String.format(\"Media instance with id=%s not found\", id));\n } catch (FailedOperationException e) {\n throw new RuntimeException(e.getMessage());\n }\n }", "List<MusicInfo> selectByMusicId(String musicid);", "public Item getItem(Long id)\n {\n return auctionManager.getItem(id);\n }", "public MemberPo findMember(final String id);", "@GetMapping(\"images/album/{idOrTitle}/photos\")\n\tprivate List<PhotoEntity> getImagesFromAlbum(@PathVariable String idOrTitle) {\n\t\tList<PhotoEntity> list = new ArrayList<PhotoEntity>();\n\t\tPhotosetEntity photoset = null;\n\t\t\n\t\tlog.info(\"Request to retrieve photos from photoset...\");\n\t\t\n\t\t// Authorize edel-read or do not retrieve anything\n\t\tif (util.authEdelRead() != null) {\n\t\t\t\n\t\t\tphotoset = service.getPhotosetByIdOrTitle(idOrTitle);\n\t\t\t\n\t\t\t// If photoset is not null, set the list of PhotoEntity\n\t\t\tif (photoset != null) {\n\t\t\t\tlist = service.getPhotosFromPhotoset(photoset);\n\t\t\t\tlog.info(\"Request completed with photoset.\");\n\t\t\t} else {\n\t\t\t\tlog.warn(\"Request completed with no photoset.\");\n\t\t\t}\n\t\t} else {\n\t\t\tlog.warn(\"Request completed with failed Authorization.\");\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "public Airplane find(int id);" ]
[ "0.7179391", "0.7100871", "0.6809857", "0.6661784", "0.66584516", "0.66497785", "0.65492433", "0.6461014", "0.64255625", "0.62301", "0.6207287", "0.6159147", "0.61378336", "0.6106747", "0.60777205", "0.6075307", "0.6026116", "0.6021521", "0.5841561", "0.5811", "0.5808942", "0.58028716", "0.57910484", "0.5790936", "0.57846105", "0.57685685", "0.5760943", "0.57555586", "0.5745786", "0.5743655", "0.5663465", "0.5648494", "0.5643889", "0.56178993", "0.56034374", "0.55709714", "0.5570442", "0.55676985", "0.5533896", "0.54882455", "0.54877007", "0.54863983", "0.54786265", "0.54782325", "0.5478205", "0.5474145", "0.54570997", "0.54564923", "0.5437207", "0.54365486", "0.5413374", "0.5401743", "0.54006404", "0.5390928", "0.53845716", "0.538381", "0.53788733", "0.5361433", "0.53535557", "0.535071", "0.535034", "0.5330743", "0.53194636", "0.53183615", "0.53177476", "0.52950746", "0.5286198", "0.5285839", "0.5284142", "0.52820015", "0.52764994", "0.5269807", "0.5266915", "0.52646106", "0.52592635", "0.52549726", "0.52531004", "0.5245291", "0.52416253", "0.52391404", "0.52362597", "0.52337384", "0.5229683", "0.5228253", "0.5220741", "0.52205783", "0.52183425", "0.521404", "0.5212912", "0.52072716", "0.5204562", "0.5202119", "0.5200379", "0.5198067", "0.517999", "0.51770145", "0.5176652", "0.5176331", "0.516938", "0.51680005" ]
0.7872412
0