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
used to stop all ExecutionHandlers which are currently executed.
public static void stopEverything(){ for(final ExecutionHandler<?> execHandler:allThreads){ //interrupt the stack execution, so that it wont be further executed stopExecutionHandler(execHandler); } //Now when all ExecutionHandlers should already be empty, but for sure - clear all global lists explicitly allThreads.clear(); allExecutablesInProcess.clear(); rootBlockToThread.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void stopExecutionHandler(final ExecutionHandler<?> execHandler){\r\n\t\t//first interrupt the ExecutionHandler, which is a thread\r\n\t\texecHandler.interrupt();\r\n\t\t\r\n\t\t//and now let every executable, which was executed on this thread disable the \"i'm running\" signal\r\n\t\tAppRessources.context.runOnUiThread( new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tfor( Executable<?> exec : execHandler.executablesInProcess){\r\n\t\t\t\t\texec.feedbackDisable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tclearExecutionHandlerPointers(execHandler);\r\n\t}", "public void stop() {\n \t\tfor (Expirator e : expirators) {\n \t\t\te.stop();\n \t\t}\n \t}", "public void stop() {\n \tif (elevatorControllerList != null) {\n \t\tfor(ElevatorController elevator : elevatorControllerList) {\n \t\t\televator.stop();\n \t\t}\n \t}\n \tif(mSchedulerFuture != null) {\n \t\tmSchedulerFuture.cancel(false);\n \t}\n \tif(mHandlerFuture != null) {\n \t\tmHandlerFuture.cancel(false);\n \t}\n \tscheduledExecutorService.shutdown();\n }", "public void stopHandler() {\n handler.removeCallbacks(runnable);\n Log.d(\"HandlerRun\", \"stopHandlerMain\");\n }", "@Stop(priority = 99)\n void stop() {\n for (List<ListenerInvocation> list : listenersMap.values()) {\n if (list != null) list.clear();\n }\n\n if (syncProcessor != null) syncProcessor.shutdownNow();\n }", "public void stop() {\n\t\trunning = false;\n\t\tfor (ArionumHasher hasher : hashers) {\n\t\t\thasher.setForceStop(true);\n\t\t}\n\n\t\tthreadCollection.clear();\n\t\thashers.clear();\n\t}", "void stopAll();", "public void stop() {\n executor.shutdownNow();\n\n Collection<NodeRegistrationContext> allRegistrations = nodeRegistrations.values();\n for (NodeRegistrationContext registration : allRegistrations) {\n sendUnregistrationEvent(registration.resolvedDeployment);\n }\n }", "public void stopAll() throws DynamicCallException, ExecutionException{\n call(\"stopAll\").get();\n }", "public synchronized void stop() {\n // handlerThread must not be null, else the stop impl will throw\n handlerThread = new HandlerThread(\"nothing\");\n super.stop();\n }", "public void stop() {\n executor.shutdown();\n }", "public void stopServers() {\n EventHandlerService.INSTANCE.reset();\n UserRegistryService.INSTANCE.reset();\n\n if ( eventDispatcher != null ) {\n eventDispatcher.shutdown();\n }\n if ( userClientDispatcher != null ) {\n userClientDispatcher.shutdown();\n }\n if ( eventDispatcherThread != null ) {\n eventDispatcherThread.interrupt();\n }\n if ( userClientDispatcherThread != null ) {\n userClientDispatcherThread.interrupt();\n }\n }", "public void stop_all(){\n\t\tfor(Event_Process p:processes){\r\n\t\t\tp.stop();\r\n\t\t}\r\n\t}", "private void stopCallBack() {\r\n\t\tfor (RecordingEventHandler oberserver : recordingEventHandlers) {\r\n\t\t\toberserver.stopCallBack();\r\n\t\t}\r\n\t}", "private void stop()\n {\n if(running)\n {\n scheduledExecutorService.shutdownNow();\n running = false;\n }\n }", "private void stopServices(){\n if(_handlers!=null){\n for(PlugMotionHandler handler : _handlers) {\n if (handler != null)\n handler.stopSimulation();\n //Log.i(TAG, \"stoping simulation\");\n }\n }\n }", "public void stop() {\n\t\texec.stop();\n\t}", "public void stop() {\n executor.shutdownNow();\n rescanThread.interrupt();\n }", "public void killExecution() {\n \n \t\tcancelOrKillExecution(false);\n \t}", "public void stopAll() {\n List<String> startedEvents = new ArrayList<>(started.keySet());\n for (String event : startedEvents) {\n stop(event);\n }\n started.clear();\n }", "@Override\n public void stop() {\n try {\n serverSocket.close();\n }\n catch (IOException e) {\n getExceptionHandler().receivedException(e);\n }\n\n // Close all open connections.\n synchronized (listConnections) {\n for (TcpConnectionHandler tch : listConnections)\n tch.kill();\n listConnections.clear();\n }\n\n // Now close the executor service.\n executorService.shutdown();\n try {\n executorService.awaitTermination(3, TimeUnit.SECONDS);\n }\n catch (InterruptedException e) {\n getExceptionHandler().receivedException(e);\n }\n }", "public void stop() {}", "public Future<Void> stopAll() throws DynamicCallException, ExecutionException{\n return call(\"stopAll\");\n }", "public void stopListener(){\r\n\t\tcontinueExecuting = false;\r\n\t\tglobalConsoleListener.interrupt();\r\n\t}", "@Override\n public void stop() {\n Thread t = new Thread(server::stopOrderProcess);\n t.setName(\"Server close task\");\n t.start();\n serverFrame.enableControls(false, false);\n enableControls(false, false);\n }", "public void stop() {\n setClosedLoopControl(false);\n }", "public final void stopAll() {\n for (BotTaskInterface bt : TASKS) {\n LOG.info(\"Stoping BotTask {}\", bt.getName());\n bt.stop();\n }\n EXECUTOR_SERVICE.shutdown();\n }", "public void stopping() {\n super.stopping();\n }", "public void shutdown() {\n \t\tfor(Expirator e : expirators) {\n\t\t\te.shutdown();\n \t\t}\n \t\texpirators.clear();\n \t}", "public void stop() throws CoreHunterException;", "private void stopStopHolder() {\n Log.d(TAG, \"Stop the stop holder!\");\n try {\n if (mStopHandler != null) {\n mStopHandler.removeCallbacksAndMessages(null);\n }\n } catch (NullPointerException e) {\n CordovaPluginLog.e(TAG, \"Error: \", e);\n }\n }", "public void stop() {\n\t}", "public void stop() {\n\t\tthis.stopper = true;\n\t}", "public void stop(){\n return;\n }", "private void stopProcesses()\n {\n List<String> list = new ArrayList<String>(serverProcessesShutdownStack.keySet());\n ListIterator<String> iter = list.listIterator(list.size());\n while(iter.hasPrevious())\n {\n String processName = iter.previous();\n log.info(String.format(\"Stopping process: %s\", processName));\n serverProcessesShutdownStack.get(processName).stop(this);\n }\n }", "@Override\n public void stop() {}", "public void stop() {\n }", "public void stop() {\n }", "public void shutdown(){\n for(MessageHandler h : handlerMap.values()){\n h.shutdown();\n }\n }", "public synchronized void stop() {\n isStopped = true;\n generators.forEach(EventGenerator::stop);\n EventSimulatorDataHolder.getSimulatorMap().remove(uuid);\n if (log.isDebugEnabled()) {\n log.debug(\"Stop event simulation for uuid : \" + uuid);\n }\n }", "@Override\n public void stop() {\n }", "public void stop(){\n log.info(\"PageDownloaderPool stopped.\");\n downloaders.forEach(PageDownloader::doStop);\n }", "@Override public void stop() {\n }", "@Override\n public void stop() {\n\n for (FermatEventListener fermatEventListener : listenersAdded) {\n eventManager.removeListener(fermatEventListener);\n }\n\n listenersAdded.clear();\n }", "@Override\n public void stopExecute() {\n\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n\tpublic String stopAll() {\n\t\treturn null;\n\t}", "protected void stopAll() {\n\t\tif (this.udpServer!=null)\n\t\t\tthis.udpServer.interrupt();\n\t\tif (this.connectionServer!=null)\n\t\t\tthis.connectionServer.interrupt();\n\t\tthis.connectionServer=null; // supprime le TCPServer et les Sockets associés\n\t\tthis.udpServer=null; // supprime l'UDPServer et les Sockets associés\n\t\tif (this.agent.getUserStatusManager()!=null)\n\t\t\tfor (String u : this.agent.getUserStatusManager().getActiveUsers())\n\t\t\t\tthis.removeSocket(u);; // interrompt tous les UserSockets\n\t\tthis.mapSockets.clear();\n\t}", "public void stop() {\r\n running = false;\r\n }", "public void stop() {\n\t\tResources.getmScene().unregisterUpdateHandler(time);\n\t\trunning = false;\n\t}", "public void stop() {\n running = false;\n }", "public void shutdown() {\n if (pipelineExecutor != null) {\n ExecutorUtil.shutdownAndAwaitTermination(pipelineExecutor);\n }\n\n if (mHandler != null) {\n mHandler.removeCallbacksAndMessages(null);\n }\n }", "public void stop() {\n executorService.shutdown();\n try {\n if (!executorService.awaitTermination(500, TimeUnit.MILLISECONDS)) {\n executorService.shutdownNow();\n }\n } catch (InterruptedException e) {\n executorService.shutdownNow();\n }\n }", "public void stop() {\n log.info(\"Stopped\");\n execFactory.shutdown();\n cg.close();\n }", "public void stop() {\n if (stream != null) {\n try {\n stream.close();\n } catch (IOException e) {\n logger.error(\"Closing response stream failed\", e);\n }\n }\n\n executorService.shutdownNow();\n executorService = null;\n }", "public void stop() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\tsuper.stop();\n\t}", "@Override\n\tpublic void stop() {\n\t\tsuper.stop();\n\t}", "public void stop() {\r\n\t\t// Tell the Gui Agent to shutdown the system\r\n\t\tGui.shutdown = true;\r\n\t}", "public void stop()\r\n {\r\n debug(\"stop() all timers\");\r\n // Shutdown all the Timers\r\n shutdownWatchListTimers();\r\n\r\n debug(\"stop() all timers - complete\");\r\n }", "@Override\r\n public void stop() {\r\n }", "@Override\r\n public void stop() {\r\n }", "void stop(ExecutionContext context) throws ExecutorException;", "public void stop()\n {\n running = false;\n }", "public void stop() {\n\t\tif (this.isRunning() && !this.isManagedExternally) {\n\t\t\ttry {\n\t\t\t\tHTTP.release(this.http.get(this.shutdown));\n\t\t\t} catch (IOException exception) {\n\t\t\t\tthis.processRunner.abort();\n\t\t\t}\n\n\t\t\tthis.isManagedExternally = null;\n\t\t}\n\t}", "@Override\r\n public void stop() {\r\n\r\n }", "public void stop() {\n // stop all workers and sessions.\n Iterator<Map.Entry<TauSession, Worker>> it\n = sessionToWorkerMap.entrySet().iterator();\n\n while (it.hasNext()) {\n Map.Entry<TauSession, Worker> entry = it.next();\n entry.getValue().stop();\n }\n\n synchronized (lock) {\n sessionToWorkerMap.clear();\n sessionsList.clear();\n }\n }", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop()\n {\n storage.stop();\n command.stop();\n }", "public void shutdown() {\n logger.info(\"Shutting down modules.\");\n for (Module module : modules) {\n module.stop();\n }\n logger.info(\"Shutting down reporters.\");\n for (Reporter reporter : reporters.values()) {\n reporter.stop();\n }\n }", "@Override public void stop () {\n }", "@Override\n\tpublic void stop() {\n\t}", "@Override\n\tpublic void stop() {\n\t}", "public void stop()\n\t{\n\t\trunning = false;\n\t}", "@Override\n public void stop() {\n\n }", "public void cancelExecution() {\n \n \t\tcancelOrKillExecution(true);\n \t}" ]
[ "0.74588346", "0.7009897", "0.6943029", "0.68429554", "0.6746257", "0.6689645", "0.6616599", "0.66043043", "0.654611", "0.6523819", "0.65036917", "0.64911735", "0.64606327", "0.6442932", "0.63596886", "0.6345295", "0.63241667", "0.63204366", "0.63181525", "0.6308382", "0.6284099", "0.6271613", "0.62525517", "0.62262887", "0.62132263", "0.6206934", "0.6192833", "0.6178509", "0.6169846", "0.6167399", "0.6164995", "0.61633927", "0.6149596", "0.61460805", "0.6144337", "0.6135715", "0.6133559", "0.6133559", "0.6133115", "0.61326355", "0.61297214", "0.6115709", "0.6101535", "0.609491", "0.60883164", "0.60760856", "0.60760856", "0.60760856", "0.60760856", "0.60760856", "0.60760856", "0.60760856", "0.60760856", "0.60760856", "0.60760856", "0.60760856", "0.60719454", "0.6056136", "0.6054627", "0.6053257", "0.6048572", "0.6048219", "0.6040367", "0.60295767", "0.6029411", "0.60284793", "0.6028179", "0.6028179", "0.6024885", "0.60246813", "0.60156363", "0.60156363", "0.60073406", "0.6006909", "0.60044956", "0.59878486", "0.59848464", "0.59843874", "0.59843874", "0.59843874", "0.59843874", "0.59843874", "0.59843874", "0.59843874", "0.59843874", "0.59843874", "0.59843874", "0.59843874", "0.59843874", "0.59843874", "0.59843874", "0.59843874", "0.5980353", "0.5980226", "0.5972862", "0.5965757", "0.5965757", "0.59637266", "0.5960026", "0.59583634" ]
0.7590099
0
If execution of the root executable has given any Results if will be returned here.
public E getResult(){ return this.result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ExecutionResults getExecutionResults() {\n\t\treturn results ;\n\t}", "@Override\r\n\tpublic boolean results()\r\n\t{\r\n\t\treturn this.results(this.getRobot());\r\n\t}", "public Value execute() {\n return execute(Collections.<String, Value>emptyMap(), Collections.<String, Value>emptyMap());\n }", "public String execute() {\n String output = \"\";\n String tempOut = \"\";\n FSElement file;\n ArrayList<FSElement> recfiles;\n for (String fileName : dirArray) {\n file = Traverse.accessFS(fileName, root);\n if (file != null) {\n if (file instanceof File) {\n tempOut = getContent((File) file);\n if (!(output.contains(tempOut))) {\n output += tempOut;\n }\n } else if (subdir) {\n recfiles = Traverse.getAllDirs((Directory) file);\n for (FSElement temp : recfiles) {\n if (temp instanceof File) {\n tempOut = getContent((File) temp);\n if (!(output.contains(tempOut))) {\n output += tempOut;\n }\n }\n }\n }\n } else {\n Output.pathIncorrect(fileName);\n }\n }\n if (!(output.equals(\"\"))) {\n output = output.substring(0, output.length() - 2);\n return output;\n } else {\n Output.NoFilesFound();\n return null;\n }\n }", "public NMapRun getResult() {\n\t\tOnePassParser parser = new OnePassParser() ;\n\t\tNMapRun nmapRun = parser.parse(outFilePath, OnePassParser.FILE_NAME_INPUT ) ;\n\t\treturn nmapRun ;\n\t}", "public Object[] gatherResults(VirtualFrame frame){\r\n\t\tObject[] results = new Object[children.length];\r\n\t\tfor(int i = 0; i < results.length; i++){\r\n\t\t\tresults[i] = children[i].executeGeneric(frame);\r\n\t\t}\r\n\t\treturn results;\r\n\t}", "protected final boolean exec() {\n/* 94 */ this.result = compute();\n/* 95 */ return true;\n/* */ }", "public ProcessInfo getResult()\n\t{\n\t\treturn m_pi;\n\t}", "boolean hasExecution();", "@NonNull\n @Override\n public ResultT getResult() {\n if (getFinalResult() == null) {\n throw new IllegalStateException();\n }\n Throwable t = getFinalResult().getError();\n if (t != null) {\n throw new RuntimeExecutionException(t);\n }\n return getFinalResult();\n }", "public Object getResults() throws InterruptedException, ExecutionException {\n\t\t\treturn result.get();\n\t}", "protected R getResult() {\n\t\treturn result;\n\t}", "@Override\n\tpublic long getExecute() {\n\t\treturn _scienceApp.getExecute();\n\t}", "protected abstract Executable getExecutable();", "public void getAllResults()\n {\n for(String module: modules.keySet())\n {\n getResults(module);\n }\n }", "protected Actions exec() {\n return actions;\n }", "protected abstract void parseExecResult(BufferedReader lines) throws IOException;", "public Result getResults()\r\n {\r\n return result;\r\n }", "public void execute() throws XMLBuildException {\r\n\t\tlog.debug(\"ROOT EXECUTE g is a \" + root.getClass().getName());\r\n\t\tif (root != null) {\r\n\t\t\tlog.debug(\"root not null \");\r\n\t\t\t//root.execute();\r\n\t\t\tlog.debug(\"done execute\");\r\n\t\t} else {\r\n log.error(\"root null\", new Exception());\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic ArrayList<String> exe(String cmdBody) throws Exception {\n\t\treturn null;\n\t}", "public TestResult run() {\n TestResult result= createResult();\n run(result);\n return result;\n }", "@Override\n\t\t\tpublic Set<java.util.Map.Entry<PathwayImpl, AnalysisResult>> entrySet() {\n\t\t\t\treturn null;\n\t\t\t}", "public boolean execute(int i) {\n result.add(nodeMap.get(i));\n return true; // return true here to continue receiving results\n }", "public java.lang.String getMainMethodResult() {\r\n return localMainMethodResult;\r\n }", "public CommandResult execute() {\n int i = 0;\n int found = 0;\n for (Task task : Duke.taskList) {\n i++;\n if (task.description.contains(keyword)) {\n System.out.println(i + \".[\" + task.getTaskID() + \"]\" +\n \"[\" + task.getStatusIcon() +\n \"] \" + task.description + \" \" + task.getDate());\n found++;\n }\n }\n if (found == 0) {\n return new CommandResult(\"No results found :(\");\n } else {\n return new CommandResult(System.lineSeparator() + found + \" results found!\");\n }\n }", "public String process() throws Exception\r\n\t{\r\n\t\treturn result;\r\n\t}", "public String getExecutionArgs() {\n\t\treturn null;\n\t}", "public IntegrityTestResultAction getLatestResults() {\n\t\tfinal Run<?, ?> tempLastSuccessfulBuild = job.getLastSuccessfulBuild();\n\t\tRun<?, ?> tempBuild = job.getLastBuild();\n\t\twhile (tempBuild != null) {\n\t\t\tIntegrityTestResultAction tempResultAction = tempBuild.getAction(IntegrityTestResultAction.class);\n\t\t\tif (tempResultAction != null) {\n\t\t\t\treturn tempResultAction;\n\t\t\t} else if (tempBuild == tempLastSuccessfulBuild) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\ttempBuild = tempBuild.getPreviousBuild();\n\t\t}\n\n\t\treturn null;\n\t}", "protected SimulatorValue giveResult() {\n\tthis.evalExpression();\n\treturn value;\n }", "public boolean getResult() {\n\t\tif (stack.size() != 1) {\n\t\t\tthrow new IllegalStateException(\"Stack size mismatch\");\n\t\t}\n\t\t\n\t\treturn stack.peek();\n\t}", "public Object runAndGetResult() {\n run();\n return getResult();\n }", "@Nullable\n public static String getExecutionRoot(BuildInvoker invoker, BlazeContext context)\n throws GetArtifactsException {\n try {\n return invoker.getBlazeInfo().getExecutionRoot().getAbsolutePath();\n } catch (SyncFailedException e) {\n IssueOutput.error(\"Could not obtain exec root from blaze info: \" + e.getMessage())\n .submit(context);\n context.setHasError();\n return null;\n }\n }", "@Override\n\tpublic <R> R exit(R result) {\n\t\treturn null;\n\t}", "public Map<String, StepResult> getResults()\n {\n return results;\n }", "public Object getResult() {\n if (result == null) {\n return defaultResult();\n } else {\n return result;\n }\n }", "@Override\n public String doSearchResult() {\n return null;\n }", "public StatRes execut() {\n\t\tif (res.getFileName().endsWith(\".xml\") || res.getFileName().endsWith(\".mxml\")) {\n\t\t\tparseLog2();\n\t\t\tres.calcStat();\n\t\t}\n\t\treturn res;\n\t}", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "boolean hasResult();", "public boolean hasResult() {\n return hasResult;\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tprotected void invokeListeners(String interfaceName, Executable executable, boolean returnsResults) {\n\t\tList<BusListener> specificListeners = getListenersFor(interfaceName, listeners);\n\t\tif (returnsResults && specificListeners == null)\n\t\t\tthrow new IllegalArgumentException(\"Cannot return results when no listeners are registered for \"\n\t\t\t\t\t+ interfaceName);\n\t\tif (specificListeners == null)\n\t\t\treturn;\n\t\t// create unmodifiable copy so that additions/removals of listeners\n\t\t// during an invocations don't mingle with the order of listeners\n\t\tspecificListeners = new ArrayList<BusListener>(specificListeners);\n\t\tboolean oldCallActive = callActive;\n\t\tcallActive = true;\n\t\tSet<Throwable> exceptions = null;\n\t\tfor (BusListener listener : specificListeners) {\n\t\t\tif (!callActive)\n\t\t\t\tbreak;\n\t\t\ttry {\n\t\t\t\tObject result = executable.execute(listener);\n\t\t\t\texecutable.addItemToResults(result);\n\t\t\t} catch (Throwable t) {\n\t\t\t\tif (exceptions == null)\n\t\t\t\t\texceptions = new HashSet<Throwable>();\n\t\t\t\texceptions.add(t);\n\t\t\t}\n\t\t}\n\t\tcallActive = oldCallActive;\n\t\tlastInvocationResults = executable.results;\n\t\tif (exceptions != null)\n\t\t\tthrow new UmbrellaException(exceptions);\n\t}", "@Override\r\n\tpublic String execute() throws Exception {\n\t\treturn null;\r\n\t}", "@Override\n public boolean getResult() {\n return result_;\n }", "public Object run() {\n String bn = baseName.endsWith(\"/\")\n ? baseName\n : baseName + \"/\";\n\n // look for prebuilt indices first\n try {\n InputStream s = root.getResourceAsStream(bn + ICU_RESOURCE_INDEX + \".txt\");\n if (s != null) {\n ArrayList lst = new ArrayList();\n BufferedReader br = new BufferedReader(new InputStreamReader(s, \"ASCII\"));\n String line;\n while ((line = br.readLine()) != null) {\n if (line.length() != 0 && !line.startsWith(\"#\")) {\n lst.add(line);\n }\n }\n return lst;\n }\n } catch (IOException e) {\n // swallow it\n }\n\n URL url = root.getResource(bn);\n /*\n URLHandler handler = URLHandler.get(url);\n if (handler != null) {\n final ArrayList lst = new ArrayList();\n URLVisitor v = new URLVisitor() {\n public void visit(String s) {\n if (s.endsWith(\".res\") && !\"res_index.res\".equals(s)) {\n lst.add(s.substring(0, s.length() - 4)); // strip '.res'\n }\n }\n };\n handler.guide(v, false);\n return lst;\n }\n \t*/\n return null;\n }", "@Override\n public boolean getResult() {\n return result_;\n }", "private Boolean printResults(Set<?> results){\n\t\t//if the results set is null, we know there were no results\n\t\tBoolean hasResults = results != null;\n\t\t//if the set is null, print 0 results, else print the number of results that were returned\n\t\tif (!hasResults) print(\"0 Results\");\n\t\telse print(results.size()+\" Results:\");\n\t\t\n\t\treturn hasResults;\n\t}", "public List<InsightsKPIResultDetails> getKPIExecutionResult() {\n\t\tList<InsightsKPIResultDetails> inferenceDetailList = null;\n\t\tlog.debug(\"Worlflow Detail ==== In Content, fetch record for contentid {} kpi {} content category {} \",\n\t\t\t\tcontentConfigDefinition.getCategory(), contentConfigDefinition.getKpiId(),\n\t\t\t\tcontentConfigDefinition.getContentId());\n\t\tinferenceDetailList = datasourceDataHandler.fetchKPIResultData(contentConfigDefinition);\n\t\tlog.debug(\"Worlflow Detail ==== In Content, kpi result return for kpi {} is {}\",\n\t\t\t\tcontentConfigDefinition.getKpiId(), inferenceDetailList.size());\n\t\treturn inferenceDetailList;\n\t}", "Result getResult();", "public Object getResult()\n/* */ {\n/* 129 */ Object resultToCheck = this.result;\n/* 130 */ return resultToCheck != RESULT_NONE ? resultToCheck : null;\n/* */ }", "protected void invokeResults() {\r\n\t\t// Create the intent.\r\n\t\tIntent plantResultsIntent = new Intent(this, PlantResultsActivity.class);\r\n\t\t\r\n\t\t// create a bundle to pass data to the results screen.\r\n\t\tBundle data = new Bundle();\r\n\t\tdata.putString(PLANT_SEARCH_TERM, actPlantName.getText().toString());\r\n\t\t// add the bundle to the intent\r\n\t\tplantResultsIntent.putExtras(data);\r\n\t\t// start the intent, and tell it we want results.\r\n\t\tstartActivityForResult(plantResultsIntent, \t1);\r\n\t}", "private @CheckForNull CpsFlowExecution getExecutionBlocking() {\n FlowExecutionOwner owner = ((FlowExecutionOwner.Executable) run).asFlowExecutionOwner();\n if (owner == null) {\n return null;\n }\n try {\n FlowExecution exec = owner.get();\n return exec instanceof CpsFlowExecution ? (CpsFlowExecution) exec : null;\n } catch (IOException ioe) {\n LOGGER.log(Level.WARNING, \"Error fetching execution for replay\", ioe);\n }\n return null;\n }", "public Object run() {\n System.out.println(\"\\nYour java.home property: \"\n +System.getProperty(\"java.home\"));\n\n System.out.println(\"\\nYour user.home property: \"\n +System.getProperty(\"user.home\"));\n\n File f = new File(\"foo.txt\");\n System.out.print(\"\\nfoo.txt does \");\n if (!f.exists())\n System.out.print(\"not \");\n System.out.println(\"exist in the current working directory.\");\n return null;\n }", "public final Integer getExecReturnCode() {\n\t\treturn execReturnCode;\n\t}", "@Override\n \tpublic Object getResult() {\n \t\treturn result;\n \t}", "boolean getResult();", "boolean getResult();", "boolean getResult();", "boolean getResult();", "JobMetadata getExecutionResults(final String token) {\n JobMetadata result = null;\n synchronized (this.results) {\n final JobResultMetadata jrmd = this.results.get(token);\n if (null != jrmd) {\n result = jrmd.getMetaData();\n }\n }\n if (null != result) {\n return result;\n }\n // Check if the job is pending or currently running:\n synchronized (this.queue) {\n Job pendingJob = null;\n for (JobExecutionData jobExecData : this.queue) {\n if (jobExecData.getToken().equals(token)) {\n pendingJob = jobExecData.getJob();\n break;\n }\n }\n if (null != pendingJob) {\n return new JobMetadataImpl(pendingJob, token);\n } else if (null != this.currentRunning && this.currentRunning.getToken().equals(token)) {\n return new JobMetadataImpl(this.currentRunning.getJob(), token);\n }\n }\n throw new IllegalArgumentException(\"Unknown job execution token '\" + token + \"'.\");\n }", "protected abstract O getResult();", "public String getResult();", "public String getResult();", "public String getResult();", "@Override\n\tpublic List<ScienceAppExecute> findAll() throws SystemException {\n\t\treturn findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);\n\t}", "public void getResults()\n\t{\n\t\tThread mOutReader = new Thread()\n\t\t{\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(mProcess.getInputStream()));\n\t\t\t\t\tString line = br.readLine();\n\t\t\t\t\twhile ((!isInterrupted() && line != null))\n\t\t\t\t\t{\n\t\t\t\t\t\tline = line.trim();\n\t\t\t\t\t\tmResults.add(line);\n\t\t\t\t\t\tline = br.readLine();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (InterruptedIOException e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\tcatch (Exception e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t//we will process the error stream just in case\n\t\tThread mErrReader = new Thread()\n\t\t{\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(mProcess.getErrorStream()));\n\t\t\t\t\tString line = br.readLine();\n\t\t\t\t\twhile ((!isInterrupted() && line != null))\n\t\t\t\t\t{\n\t\t\t\t\t\tline = line.trim();\n\t\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t\t\tline = br.readLine();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (InterruptedIOException e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\tcatch (Exception e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tmOutReader.start();\n\t\tmErrReader.start();\n\n\t\t//wait for process to end.\n\t\ttry\n\t\t{\n\t\t\tmProcess.waitFor();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.err.println(\"process exception\");\n\t\t}\n\t\tmFinished = true;\n\t}", "@Override\n public void execute() throws EngineException {\n Object target = JavaReflectionUtil.getObject(this.target, \n callStatement.getEntries().subList(1,\n callStatement.getEntries().size() - 1));\n this.getParent().setResult(executeMethod(target, callStatement));\n pop();\n }", "int getResult();", "public TResult getResult() {\n return result;\n }", "@Override\n public Object execute(ExecutionEvent event) {\n\n final Shell shell = HandlerUtil.getActiveWorkbenchWindow(event).getShell();\n final Object source = HandlerUtil.getCurrentSelection(event);\n\n // System.err.println(\"Event source = \"+source.toString()+\"\\n class = \"+source.getClass().toString());\n if (!(source instanceof TreeSelection)) {// Ignore\n// System.err.println(\"Source is not an instance of TreeSelection\");\n return null;\n }\n TreeSelection selection = (TreeSelection) source;\n if (!(selection.getFirstElement() instanceof IProject)) {\n // Must be project\n// System.err.println(\"Selection.getFirstElement() is not an instance of org.eclipse.cdt.core.model.IProject\");\n return null;\n } \n IBinary[] results = LaunchParameterUtilities.searchForExecutable(selection.toArray());\n if (results.length < 1) {\n displayError(shell, \"Binary not found\\nPlease build target first\");\n return null;\n }\n IBinary bin = LaunchParameterUtilities.chooseBinary(shell, results);\n try {\n // May be cancelled so quietly check for null\n if (bin != null) {\n LaunchParameterUtilities.createLaunchConfig(shell, (IProject) selection.getFirstElement(), bin);\n }\n } catch (Exception e) {\n Activator.logError(\"Failed to launch program\", e);\n displayError(shell, e.getMessage());\n }\n return null;\n }", "public String getResultsDir() {\n return opensimActuatorsAnalysesToolsJNI.Tool_getResultsDir(swigCPtr, this);\n }", "public String[] scan(String directory, String rootDirectory) {\r\n\t\tFile scanDirectory = new File(directory);\r\n\r\n\t\t// Get an array of all the files/directories in this directory\r\n\t\tFile[] initialScan = scanDirectory.listFiles();\r\n\r\n\t\t// Create an empty arraylist to hold the paths of all the executables we find\r\n\t\tArrayList<String> execPaths = new ArrayList<String>();\r\n\r\n\t\t// Loop through all the files/directories we found\r\n\t\tfor (int i = 0; i < initialScan.length; i++) {\r\n\r\n\t\t\t// If this item is a file and has a correct extension, add it to the list of the\r\n\t\t\t// executables we found\r\n\t\t\tif (initialScan[i].isFile()) {\r\n\t\t\t\tString fileName = initialScan[i].getName();\r\n\t\t\t\tif (endsWithAny(fileName, this.extension)) {\r\n\r\n\t\t\t\t\tif (directory.equals(rootDirectory)) {\r\n\t\t\t\t\t\texecPaths.add(fileName);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Doing a silly thing where I'm leaving out the default root directory string,\r\n\t\t\t\t\t\t// but I probably shouldn't do that. I should change this later\r\n\t\t\t\t\t\texecPaths.add(directory.substring(rootDirectory.length() + 1) + \"/\" + fileName);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If this item is a directory and we want to scan recursively, then run the\r\n\t\t\t\t// scan operation on the directory as well\r\n\t\t\t} else if (initialScan[i].isDirectory() && this.recursive) {\r\n\t\t\t\tString[] directoryScan = scan(directory + \"/\" + initialScan[i].getName(), rootDirectory);\r\n\r\n\t\t\t\t// add all the files we got back to the return array as well\r\n\t\t\t\texecPaths.addAll(Arrays.asList(directoryScan));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Return the array representation of the paths we found\r\n\t\treturn execPaths.toArray(new String[execPaths.size()]);\r\n\t}", "private void retrieveResult() {\n if (result == null) {\n this.setResult(((DocumentBuilder)this.getHandler()).getResult());\n }\n }", "public boolean getResult() {\r\n\treturn result;\r\n }", "public GraphPath getResultPath() {\n return null;\r\n }", "public ExecutionResult ok() {\n var duration = Duration.between(start(), Instant.now());\n return new ExecutionResult(0, duration, out.toString(), err.toString(), null);\n }", "public Object doProcess() {\n List<Result> retv = new ArrayList<Result>();\n try {\n current_time = NTPDate.currentTimeMillis();\n current_time_nano = Utils.nanoNow();\n\n try {\n currentProcs = ProcFSUtil.getCurrentProcsHash();\n } catch (Throwable t) {\n if (logger.isLoggable(Level.FINER)) {\n logger.log(Level.FINER, \" [ myMon ] ProcFSUtil.getCurrentProcsHash exc\", t);\n }\n }\n final Result result = getResult();\n if(result != null) {\n result.addSet(\"Max Memory\", Runtime.getRuntime().maxMemory() / MEGABYTE_FACTOR);\n result.addSet(\"Memory\", Runtime.getRuntime().totalMemory() / MEGABYTE_FACTOR);\n result.addSet(\"Free Memory\", Runtime.getRuntime().freeMemory() / MEGABYTE_FACTOR);\n retv.add(result);\n }\n\n Result r = fillMLCPUTimeStats();\n if (r != null)\n retv.add(r);\n\n r = fillParamStats();\n if (r != null)\n retv.add(r);\n\n r = fillProcsStats();\n if (r != null)\n retv.add(r);\n\n if (currentProcs != null && currentProcs.size() > 0) {\n prevProcs = currentProcs;\n }\n\n r = fillPMSStats();\n if (r != null)\n retv.add(r);\n\n r = fillMLLUSHelperStats();\n if (r != null)\n retv.add(r);\n\n r = fillPWStats();\n if (r != null)\n retv.add(r);\n\n r = fillTCWStats();\n if (r != null)\n retv.add(r);\n\n if (IS_MAC) {\n r = fillFromMAC();\n if (r != null)\n retv.add(r);\n }\n } catch (Throwable t) {\n if (logger.isLoggable(Level.FINER)) {\n logger.log(Level.FINER, \"[ myMon ] [ HANDLED ] got ex main loop ... \", t);\n }\n return null;\n } finally {\n last_time_nano = current_time_nano;\n }\n\n currentProcs = null;\n if (logger.isLoggable(Level.FINEST)) {\n logger.log(Level.FINEST, \" [ myMon ] Returning ... \\n\" + retv);\n }\n return retv;\n }", "@ScriptyCommand(name = \"dbg-result\", description =\n \"(dbg-result)\\n\" +\n \"Get the result of the current debugging session if one has been reached or null.\\n\" +\n \"See also: dbg-expr, dbg-result?.\")\n @ScriptyRefArgList(ref = \"no arguments\")\n public Object result()\n throws CommandException {\n checkTrace();\n return trace.getResult();\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic void process(final UniverseImpl universe,\n\t\t\tfinal Map<String, Task<?>> runningTaskMap) {\n\t\t// If the result is final, dispatch it.\n\t\tif (isFinal()) {\n\t\t\tuniverse.dispatchResult(this);\n\t\t\treturn;\n\t\t}\n\t\t// Get the result's target successor task. If the task is unavailabe at\n\t\t// the moment, put the result into Temporary Result Queue in Computer\n\t\t// Proxy.\n\t\tSuccessorTask<ValueType> successortask = (SuccessorTask<ValueType>) universe\n\t\t\t\t.getSuccessorTask(targetTaskId);\n\t\tif (Config.DEBUG) {\n\t\t\tif (successortask == null) {\n\t\t\t\tSystem.out.println(\"\tResult:Successor \" + targetTaskId\n\t\t\t\t\t\t+ \" is not in universe!\");\n\t\t\t\tSystem.out.println(\"targetArgIndex: \" + targetArgIndex);\n\t\t\t\tSystem.out.println(\"orginTaskID :\" + orginTaskID);\n\t\t\t\tuniverse.printSuccessors();\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\tResult:Successor \" + targetTaskId\n\t\t\t\t\t\t+ \" is found in universe!\");\n\n\t\t// Set the argument in the target successor task at the target index.\n\t\tsuccessortask.setArgAt(targetArgIndex, this.value);\n\t\tif (Config.DEBUG) {\n\t\t\tSystem.out.println(\"\tResult: \" + successortask.getID() + \"-\"\n\t\t\t\t\t+ successortask.getLayer() + \"-\" + successortask.isCoarse()\n\t\t\t\t\t+ \" value filled!\");\n\t\t}\n\t\tif (successortask.isRunnable()) {\n\t\t\t// The successor task is moved from Successor Task Queue to\n\t\t\t// Ready Task Queue.\n\t\t\tif (Config.DEBUG) {\n\t\t\t\tSystem.out.println(\"\tResult: \" + successortask.getID() + \"-\"\n\t\t\t\t\t\t+ successortask.getLayer() + \"-\"\n\t\t\t\t\t\t+ successortask.isCoarse()\n\t\t\t\t\t\t+ \" is added to Universe Ready Task Queue!\");\n\t\t\t}\n\t\t\tuniverse.successorToReady(successortask);\n\t\t}\n\n\t}", "public boolean isSetResults() {\n return this.results != null;\n }", "@Override\n\tpublic Object execute() {\n\n\t\treturn null;\n\t}", "public boolean hasResult()\n/* */ {\n/* 119 */ return this.result != RESULT_NONE;\n/* */ }", "public interface Results {\n\n\tboolean resultsOk();\n\n\tResultsPanel getResultPanel();\n\n\tString getAnalysisName();\n}", "public java.util.List<entities.Torrent.NodeSearchResult> getResultsList() {\n if (resultsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(results_);\n } else {\n return resultsBuilder_.getMessageList();\n }\n }", "@Override\r\n\tpublic int getResult() {\n\t\treturn 0;\r\n\t}", "@java.lang.Override\n public entities.Torrent.NodeSearchResult getResults(int index) {\n return results_.get(index);\n }", "@Override\n\tprotected ArrayList<String> getCommandsToExecute() {\n\t\treturn null;\n\t}", "abstract void exec();", "public abstract String getResult();", "protected abstract String[] getExecString();", "boolean hasEresult();", "public BulkItemResponse getExecutionResult() {\n assert assertInvariants(ItemProcessingState.EXECUTED);\n return executionResult;\n }" ]
[ "0.6069282", "0.5522606", "0.5508397", "0.5488698", "0.54718184", "0.54212695", "0.5336475", "0.53323615", "0.5287998", "0.5180175", "0.51663417", "0.51463443", "0.51208246", "0.5115071", "0.5111714", "0.51040184", "0.5093551", "0.50592977", "0.50544345", "0.50376797", "0.50282776", "0.5016587", "0.5015156", "0.49994114", "0.49831492", "0.49623325", "0.4956404", "0.49268296", "0.49116117", "0.49015188", "0.48923934", "0.48891178", "0.4888482", "0.48858106", "0.48842993", "0.48829806", "0.487907", "0.4876379", "0.4876379", "0.4876379", "0.4876379", "0.4876379", "0.4876379", "0.4876379", "0.4876379", "0.4876379", "0.4876379", "0.4876379", "0.4876379", "0.48601982", "0.48498195", "0.48498058", "0.48420677", "0.484143", "0.48350534", "0.48305953", "0.4828328", "0.48240575", "0.48013675", "0.47825202", "0.47786883", "0.47768044", "0.4761102", "0.4760852", "0.47603545", "0.47603545", "0.47603545", "0.47603545", "0.47569647", "0.47525328", "0.47494897", "0.47494897", "0.47494897", "0.47489357", "0.47485605", "0.47472802", "0.47464466", "0.47462186", "0.47441918", "0.4738346", "0.47347695", "0.4726113", "0.4725331", "0.4717427", "0.47140667", "0.47116414", "0.47106713", "0.47096977", "0.470741", "0.4707242", "0.47055447", "0.47000203", "0.46975774", "0.46907035", "0.46862376", "0.46847034", "0.4681757", "0.4680546", "0.4679778", "0.46785524", "0.46776223" ]
0.0
-1
method to clear all the local thread pointers to executables and the executionHandler pointers from all static lists
private static void clearExecutionHandlerPointers(ExecutionHandler<?> execHandler){ //now iterate the executables on the given ExecutionHandler Thread again, now not on the UI thread and delete them from global lists for( Executable<?> exec : execHandler.executablesInProcess){ allExecutablesInProcess.remove(exec); } //empty the local lists to release the objects execHandler.executablesInProcess.clear(); //and remove the ExecutionHandler from the global list allThreads.remove(execHandler); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void stopEverything(){\r\n\t\tfor(final ExecutionHandler<?> execHandler:allThreads){\r\n\t\t\t//interrupt the stack execution, so that it wont be further executed \r\n\t\t\tstopExecutionHandler(execHandler);\r\n\t\t}\r\n\t\t//Now when all ExecutionHandlers should already be empty, but for sure - clear all global lists explicitly\r\n\t\tallThreads.clear(); \r\n\t\tallExecutablesInProcess.clear();\r\n\t\trootBlockToThread.clear();\r\n\t}", "public static void clear() {\n\t\tThreadContext.clear();\n\t}", "public void cleanDeadThreads()\n {\n\t\tSystem.gc();\n }", "void clearHandlers();", "private void clearLocals() {\n this.map = null;\n this.inputName = null;\n }", "public void clearAll(boolean clearContext, TaskMonitor monitor);", "public void cleanUp(){\n for(ShaderProgram sp : shaderlist){\n sp.cleanup();\n }\n }", "public final void cleanUp() {\n\t\tmgdmfunctions = null;\n\t\tmgdmlabels = null;\n\t\theap.finalize();\n\t\theap = null;\n\t\tSystem.gc();\n\t}", "public final void resetAll() {\r\n this._queue = null;\r\n this._delayed = null;\r\n }", "public static void cleanseInits() {\n delayDuration = null;\n timerFrequency = null;\n numProcessorThreads = null;\n maxProcessorTasks = null;\n }", "public static void cleanUp() {\n\t\tHashDecay.stopAll();\n\t\tSystem.gc();\n\t}", "public void clearAll();", "public void clearAll();", "static void clearCache() {\n CONFIG_VALUES = null;\n RUN_MODE = null;\n }", "public static void resetGlobals(int numTasks){\n time = 0;\n terminatedCount = 0;\n removeSet.clear();\n resourceArr = maxResourceArr.clone();\n releaseArr = new int [numResources];\n taskPointers = new int [numTasks];\n taskList = bankersTaskList;\n waitingList.clear();\n\n }", "@Override\n public void clear() {\n lock.lock();\n try {\n runtime.clear();\n } finally {\n lock.unlock();\n }\n }", "void clearAll();", "void clearAll();", "public void clearMainClass();", "public void reset()\n {\n \tthis.heapFiles.clear();\n }", "private void shutdownWatchListTimers()\r\n {\r\n debug(\"shutdownWatchListTimers() all timers\");\r\n // Null our our parser, It is not needed now.\r\n if (populateListVector == null)\r\n {\r\n return;\r\n }\r\n // Stop All of our timers.\r\n for (int i = 0; i < populateListVector.size(); i++)\r\n {\r\n PopulateWatchListTask task = (PopulateWatchListTask) populateListVector.elementAt(i);\r\n task.cancel();\r\n this.setStatusBar(\"WatchList [\" + tabPane.getTitleAt(i) + \"] - Stopped.\");\r\n debug(\"WatchList [\" + tabPane.getTitleAt(i) + \"] - Stopped.\");\r\n }\r\n // Clear all objects from the Timer List\r\n populateListVector.removeAllElements();\r\n populateListVector = null;\r\n // Signal the Garbage Collector to reclaim anything it may see neccessary\r\n System.gc();\r\n debug(\"shutdownWatchListTimers() all timers - complete\");\r\n }", "public static void reset() {\n Set<Map.Entry<Class<?>, DatabaseDefinition>> entrySet = globalDatabaseHolder.databaseClassLookupMap.entrySet();\n for (Map.Entry<Class<?>, DatabaseDefinition> value : entrySet) {\n value.getValue().reset(getContext());\n }\n globalDatabaseHolder.reset();\n loadedModules.clear();\n }", "public void clean(){\n preprocessorActionsPerFile.clear();\n }", "public void unregisterAll()\n {\n final Set<javax.servlet.Servlet> servlets = new HashSet<>(this.localServlets);\n for (final javax.servlet.Servlet servlet : servlets)\n {\n unregisterServlet(servlet);\n }\n }", "public void clearFramework() {\r\n\t\tList<Configuration> tests = testCache.getAllTests();\r\n\t\tlog.info(\"Clearing all tests.\\n\");\r\n\t\tfor (Configuration test : tests) {\r\n\t\t\tkillTest(test.getUniqueId());\r\n\t\t}\r\n\t\tworkQueue.clear();\r\n\t\ttestCache.clear();\r\n\t}", "private void clearMemory() {\n\t\tRunningAppMgr.getInstance(this).killAll();\n\t\tsetMemory();\n\t}", "public void freeAll()\n\t\t{\n\t\t\ts_cGameInstance = null; \n\t\t}", "private void reset() {\n clearSolutions();\n clearHeapUsages(this.pm_heap);\n placeMappings(this.pm_heap, this.instance.getPhysicalMachines(), this.mappings);\n }", "void executionOver() {\n this.reporter = null;\n this.options = null;\n this.executorEngine = null;\n this.progressSuppressingEventHandler = null;\n this.outputService = null;\n this.buildActionMap = null;\n this.completedAndResetActions = null;\n this.lostDiscoveredInputsMap = null;\n this.actionCacheChecker = null;\n this.outputDirectoryHelper = null;\n }", "@Override\n\tpublic void clearAll() {\n\t\t\n\t}", "private void resetTemporary(){\n temporaryConstants = null;\n temporaryVariables = null;\n }", "public void clear() {\n\t\t//Kill all entities\n\t\tentities.parallelStream().forEach(e -> e.kill());\n\n\t\t//Clear the lists\n\t\tentities.clear();\n\t\tdrawables.clear();\n\t\tcollidables.clear();\n\t}", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "private static void _reset() {\n // clear metrics\n HystrixCommandMetrics.reset();\n HystrixThreadPoolMetrics.reset();\n HystrixCollapserMetrics.reset();\n // clear collapsers\n HystrixCollapser.reset();\n // clear circuit breakers\n HystrixCircuitBreaker.Factory.reset();\n HystrixPlugins.reset();\n HystrixPropertiesFactory.reset();\n currentCommand.set(new LinkedList<HystrixCommandKey>());\n }", "protected void clearResolvedObjects() {\n\t\ttype = null;\n\t\tmanagedType = null;\n\t\ttypeDeclaration = null;\n\t}", "public static void clearRegistry() {\n \t\tLIBRARIES.clear();\n \t}", "public void resetAll() {\n triggered = false;\n classBlacklist.clear();\n policies.clear();\n protectedFiles.clear();\n System.setSecurityManager(defaultSecurityManager);\n }", "@Override\r\n protected void clearStaticReferences() {\r\n // free static fields :\r\n documentFactory = null;\r\n transformerFactory = null;\r\n schemaFactory = null;\r\n\r\n cacheDOM.clear();\r\n cacheDOM = null;\r\n\r\n cacheXSL.clear();\r\n cacheXSL = null;\r\n }", "public void clearAll()\n {\n textureMap.clear();\n componentMap.clear();\n }", "protected abstract void clearAll();", "private void clearResetCache() {\n for(IoBuffer buf : resetCache) {\n buf.free();\n }\n resetCache = null;\n }", "void clear() {\n this.mapped_vms.clear();\n this.mapped_anti_coloc_job_ids.clear();\n this.used_cpu = BigInteger.ZERO;\n this.used_mem = BigInteger.ZERO;\n }", "public void clearAll() {\n mNetworkCapabilities = mTransportTypes = mUnwantedNetworkCapabilities = 0;\n mLinkUpBandwidthKbps = mLinkDownBandwidthKbps = LINK_BANDWIDTH_UNSPECIFIED;\n mNetworkSpecifier = null;\n mTransportInfo = null;\n mSignalStrength = SIGNAL_STRENGTH_UNSPECIFIED;\n mUids = null;\n mEstablishingVpnAppUid = INVALID_UID;\n mSSID = null;\n }", "public static void clean() {\n keptObservers.put(new Object(), new ArrayList<Runnable>());\n }", "protected static void resetManager() {\n externalCameras.clear();\n resolutionMap.clear();\n isStartedMap.clear();\n trackerAPIMap.clear();\n internalCamera = null;\n internalCameraId = null;\n }", "public synchronized void unRegisterAll()\r\n {\r\n clearNameObjectMaps();\r\n }", "@Override\n protected void cleanup() {\n bundle.setParameter(BundleParameter.NODE_BUNDLE_ELAPSED_PARAM, accumulatedElapsed.get());\n this.dataProvider = null;\n usedClassLoader.dispose();\n usedClassLoader = null;\n //taskNotificationDispatcher.setBundle(this.bundle = null);\n this.taskList = null;\n this.uuidList = null;\n setJobCancelled(false);\n this.taskWrapperList = null;\n timeoutHandler.clear();\n }", "public void clean() {\n\tmTaskCompletedCallback = null;\n\tmTaskUpdateCallback = null;\n\tmIsDirty = false;\n }", "void destroy() {\n \t\ttry {\r\n \t\t\tupKeep.stopRunning();\r\n \t\t} catch (InterruptedException e) {\r\n \t\t}\r\n \r\n \t\t// Kill all running processes.\r\n \t\tfor (MaximaProcess mp : pool) {\r\n \t\t\tmp.kill();\r\n \t\t}\r\n \t\tpool.clear();\r\n \r\n \t\t// Kill all used processes.\r\n \t\tfor (MaximaProcess mp : usedPool) {\r\n \t\t\tmp.kill();\r\n \t\t}\r\n \t\tusedPool.clear();\r\n \t}", "public void clearEnvironment()\r\n\t{\r\n\t\tEnvironment.e = null;\r\n\t}", "public static synchronized void resetAllTimers() {\r\n _count = 0;\r\n _time = 0;\r\n _serverStarted = -1;\r\n _timers.clear();\r\n }", "public void teardown() {\n for (App app : applications) {\n app.icon.setCallback(null);\n }\n\t}", "public static void reset() {\n // shutdown thread-pools\n HystrixThreadPool.Factory.shutdown();\n _reset();\n }", "static void destroyAll()\n {\n synchronized(allSchedulers)\n {\n // destroy all registered schedulers\n Iterator iter = allSchedulers.iterator();\n while (iter.hasNext())\n {\n Scheduler scheduler = (Scheduler) iter.next();\n \n // do not call cancel() since this method modifies allSchedulers\n scheduler.destroy();\n }\n \n if (logger.isInfoEnabled())\n {\n logger.info(allSchedulers.size() + \" scheduler instances destroyed\");\n }\n \n // be sure and clear set\n allSchedulers.clear();\n \n // and set flag that scheduler service ist stopped\n schedulerServiceRunning = false;\n }\n }", "public void clearAllAppMapCaches(){\n\t\tappmaps.clear();\n\t}", "protected synchronized void clearScriptHandler() {\r\n currentScriptHandler = null;\r\n handlerLock.unlock();\r\n }", "public void clearLinks(){\r\n varContextObject=null; \r\n varContextFields=null; \r\n }", "public void clearAuxClasss();", "public static void clearAll(Context ctx){\n \t\t// delete files\n \t\tfor( File f : getCachedFiles(ctx) ){\n \t\t\tf.delete();\n \t\t}\n \t}", "public void mo37770b() {\n ArrayList<RunnableC3181a> arrayList = f7234c;\n if (arrayList != null) {\n Iterator<RunnableC3181a> it = arrayList.iterator();\n while (it.hasNext()) {\n ThreadPoolExecutorFactory.getScheduledExecutor().execute(it.next());\n }\n f7234c.clear();\n }\n }", "public synchronized void clearResources()\r\n {\r\n // create a new root, making old tree eligible for GCing\r\n createRootNode();\r\n\r\n // clear all registered objects\r\n unRegisterAll();\r\n }", "void clearAllLists() {\n this.pm10Sensors.clear();\n this.tempSensors.clear();\n this.humidSensors.clear();\n }", "private void clearInternVariables () {\n\n currentPostVersionList = null;\n postVersionsThatShouldBeInvestigated = null;\n\n allElementsInGUI.clear();\n\n blockPairs_groundTruth.clear();\n blockPairs_computedSimilarity.clear();\n\n positionOfCurrentLeftVersionInViewedPost = 0;\n\n mapPostHistoryIdToVersion.clear();\n groundTruth_postBlockLifeSpanVersionList.clear();\n }", "void unregisterAll();", "public void removeAll() {\n _hash = new Hashtable();\n _first = null;\n _last = null;\n }", "protected void clearCaches() {\n DescriptorFactory.clearInstance();\n ObjectTypeFactory.clearInstance();\n TypeQualifierApplications.clearInstance();\n TypeQualifierAnnotation.clearInstance();\n TypeQualifierValue.clearInstance();\n // Make sure the codebases on the classpath are closed\n AnalysisContext.removeCurrentAnalysisContext();\n Global.removeAnalysisCacheForCurrentThread();\n MethodInfo.clearCaches();\n if (classPath != null) {\n classPath.close();\n }\n }", "public static void DrivingNavi_clean(){\n navInitManager = null;\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 static void clearAppList() {\n }", "public void resetAll() {\n this.mEntryAlias = null;\n this.mEntryUid = -1;\n this.mKeymasterAlgorithm = -1;\n this.mKeymasterPurposes = null;\n this.mKeymasterBlockModes = null;\n this.mKeymasterEncryptionPaddings = null;\n this.mKeymasterSignaturePaddings = null;\n this.mKeymasterDigests = null;\n this.mKeySizeBits = 0;\n this.mSpec = null;\n this.mRSAPublicExponent = null;\n this.mEncryptionAtRestRequired = false;\n this.mRng = null;\n this.mKeyStore = null;\n }", "public void clear()\n {\n pages.stream().forEach((page) -> {\n page.clearCache();\n });\n\n pages.clear();\n listeners.clear();\n occupiedEntries.clear();\n }", "public void cleanToAll() {\n\t\tfor(ClientThread player: players) {\n\t\t\tplayer.send(new Package(\"CLEAN\",null));\n\t\t}\n\t}", "public static void reset() {\n parentNameToBlockStubs.clear();\n parentNameToParentBlocks.clear();\n }", "public static void reset() {\n\t\tE_Location.THIS.reset();\n\t\tE_Resource.THIS.reset();\n\t\t\n\t\tT_Object.reset();\n\t\tT_Location.reset();\n\t\tT_Resource.reset();\n\t\t\n\t}", "void reset(){\n if (vars!=null){\n vars.clear();\n }\n if (gVars!=null){\n gVars.clear();\n }\n }", "private void invalidate() {\n cud = null;\n fileNameRefs = null;\n jsniMethods = null;\n if (exposedCompiledClasses != null) {\n for (CompiledClass compiledClass : exposedCompiledClasses) {\n compiledClass.invalidate();\n }\n exposedCompiledClasses = null;\n }\n }", "private void cleanupResources() {\n Log.d(TAG, \"Initiating resource cleanup\");\n if (mWorkerThread != null) {\n mWorkerThread.quitSafely();\n try {\n mWorkerThread.join();\n mWorkerThread = null;\n } catch (InterruptedException e) {\n Log.e(TAG, \"Failed to join on mWorkerThread\");\n }\n }\n //mListener = null;//Release later when being finalized\n mDisplayHandler = null;\n mERDHandler = null;\n mContext = null;\n surface = null;\n mIface = null;\n mLocalWfdDevice = null;\n mPeerWfdDevice = null;\n mActionListener = null;\n Log.d(TAG, \"Done with resource cleanup\");\n }", "public void deleteAll() {\n tasks = new ArrayList<>();\n }", "void deinit() {\n\t\tsafeLocationTask.cancel();\n\t\t//Deinit all remaining worlds\n\t\tworlds.values().forEach(WorldHandler::deinit);\n\t\t//Clear members\n\t\tworlds.clear();\n\t\toptions = null;\n\t}", "private void clearLists() {\n\t\tobjects = new ArrayList<Entity>();\n\t\tenemies.clear();\n\t\titemList.clear();\n\t}", "public void clearAll() {\n infectionsQueue.clear();\n populationQueue.clear();\n deathsQueue.clear();\n healsQueue.clear();\n }", "private void reset() {\n\t\tfiles = new HashMap<>();\n\t\tparams = new HashMap<>();\n\t}", "public static void clearAllCache() {\n try {\n sLruCache.evictAll();\n sDiskLruCache.delete();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void clean() {\n nodesToRemove.clear();\n edgesToRemove.clear();\n }", "protected void stopAll() {\n\t\tif (this.udpServer!=null)\n\t\t\tthis.udpServer.interrupt();\n\t\tif (this.connectionServer!=null)\n\t\t\tthis.connectionServer.interrupt();\n\t\tthis.connectionServer=null; // supprime le TCPServer et les Sockets associés\n\t\tthis.udpServer=null; // supprime l'UDPServer et les Sockets associés\n\t\tif (this.agent.getUserStatusManager()!=null)\n\t\t\tfor (String u : this.agent.getUserStatusManager().getActiveUsers())\n\t\t\t\tthis.removeSocket(u);; // interrompt tous les UserSockets\n\t\tthis.mapSockets.clear();\n\t}", "public static void saveInitialThreads() {\n lock.lock();\n try {\n Set<Thread> currentThreads = getThreadsSnapshot();\n for (Thread thread : currentThreads) {\n LeakInfo leakInfo = new LeakInfo(thread, IGNORED);\n runningThreads.putIfAbsent(thread, leakInfo);\n }\n } finally {\n lock.unlock();\n }\n\n // Initialize the thread-local, in case some tests don't call testStarted()\n threadInfo.set(UNKNOWN);\n }", "public static void clearAllCache() {\n page_cache.clear();\n key_relate.clear();\n }", "public void resetLocals()\n {\n maxLocalSize = 0;\n localCnt = localIntCnt = localDoubleCnt = localStringCnt = localItemCnt = 0;\n locals = lastLocal = new LocalVariable(null, null, null);\n }", "public static void resetClasses() {\r\n\t\ttry {\r\n\t\t\tzeroStaticFields();\r\n\t\t\t\r\n\t\t\t//FIXME TODO: de-tangle quick-and-dirty approach from above register-reset-to-zero \r\n\t\t\t// which is needed for each load-time approach.\r\n\t\t\tclassInitializers();\r\n\t\t}\r\n\t\tcatch (Exception e) {\t//should not happen\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private static void cleanUpGlobalStateAndFileStore() {\n FileUtils.deleteDirectory(Paths.get(GLOBAL_STATE_DIR));\n }", "public void switchToGlobalContext(){\n currentConstants = null;\n currentVariables = null;\n\n temporaryConstants = null;\n temporaryVariables = null;\n }", "public void clean(){\n\t\tsynchronized(this.lock){\n\t\t\tint index=0;\n\t\t\tfor(ResourceStatus<T> resourceStatus:this.resourcesStatus){\n\t\t\t\tif(resourceStatus!=null){\n\t\t\t\t\tif(!resourceStatus.isInUse()){\n\t\t\t\t\t\tlong lastTime=resourceStatus.getLastNotInUseTime();\n\t\t\t\t\t\tlong currentTime=System.currentTimeMillis();\n\t\t\t\t\t\tT resource=resourceStatus.getResource();\n\t\t\t\t\t\tif((currentTime-lastTime)>=this.resourceAliveTime){\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tdestroyResource(resource);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tlogger.error(Constants.Base.EXCEPTION, e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.resourcesStatus[index]=null;\n\t\t\t\t\t\t\tthis.currentSize--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t}", "void removeAllDesktops();", "public void closeAllProcesses(){\r\n \t\t// copy since endLongRunning removes from the map\r\n \t\tIFile[] fs=buildProcesses.keySet().toArray(new IFile[buildProcesses.size()]);\r\n \t\tfor (IFile f:fs){\r\n \t\t\tendLongRunning(f);\r\n \t\t}\r\n \t\tbuildProcesses.clear();\r\n \t}", "public void clear() {\n\t\tstringList = null;\n\t}", "public native void clear();", "public void unbindAll() {\n\t\tmGlobalCallbacks.clear();\n\t\t/* remove all local callback lists, that is removes all local callbacks */\n\t\tmLocalCallbacks.clear();\n\t}", "private void restList() {\n for (Processus tmp : listOfProcess) {\n tmp.resetProcess();\n }\n }", "public void resetWorkspace() {\n //clear all pages and their drawers\n //clear all drawers and their content\n //clear all block and renderable block instances\n workspace.reset();\n //clear procedure output information\n ProcedureOutputManager.reset();\t//*****\n\n }" ]
[ "0.7382836", "0.65017724", "0.62492937", "0.61410177", "0.60734046", "0.605324", "0.60451084", "0.6035378", "0.60233945", "0.60080206", "0.59997237", "0.5987606", "0.5987606", "0.598625", "0.5944719", "0.5940279", "0.59378654", "0.59378654", "0.59279674", "0.5907111", "0.58907294", "0.58772945", "0.5863842", "0.58501995", "0.5836784", "0.58358103", "0.5802757", "0.57720476", "0.5771406", "0.57693356", "0.5767898", "0.57676727", "0.5754783", "0.5754783", "0.5750447", "0.5736596", "0.5736351", "0.573584", "0.5716332", "0.5705284", "0.57012475", "0.56966263", "0.56806445", "0.56795484", "0.5671035", "0.56678903", "0.56512094", "0.56436384", "0.56277835", "0.56197006", "0.5613934", "0.56103635", "0.56026566", "0.5600751", "0.559911", "0.5598813", "0.55982584", "0.5598258", "0.5597657", "0.5591678", "0.5586038", "0.55828637", "0.5575113", "0.5572742", "0.5565882", "0.5562908", "0.5562634", "0.55460155", "0.5545896", "0.5536832", "0.5536435", "0.55360216", "0.55340105", "0.55204123", "0.5519821", "0.55176294", "0.5511201", "0.5509357", "0.55085456", "0.5502706", "0.54819334", "0.5481495", "0.5479877", "0.54752433", "0.54752356", "0.5462906", "0.5461225", "0.54601693", "0.54597753", "0.5459358", "0.5459348", "0.5459023", "0.5458851", "0.54540575", "0.54528236", "0.5450313", "0.5449501", "0.5449122", "0.5448271", "0.5447979" ]
0.808037
0
Authenticating the service admin stub
public CassandraKeyspaceAdminClient(String hostName, String sessionCookie) throws AxisFault { backendUrl = "https://" + hostName + "/services/"; endPoint = backendUrl + serviceName; cassandraKeyspaceAdminStub = new CassandraKeyspaceAdminStub(endPoint); AuthenticateStub.authenticateStub(sessionCookie, cassandraKeyspaceAdminStub); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loginAsAdmin() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"admin\");\n vinyardApp.fillPassord(\"321\");\n vinyardApp.clickSubmitButton();\n }", "@Test\n\tpublic void adminLogin()\n\t{\n\t\tAdminFacade af = admin.login(\"admin\", \"1234\", ClientType.ADMIN);\n\t\tAssert.assertNotNull(af);\n\t}", "protected final void runAsAdmin() {\n authenticationTestingUtil.grantAdminAuthority( this.applicationContext );\n }", "@Test\n public void t01_buscaAdmin() throws Exception {\n Usuario admin;\n admin = usuarioServico.login(\"administrador\", \".Ae12345\");\n assertNotNull(admin);\n }", "@Test\n\tpublic void testAuthenticateAdminAccountSuccessfully() {\n\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.authenticateAdminAccount(USERNAME1);\n\t\t} catch (InvalidInputException e) {\n\t\t\tfail();\n\t\t}\n\t\tassertNotNull(user);\n\t\tassertNotEquals(0, user.getToken());\n\t}", "@Given ( \"I am logged into iTrust2 as an Admin\" )\r\n public void loginAsAdmin () {\r\n driver.get( baseUrl );\r\n final WebElement username = driver.findElement( By.name( \"username\" ) );\r\n username.clear();\r\n username.sendKeys( \"admin\" );\r\n final WebElement password = driver.findElement( By.name( \"password\" ) );\r\n password.clear();\r\n password.sendKeys( \"123456\" );\r\n final WebElement submit = driver.findElement( By.className( \"btn\" ) );\r\n submit.click();\r\n\r\n }", "@Test\n\tpublic void adminLogin2()\n\t{\n\t\tAdminFacade af = admin.login(\"admin\", \"4321\", ClientType.ADMIN);\n\t\tAssert.assertNull(af);\n\t}", "@PostConstruct\n void initSystemAdmin() {\n final UserAccount admin = initAdminInstance();\n final String passwordPlain = generatePassword();\n admin.setPassword(passwordPlain);\n if (userService.exists(admin.getUri())) {\n LOG.info(\"Admin already exists.\");\n } else {\n LOG.info(\"Creating application admin account.\");\n final TransactionTemplate tx = new TransactionTemplate(txManager);\n tx.execute(status -> {\n userService.persist(admin);\n return null;\n });\n LOG.info(SEPARATOR);\n LOG.info(\"Admin credentials are: {}/{}\", admin.getUsername(), passwordPlain);\n LOG.info(SEPARATOR);\n final File directory = new File(config.getAdminCredentialsLocation());\n try {\n if (!directory.exists()) {\n Files.createDirectories(directory.toPath());\n }\n final File credentialsFile = createHiddenFile();\n if (credentialsFile == null) {\n return;\n }\n LOG.debug(\"Writing admin credentials into file: {}\", credentialsFile);\n Files.write(credentialsFile.toPath(),\n Collections.singletonList(admin.getUsername() + \"/\" + passwordPlain),\n StandardOpenOption.CREATE, StandardOpenOption.WRITE,\n StandardOpenOption.TRUNCATE_EXISTING);\n } catch (IOException e) {\n LOG.error(\"Unable to create admin credentials file.\", e);\n }\n }\n }", "public interface AdminServiceI {\n Admin LoginCheck(String adminName, String adminPassword);\n\n}", "AdminConsole createAdminConsole();", "@Service\npublic interface IAdminService {\n\n\tpublic User registerAdmin(String username, String password) throws UserException;\n}", "private void adminLogin() {\n\t\tdriver.get(loginUrl);\r\n\t\t// fill the form\r\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(USERNAME);\r\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(PASSWORD);\r\n\t\t// submit login\r\n\t\tdriver.findElement(By.name(\"btn_submit\")).click();\r\n\t}", "@Override\r\n public Boolean loginAdmin(LoginAccessVo vo) throws Exception {\n return null;\r\n }", "@Override\r\n public Boolean loginAdmin(LoginAccessVo vo) throws Exception {\n return null;\r\n }", "EmployeeMaster authenticateUser(int employeeId, String password);", "public interface AdminService {\n public void addAdmin(Admin admin);\n\n public Admin queryAdmin(String username, String password);\n\n public void deleteAdmin(Admin admin);\n}", "public void logincredentials() {\n\t\tutil.entertext(prop.getValue(\"locators.text.uname\"), \"admin\");\n\t\tutil.entertext(prop.getValue(\"locators.text.password\"), \"Admin123\");\n\t\tutil.ClickElement(prop.getValue(\"locators.button.regdesk\"));\n\t\tutil.ClickElement(prop.getValue(\"locators.button.login\"));\n\t\tlogreport.info(\"logged into the application\");\n\n\t}", "public interface AdminService {\n\n}", "public void gotoAdminLogin(){ application.gotoAdminLogin(); }", "public boolean adminAccess (String password) throws PasswordException;", "@Test\n\tpublic void testLoginAdminAccountSuccessfully() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.loginAdminAccount(USERNAME2, PASSWORD2);\n\t\t} catch (InvalidInputException e) {\n\t\t\tfail();\n\t\t}\n\n\t\tassertNotNull(user);\t\t\t\n\t\tassertEquals(USERNAME2, user.getUsername());\n\t\tassertEquals(PASSWORD2, user.getPassword());\n\t\tassertEquals(NAME2, user.getName());\n\t}", "private AuthenticationService() {}", "@Local\npublic interface AdminService {\n /**\n * Creates a user of the system. The user is created with USER privileges.\n *\n * @param newUser the user to add.\n * @param token identifier of the session.\n * @throws AuthenticationException when the caller has not ADMIN permissions\n * @throws InvalidUserException when the user to add is not valid.\n */\n void createUser(User newUser, String token) throws AuthenticationException, InvalidUserException, UserAlreadyExistsException;\n\n /**\n * Deletes a user from the system.\n *\n * @param user the user that want to be deleted.\n * @param token identifier of the session.\n * @throws AuthenticationException when the caller has not ADMIN privileges.\n */\n void deleteUser(User user, String token) throws AuthenticationException;\n\n /**\n * Change the permissions of a user to a training. The permissions are: CREATE, READ.\n *\n * @param training the training.\n * @param user the user for whom the permissions will be changed.\n * @param permission the new permissions.\n * @param token the identifier of the session\n * @throws AuthenticationException when the caller has not ADMIN privileges.\n */\n void changePermissions(Training training, User user, Permission permission, String token) throws AuthenticationException;\n\n /**\n * CHange the privileges of a user to the system. Roles are: ADMINISTRATOR, TRAINER, USER.\n *\n * @param user the user for whom the role will be changed.\n * @param role the new role.\n * @param token the identifier of the session.\n * @throws AuthenticationException when the caller has not ADMIN privileges.\n */\n void changeRole(User user, Role role, String token) throws AuthenticationException;\n\n /**\n * Add a new Device to the system.\n *\n * @param device the device to be added.\n * @param token the identifier of the session.\n * @throws InvalidDeviceException when the device to add is not a valid one.\n * @throws AuthenticationException when the caller has not ADMIN privileges.\n * @throws DeviceAlreadyExistsException thrown when the device is already on the database.\n */\n void addDevice(Device device, String token) throws InvalidDeviceException, AuthenticationException,\n DeviceAlreadyExistsException;\n\n /**\n * Disable a device from the System. This happens when the device is broken.\n *\n * @param device the device to be disabled.\n * @param token the identifier of the session.\n * @throws AuthenticationException when the caller has not ADMIN privileges.\n */\n void disableDevice(Device device, String token) throws AuthenticationException;\n\n /**\n * Gets a User from the database by its username.\n *\n * @param name the username.\n * @return The User with the username specified.\n * @throws InvalidUserException when there is no user with the username specified.\n */\n User getUserByUsername(String name) throws InvalidUserException;\n\n /**\n * Modifies a Device that already exists on the system.\n *\n * @param device the device to be changes.\n * @param token the identifier of the session.\n * @throws InvalidDeviceException when the device to modify isn' on the database.\n * @throws AuthenticationException when the caller has no privileges to perform this action.\n */\n void modifyDevice(Device device, String token) throws InvalidDeviceException, AuthenticationException;\n\n /**\n * @return all the devices of the system. Doesn't need a token because only the admin can call the service.\n */\n List<Device> getAllDevices();\n\n /**\n * @param token the identifier of the session.\n * @return all the users from the system.\n * @throws AuthenticationException\n */\n List<User> getAllUsers(String token) throws AuthenticationException;\n}", "@Override\n\tpublic void credite() {\n\t\t\n\t}", "@BeforeGroups(groups = \"SUPER_ADMIN\")\n protected void loginSuperAdmin() throws Exception {\n login(\"spravce@eos.cz\", \"spravce\");\n }", "@Override\n public boolean auth(String email, String pseudonyme) {\n Properties props = new Properties();\n props.setProperty(\"org.omg.CORBA.ORBInitialHost\", \"localhost\");\n props.setProperty(\"org.omg.CORBA.ORBInitialPort\", \"3700\");\n props.setProperty(\"java.naming.factory.initial\", \"com.sun.enterprise.naming.SerialInitContextFactory\");\n props.setProperty(\"java.naming.factory.url.pkgs\", \"com.sun.enterprise.naming\");\n props.setProperty(\"java.naming.factory.state\", \"com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl\");\n \n StatelessDirectoryManagerBeanRemote sb = null;\n InitialContext ic;\n \n try {\n ic = new InitialContext(props);\n sb = (StatelessDirectoryManagerBeanRemote)ic.lookup(\"com.master2.datascale.directorymanager.bean.StatelessDirectoryManagerBeanRemote\");\n\t\t\t\n } catch (NamingException ex) {\n Logger.getLogger(StatefulAuctionManagerBean.class.getName()).log(Level.SEVERE, null, ex);\n }\n\t\t\t\n return sb.auth(email, pseudonyme);\n }", "@Test\r\n void testAuthenticatedImplementation() {\r\n bindAuthenticatedUser();\r\n testService.authenticatedImplementation();\r\n }", "private ServicioLogin() {\n super();\n }", "private void createAdminClient(String address, Integer port, String user,\n\t\t\tString password) throws Exception {\n\t\tProperties connectProps = new Properties();\n\t\tconnectProps.setProperty(AdminClient.CONNECTOR_TYPE,\n\t\t\t\tAdminClient.CONNECTOR_TYPE_SOAP);\n\t\tconnectProps.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, address.startsWith(\"https\")? \"true\":\"false\");\n\t\tconnectProps.setProperty(AdminClient.CONNECTOR_HOST, address.replace(\"https://\", \"\"));\n\t\tconnectProps.setProperty(AdminClient.CONNECTOR_PORT, port.toString());\n\t\tconnectProps.setProperty(AdminClient.USERNAME, user);\n\t\tconnectProps.setProperty(AdminClient.PASSWORD, password);\n\t\ttry {\n\t\t\tadminClient = AdminClientFactory.createAdminClient(connectProps);\n\t\t} catch (ConnectorException e) {\n\t\t\tSystem.out.println(\"Exception creating admin client: \" + e);\n\t\t\tthrow new Exception(e);\n\t\t}\n\n\t\tSystem.out.println(\"Connected to DeploymentManager\");\n\t}", "@Test(dependsOnMethods = \"testEnableAuth\", groups = \"authEnable\", priority = 1)\n public void setupAuthClient() {\n this.userClient = Client.builder()\n .endpoints(endpoints)\n .user(user)\n .password(userNewPass).build();\n this.rootClient = Client.builder()\n .endpoints(endpoints)\n .user(root)\n .password(rootPass).build();\n }", "@BeforeGroups(groups = \"OFFICER\")\n protected void loginOfficer() throws Exception {\n login(\"officer@eos.cz\", \"officer\");\n }", "public void login() {\n try {\n callApi(\"GET\", \"account/session\", null, null, true);\n } catch (RuntimeException re) {\n\n }\n\n Map<String, Object> payload = new HashMap<>();\n payload.put(\"name\", \"admin\");\n payload.put(\"password\", apiAdminPassword);\n payload.put(\"remember\", 1);\n\n callApi(\"POST\", \"account/signin\", null, payload, true);\n }", "public interface AdminService {\n\n\n Admin select_adminById(int admin_id);\n}", "protected Response login() {\n return login(\"\");\n }", "private String login() throws AxisFault {\n APIManagerConfiguration config = ServiceReferenceHolder.getInstance().\n getAPIManagerConfigurationService().getAPIManagerConfiguration();\n String user = config.getFirstProperty(APIConstants.API_GATEWAY_USERNAME);\n String password = config.getFirstProperty(APIConstants.API_GATEWAY_PASSWORD);\n String url = config.getFirstProperty(APIConstants.API_GATEWAY_SERVER_URL);\n\n if (url == null || user == null || password == null) {\n throw new AxisFault(\"Required API gateway admin configuration unspecified\");\n }\n\n String host;\n try {\n host = new URL(url).getHost();\n } catch (MalformedURLException e) {\n throw new AxisFault(\"API gateway URL is malformed\", e);\n }\n\n AuthenticationAdminStub authAdminStub = new AuthenticationAdminStub(\n ServiceReferenceHolder.getContextService().getClientConfigContext(),\n url + \"AuthenticationAdmin\");\n ServiceClient client = authAdminStub._getServiceClient();\n Options options = client.getOptions();\n options.setManageSession(true);\n try {\n authAdminStub.login(user, password, host);\n ServiceContext serviceContext = authAdminStub.\n _getServiceClient().getLastOperationContext().getServiceContext();\n String sessionCookie = (String) serviceContext.getProperty(HTTPConstants.COOKIE_STRING);\n return sessionCookie;\n } catch (RemoteException e) {\n throw new AxisFault(\"Error while contacting the authentication admin services\", e);\n } catch (LoginAuthenticationExceptionException e) {\n throw new AxisFault(\"Error while authenticating against the API gateway admin\", e);\n }\n }", "protected void login() {\n\t\t\r\n\t}", "private void debugAuthentcation() {\n\n\t\t/*\n\t\t * XPagesUtil.showErrorMessage(\"bluemix util: serviceName: \" +\n\t\t * serviceName + \", baseUrl: \" + baseUrl + \" username: \" + username +\n\t\t * \" password: \" + password);\n\t\t * XPagesUtil.showErrorMessage(\"bluemix util: service name: \" +\n\t\t * serviceName + \", hardcodedBaseUrl: \" + hardcodedBaseUrl +\n\t\t * \" hardcodedUsername: \" + hardcodedUsername + \" hardcodedPassword: \" +\n\t\t * hardcodedPassword);\n\t\t */\n\t}", "public interface UserAuthorityService extends AbstractService<UserAuthority, Long> {\n\n void grantNormalAuth(Long userId);\n}", "protected void grantAdminAuthority( ApplicationContext ctx ) {\n ProviderManager providerManager = ( ProviderManager ) ctx.getBean( \"authenticationManager\" );\n providerManager.getProviders().add( new TestingAuthenticationProvider() );\n\n // Grant all roles to test user.\n TestingAuthenticationToken token = new TestingAuthenticationToken( \"administrator\", \"administrator\",\n new GrantedAuthority[] { new GrantedAuthorityImpl( \"GROUP_ADMIN\" ) } );\n\n token.setAuthenticated( true );\n\n putTokenInContext( token );\n }", "@RequestMapping(\"/admin\")\n public String admin() {\n \t//当前用户凭证\n\t\tSeller principal = (Seller)SecurityUtils.getSubject().getPrincipal();\n\t\tSystem.out.println(\"拿取用户凭证\"+principal);\n return \"index管理员\";\n\n }", "public interface AdminService {\n\n /**\n * 用户列表查询\n * @param admin\n * @return\n */\n public List<Admin> queryadmin(Admin admin);\n\n int deladmin(Admin admin);\n}", "@Test\n public void test001() {\n String login = \"admin\";\n String password = \"admin\";\n\n openBasicAuthPage(login, password);\n assertThatAuthenticated();\n\n }", "public signadmin() {\n initComponents();\n }", "@Override\n protected void configure(AuthenticationManagerBuilder auth) throws Exception {\n auth.inMemoryAuthentication()\n .withUser(\"ahmed\")\n .password(\"123456\")\n .roles(\"admin\");\n }", "public void TC_04_Authentication_Alert() {\n\n\t\tdriver.get(\"http://admin:admin@the-internet.herokuapp.com/basic_auth\");\n\t}", "public static void navigateAdminLoginPage() {\n Browser.driver.get(\"http://shop.pragmatic.bg/admin\");\n }", "private void authenticateAction() {\n if (requestModel.getUsername().equals(\"superuser\")\n && requestModel.getPassword().equals(\"\")) {\n Collection<Webres> webres = getAllWebres();\n proceedWhenAuthenticated(new User(null, null, null, \"superuser\", \"\", null) {\n @Override\n public Collection<Webres> getAllowedResources() {\n return webres;\n }\n @Override\n public ActionController getDefaultController() {\n return ActionController.EMPLOYEES_SERVLET;\n }\n });\n return;\n }\n \n // try to authenticate against other credentials from the database\n Optional<User> u = getUserByCredentials(requestModel.getUsername(), requestModel.getPassword()); \n if (u.isPresent()) {\n proceedWhenAuthenticated(u.get());\n return;\n }\n \n // report authentication failed\n LOG.log(Level.INFO, \"{0} Authentication failed. Login: {1}, Password: {2}\", new Object[]{httpSession.getId(), requestModel.getUsername(), requestModel.getPassword()});\n SignInViewModel viewModel = new SignInViewModel(true);\n renderSignInView(viewModel);\n }", "public interface AdminService {\n\n /**\n *根据管理员账号获取管理员信息\n * @author zhou_wb\n * @version 1.0\n * @date 2017年5月15日\n */\n Admin findLoginDtoByAccount(String account);\n\n /**\n * 添加管理员\n */\n HttpStatus add(String adminUser,Admin admin) throws JsonProcessingException;\n\n /**\n * 添加角色\n */\n Admin addRole(String adminUser,Admin admin);\n\n /**\n * 获取所有管理员信息\n */\n List<Admin> getAll();\n}", "public void authenticationProcedure(){\n\t\tthrow new UnsupportedOperationException(\"TODO: auto-generated method stub\");\r\n\t}", "public AdminFacade() {\n super();\n }", "@Test(groups=\"authentication\")\n public void basicAuthentication() throws Exception {\n expect().\n statusCode(200).\n when().\n with().\n headers(\"X-OpenIDM-Username\", \"openidm-admin\", \"X-OpenIDM-Password\",\"openidm-admin\").\n get(\"/openidm/managed/user?_queryId=query-all-ids\").asString();\n }", "private void login() {\n AnonimoTO dati = new AnonimoTO();\n String username = usernameText.getText();\n String password = passwordText.getText();\n\n if (isValidInput(username, password)) {\n dati.username = username;\n dati.password = password;\n\n ComplexRequest<AnonimoTO> request =\n new ComplexRequest<AnonimoTO>(\"login\", RequestType.SERVICE);\n request.addParameter(dati);\n\n SimpleResponse response =\n (SimpleResponse) fc.processRequest(request);\n\n if (!response.getResponse()) {\n if (ShowAlert.showMessage(\n \"Username o password non corretti\", AlertType.ERROR)) {\n usernameText.clear();\n passwordText.clear();\n }\n }\n }\n\n }", "SandBox retrieveUserSandBox(Site site, AdminUser adminUser);", "protected abstract SessionManagementAdminServiceOperations getSessionManagementAdminService() throws SessionQueryException;", "protected Response login(String environment) {\n environment = Strings.isNullOrEmpty(environment) ? \"\"\n : \"/\" + environment;\n JsonObject creds = new JsonObject();\n creds.addProperty(\"username\", \"admin\");\n creds.addProperty(\"password\", \"admin\");\n Response resp = post(environment + \"/login\", creds.toString());\n return resp;\n }", "@BeforeGroups(groups = \"REGION_ADMIN\")\n protected void loginRegionAdmin() throws Exception {\n login(\"region@eos.cz\", \"region\");\n }", "@Override\n public void clientAuthenticate()\n throws HubIntegrationException {\n try {\n final ArrayList<String> segments = new ArrayList<>();\n segments.add(\"j_spring_security_check\");\n final HttpUrl httpUrl = createHttpUrl(segments, null);\n\n final Map<String, String> content = new HashMap<>();\n final String username = hubServerConfig.getGlobalCredentials().getUsername();\n String password = hubServerConfig.getGlobalCredentials().getEncryptedPassword();\n if (StringUtils.isNotBlank(username) && StringUtils.isNotBlank(password)) {\n try {\n password = hubServerConfig.getGlobalCredentials().getDecryptedPassword();\n\n content.put(\"j_username\", username);\n content.put(\"j_password\", password);\n final Request request = createPostRequest(httpUrl, createEncodedRequestBody(content));\n Response response = null;\n try {\n logRequestHeaders(request);\n response = getClient().newCall(request).execute();\n logResponseHeaders(response);\n if (!response.isSuccessful()) {\n throw new HubIntegrationException(response.message());\n }\n } finally {\n if (response != null) {\n response.close();\n }\n }\n } catch (IllegalArgumentException | EncryptionException e) {\n throw new HubIntegrationException(e.getMessage(), e);\n }\n }\n } catch (final IOException e) {\n throw new HubIntegrationException(e.getMessage(), e);\n }\n }", "@Test\n public void testAddDemotivatorPageAccessibleIFAuthorised(){\n \tFixtures.deleteAllModels();\n \tFixtures.loadModels(\"data/user.yml\");\n \t\n\t\t//Authenticating\n \tauthenticate();\n\n //Going to add Demotivator page\n \tResponse response = GET(\"/add\");\n \n assertNotNull(response);\n assertStatus(200, response);\n }", "@WithMockUser(username = \"admin\", authorities = {\"ADMIN\"})\n @Test\n @DisplayName(\"Allowed get books requests for ADMIN role \")\n void getByAdmin() throws Exception {\n mockMvc.perform(get(\"/books\").with(csrf())).andExpect(status().isOk());\n }", "@RemoteServiceRelativePath(\"reviewerAdminService\")\npublic interface ReviewerAdminService extends RemoteService {\n\t\n\tpublic Organization saveOrganization(Organization organization) throws Exception;\n\t\n\tpublic Collection<Organization> getOrganizations(String organizationName) throws Exception;\n\n\tpublic Organization getOrganization(String organizationName) throws Exception;\n\t\n\tpublic OrganizationProperty saveOrganizationProperty(OrganizationProperty organizationProperty) throws Exception;\n\t\n\tpublic Organization deleteOrganization(Organization organization) throws Exception;\n\t\n\tpublic Collection<User> getUsers(User user) throws Exception;\n\t\n\tpublic User saveUser(User user) throws Exception;\n\t\n\tpublic User getLoggedUser() throws Exception;\n\n\tpublic Organization checkOrganizationProperties(Organization organization) throws Exception;\n\t\n\tpublic void logout() throws Exception;\n\t\n\tpublic void forceUsersChangePassword(Organization organization,List<String> roles) throws Exception;\n}", "private void authorize() {\r\n\r\n\t}", "public interface IServiceAppAuthenticationClient {\n\n\t/**\n\t * This method gets the <strong>App</strong> authenticated by the Service. It uses Kerberos Protocol\n\t * to achieve mutual authentication between the App and the Service \n\t * @param url \n\t * <code>String</code> url of the web service to be invoked to authenticate App Service Ticket\n\t * @param serviceTicket \n\t * <code>ServiceTicket</code> Kerberos Service Ticket required to access the service\n\t * @return\n\t * <code>AppSession</code> \n\t * @throws IOException\n\t * In case there are some errors encountered while retrieving information\n\t * @throws RestClientException\n\t * If the status of the response is not <strong>200</strong>. The server side error message and error \n\t * response code can be accessed using <code>getMessage</code> and <code>getErrorCode</code> methods respectively\n\t * @throws ResponseDecryptionException \n\t * If the Application was unable to decrypt the Response sent by the server\n\t */\n\tAppSession authenticateAppServiceTicket(String url,\n\t\t\tServiceTicket serviceTicket) throws IOException, RestClientException, ResponseDecryptionException;\n\n}", "public AuthService() {\n//\t\tthis.dao = new UsuarioDAO();\n//\t\tthis.repository = repository;\n\t}", "public interface IAuthenticationService {\n public AuthenticationResponse login(String principal, String password);\n public void logout(String userId);\n public AuthenticationResponse renewToken(String principal, String token, String usId);\n}", "@Autowired\r\n public void globalUserDetails(AuthenticationManagerBuilder auth) throws Exception {\n auth.inMemoryAuthentication()\r\n // Define user's roles\r\n .withUser(adminId).password(adminPassword).roles(ADMIN_ROLE).and()\r\n .withUser(userId).password(userPassword).roles(USER_ROLE);\r\n }", "void admin() {\n\t\tSystem.out.println(\"i am from admin\");\n\t}", "@Test\n\tpublic void checkValidLoginAdmin() {\n\t\ttest = report.createTest(\"CheckValidLoginAdmin\");\n\t\t\n\t\tadminhomepage = loginpage.successfullLoginAdmin(UserContainer.getAdmin());\n\t\ttest.log(Status.INFO, \"Signed in\");\n\t\t\n\t\tAssert.assertEquals(adminhomepage.getUserNameText(), UserContainer.getAdmin().getLogin());\n\t\ttest.log(Status.PASS, \"Checked if the right page is opened.\");\n\t\t\n\t\tloginpage = adminhomepage.clickLogout();\n\t\ttest.log(Status.INFO, \"Signed off\");\n\t}", "public interface LoginService {\n E3Result userLogin(String username, String password);\n}", "public interface AuthService {\n User register(User user, CheckError checkError);\n \n String login(String username, String password);\n \n String refresh(String oldToken);\n}", "@Test\n\tpublic void testCreateAdminAccountSuccessfully() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tString username = \"newUsername\";\n\t\tAdminAccount user = null;\n\t\ttry {\n\t\t\tuser = adminAccountService.createAdminAccount(username, PASSWORD1, NAME1);\n\t\t} catch (InvalidInputException e) {\n\t\t\tfail();\n\t\t}\n\t\tassertNotNull(user);\n\t\tassertEquals(username, user.getUsername());\n\t\tassertEquals(PASSWORD1, user.getPassword());\n\t\tassertEquals(NAME1, user.getName());\n\t}", "public Admin login(Admin admin) {\n\t\t\n\t\treturn adminDao.select(admin);\n\t}", "@Test\n public void basicAuthentication() {\n RestAssured.given().auth().basic(\"admin\",\"admin\").when().get(\"https://the-internet.herokuapp.com/basic_auth\").\n then().assertThat().statusCode(200);\n\n //api key is one type of authentication, we can also be authenticated by providing a name and password.\n }", "@Test\n public void testBasicAuthAccountSuccess() {\n HttpAuthenticationFeature feature = \n HttpAuthenticationFeature.basic(\"admin\", \"admin\");\n Client client = ClientBuilder.newClient();\n URI uri = UriBuilder\n .fromUri(APPLICATION_NAME + APPLICATION_API_VERSION)\n .scheme(\"http\")\n .host(\"localhost\")\n .port(8080)\n .build();\n WebTarget webTarget = client\n .register(feature)\n .target(uri)\n .path(\"account\");\n Response response = webTarget\n .request(APPLICATION_JSON)\n .get();\n assertThat(response.getStatus(), is(200));\n }", "protected synchronized void login() {\n\t\tauthenticate();\n\t}", "private AuthOperation(Builder builder) {\n super(builder);\n }", "public interface IAuthService {\n AuthInfo getAuthentication(String username, String password);\n}", "private LoginApi() {\n }", "public void loginAsUser() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"user\");\n vinyardApp.fillPassord(\"123\");\n vinyardApp.clickSubmitButton();\n }", "@Override\r\n\tpublic void login() {\n\t\t\r\n\t}", "public interface AdminService {\n Admin query(Admin admin);\n}", "public abstract boolean authenticate(ServiceSecurity serviceSecurity, SecurityContext securityContext);", "public User doAuthentication(String account, String password);", "@Autowired\r\n\tpublic void configurationGlobal(AuthenticationManagerBuilder authBuilder) throws Exception{\r\n\t\tauthBuilder.inMemoryAuthentication()\r\n\t\t\t.withUser(\"scott\")\r\n\t\t\t.password(\"welcome1\")\r\n\t\t\t.roles(\"USER\");\r\n\t\tauthBuilder.inMemoryAuthentication()\r\n\t\t\t.withUser(\"arun\")\r\n\t\t\t.password(\"welcome1\")\r\n\t\t\t.roles(\"ADMIN\");\r\n\t\tauthBuilder.inMemoryAuthentication()\r\n\t\t\t.withUser(\"pavan\")\r\n\t\t\t.password(\"welcome1\")\r\n\t\t\t.roles(\"USERDISABLED\");\r\n\t}", "public interface AuthService {\n void init();\n boolean login(HttpServletRequest request, String user, String password);\n\n void logout(HttpServletRequest request);\n\n boolean register(User user);\n\n\n User checkLogin(String username, String password);\n}", "@Override\r\n\t\r\n\t@Transactional(readOnly = true, propagation=Propagation.SUPPORTS)\r\n\tpublic Admin authenticateAdmin(Admin login) {\n\t\treturn adminDAO.authenticateAdmin(login);\r\n\t}", "@Override\n public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {\n endpoints.authenticationManager(authenticationManager); // need to specify object of a type authenticationManager by declaring it as a private & autowiring it\n // this object can be used to send as a parameters to the authentication manager of the endpoint object method\n }", "@Order(1)\n\t@Test\n\tpublic void Attempt_LoginSuccess() throws AuthException\n\t{\n\t\t//Test to make certain we login correctly.\n\t\tString user = \"null\", pass = \"andVoid\";\n\t\tboolean expected = true, actual = as.authenticateUser(user, pass);\n\t\tassertEquals(expected,actual,\"This is the correct login credentials for the System Admin\");\n\t}", "boolean makeAdmin(User user);", "private static void login(String role, String password) {\n String json = String.format(\"{username: \\\"%s\\\", password: \\\"%s\\\"}\", role, password);\n securityToken = given()\n .contentType(\"application/json\")\n .body(json)\n //.when().post(\"/api/login\")\n .when().post(\"/login\")\n .then()\n .extract().path(\"token\");\n }", "@FXML\n\tprivate void handleLoginButtonAction() {\n\t\t\n//\t\tString upass = \"123\";\n//\t\tString uname = \"admin\";\n//\t\tString uname = \"sadmin\";\n\t\tString uname = username.getText();\n\t\tString upass = password.getText();\n\n\t\tValidator validator = new Validator(uname, upass);\n\t\tSystem.out.println(validator.getName());\n\n \t\tChainBuilder chain= new ChainBuilder();\n \t\tchain.builChain();\n \t\tchain.getAuthonticator().validateRequest(validator);\n\n\n\t\t// Authenticator htos = new AdminValidator();\n//\t\tMyAuthenticator auth= new AdminValidator();\n//\t\tMyAuthenticator lib = new LibrarianValidator();\n//\t\tMyAuthenticator nullAuth= new NullChecker();\n//\n//\t\tnullAuth.setNextAuthonticator(lib);\n//\t\tlib.setNextAuthonticator(auth);\n\n\n\n//\t\tif (uname.trim().length() == 0 || upass.trim().length() == 0) {\n//\t\t\talertMessage(\"Fill all the required Fields\");\n//\t\t} else {\n//\t\t\tUserObjectInputOutputStream inputOutput = new UserObjectInputOutputStream();\n//\t\t\tUserDetails user = inputOutput.getUsers(uname, upass);\n//\t\t\ttry{\n//\t\t\t\tif (user.getUsername().equals(null)) {\n//\t\t\t\t\talertMessage(\"Invalid Username or Password\");\n//\t\t\t\t} else {\n//\t\t\t\t\tswitch(user.getRole()){\n//\t\t\t\t\t\tcase \"admin\":\n//\n//\t\t\t\t\t\t\tAdminController sac = new AdminController();\n//\t\t\t\t\t\t\tsac.loadAdminWindow();\n//\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t\tcase \"librarian\":\n//\t\t\t\t\t\t\tLibrarianController libc = new LibrarianController();\n//\t\t\t\t\t\t\tlibc.loadAdminWindow();\n//\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t\tcase \"sadmin\":\n//\t\t\t\t\t\t\tSuperAdminController spac = new SuperAdminController();\n//\t\t\t\t\t\t\tspac.loadSuperAdminWindow();\n//\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t\tdefault:\n//\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t}\n//\n//\t\t\t\t}\n//\t\t\t}catch(Exception e){\n//\t\t\t\te.printStackTrace();\n//\t\t\t\talertMessage(\"======Invalid Username or Password\");\n//\t\t\t}\n//\t\t}\n\t}", "@Override\n protected void afterAuthenticating() {\n }", "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 }", "protected synchronized String authenticated() throws JSONException {\n JSONObject principal = new JSONObject()\n .put(FIELD_USERNAME, USER)\n .put(FIELD_PASSWORD, PASSWORD);\n if (token == null){ //Avoid authentication in each call\n token =\n given()\n .basePath(\"/\")\n .contentType(ContentType.JSON)\n .body(principal.toString())\n .when()\n .post(LOGIN)\n .then()\n .statusCode(200)\n .extract()\n .header(HEADER_AUTHORIZATION);\n\n }\n return token;\n }", "public login() {\n\n initComponents();\n \n usuarios.add(new usuarios(\"claudio\", \"claudioben10\"));\n usuarios.get(0).setAdminOno(true);\n \n }", "protected void configure(AuthenticationManagerBuilder authenticationManagerBuilder) throws Exception {\n authenticationManagerBuilder.inMemoryAuthentication().withUser(\"batateinit\").password(\"batate123\").roles(\"ADMINISTRATOR\");\n\n // AUTHENTICATION CHECK, AFTER THE CREATION OF USER RECORDS IN THE DATABASE\n authenticationManagerBuilder.userDetailsService(userDetailsService);\n\n /*authenticationManagerBuilder.inMemoryAuthentication().withUser(\"user\").password(\"user\").roles(\"USER\");\n authenticationManagerBuilder.inMemoryAuthentication().withUser(\"admin\").password(\"admin\").roles(\"ADMIN\");\n authenticationManagerBuilder.inMemoryAuthentication().withUser(\"kishor\").password(\"kishor\").roles(\"KISHOR\");*/\n }", "@Test\n public void testBasicAuthUserSuccess() {\n HttpAuthenticationFeature feature = \n HttpAuthenticationFeature.basic(\"admin\", \"admin\");\n Client client = ClientBuilder.newClient();\n URI uri = UriBuilder\n .fromUri(APPLICATION_NAME + APPLICATION_API_VERSION)\n .scheme(\"http\")\n .host(\"localhost\")\n .port(8080)\n .build();\n WebTarget webTarget = client\n .register(feature)\n .target(uri)\n .path(\"user\");\n Response response = webTarget\n .request(APPLICATION_JSON)\n .get();\n assertThat(response.getStatus(), is(200));\n }", "private static void loginForAdmin(String username, String password){\n\n ArrayList<Object> loginData = LogInAndLogOutService.login(username, password);\n boolean logged = (boolean) loginData.get(0);\n boolean freezed = (boolean) loginData.get(1);\n Employee employee = (Employee) loginData.get(2);\n\n if (logged){\n\n System.out.println(\"Sie sind richtig als Herr/Frau \"+ employee.getLastname() + \" \"+ employee.getFirstname() +\" eingelogt.\");\n }else {\n if (freezed){\n\n System.out.println(\"Ihr Konto wurde einfriert. Sie können sie sich nicht einloggen. :(\");\n }else {\n\n System.out.println(\"Falscher Benutzername oder Passwort eingegeben. Versuchen Sie erneut.\");\n }\n }\n }", "@Test\n public void loginSuccessWithGoodCredentials() {\n Mockito.when(accountService.getAuthenticatedUser()).thenReturn(Mono.just(account));\n //Mockito.when(userDetailsService.findByUsername(eq(\"jukka\"))).thenReturn(Mono.just(account.toUserDetails()));\n \n client\n .post().uri(\"/login\")\n .header(\"Authorization\", \"Basic \" + utils.createAuthenticationToken(\"jukka\", \"jukka\"))\n .exchange()\n .expectStatus()\n .isOk()\n .expectHeader()\n .contentType(APPLICATION_JSON)\n .expectBody()\n .jsonPath(\"$.id\").isEqualTo(\"oidasajfdlihfaidh\")\n .jsonPath(\"$.name\").isEqualTo(\"Jukka Riekkonen\")\n .jsonPath(\"$.username\").isEqualTo(\"jukka\")\n .jsonPath(\"$.password\").doesNotExist();\n }", "private LogIn() {}", "@Override\r\n\tpublic void login() {\n\r\n\t}", "private static void createAdmin(SecurityService service,\n\t\t\tString securityDomainId, Actor requestingActor, Actor adminActor,\n\t\t\tString groupId) {\n\t\tBooleanResultResponse boolResp = service.createAceActionByActorIdByRoleId(securityDomainId, adminActor, \"USRGADM\", groupId, requestingActor);\n\t\tSystem.out.println(\"after inserting admins>>>>\" + boolResp);\n\t}" ]
[ "0.69576275", "0.68053025", "0.6600982", "0.6588177", "0.6577504", "0.64688754", "0.6461545", "0.6332897", "0.62983966", "0.6235567", "0.61890584", "0.61825866", "0.6141566", "0.6141566", "0.61349446", "0.61080515", "0.6071434", "0.60650903", "0.6058625", "0.6057485", "0.6052042", "0.6007687", "0.59914356", "0.5932007", "0.5929254", "0.5926061", "0.5903609", "0.5868746", "0.5865376", "0.58621305", "0.58509254", "0.58505553", "0.5845255", "0.58291036", "0.58186984", "0.5817142", "0.5800459", "0.57744", "0.5769492", "0.57691836", "0.5768629", "0.5764847", "0.5735971", "0.5733034", "0.5723404", "0.57124186", "0.5712345", "0.56969815", "0.5690087", "0.56883293", "0.56755006", "0.5671246", "0.5670153", "0.5663692", "0.56472945", "0.5638815", "0.56269217", "0.56122285", "0.5605525", "0.56001633", "0.55971336", "0.55960554", "0.55939513", "0.55896485", "0.5585829", "0.5578543", "0.5574959", "0.55590695", "0.5555739", "0.5553613", "0.55409753", "0.552763", "0.5516675", "0.55153084", "0.55087894", "0.5506567", "0.55054533", "0.5504631", "0.5502916", "0.55004627", "0.5499314", "0.5495705", "0.54912555", "0.5486791", "0.5478827", "0.5474179", "0.547208", "0.54714125", "0.5471175", "0.5462522", "0.5461728", "0.54613996", "0.54557365", "0.54533917", "0.5447822", "0.54469025", "0.5436466", "0.5432857", "0.54320276", "0.5429463", "0.5429133" ]
0.0
-1
si viene algun parametro en null se establece NullParam
@Override public List<ClearingData10> searchClearingData(Map<String, Object> header, Long id, AccountingStatusType status, Long accountingId) throws Exception { Object[] params = { id != null ? id : new NullParam(Types.BIGINT), status != null ? status.getValue() : new NullParam(Types.VARCHAR), accountingId != null ? accountingId : new NullParam(Types.BIGINT), }; //se registra un OutParam del tipo cursor (OTHER) y se agrega un rowMapper para transformar el row al objeto necesario RowMapper rm = getClearingDataRowMapper(); Map<String, Object> resp = getDbUtils().execute(getSchemaAccounting() + ".mc_acc_search_clearing_data_v10", rm, params); List<ClearingData10> res = (List<ClearingData10>)resp.get("result"); log.info(res); return res != null ? res : Collections.emptyList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Ignore\n\t@Test\n\tpublic void testParamNull() {\n\t\tregisterParamException(null, keyString, valueString);\n\t\tregisterParamException(groupString, null, valueString);\n\t\tregisterParamException(groupString, keyString, null);\n\t}", "static void checkNull(final Object param, final String paramName) {\r\n if (param == null) {\r\n throw new IllegalArgumentException(\"The argument '\" + paramName\r\n + \"' should not be null.\");\r\n }\r\n }", "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}", "@Override\n\tpublic String getParameter(String name) {\n\t\treturn null;\n\t}", "@Override\n\tpublic String[] getParameterValues(String arg0) {\n\t\treturn null;\n\t}", "@Test\r\n\t@LoadData(dataLoader=ProdutosDataLoader.class)\r\n\tpublic void consultaSaldoProdutoNullTest() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\testoqueFacade.consultarEstoque((Produto)null);\r\n\t\t\tAssert.fail();\r\n\t\t} catch (NullParameterException e) {\r\n\t\t\tAssert.assertTrue(e.hasCode(ExceptionCodes.MOVIMENTACAO_ESTOQUE.SALDO_PRODUTO_REQUIRED));\r\n\t\t}\r\n\t\t\t\r\n\t}", "private void checkForNullOrEmptyParameter(String param, String paramName)\n\t\t\tthrows MissingParameterException, InvalidParameterException {\n\t\tif (param == null) {\n\t\t\tthrow new MissingParameterException(paramName + \" can not be null\");\n\t\t} else if (param.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(paramName + \" can not be empty\");\n\t\t}\n\t}", "@Override\n\t\tpublic String getParameter(String name) {\n\t\t\treturn null;\n\t\t}", "@ExceptionHandler(NullParameterException.class)\n\tpublic final ResponseEntity<ErrorMessage> nullParameter(NullParameterException ex) {\n\n\t\tErrorMessage exceptionResponse = new ErrorMessage(ex.getMessage(), errorMsg, currentTimeMillis);\n\t\treturn new ResponseEntity<ErrorMessage>(exceptionResponse, new HttpHeaders(), HttpStatus.NOT_FOUND);\n\t}", "public static void notNullOrEmpty(Object[] parameter, String name) throws IllegalArgumentException\n {\n if(parameter == null || parameter.length == 0) {\n throw new IllegalArgumentException(name + \" parameter is empty.\");\n }\n }", "@Test\r\n\t@LoadData(dataLoader=ProdutosDataLoader.class)\r\n\tpublic void consultaSaldoProdutosNullTest() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\testoqueFacade.consultarEstoque((Produto[]) null);\r\n\t\t\tAssert.fail();\r\n\t\t} catch (NullParameterException e) {\r\n\t\t\tAssert.assertTrue(e.hasCode(ExceptionCodes.MOVIMENTACAO_ESTOQUE.SALDO_PRODUTO_REQUIRED));\r\n\t\t}\r\n\t\t\t\r\n\t}", "private static void checkArg(Object paramObject) {\n/* 687 */ if (paramObject == null)\n/* 688 */ throw new NullPointerException(\"Argument must not be null\"); \n/* */ }", "@Override\n public void setNull() {\n\n }", "public void setNull (JaqyPreparedStatement stmt, int column, ParameterInfo paramInfo) throws Exception;", "@Override\n\tpublic void visit(NullValue arg0) {\n\n\t}", "@Override\n\tpublic boolean isHaveParam() {\n\t\treturn param !=null;\n\t}", "@Override\n\tpublic Parameter<?> getParameter(String id) {\n\t\treturn null;\n\t}", "protected int checkParam(Object o, String name)\n {\n if (o == null) {\n System.err.println(format(\"Parameter %s is not set\", name));\n return 1;\n }\n return 0;\n }", "@Override\n\tpublic void visit(IsNullExpression arg0) {\n\n\t}", "@Test(expected = NullPointerException.class)\n public void testMultiParamNullTemplate() {\n util.fillTemplate(\"test.template.multiparam\", \"value\", null);\n }", "@Override\n\tpublic void visit(NullValue arg0) {\n\t\t\n\t}", "public static void notNullOrEmpty(String parameter, String name)\n {\n if(parameter == null || parameter.isEmpty()) {\n throw new IllegalArgumentException(name + \" is null or empty.\");\n }\n }", "@Override\n\tpublic void visit(IsNullExpression arg0) {\n\t\t\n\t}", "@Override\n\tpublic RequestParams onParams(int paramFlag) {\n\t\treturn null;\n\t}", "private void checkForEmptyParameter(String param, String paramName)\n\t\t\tthrows MissingParameterException, InvalidParameterException {\n\t\tif (param != null && param.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(paramName + \" can not be empty\");\n\t\t}\n\t}", "@Test\n public void getRequestParam_nullParameterName_returnEmpty() throws Exception {\n when(httpServletResponse.getWriter()).thenReturn(printWriter);\n\n Optional<String> parameter =\n ServletUtils.getRequestParam(httpServletRequest, httpServletResponse, /*inputName=*/ null);\n Assert.assertFalse(parameter.isPresent());\n verify(printWriter).println(\"No null in the query URL.\");\n }", "public void testValidNullPointerException() {\r\n assertNotNull(\"setup fails\", uploadRequestValidator);\r\n try {\r\n uploadRequestValidator.valid(null);\r\n fail(\"if argument is null, throw NullPointerException\");\r\n } catch (NullPointerException e) {\r\n // good\r\n }\r\n }", "@Override\n\tpublic String[] getParameterValues(String name) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void flagNull() {\n\t\t\n\t}", "@Test\n public void testCheckNullForInjectedValue() {\n Helper.checkNullForInjectedValue(\"obj\", \"obj\");\n }", "@Test\n public void noneNullArgumentIsNullTest() throws GeneralException {\n for (String noneNullArgument : SAMLCorrelationRule.NONE_NULL_ARGUMENTS_NAME) {\n\n JavaRuleContext testRuleContext = buildTestJavaRuleContext();\n testRuleContext.getArguments().remove(noneNullArgument);\n\n assertThrows(GeneralException.class, () -> testRule.execute(testRuleContext));\n verify(testRule).internalValidation(eq(testRuleContext));\n verify(testRule, never()).internalExecute(eq(testRuleContext), any());\n }\n }", "public void testObtenerPalabrasClave() {\n \tString prueba = null; \n \t\tassertNull(prueba);\n }", "@Test\n\tvoid testeNomeNull()\n\t{\n\t\ttry\n\t\t{\n\t\t\tcontatoBasico = new Contato(null, \"Gaudencio\", \"123\");\n\t\t\tfail(\"Esperava erro ao passar nome nulo\");\n\t\t}catch(NullPointerException npe)\n\t\t{\n\t\t\t\n\t\t}\n\n\t}", "public void verificaNulo(Object parametro, String mensagem) {\n if (parametro == null) {\n throw new NullPointerException(this.msgGeral + mensagem);\n }\n }", "private void assertNullHandling(UMLMessageArgument msgArg) throws Exception\r\n\t{\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((UMLMessageArgument)null));\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((Object)null));\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((UMLSymbol)null));\r\n\t}", "private void checkFormNullInput(Point[] points) {\n // No null inputs are allowed\n if (points == null) throw new IllegalArgumentException();\n\n for (Point p : points) {\n // No null elements are allowed\n if (p == null) {\n throw new IllegalArgumentException();\n }\n }\n }", "public void setParam0(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localParam0Tracker = true;\n } else {\n localParam0Tracker = true;\n \n }\n \n this.localParam0=param;\n \n\n }", "public void setParam0(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localParam0Tracker = true;\n } else {\n localParam0Tracker = true;\n \n }\n \n this.localParam0=param;\n \n\n }", "public void setParam0(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localParam0Tracker = true;\n } else {\n localParam0Tracker = true;\n \n }\n \n this.localParam0=param;\n \n\n }", "public void setParam0(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localParam0Tracker = true;\n } else {\n localParam0Tracker = true;\n \n }\n \n this.localParam0=param;\n \n\n }", "@Test(expectedExceptions = IllegalArgumentException.class)\n public void updateNullTest() {\n reservationService.update(null);\n }", "@Override\n public void setParameter(String parameter, String value) {\n //no parameters\n }", "@Override\n public String visit(ReceiverParameter n, Object arg) {\n return null;\n }", "public void setParam(String param) {\n this.param = param == null ? null : param.trim();\n }", "public void setParam(String param) {\n this.param = param == null ? null : param.trim();\n }", "@Test\n void noRequestParamForNullableBook() throws Exception {\n this.mvc.perform(get(\"/rp/nullable_book\"))\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$\").doesNotExist());\n }", "@Override\n\tpublic boolean isParam() {\n\t\treturn false;\n\t}", "@Test\n public void testWithNullString() throws org.nfunk.jep.ParseException\n {\n String string = null;\n Stack<Object> parameters = CollectionsUtils.newParametersStack(string);\n function.run(parameters);\n assertEquals(TRUE, parameters.pop());\n }", "@Override\r\n\tpublic void visit(NullExpression nullExpression) {\n\r\n\t}", "@Test\r\n public void testRetrieveNull() {\r\n\r\n assertNull(instance.retrieve(paymentDetail1));\r\n }", "public ParseTreeNode visit(ParameterNode parameterNode) {\n return null;\n }", "@Override\n\t\tpublic String[] getParameterValues(String name) {\n\t\t\treturn null;\n\t\t}", "@Override\n\tpublic void visit(Null n) {\n\t\t\n\t}", "public void setIdPermisosNull(boolean idPermisosNull)\r\n\t{\r\n\t\tthis.idPermisosNull = idPermisosNull;\r\n\t}", "@Test\n\tpublic void testNull() throws Exception {\n\t\ttestWith(null);\n\t}", "public void clearParams() {\n setParams((String[]) null);\n }", "private static boolean paramValid(String paramName,String paramValue){\n return paramName!=null&&paramName.length()>0&&paramValue!=null&&paramValue.length()>0;\n }", "private void checkForMissingParameter(Object param, String paramName)\n\t\t\tthrows MissingParameterException {\n\t\tif (param == null) {\n\t\t\tthrow new MissingParameterException(paramName + \" can not be null\");\n\t\t}\n\t}", "@Test\r\n public void testExecute_inputNull() {\r\n \r\n assertThat((Object)processor.execute(null, ANONYMOUS_CSVCONTEXT)).isNull();\r\n \r\n }", "public void nullValues() {\r\n\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\"Null values ​​are not allowed or incorrect values\");\r\n\t}", "public void testFieldMatchCriteriaNullField() {\r\n try {\r\n new FieldMatchCriteria(null, \"str\");\r\n fail(\"testFieldMatchCriteriaNullField is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"testFieldMatchCriteriaNullField is failure.\");\r\n }\r\n }", "public static boolean nullity(String param) {\n return (param == null || param.trim().equals(\"\"));\n }", "NullValue createNullValue();", "NullValue createNullValue();", "private static void checkNull(Object value, String name) throws LateDeliverablesProcessingException {\r\n if (value == null) {\r\n throw new LateDeliverablesProcessingException(\"The \" + name + \" should not be null.\");\r\n }\r\n }", "public static void isNull(Object arg, String argName, String message) {\r\n if (arg != null) {\r\n throw new IllegalArgumentException(\"Argument \\\"\" + argName + \"\\\": \" + message);\r\n }\r\n }", "public static void isNull(Object arg, String argName) {\r\n if (arg != null) {\r\n throw new IllegalArgumentException(\"Argument \\\"\" + argName + \"\\\" must be null\");\r\n }\r\n }", "public M cssePostionNull(){if(this.get(\"cssePostionNot\")==null)this.put(\"cssePostionNot\", \"\");this.put(\"cssePostion\", null);return this;}", "public T caseParam(Param object) {\n\t\treturn null;\n\t}", "public static void ensureNotNull(String parameterName, Object value) {\n if(value == null) {\n throw LOG.parameterIsNullException(parameterName);\n }\n }", "@Test(expected = CopilotServiceInitializationException.class)\n public void testCheckNullForInjectedValueFailure() {\n Helper.checkNullForInjectedValue(null, \"obj\");\n }", "public StandardObjectConverter(Class<?> parameterType, String paramName , Boolean convertEmptyToNull , DateTimeFormat dateTimeFormat) {\n this.parameterType = parameterType;\n this.paramName = paramName;\n this.convertEmptyToNull = convertEmptyToNull;\n this.dateTimeFormat = dateTimeFormat;\n }", "public void validate() throws ParameterValuesException {\n\t\tif (txtTenTaiSan.getText().isEmpty())\n\t\t\tthrow new ParameterValuesException(\"Bạn cần nhập tên tài sản\", null);\n\t}", "@Test(expectedExceptions = ConstraintViolationException.class)\n public void testFailureNullStrategyEncrParamas() {\n action = new PopulateOIDCEncryptionParameters();\n action.setEncryptionParametersResolver(null);\n }", "private String bindNull() {\n String op;\n \n if (operator == null) {\n op = null;\n } else if (operator.equals(\"=\")) {\n op = \"IS\";\n } else if (operator.equals(\"!=\")) {\n op = \"IS NOT\";\n } else {\n op = operator;\n }\n if (column != null && skipNulls) {\n return \"1 = 1\";\n } else {\n return cond(column, op, \"NULL\");\n }\n }", "@Override\r\n\tpublic String getFirstArg() {\n\t\treturn null;\r\n\t}", "public T caseParameter(Parameter object)\n {\n return null;\n }", "protected boolean isEmptyValue(final String parameter) {\n // String value = parameters.get(parameter);\n // return isEmptyString(value);\n return false;\n }", "public static void confirmNotNull(Object... o) throws InvalidParameterException {\n\t\tfor (Object object : o) {\n\t\t\tif (object == null) {\n\t\t\t\tthrow new InvalidParameterException(\"Invalid parameters\");\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\tpublic Object[] getParameters() {\n\t\t\treturn null;\n\t\t}", "private static void checkArg(Object s) {\n if (s == null) {\n throw new NullPointerException(\"Argument must not be null\");\n }\n }", "@Test(expected = NullPointerException.class)\n public void formatBooleanNullAsInputTest() {\n Boolean someBoolean = null;\n Format.formatBoolean(someBoolean);\n }", "public void testOtacFieldDefaultNull()\n {\n validator.validate(form, errors);\n assertTrue(errors.hasErrors()); // cannot be null\n }", "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 }", "@Override\r\n public Memory expParam(ListExpNode lexp, HeadersNode ent) {\r\n return null;\r\n }", "private void checkForEmptyLine() throws OutmatchingParametersToMethodCall {\n if (this.params.isEmpty() && method.getParamAmount() != 0) {\n throw new OutmatchingParametersToMethodCall();\n } else if (method.getParamAmount() == 0 && !this.params.isEmpty()) {\n throw new OutmatchingParametersToMethodCall();\n }\n }", "@OfMethod({\"setNull(java.lang.String, int)\",\n \"setNull(java.lang.String,int,java.lang.String)\",\n \"setNull(int, int)\",\n \"setNull(int,int,java.lang.String)\"})\n public void testSetNull() throws Exception {\n CallableStatement instance = newClosedCall();\n\n try {\n instance.setNull(getParameterName(), getParameterType());\n fail(\"Allowed set null by parameter name and type after close.\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n\n try {\n instance.setNull(getParameterName(), getParameterType(), getParameterTypeName());\n fail(\"Allowed set null by parameter name, type and type name after close.\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n\n try {\n instance.setNull(getParameterIndex(), getParameterType());\n fail(\"Allowed set null by parameter index and type after close.\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n\n try {\n instance.setNull(getParameterIndex(), getParameterType(), getParameterTypeName());\n fail(\"Allowed set null by parameter index, type and type name after close.\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n }", "@Override\r\n\tpublic Result<?> preHandle(RequestParam<?> param) {\n\t\treturn null;\r\n\t}", "public boolean hasParameter(){\n\t\tif (parameterType==null)\n\t\t\treturn false;\n\t\telse{\n\t\t\treturn true;\n\t\t}\n\t}", "private void validateParameters() {\r\n if (command == null) {\r\n throw new BuildException(\r\n \"'command' parameter should not be null for coverity task.\");\r\n }\r\n\r\n }", "@Override\n\tpublic ParameterMetaData getParameterMetaData() throws SQLException {\n\t\treturn null;\n\t}", "public M cssePersonNull(){if(this.get(\"cssePersonNot\")==null)this.put(\"cssePersonNot\", \"\");this.put(\"cssePerson\", null);return this;}", "@Test\n public void testCheckNull() {\n Helper.checkNull(\"non-null\", \"non-null name\");\n }", "public static void notNullArgument(Object o, String msg) throws AppException {\n\t\tif (o == null) {\n\t\t\tthrow new AppException(AppExceptionType.BAD_ARGUMENTS, msg);\n\t\t}\n\t}", "public static <T> void checkNull(T obj){\n if(obj == null){\n throw new IllegalArgumentException(\"Object is null\");\n }\n }", "public void testGetMessageNullPointerException() {\r\n assertNotNull(\"setup fails\", uploadRequestValidator);\r\n try {\r\n uploadRequestValidator.getMessage(null);\r\n fail(\"if argument is null, throw NullPointerException\");\r\n } catch (NullPointerException e) {\r\n // good\r\n }\r\n }", "@Test(expectedExceptions = IllegalArgumentException.class)\n void createNullTest() {\n reservationService.create(null);\n }", "@Implementation\n protected String getParameters(String keys) {\n return null;\n }", "public static void nonNull(Object arg, String argName, String message) {\r\n if (arg == null) {\r\n throw new IllegalArgumentException(\"Argument \\\"\" + argName + \"\\\": \" + message);\r\n }\r\n }", "@Test(expected = IllegalArgumentException.class)\n public void test_update_userNull() throws Exception {\n instance.update(null);\n }", "@Override\r\n\tpublic ResponseResult queryPayLogData(Map<String, String> param) {\r\n\t\treturn null;\r\n\t}" ]
[ "0.7377059", "0.6749558", "0.67192626", "0.65690714", "0.65689415", "0.64804924", "0.64587265", "0.6357031", "0.6302542", "0.6246477", "0.6234701", "0.61987716", "0.6176135", "0.6152959", "0.61308825", "0.61289173", "0.6097273", "0.6096549", "0.6096499", "0.6089525", "0.60318804", "0.601233", "0.5981283", "0.59785926", "0.5972298", "0.5958835", "0.59547555", "0.59044015", "0.5902093", "0.5895086", "0.5872635", "0.5843453", "0.5822547", "0.5820753", "0.5811243", "0.5810774", "0.5805929", "0.5805929", "0.5805929", "0.5805929", "0.5799381", "0.5784807", "0.5784147", "0.57703656", "0.57703656", "0.57697415", "0.57535046", "0.57529795", "0.574382", "0.57289773", "0.5726172", "0.56864583", "0.5678398", "0.5665182", "0.5650589", "0.5649491", "0.56476134", "0.564341", "0.5624293", "0.561153", "0.5606155", "0.55945486", "0.5577881", "0.5577881", "0.55774426", "0.5569165", "0.5568774", "0.556469", "0.555628", "0.5555534", "0.55487937", "0.5541962", "0.55365956", "0.5532308", "0.551662", "0.55102605", "0.5508509", "0.5490925", "0.5485725", "0.54746217", "0.5470566", "0.54682124", "0.5465031", "0.54608876", "0.54608333", "0.54581314", "0.544126", "0.54357725", "0.54313564", "0.54291046", "0.5424679", "0.54216015", "0.5419645", "0.54104084", "0.5409225", "0.54076976", "0.5400431", "0.5396456", "0.53954214", "0.53921133", "0.538916" ]
0.0
-1
Getting the intent and bundle:
private void extractDataFromBundle() { Intent intent = getIntent(); Bundle bundle = intent.getBundleExtra(MainActivity.PRACTICE_GAME_BUNDLE_KEY); mDifficulty = (Difficulty) bundle.getSerializable(MainActivity.DIFFICULTY_KEY); mPlayerGamePiece = (GamePiece) bundle.getSerializable(MainActivity.GAME_PIECE_KEY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void getBundleData(Intent intent);", "public void getBundle (){\n idTemp = getIntent().getStringExtra(\"id\");\n }", "@Override\n\tprotected void getIntentData(Bundle savedInstanceState) {\n\n\t}", "private void getExtrasFromCallingActivity() {\n extras = getIntent().getExtras();\n if (extras != null) {\n testIdString = extras.getString(\"TEST_ID_FOR_QUESTIONS\");\n } else {\n testIdString = \"-1\";\n }\n }", "public Bundle getExtras() {\n }", "public static Bundle getExtrasBundle(Bundle intentExtras) {\n if (!Constants.IS_AMAZON) {\n return intentExtras.getBundle(Constants.APPBOY_PUSH_EXTRAS_KEY);\n } else {\n return intentExtras;\n }\n }", "public static Bundle m4b(Intent intent) {\n Bundle a = m3a(intent);\n if (a == null) {\n return null;\n }\n return a.getBundle(AppLinkData.ARGUMENTS_EXTRAS_KEY);\n }", "public Bundle getBundle() {\r\n\r\n\r\n Bundle args = new Bundle();\r\n args.putString(\"message\", \"takeAPicture\");\r\n\r\n return args;\r\n }", "public void getintent() {\n Intent intent = this.getIntent();\n acceptDetailsModel = (AcceptDetailsModel) intent.getSerializableExtra(\"menu_item\");\n }", "private void getIntentValues() {\n\n// itemname= getIntent().getExtras().getString(IntentsConstants.item_name);\n// itemPrice = getIntent().getExtras().getDouble(IntentsConstants.item_price);\n Bundle bundle = getArguments();\n menusItem= (MenusItem) bundle.getSerializable(\"Item\");\n itemname=menusItem.getName();\n itemPrice=menusItem.getPrice();\n\n}", "public static Bundle getBundle(Activity c) {\n\t\treturn c.getIntent().getExtras();\n\t}", "protected abstract Intent getIntent();", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n intent = getIntent();\n }", "private void getIntentData() {\r\n if (getIntent() != null && getIntent().getExtras() != null) {\r\n // Handling intent data from DirectoryDetailsActivity class\r\n if (Constant.ALBUM_TYPE.equalsIgnoreCase(getIntent().getExtras().getString(Constant.TYPE))) {\r\n position = getIntent().getIntExtra(Constant.POSITION, 0);\r\n nameKey = getIntent().getStringExtra(Constant.KEY_NAME);\r\n } else if (Constant.LIST_TYPE.equalsIgnoreCase(getIntent().getExtras().getString(Constant.TYPE))) {\r\n imageDataModel = getIntent().getParcelableExtra(Constant.DATA);\r\n } else if (Constant.SECURE_TAB.equalsIgnoreCase(getIntent().getExtras().getString(Constant.TYPE))) {\r\n imageDataModel = getIntent().getParcelableExtra(Constant.DATA);\r\n } else {\r\n // Handling other intent data like camera intent\r\n Uri uri = getIntent().getData();\r\n GalleryHelper.getImageFolderMap(this);\r\n File file = new File(getRealPathFromURI(uri));\r\n nameKey = FileUtils.getParentName(file.getParent());\r\n GalleryHelperBaseOnId.getMediaFilesOnIdBasis(this, GalleryHelper.imageFolderMap.get(nameKey).get(0).getBucketId());\r\n }\r\n }\r\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}", "void mo21580A(Intent intent);", "private void getDataFromMainActivity(){\n Intent intent = getIntent();\n Bundle bundle = intent.getExtras();\n site = bundle.getString(\"site\");\n }", "public Intent getIntent() {\n return mIntent;\n }", "String getExtra();", "public Intent getIntent() {\n return mIntent;\n }", "public static Bundle m3a(Intent intent) {\n return intent.getBundleExtra(\"al_applink_data\");\n }", "@Override\n\tprotected void onHandleIntent(Intent arg0) {\n\t\t\n\t}", "public Bundle getExtras() {\n return mBundle.getBundle(KEY_EXTRAS);\n }", "private void getIncomingIntent()\n {\n if(getIntent().hasExtra(\"Title\")\n && getIntent().hasExtra(\"Time\")\n && getIntent().hasExtra(\"Date\")\n && getIntent().hasExtra(\"Duration\")\n && getIntent().hasExtra(\"Location\")\n && getIntent().hasExtra(\"EventDetails\"))\n {\n Title = getIntent().getStringExtra(\"Title\");\n Time = getIntent().getStringExtra(\"Time\");\n Date = getIntent().getStringExtra(\"Date\");\n Duration = getIntent().getStringExtra(\"Duration\");\n Location = getIntent().getStringExtra(\"Location\");\n EventDetails = getIntent().getStringExtra(\"EventDetails\");\n\n setData(Title,Time,Date,Duration,Location,EventDetails);\n }\n }", "private void handleIntent() {\n // Get the intent set on this activity\n Intent intent = getIntent();\n\n // Get the uri from the intent\n Uri uri = intent.getData();\n\n // Do not continue if the uri does not exist\n if (uri == null) {\n return;\n }\n\n // Let the deep linker do its job\n Bundle data = mDeepLinker.buildBundle(uri);\n if (data == null) {\n return;\n }\n\n // See if we have a valid link\n DeepLinker.Link link = DeepLinker.getLinkFromBundle(data);\n if (link == null) {\n return;\n }\n\n // Do something with the link\n switch (link) {\n case HOME:\n break;\n case PROFILE:\n break;\n case PROFILE_OTHER:\n break;\n case SETTINGS:\n break;\n }\n\n String msg;\n long id = DeepLinker.getIdFromBundle(data);\n if (id == 0) {\n msg = String.format(\"Link: %s\", link);\n } else {\n msg = String.format(\"Link: %s, ID: %s\", link, id);\n }\n\n Toast.makeText(this, msg, Toast.LENGTH_LONG).show();\n }", "private String getStringExtra(Bundle savedInstanceState, String strWhich) {\n String strRet = (savedInstanceState != null ? savedInstanceState.getString(strWhich) : \"\");\r\n \r\n if (strRet == \"\") {\r\n \tBundle extras = getIntent().getExtras(); \r\n \tstrRet = (extras != null ? extras.getString(strWhich) : \"\");\r\n }\r\n \r\n return strRet;\r\n\r\n\t}", "@Override\n protected void onHandleIntent(Intent intent) {\n\n }", "protected void readArguments(Bundle bundle) {\n\n }", "@Override\n\tprotected void onHandleIntent(Intent intent) {\n\n\t}", "private void getIntentData() {\n if (getIntent() != null) {\n destinationLat = getIntent().getDoubleExtra(\"destinationLat\", 48.893478);\n destinationLng = getIntent().getDoubleExtra(\"destinationLng\", 2.334595);\n }\n }", "private void BundleData(Intent intent) {\n bundle=new Bundle();\n bundle.putString(\"FNAME\",fname);\n bundle.putString(\"LNAME\",lname);\n bundle.putString(\"LOCALITY\",locality);\n bundle.putString(\"CITY\",city);\n bundle.putInt(\"PINCODE\",pincode);\n bundle.putString(\"TIME_TO_CALL\",timers);\n bundle.putString(\"PHONE\",phone);\n bundle.putString(\"ALTPHONE\",altphone);\n bundle.putString(\"EMAIL\",emailid);\n intent.putExtras(bundle);\n }", "public static void seeIntent(Context context, Intent intent, @Nullable Bundle savedInstanceState) {\n if (savedInstanceState != null){\n return;\n }\n\n Optimobile.seeIntent(context, intent);\n }", "public static Object getExtraObject(Activity context, String key) {\n \tObject param = null;\n \tBundle bundle = context.getIntent().getExtras();\n \tif(bundle!=null){\n \t\tparam = bundle.get(key);\n \t}\n \treturn param;\n\t}", "public Intent getRequestIntent() {\n return requestIntent;\n }", "com.google.cloud.dialogflow.cx.v3.Intent getIntent();", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t\thandleIntent(getIntent());\r\n\t}", "public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n Intent intent = getIntent();\n if (intent != null) {\n this.Z = intent.getStringExtra(\"extra_deep_link_ots\");\n this.Y = intent.getStringExtra(\"extra_deep_link_email\");\n }\n }", "public void onCreate(Bundle bundle) {\n g.super.onCreate(bundle);\n Intent intent = getIntent();\n if (intent != null) {\n String action = intent.getAction();\n Bundle extras = intent.getExtras();\n if (TextUtils.isEmpty(action)) {\n finish();\n } else if (!checkAction(action)) {\n String str = TAG;\n Log.e(str, \"invalid action: \" + action);\n finish();\n } else if (!resolveAction(action, extras)) {\n String reflectGetReferrer = PackageUtil.reflectGetReferrer(this);\n if (extras != null && TextUtils.equals(reflectGetReferrer, getPackageName())) {\n String string = extras.getString(FRAGMENT_NAME);\n Bundle bundle2 = extras.getBundle(FRAGMENT_ARGS);\n if (bundle == null) {\n launchFragment(string, bundle2);\n }\n }\n }\n }\n }", "protected String getBundleData() {\n Bundle bundle = getIntent().getExtras();\n StringBuilder temp = new StringBuilder();\n SessionManager session = new SessionManager(getApplicationContext());\n\n temp.append(\"User: \").append(session.getUserName()).append(\"\\r\\n\");\n temp.append(\"Layout: \").append(getBundle(bundle, \"layout\")).append(\"\\r\\n\");\n temp.append(\"Orientation: \").append(getBundle(bundle, \"orientation\")).append(\"\\r\\n\");\n temp.append(\"Variation: \").append(getBundle(bundle, \"variation\")).append(\"\\r\\n\");\n temp.append(\"Hardwareaddons: \").append(getBundle(bundle, \"hardwareaddons\")).append(\"\\r\\n\");\n temp.append(\"Input: \").append(getBundle(bundle, \"input\")).append(\"\\r\\n\");\n temp.append(\"Posture: \").append(getBundle(bundle, \"posture\")).append(\"\\r\\n\");\n temp.append(\"Externalfactors: \").append(getBundle(bundle, \"externalfactors\")).append(\"\\r\\n\").append(\"\\r\\n\");\n //data = temp.toString();\n return temp.toString();\n }", "private void getAndSetIncomingIntent(){\n if (getIntent().hasExtra(\"asso\")) {\n Log.d(TAG, getIntent().getStringExtra(\"asso\"));\n edt_asso_name.setText(getIntent().getStringExtra(\"asso\"));\n }\n if (getIntent().hasExtra(\"school\")) {\n edt_school.setText(getIntent().getStringExtra(\"school\"));\n }\n if (getIntent().hasExtra(\"purpose\")) {\n edt_purpose.setText(getIntent().getStringExtra(\"purpose\"));\n }\n if (getIntent().hasExtra(\"link\")) {\n edt_link.setText(getIntent().getStringExtra(\"link\"));\n }\n if (getIntent().hasExtra(\"type\")) {\n selectedSpinnerType = getIntent().getStringExtra(\"type\");\n }\n\n }", "private void showIntentInfo(Intent intent, TextView textView){\n StringBuilder infoBuilder = new StringBuilder();\n String action = intent.getAction();\n infoBuilder.append(\"Action=\");\n infoBuilder.append(action != null ? action : \"** NO Action **\");\n infoBuilder.append(\"\\n\");\n\n Bundle extras = intent.getExtras();\n if(extras == null){\n infoBuilder.append(\"** NO Extras **\");\n } else {\n infoBuilder.append(\"** Extras **\\n\");\n Set<String> keySet = extras.keySet();\n for(String key : keySet) {\n String value = extras.get(key).toString();\n infoBuilder.append(key);\n infoBuilder.append(\"=\");\n infoBuilder.append(value);\n infoBuilder.append(\"\\n\");\n }\n }\n textView.setText(infoBuilder.toString());\n }", "private void getIncomingContactData() {\n // create bundle object that refers to the bundle inside the intent\n Bundle extras = getIntent().getExtras();\n contact = getObjectFromJSONString( extras.getString(\"CONTACT\") );\n displayContactDetails();\n }", "public static String getExtraString(Activity context, String key) {\n \tString param = \"\";\n \tBundle bundle = context.getIntent().getExtras();\n \tif(bundle!=null){\n \t\tparam = bundle.getString(key);\n \t}\n \treturn param;\n\t}", "public String getIntent() {\n/* 329 */ return getCOSObject().getNameAsString(COSName.IT);\n/* */ }", "public void handleIntent(Intent intent, Integer num) {\n Parcel obtain;\n Parcel obtain2;\n boolean z;\n if (intent == null) {\n if (num != null) {\n stopSelf(num.intValue());\n }\n return;\n }\n StringBuilder sb = new StringBuilder();\n sb.append(\"myPid: \");\n sb.append(Process.myPid());\n Log.d(\"SettingsBackup\", prependPackageName(sb.toString()));\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"intent: \");\n sb2.append(intent);\n Log.d(\"SettingsBackup\", prependPackageName(sb2.toString()));\n StringBuilder sb3 = new StringBuilder();\n sb3.append(\"extras: \");\n sb3.append(intent.getExtras());\n Log.d(\"SettingsBackup\", prependPackageName(sb3.toString()));\n String action = intent.getAction();\n ResultReceiver resultReceiver = (ResultReceiver) intent.getParcelableExtra(\"result_receiver\");\n if (\"miui.action.CLOUD_BACKUP_SETTINGS\".equals(action)) {\n if (resultReceiver != null) {\n Bundle backupSettings = backupSettings();\n if (backupSettings == null) {\n Log.e(\"SettingsBackup\", prependPackageName(\"bundle result is null after backupSettings\"));\n }\n resultReceiver.send(0, backupSettings);\n }\n } else if (\"miui.action.CLOUD_RESTORE_SETTINGS\".equals(action) && resultReceiver != null) {\n IBinder binder = intent.getExtras().getBinder(\"data_package\");\n obtain = Parcel.obtain();\n obtain2 = Parcel.obtain();\n try {\n binder.transact(2, obtain, obtain2, 0);\n z = restoreSettings((DataPackage) obtain2.readParcelable(getClass().getClassLoader()), intent.getIntExtra(\"version\", -1));\n obtain.recycle();\n obtain2.recycle();\n } catch (RemoteException e) {\n Log.e(\"SettingsBackup\", \"RemoteException in onHandleIntent()\", e);\n } catch (BadParcelableException e2) {\n Log.e(\"SettingsBackup\", \"BadParcelableException when read readParcelable\", e2);\n } catch (ClassCastException unused) {\n Log.e(\"SettingsBackup\", \"ClassCastException when cast DataPackage\");\n } catch (Throwable th) {\n obtain.recycle();\n obtain2.recycle();\n throw th;\n }\n if (!z) {\n resultReceiver.send(0, new Bundle());\n } else {\n resultReceiver.send(1, null);\n }\n StringBuilder sb4 = new StringBuilder();\n sb4.append(\"r.send()\");\n sb4.append(Thread.currentThread());\n Log.d(\"SettingsBackup\", prependPackageName(sb4.toString()));\n }\n if (num != null) {\n stopSelf(num.intValue());\n }\n obtain.recycle();\n obtain2.recycle();\n z = false;\n if (!z) {\n }\n StringBuilder sb42 = new StringBuilder();\n sb42.append(\"r.send()\");\n sb42.append(Thread.currentThread());\n Log.d(\"SettingsBackup\", prependPackageName(sb42.toString()));\n if (num != null) {\n }\n }", "public static String getStringIntent(Intent intent, String name) {\n\t\tString retval = null;\n\t\tif (intent != null) {\n\t\t\tif (intent.hasExtra(name))\n\t\t\t\tretval = intent.getStringExtra(name);\n\t\t}\n\t\treturn retval;\n\t}", "@Override\n protected void onHandleIntent(Intent workIntent) {\n }", "public static void m128155a(Activity activity, Bundle bundle, int i, int i2) {\n Intent intent = new Intent(activity, MvChoosePhotoActivity.class);\n intent.putExtras(bundle);\n intent.putExtra(\"key_choose_request_code\", i);\n intent.putExtra(\"key_start_activity_request_code\", i2);\n activity.startActivityForResult(intent, i2);\n }", "@Override\n protected void getFromIntent() {\n this.groupID = getIntent().getStringExtra(\"groupId\");\n this.groupName = getIntent().getStringExtra(\"groupName\");\n }", "private void getDataFromIntent(Intent intent) {\n panAadharCardDetail = intent.getParcelableExtra(\"panAadharDetail\");\n card_type = intent.getIntExtra(\"card_type\", 0);\n imageFileUri = intent.getStringExtra(\"imageFile\");\n }", "public void intentHandler() {\n Intent intent = getIntent();\n if (intent.hasExtra(\"DATA\")) {\n data = (String[]) getIntent().getSerializableExtra(\"DATA\");\n recievedPosition = (int) getIntent().getSerializableExtra(\"POS\");\n if(recievedPosition != 0){\n IOException e = new IOException();\n try {\n itemArrAdapt.updateItem(recievedPosition, data, e);\n this.setPrefs();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n } else {\n // Start Normal\n }\n }", "@Override\n public void onClick(View view) {\n Intent myIntent = new Intent(DriverPrefrActivity.this, SearchParkActivity.class);\n //Creating a bundle\n Bundle bundle = new Bundle();\n //Adding values to bundle\n bundle.putString(\"driverlargecar\", String.valueOf(largecar));\n bundle.putString(\"drivertype\", String.valueOf(type));\n bundle.putString(\"driverprice\", String.valueOf(price));\n bundle.putString(\"driverdistancepklot\", String.valueOf(distpklot));\n\n myIntent.putExtra(\"mybundle\", bundle);\n startActivity(myIntent);\n }", "public abstract String getIntentActionString();", "static long m43010a(Intent intent) {\n if (intent == null) {\n return -1;\n }\n return intent.getLongExtra(\"com.tonyodev.fetch.extra_id\", -1);\n }", "protected Intent getStravaActivityIntent()\n {\n return new Intent(this, MainActivity.class);\n }", "Bundle getOpenInOtherWindowActivityOptions();", "@Override\n\tprotected void obtainIntentValue() {\n\n\t}", "public final void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n C1341rz aW = mo8628aW();\n aW.mo15855c((int) C0126R.string.tp_other_payment_methods_title);\n aW.mo15860d(12);\n aW.mo15865f((int) C0126R.string.common_back);\n AccountInfo accountInfo = (AccountInfo) getIntent().getParcelableExtra(\"extra_account_info\");\n if (accountInfo == null) {\n bnsl bnsl = (bnsl) f108826f.mo68387b();\n bnsl.mo68432a(\"com.google.android.gms.tapandpay.tokenization.SelectOtherPaymentMethodChimeraActivity\", \"onCreate\", 74, \":com.google.android.gms@201515033@20.15.15 (120300-306758586)\");\n bnsl.mo68405a(\"Activity started without account info, finishing\");\n finish();\n return;\n }\n this.f108827b = getIntent().getStringExtra(\"extra_calling_package\");\n if (this.f108829d == null) {\n this.f108829d = new atam(getApplicationContext(), accountInfo);\n }\n setContentView((int) C0126R.C0128layout.tp_select_other_payment_method_activity);\n this.f108828c = new atqn(this, new ArrayList());\n ((ListView) findViewById(C0126R.C0129id.PaymentMethodList)).setAdapter((ListAdapter) this.f108828c);\n }", "public Intent getTrackedIntent(){\n Intent trackedIntent = new Intent(context, PPOpenTrackerActivity.class);\n trackedIntent.putExtra(PushPrime.NOTIFICATION, this);\n return trackedIntent;\n }", "private void setBundles(Bundle bundle, Intent intent) {\n bundle.putString(getString(R.string.uuid_key), mUserId);\n bundle.putString(getString(R.string.password_key), mPasswordInput.getText().toString());\n intent.putExtra(getString(R.string.uuid_key), mUserId);\n intent.putExtra(getString(R.string.password_key), mPasswordInput.getText().toString());\n }", "private Intent m34055b(Context context) {\n Intent intent = new Intent();\n String str = \"package\";\n intent.putExtra(str, context.getPackageName());\n intent.putExtra(Constants.FLAG_PACKAGE_NAME, context.getPackageName());\n intent.setData(Uri.fromParts(str, context.getPackageName(), null));\n String str2 = \"com.huawei.systemmanager\";\n intent.setClassName(str2, \"com.huawei.permissionmanager.ui.MainActivity\");\n if (m34054a(context, intent)) {\n return intent;\n }\n intent.setClassName(str2, \"com.huawei.systemmanager.addviewmonitor.AddViewMonitorActivity\");\n if (m34054a(context, intent)) {\n return intent;\n }\n intent.setClassName(str2, \"com.huawei.notificationmanager.ui.NotificationManagmentActivity\");\n if (m34054a(context, intent)) {\n return intent;\n }\n return m34053a(context);\n }", "public void onNewIntent(Intent intent) {\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_ingredient);\n\n spinner = findViewById(R.id.progressBarI);\n spinner.setVisibility(View.GONE);\n\n Intent intent = getIntent();\n\n // check from which activity ingredient was chosen\n if (intent.getStringExtra(\"recipeId\") != null) {\n recipe = intent.getStringExtra(\"recipeId\");\n message = \"recipes/\" + recipe + \"/information\";\n\n // get ingredient connected to recipe\n IngredientRequest request = new IngredientRequest(this, message);\n request.getIngredients(this, message);\n }\n\n else if (intent.getStringExtra(\"query\") != null) {\n message = intent.getStringExtra(\"query\");\n\n // get ingredient connected to query\n AutoIngredientRequest autoRequest = new AutoIngredientRequest(this, message);\n autoRequest.getAutoIngredients(this, message);\n }\n }", "static /* synthetic */ byte[] m10276k(Intent intent) {\n if (intent == null) {\n return null;\n }\n Parcel obtain = Parcel.obtain();\n obtain.setDataPosition(0);\n intent.writeToParcel(obtain, 0);\n byte[] marshall = obtain.marshall();\n obtain.recycle();\n return marshall;\n }", "public @Nullable Bundle getExtras() {\n try {\n return mSessionBinder.getExtras();\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling getExtras\", e);\n }\n return null;\n }", "@SuppressLint(\"HandlerLeak\")\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.intent_zhiwei_present);\n\t\tsetupView();\n\t\t\n\t\tresume_id = getIntent().getStringExtra(\"resume_id\");\n\t\tJianliParser parser = new JianliParser(this);\n\t\tparser.getIntentInfo(resume_id);\n\t\t\n\t\treceiver = new IntentReceiver();\n\t\tIntentFilter filter = new IntentFilter();\n\t\tfilter.addAction(LessonApplication.GET_QIUZHI_INTENT_FROM_NET_SUCCESS);\n\t\tfilter.addAction(LessonApplication.GET_QIUZHI_INTENT_FROM_NET_ERROR);\n\t\tregisterReceiver(receiver, filter);\n\t\t\n\t\tprogressDialog = ProgressDialog.show(this, \"\", \"正在获取数据...\");\n\t\tprogressDialog.dismiss();\n\t\t\n\t\tmHandler = new Handler() {\n\t\t\t@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tint what = msg.what;\n\t\t\t\tif (1 == what) {\n\t\t\t\t\tToast.makeText(QiuZhiPresentActivity.this, \"获取信息成功\", 2000).show();\n\t\t\t\t} else if (2 == what) {\n\t\t\t\t\tToast.makeText(QiuZhiPresentActivity.this, \"获取信息失败\", 2000).show();\n\t\t\t\t}\n\t\t\t\tsuper.handleMessage(msg);\n\n\t\t\t}\n\t\t};\n\t}", "void onCreate(Intent intent);", "@Override\n public void onCreate(Bundle savedInstanceBundle){\n super.onCreate(savedInstanceBundle);\n if (getArguments() != null){\n mParam1 = getArguments().getString(ARG_PARAM1);\n mParam2= getArguments().getString(ARG_PARMA2);\n }\n\n }", "void intentHasBeenReceivedThroughTheBroadCast(Intent intent);", "@Override\n protected void onNewIntent(Intent intent){\n handleIntent(intent);\n }", "public void onCreate(Bundle bundle) {\n TraceMachine.startTracing(\"PayResultActivity\");\n try {\n TraceMachine.enterMethod(this._nr_trace, \"PayResultActivity#onCreate\", null);\n } catch (NoSuchFieldError e) {\n while (true) {\n TraceMachine.enterMethod(null, \"PayResultActivity#onCreate\", null);\n }\n }\n super.onCreate(bundle);\n Intent intent = getIntent();\n if ((!TextUtils.isEmpty(intent.getStringExtra(\"orderSuffix\")) ? 1 : 0) != 0) {\n C0575a.f463a = intent.getStringExtra(\"phonecashier.pay.hash\");\n m751a(this, C0575a.f463a, intent.getStringExtra(\"orderSuffix\"), intent.getStringExtra(\"externalPkgName\"));\n m750a((Activity) this, 300);\n TraceMachine.exitMethod();\n return;\n }\n String stringExtra = intent.getStringExtra(\"phonecashier.pay.result\");\n int intExtra = intent.getIntExtra(\"phonecashier.pay.resultOrderHash\", 0);\n if (intExtra == 0 || !TextUtils.equals(C0575a.f463a, String.valueOf(intExtra))) {\n C0590a.m801a(\"biz\", \"SchemePayWrongHashEx\", \"Expected \" + C0575a.f463a + \", got \" + intExtra);\n m752a(C0575a.f463a);\n m750a((Activity) this, 300);\n TraceMachine.exitMethod();\n return;\n }\n if (TextUtils.isEmpty(stringExtra)) {\n m752a(C0575a.f463a);\n } else {\n m753a(stringExtra, C0575a.f463a);\n }\n C0575a.f463a = \"\";\n m750a((Activity) this, 300);\n TraceMachine.exitMethod();\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Uri fileUri = intent.getData();\n String packageName = intent.getData().getSchemeSpecificPart();\n String action = intent.getAction();\n\n if(action.equals(Intent.ACTION_PACKAGE_ADDED)) {\n Log.d(TAG, \"Package ADDED : \" + packageName);\n Log.d(TAG, \"Package URI(?) : \" + fileUri);\n // Intent intentOfPackageName = new Intent(context, MainActivity.class);\n // intentOfPackageName.putExtra(\"packageName\", packageName);\n appHash = getSha256FromApk(context, packageName);\n Log.d(TAG, \"App Hash Result (SHA-256) : \" + appHash);\n } else if(action.equals(Intent.ACTION_PACKAGE_REMOVED)) {\n Log.d(TAG, \"Package REMOVED : \" + packageName);\n }\n }", "com.google.cloud.dialogflow.cx.v3.IntentOrBuilder getIntentOrBuilder();", "public String getArguments() {\r\n return key.getArguments();\r\n }", "public Bundle extra() {\n if (mExtra == null)\n mExtra = new Bundle();\n return mExtra;\n }", "private void loadFromBundle() {\n Bundle data = getIntent().getExtras();\n if (data == null)\n return;\n Resource resource = (Resource) data.getSerializable(PARAMETERS.RESOURCE);\n if (resource != null) {\n String geoStoreUrl = data.getString(PARAMETERS.GEOSTORE_URL);\n loadGeoStoreResource(resource, geoStoreUrl);\n }\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n if (getArguments() != null) {\n mParam1 = getArguments().getString(ARG_PARAM1);\n mParam2 = getArguments().getString(ARG_PARAM2);\n }\n data = getArguments().getParcelableArrayList(\"data\");\n places = getActivity().getIntent().getStringExtra(\"places\");\n }", "private void initArguments() {\n Bundle bundle = getArguments();\n\n if (bundle != null) {\n if (bundle.containsKey(EXTRA_MOVIE_ID)) {\n int movieId = bundle.getInt(EXTRA_MOVIE_ID, 0);\n\n if (movieId > 0) {\n mMovie = MoviesRepository.getInstance(getActivity()).getMovie(movieId);\n }\n }\n }\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tBundle bundle=getArguments();\n\t\ttype=bundle.getInt(\"type\", 0);\n\t\t\n\t}", "public static void m128154a(Activity activity, Bundle bundle, int i) {\n Intent intent = new Intent(activity, MvChoosePhotoActivity.class);\n intent.putExtras(bundle);\n intent.putExtra(\"key_choose_request_code\", 10001);\n activity.startActivity(intent);\n }", "void processIntent(Intent intent) {\n Parcelable[] rawMsgs = intent.getParcelableArrayExtra(\n NfcAdapter.EXTRA_NDEF_MESSAGES);\n // only one message sent during the beam\n NdefMessage msg = (NdefMessage) rawMsgs[0];\n // record 0 contains the MIME type, record 1 is the AAR, if present\n menuInfo = new String(msg.getRecords()[0].getPayload());\n \n Toast.makeText(getApplicationContext(), menuInfo, Toast.LENGTH_LONG).show();\n }", "public Intent getIntent() {\n return mInviteIntent;\n }", "boolean mo3210a(Intent intent);", "public Intent getActivityIntent() {\n Intent intent = new Intent(this.context, InterstitialActivity.class);\n intent.setFlags(268435456);\n intent.addFlags(67108864);\n intent.putExtra(\"id\", getPlacementID());\n if (this.setAutoPlay) {\n intent.putExtra(\"auto_play\", this.autoPlay);\n }\n if (this.setCanClose) {\n intent.putExtra(\"can_close\", isBackButtonCanClose());\n }\n if (this.setMute) {\n intent.putExtra(\"mute\", getMute());\n }\n intent.putExtra(\"cat\", getCategories());\n intent.putExtra(\"pbk\", getPostback());\n intent.putExtra(\"b_color\", getButtonColor());\n intent.putExtra(\"skip_title\", getSkipText());\n intent.putExtra(\"creative\", getCreative());\n return intent;\n }", "String getArguments();", "public void startSecondActivity(){\n\n Bundle b = new Bundle();\n b.putString(\"LM\", \"There are \" + count + \" faces in the photo\");\n if (tts.handler != null){\n Message msg = tts.handler.obtainMessage(0);\n msg.setData(b);\n tts.handler.sendMessage(msg);\n }\n }", "@Override\n public void onNewIntent(Intent intent) {\n }", "public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n setContentView((int) R.layout.activity_set_my_other_info);\n this.a = getIntent().getStringExtra(\"setting_what\");\n c();\n }", "@Override\n protected void onNewIntent(Intent intent) {\n }", "public interface IntentStarter {\n void startActivityForResult(ResultRequestor requestor, Intent intent);\n}", "boolean hasIntent();", "public void mo1401a(Intent intent) {\n }", "void openActivity() {\n Intent intent = new Intent(\"myaction\");\n Bundle bundle = new Bundle();\n bundle.putString(\"name\", \"hui\");\n intent.putExtras(bundle);\n startActivityForResult(intent, 1);\n }", "@Override\n public void onNewIntent(Activity activity, Intent data) {\n }", "@Override\r\nprotected void onNewIntent(Intent intent) {\n\tsuper.onNewIntent(intent);\r\nSystem.out.println(\"onNewIntent\");\r\n}", "public Bundle getExtras() {\n/* 1775 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private void receiveData()\n {\n Intent i = getIntent();\n productSelected = Paper.book().read(Prevalent.currentProductKey);\n vendorID = i.getStringExtra(\"vendorID\");\n if (productSelected != null) {\n\n productName = i.getStringExtra(\"productName\");\n productImage = i.getStringExtra(\"imageUrl\");\n productLongDescription = i.getStringExtra(\"productLongDescription\");\n productCategory = i.getStringExtra(\"productCategory\");\n productPrice = i.getStringExtra(\"productPrice\");\n productSizesSmall = i.getStringExtra(\"productSizesSmall\");\n productSizesMedium = i.getStringExtra(\"productSizesMedium\");\n productSizesLarge = i.getStringExtra(\"productSizesLarge\");\n productSizesXL = i.getStringExtra(\"productSizesXL\");\n productSizesXXL = i.getStringExtra(\"productSizesXXL\");\n productSizesXXXL = i.getStringExtra(\"productSizesXXXL\");\n productQuantity = i.getStringExtra(\"productQuantity\");\n }\n }", "@Override\n protected void onHandleIntent(Intent intent) {\n if (intent != null) {\n final String action = intent.getAction();\n if (ACTION_GET_LOCATION.equals(action)) {\n handleActionGetLocation((ResultReceiver) intent.getParcelableExtra(\"receiverTag\"));\n }\n }\n }", "@Override\r\n public void onClick(View v) {\n String robodata=\"robot data\";\r\n String stringdata = \"throwing\";\r\n Intent mysqlintent = new Intent(collect_Data.this,mysql.class); //defining the intent.\r\n mysqlintent.putExtra(robodata, stringdata); //putting the data into the intent\r\n startActivity(mysqlintent); //launching the mysql activity\r\n }", "public void mo3546a(Bundle bundle) {\n if (!this.f2822a.isEmpty()) {\n Intent[] intentArr = (Intent[]) this.f2822a.toArray(new Intent[this.f2822a.size()]);\n intentArr[0] = new Intent(intentArr[0]).addFlags(268484608);\n if (!C0875a.m3242a(this.f2823b, intentArr, bundle)) {\n Intent intent = new Intent(intentArr[intentArr.length - 1]);\n intent.addFlags(SQLiteDatabase.CREATE_IF_NECESSARY);\n this.f2823b.startActivity(intent);\n return;\n }\n return;\n }\n throw new IllegalStateException(\"No intents added to TaskStackBuilder; cannot startActivities\");\n }" ]
[ "0.7878248", "0.76442933", "0.7495607", "0.70902777", "0.70861405", "0.6979098", "0.6978278", "0.6950421", "0.69402695", "0.6887028", "0.6874028", "0.67840743", "0.6724411", "0.6723019", "0.6602234", "0.6589922", "0.65789294", "0.6548716", "0.649787", "0.6484637", "0.64767075", "0.6350994", "0.6326955", "0.6314565", "0.6283187", "0.6275251", "0.62548184", "0.6252267", "0.62082326", "0.61943805", "0.6179192", "0.61169726", "0.61160344", "0.6104334", "0.6092575", "0.6090475", "0.5992122", "0.59747285", "0.5924881", "0.5916309", "0.5900734", "0.5877263", "0.5863864", "0.58308893", "0.5829213", "0.5823196", "0.58191544", "0.58188367", "0.5812978", "0.58124393", "0.58015996", "0.57849467", "0.57827127", "0.5774951", "0.57638013", "0.5744389", "0.5739269", "0.5724756", "0.5716951", "0.5711884", "0.5704807", "0.5693635", "0.56922096", "0.5689136", "0.5682828", "0.5678522", "0.5659106", "0.56433654", "0.5620646", "0.5610936", "0.56000274", "0.5599979", "0.5589603", "0.5589192", "0.558383", "0.5576844", "0.55710214", "0.5568462", "0.5564645", "0.5561577", "0.5559682", "0.5558181", "0.55466145", "0.5543853", "0.55396175", "0.55387586", "0.55361086", "0.55351853", "0.553276", "0.5529807", "0.55115443", "0.55095416", "0.5502443", "0.548532", "0.5481029", "0.5475555", "0.5473977", "0.54660445", "0.54575044", "0.54543793" ]
0.7025156
5
Initializing components regarding profile areas for both players:
private void setupComponents() { mPlayerProfileArea = (LinearLayout) findViewById(R.id.profile_area_player); mPlayerUsername = (TextView) findViewById(R.id.username_player); mOpponentProfileArea = (LinearLayout) findViewById(R.id.profile_area_opponent); mOpponentUsername = (TextView) findViewById(R.id.username_opponent); // If player plays with black pieces (also starts the game): if(mPlayerGamePiece == GamePiece.BLACK){ // Setting black and white counters: mBlackCounter = (TextView) findViewById(R.id.piece_counter_player); mWhiteCounter = (TextView) findViewById(R.id.piece_counter_opponent); // Setting player's profile area color to green: mPlayerProfileArea.setBackgroundResource(R.drawable.user_area_green); mPlayerUsername.setBackgroundResource(R.color.colorGreenDarkAlpha); } // Otherwise: else{ // Setting black and white counters: mWhiteCounter = (TextView) findViewById(R.id.piece_counter_player); mBlackCounter = (TextView) findViewById(R.id.piece_counter_opponent); // Setting opponents's profile area color to green: mOpponentProfileArea.setBackgroundResource(R.drawable.user_area_green); mOpponentUsername.setBackgroundResource(R.color.colorGreenDarkAlpha); } // Setting colors for counters: mBlackCounter.setTextColor(ContextCompat.getColor(this, R.color.colorWhite)); mBlackCounter.setBackgroundResource(R.drawable.piece_counter_black); mWhiteCounter.setTextColor(ContextCompat.getColor(this, R.color.colorBlack)); mWhiteCounter.setBackgroundResource(R.drawable.piece_counter_white); // Setting bot name tag: if(mDifficulty == Difficulty.BEGINNER) mOpponentUsername.setText(R.string.bot_name_beginner); else if (mDifficulty == Difficulty.EASY) mOpponentUsername.setText(R.string.bot_name_easy); else if (mDifficulty == Difficulty.MEDIUM) mOpponentUsername.setText(R.string.bot_name_medium); else if (mDifficulty == Difficulty.HARD) mOpponentUsername.setText(R.string.bot_name_hard); else if (mDifficulty == Difficulty.EXPERT) mOpponentUsername.setText(R.string.bot_name_expert); // Setting emote bubbles components: mPlayerEmoteBubble = (TextView) findViewById(R.id.emote_player); mOpponentEmoteBubble = (TextView) findViewById(R.id.emote_opponent); mEmoteButton = (Button) findViewById(R.id.emote_button); mShakeButton = (Button) findViewById(R.id.shake_button); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initComponents() {\r\n\t\trand = new Random();\r\n\t\tfetchProfiles();\r\n\t\tgetPeopleFromFile();\r\n\t}", "public Profile() {\n initComponents();\n AutoID();\n member_table();\n \n }", "private JPanel setUpOtherPlayersPanel(List<Player> otherPlayers) {\n otherPlayersPanel = new JPanel();\n otherPlayersPanel.setLayout(new BoxLayout(otherPlayersPanel, BoxLayout.Y_AXIS));\n \n otherPlayerProperties = new JPanel();\n otherPlayerProperties = setUpOtherPlayerAssets(otherPlayers.get(0));\n \n return otherPlayersPanel;\n }", "private void setupProfileOptions() {\n String userId;\n\n if (profile == null) {\n userId = this.userId;\n\n if (userId == null)\n throw new IllegalStateException(\"ViewProfileActivity profile is null, but so is it's userId. One of either must not be null\");\n } else {\n userId = profile.getUserId();\n\n if (userId == null)\n throw new IllegalStateException(\"ViewProfileActivity's profile#getUserId() returned null. Was setUserId called when the profile was retrieved?\");\n }\n\n final String finalUserId = userId;\n ConstraintLayout goalLayout = findViewById(R.id.goalsLayout);\n goalLayout.setOnClickListener(v -> {\n Intent intent = new Intent(this, GoalsActivity.class);\n intent.putExtra(GoalsActivity.USER_ID_EXTRA, finalUserId);\n startActivity(intent);\n });\n\n ConstraintLayout activitiesLayout = findViewById(R.id.activitiesLayout);\n activitiesLayout.setOnClickListener(v -> {\n Intent intent = new Intent(this, ListActivitiesActivity.class);\n intent.putExtra(ListActivitiesActivity.USER_ID_EXTRA, finalUserId);\n startActivity(intent);\n });\n\n ConstraintLayout postsLayout = findViewById(R.id.postsLayout);\n postsLayout.setOnClickListener(v -> {\n Intent intent = new Intent(this, ProfilePostsActivity.class);\n intent.putExtra(ProfilePostsActivity.USER_ID_EXTRA, finalUserId);\n startActivity(intent);\n });\n }", "private void setUpOverview() {\n mapInstance = GameData.getInstance();\n //get reference locally for the database\n db = mapInstance.getDatabase();\n\n //retrieve the current player and the current area\n currentPlayer = mapInstance.getPlayer();\n\n }", "public void initialize() {\n\t\tselectedDrawingTool = 1;\n\t\tlblDrawingTool = new JLabel[NUM_DRAWING_TOOLS];\n\t\tnetwork = null;\n\t\tvisitorListMap = new HashMap<String, Color>();\n\t\tsetTitle(\"Whiteboard conference room\");\n\t\t\n\t\t// set frame options\n\t\tsetResizable(false);\n\t\tsetBounds(100, 30, 1024, 768);\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\t// Set background color\n\t\tgetContentPane().setBackground(THEME_BACKGROUND);\n\t\tgetContentPane().setLayout(null);\n\t\t\n\t\t// Set icons\n\t\tImageIcon roomIcon = null;\n\t\tImageIcon roomCreateIcon = null;\n\t\tImageIcon roomJoinIcon = null;\n\t\ttry { roomIcon = new ImageIcon(ImageIO.read(getClass().getResource(\"/resources/roomIcon.png\"))); } catch (IOException e1) { e1.printStackTrace(); }\n\t\ttry { roomCreateIcon = new ImageIcon(ImageIO.read(getClass().getResource(\"/resources/roomCreateIcon.png\"))); } catch (IOException e1) { e1.printStackTrace(); }\n\t\ttry { roomJoinIcon = new ImageIcon(ImageIO.read(getClass().getResource(\"/resources/roomJoinIcon.png\"))); } catch (IOException e1) { e1.printStackTrace(); }\n\t\t\n\t\t// Room\n\t\tJTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);\n\t\ttabbedPane.setBounds(10, 10, 250, 518);\n\t\ttabbedPane.setBackground(THEME_BACKGROUND);\n\t\ttabbedPane.setForeground(THEME_FOREGROUND);\n\t\ttabbedPane.setUI(new customTabbedPaneUI());\n\t\t\n\t\t// Room - tab 1\n\t\tJPanel roomPanel1 = new JPanel();\n\t\troomPanel1.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\troomPanel1.setLayout(null);\n\t\troomPanel1.setBorder(BorderFactory.createMatteBorder(1, 5, 1, 1, THEME_FOREGROUND));\n\t\troomPanel1.setBackground(THEME_BACKGROUND);\n\t\ttabbedPane.addTab(\"Room\", roomIcon, roomPanel1, \"\");\n\t\t\n\t\tJPanel roomPanel1SubPanelProfile = new JPanel();\n\t\troomPanel1SubPanelProfile.setLayout(null);\n\t\troomPanel1SubPanelProfile.setBounds(15, 10, 215, 60);\n\t\troomPanel1SubPanelProfile.setBackground(THEME_BACKGROUND);\n\t\tTitledBorder titledColoredProfileBorder = new TitledBorder(\"Profile\");\n\t\ttitledColoredProfileBorder.setBorder(BorderFactory.createMatteBorder(1, 5, 1, 1, THEME_FOREGROUND));\n\t\ttitledColoredProfileBorder.setTitleFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\ttitledColoredProfileBorder.setTitleColor(THEME_FOREGROUND);\n\t\troomPanel1SubPanelProfile.setBorder(titledColoredProfileBorder);\n\t\t\n\t\tlblUsername = new JLabel(\"Username: \" + DEFAULT_USERNAME);\n\t\tlblUsername.setBounds(15, 17, 180, 15);\n\t\tlblUsername.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\tlblUsername.setForeground(THEME_FOREGROUND);\n\t\troomPanel1SubPanelProfile.add(lblUsername);\n\t\t\n\t\tJLabel lblColorChooser = new JLabel(\"Color:\");\n\t\tlblColorChooser.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\tlblColorChooser.setBounds(15, 36, 120, 15);\n\t\tlblColorChooser.setForeground(THEME_FOREGROUND);\n\t\troomPanel1SubPanelProfile.add(lblColorChooser);\n\t\t\n\t\tlblColor = new JLabel(\"\");\n\t\tlblColor.setBounds(53, 36, 15, 15);\n\t\tlblColor.setOpaque(true);\n\t\tlblColor.setBackground(new Color(0,0,0));\n\t\tlblColor.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\troomPanel1SubPanelProfile.add(lblColor);\n\t\t\n\t\troomPanel1.add(roomPanel1SubPanelProfile);\n\t\t\n\t\tJPanel roomPanel1SubPanelServerInfo = new JPanel();\n\t\troomPanel1SubPanelServerInfo.setLayout(null);\n\t\troomPanel1SubPanelServerInfo.setBounds(15, 80, 215, 60);\n\t\troomPanel1SubPanelServerInfo.setBackground(THEME_BACKGROUND);\n\t\tTitledBorder titledColoredServerInfoBorder = new TitledBorder(\"Server info.\");\n\t\ttitledColoredServerInfoBorder.setBorder(BorderFactory.createMatteBorder(1, 5, 1, 1, THEME_FOREGROUND));\n\t\ttitledColoredServerInfoBorder.setTitleFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\ttitledColoredServerInfoBorder.setTitleColor(THEME_FOREGROUND);\n\t\troomPanel1SubPanelServerInfo.setBorder(titledColoredServerInfoBorder);\n\t\t\n\t\tlblServerInfoIP = new JLabel(\"IP address: Not connected.\");\n\t\tlblServerInfoIP.setBounds(15, 17, 175, 15);\n\t\tlblServerInfoIP.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\tlblServerInfoIP.setForeground(THEME_FOREGROUND);\n\t\troomPanel1SubPanelServerInfo.add(lblServerInfoIP);\n\t\t\n\t\tlblServerInfoPort = new JLabel(\"Port: \");\n\t\tlblServerInfoPort.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\tlblServerInfoPort.setBounds(15, 36, 170, 15);\n\t\tlblServerInfoPort.setForeground(THEME_FOREGROUND);\n\t\troomPanel1SubPanelServerInfo.add(lblServerInfoPort);\n\t\t\n\t\troomPanel1.add(roomPanel1SubPanelServerInfo);\n\t\t\n\t\tJPanel roomPanel1SubPanelDrawingTools = new JPanel();\n\t\troomPanel1SubPanelDrawingTools.setLayout(null);\n\t\troomPanel1SubPanelDrawingTools.setBounds(15, 150, 215, 190);\n\t\troomPanel1SubPanelDrawingTools.setBackground(THEME_BACKGROUND);\n\t\tTitledBorder titledColoredDrawingToolsBorder = new TitledBorder(\"Drawing tools\");\n\t\ttitledColoredDrawingToolsBorder.setBorder(BorderFactory.createMatteBorder(1, 5, 1, 1, THEME_FOREGROUND));\n\t\ttitledColoredDrawingToolsBorder.setTitleFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\ttitledColoredDrawingToolsBorder.setTitleColor(THEME_FOREGROUND);\n\t\troomPanel1SubPanelDrawingTools.setBorder(titledColoredDrawingToolsBorder);\n\t\t\n\t\t// Drawing tool #1\n\t\ttry {\n\t\t\tlblDrawingTool[0] = new JLabel(new ImageIcon(ImageIO.read(getClass().getResource(\"/resources/roomDrawingTool1.png\"))));\n\t\t\tlblDrawingTool[0].setBackground(THEME_BACKGROUND);\n\t\t\tlblDrawingTool[0].setBounds(25, 20, 25, 25);\n\t\t\tlblDrawingTool[0].addMouseListener(new drawingTool1MouseListener());\n\t\t\tgetContentPane().add(lblDrawingTool[0]);\n\t\t} catch (IOException e) { e.printStackTrace(); }\n\t\t\n\t\t// Drawing tool #2\n\t\ttry {\n\t\t\tlblDrawingTool[1] = new JLabel(new ImageIcon(ImageIO.read(getClass().getResource(\"/resources/roomDrawingTool2Offset.png\"))));\n\t\t\tlblDrawingTool[1].setBackground(THEME_BACKGROUND);\n\t\t\tlblDrawingTool[1].setBounds(60, 20, 25, 25);\n\t\t\tlblDrawingTool[1].addMouseListener(new drawingTool2MouseListener());\n\t\t\tgetContentPane().add(lblDrawingTool[1]);\n\t\t} catch (IOException e) { e.printStackTrace(); }\n\t\t\n\t\t// Drawing tool #3\n\t\ttry {\n\t\t\tlblDrawingTool[2] = new JLabel(new ImageIcon(ImageIO.read(getClass().getResource(\"/resources/roomDrawingTool3Offset.png\"))));\n\t\t\tlblDrawingTool[2].setBackground(THEME_BACKGROUND);\n\t\t\tlblDrawingTool[2].setBounds(95, 20, 25, 25);\n\t\t\tlblDrawingTool[2].addMouseListener(new drawingTool3MouseListener());\n\t\t\tgetContentPane().add(lblDrawingTool[2]);\n\t\t} catch (IOException e) { e.printStackTrace(); }\n\t\t\n\t\t// Drawing tool #4\n\t\ttry {\n\t\t\tlblDrawingTool[3] = new JLabel(new ImageIcon(ImageIO.read(getClass().getResource(\"/resources/roomDrawingTool4Offset.png\"))));\n\t\t\tlblDrawingTool[3].setBackground(THEME_BACKGROUND);\n\t\t\tlblDrawingTool[3].setBounds(130, 20, 25, 25);\n\t\t\tlblDrawingTool[3].addMouseListener(new drawingTool4MouseListener());\n\t\t\tgetContentPane().add(lblDrawingTool[3]);\n\t\t} catch (IOException e) { e.printStackTrace(); }\n\t\t\n\t\t// Drawing tool #5\n\t\ttry {\n\t\t\tlblDrawingTool[4] = new JLabel(new ImageIcon(ImageIO.read(getClass().getResource(\"/resources/roomDrawingTool5Offset.png\"))));\n\t\t\tlblDrawingTool[4].setBackground(THEME_BACKGROUND);\n\t\t\tlblDrawingTool[4].setBounds(165, 20, 25, 25);\n\t\t\tlblDrawingTool[4].addMouseListener(new drawingTool5MouseListener());\n\t\t\tgetContentPane().add(lblDrawingTool[4]);\n\t\t} catch (IOException e) { e.printStackTrace(); }\n\t\t\t\t\n\t\t// Drawing tool #6\n\t\ttry {\n\t\t\tlblDrawingTool[5] = new JLabel(new ImageIcon(ImageIO.read(getClass().getResource(\"/resources/roomDrawingTool6Offset.png\"))));\n\t\t\tlblDrawingTool[5].setBackground(THEME_BACKGROUND);\n\t\t\tlblDrawingTool[5].setBounds(25, 55, 25, 25);\n\t\t\tlblDrawingTool[5].addMouseListener(new drawingTool6MouseListener());\n\t\t\tgetContentPane().add(lblDrawingTool[5]);\n\t\t} catch (IOException e) { e.printStackTrace(); }\n\t\t\n\t\troomPanel1SubPanelDrawingTools.add(lblDrawingTool[0]);\n\t\troomPanel1SubPanelDrawingTools.add(lblDrawingTool[1]);\n\t\troomPanel1SubPanelDrawingTools.add(lblDrawingTool[2]);\n\t\troomPanel1SubPanelDrawingTools.add(lblDrawingTool[3]);\n\t\troomPanel1SubPanelDrawingTools.add(lblDrawingTool[4]);\n\t\troomPanel1SubPanelDrawingTools.add(lblDrawingTool[5]);\n\t\t\n\t\troomPanel1.add(roomPanel1SubPanelDrawingTools);\n\t\t\n\t\tJPanel roomPanel1SubPanelColor = new JPanel();\n\t\troomPanel1SubPanelColor.setLayout(null);\n\t\troomPanel1SubPanelColor.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\troomPanel1SubPanelColor.setBounds(15, 345, 215, 55);\n\t\troomPanel1SubPanelColor.setBackground(THEME_BACKGROUND);\n\t\tTitledBorder titledColoredColorBorder = new TitledBorder(\"Change color\");\n\t\ttitledColoredColorBorder.setBorder(BorderFactory.createMatteBorder(1, 5, 1, 1, THEME_FOREGROUND));\n\t\ttitledColoredColorBorder.setTitleFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\ttitledColoredColorBorder.setTitleColor(THEME_FOREGROUND);\n\t\troomPanel1SubPanelColor.setBorder(titledColoredColorBorder);\n\t\t\n\t\tJButton btnChangeColor = new JButton(\"Choose\");\n\t\tbtnChangeColor.addActionListener(new changeColorBtnActionListener());\n\t\tbtnChangeColor.setBounds(16, 21, 180, 20);\n\t\tbtnChangeColor.setBackground(THEME_BACKGROUND);\n\t\tbtnChangeColor.setForeground(THEME_FOREGROUND);\n\t\tbtnChangeColor.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\troomPanel1SubPanelColor.add(btnChangeColor);\n\t\t\n\t\troomPanel1.add(roomPanel1SubPanelColor);\n\t\t\n\t\tJPanel roomPanel1SubPanelUsername = new JPanel();\n\t\troomPanel1SubPanelUsername.setLayout(null);\n\t\troomPanel1SubPanelUsername.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\troomPanel1SubPanelUsername.setBounds(15, 400, 215, 75);\n\t\troomPanel1SubPanelUsername.setBackground(THEME_BACKGROUND);\n\t\tTitledBorder titledColoredUsernameBorder = new TitledBorder(\"Change username\");\n\t\ttitledColoredUsernameBorder.setBorder(BorderFactory.createMatteBorder(1, 5, 1, 1, THEME_FOREGROUND));\n\t\ttitledColoredUsernameBorder.setTitleFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\ttitledColoredUsernameBorder.setTitleColor(THEME_FOREGROUND);\n\t\troomPanel1SubPanelUsername.setBorder(titledColoredUsernameBorder);\n\n\t\tJLabel lblNewUsername = new JLabel(\"New username:\");\n\t\tlblNewUsername.setBounds(15, 26, 100, 15);\n\t\tlblNewUsername.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\tlblNewUsername.setForeground(THEME_FOREGROUND);\n\t\troomPanel1SubPanelUsername.add(lblNewUsername);\n\t\t\n\t\ttfNewUsername = new JTextField();\n\t\ttfNewUsername.setBounds(110, 23, 86, 20);\n\t\ttfNewUsername.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\ttfNewUsername.setBackground(THEME_BACKGROUND);\n\t\ttfNewUsername.setForeground(THEME_FOREGROUND);\n\t\troomPanel1SubPanelUsername.add(tfNewUsername);\n\t\t\n\t\tJButton btnChangeUsername = new JButton(\"Confirm\");\n\t\tbtnChangeUsername.addActionListener(new changeUsernameBtnActionListener());\n\t\tbtnChangeUsername.setBounds(15, 47, 180, 20);\n\t\tbtnChangeUsername.setBackground(THEME_BACKGROUND);\n\t\tbtnChangeUsername.setForeground(THEME_FOREGROUND);\n\t\tbtnChangeUsername.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\troomPanel1SubPanelUsername.add(btnChangeUsername);\n\t\t\n\t\troomPanel1.add(roomPanel1SubPanelUsername);\n\t\t\n\t\t// Room - tab 2\n\t\tJPanel roomPanel2 = new JPanel();\n\t\troomPanel2.setLayout(null);\n\t\troomPanel2.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\troomPanel2.setBackground(THEME_BACKGROUND);\n\t\tJPanel roomPanel2SubPanelCreateServer = new JPanel();\n\t\troomPanel2SubPanelCreateServer.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\troomPanel2SubPanelCreateServer.setLayout(null);\n\t\troomPanel2SubPanelCreateServer.setBounds(15, 10, 215, 90);\n\t\troomPanel2SubPanelCreateServer.setBackground(THEME_BACKGROUND);\n\t\tTitledBorder titledColoredCreateServerBorder = new TitledBorder(\"Host server\");\n\t\ttitledColoredCreateServerBorder.setBorder(BorderFactory.createMatteBorder(1, 5, 1, 1, THEME_FOREGROUND));\n\t\ttitledColoredCreateServerBorder.setTitleFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\ttitledColoredCreateServerBorder.setTitleColor(THEME_FOREGROUND);\n\t\troomPanel2SubPanelCreateServer.setBorder(titledColoredCreateServerBorder);\n\t\t\n\t\tJLabel lblCreateIP = new JLabel(\"Server ip: \" + getWANIP());\n\t\tlblCreateIP.setBounds(15, 17, 170, 12);\n\t\tlblCreateIP.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\tlblCreateIP.setForeground(THEME_FOREGROUND);\n\t\troomPanel2SubPanelCreateServer.add(lblCreateIP);\n\t\t\n\t\tJLabel lblCreatePort = new JLabel(\"Port number:\");\n\t\tlblCreatePort.setBounds(15, 36, 120, 15);\n\t\tlblCreatePort.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\tlblCreatePort.setForeground(THEME_FOREGROUND);\n\t\troomPanel2SubPanelCreateServer.add(lblCreatePort);\n\t\t\n\t\ttfCreatePort = new JTextField();\n\t\ttfCreatePort.setToolTipText(\"Port number for server hosting\");\n\t\ttfCreatePort.setBounds(93, 35, 86, 20);\n\t\ttfCreatePort.setBackground(THEME_BACKGROUND);\n\t\ttfCreatePort.setForeground(THEME_FOREGROUND);\n\t\ttfCreatePort.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\troomPanel2SubPanelCreateServer.add(tfCreatePort);\n\t\t\n\t\tJButton btnCreate = new JButton(\"Create\");\n\t\tbtnCreate.addActionListener(new createBtnActionListener(this));\n\t\tbtnCreate.setBounds(16, 60, 180, 20);\n\t\tbtnCreate.setBackground(THEME_BACKGROUND);\n\t\tbtnCreate.setForeground(THEME_FOREGROUND);\n\t\tbtnCreate.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\troomPanel2SubPanelCreateServer.add(btnCreate);\n\t\t\n\t\troomPanel2.add(roomPanel2SubPanelCreateServer);\n\t\ttabbedPane.addTab(\"Create\", roomCreateIcon, roomPanel2, \"\");\n\t\t\n\t\t// Room - tab 3\n\t\tJPanel roomPanel3 = new JPanel();\n\t\troomPanel3.setLayout(null);\n\t\troomPanel3.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\troomPanel3.setBackground(THEME_BACKGROUND);\n\t\tJPanel roomPanel3SubPanelJoinServer = new JPanel();\n\t\troomPanel3SubPanelJoinServer.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\troomPanel3SubPanelJoinServer.setLayout(null);\n\t\troomPanel3SubPanelJoinServer.setBounds(15, 10, 215, 100);\n\t\troomPanel3SubPanelJoinServer.setBackground(THEME_BACKGROUND);\n\t\tTitledBorder titledColoredJoinServerBorder = new TitledBorder(\"Join server\");\n\t\ttitledColoredJoinServerBorder.setBorder(BorderFactory.createMatteBorder(1, 5, 1, 1, THEME_FOREGROUND));\n\t\ttitledColoredJoinServerBorder.setTitleFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\ttitledColoredJoinServerBorder.setTitleColor(THEME_FOREGROUND);\n\t\troomPanel3SubPanelJoinServer.setBorder(titledColoredJoinServerBorder);\n\t\t\n\t\tJLabel lblJoinIP = new JLabel(\"Server ip:\");\n\t\tlblJoinIP.setBounds(15, 19, 150, 15);\n\t\tlblJoinIP.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\tlblJoinIP.setForeground(THEME_FOREGROUND);\n\t\troomPanel3SubPanelJoinServer.add(lblJoinIP);\n\t\t\n\t\ttfJoinIP = new JTextField();\n\t\ttfJoinIP.setToolTipText(\"Server IP of host\");\n\t\ttfJoinIP.setBounds(93, 15, 86, 20);\n\t\ttfJoinIP.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\ttfJoinIP.setBackground(THEME_BACKGROUND);\n\t\ttfJoinIP.setForeground(THEME_FOREGROUND);\n\t\troomPanel3SubPanelJoinServer.add(tfJoinIP);\n\t\t\n\t\tJLabel lblJoinPort = new JLabel(\"Port number:\");\n\t\tlblJoinPort.setBounds(15, 43, 120, 15);\n\t\tlblJoinPort.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\tlblJoinPort.setForeground(THEME_FOREGROUND);\n\t\troomPanel3SubPanelJoinServer.add(lblJoinPort);\n\t\t\n\t\ttfJoinPort = new JTextField();\n\t\ttfJoinPort.setToolTipText(\"Port number for server hosting\");\n\t\ttfJoinPort.setBounds(93, 40, 86, 20);\n\t\ttfJoinPort.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\ttfJoinPort.setBackground(THEME_BACKGROUND);\n\t\ttfJoinPort.setForeground(THEME_FOREGROUND);\n\t\troomPanel3SubPanelJoinServer.add(tfJoinPort);\n\t\t\n\t\tJButton btnJoin = new JButton(\"Join\");\n\t\tbtnJoin.addActionListener(new joinBtnActionListener(this));\n\t\tbtnJoin.setBounds(16, 67, 180, 20);\n\t\tbtnJoin.setBackground(THEME_BACKGROUND);\n\t\tbtnJoin.setForeground(THEME_FOREGROUND);\n\t\tbtnJoin.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\troomPanel3SubPanelJoinServer.add(btnJoin);\n\t\t\n\t\troomPanel3.add(roomPanel3SubPanelJoinServer);\n\t\ttabbedPane.addTab(\"Join\", roomJoinIcon, roomPanel3, \"\");\n\t\t\n\t\tgetContentPane().add(tabbedPane);\n\t\t\n\t\t// Visitor list\n\t\tvisitorListModel = new DefaultListModel<String>();\n\t\t\n\t\tvisitorList = new JList<String>(visitorListModel);\n\t\tvisitorList.setCellRenderer(new NameRenderer());\n\t\tvisitorList.setBounds(20, 20, 200, 144);\n\t\tvisitorList.setBackground(THEME_BACKGROUND);\n\t\tJScrollPane visitorListScrollPane = new JScrollPane();\n\t\tvisitorListScrollPane.setViewportView(visitorList);\n\t\tvisitorListScrollPane.setBorder(null);\n\t\tvisitorListScrollPane.setBounds(20, 20, 210, 160);\n\t\t\n\t\tJPanel panelVisitorList = new JPanel();\n\t\tpanelVisitorList.setOpaque(false);\n\t\tpanelVisitorList.setFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\tpanelVisitorList.setLayout(null);\n\t\tpanelVisitorList.setBounds(10, 534, 250, 194);\n\t\tTitledBorder titledColoredVisitorListBorder = new TitledBorder(\"Visitor list\");\n\t\ttitledColoredVisitorListBorder.setBorder(BorderFactory.createMatteBorder(1, 5, 1, 1, THEME_FOREGROUND));\n\t\ttitledColoredVisitorListBorder.setTitleColor(THEME_FOREGROUND);\n\t\ttitledColoredVisitorListBorder.setTitleFont(new Font(DEFAULT_FONT, Font.PLAIN, DEFAULT_FONT_SIZE));\n\t\tpanelVisitorList.setBorder(titledColoredVisitorListBorder);\n\t\t\n\t\tpanelVisitorList.add(visitorListScrollPane);\n\t\t\n\t\tgetContentPane().add(panelVisitorList);\n\t\t\n\t\t// Whiteboard\n\t\twhiteboardBi = new BufferedImage(720, 715, BufferedImage.TYPE_INT_RGB);\n\t\twhiteboardPanel = new WhiteBoardPanel(whiteboardBi);\n\t\twhiteboardPanel.setLayout(null);\n\t\twhiteboardPanel.setBounds(280, 13, 720, 715);\n\t\twhiteboardPanel.setBackground(THEME_BACKGROUND);\n\t\t\n\t\t// Leave button\n\t\ttry {\n\t\t\tlblLeave = new JLabel(new ImageIcon(ImageIO.read(getClass().getResource(\"/resources/roomLeaveIcon2.png\"))));\n\t\t\tlblLeave.setBackground(new Color(100,50,150,200));\n\t\t\tlblLeave.setBounds(696, 0, 24, 24);\n\t\t\tlblLeave.setVisible(true);\n\t\t\tlblLeave.addMouseListener(new leaveIconMouseListener());\n\t\t\twhiteboardPanel.add(lblLeave);\n\t\t} catch (IOException e) { e.printStackTrace(); }\n\t\t\n\t\t// Trash button\n\t\ttry {\n\t\t\tlblTrash = new JLabel(new ImageIcon(ImageIO.read(getClass().getResource(\"/resources/roomTrashIconOffset.png\"))));\n\t\t\tlblTrash.setBackground(new Color(100,50,150,200));\n\t\t\tlblTrash.setBounds(0, 0, 24, 24);\n\t\t\tlblTrash.setVisible(true);\n\t\t\tlblTrash.addMouseListener(new trashIconMouseListener());\n\t\t\twhiteboardPanel.add(lblTrash);\n\t\t} catch (IOException e) { e.printStackTrace(); }\n\t\t\n\t\tgetContentPane().add(whiteboardPanel);\n\t\t\n\t}", "public AdminProfile_panel() {\n initComponents();\n \n }", "private JComponent makeStudentProfilePanel() {\n\t\t\n\t\t//Initiate profilePanel\n\t\tJPanel profilePanel = new JPanel();\n\t\tprofilePanel.setLayout(new GridLayout(1,3,1,1));\n\t\tprofilePanel.setSize(studentPortalWidth, studentPortalHeight);\n\t\tprofilePanel.setBorder(compound);\n\t\t\t\t\n\t\t//Generate profilePanel's left component\n\t\tTitledBorder leftPanelTitle, usernameTitle, firstNameTitle, lastNameTitle, schoolNameTitle, sQ1Title, sQ2Title;\n\t\tleftPanelTitle = BorderFactory.createTitledBorder(\"Profile Information\");\n\t\tusernameTitle = BorderFactory.createTitledBorder(\"Username\");\n\t\tfirstNameTitle = BorderFactory.createTitledBorder(\"First\");\n\t\tlastNameTitle = BorderFactory.createTitledBorder(\"Last\");\n\t\tschoolNameTitle = BorderFactory.createTitledBorder(\"School\");\n\t\tsQ1Title = BorderFactory.createTitledBorder(\"Security Question 1\");\n\t\tsQ2Title = BorderFactory.createTitledBorder(\"Security Question 2\");\n\t\t\n\t\t//Main leftPanel\n\t\tJPanel leftPanel = new JPanel();\n\t\tleftPanel.setLayout(new GridLayout(6,1,1,1));\n\t\tleftPanel.setBorder(leftPanelTitle);\n\t\t\t\t\n\t\t//Username JLabel\n\t\tJLabel username = new JLabel(student.getUsername());\n\t\tusername.setBorder(usernameTitle);\n\t\tusername.setFont(masterFont);\n\t\tleftPanel.add(username);\n\t\t\t\t\n\t\t//FirstName JLabel\n\t\tJLabel firstName = new JLabel(student.getFirstName());\n\t\tfirstName.setBorder(firstNameTitle);\n\t\tfirstName.setFont(masterFont);\n\t\tleftPanel.add(firstName);\n\t\t\t\t\n\t\t//LastName JLabel\n\t\tJLabel lastName = new JLabel(student.getLastName());\n\t\tlastName.setBorder(lastNameTitle);\n\t\tlastName.setFont(masterFont);\n\t\tleftPanel.add(lastName);\n\t\t\t\t\n\t\t//SchoolName JLabel\n\t\tJLabel schoolName = new JLabel(student.getSchoolName());\n\t\tschoolName.setBorder(schoolNameTitle);\n\t\tschoolName.setFont(masterFont);\n\t\tleftPanel.add(schoolName);\n\n\t\t//Security Question 1 JLabel | JTextField\n\t\tJLabel sQ1L = new JLabel((String)sSecurityList1.getSelectedItem());\n\t\tsQ1L.setBorder(sQ1Title);\n\t\tsQ1L.setFont(masterFont);\n\t\tleftPanel.add(sQ1L);\n\t\t\t\t\n\t\t//Security Question 2 JLabel | JTextField\n\t\tJLabel sQ2L = new JLabel((String)sSecurityList2.getSelectedItem());\n\t\tsQ2L.setBorder(sQ2Title);\n\t\tsQ2L.setFont(masterFont);\n\t\tleftPanel.add(sQ2L);\n\t\t\t\t\n\t\t//Generate middle component\n\t\tTitledBorder characterTitle, gameTitle;\n\t\tcharacterTitle = BorderFactory.createTitledBorder(\"Character\");\n\t\tgameTitle = BorderFactory.createTitledBorder(\"Game\");\n\t\t\n\t\t//Main middlePanel JPanel\n\t\tJPanel middlePanel = new JPanel();\n\t\tmiddlePanel.setLayout(new GridLayout(2,1,1,1));\n\t\t\n\t\t//MiddleTopPanel JPanel\n\t\tJPanel middleTopPanel = new JPanel();\n\t\tmiddleTopPanel.setBorder(characterTitle);\n\t\t\n\t\t//Character Image JLabel\n\t\tCharacter character = student.getCurrentCharacter();\n\t\tImageIcon icon = new ImageIcon(\"Resource/\" + character.getCharacterName() + \".png\");\n\t\tImage image = icon.getImage().getScaledInstance(200, 200, Image.SCALE_SMOOTH);\n\t\tcharacterImage = new JLabel(new ImageIcon(image));\n\t\tmiddleTopPanel.add(characterImage);\n\t\tmiddlePanel.add(middleTopPanel, BorderLayout.PAGE_START);\n\t\t\n\t\t//Student: \"Change Character\" JButton\n\t\tJButton changeCharacterB = new JButton(\"Change Character\");\n\t\tchangeCharacterB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tchangeC = true;\n\t \t\tchangeCharacter();\n\t }\n\t \t});\n\t\tmiddleTopPanel.add(changeCharacterB, BorderLayout.PAGE_END);\n\t\t\n\t\t//MiddleBottomPanel JPanel\n\t\tTitledBorder scoreTitle = BorderFactory.createTitledBorder(\"Score\");\n\t\tscoreTitle.setTitleColor(Color.WHITE);\n\t\tJPanel middleBottomPanel = new JPanel();\n\t\tmiddleBottomPanel.setBorder(gameTitle);\n\t\tmiddleBottomPanel.setLayout(new GridLayout(4,1,1,1));\n\n\t\t//ScoreL JLabel\n\t\tJLabel scoreL = new JLabel(Integer.toString(student.getScore()) + \" \");\n\t\tscoreL.setFont(new Font(\"Candara\", Font.PLAIN, 30));\n\t\tscoreL.setBackground(Color.BLUE);\n\t\tscoreL.setOpaque(true);\n\t\tscoreL.setForeground(Color.WHITE);\n\t\tscoreL.setHorizontalAlignment(SwingConstants.RIGHT);\n scoreL.setVerticalAlignment(SwingConstants.CENTER);\n\t\tscoreL.setBorder(scoreTitle);\n\t\tmiddleBottomPanel.add(scoreL);\n\t\t\n\t\t//Student \"New Game\" JButton\n\t\tJButton newGameB = new JButton(\"New Game\");\n\t\tnewGameB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tsPortalWindow.dispose();\n\t \t\trunGame();\n\t }\n\t \t});\n\t\tmiddleBottomPanel.add(newGameB);\n\t\t\n\t\t//Student \"Store\" JButtom\n\t\tJButton storeB = new JButton(\"Store\");\n\t\tstoreB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\t//store();\n\t }\n\t \t});\n\t\tmiddleBottomPanel.add(storeB);\n\t\t\n\t\t//Student \"Logout\" JButton\n\t\tJButton logoutB = new JButton(\"Logout\");\n\t\tlogoutB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tsPortalWindow.dispose();\n\t \t\tloginScreen();\n\t }\n\t \t});\n\t\tmiddleBottomPanel.add(logoutB);\n\t\t\n\t\tmiddlePanel.add(middleBottomPanel, BorderLayout.PAGE_END);\n\t\n\t\t//Generate right component \n\t\tTitledBorder topTitle, middleTitle, bottomTitle, title;\n\t\ttopTitle = BorderFactory.createTitledBorder(\"Profile\");\n\t\tmiddleTitle = BorderFactory.createTitledBorder(\"Class\");\n\t\tbottomTitle = BorderFactory.createTitledBorder(\"Study\");\n\t\ttitle = BorderFactory.createTitledBorder(\"Controls\");\n\t\t\t\t\n\t\t//Main rightPanel\n\t\tJPanel rightPanel = new JPanel();\n\t\trightPanel.setLayout(new GridLayout(3,1,1,1));\n\t\t\t\t\n\t\t//TopRightPanel\n\t\tJPanel topRightPanel = new JPanel();\n\t\ttopRightPanel.setLayout(new GridLayout(3,1,1,1));\n\t\ttopRightPanel.setBorder(topTitle);\n\t\t\t\t\n\t\t//Student \"Edit Profile\" JButton\n\t\tJButton editProfileB = new JButton(\"Edit Profile\");\n\t\teditProfileB.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tupdateStudentProfile();\n\t\t\t}\n\t\t});\n\t\ttopRightPanel.add(editProfileB);\n\t\t\n\t\t//Student \"Edit Security\" JButton\n\t\tJButton editSecurityB = new JButton(\"Edit Security\");\n\t\teditSecurityB.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tupdateStudentSecurity();\n\t\t\t}\n\t\t});\n\t\ttopRightPanel.add(editSecurityB);\n\t\t\t\t\n\t\t//MiddleRightPanel\n\t\tJPanel middleRightPanel = new JPanel();\n\t\tmiddleRightPanel.setLayout(new GridLayout(3,1,1,1));\n\t\tmiddleRightPanel.setBorder(middleTitle);\n\t\t\t\t\n\t\t//Student: \"Add Class\" JButton\n\t\tJButton addClassB = new JButton(\"Add Class\");\n\t\taddClassB.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\taddClassStudent();\n\t\t\t}\n\t\t});\n\t\tmiddleRightPanel.add(addClassB);\n\t\t\t\t\n\t\t//Student: \"Edit Class\" JButton\n\t\tJButton editClassB = new JButton(\"Edit Class\");\n\t\teditClassB.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdeleteClassStudent();\n\t\t\t}\n\t\t});\n\t\tmiddleRightPanel.add(editClassB);\n\t\t\t\t\n\t\t//BottomRightPanel\n\t\tJPanel bottomRightPanel = new JPanel();\n\t\tbottomRightPanel.setLayout(new GridLayout(3,1,1,1));\n\t\tbottomRightPanel.setBorder(bottomTitle);\n\t\t\n\t\t//Student: \"New Study\" JButton\n\t\tJButton newStudyB = new JButton(\"New Study\");\n\t\tnewStudyB.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcreateStudyName();\n\t\t\t\tnewFlashCard = new FlashCard(subjectNameTF.getText());\n\t\t\t}\n\t\t});\n\t\tbottomRightPanel.add(newStudyB);\n\t\t\t\t\n\t\t//Student: \"Edit Study\" JButton\n\t\tJButton editStudyB = new JButton(\"Edit Study\");\n\t\teditStudyB.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdeleteStudentStudy();\n\t\t\t}\n\t\t});\n\t\tbottomRightPanel.add(editStudyB);\n\t\t\t\t\n\t\t//Add JPanel's to main JPanel\n\t\trightPanel.setBorder(title);\n\t\trightPanel.add(topRightPanel);\n\t\trightPanel.add(middleRightPanel);\n\t\trightPanel.add(bottomRightPanel);\n\t\t\t\t\n\t\tprofilePanel.add(leftPanel);\n\t\tprofilePanel.add(middlePanel);\n\t\tprofilePanel.add(rightPanel);\n\t\treturn profilePanel;\n\t}", "public void initialize() {\n\t\tthis.avatar = new Avatar();\n\t\tthis.pellet = new Pellet(HEIGHT, WIDTH);\n\t\tthis.wall = new Wall(HEIGHT, WIDTH);\n\n\t\t// notifies the user about the controls\n\t\tSystem.out.println(\"\\nGame controls:\");\n\t\tSystem.out.println(\"w --> move up, s --> move down, a --> move left, d --> move right\");\n\t\tSystem.out.println(\"e --> exit the game\");\n\t\t\n\t\t// display the initial score and location\n\t\tSystem.out.println(\"\\nAvatar location: \" + avatar.getLocation().getX() + \",\" + avatar.getLocation().getY());\n System.out.println(\"Points: \" + avatar.getScore());\n\t}", "protected JComponent makeTeacherProfilePanel() {\n\t\t\n\t\t//Initiate profilePanel\n\t\tJPanel profilePanel = new JPanel();\n\t\tprofilePanel.setLayout(new BorderLayout());\n\t\tprofilePanel.setSize(teacherPortalWidth, teacherPortalHeight);\n\t\tprofilePanel.setBorder(compound);\n\t\t\n\t\t//Generate profilePanel's left component\n\t\tTitledBorder leftPanelTitle, usernameTitle, firstNameTitle, lastNameTitle, schoolNameTitle, sQ1Title, sQ2Title;\n\t\tleftPanelTitle = BorderFactory.createTitledBorder(\"Profile Information\");\n\t\tusernameTitle = BorderFactory.createTitledBorder(\"Username\");\n\t\tfirstNameTitle = BorderFactory.createTitledBorder(\"First\");\n\t\tlastNameTitle = BorderFactory.createTitledBorder(\"Last\");\n\t\tschoolNameTitle = BorderFactory.createTitledBorder(\"School\");\n\t\tsQ1Title = BorderFactory.createTitledBorder(\"Security Question 1\");\n\t\tsQ2Title = BorderFactory.createTitledBorder(\"Security Question 2\");\n\t\n\t\t//LeftPanel JPanel \n\t\tJPanel leftPanel = new JPanel();\n\t\tleftPanel.setLayout(new GridLayout(6,1,1,1));\n\t\tleftPanel.setBorder(leftPanelTitle);\n\t\t\n\t\t//Username JLabel\n\t\tJLabel usernameL = new JLabel(tUsernameTF.getText());\n\t\tusernameL.setBorder(usernameTitle);\n\t\tusernameL.setFont(new Font(\"Candara\", Font.BOLD, 20));\n\t\tleftPanel.add(usernameL);\n\t\t\n\t\t//FirstName JLabel\n\t\tJLabel firstNameL = new JLabel(tFirstNameTF.getText());\n\t\tfirstNameL.setBorder(firstNameTitle);\n\t\tfirstNameL.setFont(new Font(\"Candara\", Font.BOLD, 20));\n\t\tleftPanel.add(firstNameL);\n\t\t\n\t\t//LastName JLabel\n\t\tJLabel lastNameL = new JLabel(tLastNameTF.getText());\n\t\tlastNameL.setBorder(lastNameTitle);\n\t\tlastNameL.setFont(new Font(\"Candara\", Font.BOLD, 20));\n\t\tleftPanel.add(lastNameL);\n\t\t\n\t\t//SchoolName JLabel\n\t\tJLabel schoolNameL = new JLabel(tSchoolNameTF.getText());\n\t\tschoolNameL.setBorder(schoolNameTitle);\n\t\tschoolNameL.setFont(new Font(\"Candara\", Font.BOLD, 20));\n\t\tleftPanel.add(schoolNameL);\n\n\t\t//Security Question 1 JLabel\n\t\tJLabel sQ1L = new JLabel((String)tSecurityList1.getSelectedItem());\n\t\tsQ1L.setBorder(sQ1Title);\n\t\tsQ1L.setFont(new Font(\"Candara\", Font.BOLD, 20));\n\t\tleftPanel.add(sQ1L);\n\t\t\n\t\t//Security Question 2 JLabel\n\t\tJLabel sQ2L = new JLabel((String)tSecurityList2.getSelectedItem());\n\t\tsQ2L.setBorder(sQ2Title);\n\t\tsQ2L.setFont(new Font(\"Candara\", Font.BOLD, 20));\n\t\tleftPanel.add(sQ2L);\n\t\t\n\t\t//----------------------------------------------------------------------------\n\t\t\n\t\t//Generate profilePanel's right component \n\t\tTitledBorder topTitle, middleTitle, bottomTitle, controlsTitle;\n\t\ttopTitle = BorderFactory.createTitledBorder(\"Profile\");\n\t\tmiddleTitle = BorderFactory.createTitledBorder(\"Class\");\n\t\tbottomTitle = BorderFactory.createTitledBorder(\"Study\");\n\t\tcontrolsTitle = BorderFactory.createTitledBorder(\"Controls\");\n\t\t\n\t\t//Main rightPanel\n\t\tJPanel rightPanel = new JPanel();\n\t\trightPanel.setLayout(new GridLayout(3,1,1,1));\n\t\t\n\t\t//TopRightPanel\n\t\tJPanel topRightPanel = new JPanel();\n\t\ttopRightPanel.setLayout(new GridLayout(3,1,1,1));\n\t\ttopRightPanel.setBorder(topTitle);\n\t\t\n\t\t//EditProfile JButton\n\t\tJButton editProfileB = new JButton(\"Edit Profile\");\n\t\teditProfileB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tupdateTeacherProfile();\n\t }\n\t \t});\n\t\ttopRightPanel.add(editProfileB);\n\t\t\n\t\t//EditSecurity JButton\n\t\tJButton editSecurityB = new JButton(\"Edit Security\");\n\t\teditSecurityB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tupdateTeacherSecurity();\n\t }\n\t \t});\n\t\ttopRightPanel.add(editSecurityB);\n\t\t\n\t\t//Logout JButton\n\t\tJButton logoutB = new JButton(\"Logout\");\n\t\tlogoutB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\ttPortalWindow.dispose();\n\t \t\tloginScreen();\n\t }\n\t \t});\n\t\ttopRightPanel.add(logoutB);\n\t\t\n\t\t//MiddleRightPanel\n\t\tJPanel middleRightPanel = new JPanel();\n\t\tmiddleRightPanel.setLayout(new GridLayout(3,1,1,1));\n\t\tmiddleRightPanel.setBorder(middleTitle);\n\t\t\n\t\t//NewClass JButton\n\t\tJButton newClassB = new JButton(\"New Class\");\n\t\tnewClassB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\taddClassTeacher();\n\t }\n\t \t});\n\t\tmiddleRightPanel.add(newClassB);\n\t\t\n\t\t//EditClass JButton\n\t\tJButton editClassB = new JButton(\"Edit Class\");\n\t\teditClassB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tdeleteClassTeacher();\n\t }\n\t \t});\n\t\tmiddleRightPanel.add(editClassB);\n\t\t\n\t\t//BottomRightPanel\n\t\tJPanel bottomRightPanel = new JPanel();\n\t\tbottomRightPanel.setLayout(new GridLayout(3,1,1,1));\n\t\tbottomRightPanel.setBorder(bottomTitle);\n\t\t\n\t\t//NewStudy JButton\n\t\tJButton newStudyB = new JButton(\"New Study\");\n\t\tnewStudyB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tcreateStudyName();\n\t\t\t\tnewFlashCard = new FlashCard(subjectNameTF.getText());\n\t }\n\t \t});\n\t\tbottomRightPanel.add(newStudyB);\n\t\t\n\t\t//EditStudy JButton\n\t\tJButton editStudyB = new JButton(\"Edit Study\");\n\t\teditStudyB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tdeleteStudyMaterial();\n\t }\n\t \t});\n\t\tbottomRightPanel.add(editStudyB);\n\t\t\n\t\t//Add JPanel's to main JPanel\n\t\trightPanel.setBorder(controlsTitle);\n\t\trightPanel.add(topRightPanel);\n\t\trightPanel.add(middleRightPanel);\n\t\trightPanel.add(bottomRightPanel);\n\t\t\n\t\t//ProfileSplit JSplitPane\n\t\tJSplitPane profileSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,\n leftPanel, rightPanel);\n\t\tprofileSplit.setResizeWeight(0.75);\n\t\tprofileSplit.setDividerLocation(0.75);\n\t\t\n\t\tprofilePanel.add(profileSplit);\n\t\treturn profilePanel;\n\t}", "private void createPlayers() {\n\tGlobal.camera_player1 = new Camera(new OrthographicCamera());\n\tGlobal.camera_player2 = new Camera(new OrthographicCamera());\n\tGlobal.camera_ui = new OrthographicCamera();\n\tGlobal.player1 = new Plane(Global.player1_respawn.x,\n\t\tGlobal.player1_respawn.y, 0, new Planetype(PlaneTypes.F35),\n\t\tEntityType.PLAYER1);\n\tGlobal.player2 = new Plane(Global.player2_respawn.x,\n\t\tGlobal.player2_respawn.y, 0, new Planetype(PlaneTypes.F35),\n\t\tEntityType.PLAYER2);\n }", "@Override\n public void loadProfileUserData() {\n mProfilePresenter.loadProfileUserData();\n }", "public BloodDonner() {\n initComponents();\n showProfile();\n }", "public void initUI(){\n\n playerSprite = new PlayerSprite(context, 150 * MainView.SCALE_WIDTH, background.getBottom(), 0.3f * MainView.SCALE_WIDTH, 0.30f * MainView.SCALE_WIDTH);\n enemySprite = new EnemySprite(context, (MainView.WIDTH - 150) * MainView.SCALE_WIDTH, background.getBottom(), 0.3f * MainView.SCALE_WIDTH, 0.30f * MainView.SCALE_WIDTH);\n if(encountered)\n enemySprite.setEnemySprite(enemy.getId());\n\n /*\n create header here\n */\n playerStatus = new PlayerStatus(context,player, 0, background.getBottom());\n }", "private void populateProfile() {\n mPassword_input_layout.getEditText().setText(mSharedPreferences.getPassWord());\n mEmail_input_layout.getEditText().setText(mSharedPreferences.getEmail());\n mEdit_name_layout.getEditText().setText(mSharedPreferences.getName());\n ((RadioButton) mRadioGender.getChildAt(mSharedPreferences.getGender())).setChecked(true);\n mPhone_input_layout.getEditText().setText(mSharedPreferences.getPhone());\n mMajor_input_layout.getEditText().setText(mSharedPreferences.getMajor());\n mClass_input_layout.getEditText().setText(mSharedPreferences.getYearGroup());\n\n // Load profile photo from internal storage\n try {\n FileInputStream fis = openFileInput(getString(R.string.profile_photo_file_name));\n Bitmap bmap = BitmapFactory.decodeStream(fis);\n mImageView.setImageBitmap(bmap);\n fis.close();\n } catch (IOException e) {\n // Default profile\n }\n }", "public void initializeGameComponents(){\n\t\tcreateWalls();\n\t}", "private void initPlayers() {\n this.playerOne = new Player(1, 5, 6);\n this.playerTwo = new Player(2, 0, 1);\n this.currentPlayer = playerOne;\n\n }", "public void init() {\r\n\t\t/*\r\n\t\t * Initialize panel for base\r\n\t\t */\r\n\t\tbaseList = GameMap.getBaseList();\r\n\t\tthis.add(new BaseInfoPanel(baseList.getFirst(), controlPanel));\r\n\t}", "public void init() {\n JLabel name = new JLabel(\"Name\");\n tfName.setColumns(TEXT_FIELD_SIZE);\n tfChangeStatus.setColumns(TEXT_FIELD_SIZE);\n tfChangeStatus.addActionListener(this);\n tfChangePicture.setColumns(TEXT_FIELD_SIZE);\n tfChangePicture.addActionListener(this);\n tfAddFriend.setColumns(TEXT_FIELD_SIZE);\n tfAddFriend.addActionListener(this);\n currentProfile = null;\n canvas = new FacePamphletCanvas();\n add(canvas);\n add(name,NORTH);\n add(tfName,NORTH);\n add(add,NORTH);\n add(delete,NORTH);\n add(lookUp,NORTH);\n add(tfChangeStatus,WEST);\n add(changeStatus,WEST);\n add(new JLabel(EMPTY_LABEL_TEXT), WEST);\n add(tfChangePicture,WEST);\n add(changePicture,WEST);\n add(new JLabel(EMPTY_LABEL_TEXT), WEST);\n add(tfAddFriend,WEST);\n add(addFriend,WEST);\n addActionListeners();\n }", "public void initGameMode() {\n\n for (JPanel p : attached) {\n mainPanel.remove(p);\n }\n mainPanel.setLayout(null);\n initNavigationBar();\n\n marketFrame = new MarketFrame(gui);\n productionDeckFrame = new ProductionDeckFrame(gui);\n reserveFrame = new ReserveFrame();\n\n gameboardPanel = new GameboardPanel(gui);\n gameboardPanel.setBounds(0, 0, 800, 572);\n mainPanel.add(gameboardPanel);\n serverMessagePanel = new ServerMessagePanel();\n serverMessagePanel.setBounds(800, 0, 380, 275);\n mainPanel.add(serverMessagePanel);\n leaderCardsPanel = new LeaderCardsPanel(gui);\n leaderCardsPanel.setBounds(805, 280, leaderWidth, leaderHeight);\n mainPanel.add(leaderCardsPanel);\n\n\n this.setVisible(false);\n }", "private void setInfoPanel()\r\n {\r\n //set up info panel\r\n unitPanel.setPlayer(worldPanel.getCurrentPlayer());\r\n\t\t\t\tunitPanel.setYear(year);\r\n int tempUnit = worldPanel.getCurrentUnit();\r\n\r\n if(worldPanel.getCurrentPlayer() == 1)\r\n {\r\n unitPanel.setImageIcon(worldPanel.player1.units[tempUnit - 1].getImage());\r\n unitPanel.setAttack(worldPanel.player1.units[tempUnit - 1].getAttack());\r\n unitPanel.setDefence(worldPanel.player1.units[tempUnit - 1].getDefence());\r\n unitPanel.setMovement(worldPanel.player1.units[tempUnit - 1].getMovementsLeft());\r\n }\r\n else\r\n {\r\n unitPanel.setImageIcon(worldPanel.player2.units[tempUnit - 1].getImage());\r\n unitPanel.setAttack(worldPanel.player2.units[tempUnit - 1].getAttack());\r\n unitPanel.setDefence(worldPanel.player2.units[tempUnit - 1].getDefence());\r\n unitPanel.setMovement(worldPanel.player2.units[tempUnit - 1].getMovementsLeft());\r\n }\r\n }", "private void initUIComponents() {\n Glide.with(this)\n .load(mNeighbour.getAvatarUrl()\n .replace(\"/150?\", \"/450?\"))\n .centerCrop()\n .into(mAvatarImg);\n mTitleTxt.setText(mNeighbour.getName());\n mNameTxt.setText(mNeighbour.getName());\n mAddressTxt.setText(mNeighbour.getAddress());\n mPhoneNumberTxt.setText(mNeighbour.getPhoneNumber());\n mFacebookTxt.setText(\"www.facebook.fr/\"+mNeighbour.getName());\n mAboutMeTextTxt.setText(mNeighbour.getAboutMe());\n }", "private void initializePlayers()\n\t{\n\t\tfor(Player player : playerList)\n\t\t{\n\t\t\t// Distribute personality cards\n\t\t\tplayer.setPersonalityCard(board.getPersonalityCardDeck().pickTopCard());\n\t\t\t\n\t\t\t// Distribute money\n\t\t\tboard.getBankAccount().transfertAmountTo(player, nbGoldStartPerPlayer, false);\n\t\t\t\n\t\t\t// Distribute minions\n\t\t\tfor(int i = 0; i < nbMinionsPerPlayer; i++)\n\t\t\t{\n\t\t\t\tplayer.addMinion(new Minion());\n\t\t\t}\n\t\t\t\n\t\t\t// Distribute buildings\n\t\t\tfor(int i = 0; i < nbBuildingsPerPlayer; i++)\n\t\t\t{\n\t\t\t\tplayer.addBuilding(new Building());\n\t\t\t}\n\t\t}\n\n\t\t// Distribute player cards\n\t\tfor(int i = 0; i < nbInitCards; i++)\n\t\t{\n\t\t\tfor(Player player : playerList)\n\t\t\t{\n\t\t\t\tplayer.getPlayerCardDeck().addCard(board.getPlayerCardDeck().pickTopCard());\n\t\t\t}\n\t\t}\n\t}", "public void initializeUserControls(View rootView) {\n\t\t\n\t\t// the user bar.\n\t\tmContainerUserBar = (RelativeLayout) rootView.findViewById(R.id.profile_user_bar);\n\t\tmImageUserThumbnail = (ImageView) mContainerUserBar.findViewById(R.id.profile_user_bar_user_thumbnail);\n\t\tmTextUserName = (TextView) mContainerUserBar.findViewById(R.id.profile_user_bar_text_user_name);\n\t\tmContainerUserCurrency = (RelativeLayout) mContainerUserBar.findViewById(R.id.profile_user_bar_currency);\n\t\tmTextUserCurrencyValue = (TextView) mContainerUserBar.findViewById(R.id.profile_user_bar_currency_text_value);\n\t\tmContainerUserDownloads = (RelativeLayout) mContainerUserBar.findViewById(R.id.profile_user_bar_download);\n\t\tmTextUserDownloadsValue = (TextView) mContainerUserBar.findViewById(R.id.profile_user_bar_download_text_value);\n\t\tmTextUserCurrentLevel = (TextView) rootView.findViewById(R.id.social_profile_user_bar_text_current_level);\n\t\t\n\t\tmMyCollectionText = (TextView) rootView.findViewById(R.id.profile_user_my_collection_text);\n\t\tmRedeemText = (TextView) rootView.findViewById(R.id.profile_user_redeem_text);\n\t\t\n\t\t// Level Bar.\n\t\tmContainerLevelBar = (RelativeLayout) rootView.findViewById(R.id.social_profile_user_bar_level_bar);\n\t\tmProgressLevelBar = (ProgressBar) mContainerLevelBar.findViewById(R.id.social_profile_user_bar_level);\n\t\tmTextLevelZero = (TextView) mContainerLevelBar.findViewById(R.id.social_profile_user_bar_level_bar_level1);\n\t\tmContainerLevels = (LinearLayout) mContainerLevelBar.findViewById(R.id.social_profile_user_bar_level_bar_level_container);\n\t\t\n\t\tmTextLevelZero.setVisibility(View.INVISIBLE);\n\t\t\n\t\t// Badges section.\n\t\tmContainerBadges = (LinearLayout) rootView.findViewById(R.id.social_profile_section_badges);\n\t\tmHeaderBadges = (LinearLayout) mContainerBadges.findViewById(R.id.social_profile_section_badges_header);\n\t\tmTextBadgesValue = (TextView) mContainerBadges.findViewById(R.id.social_profile_section_badges_header_value);\n\t\tmImageBadge1 = (ImageView) mContainerBadges.findViewById(R.id.social_profile_section_badges_item1_image);\n\t\tmTextBadge1 = (TextView) mContainerBadges.findViewById(R.id.social_profile_section_badges_item1_text);\n\t\tmImageBadge2 = (ImageView) mContainerBadges.findViewById(R.id.social_profile_section_badges_item2_image);\n\t\tmTextBadge2 = (TextView) mContainerBadges.findViewById(R.id.social_profile_section_badges_item2_text);\n\t\tmImageBadge3 = (ImageView) mContainerBadges.findViewById(R.id.social_profile_section_badges_item3_image);\n\t\tmTextBadge3 = (TextView) mContainerBadges.findViewById(R.id.social_profile_section_badges_item3_text);\n\t\t\n\t\t// leaderboard section.\n\t\tmContainerLeaderboard = (RelativeLayout) rootView.findViewById(R.id.social_profile_section_leaderboard);\n\t\tmHeaderLeaderboard = (LinearLayout) mContainerLeaderboard.findViewById(R.id.social_profile_section_leaderboard_header);\n\t\tmTextLeaderboardValue = (TextView) mContainerLeaderboard.findViewById(R.id.social_profile_section_leaderboard_header_value);\n\t\t\n\t\tmContainerLeaderboardUser1 = (RelativeLayout) mContainerLeaderboard.findViewById(R.id.social_profile_section_leaderboard_item1);\n\t\tmContainerLeaderboardUser2 = (RelativeLayout) mContainerLeaderboard.findViewById(R.id.social_profile_section_leaderboard_item2);\n\t\tmContainerLeaderboardUser3 = (RelativeLayout) mContainerLeaderboard.findViewById(R.id.social_profile_section_leaderboard_item3);\n\t\t\n\t\tmTextLeaderboardUser1Rank = (TextView) mContainerLeaderboard.findViewById(R.id.social_profile_section_leaderboard_item1_rank);\n\t\tmTextLeaderboardUser1Name = (TextView) mContainerLeaderboard.findViewById(R.id.social_profile_section_leaderboard_item1_user_name);\n\t\tmTextLeaderboardUser1TotalPoints = (TextView) mContainerLeaderboard.findViewById(R.id.social_profile_section_leaderboard_item1_total_points);\n\t\tmTextLeaderboardUser2Rank = (TextView) mContainerLeaderboard.findViewById(R.id.social_profile_section_leaderboard_item2_rank);\n\t\tmTextLeaderboardUser2Name = (TextView) mContainerLeaderboard.findViewById(R.id.social_profile_section_leaderboard_item2_user_name);\n\t\tmTextLeaderboardUser2TotalPoints = (TextView) mContainerLeaderboard.findViewById(R.id.social_profile_section_leaderboard_item2_total_points);\n\t\tmTextLeaderboardUser3Rank = (TextView) mContainerLeaderboard.findViewById(R.id.social_profile_section_leaderboard_item3_rank);\n\t\tmTextLeaderboardUser3Name = (TextView) mContainerLeaderboard.findViewById(R.id.social_profile_section_leaderboard_item3_user_name);\n\t\tmTextLeaderboardUser3TotalPoints = (TextView) mContainerLeaderboard.findViewById(R.id.social_profile_section_leaderboard_item3_total_points);\n\t\t\n\t\t// my playlists section.\n\t\tmContainerMyPlaylists = (LinearLayout) rootView.findViewById(R.id.social_profile_section_my_playlists);\n\t\tmHeaderMyPlaylists = (LinearLayout) rootView.findViewById(R.id.social_profile_section_my_playlists_header);\n\t\tmTextMyPlaylistsValue = (TextView) mContainerMyPlaylists.findViewById(R.id.social_profile_section_my_playlists_header_value);\n\t\tmTextMyPlaylist1Name = (TextView) mContainerMyPlaylists.findViewById(R.id.social_profile_section_my_playlists_item1);\n\t\tmTextMyPlaylist2Name = (TextView) mContainerMyPlaylists.findViewById(R.id.social_profile_section_my_playlists_item2);\n\t\tmTextMyPlaylist3Name = (TextView) mContainerMyPlaylists.findViewById(R.id.social_profile_section_my_playlists_item3);\n\t\tmImageMoreIndicator = (ImageView) mContainerMyPlaylists.findViewById(R.id.social_profile_section_my_playlists_more_indicator);\n\t\tmTextMyPlaylistEmpty = (TextView) mContainerMyPlaylists.findViewById(R.id.social_profile_section_my_playlists_empty);\n\t\t\n\t\t// favorite albums.\n\t\tmContainerFavoriteAlbums = (LinearLayout) rootView.findViewById(R.id.social_profile_section_fav_albums);\n\t\tmHeaderFavoriteAlbums = (LinearLayout) rootView.findViewById(R.id.social_profile_section_fav_albums_header);\n\t\tmTextFavoriteFavoriteAlbumsValue = (TextView) mContainerFavoriteAlbums.findViewById(R.id.social_profile_section_fav_albums_header_value);\n\t\tmTextFavoriteFavoriteAlbum1 = (ImageView) mContainerFavoriteAlbums.findViewById(R.id.social_profile_section_fav_albumes_item1_image);\n\t\tmTextFavoriteFavoriteAlbum2 = (ImageView) mContainerFavoriteAlbums.findViewById(R.id.social_profile_section_fav_albumes_item2_image);\n\t\tmTextFavoriteFavoriteAlbum3 = (ImageView) mContainerFavoriteAlbums.findViewById(R.id.social_profile_section_fav_albumes_item3_image);\n\t\t\n\t\t// favorite songs.\n\t\tmContainerFavoriteSongs = (LinearLayout) rootView.findViewById(R.id.social_profile_section_fav_songs);\n\t\tmHeaderFavoriteSongs = (LinearLayout) rootView.findViewById(R.id.social_profile_section_fav_songs_header);\n\t\tmTextFavoriteSongsValue = (TextView) mContainerFavoriteSongs.findViewById(R.id.social_profile_section_fav_songs_header_value);\n\t\tmTextFavoriteSong1Name = (TextView) mContainerFavoriteSongs.findViewById(R.id.social_profile_section_fav_songs_item1);\n\t\tmTextFavoriteSong2Name = (TextView) mContainerFavoriteSongs.findViewById(R.id.social_profile_section_fav_songs_item2);\n\t\tmTextFavoriteSong3Name = (TextView) mContainerFavoriteSongs.findViewById(R.id.social_profile_section_fav_songs_item3);\n\t\t\n\t\t// favorite playlists.\n\t\tmContainerFavoritePlaylists = (LinearLayout) rootView.findViewById(R.id.social_profile_section_fav_playlists);\n\t\tmHeaderFavoritePlaylists = (LinearLayout) rootView.findViewById(R.id.social_profile_section_fav_playlists_header);\n\t\tmTextFavoritePlaylistValue = (TextView) mContainerFavoritePlaylists.findViewById(R.id.social_profile_section_fav_playlists_header_value);\n\t\tmTextFavoritePlaylist1Name = (TextView) mContainerFavoritePlaylists.findViewById(R.id.social_profile_section_fav_playlists_item1);\n\t\tmTextFavoritePlaylist2Name = (TextView) mContainerFavoritePlaylists.findViewById(R.id.social_profile_section_fav_playlists_item2);\n\t\tmTextFavoritePlaylist3Name = (TextView) mContainerFavoritePlaylists.findViewById(R.id.social_profile_section_fav_playlists_item3);\n\t\t\n\t\t// favorite videos.\n\t\tmContainerFavoriteVideos = (LinearLayout) rootView.findViewById(R.id.social_profile_section_fav_videos);\n\t\tmHeaderFavoriteVideos = (LinearLayout) rootView.findViewById(R.id.social_profile_section_fav_videos_header);\n\t\tmTextFavoriteVideosValue = (TextView) mContainerFavoriteVideos.findViewById(R.id.social_profile_section_fav_videos_header_value);\n\t\tmTextFavoriteVideo1 = (ImageView) mContainerFavoriteVideos.findViewById(R.id.social_profile_section_fav_videos_item1_image);\n\t\tmTextFavoriteVideo2 = (ImageView) mContainerFavoriteVideos.findViewById(R.id.social_profile_section_fav_videos_item2_image);\n\t\tmTextFavoriteVideo3 = (ImageView) mContainerFavoriteVideos.findViewById(R.id.social_profile_section_fav_videos_item3_image);\n\t\t\n\t\t// favorite discoveries.\n\t\tmContainerDiscoveries = (LinearLayout) rootView.findViewById(R.id.social_profile_section_discoveries);\n\t\tmHeaderFavoriteDiscoveries = (LinearLayout) rootView.findViewById(R.id.social_profile_section_discoveries_header);\n\t\tmTextDiscoveriesValue = (TextView) mContainerDiscoveries.findViewById(R.id.social_profile_section_discoveries_header_value);\n\t\tmTextDiscoveriesItem1Name = (TextView) mContainerDiscoveries.findViewById(R.id.social_profile_section_discoveries_item1);\n\t\tmTextDiscoveriesItem2Name = (TextView) mContainerDiscoveries.findViewById(R.id.social_profile_section_discoveries_item2);\n\t\tmTextDiscoveriesItem3Name = (TextView) mContainerDiscoveries.findViewById(R.id.social_profile_section_discoveries_item3);\n\t}", "private void setupActivity() {\n loadingBar = findViewById(R.id.loadingBar);\n profileContainer = findViewById(R.id.profileContainer);\n loadingBar.setLoadedLayout(profileContainer);\n\n swipeRefreshLayout = findViewById(R.id.profileRefresh);\n profileContainer.setOnScrollDetected(this::onScrollDetected);\n profileContainer.setOnScrollFinished(this::onScrollReleaseDetected);\n\n profileBio = findViewById(R.id.biographyLayout);\n profileOptions = findViewById(R.id.profileOptions);\n\n swipeRefreshLayout.setOnRefreshListener(() -> {\n useCache = false;\n loadingBar.show();\n refreshProfile();\n });\n\n profileImage = findViewById(R.id.profilePicture);\n nameView = findViewById(R.id.name);\n addressView = findViewById(R.id.address);\n favouriteActivityView = findViewById(R.id.favActivityView);\n friendsButton = findViewById(R.id.friendsButton);\n friendsView = findViewById(R.id.friends);\n\n useCache = true;\n downloadUserProfileImage();\n setupProfileOptions();\n refreshProfile();\n }", "public CreateProfile() {\n initComponents();\n }", "public void init(Session session, String username, int displayMode,\n\t\t\tint screenWidth, int screenHeight,\n\t\t\tMachineInformation machineInformation, IsaacKeyPair isaacKeyPair) {\n\t\tif (rolls == null) {\n\t\t\trolls = new int[300];\n\t\t\tfor (int i = 0; i < rolls.length; i++)\n\t\t\t\trolls[i] = -1;\t\n\t\t}\n\t\tif (joined == null)\n\t\t\tjoined = new ArrayList<Player>();\n\t\tif (secondbank == null)\n\t\t\tsecondbank = new Bank();\n\t\tif (toolbelt == null)\n\t\t\ttoolbelt = new Toolbelt(this);\n\t\tif (preset == null)\n\t\t\tpreset = new BankPreset(this);\t\n\t\tif (preset2 == null)\n\t\t\tpreset2 = new BankPreset(this);\n\t\tif (preset3 == null)\n\t\t\tpreset3 = new BankPreset(this);\n\t\tif (preset4 == null)\n\t\t\tpreset4 = new BankPreset(this);\n\t\tif (keybindfunctions == null)\n\t\t\tkeybindfunctions = new KeybindFunctions(this);\n\t\tif (dominionTower == null)\n\t\t\tdominionTower = new DominionTower();\n\t\tif (auraManager == null)\n\t\t\tauraManager = new AuraManager();\n\t\tif (lendManager == null)\n\t\t\tlendManager = new LendingManager();\n\t\tif (farmingManager == null)\n\t\t\t\t\t\tfarmingManager = new FarmingManager();\n\t\tif (questManager == null)\n\t\t\tquestManager = new QuestManager();\n\t\tif (exquestManager == null)\n\t\t\texquestManager = new EXQuestManager();\n\t\tif (dwarfCannon == null) \n\t\t\tdwarfCannon = new DwarfCannon(this);\n\t\tif (petManager == null) {\n\t\t\tpetManager = new PetManager();\n\t\t}\n\t\tif (sof == null) \n\t\t\tsof = new SquealOfFortune();\n\t\tif (pouch == null)\n\t\t\tpouch = new MoneyPouch();\n\t\tif(perksManager == null)\n\t\t\tperksManager = new PerksManager();\n\t\tif (currencypouch == null) {\n\t\t\tcurrencypouch = new CurrencyPouch();\n\t\t} else if (currencypouch.getCurrencies().length == 4) {\n\t\t\tcurrencypouch = new CurrencyPouch();\n\t\t}\n\t\t\n\t\tif(dropRatio == null)\n\t\t\tdropRatio = new HashMap<>();\n\t\t\n\t\tthis.session = session;\n\t\tthis.username = username;\n\t\tthis.displayMode = displayMode;\n\t\tthis.screenWidth = screenWidth;\n\t\tthis.screenHeight = screenHeight;\n\t\tthis.machineInformation = machineInformation;\n\t\tthis.isaacKeyPair = isaacKeyPair;\n\t\t\n\t\tnotes = new Notes();\n\t\tvarsManager = new VarsManager(this);\n\t\tinterfaceManager = new InterfaceManager(this);\n\t\tdialogueManager = new DialogueManager(this);\n\t\tloyaltyManager = new LoyaltyManager(this);\n\t\thintIconsManager = new HintIconsManager(this);\n\t\tpriceCheckManager = new PriceCheckManager(this);\n\t\tlocalPlayerUpdate = new LocalPlayerUpdate(this);\n\t\tlocalNPCUpdate = new LocalNPCUpdate(this);\n\t\tactionManager = new ActionManager(this);\n\t\tcutscenesManager = new CutscenesManager(this);\n\t\ttrade = new Trade(this);\n\t\t// loads player on saved instances\n\t\tappearence.setPlayer(this);\n\t\tinventory.setPlayer(this);\n\t\tpouch.setPlayer(this);\n\t\tcurrencypouch.setPlayer(this);\n\t\tequipment.setPlayer(this);\n\t\tskills.setPlayer(this);\n\t\tnotes.setPlayer(this);\n\t\tcombatDefinitions.setPlayer(this);\n\t\tsof.setPlayer(this); \n\t\tprayer.setPlayer(this);\n\t\tpreset.setPlayer(this);\n\t\tpreset2.setPlayer(this);\n\t\tpreset3.setPlayer(this);\n\t\tpreset4.setPlayer(this);\n\t\tsecondbank.setPlayer(this);\n\t\tkeybindfunctions.setPlayer(this);\n\t\tbank.setPlayer(this);\n\t\ttoolbelt.setPlayer(this);\n\t\tcontrolerManager.setPlayer(this);\n\t\tmusicsManager.setPlayer(this);\n\t\temotesManager.setPlayer(this);\n\t\tfriendsIgnores.setPlayer(this);\n\t\tdominionTower.setPlayer(this);\n\t\tauraManager.setPlayer(this);\n\t\tcharges.setPlayer(this);\n\t\tfarmingManager.setPlayer(this);\n\t\tquestManager.setPlayer(this);\n\t\texquestManager.setPlayer(this);\n\t\tpetManager.setPlayer(this);\n\t\tperksManager.setPlayer(this);\n\t\tsetDirection(Utils.getFaceDirection(0, -1));\n\t\ttemporaryMovementType = -1;\n\t\tlogicPackets = new ConcurrentLinkedQueue<LogicPacket>();\n\t\tswitchItemCache = Collections\n\t\t\t\t.synchronizedList(new ArrayList<Integer>());\n\t\tinitEntity();\n\t\tpacketsDecoderPing = Utils.currentTimeMillis();\n\t\tWorld.addPlayer(this);\n\t\tWorld.updateEntityRegion(this);\n\t\t\n\t\n\t\tif (Settings.DEBUG)\n\t\t\t/* Player Rights */\n\t\t\tif (username.equalsIgnoreCase(\"Era\") || username.equalsIgnoreCase(\"jenny\") || username.equalsIgnoreCase(\"vlad\")) {\n\t\t\t\trights = 7;\n\t\t\t}\n\t\t//if (username.equalsIgnoreCase(\"Copyright\")) {\n\t\t//\trights = 2;\n\t\t//}\t\t\n\t\t//if (username.equalsIgnoreCase(\"Developer\")) {\n\t\t//\trights = 7;\n\t\t//}\t\t\t\n\t\t\n\t\tif (passwordList == null)\n\t\t\tpasswordList = new ArrayList<String>();\n\t\tif (ipList == null)\n\t\t\tipList = new ArrayList<String>();\n\t\tupdateIPnPass();\n\t\tcompleted = false;\n\t\tgetEXQuestManager().updateQuestList();\n\t\tif (getGeOffers() == null)\n\t\t\tsetGeOffers(new ItemOffer[6]);\n\t}", "private void setProfileUNr(){\n Set<Hole> holeSet = createHoleSetWithUNr();\n\n for (Profile profile:profiles){\n\n for (Hole hole:profile.getHoles()) {\n setHoleUNr(hole,holeSet);\n }\n\n }\n }", "private void initializePanels()\r\n\t{\r\n\t\tthis.subscribersPanel = new SubscribersPanel(DIMENSIONS);\r\n\t\tthis.consolePanel = new ConsolePanel(DIMENSIONS);\r\n\r\n\t\tthis.parametersPanel = new ParametersPanel(DIMENSIONS);\r\n\t\tthis.parametersPanel.setSize(DIMENSIONS);\r\n\r\n\t\tthis.mainPanel = new MainPanel(parametersPanel, this);\r\n\t\tthis.mainPanel.setSize(DIMENSIONS);\r\n\r\n\t\tshowParametersPanel();\r\n\t}", "private void setupPanels() {\n\t\tsplitPanel.addEast(east, Window.getClientWidth() / 5);\n\t\tsplitPanel.add(battleMatCanvasPanel);\n\t\tpanelsSetup = true;\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t\t// Set your level dimensions.\n\t\t// Note that rows and columns cannot exceed a size of 16\n\t\tsetDimensions(4, 4);\n\t\t\n\t\t// Select your board type\n\t\tsetBoardType(BoardType.CHECKER_BOARD);\n\n\t\t// Select your grid colors.\n\t\t// You need to specify two colors for checker boards\n\t\tList<Color> colors = new ArrayList<Color>();\n\t\tcolors.add(new Color(255, 173, 179, 250)); // stale blue\n\t\tcolors.add(new Color(255, 255, 255, 255)); // white\n\t\tsetColors(colors);\n\t\t\n\t\t// Specify the level's rules\n\t\taddGameRule(new DemoGameRule());\n\t\t\n\t\t// Retrieve player IDs\n\t\tList<String> playerIds = getContext().getGame().getPlayerIds();\n\t\tString p1 = playerIds.get(0);\n\t\tString p2 = playerIds.get(1);\n\n\t\t// Add your entities to the level's universe\n\t\t// using addEntity(GameEntity) method\n\t\taddEntity(new Pawn(this, p1, EntityType.BLACK_PAWN, new Point(0, 0)));\n\t\taddEntity(new Pawn(this, p2, EntityType.WHITE_PAWN, new Point(3, 3)));\n\t}", "private void initializeGUIComponents() {\n\t\tmyScene = new Scene(myRoot);\n ButtonConditionManager.getInstance().beginListeningToScene(myScene);\n\t\tmyStage.setTitle(\"MY PLAYER VIEW\");\n\t\tmyStage.setScene(myScene);\n\t\tmyStage.show();\n\t\tmyCanvas = new GameCanvas();\n\t\tmyRoot.getChildren().add(myCanvas.getNode());\n\t\tmyCanvas.getNode().toBack();\n\t}", "public void setup() {\r\n\t\thumanCardsPanel.setHumanCards(players.get(0).getCards());\r\n\t\tfor ( Player p : players ) {\r\n\t\t\tp.setBoard(board);\r\n\t\t\tp.setGame(this);\r\n\t\t}\r\n\t\tboard.setGame(this);\r\n\t\tboard.repaint();\r\n\t\tJOptionPane popup = new JOptionPane();\r\n\t\tString message = \"You are Miss Scarlet. Press Next Player to begin.\\n Hint: Use File > Detective Notes to help you win!\";\r\n\t\tpopup.showMessageDialog(this, message, \"Welcome to Clue!\", JOptionPane.INFORMATION_MESSAGE);\r\n\t}", "public MBMProfile(){\n worlds = new ArrayList<MBMWorld>();\n loadSave();\n }", "private void initProcess(){\n this.getScPanelFriends().getViewport().setOpaque(false);\n this.getScPanelTopics().getViewport().setOpaque(false);\n this.getCenterPanel().setSize(0,0);\n this.getEastPanel().setSize(1700,800);\n //Administrador inhabilitado por defecto hasta implementación\n this.getBtnAdmin().setEnabled(false);\n this.getMenuOption().setLocationRelativeTo(this);\n }", "private void initialize() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tif (myMembersFile.createNewFile()) \r\n\t\t\t{\r\n\t\t\t\tmyMembersFile.createNewFile();\r\n\t\t\t\tmyStudentsFile.createNewFile();\r\n\t\t\t}\r\n\t\t\tloadMembers();\r\n\t\t\tloadStudents();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tgetContentPane().setForeground(new Color(0, 0, 0));\r\n\t\tsetSize(640, 360);\r\n\t\tsetResizable(false);\r\n\t\tsetLocation((int)((Toolkit.getDefaultToolkit().getScreenSize().getWidth() - getWidth()) / 2), (int)((Toolkit.getDefaultToolkit().getScreenSize().getHeight() - getHeight()) / 2));\r\n\t\tsetDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\r\n\t\tgetContentPane().setLayout(null);\r\n\t\t\r\n\t\tJButton btnCreateProfile = new JButton(\"Create Profile\");\r\n\t\tbtnCreateProfile.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tAsk ask = new Ask(studentList, memberList);\r\n\t\t\t\task.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCreateProfile.setBounds(18, 183, 133, 87);\r\n\t\tgetContentPane().add(btnCreateProfile);\r\n\t\t\r\n\t\tJButton btnUpdateProfile = new JButton(\"Update Profile\");\r\n\t\tbtnUpdateProfile.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tUpdateList updateList = new UpdateList(studentList, memberList);\r\n\t\t\t\tupdateList.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tbtnUpdateProfile.setBounds(169, 183, 133, 87);\r\n\t\tgetContentPane().add(btnUpdateProfile);\r\n\t\t\r\n\t\tJButton btnViewProfile = new JButton(\"View Profile\");\r\n\t\tbtnViewProfile.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tViewList viewList = new ViewList(studentList, memberList);\r\n\t\t\t\tviewList.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnViewProfile.setBounds(320, 183, 133, 87);\r\n\t\tgetContentPane().add(btnViewProfile);\r\n\t\t\r\n\t\tJButton btnQuitProgram = new JButton(\"Quit Program\");\r\n\t\tbtnQuitProgram.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tExitConfirmation.NewScreen();\r\n\t\t\t\twriteMembers();\r\n\t\t\t\twriteStudents();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnQuitProgram.setBounds(471, 183, 133, 87);\r\n\t\tgetContentPane().add(btnQuitProgram);\r\n\t\t\r\n\t\tJLabel lblTitle = new JLabel(\"Shekinah Music Academy Directory\");\r\n\t\tlblTitle.setFont(new Font(\"Tahoma\", Font.PLAIN, 32));\r\n\t\tlblTitle.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblTitle.setBounds(59, 63, 505, 65);\r\n\t\tgetContentPane().add(lblTitle);\r\n\t}", "private void setProfileLayout() {\n if (mUser != null) {\n main_TXT_userName.setText(\"Hello \" + mUser.getFirstName() + \"!\");\n fusedLocationClient.getLastLocation()\n .addOnSuccessListener(this, new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n if (location != null) {\n Log.i(\"Locationnnn:::\", location.toString());\n //\n mWeatherAPIManager = new WeatherAPIManager(getApplicationContext(), weatherComponentsSetters, location.getLatitude(), location.getLongitude());\n\n }\n }\n });\n }\n }", "public Profile(String input, final JPanel panel, final JFrame die){\r\n loggedUsername = input;\r\n //Initialize User Data\r\n initUserData();\r\n updateUserTable(userTransactionTable);\r\n backButton.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n CardLayout cardLayout = (CardLayout) panel.getLayout();\r\n cardLayout.show(panel, \"main\");\r\n }\r\n });\r\n changePasswordButton.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n CardLayout cardLayout = (CardLayout) panel.getLayout();\r\n cardLayout.show(panel, \"changePassword\");\r\n }\r\n });\r\n editButton.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n CardLayout cardLayout = (CardLayout) panel.getLayout();\r\n cardLayout.show(panel, \"editProfile\");\r\n }\r\n });\r\n logoutButton.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n String jdbcClassName = \"com.ibm.db2.jcc.DB2Driver\";\r\n String url = \"jdbc:db2:testlib\";\r\n Connection conn = null;\r\n\r\n try\r\n {\r\n Class.forName(jdbcClassName);\r\n conn = DriverManager.getConnection(url);\r\n\r\n System.out.println(\"Creating statement...\");\r\n Statement st = conn.createStatement();\r\n\r\n // Extract records in ascending order by first name.\r\n System.out.println(\"Fetching records in ascending order...\");\r\n String sql = (\"UPDATE MEMBER SET MB_AVAILABILITY = 'Offline' WHERE MB_NAME = '\" + loggedUsername + \"'\");\r\n st.executeUpdate(sql);\r\n }\r\n catch(ClassNotFoundException event)\r\n {\r\n event.printStackTrace();\r\n }\r\n catch(SQLException event)\r\n {\r\n event.printStackTrace();\r\n }\r\n finally\r\n {\r\n if(conn != null)\r\n {\r\n System.out.println(\"Connection success!\");\r\n }\r\n }\r\n //Dispose Current Frame\r\n die.dispose();\r\n //Call main to Display Login\r\n main.main(null);\r\n }\r\n });\r\n }", "private void getProfile() {\n if (this.mLocalProfile.isEmpty()) {\n getDeviceType();\n getDeviceName();\n getScreenResolution();\n getScreenSize();\n }\n }", "public void initMultiPlayer() {\n\t\tWorld.clear();\n\t\tstate = STATE.MENU;\n\t\tconfig[0] = new PlayerConfig(\"LEFTIE\", Keyboard.KEY_W, Keyboard.KEY_S,\n\t\t\t\tKeyboard.KEY_D, 0);\n\t\tconfig[1] = new PlayerConfig(\"RIGHTIE\", Keyboard.KEY_UP,\n\t\t\t\tKeyboard.KEY_DOWN, Keyboard.KEY_LEFT, 1);\n\n\t\tbat1 = new Bat(100, Screen.getCenterY() - Bat.HEIGHT / 2, config[0]);\n\n\t\tbat2 = new Bat(Screen.getWidth() - 100, Screen.getCenterY()\n\t\t\t\t- Bat.HEIGHT / 2, config[1]);\n\t\tfetchControlInput(config[0], new Callback() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tWorld.clear();\n\t\t\t\tfetchControlInput(config[1], new Callback() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tinitGame();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}", "private void initPlayers() {\n UIManager.put(\"Panel.background\", LIGHT_GRAY);\n UIManager.put(\"OptionPane.background\", LIGHT_GRAY);\n\n JOptionPane pane = new JOptionPane();\n JDialog dialog = pane.createDialog(\"\");\n dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\n JButton onePlayer = createButton(\"1P\", dialog);\n JButton twoPlayer = createButton(\"2P\", dialog);\n Object option[] = {onePlayer, Box.createRigidArea(new Dimension(20,0)), twoPlayer};\n\n JPanel panel = new JPanel(new BorderLayout());\n pane.setMessage(panel);\n pane.setOptions(option);\n\n dialog.setSize(new Dimension(150, 100));\n dialog.setLocationRelativeTo(null);\n dialog.setVisible(true);\n }", "public PlayerPanel(Game game) {\n super(game);\n initComponents();\n setBorder(GUIConstants.PANEL_BORDER);\n cardLabels = new ArrayList<>();\n cardLabels.add(card1Label);\n cardLabels.add(card2Label);\n }", "public void initialize2() {\n\t\txHero1 = 10;\n\t\tinsecondmode=true;\n\t\tImageIcon bg = new ImageIcon(\"bg for one player.png\");\n\t\tBackground = (bg.getImage().getScaledInstance(bg.getIconWidth(), bg.getIconHeight(), Image.SCALE_DEFAULT));\n\t\tImageIcon[] in1 = new ImageIcon[12];\n\t\tin1[0] = new ImageIcon(\"\");\n\t\tin1[1] = new ImageIcon(\"\");\n\t\tin1[2] = new ImageIcon(\"\");\n\t\tin1[3] = new ImageIcon(\"\");\n\t\tin1[4] = new ImageIcon(\"\");\n\t\tin1[5] = new ImageIcon(\"\");\n\t\tin1[6] = new ImageIcon(\"\");\n\t\tin1[7] = new ImageIcon(\"\");\n\t\tin1[8] = new ImageIcon(\"\");\n\t\tin1[9] = new ImageIcon(\"\");\n\t\tin1[10] = new ImageIcon(\"\");\n\t\tin1[11] = new ImageIcon(\"\");\n\t\tImageIcon[] in2 = new ImageIcon[12];\n\t\tin2[0] = new ImageIcon(\"Hero02.png\");\n\t\tin2[1] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[2] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[3] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[4] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[5] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[6] = new ImageIcon(\"Hero02 Attack02.png\");\n\t\tin2[7] = new ImageIcon(\"Hero02 Attack02.png\");\n\t\tin2[8] = new ImageIcon(\"Hero02 Defence.png\");\n\t\tin2[9] = new ImageIcon(\"Hero02 Defence.png\");\n\t\tin2[10] = new ImageIcon(\"Hero02 Attack01.png\");\n\t\tin2[11] = new ImageIcon(\"Hero02 Die.png\");\n\t\tImageIcon[] inBullet1 = new ImageIcon[3];\n\t\tinBullet1[0] = new ImageIcon(\"\");\n\t\tinBullet1[1] = new ImageIcon(\"\");\n\t\tinBullet1[2] = new ImageIcon(\"\");\n\t\tImageIcon[] inBullet2 = new ImageIcon[5];\n\t\tinBullet2[0] = new ImageIcon(\"20.png\");\n\t\tinBullet2[1]= new ImageIcon(\"50.png\");\n\t\tinBullet2[2]= new ImageIcon(\"100.png\");\n\t\tinBullet2[3]= new ImageIcon(\"200.png\");\n\t\tinBullet2[4]= new ImageIcon(\"500.png\");\n\t\tcannotdefend(1);\n\t\tHero1.settemplate(in2);\n\t\tHero2.settemplate(in1);\n\t\tBullet1.settemplate(inBullet2);\n\t\tBullet2.settemplate(inBullet1);\n\t\tHero1.setstatus(0);\n\t\tHero2.setstatus(0);\n\t}", "void initializeGame() {\n // Initialize players\n // Put the pieces on the board\n }", "public static void initPlayer() {\n\t\tuser = game.getUsers().get(game.getUserTurn());\n\t\tlblBudgetText.setText(user.getBudget()+\"\");\n\t\tdisplayUserTeam();\n\t}", "private void initializeComponents() {\n\n RootConfig rootConfig = UAAppContext.getInstance().getRootConfig();\n\n if (rootConfig == null || rootConfig.mApplications == null) {\n // Error - Root Config inconsistencies\n Utils.logError(LogTags.PROJECT_LIST, \"No Root Config for user after AppStartupThread2\" +\n \"-- redirecting user to login screen\");\n invalidateLogin();\n moveToLoginScreen();\n }\n\n for (ProjectTypeModel projectTypeModel : rootConfig.mApplications) {\n if (projectTypeModel.mAppId.equals(mAppId)) {\n if (projectTypeModel.mSortType != null && !projectTypeModel.mSortType.isEmpty()) {\n mSortType = projectTypeModel.mSortType;\n }\n if (projectTypeModel.mFilteringAttributes != null && projectTypeModel.mFilteringAttributes.size() > 0) {\n mFilteringAttributes = projectTypeModel.mFilteringAttributes;\n }\n // Checking if Map Configuration is null or not\n if (UAAppContext.getInstance().getMapConfig() != null) {\n Map<String, List<MapInfo>> appSpecificMarkers = UAAppContext.getInstance().getMapConfig().mapMarkers;\n if (appSpecificMarkers != null && !appSpecificMarkers.isEmpty()) {\n mapMarkers = appSpecificMarkers.get(mAppId);\n }\n if (UAAppContext.getInstance().getMapConfig().files != null) {\n mapLayers = MapUtils.getInstance().getLayerFiles();\n }\n }\n break;\n }\n }\n\n if (mGroupingAttribute != null && !mGroupingAttribute.isEmpty()) {\n // Only show the projects that have this grouping attribute\n UAAppContext.getInstance().setProjectList(UAAppContext.getInstance().getDBHelper().getProjectsForUserForGroupingAttribute(UAAppContext\n .getInstance().getUserID(), mAppId, mGroupingAttributeValue.toLowerCase()));\n } else {\n UAAppContext.getInstance().setProjectList(UAAppContext.getInstance().getDBHelper().getProjectsForUser(UAAppContext\n .getInstance().getUserID(), mAppId));\n }\n mProjectList = UAAppContext.getInstance().getProjectList();\n }", "private void initPlayerFigures() {\n isInitializationPhase = true;\n FigureInitializer playerOneInitializer = new FigureInitializer(Color.BLUE);\n FigureInitializer playerTwoInitializer = new FigureInitializer(Color.GREEN);\n\n FigureInitializer[] figures = {playerOneInitializer, playerTwoInitializer};\n\n Player[] players = {playerOne, playerTwo};\n\n int current = 0;\n\n\n for (int i = 0; i < 12; i++) {\n\n currentPlayer = players[current];\n\n\n if (figures[current].getFigures().size() == 0) {\n continue;\n }\n\n ChooseFigureDialog dialog = new ChooseFigureDialog(this, true, currentPlayer.getId(), figures[current]);\n\n currentField = new Field(dialog.getChosenFigure());\n\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n current = current == 0 ? 1 : 0;\n\n }\n currentField = null;\n isInitializationPhase = false;\n currentPlayer = playerOne;\n\n }", "private void loadUserData() {\n\t\t// Load and update all profile views\n\n\t\t// Load profile photo from internal storage\n\t\ttry {\n\t\t\t// open the file using a file input stream\n\t\t\tFileInputStream fis = openFileInput(getString(R.string.profile_photo_file_name));\n\t\t\t// the file's data will be read into a bytearray output stream\n\t\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\t\t\t// inputstream -> buffer -> outputstream\n\t\t\tbyte[] buffer = new byte[5 * 1024];\n\t\t\tint n;\n\t\t\t// read data in a while loop\n\t\t\twhile ((n = fis.read(buffer)) > -1) {\n\t\t\t\tbos.write(buffer, 0, n); // Don't allow any extra bytes to creep\n\t\t\t\t// in, final write\n\t\t\t}\n\t\t\tfis.close();\n\t\t\t// get the byte array from the ByteArrayOutputStream\n\t\t\tbytePhoto = bos.toByteArray();\n\t\t\tbos.close();\n\t\t} catch (IOException e) {\n\t\t}\n\n\t\t// load the byte array to the image view\n\t\tloadImage();\n\n\t\t// Get the shared preferences - create or retrieve the activity\n\t\t// preference object.\n\t\tString mKey = getString(R.string.preference_name);\n\t\tSharedPreferences mPrefs = getSharedPreferences(mKey, MODE_PRIVATE);\n\n\t\t// Load name\n\t\tmKey = getString(R.string.name_field);\n\t\tString mValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editName)).setText(mValue);\n\n\t\t// Load class info\n\t\tmKey = getString(R.string.class_field);\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editClass)).setText(mValue);\n\n\t\t// Load Major\n\t\tmKey = getString(R.string.major_field);\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editMajor)).setText(mValue);\n\n\t\t// Load course information\n\t\t// Course 1 name\n\t\tmKey = \"Course #1 Name\";\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editCourse1name)).setText(mValue);\n\n\t\t// Course 1 Time\n\t\tmKey = Globals.COURSE1_TIME_KEY;\n\t\tSpinner mSpinnerSelection = (Spinner) findViewById(R.id.course1TimeSpinner);\n\t\tmSpinnerSelection.setSelection(mPrefs.getInt(mKey, 0));\n\n\t\tmKey = \"Course #1 Location\";\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editCourse1loc)).setText(mValue);\n\n\t\t// Course 2\n\t\tmKey = \"Course #2 Name\";\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editCourse2name)).setText(mValue);\n\n\t\t// Course 2 Time\n\t\tmKey = Globals.COURSE2_TIME_KEY;\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course2TimeSpinner);\n\t\tmSpinnerSelection.setSelection(mPrefs.getInt(mKey, 0));\n\n\t\tmKey = \"Course #2 Location\";\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editCourse2loc)).setText(mValue);\n\n\t\t// Course 3\n\t\tmKey = \"Course #3 Name\";\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editCourse2name)).setText(mValue);\n\n\t\t// Course 3 Time\n\t\tmKey = Globals.COURSE3_TIME_KEY;\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course3TimeSpinner);\n\t\tmSpinnerSelection.setSelection(mPrefs.getInt(mKey, 0));\n\n\t\tmKey = \"Course #3 Location\";\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editCourse3loc)).setText(mValue);\n\n\t\t// Course 4\n\t\tmKey = \"Course #4 Name\";\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editCourse4name)).setText(mValue);\n\n\t\t// Course 4 Time\n\t\tmKey = Globals.COURSE4_TIME_KEY;\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course4TimeSpinner);\n\t\tmSpinnerSelection.setSelection(mPrefs.getInt(mKey, 0));\n\n\t\tmKey = \"Course #4 Location\";\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editCourse4loc)).setText(mValue);\n\t}", "private void initComponents() {\n \n /* Set JPanel Properties */\n \n container = new JPanel();\n container.setLayout(new BorderLayout());\n container.setBackground(Color.BLACK);\n \n /* Create Title Banner */\n \n banner = new JLabel(\"\", SwingConstants.CENTER);\n banner.setBorder(BorderFactory.createEmptyBorder(16, 0, 0, 0));\n banner.setIcon(new ImageIcon(getClass().getResource(ICON_ROOT + BANNER_ICON_FILE)));\n \n /* Create Status Line */\n \n status = new JLabel(\"\", SwingConstants.CENTER);\n status.setPreferredSize(new Dimension(0, 32));\n status.setForeground(Color.WHITE);\n \n /* Create Sound Clips */\n \n splash = Applet.newAudioClip(getClass().getResource(SOUND_ROOT + SPLASH_SOUND_FILE));\n boom = Applet.newAudioClip(getClass().getResource(SOUND_ROOT + BOOM_SOUND_FILE));\n \n /* Create Grid Containers */\n \n c1 = new ViewGridContainer(p1); /* Player 1 Primary */\n c1.setTitle(\"Player 1: Primary Grid\");\n \n c2 = new ViewGridContainer(t1); /* Player 1 Tracking */\n c2.setTitle(\"Player 1: Tracking Grid\");\n \n c3 = new ViewGridContainer(p2); /* Player 2 Primary */\n c3.setTitle(\"Player 2: Primary Grid\");\n \n c4 = new ViewGridContainer(t2); /* Player 2 Tracking */\n c4.setTitle(\"Player 2: Tracking Grid\");\n \n /* \n * Create cards. These are the containers for the players' Grids, which\n * are created as a stack of \"cards\" that can be enabled and brought to\n * the foreground with the \"showCard()\" method. As the players take\n * their turns, their respective cards are shown, with an empty card\n * shown between moves so that two players sharing one computer can play\n * the game with their repsective Grids remaining hidden from their\n * opponent.\n *\n * To implement the stack of cards, the containing JPanel uses the\n * CardLayout layout manager; within each card, the containing JPanels\n * use the BorderLayout layout manager, so that the Primary and Tracking\n * Grids can be arranged in the correct order.\n */\n \n cards = new JPanel();\n cards.setLayout(new CardLayout());\n cards.setBackground(Color.BLACK);\n \n /* Player 1 Card (containing Primary and Tracking grids) */\n \n JPanel card1 = new JPanel();\n card1.setLayout(new BorderLayout());\n card1.add(c1, BorderLayout.LINE_START);\n card1.add(c2, BorderLayout.LINE_END);\n card1.setVisible(false);\n \n /* Player 2 Card (containing Primary and Tracking grids) */\n \n JPanel card2 = new JPanel();\n card2.setLayout(new BorderLayout());\n card2.add(c3, BorderLayout.LINE_START);\n card2.add(c4, BorderLayout.LINE_END);\n card2.setVisible(false);\n \n /* Empty Card (to hide opposing players' fleets between turns) */\n \n JPanel empty = new JPanel();\n empty.setLayout(new BorderLayout());\n empty.setBackground(Color.BLACK);\n empty.setVisible(false);\n \n /* Add Cards to CardLayout */\n \n cards.add(card1, PLAYER_1);\n cards.add(card2, PLAYER_2);\n cards.add(empty, EMPTY_CARD);\n\n /* Create Main Menu Bar */\n \n JMenuBar menuBar = new JMenuBar();\n \n /* \"File\" Menu, Menu Items, and Listener(s) */\n \n JMenu menuFile = new JMenu(\"File\");\n JMenuItem menuItemSounds = new JMenuItem(\"Enable/Disable Sounds\");\n JMenuItem menuItemExit = new JMenuItem(\"Exit\");\n menuFile.add(menuItemSounds);\n menuFile.add(menuItemExit);\n \n menuItemSounds.addActionListener((java.awt.event.ActionEvent e) -> {\n soundEnabled = !soundEnabled;\n });\n \n menuItemExit.addActionListener((java.awt.event.ActionEvent e) -> {\n System.exit(0);\n });\n \n /* \"Help\" Menu, Menu Items, and Listener(s) */\n \n JMenu menuHelp = new JMenu(\"Help\");\n JMenuItem menuItemAbout = new JMenuItem(\"About\");\n menuHelp.add(menuItemAbout);\n \n menuItemAbout.addActionListener((java.awt.event.ActionEvent e) -> {\n showAboutDialog();\n });\n \n menuBar.add(menuFile);\n menuBar.add(menuHelp);\n \n /* Add Menu Bar to Window */\n \n this.setJMenuBar(menuBar);\n \n /* Assemble Main Window */\n \n container.add(banner, BorderLayout.PAGE_START);\n container.add(cards, BorderLayout.CENTER);\n container.add(status, BorderLayout.PAGE_END);\n \n this.getContentPane().add(container);\n \n }", "public void setTopObjectInitData() {\n\t\t\n\t\tthis.partShape = 0; // L, T, Z, I, H,\n\t\tthis.ABClines = 0; // if reflects lines for\n\t\t// ABC dims of\n\t\t// parts, by T\n\t\t// partDimA = 0f / myLevelShape.myMainPanel.scale;\n\t\t// partDimB = 0 / myLevelShape.myMainPanel.scale;\n\t\t// partDimC = 0 / myLevelShape.myMainPanel.scale;\n\t\t// partDimM = 0f / myLevelShape.myMainPanel.scale;\n\t\tthis.partID = 999;\n\t\tthis.stockCode = \"Profile\";\n\t}", "public Game() {\n whitePlayer = new AwfulAIPlayer(Colour.WHITE, board);\n blackPlayer = new HumanPlayer(Colour.BLACK, board);\n\n sharedBoard = new CompositeBitBoard(whitePlayer.getOccupied(), blackPlayer.getOccupied());\n }", "public static void set_players(){\n\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\tbat1=PlayBrain1.myteam[0];\n\t\t\tbat2=PlayBrain1.myteam[1];\n\t\t\tStriker=bat1;\n\t\t\tNonStriker=bat2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\tbat1=PlayBrain1.oppteam[0];\n\t\t\t\tbat2=PlayBrain1.oppteam[1];\n\t\t\t\tStriker=bat1;\n\t\t\t\tNonStriker=bat2;\n\n\t\t\t\t}\n\t}", "public void initializePlayers(){\r\n allPlayers = new ArrayList<Player>();\r\n currentPlayerIndex = 0;\r\n Player redPlayer = new Player(1, new Location(2, 2), Color.RED);\r\n Player bluePlayer = new Player(2, new Location(4, 2), Color.BLUE);\r\n Player whitePlayer = new Player(3, new Location(2, 4), Color.WHITE);\r\n Player yellowPlayer = new Player(4, new Location(4, 4), Color.YELLOW);\r\n allPlayers.add(redPlayer);\r\n allPlayers.add(bluePlayer);\r\n allPlayers.add(whitePlayer);\r\n allPlayers.add(yellowPlayer);\r\n }", "private void setUp() {\n players.forEach(player -> player.draw(GameConstants.STARTING_HAND_SIZE.value()));\n }", "void setUpPlayerNames() {\n playerName.setText(this.player1.getName());\n computerName.setText(this.computer.getName());\n }", "private void setInfoPlayers() {\n\n\t\t//PLAYER 1\n\t\tlblPlayer1name.setText(players.get(0).getName());\n\t\tlblCashP1.setText(\"\" + players.get(0).getMoney());\n\t\tlblBuildP1.setText(\"\" + players.get(0).getNumberBuildings());\n\t\tlblPropP1.setText(\"\" + players.get(0).getOwnproperties().size());\n\t\tlblPosP1.setText(\"\"+ players.get(0).getPosition());\n\n\t\t//PLAYER 2\n\t\tlblPlayer2name.setText(players.get(1).getName());\n\t\tlblCashP2.setText(\"\" + players.get(1).getMoney());\n\t\tlblBuildP2.setText(\"\" + players.get(1).getNumberBuildings());\n\t\tlblPropP2.setText(\"\" + players.get(1).getOwnproperties().size());\n\t\tlblPosP2.setText(\"\"+ players.get(1).getPosition());\n\t\t\n\t\tif(players.size() > 2){\n\t\t\t//PLAYER 3\n\t\t\tlblPlayerName3.setText(players.get(2).getName());\n\t\t\tlblCashP3.setText(\"\" + players.get(2).getMoney());\n\t\t\tlblBuildP3.setText(\"\" + players.get(2).getNumberBuildings());\n\t\t\tlblPropP3.setText(\"\" + players.get(2).getOwnproperties().size());\n\t\t\tlblPosP3.setText(\"\"+ players.get(2).getPosition());\n\n\t\t\tif(players.size() > 3){\n\t\t\t\t//PLAYER 4\n\t\t\t\tlblPlayerName4.setText(players.get(3).getName());\n\t\t\t\tlblCashP4.setText(\"\" + players.get(3).getMoney());\n\t\t\t\tlblBuildP4.setText(\"\" + players.get(3).getNumberBuildings());\n\t\t\t\tlblPropP4.setText(\"\" + players.get(3).getOwnproperties().size());\n\t\t\t\tlblPosP4.setText(\"\"+ players.get(3).getPosition());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void populateUserProfile() {\n setProfilePic();\n mDisplayNameTextView.setText(user.getName());\n mUsernameTextView.setText(String.format(\"@%s\", user.getUsername()));\n mBioTextView.setText(user.getBio());\n setAdapterForUserStories();\n\n new Thread(new Runnable() {\n public void run(){\n setFollowingCount();\n setFollowersCount();\n setStoriesCount();\n queryStoriesFromUser();\n }\n }).start();\n }", "public Interface() {\n left = new Team();\n right = new Team(left);\n left.setEnemyTeam(right);\n \n int gameSize = getGameSize();\n for(int i = 0; i<gameSize;i++)\n {\n left.add(getType(left.name));\n right.add(getType(right.name));\n displayTeams(left);\n }\n \n AI.strat = Strategy.HPWEIGHT;\n \n initComponents();\n showButtons();\n }", "public void init() {\n\t\tfor(int i = 0; i < roamingAliens; ++i) {\n\t\t\tAlien alien = new Alien(ColorUtil.MAGENTA, screenHeight, screenWidth, speed, speedMulti);\n\t\t\tgameObject.add((GameObject) alien); \n\t\t}\n\t\tfor(int i = 0; i < roamingAstronauts; ++i) {\n\t\t\tAstronaut astronaut = new Astronaut(ColorUtil.GREEN, screenHeight, screenWidth, speed, speedMulti);\n\t\t\tgameObject.add((GameObject) astronaut);\n\t\t}\n\t\tgameObject.add((Spaceship.getSpaceship()));\n\t\tthis.setChanged();\n\t\tthis.notifyObservers();\n\t\tthis.clearChanged();\n\t}", "@Override\n public void onLoadFinished(Loader<ResourceLoaderResult<UserContainer>> loader, ResourceLoaderResult<UserContainer> data) {\n super.onLoadFinished(loader, data);\n if (data.isSuccessful()) {\n bindProfileInfo(data.getResult().getUser());\n }\n }", "private void populateInterfaceElements() {\n usernameTextView.setTypeface(Default.sourceSansProBold);\n userFullNameText.setTypeface(Default.sourceSansProLight);\n userFollowButton.setTypeface(Default.sourceSansProLight);\n\n setupUserProfilePicImageView();\n setupUsernameAndFullNameTextView();\n setupUserFollowButton();\n setupUserRelativeLayout();\n }", "public MapGUI_JPanel() {\n initComponents();\n initComponents1();\n }", "public void initialiseAvatars() {\n\n\t\timage1 = null;\n\t\timage2 = null;\n\t\timage3 = null;\n\t\timage4 = null;\n\t\timage5 = null;\n\t\timage6 = null;\n\n\t\ttry {\n\t\t\timage1 = new Image(new FileInputStream(\"avatars/avatar1.png\"));\n\t\t\timage2 = new Image(new FileInputStream(\"avatars/avatar2.png\"));\n\t\t\timage3 = new Image(new FileInputStream(\"avatars/avatar3.png\"));\n\t\t\timage4 = new Image(new FileInputStream(\"avatars/avatar4.png\"));\n\t\t\timage5 = new Image(new FileInputStream(\"avatars/avatar5.png\"));\n\t\t\timage6 = new Image(new FileInputStream(\"avatars/avatar6.png\"));\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tav1.setImage(image1);\n\t\tav2.setImage(image2);\n\t\tav3.setImage(image3);\n\t\tav4.setImage(image4);\n\t\tav5.setImage(image5);\n\t\tav6.setImage(image6);\n\n\t}", "public void init() {\n\t\t//Inits the WEST interactors\n\t\tstatusfield = new JTextField(TEXT_FIELD_SIZE);\n\t\tstatusbutton = new JButton(\"Change Status\");\n\t\tpicturefield = new JTextField(TEXT_FIELD_SIZE);\n\t\tpicturebutton = new JButton(\"Change Picture\");\n\t\tfriendfield = new JTextField(TEXT_FIELD_SIZE);\n\t\tfriendbutton = new JButton(\"Add Friend\");\n\t\t\n\t\tadd(statusfield, WEST);\n\t\tadd(statusbutton, WEST);\n\t\tadd(new JLabel(EMPTY_LABEL_TEXT), WEST);\n\t\tadd(picturefield, WEST);\n\t\tadd(picturebutton, WEST);\n\t\tadd(new JLabel(EMPTY_LABEL_TEXT), WEST);\n\t\tadd(friendfield, WEST);\n\t\tadd(friendbutton, WEST);\n\t\t\n\t\tstatusfield.addActionListener(this);\n\t\tfriendfield.addActionListener(this);\n\t\tpicturefield.addActionListener(this);\n\t\t\n\t\t//Inits the NORTH interactors\n\t\tJLabel namelabel = new JLabel(\"Name\");\n\t\tnamefield = new JTextField(TEXT_FIELD_SIZE);\n\t\tJButton add_button = new JButton(\"Add\");\n\t\tJButton delete_button = new JButton(\"Delete\");\n\t\tJButton lookup_button = new JButton(\"Lookup\");\n\t\t\n\t\tadd(namelabel, NORTH);\n\t\tadd(namefield, NORTH);\n\t\tadd(add_button, NORTH);\n\t\tadd(delete_button, NORTH);\n\t\tadd(lookup_button, NORTH);\n\t\t\n\t\taddActionListeners();\n\t\tcanvas = new FacePamphletCanvas();\n\t\tadd(canvas);\n }", "public JPanel init(){\n // set Comboboxes\n for(int i=0; i<10; i++){\n P1color.addItem(colorArray[i]);\n }\n for(int i=0; i<10; i++){\n P2color.addItem(colorArray[i]);\n }\n for(int i=0; i<10; i++){\n P3color.addItem(colorArray[i]);\n }\n for(int i=0; i<10; i++){\n P4color.addItem(colorArray[i]);\n }\n for(int i=0; i<10; i++){\n P5color.addItem(colorArray[i]);\n }\n for(int i=0; i<10; i++){\n P6color.addItem(colorArray[i]);\n }\n\n P1color.setSelectedIndex(0);\n P2color.setSelectedIndex(1);\n P3color.setSelectedIndex(2);\n P4color.setSelectedIndex(3);\n P5color.setSelectedIndex(4);\n P6color.setSelectedIndex(5);\n\n // set labels based on the amount of players and ai's\n if (playerAmount>= 1){\n P1label.setText(\"PLAYER 1\");\n if (aiAmount >= 1) P2label.setText(\"AI 1\");\n if (aiAmount >= 2) P3label.setText(\"AI 2\");\n if (aiAmount >= 3) P4label.setText(\"AI 3\");\n if (aiAmount >= 4) P5label.setText(\"AI 4\");\n if (aiAmount == 5) P6label.setText(\"AI 5\");\n }\n if (playerAmount >= 2){\n P2label.setText(\"PLAYER 2\");\n if (aiAmount >= 1) P3label.setText(\"AI 1\");\n if (aiAmount >= 2) P4label.setText(\"AI 2\");\n if (aiAmount >= 3) P5label.setText(\"AI 3\");\n if (aiAmount == 4) P6label.setText(\"AI 4\");\n }\n if (playerAmount >= 3){\n P3label.setText(\"PLAYER 3\");\n if (aiAmount >= 1) P4label.setText(\"AI 1\");\n if (aiAmount >= 2) P5label.setText(\"AI 2\");\n if (aiAmount == 3) P6label.setText(\"AI 3\");\n }\n if (playerAmount >= 4){\n P4label.setText(\"PLAYER 4\");\n if (aiAmount >= 1) P5label.setText(\"AI 1\");\n if (aiAmount == 2) P6label.setText(\"AI 2\");\n }\n if (playerAmount >= 5){\n P5label.setText(\"PLAYER 5\");\n if (aiAmount == 1) P6label.setText(\"AI 1\");\n }\n if (playerAmount == 6){\n P6label.setText(\"PLAYER 6\");\n }\n\n // Disabele all unused player or ai widgets\n if (playerAmount + aiAmount == 2){\n P3color.setVisible(false);\n P3label.setVisible(false);\n P3text.setVisible(false);\n\n P4color.setVisible(false);\n P4label.setVisible(false);\n P4text.setVisible(false);\n\n P5color.setVisible(false);\n P5label.setVisible(false);\n P5text.setVisible(false);\n\n P6color.setVisible(false);\n P6label.setVisible(false);\n P6text.setVisible(false);\n }\n else if (playerAmount + aiAmount == 3){\n P4color.setVisible(false);\n P4label.setVisible(false);\n P4text.setVisible(false);\n\n P5color.setVisible(false);\n P5label.setVisible(false);\n P5text.setVisible(false);\n\n P6color.setVisible(false);\n P6label.setVisible(false);\n P6text.setVisible(false);\n }\n else if (playerAmount + aiAmount == 4){\n P5color.setVisible(false);\n P5label.setVisible(false);\n P5text.setVisible(false);\n\n P6color.setVisible(false);\n P6label.setVisible(false);\n P6text.setVisible(false);\n }\n else if (playerAmount + aiAmount == 5){\n P6color.setVisible(false);\n P6label.setVisible(false);\n P6text.setVisible(false);\n }\n\n // initialize buttons\n startGameButton.addMouseListener(new MouseAdapter() {\n @Override\n public void mouseClicked(MouseEvent e) {\n DebugLabel.setText(\"\");\n if (createPlayers()){\n new City();\n Main.getJFrame().remove(Main.getBackgroundPanel());\n JLayeredPane layeredPane = Main.getJFrame().getLayeredPane();\n layeredPane.setLayout(null);\n layeredPane.setSize(1920,1080);\n layeredPane.add(new GameUI().init(),-300);\n Main.getJFrame().revalidate();\n Main.getJFrame().repaint();\n Main.ExecuteGame();\n }\n }\n });\n BACKButton.addMouseListener(new MouseAdapter() {\n @Override\n public void mouseClicked(MouseEvent e) {\n DebugLabel.setText(\"\");\n Main.getBackgroundPanel().removeAll();\n Main.getBackgroundPanel().add((new GameOptionsUI().init()));\n Main.getJFrame().revalidate();\n Main.getJFrame().repaint();\n }\n });\n return MainPanel;\n }", "public PainelDeTeste() {\n configs = new HashMap<>();\n output = new HashMap<>();\n areas = new HashMap<>();\n initComponents();\n this.areaCallback = new AreaCallback() {\n @Override\n public void areaUpdated(HashMap<String, Integer> areas) {\n }\n };\n }", "protected PlayerProfile(final String profileId) {\n setProfilePath(profileId);\n loadStats();\n }", "private void prepare()\n {\n Block block = new Block(10);\n addObject(block,372,150);\n Wall wall = new Wall();\n addObject(wall,52,167);\n Wall wall2 = new Wall();\n addObject(wall2,160,167);\n Wall wall3 = new Wall();\n addObject(wall3,550,167);\n Wall wall4 = new Wall();\n addObject(wall4,650,167);\n Wall wall5 = new Wall();\n addObject(wall5,750,167);\n block.setLocation(306,171);\n Robot robot = new Robot();\n addObject(robot,48,51);\n Pizza pizza = new Pizza();\n addObject(pizza,550,60);\n Pizza pizza2 = new Pizza();\n addObject(pizza2,727,53);\n Pizza pizza3 = new Pizza();\n addObject(pizza3,364,303);\n Pizza pizza4 = new Pizza();\n addObject(pizza4,224,400);\n Pizza pizza5 = new Pizza();\n addObject(pizza5,622,395);\n ScorePanel scorePanel = new ScorePanel();\n addObject(scorePanel,106,525);\n Home home = new Home();\n addObject(home,717,521);\n\n block.setLocation(344,173);\n pizza3.setLocation(394,297);\n Pizza pizza6 = new Pizza();\n addObject(pizza6,711,265);\n Pizza pizza7 = new Pizza();\n addObject(pizza7,68,276);\n\n }", "public void initialiseBoard() {\n\t\tPlayer1Mancala = new MancalaPit(this.player1Name, 0, null);\n\t\tPit player1_Pit6 = new Pit(this.player1Name, 6, 1, Player1Mancala);\n\t\tPit player1_Pit5 = new Pit(this.player1Name, 5, 1, player1_Pit6);\n\t\tPit player1_Pit4 = new Pit(this.player1Name, 4, 1, player1_Pit5);\n\t\tPit player1_Pit3 = new Pit(this.player1Name, 3, 1, player1_Pit4);\n\t\tPit player1_Pit2 = new Pit(this.player1Name, 2, 1, player1_Pit3);\n\t\tPit player1_Pit1 = new Pit(this.player1Name, 1, 1, player1_Pit2);\n\n\t\t// Define Player2 Pits in descending order \n\t\tPlayer2Mancala = new MancalaPit(this.player2Name, 0, null);\n\t\tPit player2_Pit6 = new Pit(this.player2Name, 6, 1, Player2Mancala);\n\t\tPit player2_Pit5 = new Pit(this.player2Name, 5, 1, player2_Pit6);\n\t\tPit player2_Pit4 = new Pit(this.player2Name, 4, 1, player2_Pit5);\n\t\tPit player2_Pit3 = new Pit(this.player2Name, 3, 1, player2_Pit4);\n\t\tPit player2_Pit2 = new Pit(this.player2Name, 2, 1, player2_Pit3);\n\t\tPit player2_Pit1 = new Pit(this.player2Name, 1, 1, player2_Pit2);\n\n\t\t// Complete the board by connecting mancala with player pits\n\t\tPlayer1Mancala.setNextPit(player2_Pit1);\n\t\tPlayer2Mancala.setNextPit(player1_Pit1);\n\n\t\t//Initialize the Player1 board \n\t\tthis.Player1Pits[0] = player1_Pit1;\n\t\tthis.Player1Pits[1] = player1_Pit2;\n\t\tthis.Player1Pits[2] = player1_Pit3;\n\t\tthis.Player1Pits[3] = player1_Pit4;\n\t\tthis.Player1Pits[4] = player1_Pit5;\n\t\tthis.Player1Pits[5] = player1_Pit6;\n\n\t\t// Initialize the Player2 board \n\t\tthis.Player2Pits[0] = player2_Pit1;\n\t\tthis.Player2Pits[1] = player2_Pit2;\n\t\tthis.Player2Pits[2] = player2_Pit3;\n\t\tthis.Player2Pits[3] = player2_Pit4;\n\t\tthis.Player2Pits[4] = player2_Pit5;\n\t\tthis.Player2Pits[5] = player2_Pit6;\n\t}", "public void Players(int blk_limit) // initialize the player objects\n {\n player1_blocks = new int[blk_limit][2]; // initialize the blocks\n player2_blocks = new int[blk_limit][2]; // initialize the blocks\n\n p1_score = 0; // initialize player scores\n p2_score = 0;\n \n p1_steps = 0; // initialize steps\n p2_steps = 0;\n }", "public JPanelGameState() {\n initComponents();\n initLabelsArray();\n }", "public CreateJPanel(ProfileInfo profileInfo) {\n initComponents();\n \n this.profileInfo = profileInfo;\n btnSave.setEnabled(false);\n \n }", "private static void initStatistics(Player p){\n }", "public CustomerProfile() {\n initComponents();\n }", "@Override\n public void onConnected(Bundle bundle) {\n getProfileInformation();\n }", "private void updateProfileViews() {\n if(profile.getmImageUrl()!=null && !profile.getmImageUrl().isEmpty()) {\n String temp = profile.getmImageUrl();\n Picasso.get().load(temp).into(profilePicture);\n }\n profileName.setText(profile.getFullName());\n phoneNumber.setText(profile.getPhoneNumber());\n address.setText(profile.getAddress());\n email.setText(profile.geteMail());\n initListToShow();\n }", "public UserInfoPanel() {\n initComponents();\n }", "@Override\n\tpublic void showProfile() {\n\t\t\n\t}", "public void setProfile(Profile profile) {\n _profile = profile;\n }", "public PanelAccountInfo() {\n initComponents();\n setTextFields();\n setLabels();\n }", "public void initialize() {\n\t\tinitialiseAvatars();\n\t\tcreateAccountButton.setOnAction(e -> createAccount());\n\t\topenGeneratorButton.setOnAction(e -> openCustomPictureCreator());\n\n\t\tavatar1.setOnAction(e -> updateAvatar(1));\n\t\tavatar2.setOnAction(e -> updateAvatar(2));\n\t\tavatar3.setOnAction(e -> updateAvatar(3));\n\t\tavatar4.setOnAction(e -> updateAvatar(4));\n\t\tavatar5.setOnAction(e -> updateAvatar(5));\n\t\tavatar6.setOnAction(e -> updateAvatar(6));\n\n\t\tavatarIndex = 1;\n\t}", "@PostConstruct\n public void init() {\n for (final Stat stat: Stat.ALL_STATS) {\n effortValues.put(stat, new SimpleIntegerProperty(0));\n minIndividualValues.put(stat, new SimpleIntegerProperty(0));\n maxIndividualValues.put(stat, new SimpleIntegerProperty(31));\n if (!stat.equals(Stat.HP)) {\n minMinusIndividualValues.put(stat, new SimpleIntegerProperty(0));\n maxMinusIndividualValues.put(stat, new SimpleIntegerProperty(31));\n minNeutralIndividualValues.put(stat, new SimpleIntegerProperty(0));\n maxNeutralIndividualValues.put(stat, new SimpleIntegerProperty(31));\n minPlusIndividualValues.put(stat, new SimpleIntegerProperty(0));\n maxPlusIndividualValues.put(stat, new SimpleIntegerProperty(31));\n }\n\n }\n reset();\n }", "public SignupAccountInfoAvatar() {\n super(\"SignupAvatar.AccountInfo\", BrowserConstants.DIALOGUE_BACKGROUND);\n this.profileConstraints = ProfileConstraints.getInstance();\n this.securityQuestionModel = new DefaultComboBoxModel();\n this.usernameReservations = new HashMap<String, UsernameReservation>();\n this.emailReservations = new HashMap<EMail, EMailReservation>();\n initSecurityQuestionModel();\n initComponents();\n addValidationListeners();\n initFocusListener();\n }", "public PanelPlayer(FormMode mode, JDialog ancestor) {\n initComponents();\n this.mode = mode;\n this.ancestor = ancestor;\n ControlerC.getInstance().getFormMain().setPanelPlayer(this);\n\n requestForCMB();\n populateCMBGender();\n setCityPanelFalse();\n adjustForm();\n }", "private GUIGameInfo() {\n this.board = new GUIBoard();\n this.logic = new regLogic();\n this.players = new Player[2];\n this.players[0] = new Player(Symbol.BLACK);\n this.players[1] = new Player(Symbol.WHITE);\n this.guiPlayers = new GUIPlayer[2];\n this.guiPlayers[0] = new GUIPlayer(this.players[0]);\n this.guiPlayers[1] = new GUIPlayer(this.players[1]);\n\n }", "@Override\n\tprotected void initView() {\n\t\tsuper.initView();\n\n\t\tmNameEdt = (EditText) findViewById(R.id.profile_name_edt);\n\t\tmProfileImg = (ImageView) findViewById(R.id.profile_image);\n\t\tmOldPassEdt = (EditText) findViewById(R.id.profile_old_pass);\n\t\tmNewPassEdt = (EditText) findViewById(R.id.profile_new_pass);\n\t\tmConfirmPassEdt = (EditText) findViewById(R.id.profile_confirm_pass);\n\t\tmProfileImg.setOnClickListener(this);\n\n\t\tmOptions = new DisplayImageOptions.Builder()\n\t\t\t\t.showImageOnLoading(R.drawable.img_profile_bg)\n\t\t\t\t.showImageForEmptyUri(R.drawable.img_profile_bg)\n\t\t\t\t.showImageOnFail(R.drawable.img_profile_bg).cacheInMemory(true)\n\t\t\t\t.cacheOnDisc(true).considerExifParams(true)\n\t\t\t\t.bitmapConfig(Bitmap.Config.ARGB_8888).build();\n\n fillUserProfile();\n\n\t}", "private void setupPlayers() {\n\t\tuserData=(UserData) Main.currentStage.getUserData();\n\t\tnumberPlayers=userData.getNumberPlayers();\n\t\tplayerNames=userData.getPlayerNames();\n\t\tcurrentPlayer=userData.getFirstPlayer();\n\t\tlb_currentplayername.setText(playerNames[currentPlayer]);\n\t\tplayers =new Player[4];\n\t\tfor(int i=0;i<4;i++) {\n\t\t\tif(i<numberPlayers) {\n\t\t\t\tplayers[i]=new Player(playerNames[i], false, i) {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void rollDices() {\n\t\t\t\t\t\trotatedDice1();\n\t\t\t\t\t\trotatedDice2();\n\t\t\t\t\t\t//waiting for player choose what way to go then handler that choice\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\telse {\n\t\t\t\tplayers[i]=new Player(playerNames[i], true, i) {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void rollDices() {\n\t\t\t\t\t\trotatedDice1();\n\t\t\t\t\t\trotatedDice2();\n\t\t\t\t\t\t//randomchoice and next player rolldice\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\tswitch (i) {\n\t\t\t\tcase 0:{\n\t\t\t\t\tplayers[i].setHorseColor(yh0, yh1, yh2, yh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 1:{\n\t\t\t\t\tplayers[i].setHorseColor(bh0, bh1, bh2, bh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 2:{\n\t\t\t\t\tplayers[i].setHorseColor(rh0, rh1, rh2, rh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 3:{\n\t\t\t\t\tplayers[i].setHorseColor(gh0, gh1, gh2, gh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void init() {\n\t\t//initializing graphics area\n \tcanvas = new FacePamphletCanvas();\n \tadd(canvas);\n \t\n\t\taddInteractors();\n\t\taddActionListeners();\n }", "public void onModuleLoad() {\n\t\t//create our main panel\n\t\tfinal DeckPanel panels = new DeckPanel(); \n\t\tRootPanel.get(\"panel\").add(panels);\n\t\t//create our stage panels\n\t\tfinal LoginPanel login = new LoginPanel(panels,wwwordzService);\n\t\tfinal GamePanel game = new GamePanel(panels,wwwordzService); \n\t\tfinal RankingPanel ranking = new RankingPanel(panels,wwwordzService);\n\t\t//add stage panels to main panel\n\t\tpanels.add(login);\n\t\tpanels.add(game);\n\t\tpanels.add(ranking);\n\t\tpanels.showWidget(0);\n\t\t\n\n\t}", "public RaceBasePanel()\n\t{\n\t\tinitComponents();\n\t\tinitComponentContents();\n\t}", "@SuppressWarnings(\"unchecked\")\n private void userinitComponents() {\n attendace.home = this;\n \n \n \n }", "private void initializeViews() {\n avatarView = (AvatarView) findViewById(R.id.avatarImage);\n userNameText = (TextView) findViewById(R.id.user_profile_name);\n userJoinedText = (TextView) findViewById(R.id.user_date_joined);\n followingButton = (Button) findViewById(R.id.following_btn);\n backButton = (ImageButton) findViewById(R.id.back_button);\n settingButton = (ImageButton) findViewById(R.id.settings_button);\n cameraButton = (ImageButton) findViewById(R.id.camera_button);\n\n cameraButton.setVisibility(View.GONE);\n settingButton.setVisibility(View.GONE);\n\n viewPager = (ViewPager) findViewById(R.id.viewpager);\n setupViewPager(viewPager);\n\n tabLayout = (TabLayout) findViewById(R.id.tabs);\n tabLayout.setupWithViewPager(viewPager);\n }", "private void SetPlayerAndEnemy(int stage) {\n // screen size\n Point screen = GameView.GetScreenSize();\n int countMax[] = new int[2];\n // to diverge the initialization from selected stage.\n switch(stage) {\n case Play.STAGE_OFF_ROAD:\n // Player\n // loading the file\n this.mPlayer.LoadCharaImage(this.mContext,\"offroadplayer\");\n this.mPlayer.mSize.x = OffroadPlayer.PLAYER_SIZE.x;\n this.mPlayer.mSize.y = OffroadPlayer.PLAYER_SIZE.y;\n this.mPlayer.mPos.x = (screen.x-this.mPlayer.mSize.x)>>1;\n this.mPlayer.mPos.y = screen.y+100;\n this.mPlayer.mMoveX = 0.0f;\n this.mPlayer.mMoveY = PLAYER_DEFAULT_SPEED*-1;\n this.mPlayer.mExistFlag = true;\n countMax[0] = 2;\n // Enemy that is jump point\n this.mEnemy.LoadCharaImage(this.mContext,\"offroadjump\");\n this.mEnemy.mSize.x = OffroadObstacles.OBSTACLE_JUMP_POINT_SIZE.x;\n this.mEnemy.mSize.y = OffroadObstacles.OBSTACLE_JUMP_POINT_SIZE.y;\n this.mEnemy.mPos.x = screen.x+100;\n this.mEnemy.mPos.y = 600;\n this.mEnemy.mMoveX = ENEMY_DEFAULT_SPEED*-1;\n this.mEnemy.mMoveY = 0.0f;\n this.mEnemy.mType = Play.STAGE_OFF_ROAD;\n this.mEnemy.mExistFlag = true;\n countMax[1] = 0;\n break;\n case Play.STAGE_ROAD:\n // loading the file\n this.mPlayer.LoadCharaImage(this.mContext,\"roadplayer\");\n this.mPlayer.mSize.x = RoadPlayer.RUNNER_SIZE.x;\n this.mPlayer.mSize.y = RoadPlayer.RUNNER_SIZE.y;\n this.mPlayer.mPos.x = (screen.x-this.mPlayer.mSize.x)>>1;\n this.mPlayer.mPos.y = screen.y+100;\n this.mPlayer.mMoveX = 0.0f;\n this.mPlayer.mMoveY = PLAYER_DEFAULT_SPEED*-1;\n this.mPlayer.mExistFlag = true;\n countMax[0] = 4;\n // Enemy that is hurdle\n this.mEnemy.LoadCharaImage(this.mContext,\"roadhurdle\");\n this.mEnemy.mSize.x = RoadObstacles.HURDLE_SIZE.x;\n this.mEnemy.mSize.y = RoadObstacles.HURDLE_SIZE.y;\n this.mEnemy.mPos.x = screen.x+100;\n this.mEnemy.mPos.y = 600;\n this.mEnemy.mMoveX = ENEMY_DEFAULT_SPEED*-1;\n this.mEnemy.mMoveY = 0.0f;\n this.mEnemy.mType = Play.STAGE_ROAD;\n this.mEnemy.mExistFlag = true;\n countMax[1] = 0;\n break;\n case Play.STAGE_SEA:\n // loading the file\n this.mPlayer.LoadCharaImage(this.mContext,\"swimmer\");\n this.mPlayer.mSize.x = SeaPlayer.SWIMMER_SIZE.x;\n this.mPlayer.mSize.y = SeaPlayer.SWIMMER_SIZE.y;\n this.mPlayer.mPos.x = -100;\n this.mPlayer.mPos.y = PLAYER_ARRIVE_POSITION_Y;\n this.mPlayer.mMoveX = PLAYER_DEFAULT_SPEED;\n this.mPlayer.mMoveY = 0.0f;\n this.mPlayer.mExistFlag = true;\n countMax[0] = 3;\n // Enemy that is sunfish\n this.mEnemy.LoadCharaImage(this.mContext,\"sunfish\");\n this.mEnemy.mSize.x = SeaEnemyManager.SUNFISH_SIZE.x;\n this.mEnemy.mSize.y = SeaEnemyManager.SUNFISH_SIZE.y;\n this.mEnemy.mPos.x = screen.x+100;\n this.mEnemy.mPos.y = 600;\n this.mEnemy.mMoveX = ENEMY_DEFAULT_SPEED*-1;\n this.mEnemy.mMoveY = 0.0f;\n this.mEnemy.mType = Play.STAGE_SEA;\n this.mEnemy.mExistFlag = true;\n countMax[1] = SeaEnemyManager.ANIMATION_COMMON_COUNT_MAX;\n break;\n }\n // animation setting\n // player\n this.mPlayerAni.SetAnimation(\n 0,0,\n this.mPlayer.mSize.x,\n this.mPlayer.mSize.y,\n countMax[0],10,0\n );\n // except for off-road and road, enemy\n if (stage == Play.STAGE_SEA) {\n this.mEnAni.SetAnimation(\n 0, 0,\n this.mEnemy.mSize.x, this.mEnemy.mSize.y,\n countMax[1], 10, 0\n );\n }\n }", "public void init() throws IOException {\r\n\t\t//Initialize all the arrayLists\r\n\t\tCountries = new ArrayList<Country>();\r\n\t\tCountriesCopy = new ArrayList<Country>(Countries.size());\r\n\t\tCards = new ArrayList<Card>();\r\n\t\tplayers = new ArrayList<Player>();\r\n\t\tcurrentCards = new ArrayList<Card>();\r\n\t\tselectedCards = new ArrayList<Card>();\r\n\t\tusedCards = new ArrayList<Card>();\r\n\t\t\r\n\t\t//Declare the file Reader and read-in all the card and country data\r\n\t\tFileRhiger = new FileReader();\r\n\t\tFileRhiger.setup();\r\n\t\t\r\n\t\t//Make the countryPicker arrayList identical to the the countries arrayList\r\n\t\tCountryPicker = Countries;\r\n\r\n\t\t//Adds the mouseClickhandler and mouseHoverHandler to the canvas\r\n\t\tmhh = new MouseHoverHandler(window.getCanvas());\r\n\t\tmch = new MouseClickHandler(window.getCanvas());\r\n\t\t\r\n\t\t\r\n\t\tbox = new JLabel();\r\n\t\twindow.getPanel().add(box);\r\n\t\tbox.setBounds(0, 0, 1300, 800);\r\n\t\t\r\n\t\tplayerNum = new JLabel();\r\n\t\twindow.getPanel().add(playerNum);\r\n\t\tplayerNum.setBounds(100,50,500,50);\r\n\t\tplayerNum.setFont(new Font(\"Vani\",25,25));\r\n\t\t\r\n\t\tplayerPicker = new JSlider(2,6,2);\r\n\t\twindow.getPanel().add(playerPicker);\r\n\t\tplayerPicker.setBounds(100,100,500,100);\r\n\t\tplayerPicker.setBorder(BorderFactory.createBevelBorder(0));\r\n\t\tplayerPicker.setBackground(new Color (0,153,255));\r\n\t\t\r\n\t\r\n\t\twindow.getPanel().add(startGame);\r\n\t\tstartGame.addActionListener(this);\r\n\t\t\r\n\t\twindow.getPanel().add(startGame);\r\n\t\tstartGame.setBounds(650, 100, 150, 100);\r\n\t\tstartGame.setFont(new Font(\"Vani\", Font.BOLD, 20));\r\n\t\tstartGame.setBorder(BorderFactory.createBevelBorder(0));\r\n\t\tstartGame.setBackground(new Color(204,153,255));\r\n\t\r\n\t\t\r\n\t\t//Loads in all the background images of the map, the invis map will not be rendered but will be used to detect hovering\r\n\t\tinvisMap = ImageIO.read(new File (\"Ressources/\" +\"ColorMapFinal.png\"));\r\n\t\twaterMap = ImageIO.read(new File (\"Ressources/\" +\"gMap200.png\"));\r\n\t\tlabels = ImageIO.read(new File (\"Ressources/\" + \"gLabels.png\"));\r\n\t\t//waterMap = ImageIO.read(getClass().getResourceAsStream(\"Ressources/\" +\"gMap200.png\"));\r\n\t\t\r\n\t\t\r\n\t\t//Makes a 2D array of the pixels in the invisMap, (all of its pixels will be stored here)\r\n\t\timgW = invisMap.getWidth();\r\n\t\timgH = invisMap.getHeight();\r\n\t\tinvisData = new int[imgW][imgH];\r\n\t\t\r\n\t\t//Fills the arrayList with all the pixels RGB values of the invismap image\r\n\t\tfor (int i = 0; i < imgW - 1; i++) {\r\n\t\t\tfor (int j = 0; j < imgH - 1; j++) {\r\n\t\t\t\tinvisData[i][j] = invisMap.getRGB(i, j);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Loop that creates JLabels to display the cards of the player\r\n\t\tfor (int x = 0; x < 5; x++) {\r\n\t\t\tcardPics[x] = new JLabel(\"\");\r\n\t\t\twindow.getPanel().add(cardPics[x]);\r\n\t\t\tcardPics[x].setBounds(70 + (x * 110), 100, 100, 150);\r\n\t\t}\r\n\t\t//Loop that creates JLabels to display when a card has been selected\r\n\t\tfor (int x = 0; x < 5; x++) {\r\n\t\t\tcardSelectedPics[x] = new JLabel(\"\");\r\n\t\t\tcardSelectedPics[x].setBackground(Color.BLUE);\r\n\t\t\twindow.getPanel().add(cardSelectedPics[x]);\r\n\t\t\tcardSelectedPics[x].setBounds(68 + (x * 110), 98, 104, 154);\r\n\t\t\tcardSelectedPics[x].setOpaque(true);\r\n\t\t\tcardSelectedPics[x].setVisible(false);\r\n\t\t}\r\n\r\n\t\t\r\n\r\n\t\t//Adds a label to display how many troops a player can display at that moment\r\n\t\ttroopsToDeploy = new JLabel();\r\n\t\twindow.getPanel().add(troopsToDeploy);\r\n\t\ttroopsToDeploy.setFont(new Font(\"Vani\", Font.PLAIN, 20));\r\n\t\ttroopsToDeploy.setBounds(200, 40, 300, 50);\r\n\r\n\t\t// Add phase button\r\n\t\tphaseButton.setVisible(false);\r\n\t\tphaseButton.addActionListener(this);\r\n\t\twindow.getPanel().add(phaseButton);\r\n\t\tphaseButton.setFont(new Font(\"Vani\", Font.BOLD, 14));\r\n\t\tphaseButton.setBounds(60, 20, 120, 50);\r\n\t\tphaseButton.setVerticalTextPosition(SwingConstants.CENTER);\r\n\t\tphaseButton.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tphaseButton.setBackground(Color.white);\r\n\t\t\r\n\t\t// Add loadGame button\r\n\t\tloadButton.setVisible(true);\r\n\t\tloadButton.addActionListener(this);\r\n\t\twindow.getPanel().add(loadButton);\r\n\t\tloadButton.setFont(new Font(\"Vani\", Font.BOLD, 20));\r\n\t\tloadButton.setBounds(820, 100, 120, 100);\r\n\t\tloadButton.setVerticalTextPosition(SwingConstants.CENTER);\r\n\t\tloadButton.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tloadButton.setBorder(BorderFactory.createBevelBorder(0));\r\n\t\tloadButton.setBackground(new Color(153, 153, 255));\r\n\t\t\r\n\r\n\t\t// Add saveGame button\r\n\t\tsaveButton.setVisible(true);\r\n\t\tsaveButton.addActionListener(this);\r\n\t\twindow.getPanel().add(saveButton);\r\n\t\tsaveButton.setFont(new Font(\"Vani\", Font.BOLD, 14));\r\n\t\tsaveButton.setBounds(610, 20, 120, 50);\r\n\t\tsaveButton.setVerticalTextPosition(SwingConstants.CENTER);\r\n\t\tsaveButton.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\r\n\t\t// Create text fields with info on the card cash-in bonuses\r\n\t\tcardsData = new JTextArea(\r\n\t\t\t\t\"Continent\tTroop\\n\tBonus: \\n Kjersia\t 2\\n Estoveria\t 5\\n Moa\t 6\\n Shilov\t 3\\n Tormudd\t 3\\n Eschilles\t 7\");\r\n\t\twindow.getPanel().add(cardsData);\r\n\t\tcardsData.setFont(new Font(\"Vani\", Font.BOLD, 17));\r\n\t\tcardsData.setBounds(800, 20, 200, 250);\r\n\t\tcardsData.setBorder(BorderFactory.createBevelBorder(1));\r\n\t\tcardsData.setBackground(new Color(135, 190, 250));\r\n\t\tcardsData.setEditable(false);\r\n\r\n\t\t// Create text fields with info on the continents bonuses\r\n\t\tcontinentData = new JTextArea(\r\n\t\t\t\t\"Card Set\tTroop\\n\tBonus: \\n 3-Soldiers\t 3\\n 3-Horses\t 5\\n 3-Cannons\t 7\\n 1-of-Each-Kind 10\");\r\n\t\twindow.getPanel().add(continentData);\r\n\t\tcontinentData.setFont(new Font(\"Vani\", Font.BOLD, 17));\r\n\t\tcontinentData.setBounds(1050, 20, 200, 250);\r\n\t\tcontinentData.setBorder(BorderFactory.createBevelBorder(1));\r\n\t\tcontinentData.setBackground(new Color(135, 190, 250));\r\n\t\tcontinentData.setEditable(false);\r\n\r\n\t\t//Add phase button\r\n\t\tcashInButton.setVisible(false);\r\n\t\tcashInButton.addActionListener(this);\r\n\t\twindow.getPanel().add(cashInButton);\r\n\t\tcashInButton.setFont(new Font(\"Vani\", Font.BOLD, 25));\r\n\t\tcashInButton.setText(\"<html>Cash<br /> ~In~ <br /> Cards</html>\");\r\n\t\tcashInButton.setBounds(620, 100, 100, 150);\r\n\t\tcashInButton.setBorder(BorderFactory.createBevelBorder(0));\r\n\r\n\t\t//Add a background area to the cards section of the bottom panel\r\n\t\tcardBackground = new JLabel(\"\");\r\n\t\twindow.getPanel().add(cardBackground);\r\n\t\tcardBackground.setBounds(60, 90, 670, 170);\r\n\t\tcardBackground.setBackground(new Color(135, 190, 250));\r\n\t\tcardBackground.setBorder(BorderFactory.createBevelBorder(1));\r\n\t\tcardBackground.setOpaque(true);\r\n\r\n\t\t//Add phase label that dsiplays the turn of the user and the phase they are currently in\r\n\t\tphaseLabel = new JLabel();\r\n\t\twindow.getPanel().add(phaseLabel);\r\n\t\tphaseLabel.setFont((new Font(\"Impact\", Font.BOLD, 20)));\r\n\t\tphaseLabel.setBounds(200, 10, 300, 50);\r\n\t\tphaseLabel2 = new JLabel();\r\n\t\twindow.getPanel().add(phaseLabel2);\r\n\t\tphaseLabel2.setFont((new Font(\"Impact\", Font.BOLD, 20)));\r\n\t\tphaseLabel2.setBounds(203, 13, 300, 50);\r\n\t\t\r\n\t\tattackSlide = new JSlider(0,10,5);\r\n\t\twindow.getPanel().add(attackSlide);\r\n\t\tattackSlide.setBounds(740, 90, 50, 150);\r\n\t\tattackSlide.setOrientation(JSlider.VERTICAL);\r\n\t\tattackSlide.setVisible(false);\r\n\t\t\r\n\t\tattacker = new JLabel(\"\");\r\n\t\twindow.getPanel().add(attacker);\r\n\t\tattacker.setFont(new Font(\"impact\",18,18));\r\n\t\tattacker.setBounds(740,40,100,50);\r\n\t\tattacker.setVisible(false);\r\n\t\t\r\n\t\t//Initializes the graphics\r\n\t\tg = bs.getDrawGraphics();\r\n\r\n\t\t//Shuffle the deck\r\n\t\tCollections.shuffle(Cards);\t\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\n\t\t\n\t\t//get profile data from database\n\t\tProfile profile = ProfileDAO.searchProfile(String.valueOf(friendsID));\n\t\t//get privacy reference data from database\n\t\tProfilePrivacy profilePrivacy = ProfileDAO.searchProfilePrivacy(String.valueOf(friendsID));\n\t\t//display username\n\t\tusername.setText(profile.getUsername());\n\t\t\n\t\t//other data from friend's profile\n\t\tif(profilePrivacy.getFirstName()) firstName.setText(profile.getFirstName());\n\t\telse firstName.setText(\"Hidded by user\");\n\t\tif(profilePrivacy.getLastName()) lastName.setText(profile.getLastName());\n\t\telse lastName.setText(\"Hidded by user\");\n\t\tif(profilePrivacy.getEmail()) email.setText(profile.getEmail());\n\t\telse email.setText(\"Hidded by user\");\n\t\tif(profilePrivacy.getBirthday()) birthday.setText(profile.getBirthday());\n\t\telse birthday.setText(\"Hidded by user\");\n\t\tif(profilePrivacy.getPhoneNumber()) phone.setText(profile.getPhoneNumber());\n\t\telse phone.setText(\"Hidded by user\");\n\t\tif(profilePrivacy.getOccupation()) occupation.setText(profile.getOccupation());\n\t\telse occupation.setText(\"Hidded by user\");\n\t\tif(profilePrivacy.getSchool()) school.setText(profile.getSchool());\n\t\telse school.setText(\"Hidded by user\");\n\t\tif(profilePrivacy.getStatus()) status.setText(profile.getStatus());\n\t\telse status.setText(\"Hidded by user\");\n\t\tif(profilePrivacy.getPosts()) showPosts();\n\t\telse postsList.getItems().add(new Text(\"User chose not to display posts.\"));\n\t}", "private void loadPlayerPanel(Player player) {\n\t\tCustomButton nullButton = new CustomButton() {\n\t\t\tprivate static final long serialVersionUID = 1L;\n\t\t\tpublic void buttonPressed() {}\n\t\t};\n\t\tnullButton.setVisible(false);\n\t\t\n\t\tLinkedList<Card> cards = new LinkedList<Card>();\n\t\tcards.addAll(player.getAllItems());\n\t\tMultiSelectCardPanel playerPanel = new MultiSelectCardPanel(cards, 3, nullButton, null) {\n\t\t\tprivate static final long serialVersionUID = 1L;\n\t\t\tpublic void setCheckedInfoText() {}\n\t\t};\n\t\tplayerPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.BLACK), player.getName()));\n\t\t\n\t\tif (player == initiator) {\n\t\t\tif (initiatorPanel != null)\n\t\t\t\tgetContentPane().remove(initiatorPanel);\n\t\t\t\n\t\t\tc.gridx = 0;\n\t\t\tinitiatorPanel = playerPanel;\n\t\t}\n\t\telse {\n\t\t\tif (otherPlayerPanel != null)\n\t\t\t\tgetContentPane().remove(otherPlayerPanel);\n\t\t\t\n\t\t\tc.gridx = 2;\n\t\t\totherPlayerPanel = playerPanel;\n\t\t}\n\t\t\n\t\tc.gridheight = 3;\n\t\tc.gridy = 0;\n\t\tgetContentPane().add(playerPanel, c);\n\t\trefresh();\n\t\tc.gridheight = 1;\n\t}", "public void setUpPlayers() {\n this.players.add(new Player(\"Diogo\"));\n this.players.add(new Player(\"Hayden\"));\n this.players.add(new Player(\"Gogo\"));\n }", "protected void initSkins()\n {\n synchronized (this)\n {\n _skins = new HashMap<SkinMetadata, Skin>();\n }\n }", "private void setUpGame() {\n\t\tsetUpBlocks();\n\t\tsetUpBall();\n\t\tsetUpPaddle();\n\t\taddMouseListeners();\n\t}", "public void initialize() {\r\n levelInformation.getBackground().addToGame(this);\r\n ScoreTrackingListener scoreTrackingListener = new ScoreTrackingListener(score);\r\n ScoreIndicator scoreIndicator = new ScoreIndicator(score, guiWidth);\r\n BlockRemover blockRemover = new BlockRemover(this, blockCounter);\r\n BallAdder ballAdder = new BallAdder(this, environment, ballCounter);\r\n BallRemover ballRemover = new BallRemover(this, ballCounter);\r\n for (Block blocks : levelInformation.blocks()) {\r\n Block block = blocks;\r\n if (block.getColor() == Color.black) {\r\n block.addHitListener(ballRemover);\r\n }\r\n if (block.getColor() == Color.magenta) {\r\n block.addHitListener(ballAdder);\r\n }\r\n block.addHitListener(blockRemover);\r\n block.addHitListener(scoreTrackingListener);\r\n block.addToGame(this);\r\n }\r\n blockCounter.increase(levelInformation.numberOfBlocksToRemove());\r\n Paddle paddle = new Paddle(new Rectangle(new Point((guiWidth / 2) - (levelInformation.paddleWidth() / 2),\r\n 580), levelInformation.paddleWidth(), 10), Color.YELLOW, keyboard, levelInformation.paddleSpeed());\r\n paddle.addToGame(this);\r\n Block top = new Block(new Rectangle(new Point(0, 0), 800, 20), Color.GRAY);\r\n Block left = new Block(new Rectangle(new Point(0, 10), wallWidth, 630), Color.GRAY);\r\n Block right = new Block(new Rectangle(new Point(guiWidth - wallWidth, 10), wallWidth, 630), Color.GRAY);\r\n Block bottom = new Block(new Rectangle(new Point(0, guiHeight), 800, 10), Color.GRAY);\r\n bottom.addToGame(this);\r\n right.addToGame(this);\r\n left.addToGame(this);\r\n top.addToGame(this);\r\n bottom.addHitListener(ballRemover);\r\n scoreIndicator.addToGame(this);\r\n }" ]
[ "0.64177907", "0.6212857", "0.6177384", "0.60499394", "0.6047", "0.6014614", "0.6004827", "0.59141785", "0.5882108", "0.5843662", "0.5813989", "0.5800974", "0.57938373", "0.5756889", "0.5756196", "0.5746372", "0.5721212", "0.5696833", "0.56919056", "0.56770235", "0.56359327", "0.5622385", "0.56129956", "0.5601025", "0.5594082", "0.558571", "0.5563611", "0.5537961", "0.55374384", "0.5535923", "0.55197936", "0.55194265", "0.5490983", "0.5453529", "0.54364634", "0.5425261", "0.54027086", "0.5398474", "0.53949076", "0.53907526", "0.5389455", "0.53689736", "0.53618187", "0.5351718", "0.5349335", "0.53466547", "0.5346006", "0.5344168", "0.5341944", "0.53413236", "0.53344816", "0.5324941", "0.53130716", "0.5309826", "0.53082204", "0.5307155", "0.5284938", "0.5275273", "0.5271713", "0.5269472", "0.52673584", "0.52654743", "0.52626127", "0.5259992", "0.5252191", "0.52487886", "0.524784", "0.5240746", "0.5240737", "0.52388215", "0.5233729", "0.5233131", "0.5232311", "0.5230268", "0.5213199", "0.5206499", "0.5206482", "0.52061254", "0.52036244", "0.51959944", "0.51909244", "0.51900744", "0.51857257", "0.51816845", "0.5175269", "0.51709455", "0.5162667", "0.5162448", "0.51609826", "0.516009", "0.51551855", "0.5153944", "0.5153414", "0.51499057", "0.5145765", "0.51423925", "0.5139439", "0.5138716", "0.51285714", "0.51274455" ]
0.65931547
0
If player goes first, initialize the playable tiles and show guidelines:
public void run() { if(mPlayerGamePiece == mGame.getmCurrentlyPlaying()){ mPlayableTiles = mGame.getmBoard().getPlayableTiles(mPlayerGamePiece); showGuidelines(); mIsAllowedToPlay = true; } // Otherwise, opponent begins: else{ mIsAllowedToPlay = false; makeAIMove(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initGame() {\r\n Log.d(\"UT3\", \"init game\");\r\n mEntireBoard = new Tile(this);\r\n // Create all the tiles\r\n for (int large = 0; large < 9; large++) {\r\n mLargeTiles[large] = new Tile(this);\r\n for (int small = 0; small < 9; small++) {\r\n mSmallTiles[large][small] = new Tile(this);\r\n }\r\n mLargeTiles[large].setSubTiles(mSmallTiles[large]);\r\n }\r\n mEntireBoard.setSubTiles(mLargeTiles);\r\n\r\n // If the player moves first, set which spots are available\r\n mLastSmall = -1;\r\n mLastLarge = -1;\r\n setAvailableFromLastMove(mLastSmall);\r\n }", "public void initTiles()\n {\n PropertiesManager props = PropertiesManager.getPropertiesManager(); \n String imgPath = props.getProperty(MahjongSolitairePropertyType.IMG_PATH);\n int spriteTypeID = 0;\n SpriteType sT;\n \n // WE'LL RENDER ALL THE TILES ON TOP OF THE BLANK TILE\n String blankTileFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_IMAGE_NAME);\n BufferedImage blankTileImage = miniGame.loadImageWithColorKey(imgPath + blankTileFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileImage(blankTileImage);\n \n // THIS IS A HIGHLIGHTED BLANK TILE FOR WHEN THE PLAYER SELECTS ONE\n String blankTileSelectedFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_SELECTED_IMAGE_NAME);\n BufferedImage blankTileSelectedImage = miniGame.loadImageWithColorKey(imgPath + blankTileSelectedFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileSelectedImage(blankTileSelectedImage);\n \n // FIRST THE TYPE A TILES, OF WHICH THERE IS ONLY ONE OF EACH\n // THIS IS ANALOGOUS TO THE SEASON TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeATiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_A_TILES);\n for (int i = 0; i < typeATiles.size(); i++)\n {\n String imgFile = imgPath + typeATiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_A_TYPE);\n spriteTypeID++;\n }\n \n // THEN THE TYPE B TILES, WHICH ALSO ONLY HAVE ONE OF EACH\n // THIS IS ANALOGOUS TO THE FLOWER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeBTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_B_TILES);\n for (int i = 0; i < typeBTiles.size(); i++)\n {\n String imgFile = imgPath + typeBTiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_B_TYPE);\n spriteTypeID++;\n }\n \n // AND THEN TYPE C, FOR WHICH THERE ARE 4 OF EACH \n // THIS IS ANALOGOUS TO THE CHARACTER AND NUMBER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeCTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_C_TILES);\n for (int i = 0; i < typeCTiles.size(); i++)\n {\n String imgFile = imgPath + typeCTiles.get(i);\n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID); \n for (int j = 0; j < 4; j++)\n {\n initTile(sT, TILE_C_TYPE);\n }\n spriteTypeID++;\n }\n }", "private void setUp() {\n players.forEach(player -> player.draw(GameConstants.STARTING_HAND_SIZE.value()));\n }", "void initializeGame() {\n // Initialize players\n // Put the pieces on the board\n }", "public void setup() {\r\n\t\thumanCardsPanel.setHumanCards(players.get(0).getCards());\r\n\t\tfor ( Player p : players ) {\r\n\t\t\tp.setBoard(board);\r\n\t\t\tp.setGame(this);\r\n\t\t}\r\n\t\tboard.setGame(this);\r\n\t\tboard.repaint();\r\n\t\tJOptionPane popup = new JOptionPane();\r\n\t\tString message = \"You are Miss Scarlet. Press Next Player to begin.\\n Hint: Use File > Detective Notes to help you win!\";\r\n\t\tpopup.showMessageDialog(this, message, \"Welcome to Clue!\", JOptionPane.INFORMATION_MESSAGE);\r\n\t}", "private void initialize()\n {\n for(int i=0;i<4;i++)\n {\n foundationPile[i]= new Pile(Rank.ACE);\n foundationPile[i].setRules(true, false, false, false, true,false, true);\n } \n for(int i=0;i<7;i++)\n {\n tableauHidden[i] = new Pile();\n tableauVisible[i] = new Pile(Rank.KING);\n tableauVisible[i].setRules(false, true, false, false, false,false, true);\n } \n deck.shuffle();\n deck.shuffle();\n dealGame();\n }", "@Override\r\n\tpublic void gameInit() \r\n\t{\r\n\t\tfont = new Font(\"Courier\", Font.BOLD, 14);\r\n\t\tfontInfo = this.getFontMetrics(font);\r\n\t\tkeys = new KeyValues();\r\n\t\t\r\n\t\tbackground.loadImage(\"/images/sky.png\");\r\n\t\ttileset = new TileSet(10,10,32,32);\r\n\t\ttileset.loadTiles(\"/images/test_tiles.png\");\r\n\t\tmap = new Map(tileset, 20, 50);\r\n\t\tmap.readMap(\"res/maps/testmap2.txt\");\r\n\t\t\r\n\t\tcamera.setDimensions(getScreenWidth(), getScreenHeight());\r\n\t\tcamera.setXRange(0, map.getWidth() - getScreenWidth());\r\n\t\tcamera.setYRange(0, map.getHeight() - getScreenHeight());\r\n\t}", "public void initMultiPlayer() {\n\t\tWorld.clear();\n\t\tstate = STATE.MENU;\n\t\tconfig[0] = new PlayerConfig(\"LEFTIE\", Keyboard.KEY_W, Keyboard.KEY_S,\n\t\t\t\tKeyboard.KEY_D, 0);\n\t\tconfig[1] = new PlayerConfig(\"RIGHTIE\", Keyboard.KEY_UP,\n\t\t\t\tKeyboard.KEY_DOWN, Keyboard.KEY_LEFT, 1);\n\n\t\tbat1 = new Bat(100, Screen.getCenterY() - Bat.HEIGHT / 2, config[0]);\n\n\t\tbat2 = new Bat(Screen.getWidth() - 100, Screen.getCenterY()\n\t\t\t\t- Bat.HEIGHT / 2, config[1]);\n\t\tfetchControlInput(config[0], new Callback() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tWorld.clear();\n\t\t\t\tfetchControlInput(config[1], new Callback() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tinitGame();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void askInitResource() {\n\n clear(container);\n\n if (gui.getViewController().getGame().getPosition()!=1)\n {\n ResourceManager resourceManager = new ResourceManager(container,gui);\n resourceManager.setHeading(\"if you are the second or the third player, you have to choose only one, instead two resources like and the fourth player:\");\n resourceManager.showWhatToChoose(true);\n }\n else\n {\n\n container.setLayout(new FlowLayout());\n errorLabel = new JLabel(\"sorry, you are the first player, take a nap\");\n errorLabel.setBackground(Color.WHITE);\n errorLabel.setOpaque(true);\n container.add(errorLabel);\n errorLabel.setLocation(475,108);\n errorLabel.setSize(100,100);\n (new Thread(() -> {\n try {\n gui.notifyObserver(new EndOfTurnMessage());\n } catch (IOException | InterruptedException e) {\n e.printStackTrace();\n }\n })).start();\n gui.switchToGameMode();\n }\n\n applyChangesTo(container);\n }", "void initializePlayer();", "public void initPlayer();", "public void startGame() {\n\t\tinitChips();\n\t\tassignAndStartInitialProjects();\n\t}", "synchronized public void initGfx()\n {\n // Points for initial sprite placement\n Point p1, p2, p3;\n\n p1 = getMainPoint();\n p2 = getRandomMiniPoint();\n p3 = getRandomMiniPoint();\n\n // Reset score\n score = 0;\n\n // Reset text for score\n ((TextView)findViewById(R.id.the_score_label)).setText(\"SCORE: 0\");\n\n // Set main sprite\n ((GameBoard)findViewById(R.id.the_canvas)).setMainSprite(p1.x, p1.y);\n\n // Set mini sprites\n ((GameBoard)findViewById(R.id.the_canvas)).setMiniSprite(p2.x, p2.y);\n ((GameBoard)findViewById(R.id.the_canvas)).setMiniSprite2(p3.x, p3.y);\n\n // Set game over sprite to outside screen\n ((GameBoard) findViewById(R.id.the_canvas)).setOverSprite(-2000, -2000);\n\n // Enable reset button\n ((Button)findViewById(R.id.reset_button)).setEnabled(true);\n\n frame.removeCallbacks(frameUpdate);\n ((GameBoard)findViewById(R.id.the_canvas)).invalidate();\n frame.postDelayed(frameUpdate, FRAME_RATE);\n }", "public void initialize2() {\n\t\txHero1 = 10;\n\t\tinsecondmode=true;\n\t\tImageIcon bg = new ImageIcon(\"bg for one player.png\");\n\t\tBackground = (bg.getImage().getScaledInstance(bg.getIconWidth(), bg.getIconHeight(), Image.SCALE_DEFAULT));\n\t\tImageIcon[] in1 = new ImageIcon[12];\n\t\tin1[0] = new ImageIcon(\"\");\n\t\tin1[1] = new ImageIcon(\"\");\n\t\tin1[2] = new ImageIcon(\"\");\n\t\tin1[3] = new ImageIcon(\"\");\n\t\tin1[4] = new ImageIcon(\"\");\n\t\tin1[5] = new ImageIcon(\"\");\n\t\tin1[6] = new ImageIcon(\"\");\n\t\tin1[7] = new ImageIcon(\"\");\n\t\tin1[8] = new ImageIcon(\"\");\n\t\tin1[9] = new ImageIcon(\"\");\n\t\tin1[10] = new ImageIcon(\"\");\n\t\tin1[11] = new ImageIcon(\"\");\n\t\tImageIcon[] in2 = new ImageIcon[12];\n\t\tin2[0] = new ImageIcon(\"Hero02.png\");\n\t\tin2[1] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[2] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[3] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[4] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[5] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[6] = new ImageIcon(\"Hero02 Attack02.png\");\n\t\tin2[7] = new ImageIcon(\"Hero02 Attack02.png\");\n\t\tin2[8] = new ImageIcon(\"Hero02 Defence.png\");\n\t\tin2[9] = new ImageIcon(\"Hero02 Defence.png\");\n\t\tin2[10] = new ImageIcon(\"Hero02 Attack01.png\");\n\t\tin2[11] = new ImageIcon(\"Hero02 Die.png\");\n\t\tImageIcon[] inBullet1 = new ImageIcon[3];\n\t\tinBullet1[0] = new ImageIcon(\"\");\n\t\tinBullet1[1] = new ImageIcon(\"\");\n\t\tinBullet1[2] = new ImageIcon(\"\");\n\t\tImageIcon[] inBullet2 = new ImageIcon[5];\n\t\tinBullet2[0] = new ImageIcon(\"20.png\");\n\t\tinBullet2[1]= new ImageIcon(\"50.png\");\n\t\tinBullet2[2]= new ImageIcon(\"100.png\");\n\t\tinBullet2[3]= new ImageIcon(\"200.png\");\n\t\tinBullet2[4]= new ImageIcon(\"500.png\");\n\t\tcannotdefend(1);\n\t\tHero1.settemplate(in2);\n\t\tHero2.settemplate(in1);\n\t\tBullet1.settemplate(inBullet2);\n\t\tBullet2.settemplate(inBullet1);\n\t\tHero1.setstatus(0);\n\t\tHero2.setstatus(0);\n\t}", "private void initBeginOfTurn()\n\t{\n\t\tfor(Action action : this.getCurrentPlayer().getPersonalityCard().getActions())\n\t\t{\n\t\t\taction.execute(this);\n\t\t}\n\t\t\n\t\tcanPlayPlayerCard = true;\n\t\tthis.getCurrentPlayer().getDataInput().printMessage(this.getEntireGameStatus());\n\t\tthis.getCurrentPlayer().getDataInput().printMessage(this.getCurrentPlayerGameStatus());\n\t\tthis.showSaveGame = true;\n\t\t\n\t\tfor(Card card : this.getCurrentPlayer().getCityAreaCardDeck())\n\t\t{\n\t\t\tcard.setActiveState(true);\n\t\t}\n\t}", "private void setUpOverview() {\n mapInstance = GameData.getInstance();\n //get reference locally for the database\n db = mapInstance.getDatabase();\n\n //retrieve the current player and the current area\n currentPlayer = mapInstance.getPlayer();\n\n }", "@Override\n\tpublic void init() {\n\t\t\n\t\t// Set your level dimensions.\n\t\t// Note that rows and columns cannot exceed a size of 16\n\t\tsetDimensions(4, 4);\n\t\t\n\t\t// Select your board type\n\t\tsetBoardType(BoardType.CHECKER_BOARD);\n\n\t\t// Select your grid colors.\n\t\t// You need to specify two colors for checker boards\n\t\tList<Color> colors = new ArrayList<Color>();\n\t\tcolors.add(new Color(255, 173, 179, 250)); // stale blue\n\t\tcolors.add(new Color(255, 255, 255, 255)); // white\n\t\tsetColors(colors);\n\t\t\n\t\t// Specify the level's rules\n\t\taddGameRule(new DemoGameRule());\n\t\t\n\t\t// Retrieve player IDs\n\t\tList<String> playerIds = getContext().getGame().getPlayerIds();\n\t\tString p1 = playerIds.get(0);\n\t\tString p2 = playerIds.get(1);\n\n\t\t// Add your entities to the level's universe\n\t\t// using addEntity(GameEntity) method\n\t\taddEntity(new Pawn(this, p1, EntityType.BLACK_PAWN, new Point(0, 0)));\n\t\taddEntity(new Pawn(this, p2, EntityType.WHITE_PAWN, new Point(3, 3)));\n\t}", "public void initSinglePlayerChoice() {\n\t\tWorld.clear();\n\t\tWorld.add(new TextStatic(difficultyString, Screen.getCenterX()\n\t\t\t\t- difficultyString.length() * Sprite.CHAR_WIDTH / 2, Screen\n\t\t\t\t.getHeight() * 6 / 8 - Sprite.CHAR_HEIGHT / 2, Color.white));\n\t\tWorld.add(new EasyButton(Screen.getCenterX() - EasyButton.WIDTH / 2,\n\t\t\t\tScreen.getHeight() * 5 / 8 - EasyButton.HEIGHT / 2, this));\n\t\tWorld.add(new MediumButton(Screen.getCenterX() - EasyButton.WIDTH / 2,\n\t\t\t\tScreen.getHeight() * 4 / 8 - EasyButton.HEIGHT / 2, this));\n\t\tWorld.add(new HardButton(Screen.getCenterX() - EasyButton.WIDTH / 2,\n\t\t\t\tScreen.getHeight() * 3 / 8 - EasyButton.HEIGHT / 2, this));\n\t\tWorld.add(new TextStatic(footerText, Screen.getCenterX()\n\t\t\t\t- footerText.length() * Sprite.CHAR_WIDTH / 2,\n\t\t\t\tSprite.CHAR_HEIGHT, Color.yellow));\n\n\t}", "@Override\n public void setInitializePawn() {\n //overlayedStage.close();\n System.out.println(\"-Welcome-\");\n lightMove();\n startTable(this.getTable(), bt);\n }", "public void initGame() {\n // clear the board contents\n board.init();\n // CROSS speelt eerst\n currentPlayer = Mark.CROSS;\n currentState = GameState.PLAYING;\n // ready for start\n }", "public void initGame() {\n\t\tWorld.clear();\n\t\tstate = STATE.PLAYING;\n\n\t\tWorld.add(bat1);\n\t\tWorld.add(bat2);\n\n\t\tball = new Ball(Screen.getCenterX() - Ball.WIDTH / 2,\n\t\t\t\tScreen.getCenterY() - Ball.HEIGHT / 2);\n\n\t\tWorld.add(new Wall(0, 0, Screen.getWidth(), LOWER_LIMIT));\n\t\tWorld.add(new Wall(0, UPPER_LIMIT, Screen.getWidth(), Screen\n\t\t\t\t.getHeight() - UPPER_LIMIT));\n\n\t\tWorld.add(ball);\n\n\t\tInput.register(new InputListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyDown(int eventKey) {\n\t\t\t\tif (eventKey == Keyboard.KEY_ESCAPE) {\n\t\t\t\t\tinitIntro();\n\t\t\t\t\tInput.unregister(this);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyUp(int eventKey) {\n\t\t\t}\n\t\t});\n\t\tWorld.add(new TextStatic(footerText, Screen.getCenterX()\n\t\t\t\t- footerText.length() * Sprite.CHAR_WIDTH / 2,\n\t\t\t\tSprite.CHAR_HEIGHT, Color.yellow));\n\t}", "@Override\n\tpublic void init() {\n\t\tloadSpritesheet();\n\t\tloadSounds();\n\t\tinitIntro();\n\t}", "public static void init()\n {\n \tSpriteSheet sheet = new SpriteSheet(ImageLoader.loadImage(\"/sprites/spritesheet.png\"));\n BufferedImage img;\n /*for(int y = 0;y<4;y++)\n \t{\n \t\t\n \timg = sheet.crop(width*y,0,width,height);\n \t\t\n \t\tplayer.add(img);\n \t}*/\n hero = sheet.crop(0,0,width,height);\n heroUp = sheet.crop(width,0,width,height);\n heroLeft = sheet.crop(width*2,0,width,height);\n heroRight = sheet.crop(width*3,0,width,height);\n \n heroDown1 = sheet.crop(0,height+32,width+1,height);\n heroDown2 = sheet.crop(width+1,height+32,width+1,height);\n heroUp1 = sheet.crop(width*2+2,height+32,width,height);\n heroUp2 = sheet.crop(width*3+2,height+32,width,height);\n heroLeft1 = sheet.crop(width*4+2,height+32,width,height);\n heroLeft2 = sheet.crop(width*5+2,height+32,width,height);\n heroRight1 = sheet.crop(width*6+2,height+32,width,height);\n heroRight2 = sheet.crop(width*7+2,height+32,width,height);\n \n /*for(int i = 0;i<4;i++)\n {\n \tfor(int y = 0;y<4;y++)\n \t{\n \t\tif(y==1)\n \t\t{\n \t\t\timg = sheet.crop(width*y,height*i,width,height);\n \t\t}\n \t\telse\n \t\t{\n \t\t\timg = sheet.crop(width*y+1,height*i+1,width,height);\n \t\t}\n \t\tplayer.add(img);\n \t}\n }*/\n sheet = new SpriteSheet(ImageLoader.loadImage(\"/sprites/PokemonTileSet.png\"));\n for(int i = 0;i<50;i++)\n {\n \tfor(int y = 0;y<8;y++)\n \t{\n \t\timg = sheet.crop(tileW*y,tileH*i,tileW,tileH);\n \t\tassets.add(img);\n \t}\n }\n \n /*\n hero = sheet.crop(0,0,width,height);\n heroUp = sheet.crop(width,0,width,height);\n heroLeft = sheet.crop(width*2,0,width,height);\n heroRight = sheet.crop(width*3,0,width,height);\n \n treeTopLeft = sheet.crop(0,firstRow,tWidth,tHeight);\n treeTopRight = sheet.crop(tWidth,firstRow,tWidth,tHeight);\n treeMidLeft = sheet.crop(tWidth*2,firstRow,tWidth,tHeight);\n treeMidRight = sheet.crop(tWidth*3,firstRow,tWidth,tHeight);\n treeBotLeft = sheet.crop(tWidth*4,firstRow,tWidth,tHeight);\n treeBotRight = sheet.crop(tWidth*5,firstRow,tWidth,tHeight);\n treeTopLeftGrass = sheet.crop(tWidth*6,firstRow,tWidth,tHeight);\n treeTopRightGrass = sheet.crop(tWidth*7,firstRow,tWidth,tHeight);\n treeTopLeftMushroom = sheet.crop(tWidth*8,firstRow,tWidth,tHeight);\n grass = sheet.crop(tWidth*9,firstRow,tWidth,tHeight);\n \n wildGrass = sheet.crop(0,secondRow,tWidth,tHeight);\n mushroom = sheet.crop(tWidth,secondRow,tWidth,tHeight);\n logLeft = sheet.crop(tWidth*2,secondRow,tWidth,tHeight);\n logRight = sheet.crop(tWidth*3,secondRow,tWidth,tHeight);\n ledgeLeft = sheet.crop(tWidth*4,secondRow,tWidth,tHeight);\n ledgeMid = sheet.crop(tWidth*5,secondRow,tWidth,tHeight);\n ledgeRight = sheet.crop(tWidth*6,secondRow,tWidth,tHeight);\n treeLeftOverlap = sheet.crop(tWidth*7,secondRow,tWidth,tHeight);\n treeRightOverlap = sheet.crop(tWidth*8,secondRow,tWidth,tHeight);\n \n heroWalkingDown1 = sheet.crop(0,thirdRow,width+1,height);\n heroWalkingDown2 = sheet.crop(width+1,thirdRow,width+1,height);\n heroWalkingUp1 = sheet.crop(width*2+1,thirdRow,width,height);\n heroWalkingUp2 = sheet.crop(width*3+1,thirdRow,width,height);\n heroWalkingLeft1 = sheet.crop(width*4+1,thirdRow,width,height);\n heroWalkingLeft2 = sheet.crop(width*5+1,thirdRow,width,height);\n heroWalkingRight1 = sheet.crop(width*6+1,thirdRow,width,height);\n heroWalkingRight2 = sheet.crop(width*7+1,thirdRow,width,height);\n */\n }", "public void initialize() {\r\n addSprite(this.info.getBackground());\r\n createBorders();\r\n defineDeathBlock();\r\n addIndicators();\r\n BlockRemover removeBlock = new BlockRemover(this, this.remainingBlocks);\r\n// this.remainingBlocks=removeBlock.getRemainingBlocks();\r\n ScoreTrackingListener scoreTrackingListener = new ScoreTrackingListener(this.score);\r\n for (int i = 0; i < info.blocks().size(); i++) {\r\n info.blocks().get(i).addHitListener(removeBlock);\r\n info.blocks().get(i).addHitListener(scoreTrackingListener);\r\n info.blocks().get(i).addToGame(this);\r\n }\r\n }", "@Override\r\n \tpublic void init(GameContainer gc) throws SlickException \r\n \t{\r\n \t\t// Initialization of map, camera, player, pathfinding\r\n \t\ttheMap = new TiledMap(\"res/tilemap01.tmx\");\r\n \t\tthePTBMap = new PropertyTileBasedMap(theMap);\r\n \t\tcamera = new Camera(0f, 0f);\r\n \t\tunitOne = new Player(64f, 64f);\r\n \t\tunitTwo = new Player(64f, 128f);\r\n \t\tpathFinder = new AStarPathFinder(thePTBMap, 100, false);\r\n \t\t\r\n \t\t// player's animation. Need a better way to deal with it\r\n \t\t\r\n \t\tint duration[] = {200, 200, 200};\r\n \t\tSpriteSheet character = new SpriteSheet(\"res/monsters.png\", tileSize, tileSize);\r\n \t\tImage[] walkUp = {character.getSubImage(6, 1), character.getSubImage(7, 1), character.getSubImage(8, 1)};\r\n \t\tImage[] walkDown = {character.getSubImage(0, 1), character.getSubImage(1, 1), character.getSubImage(2, 1)};\r\n \t\tImage[] walkLeft = {character.getSubImage(9, 1), character.getSubImage(10, 1), character.getSubImage(11, 1)};\r\n \t\tImage[] walkRight = {character.getSubImage(3, 1), character.getSubImage(4, 1), character.getSubImage(5, 1)};\r\n \t\t\r\n \t\tmovingUp = new Animation(walkUp, duration, true);\r\n \t\tmovingDown = new Animation(walkDown, duration, true);\r\n \t\tmovingLeft = new Animation(walkLeft, duration, true);\r\n \t\tmovingRight = new Animation(walkRight, duration, true);\r\n \t\t\r\n \t\tunitOne.setMovement(movingDown);\r\n \t\tunitTwo.setMovement(movingDown);\r\n \t}", "public static void setupNewGamePlay() {\r\n\t\tSTATUS = Gamestatus.PREPARED;\r\n\t\tGameplay.getInstance().start();\r\n\t\tgui.setMenu(new GameplayMenu(), true);\r\n\t}", "private void prepare()\n {\n addObject(player,185,196);\n player.setLocation(71,271);\n Ground ground = new Ground();\n addObject(ground,300,360);\n invent invent = new invent();\n addObject(invent,300,375);\n }", "public void load()\n {\n //adds a placeholder text that will eventually change into the player who gets the first turn\n add(player = new JLabel(\"\", JLabel.CENTER),BorderLayout.NORTH);\n \n //if turn == 0/false \n if(turn == false)\n {\n player.setText(\"<html><strong><font color='red'>Player 1 starts first!</font></strong></html>\");\n }\n \n //if turn == 1/true\n if(turn == true)\n {\n player.setText(\"<html><strong><font color='blue'>Player 2 starts first!</font></strong></html>\");\n }\n \n \n \n //sets icons for the left 16 buttons to the icon black\n for( int rows = 0; rows< gridUnits.length; rows++)\n {\n \n for(int cols = 0;cols <2; cols++)\n {\n gridUnits[rows][cols].setIcon(black);\n }\n }\n \n \n //sets icons for the right 16 buttons to the icon white\n for(int rows = 0; rows< gridUnits.length; rows++)\n {\n \n for(int cols = 6;cols <8; cols++)\n {\n gridUnits[rows][cols].setIcon(white);\n \n }\n \n } \n \n \n //adds actionListeners to all of the 64 buttons\n for (int rows = 0; rows < gridUnits.length; rows++)\n {\n \n for(int cols = 0; cols < gridUnits.length; cols++)\n {\n gridUnits[rows][cols].addActionListener(this);\n \n }\n \n }\n \n }", "public void initGame() {\n board.init(); // clear the board contents\n currentPlayer = Seed.CROSS; // CROSS plays first\n currentState = GameState.PLAYING; // ready to play\n }", "private void setUpCorrect() {\n List<Tile> tiles = makeTiles();\n Board board = new Board(tiles, 4, 4);\n boardManager = new BoardManager(board);\n }", "public void initiateGame() {\n Collections.shuffle(players);\n Collections.shuffle(categories);\n for (Category c : categories) {\n c.shuffleChallenges();\n }\n }", "public void startGame() {\n\t\ttank1.create(20, 530, 0, 0);\n\t\ttank1.setDefaults();\n\t\ttank2.create(960, 530, 0, 0);\n\t\ttank2.setDefaults();\n\t\tobjects.add(tank1);\n\t\tobjects.add(tank2);\n\t\tground = new Groundmod2((int) (Math.random() * 4));\n\t\tturn = Turn.PLAYER1;\n\t\tgrabFocus();\n\t}", "private void init() {\n\n\t\tinitializeLists();\n\t\tcreateTiles();\n\t\tcreateTileViews();\n\t\tshuffleTiles();\n\n\t}", "public HowToPlay()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(763, 578, 1); \n //HowToPlay play = new HowToPlay();\n }", "public void init() {\n if (!getLocation().isTileMap()) {\n //Debug.signal( Debug.NOTICE, null, \"PlayerImpl::init\");\n this.animation = new Animation(this.wotCharacter.getImage(), ClientDirector.getDataManager().getImageLibrary());\n this.sprite = (Sprite) this.wotCharacter.getDrawable(this);\n this.brightnessFilter = new BrightnessFilter();\n this.sprite.setDynamicImageFilter(this.brightnessFilter);\n }\n this.movementComposer.init(this);\n }", "protected void initialize() {\n \tsetShowStartScreen(false);\n \t\n \t// do not preload resources, for this very simple game\n \t// preloadResources();\n \t\n \t// Max number of balls is just 17\n \tchains.setMaxBalls(17);\n }", "public void setStartConditions() {\r\n\t\tplayer1.relocate(0, 0);\r\n\t\tgamemap.setPlayerLocation(1, 1);\r\n\t\tgamemap.setEnemyLocation(20, 10);\r\n\t\tenemy1.relocate(19*46, 9*85);\r\n\t\tportal1.relocate(9*46, 9*85);\r\n\t\tportal2.relocate(9*46, 0*85);\r\n\t\tspikes1.relocate(5*46,0*85);\r\n\t\tspikes2.relocate(5*46,1*85);\r\n\t\tspikes3.relocate(5*46,2*85);\r\n\t\tspikes4.relocate(5*46,7*85);\r\n\t\tspikes5.relocate(5*46,8*85);\r\n\t\tspikes6.relocate(5*46,9*85);\r\n\t\tspikes7.relocate(10*46,2*85);\r\n\t\tspikes8.relocate(10*46,3*85);\r\n\t\tspikes9.relocate(10*46,4*85);\r\n\t\tspikes10.relocate(10*46,5*85);\r\n\t\tspikes11.relocate(10*46,6*85);\r\n\t\tspikes12.relocate(10*46,7*85);\r\n\t\tspikes13.relocate(15*46,0*85);\r\n\t\tspikes14.relocate(15*46,1*85);\r\n\t\tspikes15.relocate(15*46,2*85);\r\n\t\tspikes16.relocate(15*46,7*85);\r\n\t\tspikes16.relocate(15*46,8*85);\r\n\t\tspikes17.relocate(15*46,9*85);\r\n\t\tRandom randomObj = new Random();\r\n\t\tint randomX = randomObj.nextInt(20);\r\n\t\tint randomY = randomObj.nextInt(10);\r\n\t\tcoins1.relocate(randomX*46, randomY*85);\r\n\t\tgamemap.setLootLocation(randomX + 1, randomY + 1);\r\n\t\t//coins1.relocate(10*46,5*85);\r\n\t\t//gamemap.setLootLocation(11, 6);\r\n\t}", "private void start(){\n character.fillEnergy();\n piles.getDrawPile().shuffle();\n for(int i = 1 ; i <= 5 ; i++ ){\n piles.drawCard();\n }\n effectHandler.startFight();\n\n }", "private void initialiseBoard() {\r\n\t\t//Set all squares to EMPTY\r\n\t\tfor(int x = 0; x < board.getWidth(); x++) {\r\n\t\t\tfor(int y = 0; y < board.getHeight(); y++) {\r\n\t\t\t\tboard.setSquare(new GridSquare(GridSquare.Type.EMPTY), x, y);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Assign player tiles\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_ONE_TILE), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_TWO_TILE), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y);\r\n\t\t\r\n\t\t//Assign Creation tiles\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_ONE_POSITION_X+3, Board.PLAYER_ONE_POSITION_Y+3);\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_TWO_POSITION_X-3, Board.PLAYER_TWO_POSITION_Y-3);\r\n\t\t\r\n\t\t//Assign Out of Bounds tiles\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\t\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\t\r\n\t\t\r\n\t}", "public void initPlayerStateUI() {\n if (!playableMediaItem.getBitrate().isEmpty()) {\n tvTrackInfo.setText(playableMediaItem.getBitrate() + getString(R.string.kbps));\n } else {\n tvTrackInfo.setText(\"\");\n }\n\n if (universalPlayer.isPrepaired) {\n ((IToolbarHolder) getActivity()).getToolbar().setTitle(R.string.now_paying);\n if (btnPlay.isPlay() && universalPlayer.isPlaying()) {\n btnPlay.toggle();\n } else if (!btnPlay.isPlay() && !universalPlayer.isPlaying()) {\n btnPlay.toggle();\n }\n\n } else {\n ((IToolbarHolder) getActivity()).getToolbar().setTitle(R.string.buffering);\n if (!btnPlay.isPlay()) {\n btnPlay.toggle();\n }\n }\n }", "private void initPlayMode() {\n initPlayModeView();\n initPlayModeController();\n }", "public void initChessBoardManually() {\r\n\t\tstatus.setStatusEdit();\r\n\t\tclearBoard();\r\n\t\tthis.setBoardEnabled(true);\r\n\t\tfor (int i=0; i<8*8; i++) {\r\n\t\t\tChessBoardBlock block = board.get(order[i]);\r\n\t\t\tblock.setBorderPainted(false);\r\n\t\t}\r\n\t\tswitcher.setEnabled(true);\r\n\t\tconfirm.setEnabled(true);\r\n\t\tt.setText(\"<html>Please choose position to put the pieces.<br>Right click to set/cancel King flag</html>\");\r\n\t}", "public void initialiseBoard() {\n\t\tPlayer1Mancala = new MancalaPit(this.player1Name, 0, null);\n\t\tPit player1_Pit6 = new Pit(this.player1Name, 6, 1, Player1Mancala);\n\t\tPit player1_Pit5 = new Pit(this.player1Name, 5, 1, player1_Pit6);\n\t\tPit player1_Pit4 = new Pit(this.player1Name, 4, 1, player1_Pit5);\n\t\tPit player1_Pit3 = new Pit(this.player1Name, 3, 1, player1_Pit4);\n\t\tPit player1_Pit2 = new Pit(this.player1Name, 2, 1, player1_Pit3);\n\t\tPit player1_Pit1 = new Pit(this.player1Name, 1, 1, player1_Pit2);\n\n\t\t// Define Player2 Pits in descending order \n\t\tPlayer2Mancala = new MancalaPit(this.player2Name, 0, null);\n\t\tPit player2_Pit6 = new Pit(this.player2Name, 6, 1, Player2Mancala);\n\t\tPit player2_Pit5 = new Pit(this.player2Name, 5, 1, player2_Pit6);\n\t\tPit player2_Pit4 = new Pit(this.player2Name, 4, 1, player2_Pit5);\n\t\tPit player2_Pit3 = new Pit(this.player2Name, 3, 1, player2_Pit4);\n\t\tPit player2_Pit2 = new Pit(this.player2Name, 2, 1, player2_Pit3);\n\t\tPit player2_Pit1 = new Pit(this.player2Name, 1, 1, player2_Pit2);\n\n\t\t// Complete the board by connecting mancala with player pits\n\t\tPlayer1Mancala.setNextPit(player2_Pit1);\n\t\tPlayer2Mancala.setNextPit(player1_Pit1);\n\n\t\t//Initialize the Player1 board \n\t\tthis.Player1Pits[0] = player1_Pit1;\n\t\tthis.Player1Pits[1] = player1_Pit2;\n\t\tthis.Player1Pits[2] = player1_Pit3;\n\t\tthis.Player1Pits[3] = player1_Pit4;\n\t\tthis.Player1Pits[4] = player1_Pit5;\n\t\tthis.Player1Pits[5] = player1_Pit6;\n\n\t\t// Initialize the Player2 board \n\t\tthis.Player2Pits[0] = player2_Pit1;\n\t\tthis.Player2Pits[1] = player2_Pit2;\n\t\tthis.Player2Pits[2] = player2_Pit3;\n\t\tthis.Player2Pits[3] = player2_Pit4;\n\t\tthis.Player2Pits[4] = player2_Pit5;\n\t\tthis.Player2Pits[5] = player2_Pit6;\n\t}", "private void initialGame() {\n Display display = this.getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n GameUtils.mWidth = size.x;\n GameUtils.mHeight = size.y;\n GameUtils.frameWidth = (int)(GameUtils.mWidth / 2.5);\n GameUtils.frameHeight = GameUtils.frameWidth;\n GameUtils.dx = GameUtils.mWidth / 120;\n GameUtils.maxVelX = GameUtils.mHeight / 15;\n GameUtils.maxVelY = GameUtils.mHeight / 8;\n\n // Bitmap\n GameUtils.bitmapPika = BitmapFactory.decodeResource(getResources(),\n R.drawable.pika_sprite_8_384);\n GameUtils.bitmapPika = Bitmap.createScaledBitmap(GameUtils.bitmapPika,\n GameUtils.frameWidth * GameUtils.frameCount, GameUtils.frameHeight, false);\n GameUtils.apple = BitmapFactory.decodeResource(getResources(), R.drawable.apple);\n GameUtils.banana = BitmapFactory.decodeResource(getResources(), R.drawable.banana);\n GameUtils.coke = BitmapFactory.decodeResource(getResources(), R.drawable.coke);\n\n GameUtils.bitmapRestart = BitmapFactory.decodeResource(getResources(), R.drawable.restart);\n GameUtils.bitmapRestart = Bitmap.createScaledBitmap(GameUtils.bitmapRestart,\n GameUtils.mWidth / 12, GameUtils.mWidth / 12, false);\n GameUtils.bitmapPause = BitmapFactory.decodeResource(getResources(), R.drawable.pause);\n GameUtils.bitmapPause = Bitmap.createScaledBitmap(GameUtils.bitmapPause,\n GameUtils.mWidth / 15, GameUtils.mWidth / 15, false);\n\n // Game Data\n GameUtils.WIN = true;\n GameUtils.score = 0;\n GameUtils.apples = 0;\n GameUtils.bananas = 0;\n GameUtils.cokes = 0;\n GameUtils.jumps = 0;\n GameUtils.totalSec = GameUtils.totalTime;\n GameUtils.visibleFruit = 0;\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1078, 672, 1); \n preparePlayer1();\n preparePlayer2();\n prepareTitle();\n //playmusic();\n }", "public void initUI(){\n\n playerSprite = new PlayerSprite(context, 150 * MainView.SCALE_WIDTH, background.getBottom(), 0.3f * MainView.SCALE_WIDTH, 0.30f * MainView.SCALE_WIDTH);\n enemySprite = new EnemySprite(context, (MainView.WIDTH - 150) * MainView.SCALE_WIDTH, background.getBottom(), 0.3f * MainView.SCALE_WIDTH, 0.30f * MainView.SCALE_WIDTH);\n if(encountered)\n enemySprite.setEnemySprite(enemy.getId());\n\n /*\n create header here\n */\n playerStatus = new PlayerStatus(context,player, 0, background.getBottom());\n }", "public void atBattleStartPreDraw() {\n\n this.flash();\n ArrayList<Integer> orbs = new ArrayList();\n orbs.add(1);\n orbs.add(2);\n orbs.add(3);\n orbs.add(4);\n\n for (int i = 0; i < 2; i++) {\n\n Integer o = orbs.get(AbstractDungeon.cardRng.random(orbs.size() - 1));\n\n switch (o) {\n case 1:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new AttackSlime(), false, true));\n break;\n case 2:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new ShieldSlime(), false, true));\n break;\n case 3:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new SlimingSlime(), false, true));\n break;\n case 4:\n AbstractDungeon.actionManager.addToBottom(new SlimeSpawnAction(new PoisonSlime(), false, true));\n break;\n }\n }\n\n com.megacrit.cardcrawl.dungeons.AbstractDungeon.actionManager.addToBottom(new com.megacrit.cardcrawl.actions.defect.IncreaseMaxOrbAction(1));\n AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(AbstractDungeon.player, AbstractDungeon.player, new PotencyPower(AbstractDungeon.player, AbstractDungeon.player, 1), 1));\n\n\n }", "public abstract void initPlayboard(int size);", "private void initialScreen() {\r\n\t\t// Clear the screen\r\n\t\tclear();\r\n\r\n\t\t// Place four asteroids\r\n\t\tplaceAsteroids();\r\n\r\n\t\t// Place the ship\r\n\t\tplaceShip();\r\n\r\n\t\t// Reset statistics\r\n\t\tlives = 3;\r\n\t\tdisplay.setLives(lives);\r\n\t\tnumLevel = 1;\r\n\t\tdisplay.setLevel(numLevel);\r\n\t\tdisplay.setScore(0);\r\n\t\tspeed = 3;\r\n\r\n\t\t// Start listening to events\r\n\t\tdisplay.removeKeyListener(this);\r\n\t\tdisplay.addKeyListener(this);\r\n\r\n\t\t// Give focus to the game screen\r\n\t\tdisplay.requestFocusInWindow();\r\n\t}", "private void prepare()\n {\n Block block = new Block(10);\n addObject(block,372,150);\n Wall wall = new Wall();\n addObject(wall,52,167);\n Wall wall2 = new Wall();\n addObject(wall2,160,167);\n Wall wall3 = new Wall();\n addObject(wall3,550,167);\n Wall wall4 = new Wall();\n addObject(wall4,650,167);\n Wall wall5 = new Wall();\n addObject(wall5,750,167);\n block.setLocation(306,171);\n Robot robot = new Robot();\n addObject(robot,48,51);\n Pizza pizza = new Pizza();\n addObject(pizza,550,60);\n Pizza pizza2 = new Pizza();\n addObject(pizza2,727,53);\n Pizza pizza3 = new Pizza();\n addObject(pizza3,364,303);\n Pizza pizza4 = new Pizza();\n addObject(pizza4,224,400);\n Pizza pizza5 = new Pizza();\n addObject(pizza5,622,395);\n ScorePanel scorePanel = new ScorePanel();\n addObject(scorePanel,106,525);\n Home home = new Home();\n addObject(home,717,521);\n\n block.setLocation(344,173);\n pizza3.setLocation(394,297);\n Pizza pizza6 = new Pizza();\n addObject(pizza6,711,265);\n Pizza pizza7 = new Pizza();\n addObject(pizza7,68,276);\n\n }", "public void initialise_new_game() {\n\n data.read_from_file(\"maxus2.txt\");\n\n mySound.initialise();\n\n pacman.init();\n ghost.init();\n\n score.initialise();\n }", "private void setupPhase() {\n ClickObserver.getInstance().setTerrainFlag(\"Setup: SelectStartTerrain\");\n for (final Player p : playerList) {\n \t\n this.player = p;\n player.flipAllUp();\n ClickObserver.getInstance().setActivePlayer(this.player);\n pause();\n \n // Cover all terrains, uncover starting pos ones\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getRackGui().setOwner(player);\n \tBoard.applyCovers();\n \tfor (Coord spot : startingPos) {\n \t\tif (!Board.getTerrainWithCoord(spot).isOccupied())\n \t\t\tBoard.getTerrainWithCoord(spot).uncover();\n \t}\n GUI.getHelpText().setText(\"Setup Phase: \" + p.getName() \n + \", select a valid hex to start your kingdom.\");\n }\n });\n while( isPaused ){\n int num = p.getHexesOwned().size();\n if( num == 1 ){\n unPause();\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \tPlayerBoard.getInstance().updateGold(player);\n }\n });\n System.out.println(\"done\");\n }\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n player.flipAllDown();\n }\n pause();\n \n // Now that all players have selected starting spots, flip over all terrains\n // *Note: Not sure I understand the rules with regards to this, but I think this is right\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \t Board.showTerrains();\n Board.removeBadWaters();\n }\n });\n while( isPaused ){\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n \n // Check if player has at least two land hexes around starting spot\n for( final Player p : playerList ) {\n this.player = p;\n\n player.flipAllUp();\n ClickObserver.getInstance().setActivePlayer(this.player);\n pause();\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getHelpText().setText(p.getName() \n + \", select a water hex to replace with from deck\");\n Board.removeBadAdjWaters();\n }\n });\n while( isPaused ){\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n\n player.flipAllDown();\n }\n \n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \t\t\tTileDeck.getInstance().slideOut();\n }\n });\n\n \n // next prompt each player to select an adjacent hex\n ClickObserver.getInstance().setTerrainFlag(\"Setup: SelectTerrain\");\n // loop 2 times so each player adds 2 more hexes\n for( int i=0; i<2; i++ ){\n for( final Player p : playerList ) {\n this.player = p;\n\n player.flipAllUp();\n ClickObserver.getInstance().setActivePlayer(this.player);\n pause();\n \n final ArrayList<Terrain> ownedHexes = player.getHexesOwned();\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n Board.applyCovers();\n }\n });\n \tfor (Terrain t1 : ownedHexes) {\n \t\tIterator<Coord> keySetIterator = Board.getTerrains().keySet().iterator();\n \twhile(keySetIterator.hasNext()) {\n \t\tCoord key = keySetIterator.next();\n \t\tfinal Terrain t2 = Board.getTerrains().get(key);\n \t\tif (t2.compareTo(t1) == 1 && !t2.isOccupied() && !t2.getType().equals(\"SEA\")) {\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \t\t\tt2.uncover();\n }\n });\n \t\t}\n \t}\n \t}\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getRackGui().setOwner(player);\n GUI.getHelpText().setText(\"Setup Phase: \" + p.getName() \n + \", select an adjacent hex to add to your kingdom.\");\n }\n });\n // forces the GameLoop thread to wait until unpaused\n while( isPaused ){\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n player.flipAllDown();\n }\n }\n // prompt each player to place their first tower\n ClickObserver.getInstance().setTerrainFlag(\"Construction: ConstructFort\");\n for( final Player p : playerList ) {\n this.player = p;\n \n player.flipAllUp();\n ClickObserver.getInstance().setActivePlayer(this.player);\n pause();\n \n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n Board.applyCovers();\n GUI.getRackGui().setOwner(player);\n GUI.getHelpText().setText(\"Setup Phase: \" + p.getName() \n + \", select one of your tiles to place a tower.\");\n }\n });\n \n // sleeps to avoid null pointer (runLater is called before player.getHexesOwned() below)\n try { Thread.sleep(50); } catch( Exception e ){ return; }\n ArrayList<Terrain> ownedHexes = player.getHexesOwned();\n \n for (final Terrain t : ownedHexes) {\n \t\n \tif (t.getOwner().getName().equals(player.getName())) { \n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \t\tt.uncover();\n }\n });\n \t}\n }\n while( isPaused ){\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n player.flipAllDown();\n }\n // allow players to add some or all things to their tiles.\n ClickObserver.getInstance().setTerrainFlag(\"RecruitingThings: PlaceThings\");\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(false);\n }\n });\n for (final Player p : playerList) {\n this.player = p;\n player.flipAllUp();\n doneClicked = false;\n ClickObserver.getInstance().setClickedTerrain(p.getHexesOwned().get(2));\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \tClickObserver.getInstance().whenTerrainClicked();\n GUI.getRackGui().setOwner(player);\n Board.applyCovers();\n GUI.getHelpText().setText(\"Setup Phase: \" + p.getName()\n + \", place some or all of your things on a tile you own.\");\n }\n });\n ClickObserver.getInstance().setActivePlayer(this.player);\n pause();\n ArrayList<Terrain> ownedHexes = player.getHexesOwned();\n for (final Terrain t : ownedHexes) {\n \tif (t.getOwner().getName().equals(player.getName())) {\n\t Platform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tt.uncover();\n\t }\n\t });\n \t}\n }\n \n while (isPaused) {\n try { Thread.sleep(100); } catch(Exception e) { return; }\n }\n player.flipAllDown();\n }\n ClickObserver.getInstance().setTerrainFlag(\"\");\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n Board.removeCovers();\n }\n });\n }", "public void init() {\n\t\tGRect background = new GRect(APPLICATION_WIDTH, APPLICATION_HEIGHT);\n\t\tbackground.setFilled(true);\n\t\tbackground.setFillColor(Color.LIGHT_GRAY);\n\t\tadd(background);\n\t\t\n\t\ttopText = new GLabel(\"Welcome to the slot machine!\");\n\t\tmidText = new GLabel(\"You now have $50.\");\n\t\tbotText = new GLabel(\"Click to play\");\n\t\ttopText.setFont(\"Serif-24\");\n\t\tmidText.setFont(\"Serif-24\");\n\t\tbotText.setFont(\"Serif-24\");\n\t\tadd(topText, 100, 250);\n\t\tadd(midText, 100, 280);\n\t\tadd(botText, 100, 310);\n\t\t\n\t\tslotBox1 = new GImage(\"empty.png\");;\n\t\tslotBox2 = new GImage(\"empty.png\");\n\t\tslotBox3 = new GImage(\"empty.png\");\n\t\tadd(slotBox1, 100, 100);\n\t\tadd(slotBox2, 250, 100);\n\t\tadd(slotBox3, 400, 100);\n\t\t\n\t\t\n\t\t\n\t\twhile (!gameOver()) {\n\t\t\twaitForClick();\n\t\t\tremoveAll();\n\t\t\tadd(background);\n\t\t\tplayGame();\n\t\t}\n\t}", "@Override\r\n public void init() {\n Image bgImage = assets().getImage(\"images/bg.png\");\r\n ImageLayer bgLayer = graphics().createImageLayer(bgImage);\r\n graphics().rootLayer().add(bgLayer);\r\n\r\n // Create tiles\r\n tiles = new int[BOARD_MAX_WIDTH][BOARD_MAX_HEIGHT];\r\n printTiles();\r\n\r\n // Place mines at random positions\r\n int placedMines = 0;\r\n Random r = new Random();\r\n while (placedMines < MINES) {\r\n int row = r.nextInt(BOARD_MAX_WIDTH);\r\n int col = r.nextInt(BOARD_MAX_HEIGHT);\r\n if (tiles[row][col] == TILE_EMPTY) {\r\n tiles[row][col] = TILE_MINE;\r\n placedMines++;\r\n }\r\n }\r\n printTiles();\r\n\r\n // Count number of mines around blank tiles\r\n for (int row = 0; row < BOARD_MAX_WIDTH; row++) {\r\n for (int col = 0; col < BOARD_MAX_WIDTH; col++) {\r\n // Check surrounding tiles if mine\r\n if (tiles[row][col] == TILE_MINE) {\r\n for (int rowCheck = -1; rowCheck <= 1; rowCheck++) {\r\n for (int colCheck = -1; colCheck <= 1; colCheck++) {\r\n if (tileExistAndNotMine(row+rowCheck, col+colCheck)) {\r\n tiles[row+rowCheck][col+colCheck]++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n printTiles();\r\n\r\n // Create tile map\r\n Map<Integer, TileType> tileMap = new HashMap<Integer, TileType>();\r\n tileMap.put(0, TileType.EMPTY);\r\n tileMap.put(1, TileType.ONE);\r\n tileMap.put(2, TileType.TWO);\r\n tileMap.put(3, TileType.THREE);\r\n tileMap.put(4, TileType.FOUR);\r\n tileMap.put(5, TileType.FIVE);\r\n tileMap.put(6, TileType.SIX);\r\n tileMap.put(7, TileType.SEVEN);\r\n tileMap.put(8, TileType.EIGHT);\r\n tileMap.put(9, TileType.MINE);\r\n\r\n // Create a GroupLayer to hold the sprites\r\n GroupLayer groupLayer = graphics().createGroupLayer();\r\n graphics().rootLayer().add(groupLayer);\r\n\r\n // Create graphic tiles\r\n tileList = new ArrayList<Tile>();\r\n for (int row = 0; row < BOARD_MAX_WIDTH; row++) {\r\n for (int col = 0; col < BOARD_MAX_WIDTH; col++) {\r\n Tile tile = new Tile(groupLayer, col*Tile.SIZE, row*Tile.SIZE, tileMap.get(tiles[row][col]), row, col);\r\n tileList.add(tile);\r\n }\r\n }\r\n\r\n // Timer text\r\n CanvasImage canvasImage = graphics().createImage(160, 70);\r\n timerLabel = canvasImage.canvas();\r\n ImageLayer countDownLayer = graphics().createImageLayer(canvasImage);\r\n countDownLayer.setTranslation(180, 10);\r\n graphics().rootLayer().add(countDownLayer);\r\n\r\n // Cleared tiles text\r\n CanvasImage clearedTilesImage = graphics().createImage(160, 70);\r\n clearedTilesLabel = clearedTilesImage.canvas();\r\n ImageLayer clearedTilesLayer = graphics().createImageLayer(clearedTilesImage);\r\n clearedTilesLayer.setTranslation(180, 30);\r\n graphics().rootLayer().add(clearedTilesLayer);\r\n updateClearedTiles();\r\n }", "public void initGame() {\n // Create a new deck, with the right numbers of cards and shuffle it.\n this.deck.clear();\n this.deck.init();\n\n // Init all the players.\n for (Player player : this.players.values()) {\n player.init();\n }\n\n // Give START_NUM_CARD to each players.\n for (int i = 0; i < START_NUM_CARD; i++) {\n for (Player player : this.players.values()) {\n player.addCard(this.deck.pop());\n }\n }\n\n // Reset vars\n this.table.clear();\n this.onTableAmount = 0;\n this.numTurns = 0;\n this.newTurn = false;\n this.numPlayerInTurn = 0;\n this.currentPlayer = this.startingGamePlayer;\n\n // Subtract the blind to each players.\n this.players.get(this.currentPlayer).addToTable(this.currentSmallBlind);\n this.addOnTableAmount(this.currentSmallBlind);\n for (int i = 0; i < this.playerAmount; i++) {\n if (!(i == this.currentPlayer)) {\n this.players.get(i).addToTable(this.currentSmallBlind * 2);\n this.addOnTableAmount(this.currentSmallBlind * 2);\n }\n }\n this.currentHighestPlayerBet = currentSmallBlind * 2;\n\n // Add the first 3 cards.\n for (int i = 0; i < 3; i++) {\n this.table.push(this.deck.pop());\n }\n\n // Increment numTurns\n this.numTurns++;\n this.numGame++;\n }", "private void initialParameters()\n\t{\n\t\tasteroidList = new ArrayList<Asteroid>();\n\t\tfor(int i = 0 ; i < INITIAL_ASTEROIDS ; i++)\n\t\t\tasteroidList.add(new Asteroid(getRandomLocationX(), getRandomLocationY(), SCREEN_WIDTH, SCREEN_HEIGHT));\n\t\t\n\t\t//========== Game Status ===========\n\t\trunning \t= true;\n\t\tisWin \t\t= false;\n\t\tisGameOver \t= false;\n\t\t\n\t\t//========== Game Craft ===========\t\t\n\t\tcraft = new Craft(SCREEN_WIDTH/2, SCREEN_HEIGHT/2, SCREEN_WIDTH, SCREEN_HEIGHT);\n\t}", "void defaultsetup(int phi) \n {// The Images should be loded here... Also add labels here\n System.out.println(\"IN DEFAULT SETUP..\");\n if( phi == 0) \n whiteToPlay = true;\n else if (phi == 1) \n whiteToPlay = false;\n // White Chess Pieces\n whiteHorse1.position = 1; whiteHorse1.color = 0;\n whiteHorse2.position = 6; whiteHorse2.color = 0;\n whiteQueen.position = 3; whiteQueen.color = 0;\n whiteKing.position =4 ; whiteKing.color = 0;\n whiteCastle1.position = 0; whiteCastle1.color = 0;\n whiteCastle2.position = 7; whiteCastle2.color = 0;\n whiteBishop1.position = 2; whiteBishop1.color = 0;\n whiteBishop2.position = 5; whiteBishop2.color = 0;\n int y = 8;\n for(int x = 0 ; x < 8; x++)\n {\n whitePawn[x] = new pawn();\n whitePawn[x].position = 8+x;\n whitePawn[x].color = 0;\n }\n //Black Chess Pieces\n blackHorse1.position = 57; blackHorse1.color = 1;\n blackHorse2.position = 62; blackHorse2.color = 1;\n blackQueen.position = 59; blackQueen.color = 1;\n blackKing.position = 60; blackKing.color = 1;\n blackCastle1.position = 56;blackCastle1.color = 1;\n blackCastle2.position = 63;blackCastle2.color = 1;\n blackBishop1.position = 58;blackBishop1.color = 1;\n blackBishop2.position = 61;blackBishop2.color = 1;\n y = 8;\n for(int x = 0 ; x < 8; x++)\n {\n blackPawn[x] = new pawn();\n blackPawn[x].position = 48+x;\n blackPawn[x].color = 1;\n }\n \n this.updatePositions();\n }", "public static void boardInit() {\n ArrayList<Piece> white_piece_list = new ArrayList<>();\n ArrayList<Piece> black_piece_list = new ArrayList<>();\n ArrayList<Piece> piece_array = PieceFactory.createPieces();\n for(Piece p : piece_array)\n {\n if(p.getColor())\n {\n black_piece_list.add(p);\n }\n else\n {\n white_piece_list.add(p);\n }\n }\n white_player.setpieceList(white_piece_list);\n white_player.setKingXYCoords(PieceFactory.KING_INITIAL_X, PieceFactory.INITAL_Y_COORD_WHITE_PLAYER_OTHER);\n black_player.setpieceList(black_piece_list);\n black_player.setKingXYCoords(PieceFactory.KING_INITIAL_X, PieceFactory.INITAL_Y_COORD_WHITE_PLAYER_OTHER + PieceFactory.DIST_BETWEEN_PIECES);\n }", "@Override\n public void initialisePlayer(World world) {\n // To be implemented.\n \tthis.numRow = world.numRow;\n \tthis.numCol = world.numColumn;\n \tthis.world = world;\n \tthis.enemyShots = new ArrayList<Coordinate>();\n \t/*this.shots = this.world.shots;*/\n \tthis.shipLocations = this.world.shipLocations;\n \tthis.guesses = new ArrayList<Guess>();\n \tthis.parityList = new ArrayList<Coordinate>();\n \ttargeting = false;\n \tthis.hitGuesses = new ArrayList<Guess>();\n \tfillParityList();\n \t\n \n \t\n \t\n }", "public void beginTakingPlayers() {\n currentQuestionIndex = 0;\n setGameState(GameState.AWAITING_PLAYERS);\n }", "private void startUpPhase()\n\t{\n\t\tmap.distributeCountries(); /* Randomly split the countries between the players */\n\t\tArrayList<Player> remainingPlayers = new ArrayList<Player>(map.players);\n\t\t\n\t\tdo \n\t\t{\n\t\t\tIterator<Player> i = remainingPlayers.iterator();\n\t\t\t\n\t\t\twhile (i.hasNext()) \n\t\t\t{\n\t\t\t\tPlayer p = i.next();\n\t\t\t\tif(p.getArmies() == 0) \n\t\t\t\t{\n\t\t\t\t\ti.remove();\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tp.placeOneArmy();\n\t\t\t\t}\n\t\t\t}\n\t\t}while(remainingPlayers.size() != 0);\n\t}", "private void init()\r\n\t{\r\n\t\ttry {\r\n\t\t\tThread.currentThread().getContextClassLoader().getResourceAsStream(\"d\").read(board);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tzp = 0;\r\n\t\txp = 0.5f;\r\n\t\typ = 0.5f;\r\n\t\tvx = 0;\r\n\t\tvy = 0;\r\n\t\tstarted = false;\r\n\t\tmsg = \"PRESS ENTER\";\r\n\t\tint[] levelTimes = {80,80,99,99,99};\r\n\t\ttimers[0] = levelTimes[l]*1000;\r\n\t\ttoggles = 0;\r\n\t\t\r\n\t\tif (complete) {\r\n\t\t\tl++;\r\n\t\t\t// LEVELS\r\n\t\t\tif (l >= 5) {\r\n\t\t\t\tl = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//ports.clear();\r\n\t\tports[99][0] = 0;\r\n\t\tfor (int x=0;x<30;x++) {\r\n\t\t\tfor (int y=0;y<30;y++) {\r\n\t\t\t\tint tile = getTile(x,y);\r\n\t\t\t\t\r\n\t\t\t\tif (tile == 3) {\r\n\t\t\t\t\txp = x+0.5;\r\n\t\t\t\t\typ = y+0.5;\r\n\t\t\t\t}\r\n\t\t\t\tif (tile == 14) {\r\n\t\t\t\t\ttoggles++;\r\n\t\t\t\t}\r\n\t\t\t\tif (tile == 12) {\r\n\t\t\t\t\tports[ports[99][0]][0] = x;\r\n\t\t\t\t\tports[ports[99][0]][1] = y;\r\n\t\t\t\t\tports[99][0]++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tcomplete = false;\r\n\t}", "public void play() \n { \n \n createRooms();\n createCharacters();\n createItem();\n printWelcome();\n player = new Player(\"player\");\n Boolean exam;\n exam = false;\n /* player.addItem(necklace_red);\n player.addItem(halberd);\n player.addItem(set_of_forks_and_knives);\n player.addItem(candelar);\n player.addItem(potion6HP);\n player.addItem(bedroomkey);*/\n \n // Step 1 : start in the poolroom //\n Boolean step1Finish;\n Boolean step2Finish;\n Boolean step3Finish;\n Boolean step4Finish;\n Boolean step5Finish;\n Boolean step6Finish;\n Boolean step7Finish;\n Boolean step8Finish;\n Boolean step9Finish;\n Boolean step10Finish;\n Boolean step11Finish;\n step1Finish = false;\n step2Finish = false;\n step3Finish = false;\n step4Finish = false;\n step5Finish = false;\n step6Finish = false;\n step7Finish = false;\n step8Finish = false;\n step9Finish = false;\n step10Finish = false;\n step11Finish = false;\n \n // All the characters are in the poolroom and the exit opens only after speak with all the characters //\n Boolean canSpeak; // player can speak with PNG\n Boolean speak_with_mr_Taylor, speak_with_ms_Taylor, speak_with_ms_Cunningham, speak_with_chambermaid, speak_with_bob_Taylor, speak_with_mr_Cunningham;\n Boolean speak_with_ms_Wellington, speak_with_valet, speak_with_caretaker, speak_with_mr_Wellington, speak_with_nina_Taylor;\n Boolean find_bob_Taylor;\n Boolean toys_not_front_of_door = null;\n Boolean firstEnter;\n firstEnter = true;\n \n canSpeak = false;\n speak_with_mr_Taylor = false;\n speak_with_ms_Taylor = false;\n speak_with_ms_Cunningham = false;\n speak_with_chambermaid = false;\n speak_with_bob_Taylor = false;\n speak_with_mr_Cunningham = false;\n speak_with_ms_Wellington = false;\n speak_with_valet = false;\n speak_with_caretaker = false;\n speak_with_mr_Wellington = false;\n speak_with_nina_Taylor = false;\n\n Boolean can_exam_canvas;\n can_exam_canvas = false;\n Boolean find_bedroom_key;\n find_bedroom_key = false;\n \n int safe_code, essai_code;\n safe_code = 9515;\n \n if (exam)\n {\n System.out.println(\"You are in the poolroom. \\n\"\n + \"Mr Taylor was founded by the Chambermaid this morning when she came to clean the poolroom. Her scream attracted everyone. \\n\"\n + \"You notice that it is missing a pool cue and you find a strange red necklace nearby the pool. \\n\"\n + \"You examine the dead body and you notice a circular wound with the same diameter of a pool cue and some splinters of wood at the bottom of the neck. \\n\"\n + \"Take advantage that everyone is here to question them.\");\n canSpeak = true;\n exam = false;\n System.out.println(\"There are a lot of people in this room. \\n\" \n +\" Nina Taylor the master daughter has long brown hair. Sha has a beautiful blue dress. \\n\"\n +\" Bob Taylor is the little son of Mr Taylor. He seems to be really nice and kind. But he is really sad. \\n\"\n +\" Emma the Chambermaid is an old woman. She has been working for the family for a very long time. She has a black dress and a white pinny.\\n\" \n +\" Mr Cunningham is a grey-haired man with a beige square suit and a lie. \\n\"\n +\" Mr Taylor had dark blond hair and a mustache. He had nice black tuxedo. \\n\"\n +\" Mr Wellinghton is a brown-haired man with a brown square suit and a lie. \\n\"\n +\" Ms Cunnigham is a grey-blond-haired woman with a pink dress. \\n\"\n +\" Ms Taylor seems to be really sad. Sha has dark-brown hair and a long claret dress. \\n\"\n +\" Ms Wellinghton is a redhead-haired woman with a long light green dress. \\n \"\n +\" Alfred the Valet has curly blond hair. He seems to be bother. \\n\"\n +\" Sam the caretaker is a black-haired black man. \");\n }\n if (speak_with_mr_Taylor && speak_with_ms_Taylor && speak_with_ms_Cunningham && speak_with_chambermaid && speak_with_bob_Taylor && speak_with_mr_Cunningham\n && speak_with_ms_Wellington && speak_with_valet && speak_with_caretaker && speak_with_mr_Wellington && speak_with_nina_Taylor && exam)\n {\n canSpeak = false;\n step1Finish = true;\n poolroom.modifyExit(\"east\");\n speak_with_mr_Taylor = false;\n speak_with_ms_Taylor = false;\n speak_with_ms_Cunningham = false;\n speak_with_chambermaid = false;\n speak_with_bob_Taylor = false;\n speak_with_mr_Cunningham = false;\n speak_with_ms_Wellington = false;\n speak_with_valet = false;\n speak_with_caretaker = false;\n speak_with_mr_Wellington = false;\n speak_with_nina_Taylor = false;\n }\n\n // Step 2 : banqueting hall //\n if (step1Finish)\n {\n bob_Taylor.setRoom(cellar);\n nina_Taylor.setRoom(banquetinghall);\n ms_Cunningham.setRoom(dancingroom);\n if (currentRoom == banquetinghall)\n {\n if (firstEnter)\n { \n toys_not_front_of_door = false; //false = toys front of the door // true = toys not front of the door\n find_bob_Taylor = false;\n System.out.println(\" When you opened the poolroom door, you shut on a toy so you lose one HealthPoint\");\n player.setHP(player.getHP() - 1);\n firstEnter = false;\n }\n if (exam)\n {\n System.out.println(\"You cannot open the dancing room door now because there are a lot of toys. \\n\"\n + \"Nina Taylor is next to the toys and you can speak with her. \");\n canSpeak = true;\n exam = false;\n }\n if (speak_with_nina_Taylor)\n {\n nina_Taylor.setText(\"These are my brother toys. Find him to tidy his toys\");\n speak_with_nina_Taylor = false;\n canSpeak = false;\n }\n }\n else if (currentRoom == hall)\n {\n // Step 2 bis : Hall //\n if (exam)\n {\n System.out.println(\" You are in the hall but there is nobody here. \");\n exam = false;\n }\n }\n else if (currentRoom == poolroom)\n {\n if (exam)\n {\n System.out.println(\"You are in the poolroom. Mr Taylor's body was removed. All the peopple are gone. \\n\"\n + \"You do not want to stay in this room. The atmosphere has become bad. You want to leave.\");\n exam = false;\n }\n }\n else if (currentRoom == kitchen)\n {\n if (exam)\n {\n System.out.println(\"This is the kitchen, Bob Taylor is not here. \\n\"\n + \"A set of forks and knives is in one of the cupboards of the kitchen.\");\n exam = false;\n // Recupère arme\n }\n }\n else if (currentRoom == cellar)\n {\n if (exam)\n {\n System.out.println(\"You found Bob Taylor in the back of the cellar\");\n find_bob_Taylor = true;\n exam = false;\n canSpeak = true;\n }\n if (speak_with_bob_Taylor)\n {\n System.out.println(\"You convince Bob to tidy up his toys.\");\n toys_not_front_of_door = true;\n canSpeak = false;\n speak_with_bob_Taylor = false;\n }\n if (toys_not_front_of_door) \n {\n banquetinghall.modifyExit(\"south\");\n step2Finish = true;\n }\n }\n if (step2Finish)\n {\n if (currentRoom == dancingroom)\n {\n if (firstEnter)\n {\n if (exam)\n {\n System.out.println(\"You are in an extraordinary dancing room. You perceive a gramophone on a commode. You see a beautiful candlestick and a gramophone. \\n\"\n + \"Strangely here is no disk on the gramophone. You see Ms Cunningham beside it. She seems to want to talk with you.\");\n exam = false;\n canSpeak = true;\n }\n if (speak_with_ms_Cunningham)\n {\n ms_Cunningham.setText(\"Oh, good morning ! I am happy to see you. Unlike the dark atmosphere of the mansion it is a beautiful weather outside. \\n\"\n + \"I hope your investigation is progressing well. I am scared that the murderer is still at liberty. I cannot sleep properly since the night of the murder. Ah ! I know, you are going to dance with me. It will make me think of something other than this dark situation. \\n\"\n + \"Sorry I will walk on your feet. Do I hurt you not too much ? I can be very clumsy.Oh, good morning ! I am happy to see you. Unlike the dark atmosphere of the mansion it is a beautiful weather outside. \\n\"\n + \"I hope your investigation is progressing well. I am scared that the murderer is still at liberty. I cannot sleep properly since the night of the murder. Ah ! I know, you are going to dance with me. It will make me think of something other than this dark situation. \\n\"\n + \"Sorry I will walk on your feet. Do I hurt you not too much ? I can be very clumsy.\");\n System.out.println(\"You spoke and danced a lot of time with Ms Cunningham. Then you are very tired so you lose one healthpoint\");\n player.setHP(player.getHP() - 1);\n canSpeak = false;\n speak_with_ms_Cunningham = false;\n }\n firstEnter = false;\n } \n if (exam)\n {\n {\n System.out.println(\"You are in an extraordinary dancing room. You perceive a gramophone on a commode. You see a beautiful candlestick and a gramophone. \\n\"\n + \"Strangely here is no disk on the gramophone. You see Ms Cunningham beside it.\");\n exam = false;\n canSpeak = true; \n }\n if (speak_with_ms_Cunningham)\n {\n ms_Cunningham.setText(\"Thank you. I feel better thanks to you.\");\n canSpeak = false;\n speak_with_ms_Cunningham = false;\n }\n }\n }\n else if (currentRoom == livingroom)\n {\n exam = false;\n System.out.println(\"You ride the last step and arrive in the living room. A little green ghost appears in the room. He seems not to be kind. \");\n if (ghost.getHP() <=0) \n {\n livingroom.modifyExit(\"north\");\n livingroom.modifyExit(\"west\");\n exam = true;\n if (exam)\n {\n System.out.println(\"There is no useful object and there is nobody here. \"); \n step3Finish = true;\n }\n }\n }\n \n if (step3Finish)\n {\n if (currentRoom == library)\n {\n if (exam)\n {\n System.out.println(\" A library with a lot of books is behind the door you just pushed. \\n\"\n + \"You see a big painting which depicts the same library where you are. There is just a difference between them. \\n\"\n + \"On the painting, a gramophone is pictured on a sideboard. The gramophone on the painting curiously looks like the gramophone in the dancing room. \\n\"\n + \"When you inspect the sideboard on the real library you see some wear marks as if an object was previously placed on it. \\n\"\n + \"You meet the chambermaid wanting to leave the library. She seems to want to tell you something but do not dare to approach you.\");\n canSpeak = true;\n exam = false;\n }\n if (speak_with_chambermaid)\n {\n chambermaid.setText(\"I saw Nina Taylor go to the gardener hut some nights. I do not know what she is doing there. \");\n canSpeak = false;\n speak_with_chambermaid = false;\n \n }\n }\n \n else if (currentRoom == corridor)\n {\n System.out.println(\"There is a statut with a weapon in this corridor. You can take it weapon if you want. \");\n // recupere arme\n Boolean fight; // this variable will be initialize with the fight\n if (fight)\n {\n if (exam)\n {\n System.out.println(\" You are in a corridor. You see four doors. Only two are opened.\");\n exam = false;\n step4Finish = true;\n }\n }\n }\n if (step4Finish)\n {\n if (currentRoom == bathroom)\n {\n if (exam)\n {\n System.out.println(\" You enter in the bathroom and you see the chambermaid treating the valet's arm. \\n\"\n + \" The wound looks like a rodent bite but it is much bigger than a rat. It is strange because Mr Taylor was allergic to animals. \\n\"\n + \"You notice that there is a potion on the furniture next to the chambermaid. She notices that you are injured. \\n\"\n + \"She signals to you that you can take it. \"); \n //permet de prendre la potion\n exam = false;\n }\n //ajout potion possible pour le joueur\n\n }\n if (currentRoom == guestbedroom)\n {\n if (exam)\n {\n System.out.println(\" You are in the guest bedroom. Today this bedroom is Mr&Ms Cunnigham's bedroom. Mr Cunnigham is in his bedrrom.\");\n mr_Cunningham.setRoom(guestbedroom);\n ms_Cunningham.setText(\"It is strange, last time this canvas was not here.\");\n can_exam_canvas = true;\n if (exam && can_exam_canvas)\n {\n System.out.println(\" You find a key behind the canvas and you take it.\");\n find_bedroom_key = true;\n player.addItem(bedroomkey);\n } \n exam = false;\n }\n }\n \n if (step5Finish)\n {\n if (find_bedroom_key)\n {\n corridor.modifyExit(\"south\");\n }\n if (currentRoom == bedroom)\n {\n if (exam)\n {\n System.out.println(\"You are in the host bedroom. You see a big safe with a four number code. Ms Taylor is in her room.\");\n ms_Taylor.setText(\"Oh no ! I am forgetting the number code ! Please, ask to my daughter, my guests and my employees. I gave to several of them a piece of this code. \");\n \n if (speak_with_ms_Taylor)\n {\n nina_Taylor.setRoom(dancingroom);\n nina_Taylor.setText(\"Bob Taylor has fallen into a 10-meter deep well and is trying to pull it up. \\n \" +\n \"Each day it rises 3 meters and slides 2 meters during the night.\\n\" +\n \"How many days will it take to get to the surface?\");\n ms_Wellington.setRoom(library);\n ms_Wellington.setText(\"In a girl group\\n\" +\n \" 70% wear a blue sweater\\n\" +\n \" 75% wear blue pants\\n\" +\n \" 85% wear a blue hat\\n\" +\n \" 85% wear a blue coat\\n\" +\n \"What is the minimum percentage of girls wearing only blue clothes?\");\n \n bob_Taylor.setRoom(library);\n bob_Taylor.setText(\"I saw my sister and my father arguing before his death.\");\n \n mr_Cunningham.setRoom(poolroom);\n mr_Cunningham.setText(\"David is 10 years old and his younger brother is half his age. \\n\" +\n \"When David will be 10 times older, how old will Franck be?\");\n \n \n }\n }\n }\n if (step6Finish)\n {\n if (currentRoom == bedroom)\n {\n System.out.println(\"Did you find the safe code? \");\n // enter the safe code -- creation int essai_code\n if (essai_code == safe_code)\n {\n System.out.println(\"You find the good number code, the safe door is opened. \\n \" +\n \"The safe contains a disk, a lot of money and a biscuits box.\");\n }\n }\n if (currentRoom == dancingroom\n // && il doit avoir le dique dans son inventaire\n )\n {\n ms_Taylor.setRoom(dancingroom);\n ms_Taylor.setText(\"What does this object do here, it should be in the library\");\n // player has to take the gramophone in his inventory\n }\n if (currentRoom == library \n // && il doit avoir le disque et le gramophone dans son inventaire\n )\n {\n System.out.println(\"You put the gramophone at its place and you insert the disk on it. \\n\"+\n \" You are hearing a loud noise and a door is appearing.\"); \n library.modifyExit(\"north\"); \n }\n if (step7Finish)\n {\n if (currentRoom == laboratory)\n {\n System.out.println(\"When you opened the door, a little green ghost appears and attacked you.\");\n if(fight_win)\n {\n System.out.println(\"The skeleton is dead. You see that one of its bone is strange. This bone seems to be carved as a key\");\n // joueur doit ramasser la clef\n \n if (exam)\n {\n System.out.println(\" You look and the desk and you find some construction plans. It seems that Mr Taylor wanted to dig very deeply at east from the garden. It is the same place than the gardener hut. \");\n }\n corridor.modifyExit(\"up\");\n System.out.println(\"You unblock a new room. A trapdoor appears in the corridor\");\n }\n }\n if (currentRoom == attic)\n {\n if (exam)\n {\n System.out.println(\" You finally discover the attic. It is dark because there is only one window lighting the room. \\n\"\n + \" You decide to look out the window and discover a huge garden hidden by the trees when guests arrive by the entrance. \");\n hall.modifyExit(\"north\");\n }\n }\n if (step8Finish)\n {\n if (currentRoom == garden)\n {\n if (exam)\n {\n System.out.println(\" You see a well at the north but there is a steel grid locked by a padlock.\\n\"\n + \"There is an apple tree next to it with only one apple on the tree. You can maybe pick up the apple and eat it now or later.\\n\"\n + \"\");\n }\n }\n }\n \n \n }\n \n \n \n \n /*player.addItem(necklace_red);\n player.addItem(necklace_red);\n player.addItem(necklace_red);*/\n /* \n \n \n // Enter the main command loop. Here we repeatedly read commands and\n // execute them until the game is over.\n \n boolean finished = false;\n while (! finished) {\n Command command = parser.getCommand();\n finished = processCommand(command);\n }\n System.out.println(\"Thank you for playing. Good bye.\");\n */\n }\n }\n }\n }\n }\n }\n \n }", "public void prepareGame() {\n setInitialPosition();\n\n //Check NickName\n boolean nickNameEstablished = checkNickName();\n if (!nickNameEstablished) {\n Intent intent = new Intent(this, NickNameActivity.class);\n startActivityForResult(intent, NICKNAME_ACTIVITY_REQUEST_CODE);\n } else {\n setDynamicBackground();\n }\n }", "private void init() \n\t{\n\t\tgoalReached = false;\n\t\tGdx.input.setInputProcessor(this);\n\t\tcameraHelper = new CameraHelper();\n\t\tlives = Constants.LIVES_START;\n\t\tlivesVisual = lives;\n\t\ttimeLeftGameOverDelay = 0;\n\t\tinitLevel();\n\n\t}", "private void prepareGame()\n {\n Rocket rocket = new Rocket();\n \n scoreCounter = new Counter(\"Score: \");\n \n addObject(rocket, getWidth()/2 + 100, getHeight()/2);\n \n addObject(scoreCounter, 60, 480);\n \n //TODO (69): Make a method call to addAsteroids that uses your constant for the number of asteroids\n addAsteroids(START_ASTEROIDS);\n }", "public void setup()\n {\n this.p = Player.getInstance();\n\n this.imageStore = new ImageStore(\n createImageColored(TILE_WIDTH, TILE_HEIGHT, DEFAULT_IMAGE_COLOR));\n this.world = new WorldModel(WORLD_ROWS, WORLD_COLS,\n createDefaultBackground(imageStore));\n this.view = new WorldView(VIEW_ROWS, VIEW_COLS, this, world,\n TILE_WIDTH, TILE_HEIGHT);\n this.scheduler = new EventScheduler(timeScale);\n\n background = loadImage(\"images\\\\farm2.jpg\");\n background.resize(VIEW_WIDTH, VIEW_HEIGHT);\n\n loadImages(IMAGE_LIST_FILE_NAME, imageStore, this);\n loadWorld(world, LOAD_FILE_NAME, imageStore);\n\n scheduleActions(world, scheduler, imageStore);\n\n next_time = System.currentTimeMillis() + TIMER_ACTION_PERIOD;\n }", "private void init() {\n this.playing = true;\n this.hand.clear();\n this.onTable = 0;\n this.points = 0;\n }", "public StartScreen()\n { \n // Create a new world with 1111x602 cells with a cell size of 1x1 pixels.\n super(1111, 602, 1); \n prepare();\n background.playLoop();\n }", "public void startGame() {\n\t\timages = new ImageContainer();\n\t\ttimer = new Timer(15, this);\n\t\ttimer.setRepeats(true);\n\t\tlevelStartTimer = new Timer(2000, this);\n\t\thighScore = new HighScore();\n\t\tpacmanAnimation = new PacmanAnimation(images.pacman, new int[] { 3, 2,\n\t\t\t\t0, 1, 2 });\n\t\tactualLevel = 1;\n\t\tinitNewLevel();\n\t}", "private void initPlayerUI() {\n if (playableMediaItem instanceof Podcast) {\n tvPlayerTitle.setText(((Podcast) playableMediaItem).getSelectedTrack().getTitle().trim());\n } else {\n tvPlayerTitle.setText(playableMediaItem.getName().trim());\n }\n tvPlayserSubtitle.setText(playableMediaItem.getSubHeader().trim());\n if (playableMediaItem.getCoverImageUrl() == null) {\n final LetterBitmap letterBitmap = new LetterBitmap(getActivity());\n Bitmap letterTile = letterBitmap.getLetterTile(playableMediaItem.getName(), playableMediaItem.getName(), COVER_IMAGE_SIZE, COVER_IMAGE_SIZE);\n imgPlayerCover.setImageBitmap(letterTile);\n int dominantColor = UIHelper.getDominantColor(letterTile);\n rlTopSectionBckg.setBackgroundColor(dominantColor);\n } else {\n Glide.with(getActivity()).load(playableMediaItem.getCoverImageUrl()).crossFade().into(new GlideDrawableImageViewTarget(imgPlayerCover) {\n @Override\n public void onResourceReady(GlideDrawable drawable, GlideAnimation anim) {\n super.onResourceReady(drawable, anim);\n Bitmap bitmap = ((GlideBitmapDrawable) drawable).getBitmap();\n int dominantColor = UIHelper.getDominantColor(bitmap);\n rlTopSectionBckg.setBackgroundColor(dominantColor);\n }\n });\n }\n if (playableMediaItem instanceof Podcast) {\n Track selectedTrack = ((Podcast) playableMediaItem).getSelectedTrack();\n tvTrackDuration.setText(selectedTrack.getDuration());\n sbPlayerProgress.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n @Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n\n }\n\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n isChangingProgress = true;\n }\n\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) {\n isChangingProgress = false;\n int progress = seekBar.getProgress();\n int position = (int) ((maxDuration * progress) / 100);\n seekBar.setProgress(progress);\n universalPlayer.seekTo(position);\n }\n });\n }\n if (playableMediaItem instanceof RadioItem) {\n sbPlayerProgress.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n return true;\n }\n });\n }\n\n //playableMediaItem.syncWithDB();\n if (playableMediaItem.isSubscribed) {\n itemFavorites.setIcon(getResources().getDrawable(R.drawable.ic_heart_black_24dp));\n } else {\n itemFavorites.setIcon(getResources().getDrawable(R.drawable.ic_heart_white_24dp));\n }\n }", "public void start() {\n ArrayList<String> names = new ArrayList<>();\n game.initialize(names);\n //game.play(this.mainPkmn, this.attack);\n\n }", "private void initializeVariables() {\n rnd = new Random();\n\n pieceKind = rnd.nextInt() % 7;\n if(pieceKind < 0) pieceKind *= -1;\n pieceKind2 = rnd.nextInt() % 7;\n if(pieceKind2 < 0) pieceKind2 *= -1;\n\n piece = new Piece(pieceKind,this);\n newPiece();\n startedGame = true;\n\n for(i=0; i<276; i++) {\n modulo = i%12;\n if(modulo == 0 || modulo == 11 || i>251) {\n matrix[i] = 0; colMatrix[i] = true;\n } else {\n matrix[i] = -1; colMatrix[i] = false;\n }\n }\n\n for(i=0; i<5; i++) completeLines[i] = -1;\n for(i=0; i<4; i++) keybl.setMovTable(i, false);\n }", "public void preparePlayer1()\n {\n Player1 p1 = new Player1();\n addObject(p1, 200, 600);\n }", "private void initPlayerFigures() {\n isInitializationPhase = true;\n FigureInitializer playerOneInitializer = new FigureInitializer(Color.BLUE);\n FigureInitializer playerTwoInitializer = new FigureInitializer(Color.GREEN);\n\n FigureInitializer[] figures = {playerOneInitializer, playerTwoInitializer};\n\n Player[] players = {playerOne, playerTwo};\n\n int current = 0;\n\n\n for (int i = 0; i < 12; i++) {\n\n currentPlayer = players[current];\n\n\n if (figures[current].getFigures().size() == 0) {\n continue;\n }\n\n ChooseFigureDialog dialog = new ChooseFigureDialog(this, true, currentPlayer.getId(), figures[current]);\n\n currentField = new Field(dialog.getChosenFigure());\n\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n current = current == 0 ? 1 : 0;\n\n }\n currentField = null;\n isInitializationPhase = false;\n currentPlayer = playerOne;\n\n }", "public void initGame() {\n\r\n\t\tscore = 0;\r\n\t\tshipsLeft = MAX_SHIPS;\r\n\t\tasteroidsSpeed = MIN_ROCK_SPEED;\r\n\t\tnewShipScore = NEW_SHIP_POINTS;\r\n\t\tnewUfoScore = NEW_UFO_POINTS;\r\n\t\tShip.initShip();\r\n\t\tinitPhotons();\r\n\t\tstopUfo();\r\n\t\tstopMissle();\r\n\t\tinitAsteroids();\r\n\t\tinitExplosions();\r\n\t\tplaying = true;\r\n\t\tpaused = false;\r\n\t\tphotonTime = System.currentTimeMillis();\r\n\t}", "@Override\n public void surfaceCreated(SurfaceHolder holder) {\n level = 1; //sets level to 1\n bg = new Background(BitmapFactory.decodeResource(getResources(), R.drawable.highway_bg)); //get bg image\n player = new Warlock(BitmapFactory.decodeResource(getResources(), R.drawable.player_move), 64, 64, 8); //get player image\n gargants = new ArrayList<Gargant>(); // initialises gargants array\n dragons = new ArrayList<Dragon>(); // initialises dragons array\n demons = new ArrayList<Demon>(); // initialises demons array\n bullets = new ArrayList<LightningBall>(); // initialises player bullets array\n demonShots = new ArrayList<HellFire>(); // initialises demon bullets array\n\n gargantStartTime = System.nanoTime();\n dragonStartTime = System.nanoTime();\n demonStartTime = System.nanoTime();\n\n //start the game loop\n thread.setRunning(true);\n thread.start();\n }", "public void initGameModeChoice() {\n\t\tWorld.clear();\n\t\tstate = STATE.MENU;\n\t\tinitBackground();\n\t\tWorld.add(new Logo(Screen.getCenterX() - Logo.WIDTH / 2, Screen\n\t\t\t\t.getHeight() * 3 / 4 - Logo.HEIGHT / 2));\n\t\tWorld.add(new SinglePlayerButton(Screen.getCenterX()\n\t\t\t\t- StartButton.WIDTH / 2, Screen.getHeight() * 3 / 8\n\t\t\t\t- StartButton.HEIGHT / 2, this));\n\t\tWorld.add(new MultiPlayerButton(Screen.getCenterX() - StartButton.WIDTH\n\t\t\t\t/ 2, Screen.getHeight() * 2 / 8 - StartButton.HEIGHT / 2, this));\n\t\tWorld.add(new TextStatic(footerText, Screen.getCenterX()\n\t\t\t\t- footerText.length() * Sprite.CHAR_WIDTH / 2,\n\t\t\t\tSprite.CHAR_HEIGHT, Color.yellow));\n\n\t}", "@FXML\n private void initialize() {\n\n setUpPlayerTable();\n }", "private void initialSetup() {\n\t\tplaceNewPiece('a', 1, new Rook(board, Color.WHITE));\n placeNewPiece('b', 1, new Knight(board, Color.WHITE));\n placeNewPiece('c', 1, new Bishop(board, Color.WHITE));\n placeNewPiece('d', 1, new Queen(board, Color.WHITE));\n placeNewPiece('e', 1, new King(board, Color.WHITE, this)); // 'this' refere-se a esta jogada\n placeNewPiece('f', 1, new Bishop(board, Color.WHITE));\n placeNewPiece('g', 1, new Knight(board, Color.WHITE));\n placeNewPiece('h', 1, new Rook(board, Color.WHITE));\n placeNewPiece('a', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('b', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('c', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('d', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('e', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('f', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('g', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('h', 2, new Pawn(board, Color.WHITE, this));\n\n placeNewPiece('a', 8, new Rook(board, Color.BLACK));\n placeNewPiece('b', 8, new Knight(board, Color.BLACK));\n placeNewPiece('c', 8, new Bishop(board, Color.BLACK));\n placeNewPiece('d', 8, new Queen(board, Color.BLACK));\n placeNewPiece('e', 8, new King(board, Color.BLACK, this));\n placeNewPiece('f', 8, new Bishop(board, Color.BLACK));\n placeNewPiece('g', 8, new Knight(board, Color.BLACK));\n placeNewPiece('h', 8, new Rook(board, Color.BLACK));\n placeNewPiece('a', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('b', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('c', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('d', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('e', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('f', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('g', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('h', 7, new Pawn(board, Color.BLACK, this));\n\t}", "private void startGame() {\r\n setGrid();\r\n setSnake();\r\n newPowerUp();\r\n timer.start();\r\n }", "public void initGame() {\n for (int row = 0; row < ROWS; ++row) {\n for (int columns = 0; columns < COLUMNS; ++columns) {\n board[row][columns] = Seed.EMPTY; // all cells empty\n }\n }\n currentState = GameState.PLAYING; // ready to play\n currentPlayer = Seed.CROSS; // cross starts first\n }", "public void initialize()\n {\n \t// Luodaan manager-luokat\n EffectManager.getInstance();\n MessageManager.getInstance();\n CameraManager.getInstance();\n\n // Luodaan pelitilan eri osat\n backgroundManager = new BackgroundManager(wrapper);\n \tweaponManager = new WeaponManager();\n hud = new Hud(context, weaponManager);\n touchManager = new TouchManager(dm, surfaceView, context, hud, weaponManager);\n gameMode = new GameMode(gameActivity, this, dm, context, hud, weaponManager);\n \n // Järjestellään Wrapperin listat uudelleen\n wrapper.sortDrawables();\n wrapper.generateAiGroups();\n \n // Merkitään kaikki ladatuiksi\n allLoaded = true;\n }", "public void initialGameScreen() {\n timer.stop();\n gameModel.setState(\"Game Screen\");\n currentScene = levelSetup.getGameScreen().getScene(gameScreenInitialEntrance);\n currentBoard = levelSetup.getGameScreen().getBoard();\n currentLevelScreen = levelSetup.getGameScreen();\n gameScreenInitialEntrance = (gameScreenInitialEntrance ? false : false);\n moveCharacter(mainWindow, currentScene, hero, currentBoard);\n }", "public void initialize() {\n\t\tbombLabel.setText(\"Flag: \" + game.getFlagCounter() + \"/\" + game.getNumOfBombs());\n\t\ttimerLabel.setText(\"Time: \" + 0);\n\t\tboard.getStyleClass().add(\"grid\");\n\t\tbtnArray = new Button[game.getHeight()][game.getWidth()];\n\t\tfor (int x = 0; x < game.getHeight(); x++) {\n\t\t\tfor (int y = 0; y < game.getWidth(); y++) {\n\t\t\t\tButton btn = new Button(\"\");\n\t\t\t\tbtnArray[x][y] = btn;\n\t\t\t\tbtn.setMaxSize(50, 50);\n\t\t\t\tbtn.setMinSize(50, 50);\n\t\t\t\t//Add Button to the board (GridPane)\n\t\t\t\tboard.add(btn, x, y);\n\t\t\t\tbtn.setId(x + \" . \" + y);\n\t\t\t\tbtn.setOnMouseClicked(e -> TileClicked(e));\n\t\t\t}\n\t\t}\n\t}", "public void initGame() {\n\t\tfor (int i = 0; i < gameSize; i++) {\n\t\t\tfor (int j = 0; j < gameSize; j++) {\n\t\t\t\tgrid[i][j] = new GridNode(GridNode.NodeType.EMPTY);\n\t\t\t\tgridLocker[i][j] = -1;\n\t\t\t}\n\t\t}\n\n\t\t// Snakes are placed into start positions here\n\t\tfor (int i = 0; i < snakesList.size(); i++) {\n\t\t\tint x = (int) (Math.random() * 1000) % gameSize;\n\t\t\tint y = (int) (Math.random() * 1000) % gameSize;\n\t\t\tif (grid[x][y].nodeType == GridNode.NodeType.EMPTY) {\n\t\t\t\tSnake currentSnake = snakesList.get(i);\n\t\t\t\tgrid[x][y].SnakeID = currentSnake.snakeID;\n\t\t\t\tcurrentSnake.initalizeSnakeLocation(x, y, gameSize);\n\t\t\t\tgrid[x][y].nodeType = GridNode.NodeType.SNAKEHEAD;\n\t\t\t} else {\n\t\t\t\t// Every snake has to be allocated a spot so go back to the\n\t\t\t\t// index\n\t\t\t\t// of the snake to add and try again\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\n\t\t// Places some snake food randomly somewhere\n\t\tfor(int i = 0; i <4; i++) {\n\t\t\tplaceBonus();\n\t\t}\n\t}", "public void tiles()\n{\n if(m.getActiveManager() != 0)\n {\n m.hideButtonsOfManager(1);\n m.hideButtonsOfManager(2);\n m.showButtonsOfManager(0);\n m.activateManager(0);\n m.getTileManager().getActiveTile().setShowHover(true);\n }\n}", "private void init() throws IOException {\n //Initializing a new Display\n this.display = new Display(title, width, height);\n this.background = new SpriteSheet(gfx.loader(\"/images/RoadTile3.png\"));\n this.inputHandler = new InputHandler(this.display);\n Assets.init();\n\n gameState = new GameState();\n StateManager.setState(gameState);\n\n player = new Player();\n enemies = new ArrayList<>();\n }", "public void initTiles() {\n\t\ttileList.add(new Go());\n\n\t\t// Brown properties\n\t\tProperty mediterranean = new Property(\"Mediterranean\");\n\t\tProperty balticAve = new Property(\"Baltic Avenue\");\n\n\t\t// Light blue properties\n\t\tProperty orientalAve = new Property(\"Oriental Avenue\");\n\t\tProperty vermontAve = new Property(\"Vermont Avenue\");\n\t\tProperty connecticutAve = new Property(\"Connecticut Avenue\");\n\n\t\t// Magenta properties\n\t\tProperty stCharles = new Property(\"St. Charles Place\");\n\t\tProperty statesAve = new Property(\"States Avenue\");\n\t\tProperty virginiaAve = new Property(\"Virginia Avenue\");\n\n\t\t// Orange properties\n\t\tProperty stJames = new Property(\"St. James Place\");\n\t\tProperty tennesseeAve = new Property(\"Tennessee Avenue\");\n\t\tProperty newYorkAve = new Property(\"New York Avenue\");\n\n\t\t// Red properties\n\t\tProperty kentuckyAve = new Property(\"Kentucky Avenue\");\n\t\tProperty indianaAve = new Property(\"Indiana Avenue\");\n\t\tProperty illinoisAve = new Property(\"Illinois Avenue\");\n\n\t\t// Yellow Properties\n\t\tProperty atlanticAve = new Property(\"Atlantic Avenue\");\n\t\tProperty ventnorAve = new Property(\"Ventnor Avenue\");\n\t\tProperty marvinGard = new Property(\"Marvin Gardins\");\n\n\t\t// Green Properties\n\t\tProperty pacificAve = new Property(\"Pacific Avenue\");\n\t\tProperty northCar = new Property(\"North Carolina Avenue\");\n\t\tProperty pennsylvannia = new Property(\"Pennsylvania Avenue\");\n\n\t\t// Dark blue properties\n\t\tProperty parkPlace = new Property(\"Park Place\");\n\t\tProperty boardWalk = new Property(\"Boardwalk\");\n\n\t\t// Tax tiles\n\t\tTaxTile incomeTax = new TaxTile(\"Income Tax\", 200);\n\t\tTaxTile luxuryTax = new TaxTile(\"Luxury Tax\", 100);\n\n\t\t// Utilities\n\t\tUtility electric = new Utility(\"Electric Company\");\n\t\tUtility water = new Utility(\"Water Works\");\n\n\t\t// Railroads\n\t\tRailroad reading = new Railroad(\"Reading\");\n\t\tRailroad pennRail = new Railroad(\"Pennsylvania\");\n\t\tRailroad bno = new Railroad(\"B & O\");\n\t\tRailroad shortLine = new Railroad(\"Short Line\");\n\n\t\t// Chance and community chest\n\t\tChance chance = new Chance();\n\t\tCommunity chest = new Community();\n\n\t\t// Adds the properties by color in accordance with their position on the board\n\t\t// adds color + placement of piece to a list of their respective colors\n\t\tbrown.add(1);\n\t\tbrown.add(3);\n\t\trailroads.add(5);\n\t\tlightBlue.add(6);\n\t\tlightBlue.add(8);\n\t\tlightBlue.add(9);\n\t\tmagenta.add(11);\n\t\tutilities.add(12);\n\t\tmagenta.add(13);\n\t\tmagenta.add(14);\n\t\trailroads.add(15);\n\t\torange.add(16);\n\t\torange.add(18);\n\t\torange.add(19);\n\t\tred.add(21);\n\t\tred.add(23);\n\t\tred.add(24);\n\t\trailroads.add(25);\n\t\tyellow.add(26);\n\t\tyellow.add(27);\n\t\tutilities.add(28);\n\t\tyellow.add(29);\n\t\tgreen.add(31);\n\t\tgreen.add(32);\n\t\tgreen.add(34);\n\t\trailroads.add(35);\n\t\tdarkBlue.add(37);\n\t\tdarkBlue.add(39);\n\n\t\t// tileList is the list of tiles of the board where each tile is representative of a place on the board\n\t\t// adds each tile is chronological order beginning of the board \"go\"\n\t\t//this list includes: properties, taxes, railroads, chance, community chest\n\t\t\n\t\ttileList.add(new Go());\n\n\t\ttileList.add(mediterranean);\n\t\ttileList.add(chest);\n\t\ttileList.add(balticAve);\n\t\ttileList.add(incomeTax);\n\t\ttileList.add(reading);\n\t\ttileList.add(orientalAve);\n\t\ttileList.add(chance);\t\n\t\ttileList.add(vermontAve);\n\t\ttileList.add(connecticutAve);\n\n\t\ttileList.add(new Jail());\n\t\t\t\n\t\ttileList.add(stCharles);\n\t\ttileList.add(electric);\t\t\t\n\t\ttileList.add(statesAve);\t\t\t\n\t\ttileList.add(virginiaAve);\n\t\ttileList.add(pennRail);\n\t\ttileList.add(stJames);\t\n\t\ttileList.add(chest);\n\t\ttileList.add(tennesseeAve);\t\t\t\n\t\ttileList.add(newYorkAve);\n\n\t\ttileList.add(new FreeParking());\n\t\t\t\n\t\ttileList.add(kentuckyAve);\t\t\n\t\ttileList.add(chance);\t\n\t\ttileList.add(indianaAve);\t\t\t\n\t\ttileList.add(illinoisAve);\n\t\ttileList.add(bno);\n\t\ttileList.add(atlanticAve);\t\t\t\n\t\ttileList.add(ventnorAve);\n\t\ttileList.add(water);\n\t\ttileList.add(marvinGard);\n\n\t\ttileList.add(new GoToJail());\n\t\t\t\t\t\n\t\ttileList.add(pacificAve);\t\t\t\n\t\ttileList.add(northCar);\n\t\ttileList.add(chest);\t\t\t\n\t\ttileList.add(pennsylvannia);\n\t\ttileList.add(shortLine);\n\t\ttileList.add(chance);\n\t\ttileList.add(parkPlace);\n\t\ttileList.add(luxuryTax);\n\t\ttileList.add(boardWalk);\n\t}", "private void setupPlayerPosition() {\n\t\tHashMap<Suspect, Coordinates> startPositions = new HashMap<Suspect, Coordinates>();\r\n\t\tstartPositions.put(Suspect.KasandraScarlet, new Coordinates(18, 28));\r\n\t\tstartPositions.put(Suspect.JackMustard, new Coordinates(7, 28));\r\n\t\tstartPositions.put(Suspect.DianeWhite, new Coordinates(0, 19));\r\n\t\tstartPositions.put(Suspect.JacobGreen, new Coordinates(0, 9));\r\n\t\tstartPositions.put(Suspect.EleanorPeacock, new Coordinates(6, 0));\r\n\t\tstartPositions.put(Suspect.VictorPlum, new Coordinates(20, 0));\r\n\r\n\t\tfor (int i = 0; i < this.listOfPlayer.size(); i++) {\r\n\t\t\tPlayer p = this.listOfPlayer.get(i);\r\n\t\t\tSuspect sus = p.getSuspect().getData();\r\n\t\t\tboolean b = p.setCoord(startPositions.get(sus), this.grid);\r\n\t\t\t// should always be able to put character on starting position\r\n\t\t}\r\n\t\tSystem.out.println(\"Initial player starting positions set\");\r\n\t}", "@Override\n protected void initGame() {\n getGameWorld().setEntityFactory(new PlatformerFactory());\n getGameWorld().setLevelFromMap(\"Platformergame1.json\");\n\n // Sets spawnloction of the player\n player = getGameWorld().spawn(\"player\", 50, 50);\n }", "public void initIntro() {\n\t\tWorld.clear();\n\t\tstate = STATE.INTRO;\n\t\tinitBackground();\n\t\tWorld.add(new Logo(Screen.getCenterX() - Logo.WIDTH / 2, Screen\n\t\t\t\t.getHeight() * 3 / 4 - Logo.HEIGHT / 2));\n\n\t\tWorld.add(new StartButton(Screen.getCenterX() - StartButton.WIDTH / 2,\n\t\t\t\tScreen.getHeight() / 4 - StartButton.HEIGHT / 2, this));\n\n\t\tWorld.add(new SoundButton(Screen.getCenterX() - StartButton.WIDTH / 2,\n\t\t\t\tScreen.getHeight() / 8 - StartButton.HEIGHT / 2));\n\n\t\tWorld.add(new TextStatic(footerText, Screen.getCenterX()\n\t\t\t\t- footerText.length() * Sprite.CHAR_WIDTH / 2,\n\t\t\t\tSprite.CHAR_HEIGHT, Color.yellow));\n\t}", "public void initialize() {\n // create a runner using a function\n this.createScreenBorders();\n // create a keyboard sensor.\n this.keyboard = this.runner.getGUI().getKeyboardSensor();\n //create the environment for the game (game environment and sprites collection)\n this.createEnvironment();\n // BACKGROUND CREATION //\n this.createBackground();\n // create the counters for the game.\n this.createCounters();\n // LISTENERS CREATION //\n //create a message printing listener.\n HitListener phl = new PrintingHitListener();\n //create a new block remover listener.\n HitListener blockrmv = new BlockRemover(this, blockCounter);\n //create a new ball remover listener.\n HitListener ballrmv = new BallRemover(this, ballCounter);\n //create a new score counter listener.\n HitListener scorelstn = new ScoreTrackingListener(this.scoreCounter);\n // BLOCKS CREATION //\n this.createBlocks(phl, blockrmv, scorelstn);\n // SIDE BLOCKS CREATION //\n this.createSideBlocks();\n // DEATH BLOCK CREATION //\n this.createDeathBlock(ballrmv);\n // LEVEL'S NAME //\n LevelsName name = new LevelsName(this.levelInfo.levelName());\n // add the whole-game indicators to the sprites list.\n this.sprites.addSprite(scoreIndi);\n this.sprites.addSprite(lifeIndi);\n this.sprites.addSprite(name);\n }", "public void initialize(){\n\t screens.put(ScreenType.Game, new GameScreen(this));\n screens.put(ScreenType.Menu, new MenuScreen(this));\n }", "private void init() {\n\t\trunning = true;\n\t\timage = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);\n\t\tg = (Graphics2D) image.getGraphics();\n\t\ttheMap.loadTiles(\"resizedTiles2.png\");\n\t}", "public void init() {\n Assets.init();\n titleAnimation = new Animation(Assets.titleMoving, 180);\n startButton = new MenuButton((game.getWidth()/2 - 100), 220, 100, 200, MenuButtonType.START, this);\n highscoreButton = new MenuButton((game.getWidth()/2 - 100), 370, 100, 200, MenuButtonType.HIGHSCORE, this);\n backButton = new NavigationButton(37, 720, 120, 60, NavigationButton.NavButtonType.BACK, this.getGame());\n tutorialButton = new MenuButton((game.getWidth()/2 - 100), 520, 100, 200, MenuButtonType.INSTRUCTIONS, this);\n \n showTutorial = false;\n }", "private void setUp() {\r\n add(myNextPiece, BorderLayout.NORTH);\r\n add(myScorePanel, BorderLayout.CENTER);\r\n add(myControl, BorderLayout.SOUTH);\r\n }", "public static void initial()\n\t{\n\t\tscoreteam1 = 0; scoreteam2 = 0;\n\t\tdelayed = 0;\n\t\tplayers = new Player[5];\n\t\tfor (int i = 0; i < 5; i++) \n\t\t{\n\t\t\tplayers[i] = new Player();\n\t\t}\n\n\t\t// finding how many players there are (2, 3, or 4) and initializing status\n\t\tplayerNum = 0;\n\t\tfor (int i = 0; i < 5; i++)\n\t\t{\n\t\t\tif (Selection.exist[i])\n\t\t\t{\n\t\t\t\tplayerNum++;\n\t\t\t}\n\t\t\tplayers[i].exist = Selection.exist[i]; \n\t\t\tplayers[i].ai = Selection.ai[i];\n\t\t\tplayers[i].name = Selection.name[i];\t\t \n\t\t}\n\n\n\t\tplayers[3].keyDown = KeyEvent.VK_SEMICOLON;\n\t\tplayers[3].keyLeft = KeyEvent.VK_L;\n\t\tplayers[3].keyRight = KeyEvent.VK_QUOTE;\n\t\tplayers[3].keyUp = KeyEvent.VK_P;\n\t\tplayers[2].keyDown = KeyEvent.VK_H;\n\t\tplayers[2].keyLeft = KeyEvent.VK_G;\n\t\tplayers[2].keyRight = KeyEvent.VK_J;\n\t\tplayers[2].keyUp = KeyEvent.VK_Y;\n\t\tplayers[1].keyDown = KeyEvent.VK_S;\n\t\tplayers[1].keyLeft = KeyEvent.VK_A;\n\t\tplayers[1].keyRight = KeyEvent.VK_D;\n\t\tplayers[1].keyUp = KeyEvent.VK_W;\n\t\tplayers[4].keyDown = KeyEvent.VK_DOWN;\n\t\tplayers[4].keyLeft = KeyEvent.VK_LEFT;\n\t\tplayers[4].keyRight = KeyEvent.VK_RIGHT;\n\t\tplayers[4].keyUp = KeyEvent.VK_UP;\n\t\tplayers[1].color = Color.red;\n\t\tplayers[3].color = Color.green;\n\n\t\tif (Selection.team)\n\t\t{\n\t\t\tplayers[2].color = Color.red;\n\t\t\tplayers[4].color = Color.green;\n\t\t} \n\t\telse\n\t\t{\n\t\t\tplayers[2].color = Color.blue;\n\t\t\tplayers[4].color = Color.yellow;\n\t\t}\n\n\t}", "public void letSmartComputerSetup() {\n //generates a random spot for the flag\n int randomRow = (int)(Math.random() * 2);\n int randomCol = (int)(Math.random() * 10);\n\n //adjusts the flag for the proper team\n if(state.getCurrentTeamsTurn().getTEAMNUMBER() == 0) {\n randomRow += 8;\n }\n\n //adds the flag to the board\n state.setLastTappedPieceButton(Rank.FLAG);\n state.tapOnSquare(randomRow, randomCol);\n state.tapOnSquare(randomRow, randomCol);\n\n //places bombs around the flag if possible\n state.setLastTappedPieceButton(Rank.BOMB);\n if(randomRow != 0) {\n state.tapOnSquare(randomRow - 1, randomCol);\n state.tapOnSquare(randomRow - 1, randomCol);\n }\n if(randomRow != 9) {\n state.tapOnSquare(randomRow + 1, randomCol);\n state.tapOnSquare(randomRow + 1, randomCol);\n }\n if(randomCol != 0) {\n state.tapOnSquare(randomRow, randomCol -1);\n state.tapOnSquare(randomRow, randomCol -1);\n }\n if(randomCol != 9) {\n state.tapOnSquare(randomRow, randomCol + 1);\n state.tapOnSquare(randomRow, randomCol + 1);\n }\n\n //transitions the player to play phase\n state.transitionPhases();\n }", "public static void initPlayer() {\n\t\tuser = game.getUsers().get(game.getUserTurn());\n\t\tlblBudgetText.setText(user.getBudget()+\"\");\n\t\tdisplayUserTeam();\n\t}" ]
[ "0.7184554", "0.6950537", "0.68637145", "0.68408984", "0.68366355", "0.6595841", "0.6556343", "0.65156025", "0.6510673", "0.650879", "0.64925295", "0.648879", "0.64747036", "0.6473264", "0.6472829", "0.647077", "0.6468469", "0.6454096", "0.644073", "0.6425833", "0.6418668", "0.64180744", "0.64028156", "0.6383775", "0.6382403", "0.6372889", "0.63703054", "0.6369558", "0.6365542", "0.63464874", "0.6335605", "0.6323483", "0.6314903", "0.630809", "0.6294012", "0.629077", "0.6281891", "0.6277942", "0.6261346", "0.62449116", "0.62434226", "0.6240755", "0.6235753", "0.6229407", "0.622921", "0.6224863", "0.62232584", "0.62128544", "0.6194837", "0.6185971", "0.6184196", "0.6181356", "0.6174878", "0.61661285", "0.6161967", "0.6156238", "0.6150943", "0.61501044", "0.61438996", "0.61417264", "0.61267114", "0.6123252", "0.6121676", "0.6121486", "0.61101097", "0.61045873", "0.6100016", "0.60910964", "0.60794735", "0.60715246", "0.60694563", "0.6062416", "0.6060772", "0.60588616", "0.6057714", "0.60567975", "0.6056357", "0.6053737", "0.60490733", "0.60487044", "0.6047086", "0.6042451", "0.60363775", "0.6035871", "0.60352004", "0.6033097", "0.6030087", "0.60282314", "0.60273093", "0.60213226", "0.6020847", "0.60179645", "0.60125387", "0.6008567", "0.60003304", "0.5996595", "0.5994259", "0.5988858", "0.59828764", "0.5982078" ]
0.6329934
31
Getting the grid view:
private void setupGrid() { mGrid = (GridView) findViewById(R.id.grid_view); // Setting number of columns in the grid: mGrid.setNumColumns(mGame.getmBoard().getNumberOfCols()); // Setting the adapter for the grid: mGrid.setAdapter(new TileAdapter(getApplicationContext(), mGame.getmBoard())); // Setting a click listener for the grid: mGrid.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // Making sure the game hasn't ended and that its a proper timing to let the player make his turn. if (mGame.getmGameStatus() == Game.GameStatus.ONGOING && mIsAllowedToPlay) { Log.d("Playable Tiles" , mPlayableTiles.toString()); Log.d("Position" , "" + position); // If this tile is playable: if (mPlayableTiles.contains(position)){ mIsAllowedToPlay = false; // Disabling the player to play for now. if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start(); // Playing proper sound. // Cancel Guidelines: if(mGuidelines != null) { mGuidelines.cancel(); mGuidelines = null; // refresh tiles' color: for(int i = 0; i < mGrid.getChildCount(); i++){ mGrid.getChildAt(i).setBackgroundResource(R.drawable.button_tile); } } // Making the play and updating grid: mGame.playTile(position/mGame.getmBoard().getNumberOfCols(),position%mGame.getmBoard().getNumberOfCols()); ((TileAdapter)mGrid.getAdapter()).notifyDataSetChanged(); // Updating Counters: mBlackCounter.setText("" + mGame.getmBoard().getmNumberOfBlackPieces()); mWhiteCounter.setText("" + mGame.getmBoard().getmNumberOfWhitePieces()); // While the UI changes, make a proper sound for flipping pieces (after a short delay): // And then move on (update UI, let opponent play next, end game, etc.) new Thread(new Runnable() { @Override public void run() { try { Thread.sleep(200); } catch (InterruptedException e) { e.printStackTrace(); } if(mSoundStatus.equals(Constants.ON)) mFlipPieceSound.start(); // Playing proper sound. try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } // Now back to UI thread in order to update UI: runOnUiThread(new Runnable() { @Override public void run() { // If game is still ongoing: if(mGame.getmGameStatus() == Game.GameStatus.ONGOING){ // If turn was toggled: if(mGame.getmCurrentlyPlaying() != mPlayerGamePiece) { // Updating colors for profile areas: mOpponentProfileArea.setBackgroundResource(R.drawable.user_area_green); mOpponentUsername.setBackgroundResource(R.color.colorGreenDarkAlpha); mPlayerProfileArea.setBackgroundResource(R.drawable.user_area_gray); mPlayerUsername.setBackgroundResource(R.color.colorGrayDarkAlpha); // Now A.I. opponent should make a move: makeAIMove(); } // Otherwise, player gets another turn: else{ mPlayableTiles = mGame.getmBoard().getPlayableTiles(mPlayerGamePiece); showGuidelines(); mIsAllowedToPlay = true; } } else{ // Otherwise, game has ended. handleGameEnding(); } } }); } }).start(); } } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Pane getView() {\n return gridPane;\n }", "public GridPane getGrid(){\n\t\treturn myGrid;\n\t}", "public GridPane getGrid() {\n return grid;\n }", "public GridDisplay getGrid(){\n\t\treturn this.display.gridDisplay;\n\t\t//return this.grid;\n\t}", "public Grid getGrid() {\n return myGrid;\n }", "public Grid getGrid() {\n \t\treturn grid;\n \t}", "public abstract Grid<?> getGrid();", "@Override public View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t // Build the view that shows the grid.\n\t\tView view = inflater.inflate(R.layout.page_grid, container, false); //don gian la tao 1 view co giao dien la file page_grid.xml, gan ket voi cha la container\n\n//\t GridView gridview = (GridView) view.findViewById (R.id.gridview);\n//\t gridview.setTag (new Integer (mNum));\n\n\t // Set label text for the view\n//\t //View tv = view.findViewById (R.id.text);\n//\t //if (tv != null) {\n//\t // ((TextView)tv).setText(\"Topics \" + mNum);\n//\t //}\n\n\t // Hide the \"no items\" content until it is needed.\n//\t View nc = view.findViewById (R.id.no_topics_text); //tim view theo id do de set no khong nhin thay\n//\t if (nc != null) {\n//\t nc.setVisibility (View.VISIBLE); \n//\t }\n\n\t\treturn view;\n\t}", "protected BoardGrid getGrid() {\n return GameController.getInstance().getGrid();\n }", "public Pane getPane() {\n return grid;\n }", "public Grid grid() { return grid; }", "private Pane getGridPane ()\r\n {\r\n GridPane gridPane = new GridPane();\r\n \r\n int i = 0;\r\n for(Button b : this.buttons)\r\n {\r\n gridPane.add( b, i*(i+(int)b.getWidth()), 0);\r\n i++;\r\n }\r\n \r\n return gridPane;\r\n }", "com.ctrip.ferriswheel.proto.v1.Grid getGrid();", "private void binding(){\n gridview = (GridView)findViewById(R.id.gridview);\n }", "public boolean getShowGrid() {\n\t\treturn this.showGrid;\n\t}", "@Override\r\n\tpublic DataGridI getDataGrid() {\r\n\t\t//\r\n\t\treturn this.dg;\r\n\t}", "GridPane getRootGridPaneRecherche();", "private HistoryViewPanel getViewPanel() {\n if (viewPanel == null) {\n viewPanel = new HistoryViewPanel();\n viewPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"\",\n javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,\n javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null));\n }\n\n return viewPanel;\n }", "public int getGridColumns() \n { \n return gridColumns; \n }", "@Override\r\n\tpublic View getView() {\n\t\treturn this.view;\r\n\t}", "private CTTblGrid getCTTblGrid(CTTbl cTTbl) {\r\n\t\tCTTblGrid grid = cTTbl.getTblGrid();\r\n\r\n\t\tif (grid == null) {\r\n\t\t\tgrid = cTTbl.addNewTblGrid();\r\n\t\t}\r\n\t\treturn grid;\r\n\t}", "public int getReuseGrid()\n {\n return this.reuseGrid;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_grid_layout_one, container, false);\n\n rvGrid1 = view.findViewById(R.id.rvGrid1);\n HomeMenuLinkListAdapter adapter = new HomeMenuLinkListAdapter(getContext(), Utility.response.responsedata.homeScreen.menuLinks,false,true);\n rvGrid1.setHasFixedSize(true);\n rvGrid1.setLayoutManager(new GridLayoutManager(getContext(),3));\n rvGrid1.setAdapter(adapter);\n return view;\n }", "@Override\r\n\tpublic View getView() {\n\t\treturn super.getView();\r\n\t}", "public View getView() { return view; }", "public View getView() {\n\t\treturn view;\n\t}", "public BwView getView() {\n if (view == null) {\n view = new BwView();\n }\n\n return view;\n }", "@Deprecated\n\tprotected CellPaneGrid<T> getGrid() {\n\t\treturn grid;\n\t}", "public View getViewAllPanels()\n\t{\n\t\treturn view;\n\t}", "public View getView() {\n return view;\n }", "public String getGridName() {\n return gridName;\n }", "View getShowReportGraphView();", "private Grid<Movimiento> createGrid() {\n\t\tgrid = new Grid<>();\n\t\tgrid.addThemeVariants(GridVariant.LUMO_NO_BORDER,GridVariant.LUMO_ROW_STRIPES);\n\t\t\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\n\t\tgrid.addComponentColumn(c -> new IconoMovimientoTarjeta(c))\n\t\t.setWidth(\"100px\").setHeader(\"Tarjeta\").setFlexGrow(1);\n\t\tgrid.addColumn(c -> c.getCantidad()+\" €\").setHeader(\"Cantidad\").setFlexGrow(1);\n grid.addColumn(c -> c.getConcepto()).setHeader(\"Concepto\").setFlexGrow(1);\n grid.addColumn(c -> dateFormat.format(c.getFecha())).setHeader(\"Fecha\").setWidth(\"125px\").setFlexGrow(0);\n \n return grid;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_home_new, container, false);\n gridView = (GridView) view.findViewById(R.id.new_gridview);\n gridView.setAdapter(new GridAdapter());\n return view;\n }", "public void load_grid(){\n RecyclerView moduleRecycler = (RecyclerView) findViewById(R.id.semestre_recycler);\n EtudiantSemestreRecycler adapter = new EtudiantSemestreRecycler(this, semestres);\n moduleRecycler.setAdapter(adapter);\n\n LinearLayoutManager manager = new LinearLayoutManager(this);\n manager.setOrientation(RecyclerView.VERTICAL);\n moduleRecycler.setLayoutManager(manager);\n }", "public GraphView getVisibleView() {\r\n\t\treturn graphModel.getVisibleView();\r\n\t}", "public AddSingleStatsView getView(){\r\n\t\treturn view;\r\n\t}", "@Override\n\tpublic View getView() {\n\t\treturn super.getView();\n\t}", "public TetrisGrid getGrid()\r\n\t{\r\n\t\treturn grid;\r\n\t}", "public ViewIdentificator getView() {\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_cars, container, false);\n /*gridViewAllCars = (GridView)rootView.findViewById(R.id.gridViewAllCars);\n ArrayAdapter<Image> arrayAdapterCarsImages = new ArrayAdapter<Image>(getContext(), android.R.layout.simple_list_item_1);\n ArrayAdapter<String> arrayAdapterCarsName = new ArrayAdapter<String>(getContext(), android.R.layout.simple_list_item_1);\n gridViewAllCars.setAdapter(arrayAdapterCarsImages);*/\n\n return rootView;\n }", "@Override\n\tpublic int getView() {\n\t\treturn R.layout.activity_topnews;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.time_tab_fragment, container, false);\n final GridView gridView = (GridView) view.findViewById(R.id.time_tab_gridview);\n GridViewAdaptor adaptor = new GridViewAdaptor(gridView, BitmapFactory.decodeResource(getResources(), R.drawable.blank));\n inflater.inflate(R.layout.time_tab_fragment, container, false);\n gridView.setAdapter(adaptor);\n\n ArrayList<GridViewItem> gridViewItems = LocalImageManager.getTimeTabGridViewItemList(getContext());\n for(int i = 0;i < gridViewItems.size(); i++)\n adaptor.addItem(gridViewItems.get(i));\n\n final ArrayList<String> imagepath = LocalImageManager.getAllImagePath(getContext(), \"DESC\");\n\n gridView.setOnItemClickListener(new AdapterView.OnItemClickListener(){\n @Override\n public void onItemClick(AdapterView parent, View v, int position, long id){\n String selectedimage = imagepath.get(position);\n\n Intent intent = new Intent(getActivity(), GalleryActivity.class);\n intent.putExtra(\"filepath\", selectedimage);\n startActivity(intent);\n\n }\n });\n return view;\n }", "private void loadGridView() {\n sortAppsList();\n\n // Create the array adapter\n arrayAdapter = new AppArrayAdapter(getActivity(), R.layout.list_item, appsList, getTag());\n appsView.setAdapter(arrayAdapter);\n }", "public GridPanel getCurrentGraphPanel()\n\t{\n\t\tfor (Component comp : this.getComponents()) {\n\t\t\tif (comp.isVisible()) {\n\t\t\t\treturn (GridPanel) comp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n public View getView() {\r\n return mBaseView;\r\n }", "public boolean isShowGrid()\n {\n return showGrid;\n }", "@Override public JPanel getGraphicalView() {\n return getBrowser().getDrbdGraph().getGraphPanel();\n }", "@Override\n\tprotected String getView() {\n\t\treturn ORSView.COLLEGE_LIST_VIEW;\n\t}", "public int getViewType()\n {\n return this.viewType;\n }", "public CellGrid getCellGrid() {\n return cellGrid;\n }", "Views getViews();", "@Override\n public MyHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.grid_tab, parent, false);\n MyHolder vh = new MyHolder(view);\n return vh;\n }", "@Override\r\n\tpublic int getCount() {\n\t\treturn grid_names.size();\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view= inflater.inflate(R.layout.fragment_favorite, container, false);\n favGrid= (GridView) view.findViewById(R.id.gridView2);\n setHasOptionsMenu(true);\n\n\n return view;\n }", "private void initializeGrdView() {\n\t\tgridView.setOnItemClickListener(onPostcardClickListener);\n\t\tgridView.setAdapter(adapter);\n\t}", "@Override\n public View getView()\n {\n return view;\n }", "public void fillCategoryGrid(){\n grid = (GridView) findViewById(R.id.category_grid);\n categoriesAdapter = new GridArrayAdapter(this, R.layout.categories_grid_button, categories);\n grid.setAdapter(categoriesAdapter);\n }", "public final Paint getGridPaint() {\n return gridPaint;\n }", "public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){\n\t\treturn inflater.inflate(R.layout.gridview_behind, null);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_news, container, false);\n GridView gridview = (GridView) view.findViewById(R.id.gridview);\n\n List<ItemObject> allItems = getAllItemObject();\n NewsAdapter newsAdapter = new NewsAdapter(getActivity(), allItems);\n gridview.setAdapter(newsAdapter);\n\n gridview.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Toast.makeText(getActivity(), \"Position: \" + position, Toast.LENGTH_SHORT).show();\n }\n });\n return view;\n }", "public String getView();", "public String getView();", "public HBox getView() {\n return this;\n }", "public TreeViewer getTreeView() {\n\t\t// on CM CubridNavigatorView navigatorView =\n\t\t// CubridNavigatorView.getNavigatorView(\"com.cubrid.cubridmanager.host.navigator\");\n\t\t// CubridNavigatorView navigatorView =\n\t\t// CubridNavigatorView.getNavigatorView(CubridQueryNavigatorView.ID);\n\t\t// return navigatorView.getViewer();\n\t\treturn null;\n\t}", "private void initView() {\n mGridView = (GridView) view.findViewById(R.id.gridViewTables);\n mAdapter = new TableManageAdapter(getActivity(), MainScreenActivity.CHANGE_TABLE_FRAGMENT);\n mGridView.setAdapter(mAdapter);\n mGridView.setOnItemClickListener(new OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n // TODO Auto-generated method stub\n mAdapter.setSelectPosition(position);\n if (mAdapter.getSelectTable() != null) {\n if (mAdapter.getSelectTable().lock) {\n Toast.makeText(getActivity(),\"餐桌被锁\",Toast.LENGTH_LONG).show();\n return;\n }\n mAdapter.notifyDataSetChanged();\n mChangeTableFragment.displayView(mChangeTableFragment.SECOND_STEP);\n }\n }\n });\n }", "String getViewClass();", "@Override\n public View initView() {\n\n View picture_menu_page = View.inflate(mActivity, R.layout.picture_menu_page, null);\n\n lv_pitruemenupage_content = (ListView) picture_menu_page.findViewById(R.id.lv_pitruemenupage_content);\n\n gv_pitruemenupage_content = (GridView) picture_menu_page.findViewById(R.id.gv_pitruemenupage_content);\n return picture_menu_page;\n\n }", "protected BattleGrid getGrid() {\n return grid;\n }", "default View getView() {\n return null;\n }", "public int[][] getGrid()\n {\n return grid;\n }", "public GroupManager getViews() {\n\t\treturn logic.getViews();\n\t}", "com.google.monitoring.dashboard.v1.GridLayout getGridLayout();", "private JTable getGridmapTable() {\n if (gridmapTable == null) {\n gridmapTable = new GridMapTable();\n }\n return gridmapTable;\n }", "GridType createGridType();", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n ButterKnife.bind(this, view);\n\n if (savedInstanceState == null) {\n gridView = view.findViewById(R.id.gridview);\n initGridView();\n }\n\n return view;\n }", "public JTable getTable() { return viewTable;}", "private JPanel getContent()\r\n\t{\r\n\r\n\t\tJPanel pane = new JPanel();\r\n\t\tpane.setLayout(new GridBagLayout());\r\n\t\t\t\t\r\n\t\tGridBagConstraints c = new GridBagConstraints();\r\n\t\t\r\n\t\tc.insets = new Insets(10, 5, 0, 5);\r\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tc.weightx =1.0;\r\n\t\tc.gridy = 0;\r\n\t\tc.gridx = 0;\r\n\t\tpane.add(new CustLabel(\"Risikostrategie für die Bestellung\"),c);\r\n\t\t\r\n\t\tc.gridy = 1;\r\n\t\tc.gridx = 0;\r\n\t\tpane.add(new OrderRiskPane(),c);\r\n\t\t\r\n\t\tc.insets.top=30;\t\r\n\t\tc.gridy = 2;\r\n\t\tc.gridx = 0;\r\n\t\tpane.add(new CustLabel(\"Überstunden\"),c);\r\n\t\t\r\n\t\tc.insets.top=10;\t\r\n\t\tc.gridy = 3;\r\n\t\tc.gridx = 0;\r\n\t\tpane.add(new OvertimePane(),c);\r\n\t\t\r\n\t\treturn pane;\r\n\t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.activity_main, container, false);\n\t\t\n\t\tmGoodsAdapter = new GoodsItemAdapter(mContext, \n\t\t\t\tR.id.imageView1, \n\t\t\t\tGoodsItemManager.instance().getGoodsItems());\n\t\t\n\t\t\n\t\t//mAdapter = new SGVAdapter(this);\n mSGV = (StaggeredGridView) view.findViewById(R.id.grid);\n //mSGV.setColumnCount(-1);\n //mSGV.setAdapter(mAdapter);\n mSGV.setAdapter(mGoodsAdapter);\n //mSGV.setAdapter(new EndlessGoodsItemAdapter(this, mGoodsAdapter, R.id.textView1));\n mSGV.setItemMargin(10);\n mGoodsAdapter.notifyDataSetChanged();\n \n mProgress = (ProgressBar) view.findViewById(R.id.progress);\n\n\t\treturn view;\n\t}", "private RGridBagLayoutPane getDatabasePane() {\n if (databasePane == null) {\n ULCTitledBorder ULCTitledBorder2 =\n BorderFactory.createTitledBorder(null, \"Database\", ULCTitledBorder.LEADING, ULCTitledBorder.DEFAULT_POSITION,\n new Font(\"Tahoma\", Font.PLAIN, 11), new Color(23, 64, 140));\n ULCTitledBorder2.setTitle(\"<%=ivy.cms.co(\\\"/Dialogs/about/databaseTitle\\\")%>\");\n ULCTitledBorder2.setBorder(null);\n RFiller filler1 = new RFiller();\n filler1\n .setStyleProperties(\"{/usePreferredSizeAsExactSize \\\"true\\\"/preferredSizeWidth \\\"135\\\"/preferredSizeHeight \\\"0\\\"}\");\n databasePane = new RGridBagLayoutPane();\n databasePane.setName(\"databasePane\");\n databasePane.setBorder(BorderFactory.createTitledBorder(null, \"Database\", ULCTitledBorder.LEADING,\n ULCTitledBorder.DEFAULT_POSITION, new Font(\"Tahoma\", Font.PLAIN, 11), new Color(23, 64, 140)));\n databasePane.setStyleProperties(\"{/fill \\\"HORIZONTAL\\\"/weightY \\\"0\\\"/insetsLeft \\\"5\\\"}\");\n databasePane.setBorder(ULCTitledBorder2);\n databasePane.add(getDbProductLabel(), new com.ulcjava.base.application.GridBagConstraints(0, 1, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(getDbSystemLabel(), new com.ulcjava.base.application.GridBagConstraints(0, 0, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(getDbSystemTextField(), new com.ulcjava.base.application.GridBagConstraints(1, 0, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(getDbProductTextField(), new com.ulcjava.base.application.GridBagConstraints(1, 1, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(getDbVersionLabel(), new com.ulcjava.base.application.GridBagConstraints(0, 2, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(getDbVersionTextField(), new com.ulcjava.base.application.GridBagConstraints(1, 2, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(filler1, new com.ulcjava.base.application.GridBagConstraints(0, 3, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n }\n return databasePane;\n }", "public JPanel getPanel() { return gds; }", "@Override public void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t Activity acti = getActivity ();\n\t //Resources res = a.getResources ();\n\n\t View rootView = getView (); \n\t\tGridView gridview = (GridView) rootView.findViewById (R.id.gridview);\n\n\t // DisplayMetrics metrics = new DisplayMetrics(); //mot cau truc cua adroid de biet thiet bi co nhung dac tinh gi: vi du kich co man hinh, do phan giai...\n\t //a.getWindowManager().getDefaultDisplay().getMetrics(metrics);\n\n\t if (gridview == null) Log.d (\"DEBUG\", \"Unable to locate the gridview.\"); // dung de log lai, debug loi cho de dang\n\t else {\n\t // ket noi voi gridview bang adapter \n\t gridview.setAdapter (new GridImageAdapter (acti, mList_image, mFirstImage, mImageCount, R.integer.cell_width, R.integer.cell_height, array, num_vote));\n\t //hay co the su dung cau lenh nay, nhung se phai chinh kich co cell ben GridImageAdapter.java\n\t //muon chinh kich co hinh, ta phai chinh kich co cua cell, roi moi den kich co cua hinh trong dimens.xml\n\t //gridview.setAdapter (new GridImageAdapter (acti, mList_image, mFirstImage, mImageCount));\n\t // Arrange it so a long click on an item in the grid shows the topic associated with the image.\n\t /* gridview.setOnItemLongClickListener(new OnItemLongClickListener() {\n\t public boolean onItemLongClick(AdapterView<?> parent, View v, int position, long id) {\n\t showTopic (mFirstImage + position);\n\t\t return true;\n\t }\n\t });*/\n\n\t }\n\t}", "public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position,convertView,parent);\n\n // Convert the view as a TextView widget\n TextView tv = (TextView) view;\n\n //tv.setTextColor(Color.DKGRAY);\n\n // Set the layout parameters for TextView widget\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(\n RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT\n );\n tv.setLayoutParams(lp);\n\n // Get the TextView LayoutParams\n RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)tv.getLayoutParams();\n\n // Set the width of TextView widget (item of GridView)\n /*\n IMPORTANT\n Adjust the TextView widget width depending\n on GridView width and number of columns.\n\n GridView width / Number of columns = TextView width.\n\n Also calculate the GridView padding, margins, vertical spacing\n and horizontal spacing.\n */\n\n\n Resources r = reports2.this.getResources();\n int px = (int) (TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, 100, r.getDisplayMetrics()));\n // tv.setLayoutParams(new GridView.LayoutParams((width/10)*6, 50));\n\n // if (position==0 || position==5) {\n // params.width = px/2; // getPixelsFromDPs(EpiloghEid.this,168);\n // tv.setLayoutParams(new GridView.LayoutParams((px*6), 100));\n // }else{\n params.width = px; // getPixelsFromDPs(EpiloghEid.this,168);\n // }\n\n\n // Set the TextView layout parameters\n tv.setLayoutParams(params);\n\n // Display TextView text in center position\n tv.setGravity(Gravity.CENTER);\n\n // Set the TextView text font family and text size\n tv.setTypeface(Typeface.SANS_SERIF, Typeface.NORMAL);\n tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12);\n\n // Set the TextView text (GridView item text)\n tv.setText(values.get(position));\n\n // Set the TextView background color\n tv.setBackgroundColor(Color.parseColor(\"#d9d5dc\"));\n\n // Return the TextView widget as GridView item\n return tv;\n }", "public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position,convertView,parent);\n\n // Convert the view as a TextView widget\n TextView tv = (TextView) view;\n\n //tv.setTextColor(Color.DKGRAY);\n\n // Set the layout parameters for TextView widget\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(\n RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT\n );\n tv.setLayoutParams(lp);\n\n // Get the TextView LayoutParams\n RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)tv.getLayoutParams();\n\n // Set the width of TextView widget (item of GridView)\n /*\n IMPORTANT\n Adjust the TextView widget width depending\n on GridView width and number of columns.\n\n GridView width / Number of columns = TextView width.\n\n Also calculate the GridView padding, margins, vertical spacing\n and horizontal spacing.\n */\n\n\n Resources r = reports2.this.getResources();\n int px = (int) (TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, 100, r.getDisplayMetrics()));\n // tv.setLayoutParams(new GridView.LayoutParams((width/10)*6, 50));\n\n // if (position==0 || position==5) {\n // params.width = px/2; // getPixelsFromDPs(EpiloghEid.this,168);\n // tv.setLayoutParams(new GridView.LayoutParams((px*6), 100));\n // }else{\n params.width = px; // getPixelsFromDPs(EpiloghEid.this,168);\n // }\n\n\n // Set the TextView layout parameters\n tv.setLayoutParams(params);\n\n // Display TextView text in center position\n tv.setGravity(Gravity.CENTER);\n\n // Set the TextView text font family and text size\n tv.setTypeface(Typeface.SANS_SERIF, Typeface.NORMAL);\n tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12);\n\n // Set the TextView text (GridView item text)\n tv.setText(values.get(position));\n\n // Set the TextView background color\n tv.setBackgroundColor(Color.parseColor(\"#d9d5dc\"));\n\n // Return the TextView widget as GridView item\n return tv;\n }", "public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position,convertView,parent);\n\n // Convert the view as a TextView widget\n TextView tv = (TextView) view;\n\n //tv.setTextColor(Color.DKGRAY);\n\n // Set the layout parameters for TextView widget\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(\n RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT\n );\n tv.setLayoutParams(lp);\n\n // Get the TextView LayoutParams\n RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)tv.getLayoutParams();\n\n // Set the width of TextView widget (item of GridView)\n /*\n IMPORTANT\n Adjust the TextView widget width depending\n on GridView width and number of columns.\n\n GridView width / Number of columns = TextView width.\n\n Also calculate the GridView padding, margins, vertical spacing\n and horizontal spacing.\n */\n\n\n Resources r = reports2.this.getResources();\n int px = (int) (TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, 100, r.getDisplayMetrics()));\n // tv.setLayoutParams(new GridView.LayoutParams((width/10)*6, 50));\n\n // if (position==0 || position==5) {\n // params.width = px/2; // getPixelsFromDPs(EpiloghEid.this,168);\n // tv.setLayoutParams(new GridView.LayoutParams((px*6), 100));\n // }else{\n params.width = px; // getPixelsFromDPs(EpiloghEid.this,168);\n // }\n\n\n // Set the TextView layout parameters\n tv.setLayoutParams(params);\n\n // Display TextView text in center position\n tv.setGravity(Gravity.CENTER);\n\n // Set the TextView text font family and text size\n tv.setTypeface(Typeface.SANS_SERIF, Typeface.NORMAL);\n tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12);\n\n // Set the TextView text (GridView item text)\n tv.setText(values.get(position));\n\n // Set the TextView background color\n tv.setBackgroundColor(Color.parseColor(\"#d9d5dc\"));\n\n // Return the TextView widget as GridView item\n return tv;\n }", "public ViewObjectImpl getDcmTemplateColumnView() {\r\n return (ViewObjectImpl)findViewObject(\"DcmTemplateColumnView\");\r\n }", "private GridPane inicializarPanelGrid() {\n GridPane gridPane = new GridPane();\n\n // Position the pane at the center of the screen, both vertically and horizontally\n gridPane.setAlignment(Pos.CENTER);\n\n // Set a padding of 20px on each side\n gridPane.setPadding(new Insets(40, 40, 40, 40));\n\n // Set the horizontal gap between columns\n gridPane.setHgap(10);\n\n // Set the vertical gap between rows\n gridPane.setVgap(10);\n\n // Add Column Constraints\n // columnOneConstraints will be applied to all the nodes placed in column one.\n ColumnConstraints columnOneConstraints = new ColumnConstraints(100, 100, Double.MAX_VALUE);\n columnOneConstraints.setHalignment(HPos.RIGHT);\n\n // columnTwoConstraints will be applied to all the nodes placed in column two.\n ColumnConstraints columnTwoConstrains = new ColumnConstraints(200, 200, Double.MAX_VALUE);\n columnTwoConstrains.setHgrow(Priority.ALWAYS);\n\n gridPane.getColumnConstraints().addAll(columnOneConstraints, columnTwoConstrains);\n\n return gridPane;\n }", "@Override\n public javax.swing.JComponent getGUIView(AccountBook book) {\n synchronized (this) {\n if (tablePane == null) {\n this.book = book;\n getPreferences();\n table = new SGTable(mdGUI, this, book, true);\n tablePane = new SGPanel(mdGUI, table);\n }\n return tablePane;\n }\n }", "private void showApps() {\n\n gridView = (GridView) findViewById(R.id.gridView1);\n\n ArrayAdapter<App> adapter = new ArrayAdapter<App>(this, R.layout.grid_item, appList) {\n @Override\n public View getView(int position, View convertView, ViewGroup parent) {\n if (convertView == null) {\n convertView = getLayoutInflater().inflate(R.layout.grid_item, null);\n }\n\n ImageView appIcon = (ImageView) convertView\n .findViewById(R.id.imageView1);\n appIcon.setImageDrawable(appList.get(position).icon);\n\n TextView appName = (TextView) convertView\n .findViewById(R.id.textView1);\n appName.setText(appList.get(position).appName);\n\n return convertView;\n }\n };\n\n gridView.setAdapter(adapter);\n }", "int getViewId();", "private void findViews(View view) {\n list = (RecyclerView)view.findViewById(R.id.listview);\n\n GridLayoutManager layoutManager = new GridLayoutManager(getActivity(), 2);\n\n list.setLayoutManager(layoutManager);\n list.setHasFixedSize(true);\n\n// imageView = (PhotoDraweeView) view.findViewById(R.id.imageView);\n// imageGallery = (RelativeLayout) view.findViewById(R.id.imageGallery);\n// imageGallery.setVisibility(View.GONE);\n }", "public BrowsePanelView getBrowsePanel() {\n\t\treturn navpanelview.getBrowseView();\n\t}", "public static CellView getCellView(ImageView chessView)\n {\n for (int i = 0; i < cellViewList.size(); i++)\n {\n if((cellViewList.get(i).getLayoutX() == (chessView.getLayoutX() - 4))\n && (cellViewList.get(i).getLayoutY() == (chessView.getLayoutY() - 4)))\n return cellViewList.get(i);\n }\n return null;\n }", "abstract GridPane createSearchDashBoard();", "GridPanel create(GridDataModel model);", "public GraphView getGraphView() {\n return this.graphView;\n }", "public View getView() {\n // Create view lazily only once it's needed\n if (this.furnitureView == null) {\n this.furnitureView = this.viewFactory.createFurnitureView(this.home, this.preferences, this);\n }\n return this.furnitureView;\n }", "public int getGridRows() \n { \n return gridRows; \n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View fragmentView = inflater.inflate(R.layout.fragment_home, container, false);\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(getContext(),android.R.layout.simple_list_item_1, android.R.id.text1, namanegara);\n\n GridView gv = (GridView) fragmentView.findViewById(R.id.gViewMenu);\n\n gv.setAdapter(new GambarMenuAdapter(getContext()));\n gv.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Toast.makeText(getContext(), \"Memilih : \"+ position, Toast.LENGTH_LONG).show();\n }\n });\n\n return fragmentView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_timeslots, container, false);\n\n timeSlotGrid = (GridView) view.findViewById(R.id.time_slot_grid);\n\n return view;\n }", "public View getView(int n) {\n return view;\n }" ]
[ "0.7468188", "0.69626814", "0.691134", "0.6867767", "0.6636331", "0.6626716", "0.6543093", "0.652676", "0.636003", "0.62851626", "0.62670535", "0.6260248", "0.610208", "0.6081477", "0.6048073", "0.6046647", "0.6001127", "0.5943593", "0.59428954", "0.5933633", "0.59309804", "0.59270644", "0.5922754", "0.58822286", "0.5866658", "0.586563", "0.58608365", "0.58521813", "0.5850457", "0.58334637", "0.58331966", "0.583254", "0.5820381", "0.5803731", "0.57917553", "0.57896286", "0.578689", "0.5781869", "0.5763783", "0.5760651", "0.5751384", "0.57325834", "0.5726434", "0.5719431", "0.5712397", "0.5703012", "0.5695829", "0.56843084", "0.56436926", "0.5639569", "0.56280756", "0.5624201", "0.5619268", "0.5618994", "0.56123036", "0.56034935", "0.5595422", "0.5591032", "0.55898494", "0.5585716", "0.5576521", "0.55750275", "0.55750275", "0.5568656", "0.55643255", "0.5563498", "0.5560315", "0.55464286", "0.554407", "0.55366826", "0.5527259", "0.55159664", "0.5515701", "0.5513997", "0.55136776", "0.5501727", "0.5494752", "0.5473521", "0.54684544", "0.5461602", "0.5457461", "0.5455769", "0.54546756", "0.54546756", "0.54546756", "0.54461867", "0.5440726", "0.5440335", "0.5434045", "0.5427834", "0.542555", "0.54227287", "0.542265", "0.5422597", "0.54079556", "0.53949285", "0.5394755", "0.53940254", "0.5380576", "0.5379002", "0.5377992" ]
0.0
-1
Making sure the game hasn't ended and that its a proper timing to let the player make his turn.
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { if (mGame.getmGameStatus() == Game.GameStatus.ONGOING && mIsAllowedToPlay) { Log.d("Playable Tiles" , mPlayableTiles.toString()); Log.d("Position" , "" + position); // If this tile is playable: if (mPlayableTiles.contains(position)){ mIsAllowedToPlay = false; // Disabling the player to play for now. if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start(); // Playing proper sound. // Cancel Guidelines: if(mGuidelines != null) { mGuidelines.cancel(); mGuidelines = null; // refresh tiles' color: for(int i = 0; i < mGrid.getChildCount(); i++){ mGrid.getChildAt(i).setBackgroundResource(R.drawable.button_tile); } } // Making the play and updating grid: mGame.playTile(position/mGame.getmBoard().getNumberOfCols(),position%mGame.getmBoard().getNumberOfCols()); ((TileAdapter)mGrid.getAdapter()).notifyDataSetChanged(); // Updating Counters: mBlackCounter.setText("" + mGame.getmBoard().getmNumberOfBlackPieces()); mWhiteCounter.setText("" + mGame.getmBoard().getmNumberOfWhitePieces()); // While the UI changes, make a proper sound for flipping pieces (after a short delay): // And then move on (update UI, let opponent play next, end game, etc.) new Thread(new Runnable() { @Override public void run() { try { Thread.sleep(200); } catch (InterruptedException e) { e.printStackTrace(); } if(mSoundStatus.equals(Constants.ON)) mFlipPieceSound.start(); // Playing proper sound. try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } // Now back to UI thread in order to update UI: runOnUiThread(new Runnable() { @Override public void run() { // If game is still ongoing: if(mGame.getmGameStatus() == Game.GameStatus.ONGOING){ // If turn was toggled: if(mGame.getmCurrentlyPlaying() != mPlayerGamePiece) { // Updating colors for profile areas: mOpponentProfileArea.setBackgroundResource(R.drawable.user_area_green); mOpponentUsername.setBackgroundResource(R.color.colorGreenDarkAlpha); mPlayerProfileArea.setBackgroundResource(R.drawable.user_area_gray); mPlayerUsername.setBackgroundResource(R.color.colorGrayDarkAlpha); // Now A.I. opponent should make a move: makeAIMove(); } // Otherwise, player gets another turn: else{ mPlayableTiles = mGame.getmBoard().getPlayableTiles(mPlayerGamePiece); showGuidelines(); mIsAllowedToPlay = true; } } else{ // Otherwise, game has ended. handleGameEnding(); } } }); } }).start(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void doLastTurn()\n\t{\n\t\tInteger time = turn;\n\n\t\tstartEnterScore(time);\n\t\tdisposeFrameMap();\n\n\t\ttimer.cancel();\n\t}", "private void gameTimerOnFinish() {\n if (currentScreenGameState == GameState.PLAYING) {\n stopGame();\n }\n }", "public void inTurn() {\n\t\tthis.timer = new Timer();\n\t\ttimer.schedule(new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfinishTurn();\n\t\t\t}\n\t\t}, turnMaxSeconds * 1000);\n\n\t}", "private void inGame() {\n\n if (!ingame) {\n timer.stop();\n\n }\n }", "@Override\n\tpublic boolean isGameTied() {\t\n\t\treturn false;\n\t}", "private void playTurn()\n {\n try\n {\n XMLHandler.saveGame(game, GAME_CLONE_PATH);\n }\n catch(IOException | JAXBException | SAXException ex)\n {\n // TODO... ConsoleUtils.message(\"An internal save error has occured, terminating current game\");\n gameEnded = true;\n return;\n }\n \n moveCycle();\n \n if (!game.validateGame()) \n {\n IllegalBoardPenalty();\n }\n \n String gameOverMessage = game.isGameOver();\n if (gameOverMessage != null) \n {\n //TODO: ConsoleUtils.message(gameOverMessage);\n gameEnded = true;\n }\n \n game.switchPlayer();\n }", "private void doGameTurn()\n\t{\n\t\tif (!lost && !won)\n\t\t{\n\t\t\trefreshMapAndFrame();\n\t\t\t\n\t\t\tcheckPlayerCondition();\n\t\t\tElementAccess.openExit();\n\t\t\tSystem.out.println(turn);\n\t\t}\n\t\telse if (lost)\n\t\t{\n\t\t\tSound.lost();\n\t\t\trefreshMapAndFrame();\n\n\t\t\tif (playerHasLost())\n\t\t\t{\n\t\t\t\tstop = true;\n\t\t\t}\n\n\t\t\tMapInstance.getInstance().levelRestart();\n\t\t\tlost = false;\n\t\t}\n\t\telse if (won)\n\t\t{\n\t\t\tSound.won();\n\t\t\trefreshMapAndFrame();\n\n\t\t\twon = false;\n\t\t\tif (playerNotInLevel())\n\t\t\t{\n\t\t\t\tstop = true;\n\t\t\t}\n\n\t\t\tnextLevel();\n\t\t\tMapInstance.getInstance().levelRestart();\n\t\t}\n\t}", "public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }", "public void finishTurn() {\n\t\tthis.cancelTimer();\n\t\t// if any hero is dead\n\t\tif (!opponents[0].isAlive() || !opponents[1].isAlive()) {\n\t\t\t// end the game\n\t\t\tfinishGame();\n\t\t} else {\n\t\t\t// switch turns\n\n\t\t\topponents[activeHero].setIsTurn(false);\n\t\t\topponents[activeHero].deselectAll();\n\n\t\t\tswitch (activeHero) {\n\t\t\tcase 0:\n\t\t\t\tactiveHero = 1;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tactiveHero = 0;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tstartTurn(opponents[activeHero]);\n\t\t}\n\t}", "public void endTurn() {\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Started endTurn() for player \"+currentPlayer.getNumber());\r\n\t\tturnIsEnding = true;\r\n\r\n\t\t// End turn restrictions\r\n\t\tif (!currentPlayer.isDead() && !currentPlayer.isFree() && !currentPlayer.hasQuit()) {\r\n\t\t\tif (currentPlayer.getPlayArea().getNonPlayedSize() > 0) {\r\n\t\t\t\tgameChannel.sendMessage(\"**[ERROR]** Cannot end turn until all cards in play area are played\").queue();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (mustChoose.size() > 0) {\r\n\t\t\t\tgameChannel.sendMessage(\"**[ERROR]** Cannot end turn until all choices are made\").queue();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (mustTrash.size() > 0) {\r\n\t\t\t\tgameChannel.sendMessage(\"**[ERROR]** Cannot end turn until all trashes are made\").queue();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t// Don't need to discard\r\n\t\t}\r\n\t\t\r\n\t\t// Mass deletes\r\n\t\tclearMessages();\r\n\t\t\r\n\t\t// If just escaped, send message after clearing\r\n\t\tif (currentPlayer.getCurrentRoom() == 0 && currentPlayer.getPiece().getX() == GlobalVars.playerCoordsPerRoom[39][0]) {\r\n\t\t\t// Update room\r\n\t\t\tcurrentPlayer.setCurrentRoom(39);\r\n\t\t\tif (firstEscapee == currentPlayer) {\r\n\t\t\t\tgameChannel.sendMessage(\":helicopter: **\"+currentName+\"** was the first to escape! They received a **20** :star: **Mastery Token**\\n:skull: Only **4** turn(s) left!\").queue();\r\n\t\t\t} else {\r\n\t\t\t\tgameChannel.sendMessage(\":helicopter: **\"+currentName+\"** escaped in time! They received a **20** :star: **Mastery Token**\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Set cards in PlayArea to not played for next time, Undos the Discarded tag\r\n\t\tfor (int i = 0; i < currentPlayer.getPlayArea().getSize(); i++) {\r\n\t\t\tcurrentPlayer.getPlayArea().getCard(i).setPlayed(false);\r\n\t\t\tif (currentPlayer.getPlayArea().getCard(i).toStringHand().contentEquals(\"*[Discarded]*\")) currentPlayer.getPlayArea().getCard(i).setStringInHand();\r\n\t\t}\r\n\t\t\r\n\t\t// Clear swords, skill, boots, etc\r\n\t\tcurrentPlayer.endOfTurnReset();\r\n\t\tmustDiscard.clear();\r\n\t\t\r\n\t\t// Replaces cards in dungeon row. Only one attack per turn\r\n\t\tif (!status.contentEquals(\"over\")) {\r\n\t\t\tboolean hasAttackedThisTurn = false;\r\n\t\t\tfor (int i = 0; i < 6; i++) {\r\n\t\t\t\t// Checks to see if it should replace card\r\n\t\t\t\tif (dungeonRow[i].isBought()) {\r\n\t\t\t\t\tdungeonRow[i] = mainDeck.getNext();\r\n\t\t\t\t\tif (dungeonRow[i].isDragonAttack() && !hasAttackedThisTurn) {\r\n\t\t\t\t\t\tdragonAttack(cubesPerLevel[attackLevel]);\r\n\t\t\t\t\t\thasAttackedThisTurn = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (dungeonRow[i].isHasArrive()) {\r\n\t\t\t\t\t\tdoArriveEffect(dungeonRow[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmainDeck.removeTop();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Instantly go on to next player if no dragon attack\r\n\t\t\tif (!hasAttackedThisTurn) {\r\n\t\t\t\tdetermineNextPlayer();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void endTurn() {\n\t\tturnEnd = false;\n\t\tmadeMove = false;\n\t\tcurrentPlayer.resetUndos();\n\t\tif (currentPlayer == player1) {\n\t\t\tcurrentPlayer = player2;\n\t\t} else {\n\t\t\tcurrentPlayer = player1;\n\t\t}\n\t\t//printBoard();\n\t\tSystem.out.println(\"It is now \" + currentPlayer.getName() + \"'s turn\");\n\t}", "public void endOfTurn();", "public abstract void userTurnEnds(long ms);", "public void finishGame(){\r\n\t\t\t\tgameStarted = false;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tSystem.out.println(\"Tempo scaduto.\");\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif(yourTurn) {\r\n\t\t\t\t\t\tendGame(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tendGame(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch(Exception e) {\r\n\t\t\t\t} finally {\r\n\t\t\t\t\ttimer.cancel();\r\n\t\t\t\t\ttimer = null;\r\n\t\t\t\t\tendTurn = null;\r\n\t\t\t\t}\r\n\t\t\t}", "void endGame () {\n gameOver = true;\n System.out.println(\"Game over\");\n timer.cancel();\n }", "public boolean gameWon(){\n return false;\n }", "boolean endOfGame() {\n return false;\n }", "private void finaliseGame() {\r\n gameOn = false;\r\n if(bestAnswer==null) {\r\n target.reply(\"Nobody got an answer. The best answer was: \" + CountdownSolver.Solve( sourceNumbers, targetNumber ));\r\n return;\r\n }\r\n if( bestAnswer.getAnswer() == bestPossibleAnswer ) {\r\n String reply = Constants.BOLD + bestAnswer.getUsername() + Constants.BOLD\r\n + \" has won with \" + bestAnswer.getAnswer() + \"!\";\r\n if( bestPossibleAnswer!=targetNumber)\r\n reply+=\" This was the best possible answer.\";\r\n target.reply(reply);\r\n } else {\r\n target.reply( \"The best answer was \" + bestAnswer.getAnswer() + \" by \" + bestAnswer.getUsername() + \".\"\r\n + \" But the best possible answer was: \" + CountdownSolver.Solve( sourceNumbers, targetNumber ));\r\n }\r\n bestAnswer=null;\r\n runner.stop();\r\n }", "protected abstract boolean isGameFinished();", "public void newTurnCountdown() {\n newTurn = true;\n newTurnTimer = 77;\n }", "public void gameLoop() {\n while (!d_TournamentEnded) {\n d_CurrentPhase.run();\n }\n }", "@Override\n public boolean isWaitingForTurnPhase() {return true;}", "@Override\r\n\tboolean isFinished() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(checkForWin() != -1)\r\n\t\t\treturn true;\r\n\t\telse if(!(hasValidMove(0) || hasValidMove(1)))\r\n\t\t\treturn true; //game draw both are stuck\r\n\t\telse return false;\r\n\t}", "boolean isGameComplete();", "public void timeToCheckWorker() {\n notifyCanMove(this.getCurrentTurn().getCurrentPlayer());\n }", "void waitingForMyTurn();", "public void checkSetPlayerTurn() // Check and if needed set the players turns so it is their turn.\n\t{\n\t\tswitch (totalPlayers) // Determine how many players there are...\n\t\t{\n\t\tcase 2: // For two players...\n\t\t\tswitch (gameState)\n\t\t\t{\n\t\t\tcase twoPlayersNowPlayerOnesTurn: // Make sure it's player one's turn.\n\t\t\t\tplayers.get(0).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tcase twoPlayersNowPlayerTwosTurn: // Make sure it's player two's turn.\n\t\t\t\tplayers.get(1).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}", "private void pauseGame() {\n\t\ttimer.cancel();\n\t}", "public boolean verifyEndGame(Player gamer);", "void askEndTurn();", "public void gameOver(){\n\t\tstatus.setGameStarted(false);\n\t\tstatus.setGameOver(true);\n\t\tgameScreen.doNewGame();\n\t\tsoundMan.StopMusic();\n\t\n\t\t// delay to display \"Game Over\" messa\tprivate Object rand;\n\n\t\tTimer timer = new Timer(3000, new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstatus.setGameOver(false);\n\t\t\t}\n\t\t});\n\t\ttimer.setRepeats(false);\n\t\ttimer.start();\n\t}", "@Test\n void die() {\n getGame().start();\n getGame().move(getPlayer(), Direction.WEST);\n getGame().move(getPlayer(), Direction.WEST);\n assertThat(getPlayer().isAlive()).isFalse();\n verify(observer).levelLost();\n assertThat(getGame().isInProgress()).isFalse();\n }", "boolean isGameSpedUp();", "public void caughtCheating(){\n\t\tinGoodStanding = false;\n\t}", "public void endTurn() {\r\n\t\tPlayer endingPlayer = getCurrentPlayer();\r\n\t\t\r\n\t\t// Show plays and buys during turn change screen\r\n\t\tArrayList<Card> plays = new ArrayList<>();\r\n\t\tArrayList<Card> gains = new ArrayList<>();\r\n\t\tplays.addAll(endingPlayer.deck.duration);\r\n\t\tplays.addAll(endingPlayer.deck.play);\r\n\t\tgains.addAll(endingPlayer.deck.gained);\r\n\t\tif(showGraphics) getGUI().showPlayerBuys(plays, gains);\r\n\t\t\r\n\t\t//Check the card ownership in decks is correct\r\n\t\tfor(Player p : players) {\r\n\t\t\tfor(Card c : p.deck.getDeck()) {\r\n\t\t\t\tif(c.getPlayer() == null) {\r\n\t\t\t\t\tthrow new RuntimeException(c.getName() + \" has no owner, in deck of \"\r\n\t\t\t\t\t\t\t+ p.getPlayerName());\r\n\t\t\t\t}\r\n\t\t\t\tif(!c.getPlayer().equals(p)) {\r\n\t\t\t\t\tthrow new RuntimeException(c.getName() + \" owned by \"\r\n\t\t\t\t\t\t\t+ c.getPlayer().getPlayerName() + \", in deck of \" + p.getPlayerName());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check for duplicated cards\r\n\t\tfor(Player p : players) {\r\n\t\t\tList<Card> deck = p.deck.getDeck();\r\n\t\t\tfor(int i = 0; i < deck.size(); i++) {\r\n\t\t\t\tfor(int j = i + 1; j < deck.size(); j++) {\r\n\t\t\t\t\tif(deck.get(i) == deck.get(j)) {\r\n\t\t\t\t\t\tthrow new RuntimeException(deck.get(i) + \r\n\t\t\t\t\t\t\t\t\" in 2 places in deck of \" + p.getPlayerName());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Run player-specific turn ending things\r\n\t\tgetCurrentPlayer().endTurn();\r\n\r\n\t\t//Change whose turn it is\r\n\t\tif(!extraTurn) {\r\n\t\t\tnextTurn();\r\n\t\t}\r\n\t\textraTurn = false;\r\n\r\n\t\t//Check if the game is over\r\n\t\tif(board.isGameOver()) {\r\n\t\t\tgetClient().stopThreads();\r\n\t\t\tmodels.close();\r\n\t\t\tif(showGraphics) getGUI().showScores();\r\n\t\t\tfor(Player p : players) {\r\n\t\t\t\tif(p.isComputerPlayer()) {\r\n\t\t\t\t\tp.getComputerPlayer().close();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//Change Turn \r\n\t\tif(showGraphics && !getCurrentPlayer().isComputerPlayer()) {\r\n\t\t\tgetGUI().turnNotify();\r\n\t\t}\r\n\r\n\t\t//Resets game phase\r\n\t\tgamePhase = 0;\t\r\n\r\n\t\t//Starts the next person's turn\r\n\t\tgetCurrentPlayer().startTurn();\r\n\t\t\r\n\t\t\r\n\t\t//Save changes to server\r\n\t\tif(showGraphics && getGUI().getMyPlayer().equals(endingPlayer)) {\r\n\t\t\tgetClient().backupGame(this);\r\n\t\t}\r\n\r\n\t\t//Check the decks are correct between computers\r\n\t\tif(showGraphics && getGUI().getMyPlayer().equals(endingPlayer)) {\r\n\t\t\tfor(Player p : players) {\r\n\t\t\t\tgetClient().sendString(\"CHECK \" + p.getPlayerNum() + \" \" + p.deck.toString());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public abstract void systemTurnEnds(long ms);", "public void run() {\n //while player has lives left and did not clear the level, give him another turn\n while ((this.lifeCounter.getValue() != 0) && (this.blockCounter.getValue() != 0)) {\n playOneTurn();\n }\n }", "public void timePassed() {\n this.moveOneStep();\n }", "boolean CanFinishTurn();", "public static void endGameSequence()\n\t{\n\t\ttfBet.setEnabled(false);\n\t\tbtnPlay.setEnabled(false);\n\t\tbtnHit.setEnabled(false);\n\t\tbtnStay.setEnabled(false);\n\t\tbtnDouble.setEnabled(false);\n\t\tlblUpdate.setText(\"Game over! You are out of money!\");\n\t}", "public void startWait() {\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(new TimerTask() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif (server.getNumberOfPlayers() > 0 && !server.gameStartFlag) {\n\t\t\t\t\tserver.runGame();\n\t\t\t\t}\n\t\t\t}\n\t\t}, 120000);\n\t\t// 2min(2*60*1000)\n\t\tsendMessage(\"The game will start 2 minute late\");\n\t}", "@Override\r\n\tpublic void gameLoopLogic(double time) {\n\r\n\t}", "public void gameEnded() {}", "private void gameOver() {\r\n timer.stop();\r\n if (JOptionPane.showConfirmDialog(this, \r\n \"Game Over!\\nDo you want to play again?\",\r\n FORM_TITLE,JOptionPane.YES_NO_OPTION) == \r\n JOptionPane.YES_OPTION) {\r\n startGame();\r\n }\r\n else { \r\n close();\r\n }\r\n }", "@Test\n void testBallStuckAfterTimeOut() {\n assertFalse(goalie.IsBallStuck(ball.getPosition(), 0));\n // test the timer after 5 seconds should be true\n // timer resets\n assertTrue(goalie.IsBallStuck(ball.getPosition(), 5));\n\n // Next call should be false since ball was reset after the first.\n assertFalse(goalie.IsBallStuck(ball.getPosition(),6));\n }", "private void checkTurn(int ticks){\n\t\tif (ticks>40){\n\t\t\t//System.out.println(\"Sorry, you have over-spun. The lock has been reset. Please try again.\");\n\t\t\tthis.reset();\n\t\t}\n\t}", "private void endGame() {\n pauseTimer();\n if (!myGameOver && !myWelcome) {\n final int result = JOptionPane.showOptionDialog(null, \n \"Are you sure you want to end this game?\",\n \"End Current Game\", JOptionPane.YES_NO_OPTION,\n JOptionPane.QUESTION_MESSAGE, null, null,\n JOptionPane.NO_OPTION);\n if (result == JOptionPane.YES_OPTION) {\n myGameOver = true;\n repaint();\n } else {\n startTimer();\n }\n }\n }", "@Override\r\n\tpublic void makeRandonMove() {\r\n\t\tif (randPlayer.getPlayerNumber() == game.getState().getTurn() && !game.getState().isFinished()) game.execute(randPlayer.requestAction(game.getState()));\r\n\t}", "public void sleepCheck() {\n if (area() == null)\n stopActing();\n if (area().closed || area().closeRequested)\n stopActing();\n if (commander.player() == null || commander.player().area() != area()) {\n if (!area().getLabel().equals(\"TITLE\"))\n stopActing();\n } else {\n wakeCheck(commander.player().areaX(), commander.player().areaY());\n }\n }", "@Test\n void invalidPLAYING() {\n getGame().start();\n getGame().start();\n verifyZeroInteractions(observer);\n assertThat(getGame().isInProgress()).isTrue();\n }", "public void newTurnPauseCountdown()\n {\n pauseNewTurn = true;\n pauseNewTurnTimer = 169;\n }", "public void failedChallenge() {\n addGameRound(false);\n playedRounds++;\n updateActivePlayer();\n updateActiveChallenge();\n }", "public void finishGame() {\r\n gameFinished = true;\r\n }", "public void checkGame() {\n\n\t}", "private void checkForGameEnd() {\n\t\tint checkWin = controller.checkForWinner();\n\t\tif(playerType == null && checkWin == 1 || (playerType != null && playerType == checkWin)) {\n\t\t\tgameFinished = true;\n\t\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\t\talert.setTitle(\"VICTORY\");\n\t\t\talert.setHeaderText(\"VICTORY\");\n\t\t\talert.setContentText(\"CONGRATULATIONS! YOU WIN!\");\n\t\t\talert.showAndWait()\n\t\t .filter(response -> response == ButtonType.OK)\n\t\t .ifPresent(response -> formatSystem());\n\t\t\t\n\t\t}else if (playerType == null && checkWin == 2 || (playerType != null && playerType%2 + 1 == checkWin)) {\n\t\t\tgameFinished = true;\n\t\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\t\talert.setTitle(\"DEFEAT\");\n\t\t\talert.setHeaderText(\"DEFEAT\");\n\t\t\talert.setContentText(\"SHAME! YOU LOSE!\");\n\t\t\talert.showAndWait()\n\t\t .filter(response -> response == ButtonType.OK)\n\t\t .ifPresent(response -> formatSystem());\n\t\t\t\n\t\t}else if (controller.checkForTie()) {\n\t\t\tgameFinished = true;\n\t\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\t\talert.setTitle(\"STALEMATE\");\n\t\t\talert.setHeaderText(\"STALEMATE\");\n\t\t\talert.setContentText(\"ALAS! TIE GAME!\");\n\t\t\talert.showAndWait()\n\t\t .filter(response -> response == ButtonType.OK)\n\t\t .ifPresent(response -> formatSystem());\n\t\t}\n\t\t\n\t\tif(playerType != null && gameFinished) {\n\t\t\tSystem.out.println(\"closing connection\");\n\t\t\ttry {\n\t\t\t\tconnection.close();\n\t\t\t}catch (Exception e) {\n\t\t\t\tSystem.out.println(\"ERROR CLOSING\");\n\t\t\t}\n\t\t}\n\t}", "private static void updateGame()\n {\n GameView.gameStatus.setText(\"Score: \" + computerScore + \"-\" + playerScore);\n if (computerScore + playerScore == NUM_CARDS_PER_HAND) {\n if (computerScore > playerScore) {\n GameView.gameText.setText(\"Computer Wins!\");\n Timer.stop = true;\n }\n else if (playerScore > computerScore) {\n GameView.gameText.setText(\"You win!\");\n Timer.stop = true;\n }\n else {\n GameView.gameText.setText(\"Tie game!\"); \n Timer.stop = true;\n }\n }\n }", "public boolean timeUp(){\n return timeAlive == pok.getSpawnTime(); \n }", "public void isGameOver() { \r\n myGameOver = true;\r\n myGamePaused = true; \r\n }", "public void resolveTurnCountdown() {\n resolveTurn = true;\n resolveTurnTimer = 130;\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile(gameTimer > 0 && !Timer.this.gameScene.popUp){\n\t\t\t\t\tcountDown();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tThread.sleep(10);\n\t\t\t\t\t}catch(InterruptedException e){\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\toutOfTime = true;\n\t\t\t}", "private void endTurn() {\n currentTurn = getNextPlayer();\n }", "public void cantPlayGoNext() {\n\t switchTurn();\n }", "@Test\n void win() {\n getGame().start();\n assertThat(getGame().isInProgress()).isTrue();\n getGame().move(getPlayer(), Direction.EAST);\n getGame().move(getPlayer(), Direction.EAST);\n verify(observer).levelWon();\n assertThat(getGame().isInProgress()).isFalse();\n }", "public void performCheckAfterPlayerMove() {\n\t\tagentsMoved += 1;\n\t\t\n\t\tif(agentsMoved == agents) {\n\t\t\troundsPlayed += 1;\n\t\t\tmoveRobots();\n\t\t\tagentsMoved = 0;\n\t\t\t\n\t\t\t//restart game at new level after the robots has moved\n\t\t\tif(roundsPlayed > server.getRoundsPerLevel()) {\n\t\t\t\tHandleCommunication.broadcastToClient(null, server.getConnectedClientList(), SendSetting.NextLevel, server, null);\n\t\t\t\troundsPlayed = 0;\n\t\t\t}\n\t\t}\n\t}", "@Test\n void invalidWON() {\n win();\n getGame().move(getPlayer(), Direction.NORTH);\n getGame().stop();\n getGame().start();\n assertThat(getGame().isInProgress()).isFalse();\n verifyNoMoreInteractions(observer);\n }", "public boolean canEndTurn() {\n\t\tif (hasMoved || hasCaptured) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void endPhase(){\n if(this.actionPhase) {\n this.buyPhase = true;\n this.actionPhase = false;\n }else{\n endTurn();\n }\n }", "public void toggleGameFinished() {\r\n\t\tsetGameFinished(!gameFinished);\r\n\t}", "public static void checkTurnEnd(){\n\t\tboolean end = true;\n\t\tfor (int i = 0; i < heroList.length && end; i++) {\n\t\t\t\n\t\t\tif (heroList[i].isAlive()){\n\t\t\t\tif (heroList[i].getOtherAction()){\n\t\t\t\t\tend = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (checkVictory()) {\n\t\t\tinBattle = false;\n\t\t\t//screenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\t//gui.setScreenID(screenNumber);\n\t\t\tscreenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\tCutscene.loadCutscene(player.getCurLevel(), false);\n\t\t\tgui.setScreenID(screenNumber);\n\t\t\tgui.initializeCutscene();\n\t\t\tplayer.setCurLevel(player.getCurLevel()+1);\n\t\t}\n\t\t\n\t\tif (end) {\n\t\t\tai.play();\n\t\t\tgui.setEnemyPath(ai.getMoveCommands());\n\t\t\t\n\t\t\ttotalEnemyAttacks = 0;\n\t\t\tcurEnemyAttacker = -1;\n\t\t\t\n\t\t\tfor (int i = 0; i < enemyList.length; i++){\n\t\t\t\t\n\t\t\t\tif (ai.getAttackCommands(i) != null){\n\t\t\t\t\ttotalEnemyAttacks++;\n\t\t\t\t\t\n\t\t\t\t\tif (curEnemyAttacker == -1){\n\t\t\t\t\t\tcurEnemyAttacker = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (totalEnemyAttacks > 0){\n\t\t\t\tgui.setEnemyHasAttackCommand(true);\n\t\t\t\tscreenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\t\tisEnemyAttacking = true;\n\t\t\t\t//gui.setScreenID(screenNumber);\n\t\t\t\tString message = ((Enemy)enemyList[curEnemyAttacker]).getEnemyType() + \" did \" + ai.getAttackCommandsDamage(curEnemyAttacker) + \" damage to \" + ((Hero)ai.getAttackCommands(curEnemyAttacker)).getName() + \"!\";\n\t\t\t\tCutscene.loadAttackCutscene(((Enemy)enemyList[curEnemyAttacker]).getEnemyID() * -1 - 1, ai.getAttackCommands(curEnemyAttacker).getUnitID(), message, map.getTileNumber(enemyList[curEnemyAttacker].getCoordinate()));\n\t\t\t\t\n\t\t\t\tcurEnemyAttack = 1;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tplayer.resetAllHeroes();\n\t\t\t}\n\n\t\t}\n\t}", "private void tick() {\n\n\t\t//If the player is not dead, has not won, and is has started the game\n\t\tif(!player.dead && !player.win && startScreen.start && !paused) {\n\t\t\tlevel.tick(); //Call level tick method\n\t\t\tplayer.tick(); //Call player tick method\n\t\t}\n\n\t\t//If the player is dead\n\t\tif(player.dead){\n\t\t\t//If the user presses yes\n\t\t\tif(yes) {\n\t\t\t\tplayer.dead = false; //The player is no longer dead\n\t\t\t\tlevel1(); //Load level 1\n\t\t\t}\n\t\t\t//If the user presses no\n\t\t\tif(no) {\n\t\t\t\tSystem.exit(1); //Exit\n\t\t\t}\n\t\t}\n\t\t//If the player won\n\t\tif(player.win) {\n\t\t\t//If the user presses yes\n\t\t\tif(yes) {\n\t\t\t\tplayer.win = false; //The player has no longer won\n\t\t\t\tlevel1(); //Load level 1\n\t\t\t}\n\t\t\t//If the user persses no\n\t\t\tif(no) {\n\t\t\t\tSystem.exit(1); //Exit\n\t\t\t}\n\t\t}\n\t}", "private void endTurn(){\r\n String currentPlayer = cantStop.getGameBoard().getCurrentPlayer().getName();\r\n\t\tgameOver = cantStop.getGameBoard().endTurn(didBust);\r\n\t\t\r\n\t\tif(gameOver){\r\n\t\t\tstatusLabel.setText(currentPlayer + \r\n\t\t\t\t\t\" wins! Go again?\");\r\n\t\t\tupdate();\r\n\t\t} else {\r\n\t\t\tcantStop.getGameBoard().startNewTurn();\r\n\t\t\tallowNewRoll();\r\n\t\t}\r\n\t}", "private void whichPlayerHasTurn() throws PlayerOutOfTurn {\n if (test.equals(lastPicked)) {\n throw (new PlayerOutOfTurn());\n }\n }", "private void endTurn() {\n\t\t\n\t\tif (roundChanger == 1) {\n\t\t\tString currentPlayer = textFieldCurrentPlayer.getText();\n\t\t\tif (currentPlayer.equals(\"Player1\")) {\n\t\t\t\ttextAreaInstructions.setText(\"The current roll to beat is \" + player1.getDie1()\n\t\t\t\t+ \" \" + player1.getDie2() + \" \" + player1.getDie3());\n\t\t\t\trollToBeat = \"The current roll to beat is \" + player1.getDie1()\n\t\t\t\t+ \" \" + player1.getDie2() + \" \" + player1.getDie3();\n\t\t\t} else {\n\t\t\t\ttextAreaInstructions.setText(\"The current roll to beat is \" + player2.getDie1()\n\t\t\t\t+ \" \" + player2.getDie2() + \" \" + player2.getDie3());\n\t\t\t\trollToBeat = \"The current roll to beat is \" + player2.getDie1()\n\t\t\t\t+ \" \" + player2.getDie2() + \" \" + player2.getDie3();\n\t\t\t} \n\t\t\tchangeCurrentPlayerText();\n\t\t\tturn = 0;\n\t\t\troundChanger = 2;\n\t\t} else {\n\t\t\tString winningPlayer = calculateScore(player1, player2);\n\t\t\ttextFieldCurrentPlayer.setText(winningPlayer);\n\t\t\troundChanger = 1;\n\t\t\trollsTaken = 0;\n\t\t\tround = round + 1;\n\t\t\ttextFieldPlayerOneScore.setText(Integer.toString(player1.getPoints()));\n\t\t\ttextFieldPlayerTwoScore.setText(Integer.toString(player2.getPoints()));\n\t\t\ttextAreaInstructions.setText(\"Try to get the highest roll possible!\");\n\t\t\tcheckForGameOver();\n\t\t}\n\t\ttogglebtnD1.setSelected(false);\n\t\ttogglebtnD2.setSelected(false);\n\t\ttogglebtnD3.setSelected(false);\n\t\tdisableDice();\n\t\tturn = 0;\n\t}", "public void doTurn() {\n\t\tGFrame.getInstance().aiHold();\n\t}", "private void suarez() {\n\t\ttry {\n\t\t\tThread.sleep(5000); // espera, para dar tempo de ver as mensagens iniciais\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint xInit = -10;\n\t\tint yInit = 8;\n\t\tplayerDeafaultPosition = new Vector2D(xInit*selfPerception.getSide().value(), yInit*selfPerception.getSide().value());\n\t\twhile (commander.isActive()) {\n\t\t\t\n\t\t\tupdatePerceptions(); // deixar aqui, no começo do loop, para ler o resultado do 'move'\n\t\t\tswitch (matchPerception.getState()) {\n\t\t\tcase BEFORE_KICK_OFF:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\t\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase PLAY_ON:\n\t\t\t\t//state = State.FOLLOW;\n\t\t\t\texecuteStateMachine();\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_LEFT: // escanteio time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_RIGHT: // escanteio time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_IN_LEFT: // lateral time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\tcase KICK_IN_RIGHT: // lateal time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_LEFT: // Tiro livre time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_RIGHT: // Tiro Livre time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_LEFT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_RIGHT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t}", "public boolean delayer() {\n int secondsToDelay = rand.nextInt(3) + 1;\n if (timeCounter < secondsToDelay) {\n timeCounter += GameRound.elapsedTime;\n return true;\n }\n timeCounter = 0;\n movingLeft = false;\n movingRight = false;\n return false;\n }", "public void startTurn(){\n if (hasWinner()){\n announceWinner();\n return;\n }\n\n gameDraft();\n gameAttack();\n if (hasWinner()) return; //Skipping fortify if the game is won\n gameFortify();\n displayMessage(\"End of \" + currentPlayer.getName() + \"'s turn!\");\n }", "public void tryMove() {\n if(!currentPlayer.getHasPlayed()){\n if (!currentPlayer.isEmployed()) {\n String destStr = chooseNeighbor();\n\n currentPlayer.moveTo(destStr, getBoardSet(destStr));\n if(currentPlayer.getLocation().getFlipStage() == 0){\n currentPlayer.getLocation().flipSet();\n }\n refreshPlayerPanel();\n }\n else {\n view.showPopUp(currentPlayer.isComputer(), \"Since you are employed in a role, you cannot move but you can act or rehearse if you have not already\");\n }\n }\n else{ \n view.showPopUp(currentPlayer.isComputer(), \"You've already moved, rehearsed or acted this turn. Try a different command or click `end turn` to end turn your turn.\");\n }\n view.updateSidePanel(playerArray);\n }", "private void checkPlayerCondition()\n\t{\n\t\tif (playerExists() && PlayerAccess.getPlayer().isInExit())\n\t\t{\n\t\t\twon = true;\n\t\t}\n\t\tif (playerIsDead())\n\t\t{\n\t\t\tMapInstance.getInstance().levelRestart();\n\t\t}\n\t\tif (playerHasLost())\n\t\t{\n\t\t\tlost = true;\n\t\t}\n\t\tif (runOutOfTime())\n\t\t{\n\t\t\tPlayerAccess.getPlayer().die();\n\t\t}\n\t}", "void finishTurn();", "@Override\n protected boolean isFinished() {\n return (System.currentTimeMillis() >= thresholdTime || (currentAngle > (totalAngleTurn - 2) && currentAngle < (totalAngleTurn + 2)));\n }", "@Test\n void invalidLOST() {\n die();\n getGame().move(getPlayer(), Direction.EAST);\n getGame().stop();\n getGame().start();\n assertThat(getGame().isInProgress()).isFalse();\n verifyNoMoreInteractions(observer);\n }", "public static void end() {\n\t\tif(firstTime)\r\n\t\t\tfirstTime=false;\r\n\t\tif (over) {\r\n\t\t\treset();\r\n\t\t\tover = false;\r\n\t\t}\r\n\t\tGUI.panel.changeGame();\r\n\t}", "private void checkGameInput(float dt) {\n\t\tif (!(talkmode || showSignDialog)) {\n\t\t\tif (player.moving) {\n\t\t\t\tboolean shouldStop = true;\n\t\t\t\tfor (int i = UP; i <= LEFT; i++) {\n\t\t\t\t\tif (!gameActions[i].isReleased()) {\n\t\t\t\t\t\tshouldStop = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (shouldStop) {\n\t\t\t\t\tplayer.stop();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint dir = -1;\n\t\t\tint count = gameActions[LEFT].isPressed() ? 1 : 0;\n\t\t\tboolean found = false;\n\t\t\tfor (int i = UP; i <= LEFT; i++) {\n\t\t\t\tif (gameActions[i].isPressed()) {\n\t\t\t\t\tcount++;\n\t\t\t\t} else {\n\t\t\t\t\tif (count == 2) {\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\tfound = count == 2;\n\t\t\t}\n\t\t\tfor (int i = UP; i <= LEFT; i++) {\n\t\t\t\tif (gameActions[i].isPressed()) {\n\t\t\t\t\tmove(dt, dir = (i - UP), found);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (dir != -1) {\n\t\t\t\tplayer.setPartyMembersPositions();\n\t\t\t\t// showSignDialog = false;\n\t\t\t\t// doorSign = null;\n\t\t\t} else {\n\t\t\t\tbackground.stop();\n\t\t\t}\n\n\t\t\tif (isMenuButtonPressed(gameActions)) {\n\t\t\t\tsuper.queueEnterMenu();\n\t\t\t}\n\t\t} else if (question) {\n\t\t\tcheckDirectionalButtonsForQuestion();\n\t\t}\n\t\tif (gameActions[CROSS].isPressed()) {\n\t\t\tif (showSignDialog) {\n\t\t\t\tshowSignDialog = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcrossPressed();\n\t\t}\n\t}", "public void act()\n {\n displayBoard();\n Greenfoot.delay(10);\n \n if( checkPlayerOneWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player One!\", \"playerOne Win\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkPlayerTwoWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player Two!\", \"plauerTwo Win\",JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkBoardFilled() == true )\n {\n JOptionPane.showMessageDialog( null, \"It is a draw!\", \"Wrong step\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( messageShown == false )\n {\n showTurn();\n \n messageShown = true;\n }\n \n checkMouseClick();\n }", "@Override\n public void timePassed() {\n moveOneStep();\n }", "public void updateGameTime() {\n\t\tGameTime = Timer.getMatchTime();\n\t}", "private void humanTurn() \n {\n \n playTurn();\n }", "public void endTurn() {\n }", "public void triggerEndGame()\n\t{\n\t\tif(livesRemaining <= 0)\n\t\t{\n\t\t\tmP[0].stop();\n\t\t\tmP[1].stop();\n\t\t\tmP[2].stop();\n\t\t\tendGame = new Alert(AlertType.CONFIRMATION);\n\t\t\tendGame.setTitle(\"1942\");\n\t\t\tendGame.setHeaderText(null);\n\t\t\tendGame.getButtonTypes().clear();\n\t\t\tendGame.setContentText(\"You're dead! \\nYou finished with \" + p1Score + \" points. \\nWould you like to play again?\");\n\t\t\tendGame.getButtonTypes().addAll(ButtonType.YES, ButtonType.NO);\n\t\t\tendGame.setGraphic(new ImageView(new Image(\"file:images/gameOver.png\")));\n\t\t\tspawnTimerTL.stop();\n\t\t\tmainTimer.stop();\n\t\t\tp1.getNode().setImage(null); //Removes player from screen\n\t\t\tOptional<ButtonType> result = endGame.showAndWait();\n\n\t\t\tif(result.get() == ButtonType.YES)\n\t\t\t{\n\t\t\t\tlivesRemaining = 3;\n\t\t\t\thealthRemaining = 10;\n\t\t\t\tivHealthBar.setImage(imgHealth[healthRemaining]);\n\t\t\t\tivLives.setImage(imgLives[livesRemaining]);\t\n\n\t\t\t\tif (highScore < p1Score)\n\t\t\t\t\thighScore = p1Score;\n\t\t\t\ttry //Writes new high score and throws IO Exception\n\t\t\t\t{\n\t\t\t\tfileWriter = new FileWriter(highScoreSave);\n\t\t\t\tfileWriter.write(String.valueOf(highScore));\n\t\t\t\tfileWriter.close();\n\t\t\t\t}\n\t\t\t\tcatch(IOException e)\n\t\t\t\t{e.printStackTrace();}\n\t\t\t\t\n\t\t\t\tlblHighScore.setText(Integer.toString(highScore));\n\t\t\t\tp1Score = 0;\n\t\t\t\tlblp1score.setText(Integer.toString(p1Score));\n\n\t\t\t\tp1.setDead(false);\n\t\t\t\tmainTimer.start();\n\t\t\t\tspawnTimerTL.play();\n\t\t\t\t\n\t\t\t\tfor(int k = 0; k < enemyPlanes.length; k++)\n\t\t\t\t{\n\t\t\t\t\tenemyPlanes[k].toggleIsDead(true);\n\t\t\t\t\tenemyPlanes[k].setY(2000);\n\t\t\t\t\tenemyPlanes[k].getNode().setLayoutY(enemyPlanes[k].getY());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (highScore < p1Score)\n\t\t\t\t\thighScore = p1Score;\n\t\t\t\ttry //Writes new high score and throws IO Exception\n\t\t\t\t{\n\t\t\t\tfileWriter = new FileWriter(highScoreSave);\n\t\t\t\tfileWriter.write(String.valueOf(highScore));\n\t\t\t\tfileWriter.close();\n\t\t\t\t}\n\t\t\t\tcatch(IOException e)\n\t\t\t\t{e.printStackTrace();}\n\t\t\t\tthankYou = new Alert(AlertType.INFORMATION);\n\t\t\t\tthankYou.setTitle(\"1942\");\n\t\t\t\tthankYou.setHeaderText(null);\n\t\t\t\tthankYou.setGraphic(new ImageView(new Image(\"file:images/plane.png\")));\n\t\t\t\tthankYou.setContentText(\"Thank you for playing.\\nGoodbye!\");\n\t\t\t\tthankYou.show();\n\t\t\t\tPlatform.exit();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t}\n\t}", "public void timePassed() {\n if (keyboard.isPressed(KeyboardSensor.LEFT_KEY) && keyboard.isPressed(KeyboardSensor.RIGHT_KEY)) {\n return;\n } else if (keyboard.isPressed(KeyboardSensor.LEFT_KEY)) {\n moveLeft();\n\n } else if (keyboard.isPressed(KeyboardSensor.RIGHT_KEY)) {\n moveRight();\n }\n }", "@Test\n public void endGameDetectionFalse() {\n logic.setDirection(1);\n assertTrue(logic.gameLogic());\n }", "@Override\r\n\tpublic void endTurn() {\n\t\t\r\n\t}", "public boolean gameEnd(){\n\t\treturn(\tturn >= 50 || evaluateState()==true );\r\n\t}", "@Override\n public void play() {\n quest();\n if ((int) (Math.random() * 10) % 2 == 0) {\n won = true;\n System.out.println(\"You beat the last quest!\");\n } else {\n System.out.println(\"There are many more adventures for you, young warrior\");\n }\n }", "public boolean runRound() {\n gameMove();\n // return/check if gameover condiation is meet\n return isGameOver();\n }", "@Test\n void testBallStuckAfterMoving() {\n assertFalse(goalie.IsBallStuck(ball.getPosition(), 0));\n // ball moves\n ball.setPosition(1f,1f);\n // timer shuold be reset from first call\n assertFalse(goalie.IsBallStuck(ball.getPosition(), 1));\n // This is five seconds since move should reprot stuck\n assertTrue(goalie.IsBallStuck(ball.getPosition(), 5));\n }", "@Override\r\n\tpublic void run() {\r\n\t\twhile (!player.gameEnd) {\r\n\t\t\tif (fst) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(2000);\r\n\t\t\t\t\tfst = false ; \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}\r\n\t\t\tplayer.moveDownn();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(time_to_sleep);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void game_already_ended() {\n Player p1 = new Player(\"Player\");\n playerLobby.getGameCenter().newGame(p1, new Player(\"Opp\"));\n playerLobby.getGameCenter().setJustEnded(p1, new Player(\"Opp\"), true);\n\n when(session.attribute(\"player\")).thenReturn(new Player(\"Player\"));\n\n CuT.handle(request, response);\n assertTrue(playerLobby.getGameCenter().justEnded(p1));\n }", "@Test\n void invalidCREATED() {\n // when not started, nothing can be done.\n getGame().move(getPlayer(), Direction.EAST);\n assertThat(getGame().isInProgress()).isFalse();\n verifyNoMoreInteractions(observer);\n }" ]
[ "0.7254313", "0.71477103", "0.71206063", "0.6998529", "0.6933655", "0.6904446", "0.68892753", "0.6853241", "0.6830594", "0.6811693", "0.676877", "0.6764403", "0.674586", "0.6733957", "0.67160124", "0.6710971", "0.66734093", "0.6664571", "0.6648663", "0.66196233", "0.66006285", "0.65964174", "0.6575203", "0.6571179", "0.6565597", "0.65589774", "0.6551757", "0.65418", "0.654037", "0.6540182", "0.6533219", "0.65195096", "0.65015835", "0.64924985", "0.64921397", "0.6484669", "0.6478094", "0.64758575", "0.64714646", "0.6451327", "0.6446134", "0.6442915", "0.64361644", "0.64288133", "0.6419327", "0.64147675", "0.6401395", "0.6399885", "0.6392543", "0.6387104", "0.63848317", "0.63685846", "0.63619727", "0.6355054", "0.6353763", "0.63515806", "0.6350879", "0.6340307", "0.6336721", "0.633261", "0.63255686", "0.63182735", "0.630271", "0.62994707", "0.62982833", "0.6296331", "0.62905586", "0.6288783", "0.62874466", "0.6286937", "0.6283915", "0.6279452", "0.6276452", "0.62755966", "0.6271255", "0.6269481", "0.6266775", "0.626364", "0.6254919", "0.6253367", "0.6246005", "0.6245903", "0.624246", "0.6228161", "0.62239414", "0.6218012", "0.6214532", "0.6213484", "0.62099135", "0.6206333", "0.6206297", "0.62030405", "0.6197297", "0.61946607", "0.6189099", "0.61886936", "0.618181", "0.61781234", "0.6175179", "0.6174517", "0.6163815" ]
0.0
-1
If game is still ongoing:
@Override public void run() { if(mGame.getmGameStatus() == Game.GameStatus.ONGOING){ // If turn was toggled: if(mGame.getmCurrentlyPlaying() != mPlayerGamePiece) { // Updating colors for profile areas: mOpponentProfileArea.setBackgroundResource(R.drawable.user_area_green); mOpponentUsername.setBackgroundResource(R.color.colorGreenDarkAlpha); mPlayerProfileArea.setBackgroundResource(R.drawable.user_area_gray); mPlayerUsername.setBackgroundResource(R.color.colorGrayDarkAlpha); // Now A.I. opponent should make a move: makeAIMove(); } // Otherwise, player gets another turn: else{ mPlayableTiles = mGame.getmBoard().getPlayableTiles(mPlayerGamePiece); showGuidelines(); mIsAllowedToPlay = true; } } else{ // Otherwise, game has ended. handleGameEnding(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isGameComplete();", "private void inGame() {\n\n if (!ingame) {\n timer.stop();\n\n }\n }", "public void isGameOver() { \r\n myGameOver = true;\r\n myGamePaused = true; \r\n }", "public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }", "boolean isGameSpedUp();", "private void gameTimerOnFinish() {\n if (currentScreenGameState == GameState.PLAYING) {\n stopGame();\n }\n }", "public boolean gameWon(){\n return false;\n }", "boolean endOfGame() {\n return false;\n }", "public boolean isGameOverDelayed() {\n return gameOver;\n }", "public void finishGame(){\r\n\t\t\t\tgameStarted = false;\r\n\t\t\t}", "public boolean gameOver() \n {\n \treturn status() != GAME_NOT_OVER;\n }", "public boolean isInGame() {\n return this.hasStarted;\n }", "protected abstract boolean isGameFinished();", "protected boolean hasGameStarted() {\r\n return super.hasGameStarted();\r\n }", "public boolean doesGuiPauseGame()\n {\n return false;\n }", "public boolean isRunning(){\n\t\treturn gameRunning;\n\t}", "public void isPaused() { \r\n myGamePaused = !myGamePaused; \r\n repaint(); \r\n }", "public void gameComplete() {\n if (soundToggle == true) {\n gameComplete.start();\n } // if\n }", "public boolean gameEnd(){\r\n return !hasMovements(model.getCurrentPlayer().getColor());\r\n }", "public boolean doesGuiPauseGame()\n {\n return !this.doesGuiPauseGame;\n }", "@Override\r\n\tboolean isFinished() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(checkForWin() != -1)\r\n\t\t\treturn true;\r\n\t\telse if(!(hasValidMove(0) || hasValidMove(1)))\r\n\t\t\treturn true; //game draw both are stuck\r\n\t\telse return false;\r\n\t}", "public void gameOver(){\n\t\tstatus.setGameStarted(false);\n\t\tstatus.setGameOver(true);\n\t\tgameScreen.doNewGame();\n\t\tsoundMan.StopMusic();\n\t\n\t\t// delay to display \"Game Over\" messa\tprivate Object rand;\n\n\t\tTimer timer = new Timer(3000, new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstatus.setGameOver(false);\n\t\t\t}\n\t\t});\n\t\ttimer.setRepeats(false);\n\t\ttimer.start();\n\t}", "public void finishGame() {\r\n gameFinished = true;\r\n }", "protected boolean isFinished() {\n logger.info(\"Ending left drive\");\n \treturn timer.get()>howLongWeWantToMove;\n }", "boolean GameOver() {\n\t\treturn player.isDead();\n\t}", "public boolean isPaused();", "public boolean doesGuiPauseGame()\r\n\t{\r\n\t\treturn false;\r\n\t}", "public boolean doesGuiPauseGame() {\r\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean isGameTied() {\t\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n return (timeRunning>timeStarted+5 || RobotMap.inPosition.get()!=OI.shooterArmed);\n }", "@Override\r\n\tpublic boolean doesGuiPauseGame() {\r\n\t\treturn false;\r\n\t}", "public void toggleGameFinished() {\r\n\t\tsetGameFinished(!gameFinished);\r\n\t}", "public boolean gameWon(){\n\t\treturn Game.gameWon;\n\t}", "public boolean isOver() {\n \treturn status == GameStatus.victory || status == GameStatus.draw || status == GameStatus.quit;\n }", "public boolean isGameOver() {\r\n\treturn false;\r\n }", "private boolean isGameOver() {\n // either all black or all white pieces don't have any moves left, save\n // to internal field so that a delayed status is available\n gameOver = longestAvailableMoves(1, true).isEmpty() ||\n longestAvailableMoves(1, false).isEmpty();\n return gameOver;\n }", "boolean isGameOver();", "boolean isGameOver();", "public boolean isGameFinished() {\n if (listaJogadores.size() - listaJogadoresFalidos.size() == 1) {\n return true;\n } else {\n return false;\n }\n\n }", "public boolean doesGuiPauseGame() {\n\t\treturn false;\n\t}", "private void gameFinished() {\n\n\t\tisFinished = true;\n\t\touter: for (int x = 0; x < worldWidth; x++) {\n\t\t\tfor (int y = 0; y < worldHeight; y++) {\n\t\t\t\tif (!(tileArr[x][y].isOpened() || (tileArr[x][y].hasBomb() && tileArr[x][y]\n\t\t\t\t\t\t.hasFlag()))) {\n\t\t\t\t\tisFinished = false;\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean gameOver()\n {\n return checkmate()||draw()!=NOT_DRAW;\n }", "public boolean isGameOver() {\n if(gameDescriptor.getTotalCycles() < roundNumber){\n eventListener.addEventObject(new RoundEvent(EventNamesConstants.GameFinished));\n return true;\n }\n return false;\n }", "public boolean isRunning(){\n return !paused;\n }", "public boolean isGameOver() {\n\t\treturn false;\n\t}", "public boolean isGameOver ()\n\t{\n\t\t return lives <= 0;\n\t}", "private boolean isOver() {\r\n return players.size() == 1;\r\n }", "public boolean isGameOver();", "public boolean isGameOver();", "public boolean gameOver(){\n\t\treturn this.lives < 1;\n\t}", "void pauseGame() {\n myGamePause = true;\n }", "boolean isGameOver() {\n\t\treturn Hit;\n\t}", "@Override\n public boolean isGameOver() {\n //TODO Implement this method\n return false;\n }", "@Override\n public boolean isRunning() {\n return !paused;\n }", "public void checkPaused()\n {\n paused = true;\n }", "private void gameOver() {\n\t\tgameOver=true;\n\t}", "@Override\n\tpublic boolean doesGuiPauseGame() {\n\t\treturn super.doesGuiPauseGame();\n\t}", "protected boolean isFinished() {\n\t\tif(switchSide) {\n\t\t\treturn !launchCubeSwitch.isRunning() && state == 4;\n\t\t}\n\t\telse if(scaleSide) {\n\t\t\treturn !launchCubeScale.isRunning() && state == 4;\n\t\t}\n\t\telse {\n\t\t\treturn !crossLine.isRunning() && timer.get() > 1;\n\t\t}\n\t}", "public boolean isGameOver() {\n\t\treturn (lives <= 0);\n\t}", "public void lose() {\n status.setText(\"You're finished\");\n gamegoing = false;\n }", "public boolean isCycleOver(){\n if(playersTurns.isEmpty()) {\n eventListener.addEventObject(new RoundEvent(EventNamesConstants.RoundEnded));\n return true;\n }\n return false;\n }", "protected boolean isFinished() {\n return System.currentTimeMillis() - timeStarted >= timeToGo;\n }", "void pauseGame() {\n myShouldPause = true;\n }", "void pauseGame() {\n myShouldPause = true;\n }", "public boolean userStillInGame() {\n return playersInGame.contains(humanPlayer);\n }", "public boolean gameOverTick(Game game) {\n\t\treturn false;\n\t}", "void endGame () {\n gameOver = true;\n System.out.println(\"Game over\");\n timer.cancel();\n }", "void gameResumed();", "public void Gamefinished()\n\t\t{\n\t\t\tplayers_in_game--;\n\t\t}", "private boolean checkGameStatus() {\n int res = model.getWinner();\n if (res == Model.DRAW) {\n draw();\n return false;\n } else if (res == Model.WHITE) {\n whiteScore++;\n view.getPrompt().setText(whiteName + \" win!\");\n prepareRestart();\n return false;\n } else if (res == Model.BLACK) {\n blackScore++;\n view.getPrompt().setText(blackName + \" win!\");\n prepareRestart();\n return false;\n }\n return true;\n }", "protected boolean isFinished() {\n \tif(timer.get()>.7)\n \t\treturn true;\n \tif(Robot.gearX==0)\n \t\treturn true;\n return (Math.abs(173 - Robot.gearX) <= 5);\n }", "public boolean isGameOver() {\n if (!isFirstTurn) {\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS||state.score().totalPoints(TeamId.TEAM_2)>=Jass.WINNING_POINTS) {\n return true;\n }\n else {\n return false;\n }\n } \n else {return false;}\n }", "public boolean isGameDraw() {\n if (this.winner == 0 && isBoardFull() && this.gameStarted) {\n return true; \n }\n return false; \n }", "public boolean checkGameOver() {\n return ((posIniPiece[piece.getKind()] == piece.getPos(0)) && iteration > 0);\n }", "public boolean isGameFinished() {\r\n return gameFinished;\r\n }", "public void checkGame() {\n\n\t}", "public boolean hasEnded(){\r\n\t\treturn state == GameState.FINISHED;\r\n\t}", "public void stopGame()\r\n\t{\r\n\t\tthis.inProgress = false;\r\n\t\tif(this.round == 0)\r\n\t\t{\r\n\t\t\t++this.round;\r\n\t\t}\r\n\t}", "public boolean isGameOver(){\n return checkKingReachedEnd() || checkNoDragonsLeft() || checkIfKingSurrounded();\n }", "public void lostGame(){\n\t\tSystem.out.println(\"Schade, du hast verloren. Möchtest du es noch einmal versuchen?\");\n\t\tif(!singleplayer){\n\t\t\tif(player.getLifes() == 0){\n\t\t\t\tSystem.out.println(\"Spieler 2 gewinnt!\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Spieler 1 gewinnt!\");\n\t\t\t}\n\t\t\n\t\t}\n\t\tstopGame();\n\t\tstarted = false;\n\t\tspiel_status = 0;\n\t\tpaintMenu();\n\t}", "void setGameOver() {\n myGameOver = true;\n myJump.userPauseThreads();\n }", "boolean isIdle();", "public boolean gameStarted() {\n\t\treturn startGame;\n\t}", "public void gameEnded() {}", "protected boolean isFinished() {\n \t\n \tif(current_time >= goal) {\n \t\t\n \t\treturn true;\n \t}else {\n \t\t\n \t\treturn false;\n \t}\n }", "public void gameRunning()\n{\n}", "public boolean stillPlaying(){\r\n\t\treturn stillPlaying;\r\n\t}", "boolean end() {\r\n\t\tif (this.gameOver == true)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public boolean doPause() {\n return false;\n }", "public boolean isGameRunning()\n\t{\n\t\treturn zegar.isRunning() || wToku;\n\t}", "public void wonGame(){\n\t\tSystem.out.println(\"Bravo, du hast gewonnen! Möchtest du noch einmal spielen?\");\n\t\tstopGame();\n\t\tstarted = false;\n\t\tspiel_status = 1;\n\t\tpaintMenu();\n\t}", "boolean gameOver() {\n return _gameOver;\n }", "protected boolean isFinished() {\n return (System.currentTimeMillis() - startTime) >= time;\n \t//return false;\n }", "protected boolean isFinished() {\n //return !RobotMap.TOTE_SWITCH.get();\n \treturn false;\n }", "private void setGameStatus() {\n this.gameStatus = false;\n }", "private boolean canPauseGame() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n && gameStateManager.getState().equals(GameState.PLAY);\n }", "public boolean gameOver() {\r\n return didPlayerLose() || didPlayerWin();\r\n }", "void gameFinished();", "public void notifyGameOver() {\n\t\tgameOver = true;\n\t}", "public boolean continueGame(){\n for (Player p : super.getPlayers()) {\n // check if p is dead\n if (p.isDead()) {\n return false;\n }\n }\n return true;\n }", "public void isStillInCombat() {\n isInCombat = enemiesInCombat.size() > 0;\n }" ]
[ "0.76692694", "0.7630894", "0.7350962", "0.72520745", "0.7215713", "0.71928704", "0.71926314", "0.71299434", "0.7122831", "0.71172494", "0.7113953", "0.7097462", "0.7047425", "0.70325357", "0.69364256", "0.6929634", "0.6920506", "0.69002324", "0.6900126", "0.6843389", "0.684022", "0.68240035", "0.6820292", "0.6815062", "0.6813675", "0.68097734", "0.67898923", "0.67758644", "0.6766171", "0.675003", "0.6746109", "0.67364484", "0.67289305", "0.672846", "0.6723792", "0.6717465", "0.67116886", "0.67116886", "0.67102826", "0.6707733", "0.67002386", "0.66922027", "0.6682828", "0.66683143", "0.6667029", "0.6664553", "0.66639256", "0.6656207", "0.6656207", "0.6649312", "0.6647783", "0.66460353", "0.6642248", "0.6640439", "0.663862", "0.66377765", "0.66332984", "0.6629242", "0.6627672", "0.6627361", "0.6626935", "0.66259736", "0.6617973", "0.6617973", "0.66148984", "0.66100633", "0.6599495", "0.65973496", "0.6593219", "0.6588963", "0.6583467", "0.6580344", "0.65703315", "0.65663075", "0.6565658", "0.65640765", "0.65521115", "0.6541572", "0.6536671", "0.6524682", "0.6519522", "0.65176", "0.6514286", "0.65099454", "0.6506731", "0.64956367", "0.6490747", "0.6487222", "0.6485555", "0.6484941", "0.6484924", "0.6483659", "0.6482776", "0.648123", "0.6479842", "0.64785635", "0.64614314", "0.6456811", "0.6452666", "0.64522874", "0.6451769" ]
0.0
-1
Getting A.I.'s game peace type:
private void makeAIMove(){ final GamePiece opponentPiece = mGame.getmCurrentlyPlaying(); // Creating new thread for A.I. move calculation, just in case the calculation would be too long. // (So the A.I. move calculation won't freeze the screen). new Thread(new Runnable() { @Override public void run() { // Making the play: mGame.makeAIMove(mDifficulty); // Now back to UI thread: runOnUiThread(new Runnable() { @Override public void run() { // Updating the grid: ((TileAdapter)mGrid.getAdapter()).notifyDataSetChanged(); // Playing proper sound: if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start(); // Updating Counters: mBlackCounter.setText("" + mGame.getmBoard().getmNumberOfBlackPieces()); mWhiteCounter.setText("" + mGame.getmBoard().getmNumberOfWhitePieces()); // Update playableTiles: mPlayableTiles = mGame.getmBoard().getPlayableTiles(mPlayerGamePiece); // While the UI changes, make a proper sound for flipping pieces (after a short delay): // And then move on (update UI, let player play next, end game, etc.) new Thread(new Runnable() { @Override public void run() { try { Thread.sleep(200); } catch (InterruptedException e) { e.printStackTrace(); } if(mSoundStatus.equals(Constants.ON)) mFlipPieceSound.start(); // Playing proper sound. try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } // Now back to UI thread in order to update UI: runOnUiThread(new Runnable() { @Override public void run() { // If game is still ongoing: if(mGame.getmGameStatus() == Game.GameStatus.ONGOING){ // If turn was toggled: if(mGame.getmCurrentlyPlaying() != opponentPiece) { // Updating colors for profile areas: mPlayerProfileArea.setBackgroundResource(R.drawable.user_area_green); mPlayerUsername.setBackgroundResource(R.color.colorGreenDarkAlpha); mOpponentProfileArea.setBackgroundResource(R.drawable.user_area_gray); mOpponentUsername.setBackgroundResource(R.color.colorGrayDarkAlpha); // Now Player should make a move: showGuidelines(); mIsAllowedToPlay = true; } // Otherwise, opponent gets another turn: else{ makeAIMove(); } } else{ // Otherwise (game has ended) handleGameEnding(); } } }); } }).start(); } }); } }).start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getGameType()\n\t{\n\t\treturn -1;\n\t}", "private String getOpeningType(Game game) {\n for (int i = 0; i < 6; i++) {\n game.forward();\n }\n\n if (isType1(game)) {\n return TYPE1;\n } else if (isType2(game)) {\n return TYPE2;\n } else if (isType3(game)) {\n return TYPE3;\n } else if (isTypeRelaxed(game)) {\n return TYPE_RELAXED;\n } else {\n return UNKNOWN;\n }\n }", "public String type() {\n return \"Pawn\";\n }", "int getGunType();", "public static GameType getGameType() {\n\t\treturn type;\n\t}", "public String getGameType() {\n return gameType;\n }", "public PlayerTypes getPlayerType();", "SpawnType getGameSpawnType();", "private String determinePieceType(Piece p) {\n\t\tif (p.isShield()) {\n\t\t\treturn \"shield\";\n\t\t} else if (p.isBomb()) {\n\t\t\treturn \"bomb\";\n\t\t} else {\n\t\t\treturn \"pawn\";\n\t\t}\n\t}", "String getTileType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "public String giveType(){\n if(isFull==false){\n return \"notfilled\";\n }\n else if(type==TYPE.BLACK){\n return \"BLACK\";\n }else{\n return \"WHITE\";\n }\n }", "int getProblemType();", "private String getPType(String pType) {\n\t\t\tif(pType.equals(\"o\")) {\n\t\t\t\treturn \"ongoing\";\n\t\t\t} else if(pType.equals(\"f\")) {\n\t\t\t\treturn \"finished\";\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public AbstractPokemon.Type selectType()\n {\n JOptionPane typeSelector = new JOptionPane();\n Object message = \"Select which Pokemon this trainer is willing to capture:\";\n Object[] options = {AbstractPokemon.Type.FIRE_TYPE, AbstractPokemon.Type.WATER_TYPE, AbstractPokemon.Type.GRASS_TYPE, AbstractPokemon.Type.ANY_TYPE};\n int type = typeSelector.showOptionDialog(null, message, \"Selection\",\n JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, options, \n options[3]);\n AbstractPokemon.Type faveType;\n switch(type)\n {\n case 0: faveType = AbstractPokemon.Type.FIRE_TYPE; break;\n case 1: faveType = AbstractPokemon.Type.WATER_TYPE; break;\n case 2: faveType = AbstractPokemon.Type.GRASS_TYPE; break;\n case 3: faveType = AbstractPokemon.Type.ANY_TYPE; break;\n default: faveType = AbstractPokemon.Type.ANY_TYPE; break;\n }\n return faveType;\n }", "public int getGameObject (GameObject gameObject){\n\t\tint typeObject =0;\r\n\t\tif (gameObject instanceof ShipSection){\r\n\t\t\ttypeObject= 1;\r\n\t\t}\r\n\t\telse if (gameObject instanceof Shots || gameObject instanceof Explosion){\r\n\t\t\ttypeObject= 2;\r\n\t\t}\r\n\t\telse if (gameObject instanceof Blank){\r\n\t\t\ttypeObject= 3;\r\n\t\t}\r\n\t\treturn typeObject;\r\n\t}", "public PuzzleType getMoverType( );", "String getActorType();", "public String getType() {\n\t\treturn String.valueOf(this.pieceType);\n\t}", "public String type();", "public AngelType getType() {\n return type;\n }", "private TYPE getType(final String type) {\n String temp = type.replaceAll(\"-\", \"_\");\n TYPE answer = Arrays.stream(\n TYPE.values()\n )\n .filter(value -> value.name().equals(temp))\n .findFirst()\n .orElse(TYPE.unknown);\n return answer;\n }", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "public final Physique.TypeP getType() {\n return Physique.TypeP.tank;\n }", "public static String getElementName(String type) {\n switch(type){\n case(\"1\"):\n return \"Kinetic\";\n case(\"2\"):\n return \"Arc\";\n case(\"3\"):\n return \"Solar\";\n case(\"4\"):\n return \"Void\";\n default:\n return \"Damage Type Not Found\";\n }\n }", "MachineType getType();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "public String getLoadGameType(){\n return m_LoadGameType;\n }", "private PileType getPileType(String sourceString) {\n String pileTyprString = sourceString.substring(0, 1);\n switch (pileTyprString) {\n case \"O\":\n return PileType.OPEN;\n case \"F\":\n return PileType.FOUNDATION;\n case \"C\":\n return PileType.CASCADE;\n default:\n // Should never return null - only called with valid strings\n return null;\n }\n }", "public String getType() {\n\t\tif (isValid())\n\t\t\treturn \"FullHouse\";\n\t\treturn \"\";\n\t}", "type getType();", "public EnnemyType getType()\n\t{\n\t\treturn type;\n\t}", "@External(readonly = true)\n\tpublic List<String> get_game_type(){\n\t\t\n\t\treturn this.GAME_TYPE;\n\t}" ]
[ "0.72388095", "0.7028332", "0.6925981", "0.6919925", "0.6875315", "0.6844585", "0.67899203", "0.66574025", "0.65684843", "0.64878863", "0.64159554", "0.64159554", "0.64159554", "0.64159554", "0.64159554", "0.64159554", "0.64159554", "0.64159554", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6353782", "0.6320391", "0.6320391", "0.6320391", "0.6320391", "0.6320391", "0.6320391", "0.6320391", "0.6320391", "0.6320391", "0.6320391", "0.6320391", "0.6320391", "0.6320391", "0.6320391", "0.6320391", "0.6320391", "0.6320391", "0.6320391", "0.6320391", "0.6320391", "0.63162297", "0.624997", "0.62442696", "0.62213385", "0.6199419", "0.61787874", "0.6174528", "0.61172867", "0.6100817", "0.6067628", "0.6044914", "0.6044436", "0.6044436", "0.6044436", "0.6044436", "0.6044436", "0.602775", "0.60192347", "0.60084844", "0.6003623", "0.6003623", "0.6003623", "0.6003623", "0.6003623", "0.6003623", "0.6003623", "0.6003623", "0.6003623", "0.6003623", "0.6003623", "0.6003623", "0.6003623", "0.600096", "0.5986855", "0.5982033", "0.5959551", "0.5954914", "0.5936065" ]
0.0
-1
If game is still ongoing:
@Override public void run() { if(mGame.getmGameStatus() == Game.GameStatus.ONGOING){ // If turn was toggled: if(mGame.getmCurrentlyPlaying() != opponentPiece) { // Updating colors for profile areas: mPlayerProfileArea.setBackgroundResource(R.drawable.user_area_green); mPlayerUsername.setBackgroundResource(R.color.colorGreenDarkAlpha); mOpponentProfileArea.setBackgroundResource(R.drawable.user_area_gray); mOpponentUsername.setBackgroundResource(R.color.colorGrayDarkAlpha); // Now Player should make a move: showGuidelines(); mIsAllowedToPlay = true; } // Otherwise, opponent gets another turn: else{ makeAIMove(); } } else{ // Otherwise (game has ended) handleGameEnding(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isGameComplete();", "private void inGame() {\n\n if (!ingame) {\n timer.stop();\n\n }\n }", "public void isGameOver() { \r\n myGameOver = true;\r\n myGamePaused = true; \r\n }", "public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }", "boolean isGameSpedUp();", "private void gameTimerOnFinish() {\n if (currentScreenGameState == GameState.PLAYING) {\n stopGame();\n }\n }", "public boolean gameWon(){\n return false;\n }", "boolean endOfGame() {\n return false;\n }", "public boolean isGameOverDelayed() {\n return gameOver;\n }", "public void finishGame(){\r\n\t\t\t\tgameStarted = false;\r\n\t\t\t}", "public boolean gameOver() \n {\n \treturn status() != GAME_NOT_OVER;\n }", "public boolean isInGame() {\n return this.hasStarted;\n }", "protected abstract boolean isGameFinished();", "protected boolean hasGameStarted() {\r\n return super.hasGameStarted();\r\n }", "public boolean doesGuiPauseGame()\n {\n return false;\n }", "public boolean isRunning(){\n\t\treturn gameRunning;\n\t}", "public void isPaused() { \r\n myGamePaused = !myGamePaused; \r\n repaint(); \r\n }", "public void gameComplete() {\n if (soundToggle == true) {\n gameComplete.start();\n } // if\n }", "public boolean gameEnd(){\r\n return !hasMovements(model.getCurrentPlayer().getColor());\r\n }", "public boolean doesGuiPauseGame()\n {\n return !this.doesGuiPauseGame;\n }", "@Override\r\n\tboolean isFinished() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(checkForWin() != -1)\r\n\t\t\treturn true;\r\n\t\telse if(!(hasValidMove(0) || hasValidMove(1)))\r\n\t\t\treturn true; //game draw both are stuck\r\n\t\telse return false;\r\n\t}", "public void gameOver(){\n\t\tstatus.setGameStarted(false);\n\t\tstatus.setGameOver(true);\n\t\tgameScreen.doNewGame();\n\t\tsoundMan.StopMusic();\n\t\n\t\t// delay to display \"Game Over\" messa\tprivate Object rand;\n\n\t\tTimer timer = new Timer(3000, new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstatus.setGameOver(false);\n\t\t\t}\n\t\t});\n\t\ttimer.setRepeats(false);\n\t\ttimer.start();\n\t}", "public void finishGame() {\r\n gameFinished = true;\r\n }", "protected boolean isFinished() {\n logger.info(\"Ending left drive\");\n \treturn timer.get()>howLongWeWantToMove;\n }", "boolean GameOver() {\n\t\treturn player.isDead();\n\t}", "public boolean isPaused();", "public boolean doesGuiPauseGame()\r\n\t{\r\n\t\treturn false;\r\n\t}", "public boolean doesGuiPauseGame() {\r\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean isGameTied() {\t\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n return (timeRunning>timeStarted+5 || RobotMap.inPosition.get()!=OI.shooterArmed);\n }", "@Override\r\n\tpublic boolean doesGuiPauseGame() {\r\n\t\treturn false;\r\n\t}", "public void toggleGameFinished() {\r\n\t\tsetGameFinished(!gameFinished);\r\n\t}", "public boolean gameWon(){\n\t\treturn Game.gameWon;\n\t}", "public boolean isOver() {\n \treturn status == GameStatus.victory || status == GameStatus.draw || status == GameStatus.quit;\n }", "public boolean isGameOver() {\r\n\treturn false;\r\n }", "private boolean isGameOver() {\n // either all black or all white pieces don't have any moves left, save\n // to internal field so that a delayed status is available\n gameOver = longestAvailableMoves(1, true).isEmpty() ||\n longestAvailableMoves(1, false).isEmpty();\n return gameOver;\n }", "boolean isGameOver();", "boolean isGameOver();", "public boolean isGameFinished() {\n if (listaJogadores.size() - listaJogadoresFalidos.size() == 1) {\n return true;\n } else {\n return false;\n }\n\n }", "public boolean doesGuiPauseGame() {\n\t\treturn false;\n\t}", "private void gameFinished() {\n\n\t\tisFinished = true;\n\t\touter: for (int x = 0; x < worldWidth; x++) {\n\t\t\tfor (int y = 0; y < worldHeight; y++) {\n\t\t\t\tif (!(tileArr[x][y].isOpened() || (tileArr[x][y].hasBomb() && tileArr[x][y]\n\t\t\t\t\t\t.hasFlag()))) {\n\t\t\t\t\tisFinished = false;\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean gameOver()\n {\n return checkmate()||draw()!=NOT_DRAW;\n }", "public boolean isGameOver() {\n if(gameDescriptor.getTotalCycles() < roundNumber){\n eventListener.addEventObject(new RoundEvent(EventNamesConstants.GameFinished));\n return true;\n }\n return false;\n }", "public boolean isRunning(){\n return !paused;\n }", "public boolean isGameOver() {\n\t\treturn false;\n\t}", "public boolean isGameOver ()\n\t{\n\t\t return lives <= 0;\n\t}", "private boolean isOver() {\r\n return players.size() == 1;\r\n }", "public boolean isGameOver();", "public boolean isGameOver();", "public boolean gameOver(){\n\t\treturn this.lives < 1;\n\t}", "void pauseGame() {\n myGamePause = true;\n }", "boolean isGameOver() {\n\t\treturn Hit;\n\t}", "@Override\n public boolean isGameOver() {\n //TODO Implement this method\n return false;\n }", "@Override\n public boolean isRunning() {\n return !paused;\n }", "public void checkPaused()\n {\n paused = true;\n }", "private void gameOver() {\n\t\tgameOver=true;\n\t}", "@Override\n\tpublic boolean doesGuiPauseGame() {\n\t\treturn super.doesGuiPauseGame();\n\t}", "protected boolean isFinished() {\n\t\tif(switchSide) {\n\t\t\treturn !launchCubeSwitch.isRunning() && state == 4;\n\t\t}\n\t\telse if(scaleSide) {\n\t\t\treturn !launchCubeScale.isRunning() && state == 4;\n\t\t}\n\t\telse {\n\t\t\treturn !crossLine.isRunning() && timer.get() > 1;\n\t\t}\n\t}", "public boolean isGameOver() {\n\t\treturn (lives <= 0);\n\t}", "public void lose() {\n status.setText(\"You're finished\");\n gamegoing = false;\n }", "public boolean isCycleOver(){\n if(playersTurns.isEmpty()) {\n eventListener.addEventObject(new RoundEvent(EventNamesConstants.RoundEnded));\n return true;\n }\n return false;\n }", "protected boolean isFinished() {\n return System.currentTimeMillis() - timeStarted >= timeToGo;\n }", "void pauseGame() {\n myShouldPause = true;\n }", "void pauseGame() {\n myShouldPause = true;\n }", "public boolean userStillInGame() {\n return playersInGame.contains(humanPlayer);\n }", "public boolean gameOverTick(Game game) {\n\t\treturn false;\n\t}", "void endGame () {\n gameOver = true;\n System.out.println(\"Game over\");\n timer.cancel();\n }", "void gameResumed();", "public void Gamefinished()\n\t\t{\n\t\t\tplayers_in_game--;\n\t\t}", "private boolean checkGameStatus() {\n int res = model.getWinner();\n if (res == Model.DRAW) {\n draw();\n return false;\n } else if (res == Model.WHITE) {\n whiteScore++;\n view.getPrompt().setText(whiteName + \" win!\");\n prepareRestart();\n return false;\n } else if (res == Model.BLACK) {\n blackScore++;\n view.getPrompt().setText(blackName + \" win!\");\n prepareRestart();\n return false;\n }\n return true;\n }", "protected boolean isFinished() {\n \tif(timer.get()>.7)\n \t\treturn true;\n \tif(Robot.gearX==0)\n \t\treturn true;\n return (Math.abs(173 - Robot.gearX) <= 5);\n }", "public boolean isGameOver() {\n if (!isFirstTurn) {\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS||state.score().totalPoints(TeamId.TEAM_2)>=Jass.WINNING_POINTS) {\n return true;\n }\n else {\n return false;\n }\n } \n else {return false;}\n }", "public boolean isGameDraw() {\n if (this.winner == 0 && isBoardFull() && this.gameStarted) {\n return true; \n }\n return false; \n }", "public boolean checkGameOver() {\n return ((posIniPiece[piece.getKind()] == piece.getPos(0)) && iteration > 0);\n }", "public boolean isGameFinished() {\r\n return gameFinished;\r\n }", "public void checkGame() {\n\n\t}", "public boolean hasEnded(){\r\n\t\treturn state == GameState.FINISHED;\r\n\t}", "public void stopGame()\r\n\t{\r\n\t\tthis.inProgress = false;\r\n\t\tif(this.round == 0)\r\n\t\t{\r\n\t\t\t++this.round;\r\n\t\t}\r\n\t}", "public boolean isGameOver(){\n return checkKingReachedEnd() || checkNoDragonsLeft() || checkIfKingSurrounded();\n }", "public void lostGame(){\n\t\tSystem.out.println(\"Schade, du hast verloren. Möchtest du es noch einmal versuchen?\");\n\t\tif(!singleplayer){\n\t\t\tif(player.getLifes() == 0){\n\t\t\t\tSystem.out.println(\"Spieler 2 gewinnt!\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Spieler 1 gewinnt!\");\n\t\t\t}\n\t\t\n\t\t}\n\t\tstopGame();\n\t\tstarted = false;\n\t\tspiel_status = 0;\n\t\tpaintMenu();\n\t}", "void setGameOver() {\n myGameOver = true;\n myJump.userPauseThreads();\n }", "boolean isIdle();", "public boolean gameStarted() {\n\t\treturn startGame;\n\t}", "public void gameEnded() {}", "protected boolean isFinished() {\n \t\n \tif(current_time >= goal) {\n \t\t\n \t\treturn true;\n \t}else {\n \t\t\n \t\treturn false;\n \t}\n }", "public void gameRunning()\n{\n}", "public boolean stillPlaying(){\r\n\t\treturn stillPlaying;\r\n\t}", "boolean end() {\r\n\t\tif (this.gameOver == true)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public boolean doPause() {\n return false;\n }", "public boolean isGameRunning()\n\t{\n\t\treturn zegar.isRunning() || wToku;\n\t}", "public void wonGame(){\n\t\tSystem.out.println(\"Bravo, du hast gewonnen! Möchtest du noch einmal spielen?\");\n\t\tstopGame();\n\t\tstarted = false;\n\t\tspiel_status = 1;\n\t\tpaintMenu();\n\t}", "boolean gameOver() {\n return _gameOver;\n }", "protected boolean isFinished() {\n return (System.currentTimeMillis() - startTime) >= time;\n \t//return false;\n }", "protected boolean isFinished() {\n //return !RobotMap.TOTE_SWITCH.get();\n \treturn false;\n }", "private void setGameStatus() {\n this.gameStatus = false;\n }", "private boolean canPauseGame() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n && gameStateManager.getState().equals(GameState.PLAY);\n }", "public boolean gameOver() {\r\n return didPlayerLose() || didPlayerWin();\r\n }", "void gameFinished();", "public void notifyGameOver() {\n\t\tgameOver = true;\n\t}", "public boolean continueGame(){\n for (Player p : super.getPlayers()) {\n // check if p is dead\n if (p.isDead()) {\n return false;\n }\n }\n return true;\n }", "public void isStillInCombat() {\n isInCombat = enemiesInCombat.size() > 0;\n }" ]
[ "0.76692694", "0.7630894", "0.7350962", "0.72520745", "0.7215713", "0.71928704", "0.71926314", "0.71299434", "0.7122831", "0.71172494", "0.7113953", "0.7097462", "0.7047425", "0.70325357", "0.69364256", "0.6929634", "0.6920506", "0.69002324", "0.6900126", "0.6843389", "0.684022", "0.68240035", "0.6820292", "0.6815062", "0.6813675", "0.68097734", "0.67898923", "0.67758644", "0.6766171", "0.675003", "0.6746109", "0.67364484", "0.67289305", "0.672846", "0.6723792", "0.6717465", "0.67116886", "0.67116886", "0.67102826", "0.6707733", "0.67002386", "0.66922027", "0.6682828", "0.66683143", "0.6667029", "0.6664553", "0.66639256", "0.6656207", "0.6656207", "0.6649312", "0.6647783", "0.66460353", "0.6642248", "0.6640439", "0.663862", "0.66377765", "0.66332984", "0.6629242", "0.6627672", "0.6627361", "0.6626935", "0.66259736", "0.6617973", "0.6617973", "0.66148984", "0.66100633", "0.6599495", "0.65973496", "0.6593219", "0.6588963", "0.6583467", "0.6580344", "0.65703315", "0.65663075", "0.6565658", "0.65640765", "0.65521115", "0.6541572", "0.6536671", "0.6524682", "0.6519522", "0.65176", "0.6514286", "0.65099454", "0.6506731", "0.64956367", "0.6490747", "0.6487222", "0.6485555", "0.6484941", "0.6484924", "0.6483659", "0.6482776", "0.648123", "0.6479842", "0.64785635", "0.64614314", "0.6456811", "0.6452666", "0.64522874", "0.6451769" ]
0.0
-1
Playing a proper sound:
@Override public void onClick(View v) { if(mSoundStatus.equals(Constants.ON)) mFlipPieceSound.start(); // Creating a new game and reinitializing UI components: mGame = new Game(); setupGrid(); mBlackCounter.setText("2"); mWhiteCounter.setText("2"); startGame(); // Making the "Finale Views" disappear: shadowScreen.setVisibility(View.GONE); conclusionText.setVisibility(View.GONE); returnButton.setVisibility(View.GONE); playAgainButton.setVisibility(View.GONE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void play() {\n\t\tlog.finest(\"Playing sound\");\n\t\ttone.trigger();\n\t}", "public void playSound() {\n\t\tmediaPlayer.play();\n\t}", "private void playSound() {\n\t\tif (controllerVars.isLoaded() && !controllerVars.isPlays()) {\n\t\t\tcontrollerVars.getSoundPool().play(controllerVars.getSoundID(), controllerVars.getVolume(), controllerVars.getVolume(), 1, 0, 1f);\n\t\t\tcontrollerVars.COUNTER++;\n\t\t\t//Toast.makeText(act, \"Played sound\", Toast.LENGTH_SHORT).show();optional Playing message \n\t\t\tcontrollerVars.setPlays(true);\n\t\t\tonComplete(controllerVars.getMediaPlayer().getDuration());\n\t\t}\n\t\t//controllerVars.getMediaPlayer().start();\n\t\t//controllerVars.setPlays(true);\n\t}", "@Override\n public void playSound(int soundId) {\n\n }", "public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}", "@Override\n\tpublic void playLivingSound() {\n\t\tgetSoundManager().playLivingSound();\n\t}", "public static void playShootingSound(){\n String musicFile = \"Sounds\\\\Shoot.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }", "public static void playSound(){\r\n try{\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(AudioSystem.getAudioInputStream(new File(\"Cheering.wav\")));\r\n clip.start();\r\n }\r\n catch (Exception exc){\r\n exc.printStackTrace(System.out);\r\n } \r\n }", "PlaySound getSound();", "public void playSoundAt(IPos pos, String sound, float volume, float pitch);", "public void StartSound(ISoundOrigin origin, sfxenum_t sound_id);", "public void play(int soundID) {\n System.out.println(\"PlaySound: \" + soundID);\n// if (soundID == SOUND_EAT)\n// return;\n play(soundID, 1);\n }", "public void StartSound(ISoundOrigin origin, int sound_id);", "private static void playSound(String s) {\n try {\n Media hit = new Media(new File(s).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(hit);\n mediaPlayer.play();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }", "public void play() {\n if (audio != null) {\n audio.play(sfxVolume);\n }\n }", "public void play() {\n\t\tplay(true, true);\n\t}", "public void playAudio() {\n\t\tmusic[currentSong].stop();\n\t\tcurrentSong++;\n\t\tcurrentSong %= music.length;\n\t\tmusic[currentSong].play();\n\t}", "public void playSound() {\n String path = \"Data\\\\\\\\Acceptance.wav\";\n InputStream success;\n try {\n success = new FileInputStream(new File(path));\n AudioStream audioStream = new AudioStream(success);\n AudioPlayer.player.start(audioStream);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error playing sounds\");\n }\n }", "private void playYouWinSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\tada.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }", "private void playAudio() {\r\n Play.au(audioFileName, false);\r\n }", "public static void game_sound() {\n\t\tm_player_game.start();\n\t\tm_player_game.setMediaTime(new Time(0));\n\t}", "public void playSoundFail() {\n\t\tfailSound.play();\n\t}", "public void startSound() {\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\tURL url = this.getClass().getResource(\"/\"+wavMusicFile);\n\t\t\t//System.out.println(\"url: \" + url);\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tclip = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tclip.open(audioIn);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public abstract String play(SoundLibrary library, String... sound);", "@Override\n public void makeSound() {\n\n }", "@Override\n public void makeSound() {\n\n }", "public void play(Sound s, PlayMode mode) throws IOException {\n if (s != null) getClip(s).play(mode);\n }", "private void playSound(int index, float pitch) {\n try {\n metaObject.playSound(index, pitch, 1f);\n } catch (NullPointerException | IndexOutOfBoundsException ex) {\n System.out.println(\"Could not play sound with index \" + index + \" for \" + this.toString() + \".\");\n }\n }", "@Override\n\tpublic void play() {\n\t\tGuitar.super.play();\n\t\tPiano.super.play();\n\t}", "public void play() {\n\t\t\r\n\t}", "public void playSound(int sound) {\n \t currentstreamID=soundPool.play(soundPoolMap.get(sound), 0.5f, 0.5f, 1, -1, 1f);\n Log.e(\"MYT\",currentstreamID+\" play output\"); \n }", "public void PauseSound();", "public void playSound(File soundFile);", "public void playSound(String sound) {\n\t\t \n\t\t // open the sound file as a Java input stream\n\t\tString soundFile = null;\n\t\tswitch (sound) {\n\t\tcase \"opening\":\n\t\t\tsoundFile = \"ConfigFiles\\\\opening.wav\";\n\t\t\tbreak;\n\t\tcase \"ending\":\n\t\t\tsoundFile = \"ConfigFiles\\\\ending.wav\";\n\t\t\tbreak;\n\t\tcase \"shop\":\n\t\t\tsoundFile = \"ConfigFiles\\\\shop.wav\";\n\t\t\tbreak;\n\t\tcase \"monsterbattle\":\n\t\t\tsoundFile = \"ConfigFiles\\\\monsterbattle.wav\";\n\t\t\tbreak;\n\t\tcase \"battlewin\":\n\t\t\tsoundFile = \"ConfigFiles\\\\monstervictory.wav\";\n\t\t\tbreak;\n\t\tcase \"trainerbattle\":\n\t\t\tsoundFile = \"ConfigFiles\\\\trainerBattle.wav\";\n\t\t\tbreak;\n\t\tcase \"trainerbattlewin\":\n\t\t\tsoundFile = \"ConfigFiles\\\\trainerVictory.wav\";\n\t\t\tbreak;\n\t\tcase \"map\":\n\t\t\tsoundFile = \"ConfigFiles\\\\map.wav\";\n\t\t\tbreak;\n\t\t}\n\t\t\t\n\t\t \n\t\t InputStream in = null;\n\t\t\ttry {\n\t\t\t\tin = new FileInputStream(soundFile);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t \n\t\t\tif(audioStream != null ) {\n\t\t\t\tAudioPlayer.player.stop(audioStream);\n\t\t\t}\n\t\t\t // create an audiostream from the inputstream\n\t\t\ttry {\n\t\t\t\taudioStream = new AudioStream(in);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t // play the audio clip with the audioplayer class\n\t\t\t\n\t\t AudioPlayer.player.start(audioStream);\n\t\t \n\t}", "private void playSound() {\n if (isFlashOn) {\n mp = MediaPlayer.create(this, R.raw.light_switch_off);\n } else {\n mp = MediaPlayer.create(this, R.raw.light_switch_on);\n }\n mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\n @Override\n public void onCompletion(MediaPlayer mp) {\n // TODO Auto-generated method stub\n mp.release();\n }\n });\n mp.start();\n }", "public static void playSound(Player p, Location loc, Sound sound, float pitch, float volume){\n p.playSound(loc, sound, volume, pitch);\n }", "public void play()\n\t{\n\t\tif (canPlay)\n\t\t{\n\t\t\tsong.play();\n\t\t\tsong.rewind();\n\t\t\tif (theSong == \"SG1\" || theSong == \"SG2\")\n\t\t\t\tcanPlay = false;\n\t\t}\n\t}", "public void play() { \r\n if (midi) \r\n sequencer.start(); \r\n else \r\n clip.start(); \r\n timer.start(); \r\n play.setText(\"Stop\"); \r\n playing = true; \r\n }", "static void PlaySound(File Sound)\n {\n try{\n Clip clip = AudioSystem.getClip();\n clip.open(AudioSystem.getAudioInputStream(Sound));\n clip.start();\n //BGM = new AudioStream(new FileInputStream(\"OST.WAV\"));\n //MD = BGM.getData();\n //loop = new ContinuousAudioDataStream(MD);\n }catch(Exception e) {}\n //MGP.start(loop); \n }", "protected void playTheSound(int position) {\n if (mp != null) {\n mp.reset();\n mp.release();\n }\n mp = MediaPlayer.create(this, sons[position]);\n mp.start();\n }", "public void soundPressed() {\n // display\n TextLCD.print(SOUND);\n // sound\n Sound.beep();\n }", "public void playSound(String filename) {\r\n\t\tif (debugLevel > 1)\r\n\t\t\tSystem.out.println(\" ... play audio file: \" + filename);\r\n\t\ttry {\r\n\t\t\tFile file = new File(filename);\r\n\t\t\tAudioInputStream in = AudioSystem.getAudioInputStream(file);\r\n\t\t\tclip = AudioSystem.getClip();\r\n\t\t\tclip.open(in);\r\n\t\t\tclip.start();\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void playAmbientSound() {\n if (!this.isClosed()) {\n super.playAmbientSound();\n }\n\n }", "public abstract void makeSound();", "public void playSound(int sample, boolean looped) {\n\t\t\tm_soundManager.playSound(sample, looped);\n\t\t}", "public void playSoundGameLost() {\n\t\tlostGameSound.play();\n\t}", "public static void playInternal( LayeredSound.SoundClip s )\r\n\t{\r\n\t\tif ( Settings.isSoundOn() )\r\n\t\t\tnew SpeakerThread( s ).start();\r\n\t}", "public void playAudio() {\n\n }", "private void playSound(String sound) {\r\n try {\r\n BufferedInputStream soundFileStream = new BufferedInputStream(this\r\n .getClass().getResourceAsStream(sound));\r\n AudioInputStream audioInputStream = AudioSystem\r\n .getAudioInputStream(soundFileStream);\r\n AudioFormat audioFormat = audioInputStream.getFormat();\r\n DataLine.Info dataLineInfo = new DataLine.Info(Clip.class, audioFormat);\r\n Clip clip = (Clip) AudioSystem.getLine(dataLineInfo);\r\n clip.open(audioInputStream);\r\n clip.start();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void playGameOverSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\ringout.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }", "public void startSound()\n \n {try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Start 2.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n startClip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n startClip.open(audioIn); \n \n startClip.start();\n \n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n \n }", "public static void playerRun()\n {\n runSound.playLooped();\n }", "public void playSound(Location loc) {\n if (_sound != null) {\n loc.getWorld().playSound(loc, _sound, _soundVolume, _soundPitch);\n }\n }", "public void playSoundGameWon() {\n\t\tcompletedGameSound.play();\n\t}", "@Override\r\n\tpublic void sound() {\r\n\t\tsuper.sound();\r\n\t\tSystem.out.println(\"SportsCar sound: Vutututututu\");\r\n\t}", "public void playSound ( Location location , Sound sound , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , volume , pitch ) );\n\t}", "protected static void play() {\n\t\tif (curMIDI != null && !playing){\n\t\t\tPlayer.play(curMIDI,microseconds,cleaned);\n\t\t\tplaying = true;\n\t\t}\n\t\tif (sim != null) {\n\t\t\tif(microseconds == 0){\n\t\t\t\tsim.stop();\n\t\t\t}\n\t\t\t\tsim.play();\n\t\t}\n\t}", "public void play(){\n\t\t\n\t}", "public void playMusic() {\n\t\ttry {\n\t\t\tsoundManager.playMusic(\"bgroundmusic\");\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void portail_sound() {\n\t\tm_player_portail.start();\n\t\tm_player_portail.setMediaTime(new Time(0));\n\t}", "private static void playAudio(String musicFile) {\n }", "public void playSoundtrack() {\n if(this.musicEnabled) {\n try {\n Clip soundtrackClip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new BufferedInputStream(Assets.soundTrack));\n soundtrackClip.open(inputStream);\n soundtrackClip.start();\n soundtrackClip.loop(Clip.LOOP_CONTINUOUSLY);\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(e.getMessage());\n }\n }\n }", "private void gameSound(int attack){\n switch (attack){\n case 1:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_lightattack);\n break;\n case 2:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_strongattack);\n break;\n case 3:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_brutalattack);\n break;\n }\n mediaPlayer.start();\n }", "public static void playScream()\n {\n scream.play();\n }", "public String play(String sound) {\r\n return play(SoundLibrarian.getInstance(), sound);\r\n }", "public void playSound(SoundType type) {\n if (!gameController.getGameStatPanel().getUserData().isSoundDisabled()) soundMap.get(type).play();\n }", "public final void play() {\n\t\tinitialize();\n\t\tstartPlay();\n\t\tendPlay();\n\t}", "public void playWinSound()\n {\n InputStream pathSoundFile = getClass().getResourceAsStream(\"bellringing.wav\");\n playSound(pathSoundFile);\n }", "public void playSound(SoundEvent debug1, float debug2, float debug3) {\n/* 466 */ this.level.playSound(this, getX(), getY(), getZ(), debug1, getSoundSource(), debug2, debug3);\n/* */ }", "public void playSound() {\n if (this.mIsSupportVibrator) {\n this.mVibratorEx.setHwVibrator(\"haptic.control.time_scroll\");\n }\n if (this.mSoundPool == null || this.mSoundId == 0 || !this.mSoundLoadFinished) {\n Log.w(TAG, \"SoundPool is not initialized properly!\");\n } else {\n this.mSoundPool.play(this.mSoundId, 1.0f, 1.0f, 0, 0, 1.0f);\n }\n }", "void play(int soundIndex) {\n\t\tsounds.get(soundIndex).play();\n\t}", "public void playSoundSuccess() {\n\t\tsucceededSound.play();\n\t}", "@Override\n\tpublic void play() {\n\t\t\n\t}", "public void continueSound() {\n\t\tclip.start();\n\t}", "public static void playPickupSound(){\n String musicFile = \"Sounds\\\\Pickup.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }", "public void toggleSound() { \n\t\tif (mSoundEnable) {\n\t\t\tmSoundEnable = false; \n\t\t\tif (ResourceManager.getInstance().gameMusic.isPlaying())\n\t\t\t\tResourceManager.getInstance().gameMusic.pause();\n\t\t}\n\t\telse {\n\t\t\tmSoundEnable = true;\n\t\t\tif (!ResourceManager.getInstance().gameMusic.isPlaying()) {\n\t\t\t\tResourceManager.getInstance().gameMusic.play();\n\t\t\t}\n\t\t}\n\t}", "public void playMusic() {\n\t\tthis.music.start();\n\t}", "public void PlaySound(Context context) {\r\n\t\tif (!this.mp.isPlaying()) {\r\n\t\t\tmp.start();\r\n\t\t}\r\n\t}", "public void playDeadSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, DEAD);\n\t}", "void playSound() {\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n soundPlaying = true;\n audioTrack.play();\n while (soundPlaying) {\n genWhiteNoise();\n audioTrack.write(noise, 0, SAMPLE_COUNT);\n }\n\n }\n });\n thread.start();\n }", "private void playSound(String soundFile){\n try {\n AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File(soundFile).getAbsoluteFile());\n Clip clip = AudioSystem.getClip();\n clip.open(audioInputStream);\n clip.start();\n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void play() {\n\t\ttry {\n\t\t\taudioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void play() {\n\n\t}", "void play();", "public void play() {\n\t\tmusic.play();\n\t\tsyncPosition();\n\t}", "public void playSound ( Location location , String sound , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , volume , pitch ) );\n\t}", "public void playGoombaSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, GOOMBA);\n\t}", "public void playHitWall() {\r\n hitWall.play(soundFxVol);\r\n }", "private void play() {\n /** Memanggil File MP3 \"indonesiaraya.mp3\" */\n try {\n mp.prepare();\n } catch (IllegalStateException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /** Menjalankan Audio */\n mp.start();\n\n /** Penanganan Ketika Suara Berakhir */\n mp.setOnCompletionListener(new OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n stateAwal();\n }\n });\n }", "public static void playSound(Context context) {\n mAudioManager = (AudioManager) context.getSystemService(AUDIO_SERVICE);\n assert mAudioManager != null;\n originalVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);\n Log.d(TAG, \"originalVolume: \"+ originalVolume);\n mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC), 0);\n mAudioManager.setMode(AudioManager.STREAM_MUSIC);\n mAudioManager.setSpeakerphoneOn(true);\n\n if (mp != null) {\n mp.stop();\n }\n\n mp = MediaPlayer.create(context, R.raw.ringingsound);\n mp.setLooping(true);\n mp.start();\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp1.play(sound_id1, 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "@Override\r\n\tpublic String doSound() {\n\t\treturn null;\r\n\t}", "public void playSound(InputStream access)\n {\n if(!mute)\n {\n try{\n InputStream bufferedIn = new BufferedInputStream(access);\n AudioInputStream audioIn = AudioSystem.getAudioInputStream(bufferedIn);\n Clip clip = AudioSystem.getClip();\n clip.open(audioIn);\n clip.start();\n }\n catch(UnsupportedAudioFileException | IOException | LineUnavailableException e1){\n System.out.println(\"Selected Audio File is not compatible/available.\");};\n }\n }", "private void playAudio(int winLose)\t\t\t\t\t\t\t\n {\n // win\n if(winLose == 1)\n {\n String path = \"src/winningSound.wav\";\n Media media = new Media(new File(path).toURI().toString());\n\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.setCycleCount(1);\n mediaPlayer.setAutoPlay(true);\n }\n // lose\n else\n {\n String path = \"src/loserSound.wav\";\n Media media = new Media(new File(path).toURI().toString());\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.setCycleCount(1);\n mediaPlayer.setAutoPlay(true);\n }\n }", "private void clickSound() {// this function Plays a sound when a button is clicked.\n\t\tif (mp != null) {\n\t\t\tmp.release();\n\t\t}\n\t\tmp = MediaPlayer.create(getApplicationContext(), R.raw.music2);\n\t\tmp.start();// media player is started\n\t}", "public void playBeep() {\n // Cách 1: Sử dụng audio có sẵn của android\n// ToneGenerator toneGenerator = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, 500);\n// toneGenerator.startTone(ToneGenerator.TONE_PROP_PROMPT);\n\n // Cách 2: Sử dụng audio của mình\n Uri beepSound = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + File.pathSeparator\n + File.separator + getPackageName() + \"/raw/notifications.mp3\");\n Ringtone ringtone = RingtoneManager.getRingtone(this, beepSound);\n ringtone.play();\n }", "public void play() {\n\n\t\tString[] args = new String[] { recordingsPath };\n\t\tGst.init(\"AudioPlayer\", args);\n\n\t\tplaybin = new PlayBin2(\"AudioPlayer\");\n\t\tplaybin.setVideoSink(ElementFactory.make(\"fakesink\", \"videosink\"));\n\t\tplaybin.setInputFile(new File(gui.getSelectedPlayItem()));\n\n\t\tplaybin.play();\n\n\t}", "public static void playSound(Activity a, int index) {\n MediaPlayer mp = new MediaPlayer();\n mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n mp.reset(); // fix bug app show warning \"W/MediaPlayer: mediaplayer went away with unhandled events\"\n mp.release();\n mp = null;\n }\n });\n try {\n String []listMusic = a.getAssets().list(AppConstant.ASSETSMUSIC);\n AssetFileDescriptor afd = a.getAssets().openFd(\"music\"\n + System.getProperty(\"file.separator\") + listMusic[index]);\n mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());\n afd.close();\n mp.prepare();\n } catch (IOException e) {\n e.printStackTrace();\n }\n mp.start();\n }", "protected void playStepSound(int par1, int par2, int par3, int par4)\n {\n this.playSound(\"mob.spider.step\", 0.15F, 1.0F);\n }", "public void playClickSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, CLICK);\n\t}" ]
[ "0.84338534", "0.81650746", "0.81092936", "0.8069635", "0.79454", "0.79007953", "0.7882646", "0.78354555", "0.7729134", "0.77261704", "0.77110654", "0.76977473", "0.7680837", "0.767871", "0.76756215", "0.7657891", "0.76347065", "0.75539225", "0.7552617", "0.754645", "0.753351", "0.7526301", "0.7509735", "0.7509004", "0.74838203", "0.7467796", "0.7467796", "0.74677104", "0.7441685", "0.7434318", "0.74335086", "0.74306166", "0.7423697", "0.74184984", "0.7415193", "0.7409947", "0.7402568", "0.7396973", "0.73847646", "0.73824376", "0.73810494", "0.7373496", "0.73603934", "0.7339051", "0.7334784", "0.73305064", "0.7313455", "0.7313432", "0.7302318", "0.7295419", "0.72922736", "0.7283509", "0.7269612", "0.7268984", "0.72674054", "0.7264784", "0.7264577", "0.72581095", "0.7257469", "0.7257297", "0.72544676", "0.7248594", "0.7239705", "0.72313386", "0.72205275", "0.7220281", "0.7214707", "0.72115475", "0.72063816", "0.720232", "0.71954906", "0.7189763", "0.71712506", "0.71691203", "0.7162202", "0.7160322", "0.7155838", "0.7154606", "0.71529186", "0.7143056", "0.71245897", "0.7122326", "0.7120845", "0.7114812", "0.7114111", "0.71090096", "0.7104376", "0.70824474", "0.7074493", "0.70733553", "0.7071333", "0.7067112", "0.7066964", "0.70655537", "0.7060323", "0.7056354", "0.70536095", "0.70515686", "0.70451987", "0.7041828", "0.7030741" ]
0.0
-1
Setting listener for the button:
private void setupShakeButton() { mShakeButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // If shake is playable at the moment: if(mIsShakePlayable) { // Making button unavailable for a while: mIsShakePlayable = false; mShakeButton.setBackgroundResource(R.color.colorGrayDark); // Animating the profile area: showShakeAnimation(mOpponentProfileArea); Handler EmoteAvailabilityHandler = new Handler(); EmoteAvailabilityHandler.postDelayed(new Runnable() { public void run() { // Making button available once again: mShakeButton.setBackgroundResource(R.drawable.button_red); mIsShakePlayable = true; } }, Constants.SHAKE_TIMEOUT); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void configureButtonListener();", "void enablButtonListener();", "private void setButtonListener() {\n for(CellButton[] buttonsRow : mainFrame.getButtons()) {\n for(CellButton button :buttonsRow) {\n button.addButtonListener(this);\n }\n }\n }", "@Override\n protected void setListener() {\n findView(R.id.btnClear).setOnClickListener(this);\n findView(R.id.btnSave).setOnClickListener(this);\n\n ivGraffit.setOnTouchListener(new GraffitTouchListener());\n }", "public void addListenerOnButton() {\n\n\t\t//koppel de button code aan een widget en voeg een onclicklistener toe\n\t\tsettings = (Button) findViewById(R.id.settings);\n\n\t\tsettings.setOnClickListener(new OnClickListener() {\n\t\t\t//koppel de button aan een nieuw xml scherm wat opent\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\n\t\t\t\tIntent myIntent = new Intent(view.getContext(), Settings.class);\n\t\t\t\tstartActivityForResult(myIntent, 0);\n\t\t\t}\n\n\t\t});\n\n\t\tsearch = (Button) findViewById(R.id.search);\n\n\t\tsearch.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\n\t\t\t\tIntent myIntent = new Intent(view.getContext(), Search.class);\n\t\t\t\tstartActivityForResult(myIntent, 0);\n\t\t\t}\n\t\t});\n\t\tterug = (Button) findViewById(R.id.terug);\n\n\t\tterug.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tsetResult(RESULT_OK, intent);\n\t\t\t\tfinish();\n\t\t\t}\n\n\t\t});\n\n\n\t}", "public ButtonListener(Fenetre fenetre) {\n\t\tthis.fenetre = fenetre;\n\t}", "public void setListener(ButtonListener buttonListener) {\n\t\tthis.buttonListener = buttonListener;\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tllistenBtnset();\n\t\t\t}", "private void setListener() {\n\t}", "private void setListener() {\n Log.d(TAG, \"TAG - MainActivity - setListener()\");\n\n if (buttonShow != null) {\n buttonShow.setOnClickListener( view -> showPicture());\n }\n }", "@Override\n\tprotected void setListener() {\n\t\tslider_text.setOnClickListener(this);\n\t}", "private void setListener() {\n\t\tmSlidingLayer.setOnInteractListener(this);\r\n\t\tmMsgNotifySwitch.setOnCheckedChangeListener(this);\r\n\t\tmMsgSoundSwitch.setOnCheckedChangeListener(this);\r\n\t\tmShowHeadSwitch.setOnCheckedChangeListener(this);\r\n\t\tmAccountSetting.setOnClickListener(this);\r\n\t\tmMyProfile.setOnClickListener(this);\r\n\t\tmFaceJazzEffect.setOnClickListener(this);\r\n\t\tmAcountInfo.setOnClickListener(this);\r\n\t\tmFeedBack.setOnClickListener(this);\r\n\t\tmExitAppBtn.setOnClickListener(this);\r\n\r\n\t}", "@Override\n\tprotected void on_button_pressed(String button_name) {\n\n\t}", "@Override\r\n protected void setListener() {\n logout.setOnClickListener(this);\r\n update.setOnClickListener(this);\r\n cleanCache.setOnClickListener(this);\r\n pushSwitch.setOnCheckedChangeListener(this);\r\n feedback.setOnClickListener(this);\r\n }", "private void setUpButton() {\n // Find view\n Button button = (Button) findViewById(R.id.this_weekend_dialog_match_button);\n // Set click mListener\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mListener.onMatchMadeDialogSeen();\n dismiss();\n }\n });\n }", "private void addButtonListener() {\n\t\trock.addActionListener(buttonListener);\n\t\tpaper.addActionListener(buttonListener);\n\t\tscissors.addActionListener(buttonListener);\n\t}", "public MyButtonListener(){\n super();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmButtonListener.onButtonListener();\n\t\t\t}", "private void initEvent() {\n\t\tmBtnPower.setOnClickListener(this);\n\t\tmBtnProfile.setOnClickListener(this);\n\t\tmBtnArea.setOnClickListener(this);\n\t\tmBtnSkipTime.setOnClickListener(this);\n\t\tmBtnFrequencyPoint.setOnClickListener(this);\n\t\tmBtnAlgorithm.setOnClickListener(this);\n\t}", "private void setButtonListener(Button button){\n \tfinal Context ctx = this.getActivity();\n \tfinal String tag = button.getText().toString();\n \t// button on click listers\n \t\tbutton.setOnClickListener(new OnClickListener() {\n \t\t\t@Override\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tIntent intent = new Intent(ctx, Questions_Tab_Activity.class);\n \t\t\t\tintent.putExtra(\"tagPressed\", tag);\n \t\t\t\tintent.putExtra(\"UserID\", userId);\n// \t\t\t\tif(multiTag)\n \t\t\t\t\tintent.putExtra(\"typeSearch\", 3);\n// \t\t\t\telse\n// \t\t\t\t\tintent.putExtra(\"typeSearch\", 1);\n \t\t\t\tstartActivity(intent);\n \t\t\t\t\n \t\t\t}\n \t\t});\n }", "public void settingBtnClick() {\n\t}", "public void initCallBack() {\n saveTodoButton.setOnClickListener(this);\n }", "@Override\n\tprotected void setListener() {\n\n\t}", "@Override\n\tprotected void setListener() {\n\n\t}", "private void setRegisterButtonListener(ActionListener actionListener) {\n System.out.println(\"ShareView: adding register listener\");\n buttonRegister.addActionListener(actionListener);\n buttonRegister.setActionCommand(GlobalControlCodes.TRACK_OPEN.name());\n }", "private void bindListener() {\n\t\tmSeekButton.setOnClickListener(this);\r\n\t}", "@Override\r\n\tpublic void setListener() {\n\r\n\t}", "@Override\r\n\tpublic void setListener() {\n\r\n\t}", "private void setupUpdateButton() {\n\n /* Get the button */\n Button updateButton = this.getStatusUpdateButton();\n\n /* Setup listener */\n View.OnClickListener updateButtonClicked = new View.OnClickListener() {\n\n @Override\n public void onClick(View view) {\n statusUpdater.updateStatus();\n }\n };\n\n /* Set listener to button */\n updateButton.setOnClickListener(updateButtonClicked);\n }", "public void setListeners(ActionListener l) {\n buttonListener = l;\n }", "public void addListener(ActionListener listener){\n\t\tbtn.addActionListener(listener);\n\t}", "@Override\n\tpublic void setListener() {\n\n\t}", "private void announcementBtnListener() {\n announcementBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new AnnouncementsScreen(game));\n }\n });\n }", "@Override\n\tpublic void initListeners() {\n\t\tmClick.setOnClickListener(this);\n\t}", "private void settingsBtnListener() {\n settingsBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new SettingsScreen(game));\n }\n });\n }", "public void click() {\n\t\tif(this.buttonListener != null) {\n\t\t\tthis.buttonListener.onClicked();\n\t\t}\n\t}", "public void addListenerOnButton() {\n\n\t\telectionSpinner = (Spinner) findViewById(R.id.electionSpinner);\n\t\tvoterSpinner = (Spinner) findViewById(R.id.voterSpinner);\n\t\t\n\t\tbtnConfig = (Button) findViewById(R.id.btnConfig);\n\t\tbtnConfig.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\"OnClickListener : \" + \n\t\t\t\t\t\t\"\\nElectionSpinner 1 : \" + String.valueOf(electionSpinner.getSelectedItem()) +\n\t\t\t\t\t\t\"\\nVoterSpinner 2 : \" + String.valueOf(voterSpinner.getSelectedItem()),\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t}\n\n\t\t});\n\n\t}", "@Override\n protected void addListener() {\n button.addActionListener(new DeleteWorkoutButton.ClickHandler());\n }", "@Override\n\tpublic void setOnClick() {\n\n\t}", "private void leaderboardBtnListener() {\n leaderboardBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new LeaderboardScreen(game));\n }\n });\n }", "private void setActionListener(){\r\n \tthis.addPropertyChangeListener(\"Refresh\", this);\r\n \tdeleteButton.addActionListener(this);\r\n \taddNewButton.addActionListener(this);\r\n }", "@Override\n public void setListener() {\n if (generalTitleLabel == null) return;\n generalTitleLabel.setOnClickListener(this);\n }", "@Override\n\tprotected void setOnClickListener() {\n\n\t}", "@Override\n\t\tpublic void buttonStatusChange() {\n\t\t\t\n\t\t}", "@Override\n\tprotected void InitButtonListener() {\n\t\timgbtnOK.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tClickOK();\n\t\t\t\tCursurIndex = 3;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}\n\t\t});\n\t\timgbtnPlus.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tClickPlus();\n\t\t\t\tCursurIndex = 2;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}\n\t\t});\n\t\timgbtnMinus.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tClickMinus();\n\t\t\t\tCursurIndex = 1;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}\n\t\t});\n\t}", "@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}", "private void setActionListener() {\n\n\t\tlnrPlayVoice.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (audioListener != null) {\n\t\t\t\t\taudioListener.onPlayClicked(isPlaying);\n\t\t\t\t}\n\t\t\t\tlnrReportVoice.setVisibility(View.GONE);\n\t\t\t\tplayVoice();\n\t\t\t}\n\t\t});\n\n\t\tlnrReportVoice.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tif (audioListener != null) {\n\t\t\t\t\taudioListener.onReportClicked();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void addListener(ClickListener listener);", "@Override\r\n\tprotected void initListener() {\n\t\trly_personal_info.setOnClickListener(this);\r\n\t}", "private void chatRoomBtnListener() {\n chatRoomBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n }\n });\n }", "public void addButtonListener(ActionListener l)\r\n\t{\r\n\t\tbnt_pane.addButtonListener(l);\r\n\t}", "public void buttonClicked();", "@Override\n protected void onAfterSetContentView() {\n super.onAfterSetContentView();\n View.OnClickListener onClickListener = new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n switch (v.getId()) {\n case R.id.btn_scan:\n btnSignalScan();\n break;\n default:\n break;\n }\n }\n };\n btn_scan.setOnClickListener(onClickListener);\n }", "public void onButtonAPressed();", "public ClickListener(){\n System.out.println(\"I've been attached\");\n }", "@Override\n\tpublic void setButtonAction() {\n\t}", "public void eventos() {\n btnAbrir.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent evt) {\n btnAbrirActionPerformed(evt);\n }\n });\n }", "public void setListeners() {\n backButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n finish();\n }\n });\n\n settingButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showEditDialog();\n }\n });\n\n cameraButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showChoosePictureDialog();\n }\n });\n }", "private void setOnClickListeners() {\n now_playing_previous_button.setOnClickListener(this::handleTransportControls);\n\n now_playing_play_button.setOnClickListener(this::handleTransportControls);\n\n now_playing_next_button.setOnClickListener(this::handleTransportControls);\n }", "private void cargaListeners() {\n\t\tbtnGuardar.addActionListener(this);\n\n\t}", "private void initListener() {\n\t\tbtnCancel.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\n\t\t\t}\n\t\t});\n\t}", "void setListener(Listener listener);", "public interface ButtonListener {\n void add();\n}", "public void ansBrowseBtnAddListener(ActionListener listener)\r\n\t{\r\n\t\tansBrowseBtn.addActionListener(listener);\r\n\t}", "private void initButtonsListener(){\n initDraw();\n initResign();\n initRedo();\n }", "private void setButtonListener2(Button button){\n \tfinal String tag = button.getText().toString();\n \t// button on click listers\n \t\tbutton.setOnClickListener(new OnClickListener() {\n \t\t\t@Override\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tint pos = tagList.indexOf(tag);\n \t\t\t\tmViewPager.setCurrentItem(pos);\n \t\t\t\t\n\n \t\t\t}\n \t\t});\n }", "private void friendsListBtnListener() {\n friendsListBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new FriendsListScreen(game));\n }\n });\n }", "public void viewAnswerImageBtnAddListener(ActionListener listener)\r\n\t{\r\n\t\tbtnViewAnswerImage.addActionListener(listener);\r\n\t}", "private void setClickListeners() {\n buttonSomethingWentWrong.setOnClickListener(this);\n buttonSuggestion.setOnClickListener(this);\n buttonHighlightRequest.setOnClickListener(this);\n closeButton.setOnClickListener(this);\n }", "public void setOnClickListener(View.OnClickListener listener) {\n this.listener = listener;\n }", "public void setOnClickListener(View.OnClickListener listener) {\n this.listener = listener;\n }", "public void setButton() {\n pan.add(playButton);\n }", "private void initListener() {\n un.setOnClickListener(this);\n deux.setOnClickListener(this);\n trois.setOnClickListener(this);\n quatre.setOnClickListener(this);\n cinq.setOnClickListener(this);\n six.setOnClickListener(this);\n sept.setOnClickListener(this);\n huit.setOnClickListener(this);\n neuf.setOnClickListener(this);\n zero.setOnClickListener(this);\n etoile.setOnClickListener(this);\n diaize.setOnClickListener(this);\n efface.setOnClickListener(this);\n setComposer.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n paletteComposition.setVisibility(View.VISIBLE);\n setComposer.setVisibility(View.GONE);\n }\n });\n call_btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (!tableView.getText().toString().trim().equals(\"\"))\n Utils.call(ComposerContact.this, tableView.getText().toString().trim());\n }\n });\n }", "public void qBrowseBtnAddListener(ActionListener listener)\r\n\t{\r\n\t\tqbrowseBtn.addActionListener(listener);\r\n\t}", "private void setButtonOnClickListener() {\n binding.ibtBack.setOnClickListener(event -> navController.navigateUp());\n }", "private void setDoneButtonListener()\n\t{\n\t\tButton doneButton = (Button) findViewById(R.id.back_button);\n\t\tdoneButton.setOnClickListener\n\t\t(\n\t\t\tnew View.OnClickListener()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v)\n\t\t\t\t{\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t}\n\t\t);//END setOnClickListener\n\t}", "private void registerListener(int btnId) {\n\n View btn = findViewById(btnId);\n\n if (btn != null) {\n btn.setOnClickListener(this);\n } else {\n debug(\"registerListener\", \"error\", \"resource not available\");\n }\n }", "protected void setOnClickFABListener(View.OnClickListener listener){\n mFAB.setOnClickListener(listener);\n }", "@Override\n public void onClick(View v) {\n mListener.onAddButtonClicked();\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tlistener(v);\n\n\t\t}", "private void currentGamesBtnListener() {\n currentGamesBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new CurrentGamesScreen(game));\n }\n });\n }", "private void initListeners() {\n btnCadastrar.setOnClickListener(this);\n cadastrar.setOnClickListener(this);\n }", "private void addListener() {\n ActionListener actionGravar = new GravarUsuario();\n JButton bt;\n bt = getPanelBotoes().getBtCadastrar();\n bt.addActionListener(actionGravar);\n bt = getPanelBotoes().getBtAtualizar();\n bt.setVisible(false);\n }", "public void setListeners() {\n mbt_no_realizar_comentario.setOnClickListener(this);\n mbt_realizar_comentario_propietario.setOnClickListener(this);\n }", "public void createEvents(){\r\n\t\tbtnCurrent.addActionListener((ActionEvent e) -> JLabelDialog.run());\r\n\t}", "public void buttonClicked() {\n mSanitizorGame.buttonClicked();\n }", "public interface customButtonListener {\n public void onNavigateButtonClickListener(int position,String value);\n\n public void onFeedbackButtonClickListener(int position,String value);\n }", "private void buttonListener(int x, int y) {\t\n\t\tbuttons[x][y].addActionListener(event -> controller.onClick(x, y));\n\t}", "public interface OnButtonPressListener {\n void onButtonPress(Message message);\n }", "@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}", "public void buttonChangeStatus(ActionEvent actionEvent) {\n }", "@Override\n\tprotected void InitButtonListener() {\n\t\ttextViewAvgInital.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tCursurIndex = 1;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t\tClickAverageInitial();\n\t\t\t}\n\t\t});\n\t\ttextViewDaysInital.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tCursurIndex = 2;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t\tClickDaysInitial();\n\t\t\t}\n\t\t});\t\t\n\t\timgbtnOK.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tCursurIndex = 3;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t\tClickOK();\n\t\t\t}\n\t\t});\t\t\n\t}", "private void setupBtnListeners() {\n findViewById(R.id.btnAddValue).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n buttonAddValues();\n updateUI();\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n\n //Button to open blood pressure chart sets opens blood pressure chart activity\n findViewById(R.id.btnOpenBPChart).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent bpChart = new Intent(WeightActivity.this, BPChartActivity.class);\n startActivity(bpChart.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION));\n mSettingsOrBPChartOpened = true;\n }\n });\n\n //Clicking date button opens date picker and closes keyboard\n findViewById(R.id.tvDate).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showDatePickerDialog();\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n }", "public void registerButtons()\n\t{\n\t\tplot.addActionListener(new ButtonListener());\n\t\tin.addActionListener(new ButtonListener(1));\n\t\tout.addActionListener(new ButtonListener(2));\n\t\t\n\t}", "public void setOnConfigureClickListener(OnConfigureClickListener listener) {\n this.listener = listener;\n }", "private void setEventListener() {\n mCameraView.addCameraKitListener(this);\n mCameraButton.setOnClickListener(this);\n mCameraButtonCloud.setOnClickListener(this);\n }", "public void onButtonPressed(Uri uri) {\n if (mListener != null) {\n\n }\n }", "void setActionListener(ActionListener listener) {\n goButton.addActionListener(listener);\n for (JRadioButton rb : buttons) {\n rb.addActionListener(listener);\n }\n }", "private void setListeners() {\r\n \t/*----------------------------\r\n\t\t * 1. Buttons\r\n\t\t\t----------------------------*/\r\n\t\t//\r\n \tButton bt_create = (Button) findViewById(R.id.db_manager_btn_create_table);\r\n \tButton bt_drop = (Button) findViewById(R.id.db_manager_btn_drop_table);\r\n \tButton bt_register_patterns = \r\n \t\t\t\t\t\t(Button) findViewById(R.id.db_manager_btn_register_patterns);\r\n \t\r\n \t/*----------------------------\r\n\t\t * 2. Tags\r\n\t\t\t----------------------------*/\r\n \tbt_create.setTag(Methods.ButtonTags.db_manager_activity_create_table);\r\n \tbt_drop.setTag(Methods.ButtonTags.db_manager_activity_drop_table);\r\n \tbt_register_patterns.setTag(Methods.ButtonTags.db_manager_activity_register_patterns);\r\n \t\r\n \t/*----------------------------\r\n\t\t * 3. Listeners\r\n\t\t * \t\t1. OnClick\r\n\t\t * \t\t2. OnTouch\r\n\t\t\t----------------------------*/\r\n \t/*----------------------------\r\n\t\t * 3.1. OnClick\r\n\t\t\t----------------------------*/\r\n \t//\r\n \tbt_create.setOnClickListener(new ButtonOnClickListener(this));\r\n \tbt_drop.setOnClickListener(new ButtonOnClickListener(this));\r\n \tbt_register_patterns.setOnClickListener(new ButtonOnClickListener(this));\r\n \t\r\n \t/*----------------------------\r\n\t\t * 3.2. OnTouch\r\n\t\t\t----------------------------*/\r\n \t//\r\n \tbt_create.setOnTouchListener(new ButtonOnTouchListener(this));\r\n \tbt_drop.setOnTouchListener(new ButtonOnTouchListener(this));\r\n \tbt_register_patterns.setOnTouchListener(new ButtonOnTouchListener(this));\r\n \t\r\n \t/*----------------------------\r\n\t\t * 4. Disenable => \"Create table\"\r\n\t\t\t----------------------------*/\r\n// \tbt_create.setEnabled(false);\r\n \t\r\n\t}", "protected void setSubmitReviewButtonListener() {\n\n submitButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String username = getSharedPreferences(\"appUserPrefs\",MODE_PRIVATE).getString(\"username\",\"\");\n String venueID = pitch.getVenueID();\n String pitchName = pitch.getPitchName();\n PlayerSubmitReview playerSubmitReview = new PlayerSubmitReview(username,\n venueID, pitchName, ratingBar.getRating());\n connectionManager.setNewPitchRating(playerSubmitReview);\n Toast.makeText(instance, \"Pitch reviewed successfully: \" + ratingBar.getRating() ,\n Toast.LENGTH_SHORT).show();\n }\n });\n }", "private void setFloatingActionButtonListener() {\n floatingActionButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n View mView = getLayoutInflater().inflate(R.layout.add_trail_dialogbox, null);\n popUpDialogBox(mView, 1);\n }\n });\n }" ]
[ "0.82614964", "0.8192561", "0.7478328", "0.7363916", "0.719137", "0.7189081", "0.71436286", "0.713951", "0.7103862", "0.7099529", "0.7089942", "0.70795923", "0.70287645", "0.7024317", "0.7003593", "0.6999646", "0.69915986", "0.69887584", "0.6944712", "0.6916779", "0.6893452", "0.6863363", "0.6838724", "0.6838724", "0.6837988", "0.68215364", "0.68063843", "0.68063843", "0.6806003", "0.67673117", "0.6764473", "0.67523557", "0.6749973", "0.67126113", "0.67083985", "0.6704602", "0.670348", "0.6703142", "0.6699235", "0.6694377", "0.66750187", "0.6668985", "0.66653985", "0.6660633", "0.6635033", "0.66313934", "0.6622821", "0.6621809", "0.66176", "0.6598519", "0.6594169", "0.65589136", "0.65497625", "0.65356505", "0.6518921", "0.6492448", "0.648842", "0.64812577", "0.64788043", "0.6477315", "0.64664716", "0.64502674", "0.64384085", "0.64349735", "0.6424426", "0.6424161", "0.64142364", "0.6412473", "0.64107734", "0.6404368", "0.6404368", "0.6402035", "0.6396876", "0.63867027", "0.6364458", "0.63503474", "0.63421535", "0.6334508", "0.6330491", "0.63246083", "0.63224596", "0.63144547", "0.6313092", "0.63018876", "0.6294559", "0.6286523", "0.62852895", "0.628007", "0.6278717", "0.62761843", "0.627282", "0.62712806", "0.626113", "0.6254505", "0.62531126", "0.62509406", "0.62395644", "0.6238416", "0.6237012", "0.62362385", "0.62249994" ]
0.0
-1
If shake is playable at the moment:
@Override public void onClick(View v) { if(mIsShakePlayable) { // Making button unavailable for a while: mIsShakePlayable = false; mShakeButton.setBackgroundResource(R.color.colorGrayDark); // Animating the profile area: showShakeAnimation(mOpponentProfileArea); Handler EmoteAvailabilityHandler = new Handler(); EmoteAvailabilityHandler.postDelayed(new Runnable() { public void run() { // Making button available once again: mShakeButton.setBackgroundResource(R.drawable.button_red); mIsShakePlayable = true; } }, Constants.SHAKE_TIMEOUT); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onShake() {\n\t\t\tshake();\n\t\t}", "public void shake(){\n translateTransition.playFromStart();\n }", "@Override\n public void onShakeStopped() {\n LogUtil.e(\"onShakeStopped\");\n }", "@Override\n public void onShakeDetected() {\n LogUtil.e(\"onShakeDetected\");\n }", "boolean isShutterPressed();", "private void setupShakeButton() {\n mShakeButton.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n\n // If shake is playable at the moment:\n if(mIsShakePlayable) {\n\n // Making button unavailable for a while:\n mIsShakePlayable = false;\n mShakeButton.setBackgroundResource(R.color.colorGrayDark);\n\n // Animating the profile area:\n showShakeAnimation(mOpponentProfileArea);\n\n Handler EmoteAvailabilityHandler = new Handler();\n EmoteAvailabilityHandler.postDelayed(new Runnable() {\n public void run() {\n\n // Making button available once again:\n mShakeButton.setBackgroundResource(R.drawable.button_red);\n mIsShakePlayable = true;\n\n }\n }, Constants.SHAKE_TIMEOUT);\n\n }\n\n }\n });\n\n }", "public boolean isShivering();", "@Override\n public void onShake(int count) {\n handleShakeEvent(count);\n }", "public abstract void shake(long ms);", "@Override\n public void hearShake() {\n if(pending_intent == null) {\n //do nothing\n } else {\n Log.e(\"shake\", \"you just shake your phone\");\n\n set_alarm_text(\"Alarm off by shaking\");\n\n alarm_manager.cancel(pending_intent);\n\n my_intent.putExtra(\"extra\", \"alarm shake off\");\n my_intent.putExtra(\"song\", song);\n\n sendBroadcast(my_intent);\n }\n }", "@Override\n public void onShake(int count) {\n if(!actionList.isEmpty())\n handleShakeEvent(count);\n }", "public interface C0407a {\n void shakeDetected();\n }", "public static void hit_sound() {\n\t\tif (!hit1) {\n\t\t\thit1 = true;\n\t\t\tm_player_hit.setMediaTime(new Time(0));\n\t\t\tm_player_hit.start();\n\t\t} else if (!hit2) {\n\t\t\thit2 = true;\n\t\t\tm_player_hit2.setMediaTime(new Time(0));\n\t\t\tm_player_hit2.start();\n\t\t} else if (!hit3) {\n\t\t\thit3 = true;\n\t\t\tm_player_hit3.setMediaTime(new Time(0));\n\t\t\tm_player_hit3.start();\n\t\t} else if (!hit4) {\n\t\t\thit4 = true;\n\t\t\tm_player_hit4.setMediaTime(new Time(0));\n\t\t\tm_player_hit4.start();\n\t\t} else if (!hit5) {\n\t\t\thit5 = true;\n\t\t\tm_player_hit5.setMediaTime(new Time(0));\n\t\t\tm_player_hit5.start();\n\t\t} else {\n\t\t\thit1 = hit2 = hit3 = hit4 = hit5 = false;\n\t\t\tm_player_hit6.setMediaTime(new Time(0));\n\t\t\tm_player_hit6.start();\n\t\t}\n\n\t}", "static void UniversalShake() {\n if (!Sounds.getIsMute()) diceShakeSound.start();\n\n diceNum = GameFunctions.rollDice(\"Pigdice\", dice);\n\n if (diceNum == 1) {\n if (playerTurn == 1) {\n endTurn(currentScorePlayer1);\n } else {\n endTurn(currentScorePlayer2);\n }\n } else {\n if (playerTurn == 1)\n currentScorePlayer1.setText(String.valueOf(Integer.parseInt\n (currentScorePlayer1.getText().toString()) + diceNum));\n\n else\n currentScorePlayer2.setText(String.valueOf(Integer.parseInt\n (currentScorePlayer2.getText().toString()) + diceNum));\n }\n }", "boolean getShutterSoundPref();", "public boolean onTouch(View v, MotionEvent event) {\n\n\t\t\t\tswitch (event.getActionMasked()) {\n\t\t\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t\t\tshakeCtrlView.setAlpha(50);\n\t\t\t\t\tisShakePressed = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase MotionEvent.ACTION_UP:\n\t\t\t\t\tshakeCtrlView.setAlpha(255);\n\t\t\t\t\tisShakePressed = false;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}", "public void shake(){\n ObjectAnimator.ofFloat(this, \"translationY\", 0, 25, -25, 25, -25,15, -15, 0).start();\n }", "public void onShake(float force) {\n String keys=\" \";\n String mode=\"k\";\n if (mTcpClient != null && !paused) {\n mTcpClient.sendMessage(mode+keys);\n Log.d(\"myInfo\", \"Send: \"+mode+\":\"+keys );\n }\n\n // Called when Motion Detected\n Toast.makeText(context, \"Motion detected\",\n Toast.LENGTH_SHORT).show();\n\n }", "public boolean takeControl(){\r\n\t\tif(sound.readValue()>40){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boolean checkTransitionToShooting() {\n if (mOperatorInterface.getShoot() /* && (!mStorage.isEmpty()) && result.HasResult*/) {\n mRobotLogger.log(\"Changing to shoot because our driver said so...\");\n switch (mState) {\n\n /** Disables intake if transitioning from intake */\n case INTAKE:\n mIntake.stop();\n mStorage.stop();\n mIntakeState = IntakeState.IDLE;\n break;\n default:\n break;\n }\n mState = State.SHOOTING;\n\n /** Sets the shooting state to preparing if it's not already */\n if (mShootingState == ShootingState.IDLE) {\n mShootingState = ShootingState.PREPARE_TO_SHOOT;\n }\n return true;\n } else {\n // mRobotLogger.info(\"Could not shoot because \" + (!mStorage.isEmpty()) + \" \" +\n // mOperatorInterface.getShoot());\n return false;\n }\n }", "public void onShake(int level) {\n \t\t long currentUpdateTime = SystemClock.elapsedRealtime(); \n \t//Log.d(TAG,\"onShake() currentUpdateTime = \"+currentUpdateTime);\n \t\t long timeInterval = currentUpdateTime - lastUpdateShakeTime; \n \t\t if(timeInterval < UPDATE_INTERVAL_TIME) { \n \t\t return; \n \t\t }\n \t\t lastUpdateShakeTime = currentUpdateTime;\n \t\t if(level == mLastLevel){\n \t\t \treturn;\n \t\t }\n \t\t //modify by guoliangliang 20150313 begin\n \t\t if(level == 0){\n \t\t \tmZeroLevelCount++;\n \t\t \tif(mZeroLevelCount == 3){\n \t\t\t\t\tLog.d(TAG,\"mZeroLevelCount = 3\"+\" currentUpdateTime=\"+currentUpdateTime);\n \t\t \t\tmZeroLevelCount = 0;\n \t\t\t\t\tmCurrentZhendongLevel = 0;\n \t\t\t\t\tmLastLevel = 0;\n \t\t \t}else{\n \t\t \t\tgetCurrentLevelByInputLevel(level);\n \t\t \t}\n \t\t }else{\n \t\t \tmZeroLevelCount = 0;\n \t\t \tgetCurrentLevelByInputLevel(level);\n \t\t }\n \t\t //getCurrentLevelByInputLevel(level);\n \t\t //modify by guoliangliang 20150313 end\n \t\t Log.d(TAG, \"level=\" + level + \" mZeroLevelCount=\" + mZeroLevelCount + \" mLastLevel=\" + mLastLevel + \" mCurrentZhendongLevel=\" + mCurrentZhendongLevel + \" currentUpdateTime=\" + currentUpdateTime); \n setFunLevelMode(mCurrentZhendongLevel);\n mImageLevel.setImageLevel((int) (MAX_IMAGE_LEVEL * ((float) mCurrentZhendongLevel / MAX_LEVEL)));\n }", "public void shake(float d) {\n shakeDuration = d;\n }", "private void showShakeAnimation(View profileArea){\n if(mSoundStatus.equals(Constants.ON)) mShakeSound.start();\n\n final View finalProfileArea = profileArea;\n final int numberOfRotations = 30;\n ObjectAnimator shakeAnimator = ObjectAnimator.ofFloat(profileArea,\n \"rotation\", -3, 3);\n shakeAnimator.setInterpolator(new AccelerateDecelerateInterpolator());\n shakeAnimator.setRepeatCount(numberOfRotations - 1);\n shakeAnimator.setRepeatMode(ObjectAnimator.REVERSE);\n shakeAnimator.setDuration(Constants.SHAKE_ANIMATION_DURATION / numberOfRotations);\n\n shakeAnimator.addListener(new Animator.AnimatorListener() {\n @Override\n public void onAnimationStart(Animator animator) {}\n @Override\n public void onAnimationEnd(Animator animator) {\n finalProfileArea.setRotation(0);\n }\n @Override\n public void onAnimationCancel(Animator animator) {}\n @Override\n public void onAnimationRepeat(Animator animator) {}\n });\n\n shakeAnimator.start();\n\n }", "public void onShutter() {\n }", "public void checkIfShowerOn(){\n double currentSMA = mySMA.currentAverage();\n Log.d(LOGTAG,\"currentSMA: \"+currentSMA);\n Log.d(LOGTAG,\"isShowerOn: \"+ isShowerOn);\n if (currentSMA>SMA_THRESHOLD && !isShowerOn){\n //Initialize stuff to do once shower is on\n isShowerOn=true;\n startShower();\n } else if (currentSMA<SMA_THRESHOLD && isShowerOn){\n //Shutdown\n isShowerOn=false;\n endShower();\n }\n }", "public void run() {\n mShakeButton.setBackgroundResource(R.drawable.button_red);\n mIsShakePlayable = true;\n\n }", "public void onShutter() {\n \n }", "boolean isPlayable();", "public boolean is_shot(){\n \treturn this.shot;\n }", "public abstract void isHelpTurn(long ms);", "public boolean isShooting()\r\n\t{\r\n\t\treturn false;\r\n\t}", "void onShutter();", "public boolean getSoundShot() { return soundShot; }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlevel.addAction(GeneralHelper.shakeSprite(getSprite(), -5));\n\t\t\t\t}", "private void resetShakeDetector() {\n try {\n mShakeDetector.resume();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n\n mRetryTextView.setText(String.format(\"%d\", mFailedTime));\n\n mFailedTime = 0;\n// mPreviousCampaign = null;\n getActivity().setProgressBarIndeterminateVisibility(false);\n\n mPreviousShakeTime = (System.currentTimeMillis() - mShakeStartTime ) * 1.0 / 1000.0;\n mTimeTextView.setText(String.format(\"%.3f seconds\", mPreviousShakeTime));\n\n registerSensorListeners();\n\n setMoved(false);\n }", "@Override\n public void onShutter() {\n }", "@Override\r\n\tpublic void sendShakePrepare() {\r\n\t\tCollection<Player> list = getPlayers().values();\r\n\t\tif ((getGameState() == GameState.Created || getGameState() == GameState.Prepared) && list.size() > 1) {\r\n\t\t\t// 这里的逻辑有BUG,这个是发送给房间所有的用户是否可以摇筛子,如果用户已经摇过了就不可以再发\r\n\t\t\t// 把SendToALL改为一个个的判断发\r\n\r\n\t\t\tboolean isShaked = false;\r\n\t\t\tfor (Player player : list) {\r\n\t\t\t\tif (player.getPlayerState() == PlayerState.EndShaked) {\r\n\t\t\t\t\tisShaked = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (isShaked) {\r\n\t\t\t\tsendNotShakeUserPrepare();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tfor (Player player : list) {\r\n\t\t\t\tPacket packet = new Packet(UserCmdOutType.SHAKE_PREPARE);\r\n\t\t\t\tisShaked = false;\r\n\t\t\t\tif (player.getPlayerState() == PlayerState.EndShaked) {\r\n\t\t\t\t\tisShaked = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (!isShaked) {\r\n\t\t\t\t\tpacket.putBoolean(isShaked);\r\n\t\t\t\t\tsendToPlayer(packet, player);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "boolean isGameSpedUp();", "public void setSoundShot(final boolean sShot) { soundShot = sShot; }", "public void startShower(){\n Log.d(LOGTAG,\"Shower is on.\");\n playSound();\n\n\n }", "@Override\n public void onShutter() {\n }", "public boolean isShotDown(){\n return this.shotDown;\n }", "public boolean hasBeenShot(){\n return this.hasBeenShot;\n }", "boolean isCrouching();", "public void gameComplete() {\n if (soundToggle == true) {\n gameComplete.start();\n } // if\n }", "boolean hasFairplay();", "public boolean isSwimming() {\n/* 1967 */ return (!this.abilities.flying && !isSpectator() && super.isSwimming());\n/* */ }", "public void isGameOver() { \r\n myGameOver = true;\r\n myGamePaused = true; \r\n }", "private boolean hasEatenApple() {\r\n return snake.getHead().equals(apple);\r\n }", "public void makeHappy() {\n while (statusEnum() != TamagotchiMood.HAPPY) {\n if (!isHungry() && !isTired()) {\n play();\n } else if (isHungry() && !isTired()) {\n eat();\n } else {\n sleep();\n }\n }\n\n if (!muted) {\n System.out.println(\"I can do thing on my own now and will rule the world! MUHAHAHA!\");\n }\n }", "@Override\n\t\tpublic void onShutter() {\n\n\t\t}", "private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }", "public boolean isVideoShutterAnimationEnssential() {\n return true;\n }", "boolean hasMinigameAction();", "public boolean shouldHit() {\r\n\t\tif(getHandVal() < 17) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false; \r\n\t}", "public abstract void isCorrectionTurn(long ms);", "private void checkClicked()\n {\n if (Greenfoot.mouseClicked(this))\n {\n if (musicPlaying == true)\n {\n setImage(\"volumeOn.png\");\n GreenfootImage volumeOn = getImage();\n volumeOn.scale(70,70);\n setImage(volumeOn); \n soundtrack.playLoop();\n musicPlaying = false;\n }\n else if (musicPlaying == false)\n {\n setImage(\"volumeOff.png\");\n GreenfootImage volumeOff = getImage();\n volumeOff.scale(70,70);\n soundtrack.stop();\n musicPlaying = true;\n }\n }\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n // 0. Do not notify if event is unreliable\n if (event.accuracy == SensorManager.SENSOR_STATUS_UNRELIABLE) {\n return;\n }\n\n boolean shaken = checkIfShake(event);\n\n // 1. Notify otherwise\n // 2. Even more, if wearable device was shaken – notify about the shake as well\n for (OnAccelerometerListener listener : mOnAccelerometerListeners) {\n listener.onAccelerometerValueChanged(event);\n if (shaken) {\n listener.onShakeDetected();\n }\n }\n }", "public boolean isSound() {\n\t\treturn true;\n\t}", "@Override\n public boolean isUsableEffectOne() {\n return getEffectsEnable()[0] && getUsableEffect()[0] && ((TargetSquareRequestEvent) getTargetEffectOne()).getPossibleTargetsX().length != 0;\n }", "public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}", "boolean hasSpeed();", "boolean hasSpeed();", "boolean hasSpeed();", "boolean hasSpeed();", "boolean hasSpeed();", "boolean hasSpeed();", "boolean isPlayableInGame();", "@Override\n public void beHelpful() {\n this.playPiano();\n this.takeABow();\n }", "public void play() {\n\t\tif (happiness + 10 > 100) {\n\t\t\thappiness = 100;\n\t\t} else {\n\t\t\thappiness += 10;\n\t\t}\n\t}", "protected boolean isGameOver(){\n return (getShipsSunk()==10);\n }", "public void pointScore() {\n if (soundToggle == true) {\n scoreSound.start();\n } // if\n }", "boolean isAllowFriendlyFire();", "public static void GameOverCrashSound(){\n if(soundActivated) {\n if(!crashSoundDone) {\n AudioManager audioManager = (AudioManager) mActivity.getSystemService(AUDIO_SERVICE);\n float actualVolume = (float) audioManager\n .getStreamVolume(AudioManager.STREAM_MUSIC);\n float maxVolume = (float) audioManager\n .getStreamMaxVolume(AudioManager.STREAM_MUSIC);\n float volume = actualVolume / maxVolume;\n mSound.play(soundCrash, volume, volume, 1, 0, 1f);\n\n crashSoundDone = true;\n\n }\n }\n }", "@Override\n protected void controlUpdate(float tpf) {\n if (movementState != CharacterMovementState.IDLE) {\n\n // clear old collision results\n this.results.clear();\n\n // refresh ray object\n this.ray.setOrigin(spatial.getWorldTranslation());\n\n // let ray collide with game world\n gameWorld.collideWith(ray, results);\n\n // if we hit something we can get the specific sound\n // from the added user data object\n\n // here we store the sound we found from our collision result\n FootstepSound sound = null;\n\n // here we reference to the footstep user data\n FootstepSoundUserData userData;\n\n // maybe it could be that we hit our own feet\n // that's why we give the chance to check all results here\n for (CollisionResult result : results) {\n\n userData = result.getGeometry().getUserData(GameConstants.USER_DATA_FOOTSTEP_SOUND);\n\n // if the hit geometry was terrain we just play a default sound (for now)\n if (result.getGeometry().getParent() instanceof TerrainQuad) {\n sound = FootstepSound.Sand; // default sound\n }\n\n // if the geometry has valid footstep data\n // we set our sound\n if (userData != null) {\n if (userData.getFootstepSound() != null) {\n sound = userData.getFootstepSound();\n break;\n }\n }\n }\n\n // see whether sound is set\n if (sound == null) {\n return;\n }\n\n // if the same sound was found and doesn't play at the moment\n // play it again\n if (lastSound == sound) {\n if (currentFootstepSound != null && currentFootstepSound.getStatus() != AudioSource.Status.Playing) {\n currentFootstepSound.play();\n }\n } else {\n if (currentFootstepSound != null) {\n // stop current played sound and detach it\n currentFootstepSound.stop();\n currentFootstepSound.removeFromParent();\n }\n\n // create new sound\n currentFootstepSound = new AudioNode(assetManager, sound.getSoundPath(), AudioData.DataType.Buffer);\n currentFootstepSound.setLooping(false);\n currentFootstepSound.setPositional(true);\n currentFootstepSound.setLocalTranslation(0, 0, 0);\n currentFootstepSound.setRefDistance(3f);\n currentFootstepSound.setMaxDistance(1000);\n ((Node) spatial).attachChild(currentFootstepSound);\n currentFootstepSound.play();\n\n lastSound = sound;\n }\n } else {\n // player does not move, so stop (here: pause) sound\n if (currentFootstepSound != null && currentFootstepSound.getStatus() == AudioSource.Status.Playing) {\n currentFootstepSound.pause();\n }\n }\n }", "boolean play();", "public boolean canHit() {\n\t\treturn this.hand.countValue().first() < 17;\n\t}", "@Override\n\tpublic boolean isGameTied() {\t\n\t\treturn false;\n\t}", "@Override\n public boolean onInterceptTouchEvent(MotionEvent e) {\n return (!(ROCKET_LAUNCHER && mManeuveringThrusters));\n }", "private void checkKeys()\n {\n if (Greenfoot.isKeyDown(\"d\") )\n {\n /*\n * \n *setImage(\"Plyr1_Right.png\");\n *moveRight();\n */\n moveRight();\n turn(30);\n setRotation(30);\n }\n else if (Greenfoot.isKeyDown(\"a\") )\n {\n //setImage(\"Plyr1_Left.png\");\n moveLeft();\n turn(-30);\n setRotation(-30);\n \n }\n else\n {\n turn(0);\n setRotation(0);\n Greenfoot.playSound(\"engine_4.wav\");\n }\n if (Greenfoot.isKeyDown(\"w\") )\n {\n moveUp();\n }\n if (Greenfoot.isKeyDown(\"s\") )\n {\n //moveDown();\n }\n {\n if(isTouching(TestProblem.class))\n {\n Greenfoot.stop();\n }\n }\n}", "boolean isSneaking();", "public void playGameOverSound() {\n\t\ttry {\n\t\t\tAudioInputStream audioStream = AudioSystem.getAudioInputStream(new File(\"Musik/DeadSound.wav\"));\n\t\t\t\n\t\t\tClip clip = AudioSystem.getClip(); \n\t\t\tclip.open(audioStream);\n\t\t\t\n\t\t\tboolean oldStatus = settings.isPlaying(); \n\t\t\t\n\t\t\tstopMusik();\n\t\t\t\n\t\t\t\n\t\t\tthis.settings.setPlaying(oldStatus);\n\t\t\tclip.start();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "private void checkMovement()\n {\n if (frames % 600 == 0)\n {\n \n ifAllowedToMove = true;\n \n \n }\n \n }", "@Override\n public boolean onTouchEvent(MotionEvent motionEvent) {\n\n switch (motionEvent.getAction() & MotionEvent.ACTION_MASK) {\n\n // Player has touched the screen\n case MotionEvent.ACTION_DOWN:\n paused = false;\n // Pause game if pause button is touched\n if (playing && motionEvent.getX() > pauseRect.left && motionEvent.getX() < pauseRect.right && motionEvent.getY() > pauseRect.top && motionEvent.getY() < pauseRect.bottom) {\n openPauseMenu = true;\n }\n if (motionEvent.getX() < ExcessX) {\n defender.setMovementState(defender.LEFT);\n } else if (motionEvent.getX() > (ExcessX + PlayableX)) {\n defender.setMovementState(defender.RIGHT);\n } else {\n if(bullet.shoot(defender.getX()+ defender.getLength()/2,screenY, bullet.UP)){\n soundPool.play(playerShootID, 1, 1, 0, 0, 1);\n }\n }\n break;\n\n // Player has removed finger from screen\n case MotionEvent.ACTION_UP:\n // Start game for first time\n if (openMainMenu && motionEvent.getX() > ExcessX && motionEvent.getX() < (ExcessX + PlayableX)) {\n openMainMenu = false;\n resume();\n }\n // Start new game\n if (openGameOverMenu && motionEvent.getX() > ExcessX && motionEvent.getX() < (ExcessX + PlayableX)) {\n openGameOverMenu = false;\n resume();\n }\n // Continue game\n if (openUpgradesMenu && motionEvent.getX() > ExcessX && motionEvent.getX() < (ExcessX + PlayableX)) {\n openUpgradesMenu = false;\n resume();\n }\n // Play game if paused\n if (!playing && motionEvent.getX() > ExcessX && motionEvent.getX() < (ExcessX + PlayableX)) {\n openPauseMenu = false;\n resume();\n }\n if(motionEvent.getX() > 0 && motionEvent.getX() < screenX) {\n defender.setMovementState(defender.STOPPED);\n }\n break;\n }\n return true;\n }", "private void checkIsAbleToFire() {\n\n\t\tif (ticksToNextFire <= currentTickCount) {\n\t\t\tisAbleToFire = true;\n\t\t} else {\n\t\t\tisAbleToFire = false;\n\t\t}\n\t}", "public boolean getSoundAmbience() { return soundAmbience; }", "private boolean canMakeSmores() {\n return (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP_MR1);\n }", "public boolean musicOn ()\n\t{\n\t\tif (musicInt == 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "boolean isTurnedFaceUp();", "public void hasHeartPower(){\n shipVal.setHealth(shipVal.getHealth()+1);\n updateHearts(new ImageView(cacheHeart));\n score_val += 1000;\n }", "boolean isGameOver() {\n\t\treturn Hit;\n\t}", "boolean wasHit();", "private boolean fireAutoFlashFrontScreen() {\n final int iso_threshold = 750;\n return capture_result_has_iso && capture_result_iso >= iso_threshold;\n }", "private boolean canStartWave() {\n\n return uiStateManager.getState().equals(GameUIState.STANDBY);\n }", "public boolean checkPlays(Player player){\n return true;\n }", "public void gameOver(){\n gameOverMusic.loop(pitch, volume);\n }", "public boolean isGameOver() {\r\n if(timesAvoid == 3) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "private void mo71771s() {\n if (this.f74252h != null) {\n this.f74252h.mo60134a(\"stopPlayAnimation\", (Object) Boolean.valueOf(true));\n }\n }", "@Override\r\n\tpublic void canMissile() {\n\t\tSystem.out.println(\"미사일을 발사 할 수 있습니다.\");\r\n\r\n\t}", "@Override\r\n\tpublic boolean canPlay() {\n\t\treturn false;\r\n\t}" ]
[ "0.70416695", "0.70337164", "0.69028103", "0.6880773", "0.6578707", "0.6512059", "0.64782", "0.6474195", "0.646804", "0.6454419", "0.63338625", "0.6258045", "0.62155783", "0.6179345", "0.6167719", "0.61463434", "0.61447626", "0.6127467", "0.60831267", "0.6080265", "0.6071123", "0.60469043", "0.6046476", "0.6017446", "0.5981642", "0.59676176", "0.59646803", "0.59635234", "0.59268916", "0.5909216", "0.5902766", "0.5893757", "0.5888538", "0.58577216", "0.58214456", "0.5815258", "0.5795194", "0.57771516", "0.57579124", "0.5753892", "0.5750911", "0.57474536", "0.57422954", "0.5731624", "0.5729919", "0.57299066", "0.5726908", "0.5718216", "0.5706485", "0.56832016", "0.567268", "0.56685376", "0.5661772", "0.56372064", "0.56297797", "0.55957747", "0.5585119", "0.55686384", "0.555337", "0.55467284", "0.55387443", "0.5533666", "0.5533666", "0.5533666", "0.5533666", "0.5533666", "0.5533666", "0.5520615", "0.5518362", "0.5511828", "0.54971707", "0.5486053", "0.5482495", "0.547934", "0.5472633", "0.54659754", "0.54615414", "0.5453215", "0.5453102", "0.54522514", "0.5440289", "0.54381245", "0.54373467", "0.5436063", "0.5426546", "0.5424677", "0.54199237", "0.541", "0.54056036", "0.54046476", "0.540406", "0.5402548", "0.5394805", "0.538768", "0.53871596", "0.53852314", "0.53766483", "0.53732604", "0.5372012", "0.53595746" ]
0.65402913
5
Making button available once again:
public void run() { mShakeButton.setBackgroundResource(R.drawable.button_red); mIsShakePlayable = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void redo(){\n\t\tthis.setButtonVisible(true);\n\t}", "public void trigger() {\n button.release(true);\n }", "public void gamereset() {\n Button tmp = (Button) findViewById(R.id.resetbutton);\n tmp.setVisibility(View.VISIBLE);\n }", "public void enableQuitButton(){\n\t\tbtnStop.setVisible(true);\n\t}", "@Override\n\t\tpublic void buttonStatusChange() {\n\t\t\t\n\t\t}", "private void ready(){\n setButtons(false);\n setMsgText(\"You are READY.\");\n }", "public void onYesButtonClicked() {\n changeAfterClientPick();\n }", "private void makeButtonVisible() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n btnDetectObject.setVisibility(View.VISIBLE);\n }\n });\n }", "public void Refresh_button() {\n\t\tthis.defaultSetup();\n\t}", "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}", "public void updateButtons(){\n\t\tif (Player.getPlayer(this).questManager.atMaxNumQuests()) {\n\t\t\tcreateQuest.setEnabled(false);\n\t\t} else {\n\t\t\tcreateQuest.setEnabled(true);\n\t\t}\n\t\tif (selectedQuest != null){\n\t\t\tdeleteQuest.setEnabled(true);\n\t\t\tcompleteQuest.setEnabled(true);\n\t\t} else {\n\t\t\tdeleteQuest.setEnabled(false);\n\t\t\tcompleteQuest.setEnabled(false);\n\t\t}\n\t}", "public void botoiaDesaktibatu2() {\r\n\t\tbtnAurrera.setEnabled(true);\r\n\t}", "public void hintButtonClick(Button button){\r\n button.setMouseTransparent(true);\r\n button.getStyleClass().removeAll(\"chooseButtons\");\r\n button.getStyleClass().add(\"closedButton\");\r\n stackPane.getChildren().removeAll(hintMenuStack,backPane);\r\n }", "public void againButtonClicked() {\r\n\t\tframe.dispose();\r\n\t\tuserInterface = new UserInterface(); \r\n\t\tkeyboard.inputFieldFull = \"\"; \r\n\t\treturn;\r\n\t}", "public void clickButton()\n {\n fieldChangeNotify( 0 );\n }", "private void unlockButton() {\n\t\tconversionPdf_Txt.setEnabled(true);\n\t\tavisJury.setEnabled(true);\n\t\tstatistique.setEnabled(true);\n bData.setEnabled(true);\n\t}", "public void onStartingReservation() {\n this.reserveImageButton.setEnabled(false);\n }", "protected boolean hasPositiveButton() {\n return false;\n }", "public void buttonClick() {\n if (soundToggle == true) {\n buttonClick.start();\n } // if\n }", "@Override\n\tpublic boolean requiresToggleButton() {\n\t\treturn false;\n\t}", "public void updateButton(boolean done) {\n\t\tdiceBtn.setDisable(done);\n\t\tendTurn.setDisable(!done);\n\t}", "private void setupSayAgainButton() {\n\t\tImageIcon sayagain_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"sayagain.png\");\n\t\tJButton sayagain_button = new JButton(\"\", sayagain_button_image);\n\t\tsayagain_button.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t\t\n\t\t\t\t//says the word slowly\n\t\t\t\tparent_frame.getFestival().speak(words_to_spell.get(current_word_number),true);\n\n\t\t\t\t//says the sample sentence at user's preferred speed there is one @author Abby S\n\t\t\t\tif(parent_frame.getDataHandler().hasSampleSentences()){\n\t\t\t\t\tint index=parent_frame.getDataHandler().getWordlistWords().get(parent_frame.getDataHandler().getCurrentLevel()).indexOf(words_to_spell.get(current_word_number));\n\t\t\t\t\tString sentence=parent_frame.getDataHandler().getSampleSentences().get(parent_frame.getDataHandler().getCurrentLevel()).get(index);\n\t\t\t\t\tif (!sentence.trim().isEmpty()){\n\t\t\t\t\t\tparent_frame.getFestival().speak(sentence,false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tsayagain_button.addMouseListener(new VoxMouseAdapter(sayagain_button,null));\n\t\tadd(sayagain_button);\n\t\tsayagain_button.setBounds(667, 598, 177, 100);\n\t}", "@Override\n public void activateEndOfProductionButton() {\n gameboardPanel.enableEndOfProductionButton();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\taddBtn.setEnabled(true);\n\t\t\t}", "@Override\n public void whileHovering(InterfaceButton button) {\n }", "private void lockButton(){\n\t\tconversionPdf_Txt.setEnabled(false);\n\t\tavisJury.setEnabled(false);\n\t\tstatistique.setEnabled(false);\n\t\tbData.setEnabled(false);\n\t\tbDataTraining.setEnabled(false);\n\t\tbCompare.setEnabled(false);\n\t}", "public void manageCashDrawerBtn() {\n\t\tpause(1000);\n\t\tWebElement temp = (new WebDriverWait(driver, waitTime))\n\t\t\t\t .until(ExpectedConditions.presenceOfElementLocated(By.id(\"managePrtBtn\")));\n\t\ttemp.click();\n\t\tpause(1000);\n\t}", "public void enableEndOfProductionButton(){\n this.endOfproductionButton.setEnabled(true);\n }", "private void doButtons()\n {\n if (scopes.size()>1) addButtons();\n else hideButtons();\n }", "public void settingBtnClick() {\n\t}", "@FXML private void okButtonActivity() {\n if (activeUser != null && !activeUser.getUsername().equals(recipe.getAuthor())){\n okButton.setDisable(false);\n }\n }", "void toggleToolboxButton(JButton button){\r\n // Reset Selections\r\n Selection.setSelected(false);\r\n Wire.setSelected(false);\r\n RotateRight.setEnabled(true);\r\n RotateLeft.setEnabled(true);\r\n InsertSubComponent.setSelected(false);\r\n\r\n // Select this button\r\n button.setSelected(true);\r\n \r\n optionsPanel.setVisible(false);\r\n circuitPanel.removeUnfixedComponents();\r\n }", "public void updateStartButton(){\n if (getPrimHasRun() == true){\n startButton.setAlpha(0.5f);\n startButton.setClickable(false);\n } else {\n startButton.setAlpha(1f);\n startButton.setClickable(true);\n }\n }", "@Override\n\tpublic boolean onClick(Player player, int buttonID) {\n\t\treturn false;\n\t}", "@Override\n\tprotected void on_button_pressed(String button_name) {\n\n\t}", "public void buttonClicked() {\n mSanitizorGame.buttonClicked();\n }", "private void rHintButton(Button button){\r\n button.getStyleClass().remove(\"closedButton\");\r\n button.getStyleClass().add(\"chooseButtons\");\r\n button.setMouseTransparent(false);\r\n }", "private void disableButtons()\r\n {\r\n }", "@Override\n\tpublic void setButtonAction() {\n\t}", "public void ButtonStatusToOneWay() throws InterruptedException {\n\n Thread.sleep(10000);\n //action=new Actions(this.driver);\n if (oneWayButton.isSelected()) {\n System.out.println(\"One way Button is already selected\");\n } else {\n wait.until(ExpectedConditions.elementSelectionStateToBe(oneWayButton,false));\n oneWayButton.click();\n System.out.println(\"one way button is clicked\");\n }\n\n\n }", "public void cancel()\n\t{\n\t\t_buttonHit = true;\n\t}", "private void updateButton(JButton button) {\n\t\tbutton.setFocusPainted(comboBox.isEditable());\n\t}", "private void createButton(){\n addButton();\n addStartButton();\n }", "private void reEnableCopyButtons() {\n // re-enable the buttons the relevant buttons\n copyToASpaceButton.setEnabled(true);\n repositoryCheckButton.setEnabled(true);\n copyProgressBar.setValue(0);\n\n if (copyStopped) {\n if (ascopy != null) ascopy.saveURIMaps();\n copyStopped = false;\n copyProgressBar.setString(\"Cancelled Copy Process ...\");\n } else {\n copyProgressBar.setString(\"Done\");\n }\n }", "public void takeBackMoney() {\n moneyGivingBack = 0;\n takeMoneyButton.setVisible(false);\n }", "@Override\n protected void actionPerformed(GuiButton button)\n {\n super.actionPerformed(button);\n }", "private void setUpThisPageForReturn() {\n ImageButton returnButton = findViewById(R.id.return_icon);\n returnButton.setVisibility(View.INVISIBLE);\n }", "private void packupbtn() {\n\t\tif (symbel_int == -1) {\r\n\t\t\tLog.d(\"play_menu\", \"play_menu\");\r\n\t\t\ttran_sur.setVisibility(View.VISIBLE);\r\n\t\t\tplay_menu_arrow1.setImageResource(R.drawable.arrow_up);\r\n\t\t\tsymbel_int = symbel_int * -1;\r\n\t\t\tslowdown();\r\n\t\t}\r\n\t}", "public void makeObtainButton() {\r\n JButton obtain = new JButton(\"Obtain a new champion using Riot Points\");\r\n new Button(obtain, main);\r\n// obtain.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// obtain.setPreferredSize(new Dimension(2500, 100));\r\n// obtain.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n obtain.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n obtainChampionUsingRiotPoints();\r\n }\r\n });\r\n// main.add(obtain);\r\n }", "@Override\r\n\tprotected ActionListener updateBtnAction() {\n\t\treturn null;\r\n\t}", "public void toggleStoreButton()\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.TOGGLE_STORE_BUTTON;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }", "protected void actionPerformed(GuiButton button) throws IOException {\n/* 60 */ if (button.enabled)\n/* */ {\n/* 62 */ if (button.id == 1) {\n/* */ \n/* 64 */ this.lastScreen.confirmClicked(false, 0);\n/* */ }\n/* 66 */ else if (button.id == 0) {\n/* */ \n/* 68 */ this.serverData.serverIP = this.ipEdit.getText();\n/* 69 */ this.lastScreen.confirmClicked(true, 0);\n/* */ } \n/* */ }\n/* */ }", "private void disableButtons() {\n for (DeployCommand cmd : DeployCommand.values()){\n setButtonEnabled(cmd, false);\n }\n butDone.setEnabled(false);\n setLoadEnabled(false);\n setUnloadEnabled(false);\n setAssaultDropEnabled(false);\n }", "private void updateButtonStateEpson(boolean state) {\n }", "public void clickonFullyAutomaticFrontLoad() {\n\t\t\n\t}", "@Override\n\tpublic boolean activate() {\n\t\tfinal Component CANCEL_BUTTON = CONSTS.CANCEL_BUTTON;\n\t\treturn ctx.backpack.select().id(CONSTS.fletching.getId()).count() >= 1\n\t\t\t\t&& !CANCEL_BUTTON.valid() \n\t\t\t\t&& !CANCEL_BUTTON.visible();\n\t}", "@Override\r\n\tpublic void actionPerformed(GuiButton button) {\r\n switch (button.id) {\r\n case 0:\r\n GuiYesNo confirmGui = new GuiYesNo(this, \"Delete Waypoints\", \"Are you sure you want to delete the selected waypoints?\", \"Yes\", \"No\", 0);\r\n confirmGui.setButtonDelay(5);\r\n this.mc.displayGuiScreen(confirmGui);\r\n break;\r\n }\r\n\t}", "public void sButton() {\n\n\n\n }", "private void checkButtonUnlock() {\r\n\t\tif (this.isAdressValid && this.isPortValid) {\r\n\t\t\tview.theButton.setDisable(false);\r\n\t\t}\r\n\r\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\tpublic void CountDownFinish() {\n\t\tcheckButtonsEnable();\n\t}", "protected void enableButton(Button button){\n button.setVisibility(View.VISIBLE);\n button.setClickable(true);\n }", "void outOfTime() {\r\n\r\n disableOptionButtons();\r\n }", "public void showButtonInactive( JButton button ) {\r\n /*------------------------------------------------------------------------*/\r\n button.setIcon(\r\n new javax.swing.ImageIcon(\r\n getClass().getResource(LED_OFF)));\r\n }", "public void updateResetButton(){\n if (vertexImages.size() < 1){\n resetButton.setAlpha(0.5f);\n resetButton.setClickable(false);\n }\n else {\n resetButton.setAlpha(1f);\n resetButton.setClickable(true);\n }\n }", "public void toggleSubmitButton(){\n switch (mSubmitButton.getText().toString()){\n case \"Submit\":\n mSubmitButton.setText(\"Next\");\n mSubmitButton.setOnClickListener(view -> recreate());\n break;\n case \"Next\":\n mSubmitButton.setText(\"Submit\");\n mSubmitButton.setOnClickListener(view -> mGameController.checkGuess());\n break;\n }\n }", "public void onButtonWasPushed(int slot) {\n onCommands[slot].execute();\n unDoCommand = onCommands[slot];\n }", "@Override\n public void actionPerformed(ActionEvent arg0) {\n if (zalozenaHra == false) {\n gameConnectButton.setEnabled(false);\n newGameButton.setText(\"Zrus zalozeni\");\n zalozenaHra = true;\n komunikace.CreateGame();\n } else {\n gameConnectButton.setEnabled(true);\n newGameButton.setText(\"Zaloz hru\");\n zalozenaHra = false;\n komunikace.cancelGame();\n }\n\n }", "public void setButton() {\n pan.add(playButton);\n }", "private void setupBackButton(){\n\t\tImageIcon back_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"back.png\");\n\t\tJButton back_button = new JButton(\"\", back_button_image);\n\t\tback_button.setBorderPainted(false);\n\t\tback_button.setContentAreaFilled(false);\n\t\tback_button.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tboolean leave_result = askToLeave();\n\t\t\t\tif (leave_result){\n\t\t\t\t\t//no point speaking any more words if exiting\n\t\t\t\t\tparent_frame.getFestival().emptyWorkerQueue();\n\t\t\t\t\tparent_frame.changePanel(PanelID.MainMenu);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tback_button.addMouseListener(new VoxMouseAdapter(back_button,null));\n\t\tadd(back_button);\n\t\tback_button.setBounds(1216, 598, 100, 100);\n\t}", "public void makeAcquireButton() {\r\n JButton acquire = new JButton(\"Acquire a new champion with Blue Essence\");\r\n new Button(acquire, main);\r\n// acquire.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// acquire.setPreferredSize(new Dimension(2500, 100));\r\n// acquire.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n acquire.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n acquireChampionUsingBlueEssence();\r\n }\r\n });\r\n// main.add(acquire);\r\n }", "private void buttonInitiation() {\n submit = new JButton(\"Submit\");\n submit.setBounds(105, 250, 90, 25);\n this.add(submit);\n goBack = new JButton(\"Return to Main Menu\");\n goBack.setBounds(205, 250, 200, 25);\n this.add(goBack);\n }", "private void lockPayNowOrHavePayButton(final String inf) {\r\n runOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n payNowOrHavePayButton.setClickable(false);\r\n payNowOrHavePayButton.setBackgroundColor(getResources().getColor(R.color.colorGray));\r\n payNowOrHavePayButton.setText(inf);\r\n }\r\n });\r\n }", "public void clickOnEnrollNowButton() {\n\t\tif(enrollNowButton.isEnabled()) {\n\t\twaitAndClick(enrollNowButton);\n\t\t}\n\t}", "public void disableEndOfProductionButton(){\n this.endOfproductionButton.setEnabled(false);\n }", "public static void scheduleButtonListener(ActionEvent evt){\r\n MyButton button = (MyButton) evt.getSource();\r\n button.switchChosen();\r\n if(button.isChosen()){\r\n checkCollisions(button);\r\n }\r\n setButtonsColor();\r\n }", "private void setUpButton() {\n // Find view\n Button button = (Button) findViewById(R.id.this_weekend_dialog_match_button);\n // Set click mListener\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mListener.onMatchMadeDialogSeen();\n dismiss();\n }\n });\n }", "public void reenableButton(EventStruct event) {\n AppSync.puts(\"\"+event);\n if (event.type == \"scored\") {\n switch (event.subtype) {\n case \"balance\":\n robotBalanced.setEnabled(true);\n robotFailedToBalance.setEnabled(true);\n break;\n case \"glyph\":\n if (event.location == \"cipher\") {glyphCompletedCipher.setEnabled(true);}\n break;\n default: {break;}\n }\n\n\n } else if (event.type == \"missed\") {\n switch (event.subtype) {\n case \"balance\":\n robotBalanced.setEnabled(true);\n robotFailedToBalance.setEnabled(true);\n default: {break;}\n }\n }\n }", "@Override\n public boolean play(String btn)\n {\n return btn.isEmpty();\n }", "public void buttonClicked();", "public boolean clickOnStartButton() {\r\n\t\ttry {\r\n\t\t\tgetAssignmentStratButton().click();\r\n\t\t\treturn true;\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public void clickOnNOButton() {\r\n\t\tsafeJavaScriptClick(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"No\"));\r\n\t}", "private void buttonPlayerAction() {\n play.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View arg0) {\n // check for already playing\n if (mp.isPlaying()) {\n mp.pause();\n // Changing button image to play button\n play.setImageResource(R.drawable.ic_play_arrow);\n } else {\n // Resume song\n mp.start();\n // Changing button image to pause button\n play.setImageResource(R.drawable.ic_pause);\n mHandler.post(mUpdateTimeTask);\n }\n\n }\n });\n }", "private static void setButtonsPlaced(){\r\n for(MyButton b : mylist.getAllButtons()){\r\n b.setPlaced(false);\r\n }\r\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 }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tllistenBtnset();\n\t\t\t}", "public void uiVerifyButtonUndoEnable() {\n try {\n getLogger().info(\"Verify button Undo Todo enable.\");\n Thread.sleep(largeTimeOut);\n\n if (btnToDoUndo.getAttribute(\"class\").toString().equals(\"fa fa-undo\")) {\n NXGReports.addStep(\"Verify button Undo Todo enable.\", LogAs.PASSED, null);\n } else {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"verify button Undo Todo enable.\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void buttonShowIncomplete(ActionEvent actionEvent) {\n }", "private void setupShakeButton() {\n mShakeButton.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n\n // If shake is playable at the moment:\n if(mIsShakePlayable) {\n\n // Making button unavailable for a while:\n mIsShakePlayable = false;\n mShakeButton.setBackgroundResource(R.color.colorGrayDark);\n\n // Animating the profile area:\n showShakeAnimation(mOpponentProfileArea);\n\n Handler EmoteAvailabilityHandler = new Handler();\n EmoteAvailabilityHandler.postDelayed(new Runnable() {\n public void run() {\n\n // Making button available once again:\n mShakeButton.setBackgroundResource(R.drawable.button_red);\n mIsShakePlayable = true;\n\n }\n }, Constants.SHAKE_TIMEOUT);\n\n }\n\n }\n });\n\n }", "public void click() {\n this.lastActive = System.nanoTime();\n }", "public void clickOnAddVehicleButton() {\r\n\t\tsafeClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-btn.ant-btn-primary\"), SHORTWAIT);\r\n\t}", "protected void UpdateButtons()\n {\n btnIn.setEnabled(usr.getPostType() == Util.ATTENDANCE_DAY_OUT);\n btnOut.setEnabled(usr.getPostType()== Util.ATTENDANCE_DAY_IN\n || usr.getPostType()== Util.ATTENDANCE_BETWEEN);\n btnScan.setEnabled(usr.getPostType()== Util.ATTENDANCE_DAY_IN\n || usr.getPostType()== Util.ATTENDANCE_BETWEEN);\n\n }", "public void createButtonClicked() {\n clearInputFieldStyle();\n setAllFieldsAndSliderDisabled(false);\n setButtonsDisabled(false, true, true);\n setDefaultValues();\n Storage.setSelectedRaceCar(null);\n }", "public void setReviewButton() {\n if(dbMgr.checkReviewUser(username)) \n btnReviewGame.setVisible(true);\n else\n btnReviewGame.setVisible(false);\n }", "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 updateButtonVisibility() {\n mLocationBarMediator.updateButtonVisibility();\n }", "private void checkStartNewGameButton() {\n\t\tif(mButtons[0].isVisible() && Gdx.input.justTouched()){\n\t\t\t// Grab the touch position, saved as a Vector3\n\t\t\tmLastTouch.set(Gdx.input.getX(), Gdx.input.getY(), 0);\n\t\t\tmCamera.unproject(mLastTouch); // Translates to game world coordinates\n\t\t\t// The button is visible and the screen was just touched\n\t\t\t// See if the touch was in the button's outer rectangle\n\t\t\tif(mButtons[0].getRect().contains(mLastTouch.x, mLastTouch.y)){\n\t\t\t\t// The \"New Game\" button was pressed, start a new game!\n\t\t\t\tmRoundNumber = 1;\n\t\t\t\tresetRoundVars();\n\t\t\t\tmGameState = STATE_ROUND_START;\n\t\t\t\thideAllButtons();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void done() {\n Toolkit.getDefaultToolkit().beep();\n //release_plan_btn.setEnabled(true);\n setCursor(null); //turn off the wait cursor\n JOptionPane.showMessageDialog(null, \"Plan released !\\n\");\n\n }", "void enableBtn() {\n findViewById(R.id.button_play).setEnabled(true);\n findViewById(R.id.button_pause).setEnabled(true);\n findViewById(R.id.button_reset).setEnabled(true);\n }", "public static void resume()\n\t{\n\t\ttfBet.setEnabled(false);\n\t\tbtnPlay.setEnabled(false);\n\t\tbtnHit.setEnabled(true);\n\t\tbtnStay.setEnabled(true);\n\t\tbtnDouble.setEnabled(false);\n\t}" ]
[ "0.71097475", "0.69538486", "0.6831605", "0.6751736", "0.6747021", "0.66621166", "0.66408914", "0.66140234", "0.6596978", "0.6541545", "0.65157914", "0.65059584", "0.64965385", "0.64809865", "0.64807355", "0.6471508", "0.64620996", "0.64616406", "0.64590746", "0.64479655", "0.6438807", "0.64331204", "0.64204013", "0.64062625", "0.6398047", "0.6388584", "0.63882595", "0.63675916", "0.6364674", "0.6361514", "0.6358269", "0.6348046", "0.6342949", "0.6329563", "0.63235766", "0.6322131", "0.6305039", "0.6303739", "0.6301352", "0.6298498", "0.62923473", "0.62919396", "0.6282416", "0.6274146", "0.627382", "0.6271984", "0.62670124", "0.6266642", "0.6263112", "0.6262381", "0.6251208", "0.62446326", "0.623944", "0.62335294", "0.6231788", "0.62264055", "0.6220087", "0.6212494", "0.6208042", "0.6206275", "0.62009317", "0.61974466", "0.6182943", "0.6179217", "0.61695206", "0.61447036", "0.61403996", "0.6137433", "0.6133635", "0.61271834", "0.6126255", "0.61252", "0.6115428", "0.61122704", "0.6100105", "0.6096316", "0.6094307", "0.60920346", "0.6091296", "0.6088606", "0.60846746", "0.6078659", "0.60673654", "0.60672414", "0.60640657", "0.6061376", "0.6055405", "0.6053406", "0.60533524", "0.6053097", "0.60505736", "0.60495776", "0.60478866", "0.6046978", "0.6046212", "0.6039723", "0.6037995", "0.6035679", "0.60342455", "0.6031313", "0.6028287" ]
0.0
-1
Playing the shake sound:
private void showShakeAnimation(View profileArea){ if(mSoundStatus.equals(Constants.ON)) mShakeSound.start(); final View finalProfileArea = profileArea; final int numberOfRotations = 30; ObjectAnimator shakeAnimator = ObjectAnimator.ofFloat(profileArea, "rotation", -3, 3); shakeAnimator.setInterpolator(new AccelerateDecelerateInterpolator()); shakeAnimator.setRepeatCount(numberOfRotations - 1); shakeAnimator.setRepeatMode(ObjectAnimator.REVERSE); shakeAnimator.setDuration(Constants.SHAKE_ANIMATION_DURATION / numberOfRotations); shakeAnimator.addListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animator) {} @Override public void onAnimationEnd(Animator animator) { finalProfileArea.setRotation(0); } @Override public void onAnimationCancel(Animator animator) {} @Override public void onAnimationRepeat(Animator animator) {} }); shakeAnimator.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void shake(){\n translateTransition.playFromStart();\n }", "public abstract void shake(long ms);", "public void onShake() {\n\t\t\tshake();\n\t\t}", "@Override\n public void hearShake() {\n if(pending_intent == null) {\n //do nothing\n } else {\n Log.e(\"shake\", \"you just shake your phone\");\n\n set_alarm_text(\"Alarm off by shaking\");\n\n alarm_manager.cancel(pending_intent);\n\n my_intent.putExtra(\"extra\", \"alarm shake off\");\n my_intent.putExtra(\"song\", song);\n\n sendBroadcast(my_intent);\n }\n }", "public void startShower(){\n Log.d(LOGTAG,\"Shower is on.\");\n playSound();\n\n\n }", "public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}", "public static void playShootingSound(){\n String musicFile = \"Sounds\\\\Shoot.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlevel.addAction(GeneralHelper.shakeSprite(getSprite(), -5));\n\t\t\t\t}", "private void play() {\n\t\tlog.finest(\"Playing sound\");\n\t\ttone.trigger();\n\t}", "static void UniversalShake() {\n if (!Sounds.getIsMute()) diceShakeSound.start();\n\n diceNum = GameFunctions.rollDice(\"Pigdice\", dice);\n\n if (diceNum == 1) {\n if (playerTurn == 1) {\n endTurn(currentScorePlayer1);\n } else {\n endTurn(currentScorePlayer2);\n }\n } else {\n if (playerTurn == 1)\n currentScorePlayer1.setText(String.valueOf(Integer.parseInt\n (currentScorePlayer1.getText().toString()) + diceNum));\n\n else\n currentScorePlayer2.setText(String.valueOf(Integer.parseInt\n (currentScorePlayer2.getText().toString()) + diceNum));\n }\n }", "@Override\n public void makeSound() {\n\n }", "@Override\n public void makeSound() {\n\n }", "private void playGameOverSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\ringout.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }", "public static void playSound(){\r\n try{\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(AudioSystem.getAudioInputStream(new File(\"Cheering.wav\")));\r\n clip.start();\r\n }\r\n catch (Exception exc){\r\n exc.printStackTrace(System.out);\r\n } \r\n }", "public void playSoundGameLost() {\n\t\tlostGameSound.play();\n\t}", "@Override\n public void onShake(int count) {\n handleShakeEvent(count);\n }", "@Override\n public void onClick(View v) {\n if(mIsShakePlayable) {\n\n // Making button unavailable for a while:\n mIsShakePlayable = false;\n mShakeButton.setBackgroundResource(R.color.colorGrayDark);\n\n // Animating the profile area:\n showShakeAnimation(mOpponentProfileArea);\n\n Handler EmoteAvailabilityHandler = new Handler();\n EmoteAvailabilityHandler.postDelayed(new Runnable() {\n public void run() {\n\n // Making button available once again:\n mShakeButton.setBackgroundResource(R.drawable.button_red);\n mIsShakePlayable = true;\n\n }\n }, Constants.SHAKE_TIMEOUT);\n\n }\n\n }", "public static void game_sound() {\n\t\tm_player_game.start();\n\t\tm_player_game.setMediaTime(new Time(0));\n\t}", "private void setupShakeButton() {\n mShakeButton.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n\n // If shake is playable at the moment:\n if(mIsShakePlayable) {\n\n // Making button unavailable for a while:\n mIsShakePlayable = false;\n mShakeButton.setBackgroundResource(R.color.colorGrayDark);\n\n // Animating the profile area:\n showShakeAnimation(mOpponentProfileArea);\n\n Handler EmoteAvailabilityHandler = new Handler();\n EmoteAvailabilityHandler.postDelayed(new Runnable() {\n public void run() {\n\n // Making button available once again:\n mShakeButton.setBackgroundResource(R.drawable.button_red);\n mIsShakePlayable = true;\n\n }\n }, Constants.SHAKE_TIMEOUT);\n\n }\n\n }\n });\n\n }", "public void playTriggerSound() {\n ScreenSpeakService service = ScreenSpeakService.getInstance();\n if (service != null) {\n service.getFeedbackController().playAuditory(R.raw.tutorial_trigger);\n }\n }", "public void playSoundFail() {\n\t\tfailSound.play();\n\t}", "public void soundPressed() {\n // display\n TextLCD.print(SOUND);\n // sound\n Sound.beep();\n }", "public void run() {\n mShakeButton.setBackgroundResource(R.drawable.button_red);\n mIsShakePlayable = true;\n\n }", "public void shake(float d) {\n shakeDuration = d;\n }", "public void act()\n {\n if (Greenfoot.mouseClicked(this))\n Greenfoot.playSound(\"fanfare.wav\");\n }", "public void playHitWall() {\r\n hitWall.play(soundFxVol);\r\n }", "public void actionPerformed(ActionEvent e){\n\t\tSystem.out.println(\"SOUND ON/OFF\");\n\t\tgame.toggleSound();\n\t}", "public void PauseSound();", "@Override\r\n protected void playGameStartAudio() {\n\taudio.playClip();\r\n }", "private void playCollisionSound()\n {\n try\n {\n if (checkCollisions())\n {\n lives--;\n this.livesTextField.setText(\"\" + lives);\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\ir_end.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }", "public static void GameOverCrashSound(){\n if(soundActivated) {\n if(!crashSoundDone) {\n AudioManager audioManager = (AudioManager) mActivity.getSystemService(AUDIO_SERVICE);\n float actualVolume = (float) audioManager\n .getStreamVolume(AudioManager.STREAM_MUSIC);\n float maxVolume = (float) audioManager\n .getStreamMaxVolume(AudioManager.STREAM_MUSIC);\n float volume = actualVolume / maxVolume;\n mSound.play(soundCrash, volume, volume, 1, 0, 1f);\n\n crashSoundDone = true;\n\n }\n }\n }", "public void sounding() {\n\t\tSystem.out.println(\"Hello,I am your MobilePhone!\");\n\t}", "@Override\r\n\tpublic void sound() {\r\n\t\tsuper.sound();\r\n\t\tSystem.out.println(\"SportsCar sound: Vutututututu\");\r\n\t}", "public void play() {\n if (!isHungry()) {\n hunger += 2;\n mood += 2;\n fatigue += 3;\n\n if (!muted) {\n System.out.println(\"play\\t|\\tPlaying is fun!\");\n }\n }\n }", "public void shake(){\n ObjectAnimator.ofFloat(this, \"translationY\", 0, 25, -25, 25, -25,15, -15, 0).start();\n }", "public void play() {\n if (audio != null) {\n audio.play(sfxVolume);\n }\n }", "@Override\n public void onShakeStopped() {\n LogUtil.e(\"onShakeStopped\");\n }", "public void playAmbientSound() {\n if (!this.isClosed()) {\n super.playAmbientSound();\n }\n\n }", "private void playYouWinSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\tada.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }", "public void playGameOverSound() {\n\t\ttry {\n\t\t\tAudioInputStream audioStream = AudioSystem.getAudioInputStream(new File(\"Musik/DeadSound.wav\"));\n\t\t\t\n\t\t\tClip clip = AudioSystem.getClip(); \n\t\t\tclip.open(audioStream);\n\t\t\t\n\t\t\tboolean oldStatus = settings.isPlaying(); \n\t\t\t\n\t\t\tstopMusik();\n\t\t\t\n\t\t\t\n\t\t\tthis.settings.setPlaying(oldStatus);\n\t\t\tclip.start();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "@Override\n public void playSound(int soundId) {\n\n }", "private void playSound() {\n if (isFlashOn) {\n mp = MediaPlayer.create(this, R.raw.light_switch_off);\n } else {\n mp = MediaPlayer.create(this, R.raw.light_switch_on);\n }\n mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\n @Override\n public void onCompletion(MediaPlayer mp) {\n // TODO Auto-generated method stub\n mp.release();\n }\n });\n mp.start();\n }", "public void toggleSound() { \n\t\tif (mSoundEnable) {\n\t\t\tmSoundEnable = false; \n\t\t\tif (ResourceManager.getInstance().gameMusic.isPlaying())\n\t\t\t\tResourceManager.getInstance().gameMusic.pause();\n\t\t}\n\t\telse {\n\t\t\tmSoundEnable = true;\n\t\t\tif (!ResourceManager.getInstance().gameMusic.isPlaying()) {\n\t\t\t\tResourceManager.getInstance().gameMusic.play();\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp6.play(sound_id6, 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "@Override\n\tpublic void playLivingSound() {\n\t\tgetSoundManager().playLivingSound();\n\t}", "public static void playScream()\n {\n scream.play();\n }", "public void playSoundGameWon() {\n\t\tcompletedGameSound.play();\n\t}", "PlaySound getSound();", "@Override\n\tpublic void play() {\n\t\tSystem.out.println(\"打击乐器奏乐~~!\");\n\t}", "public void playClickSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, CLICK);\n\t}", "public void play() {\n\t\tplay(true, true);\n\t}", "public static void musicMainMenu(){\n\t\ttry {\r\n\t\t\tbgmusic = new Music(\"res/otherSounds/Menu.wav\");\r\n\t\t\tbgmusic.loop(1f, 0.2f);\r\n\t\t\t//System.out.println(bgmusic.getVolume()); \t\r\n\t\t} catch (SlickException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@SideOnly(Side.CLIENT)\n protected void soundMagic(ResourceLocation activitySound) {\n if (getBaseMetaTileEntity().isActive()) {\n if (activitySoundLoop == null) {\n activitySoundLoop = new SoundLoop(activitySound, getBaseMetaTileEntity(), false, true);\n Minecraft.getMinecraft().getSoundHandler().playSound(activitySoundLoop);\n }\n } else {\n if (activitySoundLoop != null) {\n activitySoundLoop = null;\n }\n }\n }", "public void StartSound(ISoundOrigin origin, sfxenum_t sound_id);", "@Override\n public void onShakeDetected() {\n LogUtil.e(\"onShakeDetected\");\n }", "public void toggleSound()\n\t{\n\t\tif (sound)\n\t\t\tsound = false;\n\t\telse\n\t\t\tsound = true;\n\t\tnotifyObservers();\n\t}", "@Override\n public void onShake(int count) {\n if(!actionList.isEmpty())\n handleShakeEvent(count);\n }", "public void onShake(float force) {\n String keys=\" \";\n String mode=\"k\";\n if (mTcpClient != null && !paused) {\n mTcpClient.sendMessage(mode+keys);\n Log.d(\"myInfo\", \"Send: \"+mode+\":\"+keys );\n }\n\n // Called when Motion Detected\n Toast.makeText(context, \"Motion detected\",\n Toast.LENGTH_SHORT).show();\n\n }", "@Override\r\n public void show()\r\n {\r\n // De inmediato, ponemos en marcha una melodia\r\n if (!juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).isPlaying())\r\n {\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).play();\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).setLooping(true);\r\n }\r\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp3.play(sound_id3, 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "public void play() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp2.play(sound_id2, 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "public static void musicFirstLevel(){\n\t\ttry {\r\n\t\t\tbgmusicLevel = new Music(\"res/sound/firstLevel.wav\");\r\n\t\t\tbgmusicLevel.loop(1f, 0.1f);\r\n\t\t} catch (SlickException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void play() {\n\t\tif (happiness + 10 > 100) {\n\t\t\thappiness = 100;\n\t\t} else {\n\t\t\thappiness += 10;\n\t\t}\n\t}", "public MainScreen() {\r\n\t\tthis.playSound(\"assets/audios/1.wav\");\r\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp1.play(sound_id1, 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "public static void playSoundOnce(Clip clip)\n { \n if (clip == null || clip.isRunning())\n return;\n \n clip.setFramePosition(0);\n clip.start();\n }", "public void game(){\n gameMusic.loop(pitch, volume);\n }", "public void gameOver(){\n gameOverMusic.loop(pitch, volume);\n }", "public void setSoundShot(final boolean sShot) { soundShot = sShot; }", "public void play() {\n\t\tSystem.out.println(\"ting.. ting...\");\n\t}", "public static void SFX(String path){\r\n Main.soundSystem.playSFX(path);\r\n }", "@Override\n\t\tpublic void run() {\n\t\t\tgenTone();\n\t\t\tplaySound();\n\t\t}", "public void playSoundtrack() {\n if(this.musicEnabled) {\n try {\n Clip soundtrackClip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new BufferedInputStream(Assets.soundTrack));\n soundtrackClip.open(inputStream);\n soundtrackClip.start();\n soundtrackClip.loop(Clip.LOOP_CONTINUOUSLY);\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(e.getMessage());\n }\n }\n }", "public abstract void makeSound();", "public static void hit_sound() {\n\t\tif (!hit1) {\n\t\t\thit1 = true;\n\t\t\tm_player_hit.setMediaTime(new Time(0));\n\t\t\tm_player_hit.start();\n\t\t} else if (!hit2) {\n\t\t\thit2 = true;\n\t\t\tm_player_hit2.setMediaTime(new Time(0));\n\t\t\tm_player_hit2.start();\n\t\t} else if (!hit3) {\n\t\t\thit3 = true;\n\t\t\tm_player_hit3.setMediaTime(new Time(0));\n\t\t\tm_player_hit3.start();\n\t\t} else if (!hit4) {\n\t\t\thit4 = true;\n\t\t\tm_player_hit4.setMediaTime(new Time(0));\n\t\t\tm_player_hit4.start();\n\t\t} else if (!hit5) {\n\t\t\thit5 = true;\n\t\t\tm_player_hit5.setMediaTime(new Time(0));\n\t\t\tm_player_hit5.start();\n\t\t} else {\n\t\t\thit1 = hit2 = hit3 = hit4 = hit5 = false;\n\t\t\tm_player_hit6.setMediaTime(new Time(0));\n\t\t\tm_player_hit6.start();\n\t\t}\n\n\t}", "@Override\r\n public void onMouseUp(Mouse.ButtonEvent event){\n HomeScreen.settingSound(false);\r\n ss.push(new HomeScreen(ss));\r\n }", "public void playDeadSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, DEAD);\n\t}", "@Override\n\tpublic void OnGameStart() {\n\t\tsuper.OnGameStart();\n\t\tMusicManage.setLoopingMusic(tumMusic, true);\n\t\tMusicManage.playMusic(tumMusic);\n\t}", "public void setUpSound() {\n try {\n generateTone();\n setFrequencyLabel();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "public void startSound()\n \n {try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Start 2.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n startClip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n startClip.open(audioIn); \n \n startClip.start();\n \n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n \n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t Intent myintent= new Intent(MainActivity2.this, MainActivity3.class);\n\t startActivity(myintent);\n\t \n\t playBeep(\"mlg.wav\");\n\n\t\t\t\t\n\t\t\t}", "public void undertakerSounds()\n {\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setTitle(\"Test Sound Clip\");\n this.setSize(300, 200);\n this.setVisible(false);\n\n try {\n // Open an audio input stream.\n URL url= new URL(\"http://shortmp3.mobi/u/files/WAV/39633-Undertaker_(ShortMp3.com).wav\");\n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\n // Get a sound clip resource.\n Clip clip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n clip.open(audioIn);\n clip.start();\n\n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n }\n\n }", "public void playSoundSuccess() {\n\t\tsucceededSound.play();\n\t}", "public void playBeep(){\n //https://stackoverflow.com/questions/2618182/how-to-play-ringtone-alarm-sound-in-android\n try{\n //gets notification sound then plays it.\n Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification);\n\n r.play();\n TimeUnit.MILLISECONDS.sleep(300);\n r.stop();\n\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }", "public static void enableSound() {\n\t\tvelocity = 127;\n\t}", "private void playCameraShootSound()\n {\n AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n int volume = audioManager.getStreamVolume( AudioManager.STREAM_NOTIFICATION);\n if (volume > 0) {\n if (mCameraShootPlayer == null) {\n mCameraShootPlayer = MediaPlayer.create(this, Uri.parse(CAMERA_SOUND_FILE));\n }\n if (mCameraShootPlayer != null) {\n mCameraShootPlayer.start();\n }\n }\n }", "protected void playStepSound(int par1, int par2, int par3, int par4)\n {\n this.playSound(\"mob.spider.step\", 0.15F, 1.0F);\n }", "public void pointScore() {\n if (soundToggle == true) {\n scoreSound.start();\n } // if\n }", "public void menu(){\n menuMusic.loop(pitch, volume);\n }", "public void specialSong()\n {\n if(!mute)\n {\n try {\n \n bclip.stop();\n \n // Open an audio input stream.\n //URL url = this.getClass().getClassLoader().getResource(\"Glitzville.wav\"); \n //if(lastpowerUp.equals(\"RAINBOW\"))\n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Starman.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n sclip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n sclip.open(audioIn); \n \n sclip.start();\n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } \n }\n }", "protected void muteSounds()\n {\n if(confused.isPlaying())\n confused.stop();\n }", "private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp9.play(sound_id9 , 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "public void playSound() {\n\t\tmediaPlayer.play();\n\t}", "public void playThemeSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, THEME);\n\t}", "private void playSound() {\n\t\tif (controllerVars.isLoaded() && !controllerVars.isPlays()) {\n\t\t\tcontrollerVars.getSoundPool().play(controllerVars.getSoundID(), controllerVars.getVolume(), controllerVars.getVolume(), 1, 0, 1f);\n\t\t\tcontrollerVars.COUNTER++;\n\t\t\t//Toast.makeText(act, \"Played sound\", Toast.LENGTH_SHORT).show();optional Playing message \n\t\t\tcontrollerVars.setPlays(true);\n\t\t\tonComplete(controllerVars.getMediaPlayer().getDuration());\n\t\t}\n\t\t//controllerVars.getMediaPlayer().start();\n\t\t//controllerVars.setPlays(true);\n\t}", "@Override\n public void beHelpful() {\n this.playPiano();\n this.takeABow();\n }", "@Override\n\tpublic void OnAttackCommand() {\n\t\tsuper.OnAttackCommand();\n\t\tSoundManage.playSound(atkSound1);\n\t}", "public static void playInternal( LayeredSound.SoundClip s )\r\n\t{\r\n\t\tif ( Settings.isSoundOn() )\r\n\t\t\tnew SpeakerThread( s ).start();\r\n\t}" ]
[ "0.7756839", "0.70214134", "0.69753045", "0.68993366", "0.68960536", "0.6805572", "0.6780216", "0.6593528", "0.6551953", "0.65287507", "0.643421", "0.643421", "0.64259094", "0.6414354", "0.6409388", "0.6401851", "0.6372833", "0.6363808", "0.633997", "0.63260216", "0.6287687", "0.62844944", "0.6256677", "0.625031", "0.6210703", "0.6206559", "0.62065405", "0.6192564", "0.6188419", "0.61868775", "0.6180206", "0.61766547", "0.6171117", "0.61649704", "0.6150676", "0.61504215", "0.61358833", "0.6112922", "0.6103501", "0.6103223", "0.61027896", "0.6102533", "0.60905796", "0.60782117", "0.60737145", "0.60723686", "0.6069106", "0.6050172", "0.6049935", "0.6048676", "0.6044782", "0.6041684", "0.6035061", "0.6033887", "0.6025941", "0.60121083", "0.6011754", "0.59931487", "0.5991714", "0.598955", "0.5984314", "0.5983996", "0.5978032", "0.5976712", "0.59673", "0.59669954", "0.59627974", "0.59626424", "0.5951505", "0.59485704", "0.59485286", "0.5947307", "0.5943841", "0.5943112", "0.59309417", "0.5930898", "0.59286857", "0.59280235", "0.59203357", "0.59115475", "0.59045464", "0.58908254", "0.58871865", "0.5884501", "0.58802885", "0.5879013", "0.58743536", "0.58691615", "0.58665895", "0.58648103", "0.5862919", "0.58517843", "0.5850456", "0.5849751", "0.58476835", "0.5841889", "0.5839752", "0.5832961", "0.5831691", "0.583057" ]
0.6392074
16
Setting listener for the button:
private void setupEmoteButton(){ mEmoteButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // If emotes are playable at the moment: if(mIsEmotePlayable) { // Make emote picker list visible: mEmotePickerList.setVisibility(View.VISIBLE); mDummy.setVisibility(View.VISIBLE); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void configureButtonListener();", "void enablButtonListener();", "private void setButtonListener() {\n for(CellButton[] buttonsRow : mainFrame.getButtons()) {\n for(CellButton button :buttonsRow) {\n button.addButtonListener(this);\n }\n }\n }", "@Override\n protected void setListener() {\n findView(R.id.btnClear).setOnClickListener(this);\n findView(R.id.btnSave).setOnClickListener(this);\n\n ivGraffit.setOnTouchListener(new GraffitTouchListener());\n }", "public void addListenerOnButton() {\n\n\t\t//koppel de button code aan een widget en voeg een onclicklistener toe\n\t\tsettings = (Button) findViewById(R.id.settings);\n\n\t\tsettings.setOnClickListener(new OnClickListener() {\n\t\t\t//koppel de button aan een nieuw xml scherm wat opent\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\n\t\t\t\tIntent myIntent = new Intent(view.getContext(), Settings.class);\n\t\t\t\tstartActivityForResult(myIntent, 0);\n\t\t\t}\n\n\t\t});\n\n\t\tsearch = (Button) findViewById(R.id.search);\n\n\t\tsearch.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\n\t\t\t\tIntent myIntent = new Intent(view.getContext(), Search.class);\n\t\t\t\tstartActivityForResult(myIntent, 0);\n\t\t\t}\n\t\t});\n\t\tterug = (Button) findViewById(R.id.terug);\n\n\t\tterug.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tsetResult(RESULT_OK, intent);\n\t\t\t\tfinish();\n\t\t\t}\n\n\t\t});\n\n\n\t}", "public ButtonListener(Fenetre fenetre) {\n\t\tthis.fenetre = fenetre;\n\t}", "public void setListener(ButtonListener buttonListener) {\n\t\tthis.buttonListener = buttonListener;\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tllistenBtnset();\n\t\t\t}", "private void setListener() {\n\t}", "private void setListener() {\n Log.d(TAG, \"TAG - MainActivity - setListener()\");\n\n if (buttonShow != null) {\n buttonShow.setOnClickListener( view -> showPicture());\n }\n }", "@Override\n\tprotected void setListener() {\n\t\tslider_text.setOnClickListener(this);\n\t}", "private void setListener() {\n\t\tmSlidingLayer.setOnInteractListener(this);\r\n\t\tmMsgNotifySwitch.setOnCheckedChangeListener(this);\r\n\t\tmMsgSoundSwitch.setOnCheckedChangeListener(this);\r\n\t\tmShowHeadSwitch.setOnCheckedChangeListener(this);\r\n\t\tmAccountSetting.setOnClickListener(this);\r\n\t\tmMyProfile.setOnClickListener(this);\r\n\t\tmFaceJazzEffect.setOnClickListener(this);\r\n\t\tmAcountInfo.setOnClickListener(this);\r\n\t\tmFeedBack.setOnClickListener(this);\r\n\t\tmExitAppBtn.setOnClickListener(this);\r\n\r\n\t}", "@Override\n\tprotected void on_button_pressed(String button_name) {\n\n\t}", "@Override\r\n protected void setListener() {\n logout.setOnClickListener(this);\r\n update.setOnClickListener(this);\r\n cleanCache.setOnClickListener(this);\r\n pushSwitch.setOnCheckedChangeListener(this);\r\n feedback.setOnClickListener(this);\r\n }", "private void setUpButton() {\n // Find view\n Button button = (Button) findViewById(R.id.this_weekend_dialog_match_button);\n // Set click mListener\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mListener.onMatchMadeDialogSeen();\n dismiss();\n }\n });\n }", "private void addButtonListener() {\n\t\trock.addActionListener(buttonListener);\n\t\tpaper.addActionListener(buttonListener);\n\t\tscissors.addActionListener(buttonListener);\n\t}", "public MyButtonListener(){\n super();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmButtonListener.onButtonListener();\n\t\t\t}", "private void initEvent() {\n\t\tmBtnPower.setOnClickListener(this);\n\t\tmBtnProfile.setOnClickListener(this);\n\t\tmBtnArea.setOnClickListener(this);\n\t\tmBtnSkipTime.setOnClickListener(this);\n\t\tmBtnFrequencyPoint.setOnClickListener(this);\n\t\tmBtnAlgorithm.setOnClickListener(this);\n\t}", "private void setButtonListener(Button button){\n \tfinal Context ctx = this.getActivity();\n \tfinal String tag = button.getText().toString();\n \t// button on click listers\n \t\tbutton.setOnClickListener(new OnClickListener() {\n \t\t\t@Override\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tIntent intent = new Intent(ctx, Questions_Tab_Activity.class);\n \t\t\t\tintent.putExtra(\"tagPressed\", tag);\n \t\t\t\tintent.putExtra(\"UserID\", userId);\n// \t\t\t\tif(multiTag)\n \t\t\t\t\tintent.putExtra(\"typeSearch\", 3);\n// \t\t\t\telse\n// \t\t\t\t\tintent.putExtra(\"typeSearch\", 1);\n \t\t\t\tstartActivity(intent);\n \t\t\t\t\n \t\t\t}\n \t\t});\n }", "public void settingBtnClick() {\n\t}", "public void initCallBack() {\n saveTodoButton.setOnClickListener(this);\n }", "@Override\n\tprotected void setListener() {\n\n\t}", "@Override\n\tprotected void setListener() {\n\n\t}", "private void setRegisterButtonListener(ActionListener actionListener) {\n System.out.println(\"ShareView: adding register listener\");\n buttonRegister.addActionListener(actionListener);\n buttonRegister.setActionCommand(GlobalControlCodes.TRACK_OPEN.name());\n }", "private void bindListener() {\n\t\tmSeekButton.setOnClickListener(this);\r\n\t}", "@Override\r\n\tpublic void setListener() {\n\r\n\t}", "@Override\r\n\tpublic void setListener() {\n\r\n\t}", "private void setupUpdateButton() {\n\n /* Get the button */\n Button updateButton = this.getStatusUpdateButton();\n\n /* Setup listener */\n View.OnClickListener updateButtonClicked = new View.OnClickListener() {\n\n @Override\n public void onClick(View view) {\n statusUpdater.updateStatus();\n }\n };\n\n /* Set listener to button */\n updateButton.setOnClickListener(updateButtonClicked);\n }", "public void setListeners(ActionListener l) {\n buttonListener = l;\n }", "public void addListener(ActionListener listener){\n\t\tbtn.addActionListener(listener);\n\t}", "@Override\n\tpublic void setListener() {\n\n\t}", "private void announcementBtnListener() {\n announcementBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new AnnouncementsScreen(game));\n }\n });\n }", "@Override\n\tpublic void initListeners() {\n\t\tmClick.setOnClickListener(this);\n\t}", "private void settingsBtnListener() {\n settingsBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new SettingsScreen(game));\n }\n });\n }", "public void click() {\n\t\tif(this.buttonListener != null) {\n\t\t\tthis.buttonListener.onClicked();\n\t\t}\n\t}", "public void addListenerOnButton() {\n\n\t\telectionSpinner = (Spinner) findViewById(R.id.electionSpinner);\n\t\tvoterSpinner = (Spinner) findViewById(R.id.voterSpinner);\n\t\t\n\t\tbtnConfig = (Button) findViewById(R.id.btnConfig);\n\t\tbtnConfig.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\"OnClickListener : \" + \n\t\t\t\t\t\t\"\\nElectionSpinner 1 : \" + String.valueOf(electionSpinner.getSelectedItem()) +\n\t\t\t\t\t\t\"\\nVoterSpinner 2 : \" + String.valueOf(voterSpinner.getSelectedItem()),\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t}\n\n\t\t});\n\n\t}", "@Override\n protected void addListener() {\n button.addActionListener(new DeleteWorkoutButton.ClickHandler());\n }", "@Override\n\tpublic void setOnClick() {\n\n\t}", "private void leaderboardBtnListener() {\n leaderboardBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new LeaderboardScreen(game));\n }\n });\n }", "private void setActionListener(){\r\n \tthis.addPropertyChangeListener(\"Refresh\", this);\r\n \tdeleteButton.addActionListener(this);\r\n \taddNewButton.addActionListener(this);\r\n }", "@Override\n public void setListener() {\n if (generalTitleLabel == null) return;\n generalTitleLabel.setOnClickListener(this);\n }", "@Override\n\tprotected void setOnClickListener() {\n\n\t}", "@Override\n\t\tpublic void buttonStatusChange() {\n\t\t\t\n\t\t}", "@Override\n\tprotected void InitButtonListener() {\n\t\timgbtnOK.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tClickOK();\n\t\t\t\tCursurIndex = 3;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}\n\t\t});\n\t\timgbtnPlus.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tClickPlus();\n\t\t\t\tCursurIndex = 2;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}\n\t\t});\n\t\timgbtnMinus.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tClickMinus();\n\t\t\t\tCursurIndex = 1;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t}\n\t\t});\n\t}", "@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}", "private void setActionListener() {\n\n\t\tlnrPlayVoice.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (audioListener != null) {\n\t\t\t\t\taudioListener.onPlayClicked(isPlaying);\n\t\t\t\t}\n\t\t\t\tlnrReportVoice.setVisibility(View.GONE);\n\t\t\t\tplayVoice();\n\t\t\t}\n\t\t});\n\n\t\tlnrReportVoice.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tif (audioListener != null) {\n\t\t\t\t\taudioListener.onReportClicked();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void addListener(ClickListener listener);", "@Override\r\n\tprotected void initListener() {\n\t\trly_personal_info.setOnClickListener(this);\r\n\t}", "private void chatRoomBtnListener() {\n chatRoomBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n }\n });\n }", "public void addButtonListener(ActionListener l)\r\n\t{\r\n\t\tbnt_pane.addButtonListener(l);\r\n\t}", "public void buttonClicked();", "@Override\n protected void onAfterSetContentView() {\n super.onAfterSetContentView();\n View.OnClickListener onClickListener = new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n switch (v.getId()) {\n case R.id.btn_scan:\n btnSignalScan();\n break;\n default:\n break;\n }\n }\n };\n btn_scan.setOnClickListener(onClickListener);\n }", "public void onButtonAPressed();", "public ClickListener(){\n System.out.println(\"I've been attached\");\n }", "@Override\n\tpublic void setButtonAction() {\n\t}", "public void eventos() {\n btnAbrir.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent evt) {\n btnAbrirActionPerformed(evt);\n }\n });\n }", "public void setListeners() {\n backButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n finish();\n }\n });\n\n settingButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showEditDialog();\n }\n });\n\n cameraButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showChoosePictureDialog();\n }\n });\n }", "private void setOnClickListeners() {\n now_playing_previous_button.setOnClickListener(this::handleTransportControls);\n\n now_playing_play_button.setOnClickListener(this::handleTransportControls);\n\n now_playing_next_button.setOnClickListener(this::handleTransportControls);\n }", "private void cargaListeners() {\n\t\tbtnGuardar.addActionListener(this);\n\n\t}", "private void initListener() {\n\t\tbtnCancel.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\n\t\t\t}\n\t\t});\n\t}", "void setListener(Listener listener);", "public interface ButtonListener {\n void add();\n}", "public void ansBrowseBtnAddListener(ActionListener listener)\r\n\t{\r\n\t\tansBrowseBtn.addActionListener(listener);\r\n\t}", "private void initButtonsListener(){\n initDraw();\n initResign();\n initRedo();\n }", "private void setButtonListener2(Button button){\n \tfinal String tag = button.getText().toString();\n \t// button on click listers\n \t\tbutton.setOnClickListener(new OnClickListener() {\n \t\t\t@Override\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tint pos = tagList.indexOf(tag);\n \t\t\t\tmViewPager.setCurrentItem(pos);\n \t\t\t\t\n\n \t\t\t}\n \t\t});\n }", "private void friendsListBtnListener() {\n friendsListBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new FriendsListScreen(game));\n }\n });\n }", "public void viewAnswerImageBtnAddListener(ActionListener listener)\r\n\t{\r\n\t\tbtnViewAnswerImage.addActionListener(listener);\r\n\t}", "private void setClickListeners() {\n buttonSomethingWentWrong.setOnClickListener(this);\n buttonSuggestion.setOnClickListener(this);\n buttonHighlightRequest.setOnClickListener(this);\n closeButton.setOnClickListener(this);\n }", "public void setOnClickListener(View.OnClickListener listener) {\n this.listener = listener;\n }", "public void setOnClickListener(View.OnClickListener listener) {\n this.listener = listener;\n }", "public void setButton() {\n pan.add(playButton);\n }", "private void initListener() {\n un.setOnClickListener(this);\n deux.setOnClickListener(this);\n trois.setOnClickListener(this);\n quatre.setOnClickListener(this);\n cinq.setOnClickListener(this);\n six.setOnClickListener(this);\n sept.setOnClickListener(this);\n huit.setOnClickListener(this);\n neuf.setOnClickListener(this);\n zero.setOnClickListener(this);\n etoile.setOnClickListener(this);\n diaize.setOnClickListener(this);\n efface.setOnClickListener(this);\n setComposer.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n paletteComposition.setVisibility(View.VISIBLE);\n setComposer.setVisibility(View.GONE);\n }\n });\n call_btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (!tableView.getText().toString().trim().equals(\"\"))\n Utils.call(ComposerContact.this, tableView.getText().toString().trim());\n }\n });\n }", "public void qBrowseBtnAddListener(ActionListener listener)\r\n\t{\r\n\t\tqbrowseBtn.addActionListener(listener);\r\n\t}", "private void setButtonOnClickListener() {\n binding.ibtBack.setOnClickListener(event -> navController.navigateUp());\n }", "private void setDoneButtonListener()\n\t{\n\t\tButton doneButton = (Button) findViewById(R.id.back_button);\n\t\tdoneButton.setOnClickListener\n\t\t(\n\t\t\tnew View.OnClickListener()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v)\n\t\t\t\t{\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t}\n\t\t);//END setOnClickListener\n\t}", "private void registerListener(int btnId) {\n\n View btn = findViewById(btnId);\n\n if (btn != null) {\n btn.setOnClickListener(this);\n } else {\n debug(\"registerListener\", \"error\", \"resource not available\");\n }\n }", "protected void setOnClickFABListener(View.OnClickListener listener){\n mFAB.setOnClickListener(listener);\n }", "@Override\n public void onClick(View v) {\n mListener.onAddButtonClicked();\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tlistener(v);\n\n\t\t}", "private void currentGamesBtnListener() {\n currentGamesBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n game.setScreen(new CurrentGamesScreen(game));\n }\n });\n }", "private void initListeners() {\n btnCadastrar.setOnClickListener(this);\n cadastrar.setOnClickListener(this);\n }", "private void addListener() {\n ActionListener actionGravar = new GravarUsuario();\n JButton bt;\n bt = getPanelBotoes().getBtCadastrar();\n bt.addActionListener(actionGravar);\n bt = getPanelBotoes().getBtAtualizar();\n bt.setVisible(false);\n }", "public void setListeners() {\n mbt_no_realizar_comentario.setOnClickListener(this);\n mbt_realizar_comentario_propietario.setOnClickListener(this);\n }", "public void createEvents(){\r\n\t\tbtnCurrent.addActionListener((ActionEvent e) -> JLabelDialog.run());\r\n\t}", "public void buttonClicked() {\n mSanitizorGame.buttonClicked();\n }", "public interface customButtonListener {\n public void onNavigateButtonClickListener(int position,String value);\n\n public void onFeedbackButtonClickListener(int position,String value);\n }", "private void buttonListener(int x, int y) {\t\n\t\tbuttons[x][y].addActionListener(event -> controller.onClick(x, y));\n\t}", "public interface OnButtonPressListener {\n void onButtonPress(Message message);\n }", "@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}", "public void buttonChangeStatus(ActionEvent actionEvent) {\n }", "@Override\n\tprotected void InitButtonListener() {\n\t\ttextViewAvgInital.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tCursurIndex = 1;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t\tClickAverageInitial();\n\t\t\t}\n\t\t});\n\t\ttextViewDaysInital.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tCursurIndex = 2;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t\tClickDaysInitial();\n\t\t\t}\n\t\t});\t\t\n\t\timgbtnOK.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tCursurIndex = 3;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t\tClickOK();\n\t\t\t}\n\t\t});\t\t\n\t}", "private void setupBtnListeners() {\n findViewById(R.id.btnAddValue).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n buttonAddValues();\n updateUI();\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n\n //Button to open blood pressure chart sets opens blood pressure chart activity\n findViewById(R.id.btnOpenBPChart).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent bpChart = new Intent(WeightActivity.this, BPChartActivity.class);\n startActivity(bpChart.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION));\n mSettingsOrBPChartOpened = true;\n }\n });\n\n //Clicking date button opens date picker and closes keyboard\n findViewById(R.id.tvDate).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showDatePickerDialog();\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n }", "public void registerButtons()\n\t{\n\t\tplot.addActionListener(new ButtonListener());\n\t\tin.addActionListener(new ButtonListener(1));\n\t\tout.addActionListener(new ButtonListener(2));\n\t\t\n\t}", "public void setOnConfigureClickListener(OnConfigureClickListener listener) {\n this.listener = listener;\n }", "private void setEventListener() {\n mCameraView.addCameraKitListener(this);\n mCameraButton.setOnClickListener(this);\n mCameraButtonCloud.setOnClickListener(this);\n }", "public void onButtonPressed(Uri uri) {\n if (mListener != null) {\n\n }\n }", "void setActionListener(ActionListener listener) {\n goButton.addActionListener(listener);\n for (JRadioButton rb : buttons) {\n rb.addActionListener(listener);\n }\n }", "private void setListeners() {\r\n \t/*----------------------------\r\n\t\t * 1. Buttons\r\n\t\t\t----------------------------*/\r\n\t\t//\r\n \tButton bt_create = (Button) findViewById(R.id.db_manager_btn_create_table);\r\n \tButton bt_drop = (Button) findViewById(R.id.db_manager_btn_drop_table);\r\n \tButton bt_register_patterns = \r\n \t\t\t\t\t\t(Button) findViewById(R.id.db_manager_btn_register_patterns);\r\n \t\r\n \t/*----------------------------\r\n\t\t * 2. Tags\r\n\t\t\t----------------------------*/\r\n \tbt_create.setTag(Methods.ButtonTags.db_manager_activity_create_table);\r\n \tbt_drop.setTag(Methods.ButtonTags.db_manager_activity_drop_table);\r\n \tbt_register_patterns.setTag(Methods.ButtonTags.db_manager_activity_register_patterns);\r\n \t\r\n \t/*----------------------------\r\n\t\t * 3. Listeners\r\n\t\t * \t\t1. OnClick\r\n\t\t * \t\t2. OnTouch\r\n\t\t\t----------------------------*/\r\n \t/*----------------------------\r\n\t\t * 3.1. OnClick\r\n\t\t\t----------------------------*/\r\n \t//\r\n \tbt_create.setOnClickListener(new ButtonOnClickListener(this));\r\n \tbt_drop.setOnClickListener(new ButtonOnClickListener(this));\r\n \tbt_register_patterns.setOnClickListener(new ButtonOnClickListener(this));\r\n \t\r\n \t/*----------------------------\r\n\t\t * 3.2. OnTouch\r\n\t\t\t----------------------------*/\r\n \t//\r\n \tbt_create.setOnTouchListener(new ButtonOnTouchListener(this));\r\n \tbt_drop.setOnTouchListener(new ButtonOnTouchListener(this));\r\n \tbt_register_patterns.setOnTouchListener(new ButtonOnTouchListener(this));\r\n \t\r\n \t/*----------------------------\r\n\t\t * 4. Disenable => \"Create table\"\r\n\t\t\t----------------------------*/\r\n// \tbt_create.setEnabled(false);\r\n \t\r\n\t}", "protected void setSubmitReviewButtonListener() {\n\n submitButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String username = getSharedPreferences(\"appUserPrefs\",MODE_PRIVATE).getString(\"username\",\"\");\n String venueID = pitch.getVenueID();\n String pitchName = pitch.getPitchName();\n PlayerSubmitReview playerSubmitReview = new PlayerSubmitReview(username,\n venueID, pitchName, ratingBar.getRating());\n connectionManager.setNewPitchRating(playerSubmitReview);\n Toast.makeText(instance, \"Pitch reviewed successfully: \" + ratingBar.getRating() ,\n Toast.LENGTH_SHORT).show();\n }\n });\n }", "private void setFloatingActionButtonListener() {\n floatingActionButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n View mView = getLayoutInflater().inflate(R.layout.add_trail_dialogbox, null);\n popUpDialogBox(mView, 1);\n }\n });\n }" ]
[ "0.82614964", "0.8192561", "0.7478328", "0.7363916", "0.719137", "0.7189081", "0.71436286", "0.713951", "0.7103862", "0.7099529", "0.7089942", "0.70795923", "0.70287645", "0.7024317", "0.7003593", "0.6999646", "0.69915986", "0.69887584", "0.6944712", "0.6916779", "0.6893452", "0.6863363", "0.6838724", "0.6838724", "0.6837988", "0.68215364", "0.68063843", "0.68063843", "0.6806003", "0.67673117", "0.6764473", "0.67523557", "0.6749973", "0.67126113", "0.67083985", "0.6704602", "0.670348", "0.6703142", "0.6699235", "0.6694377", "0.66750187", "0.6668985", "0.66653985", "0.6660633", "0.6635033", "0.66313934", "0.6622821", "0.6621809", "0.66176", "0.6598519", "0.6594169", "0.65589136", "0.65497625", "0.65356505", "0.6518921", "0.6492448", "0.648842", "0.64812577", "0.64788043", "0.6477315", "0.64664716", "0.64502674", "0.64384085", "0.64349735", "0.6424426", "0.6424161", "0.64142364", "0.6412473", "0.64107734", "0.6404368", "0.6404368", "0.6402035", "0.6396876", "0.63867027", "0.6364458", "0.63503474", "0.63421535", "0.6334508", "0.6330491", "0.63246083", "0.63224596", "0.63144547", "0.6313092", "0.63018876", "0.6294559", "0.6286523", "0.62852895", "0.628007", "0.6278717", "0.62761843", "0.627282", "0.62712806", "0.626113", "0.6254505", "0.62531126", "0.62509406", "0.62395644", "0.6238416", "0.6237012", "0.62362385", "0.62249994" ]
0.0
-1
If emotes are playable at the moment:
@Override public void onClick(View v) { if(mIsEmotePlayable) { // Make emote picker list visible: mEmotePickerList.setVisibility(View.VISIBLE); mDummy.setVisibility(View.VISIBLE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isPlayable();", "@Override\r\n\tpublic boolean canPlay() {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic void canSpeak() {\n\t\t\n\t}", "@Override\n\tpublic void nowPlaying() {\n\t}", "boolean hasPlayready();", "boolean play();", "boolean isPlaying() { return playing; }", "Boolean isPlaying() {\n return execute(\"player.playing\");\n }", "void onUserAttentionAvailable() {\n if (!isPlaying()) {\n seekTo(mPauseTime);\n super.start();\n }\n }", "public interface Playable {\n\n String play();\n}", "@Override\n public boolean onInfo(MediaPlayer mp, int what, int extra) {\n return false;\n }", "@Override\n public boolean onInfo(MediaPlayer mp, int what, int extra) {\n return false;\n }", "@Override\r\n\tpublic boolean canShow() {\r\n\t\treturn super.canShow() &&\r\n\t\t\t\t(getSpeakControl().isSpeaking() || getSpeakControl().isPaused());\r\n\t}", "@Override\n\tpublic void play() {\n\t\t\n\t}", "@Override\n\tpublic void play() {\n\n\t}", "public boolean isSpeaking() {\n return (mSelf.mIsSpeaking && (mSpeechQueue.size() < 1));\n }", "public boolean isSound() {\n\t\treturn true;\n\t}", "void play(boolean fromUser);", "public boolean isPlaying() {\n return params.isPlay();\n }", "public boolean checkPlays(Player player){\n return true;\n }", "@Override\r\n\tpublic boolean isPlaying() {\n\t\treturn mediaPlayer.isPlaying();\r\n\t}", "public boolean isPlayable() {\n return (mFlags & FLAG_PLAYABLE) != 0;\n }", "public boolean isAudio()\n {return false ;\n }", "@java.lang.Override\n public boolean hasPlayready() {\n return playready_ != null;\n }", "@SuppressWarnings(\"static-access\")\n\tpublic boolean isPlay(){\n\t\treturn this.isPlay;\n\t}", "public boolean hasPlayList(){\n return numPlayList < MAX_PLAYLIST;\n }", "@Override\n\tpublic boolean onInfo(MediaPlayer mp, int what, int extra) {\n\t\treturn false;\n\t}", "public boolean isPlaying() {\n\t\treturn state == State.INGAME;\n\t}", "@Override\n\tpublic boolean CheckStreamingLike(String mail) {\n\t\treturn false;\n\t}", "@Override\n public boolean isPlayer() {\n return super.isPlayer();\n }", "public boolean hasSong(){\n return numSongs < MAX_SONG;\n }", "public boolean musicOn ()\n\t{\n\t\tif (musicInt == 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "@Override\n public void playEnd() {\n }", "private boolean isMentioned(MessageReceivedEvent event) {\n Message message = event.getMessage();\n\n if (message.getContentRaw().equals(\"<@!\" + ID.SELF + \">\")) {\n message.reply(\"Hi, my prefix is `\" + Setting.PREFIX + \"`. You can also use `/help` for more info.\").queue();\n return true;\n }\n\n return false;\n }", "void onUserAttentionGone() {\n if (isPlaying()) { //If video is playing pause it.\n mPauseTime = getCurrentPosition(); //mPauseTime is an int\n super.pause();\n }\n }", "@Override\r\n public void play()\r\n {\n\r\n }", "@Override\n public String speak()\n {\n return \"peep\";\n }", "@Override\r\n\tpublic void playMonumentCard() {\n\t\t\r\n\t}", "boolean isPlayableInGame();", "@Override\n public boolean isPlaying()\n {\n final String funcName = \"isPlaying\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%s\", Boolean.toString(playing));\n }\n\n return playing;\n }", "public boolean isVideo()\n {return false;\n }", "public void play() {\n\t\t\r\n\t}", "public boolean poll()\n {\n if (this.mediaPlayer == null)\n {\n return false;\n }\n\n return mediaPlayer.getStatus().equals(MediaPlayer.Status.PLAYING);\n }", "@Override\n public boolean play(String btn)\n {\n return btn.isEmpty();\n }", "public boolean isPlaying() {\n\t\treturn mIsSupposedToBePlaying;\n\t}", "public synchronized void playExclaimSound()\n {\n if (PLAY_EXCLAIM_SOUND_RUNNABLE == null)\n {\n PLAY_EXCLAIM_SOUND_RUNNABLE = (Runnable)Toolkit.getDefaultToolkit().getDesktopProperty(EXCLAIM_SOUND_PROPERTY_NAME);\n }\n if (PLAY_EXCLAIM_SOUND_RUNNABLE != null)\n {\n PLAY_EXCLAIM_SOUND_RUNNABLE.run();\n }\n }", "public boolean speak(String text) {\n\treturn speak(new FreeTTSSpeakableImpl(text));\n }", "public boolean isPlaying() {\n \t\treturn isPlaying;\n \t}", "private static boolean musicCommands(CommandContext context, Guild guild, Command invoked, TextChannel channel, Member invoker) {\n if ((invoked instanceof IMusicCommand || invoked instanceof AkinatorCommand) // the hate is real\n && guild.getId().equals(BotConstants.FREDBOAT_HANGOUT_ID)\n && guild.getJDA().getSelfUser().getId().equals(BotConstants.MUSIC_BOT_ID)) {\n if (!channel.getId().equals(\"174821093633294338\") // #spam_and_music\n && !channel.getId().equals(\"217526705298866177\") // #staff\n && !invoker.getUser().getId().equals(\"203330266461110272\")//Cynth\n && !invoker.getUser().getId().equals(\"81011298891993088\")) { // Fre_d\n context.deleteMessage();\n context.replyWithName(\"Please don't spam music commands outside of <#174821093633294338>.\",\n msg -> CentralMessaging.restService.schedule(() -> CentralMessaging.deleteMessage(msg),\n 5, TimeUnit.SECONDS));\n return true;\n }\n }\n return false;\n }", "public boolean playing() {\n\t\treturn sound.isPlaying();\n\t}", "@Override\r\n\tpublic Bet whatToPlay() {\n\t\treturn null;\r\n\t}", "boolean hasVideo();", "public void play(){\n\t\t\n\t}", "public boolean getSoundAmbience() { return soundAmbience; }", "private void showEmote(TextView emoteBubble){\n if(mSoundStatus.equals(Constants.ON)) mPopSound.start();\n\n // Animating the bubble's alpha (fade in, fade out):\n\n ObjectAnimator emoteAlphaAnimator = ObjectAnimator.ofFloat(emoteBubble,\n \"alpha\", 0, 1);\n emoteAlphaAnimator.setInterpolator(new DecelerateInterpolator());\n emoteAlphaAnimator.setRepeatCount(1);\n emoteAlphaAnimator.setRepeatMode(ObjectAnimator.REVERSE);\n emoteAlphaAnimator.setDuration(Constants.EMOTE_DURATION/2);\n\n\n // Animating the bubble's size (pop up with overshoot):\n\n float scaleX = emoteBubble.getScaleX();\n ObjectAnimator emoteScaleXAnimator = ObjectAnimator.ofFloat(emoteBubble,\n \"scaleX\", 0, scaleX);\n emoteScaleXAnimator.setInterpolator(new OvershootInterpolator());\n emoteScaleXAnimator.setDuration(Constants.EMOTE_POPUP_DURATION);\n\n float scaleY = emoteBubble.getScaleY();\n ObjectAnimator emoteScaleYAnimator = ObjectAnimator.ofFloat(emoteBubble,\n \"scaleY\", 0, scaleY);\n emoteScaleYAnimator.setInterpolator(new OvershootInterpolator());\n emoteScaleYAnimator.setDuration(Constants.EMOTE_POPUP_DURATION);\n\n\n // Start animations:\n\n AnimatorSet animatorSet = new AnimatorSet();\n animatorSet.playTogether(emoteAlphaAnimator, emoteScaleXAnimator, emoteScaleYAnimator);\n animatorSet.start();\n\n\n }", "@Override\n public void beHelpful() {\n this.playPiano();\n this.takeABow();\n }", "@Override\n\tpublic void play() {\n\t\tSystem.out.println(\"打击乐器奏乐~~!\");\n\t}", "boolean playing() {\n return _playing;\n }", "public abstract boolean isPlayer();", "protected boolean processPlayerOffered(int gameNum, String playerName, String offer){\n return false;\n }", "public Boolean getInplay(){\n return inplay;\n }", "boolean hasReplacePlayerResponse();", "com.google.cloud.video.livestream.v1.Encryption.Playready getPlayready();", "private void setupEmoteButton(){\n mEmoteButton.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n\n // If emotes are playable at the moment:\n if(mIsEmotePlayable) {\n // Make emote picker list visible:\n mEmotePickerList.setVisibility(View.VISIBLE);\n mDummy.setVisibility(View.VISIBLE);\n }\n\n }\n });\n\n }", "@Override\r\n public void handleMediaEvent(MediaEvent event) {\r\n if(running){\r\n try {\r\n Media media = event.getSource();\r\n String pluginName = media.getPluginName();\r\n Map<String,Object> location = SharedLocationService.getLocation(media.getPluginLocationId());\r\n switch(event.getEventType()){\r\n case PLAYER_PLAY:\r\n Map<String,Object> playerData = media.getNowPlayingData();\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"action\",event.getEventType().toString().toLowerCase());\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"type\",((MediaPlugin.ItemType)playerData.get(\"ItemType\")).toString().toLowerCase());\r\n if ((MediaPlugin.ItemType)playerData.get(\"ItemType\") == MediaPlugin.ItemType.AUDIO) {\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"title\",(String)playerData.get(MediaPlugin.ItemDetails.TITLE.toString()));\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"title artist\",(String)playerData.get(MediaPlugin.ItemDetails.TITLE_ARTIST.toString()));\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"album\",(String)playerData.get(MediaPlugin.ItemDetails.ALBUM.toString()));\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"album artist\",(String)playerData.get(MediaPlugin.ItemDetails.ALBUM_ARTIST.toString()));\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"duration\",playerData.get(MediaPlugin.ItemDetails.DURATION.toString()).toString());\r\n } else {\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"title\",(String)playerData.get(MediaPlugin.ItemDetails.TITLE.toString()));\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"duration\",playerData.get(MediaPlugin.ItemDetails.DURATION.toString()).toString());\r\n }\r\n break;\r\n case PLAYER_PAUSE:\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"action\",event.getEventType().toString().toLowerCase());\r\n break;\r\n case PLAYER_STOP:\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"action\",event.getEventType().toString().toLowerCase());\r\n break;\r\n }\r\n } catch (Exception ex) {\r\n LOG.error(\"Could not publish to broker: {}\", ex.getMessage(), ex);\r\n }\r\n }\r\n }", "public interface Playable {\n String instrumentPlay();\n}", "boolean hasMultimediaData();", "public boolean stillPlaying(){\r\n\t\treturn stillPlaying;\r\n\t}", "Shape whoIsPlaying();", "@Override\n public boolean onError(MediaPlayer mp, int what, int extra) {\n return false;\n }", "@Override\n protected boolean isPersonalTell(ChatEvent evt){\n String type = evt.getType();\n return \"tell\".equals(type) || \"say\".equals(type) || \"ptell\".equals(type);\n }", "public boolean isPlaying() {\n return mPlaying || mStateManager.isPlaying();\n\t}", "public String interact() {\n return sound;\n }", "@Override\n public void playStart() {\n }", "protected boolean processSayTell(String username, String titles, int gameNumber, String message){return false;}", "public boolean isPlaying() {\n return state.isActive();\n }", "public boolean isPlaying(StarObjectClass self){ \r\n \t\tStarCLEMediaPlayer mediaplayer = (StarCLEMediaPlayer)WrapAndroidClass.GetAndroidObject(self,\"AndroidObject\");\r\n \t\tif( mediaplayer == null )\r\n \t\t\treturn false;\r\n \t\treturn mediaplayer.isPlaying();\r\n \t}", "public boolean isPlaying() {\n\t\treturn AL10.alGetSourcei(id, AL10.AL_SOURCE_STATE) == AL10.AL_PLAYING;\n\t}", "private boolean verifyMessagePresence(){\n boolean overallResult = true;\n \n for(int ii = 0; ii < 3; ii = ii +1){\n if(121 == getHidden(ii)){\n overallResult = true;\n }else{\n overallResult = false;\n }\n }\n \n return overallResult;\n }", "public void playContent() {\n this.taskHandler.run(this::inlinePlay);\n }", "IAnimeTask getPlaying(UUID uuid);", "@Override\n public boolean onError(MediaPlayer mp, int what, int extra) {\n return true;\n }", "@Override\r\npublic void Play() {\n\t\r\n}", "boolean isSoundPlaying() {\n return (audioTrack.getPlayState() == AudioTrack.PLAYSTATE_PLAYING);\n }", "public void playBeep() {\n // Cách 1: Sử dụng audio có sẵn của android\n// ToneGenerator toneGenerator = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, 500);\n// toneGenerator.startTone(ToneGenerator.TONE_PROP_PROMPT);\n\n // Cách 2: Sử dụng audio của mình\n Uri beepSound = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + File.pathSeparator\n + File.separator + getPackageName() + \"/raw/notifications.mp3\");\n Ringtone ringtone = RingtoneManager.getRingtone(this, beepSound);\n ringtone.play();\n }", "public static boolean isReceivingSong(Player player) {\n\t\treturn ((plugin.playingSongs.get(player.getUniqueId()) != null) \n\t\t\t\t&& (!plugin.playingSongs.get(player.getUniqueId()).isEmpty()));\n\t}", "@Override\n\t\tpublic boolean onError(MediaPlayer mp, int what, int extra) {\n\t\t\treturn false;\n\t\t}", "public boolean mo23028k() {\n return this.f26122b.getBoolean(\"badge.new.emoji\", false);\n }", "public boolean getSoundShot() { return soundShot; }", "@Override\n public void playStop() {\n }", "@Override\n\tpublic void play() {\n\t\tSystem.out.println(\"We played Snokker today\");\n\t\t\n\t\t\n\t}", "boolean anyAudioTriggered() {\n for (final Datum d : this.datumList) {\n if (d instanceof Cell) {\n final Cell c = (Cell)d;\n if (c.isAudioTriggered())\n return true;\n }\n }\n\n return false;\n }", "protected void onEnabled(boolean joining) throws ExoPlaybackException {\n // Do nothing.\n }", "public void onPlayStart(){\n\n\t}", "public abstract String playMedia ();", "public void togglePlay() { }", "@Override\n\tpublic String speak() {\n\t\treturn null;\n\t}", "default boolean isAvailable() {\n switch (getState()) {\n case STOPPED:\n return true;\n case STARTING:\n return false;\n case STARTED:\n return false;\n case STOPPING:\n return false;\n default:\n throw new IllegalStateException(\"The speaker state is in an unknown state\");\n }\n }", "@Override\n @Test\n public void testEmojiSnippet() throws Exception {\n assumeTrue(Build.VERSION.SDK_INT >= 33);\n super.testEmojiSnippet();\n }", "private void playSilence(){\n frameIterator = SilentMediaReader.getInstance();\n updateCurrentMedia(null);\n status = Status.PLAYING_SILENCE;\n for (StreamListener listener : streamListeners) {\n listener.mediaChanged();\n }\n }" ]
[ "0.676169", "0.6671118", "0.6462152", "0.59503704", "0.5892656", "0.58808607", "0.5873379", "0.5821118", "0.58138156", "0.5793751", "0.57525295", "0.57525295", "0.573124", "0.572039", "0.5703699", "0.57000065", "0.5688152", "0.5671279", "0.5663319", "0.5633634", "0.55968857", "0.55939275", "0.55909824", "0.55875003", "0.55357826", "0.5523555", "0.55180645", "0.55160356", "0.5512372", "0.5503522", "0.55012816", "0.5495363", "0.5479751", "0.54458606", "0.5441239", "0.54373693", "0.5434169", "0.54266995", "0.5415093", "0.5403635", "0.53976727", "0.53921396", "0.5389585", "0.5379172", "0.53733474", "0.53640413", "0.53634053", "0.5363207", "0.5352956", "0.5338013", "0.5320786", "0.5316873", "0.5316431", "0.53140783", "0.53108597", "0.5296529", "0.52950484", "0.52849084", "0.5282913", "0.5279658", "0.5275945", "0.5265991", "0.52577", "0.5243528", "0.523959", "0.5239527", "0.5236799", "0.5235069", "0.5232124", "0.5227862", "0.52246577", "0.52176565", "0.52128804", "0.5212744", "0.52106774", "0.5210614", "0.5201018", "0.5200176", "0.51995766", "0.5197029", "0.5187774", "0.51805294", "0.51775664", "0.5176687", "0.5174416", "0.51736253", "0.51705873", "0.51672494", "0.5166267", "0.5158147", "0.5150437", "0.5146632", "0.5146019", "0.51367563", "0.51339406", "0.51310647", "0.5130819", "0.5128549", "0.51251453", "0.51242447" ]
0.5214254
72
Getting arrays of emotes:
private void setupEmotePickerList(){ final String[] emotesArray = getResources().getStringArray(R.array.emotes_array); final String[] botEmotesArray = getResources().getStringArray(R.array.bot_emotes_array); //Getting the listView: mEmotePickerList = (ListView) findViewById(R.id.emote_picker_list); //Setting the adapter for the listView: mEmotePickerList.setAdapter(new EmoteChoiceAdapter(getApplicationContext())); //Setting a click listener for the listView: mEmotePickerList.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // Setting the right text in the bubble: mPlayerEmoteBubble.setText(emotesArray[position]); // Animating the bubble: showEmote(mPlayerEmoteBubble); // Making emotes unavailable for a while: mIsEmotePlayable = false; mEmoteButton.setBackgroundResource(R.color.colorGrayDark); Handler botEmoteHandler = new Handler(); botEmoteHandler.postDelayed(new Runnable() { public void run() { // Animating A.I. emote bubble with random bot-like text to make it 'polite': mOpponentEmoteBubble.setText(botEmotesArray[new Random().nextInt(botEmotesArray.length)]); showEmote(mOpponentEmoteBubble); } }, Constants.BOT_EMOTE_RESPONSE_DELAY); Handler EmoteAvailabilityHandler = new Handler(); EmoteAvailabilityHandler.postDelayed(new Runnable() { public void run() { // Making emotes available once again: mEmoteButton.setBackgroundResource(R.drawable.button_yellow); mIsEmotePlayable = true; } }, Constants.EMOTE_TIMEOUT); // Making emote picker list unavailable: mEmotePickerList.setVisibility(View.GONE); mDummy.setVisibility(View.GONE); } }); // Setting up the dummy, so when the user clicks on the dummy, which is everywhere outside // of the list, the list will disappear: mDummy = (ImageView) findViewById(R.id.dummy); mDummy.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { mEmotePickerList.setVisibility(View.GONE); mDummy.setVisibility(View.GONE); return true; } }); // Making the list disappear (we don't want it to appear as the game starts). mEmotePickerList.setVisibility(View.GONE); mDummy.setVisibility(View.GONE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Emotion> getEmotions();", "public @NonNull List<Integer> getEmoteSets() {\n return this.emoteSets;\n }", "public List<Emote> getUserEmotes(Long userId) {\n\t\t// Check Scope\n\t\tOptional<OAuthCredential> credential = getTwitchClient().getCredentialManager().getTwitchCredentialsForChannel(userId);\n\t\tif (credential.isPresent()) {\n\t\t\tSet<String> requiredScopes = new HashSet<String>();\n\t\t\trequiredScopes.add(TwitchScopes.USER_SUBSCRIPTIONS.getKey());\n\n\t\t\tcheckScopePermission(credential.get().getOAuthScopes(), requiredScopes);\n\t\t} else {\n\t\t\tthrow new ChannelCredentialMissingException(userId);\n\t\t}\n\n\t\t// Endpoint\n\t\tString requestUrl = String.format(\"%s/users/%s/emotes\", Endpoints.API.getURL(), userId);\n\t\tRestTemplate restTemplate = getTwitchClient().getRestClient().getPrivilegedRestTemplate(credential.get());\n\n\t\t// REST Request\n\t\ttry {\n\t\t\tLogger.trace(this, \"Rest Request to [%s]\", requestUrl);\n\t\t\tEmoteSets responseObject = restTemplate.getForObject(requestUrl, EmoteSets.class);\n\n\t\t\tList<Emote> emoteList = new ArrayList<>();\n\n\t\t\tfor (List<Emote> emotes : responseObject.getEmoticonSets().values()) {\n\t\t\t\temoteList.addAll(emotes);\n\t\t\t}\n\n\t\t\treturn emoteList;\n\t\t} catch (RestException restException) {\n\t\t\tLogger.error(this, \"RestException: \" + restException.getRestError().toString());\n\t\t} catch (Exception ex) {\n\t\t\tLogger.error(this, \"Request failed: \" + ex.getMessage());\n\t\t\tLogger.trace(this, ExceptionUtils.getStackTrace(ex));\n\t\t}\n\n\t\treturn new ArrayList<Emote>();\n\t}", "public com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity[] getImplementsEntityArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(IMPLEMENTSENTITY$8, targetList);\r\n com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity[] result = new com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public E[] getContents()\n\t{\n\t\treturn contents;\n\t}", "public Object[] getEmails() {\r\n String encodedEmails = insertMode ? null : stringValue(CONTACTS_EMAIL_ADDRESSES);\r\n return decodeEmails(encodedEmails);\r\n }", "public String[] getReplyStrings()\n {\n return _replyLines.toArray(new String[_replyLines.size()]);\n }", "public ArrayList<ChatEmote> findChatEmote(String message, Emote emote){\n\t\tArrayList<ChatEmote> list = new ArrayList<ChatEmote>();\n\t\tif(message.contains(emote.getName())){\n\t\t\tint lastIndex = 0;\n\t\t\twhile(lastIndex != -1){\n\t\t\t lastIndex = message.indexOf(emote.getName(),lastIndex);\n\t\t\t if(lastIndex != -1){\n\t\t\t \tboolean foundEmote = false;\n\t\t\t \t\n\t\t\t \tif(lastIndex==0){\n\t\t\t \t\tif(message.equals(emote.getName()) || message.charAt(emote.getName().length())==' ')\n\t\t\t \t\t\tfoundEmote = true;\n\t\t\t \t}\n\t\t\t \telse if(lastIndex+emote.getName().length()==message.length()){\n\t\t\t \t\tif(message.charAt(lastIndex-1)==' ')\n\t\t\t \t\t\tfoundEmote = true;\n\t\t\t \t}\n\t\t\t \telse{\n\t\t\t \t\tif(message.charAt(lastIndex-1)==' ' && message.charAt(lastIndex+emote.getName().length())==' ')\n\t\t\t \t\t\tfoundEmote = true;\n\t\t\t \t}\n\t\t\t \tif(foundEmote)\n\t\t\t \t\tlist.add(new ChatEmote(message, emote.getEmoteType(), emote.getID(), lastIndex, lastIndex+(emote.getName().length()-1)));\n\t\t\t \tlastIndex+=1;\n\t\t\t }\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "private List getDetachedContent(Element elt) {\n List content = elt.getContent();\n List nodes = new ArrayList(content.size());\n\n while (content.size() != 0)\n {\n Object o = content.remove(0);\n nodes.add(o);\n }\n return (nodes);\n }", "public Tag inlineTags()[] {return inlineTags; }", "public java.lang.Object[] getPresentationAsArray();", "T[] getContents();", "public String[] list(){\n\t\t\n\t\tSet<String> t = contents.keySet();\n\t\tString s[] = t.toArray(new String[0]);\n\t\treturn s;\n\t}", "private String[] getTags() {\n String[] tags = new String[10];\n Node temp = head;\n int i = 0;\n\n while ((temp != null) && i < 10) {\n tags[i] = temp.message;\n temp = temp.next;\n i++;\n }\n return tags;\n }", "java.util.List<org.chromium.components.paint_preview.common.proto.PaintPreview.ContentIdEmbeddingTokenPairProto> \n getContentIdToEmbeddingTokensList();", "public Item[] getRoomContents() {\n Item[] contentsArray = new Item[contents.size()];\n contentsArray = contents.toArray(contentsArray);\n return contentsArray;\n }", "List<IMEInventoryHandler> getCellArray();", "public Element[] echo(Element[] elements) {\n return elements;\n }", "public RelacionConceptoEmbalaje[] findAll() throws RelacionConceptoEmbalajeDaoException;", "public int[] getBarcodeQuentity() {\n\n int[] quentities = new int[5];\n\n quentities[0] = url_count;\n quentities[1] = sms_count;\n quentities[2] = text_count;\n quentities[3] = contact_count;\n quentities[4] = initiate_call_count;\n\n return quentities;\n }", "public String listarTemas(){\n String respuesta=\"\";\n for(int i=0;i<temas.length;i++){\n respuesta+=\"\\n\"+temas[i];\n }\n return respuesta;\n }", "@Override\r\n\tpublic E2ECheckpointElements getElements() {\n\t\treturn this.content;\r\n\t}", "public String[] analayseQuestionsForEmail() {\n\t\t\n\t\tString[] tempUrl = new String[myData.size()];\n\t\tfor(int i = 0; i < myData.size(); i++ ) { \n\t\t\ttempUrl[i] = getBarChartURL(i);\n\t\t}\n\t\t\n\t\treturn tempUrl;\n\t}", "public String[] getUnparsedEntity(String name) {\n return underlyingTree.getUnparsedEntity(name);\n }", "public ProgressEvent [] getReceivedEvents() {\n ProgressEvent [] answer = new ProgressEvent[this.receivedEvents.size()];\n return (ProgressEvent []) this.receivedEvents.toArray(answer);\n }", "public String[] getOffers() {return offers;}", "public com.walgreens.rxit.ch.cda.StrucDocTitleFootnote[] getFootnoteArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(FOOTNOTE$8, targetList);\n com.walgreens.rxit.ch.cda.StrucDocTitleFootnote[] result = new com.walgreens.rxit.ch.cda.StrucDocTitleFootnote[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }", "public GameEvent[] getEvents();", "public static Moneda [] getMonedas(){\r\n Collections.sort(tiposMonedas, new monedaComparator()); \r\n Moneda v[] = new Moneda[tiposMonedas.size()];\r\n tiposMonedas.toArray(v);\r\n return v;\r\n }", "public E[] toArray() {\n return (E[]) Arrays.copyOfRange(queue, startPos, queue.length);\n }", "public List<String> getAnswersAsList() {\n\t\tString[] data = _answer.split(Question.answerDelimiter);\n\t\tList<String> output = new ArrayList<String>();\n\t\tfor (String answer : data) {\n\t\t\toutput.add(answer);\n\t\t}\n\t\treturn output;\n\t}", "public List<NoteToken> getElts(){\r\n List<NoteToken> returnList = new ArrayList<NoteToken>();\r\n for (Iterator<NoteToken> i = NotesList.iterator(); i.hasNext();){\r\n returnList.add(i.next());\r\n }\r\n return returnList;\r\n }", "public static String[] splitMessage(String msg){\n\t\t\n\t\tString content = msg;\n\t\tString[] msgArray = new String[msg.length()/252];\n\t\tint i=0;\n\t\twhile(content.length() >= 252) {\n\t\t msgArray[i] = content.substring(0, 252);\n\t\t i++;\n\t\t content = content.substring(252);\n\t\t}\n\t\treturn msgArray;\n\t}", "public IAnswer[] getAnswers();", "public List<Mention> loadMentions() throws PersistentDataStoreException {\n List<Mention> mentions = new ArrayList<>();\n\n // Retrieve all mentions from the datastore.\n Query query = new Query(\"chat-mentions\");\n PreparedQuery results = datastore.prepare(query);\n\n for (Entity entity : results.asIterable()) {\n try {\n UUID uuid = UUID.fromString((String) entity.getProperty(\"uuid\"));\n UUID userWhoWasMentioned =\n UUID.fromString((String) entity.getProperty(\"userWhoWasMentioned\"));\n UUID userWhoDidTheMentioning =\n UUID.fromString((String) entity.getProperty(\"userWhoDidTheMentioning\"));\n int start = Integer.parseInt((String) entity.getProperty(\"start\"));\n int end = Integer.parseInt((String) entity.getProperty(\"end\"));\n Instant creationTime = Instant.parse((String) entity.getProperty(\"creation_time\"));\n UUID messageId = UUID.fromString((String) entity.getProperty(\"messageId\"));\n Mention mention = new Mention(uuid, userWhoWasMentioned, userWhoDidTheMentioning, start, end, creationTime, messageId);\n mentions.add(mention);\n } catch (Exception e) {\n // In a production environment, errors should be very rare.\n // Errors which may\n // occur include network errors, Datastore service errors,\n // authorization errors,\n // database entity definition mismatches, or service mismatches.\n throw new PersistentDataStoreException(e);\n }\n }\n return mentions;\n }", "public String[] getSpellImageArray()\r\n\t{\r\n\t\t String[] spellImages = new String[spells.size()];\r\n\t\t for (int i = 0; i < spells.size(); i++) {\r\n\t\t\t spellImages[i] = spells.get(i).getSnapImage();\r\n\t\t }\r\n\t\t return spellImages;\r\n\t}", "public static Iterable<Entity> getAllKitesProtoArtifacts() {\r\n\t\tIterable<Entity> entities = Util.listEntities(\"KitesProtoArtifact\", null, null);\r\n\t\treturn entities;\r\n\t}", "public IMetaCue[] readMetaCue();", "public String[] prepareText(String text) {\n\n Properties props = new Properties();\n\n props.put(\"annotators\", \"tokenize, ssplit, pos, lemma, ner\");\n StanfordCoreNLP pipeline = new StanfordCoreNLP(props);\n\n //apply\n Annotation document = new Annotation(text);\n pipeline.annotate(document);\n\n List<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n\n ArrayList<String> result = new ArrayList<>();\n\n for (CoreMap sentence : sentences) {\n\n for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\n // this is the text of the token\n String word = token.get(CoreAnnotations.LemmaAnnotation.class);\n // this is the POS tag of the token\n String pos = token.get(PartOfSpeechAnnotation.class);\n // this is the NER label of the token\n String ne = token.get(CoreAnnotations.NamedEntityTagAnnotation.class);\n\n if (!StringUtils.isStopWord(word)) {\n result.add(word);\n }\n\n }\n\n }\n String[] result_ar = new String[result.size()];\n\n return result.toArray(result_ar);\n }", "java.util.List<com.google.cloud.dialogflow.v2beta1.AnnotatedMessagePart> \n getPartsList();", "@Override\n public byte [] toArray()\n \n {\n final int size = size();\n final byte [] array = \n new byte [size]; \n \n\n int i = 0;\n for (ByteCursor c : this)\n {\n array[i++] = c.value;\n }\n return array;\n }", "public List<NoteToken> getElts(){\r\n List<NoteToken> returnList = new ArrayList<NoteToken>();\r\n for (Iterator<Bars> i = BarsList.iterator(); i.hasNext();){\r\n returnList.addAll(i.next().getElts());\r\n }\r\n return returnList;\r\n }", "private Object[] decodeEmails(String encodedEmails) {\r\n if ((encodedEmails == null) || (encodedEmails.equals(\"\"))) {\r\n return new String[0];\r\n }\r\n char sep = encodedEmails.charAt(0);\r\n List emails = new LinkedList();\r\n StringTokenizer st = new StringTokenizer(encodedEmails, String.valueOf(sep));\r\n while (st.hasMoreTokens()) {\r\n emails.add(st.nextToken());\r\n }\r\n return emails.toArray(new Object[emails.size()]);\r\n }", "public List<NoteToken> getElts(){\r\n List<NoteToken> returnList = new ArrayList<NoteToken>();\r\n for (Iterator<Meters> i = MetersList.iterator(); i.hasNext();){\r\n returnList.addAll(i.next().getElts());\r\n }\r\n return returnList;\r\n }", "public String[] getAnswers()\n\t{\n\t\treturn answers;\t\n\t}", "public String[] getNativeCommands(String mime_type) {\n/* 199 */ String[] cmds = null;\n/* 200 */ List v = (List)this.native_commands.get(mime_type.toLowerCase(Locale.ENGLISH));\n/* */ \n/* 202 */ if (v != null) {\n/* 203 */ cmds = new String[v.size()];\n/* 204 */ cmds = (String[])v.toArray((Object[])cmds);\n/* */ } \n/* 206 */ return cmds;\n/* */ }", "public Entity[][] entities() {\r\n\t\treturn this.entities;\r\n\t}", "private String[] namesAppearInPost(String content){\n String[] appearInPost = null;\n while(content.indexOf('@') != -1){\n// content.substring()\n }\n// content.substring(content.indexOf('@'))\n return appearInPost;\n }", "private JSONArray parseJSON() {\n JSONArray jsonArray = new JSONArray();\n for (TimestampedMessage m : fPending) {\n JSONTokener jsonTokener = new JSONTokener(m.fMsg);\n JSONObject jsonObject = null;\n JSONArray tempjsonArray = null;\n final char firstChar = jsonTokener.next();\n jsonTokener.back();\n if ('[' == firstChar) {\n tempjsonArray = new JSONArray(jsonTokener);\n for (int i = 0; i < tempjsonArray.length(); i++) {\n jsonArray.put(tempjsonArray.getJSONObject(i));\n }\n } else {\n jsonObject = new JSONObject(jsonTokener);\n jsonArray.put(jsonObject);\n }\n\n }\n return jsonArray;\n }", "public void listaTemas() {\n\t\ttemas = temaEJB.listarTemas();\n\t}", "@XmlTransient\n public de.lsem.simulation.transformation.anylogic.generator.persistant.EmbeddedObject[] getEmbeddedObject(\n ) {\n de.lsem.simulation.transformation.anylogic.generator.persistant.EmbeddedObject[] array = new de.lsem.simulation.transformation.anylogic.generator.persistant.EmbeddedObject[0];\n return (de.lsem.simulation.transformation.anylogic.generator.persistant.EmbeddedObject[]) this._embeddedObjectList.toArray(array);\n }", "public List<String> getFaqElementAnswers() {\n List<String> answersList = new ArrayList<>();\n for(WebElement faqAnswer : faqElementAnswers()) {\n answersList.add(faqAnswer.getText());\n }\n return answersList;\n }", "private List<Embarcation> cursorToEmbarcationList(Cursor cursor){\n\t\tList<Embarcation> resultList = new ArrayList<Embarcation>();\n\t\t\n\t\twhile(cursor.moveToNext()){\n\t\t\tEmbarcation embarcation = new Embarcation(\n\t\t\t\t\tcursor.getInt(cursor.getColumnIndex(ID_WEB)),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(LIBELLE)),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(COMMENTAIRE)),\t\t\t\t\t\n\t\t\t\t\tcursor.getInt(cursor.getColumnIndex(DISPONIBLE)) > 0,\t\n\t\t\t\t\tcursor.getInt(cursor.getColumnIndex(CONTENANCE)),\t\t\t\n\t\t\t\t\tcursor.getLong(cursor.getColumnIndex(VERSION))\n\t\t\t\t\t);\n\t\t\t\n\t\t\tresultList.add(embarcation);\t\t\t\n\t\t}\n\t\tcursor.close();\n\t\t\n\t\treturn resultList;\n\t}", "public String[] getContent(String agentMessage){\n\t\t\t\t\n\t\tString[] messageContentSplited = null;\n\n\t\t\n\t\tif(this.messageType == 0){ //if 0 is a simple string with message from Agent\n\t\t\t\n\t\t\tmessageContentSplited = agentMessage.split(\" \");\n\n\t\t}\n\t\t\n\t\tif(this.messageType == 1){ //if 1 the message of agent is from a txt file and in a KQML format\n\t\t\t\n\t\t\tAgentMsgConversion msg = new AgentMsgConversion(agentMessage);\t\t\t\t\t\t\n\t\t\tString[][] msgArray = msg.getMessageArray();\n\t\t\tint size = msgArray.length;\n\t\t\tint i,j;\n\t\t\t\n\t\t\tString msgContent = null;\t\n\t\t\tint stopSearch = 0; //provides a simple way to stop second loop before a null occur\n\t\t\tfor(i=0; i<size; i++){\t\t\t\n\t\t\t\tfor(j=0; j<2; j++){\t\n\t\t\t\t\t//System.out.println(\"COISA \"+msgArray[i][j]);\n\t\t\t\t\tif(msgArray[i][j].contains(\":content\")){\t\t\t\t\t\n\t\t\t\t\t\tmsgContent = msgArray[i][j+1];\n\t\t\t\t\t\t//System.out.println(\"agent message: \"+msgContent);\n\t\t\t\t\t\tstopSearch++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(stopSearch > 0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmessageContentSplited = msgContent.split(\" \");\n\t\t}\n\t\treturn messageContentSplited;\n\t}", "public JSONArray getResponseAsArray(String query) throws RmesException {\n\t\treturn repositoryUtils.getResponseAsArray(query, repositoryUtils.initRepository(config.getRdfServerPublication(), config.getRepositoryIdPublication()));\n\t}", "static StoredEmotions getStoredEmotions() {\n // if there is no instance of a storedEmotions transfer to a try and catch system\n if (storedEmotions == null) {\n try {\n // establish connection to the storedEmotions and add the new emotion\n storedEmotions = EmotionsManager.getManager().loadEmotion();\n // perform the updates to storedEmotions\n storedEmotions.addUpdate(new Update() {\n @Override\n // save emotion to the list of stored emotions with saveEmotion() method call\n public void update() {\n saveEmotion();\n }\n });\n // catch any io exceptions and print them to stack trace to visualize exception\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n // return the storedEmotions\n return storedEmotions;\n }", "public com.walgreens.rxit.ch.cda.StrucDocTitleContent[] getContentArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(CONTENT$0, targetList);\n com.walgreens.rxit.ch.cda.StrucDocTitleContent[] result = new com.walgreens.rxit.ch.cda.StrucDocTitleContent[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }", "@Override\n\tpublic GalaxyNote[] galaxynoteList() {\n\t\treturn null;\n\t}", "@NotNull\r\n Entity[] getEntities();", "public E[] getArray() {\n return this.array;\n }", "public String[] list(String text, String von, String bis) throws RemoteException;", "IEvent[] getEvents();", "public String[] getUnparsedEntity(String name) {\n return null;\n }", "public String[] retrieveResultStrings(Text[] texts);", "public String [ ] getNombresIngredientes() {\n String arreglo[] = new String[this.ingredientes.size()];\n \n for(int i = 0; i < this.ingredientes.size(); i++) {\n arreglo[i] = this.ingredientes.get(i).toString();\n }\n \n return arreglo;\n }", "static String[] getProductTagsArray() {\n\n\t\tList<String> productTagsList = new ArrayList<>();\n\t\tproductTagsList.add(\"neutro\");\n\t\tproductTagsList.add(\"veludo\");\n\t\tproductTagsList.add(\"couro\");\n\t\tproductTagsList.add(\"basics\");\n\t\tproductTagsList.add(\"festa\");\n\t\tproductTagsList.add(\"workwear\");\n\t\tproductTagsList.add(\"inverno\");\n\t\tproductTagsList.add(\"boho\");\n\t\tproductTagsList.add(\"estampas\");\n\t\tproductTagsList.add(\"balada\");\n\t\tproductTagsList.add(\"colorido\");\n\t\tproductTagsList.add(\"casual\");\n\t\tproductTagsList.add(\"liso\");\n\t\tproductTagsList.add(\"moderno\");\n\t\tproductTagsList.add(\"passeio\");\n\t\tproductTagsList.add(\"metal\");\n\t\tproductTagsList.add(\"viagem\");\n\t\tproductTagsList.add(\"delicado\");\n\t\tproductTagsList.add(\"descolado\");\n\t\tproductTagsList.add(\"elastano\");\n\n\t\treturn productTagsList.toArray(new String[productTagsList.size()]);\n\t}", "public java.util.List<java.lang.String> getMentions() {\n return mentions;\n }", "public String[] retrieveResultStrings(Text[] texts) {\n\t\t\tint n = texts.length;\n\t\t\tString[] result = new String[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tresult[i] = texts[i].getText();\n\t\t\t}\n\t\t\treturn result;\n\t\t}", "public java.util.List<MessageTag> getEmailTags() {\n return emailTags;\n }", "public static void createArrayOfEvens(){\n\n int[] evens = new int[10];\n\n for (int i = 0; i < evens.length; i++) {\n evens[i] = (i + 1) * 2;\n }\n\n System.out.println(evens);\n\n for (int i = 0; i < evens.length; i++) {\n System.out.println(i + \": \" + evens[i]);\n }\n }", "public String [ ] getNombresProteinas() {\n int cantidad = 0;\n \n for(int i = 0; i < this.ingredientes.size(); i++) {\n \n if(this.ingredientes.get(i) instanceof Proteina) {\n cantidad++;\n }\n }\n\n String arreglo[] = new String[cantidad];\n \n for(int i = 0; i < cantidad; i ++) {\n arreglo[i] = this.ingredientes.get(i).toString();\n }\n \n return arreglo;\n }", "private static BigInteger[] getBids() throws Exception {\n\t\tInputStream stream;\r\n\t\tBigInteger bids[] = new BigInteger[3];\r\n\t\tbyte[][] signatures = new byte[3][];\r\n\t\tbyte[] signature;\r\n\t\tboolean[] bidAccepted = new boolean[3];\r\n\t\t//for each bidder\r\n\t\tfor (int i=0; i < bidders.size(); i++) {\r\n\t\t\tstream=(bidders.get(i)).getInputStream();\r\n\t\t\t//get their bid\r\n\t\t\tbids[i] = cryptoMessaging.recvBigInteger(stream);\r\n\t\t\t//get their signature\r\n\t\t\tsignature = cryptoMessaging.recvByteArr(stream);\r\n\t\t\t\r\n\t\t\tbidAccepted[i] = false;\r\n\t\t\t// if bid is from the person\r\n\t\t\tif (verify(bids[i], biddersigs[i], signature)) {\r\n\t\t\t\t// and the bid is higher than the asking price...\r\n\t\t\t\tif (bids[i].compareTo(askingPrice) >= 0) {\r\n\t\t\t\t\tbidAccepted[i] = true;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"Bid below the asking price\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"Bid signature did not match source\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// evaluateBids(bids, bidAccepted); //possible better framework for bid eval than what we got, I was on autopilot and made it\r\n\t\t\r\n\t\treturn bids;\t\r\n\t}", "public ArrayList<Enemy> getNewEnemies()\r\n\t{\r\n\t\tArrayList<Enemy> enemyList = new ArrayList<Enemy>();\r\n\t\tfor (Enemy enem : enemy)\r\n\t\t{\r\n\t\t\tenemyList.add(new Enemy(enem));\r\n\t\t}\r\n\t\treturn enemyList;\r\n\t}", "E[] toArray();", "public ArrayList<String> eventIdToSpeakerEmails(String id){\n Event e = getEvent(id);\n return e.getSpeakers();\n }", "public final List<String> getText() {\n ArrayList<String> al = new ArrayList<String>();\n for (Iterator<Element> i = texts.iterator(); i.hasNext();) {\n al.add(i.next().getTextContent());\n }\n return al;\n }", "@Override\n public Object[] toArray() {\n Object[] result = new Object[size];\n int i = 0;\n for (E e : this) {\n result[i++] = e;\n }\n return result;\n }", "public String getEmoticonName()\n {\n return emoticonName;\n }", "private Object[] elements() {\n return elements.toArray();\n }", "public org.landxml.schema.landXML11.FieldNoteDocument.FieldNote[] getFieldNoteArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(FIELDNOTE$4, targetList);\r\n org.landxml.schema.landXML11.FieldNoteDocument.FieldNote[] result = new org.landxml.schema.landXML11.FieldNoteDocument.FieldNote[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public StringArray getTraversalMentionIDs() {\n return (StringArray) (_getFeatureValueNc(wrapGetIntCatchException(_FH_traversalMentionIDs)));\n }", "E[] getAll();", "static public List<InlineResponse2002> articlesFeedIdGet(String id)\n {\n ArrayList<InlineResponse2002> l = new ArrayList<>();\n\n for (int i = 0; i < 512; i += (i % 2 == 0) ? 3 : 7)\n {\n InlineResponse2002 a = new InlineResponse2002();\n\n a.setId(i);\n a.setTitle(\"Some random [\" + i + \"] article\");\n l.add(a);\n }\n return l;\n }", "private String[] getCmdFromXml() {\n\t\tString[] strArr= {\"1\",\"2\"};\n\t\treturn strArr;\n\t}", "public Set<Mention> mentions();", "public List<Enemy> getEnemies();", "public org.hl7.fhir.CodeableConcept[] getEventArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(EVENT$0, targetList);\n org.hl7.fhir.CodeableConcept[] result = new org.hl7.fhir.CodeableConcept[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }", "public List<Event> getEvents() {\n List<Event> events = new ArrayList<>();\n\n Query query = new Query(\"Event\");\n PreparedQuery results = datastore.prepare(query);\n\n for (Entity entity : results.asIterable()) {\n try {\n String idString = entity.getKey().getName();\n UUID eventId = UUID.fromString(idString);\n String speaker = (String) entity.getProperty(\"speaker\");\n String organization = (String) entity.getProperty(\"organization\");\n String eventDate = (String) entity.getProperty(\"eventDate\");\n Location location = (Location) entity.getProperty(\"location\");\n List<String> amenities = getAmenities(eventId);\n String externalLink = (String) entity.getProperty(\"externalLink\");\n PublicType publicType = (PublicType) entity.getProperty(\"publicType\");\n long ownerId = (long) entity.getProperty(\"ownerId\");\n List<ThreadComment> thread = getThread(eventId);\n // long timeStamp = (long) entity.getProperty(\"timestamp\");\n\n Event event = new Event(eventId, speaker, organization, eventDate, location, amenities, externalLink,\n publicType, ownerId);\n event.copyThread(thread);\n events.add(event);\n // An exception can occur here for multiple reasons (Type casting error, any\n // property not existing, key error, etc...)\n } catch (Exception e) {\n System.err.println(\"Error reading event.\");\n System.err.println(entity.toString());\n e.printStackTrace();\n }\n }\n\n return events;\n }", "public Point[] getCoordinates() {\n Point[] temp = new Point[segments.length];\n for (int i = 0; i < segments.length; i++) {\n temp[i] = segments[i].getCoordinates();\n }\n return temp;\n }", "public String[] getExcursions()\n\t{\n\t\treturn this.excursions;\n\t}", "String[] getCommunitiesAsArray();", "private List<BotDescription> getBotsDescription( )\r\n {\r\n List<BotDescription> list = new ArrayList<BotDescription>( );\r\n\r\n for ( ChatBot bot : getBots( ) )\r\n {\r\n List<String> listLanguages = bot.getAvailableLanguages( );\r\n\r\n if ( listLanguages != null )\r\n {\r\n for ( String strLanguage : listLanguages )\r\n {\r\n BotDescription botDescription = new BotDescription( );\r\n Locale locale = new Locale( strLanguage );\r\n botDescription.setName( bot.getName( locale ) );\r\n botDescription.setDescription( bot.getDescription( locale ) );\r\n botDescription.setLanguage( locale.getDisplayLanguage( ) );\r\n botDescription.setAvatarUrl( bot.getAvatarUrl( ) );\r\n\r\n UrlItem url = new UrlItem( URL_BOT );\r\n url.addParameter( PARAMETER_BOT, bot.getKey( ) );\r\n url.addParameter( PARAMETER_LANGUAGE, strLanguage );\r\n botDescription.setUrl( url.getUrl( ) );\r\n list.add( botDescription );\r\n }\r\n }\r\n else\r\n {\r\n BotDescription botDescription = new BotDescription( );\r\n Locale locale = LocaleService.getDefault( );\r\n botDescription.setName( bot.getName( locale ) );\r\n botDescription.setDescription( bot.getDescription( locale ) );\r\n botDescription.setLanguage( locale.getDisplayLanguage( ) );\r\n botDescription.setAvatarUrl( bot.getAvatarUrl( ) );\r\n\r\n UrlItem url = new UrlItem( URL_BOT );\r\n url.addParameter( PARAMETER_BOT, bot.getKey( ) );\r\n url.addParameter( PARAMETER_LANGUAGE, locale.getLanguage( ) );\r\n botDescription.setUrl( url.getUrl( ) );\r\n list.add( botDescription );\r\n }\r\n }\r\n\r\n return list;\r\n }", "ArrayList<INote> getNotesAt(int beatNum);", "public java.util.List<java.lang.String> getMentions() {\n return mentions;\n }", "@SuppressWarnings( {\"unchecked\"})\n\t\t\tString[] getStuff() { \n\t\t\t\treturn (String[]) getSeveral().toArray(new String[getSeveral().size()]);\n\t\t\t}", "public String[] ListarDPIEnfermeras(){\r\n int cantidad=0;\r\n Guardia s;\r\n for (int i = 0; i < medicosenfermeras.size(); i++) {\r\n s= medicosenfermeras.get(i);\r\n if (s instanceof Enfermera) {\r\n cantidad++;\r\n }\r\n }\r\n \r\n String[] DPIEnfermeras= new String[cantidad];\r\n Guardia t;\r\n int m=0;\r\n for (int i = 0; i < medicosenfermeras.size(); i++) {\r\n t=medicosenfermeras.get(i);\r\n if (t instanceof Enfermera) {\r\n DPIEnfermeras[m]=t.getNit();\r\n m++;\r\n }\r\n }\r\n \r\n return DPIEnfermeras;\r\n }", "private String SuggestEmail() {\n EmailDAOHE emaildaohe = new EmailDAOHE();\n List<String> suggestString = emaildaohe.findEmailByUserId(getUserId());\n List<Email> suggestList = new ArrayList<Email>();\n for (int i = 0; i < suggestString.size(); i++) {\n Email email = new Email();\n email.setUserId((long) i);\n email.setSender(StringEscapeUtils.escapeHtml(suggestString.get(i) + \"; \"));\n suggestList.add(email);\n }\n String listEmail = emaildaohe.convertToJSONArray(suggestList, \"userId\", \"sender\", \"sender\");\n return listEmail;\n }", "@Override\r\n\tpublic Article[] getArticles() {\n\t\treturn null;\r\n\t}", "public String[] getExtensionIds();", "public ArrayList<String> getEmails(){\r\n return emails; //emails.toString();\r\n }", "public Set<String>[] getFollow();" ]
[ "0.6550478", "0.55814266", "0.55546385", "0.5388983", "0.5369758", "0.5315481", "0.52534115", "0.52165824", "0.51528525", "0.5129737", "0.51121783", "0.5077692", "0.5061714", "0.5056781", "0.5006733", "0.49989915", "0.49884397", "0.49847338", "0.49749812", "0.49721554", "0.4962427", "0.4961249", "0.49311155", "0.49273434", "0.49179417", "0.49073672", "0.48968458", "0.489032", "0.48669368", "0.486469", "0.48621345", "0.4840671", "0.48346233", "0.48307034", "0.4825433", "0.48246795", "0.48209625", "0.48129818", "0.4811893", "0.48099035", "0.47988567", "0.47848257", "0.47843164", "0.47636107", "0.47498494", "0.47481436", "0.47478145", "0.47475308", "0.47443527", "0.47437185", "0.47335824", "0.47330716", "0.47267252", "0.47249237", "0.47228232", "0.47215447", "0.47131902", "0.47111416", "0.47087127", "0.4705801", "0.47047645", "0.47043014", "0.4701687", "0.4689123", "0.46712947", "0.46702635", "0.46507043", "0.46415445", "0.46358523", "0.46347654", "0.46333984", "0.4633205", "0.46300256", "0.46297443", "0.4628539", "0.462706", "0.46247694", "0.4624345", "0.46225384", "0.461344", "0.46111432", "0.46086872", "0.46080676", "0.46031666", "0.45983958", "0.4594226", "0.45912167", "0.45911786", "0.45907924", "0.45881385", "0.4585099", "0.4583561", "0.4579006", "0.45788363", "0.4573889", "0.45711553", "0.45677716", "0.45667034", "0.45655122", "0.45596385", "0.4554726" ]
0.0
-1
Setting the right text in the bubble:
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { mPlayerEmoteBubble.setText(emotesArray[position]); // Animating the bubble: showEmote(mPlayerEmoteBubble); // Making emotes unavailable for a while: mIsEmotePlayable = false; mEmoteButton.setBackgroundResource(R.color.colorGrayDark); Handler botEmoteHandler = new Handler(); botEmoteHandler.postDelayed(new Runnable() { public void run() { // Animating A.I. emote bubble with random bot-like text to make it 'polite': mOpponentEmoteBubble.setText(botEmotesArray[new Random().nextInt(botEmotesArray.length)]); showEmote(mOpponentEmoteBubble); } }, Constants.BOT_EMOTE_RESPONSE_DELAY); Handler EmoteAvailabilityHandler = new Handler(); EmoteAvailabilityHandler.postDelayed(new Runnable() { public void run() { // Making emotes available once again: mEmoteButton.setBackgroundResource(R.drawable.button_yellow); mIsEmotePlayable = true; } }, Constants.EMOTE_TIMEOUT); // Making emote picker list unavailable: mEmotePickerList.setVisibility(View.GONE); mDummy.setVisibility(View.GONE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showPopText(Canvas canvas, String content, float x, float y) {\n int heightOffSet = 40;\n int margin = 10;\n int rectRadius = 4;\n\n //draw rounded rectangle\n Rect popupTextRect = new Rect();\n Paint paint = new Paint();\n paint.getTextBounds(content + \" \", 0, content.length() + 2, popupTextRect);\n paint.setAntiAlias(true);\n paint.setColor(Color.BLACK);\n paint.setTextSize(heightOffSet / 2);\n RectF r =\n new RectF(x - popupTextRect.width() - margin, y - (mFontSize * heightOffSet + 0.5f),\n x + popupTextRect.width() / 6 + (mFontSize * margin + 0.5f),\n y - (mFontSize * heightOffSet * 2 / 5));\n canvas.drawRoundRect(r, (mFontSize * rectRadius), (mFontSize * rectRadius), paint);\n\n //draw triangle.\n Path path = new Path();\n path.moveTo(x, y - (mFontSize * heightOffSet * 2 / 5));\n path.lineTo(x, y - (mFontSize * 10));\n path.lineTo(x - (mFontSize * 5), y - (mFontSize * heightOffSet / 2));\n path.close();\n canvas.drawPath(path, paint);\n\n //draw text\n paint.setColor(Color.WHITE);\n FontMetricsInt fontMetrics = paint.getFontMetricsInt();\n int baseline =\n (int) (r.top + (r.bottom - r.top - fontMetrics.bottom + fontMetrics.top) / 2 -\n fontMetrics.top);\n paint.setTextAlign(Paint.Align.CENTER);\n canvas.drawText(content, r.centerX(), baseline, paint);\n }", "@Override\r\n\tpublic void setText() {\n\t\t\r\n\t}", "public void setScoreText() {\n \tif(numBalls>0 && this.body.size()>0) {\n double x=this.body.get(0).getCenterX()-5;\n \tdouble y=this.body.get(0).getCenterY()+2;\n \t\n \tT.setX(x);\n \tT.setY(y);\n \tT.setText(String.valueOf(numBalls));\n \t}\n \t\n \t\n }", "public void returnbottomText() {\n\t\trebote = this.getIntent().getStringExtra(\"buttonname\");\n\n\t\ttext.setText(rebote);\n\n\t}", "@Override\n public String onCreateBubbleText(int position)\n {\n LossContent item = (LossContent) getItem(position);\n int codePoint = item.m_loss.Name.codePointAt(0);\n\n if (UCharacter.isDigit(codePoint))\n {\n return \"0-9\";\n } else\n {\n try\n {\n return HangulParser.disassemble(UCharacter.toString(codePoint)).get(0);\n } catch (HangulParserException e)\n {\n e.printStackTrace();\n return \"\";\n }\n }\n }", "public void setTitle(String text) {\n if(mLayoutStyle != LayoutStyle.HotseatStyle) {\n Resources res = getContext().getResources();\n int paddingLeft = res.getDimensionPixelSize(R.dimen.bubble_textview_padding_left);\n int paddingRight = res.getDimensionPixelSize(R.dimen.bubble_textview_padding_right);\n if(getPaddingLeft() != paddingLeft) {\n setPadding(paddingLeft, getPaddingTop(), paddingRight, getPaddingBottom());\n }\n }\n\n int textWidth = getTextWidth(text);\n boolean isExcessed = isTextWidthExcessed(textWidth);\n if(isExcessed && hasIndicator()) {\n setText(mDecorateSpaces + text);\n } else {\n setText(text);\n }\n }", "public void actionPerformed(ActionEvent ae)\r\n\t\t\t\t\t{\n\t\t\t\t\t\ttheGridView.addTextBubble(basicAvatarData.getUsername(), \"This is another chat bubble!\", 100);\r\n\t\t\t\t\t}", "void setWeightText(double weight) {\n if (!initialized){\n throw new IllegalStateException(\"Arrow wasn't initialized\");\n }\n\n this.weight = weight;\n double vectorX = x2 - x1;\n double vectorY = y2 - y1;\n var handler = weightText.getOnMouseClicked();\n boolean visibility = weightText.isVisible();\n\n if ((vectorX >= 0) && (vectorY >= 0) || (vectorX <= 0) && (vectorY <= 0)) {\n weightText = new Text((x1 + x2) / 2., (y1 + y2) / 2., String.format(\"%.2f\", weight));\n }\n else { //text crosses arrow, need to move to the left\n weightText = new Text((x1 + x2) / 2. - 30, (y1 + y2) / 2., String.format(\"%.2f\", weight));\n }\n\n weightText.setFont(new Font(15));\n weightText.setFill(TEXT_COLOR);\n weightText.setStroke(Color.BLACK);\n weightText.setStrokeWidth(0.5);\n weightText.setVisible(visibility);\n weightText.setOnMouseClicked(handler);\n }", "public void displayRight(String text, int x, int y) {\n\t\tgc.setFont(vector); //set the font of the text \n\t\tgc.setFill(Color.WHITE); //set the color of the text\n\t\tgc.setTextAlign(TextAlignment.RIGHT); //set the alignment to right \n\t\tgc.fillText(text, x, y); //draw the text \n\t}", "public void updateText()\r\n\t{\r\n\t\tdouble smallest = Math.min(menu.getController().getWidth(), menu.getController().getHeight());\r\n\t\tdouble equivalent12 = smallest/55;//Equivalent of 12 point font on base dimensions\r\n\t\t\r\n\t\ttextRenderer = new TextRenderer(new Font(fontName, Font.PLAIN, (int)(equivalent12*size)), true, true);\r\n\t}", "void setAvatarClickText(String title);", "@Override\n protected String[] getText() {\n return new String[] {\n MyTown.instance.LOCAL.getLocalization(\"mytown.sign.sell.title\").getUnformattedText(),\n MyTown.instance.LOCAL.getLocalization(\"mytown.sign.sell.description.owner\").getUnformattedText() + \" \" + owner.getPlayerName(),\n MyTown.instance.LOCAL.getLocalization(\"mytown.sign.sell.description.price\").getUnformattedText() + price,\n restricted ? MyTown.instance.LOCAL.getLocalization(\"mytown.sign.sell.description.restricted\").getUnformattedText() : \"\"\n };\n }", "public void drawNoticeText(int h){\r\n Font font=new Font(\"SanSerif\",Font.BOLD,15); \r\n g.setColor(Color.red);\r\n g.setFont(font);\r\n String t=\"NOTE: All players cannot be on the same team.\";\r\n g.drawString(t,50,265);\r\n t=\"Use WASD to move.\";\r\n g.drawString(t,50,48); \r\n t=\"Press SPACE on the Start Button to Begin!\";\r\n g.drawString(t,120,h-5); \r\n \r\n font=new Font(\"SanSerif\",Font.BOLD,40); \r\n g.setColor(Color.black);\r\n g.setFont(font); \r\n t=\"Settings\";\r\n g.drawString(t,330,40); \r\n }", "public void displayLeft(String text, int x, int y) {\n\t\tgc.setFont(vector); //set the font \n\t\tgc.setFill(Color.WHITE); //set the color of the text\n\t\tgc.fillText(text, x, y); //draw the text\n\t}", "public void setTextSettings(){\n\n ArrayList<Text> headlines = new ArrayList<>();\n //Add any text element here\n //headlines.add(this.newText);\n\n Color textColorHeadlines = new Color(0.8,0.8,0.8,1);\n\n for ( Text text : headlines ){\n text.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 20));\n text.setFill(textColorHeadlines);\n text.setEffect(new DropShadow(30, Color.BLACK));\n\n }\n\n }", "public void title(){\n textFont(select,30);\n fill(150);\n text(\"PLANE SELECT\",482,72);\n fill(0);\n text(\"PLANE SELECT\",480,70);\n}", "private void addText(Graphics g, Font font, Color frontColor, Rectangle rectangle, Color backColor, String str, int xPos, int yPos) {\n g.setFont(font);\n g.setColor(frontColor);\n if (rectangle != null) {\n g.drawRect(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n }\n g.setColor(backColor);\n if (rectangle != null) {\n g.fillRect(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n }\n g.setColor(frontColor);\n g.drawString(str, xPos, yPos);\n }", "private void changeTextstr(int currentPoints){\n\n\n switch(currentPoints){\n case 1:\n str.setText(\" very weak\");\n str.setTextColor(Color.RED);\n break;\n case 2:\n str.setText(\" weak\");\n str.setTextColor(Color.parseColor(\"#FF6600\"));\n break;\n case 3:\n str.setText(\" fair\");\n str.setTextColor(Color.parseColor(\"#FFFF66\"));\n break;\n case 4:\n str.setText(\" strong\");\n str.setTextColor(Color.GREEN);\n break;\n case 5:\n str.setText(\" very strong\");\n str.setTextColor(Color.parseColor(\"#2C6700\"));\n }\n\n\n }", "public abstract String getRightButtonText();", "@Action\n public void addWrappedText() {\n if (Math.random() < .33) {\n addWrappedTextEndChar();\n } else if (Math.random() < .5) {\n addWrappedTextRandom();\n } else {\n addWrappedTextSmall();\n }\n }", "private void updateTextButtons() {\n CrewMember crewMember = department.getCrewMember();\n repair.setText(\"Click to repair your ship for \"+getHealCost()+ \" gold!\");\n upgrade.setText(\"Click to upgrade \" + crewMember.getName() + \" for \"+crewMember.getUpgradeCost()+\" gold!\");\n }", "@Override\n\tpublic void setText(String arg0) {\n\t\t\n\t}", "public void setTooltipText() { tooltip.setText(name); }", "private void draw_text() {\n\t\tcopy_text_into_buffer();\n\t\tVoteVisApp.instance().image(text_buffer_, frame_height_ / 2,\n\t\t\t-text_graphics_.height / 2);\n\t}", "public void cbDisplayPointText()\n {\n \tif (!m_white.wasSuccess()) \n \t return;\n \n \tString str = m_white.getResponse();\n Vector<Pair<String, String> > pairs = \n StringUtils.parseStringPairList(str);\n \n m_guiboard.clearMarks();\n \n for (int i=0; i<pairs.size(); i++) {\n \t HexPoint point = HexPoint.get(pairs.get(i).first);\n String value = pairs.get(i).second;\n m_guiboard.setText(point, value);\n \t}\n \tm_guiboard.repaint();\n }", "@Override\r\n public void setText(String string) {\r\n super.setText(\"<HTML><U>Ayuda</U></HTML>\");\r\n \r\n }", "public abstract String getLabelText();", "@Override\n\tpublic void paint(Graphics e) {\n\t\tsuper.paint(e);\n\t\te.drawString(text, 20, 20);\n\t}", "public void changeText(VecShape.Mode mode){\n if (mode == VecShape.Mode.PLOT){\n this.setText(\"PLOT: Click mouse to draw a plot\");\n } else if (mode == VecShape.Mode.LINE){\n this.setText(\"LINE: Click & Drag mouse to draw. Release to finish drawing a line \");\n } else if (mode == VecShape.Mode.RECTANGLE){\n this.setText(\"RECTANGLE: Click & Drag mouse to draw. Release to finish drawing a rectangle\");\n } else if (mode == VecShape.Mode.ELLIPSE){\n this.setText(\"Ellipse: Click & Drag mouse to draw. Release to finish drawing a ellipse\");\n } else if (mode == VecShape.Mode.POLYGON) {\n this.setText(\"POLYGON: Double click to finish drawing a polygon. Drag mouse to draw a free shape\");\n }\n }", "static void setTextMousePoint(int i,int j){tmpx=i;tmpy=j;}", "public void drawIconText(Graphics g, int mouseX, int mouseY) {\n super.drawIconText(g, mouseX, mouseY);\n\n if (!isEmpty()) {\n Icon intent = enemy.getIntent();\n if (intent.getBoundingBox().contains(mouseX, mouseY)) {\n intent.drawText(g, 25, 0, 150);\n }\n }\n }", "public Caption (int x, int y, String text) {\n super (x, y, 1, 1, 0, 1, 1, 1, 0, 0); // x,y,w,h HitBox x,y,w,h,I,O\n Text = text;\n ComponentName = \"Text\";\n ClassName = \"Caption\";\n CaptionFont = new Font(\"TimesRoman\",Font.PLAIN, 16);\n }", "public void updatePointText(int point) {\n String textPoint = \"points: \" + point;\n text.setText(textPoint);\n }", "private void setText() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public void setTitlePopup(String t) {\n/* 147 */ getCOSObject().setString(COSName.T, t);\n/* */ }", "private void setScoreText(){\n if(color != BLACK && color != WHITE){\n scoreLabel.setText(\"Score: Black - \" + calScore(BLACK) + \" White - \" + calScore(WHITE));\n }else {\n scoreLabel.setText(\"Score: \" + calScore(this.color));\n }\n }", "public void changeLableText(int playerScore,int computerScore);", "@Override\n\tpublic String shape() {\n\t\treturn \"Text\";\n\t}", "public void changeLivesDisplay()\r\n {\r\n removeObject(text);\r\n //Add the lives text\r\n text = new Text(\"Lives: \" + health);\r\n addObject(text, 60, 15);\r\n }", "public void addText(String text){\n try{\n FXMLLoader battleLogEntryLoader = new FXMLLoader(getClass().getClassLoader().getResource(\"FXML/BattleLogEntry.fxml\"));\n Label battleLogEntryLabel = battleLogEntryLoader.load();\n battleLogEntryLabel.setText(text);\n if(count % 2 == 0){\n battleLogEntryLabel.setBackground(new Background(new BackgroundFill(Color.LIGHTGRAY, CornerRadii.EMPTY, Insets.EMPTY)));\n } else{\n battleLogEntryLabel.setBackground(new Background(new BackgroundFill(Color.TRANSPARENT, CornerRadii.EMPTY, Insets.EMPTY)));\n }\n textSpace.getChildren().add(battleLogEntryLabel);\n count++;\n } catch(Exception e) {\n\n }\n }", "public Text(int x, int y, String text, int size) {\r\n this.x = x;\r\n this.y = y;\r\n this.text = text;\r\n this.font = Font.SANS_SERIF;\r\n this.size = size;\r\n \r\n }", "public void setLabelText(String text);", "public String getLabelText();", "public void aapne() {\n trykketPaa = true;\n setBackground(new Background(new BackgroundFill(Color.LIGHTGRAY, CornerRadii.EMPTY, Insets.EMPTY)));\n if (bombe) {\n setText(\"x\");\n Color moerkeregroenn = Color.rgb(86, 130, 3, 0.5);\n setBackground(new Background(new BackgroundFill(moerkeregroenn, CornerRadii.EMPTY, Insets.EMPTY)));\n } else if (bombeNaboer == 0) {\n setText(\" \");\n } else {\n setText(bombeNaboer + \"\");\n if (bombeNaboer == 1) {\n setTextFill(Color.BLUE);\n } else if (bombeNaboer == 2) {\n setTextFill(Color.GREEN);\n } else if (bombeNaboer == 3) {\n setTextFill(Color.RED);\n } else if (bombeNaboer == 4) {\n setTextFill(Color.DARKBLUE);\n } else if (bombeNaboer == 5) {\n setTextFill(Color.BROWN);\n } else if (bombeNaboer == 6) {\n setTextFill(Color.DARKCYAN);\n }\n }\n }", "public void update(){\n y -= 1; // Making the text float up\n // Making the text more transparent\n color = new Color(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha() - 2);\n }", "private void setupSpellHereLabel(){\n\t\tJLabel spell_here_text = new JLabel(\"SPELL HERE\");\n\t\tspell_here_text.setFont(new Font(\"Arial\", Font.BOLD, 45));\n\t\tspell_here_text.setForeground(new Color(254, 157, 79));\n\t\tadd(spell_here_text);\n\t\tspell_here_text.setBounds(32, 484, 332, 74);\n\t\tspell_here_text.setOpaque(false);\n\t}", "@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tString name = d.getName(e.getX(),e.getY());\r\n\t\t\t\tGraphics g = w.getGraphics();\r\n\t\t\t\tg.setColor(Color.RED);\r\n\t\t\t\tg.setFont(new Font(\"Arial\", Font.BOLD, 12));\r\n\t\t\t\tg.drawString(name, e.getX(), e.getY());\r\n\t\t\t}", "void setNewFrameText(Motion m);", "private void setText(Text text) {\n \t\tthis.text = text;\n \t}", "public void centerText() {\r\n int theHeight = window.getGraphPanelHeight() / 2;\r\n int theWidth = window.getGraphPanelWidth() / 2;\r\n int writingHeight = textShape.getHeight() / 2;\r\n int writingWidth = textShape.getWidth() / 2;\r\n textShape.setY(theHeight - writingHeight);\r\n textShape.setX(theWidth - writingWidth);\r\n }", "public void displayToScreen(String str){\r\n textPane1.setText(str);\r\n paintDiamond();\r\n }", "public void addTextToTheTA(String msg) {\n\t\tguessArea.append(msg);\n\t}", "public static void giveMessage(String text, MutableAttributeSet style) {\n\n if (!cb.isSelected()) {\n return;\n }\n\n if (style == null) {\n style = black;\n }\n\n try {\n textPane.setCharacterAttributes(style, true);\n documentModel.insertString(documentModel.getLength(), text + \"\\n\", style);\n textPane.setCaretPosition(documentModel.getLength());\n\n } catch (BadLocationException ble) {\n System.out.println(\"Bad location for text insert on logpanel.\");\n }\n }", "void setShapeLabel(String Label);", "private void setupMessage() {\n \tmessage = new GLabel(\"\");\n \tmessage.setFont(\"SansSerif-12\");\n }", "private void setupTitle(){\n\t\tJLabel title = new JLabel(quiz_type.toString()+\": \"+parent_frame.getDataHandler().getLevelNames().get(parent_frame.getDataHandler().getCurrentLevel())); \n\t\ttitle.setFont(new Font(\"Arial Rounded MT Bold\", Font.BOLD, 65));\n\t\ttitle.setForeground(new Color(254, 157, 79));\n\t\ttitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tadd(title);\n\t\ttitle.setBounds(32, 24, 1136, 119);\n\t\ttitle.setOpaque(false);\n\t}", "protected void reloadText() {\n this.chart.getPlot().setNoDataMessage(translator.translate(\"noDataAvailable\"));\n //this.chart.setTitle(translator.translate(key));\n //TODO extend method for x and y title exchange\n }", "public void getText(){\n\t\tnoteText.setText(note.getText());\n\t}", "public void displayHover() {\n if (textColour == null) {\r\n displayEmptyHover();\r\n return;\r\n }\r\n stroke(0, 0, 0);\r\n strokeWeight(strokeWeight);\r\n hoverFill(boxColour);\r\n if (strokeWeight != 0 && text != null) {\r\n rect(x, y, w, h, 7);\r\n }\r\n fill(textColour);\r\n textSize(textSize);\r\n text(text, x + xTextOffset, y + yTextOffset);\r\n }", "public void clickedRepTN(Button button) {\r\n textShape.setText(\"TN Case Fatality Ratios by Race\");\r\n this.updateRace(4);\r\n this.updateCFR(4);\r\n this.updateBar(4);\r\n }", "private void postInfo(String text) {\r\n\t\tLabel hLabel = new Label(labelInfo.getText());\r\n\t\thLabel.addStyleName(Styles.battle_info);\r\n\t\t//add the old info to the history\r\n\t\tvPanelInfoHistory.insert(hLabel, 0);\r\n\t\tlabelInfo.setText(SafeHtmlUtils.htmlEscape(text));\r\n\t}", "@Override\n\tpublic void paintLabel(Graphics g) {\n\t\tGraphics2D g2d = (Graphics2D) g;\n\t\tg2d.drawString(\"Oval\",x,y+65);\n\t}", "private void vbox_text(Group vbox, String text){\n vbox.getChildren().clear();\n vbox.setLayoutX(400);\n vbox.setLayoutY(100);\n\n Label label_help = new Label(text);\n label_help.setFont(Font.font(\"Cambria\", 20));\n label_help.setTextFill(Color.web(\"#000000\"));\n label_help.setWrapText(true);\n\n BorderPane canvasBorderPane = new BorderPane();\n canvasBorderPane.setPadding(new Insets(5));\n canvasBorderPane.setBackground(new Background(new BackgroundFill(Color.WHITE, new CornerRadii(0), Insets.EMPTY)));\n canvasBorderPane.setCenter(label_help);\n\n BorderPane border = new BorderPane();\n border.setCenter(canvasBorderPane);\n border.setPadding(new Insets(5));\n border.setBackground(new Background(new BackgroundFill(Color.GREY, new CornerRadii(0), Insets.EMPTY)));\n\n vbox.getChildren().add(border);\n }", "public void empSlotText(SpriteBatch batch){\n batch.setProjectionMatrix(textCam.combined);\n String text = \"\"+manager.getEmployees()+\"/\"+manager.getEmployeeSlots();\n batch.begin();\n font2.draw(batch,text, 730, 370);\n batch.end();\n }", "public void fillString(float x, float y, String text);", "@Override\n public void eatMeat()\n {\n setEatText(\"nomnomnom oink thx\");\n System.out.println(getEatText());\n }", "public void say (String txt) {\n\t\tApp.addBlueInfo(npc.getName() + \" : \"+txt);\n\t}", "protected void drawTitle(Graphics2D g2) {\n //int xloc = leftDisplay + (rightDisplay - leftDisplay)*xCenter/getWidth();\n FontRenderContext frc = g2.getFontRenderContext();\n Font font = new Font(\"Arial\", Font.BOLD, 9);\n String str = dataSet.getGeneRange().getName() + \" Chr\" + dataSet.getChromosome();\n g2.setColor(Singleton.getUserPreferences().getThumbnailTextColor());\n TextLayout tl = new TextLayout(str, font, frc);\n int x = 2;\n int y = 10;\n tl.draw(g2, x, y);\n \n /*for (Model model : viewData.getModels()) {\n System.out.println(\"Rendering with model \" + model.toString() + \"\\thaving #snps: \" + snps.size());*/\n String modelStr = viewData.getModels().get(0).toString();\n //String modelStr = dataSet.getModels().get(0).toString();\n TextLayout modelTl = new TextLayout(modelStr, font, frc);\n int INTER_TITLE_BREAK = 20;\n int modelX = x;\n int modelY = 20;\n if(tl.getBounds().getWidth() + modelTl.getBounds().getWidth() + INTER_TITLE_BREAK < getWidth()) {\n modelY = y;\n modelX = x + (int) Math.round(tl.getBounds().getWidth()) + INTER_TITLE_BREAK;\n }\n modelTl.draw(g2, modelX, modelY);\n }", "public void addText(String text) {\n\t\tNodeList frameList = maNoteElement.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), \"frame\");\n\t\tif (frameList.getLength() > 0) {\n\t\t\tDrawFrameElement frame = (DrawFrameElement) frameList.item(0);\n\t\t\tNodeList textBoxList = frame.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), \"text-box\");\n\t\t\tif (textBoxList.getLength() > 0) {\n\t\t\t\tDrawTextBoxElement textBox = (DrawTextBoxElement) textBoxList.item(0);\n\t\t\t\tTextPElement newPara = textBox.newTextPElement();\n\t\t\t\tnewPara.setTextContent(text);\n\t\t\t}\n\t\t}\n\t}", "protected void setToolTipText(Tile tile) {\n\t\tif(!peek && hidden) { tile.setToolTipText(\"concealed tile\"); }\n\t\telse {\n\t\t\tString addendum = \"\";\n\t\t\tif(playerpanel.getPlayer().getType()==Player.HUMAN) { addendum = \" - click to discard during your turn\"; }\n\t\t\ttile.setToolTipText(tile.getTileName()+ addendum); }}", "void setEditFrameText(Motion m);", "public void setButtonText(String str){\r\n SWINGButton.setText(str);\r\n }", "private void drawTextMarker(Graphics g, String[] messages, int yLine, Player owner) {\n\t\tint xCenter = getGameWidthPixels() / 2;\n\t\tVector2DLong position0Inverted = new Vector2DLong(xCenter, yLine),\n\t\t\t\tposition1NonInverted = new Vector2DLong(xCenter, getGameHeightPixels() - yLine);\n\t\tdrawScoreMarker(g, new ScoreMarker(messages[0], position0Inverted, owner, true));\n\t\tdrawScoreMarker(g, new ScoreMarker(messages[1], position1NonInverted, owner, false));\n\t}", "@Override\r\n\tpublic void setText(String text) {\n\t\tsuper.setText(foundedRecords + \" : \" +text);\r\n\t}", "private void genRunwayName(Group root, String runwayId, Integer helperHeight){\n Point runwayPos = controller.getRunwayPos(runwayId);\n Dimension runwayDim = controller.getRunwayDim(runwayId);\n\n //text color and text font\n javafx.scene.text.Font font = new javafx.scene.text.Font(\"SansSerif\", runwayDim.height/2);\n Color fontColor = convertToJFXColour(Settings.RUNWAY_NAME_COLOUR);\n\n // rotate to make the string flat on the runway\n Rotate flatRotation = new Rotate(-90,0,-1,0, Rotate.X_AXIS);\n\n //offset for the id\n Integer idOffset = 16;\n //offset for the letter;\n Double letterOffset = 30.5;\n //offset for putting the letter which has a smaller font higher\n Integer letterHeightOffset = 10;\n\n if(runwayId.length() == 2){\n Text text = new Text(runwayId);\n text.setFill(fontColor);\n text.setFont(font);\n text.setTranslateX(runwayPos.x - runwayDim.height/2 + idOffset);\n text.setTranslateZ(-runwayPos.y + runwayNameOffset);\n text.setTranslateY(-helperHeight);\n\n Rotate rotate = new Rotate(controller.getBearing(runwayId), runwayDim.height/2 - idOffset,0, -runwayNameOffset, Rotate.Y_AXIS);\n text.getTransforms().add(rotate);\n text.getTransforms().add(flatRotation);\n\n text.setCache(true);\n text.setCacheHint(CacheHint.QUALITY);\n root.getChildren().add(text);\n\n }else{\n Text newRunwayId = new Text(runwayId.substring(0,2));\n newRunwayId.setFill(fontColor);\n newRunwayId.setFont(font);\n Text letter = new Text(runwayId.charAt(2) + \"\");\n letter.setFill(fontColor);\n letter.setFont(new javafx.scene.text.Font(\"SansSerif\", runwayDim.height/2-10));\n\n newRunwayId.setTranslateX(runwayPos.x - runwayDim.height/2 + idOffset);\n newRunwayId.setTranslateZ(-runwayPos.y + runwayNameOffset);\n newRunwayId.setTranslateY(-helperHeight);\n\n Rotate IdRotate = new Rotate(controller.getBearing(runwayId), runwayDim.height/2 - idOffset,0, - runwayNameOffset, Rotate.Y_AXIS);\n newRunwayId.getTransforms().add(IdRotate);\n\n letter.setTranslateX(runwayPos.x - runwayDim.height/2 + letterOffset);\n letter.setTranslateZ(-runwayPos.y + runwayNameOffset - runwayDim.height/2 + letterHeightOffset);\n letter.setTranslateY(-helperHeight);\n\n Rotate letterRotate = new Rotate(controller.getBearing(runwayId), runwayDim.height/2 - letterOffset,0, - runwayNameOffset + runwayDim.height/2 - letterHeightOffset, Rotate.Y_AXIS);\n letter.getTransforms().add(letterRotate);\n\n newRunwayId.getTransforms().add(flatRotation);\n letter.getTransforms().add(flatRotation);\n\n newRunwayId.setCache(true);\n newRunwayId.setCacheHint(CacheHint.QUALITY);\n\n letter.setCache(true);\n letter.setCacheHint(CacheHint.QUALITY);\n\n root.getChildren().add(newRunwayId);\n root.getChildren().add(letter);\n }\n }", "private void initSpaceAnchorButtonText()\n {\n final Context context = componentsSpaceAnchorButton.getContext();\n List< String > labels = new ArrayList< String >()\n {{\n add(context.getString(R.string.dictionary_manager_ui_my_dictionaries_download_progress_text, 100));\n }};\n String baseSizeMbStr = Utils.formatSize(mComponent.getSize());\n if ( mComponent instanceof WordBaseComponent )\n {\n labels.add(context.getString(R.string.dictionary_manager_ui_my_dictionaries_download_and_remove_word_base_button, baseSizeMbStr));\n }\n else if ( mComponent instanceof SoundComponent )\n {\n String langIso = ( (SoundComponent) mComponent ).getName();\n labels.add(context.getString(R.string.dictionary_manager_ui_my_dictionaries_download_and_remove_sound_base_button, langIso, baseSizeMbStr));\n }\n else if ( mComponent instanceof PictureComponent )\n {\n labels.add(context.getString(R.string.dictionary_manager_ui_my_dictionaries_download_and_remove_picture_base_button, baseSizeMbStr));\n }\n for ( String label : labels )\n {\n if ( label.length() > componentsSpaceAnchorButton.getText().length() )\n {\n componentsSpaceAnchorButton.setText(label + \" \");\n }\n }\n }", "public void setText( String text );", "public void setText(String text);", "@Override\n\t\tpublic void addText(String txt) {\n\t\t\t\n\t\t}", "public CustomLabel(String text){\n setHorizontalAlignment(JLabel.LEFT);\n Font font = new Font(\"Bold\", Font.BOLD, 20);\n setFont(font);\n setText(\" \" + text);\n }", "public void colorText() {\r\n String theColor = textShape.getText();\r\n if (theColor.contains(\"blue\")) {\r\n textShape.setForegroundColor(Color.BLUE);\r\n }\r\n else if (theColor.contains(\"red\")) {\r\n textShape.setForegroundColor(Color.RED);\r\n }\r\n else {\r\n textShape.setForegroundColor(Color.BLACK);\r\n }\r\n }", "void setText (String text);", "private void makeOutro()\r\n\t{\r\n\t TextProperties outroProperties = new TextProperties();\r\n\t outroProperties.set(AnimationPropertiesKeys.FONT_PROPERTY, new Font(Font.SANS_SERIF, Font.PLAIN, width >= 80 ? 18 : 13));\r\n\t outroProperties.set(AnimationPropertiesKeys.COLOR_PROPERTY, Color.blue);\r\n\t \r\n\t String outro1Text = \"In the result all \"+amountOfStars+\" points are assigned to groups.\";\r\n\t String outro2Text = width > 80 ? \"This is used in astrophysics to find clusters of stars or dark matter out of millions of 2D or 3D points.\" : \"This is used in astrophysics to find clusters\";\r\n\t String outro3Text = \" of stars or dark matter out of millions of 2D or 3D points.\";\r\n\t \r\n\t\toutro1 = lang.newText(getStarPosition(0, height+3), outro1Text, \"outro1\", null, outroProperties);\r\n\t\toutro2 = lang.newText(new Offset(0, 0, \"outro1\", AnimalScript.DIRECTION_SW), outro2Text, \"outro2\", null, outroProperties);\r\n\t\tif(width <= 80) outro3 = lang.newText(new Offset(0, 0, \"outro2\", AnimalScript.DIRECTION_SW), outro3Text, \"outro3\", null, outroProperties);\r\n\t}", "void addHadithText(Object newHadithText);", "Text createText();", "private void drawXYZText() {\n\t\t//Draw text X - red\n\t\tgl.glColor3f(1.0f, 0.0f, 0.0f);\n\t\tgl.glRasterPos3f(1,0,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"X\");\n\t\tgl.glEnd();\n\t\t//Draw text -X - red\n\t\tgl.glColor3f(1.0f, 0.0f, 0.0f);\n\t\tgl.glRasterPos3f(-1,0,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-X\");\n\t\tgl.glEnd();\n\t\t\n\t\t//Draw text Y - Green\n\t\tgl.glColor3f(0.0f, 1.0f, 0.0f);\n\t\tgl.glRasterPos3f(0,1,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"Y\");\n\t\tgl.glEnd();\n\t\t//Draw text -Y - Green\n\t\tgl.glColor3f(0.0f, 1.0f, 0.0f);\n\t\tgl.glRasterPos3f(0,-1,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-Y\");\n\t\tgl.glEnd();\n\t\t\n\t\t//Draw text Z - Blue\n\t\tgl.glColor3f(0.0f, 0.0f, 1.0f);\n\t\tgl.glRasterPos3f(0,0,1);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"Z\");\n\t\tgl.glEnd();\n\t\t//Draw text -Z - Blue\n\t\tgl.glColor3f(0.0f, 0.0f, 1.0f);\n\t\tgl.glRasterPos3f(0,0,-1);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-Z\");\n\t\tgl.glEnd();\n\t}", "public VBox vbText() {\r\n\r\n VBox vbTop = new VBox(); //VBox for text at the top\r\n\r\n vbTop.setAlignment(Pos.CENTER); //Align to center\r\n\r\n vbTop.setPadding(new Insets(1, 1, 15, 1)); //Padding\r\n\r\n //Create the text for the BorderPane top\r\n Text mainText1 = new Text(\"User Confirmation\");\r\n Text mainText2 = new Text(\"Is this information correct?\");\r\n\r\n //Set attributes for the text\r\n mainText1.setFont(Font.font(\"Times New Roman\", FontWeight.BOLD, 25));\r\n mainText2.setFont(Font.font(\"Times New Roman\", FontWeight.BOLD, 15));\r\n\r\n //SetId's\r\n mainText1.setId(\"text\");\r\n mainText2.setId(\"text\");\r\n\r\n vbTop.getChildren().addAll(mainText1, mainText2); //Add text to VBox\r\n\r\n return vbTop;\r\n\r\n }", "public void setToolTipText (String string) {\r\n\tcheckWidget();\r\n\ttoolTipText = string;\r\n}", "public void setWhiteText(JButton jb, Object _readIn) {\r\n WhiteCard wc = (WhiteCard)_readIn;\r\n playerNum = wc.getPlayerNumber();\r\n String wcMsg = wc.getMessage();\r\n wcMsg = toHtml(wcMsg, 18);\r\n System.out.println(wcMsg);\r\n jb.setText(\"<html><center>\" + wcMsg + \"</center></html>\"); \r\n }", "@Override\n protected void paintForeground(Graphics2D g) {\n\n int fontSize = 40;\n\n g.setFont(new Font(\"TimesRoman\", Font.PLAIN, fontSize));\n g.setColor(Color.black);\n g.drawString(\"Points:\" + rat.getFoodCount(), 0, 40);\n\n }", "void setText(String text);", "private void setAttackText(){\n if (this.attack >= 0){\n pokemonText.setText(\"Ataque: \" + this.attack);\n } else {\n pokemonText.setText(\"\");\n }\n }", "public void setToolTipText(String text)\n/* */ {\n/* 227 */ putClientProperty(\"ToolTipText\", text);\n/* */ }", "private void createBack() {\n String backString = \"\";\n if(host.locale == host.FINNISH) {\n backString = \"TAKAISIN\";\n } else if(host.locale == host.ENGLISH) {\n backString = \"BACK\";\n }\n back = new FontActor(backString,\n screenWidth * 1 / 8,\n screenHeight * 1 / 8);\n }", "public abstract void setText(String txt);", "@Override\n public void setText(String promptText) {\n super.setText(promptText); \n if (promptText != null) {\n ResizeUtils.updateSize(this, actions);\n }\n }", "public Ventana() {\n initComponents();\n this.tipos.add(GD_C);\n this.tipos.add(GD_S);\n this.tipos.add(GND_C);\n this.tipos.add(GND_S);\n this.panel.setArea_text(text);\n\n }", "public void displayText() {\n\n // Draws the border on the slideshow aswell as the text\n image(border, slideshowPosX - borderDisplace, textPosY - textMargin - borderDisplace);\n\n // color of text background\n fill(textBackground);\n\n //background for text\n rect(textPosX - textMargin, textPosY - textMargin, textSizeWidth + textMargin * 2, textSizeHeight + textMargin * 2);\n\n //draw text\n image(texts[scene], textPosX, textPosY, textSizeWidth, textSizeHeight, 0, 0 + scrolled, texts[scene].width, textSizeHeight + scrolled);\n }", "public void endingDescription() {\n String endDescription = \"Congratulation! you earned an extra \" + presenter.getPoints()\n + \" point(s) and have increased your total from \" + points + \" points to \" +\n (points + presenter.getPoints()) + \" points.\";\n endMessage.setText(endDescription);\n }", "public void arreglarBoton()\r\n\t{\r\n\t\tthis.setBorder(BorderFactory.createLineBorder(Color.white, 4));\r\n\t\tthis.setFont(new Font(\"Arial\", Font.BOLD, 17));\r\n\t}", "void drawLabel() {\n\t\tfloat gavityValue = (int) (radius * 100);\n\t\tgavityValue /= 100;\n\t\tString label = \"gravityField \" + id + \"\\n gravity: \" + gavityValue;\n\t\tfloat labelWidth = gg.textWidth(label);\n\t\tfloat textHeight = 8;\n\n\t\tgg.pushMatrix();\n\t\tgg.translate(x, y, radius + textHeight * 3);\n\t\t// rotateZ(-rotZ/2);\n\t\tgg.pushMatrix();\n\t\tgg.rotateX(-HALF_PI);\n\t\tgg.fill(0);\n\t\tgg.rect(-labelWidth / 2 - 2, -textHeight - 1.5f, labelWidth + 4,\n\t\t\t\ttextHeight * 2 + 6);\n\t\tgg.translate(0, 0, .1f);\n\t\tgg.fill(255);\n\t\tgg.textSize(textHeight);\n\t\tgg.textAlign(CENTER);\n\t\tgg.text(label, 0, 0, 0);\n\t\tgg.popMatrix();\n\n\t\tgg.rotateZ(PI);\n\t\tgg.pushMatrix();\n\t\tgg.rotateX(-HALF_PI);\n\t\tgg.translate(0, 0, .1f);\n\t\tgg.fill(255);\n\t\tgg.textSize(textHeight);\n\t\tgg.textAlign(CENTER);\n\t\tgg.text(label, 0, 0, 0);\n\t\tgg.popMatrix();\n\t\tgg.popMatrix();\n\n\t}" ]
[ "0.6347244", "0.6304361", "0.6291851", "0.6191524", "0.6103023", "0.6057281", "0.605395", "0.60320044", "0.60224617", "0.59992135", "0.59693265", "0.59512955", "0.5947081", "0.5868656", "0.5847718", "0.5818841", "0.57976997", "0.5791514", "0.5755793", "0.57223845", "0.57149374", "0.56983995", "0.56902444", "0.5689346", "0.56859326", "0.56733906", "0.5661421", "0.5650921", "0.56507814", "0.5645015", "0.56417924", "0.563588", "0.563458", "0.5633465", "0.5591546", "0.55911064", "0.5589545", "0.5589186", "0.5565981", "0.5556248", "0.555372", "0.55513954", "0.5549752", "0.5537691", "0.5530103", "0.5513185", "0.5510216", "0.55098987", "0.55080247", "0.549396", "0.5485086", "0.54850024", "0.54820377", "0.5469933", "0.5466124", "0.5459366", "0.5456861", "0.5449791", "0.5439115", "0.5435145", "0.5433875", "0.5427673", "0.5426899", "0.5424136", "0.5412943", "0.5409657", "0.5407157", "0.5398629", "0.5387435", "0.5386026", "0.53839266", "0.5376036", "0.5371331", "0.53693736", "0.53629863", "0.53605103", "0.53577816", "0.5356031", "0.5352308", "0.53518414", "0.5351632", "0.5348283", "0.5347155", "0.5343256", "0.5331758", "0.53311294", "0.53304887", "0.5328059", "0.53253865", "0.532351", "0.531963", "0.5319516", "0.5316726", "0.5312162", "0.5310871", "0.5309159", "0.5304215", "0.52950287", "0.52925724", "0.5290859", "0.5290646" ]
0.0
-1
Animating A.I. emote bubble with random botlike text to make it 'polite':
public void run() { mOpponentEmoteBubble.setText(botEmotesArray[new Random().nextInt(botEmotesArray.length)]); showEmote(mOpponentEmoteBubble); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showEmote(TextView emoteBubble){\n if(mSoundStatus.equals(Constants.ON)) mPopSound.start();\n\n // Animating the bubble's alpha (fade in, fade out):\n\n ObjectAnimator emoteAlphaAnimator = ObjectAnimator.ofFloat(emoteBubble,\n \"alpha\", 0, 1);\n emoteAlphaAnimator.setInterpolator(new DecelerateInterpolator());\n emoteAlphaAnimator.setRepeatCount(1);\n emoteAlphaAnimator.setRepeatMode(ObjectAnimator.REVERSE);\n emoteAlphaAnimator.setDuration(Constants.EMOTE_DURATION/2);\n\n\n // Animating the bubble's size (pop up with overshoot):\n\n float scaleX = emoteBubble.getScaleX();\n ObjectAnimator emoteScaleXAnimator = ObjectAnimator.ofFloat(emoteBubble,\n \"scaleX\", 0, scaleX);\n emoteScaleXAnimator.setInterpolator(new OvershootInterpolator());\n emoteScaleXAnimator.setDuration(Constants.EMOTE_POPUP_DURATION);\n\n float scaleY = emoteBubble.getScaleY();\n ObjectAnimator emoteScaleYAnimator = ObjectAnimator.ofFloat(emoteBubble,\n \"scaleY\", 0, scaleY);\n emoteScaleYAnimator.setInterpolator(new OvershootInterpolator());\n emoteScaleYAnimator.setDuration(Constants.EMOTE_POPUP_DURATION);\n\n\n // Start animations:\n\n AnimatorSet animatorSet = new AnimatorSet();\n animatorSet.playTogether(emoteAlphaAnimator, emoteScaleXAnimator, emoteScaleYAnimator);\n animatorSet.start();\n\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n mPlayerEmoteBubble.setText(emotesArray[position]);\n\n // Animating the bubble:\n showEmote(mPlayerEmoteBubble);\n\n // Making emotes unavailable for a while:\n mIsEmotePlayable = false;\n mEmoteButton.setBackgroundResource(R.color.colorGrayDark);\n\n\n\n Handler botEmoteHandler = new Handler();\n botEmoteHandler.postDelayed(new Runnable() {\n public void run() {\n\n // Animating A.I. emote bubble with random bot-like text to make it 'polite':\n mOpponentEmoteBubble.setText(botEmotesArray[new Random().nextInt(botEmotesArray.length)]);\n showEmote(mOpponentEmoteBubble);\n\n }\n }, Constants.BOT_EMOTE_RESPONSE_DELAY);\n\n\n Handler EmoteAvailabilityHandler = new Handler();\n EmoteAvailabilityHandler.postDelayed(new Runnable() {\n public void run() {\n\n // Making emotes available once again:\n mEmoteButton.setBackgroundResource(R.drawable.button_yellow);\n mIsEmotePlayable = true;\n\n }\n }, Constants.EMOTE_TIMEOUT);\n\n\n // Making emote picker list unavailable:\n mEmotePickerList.setVisibility(View.GONE);\n mDummy.setVisibility(View.GONE);\n\n }", "@Override\n public void eatMeat()\n {\n setEatText(\"nomnomnom oink thx\");\n System.out.println(getEatText());\n }", "@Override\n public void performTrick()\n {\n Random random = new Random();\n int rnd = random.nextInt(2);\n if(rnd == 0)\n {\n setPerformText(\"rolls in the mud\");\n }\n else\n {\n setPerformText(\"runs in circles\");\n }\n System.out.println(getPerformText());\n }", "@Action\n public void addWrappedText() {\n if (Math.random() < .33) {\n addWrappedTextEndChar();\n } else if (Math.random() < .5) {\n addWrappedTextRandom();\n } else {\n addWrappedTextSmall();\n }\n }", "public static void preDrawAnnouncement() {\n\t\twinnerAnnounced = false;\n\t\ttimePreDrawAnnounced = System.currentTimeMillis();\n\t\tObject object = new Object();\n\t\tCycleEventHandler.getSingleton().addEvent(object, new CycleEvent() {\n\t\t\tint timer = 0;\n\n\t\t\t@Override\n\t\t\tpublic void execute(CycleEventContainer container) {\n\t\t\t\tNpc npc = NpcHandler.npcs[lotteryNpcIndex];\n\t\t\t\tnpc.forceChat(\"The lottery is at \" + getTotalPotString() + \"! Talk to Durial321 at ::shops to win, \" + getMinutesLeftTillWinner() + \" min\" + Misc.getPluralS(\n\t\t\t\t\t\tgetMinutesLeftTillWinner()) + \" left!\");\n\t\t\t\tAnnouncement.announce(\n\t\t\t\t\t\t\"<img=27><col=a36718> The lottery is at \" + getTotalPotString() + \"! Talk to Durial321 at ::shops to win, \" + getMinutesLeftTillWinner() + \" min\"\n\t\t\t\t\t\t+ Misc.getPluralS(getMinutesLeftTillWinner()) + \" left!\");\n\t\t\t\ttimer++;\n\t\t\t\tif (timer == 15) {\n\t\t\t\t\ttimer = 0;\n\t\t\t\t\tcontainer.stop();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void stop() {\n\t\t\t\twinnerAnnounced = true;\n\t\t\t\tannounceWinner();\n\t\t\t}\n\t\t}, 100);\n\n\t\tObject object1 = new Object();\n\t\tCycleEventHandler.getSingleton().addEvent(object1, new CycleEvent() {\n\t\t\tint timer = 0;\n\n\t\t\t@Override\n\t\t\tpublic void execute(CycleEventContainer container) {\n\t\t\t\tif (winnerAnnounced) {\n\t\t\t\t\tcontainer.stop();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tNpc npc = NpcHandler.npcs[lotteryNpcIndex];\n\t\t\t\tif (Misc.hasPercentageChance(25)) {\n\t\t\t\t\tnpc.requestAnimation(EMOTES[Misc.random(EMOTES.length - 1)]);\n\t\t\t\t}\n\t\t\t\tnpc.forceChat(\n\t\t\t\t\t\t\"The lottery is at \" + getTotalPotString() + \"! Talk to me to win, \" + getMinutesLeftTillWinner() + \" min\" + Misc.getPluralS(getMinutesLeftTillWinner())\n\t\t\t\t\t\t+ \" left!\");\n\t\t\t\ttimer++;\n\t\t\t\tif (timer == 1500) {\n\t\t\t\t\ttimer = 0;\n\t\t\t\t\tcontainer.stop();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void stop() {\n\t\t\t}\n\t\t}, 1);\n\n\t}", "@Override\n public void run() {\n Animation fadeIn = new AlphaAnimation(0, 1);\n fadeIn.setInterpolator(new LinearInterpolator());\n fadeIn.setDuration(1500);\n txtArrays[i].setAnimation(fadeIn);\n txtArrays[i].setText(texts[i]);\n txtArrays[i].setTypeface(G.mitra);\n txtArrays[i].setTextSize(TypedValue.COMPLEX_UNIT_DIP,17);\n }", "private void makeSnack() {\n\t\teating = true;\n\t\ttama.setLayoutX(200);\n\t\t\n\t\tsnack = new Sprite(3, 3, 22, 25, new Image(\"file:./res/images/snack.png\"), 1, 1000);\n\t\tsnack.setLayoutX(150);\n\t\tsnack.setLayoutY(150);\n\t\tsnack.setScaleX(0.3);\n\t\tsnack.setScaleY(0.3);\n\t\tgrid.getChildren().addAll(snack);\n\t\tPauseTransition pause = new PauseTransition(Duration.millis(1500));\n\t\tpause.setOnFinished(e -> {\n\t\t\tgrid.getChildren().remove(snack);\n\t\t\ttama.setLayoutX(190);\n\t\t\teating = false;\n\t\t\tmodel.getController().eatSnack();\n//\t\t\tif(!model.isHealthy()){\n//\t\t\t\tsetSickImg();\n//\t\t\t}\n\t\t});\n\t\tpause.play();\n\t\t\n\t}", "public void placeAlien(int size) {\r\n\r\n\t\tif (pstate.countAliens() == 0) {\r\n\t\t\t// create a random int with a value of either 1 or -1\r\n\t\t\tint a = -1;\r\n\t\t\tint j = RANDOM.nextInt(2);\r\n\t\t\tif (j == 0) {\r\n\t\t\t\ta = -1;\r\n\r\n\t\t\t} else {\r\n\t\t\t\ta = 1;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Create a random value for the starting y position of the alien\r\n\t\t\tint i = RANDOM.nextInt(SIZE);\r\n\r\n\t\t\t\r\n\t\t\t// Create the alien\r\n\t\t\talien = new Alien(0, i, 0, a * 6, size, this);\r\n\t\t\tnew ParticipantCountdownTimer(alien, \"create\", ALIEN_DELAY);\r\n\t\t}\r\n\t}", "void setNewFrameText(Motion m);", "public void intializeQuestionAnimation() {\n QuestionTextAnimation ();\n }", "Hangman() {\r\n \r\n //Timer\r\n final DateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\");\r\n int interval = 1000; // 1000 ms\r\n\r\n Calendar now = Calendar.getInstance();\r\n JLabel time = new JLabel(dateFormat.format(now.getTime()));\r\n time.setBounds(450, -50, 200, 125);\r\n\r\n Timer timer = new Timer(interval, new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n Calendar now = Calendar.getInstance();\r\n time.setText(dateFormat.format(now.getTime()));\r\n }\r\n });\r\n\r\n timer.start();\r\n\r\n //Word bank array\r\n String[] wordBank = new String[5];\r\n wordBank[0] = \"abstract\";\r\n wordBank[1] = \"cemetery\";\r\n wordBank[2] = \"nurse\";\r\n wordBank[3] = \"pharmacy\";\r\n wordBank[4] = \"climbing\";\r\n\r\n //random number generator\r\n Random rand = new Random();\r\n int value = rand.nextInt(5);\r\n //choosing a word\r\n answer = wordBank[value];\r\n\r\n displayedAnswer = \"\";\r\n for (int i = 0; i < answer.length(); i++) {\r\n displayedAnswer = displayedAnswer + \"_ \";\r\n }\r\n\r\n //bubble game\r\n String[] colors = new String[5];\r\n colors[0] = \"Red\";\r\n colors[1] = \"Yellow\";\r\n colors[2] = \"Green\";\r\n colors[3] = \"Blue\";\r\n colors[4] = \"Purple\";\r\n \r\n Random randColor = new Random();\r\n colorValue = randColor.nextInt(5);\r\n color = colors[colorValue];\r\n colorValue = randColor.nextInt(5);\r\n color2 = colors[colorValue];\r\n\tbubbleText.setText(color);\r\n \r\n \r\n //color button positions\r\n \r\n coordinates[0][0] = xPosArray[0];\r\n coordinates[0][1] = yPosArray[0];\r\n coordinates[0][2] = xPosArray[1];\r\n coordinates[0][3] = yPosArray[1];\r\n coordinates[0][4] = xPosArray[2];\r\n coordinates[0][5] = yPosArray[2];\r\n coordinates[0][6] = xPosArray[3];\r\n coordinates[0][7] = yPosArray[3];\r\n coordinates[0][8] = xPosArray[4];\r\n coordinates[0][9] = yPosArray[4];\r\n coordinates[1][0] = xPosArray[1];\r\n coordinates[1][1] = yPosArray[1];\r\n coordinates[1][2] = xPosArray[2];\r\n coordinates[1][3] = yPosArray[2];\r\n coordinates[1][4] = xPosArray[3];\r\n coordinates[1][5] = yPosArray[3];\r\n coordinates[1][6] = xPosArray[4];\r\n coordinates[1][7] = yPosArray[4];\r\n coordinates[1][8] = xPosArray[0];\r\n coordinates[1][9] = yPosArray[0];\r\n coordinates[2][0] = xPosArray[2];\r\n coordinates[2][1] = yPosArray[2];\r\n coordinates[2][2] = xPosArray[3];\r\n coordinates[2][3] = yPosArray[3];\r\n coordinates[2][4] = xPosArray[4];\r\n coordinates[2][5] = yPosArray[4];\r\n coordinates[2][6] = xPosArray[0];\r\n coordinates[2][7] = yPosArray[0];\r\n coordinates[2][8] = xPosArray[1];\r\n coordinates[2][9] = yPosArray[1];\r\n coordinates[3][0] = xPosArray[3];\r\n coordinates[3][1] = yPosArray[3];\r\n coordinates[3][2] = xPosArray[4];\r\n coordinates[3][3] = yPosArray[4];\r\n coordinates[3][4] = xPosArray[0];\r\n coordinates[3][5] = yPosArray[0];\r\n coordinates[3][6] = xPosArray[1];\r\n coordinates[3][7] = yPosArray[1];\r\n coordinates[3][8] = xPosArray[2];\r\n coordinates[3][9] = yPosArray[2];\r\n coordinates[4][0] = xPosArray[4];\r\n coordinates[4][1] = yPosArray[4];\r\n coordinates[4][2] = xPosArray[0];\r\n coordinates[4][3] = yPosArray[0];\r\n coordinates[4][4] = xPosArray[1];\r\n coordinates[4][5] = yPosArray[1];\r\n coordinates[4][6] = xPosArray[2];\r\n coordinates[4][7] = yPosArray[2];\r\n coordinates[4][8] = xPosArray[3];\r\n coordinates[4][9] = yPosArray[3];\r\n\r\n titleText.setFont(new Font(\"Serif\", Font.BOLD, 30));\r\n teamText.setFont(new Font(\"Curlz MT\", Font.PLAIN, 30));\r\n titleCredit.setFont(new Font(\"Serif\", Font.BOLD, 20));\r\n highScTitle.setFont(new Font(\"Serif\", Font.BOLD, 20));\r\n yourScTitle.setFont(new Font(\"Serif\", Font.BOLD, 35));\r\n scoreText.setFont(new Font(\"Serif\", Font.PLAIN, 20));\r\n answerText.setFont(new Font(\"Serif\", Font.BOLD, 35));\r\n highScores.setFont(new Font(\"Serif\", Font.BOLD, 20));\r\n hangmanTitle.setFont(new Font(\"AR DESTINE\", Font.PLAIN, 35));\r\n bubbleGameTitle.setFont(new Font(\"AR DESTINE\", Font.PLAIN, 35));\r\n bubbleText.setFont(new Font(\"AR DESTINE\", Font.PLAIN, 35));\r\n\tsudokuTitle.setFont(new Font(\"AR DESTINE\", Font.PLAIN, 35));\r\n \r\n switch(color2){\r\n case \"Red\":{\r\n bubbleText.setForeground(Color.red);\r\n break;\r\n }\r\n case \"Yellow\":{\r\n bubbleText.setForeground(Color.yellow);\r\n break;\r\n }\r\n case \"Blue\":{\r\n bubbleText.setForeground(Color.blue);\r\n break;\r\n }\r\n case \"Green\":{\r\n bubbleText.setForeground(Color.green);\r\n break;\r\n }\r\n case \"Purple\":{\r\n bubbleText.setForeground(purple);\r\n break;\r\n }\r\n }\r\n \r\n //Text Field\r\n NumberFormat format;\r\n format = NumberFormat.getInstance();\r\n format.setMaximumIntegerDigits(1);\r\n \r\n JTextField highScoreName = new JTextField(\"ABC\");\r\n ((AbstractDocument) highScoreName.getDocument()).setDocumentFilter(new StringFilter());\r\n\r\n JTextField sudoku00=new JTextField();\r\n JFormattedTextField sudoku01=new JFormattedTextField(format);\r\n JFormattedTextField sudoku02=new JFormattedTextField(format);\r\n JTextField sudoku03=new JTextField();\r\n JFormattedTextField sudoku04=new JFormattedTextField(format);\r\n JTextField sudoku05=new JTextField();\r\n JFormattedTextField sudoku06=new JFormattedTextField(format);\r\n JFormattedTextField sudoku07=new JFormattedTextField(format);\r\n JTextField sudoku08=new JTextField();\r\n JFormattedTextField sudoku10=new JFormattedTextField(format);\r\n JFormattedTextField sudoku11=new JFormattedTextField(format);\r\n JFormattedTextField sudoku12=new JFormattedTextField(format);\r\n JFormattedTextField sudoku13=new JFormattedTextField(format);\r\n JFormattedTextField sudoku14=new JFormattedTextField(format);\r\n JFormattedTextField sudoku15=new JFormattedTextField(format);\r\n JTextField sudoku16=new JTextField();\r\n JFormattedTextField sudoku17=new JFormattedTextField(format);;\r\n JFormattedTextField sudoku18=new JFormattedTextField(format);\r\n JFormattedTextField sudoku20=new JFormattedTextField(format);\r\n JTextField sudoku21=new JTextField();\r\n JFormattedTextField sudoku22=new JFormattedTextField(format);\r\n JFormattedTextField sudoku23=new JFormattedTextField(format);\r\n JFormattedTextField sudoku24=new JFormattedTextField(format);\r\n JFormattedTextField sudoku25=new JFormattedTextField(format);\r\n JTextField sudoku26=new JTextField();\r\n JTextField sudoku27=new JTextField();\r\n JFormattedTextField sudoku28=new JFormattedTextField(format);\r\n JTextField sudoku30=new JTextField();\r\n JFormattedTextField sudoku31=new JFormattedTextField(format);;\r\n JTextField sudoku32=new JTextField();\r\n JFormattedTextField sudoku33=new JFormattedTextField(format);;\r\n JTextField sudoku34=new JTextField();\r\n JFormattedTextField sudoku35=new JFormattedTextField(format);\r\n JTextField sudoku36=new JTextField();\r\n JTextField sudoku37=new JTextField();\r\n JFormattedTextField sudoku38=new JFormattedTextField(format);\r\n JFormattedTextField sudoku40=new JFormattedTextField(format);\r\n JFormattedTextField sudoku41=new JFormattedTextField(format);\r\n JFormattedTextField sudoku42=new JFormattedTextField(format);\r\n JFormattedTextField sudoku43=new JFormattedTextField(format);\r\n JTextField sudoku44=new JTextField();\r\n JFormattedTextField sudoku45=new JFormattedTextField(format);\r\n JFormattedTextField sudoku46=new JFormattedTextField(format);\r\n JFormattedTextField sudoku47=new JFormattedTextField(format);\r\n JFormattedTextField sudoku48=new JFormattedTextField(format);\r\n JFormattedTextField sudoku50=new JFormattedTextField(format);\r\n JTextField sudoku51=new JTextField();\r\n JTextField sudoku52=new JTextField();\r\n JFormattedTextField sudoku53=new JFormattedTextField(format);\r\n JTextField sudoku54=new JTextField();\r\n JFormattedTextField sudoku55=new JFormattedTextField(format);\r\n JTextField sudoku56=new JTextField();\r\n JFormattedTextField sudoku57=new JFormattedTextField(format);\r\n JFormattedTextField sudoku58=new JFormattedTextField(format);\r\n JFormattedTextField sudoku60=new JFormattedTextField(format);\r\n JTextField sudoku61=new JTextField();\r\n JTextField sudoku62=new JTextField();\r\n JFormattedTextField sudoku63=new JFormattedTextField(format);\r\n JFormattedTextField sudoku64=new JFormattedTextField(format);\r\n JFormattedTextField sudoku65=new JFormattedTextField(format);\r\n JFormattedTextField sudoku66=new JFormattedTextField(format);\r\n JTextField sudoku67=new JTextField();\r\n JFormattedTextField sudoku68=new JFormattedTextField(format);\r\n JFormattedTextField sudoku70=new JFormattedTextField(format);\r\n JFormattedTextField sudoku71=new JFormattedTextField(format);\r\n JTextField sudoku72=new JTextField();\r\n JFormattedTextField sudoku73=new JFormattedTextField(format);\r\n JFormattedTextField sudoku74=new JFormattedTextField(format);\r\n JFormattedTextField sudoku75=new JFormattedTextField(format);\r\n JFormattedTextField sudoku76=new JFormattedTextField(format);\r\n JFormattedTextField sudoku77=new JFormattedTextField(format);\r\n JFormattedTextField sudoku78=new JFormattedTextField(format);\r\n JTextField sudoku80=new JTextField();\r\n JFormattedTextField sudoku81=new JFormattedTextField(format);\r\n JFormattedTextField sudoku82=new JFormattedTextField(format);\r\n JTextField sudoku83=new JTextField();\r\n JFormattedTextField sudoku84=new JFormattedTextField(format);\r\n JTextField sudoku85=new JTextField();\r\n JFormattedTextField sudoku86=new JFormattedTextField(format);\r\n JFormattedTextField sudoku87=new JFormattedTextField(format);;\r\n JTextField sudoku88=new JTextField();\r\n\t\r\n\t//sudoku hints \r\n\tsudoku00.setText(\" 8\");\r\n sudoku00.setEditable(false);\r\n sudoku03.setText(\" 4\");\r\n sudoku03.setEditable(false);\r\n sudoku05.setText(\" 6\");\r\n sudoku05.setEditable(false);\r\n sudoku08.setText(\" 7\");\r\n sudoku08.setEditable(false);\r\n sudoku16.setText(\" 4\");\r\n sudoku16.setEditable(false);\r\n sudoku21.setText(\" 1\");\r\n sudoku21.setEditable(false);\r\n sudoku26.setText(\" 6\");\r\n sudoku26.setEditable(false);\r\n sudoku27.setText(\" 5\");\r\n sudoku27.setEditable(false);\r\n sudoku30.setText(\" 5\");\r\n sudoku30.setEditable(false);\r\n sudoku32.setText(\" 9\");\r\n sudoku32.setEditable(false);\r\n sudoku34.setText(\" 3\");\r\n sudoku34.setEditable(false);\r\n sudoku36.setText(\" 7\");\r\n sudoku36.setEditable(false);\r\n sudoku37.setText(\" 8\");\r\n sudoku37.setEditable(false);\r\n sudoku44.setText(\" 7\");\r\n sudoku44.setEditable(false);\r\n sudoku51.setText(\" 4\");\r\n sudoku51.setEditable(false);\r\n sudoku52.setText(\" 8\");\r\n sudoku52.setEditable(false);\r\n sudoku54.setText(\" 2\");\r\n sudoku54.setEditable(false);\r\n sudoku56.setText(\" 1\");\r\n sudoku56.setEditable(false);\r\n sudoku58.setText(\" 3\");\r\n sudoku58.setEditable(false);\r\n sudoku61.setText(\" 5\");\r\n sudoku61.setEditable(false);\r\n sudoku62.setText(\" 2\");\r\n sudoku62.setEditable(false);\r\n sudoku67.setText(\" 9\");\r\n sudoku67.setEditable(false);\r\n sudoku72.setText(\" 1\");\r\n sudoku72.setEditable(false);\r\n sudoku80.setText(\" 3\");\r\n sudoku80.setEditable(false);\r\n sudoku83.setText(\" 9\");\r\n sudoku83.setEditable(false);\r\n sudoku85.setText(\" 2\");\r\n sudoku85.setEditable(false);\r\n sudoku88.setText(\" 5\");\r\n sudoku88.setEditable(false);\r\n \r\n \r\n //Pasta image\r\n ImageIcon pastaIcon = new ImageIcon(\"Images/pasta.png\");\r\n JLabel pastaImage = new JLabel(pastaIcon);\r\n\r\n //Buttons\r\n JButton playButton = new JButton(\"Play\");\r\n JButton highScoreButton = new JButton(\"High Score\");\r\n JButton creditsButton = new JButton(\"Credits\");\r\n JButton backButtonCF = new JButton(\"Back\");\r\n JButton backButtonHS = new JButton(\"Back\");\r\n JButton skipButton = new JButton(\"Skip\");\r\n JButton endButton = new JButton(\"End\");\r\n JButton letterA = new JButton(\"A\");\r\n JButton letterB = new JButton(\"B\");\r\n JButton letterC = new JButton(\"C\");\r\n JButton letterD = new JButton(\"D\");\r\n JButton letterE = new JButton(\"E\");\r\n JButton letterF = new JButton(\"F\");\r\n JButton letterG = new JButton(\"G\");\r\n JButton letterH = new JButton(\"H\");\r\n JButton letterI = new JButton(\"I\");\r\n JButton letterJ = new JButton(\"J\");\r\n JButton letterK = new JButton(\"K\");\r\n JButton letterL = new JButton(\"L\");\r\n JButton letterM = new JButton(\"M\");\r\n JButton letterN = new JButton(\"N\");\r\n JButton letterO = new JButton(\"O\");\r\n JButton letterP = new JButton(\"P\");\r\n JButton letterQ = new JButton(\"Q\");\r\n JButton letterR = new JButton(\"R\");\r\n JButton letterS = new JButton(\"S\");\r\n JButton letterT = new JButton(\"T\");\r\n JButton letterU = new JButton(\"U\");\r\n JButton letterV = new JButton(\"V\");\r\n JButton letterW = new JButton(\"W\");\r\n JButton letterX = new JButton(\"X\");\r\n JButton letterY = new JButton(\"Y\");\r\n \tJButton letterZ = new JButton(\"Z\");\r\n \r\n RoundButton redButton = new RoundButton();\r\n RoundButton yellowButton = new RoundButton();\r\n RoundButton blueButton = new RoundButton();\r\n RoundButton greenButton = new RoundButton();\r\n RoundButton purpleButton = new RoundButton(); \r\n redButton.setBackground(Color.red);\r\n yellowButton.setBackground(Color.yellow);\r\n blueButton.setBackground(Color.blue);\r\n greenButton.setBackground(Color.green);\r\n purpleButton.setBackground(purple);\r\n \r\n JButton submit = new JButton(\"Submit\");\r\n\tJButton quit = new JButton(\"Quit\");\r\n \r\n //Tool Tips\r\n sudoku01.setToolTipText(\"Type in a number.\");\r\n sudoku02.setToolTipText(\"Type in a number.\");\r\n sudoku04.setToolTipText(\"Type in a number.\");\r\n sudoku06.setToolTipText(\"Type in a number.\");\r\n sudoku07.setToolTipText(\"Type in a number.\"); \r\n sudoku10.setToolTipText(\"Type in a number.\");\r\n sudoku11.setToolTipText(\"Type in a number.\");\r\n sudoku12.setToolTipText(\"Type in a number.\");\r\n sudoku13.setToolTipText(\"Type in a number.\");\r\n sudoku14.setToolTipText(\"Type in a number.\"); \r\n sudoku15.setToolTipText(\"Type in a number.\");\r\n sudoku17.setToolTipText(\"Type in a number.\");\r\n sudoku18.setToolTipText(\"Type in a number.\"); \r\n sudoku20.setToolTipText(\"Type in a number.\");\r\n sudoku22.setToolTipText(\"Type in a number.\");\r\n sudoku23.setToolTipText(\"Type in a number.\");\r\n sudoku24.setToolTipText(\"Type in a number.\");\r\n sudoku25.setToolTipText(\"Type in a number.\");\r\n sudoku28.setToolTipText(\"Type in a number.\"); \r\n sudoku31.setToolTipText(\"Type in a number.\");\r\n sudoku33.setToolTipText(\"Type in a number.\");\r\n sudoku35.setToolTipText(\"Type in a number.\");\r\n sudoku38.setToolTipText(\"Type in a number.\"); \r\n sudoku40.setToolTipText(\"Type in a number.\");\r\n sudoku41.setToolTipText(\"Type in a number.\");\r\n sudoku42.setToolTipText(\"Type in a number.\");\r\n sudoku43.setToolTipText(\"Type in a number.\");\r\n sudoku45.setToolTipText(\"Type in a number.\");\r\n sudoku46.setToolTipText(\"Type in a number.\");\r\n sudoku47.setToolTipText(\"Type in a number.\");\r\n sudoku48.setToolTipText(\"Type in a number.\"); \r\n sudoku50.setToolTipText(\"Type in a number.\");\r\n sudoku53.setToolTipText(\"Type in a number.\");\r\n sudoku55.setToolTipText(\"Type in a number.\");\r\n sudoku57.setToolTipText(\"Type in a number.\"); \r\n sudoku60.setToolTipText(\"Type in a number.\");\r\n sudoku63.setToolTipText(\"Type in a number.\");\r\n sudoku64.setToolTipText(\"Type in a number.\");\r\n sudoku65.setToolTipText(\"Type in a number.\");\r\n sudoku66.setToolTipText(\"Type in a number.\");\r\n sudoku68.setToolTipText(\"Type in a number.\"); \r\n sudoku70.setToolTipText(\"Type in a number.\");\r\n sudoku71.setToolTipText(\"Type in a number.\");\r\n sudoku73.setToolTipText(\"Type in a number.\");\r\n sudoku74.setToolTipText(\"Type in a number.\");\r\n sudoku75.setToolTipText(\"Type in a number.\");\r\n sudoku76.setToolTipText(\"Type in a number.\");\r\n sudoku77.setToolTipText(\"Type in a number.\");\r\n sudoku78.setToolTipText(\"Type in a number.\");\r\n sudoku81.setToolTipText(\"Type in a number.\");\r\n sudoku82.setToolTipText(\"Type in a number.\");\r\n sudoku84.setToolTipText(\"Type in a number.\");\r\n sudoku86.setToolTipText(\"Type in a number.\");\r\n sudoku87.setToolTipText(\"Type in a number.\");\r\n \r\n playButton.setToolTipText(\"Click to start games.\");\r\n highScoreButton.setToolTipText(\"Click to see high scores.\");\r\n creditsButton.setToolTipText(\"Click to see credits.\");\r\n backButtonCF.setToolTipText(\"Click to go back to menu.\");\r\n backButtonHS.setToolTipText(\"Click to go back to menu.\");\r\n skipButton.setToolTipText(\"Click to skip Hangman.\");\r\n endButton.setToolTipText(\"Click to leave score screen.\"); \r\n letterA.setToolTipText(\"Guess the letter 'A.'\");\r\n letterB.setToolTipText(\"Guess the letter 'B.'\");\r\n letterC.setToolTipText(\"Guess the letter 'C.'\");\r\n letterD.setToolTipText(\"Guess the letter 'D.'\");\r\n letterE.setToolTipText(\"Guess the letter 'E.'\");\r\n letterF.setToolTipText(\"Guess the letter 'F.'\");\r\n letterG.setToolTipText(\"Guess the letter 'G.'\");\r\n letterH.setToolTipText(\"Guess the letter 'H.'\");\r\n letterI.setToolTipText(\"Guess the letter 'I.'\");\r\n letterJ.setToolTipText(\"Guess the letter 'J.'\");\r\n letterK.setToolTipText(\"Guess the letter 'K.'\");\r\n letterL.setToolTipText(\"Guess the letter 'L.'\");\r\n letterM.setToolTipText(\"Guess the letter 'M.'\");\r\n letterN.setToolTipText(\"Guess the letter 'N.'\");\r\n letterO.setToolTipText(\"Guess the letter 'O.'\");\r\n letterP.setToolTipText(\"Guess the letter 'P.'\");\r\n letterQ.setToolTipText(\"Guess the letter 'Q.'\");\r\n letterR.setToolTipText(\"Guess the letter 'R.'\");\r\n letterS.setToolTipText(\"Guess the letter 'S.'\");\r\n letterT.setToolTipText(\"Guess the letter 'T.'\");\r\n letterU.setToolTipText(\"Guess the letter 'U.'\");\r\n letterV.setToolTipText(\"Guess the letter 'V.'\");\r\n letterW.setToolTipText(\"Guess the letter 'W.'\");\r\n letterX.setToolTipText(\"Guess the letter 'X.'\");\r\n letterY.setToolTipText(\"Guess the letter 'Y.'\");\r\n letterZ.setToolTipText(\"Guess the letter 'Z.'\");\r\n redButton.setToolTipText(\"Press to submit red.\");\r\n yellowButton.setToolTipText(\"Press to submit yellow.\");\r\n blueButton.setToolTipText(\"Press to submit blue.\");\r\n greenButton.setToolTipText(\"Press to submit green.\");\r\n purpleButton.setToolTipText(\"Press to submit purple.\");\r\n submit.setToolTipText(\"Submit Sudoku board as answer.\");\r\n quit.setToolTipText(\"Quit Sudoku without submitting.\"); \r\n \r\n //setting margins\r\n letterA.setMargin(new Insets(0, 0, 0, 0));\r\n letterB.setMargin(new Insets(0, 0, 0, 0));\r\n letterC.setMargin(new Insets(0, 0, 0, 0));\r\n letterD.setMargin(new Insets(0, 0, 0, 0));\r\n letterE.setMargin(new Insets(0, 0, 0, 0));\r\n letterF.setMargin(new Insets(0, 0, 0, 0));\r\n letterG.setMargin(new Insets(0, 0, 0, 0));\r\n letterH.setMargin(new Insets(0, 0, 0, 0));\r\n letterI.setMargin(new Insets(0, 0, 0, 0));\r\n letterJ.setMargin(new Insets(0, 0, 0, 0));\r\n letterK.setMargin(new Insets(0, 0, 0, 0));\r\n letterL.setMargin(new Insets(0, 0, 0, 0));\r\n letterM.setMargin(new Insets(0, 0, 0, 0));\r\n letterN.setMargin(new Insets(0, 0, 0, 0));\r\n letterO.setMargin(new Insets(0, 0, 0, 0));\r\n letterP.setMargin(new Insets(0, 0, 0, 0));\r\n letterQ.setMargin(new Insets(0, 0, 0, 0));\r\n letterR.setMargin(new Insets(0, 0, 0, 0));\r\n letterS.setMargin(new Insets(0, 0, 0, 0));\r\n letterT.setMargin(new Insets(0, 0, 0, 0));\r\n letterU.setMargin(new Insets(0, 0, 0, 0));\r\n letterV.setMargin(new Insets(0, 0, 0, 0));\r\n letterW.setMargin(new Insets(0, 0, 0, 0));\r\n letterX.setMargin(new Insets(0, 0, 0, 0));\r\n letterY.setMargin(new Insets(0, 0, 0, 0));\r\n letterZ.setMargin(new Insets(0, 0, 0, 0));\r\n \r\n //Positioning \r\n \r\n bubbleText.setBounds(350,-10,500,100);\r\n bubbleGameTitle.setBounds(25,-10,500,100); \r\n skipButton.setBounds(400,100,100,30);\r\n answerText.setBounds(150,175,300,100);\r\n\tsudokuTitle.setBounds(25,-10,300,100);\r\n letterA.setBounds(40,275,30,30);\r\n letterB.setBounds(80,275,30,30);\r\n letterC.setBounds(120,275,30,30);\r\n letterD.setBounds(160,275,30,30);\r\n letterE.setBounds(200,275,30,30);\r\n letterF.setBounds(240,275,30,30);\r\n letterG.setBounds(280,275,30,30);\r\n letterH.setBounds(320,275,30,30);\r\n letterI.setBounds(360,275,30,30);\r\n letterJ.setBounds(400,275,30,30);\r\n letterK.setBounds(440,275,30,30);\r\n letterL.setBounds(480,275,30,30);\r\n letterM.setBounds(520,275,30,30);\r\n letterN.setBounds(40,310,30,30);\r\n letterO.setBounds(80,310,30,30);\r\n letterP.setBounds(120,310,30,30);\r\n letterQ.setBounds(160,310,30,30);\r\n letterR.setBounds(200,310,30,30);\r\n letterS.setBounds(240,310,30,30);\r\n letterT.setBounds(280,310,30,30);\r\n letterU.setBounds(320,310,30,30);\r\n letterV.setBounds(360,310,30,30);\r\n letterW.setBounds(400,310,30,30);\r\n letterX.setBounds(440,310,30,30);\r\n letterY.setBounds(480,310,30,30);\r\n letterZ.setBounds(520,310,30,30); \r\n\t \r\n redButton.setBounds(50,230,100,100); //sizes here don't matter\r\n yellowButton.setBounds(450,190,100,100);\r\n blueButton.setBounds(290,100,100,100);\r\n greenButton.setBounds(235,250,100,100);\r\n purpleButton.setBounds(120,90,100,100);\r\n redButton.setDiameter(100); //this sets the button size\r\n yellowButton.setDiameter(100);\r\n blueButton.setDiameter(100);\r\n greenButton.setDiameter(100);\r\n purpleButton.setDiameter(100);\r\n\t \r\n\tsubmit.setBounds(35,310,100,30);\r\n\tquit.setBounds(465,310,100,30);\r\n sudoku00.setBounds(155,65,30,30);\r\n sudoku01.setBounds(185,65,30,30);\r\n sudoku02.setBounds(215,65,30,30);\r\n sudoku03.setBounds(245,65,30,30);\r\n sudoku04.setBounds(275,65,30,30);\r\n sudoku05.setBounds(305,65,30,30);\r\n sudoku06.setBounds(335,65,30,30);\r\n sudoku07.setBounds(365,65,30,30);\r\n sudoku08.setBounds(395,65,30,30);\r\n sudoku10.setBounds(155,95,30,30);\r\n sudoku11.setBounds(185,95,30,30);\r\n sudoku12.setBounds(215,95,30,30);\r\n sudoku13.setBounds(245,95,30,30);\r\n sudoku14.setBounds(275,95,30,30);\r\n sudoku15.setBounds(305,95,30,30);\r\n sudoku16.setBounds(335,95,30,30);\r\n sudoku17.setBounds(365,95,30,30);\r\n sudoku18.setBounds(395,95,30,30);\r\n sudoku20.setBounds(155,125,30,30);\r\n sudoku21.setBounds(185,125,30,30);\r\n sudoku22.setBounds(215,125,30,30);\r\n sudoku23.setBounds(245,125,30,30);\r\n sudoku24.setBounds(275,125,30,30);\r\n sudoku25.setBounds(305,125,30,30);\r\n sudoku26.setBounds(335,125,30,30);\r\n sudoku27.setBounds(365,125,30,30);\r\n sudoku28.setBounds(395,125,30,30);\r\n sudoku30.setBounds(155,155,30,30);\r\n sudoku31.setBounds(185,155,30,30);\r\n sudoku32.setBounds(215,155,30,30);\r\n sudoku33.setBounds(245,155,30,30);\r\n sudoku34.setBounds(275,155,30,30);\r\n sudoku35.setBounds(305,155,30,30);\r\n sudoku36.setBounds(335,155,30,30);\r\n sudoku37.setBounds(365,155,30,30);\r\n sudoku38.setBounds(395,155,30,30);\r\n sudoku40.setBounds(155,185,30,30);\r\n sudoku41.setBounds(185,185,30,30);\r\n sudoku42.setBounds(215,185,30,30);\r\n sudoku43.setBounds(245,185,30,30);\r\n sudoku44.setBounds(275,185,30,30);\r\n sudoku45.setBounds(305,185,30,30);\r\n sudoku46.setBounds(335,185,30,30);\r\n sudoku47.setBounds(365,185,30,30);\r\n sudoku48.setBounds(395,185,30,30);\r\n sudoku50.setBounds(155,215,30,30);\r\n sudoku51.setBounds(185,215,30,30);\r\n sudoku52.setBounds(215,215,30,30);\r\n sudoku53.setBounds(245,215,30,30);\r\n sudoku54.setBounds(275,215,30,30);\r\n sudoku55.setBounds(305,215,30,30);\r\n sudoku56.setBounds(335,215,30,30);\r\n sudoku57.setBounds(365,215,30,30);\r\n sudoku58.setBounds(395,215,30,30);\r\n sudoku60.setBounds(155,245,30,30);\r\n sudoku61.setBounds(185,245,30,30);\r\n sudoku62.setBounds(215,245,30,30);\r\n sudoku63.setBounds(245,245,30,30);\r\n sudoku64.setBounds(275,245,30,30);\r\n sudoku65.setBounds(305,245,30,30);\r\n sudoku66.setBounds(335,245,30,30);\r\n sudoku67.setBounds(365,245,30,30);\r\n sudoku68.setBounds(395,245,30,30);\r\n sudoku70.setBounds(155,275,30,30);\r\n sudoku71.setBounds(185,275,30,30);\r\n sudoku72.setBounds(215,275,30,30);\r\n sudoku73.setBounds(245,275,30,30);\r\n sudoku74.setBounds(275,275,30,30);\r\n sudoku75.setBounds(305,275,30,30);\r\n sudoku76.setBounds(335,275,30,30);\r\n sudoku77.setBounds(365,275,30,30);\r\n sudoku78.setBounds(395,275,30,30);\r\n sudoku80.setBounds(155,305,30,30);\r\n sudoku81.setBounds(185,305,30,30);\r\n sudoku82.setBounds(215,305,30,30);\r\n sudoku83.setBounds(245,305,30,30);\r\n sudoku84.setBounds(275,305,30,30);\r\n sudoku85.setBounds(305,305,30,30);\r\n sudoku86.setBounds(335,305,30,30);\r\n sudoku87.setBounds(365,305,30,30);\r\n sudoku88.setBounds(395,305,30,30);\r\n \r\n \r\n \r\n //Title Page uses BoxLayout\r\n titlePg.setBackground(new Color(255,255,200)); //rgb\r\n titlePg.setLayout(new BoxLayout(titlePg, BoxLayout.Y_AXIS));\r\n titleText.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n titlePg.add(Box.createRigidArea(new Dimension(0,25)));\r\n titlePg.add(titleText);\r\n titlePg.add(Box.createVerticalGlue()); //sticks elements at bottom\r\n teamText.setBorder(BorderFactory.createEmptyBorder(0, 0, 50, 0)); //to add padding, U L D R\r\n teamText.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n titlePg.add(teamText);\r\n \r\n \r\n //Menu Page uses BorderLayout \r\n //with internal panels for additional formatting\r\n menuPg.setBackground(new Color(255,200,175)); //rgb\r\n menuPg.setLayout(new BorderLayout());\r\n menuPg.add(pastaImage, BorderLayout.CENTER);\r\n \r\n JPanel menuButtons = new JPanel();\r\n menuButtons.setBackground(new Color(255,200,175)); //rgb\r\n menuButtons.setLayout(new BoxLayout(menuButtons, BoxLayout.Y_AXIS));\r\n menuButtons.add(Box.createVerticalGlue()); //sticks elements at bottom\r\n playButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n highScoreButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n creditsButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n menuButtons.add(playButton);\r\n menuButtons.add(Box.createRigidArea(new Dimension(250,10))); //creates padding\r\n menuButtons.add(highScoreButton);\r\n menuButtons.add(Box.createRigidArea(new Dimension(25,10))); //creates padding\r\n menuButtons.add(creditsButton);\r\n menuButtons.add(Box.createRigidArea(new Dimension(25,100))); //creates padding\r\n menuPg.add(menuButtons, BorderLayout.EAST);\r\n \r\n //Credits Page uses boxlayout\r\n creditsPg.setLayout(new BoxLayout(creditsPg, BoxLayout.Y_AXIS));\r\n titleCredit.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n jennaBarrett.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n lennyYang.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n rachelFrodsham.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n backButtonCF.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n creditsPg.add(Box.createRigidArea(new Dimension(0,25)));\r\n creditsPg.add(titleCredit);\r\n creditsPg.add(Box.createRigidArea(new Dimension(0,50)));\r\n creditsPg.add(jennaBarrett);\r\n creditsPg.add(lennyYang);\r\n creditsPg.add(rachelFrodsham);\r\n creditsPg.add(Box.createRigidArea(new Dimension(0,150)));\r\n creditsPg.add(backButtonCF);\r\n \r\n //High Score Page uses boxlayout\r\n highScorePg.setLayout(new BorderLayout());\r\n highScTitle.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n// highScores.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n highScTitle.setBorder(BorderFactory.createEmptyBorder(5, 250, 0, 0));\r\n highScores.setBorder(BorderFactory.createEmptyBorder(0, 260, 0, 0));\r\n backButtonHS.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n// highScorePg.add(Box.createRigidArea(new Dimension(0,25)));\r\n highScorePg.add(highScTitle, BorderLayout.NORTH);\r\n highScorePg.add(highScores, BorderLayout.CENTER);\r\n highScorePg.add(backButtonHS, BorderLayout.SOUTH);\r\n \r\n //Game Page uses borderlayout with flowlayout for top\r\n gamePg.setLayout(new BorderLayout());\r\n JPanel top = new JPanel();\r\n time.setBorder(BorderFactory.createEmptyBorder(0, 200, 0, 10)); //to add padding, U L D R\r\n scoreToDisplay.setBorder(BorderFactory.createEmptyBorder(0, 0, 300, 0)); //to add padding, U L D R\r\n top.add(hangmanTitle);\r\n top.add(time);\r\n gamePg.add(scoreToDisplay, BorderLayout.EAST);\r\n gamePg.add(scoreText);\r\n gamePg.add(skipButton);\r\n gamePg.add(top, BorderLayout.NORTH);\r\n gamePg.add(answerText);\r\n gamePg.add(letterA);\r\n gamePg.add(letterB);\r\n gamePg.add(letterC);\r\n gamePg.add(letterD);\r\n gamePg.add(letterE);\r\n gamePg.add(letterF);\r\n gamePg.add(letterG);\r\n gamePg.add(letterH);\r\n gamePg.add(letterI);\r\n gamePg.add(letterJ);\r\n gamePg.add(letterK);\r\n gamePg.add(letterL);\r\n gamePg.add(letterM);\r\n gamePg.add(letterN);\r\n gamePg.add(letterO);\r\n gamePg.add(letterP);\r\n gamePg.add(letterQ);\r\n gamePg.add(letterR);\r\n gamePg.add(letterS);\r\n gamePg.add(letterT);\r\n gamePg.add(letterU);\r\n gamePg.add(letterV);\r\n gamePg.add(letterW);\r\n gamePg.add(letterX);\r\n gamePg.add(letterY);\r\n gamePg.add(letterZ);\r\n gamePg.add(pp);\r\n\r\n\t//Bubble Game page\r\n bubblePg.setLayout(null);\r\n bubblePg.add(bubbleGameTitle);\r\n bubblePg.add(bubbleText);\r\n bubblePg.add(redButton);\r\n bubblePg.add(yellowButton);\r\n bubblePg.add(blueButton);\r\n bubblePg.add(greenButton);\r\n bubblePg.add(purpleButton);\r\n\tscoreToDisplay.setText(String.valueOf(currentScore));\r\n\tscoreToDisplay.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); //gets rid of earlier padding\r\n\tscoreToDisplay.setLocation(550, 10);\r\n bubblePg.add(scoreToDisplay);\r\n\t \r\n\t//Sudoku page\r\n sudokuPg.setLayout(null);\r\n\tsudokuPg.add(sudokuTitle);\r\n\tsudokuPg.add(submit);\r\n\tsudokuPg.add(quit);\r\n sudokuPg.add(sudoku00);\r\n sudokuPg.add(sudoku01);\r\n sudokuPg.add(sudoku02);\r\n sudokuPg.add(sudoku03);\r\n sudokuPg.add(sudoku04);\r\n sudokuPg.add(sudoku05);\r\n sudokuPg.add(sudoku06);\r\n sudokuPg.add(sudoku07);\r\n sudokuPg.add(sudoku08);\r\n sudokuPg.add(sudoku10);\r\n sudokuPg.add(sudoku11);\r\n sudokuPg.add(sudoku12);\r\n sudokuPg.add(sudoku13);\r\n sudokuPg.add(sudoku14);\r\n sudokuPg.add(sudoku15);\r\n sudokuPg.add(sudoku16);\r\n sudokuPg.add(sudoku17);\r\n sudokuPg.add(sudoku18);\r\n sudokuPg.add(sudoku20);\r\n sudokuPg.add(sudoku21);\r\n sudokuPg.add(sudoku22);\r\n sudokuPg.add(sudoku23);\r\n sudokuPg.add(sudoku24);\r\n sudokuPg.add(sudoku25);\r\n sudokuPg.add(sudoku26);\r\n sudokuPg.add(sudoku27);\r\n sudokuPg.add(sudoku28);\r\n sudokuPg.add(sudoku30);\r\n sudokuPg.add(sudoku31);\r\n sudokuPg.add(sudoku32);\r\n sudokuPg.add(sudoku33);\r\n sudokuPg.add(sudoku34);\r\n sudokuPg.add(sudoku35);\r\n sudokuPg.add(sudoku36);\r\n sudokuPg.add(sudoku37);\r\n sudokuPg.add(sudoku38);\r\n sudokuPg.add(sudoku40);\r\n sudokuPg.add(sudoku41);\r\n sudokuPg.add(sudoku42);\r\n sudokuPg.add(sudoku43);\r\n sudokuPg.add(sudoku44);\r\n sudokuPg.add(sudoku45);\r\n sudokuPg.add(sudoku46);\r\n sudokuPg.add(sudoku47);\r\n sudokuPg.add(sudoku48);\r\n sudokuPg.add(sudoku50);\r\n sudokuPg.add(sudoku51);\r\n sudokuPg.add(sudoku52);\r\n sudokuPg.add(sudoku53);\r\n sudokuPg.add(sudoku54);\r\n sudokuPg.add(sudoku55);\r\n sudokuPg.add(sudoku56);\r\n sudokuPg.add(sudoku57);\r\n sudokuPg.add(sudoku58);\r\n sudokuPg.add(sudoku60);\r\n sudokuPg.add(sudoku61);\r\n sudokuPg.add(sudoku62);\r\n sudokuPg.add(sudoku63);\r\n sudokuPg.add(sudoku64);\r\n sudokuPg.add(sudoku65);\r\n sudokuPg.add(sudoku66);\r\n sudokuPg.add(sudoku67);\r\n sudokuPg.add(sudoku68);\r\n sudokuPg.add(sudoku70);\r\n sudokuPg.add(sudoku71);\r\n sudokuPg.add(sudoku72);\r\n sudokuPg.add(sudoku73);\r\n sudokuPg.add(sudoku74);\r\n sudokuPg.add(sudoku75);\r\n sudokuPg.add(sudoku76);\r\n sudokuPg.add(sudoku77);\r\n sudokuPg.add(sudoku78);\r\n sudokuPg.add(sudoku80);\r\n sudokuPg.add(sudoku81);\r\n sudokuPg.add(sudoku82);\r\n sudokuPg.add(sudoku83);\r\n sudokuPg.add(sudoku84);\r\n sudokuPg.add(sudoku85);\r\n sudokuPg.add(sudoku86);\r\n sudokuPg.add(sudoku87);\r\n sudokuPg.add(sudoku88);\r\n\tPaintSudoku ps = new PaintSudoku();\r\n\tsudokuPg.add(ps);\r\n\tscoreToDisplay.setText(String.valueOf(currentScore));\r\n\tsudokuPg.add(scoreToDisplay);\r\n \r\n //Score Page uses BoxLayout\r\n scorePg.setLayout(new BoxLayout(scorePg, BoxLayout.Y_AXIS));\r\n yourScTitle.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n scoreText.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n highScoreName.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n endButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n scorePg.add(yourScTitle);\r\n scorePg.add(Box.createRigidArea(new Dimension(0,100))); //creates padding\r\n scorePg.add(highScoreName);\r\n scorePg.add(scoreText);\r\n scorePg.add(Box.createRigidArea(new Dimension(0,125))); //creates padding\r\n scorePg.add(endButton);\r\n \r\n \r\n //Pages and Frame Set Up\r\n pages.add(titlePg, \"titlePg\"); //the string is the label of the page, can be anything\r\n pages.add(menuPg, \"menuPg\"); //but was set to the variable name to stay simple\r\n pages.add(creditsPg, \"creditsPg\");\r\n pages.add(highScorePg, \"highScorePg\");\r\n pages.add(gamePg, \"gamePg\");\r\n pages.add(scorePg, \"scorePg\");\r\n pages.add(bubblePg, \"bubblePg\");\r\n\tpages.add(sudokuPg, \"sudokuPg\");\r\n cl.show(pages, \"titlePg\"); //first page shown is title page\r\n \r\n mainFr.add(pages);\r\n mainFr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n mainFr.setSize(600, 400);\r\n mainFr.setLocationRelativeTo(null);\r\n mainFr.setVisible(true);\r\n \r\n\r\n //Listeners\r\n new java.util.Timer().schedule(\r\n new java.util.TimerTask() {\r\n @Override\r\n public void run() {\r\n cl.show(pages, \"menuPg\"); //switches to menu\r\n }\r\n },\r\n 4500\r\n );\r\n\r\n highScoreButton.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n cl.show(pages, \"highScorePg\");\r\n }\r\n });\r\n\r\n playButton.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n cl.show(pages, \"gamePg\");\r\n }\r\n });\r\n\r\n creditsButton.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n cl.show(pages, \"creditsPg\");\r\n }\r\n });\r\n\r\n backButtonCF.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n cl.show(pages, \"menuPg\");\r\n }\r\n });\r\n\r\n backButtonHS.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n cl.show(pages, \"menuPg\");\r\n }\r\n });\r\n\r\n skipButton.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n currentScore = 0;\r\n cl.show(pages, \"bubblePg\");\r\n \r\n Random rand = new Random();\r\n int value = rand.nextInt(5);\r\n\r\n //choosing a word\r\n answer = wordBank[value];\r\n\r\n displayedAnswer = \"\";\r\n for (int i = 0; i < answer.length(); i++) {\r\n displayedAnswer = displayedAnswer + \"_ \";\r\n }\r\n letterA.setEnabled(true);\r\n letterB.setEnabled(true);\r\n letterC.setEnabled(true);\r\n letterD.setEnabled(true);\r\n letterE.setEnabled(true);\r\n letterF.setEnabled(true);\r\n letterG.setEnabled(true);\r\n letterH.setEnabled(true);\r\n letterI.setEnabled(true);\r\n letterJ.setEnabled(true);\r\n letterK.setEnabled(true);\r\n letterL.setEnabled(true);\r\n letterM.setEnabled(true);\r\n letterN.setEnabled(true);\r\n letterO.setEnabled(true);\r\n letterP.setEnabled(true);\r\n letterQ.setEnabled(true);\r\n letterR.setEnabled(true);\r\n letterS.setEnabled(true);\r\n letterT.setEnabled(true);\r\n letterU.setEnabled(true);\r\n letterV.setEnabled(true);\r\n letterW.setEnabled(true);\r\n letterX.setEnabled(true);\r\n letterY.setEnabled(true);\r\n letterZ.setEnabled(true);\r\n\r\n }\r\n });\r\n\r\n endButton.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e){\r\n cl.show(pages, \"menuPg\");\r\n if (currentScore != 0){\r\n String hSN = highScoreName.getText(); \r\n String combinedScore = hSN + \" \" + currentScore;\r\n try {\r\n writeHighScore(\"highscores.txt\", combinedScore);\r\n } catch (IOException ex) {\r\n Logger.getLogger(Hangman.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n currentScore = 100;\r\n }\r\n });\r\n\t quit.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n\t\tsudoku01.setText(\"\");\r\n \tsudoku02.setText(\"\");\r\n \t\tsudoku04.setText(\"\");\r\n \t \tsudoku06.setText(\"\");\r\n \t \tsudoku07.setText(\"\"); \r\n \t \tsudoku10.setText(\"\");\r\n \t \tsudoku11.setText(\"\");\r\n \t \tsudoku12.setText(\"\");\r\n \t \tsudoku13.setText(\"\");\r\n \t \tsudoku14.setText(\"\"); \r\n \tsudoku15.setText(\"\");\r\n \tsudoku17.setText(\"\");\r\n \tsudoku18.setText(\"\"); \r\n \t \tsudoku20.setText(\"\");\r\n \tsudoku22.setText(\"\");\r\n \tsudoku23.setText(\"\");\r\n \tsudoku24.setText(\"\");\r\n \tsudoku25.setText(\"\");\r\n \tsudoku28.setText(\"\"); \r\n \tsudoku31.setText(\"\");\r\n \tsudoku33.setText(\"\");\r\n \tsudoku35.setText(\"\");\r\n \tsudoku38.setText(\"\"); \r\n \tsudoku40.setText(\"\");\r\n \tsudoku41.setText(\"\");\r\n \tsudoku42.setText(\"\");\r\n \tsudoku43.setText(\"\");\r\n \tsudoku45.setText(\"\");\r\n \tsudoku46.setText(\"\");\r\n \tsudoku47.setText(\"\");\r\n \tsudoku48.setText(\"\"); \r\n \tsudoku50.setText(\"\");\r\n \tsudoku53.setText(\"\");\r\n \tsudoku55.setText(\"\");\r\n \tsudoku57.setText(\"\"); \r\n \tsudoku60.setText(\"\");\r\n \tsudoku63.setText(\"\");\r\n \tsudoku64.setText(\"\");\r\n \tsudoku65.setText(\"\");\r\n \tsudoku66.setText(\"\");\r\n \tsudoku68.setText(\"\"); \r\n \tsudoku70.setText(\"\");\r\n \tsudoku71.setText(\"\");\r\n \tsudoku73.setText(\"\");\r\n \tsudoku74.setText(\"\");\r\n \tsudoku75.setText(\"\");\r\n \tsudoku76.setText(\"\");\r\n \tsudoku77.setText(\"\");\r\n \tsudoku78.setText(\"\");\r\n \tsudoku81.setText(\"\");\r\n \tsudoku82.setText(\"\");\r\n \tsudoku84.setText(\"\");\r\n \tsudoku86.setText(\"\");\r\n \tsudoku87.setText(\"\");\r\n cl.show(pages, \"scorePg\");\r\n }\r\n });\r\n\r\n\r\n //LETTERS\r\n letterA.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterA.setEnabled(false);\r\n if (answer.contains(\"a\")) {\r\n rightAnswer('a');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterB.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterB.setEnabled(false);\r\n if (answer.contains(\"b\")) {\r\n rightAnswer('b');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterC.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterC.setEnabled(false);\r\n if (answer.contains(\"c\")) {\r\n rightAnswer('c');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterD.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterD.setEnabled(false);\r\n if (answer.contains(\"d\")) {\r\n rightAnswer('d');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterE.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterE.setEnabled(false);\r\n if (answer.contains(\"e\")) {\r\n rightAnswer('e');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n letterF.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterF.setEnabled(false);\r\n if (answer.contains(\"f\")) {\r\n rightAnswer('f');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n letterG.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterG.setEnabled(false);\r\n if (answer.contains(\"g\")) {\r\n rightAnswer('g');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n letterH.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterH.setEnabled(false);\r\n if (answer.contains(\"h\")) {\r\n rightAnswer('h');\r\n } \r\n else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n letterI.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterI.setEnabled(false);\r\n if (answer.contains(\"i\")) {\r\n rightAnswer('i');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterJ.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterJ.setEnabled(false);\r\n if (answer.contains(\"j\")) {\r\n rightAnswer('j');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n \r\n }\r\n }\r\n });\r\n\r\n letterK.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterK.setEnabled(false);\r\n if (answer.contains(\"k\")) {\r\n rightAnswer('k');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterL.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterL.setEnabled(false);\r\n if (answer.contains(\"l\")) {\r\n rightAnswer('l');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterM.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterM.setEnabled(false);\r\n if (answer.contains(\"m\")) {\r\n rightAnswer('m');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterN.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterN.setEnabled(false);\r\n if (answer.contains(\"n\")) {\r\n rightAnswer('n');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterO.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterO.setEnabled(false);\r\n if (answer.contains(\"o\")) {\r\n rightAnswer('o');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterP.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterP.setEnabled(false);\r\n if (answer.contains(\"p\")) {\r\n rightAnswer('p');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterQ.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterQ.setEnabled(false);\r\n if (answer.contains(\"q\")) {\r\n rightAnswer('q');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterR.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterR.setEnabled(false);\r\n if (answer.contains(\"r\")) {\r\n rightAnswer('r');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterS.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterS.setEnabled(false);\r\n if (answer.contains(\"s\")) {\r\n rightAnswer('s');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterT.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterT.setEnabled(false);\r\n if (answer.contains(\"t\")) {\r\n rightAnswer('t');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterU.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterU.setEnabled(false);\r\n if (answer.contains(\"u\")) {\r\n rightAnswer('u');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterV.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterV.setEnabled(false);\r\n if (answer.contains(\"v\")) {\r\n rightAnswer('v');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterW.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterW.setEnabled(false);\r\n if (answer.contains(\"w\")) {\r\n rightAnswer('w');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterX.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterX.setEnabled(false);\r\n if (answer.contains(\"x\")) {\r\n rightAnswer('x');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterY.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterY.setEnabled(false);\r\n if (answer.contains(\"y\")) {\r\n rightAnswer('y');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n\r\n letterZ.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n letterZ.setEnabled(false);\r\n if (answer.contains(\"z\")) {\r\n rightAnswer('z');\r\n } else {\r\n currentScore -= 10;\r\n pp.repaint(0, 100, 25, 260, 135);\r\n }\r\n }\r\n });\r\n \r\n redButton.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n bubbleRound++;\r\n if (color2.equals(\"Red\")){\r\n currentScore +=100;\r\n }\r\n colorValue = randColor.nextInt(5);\r\n color = colors[colorValue];\r\n colorValue = randColor.nextInt(5);\r\n color2 = colors[colorValue];\r\n if(color.equals(color2)){\r\n colorValue = randColor.nextInt(5);\r\n color2 = colors[colorValue];\r\n }\r\n bubbleText.setText(color);\r\n switch(color2){\r\n case \"Red\":{\r\n bubbleText.setForeground(Color.red);\r\n break;\r\n }\r\n case \"Yellow\":{\r\n bubbleText.setForeground(Color.yellow);\r\n break;\r\n }\r\n case \"Blue\":{\r\n bubbleText.setForeground(Color.blue);\r\n break;\r\n }\r\n case \"Green\":{\r\n bubbleText.setForeground(Color.green);\r\n break;\r\n }\r\n case \"Purple\":{\r\n bubbleText.setForeground(purple);\r\n break;\r\n }\r\n }\r\n Random rand = new Random();\r\n int value = rand.nextInt(5);\r\n \r\n redButton.setBounds(coordinates[value][0],coordinates[value][1],100,100);\r\n yellowButton.setBounds(coordinates[value][2],coordinates[value][3],100,100);\r\n blueButton.setBounds(coordinates[value][4],coordinates[value][5],100,100);\r\n greenButton.setBounds(coordinates[value][6],coordinates[value][7],100,100);\r\n purpleButton.setBounds(coordinates[value][8],coordinates[value][9],100,100);\r\n \r\n if (bubbleRound == 5){\r\n cl.show(pages, \"sudokuPg\");\r\n bubbleRound = 0;\r\n }\r\n }\r\n });\r\n \r\n yellowButton.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n bubbleRound++;\r\n if (color2.equals(\"Yellow\")){\r\n currentScore +=100;\r\n }\r\n colorValue = randColor.nextInt(5);\r\n color = colors[colorValue];\r\n colorValue = randColor.nextInt(5);\r\n color2 = colors[colorValue];\r\n if(color.equals(color2)){\r\n colorValue = randColor.nextInt(5);\r\n color2 = colors[colorValue];\r\n }\r\n bubbleText.setText(color);\r\n switch(color2){\r\n case \"Red\":{\r\n bubbleText.setForeground(Color.red);\r\n break;\r\n }\r\n case \"Yellow\":{\r\n bubbleText.setForeground(Color.yellow);\r\n break;\r\n }\r\n case \"Blue\":{\r\n bubbleText.setForeground(Color.blue);\r\n break;\r\n }\r\n case \"Green\":{\r\n bubbleText.setForeground(Color.green);\r\n break;\r\n }\r\n case \"Purple\":{\r\n bubbleText.setForeground(purple);\r\n break;\r\n }\r\n }\r\n Random rand = new Random();\r\n int value = rand.nextInt(5);\r\n \r\n redButton.setBounds(coordinates[value][0],coordinates[value][1],100,100);\r\n yellowButton.setBounds(coordinates[value][2],coordinates[value][3],100,100);\r\n blueButton.setBounds(coordinates[value][4],coordinates[value][5],100,100);\r\n greenButton.setBounds(coordinates[value][6],coordinates[value][7],100,100);\r\n purpleButton.setBounds(coordinates[value][8],coordinates[value][9],100,100);\r\n \r\n if (bubbleRound == 5){\r\n cl.show(pages, \"sudokuPg\");\r\n bubbleRound = 0;\r\n }\r\n }\r\n });\r\n \r\n blueButton.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n bubbleRound++;\r\n if (color2.equals(\"Blue\")){\r\n currentScore +=100;\r\n }\r\n colorValue = randColor.nextInt(5);\r\n color = colors[colorValue];\r\n colorValue = randColor.nextInt(5);\r\n color2 = colors[colorValue];\r\n if(color.equals(color2)){\r\n colorValue = randColor.nextInt(5);\r\n color2 = colors[colorValue];\r\n }\r\n bubbleText.setText(color);\r\n switch(color2){\r\n case \"Red\":{\r\n bubbleText.setForeground(Color.red);\r\n break;\r\n }\r\n case \"Yellow\":{\r\n bubbleText.setForeground(Color.yellow);\r\n break;\r\n }\r\n case \"Blue\":{\r\n bubbleText.setForeground(Color.blue);\r\n break;\r\n }\r\n case \"Green\":{\r\n bubbleText.setForeground(Color.green);\r\n break;\r\n }\r\n case \"Purple\":{\r\n bubbleText.setForeground(purple);\r\n break;\r\n }\r\n }\r\n Random rand = new Random();\r\n int value = rand.nextInt(5);\r\n \r\n redButton.setBounds(coordinates[value][0],coordinates[value][1],100,100);\r\n yellowButton.setBounds(coordinates[value][2],coordinates[value][3],100,100);\r\n blueButton.setBounds(coordinates[value][4],coordinates[value][5],100,100);\r\n greenButton.setBounds(coordinates[value][6],coordinates[value][7],100,100);\r\n purpleButton.setBounds(coordinates[value][8],coordinates[value][9],100,100);\r\n \r\n if (bubbleRound == 5){\r\n cl.show(pages, \"sudokuPg\");\r\n bubbleRound = 0;\r\n }\r\n }\r\n });\r\n \r\n greenButton.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n bubbleRound++;\r\n if (color2.equals(\"Green\")){\r\n currentScore +=100;\r\n }\r\n colorValue = randColor.nextInt(5);\r\n color = colors[colorValue];\r\n colorValue = randColor.nextInt(5);\r\n color2 = colors[colorValue];\r\n if(color.equals(color2)){\r\n colorValue = randColor.nextInt(5);\r\n color2 = colors[colorValue];\r\n }\r\n bubbleText.setText(color);\r\n switch(color2){\r\n case \"Red\":{\r\n bubbleText.setForeground(Color.red);\r\n break;\r\n }\r\n case \"Yellow\":{\r\n bubbleText.setForeground(Color.yellow);\r\n break;\r\n }\r\n case \"Blue\":{\r\n bubbleText.setForeground(Color.blue);\r\n break;\r\n }\r\n case \"Green\":{\r\n bubbleText.setForeground(Color.green);\r\n break;\r\n }\r\n case \"Purple\":{\r\n bubbleText.setForeground(purple);\r\n break;\r\n }\r\n }\r\n Random rand = new Random();\r\n int value = rand.nextInt(5);\r\n \r\n redButton.setBounds(coordinates[value][0],coordinates[value][1],100,100);\r\n yellowButton.setBounds(coordinates[value][2],coordinates[value][3],100,100);\r\n blueButton.setBounds(coordinates[value][4],coordinates[value][5],100,100);\r\n greenButton.setBounds(coordinates[value][6],coordinates[value][7],100,100);\r\n purpleButton.setBounds(coordinates[value][8],coordinates[value][9],100,100);\r\n \r\n if (bubbleRound == 5){\r\n cl.show(pages, \"sudokuPg\");\r\n bubbleRound = 0;\r\n }\r\n }\r\n });\r\n \r\n purpleButton.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n bubbleRound++;\r\n if (color2.equals(\"Purple\")){\r\n currentScore +=100;\r\n }\r\n colorValue = randColor.nextInt(5);\r\n color = colors[colorValue];\r\n colorValue = randColor.nextInt(5);\r\n color2 = colors[colorValue];\r\n if(color.equals(color2)){\r\n colorValue = randColor.nextInt(5);\r\n color2 = colors[colorValue];\r\n }\r\n bubbleText.setText(color);\r\n switch(color2){\r\n case \"Red\":{\r\n bubbleText.setForeground(Color.red);\r\n break;\r\n }\r\n case \"Yellow\":{\r\n bubbleText.setForeground(Color.yellow);\r\n break;\r\n }\r\n case \"Blue\":{\r\n bubbleText.setForeground(Color.blue);\r\n break;\r\n }\r\n case \"Green\":{\r\n bubbleText.setForeground(Color.green);\r\n break;\r\n }\r\n case \"Purple\":{\r\n bubbleText.setForeground(purple);\r\n break;\r\n }\r\n }\r\n Random rand = new Random();\r\n int value = rand.nextInt(5);\r\n \r\n redButton.setBounds(coordinates[value][0],coordinates[value][1],100,100);\r\n yellowButton.setBounds(coordinates[value][2],coordinates[value][3],100,100);\r\n blueButton.setBounds(coordinates[value][4],coordinates[value][5],100,100);\r\n greenButton.setBounds(coordinates[value][6],coordinates[value][7],100,100);\r\n purpleButton.setBounds(coordinates[value][8],coordinates[value][9],100,100);\r\n \r\n if (bubbleRound == 5){\r\n cl.show(pages, \"sudokuPg\");\r\n bubbleRound = 0;\r\n }\r\n }\r\n });\r\n\t \r\n\tsubmit.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n int sudokuScore = 540;\r\n boolean correct = true;\r\n if(!sudoku01.getText().equals(\"3\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku02.getText().equals(\"5\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku04.getText().equals(\"1\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku06.getText().equals(\"9\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku07.getText().equals(\"2\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku10.getText().equals(\"2\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku11.getText().equals(\"9\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku12.getText().equals(\"6\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku13.getText().equals(\"8\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku14.getText().equals(\"5\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku15.getText().equals(\"7\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku17.getText().equals(\"3\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku18.getText().equals(\"1\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku20.getText().equals(\"4\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku22.getText().equals(\"7\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku23.getText().equals(\"2\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku24.getText().equals(\"9\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku25.getText().equals(\"3\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku28.getText().equals(\"8\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku31.getText().equals(\"6\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku33.getText().equals(\"1\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku35.getText().equals(\"4\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku38.getText().equals(\"2\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku40.getText().equals(\"1\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku41.getText().equals(\"2\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku42.getText().equals(\"3\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku43.getText().equals(\"6\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku45.getText().equals(\"8\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku46.getText().equals(\"5\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku47.getText().equals(\"4\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku48.getText().equals(\"9\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku50.getText().equals(\"7\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku53.getText().equals(\"5\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku55.getText().equals(\"9\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku57.getText().equals(\"6\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku60.getText().equals(\"6\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku63.getText().equals(\"7\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku64.getText().equals(\"8\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku65.getText().equals(\"1\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku66.getText().equals(\"3\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku68.getText().equals(\"4\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku70.getText().equals(\"9\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku71.getText().equals(\"8\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku73.getText().equals(\"3\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku74.getText().equals(\"4\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku75.getText().equals(\"5\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku76.getText().equals(\"2\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku77.getText().equals(\"7\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku78.getText().equals(\"6\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku81.getText().equals(\"7\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku82.getText().equals(\"4\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku84.getText().equals(\"6\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku86.getText().equals(\"8\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n if(!sudoku87.getText().equals(\"1\")){\r\n sudokuScore-=10;\r\n correct = false;\r\n }\r\n \r\n currentScore+=sudokuScore;\r\n if(correct){\r\n cl.show(pages,\"scorePg\");\r\n }\r\n\t\tsudoku01.setText(\"\");\r\n \tsudoku02.setText(\"\");\r\n \t\tsudoku04.setText(\"\");\r\n \t \tsudoku06.setText(\"\");\r\n \t \tsudoku07.setText(\"\"); \r\n \t \tsudoku10.setText(\"\");\r\n \t \tsudoku11.setText(\"\");\r\n \t \tsudoku12.setText(\"\");\r\n \t \tsudoku13.setText(\"\");\r\n \t \tsudoku14.setText(\"\"); \r\n \tsudoku15.setText(\"\");\r\n \tsudoku17.setText(\"\");\r\n \tsudoku18.setText(\"\"); \r\n \t \tsudoku20.setText(\"\");\r\n \tsudoku22.setText(\"\");\r\n \tsudoku23.setText(\"\");\r\n \tsudoku24.setText(\"\");\r\n \tsudoku25.setText(\"\");\r\n \tsudoku28.setText(\"\"); \r\n \tsudoku31.setText(\"\");\r\n \tsudoku33.setText(\"\");\r\n \tsudoku35.setText(\"\");\r\n \tsudoku38.setText(\"\"); \r\n \tsudoku40.setText(\"\");\r\n \tsudoku41.setText(\"\");\r\n \tsudoku42.setText(\"\");\r\n \tsudoku43.setText(\"\");\r\n \tsudoku45.setText(\"\");\r\n \tsudoku46.setText(\"\");\r\n \tsudoku47.setText(\"\");\r\n \tsudoku48.setText(\"\"); \r\n \tsudoku50.setText(\"\");\r\n \tsudoku53.setText(\"\");\r\n \tsudoku55.setText(\"\");\r\n \tsudoku57.setText(\"\"); \r\n \tsudoku60.setText(\"\");\r\n \tsudoku63.setText(\"\");\r\n \tsudoku64.setText(\"\");\r\n \tsudoku65.setText(\"\");\r\n \tsudoku66.setText(\"\");\r\n \tsudoku68.setText(\"\"); \r\n \tsudoku70.setText(\"\");\r\n \tsudoku71.setText(\"\");\r\n \tsudoku73.setText(\"\");\r\n \tsudoku74.setText(\"\");\r\n \tsudoku75.setText(\"\");\r\n \tsudoku76.setText(\"\");\r\n \tsudoku77.setText(\"\");\r\n \tsudoku78.setText(\"\");\r\n \tsudoku81.setText(\"\");\r\n \tsudoku82.setText(\"\");\r\n \tsudoku84.setText(\"\");\r\n \tsudoku86.setText(\"\");\r\n \tsudoku87.setText(\"\");\r\n }\r\n });\r\n\r\n //Hangman Set Up\r\n Timer updateFrames = new Timer(500, new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n answerText.setText(displayedAnswer);\r\n String numberAsString = Integer.toString(currentScore);\r\n scoreText.setText(numberAsString);\r\n String withoutSpaces = displayedAnswer.replace(\" \", \"\");\r\n \r\n \r\n try {\r\n printHighScores();\r\n } catch (IOException ex) {\r\n Logger.getLogger(Hangman.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n highScores.setText(displayHighScores);\r\n \r\n if (withoutSpaces.equals(answer)) {\r\n Random rand = new Random();\r\n int value = rand.nextInt(5);\r\n answer = wordBank[value]; //chooses a word\r\n\r\n cl.show(pages, \"bubblePg\");\r\n\r\n displayedAnswer = \"\";\r\n for (int i = 0; i < answer.length(); i++) {\r\n displayedAnswer = displayedAnswer + \"_ \";\r\n }\r\n\r\n letterA.setEnabled(true);\r\n letterB.setEnabled(true);\r\n letterC.setEnabled(true);\r\n letterD.setEnabled(true);\r\n letterE.setEnabled(true);\r\n letterF.setEnabled(true);\r\n letterG.setEnabled(true);\r\n letterH.setEnabled(true);\r\n letterI.setEnabled(true);\r\n letterJ.setEnabled(true);\r\n letterK.setEnabled(true);\r\n letterL.setEnabled(true);\r\n letterM.setEnabled(true);\r\n letterN.setEnabled(true);\r\n letterO.setEnabled(true);\r\n letterP.setEnabled(true);\r\n letterQ.setEnabled(true);\r\n letterR.setEnabled(true);\r\n letterS.setEnabled(true);\r\n letterT.setEnabled(true);\r\n letterU.setEnabled(true);\r\n letterV.setEnabled(true);\r\n letterW.setEnabled(true);\r\n letterX.setEnabled(true);\r\n letterY.setEnabled(true);\r\n letterZ.setEnabled(true);\r\n }\r\n\r\n if (Hangman.currentScore == 40) {\r\n cl.show(pages, \"bubblePg\");\r\n Random rand = new Random();\r\n int value = rand.nextInt(5);\r\n //choosing a word\r\n answer = wordBank[value];\r\n\r\n displayedAnswer = \"\";\r\n for (int i = 0; i < answer.length(); i++) {\r\n displayedAnswer = displayedAnswer + \"_ \";\r\n }\r\n\r\n letterA.setEnabled(true);\r\n letterB.setEnabled(true);\r\n letterC.setEnabled(true);\r\n letterD.setEnabled(true);\r\n letterE.setEnabled(true);\r\n letterF.setEnabled(true);\r\n letterG.setEnabled(true);\r\n letterH.setEnabled(true);\r\n letterI.setEnabled(true);\r\n letterJ.setEnabled(true);\r\n letterK.setEnabled(true);\r\n letterL.setEnabled(true);\r\n letterM.setEnabled(true);\r\n letterN.setEnabled(true);\r\n letterO.setEnabled(true);\r\n letterP.setEnabled(true);\r\n letterQ.setEnabled(true);\r\n letterR.setEnabled(true);\r\n letterS.setEnabled(true);\r\n letterT.setEnabled(true);\r\n letterU.setEnabled(true);\r\n letterV.setEnabled(true);\r\n letterW.setEnabled(true);\r\n letterX.setEnabled(true);\r\n letterY.setEnabled(true);\r\n letterZ.setEnabled(true);\r\n }\r\n\r\n }\r\n });\r\n \r\n KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager(); \r\n manager.addKeyEventDispatcher(new MyDispatcher());\r\n \r\n mainFr.setVisible(true);\r\n updateFrames.start();\r\n\r\n }", "public void emote(String message) {\n\t\tif(message != null && message.length()>0){\n\t\t\tcurrentRoom.messageAllPlayers(\"\\033[3m*\" + name + \" \" + message + \"*\\033[0m\");\n\t\t}\n\t}", "public void changeMessage(View v) {\n clicked=0;\n pressed=0;\n TextView textview = (TextView) findViewById(R.id.textViewer);\n int t = 0;\n for (int i = 0; i < 1000; i++) {\n t = getRandomNumberInRange(1, 1000);\n }\n String s1 = Integer.toString(t);\n String s2 = s1.concat(\" is a prime number?\");\n textview.setText(s2);\n\n }", "@Override\n public void onClick(View image) {\n YoYo.with(Techniques.Pulse).duration(300).playOn(image);\n Toast.makeText(context, namesArray[position], Toast.LENGTH_SHORT).show();\n }", "private void showText(String msg)\n {\n\n popup.setText(msg);\n\n listView.animate().alpha(0.3f).setDuration(1000);\n\n popup.setVisibility(View.VISIBLE);\n\n }", "@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\t\n\t int number = (int)(Math.random()*3);\n\t if(number == 1) {\n\t \ttxt.setText(\"你出布,電腦出剪刀,你輸了\");\n\t \tj++;\n\t \tai.setText(\"剪刀\");\n\t \tplayer.setText(\"布\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.scissor);\n\t \timg2.setImageResource(R.drawable.paper);\n\t }\n\t else if(number == 2) {\n\t \ttxt.setText(\"你出布 ,電腦出石頭,你贏了\");\n\t \ti++;\n\t \tai.setText(\"石頭\");\n\t \tplayer.setText(\"布\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.rock);\n\t \timg2.setImageResource(R.drawable.paper);\n\t }\n\t else {\n\t \ttxt.setText(\"都出布,平手\");\n\t \tk++;\n\t \tai.setText(\"布\");\n\t \tplayer.setText(\"布\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.paper);\n\t \timg2.setImageResource(R.drawable.paper);\n\t }\n\t\t}", "public void makeLeet(Player player, String playerMessage, AsyncPlayerChatEvent event) {\n\t\t\r\n\t\t\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)\\\\bfear\\\\b\",\t\t\t\"phear\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)\\\\bat\\\\b\",\t\t\t\"@\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)\\\\byou\\\\b\", \t\t\t\"yoo\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)\\\\bhack\\\\b\", \t\t\t\"hax\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)\\\\bhi|hello\\\\b\", \t\t\"hai der\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)\\\\bto|two|too\\\\b\", \t\"2\");;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Charactar Map\r\n\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)a\", \t\t\t\"@\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)b\", \t\t\t\"13\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)c\", \t\t\t\"[\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)d\", \t\t\t\"[)\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)e\", \t\t\t\"3\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)f\", \t\t\t\"ph\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)g\", \t\t\t\"6\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)h\",\t\t\t\"|-|\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)i\", \t\t\t\"1\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)j\", \t\t\t\"_/\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)k\", \t\t\t\"|<\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)l\", \t\t\t\"|_\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)m\", \t\t\t\"/\\\\\\\\/\\\\\\\\\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)n\",\t\t\t\"/\\\\\\\\/\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)o\", \t\t\t\"0\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)p\", \t\t\t\"|>\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)q\", \t\t\t\"(,)\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)r\", \t\t\t\"r\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)s\",\t\t\t\"z\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)t\", \t\t\t\"+\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)u\", \t\t\t\"\\\\\\\\_/\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)v\", \t\t\t\"\\\\\\\\/\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)w\", \t\t\t\"\\\\\\\\/\\\\\\\\/\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)x\", \t\t\t\"><\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)y\", \t\t\t\"¥\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)z\", \t\t\t\"z\");\r\n\r\n\t\t//Here we do l33tish Grammar we do this last to see if we can get any words not in the list above\r\n\t\t//but not to affect the above words\r\n\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)cks\", \t\t\t\t\"x\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)er\", \t\t\t\t\t\"zor\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)or\", \t\t\t\t\t\"xor\");\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\"(?i)ur\", \t\t\t\t\t\"x0l0n1u$\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Remove double spaces and Set the new Message\r\n\r\n\t\t\tplayerMessage = playerMessage.replaceAll(\" \", \" \");\r\n\t\t event.setMessage(playerMessage);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tRotateAnimation rotateAnim = null;\n\t\t\t\ttemp = ((int) (Math.random() * 6)) * 60 + 1080;\n\t\t\t\trotateAnim = new RotateAnimation(0, -temp,\n\t\t\t\t\t\tAnimation.RELATIVE_TO_SELF, 0.5f,\n\t\t\t\t\t\tAnimation.RELATIVE_TO_SELF, 0.5f);// 以自身为中心\n\t\t\t\trotateAnim.setFillAfter(true);// 保持动画结束后的样式\n\t\t\t\trotateAnim.setDuration(2000);// 动画持续时间\n\t\t\t\trotateAnim.setAnimationListener(new AnimationListener() {\n\t\t\t\t\tString meal;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\torderCicle.setClickable(false);// 转动时不可被点击\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onAnimationRepeat(Animation arg0) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onAnimationEnd(Animation arg0) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\tswitch (eatWhat(temp - 1080)) {\n\t\t\t\t\t\tcase 0: {\n\t\t\t\t\t\t\tmeal = \"快餐\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 1: {\n\t\t\t\t\t\t\tmeal = \"炒菜\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 2: {\n\t\t\t\t\t\t\tmeal = \"凉皮\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 3: {\n\t\t\t\t\t\t\tmeal = \"面条\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 4: {\n\t\t\t\t\t\t\tmeal = \"饺子\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 5: {\n\t\t\t\t\t\t\tmeal = \"其他\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\teatWhat.setText(meal);// 显示结果\n\t\t\t\t\t\torderCicle.setClickable(true);// 转动后可以被点击\n\t\t\t\t\t\teatWhat.setClickable(true);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\torderCicle.startAnimation(rotateAnim);\n\n\t\t\t}", "public void randomStyle(DrawTextItem s) {\n\t\tString[] fontFamilies = {\"Monospace\", \"Helvetica\", \"TimesRoman\", \"Courier\", \"Serif\", \"Sans_Serif\"}; \n\t\tint fontType = new Random().nextInt(fontFamilies.length); \n\t\tint fontSize = new Random().nextInt(15); \n\t\tif (fontSize <= 6)\n\t\t\tfontSize = 7;\n\t\tint fontStyle;\n\t\tif (Math.random() > 0.25)\n\t\t\tfontStyle = Font.ITALIC;\n\t\telse if (Math.random() > 0.5)\n\t\t\tfontStyle = Font.BOLD;\n\t\telse\n\t\t\tfontStyle = Font.ITALIC + Font.BOLD;\n\t\ts.setFont( new Font(fontFamilies[fontType], fontStyle, fontSize )); \n\t\tint angle = new Random().nextInt(359);\n\t\ts.setRotationAngle(angle);\n\t\tint scale = new Random().nextInt(5);\n\t\tif (scale == 0)\n\t\t\tscale = 1; \n\t\ts.setMagnification(scale);\n\t\tif (Math.random() < 0.5)\n\t\t\ts.setBorder(true); \n\t\telse\n\t\t\ts.setBorder(false);\n\t\ts.setTextTransparency(0.3);\n\t\tint r = new Random().nextInt(255);\n\t\tint g = new Random().nextInt(255);\n\t\tint b = new Random().nextInt(255);\n\t\ts.setBackground(new Color(r,g,b));\n\t\ts.setBackgroundTransparency(Math.random() * 0.90 + 0.10);\n\t}", "public void run() {\n mTextView.setTranslationY(-mTextView.getHeight());\n mTextView.animate().setDuration(duration / 2).translationY(0).alpha(1)\n .setInterpolator(sDecelerator);\n }", "@Override\n\t\t\t\t\tpublic void onAnimationEnd(Animation arg0) {\n\n\t\t\t\t\t\tswitch (eatWhat(temp - 1080)) {\n\t\t\t\t\t\tcase 0: {\n\t\t\t\t\t\t\tmeal = \"快餐\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 1: {\n\t\t\t\t\t\t\tmeal = \"炒菜\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 2: {\n\t\t\t\t\t\t\tmeal = \"凉皮\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 3: {\n\t\t\t\t\t\t\tmeal = \"面条\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 4: {\n\t\t\t\t\t\t\tmeal = \"饺子\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 5: {\n\t\t\t\t\t\t\tmeal = \"其他\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\teatWhat.setText(meal);// 显示结果\n\t\t\t\t\t\torderCicle.setClickable(true);// 转动后可以被点击\n\t\t\t\t\t\teatWhat.setClickable(true);\n\t\t\t\t\t}", "public void run() {\n mEmoteButton.setBackgroundResource(R.drawable.button_yellow);\n mIsEmotePlayable = true;\n\n }", "@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\t\n\t int number = (int)(Math.random()*3);\n\t if(number == 1) {\n\t \ttxt.setText(\"你出石頭,電腦出剪刀,你贏了\");\n\t \ti++;\n\t \tai.setText(\"剪刀\");\n\t \tplayer.setText(\"石頭\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.scissor);\n\t \timg2.setImageResource(R.drawable.rock);\n\t }\n\t else if(number == 2) {\n\t \ttxt.setText(\"都出石頭,平手\");\n\t \tk++;\n\t \tai.setText(\"石頭\");\n\t \tplayer.setText(\"石頭\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.rock);\n\t \timg2.setImageResource(R.drawable.rock);\n\t }\n\t else {\n\t \ttxt.setText(\"你出石頭,電腦出布,你輸了\");\n\t \tj++;\n\t \tai.setText(\"布\");\n\t \tplayer.setText(\"石頭\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.paper);\n\t \timg2.setImageResource(R.drawable.rock);\n\t }\n\t\t}", "@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\t\n\t int number = (int)(Math.random()*3);\n\t if(number == 1) {\n\t \ttxt.setText(\"都出剪刀,平手\"); \n\t \tk++;\n\t \tai.setText(\"剪刀\");\n\t \tplayer.setText(\"剪刀\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.scissor);\n\t \timg2.setImageResource(R.drawable.scissor);\n\t }\n\t else if(number == 2) {\n\t \ttxt.setText(\"你出剪刀 ,電腦出石頭,你輸了\");\n\t \tj++;\n\t \tai.setText(\"石頭\");\n\t \tplayer.setText(\"剪刀\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.rock);\n\t \timg2.setImageResource(R.drawable.scissor);\n\t }\n\t else {\n\t \ttxt.setText(\"你出剪刀,電腦出布,你贏了\");\n\t \ti++;\n\t \tai.setText(\"布\");\n\t \tplayer.setText(\"剪刀\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.paper);\n\t \timg2.setImageResource(R.drawable.scissor);\n\t }\n\t\t}", "@Override\n\t\t\tpublic void onEmotionClick(String emoName) {\n\t\t\t\tLogger.error(TAG, \"emo name is : \" + emoName);\n\t\t\t\tEmoBean emoBean = HtmlUtils.getEmotionResId(emoName);\n\t\t\t\tif (emoBean != null) {\n\t\t\t\t\tImageSpan imageSpan = new ImageSpan(getContext(), HtmlUtils.getEmotionResId(emoName).getResId());\n\t\t\t\t\tString repText = emoBean.geteName();\n\t\t\t\t\tSpannableString spannableString = new SpannableString(repText);\n\t\t\t\t\tspannableString.setSpan(imageSpan, 0, repText.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n\t\t\t\t\t// 将随机获得的图像追加到EditText控件的最后\n\t\t\t\t\t// etContent.append(spannableString);\n\t\t\t\t\tint index = etContent.getSelectionStart();\n\t\t\t\t\tEditable editable = etContent.getText();\n\t\t\t\t\teditable.insert(index, spannableString);\n\t\t\t\t}\n\t\t\t}", "private void speak() {\n String s = textArea.getText();\n String s5=\"images\\\\\";\n String s4=\".jpeg\";\n String obj=s5+s+s4;\n ImageIcon ic1=new ImageIcon(obj);\n Image image1=ic1.getImage().getScaledInstance(image.getWidth(),image.getHeight(),Image.SCALE_AREA_AVERAGING);\n ImageIcon icon1=new ImageIcon(image1);\n image.setIcon(icon1);\n int i = textArea.getCaretPosition();\n int k = s.length();\n for (int j = i; j <= k - 1; j++) {\n char c = s.charAt(j);\n String s3 = Character.toString(c);\n s2 = s2 + s3;\n }\n VoiceManager voiceManager = VoiceManager.getInstance();\n helloVoice = voiceManager.getVoice(\"kevin16\");\n helloVoice.allocate();\n helloVoice.speak(s2);\n helloVoice.deallocate();\n playB.setText(\"PLAY\");\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState); \n\t\tsetContentView(R.layout.click_sequence);\n\t\tclick1 = (Button) findViewById(R.id.clickOnMe1);\n\t\tclick2 = (Button) findViewById(R.id.clickOnMe2);\n\t\tclick3 = (Button) findViewById(R.id.clickOnMe3);\n\t\tgiveUp = (Button) findViewById(R.id.giveUp);\n\t\ttries = (TextView) findViewById(R.id.tries);\n\t\texplain = (TextView) findViewById(R.id.explain);\n\n\t\tTypeface fontName = Typeface.createFromAsset(getAssets(), \"fonts/FORTE.ttf\");\n\t\texplain.setTypeface(fontName);\n\t\tAnimation anim = AnimationUtils.loadAnimation(this, R.anim.animation5);\n\t\texplain.startAnimation(anim);\n\t\texplain.clearAnimation();\n\t\t\n\t\t\n\t\tword = (TextView) findViewById(R.id.theWord);\n\t\tword.setTextSize(25);\n\t\tword.setTypeface(fontName);\n\t\ttries.setTypeface(fontName);\n\t\tgiveUp.setTypeface(fontName);\n\t\tword.startAnimation(anim);\n\t\t\n\t\t\n\t\t\n\t\t//fill the array in random ints\n\t\tfor (int j=0; j<5; j++){\n\t\t\t\n\t\t\ti = random.nextInt(100);\n\t\t\ti = i % 4;\n\t\t\t\n\t\t\twhile (i==0 || i==lastInt) {\n\t\t\t\ti = random.nextInt(100);\n\t\t\t\ti = i % 4;\n\t\t\t}\n\t\t\t\n\t\t\tlastInt=i;\n\t\t\tarr[j]=i;\n\t\t}\n\t\t\n\n\n\t\tword.setOnClickListener(new OnClickListener() {\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tword.setClickable(false);\n\t\t\t\tMyCount count;\n\t\t\t\tcount= new MyCount(8000,1000);\n\t\t\t\tcount.start();\n\t\t\t}\n\t\t});\n\t\t\t\n\t\t\n\t\tclick1.setOnClickListener(new OnClickListener() {\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (arr[counter] == indentify[0]){\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\tif (counter !=5)\n\t\t\t\t\t\tmessUp();\n\t\t\t\t\telse\n\t\t\t\t\t\trightAnswer();\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\twrongAnswer();\n\t\t\t}\n\t\t});\n\t\tclick2.setOnClickListener(new OnClickListener() {\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (arr[counter] == indentify[1]){\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\tif (counter !=5)\n\t\t\t\t\t\t\tmessUp();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\trightAnswer();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\twrongAnswer();\n\t\t\n\t\t\t}\n\t\t});\t\t\n\t\t\n\t\tclick3.setOnClickListener(new OnClickListener() {\n\t\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (arr[counter] == indentify[2]){\n\t\t\t\t\tcounter++;\n\t\t\t\t\tif (counter !=5)\n\t\t\t\t\t\tmessUp();\n\t\t\t\t\telse\n\t\t\t\t\t\trightAnswer();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\twrongAnswer();\n\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tgiveUp.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tLoseTechnicly();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t}", "public void monsterSound(){\n System.out.println(\"\\n\\nYou hear gutteral moans and the shambling of a creature nearby.\\n\\n\");\n }", "private void loveYourz()\n {\n Song loveYourz = new Song();\n loveYourz.add(new Note(noteD4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS3, 0));\n loveYourz.add(new Note(noteC2, 0));\n loveYourz.add(new Note(noteC1, WHOLE_NOTE/2));\n\n loveYourz.add(new Note(noteD4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS3, 0));\n loveYourz.add(new Note(noteC2, 0));\n loveYourz.add(new Note(noteC1, WHOLE_NOTE/4));\n\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS2, 0));\n loveYourz.add(new Note(noteDS1, WHOLE_NOTE/4));\n\n\n loveYourz.add(new Note(noteG4, 0));\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteC4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/2));\n\n loveYourz.add(new Note(noteG4, 0));\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteC4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/8));\n\n loveYourz.add(new Note(noteF4, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/8));\n\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/8));\n\n loveYourz.add(new Note(noteD4, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/8));\n\n\n loveYourz.add(new Note(noteD4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS3, 0));\n loveYourz.add(new Note(noteC2, 0));\n loveYourz.add(new Note(noteC1, WHOLE_NOTE/2));\n\n loveYourz.add(new Note(noteD4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS3, 0));\n loveYourz.add(new Note(noteC2, 0));\n loveYourz.add(new Note(noteC1, WHOLE_NOTE/4));\n\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteG3, 0));\n loveYourz.add(new Note(noteDS2, 0));\n loveYourz.add(new Note(noteDS1, WHOLE_NOTE/4));\n\n\n loveYourz.add(new Note(noteG4, 0));\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteC4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/2));\n\n loveYourz.add(new Note(noteG4, 0));\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteC4, 0));\n loveYourz.add(new Note(noteBB3, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/4));\n\n loveYourz.add(new Note(noteDS4, 0));\n loveYourz.add(new Note(noteGS2, 0));\n loveYourz.add(new Note(noteGS1, WHOLE_NOTE/4));\n playSong(loveYourz);\n playSong(loveYourz);\n }", "@Override\n public String speak()\n {\n return \"Neigh\";\n }", "private void eating(){\n int sleepTime = (int)(Math.random()*2000);\n try{\n Thread.sleep(sleepTime);\n }catch (InterruptedException e){\n e.printStackTrace();\n }\n }", "public void addTextToTheTA(String msg) {\n\t\tguessArea.append(msg);\n\t}", "private void thinking(){\n int sleepTime = (int)(Math.random()*2000);\n try{\n Thread.sleep(sleepTime);\n }catch (InterruptedException e){\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\r\n // feed the generator a fixed random value for repeatable behavior\r\n MarkovTextGeneratorLoL gen = new MarkovTextGeneratorLoL(new Random(42));\r\n //String textString = \"hi there hi Leo\";\r\n //String textString = \"\";\r\n \r\n String textString = \"Hello. Hello there. This is a test. Hello there. Hello Bob. Test again.\";\r\n System.out.println(textString);\r\n gen.train(textString);\r\n System.out.println(gen);\r\n System.out.println(\"Generator: \" + gen.generateText(0));\r\n String textString2 = \"You say yes, I say no, \" +\r\n \"You say stop, and I say go, go, go, \" +\r\n \"Oh no. You say goodbye and I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello. \" +\r\n \"I say high, you say low, \" +\r\n \"You say why, and I say I don't know. \" +\r\n \"Oh no. \" +\r\n \"You say goodbye and I say hello, hello, hello. \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello. \" +\r\n \"Why, why, why, why, why, why, \" +\r\n \"Do you say goodbye. \" +\r\n \"Oh no. \" +\r\n \"You say goodbye and I say hello, hello, hello. \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello. \" +\r\n \"You say yes, I say no, \" +\r\n \"You say stop and I say go, go, go. \" +\r\n \"Oh, oh no. \" +\r\n \"You say goodbye and I say hello, hello, hello. \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello,\";\r\n System.out.println(textString2);\r\n gen.retrain(textString2);\r\n System.out.println(gen);\r\n System.out.println(gen.generateText(20));\r\n }", "private void draw_text() {\n\t\tcopy_text_into_buffer();\n\t\tVoteVisApp.instance().image(text_buffer_, frame_height_ / 2,\n\t\t\t-text_graphics_.height / 2);\n\t}", "public void healthBarBubbleAnimation() {\n\n\t\tint oppHealth = Integer.parseInt(opponentHealth.getText());\n\t\tint locHealth = Integer.parseInt(opponentHealth.getText());\n\n\t\tif (oppHealth != oldOppHealth) {\n\t\t\tBounds boundsOpp = opponentHealthBar.getBoundsInLocal();\n\t\t\tdouble yPosOppTop = boundsOpp.getMinY();\n\t\t\tdouble yPosOppBottom = boundsOpp.getMinY() + boundsOpp.getWidth();\n\t\t\tdouble widthOpp = boundsOpp.getWidth();\n\t\t\tdouble xPosOpp = boundsOpp.getMinX();\n\n\t\t\t//if (widthOpp == )\n\n\t\t\tRandom rand = new Random();\n\t\t\tint randXposOpp = rand.nextInt((int)Math.round(widthOpp));\n\t\t\tdouble randYposOpp = rand.nextInt(2)+1==1 ? yPosOppTop : yPosOppBottom;\n\n\t\t\tParallelTransition bubbleOpp = healthBarBubbleTransition(xPosOpp + randXposOpp,randYposOpp);\n\t\t}\n\n\n\t\tBounds boundsOpp = opponentHealthBar.getBoundsInLocal();\n\t\tBounds boundsLoc = localHealthBar.getBoundsInLocal();\n\t\tdouble yPosOppTop = boundsOpp.getMinY();\n\t\tdouble yPosOppBottom = boundsOpp.getMinY() + boundsOpp.getWidth();\n\t\tdouble yPoslocTop = boundsLoc.getMinY();\n\t\tdouble yPosLocBottom = boundsLoc.getMinY() + boundsLoc.getWidth();\n\t\tdouble widthOpp = boundsOpp.getWidth();\n\t\tdouble xPosOpp = boundsOpp.getMinX();\n\t\tdouble widthLoc = boundsLoc.getWidth();\n\t\tdouble xPosLoc = boundsLoc.getMinX();\n\n\t\tRandom rand = new Random();\n\t\tint randXposOpp = rand.nextInt((int)Math.round(widthOpp));\n\t\tint randXposLoc = rand.nextInt((int) Math.round(widthLoc));\n\t\tdouble randYposOpp = rand.nextInt(2)+1==1 ? yPosOppTop : yPosOppBottom;\n\t\tdouble randYposLoc = rand.nextInt(2)+1==1 ? yPoslocTop : yPosLocBottom;\n\n\t\tParallelTransition bubbleOpp = healthBarBubbleTransition(xPosOpp + randXposOpp,randYposOpp);\n\t\tParallelTransition bubbleLoc = healthBarBubbleTransition(xPosLoc + randXposLoc,randYposLoc);\n\n\n\n\t\tbubbleOpp.play();\n\t\tbubbleLoc.play();\n\n\n\n\t}", "public static void animateBlinkingTextNode(Text text, String content) {\n text.setText(content);\n text.setFont(Font.font (\"Verdana\", 20));\n text.setFill(Color.WHITE);\n\n FadeTransition fadeTransition = new FadeTransition(Duration.seconds(1.1), text);\n fadeTransition.setFromValue(1.0);\n fadeTransition.setToValue(0.0);\n fadeTransition.setCycleCount(Animation.INDEFINITE);\n fadeTransition.play();\n }", "private void turnAround() {\n d = Math.random();\n if (d < 0.1) {\n changeAppearance();\n }\n }", "private Node generateView() {\n Text text = new Text(\"Click to\\nextinguish!\");\n text.setFont(Font.font(Font.getDefault().getFamily(), FontWeight.BOLD, Font.getDefault().getSize()));\n text.setTextAlignment(TextAlignment.CENTER);\n text.setPickOnBounds(false);\n text.setMouseTransparent(true);\n\n VBox box = new VBox(5.0);\n\n AnimationChannel animChannel = new AnimationChannel(FXGL.image(\"flames.png\"), 4, 20, 20,\n Duration.seconds(ANIM_TIME), 0, 3);\n AnimatedTexture texture = new AnimatedTexture(animChannel).loop();\n texture.setFitWidth(SIZE);\n texture.setFitHeight(SIZE);\n texture.setSmooth(false);\n texture.setPickOnBounds(true);\n texture.setOnMousePressed(pEvt -> {\n FXGL.play(\"sizzle.wav\");\n FXGL.removeUINode(box);\n mCount--;\n if (mCount <= 0) {\n onCompleted();\n }\n pEvt.consume();\n });\n\n // Wrap in entity so animation plays\n mEntity = FXGL.entityBuilder().view(texture).buildAndAttach();\n\n box.getChildren().addAll(text, texture);\n box.setAlignment(Pos.CENTER);\n box.setPickOnBounds(false);\n\n // Fix width for accurate location generation\n box.setMinWidth(SIZE * 2.0);\n box.setMaxWidth(SIZE * 2.0);\n box.setPrefWidth(SIZE * 2.0);\n\n return box;\n }", "public void run() {\n String line = finalArg.toString();\n\n String separate = line, text=\"\";\n boolean isEmoji = false;\n String[] words = separate.split(\" \");\n for (int i = 0; i < words.length; i++) {\n if (words[i].equals(\"Ω:v\") || words[i].equals(\":3\") || words[i].equals(\":)\") || words[i].equals(\":(\") || words[i].equals(\"o.O\") || words[i].equals(\":poop:\")\n || words[i].equals(\"(^^^)\") || words[i].equals(\"-_-\") || words[i].equals(\"<(')\") || words[i].equals(\"><\") || words[i].equals(\":kiss:\") || words[i].equals(\"(y)\")\n || words[i].equals(\":love:\") || words[i].equals(\"<3\") || words[i].equals(\":crysmiley:\") || words[i].equals(\":nervous:\")\n ) {\n isEmoji = true;\n text = words[i];\n words[i] = \"\";\n }\n }\n String ans = \"\";\n for (String i : words) {\n ans += (i + \" \");\n }\n// textPane.setFont(new java.awt.Font(\"Arial\", Font.PLAIN, 15));\n if (line.startsWith(\"Tôi:\")) {\n addColoredText(textPane, ans, Color.BLACK);\n } else if (ans.startsWith(\"***\") || ans.startsWith(\"Welcome\") || ans.startsWith(\"To\")) {\n addColoredText(textPane, ans, Color.red);\n } else {\n addColoredText(textPane, ans, Color.BLUE);\n new Notifications();\n }\n\n if (isEmoji) {\n try {\n addIcon(textPane, text);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n addColoredText(textPane, \"\\n\", Color.red);\n\n }", "protected abstract void animate(int anim);", "public void Onwin(){\r\n xPos=0;\r\n yPos=0;\r\n indice = rand.nextInt(11);\r\n if(indice==12){indice2= indice-1;}\r\n else{indice2= indice+1;};\r\n\r\n\r\n texto.setText(\"\");\r\n texto.append(expressions[indice]);\r\n texto1.setText(\"\");\r\n texto1.append(expressions[indice2]);\r\n\r\n matrix=generateMatrix(Alphat,expressions[indice]);\r\n textoG.setText(\"\");\r\n for(int i=0;i<matrix.length;i++){\r\n textoG.append(matrix[i]+\"\\n\");\r\n }\r\n\r\n }", "private void initializeAnimalIText() {\r\n\t\tiText = lang.newText(new Offset(0, 178, rowText, AnimalScript.DIRECTION_SW), \"\", \"iText\", null);\r\n\t\tiText.hide();\r\n\t}", "@Override\r\n\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\tif(change_tempo){\r\n\t\t\t\t\t\t\t\t\t\t\tPatternMaker.changeSpeed(pattern, ratio);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tgotoPractice(pattern);\r\n\t\t\t\t\t\t\t\t\t}", "public Chatbot(int seed)\r\n\t{\r\n\t\t// La mercancia es independiente de la personalidad del chatbot.\r\n\t\tmerchandise = \" Escudo Rubi: 1500 flurios \\n Espadon Escarlata: 1750 flurios \\n Tomo de Combustion Espontanea: 1000 flurios \\n Piedra Draconica Celeste: 2500 flurios \\n Pocion de recuperacion: 250 flurios.\\n Si quieres saber algo acerca de algun articulo solo tienes que preguntarlo.\\n\";\r\n\r\n\t\t// Lezalith - Personalidad: Servicial y carismatica.\r\n\t\tif ((seed % 2) == 0)\r\n\t\t{\r\n\t\t\tname = \"Lezalith\";\r\n\r\n\t\t\tgenericGreeting = \"Hola aventurero, en que puedo ayudarte?\";\r\n\t\t\tmorningGreeting = \"El sol despunta y tu preparandote para la batalla. Compra algo para que no tengas problemas a lo largo del dia!\";\r\n\t\t\tafternoonGreeting = \"Buenas tardes aventurero, necesitas equipamiento?\";\r\n\t\t\teveningGreeting = \"Buenas noches aventurero; ya estamos por cerrar, pero siempre puedo atender a una persona mas. Que necesitas?\";\r\n\r\n\t\t\tbuyingResponses = new String[2];\r\n\t\t\tbuyingResponses[0] = \"Conque quieres comprar algo huh? Te mostrare lo que tenemos a disponible:\";\r\n\t\t\tbuyingResponses[1] = \"Excelente, mira estos articulos por favor.\";\r\n\t\r\n\t\t\t\t\r\n\t\t\tarticlesInfo = new String[5];\r\n\r\n\t\t\tarticlesInfo[0] = \"El Escudo Rubi es un escudo emblematico de nuestro pais. Su leyenda se remonta a los origenes de la ciudad de Flur. No entrare en detalles, pero la leyenda cuenta que un viajero repelio una horda completa de esqueletos y que su escudo permanecio inmaculado tras semejante derroche de valentia.\\nEl escudo rubi no esta creado a partir de rubi, contrario a lo que se piensa popularmente, sino de piedra draconica rojiza que se asemeja a los rubies.\\nEsta cualidad le permite repeler incluso las llamaradas de algunas criaturas sin que el portador sufra herida alguna.\";\r\n\t\t\tarticlesInfo[1] = \"El Espadon Escarlata que vendemos aqui es una replica muy precisa del espadon descrito en la leyenda de Ruhium, el Sanguinario. Se cuenta que este hombre, de origenes inciertos, llego un dia a Flur con la intencion de arrasarla tal cual un vil bandido.\\n Pero basto con ver los hermosos prados que rodean la ciudad, y oir el melodico fluir de los riachuelos cercanos para que se esfumara cualquier pensamiento que no fuese vivir y proteger estos lares.\\n Su espadon, una hoja descomunal, que habia adquirido un color escarlata en su hoja por tanta sangre que un dia derramo; se convirtio en un simbolo de quietud y paz mental para nosotros.\";\r\n\t\t\tarticlesInfo[2] = \"El Tomo de Combustion Espontanea es uno de los hechizos basicos que aprenden los estudiantes de la escuela magica de la piromancia. A pesar de ser un hechizo de primerizos, es una herramienta muy util para todo el mundo. Requiere poco poder magico y solo se compone de tres versos, pero su efectividad es aterradora. Consiste en un hechizo capaz de prender en llamas a cualquier objetivo que este en tu campo de vision y en un radio de 15 metros. El objetivo continuara ardiendo hasta que su cuerpo de reduzca a cenizas, pero el fuego se disipara si pierdes al objetivo de vista o si las condiciones ambientales no permitan la combustion.\";\r\n\t\t\tarticlesInfo[3] = \"Los dragones poseen ciertas cualidades especiales que el resto de las especies no. Estas cualidades dependen del dragon, y usualmente puede distinguirseles por el color de las escamas. A medida que los dragones crecen, sus cuerpos producen una cristalizacion de la energia vital que irradia de su cuerpo. Cada cierto tiempo, los dragones expulsan de su cuerpo esta cristalizacion a modo de desecho y es lo que nosotros conocemos por piedra draconica. El color de la piedra coincide con el de las escamas del dragon que sintetizo esa piedra, y la piedra posee las mismas cualidades extraordinarias que este ultimo. En particular, la piedra de dragon celeste es una gema que expulsa un torrente de rayos a voluntad; pero requiere que su portador la cargue con energia magica para desatar su terrible poder.\";\r\n\t\t\tarticlesInfo[4] = \"La vieja y confiable pocion de recuperacion ha sacado de apuros tanto a principiantes como a expertos del mundo de las armas. Esta compuesta de muchos ingredientes regenerativos que apresuran enormemente tu regeneracion natural. \";\r\n\r\n\r\n\t\t\tbuyingArticles = new String[5];\r\n\t\t\tbuyingArticles[0] = \"Compraras un Escudo Rubi? Muy bien, son 1500 flurios. Tus enemigos flaquearan en voluntad al ver que ninguno de sus ataques lograra atravesar tu defensa.\";\r\n\t\t\tbuyingArticles[1] = \"Iras por el Espadon Escarlata, huh? Buena eleccion, son 1750 flurios. Siento lastima por esas pobres bestias que se atrevan a enfrentarte.\";\r\n\t\t\tbuyingArticles[2] = \"Te convencio el Tomo Magico? El precio es de 1000 flurios. Una ganga, no crees?. Tus enemigos no sabran que los hizo arder en llamas.\";\r\n\t\t\tbuyingArticles[3] = \"Son 2500 flurios por la Piedra Draconica. Una vez que logres cargarla, desataras un cataclismo en el campo de batalla. Recuerda usarla con prudencia.\";\r\n\t\t\tbuyingArticles[4] = \"Son 250 flurios por la Pocion. Hay que ser precavidos, verdad?\";\r\n\t\t\r\n\t\t\tnotEnough = \"Al parecer no tiene suficiente dinero. Por favor, trate de comprar algo que pueda permitirse con su dinero\";\r\n\r\n\t\t\tsellingResponse = \"Lo siento, en esta tienda no compramos a nuestros clientes. La tienda vecina se arruino un dia que llego un aventurero con 6 millones de huesos de monstruos. El pobre vendedor tuvo que comprarselos todos, y todo por seguir esa ridicula politica.\";\r\n\r\n\t\t\trumours = new String[3];\r\n\t\t\trumours[0] = \"La expedicion que salio hace unas semanas en busqueda del dragon maligno no ha vuelto aun. Temo que hayan fracasado en su objetivo.\";\r\n\t\t\trumours[1] = \"La caravana que suple mis articulos lleva 4 dias de retraso. Los habran asaltado goblins o algo?.\";\r\n\t\t\trumours[2] = \"La ciudad esta muy ajetreada estos dias. Todos temen un asalto nocturno de parte de los dragones anti-pactianos.\";\r\n\r\n\t\t\tmisheard = new String[3];\r\n\t\t\tmisheard[0] = \"Lo siento, creo que no puedo comprender algunas de las palabras que usas viajero. Podrias reformularme eso que has dicho?\";\r\n\t\t\tmisheard[1] = \"Creo que no he escuchado bien, que has dicho?\";\r\n\t\t\tmisheard[2] = \"Lamento no conocer el lenguaje de un modo tan habil como vos, pero es necesario que te rebajes a mi nivel para que nos entendamos.\\nPodrias describir eso con palabras mas cercanas a mi entendimiento?\";\r\n\r\n\t\t\tfarewell = \"Buena suerte, en realidad no la necesitas porque te has equipado aqui hahaha.\";\r\n\t\t}\r\n\r\n\t\t// Roxane - Personalidad: Agresiva y perezosa.\r\n\r\n\t\telse\r\n\t\t{\r\n\r\n\t\t\tname = \"Roxane\";\r\n\r\n\t\t\tgenericGreeting = \"*suspiro* Hola aventurero, echale el ojo a las existencias y avisame cuando vayas a comprar algo, si?\";\r\n\t\t\tmorningGreeting = \"Buenos dias aventurero. No te sientes somnoliento? Deberias volver a tu cama y dejarme dormir.\";\r\n\t\t\tafternoonGreeting = \"Buenas tardes, date una vuelta por la tienda y llevate algo, quieres?\";\r\n\t\t\teveningGreeting = \"Ya esta oscureciendo. Apresurate en comprar o te dejare dentro.\";\r\n\r\n\t\t\tbuyingResponses = new String[2];\r\n\t\t\tbuyingResponses[0] = \"Esta bien. Puedes escoger cualquier objeto de entre los que aqui se encuentran: \";\r\n\t\t\tbuyingResponses[1] = \"Si quieres comprar tendras que conformarte con lo que tenemos. Hay problemas en las rutas comerciales, asi que no hay mucha variedad.\";\r\n\r\n\t\t\tarticlesInfo = new String[5];\r\n\r\n\t\t\tarticlesInfo[0] = \"El Escudo Rubi que aqui vendemos es una replica exacta del legendario escudo de la famosa epica narrada todas las noches en los bares de Flur. El escudo que portaba el defensor de Flur salvaguardo a nuestro heroe de los infinitos golpes de las furibundas hordas de monstruos que azotaban nuestra ciudad.\\nNo pienses mal de el por ser una replica. Podria ser mejor que el original, pues posee propiedades magicas que lo vuelven aun mas impenetrable para cualquier ataque que desafie la fortaleza de este escudo.\";\r\n\t\t\tarticlesInfo[1] = \"Ruhium, el Sanguinario, blandio una espada como esta hace decadas. Era un hombre temido por todo el mundo que, enamorado de la belleza de nuestra ciudad y la quietud de sus alrededores, hizo de este lugar su hogar y lo defendio de los muchos invasores que asediaron Flur en esa epoca.\\nVer el espadon de Ruhium en batalla, era como ver la hoz de la muerte sesgando las vidas de sus adversarios. Eso no ha cambiado hasta el dia de hoy, pues nuestro Espadon Escarlata no tiene motivos para palidecer ante su modelo: El espadon de Rihium.\";\r\n\t\t\tarticlesInfo[2] = \"Ese tomo es el que estudian los principiantes de la piromancia. Puedes comprarlo si te apetece, pero a tu edad tal vez debas practicarlo en privado. Los estudiantes se reiran de ti si te ven lanzando ese hechizo tan simple. \";\r\n\t\t\tarticlesInfo[3] = \"Mi hermana explica esto con mayor precision, pero en pocas palabras, esta piedra puede almacenar grandes cantidades de energia magica y liberarla en forma de rayos. Se obtiene a partir de la cristalizacion magica del dragon de escamas celestes.\";\r\n\t\t\tarticlesInfo[4] = \"No hay mucho que explicar, verdad? El nombre lo dice todo. Ultimamente hemos vendido muchas de estas a algunos jovenes. Tal vez pueden generar adiccion...\";\r\n\r\n\t\t\tbuyingArticles = new String[5];\r\n\t\t\tbuyingArticles[0] = \"Te llevas el Escudo Rubi? Son 1500 flurios a cambio de una defensa inexpugnable. Una ganga, no?\";\r\n\t\t\tbuyingArticles[1] = \"Compraras el Espadon? Bueno, desde hoy no hay enemigo que pueda resistir tu furia. Pobres bestias. Son 1750 flurios\";\r\n\t\t\tbuyingArticles[2] = \"Quieres iniciarte en el mundo de la magia? Una vez que domines los conocimientos arcanos, bastara una palabra de tus labios para que cualquier enemigo caiga a tus pies. Son 1000 flurios, por favor.\";\r\n\t\t\tbuyingArticles[3] = \"Esa piedra de costara 2500 flurios. No se para que la quieres si no pareces poder cargarla de energia magica. Pero bueno, eres libre de desperdiciar tu dinero.\";\r\n\t\t\tbuyingArticles[4] = \"Son 250 flurios por la pocion. Estoy pensando seriamente en subir el precio de estas cosas, dada la alta demanda ultimamente, asi que compra todas las que puedas ahora que estan baratas.\";\r\n\r\n\t\t\tnotEnough = \"Sin dinero, no hay objeto; asi de simple. Compra otro objeto o vete.\";\r\n\r\n\t\t\tsellingResponse = \"Quieres llevarnos a la bancarrota? No se en que mundo las tiendas podrian comprar toda la basura que traen los aventureros desde afuera de la ciudad.\";\r\n\r\n\t\t\trumours = new String[3];\r\n\t\t\trumours[0] = \"Con el pacto de proteccion mutua entre humanos y dragones roto, ya no hay nada que garantice nuestra seguridad. Es mas, los mismos dragones anti pactianos son una amenaza presente.\";\r\n\t\t\trumours[1] = \"Al parecer, los estudiantes de las escuelas magicas ya no pueden salir al bosque a buscar ingredientes para pociones. Ultimamente las bestias abundan fuera de la ciudad.\";\r\n\t\t\trumours[2] = \"El explorador en jefe del gremio ha organizado una nueva expedicion hacia el pico sagrado. Dicen que un dragon muy sabio vive alli, y podria ayudarnos a entender porque los dragones han deshecho el pacto de proteccion mutua.\";\r\n\r\n\t\t\tmisheard = new String[3];\r\n\t\t\tmisheard[0] = \"Que palabras mas raras utilizas, no te he entendido nada.\";\r\n\t\t\tmisheard[1] = \"Crees que podrias decirme eso en palabras normales?\";\r\n\t\t\tmisheard[2] = \"...\";\r\n\r\n\t\t\tfarewell = \"Adios, aventurero. Sal en silencio por favor, intentare seguir durmiendo.\";\r\n\t\t}\r\n\t}", "public void Onwin2(){\r\n xPos=0;\r\n yPos=0;\r\n indice = rand.nextInt(11);\r\n if(indice==12){indice2= indice-1;}\r\n else{indice2= indice+1;};\r\n\r\n\r\n texto.setText(\"\");\r\n texto.append(expressions[indice2]);\r\n texto1.setText(\"\");\r\n texto1.append(expressions[indice]);\r\n\r\n matrix=generateMatrix(Alphat,expressions[indice]);\r\n textoG.setText(\"\");\r\n for(int i=0;i<matrix.length;i++){\r\n textoG.append(matrix[i]+\"\\n\");\r\n }\r\n\r\n }", "@Override\n // Method that handles the event.\n public void handle(ActionEvent event) {\n text.setText(\"Buttons are cool!\");\n Random rand = new Random();\n // Change the color of the text to a random color.\n text.setFill(Color.rgb(rand.nextInt(256), rand.nextInt(256), rand.nextInt(256)));\n }", "public RandomEventText(Player player) {\n Player playerDummy = new Player(player);\n setPlayer(playerDummy);\n }", "public void act() {\n if (System.currentTimeMillis() - lastTime > 5000) {\n lastTime = System.currentTimeMillis();\n int y = (int)(Math.random() * ((BackGround1.height-30)+1)+30);\n int x = (int)(Math.random() * ((BackGround1.width-15)+1)+15);\n addObject(new Coin(),x ,y);\n }\n }", "public void actionPerformed(ActionEvent ae)\r\n\t\t\t\t\t{\n\t\t\t\t\t\ttheGridView.addTextBubble(basicAvatarData.getUsername(), \"This is another chat bubble!\", 100);\r\n\t\t\t\t\t}", "public void quest() {\n if ((int) (Math.random() * 100) > 50) {\n addStrangeCharacter();\n System.out.println(\"You found the npc to talk with\");\n if ((int) (Math.random() * 75) > 50) {\n addStrangeCharacter();\n System.out.println(\"And you beat the baws\");\n } else {\n System.out.println(\"And he baws owned you\");\n }\n } else {\n System.out.println(\"You couldn't even find the npc, lol n00b\");\n }\n }", "public void playGreeting() {\r\n\t\tSystem.out.println(\"Welcome to Daniel's Cinemagraph maker.\");\r\n\t\tSystem.out.println(\"This will only work for uncompressed gifs\");\r\n\t\tplayUsage();\r\n\t\t\r\n\t}", "public static void playRandomJump() {\n\t\t\n\t\tString[] jumpSoundArray = {\"jump1\", \"jump2\", \"jump3\", \"jump4\", \"jump5\"};\n\t\t\n\t\tint rnd = new Random().nextInt(jumpSoundArray.length);\n\t\tplaySound(jumpSoundArray[rnd], 1f);\n\t\t\n\t}", "public void displayRandomFakeTweet() {\n boolean decider;\n if (useGeoffChallen) {\n decider = random.nextBoolean();\n } else {\n decider = true;\n }\n if (decider) {\n List<twitter4j.Status> tweetsList = getter.getTweetsList();\n int randIndex;\n String tweet;\n\n // If this function is called as the first Tweet to be displayed, TweetGetter can't grab\n // tweets fast enough to display in time, causing tweetsList to have a size of 0. So instead\n // we'll just display a different quote\n try {\n randIndex = random.nextInt(tweetsList.size());\n tweet = tweetsList.get(randIndex).getText()\n .replace(\"[\", \"\")\n .replace(\"]\",\"\");\n tweetView.setText(tweet);\n } catch(IllegalArgumentException e) {\n String url = \"https://api.whatdoestrumpthink.com/api/v1/quotes/personalized?q=Bernie%20Sanders\";\n String objName = \"message\";\n displayFromJSON(url, objName);\n }\n } else {\n String url = \"https://api.whatdoestrumpthink.com/api/v1/quotes/personalized?q=Geoff%20Challen\";\n String objName = \"message\";\n displayFromJSON(url, objName);\n }\n\n }", "public void setupDemo() {\n\n Log.d(TAG, \"matching game setupdemo\");\n\n imageDemo = new ImageView(this);\n/*\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n tts.speak(\"Önce nesneleri taniyalim...\", TextToSpeech.QUEUE_FLUSH, null, null);\n }\n else{\n tts.speak(\"Önce nesneleri taniyalim...\", TextToSpeech.QUEUE_FLUSH, null);\n }*/\n\n rLayout = (RelativeLayout) findViewById(R.id.relative_layout);\n rLayout.setBackgroundColor(Color.GRAY);\n\n demoObjectObject = dbHandler.getDemoObjectObject(trainingID);\n\n final RelativeLayout.LayoutParams rLayParams = new RelativeLayout.LayoutParams(height/3, height/3);\n\n //putting middle to show demo of items in each iteration\n rLayParams.addRule(RelativeLayout.CENTER_HORIZONTAL);\n rLayParams.addRule(RelativeLayout.CENTER_IN_PARENT);\n\n final Handler handler = new Handler();\n\n for (int i = 0; i < demoObjectObject.size(); i++) {\n // Log.d(TAG, \"for i=\"+ i);\n\n speech = null;\n final int finalI = i;\n handler.postDelayed(new Runnable() {\n\n @Override\n public void run() {\n ObjectObject demoObject = new ObjectObject();\n demoObject = demoObjectObject.get(finalI);\n\n // Log.d(TAG,\"Bu nesnenin şekli \"+dbHandler.getShapeName(demoObject.getShapeID())+\n // \" rengi ise\"+dbHandler.getColorName(demoObject.getColorID())+\"id: \"+demoObject.getObjectID());\n\n\n speech = KEY_THIS + \", \" + dbHandler.getColorName(demoObject.getColorID()) + KEY_AN + \" \" + dbHandler.getShapeName(demoObject.getShapeID());\n Log.d(TAG, speech);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n tts.speak(speech, TextToSpeech.QUEUE_FLUSH, null, null);\n } else {\n tts.speak(speech, TextToSpeech.QUEUE_FLUSH, null);\n }\n\n imgBytes = demoObject.getObjectImageBlob();\n bmp = BitmapFactory.decodeByteArray(imgBytes, 0, imgBytes.length);\n\n imageDemo.setImageBitmap(bmp);\n rLayout.removeAllViews();\n //// TODO: 5/17/2016 background color degistir ki uyumlu olsun nesne ile karismasin rengi,zittini al\n rLayout.addView(imageDemo, rLayParams);\n }\n }, 5000 * i);\n\n // Log.d(TAG, \"3000i sonrasi\");\n/* Thread thread= new Thread(){\n @Override\n public void run(){\n try {\n Log.d(TAG, \"matching game inside thread\");\n wait(demoObjectObject.size() * 5000);\n setupForGame();\n }\n catch(InterruptedException e){\n e.printStackTrace();\n }\n }\n thread.start();*/\n }//for end\n\n handler.postDelayed(new Runnable() {\n\n @Override\n public void run() {\n Log.d(TAG, \"SECond handler\");\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n tts.speak(\"Eğitiminiz şimdi başlıyor...\", TextToSpeech.QUEUE_FLUSH, null, null);\n } else {\n tts.speak(\"Eğitiminiz şimdi başlıyor...\", TextToSpeech.QUEUE_FLUSH, null);\n }//// TODO: 5/22/2016 bunlari okuyamiyor süre yetmiyor cunku. bir wait lazim sanki\n\n //setupForGame();\n }\n }, 5000 * demoObjectObject.size());\n // setupForGame();\n\n handler.postDelayed(new Runnable() {\n\n @Override\n public void run() {\n Log.d(TAG, \"third handler\");\n setupForGame();\n }\n }, 5000 * demoObjectObject.size()+6000);\n\n Log.d(TAG, \"setupdemo end\");\n }", "public void playHoomans() {\r\n System.out.println(\"Thanks for killing each other, human!\");\r\n }", "private void play() {\n //play a new game\n\n g=rando.nextInt(database.length);\n String newWord = database[g];\n while(newWord.equals(currentWord))\n {\n g=rando.nextInt(database.length); //random word is chosen diffferent from prev. word.\n newWord = database[g];\n }\n\n currentWord = newWord; //update current word.\n\n\n cViews = new TextView[currentWord.length()];\n wLayout.removeAllViews();\n int i=0;\n while(i!=currentWord.length()){\n cViews[i] = new TextView(this);\n cViews[i].setText(\"\" + currentWord.charAt(i));\n LayoutParams lp=new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n cViews[i].setLayoutParams(lp);\n\n cViews[i].setGravity(Gravity.CENTER);\n cViews[i].setTextColor(Color.WHITE); //word is present but in white color.\n cViews[i].setBackgroundResource(R.drawable.l_bg);\n //add to layout\n wLayout.addView(cViews[i]);\n i++;\n }\n\n lAdapt=new LAdapter(this);\n letters.setAdapter(lAdapt); //adding letter butttons dynamically.\n\n currentPart=0;\n numChars=currentWord.length();\n numCorrect=0;\n\n for(int p = 0; p < numParts; p++) {\n arr[p].setVisibility(View.INVISIBLE); //set all body parts to invisible\n }\n\n // pop();\n\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\tMusicPlayerContainer.this.adjustInfoTextViewAlpha();\r\n\t\t}", "private String creatNewText() {\n\t\tRandom rnd = new Random();\n\t\treturn \"Some NEW teXt U9\" + Integer.toString(rnd.nextInt(999999));\n\t}", "public void animationPlayer1ATK(TextView texto, int flag_ataque, String damage_done){\n animation = AnimationUtils.loadAnimation(context,R.anim.anim_atacar_player1);\n imagePlayer1.startAnimation(animation);\n animationTakeHit(imagePlayer2);\n animationText(texto, flag_ataque, damage_done);\n }", "public void changeLivesDisplay()\r\n {\r\n removeObject(text);\r\n //Add the lives text\r\n text = new Text(\"Lives: \" + health);\r\n addObject(text, 60, 15);\r\n }", "@Override\n public void showPopUpExplanation(String message, int gravity) {\n LayoutInflater inflater = (LayoutInflater)\n getSystemService(LAYOUT_INFLATER_SERVICE);\n\n if(inflater != null) {\n View popupView = inflater.inflate(R.layout.pop_up_explanation, null);\n\n TypeWriter textView = popupView.findViewById(R.id.text_pop_up_explanation);\n\n textView.setText(\"\");\n textView.setCharacterDelay(10);\n textView.animateText(message);\n\n // create the popup window\n int width = ConstraintLayout.LayoutParams.WRAP_CONTENT;\n int height = ConstraintLayout.LayoutParams.WRAP_CONTENT;\n boolean focusable = true; // lets taps outside the popup also dismiss it\n popupWindow = new PopupWindow(popupView, width, height, focusable);\n popupWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n\n // show the popup window\n popupWindow.showAtLocation(findViewById(android.R.id.content), gravity, 0, 0);\n\n popupWindow.setAnimationStyle(android.R.style.Animation_Dialog);\n\n // dismiss the popup window when touched\n popupView.setOnTouchListener((v, event) -> {\n popupWindow.dismiss();\n return true;\n });\n }\n }", "private void generateImage()\r\n {\n String[] letters = imgInfo.get(level-1).getWord().split(\" \");\r\n numOfLetter = letters.length;\r\n String newLetter = \"\";\r\n int counter=0;\r\n for(String s: letters) {\r\n newLetter += s;\r\n numOfAlpha[counter] = s.length();\r\n counter++;\r\n }\r\n charAns = new ArrayList<Character>();\r\n charAns2 = newLetter.toCharArray();\r\n letterBtnLen = 0;\r\n for (int i =0;i<newLetter.length();i++) {\r\n if(charAns.indexOf(charAns2[i]) == -1) {\r\n charAns.add(charAns2[i]);\r\n letterBtnLen++;\r\n }\r\n }\r\n int ranNum,i=0;\r\n letterBtn = new char[letterBtnLen];\r\n while(!charAns.isEmpty())\r\n {\r\n ranNum =(int) (Math.random()* charAns.size());\r\n letterBtn[i] = charAns.get(ranNum);\r\n String strAns = String.valueOf(charAns.get(ranNum));\r\n letter[i].setText(strAns);\r\n charAns.remove(ranNum);\r\n i++;\r\n }\r\n }", "@Override\n public void onClick(View v) {\n\n\n txtAndroid.animate().scaleX(0.2f).scaleY(0.4f).setDuration(3000);\n }", "public void animationPlayer2ATK(TextView texto, int flag_ataque, String damage_done){\n animation = AnimationUtils.loadAnimation(context,R.anim.anim_atacar_player2);\n imagePlayer2.startAnimation(animation);\n animationTakeHit(imagePlayer1);\n animationText(texto, flag_ataque, damage_done);\n }", "@Override\n protected void init() {\n lastHorizontalDirection = direction = Math.random() < 0.5 ? Direction.LEFT : Direction.RIGHT;\n lastVerticalDirection = Direction.UP;\n setBody(new PolygonShape(BODY_WIDTH2, BODY_HEIGHT2), Body.Mode.CHARACTER);\n body().restitution = 0.0;\n size().set(WIDTH, HEIGHT);\n\n this.addAnimation(\"walk\")\n .addFrames(\"smick\", 4, 5, 0, 2)\n .setSpeed(10)\n .loop(true);\n this.addAnimation(\"eatRadish\")\n .addFrames(\"smick\", 4, 5, 8, 9)\n .setSpeed(10)\n .loop(true);\n this.addAnimation(\"eatHector\")\n .addFrames(\"smick\", 4, 5, 10, 10)\n .setSpeed(10)\n .loop(true);\n this.addAnimation(\"jump\")\n .addFrames(\"smick\", 4, 5, 11, 11)\n .setSpeed(10)\n .loop(false);\n this.addAnimation(\"climb\")\n .addFrames(\"smick\", 4, 5, 12, 13)\n .setSpeed(10)\n .loop(false);\n this.addAnimation(\"eatHectorOnRope\")\n .addFrames(\"smick\", 4, 5, 14, 14)\n .setSpeed(10)\n .loop(false);\n this.addAnimation(\"crushing\")\n .addFrames(\"smick\", 4, 5, 16, 16)\n .setSpeed(10)\n .loop(false);\n }", "@Override\n public void eatLeaves()\n {\n setEatText(\"munch munch oink\");\n System.out.println(getEatText());\n }", "private void playAnime(){\r\n\t\ttry{\r\n\t\t\tif (event.equals(\"Falling Player\")){\r\n\t\t\t\tfilePath = \"Animations/FallingPlayer.gif\";\r\n\t\t\t}\r\n\t\t\telse if (event.equals(\"Hungry Wumpus\")){\r\n\t\t\t\tfilePath = \"Animations/HungryWumpusAnime.gif\";\r\n\t\t\t}\r\n\t\t\telse if (event.equals(\"Dead Wumpus Classical\")){\r\n\t\t\t\tfilePath = \"Animations/DeadWumpus_Classical.gif\";\r\n\t\t\t}\r\n\t\t\telse if (event.equals(\"Dead Wumpus Space\")){\r\n\t\t\t\tfilePath = \"Animations/DeadWumpus_Space.gif\";\r\n\t\t\t}\r\n\t\t\telse if (event.equals(\"Dead Wumpus Western\")){\r\n\t\t\t\tfilePath = \"Animations/DeadWumpus_Western.gif\";\r\n\t\t\t}\r\n\t\t\telse if (event.equals(\"Arrow Shooting\")){\r\n\t\t\t\tfilePath = \"Animations/ArrowAnimation.gif\";\r\n\t\t\t}\r\n\t\t\telse if (event.equals(\"Bat Taking Player\")){\r\n\t\t\t\tfilePath = \"Animations/BatTakingPlayerAnimation.gif\";\r\n\t\t\t}\r\n\t\t\telse if (event.equals(\"Bullet Shooting\")){\r\n\t\t\t\tfilePath = \"Animations/BulletAnimation.gif\";\r\n\t\t\t}\r\n\t\t\telse if (event.equals(\"Dead Wumpus\")){\r\n\t\t\t\tfilePath = \"Animations/DeadWumpusAnimation.gif\";\r\n\t\t\t}\r\n\t\t\telse if (event.equals(\"Player Got Killed\")){\r\n\t\t\t\tfilePath = \"Animations/PlayerGotKilled.gif\";\r\n\t\t\t}\r\n\t\t\telse if (event.equals(\"Starved Player\")){\r\n\t\t\t\tfilePath = \"Animations/StarvingPlayerAnimation.gif\";\r\n\t\t\t}\r\n\t\t\telse if (event.equals(\"Laser Beam\")){\r\n\t\t\t\tfilePath = \"Animations/LaserBeam.gif\";\r\n\t\t\t}\r\n\t\t\tthis.image = new ImageIcon(filePath);\r\n\t\t\t\r\n\t\t\tthis.animeLabel.setIcon(image);\r\n\t\t\tm.validate();\r\n\t\t}\r\n\t\tcatch(Exception exception){\r\n\t\t\texception.printStackTrace();\r\n\t\t}\r\n\t}", "private void showAnimation() {\n // play voice, and start animation\n if (message.getDirect() == HTMessage.Direct.RECEIVE) {\n voiceIconView.setImageResource(+R.anim.voice_from_icon);\n } else {\n voiceIconView.setImageResource(+R.anim.voice_to_icon);\n }\n voiceAnimation = (AnimationDrawable) voiceIconView.getDrawable();\n voiceAnimation.start();\n }", "@Override\r\n public String speak() {\r\n String word = \"\";\r\n Time.getInstance().time += 1;\r\n if (Time.getInstance().time == 1) {\r\n word = \"One day Neznaika decided to become an artist.\";\r\n }\r\n if (Time.getInstance().time == 101) {\r\n word = \"This story happened once day with Neznaika.\";\r\n }\r\n if (Time.getInstance().time == 201) {\r\n word = \"One day Neznaika wanted to become a musician.\";\r\n }\r\n if (Time.getInstance().time == 401) {\r\n word = \"One day Neznaika wanted to become a poet.\";\r\n }\r\n System.out.println(word);\r\n return word;\r\n }", "private void displayMessage5(String message) {\n TextView agricycleReadMore = (TextView) findViewById(R.id.read_more5);\n agricycleReadMore.setTextColor(Color.BLACK);\n agricycleReadMore.setText(message);\n agricycleReadMore.setGravity(Gravity.CENTER);\n }", "public void jumpMsgStartJump(String msg) {\n if (!TextUtils.isEmpty(msg)\n && (System.currentTimeMillis() - msgPopStartTime > MSG_POP_DELAY)) {\n msgPopStartTime = System.currentTimeMillis();\n jumpMsg.setVisibility(VISIBLE);\n jumpMsg.setText(msg);\n\n TranslateAnimation jumpAnimation = new TranslateAnimation(0, 0, -300, 0);\n jumpAnimation.setFillAfter(true);\n jumpAnimation.setInterpolator(new BounceInterpolator());\n jumpAnimation.setDuration(500);\n\n AlphaAnimation alphaAnimation = new AlphaAnimation(1, 0);\n alphaAnimation.setDuration(1500);\n alphaAnimation.setFillEnabled(true);\n alphaAnimation.setAnimationListener(new Animation.AnimationListener() {\n @Override\n public void onAnimationStart(Animation animation) {\n\n }\n\n @Override\n public void onAnimationEnd(Animation animation) {\n jumpMsg.setText(\"\");\n jumpMsg.setVisibility(INVISIBLE);\n }\n\n @Override\n public void onAnimationRepeat(Animation animation) {\n\n }\n });\n\n AnimationSet animationSet = new AnimationSet(false);\n animationSet.addAnimation(jumpAnimation);\n animationSet.addAnimation(alphaAnimation);\n jumpMsg.startAnimation(animationSet);\n }\n }", "private void displayMessage3(String message) {\n TextView iDropWaterReadMore = (TextView) findViewById(R.id.read_more3);\n iDropWaterReadMore.setTextColor(Color.BLACK);\n iDropWaterReadMore.setText(message);\n iDropWaterReadMore.setGravity(Gravity.CENTER);\n }", "public void speak(){\n System.out.println(\"Smile and wave boys. Smile and wave.\");\n }", "private void drawHangman() {\n\t\tupdateTextBox();\n \tif(lastImage!=null)\n\t\t\tboard.getChildren().remove(lastImage);\n \tint tries = game.getTries();\n \tSystem.out.println(\"Retrieving image from images/\" + tries + \".png\");\n \tImage img = new Image(\"images/\" + tries + \".png\");\n\t\tImageView imgView = new ImageView(img);\n\t\tlastImage = imgView;\n\t\tboard.getChildren().add(imgView);\n\t}", "EmoteTransmitter getEmoteTransmitter();", "SimulatedAnnealing() {\n generator = new Random(System.currentTimeMillis());\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\t\tgotoLiveView(pattern,sound_cache);\r\n\t\t\t\t\t\t\t\t\t\t}", "public void createText(long earnings,MotionEvent event){\n final ConstraintLayout framelayout = activity.findViewById(R.id.zoomView);\n final FrameLayout applayout = new FrameLayout(activity);\n ConstraintLayout.LayoutParams mParams = new ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.WRAP_CONTENT, ConstraintLayout.LayoutParams.WRAP_CONTENT*2);\n final TextView popuptext = new TextView(activity);\n int x = (int) event.getX()/2-10;\n int y = (int) event.getY()/2-10;\n int planetx = (int) planet.getX();\n int planety = (int) planet.getY();\n //popup text for money earned\n if (x != 0 && y != 0) {\n applayout.setLayoutParams(mParams);\n int ranx = random.nextInt(100);\n int rany = random.nextInt(100);\n applayout.setPadding(x + planetx + ranx, y + planety + rany, 0, 0);\n popuptext.setLayoutParams(mParams);\n String gain = \"+\"+MainActivity.calculateCash(earnings);\n popuptext.setText(gain);\n popuptext.setTextSize(25);\n popuptext.setTextColor(Color.parseColor(\"#39FF14\"));\n popuptext.setShadowLayer(10,0,0,Color.BLACK);\n applayout.addView(popuptext);\n framelayout.addView(applayout);\n\n Animation animSlide = AnimationUtils.loadAnimation(activity.getApplicationContext(), R.anim.slide);\n animSlide.setAnimationListener(new Animation.AnimationListener() {\n @Override\n public void onAnimationStart(Animation animation) {\n }\n @Override\n public void onAnimationEnd(Animation animation) {\n popuptext.setVisibility(View.GONE);\n //Create handler on the current thread (UI thread)\n Handler h = new Handler();\n //Run a runnable after 100ms (after that time it is safe to remove the view)\n h.postDelayed(new Runnable() {\n @Override\n public void run() {\n framelayout.removeView(applayout);\n\n }\n }, 100);\n }\n @Override\n public void onAnimationRepeat(Animation animation) {\n }\n });\n\n applayout.startAnimation(animSlide);\n }\n }", "public static void main(String[] args) {\n MeepMeep mm = new MeepMeep(800)\n // Set field image\n .setBackground(MeepMeep.Background.FIELD_ULTIMATE_GOAL_DARK)\n // Set theme\n .setTheme(new ColorSchemeRedDark())\n // Background opacity from 0-1\n .setBackgroundAlpha(1f)\n // Set constraints: maxVel, maxAccel, maxAngVel, maxAngAccel, track width\n .setConstraints(99, 30, Math.toRadians(37.74), Math.toRadians(60), 37)\n .followTrajectorySequence(drive ->\n drive.trajectorySequenceBuilder(new Pose2d(-60, 48, 0))\n .lineTo(new Vector2d(56, 48))\n .addTemporalMarker(15.0,() -> {\n // do stuff\n })\n// .lineToConstantHeading(new Vector2d(56, 48))\n //drop wobble\n// .lineToConstantHeading(new Vector2d(56, 19))\n .addDisplacementMarker(() -> {\n // drop wobble goal\n //return Unit.INSTANCE;\n })\n .waitSeconds(1.5)\n // Get to wobble goal\n .lineToSplineHeading(new Pose2d(-12, 19, Math.toRadians(0)))\n // slowly approach wobble goal\n .lineTo(new Vector2d(-27, 19), new TranslationalVelocityConstraint(5))\n // grab wobble goal\n .addDisplacementMarker(() -> {\n // grab wobble goal\n //return Unit.INSTANCE;\n })\n .waitSeconds(2.0)\n .strafeTo(new Vector2d(56, 19))\n .lineToLinearHeading(new Pose2d(56, 36, Math.toRadians(-90)))\n .addDisplacementMarker(() -> {\n // drop wobble goal\n //return Unit.INSTANCE;\n })\n .strafeTo(new Vector2d(56, 30))\n .strafeTo(new Vector2d(12, 30))\n .waitSeconds(1.0)\n .build()\n )\n .start();\n\n/*\n\n .lineTo(new Vector2d(12, 48))\n .splineToConstantHeading(new Vector2d(12, 19), Math.toRadians(0))\n .splineToConstantHeading(new Vector2d(-18, 19), Math.toRadians(0))\n .lineTo(\n new Vector2d(-27, 19)\n// SampleMecanumDrive.getVelocityConstraint(slowerVelocity, DriveConstants.MAX_ANG_VEL, DriveConstants.TRACK_WIDTH),\n// SampleMecanumDrive.getAccelerationConstraint(DriveConstants.MAX_ACCEL)\n )\n .splineToConstantHeading(new Vector2d(12, 19), Math.toRadians(0))\n .splineToLinearHeading(new Pose2d(12, 36, Math.toRadians(-90)), Math.toRadians(0))\n .start()\n */\n }", "@Override\n public void onTick(long millisUntilFinished) {\n\n odliczanie2--;\n Animation animationprzyciski= AnimationUtils.loadAnimation(getApplicationContext(),R.anim.mixed_anim);\n odliczanie.startAnimation(animationprzyciski);\n odliczanie.setText(odliczanie2+\"\");\n\n }", "@Override\n public void mutate(Song song, int noteIndex) {\n if (Math.random() < this.getProbability()) {\n if (noteIndex > 0) {\n MidiUtil mu = new MidiUtil();\n int nbrOfTotalReversing = nbrOfAdditionalReversing + 1\n + ((int) Math.random() * nbrRange);\n ArrayList<Integer> noteIndexes = new ArrayList<Integer>();\n ArrayList<Note> notes = new ArrayList<Note>();\n noteIndexes.add(noteIndex);\n notes.add(song.getScore().getPart(0).getPhrase(0)\n .getNote(noteIndex));\n int currentIndex = noteIndex - 1;\n noteIteration: for (int i = 1; i < nbrOfTotalReversing; i++) {\n while (mu.isBlank(currentIndex) && currentIndex >= 0) {\n currentIndex--;\n }\n if (currentIndex < 0) {\n break noteIteration;\n } else {\n noteIndexes.add(currentIndex);\n notes.add(song.getScore().getPart(0).getPhrase(0)\n .getNote(currentIndex));\n }\n }\n int totalReverses = noteIndexes.size();\n for (int j = 0; j < noteIndexes.size(); j++) {\n if (withRhythmLength) {\n song.getScore()\n .getPart(0)\n .getPhrase(0)\n .setNote(notes.get(totalReverses - 1 - j),\n noteIndexes.get(j));\n } else {\n int newPitch = notes.get(totalReverses - 1 - j)\n .getPitch();\n song.getScore().getPart(0).getPhrase(0)\n .getNote(noteIndexes.get(j)).setPitch(newPitch);\n }\n }\n }\n }\n }", "public void shield_random_start() {\n\t\tint randomX;\n\t\tint randomY;\n\t\twhile (true) {\n\t\t\trandomX = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomY = (int)(1 + Math.random()*labirinto.getSize());\n\t\t\trandomX--;\n\t\t\trandomY--;\n\t\t\tif (labirinto.getLab()[randomX][randomY] == ' ')\n\t\t\t\tbreak;\n\t\t}\n\t\tescudo.setX_coord(randomX); \n\t\tescudo.setY_coord(randomY);\n\t\tchange_escudo_pos();\n\t}", "public void run() {\n \t canvas.reset();\n \t rg = RandomGenerator.getInstance();\n int index = rg.nextInt(0,9);\n hang = new HangmanLexicon();\n \n //word = hang.getWord(index);\n try{\n BufferedReader br = new BufferedReader(new FileReader(\"HangmanLexicon.txt\"));\n \n while(true){\n \t String line = br.readLine();\n \t if(line == null)\n \t\t continue;\n \t ArrayList<String> kt = new ArrayList<String>();\n \t \n \t \n \t \n }\n for(int k = 0; k < word.length();k++){\n \t t = t + \"-\";\n \t \n }\n \n \twhile(counter >=0){\n \t\n \tsetup();\n \t\n \t\n \t\n \t\n \t}\n \t\n\t}\n\n \n private void setup(){\n \t\n \t\n \t\n \t\n \n int k = word.length();\n \n int i = 65;\n int temp = rg.nextInt(0,25);\n \tchar c = (char)(i + temp);\n \tboolean presentcharacter = false;\n \n \tcanvas.displayWord(t);\n \tSystem.out.println(\"you have only \" + counter + \" cases left\");\n System.out.println(\"Your Guess \"+ c);\n for(int j = 0; j<word.length();j++){\n \t\t\n \t\tif(word.charAt(j) == c){\n \t\t\tpresentcharacter = true;\n \t\t\tk--;\n \t\t}\n \t}\n \t\n \t\n \n \tif(presentcharacter){\n \t\tfor(int num = 0; num<word.length();num++){\n \t\t\tif(word.charAt(num) == c){\n \t\t\t\tSystem.out.println(\"you guessed it right\");\n \t\t\t\tt = t.substring(0,num) +c +t.substring(num+1,t.length());\n \t\t\t \t\n \t\t\t}\n \t\t\t\n \t\t}\n \t\t\n \t\t\n \t\t\n \t\t\n \t}\n \t\n \t\tcanvas.noteIncorrectGuess(c, counter);\n \t\t\n \t\t\n \t\n \tcounter--;\n \n \n \t if(k == 0){\n \t \t\n \t \tSystem.out.println(\"you have won this game\");\n \t \tSystem.out.println(\"Congratulations\");\n return; \t \t\n \t \t\n \t \t\n \t }\n \n }\n \n \n\n private String t = \"\" ;\n public String word;\npublic int counter = 8;\n private HangmanLexicon hang;\n private RandomGenerator rg;\n}", "public void display() {\n float dRadial = reactionRadialMax - reactionRadial;\n if(dRadial != 0){\n noStroke();\n reactionRadial += abs(dRadial) * radialEasing;\n fill(255,255,255,150-reactionRadial*(255/reactionRadialMax));\n ellipse(location.x, location.y, reactionRadial, reactionRadial);\n }\n \n // grow text from point of origin\n float dText = textSizeMax - textSize;\n if(dText != 0){\n noStroke();\n textSize += abs(dText) * surfaceEasing;\n textSize(textSize);\n }\n \n // draw agent (point)\n fill(255);\n pushMatrix();\n translate(location.x, location.y);\n float r = 3;\n ellipse(0, 0, r, r);\n popMatrix();\n noFill(); \n \n // draw text \n textSize(txtSize);\n float lifeline = map(leftToLive, 0, lifespan, 25, 255);\n if(mouseOver()){\n stroke(229,28,35);\n fill(229,28,35);\n }\n else {\n stroke(255);\n fill(255);\n }\n \n text(word, location.x, location.y);\n \n // draw connections to neighboars\n gaze();\n }", "@Override\n public void run() {\n while (true) {\n try {\n String text = broadcastTexts.take();\n for (int i = 0; i < 2; i++) {\n switch (text.substring(0, 1).hashCode()) {\n case 65:\n createMediaPlayForSound(R.raw.a).start();\n break;\n case 66:\n createMediaPlayForSound(R.raw.b).start();\n break;\n case 67:\n createMediaPlayForSound(R.raw.c).start();\n break;\n case 68:\n createMediaPlayForSound(R.raw.d).start();\n break;\n case 69:\n createMediaPlayForSound(R.raw.e).start();\n break;\n case 70:\n createMediaPlayForSound(R.raw.f).start();\n break;\n case 71:\n createMediaPlayForSound(R.raw.g).start();\n break;\n case 72:\n createMediaPlayForSound(R.raw.h).start();\n break;\n case 73:\n createMediaPlayForSound(R.raw.i).start();\n break;\n default:\n break;\n }\n Thread.sleep(300);\n for (char b : text.substring(1, text.length()).toCharArray()) {\n switch (b) {\n case 48:\n createMediaPlayForSound(R.raw.n0).start();\n break;\n case 49:\n createMediaPlayForSound(R.raw.n1).start();\n break;\n case 50:\n createMediaPlayForSound(R.raw.n2).start();\n break;\n case 51:\n createMediaPlayForSound(R.raw.n3).start();\n break;\n case 52:\n createMediaPlayForSound(R.raw.n4).start();\n break;\n case 53:\n createMediaPlayForSound(R.raw.n5).start();\n break;\n case 54:\n createMediaPlayForSound(R.raw.n6).start();\n break;\n case 55:\n createMediaPlayForSound(R.raw.n7).start();\n break;\n case 56:\n createMediaPlayForSound(R.raw.n8).start();\n break;\n case 57:\n createMediaPlayForSound(R.raw.n9).start();\n break;\n }\n Thread.sleep(300);\n }\n createMediaPlayForSound(R.raw.end).start();\n Thread.sleep(1000);\n }\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }", "private void randomBehavior() {\n\t\trandom = rand.nextInt(50);\n\t\tif (random == 0) {\n\t\t\trandom = rand.nextInt(4);\n\t\t\tswitch (random) {\n\t\t\t\tcase 0:\n\t\t\t\t\tchangeFacing(ACTION.DOWN);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tchangeFacing(ACTION.RIGHT);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchangeFacing(ACTION.UP);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tchangeFacing(ACTION.LEFT);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void shuffle () {\n this.lives = 6;\n this.attempts.clear();\n this.victory = false;\n this.lose = false;\n Random r = new Random ();\n this._word = _dictionary[r.nextInt(_dictionary.length)];\n // this._word = _dictionary[2]; // Testing purposes\n this.hint.setLength(0);\n for (int i = 0; i < _word.length(); i++) {\n this.hint.append(\"_ \");\n } \n }", "public abstract SpannableString getText(long presentationTimeUs);", "@Override\r\n\tpublic void Received(Object o, String msg) {\n\t\tif(interval == 50){\r\n\t\t\tfor(int i = 0; i < 50; i++){\r\n\t\t\t\tif(i == 0){\r\n\t\t\t\t\ttext[i] = null;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttext[i-1] = text[i];\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\ttext[interval-1] = msg;\r\n\t\t}else{\r\n\t\t\ttext[interval] = msg;\r\n\t\t\tinterval++;\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void paint(Graphics g) {\n\t\tg.setColor(new Color((int)(Math.random() * 255),(int)(Math.random() * 255) , (int)(Math.random() * 255)));\r\n\t\tg.setFont(new Font(\"궁서\", Font.BOLD, 50));\r\n\t\t\r\n\t\tint n = (int) (Math.random() * 4);\r\n\t\tg.drawString(ss[n], x, y);\r\n\t}", "public void lPressed(View v) {\n //user has pressed a letter to guess\n\n String ltr=((TextView)v).getText().toString();\n char letterChar = ltr.charAt(0);\n\n v.setEnabled(false);\n // v.setBackgroundResource(R.drawable.l_down);\n\n int hang=0;\n int k=0;\n while(k!=currentWord.length()){\n if(currentWord.charAt(k)==letterChar){\n hang=1;\n numCorrect++;\n cViews[k].setTextColor(Color.RED); //change color to red.\n }\n k++;\n }\n\n String t=currentWord;\n if(hang==1){\n if(numCorrect==numChars){\n\n int numLetters = letters.getChildCount();\n for (int i = 0; i < numLetters; i++) {\n letters.getChildAt(i).setEnabled(false);\n }\n play();\n //dialog box that you won\n AlertDialog.Builder wins = new AlertDialog.Builder(this);\n wins.setTitle(\"CONGRATS !!!\");\n wins.setMessage(\"You win!\\n\\nThe answer was : \" + t);\n wins.setPositiveButton(\"Play Again\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n MainActivity.this.play();\n }\n });\n wins.setNegativeButton(\"Exit\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n MainActivity.this.finish();\n }\n });\n wins.show();\n }\n\n }\n else if (currentPart < numParts) {\n\n if(currentPart==1){ //adding hint 1\n\n switch(g) {\n case 0:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Have you heard of CrANBERRies?\", Toast.LENGTH_SHORT).show();\n break;\n case 1:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Also known as city of David\", Toast.LENGTH_SHORT).show();\n break;\n case 2:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Dalai Lama is bad (No offence) \", Toast.LENGTH_SHORT).show();\n break;\n case 3:\n Toast.makeText(getApplicationContext(), \"Hint 1 : WELL ! A makING TON\", Toast.LENGTH_SHORT).show();\n break;\n case 4:\n Toast.makeText(getApplicationContext(), \"Hint 1 : According to sources, Hamsters live near dam\", Toast.LENGTH_SHORT).show();\n break;\n case 5:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Student wish pumkin had fallen !!!\", Toast.LENGTH_SHORT).show();\n break;\n case 6:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Think this anwer relatively !!\", Toast.LENGTH_SHORT).show();\n break;\n case 7:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Nearnight is antonym of ...\", Toast.LENGTH_SHORT).show();\n break;\n case 8:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Eureka !!!\", Toast.LENGTH_SHORT).show();\n break;\n case 9:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Did you try pressing a button other than an alphabet !!!\", Toast.LENGTH_SHORT).show();\n break;\n case 10:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Windowless !!!\", Toast.LENGTH_SHORT).show();\n break;\n case 11:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Dora is fed up with Windows !!\", Toast.LENGTH_SHORT).show();\n break;\n case 12:\n Toast.makeText(getApplicationContext(), \"Hint 1 : DEBI is AN eclyomologocalysticalisyisac.\", Toast.LENGTH_SHORT).show();\n break;\n case 13:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Short form of 'generation too' !!!\", Toast.LENGTH_SHORT).show();\n break;\n case 14:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Answer also matches with a Hindu goddess.\", Toast.LENGTH_SHORT).show();\n break;\n case 15:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Beth bought a MAC !!\", Toast.LENGTH_SHORT).show();\n break;\n case 16:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Let hamburger be eaten by Prince of Denmark !!\", Toast.LENGTH_SHORT).show();\n break;\n case 17:\n Toast.makeText(getApplicationContext(), \"Hint 1 : King of vampires !!\", Toast.LENGTH_SHORT).show();\n break;\n case 18:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Oath should be made as Hello is made !!!\", Toast.LENGTH_SHORT).show();\n break;\n case 19:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Are you hungry. Then don't mock others !!!\", Toast.LENGTH_SHORT).show();\n break;\n case 20:\n Toast.makeText(getApplicationContext(), \"Hint 1 : He was assassinated\", Toast.LENGTH_SHORT).show();\n break;\n case 21:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Also known as Uncle Abe !!!\", Toast.LENGTH_SHORT).show();\n break;\n case 22:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Is your BeltLoose?\", Toast.LENGTH_SHORT).show();\n break;\n case 23:\n Toast.makeText(getApplicationContext(), \"Hint 1 : He was clever-and..he drank a lot of watel !!!\", Toast.LENGTH_SHORT).show();\n break;\n\n case 24:\n Toast.makeText(getApplicationContext(), \"Hint 1 : Also known as Barry !!!\", Toast.LENGTH_SHORT).show();\n break;\n\n\n }\n arr[currentPart].setVisibility(View.VISIBLE);\n currentPart++;\n }\n\n\n\n\n else if(currentPart==3){ //displaying hint 2\n if(g/5==0)\n {\n Toast.makeText(getApplicationContext(), \"Hint 2 : A capital city!\", Toast.LENGTH_SHORT).show();\n }\n else if(g/5==1)\n {\n Toast.makeText(getApplicationContext(), \"Hint 2 : A Scientist!\", Toast.LENGTH_SHORT).show();\n }\n else if(g/5==2)\n {\n Toast.makeText(getApplicationContext(), \"Hint 2 : A Linux system!\", Toast.LENGTH_SHORT).show();\n }\n else if(g/5==3)\n {\n Toast.makeText(getApplicationContext(), \"Hint 2 : A novel!\", Toast.LENGTH_SHORT).show();\n }\n else if(g/5==4)\n {\n Toast.makeText(getApplicationContext(), \"Hint 2 : An American president!\", Toast.LENGTH_SHORT).show();\n }\n arr[currentPart].setVisibility(View.VISIBLE);\n currentPart++;\n }\n else {\n arr[currentPart].setVisibility(View.VISIBLE);\n currentPart++;\n }\n }\n else{\n int numLetters = letters.getChildCount();\n for (int i = 0; i < numLetters; i++) {\n letters.getChildAt(i).setEnabled(false);\n }\n play();\n //dialog box displaying when u lose\n AlertDialog.Builder lose = new AlertDialog.Builder(this);\n lose.setTitle(\"TRY AGAIN\");\n lose.setMessage(\"You lose!\\n\\nThe answer was : \"+t);\n lose.setPositiveButton(\"Play Again\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n MainActivity.this.play();\n }});\n\n lose.setNegativeButton(\"Exit\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n MainActivity.this.finish();\n }});\n\n lose.show();\n }\n\n }", "public static Event alienInvasion () {\n\t\tString alienText = \"Something has gone wrong!\" + System.lineSeparator() + \"Aliens are here to steal your farm\";\n\t\tString alienImage = \"images/event/aliens.jpg\";\n\t\tString[] alienOpTitle = {\"Oh no!\",\"The truth is out there\"};\n\t\tString[] alienOpText = {\"The farm is lost\", \"Cattle is mutilated\"+ System.lineSeparator() + \"50 % chance of abduction\"};\n\t\treturn new Event (-1, \"Alien Invasion!\", alienText , alienImage, alienOpTitle, alienOpText);\n\t}", "@Override\n\tpublic void eat() {\n\t\tsuper.eat();\n\t\tSystem.out.println(\"喝奶.......\");\n\t}", "private void makeMedicine() {\n\t\teating = true;\n\t\ttama.setLayoutX(200);\n\n\t\tmedicine = new Sprite(3, 3, 540, 478, new Image(\"file:./res/images/hearts.png\"), 1, 2100);\n\t\tmedicine.setLayoutX(150);\n\t\tmedicine.setLayoutY(150);\n\t\tmedicine.setScaleX(0.3);\n\t\tmedicine.setScaleY(0.3);\n\t\tgrid.getChildren().addAll(medicine);\n\t\tPauseTransition pause = new PauseTransition(Duration.millis(2100));\n\t\tpause.setOnFinished(e -> {\n\t\t\tgrid.getChildren().remove(medicine);\n\t\t\ttama.setLayoutX(190);\n\t\t\teating = false;\n\t\t\tmodel.getController().feedMedicine();\n\t\t});\n\t\tpause.play();\n\n\t}", "private void displayMessage9(String message) {\n TextView letiArtsReadMore = (TextView) findViewById(R.id.read_more9);\n letiArtsReadMore.setTextColor(Color.BLACK);\n letiArtsReadMore.setText(message);\n letiArtsReadMore.setGravity(Gravity.CENTER);\n }", "@SuppressLint(\"PrivateResource\")\n public void showToastMessage(String message) {\n View includedLayout = findViewById(R.id.llToast);\n\n final TextView text = includedLayout.findViewById(R.id.tv_toast_message);\n text.setText(message);\n\n animation = AnimationUtils.loadAnimation(this,\n R.anim.abc_fade_in);\n\n text.setAnimation(animation);\n text.setVisibility(View.VISIBLE);\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @SuppressLint(\"PrivateResource\")\n @Override\n public void run() {\n animation = AnimationUtils.loadAnimation(SupportActivity.this,\n R.anim.abc_fade_out);\n\n text.setAnimation(animation);\n text.setVisibility(View.GONE);\n }\n }, 2000);\n }", "private void displayMessage17(String message) {\n TextView pushCvReadMore = (TextView) findViewById(R.id.read_more17);\n pushCvReadMore.setTextColor(Color.BLACK);\n pushCvReadMore.setText(message);\n pushCvReadMore.setGravity(Gravity.CENTER);\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tif(isRecognition) {\n\t\t\t\t\t\t\talpha *= 0.95f;\n//\t\t\t\t\t\t\tsetBackgroundColor((int) (255 * (1 - label) * alpha));\n\t\t\t\t\t\t\ttxtHandParts.setTextColor(Color.argb((int) (alpha * 255), 255,\n\t\t\t\t\t\t\t\t\t255, 255));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(alpha > 0.1f) {\n\t\t\t\t\t\t\t\tLog.d(LOGTAG, (int) (255 * (1 - label) * alpha)+\"\");\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}\n\t\t\t\t});\n\t\t\t}" ]
[ "0.71188205", "0.608591", "0.56218183", "0.5599105", "0.5568845", "0.5479585", "0.54657644", "0.5442751", "0.54329455", "0.54221106", "0.54154086", "0.5388749", "0.53883713", "0.5347615", "0.5332065", "0.5330536", "0.52982175", "0.52445525", "0.5239505", "0.52331567", "0.52284664", "0.5216466", "0.5202809", "0.5202077", "0.5194576", "0.5187918", "0.5182698", "0.51770186", "0.51769876", "0.5166927", "0.5166517", "0.5163774", "0.5153645", "0.51417214", "0.5140876", "0.51370764", "0.5135607", "0.5129146", "0.5126952", "0.51252645", "0.51104033", "0.5108294", "0.5088726", "0.50875634", "0.5061859", "0.50445044", "0.5034738", "0.5034407", "0.5021153", "0.5018213", "0.5016679", "0.50158346", "0.50147605", "0.5014107", "0.50125533", "0.5010618", "0.5009592", "0.4999272", "0.499672", "0.4990228", "0.49849218", "0.49822286", "0.4978032", "0.49691713", "0.49606824", "0.495103", "0.4946097", "0.49453792", "0.4945043", "0.49430913", "0.4935142", "0.49188069", "0.49039677", "0.4903029", "0.4902086", "0.49013913", "0.48978996", "0.4896153", "0.48950607", "0.4892183", "0.48877162", "0.48831806", "0.4880481", "0.48796117", "0.48791865", "0.48723575", "0.48722115", "0.4862578", "0.48573595", "0.48534444", "0.4851469", "0.48508516", "0.4843113", "0.48406264", "0.48305893", "0.48228106", "0.48217532", "0.4820283", "0.48136312", "0.48129895" ]
0.7259857
0
Making emotes available once again:
public void run() { mEmoteButton.setBackgroundResource(R.drawable.button_yellow); mIsEmotePlayable = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run() {\n mOpponentEmoteBubble.setText(botEmotesArray[new Random().nextInt(botEmotesArray.length)]);\n showEmote(mOpponentEmoteBubble);\n\n }", "public void emote(String message) {\n\t\tif(message != null && message.length()>0){\n\t\t\tcurrentRoom.messageAllPlayers(\"\\033[3m*\" + name + \" \" + message + \"*\\033[0m\");\n\t\t}\n\t}", "private void offer() {\n\t\t\t\n\t\t}", "private void setupEmoteButton(){\n mEmoteButton.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n\n // If emotes are playable at the moment:\n if(mIsEmotePlayable) {\n // Make emote picker list visible:\n mEmotePickerList.setVisibility(View.VISIBLE);\n mDummy.setVisibility(View.VISIBLE);\n }\n\n }\n });\n\n }", "public void enlist() {\n\n audio.playSound(LDSound.SMALL_CLICK);\n if (canEnlist()) {\n Logger.info(\"HUD Presenter: enlist\");\n uiStateManager.setState(GameUIState.ENLISTING);\n }\n }", "@Override\n public void run() {\n OrderBook.getInstance().addOfferMarketQuote(order);\n }", "public void cheat() {\r\n announce( \"cheat\" );\r\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n mPlayerEmoteBubble.setText(emotesArray[position]);\n\n // Animating the bubble:\n showEmote(mPlayerEmoteBubble);\n\n // Making emotes unavailable for a while:\n mIsEmotePlayable = false;\n mEmoteButton.setBackgroundResource(R.color.colorGrayDark);\n\n\n\n Handler botEmoteHandler = new Handler();\n botEmoteHandler.postDelayed(new Runnable() {\n public void run() {\n\n // Animating A.I. emote bubble with random bot-like text to make it 'polite':\n mOpponentEmoteBubble.setText(botEmotesArray[new Random().nextInt(botEmotesArray.length)]);\n showEmote(mOpponentEmoteBubble);\n\n }\n }, Constants.BOT_EMOTE_RESPONSE_DELAY);\n\n\n Handler EmoteAvailabilityHandler = new Handler();\n EmoteAvailabilityHandler.postDelayed(new Runnable() {\n public void run() {\n\n // Making emotes available once again:\n mEmoteButton.setBackgroundResource(R.drawable.button_yellow);\n mIsEmotePlayable = true;\n\n }\n }, Constants.EMOTE_TIMEOUT);\n\n\n // Making emote picker list unavailable:\n mEmotePickerList.setVisibility(View.GONE);\n mDummy.setVisibility(View.GONE);\n\n }", "public void initiateOfferQueue() {\n List<Offer> offerList = offerRepository.findAll();\n\n if (!offerList.isEmpty()) {\n\n for (Offer offer : offerList) {\n\n addOfferToOfferBook(offer);\n }\n }\n\n }", "public void takeAvailable() {\n\t\tavailable = false;\n\t}", "public void makeAvailable() {\n\t\tavailable = true;\n\t}", "public void playHoomans() {\r\n System.out.println(\"Thanks for killing each other, human!\");\r\n }", "public void manualRefreshComing() {\r\n if (!Preferences.isEnabled(Preferences.SICKBEARD)) {\r\n return;\r\n }\r\n SickBeardController.refreshFuture(messageHandler);\r\n }", "private void postVote() {\n if ( unvotedParties() == 0 )\n TransactionManager.getTransactionManager().resolveTransaction(txId);\n }", "public void mine() {\n mined = true;\n }", "private void setupEmotePickerList(){\n final String[] emotesArray = getResources().getStringArray(R.array.emotes_array);\n final String[] botEmotesArray = getResources().getStringArray(R.array.bot_emotes_array);\n\n //Getting the listView:\n mEmotePickerList = (ListView) findViewById(R.id.emote_picker_list);\n\n //Setting the adapter for the listView:\n mEmotePickerList.setAdapter(new EmoteChoiceAdapter(getApplicationContext()));\n\n //Setting a click listener for the listView:\n mEmotePickerList.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n // Setting the right text in the bubble:\n mPlayerEmoteBubble.setText(emotesArray[position]);\n\n // Animating the bubble:\n showEmote(mPlayerEmoteBubble);\n\n // Making emotes unavailable for a while:\n mIsEmotePlayable = false;\n mEmoteButton.setBackgroundResource(R.color.colorGrayDark);\n\n\n\n Handler botEmoteHandler = new Handler();\n botEmoteHandler.postDelayed(new Runnable() {\n public void run() {\n\n // Animating A.I. emote bubble with random bot-like text to make it 'polite':\n mOpponentEmoteBubble.setText(botEmotesArray[new Random().nextInt(botEmotesArray.length)]);\n showEmote(mOpponentEmoteBubble);\n\n }\n }, Constants.BOT_EMOTE_RESPONSE_DELAY);\n\n\n Handler EmoteAvailabilityHandler = new Handler();\n EmoteAvailabilityHandler.postDelayed(new Runnable() {\n public void run() {\n\n // Making emotes available once again:\n mEmoteButton.setBackgroundResource(R.drawable.button_yellow);\n mIsEmotePlayable = true;\n\n }\n }, Constants.EMOTE_TIMEOUT);\n\n\n // Making emote picker list unavailable:\n mEmotePickerList.setVisibility(View.GONE);\n mDummy.setVisibility(View.GONE);\n\n }\n });\n\n\n // Setting up the dummy, so when the user clicks on the dummy, which is everywhere outside\n // of the list, the list will disappear:\n\n mDummy = (ImageView) findViewById(R.id.dummy);\n mDummy.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n mEmotePickerList.setVisibility(View.GONE);\n mDummy.setVisibility(View.GONE);\n return true;\n }\n });\n\n\n // Making the list disappear (we don't want it to appear as the game starts).\n mEmotePickerList.setVisibility(View.GONE);\n mDummy.setVisibility(View.GONE);\n\n\n }", "private void purgeEphemeralIDs( long now) {\n\t\tassert( this.getAppType() == Beacon.AppType.APPLE_GOOGLE_CONTACT_TRACING);\n\t\tlong beforeTS = now - getDurationKeepEphemeralExposures();\n\t\tif ( !this.idStore.purgeEphemeralEncounters( getMinDurationOfExposure(), new Date( beforeTS))) {\n\t\t\tlogger.warning( \"failure to purge ephemeral encounters\");\n\t\t} else {\n\t\t\tsetPurgedEphemeralIDsTS( now);\n\t\t};\t\t\n\t}", "public void setEmoticonName( String emoticonName )\n {\n this.emoticonName = emoticonName;\n }", "void askForRepeat();", "private boolean isMentioned(MessageReceivedEvent event) {\n Message message = event.getMessage();\n\n if (message.getContentRaw().equals(\"<@!\" + ID.SELF + \">\")) {\n message.reply(\"Hi, my prefix is `\" + Setting.PREFIX + \"`. You can also use `/help` for more info.\").queue();\n return true;\n }\n\n return false;\n }", "void onUserAttentionAvailable() {\n if (!isPlaying()) {\n seekTo(mPauseTime);\n super.start();\n }\n }", "void rejoin()\n {\n this.suspended = false;\n this.game.notifyPlayerRejoined(this);\n }", "public void playerHasUsedSuggestion() {\n suggestionMade = true;\n }", "public void quitter() {\n\n\t\tint rep = JOptionPane.showConfirmDialog(null, \"Voulez-vous vraiment quitter ?\" , \"Attention\", JOptionPane.WARNING_MESSAGE);\n\t\tif (rep == JOptionPane.OK_OPTION)\n\t\t{\n\t\t\tsetChanged();\n\t\t\tnotifyObservers(QUITTER);\n\t\t}\n\t}", "@Override\n protected void execute(CommandEvent event)\n {\n Poll poll = manager.getRandomPoll();\n\n // Now we need to build the embed\n EmbedBuilder embed = new EmbedBuilder()\n {{\n setTitle(\"<:EverybodyVotesChannel:317090360449040388> \" + poll.getQuestion());\n setDescription(\"\\uD83C\\uDD70 \" + poll.getResponse1() + \"\\n\" +\n \"_ _\\n\" + // Line separator\n \"\\uD83C\\uDD71 \" + poll.getResponse2());\n addField(\"Users who reacted \\uD83C\\uDD70:\", \"\", false);\n addField(\"Users who reacted \\uD83C\\uDD71:\", \"\", false);\n setColor(event.getSelfMember().getColor());\n setFooter(\"This question was in the \" + poll.getCountryFlag() + \" EVC\", null);\n }};\n\n // Send embed to chat\n event.reply(embed.build(), s ->\n {\n // Add message ID to tracked list\n manager.trackId(s.getIdLong());\n\n // Add reactions\n s.addReaction(\"\\uD83C\\uDD70\").queue();\n s.addReaction(\"\\uD83C\\uDD71\").queue();\n });\n }", "public void tellJoke(){\n new EndpointAsyncTask().execute(this);\n }", "@Override\n\tpublic void execute() {\n\t\tthis.receiver.add(this.question, 42);\n\t}", "@Override\n\tpublic void msgAtCooking() {\n\t\t\n\t}", "public synchronized void makeAvailable(){\n isBusy = false;\n }", "public abstract void updateWhatsOn();", "@Override\n public void onClick(View v) {\n if(mIsEmotePlayable) {\n // Make emote picker list visible:\n mEmotePickerList.setVisibility(View.VISIBLE);\n mDummy.setVisibility(View.VISIBLE);\n }\n\n }", "private void doAgainAsk() {\n\t\tfinal int answerId = getIntent().getIntExtra(BUNDLE_PARAM_ANSWERID, -1);\n\t\tfinal String askToId = getIntent().getStringExtra(BUNDLE_PARAM_ASKTOUSERID);\n\t\tfinal int appItemid = getIntent().getIntExtra(BUNDLE_PARAM_APPITEMID, 0);\n\t\t// final String senderId =\n\t\t// getIntent().getStringExtra(BUNDLE_PARAM_SENDERID);\n\t\t// final String senderName =\n\t\t// getIntent().getStringExtra(BUNDLE_PARAM_SENDERNAME);\n\t\t// final String sendSource =\n\t\t// getIntent().getStringExtra(BUNDLE_PARAM_SENDSOURCE);\n\t\tUserInfo info = UserInfo.getInstance();\n\t\tif (!info.isLogin()) {\n\t\t\tLogger.error(\"replyanswer\", \"not login\");\n\t\t\treturn;\n\t\t}\n\t\tString content = etContent.getText().toString();\n\t\tif (StringUtils.isEmpty(content)) {\n\t\t\tshowToast(\"请输入提问内容\");\n\t\t\treturn;\n\t\t}\n\t\tcontent = mIAskListPresenter.handleInsertStock(content);\n\t\tMap<String, String> params = new HashMap<String, String>();\n\t\tparams.put(\"againaskUserid\", info.getUserId());\n\t\tparams.put(\"anwserId\", String.valueOf(answerId));\n\t\tparams.put(\"asktouserid\", askToId);\n\t\tparams.put(\"againaskUsername\", info.getUserName());\n\t\tparams.put(\"askid\", String.valueOf(appItemid));\n\t\tparams.put(\"source\", \"爱投顾手机客户端\");\n\t\tparams.put(\"content\", content);\n\t\t// etContent.setHint(\"输入您的提问。。。\");\n\t\t// doReply.setText(\"追问\");\n\n\t\tJsonRequest<TouguBaseResult> request = new JsonRequest<TouguBaseResult>(Method.POST, NetUrlMyInfo.AGAINASK, params, new RequestHandlerListener<TouguBaseResult>(getContext()) {\n\n\t\t\t@Override\n\t\t\tpublic void onStart(Request request) {\n\t\t\t\tsuper.onStart(request);\n\t\t\t\tshowDialog(request);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onEnd(Request request) {\n\t\t\t\tsuper.onEnd(request);\n\t\t\t\thideDialog(request);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String id, TouguBaseResult data) {\n\t\t\t\t// Toast.makeText(ReplyActivity.this, \"赞成功\",\n\t\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t\tif (data.getRetCode() == 0) {\n\t\t\t\t\tIntent intent = new Intent(IAskListPresenter.ACTION_ASK_REFRESH);\n\t\t\t\t\tintent.putExtra(IAskListPresenter.BUNDLE_ASKID, appItemid);\n\t\t\t\t\tintent.putExtra(IAskListPresenter.BUNDLE_STATUS, IAskListPresenter.ANSWER_STATU_REASK);\n\t\t\t\t\tsendBroadcast(intent);\n\t\t\t\t\tshowToast(\"追问成功\");\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t\t// Toast.makeText(ReplyActivity.this, data.getMsg(),\n\t\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}, TouguBaseResult.class);\n\n\t\tsend(request);\n\t}", "private void showEmote(TextView emoteBubble){\n if(mSoundStatus.equals(Constants.ON)) mPopSound.start();\n\n // Animating the bubble's alpha (fade in, fade out):\n\n ObjectAnimator emoteAlphaAnimator = ObjectAnimator.ofFloat(emoteBubble,\n \"alpha\", 0, 1);\n emoteAlphaAnimator.setInterpolator(new DecelerateInterpolator());\n emoteAlphaAnimator.setRepeatCount(1);\n emoteAlphaAnimator.setRepeatMode(ObjectAnimator.REVERSE);\n emoteAlphaAnimator.setDuration(Constants.EMOTE_DURATION/2);\n\n\n // Animating the bubble's size (pop up with overshoot):\n\n float scaleX = emoteBubble.getScaleX();\n ObjectAnimator emoteScaleXAnimator = ObjectAnimator.ofFloat(emoteBubble,\n \"scaleX\", 0, scaleX);\n emoteScaleXAnimator.setInterpolator(new OvershootInterpolator());\n emoteScaleXAnimator.setDuration(Constants.EMOTE_POPUP_DURATION);\n\n float scaleY = emoteBubble.getScaleY();\n ObjectAnimator emoteScaleYAnimator = ObjectAnimator.ofFloat(emoteBubble,\n \"scaleY\", 0, scaleY);\n emoteScaleYAnimator.setInterpolator(new OvershootInterpolator());\n emoteScaleYAnimator.setDuration(Constants.EMOTE_POPUP_DURATION);\n\n\n // Start animations:\n\n AnimatorSet animatorSet = new AnimatorSet();\n animatorSet.playTogether(emoteAlphaAnimator, emoteScaleXAnimator, emoteScaleYAnimator);\n animatorSet.start();\n\n\n }", "public void playAI() {\r\n // An item has been added to the ticket. Fire an event and let everyone know.\r\n System.out.println(\"You're going to lose foolish human!\");\r\n }", "public void init() {\r\n reservedCommands.add(\"!addCom\");\r\n reservedCommands.add(\"!editCom\");\r\n reservedCommands.add(\"!delCom\");\r\n reservedCommands.add(\"!commands\");\r\n reservedCommands.add(\"!command\");\r\n reservedCommands.add(\"!utility\");\r\n reservedCommands.add(\"!music\");\r\n reservedCommands.add(\"!queue\");\r\n reservedCommands.add(\"!join\");\r\n reservedCommands.add(\"!leave\");\r\n reservedCommands.add(\"!getPlayers\");\r\n reservedCommands.add(\"!createPoll\");\r\n reservedCommands.add(\"!vote\");\r\n reservedCommands.add(\"!closePoll\");\r\n reservedCommands.add(\"!closeGiveaway\");\r\n reservedCommands.add(\"!raffle\");\r\n reservedCommands.add(\"!winner\");\r\n reservedCommands.add(\"!permit\");\r\n reservedCommands.add(\"!spam\");\r\n reservedCommands.add(\"!addQuote\");\r\n reservedCommands.add(\"!quoting\");\r\n reservedCommands.add(\"!removeQuote\");\r\n reservedCommands.add(\"!displayQuote\");\r\n reservedCommands.add(\"!quotes\");\r\n }", "public void addReaction(String emoteId) {\n if (emoteId.charAt(0) > 128)\n message.addReaction(emoteId).queue();\n else\n message.addReaction(message.getGuild().getEmotesByName(emoteId, true).get(0)).queue();\n }", "public synchronized void playExclaimSound()\n {\n if (PLAY_EXCLAIM_SOUND_RUNNABLE == null)\n {\n PLAY_EXCLAIM_SOUND_RUNNABLE = (Runnable)Toolkit.getDefaultToolkit().getDesktopProperty(EXCLAIM_SOUND_PROPERTY_NAME);\n }\n if (PLAY_EXCLAIM_SOUND_RUNNABLE != null)\n {\n PLAY_EXCLAIM_SOUND_RUNNABLE.run();\n }\n }", "public static void printTaskAlreadyDoneMessage() {\n botSpeak(Message.TASK_ALREADY_DONE_MESSAGE);\n }", "public void markAvailable() {\n CompletableFuture<?> toNotify = null;\n synchronized (this) {\n if (!availableFuture.isDone()) {\n toNotify = availableFuture;\n }\n }\n if (toNotify != null) {\n toNotify.complete(null);\n }\n }", "public static void doVote() {\n }", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\treloadComment();\r\n\t}", "public void miseEnFormeChomsky(){\n miseEnFormeChom.miseEnFormeChomsky();\n setChanged();\n notifyObservers(\"6\");\n }", "public void selectNotify() {\n// if (previewIsObsolete) {\n// try {\n// Asciidoc doc = this.asciidoc.get();\n// String markup = doc.render(document.getText());\n// // jEditorPane.setText(markup);\n// previewIsObsolete = false;\n// }\n// catch (InterruptedException e) {\n// Thread.currentThread().interrupt();\n// }\n// catch (ExecutionException e) {\n// throw new RuntimeException(e.getCause());\n// }\n// }\n }", "private void notifyStakeholder(){\n }", "@Override\n public void onMessageReceived(@NotNull MessageReceivedEvent event) {\n String message = event.getMessage().getContentRaw().toLowerCase();\n Commands commands = Main.getBOT().getCommands();\n\n // When message is intended for bob, check it\n if (message.startsWith(\"!bob\")) {\n commands.evaluateCommand(message.replace(\"!bob \", \"\"), event);\n } else if (message.contains(\"#blamekall\")) {\n event.getChannel().sendMessage(\"NO! BE NICE! GO TO NAUGHTY JAIL!\").queue();\n event.getChannel().sendMessage(\"https://tenor.com/view/bonk-gif-18805247\").queue();\n }\n\n }", "private void pirateRecipe(String text) {\n if (\"excitedze\".equals(text)) {\n LanguageManager languagemanager = this.mc.getLanguageManager();\n Language language = languagemanager.getLanguage(\"en_pt\");\n if (languagemanager.getCurrentLanguage().compareTo(language) == 0) {\n return;\n }\n\n languagemanager.setCurrentLanguage(language);\n this.mc.gameSettings.language = language.getCode();\n net.minecraftforge.client.ForgeHooksClient.refreshResources(this.mc, net.minecraftforge.resource.VanillaResourceType.LANGUAGES);\n this.mc.gameSettings.saveOptions();\n }\n\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\trefreshNoteList();//刷新记事列表\n\t}", "private void doAgainAnaswer() {\n\t\tfinal int answerToId = getIntent().getIntExtra(BUNDLE_PARAM_ANSWERTOUSERID, 0);\n\t\t// final String senderId =\n\t\t// getIntent().getStringExtra(BUNDLE_PARAM_SENDERID);\n\t\t// final String senderName =\n\t\t// getIntent().getStringExtra(BUNDLE_PARAM_SENDERNAME);\n\t\t// final String sendSource =\n\t\t// getIntent().getStringExtra(BUNDLE_PARAM_SENDSOURCE);\n\n\t\tUserInfo info = UserInfo.getInstance();\n\t\tif (!info.isLogin()) {\n\t\t\tLogger.error(\"replyanswer\", \"not login\");\n\t\t\treturn;\n\t\t}\n\t\tString content = etContent.getText().toString();\n\t\tcontent = mIAskListPresenter.handleInsertStock(content);\n\t\t// content = addImageToContent(content);\n\t\tif (StringUtils.isEmpty(content)) {\n\t\t\tshowToast(\"请输入回答内容\");\n\t\t\treturn;\n\t\t}\n\t\tMap<String, String> params = new HashMap<String, String>();\n\t\tparams.put(\"userId\", info.getUserId());\n\t\tparams.put(\"username\", info.getUserName());\n\t\tparams.put(\"againAskId\", String.valueOf(answerToId));\n\t\tparams.put(\"source\", \"爱投顾手机客户端\");\n\t\tparams.put(\"content\", content);\n\t\tif (!StringUtils.isEmpty(imageUrl)) {\n\t\t\tparams.put(\"images\", NetUrlLoginAndRegist.UPLOAD_PREFIX + imageUrl);\n\t\t}\n\t\t// etContent.setHint(\"输入您的提问。。。\");\n\t\t// doReply.setText(\"追问\");\n\n\t\tJsonRequest<TouguBaseResult> request = new JsonRequest<TouguBaseResult>(Method.POST, NetUrlMyInfo.AGAINASK, params, new RequestHandlerListener<TouguBaseResult>(getContext()) {\n\n\t\t\t@Override\n\t\t\tpublic void onStart(Request request) {\n\t\t\t\tsuper.onStart(request);\n\t\t\t\tshowDialog(request);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onEnd(Request request) {\n\t\t\t\tsuper.onEnd(request);\n\t\t\t\thideDialog(request);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String id, TouguBaseResult data) {\n\t\t\t\t// Toast.makeText(ReplyActivity.this, \"赞成功\",\n\t\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t\tif (data.getRetCode() == 0) {\n\t\t\t\t\tsendBroadcast(new Intent(IAskListPresenter.ACTION_ASK_REFRESH));\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t\tToast.makeText(ReplyActivity.this, data.getMsg(), Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}, TouguBaseResult.class);\n\n\t\tsend(request);\n\t}", "public void markReused() {\n\t\tupdate(Phase.vm_creation, State.SKIPPED);\n\t\tupdate(Phase.installation, State.SKIPPED);\n\t\tupdate(Phase.configuration, State.SKIPPED);\n\t\tsetState(State.SKIPPED);\n\t}", "@Override\n\tpublic void canSpeak() {\n\t\t\n\t}", "public void cmdDefault( String name, String msg ) {\r\n if( !isEnabled || tasks.size() == 0 || !msg.startsWith(\"!task\" ))\r\n return;\r\n\r\n try {\r\n int num = Integer.parseInt(msg.substring(5).trim()) - 1;\r\n AutoTask c = tasks.get(num);\r\n String execute = c.doVote(name);\r\n\r\n // Execute if number of votes have been reached\r\n if( execute != null ) {\r\n if( execute.contains(\",\") ) {\r\n String cmds[] = execute.split(\",\");\r\n\r\n for( int i = 0; i < cmds.length; i++ ) {\r\n if( cmds[i].startsWith(\"-arena\")) {\r\n String[] args = cmds[i].split(\" \", 2);\r\n\r\n if( args.length == 2 )\r\n m_botAction.sendArenaMessage( args[1] + \" -\" + m_botAction.getBotName() );\r\n } else if( cmds[i].startsWith(\"-wait\") ) {\r\n String[] args = cmds[i].split(\" \", 2);\r\n\r\n if( args.length == 2 ) {\r\n try {\r\n Integer wait = Integer.getInteger(args[1]);\r\n\r\n if( wait <= 60 )\r\n this.wait( wait * 1000 );\r\n } catch (Exception e) {\r\n }\r\n }\r\n } else {\r\n m_botAction.sendPrivateMessage(m_botAction.getBotName(), \"!\" + cmds[i]);\r\n }\r\n }\r\n } else {\r\n m_botAction.sendPrivateMessage(m_botAction.getBotName(), \"!\" + execute);\r\n }\r\n }\r\n } catch (Exception e ) {\r\n m_botAction.sendSmartPrivateMessage(name, \"Which task do you want to vote for? Please try !info to verify this task still exists.\" );\r\n }\r\n }", "void displayEmotion() {\n if (emotion.getLifetime() == 0) { emotion = null; }\n else { emotion.decreaseLifetime(); }\n }", "public void performQuck() {\n\t\tquackBehavior.quack();\n\t}", "private void setAnswer() {\n DbHelper dbhelper = new DbHelper(context);\n questionNo = questionNo + 1;\n QuizAnswer answer = new QuizAnswer();\n answer.setQuizId(quizId);\n answer.setQuestionId(questionId);\n int optionId = shareprefs.getInt(\"optionId\", 0);\n answer.setOptionId(optionId);\n int correctAns = shareprefs.getInt(\"correctAns\", 0);\n answer.setAnswer(correctAns);\n answer.setContentId(contentId);\n boolean flage = dbhelper.upsertQuizAnswerEntity(answer);\n if (flage) {\n shareprefs.edit().clear().commit();//clear select OptionPreferences\n setValue();\n }\n }", "@Override\r\n\tpublic void onResume() {\n\t\taddNotifs();\r\n\t\tsuper.onResume();\r\n\t}", "public void usePotion() {\n Potion potion = this.getInventory().getFirstPotion();\n if (potion != null){\n this.setLife(this.getLife() + potion.getGainLife());\n this.getInventory().removeItems(potion);\n }\n }", "@Override\n public void onMessageReceived(@NotNull MessageReceivedEvent event) {\n // Ignore messages from myself\n if (event.getAuthor().getIdLong() == ID.SELF)\n return;\n\n // Whenever a message is sent in the announcements channel, the timer must be reset\n if (event.getChannel().getIdLong() == Setting.ANNOUNCEMENT_CHANNEL)\n Announcements.resetTimer();\n\n if (isMentioned(event))\n return;\n\n if (EventUtils.ignoreChannel(event.getChannel()))\n return;\n\n if (checkDadBot(event))\n return;\n\n if(checkSurveyLink(event))\n return;\n\n if (event.getMessage().getContentRaw().equalsIgnoreCase(Setting.PREFIX + \"help\"))\n event.getMessage().reply(\"This command is \\\"depreciated\\\" in favor of the new `/help` command. \" +\n \"Please use that command instead of this one.\").queue();\n }", "private static void saveEmotion() {\n try {\n //\n EmotionsManager.getManager().saveEmotions(getStoredEmotions());\n // catch any io exceptions and print them to stack trace to visualize exception\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void run(Message msg) {\n Guild g = msg.getGuild();\n AudioManager audioManager = g.getAudioManager();\n if (audioManager.isConnected()) {\n MusicHandler handler = (MusicHandler) audioManager.getSendingHandler();\n handler.setRepeating(!handler.isRepeat());\n }\n\n // delete the message\n msg.delete().queue();\n }", "public static void MCommand() {\n if (Interface.songs.size(Interface.songs) == 0) {\n System.out.println(\"There are not any songs have been liked before.\");\n return;\n }\n System.out.println(Interface.songs.size(Interface.songs) == 1 ? \"Song has been added: \" : \"Songs have been added: \");\n Interface.songs.printList(Interface.songs);\n }", "public void increseReplyCount() {\n\r\n\t}", "public void onResume() {\n super.onResume();\n if (!EventBus.getDefault().isRegistered(this)) {\n EventBus.getDefault().register(this);\n }\n addMobiRollerBadge();\n }", "public static void ECommand(String name, String songName) {\n Person tempPerson = new Person(name);\n if (!Interface.persons.contains(Interface.persons, tempPerson)) {\n System.out.println(\"There's not such a person named \" + name);\n return;\n }\n tempPerson = Interface.persons.get(Interface.persons, tempPerson);\n LinkedList<Song> likedSongs = tempPerson.getLikedSongs();\n if (likedSongs.size(likedSongs) == 0) {\n System.out.println(name + \" doesn't like any songs.\");\n return;\n }\n if (!likedSongs.contains(likedSongs, new Song(songName))) {\n System.out.println(name + \" has already doesn't like \" + songName);\n return;\n }\n tempPerson.doesntLikeSong(songName);\n System.out.println(name + \" now doesn't like \" + songName);\n }", "@Override\n protected void execute(CommandEvent event) {\n if (event.getArgs().isEmpty()) {\n event.replyWarning(\"Please specify the message ID to remove emote choices from.\");\n return;\n }\n // Return if there are the wrong number of args\n String[] args = event.getArgs().split(\"\\\\s+\");\n if (args.length != 1) {\n event.replyWarning(\"Invalid arguments, please specify the message ID to remove emote choices from.\");\n return;\n }\n\n log.info(\"RemoveEmoteChoices by: \" + event.getAuthor().getName() + \"#\" + event.getAuthor().getDiscriminator());\n\n TextChannel channel = FinchBot.getJda().getTextChannelById(FinchBot.getConfig().getRoleEmoteChannel());\n\n // Want to remove all of the emote choices\n if (args[0].equalsIgnoreCase(\"all\")) {\n HashMap<String, ArrayList<RoleEmotePair>> trackedMessages = FinchBot.getConfig().getTrackedMessages();\n Set<String> keys = trackedMessages.keySet();\n // Loop through all tracked messages\n for (String messageId : keys) {\n Message message = channel.retrieveMessageById(messageId).complete();\n List<MessageReaction> emotes = message.getReactions();\n // Remove all FinchBot's reactions from the message\n for (MessageReaction mr: emotes) {\n log.debug(\"Removed messagereaction \" + mr.toString() + \" from message \" + messageId);\n\n mr.removeReaction(FinchBot.getJda().getSelfUser()).complete();\n }\n }\n return;\n }\n\n // Return if message ID provided isn't a tracked message\n if (!FinchBot.getConfig().getTrackedMessages().containsKey(args[0])) {\n event.replyWarning(\"Invalid message ID, is it a tracked message?\");\n return;\n }\n\n // Remove the emote choices from a specific message\n Message message = channel.retrieveMessageById(args[0]).complete();\n List<MessageReaction> messageReactions = message.getReactions();\n\n for (MessageReaction messageReaction : messageReactions) {\n log.debug(\"Removed messagereaction \" + messageReaction.toString() + \" from message \" + message.getId());\n\n messageReaction.removeReaction(FinchBot.getJda().getSelfUser()).complete();\n }\n }", "@Override\n public void onResume() {\n thoughtsProgress.setVisibility(View.VISIBLE);\n super.onResume();\n thoughtsObjects.clear();\n thoughtsObjects.addAll(thoughtDAL.\n getAllThoughts(preferences.getString(\"userId\",\"\")));\n thoughtsProgress.setVisibility(View.INVISIBLE);\n adapter.notifyDataSetChanged();\n }", "private void consumeEnergyIfExist() {\n\n\t\tif (newPlayerCell.isHasEnergy()) {\n\t\t\tGame.getPlayer().getExperience().addStars(1);\n\t\t\tnewPlayerCell.setHasEnergy(false);\n\t\t\tnewPlayerCell.setType(RealmCellType.EMPTY);\n\t\t}\n\t}", "public void setQuickReplyText(ArrayList<String> recognizedTextResults){\r\n \t\ttry{\r\n \t\t\tNotificationView currentView = (NotificationView) getCurrentView();\r\n\t \t\tcurrentView.setQuickReplyText(recognizedTextResults);\r\n \t\t}catch(Exception ex){\r\n\t\t\tLog.e(_context, \"NotificationViewFlipper.setQuickReplyText() ERROR: \" + ex.toString());\r\n\t\t}\r\n \t}", "private void updateNewsTicker() {\n createExchangeLabel();\n }", "public void executeBot(){\n if(botSignal){\n if(bot != null){\n bot.execute();\n }\n }\n botSignal=false;\n }", "protected void whileDisable()\n\t{\n\n\t}", "public void load(String state)\n{\n String quotes[] = {\n \"Looks Like You Got One Of The Slower Computers, Better Luck Next Time!\",\n \"\\\"Never Let Your Computer Know That You Are In A Hurry!\\\"\",\n \"Sadly This Is Not The Fastest Computer Out There\",\n \"This Computer Has Been Working Overtime, Might Be A Little Slow At Doing Things\",\n \"Dont Mind Me... Just Waiting With You...\",\n \"Patience Is Not The Ability To Wait, But The Ability To Keep A Good Atitude While Waiting...\",\n \"I Started The Week With A Big Box Of Patience... The Box Is Empty Now...\",\n \"Whoever Said \\\"Patience Is A Virtue\\\" Has Never Experienced A Slow Computer\",\n \"Patience Leads To Its Own Reward...\",\n \"Atlease I'm Not Waiting Alone This Time...\",\n \"Keep Calm And Wait With Me...\", \n }; \n int rnd = new Random().nextInt(quotes.length);\n String activeQ = quotes[rnd];\n randomQuote.setText(activeQ);\n if (state.equalsIgnoreCase(\"active\"))\n {\n btnVote.setVisible(false);\n btnNominate.setVisible(false);\n btnAdmin.setVisible(false);\n jLabel2.setVisible(false);\n jLabel2.setVisible(false);\n jLabel5.setVisible(false);\n btnGetIP.setVisible(false);\n lblJokeMsg.setVisible(true);\n randomQuote.setVisible(true);\n }\n else\n {\n if(sm.checkStatus(\"AllowGetIP\") == true)\n {\n btnGetIP.setVisible(true);\n }\n btnVote.setVisible(true);\n btnNominate.setVisible(true);\n btnAdmin.setVisible(true);\n jLabel2.setVisible(true);\n jLabel2.setVisible(true);\n jLabel5.setVisible(true);\n lblJokeMsg.setVisible(true);\n randomQuote.setVisible(true);\n \n }\n}", "@Override\n public void beHelpful() {\n this.playPiano();\n this.takeABow();\n }", "private void boom() {\n showMessage(\"BOOM! Reload to try again\", \"boom\");\n }", "@Override\n protected void execute() {\n Robot.toteLifterSubsystem.setEjectorState(EjectorState.EXTENDING, ramper.process(1.0));\n }", "@Override\n public void beforeTextChanged(CharSequence text, int start, int count, int after) {\n mCurrentChangeStart = start;\n mCurrentChangeCount = count;\n mCurrentChangeEnd = mCurrentChangeStart + mCurrentChangeCount;\n int end = start + count;\n int editorStart = mEditor.getSelectionStart();\n int editorEnd = mEditor.getSelectionEnd();\n if(editorStart == start + count) {\n if (count > 0) {\n Editable message = mEditor.getEditableText();\n Object[] list = message.getSpans(start, end, Object.class);\n synchronized (mEmoticonsToRemove) {\n for (Object span : list) {\n // Get only the emoticons that are inside of the changed\n // region.\n int spanStart = message.getSpanStart(span);\n int spanEnd = message.getSpanEnd(span);\n if ((spanStart < end) && (spanEnd > start) && !(span instanceof SpanWatcher)) {\n // Add to remove list\n mEmoticonsToRemove.add(span);\n }\n }\n }\n }\n } else {\n mEmoticonsToRemove.clear();\n }\n }", "public void xsetAutoReply(org.apache.xmlbeans.XmlBoolean autoReply)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlBoolean target = null;\n target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(AUTOREPLY$18, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlBoolean)get_store().add_element_user(AUTOREPLY$18);\n }\n target.set(autoReply);\n }\n }", "public static void doVoteAndComment() {\n }", "public void showDisarmed();", "@Override\n public void onResume() {\n super.onResume();\n initListFavorite();\n }", "public void sendVoteNotification() {\n\t\t\t\t\tWorld.sendWorldMessage(\"<img=5>[Vote Feed]: colorhere\" + getDisplayName() + \" </col>voted for\" + \n\t\t\t\t\t\t\t\t\t\t\t\"colorhere \"+ voteDisplayAmount +\" Vote Tickets!</col> \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"World votes are now at colorhere\"+ WorldVote.getVotes()+\"</col>.\", false);\t\n\t}", "public static void playE() throws InterruptedException\n\t{\n\t\tchannels[channel].noteOn( 64, volume );//E\n\t\tThread.sleep(200);\n\t}", "public void setUsed(){\n\t\talreadyUsed = true;\n\t}", "@Override\r\n public void onDisable() {\r\n \tBukkit.getLogger().info(\"[VoteHeads] Plugin Disabled.\");\r\n\r\n }", "void onUserAttentionGone() {\n if (isPlaying()) { //If video is playing pause it.\n mPauseTime = getCurrentPosition(); //mPauseTime is an int\n super.pause();\n }\n }", "private void resume() {\n noxItemCatalog.addObserver(catalogObserver);\n noxItemCatalog.resume();\n }", "public void markExtinguished(FireEngine engine, Position position) {\n positionsExtinguished.computeIfAbsent(engine, (k) -> new HashSet<>()).add(position);\n }", "public static void aviUsers() {\n\t\tsendNotification();\r\n\t}", "@Override\n \tpublic void OnPluginEnabled()\n \t{\n \t\tfor (CustomJukebox jukebox : this.repository.getJukeboxes())\n \t\t\tthis.jukeboxes.add(jukebox);\n \t}", "@Override\r\n public String ask() {\r\n String word = \"\";\r\n Time.getInstance().time += 1;\r\n word = \"Do you like the Story?\";\r\n System.out.println(word);\r\n return word;\r\n }", "public void clearMoteList()\n {\n swapMotes.removeAllElements();\n }", "public void setEmoticonDynamic( String emoticonDynamic )\n {\n this.emoticonDynamic = emoticonDynamic;\n }", "public void addEyeResetKills() {\n persistentValues.summoningEyeCount++;\n persistentValues.totalKills += persistentValues.kills;\n persistentValues.kills = -1; // This is triggered before the death of the killed zealot, so the kills are set to -1 to account for that.\n saveValues();\n }", "public void setPingOnReuse(boolean pingOnReuse)\n {\n _isPing = pingOnReuse;\n }", "public void unsetAutoReply()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(AUTOREPLY$18, 0);\n }\n }", "@Override\n\tpublic void resume() {\n\t\tPhoneDevice.Settings.playMusic(PhoneDevice.Settings.MusicEnum.psyche_up);\n\t \n\t}", "public void eatApple() {\n\t\teaten = peeled && !eaten ? true : false;\n\t}", "public void interactWhenApproaching() {\r\n\t\t\r\n\t}", "private void updateSafeSpots()\n\t{\n\t\tif (client.getLocalPlayer().getInteracting() != null)\n\t\t{\n\t\t\tActor enemy = client.getLocalPlayer().getInteracting();\n\t\t\tWorldArea worldArea = new WorldArea(enemy.getWorldLocation().getX() - 12,\n\t\t\t\tenemy.getWorldLocation().getY() - 12, 24, 24, client.getPlane());\n\t\t\tList<WorldPoint> worldPoints = worldArea.toWorldPointList();\n\t\t\tsafeSpotList = getSafeSpotList(enemy, worldPoints);\n\t\t}\n\t}", "public void quitter () {\n\t\tSystem.out.println(\"\\n========================================= AU REVOIR ! ====================================\");\n\t\tpartie.dispose();\n\t}", "private void notifyAutomatically(){\n System.out.println(\"Notificando automaticamente...\");\n }" ]
[ "0.5663749", "0.562918", "0.5421864", "0.53311116", "0.5289058", "0.52201575", "0.5198331", "0.51737124", "0.5095688", "0.5092921", "0.5086249", "0.5015603", "0.4973941", "0.49663827", "0.49623442", "0.4922313", "0.48898864", "0.48560488", "0.4851144", "0.48412353", "0.48308063", "0.4811797", "0.479724", "0.47965613", "0.47695938", "0.47614914", "0.47606763", "0.47504258", "0.4749605", "0.4741061", "0.47403836", "0.47372657", "0.47271982", "0.4723954", "0.46891084", "0.4688076", "0.46810645", "0.4680576", "0.4675764", "0.4662719", "0.465866", "0.46505815", "0.4646977", "0.46433273", "0.46349642", "0.46297207", "0.46203923", "0.46137357", "0.46033502", "0.45986056", "0.45922634", "0.45873523", "0.4585035", "0.45849913", "0.45826203", "0.4577005", "0.45727533", "0.4571362", "0.45708197", "0.4568472", "0.45666507", "0.45605537", "0.45561856", "0.4554117", "0.45530447", "0.45487812", "0.45469227", "0.4545733", "0.45422053", "0.4541487", "0.45365056", "0.45286873", "0.45210567", "0.45204967", "0.4515401", "0.45092192", "0.45085993", "0.45070288", "0.45014945", "0.44960418", "0.4494107", "0.44918522", "0.44911137", "0.44910908", "0.44908708", "0.448815", "0.44800314", "0.4476862", "0.44724438", "0.44706643", "0.44697273", "0.44682926", "0.44654846", "0.44621712", "0.44611013", "0.44591966", "0.44441405", "0.44417134", "0.44381353", "0.44377157" ]
0.49156535
16
Playing the 'pop' sound:
private void showEmote(TextView emoteBubble){ if(mSoundStatus.equals(Constants.ON)) mPopSound.start(); // Animating the bubble's alpha (fade in, fade out): ObjectAnimator emoteAlphaAnimator = ObjectAnimator.ofFloat(emoteBubble, "alpha", 0, 1); emoteAlphaAnimator.setInterpolator(new DecelerateInterpolator()); emoteAlphaAnimator.setRepeatCount(1); emoteAlphaAnimator.setRepeatMode(ObjectAnimator.REVERSE); emoteAlphaAnimator.setDuration(Constants.EMOTE_DURATION/2); // Animating the bubble's size (pop up with overshoot): float scaleX = emoteBubble.getScaleX(); ObjectAnimator emoteScaleXAnimator = ObjectAnimator.ofFloat(emoteBubble, "scaleX", 0, scaleX); emoteScaleXAnimator.setInterpolator(new OvershootInterpolator()); emoteScaleXAnimator.setDuration(Constants.EMOTE_POPUP_DURATION); float scaleY = emoteBubble.getScaleY(); ObjectAnimator emoteScaleYAnimator = ObjectAnimator.ofFloat(emoteBubble, "scaleY", 0, scaleY); emoteScaleYAnimator.setInterpolator(new OvershootInterpolator()); emoteScaleYAnimator.setDuration(Constants.EMOTE_POPUP_DURATION); // Start animations: AnimatorSet animatorSet = new AnimatorSet(); animatorSet.playTogether(emoteAlphaAnimator, emoteScaleXAnimator, emoteScaleYAnimator); animatorSet.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void pop_sound() {\n\t\tm_player_pop.start();\n\t\tm_player_pop.setMediaTime(new Time(0));\n\t}", "@Override\n public void play(Puppy puppy) {\n System.out.println(\"The puppy is asleep enjoying its wonderful dreams, it currently does not have the desire to play with you right now.\");\n }", "public void play() {\n\t\t\r\n\t}", "public static void playPickupSound(){\n String musicFile = \"Sounds\\\\Pickup.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }", "public void play() {\n\t\tplay(true, true);\n\t}", "private void play() {\n\t\tlog.finest(\"Playing sound\");\n\t\ttone.trigger();\n\t}", "public void play() {\n\t\tSystem.out.println(\"playing \"+title);\r\n\t}", "public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}", "public void play(){\n\t\t\n\t}", "public void Play();", "public static void playScream()\n {\n scream.play();\n }", "public void PauseSound();", "public void play() {\n\t\tSystem.out.println(\"ting.. ting...\");\n\t}", "@Override\n\tpublic void play() {\n\t\t\n\t}", "@Override\n\tpublic void play() {\n\n\t}", "public void pauseSound() {\n\t\tclip.stop();\n\t}", "void play();", "public void play() {\n\t\tSystem.out.println(\"playing \"+title+\" by \" +artist);\n\t}", "public void playBeep(){\n //https://stackoverflow.com/questions/2618182/how-to-play-ringtone-alarm-sound-in-android\n try{\n //gets notification sound then plays it.\n Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification);\n\n r.play();\n TimeUnit.MILLISECONDS.sleep(300);\n r.stop();\n\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }", "public static void playShootingSound(){\n String musicFile = \"Sounds\\\\Shoot.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }", "public void playFromNotification() {\n play(mRadioUrl);\n }", "public void play() { \r\n\t System.out.printf(\"Playing Song: artist=%-20s title=%s\\n\", artist, title);\r\n\t}", "void play ();", "public void playNotification(){\n Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Ringtone r = RingtoneManager.getRingtone(ctx,notification);\n r.play();\n }", "public void playSound() {\n\t\tmediaPlayer.play();\n\t}", "public void playDeadSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, DEAD);\n\t}", "private void pop(){\n AlertDialog.Builder start = new AlertDialog.Builder(this);\n start.setTitle(\"THE ADVANCED HANGMAN - INSTRUCTIONS\");\n start.setMessage(\"The advanced hangman is an advanced version of the traditional hangman game. \\nThe objective of the game is to guess the correct word within six chances.\\nThis game is like a treasure hunt game. Two hints will be provided. \\n\\nHint 1: when the player makes two wrong guesses. This hint will be a one vague one. \\n\\nHint 2: when the player makes four wrong guesses. This hint will be a sort of giveaway. \\n\\n NOTE : The hints appear for a short period of time. Be attentive.\");\n start.setPositiveButton(\"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n MainActivity.this.play(); //is pressed ok, play function is called.\n }\n });\n start.show();\n }", "public static void game_sound() {\n\t\tm_player_game.start();\n\t\tm_player_game.setMediaTime(new Time(0));\n\t}", "@Override\n\tpublic void play() {\n\t\tGuitar.super.play();\n\t\tPiano.super.play();\n\t}", "@Override\n\tpublic void nowPlaying() {\n\t}", "public void playMusic() {\n\t\ttry {\n\t\t\tsoundManager.playMusic(\"bgroundmusic\");\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\r\n public void show()\r\n {\r\n // De inmediato, ponemos en marcha una melodia\r\n if (!juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).isPlaying())\r\n {\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).play();\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).setLooping(true);\r\n }\r\n }", "private void playGameOverSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\ringout.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }", "@Override\n\tpublic void play() {\n\t\tSystem.out.println(\"打击乐器奏乐~~!\");\n\t}", "public static void portail_sound() {\n\t\tm_player_portail.start();\n\t\tm_player_portail.setMediaTime(new Time(0));\n\t}", "public void pauseSong()\n {\n if(!mute)\n {\n try{ \n //bclip.stop();\n \n URL url = this.getClass().getClassLoader().getResource(\"Refreshing Elevator Music.wav\");\n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n pclip = AudioSystem.getClip();\n \n // Open audio clip and load samples from the audio input stream.\n pclip.open(audioIn); \n pclip.start();\n pclip.loop(Clip.LOOP_CONTINUOUSLY);\n }catch(Exception e){}\n }\n }", "public void gameOver(){\n gameOverMusic.loop(pitch, volume);\n }", "@Override\n\tpublic void playLivingSound() {\n\t\tgetSoundManager().playLivingSound();\n\t}", "public void playSoundGameLost() {\n\t\tlostGameSound.play();\n\t}", "public static play() {\n\t\t\n\t}", "public static void playExplosion()\n {\n combust.play();\n if (combust.audioClip.getFramePosition() ==\n combust.audioClip.getFrameLength())\n {\n combust.audioClip.setFramePosition(0);\n combust.audioClip.stop();\n }\n }", "public void playBeep() {\n // Cách 1: Sử dụng audio có sẵn của android\n// ToneGenerator toneGenerator = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, 500);\n// toneGenerator.startTone(ToneGenerator.TONE_PROP_PROMPT);\n\n // Cách 2: Sử dụng audio của mình\n Uri beepSound = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + File.pathSeparator\n + File.separator + getPackageName() + \"/raw/notifications.mp3\");\n Ringtone ringtone = RingtoneManager.getRingtone(this, beepSound);\n ringtone.play();\n }", "public void play() { player.resume();}", "public void soundPressed() {\n // display\n TextLCD.print(SOUND);\n // sound\n Sound.beep();\n }", "public void togglePlay() { }", "public void playAmbientSound() {\n if (!this.isClosed()) {\n super.playAmbientSound();\n }\n\n }", "@Override\n\tpublic void play() {\n\t\tSystem.out.println(\"We played Snokker today\");\n\t\t\n\t\t\n\t}", "protected void stopTheSound(){\n mp.stop();\n }", "@Override\n public void playSound(int soundId) {\n\n }", "public void menu(){\n menuMusic.loop(pitch, volume);\n }", "@Override\n public void run() {\n if(musicEnabled) {\n playSoundtrack();\n while (running) {\n if(!stack.isEmpty()) {\n Sound sound = stack.pop();\n sound.play(sound.loadInputStream());\n }\n }\n }\n }", "public final void play() {\n\t\tinitialize();\n\t\tstartPlay();\n\t\tendPlay();\n\t}", "void togglePlay();", "public void StopSound() {\r\n\t\tif (this.mp.isPlaying()) {\r\n\t\t\tmp.pause();\r\n\t\t}\r\n\t}", "@Override\r\npublic void Play() {\n\t\r\n}", "boolean play();", "public void pause() {\n\t\tmusic.pause();\n\t}", "@Override\n\tpublic void show() {\n\t\tmusic.play();\n\t}", "@Override\n public void makeSound() {\n\n }", "@Override\n public void makeSound() {\n\n }", "public void playTopHat() {\n\t\tSystem.out.println(\"ding ding da-ding\");\n\t\t\n\t}", "public void playClickSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, CLICK);\n\t}", "public void playGameOverSound() {\n\t\ttry {\n\t\t\tAudioInputStream audioStream = AudioSystem.getAudioInputStream(new File(\"Musik/DeadSound.wav\"));\n\t\t\t\n\t\t\tClip clip = AudioSystem.getClip(); \n\t\t\tclip.open(audioStream);\n\t\t\t\n\t\t\tboolean oldStatus = settings.isPlaying(); \n\t\t\t\n\t\t\tstopMusik();\n\t\t\t\n\t\t\t\n\t\t\tthis.settings.setPlaying(oldStatus);\n\t\t\tclip.start();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "PlaySound getSound();", "public static void playRandomJump() {\n\t\t\n\t\tString[] jumpSoundArray = {\"jump1\", \"jump2\", \"jump3\", \"jump4\", \"jump5\"};\n\t\t\n\t\tint rnd = new Random().nextInt(jumpSoundArray.length);\n\t\tplaySound(jumpSoundArray[rnd], 1f);\n\t\t\n\t}", "public void play() {\n try {\n mSessionBinder.play(mContext.getPackageName(), mCbStub);\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling play.\", e);\n }\n }", "public void continueSound() {\n\t\tclip.start();\n\t}", "public static void playSound(){\r\n try{\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(AudioSystem.getAudioInputStream(new File(\"Cheering.wav\")));\r\n clip.start();\r\n }\r\n catch (Exception exc){\r\n exc.printStackTrace(System.out);\r\n } \r\n }", "public void playSoundAt(IPos pos, String sound, float volume, float pitch);", "public static void playerRun()\n {\n runSound.playLooped();\n }", "public static void playBite()\n {\n bite.play();\n scream.play();\n }", "public void pauseSong() {\n if (mp.isPlaying()) {\n mp.pause();\n }\n }", "@Override\r\n public void play()\r\n {\n\r\n }", "public void play() { \r\n if (midi) \r\n sequencer.start(); \r\n else \r\n clip.start(); \r\n timer.start(); \r\n play.setText(\"Stop\"); \r\n playing = true; \r\n }", "public void playSoundFail() {\n\t\tfailSound.play();\n\t}", "public void playGreeting() {\r\n\t\tSystem.out.println(\"Welcome to Daniel's Cinemagraph maker.\");\r\n\t\tSystem.out.println(\"This will only work for uncompressed gifs\");\r\n\t\tplayUsage();\r\n\t\t\r\n\t}", "public void sounding() {\n\t\tSystem.out.println(\"Hello,I am your MobilePhone!\");\n\t}", "@Override\n protected String produceSound(){\n return \"BauBau\";\n\n }", "private void clickSound() {// this function Plays a sound when a button is clicked.\n\t\tif (mp != null) {\n\t\t\tmp.release();\n\t\t}\n\t\tmp = MediaPlayer.create(getApplicationContext(), R.raw.music2);\n\t\tmp.start();// media player is started\n\t}", "public void game(){\n gameMusic.loop(pitch, volume);\n }", "public void play() {\r\n\t\tSystem.out.println(\"Playing Cricket with ball and bat\");\r\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp1.play(sound_id1, 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "@Override\r\n\tpublic String doSound() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void resume() {\n\t\tPhoneDevice.Settings.playMusic(PhoneDevice.Settings.MusicEnum.psyche_up);\n\t \n\t}", "private void playSound() {\n if (isFlashOn) {\n mp = MediaPlayer.create(this, R.raw.light_switch_off);\n } else {\n mp = MediaPlayer.create(this, R.raw.light_switch_on);\n }\n mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\n @Override\n public void onCompletion(MediaPlayer mp) {\n // TODO Auto-generated method stub\n mp.release();\n }\n });\n mp.start();\n }", "public void playSelectSong() {\n isStart = false;\n if (getCurrentSong() == 0) {\n audioList.get(getCurrentSong()).setSelect(true);\n playListAdapter.notifyItemChanged(getCurrentSong());\n }\n isPauseResume = false;\n if (player != null) {\n player.stopMedia();\n }\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n /*new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n }\n }, DELAY_TIME);*/\n }", "public void playHitWall() {\r\n hitWall.play(soundFxVol);\r\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp2.play(sound_id2, 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "public void explosion(){\n explosionEffect.play(pitch, volume);\n }", "private void makePlay() {\n\t\teating = true;\n\t\ttama.setLayoutX(200);\n\n\t\tplay = new Sprite(6, 6, 360, 379, new Image(\"file:./res/images/basketball.png\"), 1, 1000);\n\t\tplay.setLayoutX(140);\n\t\tplay.setLayoutY(190);\n\t\tplay.setScaleX(0.5);\n\t\tplay.setScaleY(0.5);\n\t\tgrid.getChildren().addAll(play);\n\t\tPauseTransition pause = new PauseTransition(Duration.millis(1000));\n\t\tpause.setOnFinished(e -> {\n\t\t\tgrid.getChildren().remove(play);\n\t\t\ttama.setLayoutX(190);\n\t\t\teating = false;\n\t\t\tmodel.getController().playWith();\n\t\t});\n\t\tpause.play();\n\n\t}", "private void play() {\n\t\tParcel pc = Parcel.obtain();\n\t\tParcel pc_reply = Parcel.obtain();\n\t\ttry {\n\t\t\tSystem.out.println(\"DEBUG>>>pc\" + pc.toString());\n\t\t\tSystem.out.println(\"DEBUG>>>pc_replay\" + pc_reply.toString());\n\t\t\tib.transact(1, pc, pc_reply, 0);\n\t\t} catch (RemoteException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void play() {\n\t\tSystem.out.println(\"TCL 电视机播放中...\");\r\n\t}", "private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }", "public void launch() {\n if (volume == 0f) {\n return;\n }\n MediaPlayer launch = MediaPlayer.create(context, R.raw.fire);\n launch.setVolume(volume, volume);\n launch.start();\n launch.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mediaPlayer) {\n mediaPlayer.reset();\n mediaPlayer.release();\n }\n });\n }", "protected void playParticle(){\n\t\teffectData.getPlayParticles().playParticles(effectData, effectData.getDisplayAt());\n\t}", "public void playSnare() {\n\t\tSystem.out.println(\"bang bang ba-bang\");\n\t\t\n\t}", "public void play() {\n\t\tmusic.play();\n\t\tsyncPosition();\n\t}", "public void PlaySound(Context context) {\r\n\t\tif (!this.mp.isPlaying()) {\r\n\t\t\tmp.start();\r\n\t\t}\r\n\t}", "public void togglePlay() {\n\t\tif (playing)\n\t\t\tpause();\n\t\telse\n\t\t\tplay();\n\t}", "public void play() {\n if (!isHungry()) {\n hunger += 2;\n mood += 2;\n fatigue += 3;\n\n if (!muted) {\n System.out.println(\"play\\t|\\tPlaying is fun!\");\n }\n }\n }", "public void speak(){\n System.out.println(\"Smile and wave boys. Smile and wave.\");\n }" ]
[ "0.8592924", "0.6746158", "0.67226756", "0.6710723", "0.66328186", "0.66128993", "0.6585678", "0.6526503", "0.6516945", "0.6482125", "0.6475233", "0.6465594", "0.64602107", "0.64525926", "0.64264965", "0.6404367", "0.6387967", "0.6373808", "0.6359246", "0.6317633", "0.6295673", "0.62882864", "0.6276469", "0.626201", "0.6258963", "0.625772", "0.6252309", "0.6250632", "0.6246052", "0.6241431", "0.6236274", "0.6235909", "0.62309855", "0.6213143", "0.62129897", "0.62128425", "0.62120044", "0.6197056", "0.6194322", "0.61884546", "0.61297673", "0.6127593", "0.6121866", "0.6117304", "0.6115972", "0.6115601", "0.6108474", "0.6090904", "0.60872346", "0.60859907", "0.6063938", "0.6062752", "0.60599226", "0.60592145", "0.6055592", "0.60547864", "0.60535765", "0.60520995", "0.60497373", "0.60497373", "0.60480374", "0.6046853", "0.60206586", "0.6001536", "0.599172", "0.59906584", "0.5988977", "0.5988275", "0.5986679", "0.5986585", "0.5986517", "0.59760773", "0.59679294", "0.59622616", "0.5961775", "0.59587294", "0.5958661", "0.5958584", "0.59492487", "0.59487593", "0.59441346", "0.5942645", "0.5942599", "0.59415674", "0.5933791", "0.5930553", "0.5921941", "0.59216374", "0.59209985", "0.5919908", "0.59198207", "0.59161663", "0.5912643", "0.59126306", "0.59106886", "0.5908291", "0.58995074", "0.58859545", "0.5884535", "0.58815545", "0.58795017" ]
0.0
-1
Creating a dialog and getting the right views:
private void showReturnDialog(){ final Dialog verificationDialog = new Dialog(this, R.style.DialogTheme); verificationDialog.setContentView(R.layout.dialog_verification); TextView verificationText = (TextView) verificationDialog.findViewById(R.id.verification_text); Button cancelButton = (Button) verificationDialog.findViewById(R.id.cancel_button); Button acceptButton = (Button) verificationDialog.findViewById(R.id.accept_button); verificationDialog.show(); verificationText.setText(R.string.verification_return); // Setting up a listener for the Cancel Button: cancelButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Play a proper sound: if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start(); // Dismiss dialog: verificationDialog.dismiss(); } }); // Setting up a listener for the Done Button: acceptButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Play a proper sound: if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start(); // Dismiss dialog: verificationDialog.dismiss(); // Go back to main menu: // Creating an intent: Intent mainIntent = new Intent(OfflineGameActivity.this , MainActivity.class); // Starting the Main Activity: startActivity(mainIntent); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "public abstract Dialog createDialog(DialogDescriptor descriptor);", "public abstract View getMainDialogContainer();", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = requireActivity().getLayoutInflater();\n final View view = inflater.inflate(R.layout.on_click_dialog, null);\n builder.setView(view);\n\n\n\n\n\n\n\n\n return builder.create();\n }", "private void initDialogView(View dialogView) {\n btnTidak = (Button) dialogView.findViewById(R.id.btnTidak);\n btnYa = (Button) dialogView.findViewById(R.id.btnYa);\n imgClosePopup = (ImageView) dialogView.findViewById(R.id.imgClosePopup);\n txtTitle = (TextView) dialogView.findViewById(R.id.txtTitle);\n iconTitle = (ImageView) dialogView.findViewById(R.id.iconTitle);\n }", "private void initDialog() {\n }", "protected abstract JDialog createDialog();", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n View view = getActivity().getLayoutInflater().inflate(R.layout.rollback_detail_dialog, new LinearLayout(getActivity()), false);\n\n initUI(view);\n // clickEvents();\n\n /*\n assert getArguments() != null;\n voucherTypes = (ArrayList<VoucherType>) getArguments().getSerializable(\"warehouses\");\n voucherType=\"\";\n*/\n\n Dialog builder = new Dialog(getActivity());\n builder.requestWindowFeature(Window.FEATURE_NO_TITLE);\n builder.setContentView(view);\n return builder;\n\n\n }", "public void createDialog(int d) {\n\t\tswitch (d) {\n\n\t\tcase DIALOG_SHOW_MESSAGE:\n\t\t\tAlertDialog.Builder messageBuilder = new AlertDialog.Builder(\n\t\t\t\t\tgetActivity());\n\t\t\tmessageBuilder.setMessage(errorMessage).setPositiveButton(\n\t\t\t\t\tgetString(R.string.ok),\n\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\tAlertDialog showDialog = messageBuilder.create();\n\t\t\tshowDialog.show();\n\t\t\tbreak;\n\n\t\tcase DIALOG_DISTANCE:\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\t\t\tbuilder.setTitle(R.string.select_distance);\n\t\t\tbuilder.setSingleChoiceItems(items, Preferences.selectedDistance,\n\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int item) {\n\t\t\t\t\t\t\tdistance = items[item];\n\t\t\t\t\t\t\tsetDeviceLocation();\n\t\t\t\t\t\t\tPreferences.selectedDistance = item;\n\t\t\t\t\t\t\t// save prefrences\n\t\t\t\t\t\t\tPreferences.saveSettings(getActivity());\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\ttoastLong(R.string.finding_map);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\tAlertDialog alert = builder.create();\n\t\t\talert.show();\n\t\t\tbreak;\n\n\t\tcase DIALOG_CLEAR_DEPLOYMENT:\n\t\t\tAlertDialog.Builder clearBuilder = new AlertDialog.Builder(\n\t\t\t\t\tgetActivity());\n\t\t\tclearBuilder\n\t\t\t\t\t.setMessage(getString(R.string.confirm_clear))\n\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t.setPositiveButton(getString(R.string.yes),\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint id) {\n\t\t\t\t\t\t\t\t\tmHandler.post(deleteAllMaps);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t.setNegativeButton(getString(R.string.no),\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint id) {\n\t\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\tAlertDialog clearDialog = clearBuilder.create();\n\t\t\tclearDialog.show();\n\n\t\t\tbreak;\n\n\t\tcase DIALOG_ADD_DEPLOYMENT:\n\t\t\tLayoutInflater factory = LayoutInflater.from(getActivity());\n\t\t\tfinal View textEntryView = factory.inflate(R.layout.add_map, null);\n\t\t\tfinal AddMapView addMapView = new AddMapView(textEntryView);\n\n\t\t\t// if edit was selected at the context menu, populate fields\n\t\t\t// with existing map details\n\t\t\tif (edit) {\n\t\t\t\tfinal List<ListMapModel> listMap = mListMapModel.loadMapById(\n\t\t\t\t\t\tmId, mapId);\n\t\t\t\tif (listMap.size() > 0) {\n\t\t\t\t\taddMapView.setMapName(listMap.get(0).getName());\n\t\t\t\t\taddMapView.setMapDescription(listMap.get(0).getDesc());\n\t\t\t\t\taddMapView.setMapUrl(listMap.get(0).getUrl());\n\t\t\t\t\taddMapView.setMapId(listMap.get(0).getId());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfinal AlertDialog.Builder addBuilder = new AlertDialog.Builder(\n\t\t\t\t\tgetActivity());\n\n\t\t\taddBuilder\n\t\t\t\t\t.setTitle(R.string.enter_map_details)\n\t\t\t\t\t.setView(textEntryView)\n\t\t\t\t\t.setPositiveButton(R.string.ok,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint whichButton) {\n\t\t\t\t\t\t\t\t\t// edit was selected\n\t\t\t\t\t\t\t\t\tif (edit) {\n\n\t\t\t\t\t\t\t\t\t\tif (!addMapView.updateMapDetails())\n\t\t\t\t\t\t\t\t\t\t\ttoastLong(R.string.fix_error);\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tmHandler.post(refreshMapList);\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\tif (!addMapView.addMapDetails())\n\t\t\t\t\t\t\t\t\t\t\ttoastLong(R.string.fix_error);\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tmHandler.post(fetchMapList);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t.setNegativeButton(R.string.cancel,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint whichButton) {\n\t\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\tAlertDialog deploymentDialog = addBuilder.create();\n\t\t\tdeploymentDialog.show();\n\t\t\tbreak;\n\t\t}\n\n\t}", "public abstract void initDialog();", "public BaseDialog create()\n {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n // instantiate the dialog with the custom Theme\n final BaseDialog dialog = new BaseDialog(context, R.style.Dialog);\n\n View layout = inflater.inflate(R.layout.view_shared_basedialog, null);\n\n //set the dialog's image\n this.icon = (ImageView) layout.findViewById(R.id.view_shared_basedialog_icon);\n\n if (this.imageResource > 0 || this.imageUrl != null)\n {\n this.icon.setVisibility(View.VISIBLE);\n if (this.imageResource > 0)\n {\n this.icon.setBackgroundResource(this.imageResource);\n }\n else\n {\n// TextureRender.getInstance().setBitmap(this.imageUrl, this.icon, R.drawable.no_data_error_image);\n }\n }\n else\n {\n this.icon.setVisibility(View.GONE);\n }\n\n // set check box's text and default value\n this.checkLayout = layout.findViewById(R.id.view_shared_basedialog_checkbox_layout);\n this.checkBox = (CheckBox) layout.findViewById(R.id.view_shared_basedialog_checkbox);\n this.checkBoxTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_checkbox_text);\n\n if (!TextUtils.isEmpty(this.checkBoxText))\n {\n this.checkLayout.setVisibility(View.VISIBLE);\n this.checkBoxTextView.setText(this.checkBoxText);\n this.checkBox.setChecked(checkBoxDefaultState);\n }\n else\n {\n this.checkLayout.setVisibility(View.GONE);\n }\n\n // set the dialog main title and sub title\n this.maintitleTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_maintitle_textview);\n this.subtitleTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_subtitle_textview);\n this.titleDivideTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_titledivide_textview);\n if (!TextUtils.isEmpty(title1))\n {\n this.maintitleTextView.setText(title1);\n if (this.title1BoldAndBig)\n {\n this.maintitleTextView.setTypeface(null, Typeface.BOLD);\n this.maintitleTextView.setTextSize(17);\n }\n\n this.maintitleTextView.setVisibility(View.VISIBLE);\n }\n else\n {\n this.maintitleTextView.setVisibility(View.GONE);\n }\n\n if (!TextUtils.isEmpty(title2))\n {\n this.subtitleTextView.setText(title2);\n this.subtitleTextView.setVisibility(View.VISIBLE);\n }\n else\n {\n this.subtitleTextView.setVisibility(View.GONE);\n }\n this.titleDivideTextView.setVisibility(View.GONE);\n\n // set the confirm button\n this.positiveButton = ((Button) layout.findViewById(R.id.view_shared_basedialog_positivebutton));\n if (!TextUtils.isEmpty(positiveButtonText))\n {\n this.positiveButton.setText(positiveButtonText);\n this.positiveButton.setVisibility(View.VISIBLE);\n if (positiveButtonClickListener != null)\n {\n this.positiveButton.setOnClickListener(new View.OnClickListener()\n {\n public void onClick(View v)\n {\n positiveButtonClickListener.onClick(dialog, DialogInterface.BUTTON_POSITIVE);\n if (checkBox.isChecked()&&onCheckBoxListener!=null)\n {\n onCheckBoxListener.checkedOperation();\n }\n }\n });\n }\n }\n else\n {\n // if no confirm button just set the visibility to GONE\n this.positiveButton.setVisibility(View.GONE);\n }\n\n // set the cancel button\n this.negativeButton = ((Button) layout.findViewById(R.id.view_shared_basedialog_negativebutton));\n if (!TextUtils.isEmpty(negativeButtonText))\n {\n this.negativeButton.setText(negativeButtonText);\n this.negativeButton.setVisibility(View.VISIBLE);\n if (negativeButtonClickListener != null)\n {\n this.negativeButton.setOnClickListener(new View.OnClickListener()\n {\n public void onClick(View v)\n {\n negativeButtonClickListener.onClick(dialog, DialogInterface.BUTTON_NEGATIVE);\n }\n });\n }\n }\n else\n {\n // if no confirm button just set the visibility to GONE\n this.negativeButton.setVisibility(View.GONE);\n }\n\n // set button's background\n this.buttonDivideTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_buttondivide_textview);\n if (!TextUtils.isEmpty(negativeButtonText) && !TextUtils.isEmpty(negativeButtonText))\n {\n this.buttonDivideTextView.setVisibility(View.VISIBLE);\n this.positiveButton.setBackgroundResource(R.drawable.view_shared_corner_round_rightbottom);\n this.negativeButton.setBackgroundResource(R.drawable.view_shared_corner_round_leftbottom);\n }\n else\n {\n this.buttonDivideTextView.setVisibility(View.GONE);\n this.positiveButton.setBackgroundResource(R.drawable.view_shared_corner_round_bottom);\n this.negativeButton.setBackgroundResource(R.drawable.view_shared_corner_round_bottom);\n }\n\n // set the content message\n this.contentLayout = layout.findViewById(R.id.view_shared_basedialog_content_layout);\n if (!TextUtils.isEmpty(message))\n {\n this.contentTextView = ((TextView) layout.findViewById(R.id.view_shared_basedialog_content_textview));\n this.contentTextView.setText(message);\n this.contentTextView.setMovementMethod(ScrollingMovementMethod.getInstance());\n }\n else if (contentView != null)\n {\n // if no message set\n // add the contentView to the dialog body\n ((ViewGroup) this.contentLayout).removeAllViews();\n ((ViewGroup) this.contentLayout).addView(contentView, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n }\n else\n {\n this.contentLayout.setVisibility(View.GONE);\n }\n\n int[] params = Utils.getLayoutParamsForHeroImage();\n dialog.setContentView(layout, new ViewGroup.LayoutParams(params[0]*4/5, ViewGroup.LayoutParams.MATCH_PARENT));\n return dialog;\n }", "public void initDialogBoxViews(View mView) {\n trailName = (EditText) mView.findViewById(R.id.TrailNametxt);\n trailCode = (EditText) mView.findViewById(R.id.TrailCodetxt);\n module = (EditText) mView.findViewById(R.id.Moduletxt);\n trailDate = (EditText) mView.findViewById(R.id.datetxt);\n addtrailBtn = (Button) mView.findViewById(R.id.CreateBtn);\n }", "@Override\n protected Dialog onCreateDialog(int id) {\n \tswitch (id) {\n\t\tcase DLG_PROGRESSBAR:\n\t\t\treturn dialogoProgressBar();\n\t\tcase DLG_BUTTONS:\n\t\t\treturn dialogButtons();\n\t\tcase DLG_LIST:\n\t\t\treturn dialogLista();\n\t\tcase DLG_LIST_SELECT:\n\t\t\treturn dialogListaSelect();\n\t\tdefault:\n\t\t\treturn dialogButtons();\n\t\t}\n }", "private void findDialogView() {\n dialog = new BottomSheetDialog(getActivity(), R.style.BottomSharingSheet);\n View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.sharing_bottom_sheet, null);\n dialog.setContentView(dialogView);\n closeNavigation = dialogView.findViewById(R.id.imgClose);\n llFacebook = dialogView.findViewById(R.id.llFacebook);\n llTwitter = dialogView.findViewById(R.id.llemail);\n llInstagram = dialogView.findViewById(R.id.lltalk);\n llStories = dialogView.findViewById(R.id.llGoogle);\n llBand = dialogView.findViewById(R.id.llBand);\n llMore = dialogView.findViewById(R.id.llMore);\n llVideoReport = dialogView.findViewById(R.id.llVideoReport);\n closeNavigation.setOnClickListener(this);\n llFacebook.setOnClickListener(this);\n llTwitter.setOnClickListener(this);\n llInstagram.setOnClickListener(this);\n llStories.setOnClickListener(this);\n llBand.setOnClickListener(this);\n llMore.setOnClickListener(this);\n llVideoReport.setOnClickListener(this);\n\n }", "Dialog createDialog(int id) {\n // First we treat the color picker\n if (id >= DIALOG_MASK_COLORS) {\n int icp = id - DIALOG_MASK_COLORS;\n String title = getResources().getStringArray(R.array.items_colors)[icp];\n ColoredPart cp = ColoredPart.values()[icp];\n\n // We can embed our nice color picker view into a regular dialog.\n // For that we use the provided factory method.\n return ColorPickerView.createDialog(this, title, cp.color, new OnClickDismissListener() {\n @Override\n public void onClick(int which) {\n cp.color = which;\n bmView.invalidate();\n }\n });\n }\n\n // Now we treat all the cases which can easily be built as an AlertDialog.\n // For readability throughout the many cases we don't use chaining.\n AlertDialog.Builder b = new AlertDialog.Builder(this);\n\n switch (id) {\n case DIALOG_LEVEL:\n b.setTitle(R.string.menu_level);\n b.setSingleChoiceItems(R.array.items_level, bmView.level - 1, new OnClickDismissListener() {\n @Override\n public void onClick(int which) {\n bmView.newGame(which + 1);\n }\n });\n break;\n\n case DIALOG_SIZE:\n b.setTitle(R.string.menu_size);\n b.setSingleChoiceItems(R.array.items_size, bmView.size - 1, new OnClickDismissListener() {\n @Override\n public void onClick(int which) {\n bmView.initField(which + 1);\n bmView.newGame(0);\n }\n });\n break;\n\n case DIALOG_LIVES:\n b.setTitle(R.string.menu_lives);\n // We use an array adapter in order to be able to relate the selected\n // value to its list position. NOTE: For unclear reasons, passing this\n // adapter even with an additional text view layout id to the builder\n // does not give the same layout as passing the resource id directly.\n // So, we do use the resource id again for that purpose in the call\n // to setSingleChoiceItems.\n final ArrayAdapter<CharSequence> a =\n ArrayAdapter.createFromResource(this, R.array.items_lives, android.R.layout.select_dialog_singlechoice);\n int liv = bmView.getLives();\n int pos = (liv == 0) ? a.getCount() - 1 : a.getPosition(Integer.toString(liv));\n b.setSingleChoiceItems(R.array.items_lives, pos, new OnClickDismissListener() {\n @Override\n public void onClick(int which) {\n // First check for infinity choice, then for all other possible choices\n if (which == a.getCount() - 1)\n bmView.setLives(0);\n else\n try {\n bmView.setLives(Integer.parseInt(String.valueOf(a.getItem(which))));\n } catch (Exception e) {\n // Do nothing\n Log.e(LOG_TAG, e.getLocalizedMessage(), e);\n }\n }\n });\n break;\n\n case DIALOG_COLORS:\n b.setTitle(R.string.menu_colors);\n b.setItems(R.array.items_colors, new OnClickDismissListener() {\n @Override\n public void onClick(int which) {\n if (which == ColoredPart.values().length) {\n // Reset colors\n ColoredPart.resetAll();\n bmView.invalidate();\n } else {\n // Call color picker dialog\n doDialog(which + DIALOG_MASK_COLORS);\n }\n }\n });\n break;\n\n case DIALOG_BACKGROUND:\n b.setTitle(R.string.menu_background);\n b.setSingleChoiceItems(R.array.items_background, bmView.background, new OnClickDismissListener() {\n @Override\n public void onClick(int which) {\n bmView.background = which;\n bmView.invalidate();\n }\n });\n break;\n\n case DIALOG_SOUND:\n b.setTitle(R.string.menu_sound);\n // Special treatment for eventually using only a subset of the menu items\n String[] menuIts = new String[NUM_ITEMS_SOUND];\n boolean[] menuSts = new boolean[NUM_ITEMS_SOUND];\n System.arraycopy(\n getResources().getStringArray(R.array.items_settings),\n 0, menuIts, 0, NUM_ITEMS_SOUND);\n System.arraycopy(\n new boolean[]{bmView.isHapticFeedbackEnabled(), bmView.isSoundEffectsEnabled(), musicPlayer.isMusicEnabled},\n 0, menuSts, 0, NUM_ITEMS_SOUND);\n b.setMultiChoiceItems(menuIts, menuSts, (dialog, which, isChecked) -> {\n switch (which) {\n case 0:\n bmView.setHapticFeedbackEnabled(isChecked);\n break;\n\n case 1:\n bmView.setSoundEffectsEnabled(isChecked);\n setVolumeControlStream();\n break;\n\n case 2:\n musicPlayer.toggle(isChecked);\n setVolumeControlStream();\n break;\n\n default:\n dialog.dismiss();\n }\n });\n b.setPositiveButton(android.R.string.ok, new OnClickDismissListener());\n break;\n\n case DIALOG_CENTER:\n b.setTitle(R.string.menu_center);\n b.setSingleChoiceItems(R.array.items_center, centerDialogs ? 0 : 1, new OnClickDismissListener() {\n @Override\n public void onClick(int which) {\n centerDialogs = (which == 0);\n }\n });\n break;\n\n case DIALOG_MIDI:\n b.setTitle(R.string.title_midi);\n b.setMessage(R.string.text_midi);\n b.setOnKeyListener(new OnKeyDismissListener());\n b.setPositiveButton(android.R.string.ok, new OnClickDismissListener());\n break;\n\n case DIALOG_ABOUT:\n b.setTitle(R.string.menu_about);\n b.setMessage(R.string.text_about);\n b.setOnKeyListener(new OnKeyDismissListener());\n b.setPositiveButton(android.R.string.ok, new OnClickDismissListener());\n break;\n\n case DIALOG_HELP:\n default:\n b.setTitle(R.string.menu_help);\n b.setMessage(R.string.text_help);\n b.setOnKeyListener(new OnKeyDismissListener());\n b.setPositiveButton(android.R.string.ok, new OnClickDismissListener());\n break;\n }\n\n return b.create();\n }", "@Override\n\tprotected Dialog onCreateDialog(int id)\n\t{\n\t\tsuper.onCreateDialog(id);\n\t\treturn visitor.instantiateDialog(id);\n\t}", "private void initDialog() {\n dialog = new Dialog(context);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialog_custom_ok);\n }", "private void setViews() {\n lv.setAdapter(adapter);\n\n dialog2 = new MiddleDialog2(INSTANCE, getResources().getString(R.string.title), getResources().getString(R.string.value), new MiddleDialog2.onBottonListener() {\n @Override\n public void onOk() {\n\n finish();\n }\n },R.style.registDialog);\n }", "@Override\r\n \tprotected Dialog onCreateDialog(int id) {\n \t\tDialog dialog;\r\n \t\tswitch (id) {\r\n \t\t\tcase DIALOG_LOCATION_HISTORY:\r\n \t\t\t\t//logically, this cannot appear before the location layout is updated, so there is no \r\n \t\t\t\t//chance historyLayout can be null, except you are doing something wrong\r\n \t\t\t\tdialog = new Dialog(this);\r\n \t\t\t\tdialog.setTitle(\"Location History\");\r\n \t\t\t\tdialog.setContentView(detachedHistoryLayout);\r\n \t\t\t\treturn dialog;\r\n \t\t\t\t\r\n \t\t\tcase DIALOG_LOCATION:\r\n \t\t\t\tlocationLayout = (LinearLayout) getLayoutInflater().inflate\r\n \t\t\t\t\t\t\t(R.layout.manual_location_dialog, null);\r\n \t\t\t\tdetachedHistoryLayout = (LinearLayout) getLayoutInflater().inflate\r\n \t\t\t\t\t\t(R.layout.manual_location_history_dialog, null);\r\n \t\t\t\t\r\n \t\t\t\tfinal LinearLayout historyLayout = (LinearLayout) detachedHistoryLayout.findViewById(R.id.historyLayout); \r\n \t\t\t\t\r\n \t\t\t\tfinal TextView currentLocation = (TextView) locationLayout.findViewById(R.id.locationText);\r\n \t\t\t\tif (MyApplication.currentLocation != null)\r\n \t\t\t\t{\r\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\tcurrentLocation.setText(\"Your last updated location is \" + '\\n' + \r\n \t\t\t\t\t\t\t\tMyApplication.currentLocation.getString(\"name\") + \" within approx. \" \r\n \t\t\t\t\t\t\t\t+ MyApplication.currentLocation.getString(\"accuracy\"));\r\n \t\t\t\t\t} catch (JSONException e) {\r\n \t\t\t\t\t\te.printStackTrace();\r\n \t\t\t\t\t\tcurrentLocation.setText(\"Cannot get your current location.\");\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\t\r\n \t\t\t\tfinal RelativeLayout showHistoryLayout = (RelativeLayout) locationLayout.findViewById(R.id.showHistoryLayout);\r\n \t\t\t\tshowHistoryLayout.setOnClickListener(new OnClickListener() {\r\n \t\t\t\t\t@Override\r\n \t\t\t\t\tpublic void onClick(View v) {\r\n \t\t\t\t\t\tshowDialog(Page.DIALOG_LOCATION_HISTORY);\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\t\t\r\n \t\t\t\tnew LocationListTask(null,Page.this, false, true).execute(historyLayout,currentLocation);\r\n \t\t\t\t\r\n \t\t\t\tRelativeLayout autoLocLayout = (RelativeLayout) locationLayout.findViewById(R.id.autoLocLayout);\r\n \t\t\t\tautoLocLayout.setOnClickListener(new OnClickListener() {\r\n \t\t\t\t\t@Override\r\n \t\t\t\t\tpublic void onClick(View v) {\r\n \t\t\t\t\t\ttry {\r\n \t\t\t\t\t\t\tLocationTracker.autoLoc = true;\r\n \t\t\t\t\t\t\tnew LocationListTask(null,Page.this, false, true).execute(historyLayout,currentLocation);\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\tToast.makeText(Page.this, \"Your new location cannot be updated. Please try again later\", \r\n \t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n \t\t\t\t\t\t} \r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\t\t\r\n \t\t\t\tfinal EditText manualLocationField = (EditText) locationLayout.findViewById(R.id.manualLocationField);\r\n \t\t\t\tmanualLocationField.setOnKeyListener(new OnKeyListener() {\r\n \t\t\t\t\t@Override\r\n \t\t\t\t\tpublic boolean onKey(View v, int keyCode, KeyEvent event) {\r\n \t\t\t\t\t\tif (event.getAction() == KeyEvent.ACTION_DOWN)\r\n \t\t\t\t\t\t{\r\n \t\t\t\t\t\t\tswitch (keyCode) {\r\n \t\t\t\t\t\t\tcase KeyEvent.KEYCODE_ENTER:\r\n \t\t\t\t\t\t\tcase KeyEvent.KEYCODE_DPAD_CENTER:\r\n \t\t\t\t\t\t\t\tLocationTracker.autoLoc = false;\r\n \t\t\t\t\t\t\t\tnew LocationListTask(manualLocationField.getText().toString(), Page.this, \r\n \t\t\t\t\t\t\t\t\t\t\tfalse, true).execute(historyLayout,currentLocation);\r\n \t\t\t\t\t\t\t\treturn true;\r\n \t\t\t\t\t\t\tdefault:\r\n \t\t\t\t\t\t\t\tbreak;\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\treturn false;\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\t\t\r\n \t\t\t\tButton setLocation = (Button) locationLayout.findViewById(R.id.setLocationButton);\r\n \t\t\t\tsetLocation.setOnClickListener(new OnClickListener() {\r\n \t\t\t\t\t@Override\r\n \t\t\t\t\tpublic void onClick(View v) {\r\n \t\t\t\t\t\tLocationTracker.autoLoc = false;\r\n \t\t\t\t\t\ttry {\r\n \t\t\t\t\t\t\tnew LocationListTask(manualLocationField.getText().toString(), Page.this, \r\n \t\t\t\t\t\t\t\t\tfalse, true).execute(historyLayout,currentLocation);\r\n \t\t\t\t\t\t} catch (Exception e) {\r\n \t\t\t\t\t\t\tToast.makeText(Page.this, \"Your new location cannot be updated. Please try \" +\r\n \t\t\t\t\t\t\t\t\t\"again later\", Toast.LENGTH_SHORT).show();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\t\t\r\n \t\t\t\tdialog = new LocationDialog(this);\r\n \t\t\t\tdialog.setTitle(\"Update your location\");\r\n \t\t\t\tdialog.setContentView(locationLayout);\r\n \t\t\t\treturn dialog;\r\n \t\t\tdefault:\r\n \t\t\t\tbreak;\r\n \t\t}\r\n \t\treturn super.onCreateDialog(id);\r\n \t}", "private void initViews() {\n\t\t\r\n\t\tTypeface face = Typeface.createFromAsset(getAssets(), \"Teko_Light.ttf\");\r\n\r\n\t\tet_pin = (EditText) findViewById(R.id.et_pin);\r\n\t\tet_pin.setTypeface(face);\r\n\t\tbtn_admin_login = (Button) findViewById(R.id.btn_admin_login);\r\n\t\tbtn_admin_login.setTypeface(face);\r\n\r\n\t\td = new DialogView();\r\n\t}", "@Override\n protected Dialog onCreateDialog(int id) {\n Dialog dialog = null;\n switch (id) {\n case CHOOSE_METHOD_DIALOG:\n return chooseActionContextMenu.createMenu(this.getString(R.string.choose_action_title));\n case ABOUT_DIALOG:\n dialog = createAboutDialog();\n break;\n default:\n dialog = null;\n break;\n }\n return dialog;\n }", "public void popUpDialogBox(View passedView, int code) {\n mBuilder = new AlertDialog.Builder(TrailActivity.this);\n if(code == 0) {\n Date editedTrailDt = null;\n editedView = passedView;\n editedTrailName = (EditText) editedView.findViewById(R.id.TrailNametxt);\n editedTrailModule = (EditText) editedView.findViewById(R.id.Moduletxt);\n editedTrailCode = (EditText) editedView.findViewById(R.id.TrailCodetxt);\n editedTrailDate = (EditText) editedView.findViewById(R.id.datetxt);\n try { editedTrailDt = new SimpleDateFormat(\"dd-MM-yyyy\", Locale.ENGLISH).parse(editedTrailDate.getText().toString().trim()); }\n catch (ParseException e) { e.printStackTrace(); }\n editedTrailId = geTrailId(editedTrailCode.getText().toString(), editedTrailDt);\n }\n else editedView = null;\n initDialogBoxViews(passedView);\n setDateClickListener();\n setTrailDateClickListener();\n setAddtrailBtnClickListener();\n mBuilder.setView(passedView);\n dialog = mBuilder.create();\n dialog.show();\n }", "public Dialog onCreateDialog(Bundle savedInstanceState){\n AlertDialog.Builder sample_builder = new AlertDialog.Builder(getActivity());\n sample_builder.setView(\"activity_main\");\n sample_builder.setMessage(\"This is a sample prompt. No new networks should be scanned while this prompt is up\");\n sample_builder.setCancelable(true);\n sample_builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogPositiveClick(StationFragment.this);\n }\n });\n sample_builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogNegativeClick(StationFragment.this);\n }\n });\n return sample_builder.create();\n\n }", "public Dialog<String> createDialog() {\n\t\t// Creating a dialog\n\t\tDialog<String> dialog = new Dialog<String>();\n\n\t\tButtonType type = new ButtonType(\"Ok\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().add(type);\n\t\treturn dialog;\n\t}", "private void openDialog() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.allmark));\n\t\tfinal List<ReaderTags> listData = ReaderDataBase\n\t\t\t\t.getReaderDataBase(this);\n\t\tif (listData.size() > 0) {\n\t\t\tListView list = new ListView(this);\n\t\t\tfinal MTagAdapter myAdapter = new MTagAdapter(this, listData);\n\t\t\tlist.setAdapter(myAdapter);\n\t\t\tlist.setOnItemClickListener(new OnItemClickListener() {\n\t\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\tJump(arg2, listData, myAdapter);\n\t\t\t\t}\n\t\t\t});\n\t\t\tlist.setOnItemLongClickListener(new OnItemLongClickListener() {\n\n\t\t\t\tpublic boolean onItemLongClick(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\tdeleteOneDialog(arg2, listData, myAdapter);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tbuilder.setView(list);\n\t\t} else {\n\t\t\tTextView txt = new TextView(this);\n\t\t\ttxt.setText(getString(R.string.nomark));\n\t\t\ttxt.setPadding(10, 5, 0, 5);\n\t\t\ttxt.setTextSize(16f);\n\t\t\tbuilder.setView(txt);\n\t\t}\n\t\tbuilder.setNegativeButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}", "private void initPopupViewControls(){\n // Get layout inflater object.\n LayoutInflater layoutInflater = LayoutInflater.from(getActivity());\n\n // Inflate the popup dialog from a layout xml file.\n popupInputDialogView = layoutInflater.inflate(R.layout.custom_popup_add_new_communication_record, null);\n\n // Get user input edittext and button ui controls in the popup dialog.\n _interactionTypeSpinner = popupInputDialogView.findViewById(R.id.inteructionTypeSpinner);\n _details = popupInputDialogView.findViewById(R.id.details);\n _specialNote = popupInputDialogView.findViewById(R.id.specialNote);\n _nextActionTypeSpinner = popupInputDialogView.findViewById(R.id.nextActionTypeSpinner);\n _nextActionDate = popupInputDialogView.findViewById(R.id.nextActionDate);\n _nextMeetingLocation = popupInputDialogView.findViewById(R.id.nextMeetingLocation);\n\n _saveFamilyMember = popupInputDialogView.findViewById(R.id.button_save_user_data);\n _cancelInput = popupInputDialogView.findViewById(R.id.button_cancel_user_data);\n\n\n }", "private void createDialog() {\r\n final AlertDialog dialog = new AlertDialog.Builder(getActivity()).setView(R.layout.dialog_recorder_details)\r\n .setTitle(\"Recorder Info\").setPositiveButton(\"Start\", (dialog1, which) -> {\r\n EditText width = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_width);\r\n EditText height = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_height);\r\n CheckBox audio = (CheckBox) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_audio_checkbox);\r\n EditText fileName = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_filename_name);\r\n mServiceHandle.start(new RecordingInfo(Integer.parseInt(width.getText().toString()), Integer.parseInt(height.getText().toString()),\r\n audio.isChecked(), fileName.getText().toString()));\r\n dialog1.dismiss();\r\n }).setNegativeButton(\"Cancel\", (dialog1, which) -> {\r\n dialog1.dismiss();\r\n }).show();\r\n Point size = new Point();\r\n getActivity().getWindowManager().getDefaultDisplay().getRealSize(size);\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_width)).setText(Integer.toString(size.x));\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_height)).setText(Integer.toString(size.y));\r\n }", "private void openCreateAccountDialog()\n {\n testDialog();\n\n }", "private void showCustomDialog(VisitorModel visitor) {\n ViewGroup viewGroup = ((MainActivity)context).findViewById(android.R.id.content);\n\n //then we will inflate the custom alert dialog xml that we created\n View dialogView = LayoutInflater.from(context).inflate(R.layout.my_dialog, viewGroup, false);\n\n TextView btnUnfollow = dialogView.findViewById(R.id.btn_unfollow);\n TextView btnCancel = dialogView.findViewById(R.id.btn_cancel);\n TextView txtUsername = dialogView.findViewById(R.id.txt_username);\n TextView txtAvatar = dialogView.findViewById(R.id.txt_avatar);\n CircleImageView imgAvatar = dialogView.findViewById(R.id.img_avatar);\n\n txtAvatar.setText(GlobalFunc.getFirstLetter(visitor.username));\n txtUsername.setText(visitor.username);\n\n //Now we need an AlertDialog.Builder object\n AlertDialog.Builder builder = new AlertDialog.Builder(context, R.style.myDialogForUnVisit);\n //setting the view of the builder to our custom view that we already inflated\n builder.setView(dialogView);\n\n //finally creating the alert dialog and displaying it\n AlertDialog alertDialog = builder.create();\n alertDialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);\n alertDialog.show();\n\n btnUnfollow.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n unVisit(visitor);\n alertDialog.hide();\n }\n });\n\n btnCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.hide();\n }\n });\n }", "private void dialog() {\n\t\tGenericDialog gd = new GenericDialog(\"Bildart\");\n\t\t\n\t\tgd.addChoice(\"Bildtyp\", choices, choices[0]);\n\t\t\n\t\t\n\t\tgd.showDialog();\t// generiere Eingabefenster\n\t\t\n\t\tchoice = gd.getNextChoice(); // Auswahl uebernehmen\n\t\t\n\t\tif (gd.wasCanceled())\n\t\t\tSystem.exit(0);\n\t}", "@Override\n\tprotected Dialog onCreateDialog(int id) {\n\t\treturn buildDialog(MainActivity.this);\n\t\t\n\t}", "public AlertDialog createSimpleDialog(String mensaje, String titulo, final String typ) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n View v = inflater.inflate(R.layout.dialog_monitoring_info, null);\n builder.setView(v);\n\n TextView tvTitle = (TextView) v.findViewById(R.id.tv_title_dialog);\n TextView tvDescription = (TextView) v.findViewById(R.id.tv_description_dialog);\n\n tvTitle.setText(titulo);\n tvTitle.setCompoundDrawables(ContextCompat.getDrawable(v.getContext(), R.drawable.ic_question), null, null, null);\n tvDescription.setText(mensaje);\n\n builder.setPositiveButton(getResources().getString(R.string.info_dialog_option_accept),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (typ.equals(\"REGIST\")){\n MonitoringRegistrationFormFragment fragment = new MonitoringRegistrationFormFragment();\n Bundle params = new Bundle();\n params.putString(\"AREA\", area);\n params.putString(\"OPCION\", \"N\");\n fragment.setArguments(params);\n\n getActivity().getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);\n\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.monitoring_principal_context, fragment)\n .commit();\n }\n else {\n AdminUserFormFragment fragment = new AdminUserFormFragment();\n getActivity().getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.transaction_principal_context, fragment)\n .commit();\n }\n }\n },300);\n }\n })\n .setNegativeButton(getResources().getString(R.string.info_dialog_option_cancel),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n builder.create().dismiss();\n if (typ.equals(\"REGIST\")){\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent intent = new Intent(getActivity(), MonitorMenuActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n startActivity(intent);\n getActivity().finish();\n }\n },300);\n }\n else {\n getActivity().finish();\n }\n }\n });\n\n return builder.create();\n }", "public void howtouse(View view) {\n showdialog();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n return mDialog;\n }", "public void addRelationshipDialog() { new RelationshipDialog(); }", "@Override // com.oculus.panelapp.assistant.dialogs.AssistantDialog\n public View onCreateView(Context context) {\n return LayoutInflater.from(context).inflate(R.layout.system_dialog, (ViewGroup) null, false);\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n //return super.onCreateDialog(savedInstanceState); // TODO: should we call it?\n final String title = getArguments().getString(\"TITLE\");\n final String msg = getArguments().getString(\"MESSAGE\");\n final String pos = getArguments().getString(\"POS\");\n final String neg = getArguments().getString(\"NEG\");\n final String neu = getArguments().getString(\"NEU\");\n // TODO - this is just an int... what about other ... Parcelable\n final int idx = getArguments().getInt(\"IDX\");\n final int iconid = getArguments().getInt(\"ICON_ID\");\n final float textsize = getArguments().getFloat(\"MSGSIZE\");\n\n if (savedInstanceState != null) {\n tag = savedInstanceState.getString(\"TAG\");\n }\n\n final DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialogInterface, int clickedButton) {\n ConfirmListener act = (ConfirmListener) getActivity();\n act.processConfirmation(clickedButton, tag, idx);\n }\n };\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setTitle(title)\n .setMessage(msg);\n if (iconid != 0 && getResources().getResourceTypeName(iconid).equals(\"drawable\")) {\n // this must be a R.drawable.id, otherwise crash!\n // android.content.res.Resources$NotFoundException:\n builder.setIcon(iconid);\n }\n if (pos != null) {\n builder.setPositiveButton(pos, listener);\n }\n if (neg != null) {\n builder.setNegativeButton(neg, listener);\n }\n if (neu != null) {\n builder.setNeutralButton(neu, listener);\n }\n\n dialog = builder.create();\n if (textsize != 0) {\n dialog.show(); // need to call this to be able to get the TextView as non-null pointer\n TextView tv = (TextView) dialog.findViewById(android.R.id.message);\n if (tv != null) {\n tv.setTextSize(textsize);\n }\n }\n return dialog;\n }", "public void crearDialogo() {\r\n final PantallaCompletaDialog a2 = PantallaCompletaDialog.a(getString(R.string.hubo_error), getString(R.string.no_hay_internet), getString(R.string.cerrar).toUpperCase(), R.drawable.ic_error);\r\n a2.f4589b = new a() {\r\n public void onClick(View view) {\r\n a2.dismiss();\r\n }\r\n };\r\n a2.show(getParentFragmentManager(), \"TAG\");\r\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setTitle(\"Add Participant...\");\n builder.setMessage(\"Participant address:\");\n\n final EditText input = new EditText(getActivity());\n LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT,\n LinearLayout.LayoutParams.MATCH_PARENT);\n input.setLayoutParams(lp);\n builder.setView(input); // uncomment this line\n\n\n builder.setPositiveButton(\"Add\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n mListener.onAddUserDialogAdd(input.getText().toString());\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n mListener.onAddUserDialogCancel();\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public static void getDataWithDialogs(ChampionSelectGUI t) {\n\t\tJDialog sND = createSummonerNameDialog(t);\n\t\tsND.setVisible(true);\n\t\tJDialog rD = createRegionDialog(t);\n\t\trD.setVisible(true);\n\t\tJDialog roleD = createRoleDialog(t);\n\t\troleD.setVisible(true);\n\t\tJDialog teamD = createTeamDialog(t);\n\t\tteamD.setVisible(true);\n\t}", "void generar_dialog_preguntas();", "private Dialogs () {\r\n\t}", "public interface DialogFactory {\n MessageDialog createMessageDialog();\n ListDialog createListDialog();\n SingleChoiceDialog createSingleChoiceDialog();\n MultiChoiceDialog createMultiChoiceDialog();\n}", "@Override\n\t\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\t\treturn mDialog;\n\t\t}", "@Override\n public Dialog onCreateDialog(Bundle state) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n // Set the title\n builder.setTitle(R.string.new_location_title);\n\n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n // Pass null as the parent view because its going in the dialog layout\n view = inflater.inflate(R.layout.fire_report, null);\n builder.setView(view);\n\n populate();\n\n // Add a cancel button\n builder.setNegativeButton(R.string.close, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n Boolean checked = ((CheckBox) view.findViewById(R.id.checkExtinguished)).isChecked();\n if (fire.isExtinguished() != checked) {\n fire.setExtinguished(checked);\n if (!new Cloud(view.getContext()).updateExtinguishedToCloud(fire)) {\n fire.setExtinguished(!checked);\n view.post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(view.getContext(), R.string.extinguished_failed, Toast.LENGTH_SHORT).show();\n }\n });\n }\n }\n }\n }).start();\n }\n });\n\n dlg = builder.create();\n\n return dlg;\n }", "@Override\r\n public Dialog onCreateDialog(Bundle savedInstanceState) {\r\n //use the builder class for convenient dialog construction\r\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n //get the layout inflater\r\n LayoutInflater inflater = getActivity().getLayoutInflater();\r\n View rootView = inflater.inflate(R.layout.dialog_room, null);\r\n mRoomNumber = rootView.findViewById(R.id.roomNumberEditText);\r\n mAllergy = rootView.findViewById(R.id.allergyEditText);\r\n mPlateType = rootView.findViewById(R.id.plateTypeEditText);\r\n mChemicalDiet = rootView.findViewById(R.id.chemicalDietEditText);\r\n mTextureDiet = rootView.findViewById(R.id.textureDietEditText);\r\n mLiquidDiet = rootView.findViewById(R.id.liquidDietEditText);\r\n mLikes = rootView.findViewById(R.id.likesEditText);\r\n mDislikes = rootView.findViewById(R.id.dislikesEditText);\r\n mNotes = rootView.findViewById(R.id.notesEditText);\r\n mMeal = rootView.findViewById(R.id.mealEditText);\r\n mDessert = rootView.findViewById(R.id.dessertEditText);\r\n mBeverage = rootView.findViewById(R.id.beverageEditText);\r\n\r\n mBeverage.setOnEditorActionListener(new TextView.OnEditorActionListener() {\r\n @Override\r\n public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {\r\n if (i == EditorInfo.IME_ACTION_DONE || keyEvent.getAction() == KeyEvent.ACTION_DOWN){\r\n addRoom();\r\n }\r\n return true;\r\n }\r\n });\r\n\r\n //inflate and set the layout for the dialog\r\n //pass null as the parent view cause its going in the dialog layout.\r\n builder.setView(rootView).setPositiveButton(R.string.button_done, new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n addRoom();\r\n }\r\n });\r\n\r\n return builder.create();\r\n }", "public void openDialogCreateVisual(){\n DataHeader[] tabHeader = dataset.getListDataHeaderDouble(true);\n TypeVisualization[] tabVis = getListTypeVisualization(tabHeader.length);\n DataHeader[] tabHeaderLabel = dataset.getListDataHeaderDouble(false);\n CreateDataVisualDialog dialog = new CreateDataVisualDialog(this, tabVis, tabHeader, tabHeaderLabel);\n dialog.setVisible(true);\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Done entering class?\")\n .setPositiveButton(\"yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n })\n .setNegativeButton(\"no\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent tmp = new Intent(getContext(), course_info.class);\n startActivity(tmp);\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public void showNewTaskDialog() {\n LayoutInflater inflater = getActivity().getLayoutInflater();\n final View v = inflater.inflate(R.layout.dialog_newtask, null);\n\n newTaskDialog = new AlertDialog.Builder(getActivity()).setView(v).create();\n //set view and text type\n TextView title = (TextView) v.findViewById(R.id.newTaskPageTitle);\n Typeface RalewayBold = Typeface.createFromAsset(getActivity().getAssets(), \"Raleway-Bold.ttf\");\n title.setTypeface(RalewayBold);\n\n //sets buttons\n Button done = (Button) v.findViewById(R.id.doneAddingTask);\n Button cancel = (Button) v.findViewById(R.id.CancelAddingTask);\n Button addUser = (Button) v.findViewById(R.id.newTaskAddUserButton);\n\n //get each field\n newTaskValidAssigneeIndicator = (ImageView) v.findViewById(R.id.newTaskValidAssigneeIndicator);\n newTaskAssigneeField = (TextInputEditText) v.findViewById(R.id.newTaskNewUserField);\n newtaskDateField = (TextInputEditText) v.findViewById(R.id.newTaskDueDateField);\n newTaskNameField = (TextInputEditText) v.findViewById(R.id.newTaskNameField);\n newTaskDescriptionField = (TextInputEditText) v.findViewById(R.id.newTaskDescriptionField);\n\n //create listeners\n newTaskAssigneeField.setOnEditorActionListener(this);\n newtaskDateField.setOnEditorActionListener(this);\n newTaskNameField.setOnEditorActionListener(this);\n newTaskDescriptionField.setOnEditorActionListener(this);\n\n //set button functions\n addUser.setOnClickListener(this);\n done.setOnClickListener(this);\n cancel.setOnClickListener(this);\n newtaskDateField.addTextChangedListener(this);\n newTaskDialog.show();\n }", "public void showDialog() {\n mDialogInfoWithTwoButtons = new DialogInfoWithTwoButtons(mContext,\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n saveTemplate(mToastEdited);\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n }\n }, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mTemplateId = mDatabaseManager.getTemplateNewId();\n mPreferenceManager.setTemplateId(mTemplateId);\n saveTemplate(mToastCreated);\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n }\n }, mTitle, mMessage, mTitleButtonOne, mTitleButtonTwo);\n mDialogInfoWithTwoButtons.getDialog().show();\n }", "private AlertDialog cargando() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n LayoutInflater inflater = getLayoutInflater();\n\n @SuppressLint(\"InflateParams\") View v = inflater.inflate(R.layout.loading, null);\n\n\n builder.setView(v);\n builder.setCancelable(false);\n\n return builder.create();\n\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflator = getActivity().getLayoutInflater();\n View view = inflator.inflate(R.layout.informationdialog, datePicker);\n builder.setView(view);\n init(view);\n Dialog dialog = builder.create();\n\n //Dialog will not close automatically until user click on cancle button.\n setCancelable(false);\n return dialog;\n }", "public InfoDialog() {\r\n\t\tcreateContents();\r\n\t}", "private void createForumDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(Objects.requireNonNull(this),\n R.style.AlertDialogTheme);\n dialog.setTitle(R.string.add_new_forum_title);\n dialog.setMessage(R.string.add_new_forum_description);\n\n View newForumDialog = getLayoutInflater().inflate(R.layout.new_forum_dialog, null);\n dialog.setView(newForumDialog);\n\n AlertDialog alertDialog = dialog.create();\n setAddForumButtonListener(alertDialog, newForumDialog);\n\n alertDialog.show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"CREA USUARIO\")\n .setView(inflater.inflate(R.layout.register_dialog, null))\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n editUser = ((AlertDialog) dialog).findViewById(R.id.username);\n editPass = ((AlertDialog) dialog).findViewById(R.id.password);\n startConexion();\n }\n })\n .setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n protected void onPrepareDialog(int id, Dialog dialog) {\n \tToast.makeText(this, dialog.toString(), Toast.LENGTH_SHORT).show();\n }", "public StandardDialog() {\n super();\n init();\n }", "public void diler(View view) {\n//dialogi stexcman mek ayl dzev en kirarel\n dialog_diler.show();\n }", "@Override\r\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\r\n\t\tAlertDialog.Builder builder = new Builder(this.getActivity());\r\n\t\tView view = LayoutInflater.from(getActivity()).inflate(\r\n\t\t\t\tR.layout.load_dialog, null);\r\n\r\n\t\tbuilder.setView(view);\r\n\t\tbuilder.setCancelable(false);\r\n\t\tdialog=builder.create();\r\n\t\treturn dialog;\r\n\t}", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n //set new View to the builder and create the Dialog\n Dialog dialog = builder.setView(new View(getActivity())).create();\n\n //get WindowManager.LayoutParams, copy attributes from Dialog to LayoutParams and override them with MATCH_PARENT\n WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();\n layoutParams.copyFrom(dialog.getWindow().getAttributes());\n layoutParams.width = WindowManager.LayoutParams.WRAP_CONTENT;\n layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT;\n //show the Dialog before setting new LayoutParams to the Dialog\n dialog.show();\n dialog.getWindow().setAttributes(layoutParams);\n\n return dialog;\n }", "private void showDialogPolygon1() {\n LayoutInflater inflater = getLayoutInflater();\n CardView cardView = (CardView) getLayoutInflater().inflate(R.layout.dialog_root,null);\n LinearLayout root = (LinearLayout) cardView.findViewById(R.id.linearLayout_root);\n //inflate each row that should be contained in the dialog box\n View rowAmount = inflater.inflate(R.layout.row_amount,null);\n View rowTelephone = inflater.inflate(R.layout.row_telephone,null);\n View rowText = inflater.inflate(R.layout.row_text,null);\n View rowButtons = inflater.inflate(R.layout.row_buttons,null);\n //add each row to the root\n root.addView(rowAmount);\n root.addView(rowTelephone);\n root.addView(rowText);\n root.addView(rowButtons);\n\n customDialog = new Dialog(getActivity());\n customDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // before\n customDialog.setContentView(cardView);\n customDialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n customDialog.setCancelable(true);\n\n\n final EditText editTextAmount = customDialog.findViewById(R.id.edit_text_amount);\n final EditText editTextNumber = customDialog.findViewById(R.id.edit_text_mobileNumber);\n ImageButton imageButton = customDialog.findViewById(R.id.selec_contact_ImageBtn);\n imageButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n contactPicker();\n }\n });\n\n\n ((Button) customDialog.findViewById(R.id.bt_okay)).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent hoverIntent = new HoverParameters.Builder(getActivity())\n .request(\"e0d94aec\")\n .style(R.style.BaseTheme)\n .extra(\"MobileNumber\", editTextNumber.getText().toString())\n .extra(\"Amount\", editTextAmount.getText().toString())\n .buildIntent();\n startActivityForResult(hoverIntent, 0);\n }\n\n });\n\n ((Button) customDialog.findViewById(R.id.bt_cancel)).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n customDialog.dismiss();\n }\n });\n\n\n customDialog.show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View rootView = inflater.inflate(R.layout.filter_dialog, null);\n\n\n\n /* Inflate and set the layout for the dialog */\n /* Pass null as the parent view because its going in the dialog layout*/\n builder.setView(rootView)\n /* Add action buttons */\n .setPositiveButton(R.string.filter, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n addShoppingList();\n }\n });\n\n return builder.create();\n }", "public void show_dialog(final View view){\n final String tag = String.valueOf(view.getTag());\n LayoutInflater inflater = getLayoutInflater();\n final View layout = inflater.inflate(R.layout.food_information_layout,(ViewGroup) findViewById(R.id.foodInformation));\n\n final AlertDialog alertDialog=new AlertDialog.Builder(AddItemActivity.this)\n .setTitle(\"Food Information\").setView(layout).setPositiveButton(\"Confirm\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n add_item_to_grid(view);\n TextView textView2=(TextView)layout.findViewById(R.id.DaysLeft);\n String quality_period=textView2.getText().toString();\n qualityPeriodToDB(tag,quality_period);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n }).show();\n TextView textView=(TextView)alertDialog.findViewById(R.id.foodName);\n textView.setText(tag);\n\n TextView textView2=(TextView)alertDialog.findViewById(R.id.DaysLeft);\n String quality_period= qualityPeriodFromDB(tag);\n textView2.setText(quality_period);\n\n TextView textView3=(TextView)layout.findViewById(R.id.bestBefore);\n try {\n String bestBefore=calculateDate(quality_period);\n textView3.setText(bestBefore);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "public void openDialog(){\n DialogforTheboysHeroImage dialogforTheboysHeroImage = new DialogforTheboysHeroImage();\n dialogforTheboysHeroImage.show(getSupportFragmentManager(), \"Heros info\");\n }", "@Override\r\n\t protected Dialog onCreateDialog(int id) {\n\t \r\n\t screenDialog = null;\r\n\t switch(id){\r\n\t case(ID_SCREENDIALOG):\r\n\t screenDialog = new Dialog(this);\r\n\t screenDialog.setContentView(R.layout.message);\r\n\t messageText=(EditText)screenDialog.findViewById(R.id.messagetext1);\r\n\t send=(Button)screenDialog.findViewById(R.id.button1);\r\n\t send.setOnClickListener(sendmessage);\r\n\t cancel=(Button)screenDialog.findViewById(R.id.button2);\r\n\t cancel.setOnClickListener(cancelmessage);\r\n\t }\r\n\t return screenDialog;\r\n\t }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_my_dialog, container, false);\n recyclerView = (RecyclerView) view.findViewById(R.id.dialogrecycle);\n recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n\n getDialog().setTitle(\"Search Results: Select One\");\n return view;\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.generic_test_layout);\r\n\t\t//--Creating Dialog.\r\n\t\tString [] Botones={\"OK\",\"CANCEL\"};\r\n\t\tString [] Items={\"opcion1\",\"opcion2\",\"opcion3\"};\r\n\t\tCreateDialog(TypeDialog.ALERT, R.drawable.icon, \"TestingDialog\", Botones, Items, null);\r\n\t\tCreateDialog(TypeDialog.PROGRESS, R.drawable.icon, \"TestingDialog\", Botones, Items, 100);\r\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View view = inflater.inflate(R.layout.complete_workout_dialog,null);\n builder.setView(view);\n completeScore = view.findViewById(R.id.score_edit_text);\n completeTime = view.findViewById(R.id.time_edit_text);\n\n // Inflate and set the layout for the dialog\n // Pass null as the parent view because its going in the dialog layout\n // Add action buttons\n builder.setMessage(\"\")\n .setPositiveButton(\"Ok \", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n completeWorkoutListener.onCompletedWorkoutSelected(completeScore.getText().toString(), completeTime.getText().toString());\n }\n })\n .setNegativeButton(\" Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Do you want to play a game with \"+getArguments().getString(\"name\")+\"?\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n acceptGame(getContext());\n }\n })\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n declineGame(getContext());\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public void working() {\n\t\t Dialog d = new Dialog(this);\r\n\t\t d.setTitle(\"hech yea!\");\r\n\t\t TextView tv = new TextView(this);\r\n\t\t tv.setText(\"Success\");\r\n\t\t d.setContentView(tv);\r\n\t\t d.show();\t\r\n\t}", "public void SHOW_CUSTOM_DIALOG_HESO(View v) {\n\t\tdialog_heso = new Dialog_HESO(TAB_THONGTIN_HOSO.this);\n\t\tdialog_heso.show();\n\t\tWindowManager.LayoutParams lp = new WindowManager.LayoutParams();\n\t\tlp.copyFrom(dialog_heso.getWindow().getAttributes());\n\t\tlp.width = Tht_Screen.get_screen_width_percent(TAB_THONGTIN_HOSO.this, 90);\n\t\tlp.height = Tht_Screen.get_screen_heigth_percent(TAB_THONGTIN_HOSO.this, 90);\n\t\tdialog_heso.getWindow().setAttributes(lp);\n\t\tARR_MAU_HESO = mdb.get_ARR_HESO(Variables.DNV.MaDV);\n\t\tmAdapter_HESO = new Lst_HESO(ARR_MAU_HESO, TAB_THONGTIN_HOSO.this);\n\t\tDialog_HESO.lv_HESO.setAdapter(mAdapter_HESO);\n\t\tDialog_HESO.tv_PT_TT.setText(getString(R.string.PT_TT)+String.valueOf(Variables.HSCT_CHON.PT_TT));\n\t\tDialog_HESO.tv_PT_C.setText(getString(R.string.PT_C)+String.valueOf(Variables.HSCT_CHON.PT_C));\n\t\tDialog_HESO.tv_PT_TL.setText(getString(R.string.PT_TL)+String.valueOf(Variables.HSCT_CHON.PT_TL));\n\t\tDialog_HESO.tv_PT_K.setText(getString(R.string.PT_K)+String.valueOf(Variables.HSCT_CHON.PT_K));\n\t\tDialog_HESO.tv_PT_VAT.setText(getString(R.string.PT_VAT)+String.valueOf(Variables.HSCT_CHON.PT_VAT));\n\t\tDialog_HESO.tv_PT_NC.setText(getString(R.string.PT_NC)+String.valueOf(Variables.HSCT_CHON.PT_NC)+\" %\");\n\t\tDialog_HESO.tv_PT_C1.setText(getString(R.string.PT_C1)+String.valueOf(Variables.HSCT_CHON.PT_C1));\n\t\tDialog_HESO.tv_PT_NC1.setText(getString(R.string.PT_NC1)+String.valueOf(Variables.HSCT_CHON.PT_NC1)+\" %\");\n\t\t\n\n\t}", "@Override\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\t\n\t\t// get data from arguments\n\t\tBundle bundle = getArguments();\n\t\tString[] ids = bundle.getStringArray(\"ids\");\n\t\tString[] names = bundle.getStringArray(\"names\");\n\t\tboolean dismiss = bundle.getBoolean(\"dismiss\");\n\t\t\n\t\tif(ids.length!=names.length) return null;\n\t\t\n\t\tPopUpRow[] rows = new PopUpRow[ids.length];\n\t\tfor(int i=0; i<ids.length; i++) {\n\t\t\trows[i] = new PopUpRow(ids[i], names[i]);\n\t\t}\n\t\t\n\t\tPopUpAdapter adapter = new PopUpAdapter(this.getActivity(), R.layout.fragment_dialog, rows);\n\t\t\n\t\t// format and build and return the dialog\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder( getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_DARK);\n\t\tbuilder.setTitle(\"PROXIMITY UPDATE\");\n\t\tbuilder.setNeutralButton(\"DISMISS\",\n\t\t\t\t(new DialogInterface.OnClickListener() {\n\t\t\t\t\t\n\t\t\t\t\tprivate boolean closeActivity;\n\t\t\t\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\tbuttonSelected(closeActivity);\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic boolean getCloseActivity() {\n\t\t\t\t\t\treturn closeActivity;\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic DialogInterface.OnClickListener setCloseActivity(boolean closeActivity) {\n\t\t\t\t\t\tthis.closeActivity = closeActivity;\n\t\t\t\t\t\treturn this;\n\t\t\t\t\t}\n\t\t\t\t}).setCloseActivity(dismiss));\n\t\t\n\t\tbuilder.setAdapter(adapter, new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tLog.d(TAG, dialog.toString()+\" ::: \"+which); // TODO make useful\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tdialog = builder.create();\n\t\treturn dialog;\n\t}", "@Override\r\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n\r\n\t\t// Set up the layout inflater\r\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\r\n\r\n\t\t// Set the title, message and layout of the dialog box\r\n\t\tbuilder.setView(inflater.inflate(R.layout.dialog_box_layout, null))\r\n\t\t\t\t.setTitle(R.string.dialog_title);\r\n\r\n\t\t// User accepts the thing in the dialog box\r\n\t\tbuilder.setPositiveButton(R.string.dialog_accpet,\r\n\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n\t\t\t\t\t\tToast.makeText(getActivity(),\r\n\t\t\t\t\t\t\t\t\"Thank you for your kiss ^.^\",\r\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t// User cancels the thing in the dialog box\r\n\t\tbuilder.setNegativeButton(R.string.dialog_cancel,\r\n\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n\t\t\t\t\t\tToast.makeText(getActivity(), \"Refuse my kiss??? >.<\",\r\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\treturn builder.create(); // return the AlertDialog object\r\n\t}", "@Override\r\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n \r\n LayoutInflater inflater = getActivity().getLayoutInflater();\r\n builder.setTitle(\"New Wallet\");\r\n \r\n\t final View view = inflater.inflate(R.layout.new_wallet_dialog, null);\r\n\t \r\n\t final EditText name = (EditText) view.findViewById(R.id.newWallet_text);\r\n\t \r\n builder.setPositiveButton(R.string.confirmRecord, new DialogInterface.OnClickListener() {\r\n \r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.comfirmPressed(name.getText().toString());\t\r\n \t\t}\r\n });\r\n builder.setNegativeButton(R.string.cancelRecord, new DialogInterface.OnClickListener() {\r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.cancelPressed();\r\n \t\t}\r\n \t});\r\n // Create the AlertDialog object and return it\r\n return builder.create();\r\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.dialog_fire_missiles)\n .setPositiveButton(R.string.fire, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n return builder.create();\n }", "public Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\r\n\t\tView dialogView = inflater.inflate(R.layout.posted, null);\r\n\r\n\t\tbuilder.setTitle(\"Posted Message to:\");\r\n\t\tbuilder.setView(dialogView);\r\n\t\tfinal AlertDialog dialog = builder.show();\r\n\t\t//dialog.getWindow().setLayout(520, 525);\r\n\t\t\r\n\t\tTextView message = (TextView) dialog.findViewById(R.id.sites_posted);\r\n\t\tmessage.setText(sites);\r\n\r\n\t\tButton done = (Button) dialog.findViewById(R.id.done);\r\n\t\tdone.setOnClickListener(new OnClickListener(){\r\n\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO open social media options\r\n\t\t\t\tdialog.cancel();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\treturn dialog;\r\n\t}", "@Override\n\tprotected Dialog onCreateDialog(int id)\n\t{\n\t\tif(id == DLG_ABOUT)\n\t\t{\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setMessage(R.string.app_about);\n\t\t\tbuilder.setPositiveButton(\"返回\", new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface p1, int p2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Implement this method\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t);\n\t\treturn builder.create();\n\t\t}\n\t\t\n\t\tif(id == DLG_HELP)\n\t\t{\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setMessage(R.string.app_help);\n\t\t\tbuilder.setPositiveButton(\"返回\", new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface p1, int p2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Implement this method\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t);\n\t\t\treturn builder.create();\n\t\t}\n\t\t\n\t\tif(id == DLG_UNPACKER)\n\t\t{\n\t\t\tView view = ViewTool.getView(this,R.layout.dlg_unpack);\n\t\t\tfinal EditText edit_png = (EditText) view.findViewById(R.id.edit_pngpath);\n\t\t\tfinal EditText edit_undir = (EditText) view.findViewById(R.id.edit_undir);\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\t\n\t\t\tbuilder.setView(view);\n\t\t\tbuilder.setPositiveButton(\"确定\", new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface p1, int p2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Implement this method\n UnPacker unpacker = new UnPacker();\n\t\t String path_png = edit_png.getText().toString();\n\t\t String path_atlas = null;\n\t\t String path_output = edit_undir.getText().toString();\n\t\t int index = path_png.lastIndexOf('.');\n\t\t if(index>0){\n\t\t\t path_atlas = path_png.substring(0,index)+\".atlas\";\n\t\t }\n\t\t unpacker.unPNG( path_atlas,path_png, path_output);\n\t\t Toast.makeText(MainActivity.this,\"解包完成\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t);\n\t\t\tbuilder.setNegativeButton(\"返回\", new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface p1, int p2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Implement this method\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t);\n\t\t\treturn builder.create();\n\t\t}\n\t\t\n\t\t\n\t\treturn super.onCreateDialog(id);\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n filename = getArguments().getString(\"filename\");\n username = getArguments().getString(\"username\");\n workingDIR = getArguments().getString(\"workingDIR\");\n builder.setTitle(R.string.copy_move_file_select_options_title)\n .setItems(R.array.file__move_copy_dialog_options, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n onSelect(which);\n }\n });\n return builder.create();\n }", "private AlertDialog getDialog(int type) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n if(type == 0){\n final Intent summary = new Intent(this, SummaryActivity.class);\n builder.setMessage(\"Press proceed to see your session summary.\")\n .setTitle(\"Are you done?\");\n // Add the buttons\n builder.setPositiveButton(\"Proceed\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n startActivity(summary);\n finish();\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n }\n else if(type == 1){\n builder.setMessage(\"You are about to exit and end this session, no data will be saved.\")\n .setTitle(\"Exit?\");\n // Add the buttons\n builder.setPositiveButton(\"Exit\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n builder.setNegativeButton(\"Continue Running\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n }\n\n\n return builder.create();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n sharedPreferences = getActivity().getSharedPreferences(\"VALUES\", Context.MODE_PRIVATE);\n currentTheme = sharedPreferences.getInt(\"THEME\", 0);\n\n //inflate theme_dialog.xml\n view = inflater.inflate(R.layout.theme_dialog, container);\n\n // remove title (already defined in theme_dialog.xml)\n getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);\n\n // Declare buttons and onClick methods\n dialogButtons();\n\n setUltimoThemeBooton(currentTheme);\n\n return view;\n }", "public void openDialog(){\n if (!isAdded()) return;\n homeViewModel.getAllSets().removeObservers(getViewLifecycleOwner());\n ChooseSetDialog dialog = new ChooseSetDialog(setsTitles);\n dialog.show(getChildFragmentManager(), \"choose_set_dialog\");\n dialog.setOnSelectedListener(choice -> {\n Word word = new Word(setsObjects.get(choice).getId(), original, translation);\n homeViewModel.insertWord(word);\n original=\"\"; translation=\"\";\n etOrigWord.setText(\"\"); etTransWord.setText(\"\");\n });\n }", "private Dialog recreateDialog() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(OptionActivity.this);\n builder.setMessage(\"Do you want to change your profile?\")\n .setPositiveButton(\"Yah!\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent intent = new Intent(OptionActivity.this, amountscreen.class);\n startActivity(intent);\n }\n })\n .setNegativeButton(\"Nope\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n\tprotected Dialog onCreateDialog(int id) {\n\t\tDialog dialog = null;\n\t\tAlertDialog.Builder builder = null;\n\t\tswitch (id) {\n\t\tcase WordZapConstants.HUMAN_WIN_DIALOG:\n\t\t\tbuilder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setMessage(\"You won ! Get ready for the next level.\")\n\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\t\t\"Okay\",\n\t\t\t\t\t\t\tnew GameScreenDialogListener(this,\n\t\t\t\t\t\t\t\t\tWordZapConstants.HUMAN_WIN_DIALOG));\n\t\t\tdialog = builder.create();\n\t\t\tbreak;\n\t\tcase WordZapConstants.HUMAN_LOSE_DIALOG:\n\t\t\tbuilder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setMessage(\n\t\t\t\t\t\"You lost ! Get ready to play the same level again.\")\n\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\t\t\"Okay\",\n\t\t\t\t\t\t\tnew GameScreenDialogListener(this,\n\t\t\t\t\t\t\t\t\tWordZapConstants.HUMAN_LOSE_DIALOG));\n\t\t\tdialog = builder.create();\n\t\t\tbreak;\n\t\tcase WordZapConstants.DRAW_DIALOG:\n\t\t\tbuilder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setMessage(\n\t\t\t\t\t\"Game Drawn. Get ready to play the same level again.\")\n\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\t\t\"Okay\",\n\t\t\t\t\t\t\tnew GameScreenDialogListener(this,\n\t\t\t\t\t\t\t\t\tWordZapConstants.DRAW_DIALOG));\n\t\t\tdialog = builder.create();\n\t\t\tbreak;\n\n\t\tcase WordZapConstants.SHOW_LEVEL_DIALOG:\n\t\t\tbuilder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setMessage(\n\t\t\t\t\t\"Level \" + this.currentLevel.getLevelNumber() + \" \")\n\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\t\t\"Start\",\n\t\t\t\t\t\t\tnew GameScreenDialogListener(this,\n\t\t\t\t\t\t\t\t\tWordZapConstants.SHOW_LEVEL_DIALOG));\n\t\t\tdialog = builder.create();\n\t\t\tbreak;\n\t\t}\n\t\treturn dialog;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_varification_dialog, container, false);\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n String mess = \"Stalemate!\";\n if(getArguments().getBoolean(\"check\"))\n {\n mess = \"Checkmate! \"+getArguments().getString(\"team\")+\" wins\";\n }\n builder.setMessage(mess)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Log.d(TAG, \"Ok\");\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public Dialog() {\n\t}", "public ClassChoiceDialog(Context context) {\n // 通过LayoutInflater来加载一个xml的布局文件作为一个View对象\n this.context = context;\n initialView();\n dialog = builder.create();\n initListener();\n\n }", "static android.app.Dialog a(android.app.Activity r3, java.lang.String r4, final com.autonavi.minimap.route.bus.navidetail.view.BusNaviDetailDialogFactory.OnDialogClickListener r5) {\n /*\n int r0 = r4.hashCode()\n r1 = -997436923(0xffffffffc48c5205, float:-1122.5631)\n r2 = 1\n if (r0 == r1) goto L_0x0038\n r1 = -997367855(0xffffffffc48d5fd1, float:-1130.9943)\n if (r0 == r1) goto L_0x002e\n r1 = -724913475(0xffffffffd4cab2bd, float:-6.964657E12)\n if (r0 == r1) goto L_0x0024\n r1 = 620156635(0x24f6d6db, float:1.0704947E-16)\n if (r0 == r1) goto L_0x001a\n goto L_0x0042\n L_0x001a:\n java.lang.String r0 = \"dialog_type_progress\"\n boolean r0 = r4.equals(r0)\n if (r0 == 0) goto L_0x0042\n r0 = 0\n goto L_0x0043\n L_0x0024:\n java.lang.String r0 = \"dialog_type_declare_bus\"\n boolean r0 = r4.equals(r0)\n if (r0 == 0) goto L_0x0042\n r0 = 1\n goto L_0x0043\n L_0x002e:\n java.lang.String r0 = \"dialog_type_declare_foot\"\n boolean r0 = r4.equals(r0)\n if (r0 == 0) goto L_0x0042\n r0 = 2\n goto L_0x0043\n L_0x0038:\n java.lang.String r0 = \"dialog_type_declare_dest\"\n boolean r0 = r4.equals(r0)\n if (r0 == 0) goto L_0x0042\n r0 = 3\n goto L_0x0043\n L_0x0042:\n r0 = -1\n L_0x0043:\n switch(r0) {\n case 0: goto L_0x005f;\n case 1: goto L_0x0048;\n case 2: goto L_0x0048;\n case 3: goto L_0x0048;\n default: goto L_0x0046;\n }\n L_0x0046:\n r0 = 0\n goto L_0x0071\n L_0x0048:\n com.autonavi.minimap.widget.ConfirmDlg r0 = new com.autonavi.minimap.widget.ConfirmDlg\n com.autonavi.minimap.route.bus.navidetail.view.BusNaviDetailDialogFactory$2 r1 = new com.autonavi.minimap.route.bus.navidetail.view.BusNaviDetailDialogFactory$2\n r1.<init>(r5)\n java.util.Map<java.lang.String, java.lang.Integer> r5 = a\n java.lang.Object r4 = r5.get(r4)\n java.lang.Integer r4 = (java.lang.Integer) r4\n int r4 = r4.intValue()\n r0.<init>(r3, r1, r4)\n goto L_0x0071\n L_0x005f:\n com.autonavi.map.widget.ProgressDlg r0 = new com.autonavi.map.widget.ProgressDlg\n java.lang.String r4 = \"\"\n r0.<init>(r3, r4)\n r0.setCancelable(r2)\n com.autonavi.minimap.route.bus.navidetail.view.BusNaviDetailDialogFactory$1 r3 = new com.autonavi.minimap.route.bus.navidetail.view.BusNaviDetailDialogFactory$1\n r3.<init>(r5)\n r0.setOnCancelListener(r3)\n L_0x0071:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.autonavi.minimap.route.bus.navidetail.view.BusNaviDetailDialogFactory.a(android.app.Activity, java.lang.String, com.autonavi.minimap.route.bus.navidetail.view.BusNaviDetailDialogFactory$OnDialogClickListener):android.app.Dialog\");\n }", "@Override\r\n protected Dialog onCreateDialog(int id) {\r\n switch (id) {\r\n case START_DATE_DIALOG_ID:\r\n return new DatePickerDialog(this,\r\n \t\t\tstartDateSetListener,\r\n \t\t\tstartYear_dp, startMonth_dp-1, startDay_dp); \r\n case START_TIME_DIALOG_ID:\r\n return new TimePickerDialog(this,\r\n \t\t\tstartTimeSetListener, startHour_dp, startMinute_dp, false); \r\n case END_DATE_DIALOG_ID:\r\n return new DatePickerDialog(this,\r\n endDateSetListener,\r\n endYear_dp, endMonth_dp-1, endDay_dp);\r\n case END_TIME_DIALOG_ID:\r\n return new TimePickerDialog(this,\r\n \t\t\tendTimeSetListener, endHour_dp, endMinute_dp, false);\r\n }\r\n return null;\r\n }", "void showDialog() {\n\t\tDFTimePicker dtf = DFTimePicker.newInstance();\n DialogFragment newFragment = dtf;\n newFragment.show(getFragmentManager(), \"dialog\");\n }", "@Override\n\tprotected void onCreate(Bundle arg0) {\n\t\tsuper.onCreate(arg0);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\t\n\t\tIntent intent = getIntent();\n\t\tfinal DatabaseUtil mDatabaseUtil = new DatabaseUtil(this); \n\t\tfinal UiManager mUiManager = new UiManager(this);\n\t\t\n\t\tCustomDialog mCustomDialog = new CustomDialog(this);\n final CustomDialog customDialog = mCustomDialog;\n mCustomDialog = null;\n \n final ViewInfo viewInfo = new ViewInfo();\n\t\tviewInfo.panelNum = intent.getStringExtra(\"panelNum\");\n\t\tviewInfo.cellNum = intent.getStringExtra(\"cellNum\");\n\t\tviewInfo.viewId = \"shortcut\" + viewInfo.cellNum;\n\t\t\n customDialog.show();\n customDialog.setOnDismissListener(new OnDismissListener(){\n\n\t\t\tpublic void onDismiss(DialogInterface arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tTempActivity.this.finish();\n\t\t\t}\n });\n \n\t\tcustomDialog.setItemBackground(getResources().getDrawable(R.drawable.btn_default_normal_disable_focused));\n\t\t\n\t\tcustomDialog.loadingAllApp();\n\t\t\n\t\tcustomDialog.setOnSelectedItemsListener(new OnSelectedItemsListener(){\n\t\t\tpublic void onSelectedItems(Map<String,Integer> selectedMapPo) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\tpublic void onSelectedItem(int position) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tviewInfo.intentUri = customDialog.mAppList.get(position).intentUri;\n\t\t\t\t\n\t\t\t\tviewInfo.icon = customDialog.mAppList.get(position).icon;\n\t\t\t\tviewInfo.label = customDialog.mAppList.get(position).label;\n\t\t\t\t\n\t\t\t\tmUiManager.addItemToPanel(null\n\t\t\t\t,viewInfo\n\t\t\t\t,mDatabaseUtil);\n\t\t\t}\n\t\t});\n\t}", "public SelectionDialog(HarmonyModel harmonyModel, Integer mode)\r\n\t{\r\n\t\tsuper((mode==SELECT ? \"Select\" : \"Remove\") + \" Links\");\r\n\t\tthis.harmonyModel = harmonyModel;\r\n\t\tthis.mode = mode;\r\n\t\t\r\n\t\t// Initialize the type filter\r\n\t\ttypeFilter = new OptionPane(\"Type\",new String[]{\"All\",\"User\",\"System\"});\r\n\t\ttypeFilter.setBorder(new EmptyBorder(0,20,0,0));\r\n\t\ttypeFilter.setSelectedButton(\"All\");\r\n\t\t\r\n\t\t// Initialize the focus filter\r\n\t\tfocusFilter = new OptionPane(\"Focus\",new String[]{\"All\",\"Focused\",\"Unfocused\"});\r\n\t\tfocusFilter.setBorder(new EmptyBorder(0,13,0,0));\r\n\t\tfocusFilter.setSelectedButton(mode==SELECT ? \"Focused\" : \"All\");\r\n\t\tfocusFilter.setEnabled(mode==DELETE);\r\n\r\n\t\t// Initialize the visibility filter\r\n\t\tvisibilityFilter = new OptionPane(\"Visibility\",new String[]{\"All\",\"Visible\",\"Hidden\"});\t\t\r\n\t\tvisibilityFilter.setSelectedButton(mode==SELECT ? \"Visible\" : \"All\");\r\n\t\tvisibilityFilter.setEnabled(mode==DELETE);\r\n\t\t\r\n\t\t// Create the info pane\r\n\t\tJPanel infoPane = new JPanel();\r\n\t\tinfoPane.setBorder(new CompoundBorder(new EmptyBorder(5,5,0,5),new CompoundBorder(new LineBorder(Color.gray),new EmptyBorder(5,5,5,5))));\r\n\t\tinfoPane.setLayout(new GridLayout(3,1));\r\n\t\tinfoPane.add(typeFilter);\r\n\t\tinfoPane.add(focusFilter);\r\n\t\tinfoPane.add(visibilityFilter);\r\n\t\t\r\n\t\t// Generate the main dialog pane\r\n\t\tJPanel pane = new JPanel();\r\n\t\tpane.setBorder(BorderFactory.createLineBorder(Color.black));\r\n\t\tpane.setLayout(new BorderLayout());\r\n\t\tpane.add(infoPane,BorderLayout.CENTER);\r\n\t\tpane.add(new ButtonPane(),BorderLayout.SOUTH);\r\n\t\t\r\n\t\t// Initialize the dialog parameters\r\n\t\tsetContentPane(pane);\r\n\t\tsetSize(200,250);\r\n\t\tpack();\r\n\t\tsetVisible(true);\r\n\t}", "@Override\n public Dialog onCreateDialog(final Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(this.title);\n if (this.type == 2) {\n final boolean back = this.backToPreviousActivity;\n builder.setMessage(this.msg)\n .setPositiveButton(this.positive, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //Toast.makeText(mContext, \"Press positive\", Toast.LENGTH_SHORT).show();\n if (back) {\n getActivity().finish(); // finish actual activity\n }\n }\n })\n .setNegativeButton(this.negative, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //Toast.makeText(mContext, \"Press negative\", Toast.LENGTH_SHORT).show();\n }\n });\n } else {\n builder.setMessage(this.msg)\n .setPositiveButton(this.positive, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //Toast.makeText(mContext, \"Press positive\", Toast.LENGTH_SHORT).show();\n }\n });\n }\n // Create the AlertDialog object and return it\n return builder.create();\n }", "void showDialog() {\n DialogFragment newFragment = MyAlertDialogFragment.newInstance(R.string.alert_dialog_two_buttons_title);\n newFragment.show(getFragmentManager(), \"dialog\");\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.at_home_question)\n .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n listener.onAlign(getDialog());\n }\n })\n .setNeutralButton(R.string.go_home, null) // See onResume\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n listener.onCancel(getDialog());\n }\n }).setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n listener.onCancel(getDialog());\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n this.setCancelable(true);\n\n //NB! Må settes av kaller:\n Bundle bundle = this.getArguments();\n this.dialogTitle = bundle.getString(\"dialogTitle\");\n this.dialogText = bundle.getString(\"dialogText\");\n this.yesButtonText = bundle.getString(\"yesButtonText\");\n this.noButtonText = bundle.getString(\"noButtonText\");\n this.callback_id = bundle.getInt(\"callback_id\");\n int icon_drawable = bundle.getInt(\"icon_drawable\");\n\n //Bruker en styla dialog (se styles.xml):\n AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this.getActivity(), R.style.AlertDialogCustom));\n builder.setTitle(this.dialogTitle);\n builder.setIcon(icon_drawable);\n\n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View view = inflater.inflate(R.layout.fragment_yesno_dialog, null);\n\n TextView tvDialogText = (TextView) view.findViewById(R.id.tvDialogText);\n tvDialogText.setText(dialogText);\n\n // Inflate and set the layout for the dialog\n // Pass null as the parent view because its going in the dialog layout\n builder.setView(view)\n // Add action buttons\n .setPositiveButton(yesButtonText, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n //Lagre at tipset er sett...\n mListener.onDialogPositiveClick(YesNoDialog.this, callback_id);\n }\n })\n .setNegativeButton(noButtonText, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n mListener.onDialogNegativeClick(YesNoDialog.this, callback_id);\n }\n });\n\n //Opprett og vis dialogen:\n Dialog dialog = builder.create();\n return dialog;\n }", "public ReorganizeDialog() { }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n return new AlertDialog.Builder(getActivity())\n .setMessage(R.string.more_info_text)\n\n // User cannot dismiss dialog by hitting back button\n .setCancelable(false)\n\n // Set up No Button\n .setNegativeButton(R.string.not_now,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,\n int id) {\n dismiss();\n }\n })\n\n // Set up Yes Button\n .setPositiveButton(R.string.visit_moma,\n new DialogInterface.OnClickListener() {\n public void onClick(final DialogInterface dialog, int id) {\n startActivity(new Intent(Intent.ACTION_VIEW, Uri\n .parse(VISIT_MOMA_URL)));\n dismiss();\n }\n }).create();\n }", "DialogResult show();", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setMessage(msg)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n\n Dialog dialog = builder.create();\n\n // Create the AlertDialog object and return it\n return dialog;\n }", "public void createControl() {\n Button button1 = new Button(getShell(), SWT.PUSH);\n button1.setText(\"PolicyValueSelectionDialog with valid\\n\" +\n \"selection element at construction\");\n\n final PolicyValueSelectionDialog dialog1 =\n new PolicyValueSelectionDialog(button1.getShell(),\n \"myPolicy1\", selectionElement1);\n button1.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n dialog1.open();\n String[] results = (String[]) dialog1.getResult();\n if (results != null) {\n System.out.println(\"You chose:\");\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[i]);\n }\n } else {\n System.out.println(\"You chose nothing\");\n }\n }\n });\n dialog1.setInitialSelections(new String[]{\"choice7\", \"choice3\"});\n\n Button button2 = new Button(getShell(), SWT.PUSH);\n button2.setText(\"PolicyValueSelectionDialog with invalid\\n\" +\n \"selection element at construction\");\n\n final PolicyValueSelectionDialog dialog2 =\n new PolicyValueSelectionDialog(button1.getShell(),\n \"myPolicy2\", selectionElement2);\n button2.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n dialog2.open();\n String[] results = (String[]) dialog2.getResult();\n if (results != null) {\n System.out.println(\"You chose:\");\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[i]);\n }\n } else {\n System.out.println(\"You chose nothing\");\n }\n }\n });\n\n\n }" ]
[ "0.7153744", "0.71059996", "0.69837487", "0.6980588", "0.68572193", "0.68257505", "0.67954797", "0.678782", "0.677965", "0.6766183", "0.67653984", "0.6757065", "0.67158014", "0.66995037", "0.6644939", "0.66385543", "0.66202056", "0.6616519", "0.6546799", "0.6545988", "0.65337527", "0.6500755", "0.64947623", "0.64880687", "0.64868915", "0.647368", "0.6469919", "0.6423624", "0.64212716", "0.64203876", "0.64186704", "0.6414137", "0.6412774", "0.6407671", "0.6399617", "0.63809824", "0.6380086", "0.6376294", "0.6358706", "0.6357867", "0.6354048", "0.6338314", "0.633105", "0.6327171", "0.6327025", "0.6301613", "0.6299663", "0.6293818", "0.6282278", "0.62717223", "0.62632585", "0.6261474", "0.62598723", "0.62588775", "0.6258813", "0.6245911", "0.6244981", "0.62441444", "0.62354136", "0.6225762", "0.62257314", "0.6225619", "0.62222815", "0.62080896", "0.62045103", "0.61916316", "0.6182688", "0.6178707", "0.61692894", "0.61593497", "0.6150362", "0.61297613", "0.61287665", "0.6128197", "0.6125236", "0.6122063", "0.61175054", "0.610839", "0.6097715", "0.6090031", "0.6085231", "0.6082563", "0.608157", "0.6077629", "0.60752654", "0.6069657", "0.60597426", "0.60582495", "0.6053571", "0.6053046", "0.60521394", "0.60495055", "0.6048217", "0.60428226", "0.6035924", "0.6033427", "0.60328513", "0.6032652", "0.6027584", "0.6025577", "0.60250837" ]
0.0
-1
Play a proper sound:
@Override public void onClick(View v) { if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start(); // Dismiss dialog: verificationDialog.dismiss(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void play() {\n\t\tlog.finest(\"Playing sound\");\n\t\ttone.trigger();\n\t}", "public void playSound() {\n\t\tmediaPlayer.play();\n\t}", "private void playSound() {\n\t\tif (controllerVars.isLoaded() && !controllerVars.isPlays()) {\n\t\t\tcontrollerVars.getSoundPool().play(controllerVars.getSoundID(), controllerVars.getVolume(), controllerVars.getVolume(), 1, 0, 1f);\n\t\t\tcontrollerVars.COUNTER++;\n\t\t\t//Toast.makeText(act, \"Played sound\", Toast.LENGTH_SHORT).show();optional Playing message \n\t\t\tcontrollerVars.setPlays(true);\n\t\t\tonComplete(controllerVars.getMediaPlayer().getDuration());\n\t\t}\n\t\t//controllerVars.getMediaPlayer().start();\n\t\t//controllerVars.setPlays(true);\n\t}", "@Override\n public void playSound(int soundId) {\n\n }", "public static void playSound(){\r\n try{\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(AudioSystem.getAudioInputStream(new File(\"Cheering.wav\")));\r\n clip.start();\r\n }\r\n catch (Exception exc){\r\n exc.printStackTrace(System.out);\r\n } \r\n }", "public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}", "PlaySound getSound();", "public static void playShootingSound(){\n String musicFile = \"Sounds\\\\Shoot.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }", "public void playSoundAt(IPos pos, String sound, float volume, float pitch);", "private static void playSound(String s) {\n try {\n Media hit = new Media(new File(s).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(hit);\n mediaPlayer.play();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "@Override\n\tpublic void playLivingSound() {\n\t\tgetSoundManager().playLivingSound();\n\t}", "public void playSound() {\n String path = \"Data\\\\\\\\Acceptance.wav\";\n InputStream success;\n try {\n success = new FileInputStream(new File(path));\n AudioStream audioStream = new AudioStream(success);\n AudioPlayer.player.start(audioStream);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error playing sounds\");\n }\n }", "public void StartSound(ISoundOrigin origin, sfxenum_t sound_id);", "public void play(int soundID) {\n System.out.println(\"PlaySound: \" + soundID);\n// if (soundID == SOUND_EAT)\n// return;\n play(soundID, 1);\n }", "public void StartSound(ISoundOrigin origin, int sound_id);", "public void playSound(File soundFile);", "public void playSound(String sound) {\n\t\t \n\t\t // open the sound file as a Java input stream\n\t\tString soundFile = null;\n\t\tswitch (sound) {\n\t\tcase \"opening\":\n\t\t\tsoundFile = \"ConfigFiles\\\\opening.wav\";\n\t\t\tbreak;\n\t\tcase \"ending\":\n\t\t\tsoundFile = \"ConfigFiles\\\\ending.wav\";\n\t\t\tbreak;\n\t\tcase \"shop\":\n\t\t\tsoundFile = \"ConfigFiles\\\\shop.wav\";\n\t\t\tbreak;\n\t\tcase \"monsterbattle\":\n\t\t\tsoundFile = \"ConfigFiles\\\\monsterbattle.wav\";\n\t\t\tbreak;\n\t\tcase \"battlewin\":\n\t\t\tsoundFile = \"ConfigFiles\\\\monstervictory.wav\";\n\t\t\tbreak;\n\t\tcase \"trainerbattle\":\n\t\t\tsoundFile = \"ConfigFiles\\\\trainerBattle.wav\";\n\t\t\tbreak;\n\t\tcase \"trainerbattlewin\":\n\t\t\tsoundFile = \"ConfigFiles\\\\trainerVictory.wav\";\n\t\t\tbreak;\n\t\tcase \"map\":\n\t\t\tsoundFile = \"ConfigFiles\\\\map.wav\";\n\t\t\tbreak;\n\t\t}\n\t\t\t\n\t\t \n\t\t InputStream in = null;\n\t\t\ttry {\n\t\t\t\tin = new FileInputStream(soundFile);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t \n\t\t\tif(audioStream != null ) {\n\t\t\t\tAudioPlayer.player.stop(audioStream);\n\t\t\t}\n\t\t\t // create an audiostream from the inputstream\n\t\t\ttry {\n\t\t\t\taudioStream = new AudioStream(in);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t // play the audio clip with the audioplayer class\n\t\t\t\n\t\t AudioPlayer.player.start(audioStream);\n\t\t \n\t}", "public abstract String play(SoundLibrary library, String... sound);", "private void playYouWinSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\tada.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }", "public void playSoundFail() {\n\t\tfailSound.play();\n\t}", "private void playSound(String sound) {\r\n try {\r\n BufferedInputStream soundFileStream = new BufferedInputStream(this\r\n .getClass().getResourceAsStream(sound));\r\n AudioInputStream audioInputStream = AudioSystem\r\n .getAudioInputStream(soundFileStream);\r\n AudioFormat audioFormat = audioInputStream.getFormat();\r\n DataLine.Info dataLineInfo = new DataLine.Info(Clip.class, audioFormat);\r\n Clip clip = (Clip) AudioSystem.getLine(dataLineInfo);\r\n clip.open(audioInputStream);\r\n clip.start();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "static void PlaySound(File Sound)\n {\n try{\n Clip clip = AudioSystem.getClip();\n clip.open(AudioSystem.getAudioInputStream(Sound));\n clip.start();\n //BGM = new AudioStream(new FileInputStream(\"OST.WAV\"));\n //MD = BGM.getData();\n //loop = new ContinuousAudioDataStream(MD);\n }catch(Exception e) {}\n //MGP.start(loop); \n }", "public void startSound() {\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\tURL url = this.getClass().getResource(\"/\"+wavMusicFile);\n\t\t\t//System.out.println(\"url: \" + url);\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tclip = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tclip.open(audioIn);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void playSound(int sound) {\n \t currentstreamID=soundPool.play(soundPoolMap.get(sound), 0.5f, 0.5f, 1, -1, 1f);\n Log.e(\"MYT\",currentstreamID+\" play output\"); \n }", "public static void playSound(Player p, Location loc, Sound sound, float pitch, float volume){\n p.playSound(loc, sound, volume, pitch);\n }", "public void playSound(String filename) {\r\n\t\tif (debugLevel > 1)\r\n\t\t\tSystem.out.println(\" ... play audio file: \" + filename);\r\n\t\ttry {\r\n\t\t\tFile file = new File(filename);\r\n\t\t\tAudioInputStream in = AudioSystem.getAudioInputStream(file);\r\n\t\t\tclip = AudioSystem.getClip();\r\n\t\t\tclip.open(in);\r\n\t\t\tclip.start();\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void playAudio() {\r\n Play.au(audioFileName, false);\r\n }", "public void play(Sound s, PlayMode mode) throws IOException {\n if (s != null) getClip(s).play(mode);\n }", "public String play(String sound) {\r\n return play(SoundLibrarian.getInstance(), sound);\r\n }", "public void playSound(SoundType type) {\n if (!gameController.getGameStatPanel().getUserData().isSoundDisabled()) soundMap.get(type).play();\n }", "public void play() {\n if (audio != null) {\n audio.play(sfxVolume);\n }\n }", "@Override\n public void makeSound() {\n\n }", "@Override\n public void makeSound() {\n\n }", "public void PauseSound();", "public void startSound()\n \n {try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Start 2.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n startClip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n startClip.open(audioIn); \n \n startClip.start();\n \n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n \n }", "public void playWinSound()\n {\n InputStream pathSoundFile = getClass().getResourceAsStream(\"bellringing.wav\");\n playSound(pathSoundFile);\n }", "public abstract void makeSound();", "public void playSound(Location loc) {\n if (_sound != null) {\n loc.getWorld().playSound(loc, _sound, _soundVolume, _soundPitch);\n }\n }", "public void playSound(SoundEvent debug1, float debug2, float debug3) {\n/* 466 */ this.level.playSound(this, getX(), getY(), getZ(), debug1, getSoundSource(), debug2, debug3);\n/* */ }", "public void soundPressed() {\n // display\n TextLCD.print(SOUND);\n // sound\n Sound.beep();\n }", "private void playSound(int index, float pitch) {\n try {\n metaObject.playSound(index, pitch, 1f);\n } catch (NullPointerException | IndexOutOfBoundsException ex) {\n System.out.println(\"Could not play sound with index \" + index + \" for \" + this.toString() + \".\");\n }\n }", "public static void game_sound() {\n\t\tm_player_game.start();\n\t\tm_player_game.setMediaTime(new Time(0));\n\t}", "public void playSound ( Location location , Sound sound , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , volume , pitch ) );\n\t}", "private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }", "private void playSound(String soundFile){\n try {\n AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File(soundFile).getAbsoluteFile());\n Clip clip = AudioSystem.getClip();\n clip.open(audioInputStream);\n clip.start();\n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void playSound() {\n if (isFlashOn) {\n mp = MediaPlayer.create(this, R.raw.light_switch_off);\n } else {\n mp = MediaPlayer.create(this, R.raw.light_switch_on);\n }\n mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\n @Override\n public void onCompletion(MediaPlayer mp) {\n // TODO Auto-generated method stub\n mp.release();\n }\n });\n mp.start();\n }", "public void playSound(int sample, boolean looped) {\n\t\t\tm_soundManager.playSound(sample, looped);\n\t\t}", "public void playAudio() {\n\t\tmusic[currentSong].stop();\n\t\tcurrentSong++;\n\t\tcurrentSong %= music.length;\n\t\tmusic[currentSong].play();\n\t}", "private void playGameOverSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\ringout.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }", "@Override\r\n\tpublic void sound() {\r\n\t\tsuper.sound();\r\n\t\tSystem.out.println(\"SportsCar sound: Vutututututu\");\r\n\t}", "public void playAudio() {\n\n }", "private static void playAudio(String musicFile) {\n }", "public void playSound(String soundName) {\r\n try {\r\n audioInputStream = AudioSystem.getAudioInputStream(new File(soundName).getAbsoluteFile());\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(audioInputStream);\r\n clip.start();\r\n } catch (Exception ex) {\r\n System.out.println(\"Error with playing sound.\");\r\n ex.printStackTrace();\r\n }\r\n }", "public void playSound() {\n if (this.mIsSupportVibrator) {\n this.mVibratorEx.setHwVibrator(\"haptic.control.time_scroll\");\n }\n if (this.mSoundPool == null || this.mSoundId == 0 || !this.mSoundLoadFinished) {\n Log.w(TAG, \"SoundPool is not initialized properly!\");\n } else {\n this.mSoundPool.play(this.mSoundId, 1.0f, 1.0f, 0, 0, 1.0f);\n }\n }", "public Sound createSound(String file);", "public void play(String soundName)\n {\n try{\n Clip clip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new File(soundName));\n clip.open(inputStream);\n clip.start();\n }\n catch (Exception e){\n System.out.println(\"Play sound error: \" + e.getMessage() + \" for \" + soundName);\n }\n }", "public void playSound ( Location location , String sound , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , volume , pitch ) );\n\t}", "public Sound loadSound(String file);", "public void playAmbientSound() {\n if (!this.isClosed()) {\n super.playAmbientSound();\n }\n\n }", "protected void playTheSound(int position) {\n if (mp != null) {\n mp.reset();\n mp.release();\n }\n mp = MediaPlayer.create(this, sons[position]);\n mp.start();\n }", "public void playSoundSuccess() {\n\t\tsucceededSound.play();\n\t}", "public static void portail_sound() {\n\t\tm_player_portail.start();\n\t\tm_player_portail.setMediaTime(new Time(0));\n\t}", "public static void PlaySound(String soundToPlay)\n {\n AudioNode sound = new AudioNode(Game.getInstance().getAssetManager(), soundToPlay);\n sound.setReverbEnabled(false);\n sound.play();\n }", "public static void playInternal( LayeredSound.SoundClip s )\r\n\t{\r\n\t\tif ( Settings.isSoundOn() )\r\n\t\t\tnew SpeakerThread( s ).start();\r\n\t}", "public void playSoundGameWon() {\n\t\tcompletedGameSound.play();\n\t}", "void play(int soundIndex) {\n\t\tsounds.get(soundIndex).play();\n\t}", "public static void playPickupSound(){\n String musicFile = \"Sounds\\\\Pickup.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }", "public void play() {\n\t\tplay(true, true);\n\t}", "private void playSound(String fileName) {\n\t\tAudioClip sound = JApplet.newAudioClip(getClass().getResource(fileName));\n\t\tsound.play();\n\t}", "public void playSoundGameLost() {\n\t\tlostGameSound.play();\n\t}", "public static void playSoundEffect(String path) {\n Thread thread = new Thread(() -> {\n Player soundEffectPlayer = new Player();\n soundEffectPlayer.setSourceLocation(path);\n soundEffectPlayer.play();\n });\n thread.setDaemon(true);\n thread.start();\n }", "public static void sound(String sound){\n System.out.println(\"The dog \"+sound);\n }", "public void playSoundtrack() {\n if(this.musicEnabled) {\n try {\n Clip soundtrackClip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new BufferedInputStream(Assets.soundTrack));\n soundtrackClip.open(inputStream);\n soundtrackClip.start();\n soundtrackClip.loop(Clip.LOOP_CONTINUOUSLY);\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(e.getMessage());\n }\n }\n }", "private void gameSound(int attack){\n switch (attack){\n case 1:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_lightattack);\n break;\n case 2:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_strongattack);\n break;\n case 3:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_brutalattack);\n break;\n }\n mediaPlayer.start();\n }", "public void playGoombaSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, GOOMBA);\n\t}", "@Override\n\tpublic void play() {\n\t\tGuitar.super.play();\n\t\tPiano.super.play();\n\t}", "public void playBeep(){\n //https://stackoverflow.com/questions/2618182/how-to-play-ringtone-alarm-sound-in-android\n try{\n //gets notification sound then plays it.\n Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification);\n\n r.play();\n TimeUnit.MILLISECONDS.sleep(300);\n r.stop();\n\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }", "public void playSound(String fileName){\n \n Random rand = new Random();\n if (fileName == null) {\n int nextSongNumber = rand.nextInt(soundList.size());\n while(nextSongNumber == currentSongNumber){\n nextSongNumber = rand.nextInt(soundList.size());\n }\n currentSongNumber = nextSongNumber;\n fileName = soundList.get(currentSongNumber);\n }\n \n try {\n \n \n soundSequencer = MidiSystem.getSequencer();\n soundSequencer.open();\n \n soundSequencer.setSequence(this.getClass().getResourceAsStream(fileName));\n soundSequencer.setLoopCount(Sequencer.LOOP_CONTINUOUSLY);\n soundSequencer.start();\n \n } catch (IOException | InvalidMidiDataException | MidiUnavailableException ex) {\n //Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void playSound(String soundURL){\n if (mySoundPlayer == null){\n logMessage(TAG, \"playSound() -> mSoundPlayer is null\");\n return;\n }\n mySoundPlayer.play(soundURL);\n }", "public void playSound ( Location location , Sound sound , SoundCategory category , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , category , volume , pitch ) );\n\t}", "public void play()\n\t{\n\t\tif (canPlay)\n\t\t{\n\t\t\tsong.play();\n\t\t\tsong.rewind();\n\t\t\tif (theSong == \"SG1\" || theSong == \"SG2\")\n\t\t\t\tcanPlay = false;\n\t\t}\n\t}", "@Override\r\n\tpublic String doSound() {\n\t\treturn null;\r\n\t}", "void playSound() {\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n soundPlaying = true;\n audioTrack.play();\n while (soundPlaying) {\n genWhiteNoise();\n audioTrack.write(noise, 0, SAMPLE_COUNT);\n }\n\n }\n });\n thread.start();\n }", "void play(final Context context, final int soundId, final OnCompletionPlayNextListener playNextListener);", "public void errorSound()\n {\n InputStream pathSoundFile = getClass().getResourceAsStream(\"Error.wav\");\n playSound(pathSoundFile);\n }", "public static void enableSound() {\n\t\tvelocity = 127;\n\t}", "public void continueSound() {\n\t\tclip.start();\n\t}", "public void PlaySound(Context context) {\r\n\t\tif (!this.mp.isPlaying()) {\r\n\t\t\tmp.start();\r\n\t\t}\r\n\t}", "protected void playStepSound(int par1, int par2, int par3, int par4)\n {\n this.playSound(\"mob.spider.step\", 0.15F, 1.0F);\n }", "abstract String getSound();", "@Override\n protected String produceSound(){\n return \"BauBau\";\n\n }", "public static void playSound(Context context) {\n mAudioManager = (AudioManager) context.getSystemService(AUDIO_SERVICE);\n assert mAudioManager != null;\n originalVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);\n Log.d(TAG, \"originalVolume: \"+ originalVolume);\n mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC), 0);\n mAudioManager.setMode(AudioManager.STREAM_MUSIC);\n mAudioManager.setSpeakerphoneOn(true);\n\n if (mp != null) {\n mp.stop();\n }\n\n mp = MediaPlayer.create(context, R.raw.ringingsound);\n mp.setLooping(true);\n mp.start();\n\n }", "public void playSound(EnvironmentEvent event) {\r\n // a precaution check... usually the event can't be null\r\n if (event == null) {\r\n return;\r\n }\r\n\r\n String eventTypeName = event.getType();\r\n\r\n // manage the OutMessageEvents\r\n if (event instanceof OutMessageEvent) {\r\n String messageTypeName = ((OutMessageEvent) event).getMessage().getType();\r\n\r\n // check if we deal with out messages generic or with out message that\r\n // have a sound assigned for a specific type and not for any out message\r\n if (this.soundsMap.get(eventTypeName + this.typesNameDelimiter\r\n + messageTypeName) != null) {\r\n eventTypeName += (this.typesNameDelimiter + messageTypeName);\r\n }\r\n }\r\n\r\n // play this sound if need to play and is allowed to play.\r\n if (this.soundOn\r\n && this.soundEventActiveStateMap.get(eventTypeName) != null\r\n && this.soundEventActiveStateMap.get(eventTypeName)\r\n && this.soundsMap.get(eventTypeName) != null) {\r\n\r\n SonificationMap sMap = this.sonificationMap.get(eventTypeName);\r\n if (sMap != null\r\n && this.soundsMap.get(eventTypeName) instanceof SoundMIDI) {\r\n boolean fromMsg = eventTypeName.contains(this.typesNameDelimiter);\r\n\r\n Object evtPropValue = null;\r\n\r\n try {\r\n evtPropValue = getValue(sMap.getPropertyName(), event, fromMsg);\r\n\r\n } catch (Exception ex) {\r\n }\r\n\r\n int instrument = -1;\r\n if (sMap.getSoundPropertyName().equals(NOTE)) {\r\n ((SoundMIDI) this.soundsMap.get(eventTypeName)).setNotes(sMap\r\n .mapNotes(evtPropValue));\r\n }\r\n if (sMap.getSoundPropertyName().equals(DURATION)) {\r\n ((SoundMIDI) this.soundsMap.get(eventTypeName)).setNotes(sMap\r\n .mapDuration(evtPropValue));\r\n }\r\n if (sMap.getSoundPropertyName().equals(VOLUME)) {\r\n ((SoundMIDI) this.soundsMap.get(eventTypeName)).setNotes(sMap\r\n .mapVolume(evtPropValue));\r\n }\r\n if (sMap.getSoundPropertyName().equals(INSTRUMENT_NO)) {\r\n instrument = sMap.mapInstrument(evtPropValue);\r\n ((SoundMIDI) this.soundsMap.get(eventTypeName))\r\n .setInstrument(instrument);\r\n }\r\n\r\n }\r\n\r\n this.soundsMap.get(eventTypeName).play();\r\n }\r\n }", "public static Action playSound(final InputStream sound) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n //MP3.play(sound);\n }\n\n @Override\n public int getCost() {\n return 5;\n }\n\n @Override\n public boolean isExclusive() {\n return false;\n }\n\n @Override\n public Object getData() {\n return sound;\n }\n\n @Override\n public String toString() {\n return \"PlaySound(\" + (sound != null ? sound.toString() : \"null\") + \")\";\n }\n };\n }", "public void toggleSound() { \n\t\tif (mSoundEnable) {\n\t\t\tmSoundEnable = false; \n\t\t\tif (ResourceManager.getInstance().gameMusic.isPlaying())\n\t\t\t\tResourceManager.getInstance().gameMusic.pause();\n\t\t}\n\t\telse {\n\t\t\tmSoundEnable = true;\n\t\t\tif (!ResourceManager.getInstance().gameMusic.isPlaying()) {\n\t\t\t\tResourceManager.getInstance().gameMusic.play();\n\t\t\t}\n\t\t}\n\t}", "public void playClickSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, CLICK);\n\t}", "public void playBeep() {\n // Cách 1: Sử dụng audio có sẵn của android\n// ToneGenerator toneGenerator = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, 500);\n// toneGenerator.startTone(ToneGenerator.TONE_PROP_PROMPT);\n\n // Cách 2: Sử dụng audio của mình\n Uri beepSound = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + File.pathSeparator\n + File.separator + getPackageName() + \"/raw/notifications.mp3\");\n Ringtone ringtone = RingtoneManager.getRingtone(this, beepSound);\n ringtone.play();\n }", "public void playSound(InputStream access)\n {\n if(!mute)\n {\n try{\n InputStream bufferedIn = new BufferedInputStream(access);\n AudioInputStream audioIn = AudioSystem.getAudioInputStream(bufferedIn);\n Clip clip = AudioSystem.getClip();\n clip.open(audioIn);\n clip.start();\n }\n catch(UnsupportedAudioFileException | IOException | LineUnavailableException e1){\n System.out.println(\"Selected Audio File is not compatible/available.\");};\n }\n }", "public void playHitWall() {\r\n hitWall.play(soundFxVol);\r\n }", "private void playAudio(int winLose)\t\t\t\t\t\t\t\n {\n // win\n if(winLose == 1)\n {\n String path = \"src/winningSound.wav\";\n Media media = new Media(new File(path).toURI().toString());\n\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.setCycleCount(1);\n mediaPlayer.setAutoPlay(true);\n }\n // lose\n else\n {\n String path = \"src/loserSound.wav\";\n Media media = new Media(new File(path).toURI().toString());\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.setCycleCount(1);\n mediaPlayer.setAutoPlay(true);\n }\n }", "public void toggleSound()\n\t{\n\t\tif (sound)\n\t\t\tsound = false;\n\t\telse\n\t\t\tsound = true;\n\t\tnotifyObservers();\n\t}" ]
[ "0.83235884", "0.81556326", "0.8148567", "0.8113563", "0.7984178", "0.79256266", "0.7917265", "0.78503263", "0.7840744", "0.7820898", "0.7769528", "0.77254564", "0.7717483", "0.77147645", "0.77011305", "0.7650783", "0.76360875", "0.7615948", "0.75898665", "0.7584792", "0.7555749", "0.7517612", "0.7502664", "0.74705446", "0.7469099", "0.74652123", "0.74569386", "0.7448758", "0.7447555", "0.7425488", "0.74206585", "0.7404806", "0.7404806", "0.7389854", "0.73626596", "0.73579574", "0.73431134", "0.73419124", "0.73387253", "0.73362345", "0.7324693", "0.73215735", "0.7307207", "0.72998786", "0.7283501", "0.72771937", "0.7272033", "0.7270975", "0.7261973", "0.7256658", "0.7224673", "0.7218581", "0.7209637", "0.719152", "0.718487", "0.7182722", "0.7177821", "0.71746916", "0.7174577", "0.71719646", "0.71670586", "0.716532", "0.7165202", "0.7152077", "0.7147661", "0.71460336", "0.7144399", "0.71431977", "0.7138812", "0.7130137", "0.7115003", "0.71140754", "0.71057457", "0.70985603", "0.7097408", "0.70695716", "0.7068212", "0.7061955", "0.7061945", "0.7060284", "0.7048156", "0.70385957", "0.7037609", "0.70334643", "0.70331746", "0.70315295", "0.7021205", "0.7016848", "0.7015027", "0.70103115", "0.6997001", "0.6996057", "0.6993478", "0.69812596", "0.69797134", "0.69787", "0.6977624", "0.6976392", "0.6972811", "0.69700164", "0.6969788" ]
0.0
-1
Play a proper sound:
@Override public void onClick(View v) { if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start(); // Dismiss dialog: verificationDialog.dismiss(); // Go back to main menu: // Creating an intent: Intent mainIntent = new Intent(OfflineGameActivity.this , MainActivity.class); // Starting the Main Activity: startActivity(mainIntent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void play() {\n\t\tlog.finest(\"Playing sound\");\n\t\ttone.trigger();\n\t}", "public void playSound() {\n\t\tmediaPlayer.play();\n\t}", "private void playSound() {\n\t\tif (controllerVars.isLoaded() && !controllerVars.isPlays()) {\n\t\t\tcontrollerVars.getSoundPool().play(controllerVars.getSoundID(), controllerVars.getVolume(), controllerVars.getVolume(), 1, 0, 1f);\n\t\t\tcontrollerVars.COUNTER++;\n\t\t\t//Toast.makeText(act, \"Played sound\", Toast.LENGTH_SHORT).show();optional Playing message \n\t\t\tcontrollerVars.setPlays(true);\n\t\t\tonComplete(controllerVars.getMediaPlayer().getDuration());\n\t\t}\n\t\t//controllerVars.getMediaPlayer().start();\n\t\t//controllerVars.setPlays(true);\n\t}", "@Override\n public void playSound(int soundId) {\n\n }", "public static void playSound(){\r\n try{\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(AudioSystem.getAudioInputStream(new File(\"Cheering.wav\")));\r\n clip.start();\r\n }\r\n catch (Exception exc){\r\n exc.printStackTrace(System.out);\r\n } \r\n }", "public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}", "PlaySound getSound();", "public static void playShootingSound(){\n String musicFile = \"Sounds\\\\Shoot.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }", "public void playSoundAt(IPos pos, String sound, float volume, float pitch);", "private static void playSound(String s) {\n try {\n Media hit = new Media(new File(s).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(hit);\n mediaPlayer.play();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "@Override\n\tpublic void playLivingSound() {\n\t\tgetSoundManager().playLivingSound();\n\t}", "public void playSound() {\n String path = \"Data\\\\\\\\Acceptance.wav\";\n InputStream success;\n try {\n success = new FileInputStream(new File(path));\n AudioStream audioStream = new AudioStream(success);\n AudioPlayer.player.start(audioStream);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error playing sounds\");\n }\n }", "public void StartSound(ISoundOrigin origin, sfxenum_t sound_id);", "public void play(int soundID) {\n System.out.println(\"PlaySound: \" + soundID);\n// if (soundID == SOUND_EAT)\n// return;\n play(soundID, 1);\n }", "public void StartSound(ISoundOrigin origin, int sound_id);", "public void playSound(File soundFile);", "public void playSound(String sound) {\n\t\t \n\t\t // open the sound file as a Java input stream\n\t\tString soundFile = null;\n\t\tswitch (sound) {\n\t\tcase \"opening\":\n\t\t\tsoundFile = \"ConfigFiles\\\\opening.wav\";\n\t\t\tbreak;\n\t\tcase \"ending\":\n\t\t\tsoundFile = \"ConfigFiles\\\\ending.wav\";\n\t\t\tbreak;\n\t\tcase \"shop\":\n\t\t\tsoundFile = \"ConfigFiles\\\\shop.wav\";\n\t\t\tbreak;\n\t\tcase \"monsterbattle\":\n\t\t\tsoundFile = \"ConfigFiles\\\\monsterbattle.wav\";\n\t\t\tbreak;\n\t\tcase \"battlewin\":\n\t\t\tsoundFile = \"ConfigFiles\\\\monstervictory.wav\";\n\t\t\tbreak;\n\t\tcase \"trainerbattle\":\n\t\t\tsoundFile = \"ConfigFiles\\\\trainerBattle.wav\";\n\t\t\tbreak;\n\t\tcase \"trainerbattlewin\":\n\t\t\tsoundFile = \"ConfigFiles\\\\trainerVictory.wav\";\n\t\t\tbreak;\n\t\tcase \"map\":\n\t\t\tsoundFile = \"ConfigFiles\\\\map.wav\";\n\t\t\tbreak;\n\t\t}\n\t\t\t\n\t\t \n\t\t InputStream in = null;\n\t\t\ttry {\n\t\t\t\tin = new FileInputStream(soundFile);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t \n\t\t\tif(audioStream != null ) {\n\t\t\t\tAudioPlayer.player.stop(audioStream);\n\t\t\t}\n\t\t\t // create an audiostream from the inputstream\n\t\t\ttry {\n\t\t\t\taudioStream = new AudioStream(in);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t // play the audio clip with the audioplayer class\n\t\t\t\n\t\t AudioPlayer.player.start(audioStream);\n\t\t \n\t}", "public abstract String play(SoundLibrary library, String... sound);", "private void playYouWinSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\tada.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }", "public void playSoundFail() {\n\t\tfailSound.play();\n\t}", "private void playSound(String sound) {\r\n try {\r\n BufferedInputStream soundFileStream = new BufferedInputStream(this\r\n .getClass().getResourceAsStream(sound));\r\n AudioInputStream audioInputStream = AudioSystem\r\n .getAudioInputStream(soundFileStream);\r\n AudioFormat audioFormat = audioInputStream.getFormat();\r\n DataLine.Info dataLineInfo = new DataLine.Info(Clip.class, audioFormat);\r\n Clip clip = (Clip) AudioSystem.getLine(dataLineInfo);\r\n clip.open(audioInputStream);\r\n clip.start();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "static void PlaySound(File Sound)\n {\n try{\n Clip clip = AudioSystem.getClip();\n clip.open(AudioSystem.getAudioInputStream(Sound));\n clip.start();\n //BGM = new AudioStream(new FileInputStream(\"OST.WAV\"));\n //MD = BGM.getData();\n //loop = new ContinuousAudioDataStream(MD);\n }catch(Exception e) {}\n //MGP.start(loop); \n }", "public void startSound() {\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\tURL url = this.getClass().getResource(\"/\"+wavMusicFile);\n\t\t\t//System.out.println(\"url: \" + url);\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tclip = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tclip.open(audioIn);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void playSound(int sound) {\n \t currentstreamID=soundPool.play(soundPoolMap.get(sound), 0.5f, 0.5f, 1, -1, 1f);\n Log.e(\"MYT\",currentstreamID+\" play output\"); \n }", "public static void playSound(Player p, Location loc, Sound sound, float pitch, float volume){\n p.playSound(loc, sound, volume, pitch);\n }", "public void playSound(String filename) {\r\n\t\tif (debugLevel > 1)\r\n\t\t\tSystem.out.println(\" ... play audio file: \" + filename);\r\n\t\ttry {\r\n\t\t\tFile file = new File(filename);\r\n\t\t\tAudioInputStream in = AudioSystem.getAudioInputStream(file);\r\n\t\t\tclip = AudioSystem.getClip();\r\n\t\t\tclip.open(in);\r\n\t\t\tclip.start();\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void playAudio() {\r\n Play.au(audioFileName, false);\r\n }", "public void play(Sound s, PlayMode mode) throws IOException {\n if (s != null) getClip(s).play(mode);\n }", "public String play(String sound) {\r\n return play(SoundLibrarian.getInstance(), sound);\r\n }", "public void playSound(SoundType type) {\n if (!gameController.getGameStatPanel().getUserData().isSoundDisabled()) soundMap.get(type).play();\n }", "public void play() {\n if (audio != null) {\n audio.play(sfxVolume);\n }\n }", "@Override\n public void makeSound() {\n\n }", "@Override\n public void makeSound() {\n\n }", "public void PauseSound();", "public void startSound()\n \n {try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Start 2.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n startClip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n startClip.open(audioIn); \n \n startClip.start();\n \n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n \n }", "public void playWinSound()\n {\n InputStream pathSoundFile = getClass().getResourceAsStream(\"bellringing.wav\");\n playSound(pathSoundFile);\n }", "public abstract void makeSound();", "public void playSound(Location loc) {\n if (_sound != null) {\n loc.getWorld().playSound(loc, _sound, _soundVolume, _soundPitch);\n }\n }", "public void playSound(SoundEvent debug1, float debug2, float debug3) {\n/* 466 */ this.level.playSound(this, getX(), getY(), getZ(), debug1, getSoundSource(), debug2, debug3);\n/* */ }", "public void soundPressed() {\n // display\n TextLCD.print(SOUND);\n // sound\n Sound.beep();\n }", "private void playSound(int index, float pitch) {\n try {\n metaObject.playSound(index, pitch, 1f);\n } catch (NullPointerException | IndexOutOfBoundsException ex) {\n System.out.println(\"Could not play sound with index \" + index + \" for \" + this.toString() + \".\");\n }\n }", "public static void game_sound() {\n\t\tm_player_game.start();\n\t\tm_player_game.setMediaTime(new Time(0));\n\t}", "public void playSound ( Location location , Sound sound , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , volume , pitch ) );\n\t}", "private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }", "private void playSound(String soundFile){\n try {\n AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File(soundFile).getAbsoluteFile());\n Clip clip = AudioSystem.getClip();\n clip.open(audioInputStream);\n clip.start();\n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void playSound() {\n if (isFlashOn) {\n mp = MediaPlayer.create(this, R.raw.light_switch_off);\n } else {\n mp = MediaPlayer.create(this, R.raw.light_switch_on);\n }\n mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\n @Override\n public void onCompletion(MediaPlayer mp) {\n // TODO Auto-generated method stub\n mp.release();\n }\n });\n mp.start();\n }", "public void playSound(int sample, boolean looped) {\n\t\t\tm_soundManager.playSound(sample, looped);\n\t\t}", "public void playAudio() {\n\t\tmusic[currentSong].stop();\n\t\tcurrentSong++;\n\t\tcurrentSong %= music.length;\n\t\tmusic[currentSong].play();\n\t}", "private void playGameOverSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\ringout.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }", "@Override\r\n\tpublic void sound() {\r\n\t\tsuper.sound();\r\n\t\tSystem.out.println(\"SportsCar sound: Vutututututu\");\r\n\t}", "public void playAudio() {\n\n }", "private static void playAudio(String musicFile) {\n }", "public void playSound(String soundName) {\r\n try {\r\n audioInputStream = AudioSystem.getAudioInputStream(new File(soundName).getAbsoluteFile());\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(audioInputStream);\r\n clip.start();\r\n } catch (Exception ex) {\r\n System.out.println(\"Error with playing sound.\");\r\n ex.printStackTrace();\r\n }\r\n }", "public void playSound() {\n if (this.mIsSupportVibrator) {\n this.mVibratorEx.setHwVibrator(\"haptic.control.time_scroll\");\n }\n if (this.mSoundPool == null || this.mSoundId == 0 || !this.mSoundLoadFinished) {\n Log.w(TAG, \"SoundPool is not initialized properly!\");\n } else {\n this.mSoundPool.play(this.mSoundId, 1.0f, 1.0f, 0, 0, 1.0f);\n }\n }", "public Sound createSound(String file);", "public void play(String soundName)\n {\n try{\n Clip clip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new File(soundName));\n clip.open(inputStream);\n clip.start();\n }\n catch (Exception e){\n System.out.println(\"Play sound error: \" + e.getMessage() + \" for \" + soundName);\n }\n }", "public void playSound ( Location location , String sound , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , volume , pitch ) );\n\t}", "public Sound loadSound(String file);", "public void playAmbientSound() {\n if (!this.isClosed()) {\n super.playAmbientSound();\n }\n\n }", "protected void playTheSound(int position) {\n if (mp != null) {\n mp.reset();\n mp.release();\n }\n mp = MediaPlayer.create(this, sons[position]);\n mp.start();\n }", "public void playSoundSuccess() {\n\t\tsucceededSound.play();\n\t}", "public static void portail_sound() {\n\t\tm_player_portail.start();\n\t\tm_player_portail.setMediaTime(new Time(0));\n\t}", "public static void PlaySound(String soundToPlay)\n {\n AudioNode sound = new AudioNode(Game.getInstance().getAssetManager(), soundToPlay);\n sound.setReverbEnabled(false);\n sound.play();\n }", "public static void playInternal( LayeredSound.SoundClip s )\r\n\t{\r\n\t\tif ( Settings.isSoundOn() )\r\n\t\t\tnew SpeakerThread( s ).start();\r\n\t}", "public void playSoundGameWon() {\n\t\tcompletedGameSound.play();\n\t}", "void play(int soundIndex) {\n\t\tsounds.get(soundIndex).play();\n\t}", "public static void playPickupSound(){\n String musicFile = \"Sounds\\\\Pickup.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }", "public void play() {\n\t\tplay(true, true);\n\t}", "private void playSound(String fileName) {\n\t\tAudioClip sound = JApplet.newAudioClip(getClass().getResource(fileName));\n\t\tsound.play();\n\t}", "public void playSoundGameLost() {\n\t\tlostGameSound.play();\n\t}", "public static void playSoundEffect(String path) {\n Thread thread = new Thread(() -> {\n Player soundEffectPlayer = new Player();\n soundEffectPlayer.setSourceLocation(path);\n soundEffectPlayer.play();\n });\n thread.setDaemon(true);\n thread.start();\n }", "public static void sound(String sound){\n System.out.println(\"The dog \"+sound);\n }", "public void playSoundtrack() {\n if(this.musicEnabled) {\n try {\n Clip soundtrackClip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new BufferedInputStream(Assets.soundTrack));\n soundtrackClip.open(inputStream);\n soundtrackClip.start();\n soundtrackClip.loop(Clip.LOOP_CONTINUOUSLY);\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(e.getMessage());\n }\n }\n }", "private void gameSound(int attack){\n switch (attack){\n case 1:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_lightattack);\n break;\n case 2:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_strongattack);\n break;\n case 3:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_brutalattack);\n break;\n }\n mediaPlayer.start();\n }", "public void playGoombaSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, GOOMBA);\n\t}", "@Override\n\tpublic void play() {\n\t\tGuitar.super.play();\n\t\tPiano.super.play();\n\t}", "public void playBeep(){\n //https://stackoverflow.com/questions/2618182/how-to-play-ringtone-alarm-sound-in-android\n try{\n //gets notification sound then plays it.\n Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification);\n\n r.play();\n TimeUnit.MILLISECONDS.sleep(300);\n r.stop();\n\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }", "public void playSound(String fileName){\n \n Random rand = new Random();\n if (fileName == null) {\n int nextSongNumber = rand.nextInt(soundList.size());\n while(nextSongNumber == currentSongNumber){\n nextSongNumber = rand.nextInt(soundList.size());\n }\n currentSongNumber = nextSongNumber;\n fileName = soundList.get(currentSongNumber);\n }\n \n try {\n \n \n soundSequencer = MidiSystem.getSequencer();\n soundSequencer.open();\n \n soundSequencer.setSequence(this.getClass().getResourceAsStream(fileName));\n soundSequencer.setLoopCount(Sequencer.LOOP_CONTINUOUSLY);\n soundSequencer.start();\n \n } catch (IOException | InvalidMidiDataException | MidiUnavailableException ex) {\n //Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void playSound(String soundURL){\n if (mySoundPlayer == null){\n logMessage(TAG, \"playSound() -> mSoundPlayer is null\");\n return;\n }\n mySoundPlayer.play(soundURL);\n }", "public void playSound ( Location location , Sound sound , SoundCategory category , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , category , volume , pitch ) );\n\t}", "public void play()\n\t{\n\t\tif (canPlay)\n\t\t{\n\t\t\tsong.play();\n\t\t\tsong.rewind();\n\t\t\tif (theSong == \"SG1\" || theSong == \"SG2\")\n\t\t\t\tcanPlay = false;\n\t\t}\n\t}", "@Override\r\n\tpublic String doSound() {\n\t\treturn null;\r\n\t}", "void playSound() {\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n soundPlaying = true;\n audioTrack.play();\n while (soundPlaying) {\n genWhiteNoise();\n audioTrack.write(noise, 0, SAMPLE_COUNT);\n }\n\n }\n });\n thread.start();\n }", "void play(final Context context, final int soundId, final OnCompletionPlayNextListener playNextListener);", "public void errorSound()\n {\n InputStream pathSoundFile = getClass().getResourceAsStream(\"Error.wav\");\n playSound(pathSoundFile);\n }", "public static void enableSound() {\n\t\tvelocity = 127;\n\t}", "public void continueSound() {\n\t\tclip.start();\n\t}", "public void PlaySound(Context context) {\r\n\t\tif (!this.mp.isPlaying()) {\r\n\t\t\tmp.start();\r\n\t\t}\r\n\t}", "protected void playStepSound(int par1, int par2, int par3, int par4)\n {\n this.playSound(\"mob.spider.step\", 0.15F, 1.0F);\n }", "abstract String getSound();", "@Override\n protected String produceSound(){\n return \"BauBau\";\n\n }", "public static void playSound(Context context) {\n mAudioManager = (AudioManager) context.getSystemService(AUDIO_SERVICE);\n assert mAudioManager != null;\n originalVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);\n Log.d(TAG, \"originalVolume: \"+ originalVolume);\n mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC), 0);\n mAudioManager.setMode(AudioManager.STREAM_MUSIC);\n mAudioManager.setSpeakerphoneOn(true);\n\n if (mp != null) {\n mp.stop();\n }\n\n mp = MediaPlayer.create(context, R.raw.ringingsound);\n mp.setLooping(true);\n mp.start();\n\n }", "public void playSound(EnvironmentEvent event) {\r\n // a precaution check... usually the event can't be null\r\n if (event == null) {\r\n return;\r\n }\r\n\r\n String eventTypeName = event.getType();\r\n\r\n // manage the OutMessageEvents\r\n if (event instanceof OutMessageEvent) {\r\n String messageTypeName = ((OutMessageEvent) event).getMessage().getType();\r\n\r\n // check if we deal with out messages generic or with out message that\r\n // have a sound assigned for a specific type and not for any out message\r\n if (this.soundsMap.get(eventTypeName + this.typesNameDelimiter\r\n + messageTypeName) != null) {\r\n eventTypeName += (this.typesNameDelimiter + messageTypeName);\r\n }\r\n }\r\n\r\n // play this sound if need to play and is allowed to play.\r\n if (this.soundOn\r\n && this.soundEventActiveStateMap.get(eventTypeName) != null\r\n && this.soundEventActiveStateMap.get(eventTypeName)\r\n && this.soundsMap.get(eventTypeName) != null) {\r\n\r\n SonificationMap sMap = this.sonificationMap.get(eventTypeName);\r\n if (sMap != null\r\n && this.soundsMap.get(eventTypeName) instanceof SoundMIDI) {\r\n boolean fromMsg = eventTypeName.contains(this.typesNameDelimiter);\r\n\r\n Object evtPropValue = null;\r\n\r\n try {\r\n evtPropValue = getValue(sMap.getPropertyName(), event, fromMsg);\r\n\r\n } catch (Exception ex) {\r\n }\r\n\r\n int instrument = -1;\r\n if (sMap.getSoundPropertyName().equals(NOTE)) {\r\n ((SoundMIDI) this.soundsMap.get(eventTypeName)).setNotes(sMap\r\n .mapNotes(evtPropValue));\r\n }\r\n if (sMap.getSoundPropertyName().equals(DURATION)) {\r\n ((SoundMIDI) this.soundsMap.get(eventTypeName)).setNotes(sMap\r\n .mapDuration(evtPropValue));\r\n }\r\n if (sMap.getSoundPropertyName().equals(VOLUME)) {\r\n ((SoundMIDI) this.soundsMap.get(eventTypeName)).setNotes(sMap\r\n .mapVolume(evtPropValue));\r\n }\r\n if (sMap.getSoundPropertyName().equals(INSTRUMENT_NO)) {\r\n instrument = sMap.mapInstrument(evtPropValue);\r\n ((SoundMIDI) this.soundsMap.get(eventTypeName))\r\n .setInstrument(instrument);\r\n }\r\n\r\n }\r\n\r\n this.soundsMap.get(eventTypeName).play();\r\n }\r\n }", "public static Action playSound(final InputStream sound) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n //MP3.play(sound);\n }\n\n @Override\n public int getCost() {\n return 5;\n }\n\n @Override\n public boolean isExclusive() {\n return false;\n }\n\n @Override\n public Object getData() {\n return sound;\n }\n\n @Override\n public String toString() {\n return \"PlaySound(\" + (sound != null ? sound.toString() : \"null\") + \")\";\n }\n };\n }", "public void toggleSound() { \n\t\tif (mSoundEnable) {\n\t\t\tmSoundEnable = false; \n\t\t\tif (ResourceManager.getInstance().gameMusic.isPlaying())\n\t\t\t\tResourceManager.getInstance().gameMusic.pause();\n\t\t}\n\t\telse {\n\t\t\tmSoundEnable = true;\n\t\t\tif (!ResourceManager.getInstance().gameMusic.isPlaying()) {\n\t\t\t\tResourceManager.getInstance().gameMusic.play();\n\t\t\t}\n\t\t}\n\t}", "public void playClickSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, CLICK);\n\t}", "public void playBeep() {\n // Cách 1: Sử dụng audio có sẵn của android\n// ToneGenerator toneGenerator = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, 500);\n// toneGenerator.startTone(ToneGenerator.TONE_PROP_PROMPT);\n\n // Cách 2: Sử dụng audio của mình\n Uri beepSound = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + File.pathSeparator\n + File.separator + getPackageName() + \"/raw/notifications.mp3\");\n Ringtone ringtone = RingtoneManager.getRingtone(this, beepSound);\n ringtone.play();\n }", "public void playSound(InputStream access)\n {\n if(!mute)\n {\n try{\n InputStream bufferedIn = new BufferedInputStream(access);\n AudioInputStream audioIn = AudioSystem.getAudioInputStream(bufferedIn);\n Clip clip = AudioSystem.getClip();\n clip.open(audioIn);\n clip.start();\n }\n catch(UnsupportedAudioFileException | IOException | LineUnavailableException e1){\n System.out.println(\"Selected Audio File is not compatible/available.\");};\n }\n }", "public void playHitWall() {\r\n hitWall.play(soundFxVol);\r\n }", "private void playAudio(int winLose)\t\t\t\t\t\t\t\n {\n // win\n if(winLose == 1)\n {\n String path = \"src/winningSound.wav\";\n Media media = new Media(new File(path).toURI().toString());\n\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.setCycleCount(1);\n mediaPlayer.setAutoPlay(true);\n }\n // lose\n else\n {\n String path = \"src/loserSound.wav\";\n Media media = new Media(new File(path).toURI().toString());\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.setCycleCount(1);\n mediaPlayer.setAutoPlay(true);\n }\n }", "public void toggleSound()\n\t{\n\t\tif (sound)\n\t\t\tsound = false;\n\t\telse\n\t\t\tsound = true;\n\t\tnotifyObservers();\n\t}" ]
[ "0.83235884", "0.81556326", "0.8148567", "0.8113563", "0.7984178", "0.79256266", "0.7917265", "0.78503263", "0.7840744", "0.7820898", "0.7769528", "0.77254564", "0.7717483", "0.77147645", "0.77011305", "0.7650783", "0.76360875", "0.7615948", "0.75898665", "0.7584792", "0.7555749", "0.7517612", "0.7502664", "0.74705446", "0.7469099", "0.74652123", "0.74569386", "0.7448758", "0.7447555", "0.7425488", "0.74206585", "0.7404806", "0.7404806", "0.7389854", "0.73626596", "0.73579574", "0.73431134", "0.73419124", "0.73387253", "0.73362345", "0.7324693", "0.73215735", "0.7307207", "0.72998786", "0.7283501", "0.72771937", "0.7272033", "0.7270975", "0.7261973", "0.7256658", "0.7224673", "0.7218581", "0.7209637", "0.719152", "0.718487", "0.7182722", "0.7177821", "0.71746916", "0.7174577", "0.71719646", "0.71670586", "0.716532", "0.7165202", "0.7152077", "0.7147661", "0.71460336", "0.7144399", "0.71431977", "0.7138812", "0.7130137", "0.7115003", "0.71140754", "0.71057457", "0.70985603", "0.7097408", "0.70695716", "0.7068212", "0.7061955", "0.7061945", "0.7060284", "0.7048156", "0.70385957", "0.7037609", "0.70334643", "0.70331746", "0.70315295", "0.7021205", "0.7016848", "0.7015027", "0.70103115", "0.6997001", "0.6996057", "0.6993478", "0.69812596", "0.69797134", "0.69787", "0.6977624", "0.6976392", "0.6972811", "0.69700164", "0.6969788" ]
0.0
-1
Creating a dialog and getting the right views:
private void showRestartDialog(){ final Dialog verificationDialog = new Dialog(this, R.style.DialogTheme); verificationDialog.setContentView(R.layout.dialog_verification); TextView verificationText = (TextView) verificationDialog.findViewById(R.id.verification_text); Button cancelButton = (Button) verificationDialog.findViewById(R.id.cancel_button); Button acceptButton = (Button) verificationDialog.findViewById(R.id.accept_button); verificationDialog.show(); verificationText.setText(R.string.verification_restart); // Setting up a listener for the Cancel Button: cancelButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Play a proper sound: if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start(); // Dismiss dialog: verificationDialog.dismiss(); } }); // Setting up a listener for the Done Button: acceptButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Play a proper sound: if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start(); // Creating a new game and reinitializing UI components: mGame = new Game(); setupGrid(); mBlackCounter.setText("2"); mWhiteCounter.setText("2"); startGame(); // Dismiss dialog: verificationDialog.dismiss(); // Showing a promo ad by chance: showPromoAdByChance(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "public abstract Dialog createDialog(DialogDescriptor descriptor);", "public abstract View getMainDialogContainer();", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = requireActivity().getLayoutInflater();\n final View view = inflater.inflate(R.layout.on_click_dialog, null);\n builder.setView(view);\n\n\n\n\n\n\n\n\n return builder.create();\n }", "private void initDialogView(View dialogView) {\n btnTidak = (Button) dialogView.findViewById(R.id.btnTidak);\n btnYa = (Button) dialogView.findViewById(R.id.btnYa);\n imgClosePopup = (ImageView) dialogView.findViewById(R.id.imgClosePopup);\n txtTitle = (TextView) dialogView.findViewById(R.id.txtTitle);\n iconTitle = (ImageView) dialogView.findViewById(R.id.iconTitle);\n }", "private void initDialog() {\n }", "protected abstract JDialog createDialog();", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n View view = getActivity().getLayoutInflater().inflate(R.layout.rollback_detail_dialog, new LinearLayout(getActivity()), false);\n\n initUI(view);\n // clickEvents();\n\n /*\n assert getArguments() != null;\n voucherTypes = (ArrayList<VoucherType>) getArguments().getSerializable(\"warehouses\");\n voucherType=\"\";\n*/\n\n Dialog builder = new Dialog(getActivity());\n builder.requestWindowFeature(Window.FEATURE_NO_TITLE);\n builder.setContentView(view);\n return builder;\n\n\n }", "public void createDialog(int d) {\n\t\tswitch (d) {\n\n\t\tcase DIALOG_SHOW_MESSAGE:\n\t\t\tAlertDialog.Builder messageBuilder = new AlertDialog.Builder(\n\t\t\t\t\tgetActivity());\n\t\t\tmessageBuilder.setMessage(errorMessage).setPositiveButton(\n\t\t\t\t\tgetString(R.string.ok),\n\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\tAlertDialog showDialog = messageBuilder.create();\n\t\t\tshowDialog.show();\n\t\t\tbreak;\n\n\t\tcase DIALOG_DISTANCE:\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\t\t\tbuilder.setTitle(R.string.select_distance);\n\t\t\tbuilder.setSingleChoiceItems(items, Preferences.selectedDistance,\n\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int item) {\n\t\t\t\t\t\t\tdistance = items[item];\n\t\t\t\t\t\t\tsetDeviceLocation();\n\t\t\t\t\t\t\tPreferences.selectedDistance = item;\n\t\t\t\t\t\t\t// save prefrences\n\t\t\t\t\t\t\tPreferences.saveSettings(getActivity());\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\ttoastLong(R.string.finding_map);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\tAlertDialog alert = builder.create();\n\t\t\talert.show();\n\t\t\tbreak;\n\n\t\tcase DIALOG_CLEAR_DEPLOYMENT:\n\t\t\tAlertDialog.Builder clearBuilder = new AlertDialog.Builder(\n\t\t\t\t\tgetActivity());\n\t\t\tclearBuilder\n\t\t\t\t\t.setMessage(getString(R.string.confirm_clear))\n\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t.setPositiveButton(getString(R.string.yes),\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint id) {\n\t\t\t\t\t\t\t\t\tmHandler.post(deleteAllMaps);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t.setNegativeButton(getString(R.string.no),\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint id) {\n\t\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\tAlertDialog clearDialog = clearBuilder.create();\n\t\t\tclearDialog.show();\n\n\t\t\tbreak;\n\n\t\tcase DIALOG_ADD_DEPLOYMENT:\n\t\t\tLayoutInflater factory = LayoutInflater.from(getActivity());\n\t\t\tfinal View textEntryView = factory.inflate(R.layout.add_map, null);\n\t\t\tfinal AddMapView addMapView = new AddMapView(textEntryView);\n\n\t\t\t// if edit was selected at the context menu, populate fields\n\t\t\t// with existing map details\n\t\t\tif (edit) {\n\t\t\t\tfinal List<ListMapModel> listMap = mListMapModel.loadMapById(\n\t\t\t\t\t\tmId, mapId);\n\t\t\t\tif (listMap.size() > 0) {\n\t\t\t\t\taddMapView.setMapName(listMap.get(0).getName());\n\t\t\t\t\taddMapView.setMapDescription(listMap.get(0).getDesc());\n\t\t\t\t\taddMapView.setMapUrl(listMap.get(0).getUrl());\n\t\t\t\t\taddMapView.setMapId(listMap.get(0).getId());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfinal AlertDialog.Builder addBuilder = new AlertDialog.Builder(\n\t\t\t\t\tgetActivity());\n\n\t\t\taddBuilder\n\t\t\t\t\t.setTitle(R.string.enter_map_details)\n\t\t\t\t\t.setView(textEntryView)\n\t\t\t\t\t.setPositiveButton(R.string.ok,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint whichButton) {\n\t\t\t\t\t\t\t\t\t// edit was selected\n\t\t\t\t\t\t\t\t\tif (edit) {\n\n\t\t\t\t\t\t\t\t\t\tif (!addMapView.updateMapDetails())\n\t\t\t\t\t\t\t\t\t\t\ttoastLong(R.string.fix_error);\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tmHandler.post(refreshMapList);\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\tif (!addMapView.addMapDetails())\n\t\t\t\t\t\t\t\t\t\t\ttoastLong(R.string.fix_error);\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tmHandler.post(fetchMapList);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t.setNegativeButton(R.string.cancel,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint whichButton) {\n\t\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\tAlertDialog deploymentDialog = addBuilder.create();\n\t\t\tdeploymentDialog.show();\n\t\t\tbreak;\n\t\t}\n\n\t}", "public abstract void initDialog();", "public BaseDialog create()\n {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n // instantiate the dialog with the custom Theme\n final BaseDialog dialog = new BaseDialog(context, R.style.Dialog);\n\n View layout = inflater.inflate(R.layout.view_shared_basedialog, null);\n\n //set the dialog's image\n this.icon = (ImageView) layout.findViewById(R.id.view_shared_basedialog_icon);\n\n if (this.imageResource > 0 || this.imageUrl != null)\n {\n this.icon.setVisibility(View.VISIBLE);\n if (this.imageResource > 0)\n {\n this.icon.setBackgroundResource(this.imageResource);\n }\n else\n {\n// TextureRender.getInstance().setBitmap(this.imageUrl, this.icon, R.drawable.no_data_error_image);\n }\n }\n else\n {\n this.icon.setVisibility(View.GONE);\n }\n\n // set check box's text and default value\n this.checkLayout = layout.findViewById(R.id.view_shared_basedialog_checkbox_layout);\n this.checkBox = (CheckBox) layout.findViewById(R.id.view_shared_basedialog_checkbox);\n this.checkBoxTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_checkbox_text);\n\n if (!TextUtils.isEmpty(this.checkBoxText))\n {\n this.checkLayout.setVisibility(View.VISIBLE);\n this.checkBoxTextView.setText(this.checkBoxText);\n this.checkBox.setChecked(checkBoxDefaultState);\n }\n else\n {\n this.checkLayout.setVisibility(View.GONE);\n }\n\n // set the dialog main title and sub title\n this.maintitleTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_maintitle_textview);\n this.subtitleTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_subtitle_textview);\n this.titleDivideTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_titledivide_textview);\n if (!TextUtils.isEmpty(title1))\n {\n this.maintitleTextView.setText(title1);\n if (this.title1BoldAndBig)\n {\n this.maintitleTextView.setTypeface(null, Typeface.BOLD);\n this.maintitleTextView.setTextSize(17);\n }\n\n this.maintitleTextView.setVisibility(View.VISIBLE);\n }\n else\n {\n this.maintitleTextView.setVisibility(View.GONE);\n }\n\n if (!TextUtils.isEmpty(title2))\n {\n this.subtitleTextView.setText(title2);\n this.subtitleTextView.setVisibility(View.VISIBLE);\n }\n else\n {\n this.subtitleTextView.setVisibility(View.GONE);\n }\n this.titleDivideTextView.setVisibility(View.GONE);\n\n // set the confirm button\n this.positiveButton = ((Button) layout.findViewById(R.id.view_shared_basedialog_positivebutton));\n if (!TextUtils.isEmpty(positiveButtonText))\n {\n this.positiveButton.setText(positiveButtonText);\n this.positiveButton.setVisibility(View.VISIBLE);\n if (positiveButtonClickListener != null)\n {\n this.positiveButton.setOnClickListener(new View.OnClickListener()\n {\n public void onClick(View v)\n {\n positiveButtonClickListener.onClick(dialog, DialogInterface.BUTTON_POSITIVE);\n if (checkBox.isChecked()&&onCheckBoxListener!=null)\n {\n onCheckBoxListener.checkedOperation();\n }\n }\n });\n }\n }\n else\n {\n // if no confirm button just set the visibility to GONE\n this.positiveButton.setVisibility(View.GONE);\n }\n\n // set the cancel button\n this.negativeButton = ((Button) layout.findViewById(R.id.view_shared_basedialog_negativebutton));\n if (!TextUtils.isEmpty(negativeButtonText))\n {\n this.negativeButton.setText(negativeButtonText);\n this.negativeButton.setVisibility(View.VISIBLE);\n if (negativeButtonClickListener != null)\n {\n this.negativeButton.setOnClickListener(new View.OnClickListener()\n {\n public void onClick(View v)\n {\n negativeButtonClickListener.onClick(dialog, DialogInterface.BUTTON_NEGATIVE);\n }\n });\n }\n }\n else\n {\n // if no confirm button just set the visibility to GONE\n this.negativeButton.setVisibility(View.GONE);\n }\n\n // set button's background\n this.buttonDivideTextView = (TextView) layout.findViewById(R.id.view_shared_basedialog_buttondivide_textview);\n if (!TextUtils.isEmpty(negativeButtonText) && !TextUtils.isEmpty(negativeButtonText))\n {\n this.buttonDivideTextView.setVisibility(View.VISIBLE);\n this.positiveButton.setBackgroundResource(R.drawable.view_shared_corner_round_rightbottom);\n this.negativeButton.setBackgroundResource(R.drawable.view_shared_corner_round_leftbottom);\n }\n else\n {\n this.buttonDivideTextView.setVisibility(View.GONE);\n this.positiveButton.setBackgroundResource(R.drawable.view_shared_corner_round_bottom);\n this.negativeButton.setBackgroundResource(R.drawable.view_shared_corner_round_bottom);\n }\n\n // set the content message\n this.contentLayout = layout.findViewById(R.id.view_shared_basedialog_content_layout);\n if (!TextUtils.isEmpty(message))\n {\n this.contentTextView = ((TextView) layout.findViewById(R.id.view_shared_basedialog_content_textview));\n this.contentTextView.setText(message);\n this.contentTextView.setMovementMethod(ScrollingMovementMethod.getInstance());\n }\n else if (contentView != null)\n {\n // if no message set\n // add the contentView to the dialog body\n ((ViewGroup) this.contentLayout).removeAllViews();\n ((ViewGroup) this.contentLayout).addView(contentView, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n }\n else\n {\n this.contentLayout.setVisibility(View.GONE);\n }\n\n int[] params = Utils.getLayoutParamsForHeroImage();\n dialog.setContentView(layout, new ViewGroup.LayoutParams(params[0]*4/5, ViewGroup.LayoutParams.MATCH_PARENT));\n return dialog;\n }", "public void initDialogBoxViews(View mView) {\n trailName = (EditText) mView.findViewById(R.id.TrailNametxt);\n trailCode = (EditText) mView.findViewById(R.id.TrailCodetxt);\n module = (EditText) mView.findViewById(R.id.Moduletxt);\n trailDate = (EditText) mView.findViewById(R.id.datetxt);\n addtrailBtn = (Button) mView.findViewById(R.id.CreateBtn);\n }", "@Override\n protected Dialog onCreateDialog(int id) {\n \tswitch (id) {\n\t\tcase DLG_PROGRESSBAR:\n\t\t\treturn dialogoProgressBar();\n\t\tcase DLG_BUTTONS:\n\t\t\treturn dialogButtons();\n\t\tcase DLG_LIST:\n\t\t\treturn dialogLista();\n\t\tcase DLG_LIST_SELECT:\n\t\t\treturn dialogListaSelect();\n\t\tdefault:\n\t\t\treturn dialogButtons();\n\t\t}\n }", "private void findDialogView() {\n dialog = new BottomSheetDialog(getActivity(), R.style.BottomSharingSheet);\n View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.sharing_bottom_sheet, null);\n dialog.setContentView(dialogView);\n closeNavigation = dialogView.findViewById(R.id.imgClose);\n llFacebook = dialogView.findViewById(R.id.llFacebook);\n llTwitter = dialogView.findViewById(R.id.llemail);\n llInstagram = dialogView.findViewById(R.id.lltalk);\n llStories = dialogView.findViewById(R.id.llGoogle);\n llBand = dialogView.findViewById(R.id.llBand);\n llMore = dialogView.findViewById(R.id.llMore);\n llVideoReport = dialogView.findViewById(R.id.llVideoReport);\n closeNavigation.setOnClickListener(this);\n llFacebook.setOnClickListener(this);\n llTwitter.setOnClickListener(this);\n llInstagram.setOnClickListener(this);\n llStories.setOnClickListener(this);\n llBand.setOnClickListener(this);\n llMore.setOnClickListener(this);\n llVideoReport.setOnClickListener(this);\n\n }", "Dialog createDialog(int id) {\n // First we treat the color picker\n if (id >= DIALOG_MASK_COLORS) {\n int icp = id - DIALOG_MASK_COLORS;\n String title = getResources().getStringArray(R.array.items_colors)[icp];\n ColoredPart cp = ColoredPart.values()[icp];\n\n // We can embed our nice color picker view into a regular dialog.\n // For that we use the provided factory method.\n return ColorPickerView.createDialog(this, title, cp.color, new OnClickDismissListener() {\n @Override\n public void onClick(int which) {\n cp.color = which;\n bmView.invalidate();\n }\n });\n }\n\n // Now we treat all the cases which can easily be built as an AlertDialog.\n // For readability throughout the many cases we don't use chaining.\n AlertDialog.Builder b = new AlertDialog.Builder(this);\n\n switch (id) {\n case DIALOG_LEVEL:\n b.setTitle(R.string.menu_level);\n b.setSingleChoiceItems(R.array.items_level, bmView.level - 1, new OnClickDismissListener() {\n @Override\n public void onClick(int which) {\n bmView.newGame(which + 1);\n }\n });\n break;\n\n case DIALOG_SIZE:\n b.setTitle(R.string.menu_size);\n b.setSingleChoiceItems(R.array.items_size, bmView.size - 1, new OnClickDismissListener() {\n @Override\n public void onClick(int which) {\n bmView.initField(which + 1);\n bmView.newGame(0);\n }\n });\n break;\n\n case DIALOG_LIVES:\n b.setTitle(R.string.menu_lives);\n // We use an array adapter in order to be able to relate the selected\n // value to its list position. NOTE: For unclear reasons, passing this\n // adapter even with an additional text view layout id to the builder\n // does not give the same layout as passing the resource id directly.\n // So, we do use the resource id again for that purpose in the call\n // to setSingleChoiceItems.\n final ArrayAdapter<CharSequence> a =\n ArrayAdapter.createFromResource(this, R.array.items_lives, android.R.layout.select_dialog_singlechoice);\n int liv = bmView.getLives();\n int pos = (liv == 0) ? a.getCount() - 1 : a.getPosition(Integer.toString(liv));\n b.setSingleChoiceItems(R.array.items_lives, pos, new OnClickDismissListener() {\n @Override\n public void onClick(int which) {\n // First check for infinity choice, then for all other possible choices\n if (which == a.getCount() - 1)\n bmView.setLives(0);\n else\n try {\n bmView.setLives(Integer.parseInt(String.valueOf(a.getItem(which))));\n } catch (Exception e) {\n // Do nothing\n Log.e(LOG_TAG, e.getLocalizedMessage(), e);\n }\n }\n });\n break;\n\n case DIALOG_COLORS:\n b.setTitle(R.string.menu_colors);\n b.setItems(R.array.items_colors, new OnClickDismissListener() {\n @Override\n public void onClick(int which) {\n if (which == ColoredPart.values().length) {\n // Reset colors\n ColoredPart.resetAll();\n bmView.invalidate();\n } else {\n // Call color picker dialog\n doDialog(which + DIALOG_MASK_COLORS);\n }\n }\n });\n break;\n\n case DIALOG_BACKGROUND:\n b.setTitle(R.string.menu_background);\n b.setSingleChoiceItems(R.array.items_background, bmView.background, new OnClickDismissListener() {\n @Override\n public void onClick(int which) {\n bmView.background = which;\n bmView.invalidate();\n }\n });\n break;\n\n case DIALOG_SOUND:\n b.setTitle(R.string.menu_sound);\n // Special treatment for eventually using only a subset of the menu items\n String[] menuIts = new String[NUM_ITEMS_SOUND];\n boolean[] menuSts = new boolean[NUM_ITEMS_SOUND];\n System.arraycopy(\n getResources().getStringArray(R.array.items_settings),\n 0, menuIts, 0, NUM_ITEMS_SOUND);\n System.arraycopy(\n new boolean[]{bmView.isHapticFeedbackEnabled(), bmView.isSoundEffectsEnabled(), musicPlayer.isMusicEnabled},\n 0, menuSts, 0, NUM_ITEMS_SOUND);\n b.setMultiChoiceItems(menuIts, menuSts, (dialog, which, isChecked) -> {\n switch (which) {\n case 0:\n bmView.setHapticFeedbackEnabled(isChecked);\n break;\n\n case 1:\n bmView.setSoundEffectsEnabled(isChecked);\n setVolumeControlStream();\n break;\n\n case 2:\n musicPlayer.toggle(isChecked);\n setVolumeControlStream();\n break;\n\n default:\n dialog.dismiss();\n }\n });\n b.setPositiveButton(android.R.string.ok, new OnClickDismissListener());\n break;\n\n case DIALOG_CENTER:\n b.setTitle(R.string.menu_center);\n b.setSingleChoiceItems(R.array.items_center, centerDialogs ? 0 : 1, new OnClickDismissListener() {\n @Override\n public void onClick(int which) {\n centerDialogs = (which == 0);\n }\n });\n break;\n\n case DIALOG_MIDI:\n b.setTitle(R.string.title_midi);\n b.setMessage(R.string.text_midi);\n b.setOnKeyListener(new OnKeyDismissListener());\n b.setPositiveButton(android.R.string.ok, new OnClickDismissListener());\n break;\n\n case DIALOG_ABOUT:\n b.setTitle(R.string.menu_about);\n b.setMessage(R.string.text_about);\n b.setOnKeyListener(new OnKeyDismissListener());\n b.setPositiveButton(android.R.string.ok, new OnClickDismissListener());\n break;\n\n case DIALOG_HELP:\n default:\n b.setTitle(R.string.menu_help);\n b.setMessage(R.string.text_help);\n b.setOnKeyListener(new OnKeyDismissListener());\n b.setPositiveButton(android.R.string.ok, new OnClickDismissListener());\n break;\n }\n\n return b.create();\n }", "@Override\n\tprotected Dialog onCreateDialog(int id)\n\t{\n\t\tsuper.onCreateDialog(id);\n\t\treturn visitor.instantiateDialog(id);\n\t}", "private void initDialog() {\n dialog = new Dialog(context);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialog_custom_ok);\n }", "private void setViews() {\n lv.setAdapter(adapter);\n\n dialog2 = new MiddleDialog2(INSTANCE, getResources().getString(R.string.title), getResources().getString(R.string.value), new MiddleDialog2.onBottonListener() {\n @Override\n public void onOk() {\n\n finish();\n }\n },R.style.registDialog);\n }", "@Override\r\n \tprotected Dialog onCreateDialog(int id) {\n \t\tDialog dialog;\r\n \t\tswitch (id) {\r\n \t\t\tcase DIALOG_LOCATION_HISTORY:\r\n \t\t\t\t//logically, this cannot appear before the location layout is updated, so there is no \r\n \t\t\t\t//chance historyLayout can be null, except you are doing something wrong\r\n \t\t\t\tdialog = new Dialog(this);\r\n \t\t\t\tdialog.setTitle(\"Location History\");\r\n \t\t\t\tdialog.setContentView(detachedHistoryLayout);\r\n \t\t\t\treturn dialog;\r\n \t\t\t\t\r\n \t\t\tcase DIALOG_LOCATION:\r\n \t\t\t\tlocationLayout = (LinearLayout) getLayoutInflater().inflate\r\n \t\t\t\t\t\t\t(R.layout.manual_location_dialog, null);\r\n \t\t\t\tdetachedHistoryLayout = (LinearLayout) getLayoutInflater().inflate\r\n \t\t\t\t\t\t(R.layout.manual_location_history_dialog, null);\r\n \t\t\t\t\r\n \t\t\t\tfinal LinearLayout historyLayout = (LinearLayout) detachedHistoryLayout.findViewById(R.id.historyLayout); \r\n \t\t\t\t\r\n \t\t\t\tfinal TextView currentLocation = (TextView) locationLayout.findViewById(R.id.locationText);\r\n \t\t\t\tif (MyApplication.currentLocation != null)\r\n \t\t\t\t{\r\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\tcurrentLocation.setText(\"Your last updated location is \" + '\\n' + \r\n \t\t\t\t\t\t\t\tMyApplication.currentLocation.getString(\"name\") + \" within approx. \" \r\n \t\t\t\t\t\t\t\t+ MyApplication.currentLocation.getString(\"accuracy\"));\r\n \t\t\t\t\t} catch (JSONException e) {\r\n \t\t\t\t\t\te.printStackTrace();\r\n \t\t\t\t\t\tcurrentLocation.setText(\"Cannot get your current location.\");\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\t\r\n \t\t\t\tfinal RelativeLayout showHistoryLayout = (RelativeLayout) locationLayout.findViewById(R.id.showHistoryLayout);\r\n \t\t\t\tshowHistoryLayout.setOnClickListener(new OnClickListener() {\r\n \t\t\t\t\t@Override\r\n \t\t\t\t\tpublic void onClick(View v) {\r\n \t\t\t\t\t\tshowDialog(Page.DIALOG_LOCATION_HISTORY);\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\t\t\r\n \t\t\t\tnew LocationListTask(null,Page.this, false, true).execute(historyLayout,currentLocation);\r\n \t\t\t\t\r\n \t\t\t\tRelativeLayout autoLocLayout = (RelativeLayout) locationLayout.findViewById(R.id.autoLocLayout);\r\n \t\t\t\tautoLocLayout.setOnClickListener(new OnClickListener() {\r\n \t\t\t\t\t@Override\r\n \t\t\t\t\tpublic void onClick(View v) {\r\n \t\t\t\t\t\ttry {\r\n \t\t\t\t\t\t\tLocationTracker.autoLoc = true;\r\n \t\t\t\t\t\t\tnew LocationListTask(null,Page.this, false, true).execute(historyLayout,currentLocation);\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\tToast.makeText(Page.this, \"Your new location cannot be updated. Please try again later\", \r\n \t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n \t\t\t\t\t\t} \r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\t\t\r\n \t\t\t\tfinal EditText manualLocationField = (EditText) locationLayout.findViewById(R.id.manualLocationField);\r\n \t\t\t\tmanualLocationField.setOnKeyListener(new OnKeyListener() {\r\n \t\t\t\t\t@Override\r\n \t\t\t\t\tpublic boolean onKey(View v, int keyCode, KeyEvent event) {\r\n \t\t\t\t\t\tif (event.getAction() == KeyEvent.ACTION_DOWN)\r\n \t\t\t\t\t\t{\r\n \t\t\t\t\t\t\tswitch (keyCode) {\r\n \t\t\t\t\t\t\tcase KeyEvent.KEYCODE_ENTER:\r\n \t\t\t\t\t\t\tcase KeyEvent.KEYCODE_DPAD_CENTER:\r\n \t\t\t\t\t\t\t\tLocationTracker.autoLoc = false;\r\n \t\t\t\t\t\t\t\tnew LocationListTask(manualLocationField.getText().toString(), Page.this, \r\n \t\t\t\t\t\t\t\t\t\t\tfalse, true).execute(historyLayout,currentLocation);\r\n \t\t\t\t\t\t\t\treturn true;\r\n \t\t\t\t\t\t\tdefault:\r\n \t\t\t\t\t\t\t\tbreak;\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\treturn false;\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\t\t\r\n \t\t\t\tButton setLocation = (Button) locationLayout.findViewById(R.id.setLocationButton);\r\n \t\t\t\tsetLocation.setOnClickListener(new OnClickListener() {\r\n \t\t\t\t\t@Override\r\n \t\t\t\t\tpublic void onClick(View v) {\r\n \t\t\t\t\t\tLocationTracker.autoLoc = false;\r\n \t\t\t\t\t\ttry {\r\n \t\t\t\t\t\t\tnew LocationListTask(manualLocationField.getText().toString(), Page.this, \r\n \t\t\t\t\t\t\t\t\tfalse, true).execute(historyLayout,currentLocation);\r\n \t\t\t\t\t\t} catch (Exception e) {\r\n \t\t\t\t\t\t\tToast.makeText(Page.this, \"Your new location cannot be updated. Please try \" +\r\n \t\t\t\t\t\t\t\t\t\"again later\", Toast.LENGTH_SHORT).show();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\t\t\r\n \t\t\t\tdialog = new LocationDialog(this);\r\n \t\t\t\tdialog.setTitle(\"Update your location\");\r\n \t\t\t\tdialog.setContentView(locationLayout);\r\n \t\t\t\treturn dialog;\r\n \t\t\tdefault:\r\n \t\t\t\tbreak;\r\n \t\t}\r\n \t\treturn super.onCreateDialog(id);\r\n \t}", "private void initViews() {\n\t\t\r\n\t\tTypeface face = Typeface.createFromAsset(getAssets(), \"Teko_Light.ttf\");\r\n\r\n\t\tet_pin = (EditText) findViewById(R.id.et_pin);\r\n\t\tet_pin.setTypeface(face);\r\n\t\tbtn_admin_login = (Button) findViewById(R.id.btn_admin_login);\r\n\t\tbtn_admin_login.setTypeface(face);\r\n\r\n\t\td = new DialogView();\r\n\t}", "@Override\n protected Dialog onCreateDialog(int id) {\n Dialog dialog = null;\n switch (id) {\n case CHOOSE_METHOD_DIALOG:\n return chooseActionContextMenu.createMenu(this.getString(R.string.choose_action_title));\n case ABOUT_DIALOG:\n dialog = createAboutDialog();\n break;\n default:\n dialog = null;\n break;\n }\n return dialog;\n }", "public void popUpDialogBox(View passedView, int code) {\n mBuilder = new AlertDialog.Builder(TrailActivity.this);\n if(code == 0) {\n Date editedTrailDt = null;\n editedView = passedView;\n editedTrailName = (EditText) editedView.findViewById(R.id.TrailNametxt);\n editedTrailModule = (EditText) editedView.findViewById(R.id.Moduletxt);\n editedTrailCode = (EditText) editedView.findViewById(R.id.TrailCodetxt);\n editedTrailDate = (EditText) editedView.findViewById(R.id.datetxt);\n try { editedTrailDt = new SimpleDateFormat(\"dd-MM-yyyy\", Locale.ENGLISH).parse(editedTrailDate.getText().toString().trim()); }\n catch (ParseException e) { e.printStackTrace(); }\n editedTrailId = geTrailId(editedTrailCode.getText().toString(), editedTrailDt);\n }\n else editedView = null;\n initDialogBoxViews(passedView);\n setDateClickListener();\n setTrailDateClickListener();\n setAddtrailBtnClickListener();\n mBuilder.setView(passedView);\n dialog = mBuilder.create();\n dialog.show();\n }", "public Dialog onCreateDialog(Bundle savedInstanceState){\n AlertDialog.Builder sample_builder = new AlertDialog.Builder(getActivity());\n sample_builder.setView(\"activity_main\");\n sample_builder.setMessage(\"This is a sample prompt. No new networks should be scanned while this prompt is up\");\n sample_builder.setCancelable(true);\n sample_builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogPositiveClick(StationFragment.this);\n }\n });\n sample_builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogNegativeClick(StationFragment.this);\n }\n });\n return sample_builder.create();\n\n }", "public Dialog<String> createDialog() {\n\t\t// Creating a dialog\n\t\tDialog<String> dialog = new Dialog<String>();\n\n\t\tButtonType type = new ButtonType(\"Ok\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().add(type);\n\t\treturn dialog;\n\t}", "private void openDialog() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.allmark));\n\t\tfinal List<ReaderTags> listData = ReaderDataBase\n\t\t\t\t.getReaderDataBase(this);\n\t\tif (listData.size() > 0) {\n\t\t\tListView list = new ListView(this);\n\t\t\tfinal MTagAdapter myAdapter = new MTagAdapter(this, listData);\n\t\t\tlist.setAdapter(myAdapter);\n\t\t\tlist.setOnItemClickListener(new OnItemClickListener() {\n\t\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\tJump(arg2, listData, myAdapter);\n\t\t\t\t}\n\t\t\t});\n\t\t\tlist.setOnItemLongClickListener(new OnItemLongClickListener() {\n\n\t\t\t\tpublic boolean onItemLongClick(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\tdeleteOneDialog(arg2, listData, myAdapter);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tbuilder.setView(list);\n\t\t} else {\n\t\t\tTextView txt = new TextView(this);\n\t\t\ttxt.setText(getString(R.string.nomark));\n\t\t\ttxt.setPadding(10, 5, 0, 5);\n\t\t\ttxt.setTextSize(16f);\n\t\t\tbuilder.setView(txt);\n\t\t}\n\t\tbuilder.setNegativeButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}", "private void initPopupViewControls(){\n // Get layout inflater object.\n LayoutInflater layoutInflater = LayoutInflater.from(getActivity());\n\n // Inflate the popup dialog from a layout xml file.\n popupInputDialogView = layoutInflater.inflate(R.layout.custom_popup_add_new_communication_record, null);\n\n // Get user input edittext and button ui controls in the popup dialog.\n _interactionTypeSpinner = popupInputDialogView.findViewById(R.id.inteructionTypeSpinner);\n _details = popupInputDialogView.findViewById(R.id.details);\n _specialNote = popupInputDialogView.findViewById(R.id.specialNote);\n _nextActionTypeSpinner = popupInputDialogView.findViewById(R.id.nextActionTypeSpinner);\n _nextActionDate = popupInputDialogView.findViewById(R.id.nextActionDate);\n _nextMeetingLocation = popupInputDialogView.findViewById(R.id.nextMeetingLocation);\n\n _saveFamilyMember = popupInputDialogView.findViewById(R.id.button_save_user_data);\n _cancelInput = popupInputDialogView.findViewById(R.id.button_cancel_user_data);\n\n\n }", "private void createDialog() {\r\n final AlertDialog dialog = new AlertDialog.Builder(getActivity()).setView(R.layout.dialog_recorder_details)\r\n .setTitle(\"Recorder Info\").setPositiveButton(\"Start\", (dialog1, which) -> {\r\n EditText width = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_width);\r\n EditText height = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_height);\r\n CheckBox audio = (CheckBox) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_audio_checkbox);\r\n EditText fileName = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_filename_name);\r\n mServiceHandle.start(new RecordingInfo(Integer.parseInt(width.getText().toString()), Integer.parseInt(height.getText().toString()),\r\n audio.isChecked(), fileName.getText().toString()));\r\n dialog1.dismiss();\r\n }).setNegativeButton(\"Cancel\", (dialog1, which) -> {\r\n dialog1.dismiss();\r\n }).show();\r\n Point size = new Point();\r\n getActivity().getWindowManager().getDefaultDisplay().getRealSize(size);\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_width)).setText(Integer.toString(size.x));\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_height)).setText(Integer.toString(size.y));\r\n }", "private void openCreateAccountDialog()\n {\n testDialog();\n\n }", "private void showCustomDialog(VisitorModel visitor) {\n ViewGroup viewGroup = ((MainActivity)context).findViewById(android.R.id.content);\n\n //then we will inflate the custom alert dialog xml that we created\n View dialogView = LayoutInflater.from(context).inflate(R.layout.my_dialog, viewGroup, false);\n\n TextView btnUnfollow = dialogView.findViewById(R.id.btn_unfollow);\n TextView btnCancel = dialogView.findViewById(R.id.btn_cancel);\n TextView txtUsername = dialogView.findViewById(R.id.txt_username);\n TextView txtAvatar = dialogView.findViewById(R.id.txt_avatar);\n CircleImageView imgAvatar = dialogView.findViewById(R.id.img_avatar);\n\n txtAvatar.setText(GlobalFunc.getFirstLetter(visitor.username));\n txtUsername.setText(visitor.username);\n\n //Now we need an AlertDialog.Builder object\n AlertDialog.Builder builder = new AlertDialog.Builder(context, R.style.myDialogForUnVisit);\n //setting the view of the builder to our custom view that we already inflated\n builder.setView(dialogView);\n\n //finally creating the alert dialog and displaying it\n AlertDialog alertDialog = builder.create();\n alertDialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);\n alertDialog.show();\n\n btnUnfollow.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n unVisit(visitor);\n alertDialog.hide();\n }\n });\n\n btnCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.hide();\n }\n });\n }", "private void dialog() {\n\t\tGenericDialog gd = new GenericDialog(\"Bildart\");\n\t\t\n\t\tgd.addChoice(\"Bildtyp\", choices, choices[0]);\n\t\t\n\t\t\n\t\tgd.showDialog();\t// generiere Eingabefenster\n\t\t\n\t\tchoice = gd.getNextChoice(); // Auswahl uebernehmen\n\t\t\n\t\tif (gd.wasCanceled())\n\t\t\tSystem.exit(0);\n\t}", "@Override\n\tprotected Dialog onCreateDialog(int id) {\n\t\treturn buildDialog(MainActivity.this);\n\t\t\n\t}", "public AlertDialog createSimpleDialog(String mensaje, String titulo, final String typ) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n View v = inflater.inflate(R.layout.dialog_monitoring_info, null);\n builder.setView(v);\n\n TextView tvTitle = (TextView) v.findViewById(R.id.tv_title_dialog);\n TextView tvDescription = (TextView) v.findViewById(R.id.tv_description_dialog);\n\n tvTitle.setText(titulo);\n tvTitle.setCompoundDrawables(ContextCompat.getDrawable(v.getContext(), R.drawable.ic_question), null, null, null);\n tvDescription.setText(mensaje);\n\n builder.setPositiveButton(getResources().getString(R.string.info_dialog_option_accept),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (typ.equals(\"REGIST\")){\n MonitoringRegistrationFormFragment fragment = new MonitoringRegistrationFormFragment();\n Bundle params = new Bundle();\n params.putString(\"AREA\", area);\n params.putString(\"OPCION\", \"N\");\n fragment.setArguments(params);\n\n getActivity().getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);\n\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.monitoring_principal_context, fragment)\n .commit();\n }\n else {\n AdminUserFormFragment fragment = new AdminUserFormFragment();\n getActivity().getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.transaction_principal_context, fragment)\n .commit();\n }\n }\n },300);\n }\n })\n .setNegativeButton(getResources().getString(R.string.info_dialog_option_cancel),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n builder.create().dismiss();\n if (typ.equals(\"REGIST\")){\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent intent = new Intent(getActivity(), MonitorMenuActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n startActivity(intent);\n getActivity().finish();\n }\n },300);\n }\n else {\n getActivity().finish();\n }\n }\n });\n\n return builder.create();\n }", "public void howtouse(View view) {\n showdialog();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n return mDialog;\n }", "public void addRelationshipDialog() { new RelationshipDialog(); }", "@Override // com.oculus.panelapp.assistant.dialogs.AssistantDialog\n public View onCreateView(Context context) {\n return LayoutInflater.from(context).inflate(R.layout.system_dialog, (ViewGroup) null, false);\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n //return super.onCreateDialog(savedInstanceState); // TODO: should we call it?\n final String title = getArguments().getString(\"TITLE\");\n final String msg = getArguments().getString(\"MESSAGE\");\n final String pos = getArguments().getString(\"POS\");\n final String neg = getArguments().getString(\"NEG\");\n final String neu = getArguments().getString(\"NEU\");\n // TODO - this is just an int... what about other ... Parcelable\n final int idx = getArguments().getInt(\"IDX\");\n final int iconid = getArguments().getInt(\"ICON_ID\");\n final float textsize = getArguments().getFloat(\"MSGSIZE\");\n\n if (savedInstanceState != null) {\n tag = savedInstanceState.getString(\"TAG\");\n }\n\n final DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialogInterface, int clickedButton) {\n ConfirmListener act = (ConfirmListener) getActivity();\n act.processConfirmation(clickedButton, tag, idx);\n }\n };\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setTitle(title)\n .setMessage(msg);\n if (iconid != 0 && getResources().getResourceTypeName(iconid).equals(\"drawable\")) {\n // this must be a R.drawable.id, otherwise crash!\n // android.content.res.Resources$NotFoundException:\n builder.setIcon(iconid);\n }\n if (pos != null) {\n builder.setPositiveButton(pos, listener);\n }\n if (neg != null) {\n builder.setNegativeButton(neg, listener);\n }\n if (neu != null) {\n builder.setNeutralButton(neu, listener);\n }\n\n dialog = builder.create();\n if (textsize != 0) {\n dialog.show(); // need to call this to be able to get the TextView as non-null pointer\n TextView tv = (TextView) dialog.findViewById(android.R.id.message);\n if (tv != null) {\n tv.setTextSize(textsize);\n }\n }\n return dialog;\n }", "public void crearDialogo() {\r\n final PantallaCompletaDialog a2 = PantallaCompletaDialog.a(getString(R.string.hubo_error), getString(R.string.no_hay_internet), getString(R.string.cerrar).toUpperCase(), R.drawable.ic_error);\r\n a2.f4589b = new a() {\r\n public void onClick(View view) {\r\n a2.dismiss();\r\n }\r\n };\r\n a2.show(getParentFragmentManager(), \"TAG\");\r\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setTitle(\"Add Participant...\");\n builder.setMessage(\"Participant address:\");\n\n final EditText input = new EditText(getActivity());\n LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT,\n LinearLayout.LayoutParams.MATCH_PARENT);\n input.setLayoutParams(lp);\n builder.setView(input); // uncomment this line\n\n\n builder.setPositiveButton(\"Add\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n mListener.onAddUserDialogAdd(input.getText().toString());\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n mListener.onAddUserDialogCancel();\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public static void getDataWithDialogs(ChampionSelectGUI t) {\n\t\tJDialog sND = createSummonerNameDialog(t);\n\t\tsND.setVisible(true);\n\t\tJDialog rD = createRegionDialog(t);\n\t\trD.setVisible(true);\n\t\tJDialog roleD = createRoleDialog(t);\n\t\troleD.setVisible(true);\n\t\tJDialog teamD = createTeamDialog(t);\n\t\tteamD.setVisible(true);\n\t}", "void generar_dialog_preguntas();", "private Dialogs () {\r\n\t}", "public interface DialogFactory {\n MessageDialog createMessageDialog();\n ListDialog createListDialog();\n SingleChoiceDialog createSingleChoiceDialog();\n MultiChoiceDialog createMultiChoiceDialog();\n}", "@Override\n\t\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\t\treturn mDialog;\n\t\t}", "@Override\n public Dialog onCreateDialog(Bundle state) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n // Set the title\n builder.setTitle(R.string.new_location_title);\n\n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n // Pass null as the parent view because its going in the dialog layout\n view = inflater.inflate(R.layout.fire_report, null);\n builder.setView(view);\n\n populate();\n\n // Add a cancel button\n builder.setNegativeButton(R.string.close, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n Boolean checked = ((CheckBox) view.findViewById(R.id.checkExtinguished)).isChecked();\n if (fire.isExtinguished() != checked) {\n fire.setExtinguished(checked);\n if (!new Cloud(view.getContext()).updateExtinguishedToCloud(fire)) {\n fire.setExtinguished(!checked);\n view.post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(view.getContext(), R.string.extinguished_failed, Toast.LENGTH_SHORT).show();\n }\n });\n }\n }\n }\n }).start();\n }\n });\n\n dlg = builder.create();\n\n return dlg;\n }", "@Override\r\n public Dialog onCreateDialog(Bundle savedInstanceState) {\r\n //use the builder class for convenient dialog construction\r\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n //get the layout inflater\r\n LayoutInflater inflater = getActivity().getLayoutInflater();\r\n View rootView = inflater.inflate(R.layout.dialog_room, null);\r\n mRoomNumber = rootView.findViewById(R.id.roomNumberEditText);\r\n mAllergy = rootView.findViewById(R.id.allergyEditText);\r\n mPlateType = rootView.findViewById(R.id.plateTypeEditText);\r\n mChemicalDiet = rootView.findViewById(R.id.chemicalDietEditText);\r\n mTextureDiet = rootView.findViewById(R.id.textureDietEditText);\r\n mLiquidDiet = rootView.findViewById(R.id.liquidDietEditText);\r\n mLikes = rootView.findViewById(R.id.likesEditText);\r\n mDislikes = rootView.findViewById(R.id.dislikesEditText);\r\n mNotes = rootView.findViewById(R.id.notesEditText);\r\n mMeal = rootView.findViewById(R.id.mealEditText);\r\n mDessert = rootView.findViewById(R.id.dessertEditText);\r\n mBeverage = rootView.findViewById(R.id.beverageEditText);\r\n\r\n mBeverage.setOnEditorActionListener(new TextView.OnEditorActionListener() {\r\n @Override\r\n public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {\r\n if (i == EditorInfo.IME_ACTION_DONE || keyEvent.getAction() == KeyEvent.ACTION_DOWN){\r\n addRoom();\r\n }\r\n return true;\r\n }\r\n });\r\n\r\n //inflate and set the layout for the dialog\r\n //pass null as the parent view cause its going in the dialog layout.\r\n builder.setView(rootView).setPositiveButton(R.string.button_done, new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n addRoom();\r\n }\r\n });\r\n\r\n return builder.create();\r\n }", "public void openDialogCreateVisual(){\n DataHeader[] tabHeader = dataset.getListDataHeaderDouble(true);\n TypeVisualization[] tabVis = getListTypeVisualization(tabHeader.length);\n DataHeader[] tabHeaderLabel = dataset.getListDataHeaderDouble(false);\n CreateDataVisualDialog dialog = new CreateDataVisualDialog(this, tabVis, tabHeader, tabHeaderLabel);\n dialog.setVisible(true);\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Done entering class?\")\n .setPositiveButton(\"yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n })\n .setNegativeButton(\"no\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent tmp = new Intent(getContext(), course_info.class);\n startActivity(tmp);\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public void showNewTaskDialog() {\n LayoutInflater inflater = getActivity().getLayoutInflater();\n final View v = inflater.inflate(R.layout.dialog_newtask, null);\n\n newTaskDialog = new AlertDialog.Builder(getActivity()).setView(v).create();\n //set view and text type\n TextView title = (TextView) v.findViewById(R.id.newTaskPageTitle);\n Typeface RalewayBold = Typeface.createFromAsset(getActivity().getAssets(), \"Raleway-Bold.ttf\");\n title.setTypeface(RalewayBold);\n\n //sets buttons\n Button done = (Button) v.findViewById(R.id.doneAddingTask);\n Button cancel = (Button) v.findViewById(R.id.CancelAddingTask);\n Button addUser = (Button) v.findViewById(R.id.newTaskAddUserButton);\n\n //get each field\n newTaskValidAssigneeIndicator = (ImageView) v.findViewById(R.id.newTaskValidAssigneeIndicator);\n newTaskAssigneeField = (TextInputEditText) v.findViewById(R.id.newTaskNewUserField);\n newtaskDateField = (TextInputEditText) v.findViewById(R.id.newTaskDueDateField);\n newTaskNameField = (TextInputEditText) v.findViewById(R.id.newTaskNameField);\n newTaskDescriptionField = (TextInputEditText) v.findViewById(R.id.newTaskDescriptionField);\n\n //create listeners\n newTaskAssigneeField.setOnEditorActionListener(this);\n newtaskDateField.setOnEditorActionListener(this);\n newTaskNameField.setOnEditorActionListener(this);\n newTaskDescriptionField.setOnEditorActionListener(this);\n\n //set button functions\n addUser.setOnClickListener(this);\n done.setOnClickListener(this);\n cancel.setOnClickListener(this);\n newtaskDateField.addTextChangedListener(this);\n newTaskDialog.show();\n }", "public void showDialog() {\n mDialogInfoWithTwoButtons = new DialogInfoWithTwoButtons(mContext,\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n saveTemplate(mToastEdited);\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n }\n }, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mTemplateId = mDatabaseManager.getTemplateNewId();\n mPreferenceManager.setTemplateId(mTemplateId);\n saveTemplate(mToastCreated);\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n }\n }, mTitle, mMessage, mTitleButtonOne, mTitleButtonTwo);\n mDialogInfoWithTwoButtons.getDialog().show();\n }", "private AlertDialog cargando() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n LayoutInflater inflater = getLayoutInflater();\n\n @SuppressLint(\"InflateParams\") View v = inflater.inflate(R.layout.loading, null);\n\n\n builder.setView(v);\n builder.setCancelable(false);\n\n return builder.create();\n\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflator = getActivity().getLayoutInflater();\n View view = inflator.inflate(R.layout.informationdialog, datePicker);\n builder.setView(view);\n init(view);\n Dialog dialog = builder.create();\n\n //Dialog will not close automatically until user click on cancle button.\n setCancelable(false);\n return dialog;\n }", "public InfoDialog() {\r\n\t\tcreateContents();\r\n\t}", "private void createForumDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(Objects.requireNonNull(this),\n R.style.AlertDialogTheme);\n dialog.setTitle(R.string.add_new_forum_title);\n dialog.setMessage(R.string.add_new_forum_description);\n\n View newForumDialog = getLayoutInflater().inflate(R.layout.new_forum_dialog, null);\n dialog.setView(newForumDialog);\n\n AlertDialog alertDialog = dialog.create();\n setAddForumButtonListener(alertDialog, newForumDialog);\n\n alertDialog.show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"CREA USUARIO\")\n .setView(inflater.inflate(R.layout.register_dialog, null))\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n editUser = ((AlertDialog) dialog).findViewById(R.id.username);\n editPass = ((AlertDialog) dialog).findViewById(R.id.password);\n startConexion();\n }\n })\n .setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n protected void onPrepareDialog(int id, Dialog dialog) {\n \tToast.makeText(this, dialog.toString(), Toast.LENGTH_SHORT).show();\n }", "public StandardDialog() {\n super();\n init();\n }", "public void diler(View view) {\n//dialogi stexcman mek ayl dzev en kirarel\n dialog_diler.show();\n }", "@Override\r\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\r\n\t\tAlertDialog.Builder builder = new Builder(this.getActivity());\r\n\t\tView view = LayoutInflater.from(getActivity()).inflate(\r\n\t\t\t\tR.layout.load_dialog, null);\r\n\r\n\t\tbuilder.setView(view);\r\n\t\tbuilder.setCancelable(false);\r\n\t\tdialog=builder.create();\r\n\t\treturn dialog;\r\n\t}", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n //set new View to the builder and create the Dialog\n Dialog dialog = builder.setView(new View(getActivity())).create();\n\n //get WindowManager.LayoutParams, copy attributes from Dialog to LayoutParams and override them with MATCH_PARENT\n WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();\n layoutParams.copyFrom(dialog.getWindow().getAttributes());\n layoutParams.width = WindowManager.LayoutParams.WRAP_CONTENT;\n layoutParams.height = WindowManager.LayoutParams.WRAP_CONTENT;\n //show the Dialog before setting new LayoutParams to the Dialog\n dialog.show();\n dialog.getWindow().setAttributes(layoutParams);\n\n return dialog;\n }", "private void showDialogPolygon1() {\n LayoutInflater inflater = getLayoutInflater();\n CardView cardView = (CardView) getLayoutInflater().inflate(R.layout.dialog_root,null);\n LinearLayout root = (LinearLayout) cardView.findViewById(R.id.linearLayout_root);\n //inflate each row that should be contained in the dialog box\n View rowAmount = inflater.inflate(R.layout.row_amount,null);\n View rowTelephone = inflater.inflate(R.layout.row_telephone,null);\n View rowText = inflater.inflate(R.layout.row_text,null);\n View rowButtons = inflater.inflate(R.layout.row_buttons,null);\n //add each row to the root\n root.addView(rowAmount);\n root.addView(rowTelephone);\n root.addView(rowText);\n root.addView(rowButtons);\n\n customDialog = new Dialog(getActivity());\n customDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // before\n customDialog.setContentView(cardView);\n customDialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n customDialog.setCancelable(true);\n\n\n final EditText editTextAmount = customDialog.findViewById(R.id.edit_text_amount);\n final EditText editTextNumber = customDialog.findViewById(R.id.edit_text_mobileNumber);\n ImageButton imageButton = customDialog.findViewById(R.id.selec_contact_ImageBtn);\n imageButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n contactPicker();\n }\n });\n\n\n ((Button) customDialog.findViewById(R.id.bt_okay)).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent hoverIntent = new HoverParameters.Builder(getActivity())\n .request(\"e0d94aec\")\n .style(R.style.BaseTheme)\n .extra(\"MobileNumber\", editTextNumber.getText().toString())\n .extra(\"Amount\", editTextAmount.getText().toString())\n .buildIntent();\n startActivityForResult(hoverIntent, 0);\n }\n\n });\n\n ((Button) customDialog.findViewById(R.id.bt_cancel)).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n customDialog.dismiss();\n }\n });\n\n\n customDialog.show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View rootView = inflater.inflate(R.layout.filter_dialog, null);\n\n\n\n /* Inflate and set the layout for the dialog */\n /* Pass null as the parent view because its going in the dialog layout*/\n builder.setView(rootView)\n /* Add action buttons */\n .setPositiveButton(R.string.filter, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n addShoppingList();\n }\n });\n\n return builder.create();\n }", "public void show_dialog(final View view){\n final String tag = String.valueOf(view.getTag());\n LayoutInflater inflater = getLayoutInflater();\n final View layout = inflater.inflate(R.layout.food_information_layout,(ViewGroup) findViewById(R.id.foodInformation));\n\n final AlertDialog alertDialog=new AlertDialog.Builder(AddItemActivity.this)\n .setTitle(\"Food Information\").setView(layout).setPositiveButton(\"Confirm\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n add_item_to_grid(view);\n TextView textView2=(TextView)layout.findViewById(R.id.DaysLeft);\n String quality_period=textView2.getText().toString();\n qualityPeriodToDB(tag,quality_period);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n }).show();\n TextView textView=(TextView)alertDialog.findViewById(R.id.foodName);\n textView.setText(tag);\n\n TextView textView2=(TextView)alertDialog.findViewById(R.id.DaysLeft);\n String quality_period= qualityPeriodFromDB(tag);\n textView2.setText(quality_period);\n\n TextView textView3=(TextView)layout.findViewById(R.id.bestBefore);\n try {\n String bestBefore=calculateDate(quality_period);\n textView3.setText(bestBefore);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "public void openDialog(){\n DialogforTheboysHeroImage dialogforTheboysHeroImage = new DialogforTheboysHeroImage();\n dialogforTheboysHeroImage.show(getSupportFragmentManager(), \"Heros info\");\n }", "@Override\r\n\t protected Dialog onCreateDialog(int id) {\n\t \r\n\t screenDialog = null;\r\n\t switch(id){\r\n\t case(ID_SCREENDIALOG):\r\n\t screenDialog = new Dialog(this);\r\n\t screenDialog.setContentView(R.layout.message);\r\n\t messageText=(EditText)screenDialog.findViewById(R.id.messagetext1);\r\n\t send=(Button)screenDialog.findViewById(R.id.button1);\r\n\t send.setOnClickListener(sendmessage);\r\n\t cancel=(Button)screenDialog.findViewById(R.id.button2);\r\n\t cancel.setOnClickListener(cancelmessage);\r\n\t }\r\n\t return screenDialog;\r\n\t }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_my_dialog, container, false);\n recyclerView = (RecyclerView) view.findViewById(R.id.dialogrecycle);\n recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n\n getDialog().setTitle(\"Search Results: Select One\");\n return view;\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.generic_test_layout);\r\n\t\t//--Creating Dialog.\r\n\t\tString [] Botones={\"OK\",\"CANCEL\"};\r\n\t\tString [] Items={\"opcion1\",\"opcion2\",\"opcion3\"};\r\n\t\tCreateDialog(TypeDialog.ALERT, R.drawable.icon, \"TestingDialog\", Botones, Items, null);\r\n\t\tCreateDialog(TypeDialog.PROGRESS, R.drawable.icon, \"TestingDialog\", Botones, Items, 100);\r\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View view = inflater.inflate(R.layout.complete_workout_dialog,null);\n builder.setView(view);\n completeScore = view.findViewById(R.id.score_edit_text);\n completeTime = view.findViewById(R.id.time_edit_text);\n\n // Inflate and set the layout for the dialog\n // Pass null as the parent view because its going in the dialog layout\n // Add action buttons\n builder.setMessage(\"\")\n .setPositiveButton(\"Ok \", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n completeWorkoutListener.onCompletedWorkoutSelected(completeScore.getText().toString(), completeTime.getText().toString());\n }\n })\n .setNegativeButton(\" Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Do you want to play a game with \"+getArguments().getString(\"name\")+\"?\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n acceptGame(getContext());\n }\n })\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n declineGame(getContext());\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public void working() {\n\t\t Dialog d = new Dialog(this);\r\n\t\t d.setTitle(\"hech yea!\");\r\n\t\t TextView tv = new TextView(this);\r\n\t\t tv.setText(\"Success\");\r\n\t\t d.setContentView(tv);\r\n\t\t d.show();\t\r\n\t}", "public void SHOW_CUSTOM_DIALOG_HESO(View v) {\n\t\tdialog_heso = new Dialog_HESO(TAB_THONGTIN_HOSO.this);\n\t\tdialog_heso.show();\n\t\tWindowManager.LayoutParams lp = new WindowManager.LayoutParams();\n\t\tlp.copyFrom(dialog_heso.getWindow().getAttributes());\n\t\tlp.width = Tht_Screen.get_screen_width_percent(TAB_THONGTIN_HOSO.this, 90);\n\t\tlp.height = Tht_Screen.get_screen_heigth_percent(TAB_THONGTIN_HOSO.this, 90);\n\t\tdialog_heso.getWindow().setAttributes(lp);\n\t\tARR_MAU_HESO = mdb.get_ARR_HESO(Variables.DNV.MaDV);\n\t\tmAdapter_HESO = new Lst_HESO(ARR_MAU_HESO, TAB_THONGTIN_HOSO.this);\n\t\tDialog_HESO.lv_HESO.setAdapter(mAdapter_HESO);\n\t\tDialog_HESO.tv_PT_TT.setText(getString(R.string.PT_TT)+String.valueOf(Variables.HSCT_CHON.PT_TT));\n\t\tDialog_HESO.tv_PT_C.setText(getString(R.string.PT_C)+String.valueOf(Variables.HSCT_CHON.PT_C));\n\t\tDialog_HESO.tv_PT_TL.setText(getString(R.string.PT_TL)+String.valueOf(Variables.HSCT_CHON.PT_TL));\n\t\tDialog_HESO.tv_PT_K.setText(getString(R.string.PT_K)+String.valueOf(Variables.HSCT_CHON.PT_K));\n\t\tDialog_HESO.tv_PT_VAT.setText(getString(R.string.PT_VAT)+String.valueOf(Variables.HSCT_CHON.PT_VAT));\n\t\tDialog_HESO.tv_PT_NC.setText(getString(R.string.PT_NC)+String.valueOf(Variables.HSCT_CHON.PT_NC)+\" %\");\n\t\tDialog_HESO.tv_PT_C1.setText(getString(R.string.PT_C1)+String.valueOf(Variables.HSCT_CHON.PT_C1));\n\t\tDialog_HESO.tv_PT_NC1.setText(getString(R.string.PT_NC1)+String.valueOf(Variables.HSCT_CHON.PT_NC1)+\" %\");\n\t\t\n\n\t}", "@Override\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\t\n\t\t// get data from arguments\n\t\tBundle bundle = getArguments();\n\t\tString[] ids = bundle.getStringArray(\"ids\");\n\t\tString[] names = bundle.getStringArray(\"names\");\n\t\tboolean dismiss = bundle.getBoolean(\"dismiss\");\n\t\t\n\t\tif(ids.length!=names.length) return null;\n\t\t\n\t\tPopUpRow[] rows = new PopUpRow[ids.length];\n\t\tfor(int i=0; i<ids.length; i++) {\n\t\t\trows[i] = new PopUpRow(ids[i], names[i]);\n\t\t}\n\t\t\n\t\tPopUpAdapter adapter = new PopUpAdapter(this.getActivity(), R.layout.fragment_dialog, rows);\n\t\t\n\t\t// format and build and return the dialog\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder( getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_DARK);\n\t\tbuilder.setTitle(\"PROXIMITY UPDATE\");\n\t\tbuilder.setNeutralButton(\"DISMISS\",\n\t\t\t\t(new DialogInterface.OnClickListener() {\n\t\t\t\t\t\n\t\t\t\t\tprivate boolean closeActivity;\n\t\t\t\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\tbuttonSelected(closeActivity);\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic boolean getCloseActivity() {\n\t\t\t\t\t\treturn closeActivity;\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic DialogInterface.OnClickListener setCloseActivity(boolean closeActivity) {\n\t\t\t\t\t\tthis.closeActivity = closeActivity;\n\t\t\t\t\t\treturn this;\n\t\t\t\t\t}\n\t\t\t\t}).setCloseActivity(dismiss));\n\t\t\n\t\tbuilder.setAdapter(adapter, new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tLog.d(TAG, dialog.toString()+\" ::: \"+which); // TODO make useful\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tdialog = builder.create();\n\t\treturn dialog;\n\t}", "@Override\r\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n\r\n\t\t// Set up the layout inflater\r\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\r\n\r\n\t\t// Set the title, message and layout of the dialog box\r\n\t\tbuilder.setView(inflater.inflate(R.layout.dialog_box_layout, null))\r\n\t\t\t\t.setTitle(R.string.dialog_title);\r\n\r\n\t\t// User accepts the thing in the dialog box\r\n\t\tbuilder.setPositiveButton(R.string.dialog_accpet,\r\n\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n\t\t\t\t\t\tToast.makeText(getActivity(),\r\n\t\t\t\t\t\t\t\t\"Thank you for your kiss ^.^\",\r\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t// User cancels the thing in the dialog box\r\n\t\tbuilder.setNegativeButton(R.string.dialog_cancel,\r\n\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n\t\t\t\t\t\tToast.makeText(getActivity(), \"Refuse my kiss??? >.<\",\r\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\treturn builder.create(); // return the AlertDialog object\r\n\t}", "@Override\r\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n \r\n LayoutInflater inflater = getActivity().getLayoutInflater();\r\n builder.setTitle(\"New Wallet\");\r\n \r\n\t final View view = inflater.inflate(R.layout.new_wallet_dialog, null);\r\n\t \r\n\t final EditText name = (EditText) view.findViewById(R.id.newWallet_text);\r\n\t \r\n builder.setPositiveButton(R.string.confirmRecord, new DialogInterface.OnClickListener() {\r\n \r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.comfirmPressed(name.getText().toString());\t\r\n \t\t}\r\n });\r\n builder.setNegativeButton(R.string.cancelRecord, new DialogInterface.OnClickListener() {\r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.cancelPressed();\r\n \t\t}\r\n \t});\r\n // Create the AlertDialog object and return it\r\n return builder.create();\r\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.dialog_fire_missiles)\n .setPositiveButton(R.string.fire, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n return builder.create();\n }", "public Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\r\n\t\tView dialogView = inflater.inflate(R.layout.posted, null);\r\n\r\n\t\tbuilder.setTitle(\"Posted Message to:\");\r\n\t\tbuilder.setView(dialogView);\r\n\t\tfinal AlertDialog dialog = builder.show();\r\n\t\t//dialog.getWindow().setLayout(520, 525);\r\n\t\t\r\n\t\tTextView message = (TextView) dialog.findViewById(R.id.sites_posted);\r\n\t\tmessage.setText(sites);\r\n\r\n\t\tButton done = (Button) dialog.findViewById(R.id.done);\r\n\t\tdone.setOnClickListener(new OnClickListener(){\r\n\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO open social media options\r\n\t\t\t\tdialog.cancel();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\treturn dialog;\r\n\t}", "@Override\n\tprotected Dialog onCreateDialog(int id)\n\t{\n\t\tif(id == DLG_ABOUT)\n\t\t{\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setMessage(R.string.app_about);\n\t\t\tbuilder.setPositiveButton(\"返回\", new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface p1, int p2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Implement this method\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t);\n\t\treturn builder.create();\n\t\t}\n\t\t\n\t\tif(id == DLG_HELP)\n\t\t{\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setMessage(R.string.app_help);\n\t\t\tbuilder.setPositiveButton(\"返回\", new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface p1, int p2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Implement this method\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t);\n\t\t\treturn builder.create();\n\t\t}\n\t\t\n\t\tif(id == DLG_UNPACKER)\n\t\t{\n\t\t\tView view = ViewTool.getView(this,R.layout.dlg_unpack);\n\t\t\tfinal EditText edit_png = (EditText) view.findViewById(R.id.edit_pngpath);\n\t\t\tfinal EditText edit_undir = (EditText) view.findViewById(R.id.edit_undir);\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\t\n\t\t\tbuilder.setView(view);\n\t\t\tbuilder.setPositiveButton(\"确定\", new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface p1, int p2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Implement this method\n UnPacker unpacker = new UnPacker();\n\t\t String path_png = edit_png.getText().toString();\n\t\t String path_atlas = null;\n\t\t String path_output = edit_undir.getText().toString();\n\t\t int index = path_png.lastIndexOf('.');\n\t\t if(index>0){\n\t\t\t path_atlas = path_png.substring(0,index)+\".atlas\";\n\t\t }\n\t\t unpacker.unPNG( path_atlas,path_png, path_output);\n\t\t Toast.makeText(MainActivity.this,\"解包完成\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t);\n\t\t\tbuilder.setNegativeButton(\"返回\", new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface p1, int p2)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Implement this method\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t);\n\t\t\treturn builder.create();\n\t\t}\n\t\t\n\t\t\n\t\treturn super.onCreateDialog(id);\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n filename = getArguments().getString(\"filename\");\n username = getArguments().getString(\"username\");\n workingDIR = getArguments().getString(\"workingDIR\");\n builder.setTitle(R.string.copy_move_file_select_options_title)\n .setItems(R.array.file__move_copy_dialog_options, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n onSelect(which);\n }\n });\n return builder.create();\n }", "private AlertDialog getDialog(int type) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n if(type == 0){\n final Intent summary = new Intent(this, SummaryActivity.class);\n builder.setMessage(\"Press proceed to see your session summary.\")\n .setTitle(\"Are you done?\");\n // Add the buttons\n builder.setPositiveButton(\"Proceed\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n startActivity(summary);\n finish();\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n }\n else if(type == 1){\n builder.setMessage(\"You are about to exit and end this session, no data will be saved.\")\n .setTitle(\"Exit?\");\n // Add the buttons\n builder.setPositiveButton(\"Exit\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n builder.setNegativeButton(\"Continue Running\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n }\n\n\n return builder.create();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n sharedPreferences = getActivity().getSharedPreferences(\"VALUES\", Context.MODE_PRIVATE);\n currentTheme = sharedPreferences.getInt(\"THEME\", 0);\n\n //inflate theme_dialog.xml\n view = inflater.inflate(R.layout.theme_dialog, container);\n\n // remove title (already defined in theme_dialog.xml)\n getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);\n\n // Declare buttons and onClick methods\n dialogButtons();\n\n setUltimoThemeBooton(currentTheme);\n\n return view;\n }", "public void openDialog(){\n if (!isAdded()) return;\n homeViewModel.getAllSets().removeObservers(getViewLifecycleOwner());\n ChooseSetDialog dialog = new ChooseSetDialog(setsTitles);\n dialog.show(getChildFragmentManager(), \"choose_set_dialog\");\n dialog.setOnSelectedListener(choice -> {\n Word word = new Word(setsObjects.get(choice).getId(), original, translation);\n homeViewModel.insertWord(word);\n original=\"\"; translation=\"\";\n etOrigWord.setText(\"\"); etTransWord.setText(\"\");\n });\n }", "private Dialog recreateDialog() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(OptionActivity.this);\n builder.setMessage(\"Do you want to change your profile?\")\n .setPositiveButton(\"Yah!\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent intent = new Intent(OptionActivity.this, amountscreen.class);\n startActivity(intent);\n }\n })\n .setNegativeButton(\"Nope\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n\tprotected Dialog onCreateDialog(int id) {\n\t\tDialog dialog = null;\n\t\tAlertDialog.Builder builder = null;\n\t\tswitch (id) {\n\t\tcase WordZapConstants.HUMAN_WIN_DIALOG:\n\t\t\tbuilder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setMessage(\"You won ! Get ready for the next level.\")\n\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\t\t\"Okay\",\n\t\t\t\t\t\t\tnew GameScreenDialogListener(this,\n\t\t\t\t\t\t\t\t\tWordZapConstants.HUMAN_WIN_DIALOG));\n\t\t\tdialog = builder.create();\n\t\t\tbreak;\n\t\tcase WordZapConstants.HUMAN_LOSE_DIALOG:\n\t\t\tbuilder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setMessage(\n\t\t\t\t\t\"You lost ! Get ready to play the same level again.\")\n\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\t\t\"Okay\",\n\t\t\t\t\t\t\tnew GameScreenDialogListener(this,\n\t\t\t\t\t\t\t\t\tWordZapConstants.HUMAN_LOSE_DIALOG));\n\t\t\tdialog = builder.create();\n\t\t\tbreak;\n\t\tcase WordZapConstants.DRAW_DIALOG:\n\t\t\tbuilder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setMessage(\n\t\t\t\t\t\"Game Drawn. Get ready to play the same level again.\")\n\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\t\t\"Okay\",\n\t\t\t\t\t\t\tnew GameScreenDialogListener(this,\n\t\t\t\t\t\t\t\t\tWordZapConstants.DRAW_DIALOG));\n\t\t\tdialog = builder.create();\n\t\t\tbreak;\n\n\t\tcase WordZapConstants.SHOW_LEVEL_DIALOG:\n\t\t\tbuilder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setMessage(\n\t\t\t\t\t\"Level \" + this.currentLevel.getLevelNumber() + \" \")\n\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\t\t\"Start\",\n\t\t\t\t\t\t\tnew GameScreenDialogListener(this,\n\t\t\t\t\t\t\t\t\tWordZapConstants.SHOW_LEVEL_DIALOG));\n\t\t\tdialog = builder.create();\n\t\t\tbreak;\n\t\t}\n\t\treturn dialog;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_varification_dialog, container, false);\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n String mess = \"Stalemate!\";\n if(getArguments().getBoolean(\"check\"))\n {\n mess = \"Checkmate! \"+getArguments().getString(\"team\")+\" wins\";\n }\n builder.setMessage(mess)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Log.d(TAG, \"Ok\");\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public Dialog() {\n\t}", "public ClassChoiceDialog(Context context) {\n // 通过LayoutInflater来加载一个xml的布局文件作为一个View对象\n this.context = context;\n initialView();\n dialog = builder.create();\n initListener();\n\n }", "static android.app.Dialog a(android.app.Activity r3, java.lang.String r4, final com.autonavi.minimap.route.bus.navidetail.view.BusNaviDetailDialogFactory.OnDialogClickListener r5) {\n /*\n int r0 = r4.hashCode()\n r1 = -997436923(0xffffffffc48c5205, float:-1122.5631)\n r2 = 1\n if (r0 == r1) goto L_0x0038\n r1 = -997367855(0xffffffffc48d5fd1, float:-1130.9943)\n if (r0 == r1) goto L_0x002e\n r1 = -724913475(0xffffffffd4cab2bd, float:-6.964657E12)\n if (r0 == r1) goto L_0x0024\n r1 = 620156635(0x24f6d6db, float:1.0704947E-16)\n if (r0 == r1) goto L_0x001a\n goto L_0x0042\n L_0x001a:\n java.lang.String r0 = \"dialog_type_progress\"\n boolean r0 = r4.equals(r0)\n if (r0 == 0) goto L_0x0042\n r0 = 0\n goto L_0x0043\n L_0x0024:\n java.lang.String r0 = \"dialog_type_declare_bus\"\n boolean r0 = r4.equals(r0)\n if (r0 == 0) goto L_0x0042\n r0 = 1\n goto L_0x0043\n L_0x002e:\n java.lang.String r0 = \"dialog_type_declare_foot\"\n boolean r0 = r4.equals(r0)\n if (r0 == 0) goto L_0x0042\n r0 = 2\n goto L_0x0043\n L_0x0038:\n java.lang.String r0 = \"dialog_type_declare_dest\"\n boolean r0 = r4.equals(r0)\n if (r0 == 0) goto L_0x0042\n r0 = 3\n goto L_0x0043\n L_0x0042:\n r0 = -1\n L_0x0043:\n switch(r0) {\n case 0: goto L_0x005f;\n case 1: goto L_0x0048;\n case 2: goto L_0x0048;\n case 3: goto L_0x0048;\n default: goto L_0x0046;\n }\n L_0x0046:\n r0 = 0\n goto L_0x0071\n L_0x0048:\n com.autonavi.minimap.widget.ConfirmDlg r0 = new com.autonavi.minimap.widget.ConfirmDlg\n com.autonavi.minimap.route.bus.navidetail.view.BusNaviDetailDialogFactory$2 r1 = new com.autonavi.minimap.route.bus.navidetail.view.BusNaviDetailDialogFactory$2\n r1.<init>(r5)\n java.util.Map<java.lang.String, java.lang.Integer> r5 = a\n java.lang.Object r4 = r5.get(r4)\n java.lang.Integer r4 = (java.lang.Integer) r4\n int r4 = r4.intValue()\n r0.<init>(r3, r1, r4)\n goto L_0x0071\n L_0x005f:\n com.autonavi.map.widget.ProgressDlg r0 = new com.autonavi.map.widget.ProgressDlg\n java.lang.String r4 = \"\"\n r0.<init>(r3, r4)\n r0.setCancelable(r2)\n com.autonavi.minimap.route.bus.navidetail.view.BusNaviDetailDialogFactory$1 r3 = new com.autonavi.minimap.route.bus.navidetail.view.BusNaviDetailDialogFactory$1\n r3.<init>(r5)\n r0.setOnCancelListener(r3)\n L_0x0071:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.autonavi.minimap.route.bus.navidetail.view.BusNaviDetailDialogFactory.a(android.app.Activity, java.lang.String, com.autonavi.minimap.route.bus.navidetail.view.BusNaviDetailDialogFactory$OnDialogClickListener):android.app.Dialog\");\n }", "@Override\r\n protected Dialog onCreateDialog(int id) {\r\n switch (id) {\r\n case START_DATE_DIALOG_ID:\r\n return new DatePickerDialog(this,\r\n \t\t\tstartDateSetListener,\r\n \t\t\tstartYear_dp, startMonth_dp-1, startDay_dp); \r\n case START_TIME_DIALOG_ID:\r\n return new TimePickerDialog(this,\r\n \t\t\tstartTimeSetListener, startHour_dp, startMinute_dp, false); \r\n case END_DATE_DIALOG_ID:\r\n return new DatePickerDialog(this,\r\n endDateSetListener,\r\n endYear_dp, endMonth_dp-1, endDay_dp);\r\n case END_TIME_DIALOG_ID:\r\n return new TimePickerDialog(this,\r\n \t\t\tendTimeSetListener, endHour_dp, endMinute_dp, false);\r\n }\r\n return null;\r\n }", "void showDialog() {\n\t\tDFTimePicker dtf = DFTimePicker.newInstance();\n DialogFragment newFragment = dtf;\n newFragment.show(getFragmentManager(), \"dialog\");\n }", "@Override\n\tprotected void onCreate(Bundle arg0) {\n\t\tsuper.onCreate(arg0);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\t\n\t\tIntent intent = getIntent();\n\t\tfinal DatabaseUtil mDatabaseUtil = new DatabaseUtil(this); \n\t\tfinal UiManager mUiManager = new UiManager(this);\n\t\t\n\t\tCustomDialog mCustomDialog = new CustomDialog(this);\n final CustomDialog customDialog = mCustomDialog;\n mCustomDialog = null;\n \n final ViewInfo viewInfo = new ViewInfo();\n\t\tviewInfo.panelNum = intent.getStringExtra(\"panelNum\");\n\t\tviewInfo.cellNum = intent.getStringExtra(\"cellNum\");\n\t\tviewInfo.viewId = \"shortcut\" + viewInfo.cellNum;\n\t\t\n customDialog.show();\n customDialog.setOnDismissListener(new OnDismissListener(){\n\n\t\t\tpublic void onDismiss(DialogInterface arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tTempActivity.this.finish();\n\t\t\t}\n });\n \n\t\tcustomDialog.setItemBackground(getResources().getDrawable(R.drawable.btn_default_normal_disable_focused));\n\t\t\n\t\tcustomDialog.loadingAllApp();\n\t\t\n\t\tcustomDialog.setOnSelectedItemsListener(new OnSelectedItemsListener(){\n\t\t\tpublic void onSelectedItems(Map<String,Integer> selectedMapPo) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\tpublic void onSelectedItem(int position) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tviewInfo.intentUri = customDialog.mAppList.get(position).intentUri;\n\t\t\t\t\n\t\t\t\tviewInfo.icon = customDialog.mAppList.get(position).icon;\n\t\t\t\tviewInfo.label = customDialog.mAppList.get(position).label;\n\t\t\t\t\n\t\t\t\tmUiManager.addItemToPanel(null\n\t\t\t\t,viewInfo\n\t\t\t\t,mDatabaseUtil);\n\t\t\t}\n\t\t});\n\t}", "public SelectionDialog(HarmonyModel harmonyModel, Integer mode)\r\n\t{\r\n\t\tsuper((mode==SELECT ? \"Select\" : \"Remove\") + \" Links\");\r\n\t\tthis.harmonyModel = harmonyModel;\r\n\t\tthis.mode = mode;\r\n\t\t\r\n\t\t// Initialize the type filter\r\n\t\ttypeFilter = new OptionPane(\"Type\",new String[]{\"All\",\"User\",\"System\"});\r\n\t\ttypeFilter.setBorder(new EmptyBorder(0,20,0,0));\r\n\t\ttypeFilter.setSelectedButton(\"All\");\r\n\t\t\r\n\t\t// Initialize the focus filter\r\n\t\tfocusFilter = new OptionPane(\"Focus\",new String[]{\"All\",\"Focused\",\"Unfocused\"});\r\n\t\tfocusFilter.setBorder(new EmptyBorder(0,13,0,0));\r\n\t\tfocusFilter.setSelectedButton(mode==SELECT ? \"Focused\" : \"All\");\r\n\t\tfocusFilter.setEnabled(mode==DELETE);\r\n\r\n\t\t// Initialize the visibility filter\r\n\t\tvisibilityFilter = new OptionPane(\"Visibility\",new String[]{\"All\",\"Visible\",\"Hidden\"});\t\t\r\n\t\tvisibilityFilter.setSelectedButton(mode==SELECT ? \"Visible\" : \"All\");\r\n\t\tvisibilityFilter.setEnabled(mode==DELETE);\r\n\t\t\r\n\t\t// Create the info pane\r\n\t\tJPanel infoPane = new JPanel();\r\n\t\tinfoPane.setBorder(new CompoundBorder(new EmptyBorder(5,5,0,5),new CompoundBorder(new LineBorder(Color.gray),new EmptyBorder(5,5,5,5))));\r\n\t\tinfoPane.setLayout(new GridLayout(3,1));\r\n\t\tinfoPane.add(typeFilter);\r\n\t\tinfoPane.add(focusFilter);\r\n\t\tinfoPane.add(visibilityFilter);\r\n\t\t\r\n\t\t// Generate the main dialog pane\r\n\t\tJPanel pane = new JPanel();\r\n\t\tpane.setBorder(BorderFactory.createLineBorder(Color.black));\r\n\t\tpane.setLayout(new BorderLayout());\r\n\t\tpane.add(infoPane,BorderLayout.CENTER);\r\n\t\tpane.add(new ButtonPane(),BorderLayout.SOUTH);\r\n\t\t\r\n\t\t// Initialize the dialog parameters\r\n\t\tsetContentPane(pane);\r\n\t\tsetSize(200,250);\r\n\t\tpack();\r\n\t\tsetVisible(true);\r\n\t}", "@Override\n public Dialog onCreateDialog(final Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(this.title);\n if (this.type == 2) {\n final boolean back = this.backToPreviousActivity;\n builder.setMessage(this.msg)\n .setPositiveButton(this.positive, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //Toast.makeText(mContext, \"Press positive\", Toast.LENGTH_SHORT).show();\n if (back) {\n getActivity().finish(); // finish actual activity\n }\n }\n })\n .setNegativeButton(this.negative, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //Toast.makeText(mContext, \"Press negative\", Toast.LENGTH_SHORT).show();\n }\n });\n } else {\n builder.setMessage(this.msg)\n .setPositiveButton(this.positive, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //Toast.makeText(mContext, \"Press positive\", Toast.LENGTH_SHORT).show();\n }\n });\n }\n // Create the AlertDialog object and return it\n return builder.create();\n }", "void showDialog() {\n DialogFragment newFragment = MyAlertDialogFragment.newInstance(R.string.alert_dialog_two_buttons_title);\n newFragment.show(getFragmentManager(), \"dialog\");\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.at_home_question)\n .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n listener.onAlign(getDialog());\n }\n })\n .setNeutralButton(R.string.go_home, null) // See onResume\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n listener.onCancel(getDialog());\n }\n }).setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n listener.onCancel(getDialog());\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n this.setCancelable(true);\n\n //NB! Må settes av kaller:\n Bundle bundle = this.getArguments();\n this.dialogTitle = bundle.getString(\"dialogTitle\");\n this.dialogText = bundle.getString(\"dialogText\");\n this.yesButtonText = bundle.getString(\"yesButtonText\");\n this.noButtonText = bundle.getString(\"noButtonText\");\n this.callback_id = bundle.getInt(\"callback_id\");\n int icon_drawable = bundle.getInt(\"icon_drawable\");\n\n //Bruker en styla dialog (se styles.xml):\n AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this.getActivity(), R.style.AlertDialogCustom));\n builder.setTitle(this.dialogTitle);\n builder.setIcon(icon_drawable);\n\n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View view = inflater.inflate(R.layout.fragment_yesno_dialog, null);\n\n TextView tvDialogText = (TextView) view.findViewById(R.id.tvDialogText);\n tvDialogText.setText(dialogText);\n\n // Inflate and set the layout for the dialog\n // Pass null as the parent view because its going in the dialog layout\n builder.setView(view)\n // Add action buttons\n .setPositiveButton(yesButtonText, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n //Lagre at tipset er sett...\n mListener.onDialogPositiveClick(YesNoDialog.this, callback_id);\n }\n })\n .setNegativeButton(noButtonText, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n mListener.onDialogNegativeClick(YesNoDialog.this, callback_id);\n }\n });\n\n //Opprett og vis dialogen:\n Dialog dialog = builder.create();\n return dialog;\n }", "public ReorganizeDialog() { }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n return new AlertDialog.Builder(getActivity())\n .setMessage(R.string.more_info_text)\n\n // User cannot dismiss dialog by hitting back button\n .setCancelable(false)\n\n // Set up No Button\n .setNegativeButton(R.string.not_now,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,\n int id) {\n dismiss();\n }\n })\n\n // Set up Yes Button\n .setPositiveButton(R.string.visit_moma,\n new DialogInterface.OnClickListener() {\n public void onClick(final DialogInterface dialog, int id) {\n startActivity(new Intent(Intent.ACTION_VIEW, Uri\n .parse(VISIT_MOMA_URL)));\n dismiss();\n }\n }).create();\n }", "DialogResult show();", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setMessage(msg)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n\n Dialog dialog = builder.create();\n\n // Create the AlertDialog object and return it\n return dialog;\n }", "public void createControl() {\n Button button1 = new Button(getShell(), SWT.PUSH);\n button1.setText(\"PolicyValueSelectionDialog with valid\\n\" +\n \"selection element at construction\");\n\n final PolicyValueSelectionDialog dialog1 =\n new PolicyValueSelectionDialog(button1.getShell(),\n \"myPolicy1\", selectionElement1);\n button1.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n dialog1.open();\n String[] results = (String[]) dialog1.getResult();\n if (results != null) {\n System.out.println(\"You chose:\");\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[i]);\n }\n } else {\n System.out.println(\"You chose nothing\");\n }\n }\n });\n dialog1.setInitialSelections(new String[]{\"choice7\", \"choice3\"});\n\n Button button2 = new Button(getShell(), SWT.PUSH);\n button2.setText(\"PolicyValueSelectionDialog with invalid\\n\" +\n \"selection element at construction\");\n\n final PolicyValueSelectionDialog dialog2 =\n new PolicyValueSelectionDialog(button1.getShell(),\n \"myPolicy2\", selectionElement2);\n button2.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n dialog2.open();\n String[] results = (String[]) dialog2.getResult();\n if (results != null) {\n System.out.println(\"You chose:\");\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[i]);\n }\n } else {\n System.out.println(\"You chose nothing\");\n }\n }\n });\n\n\n }" ]
[ "0.7153744", "0.71059996", "0.69837487", "0.6980588", "0.68572193", "0.68257505", "0.67954797", "0.678782", "0.677965", "0.6766183", "0.67653984", "0.6757065", "0.67158014", "0.66995037", "0.6644939", "0.66385543", "0.66202056", "0.6616519", "0.6546799", "0.6545988", "0.65337527", "0.6500755", "0.64947623", "0.64880687", "0.64868915", "0.647368", "0.6469919", "0.6423624", "0.64212716", "0.64203876", "0.64186704", "0.6414137", "0.6412774", "0.6407671", "0.6399617", "0.63809824", "0.6380086", "0.6376294", "0.6358706", "0.6357867", "0.6354048", "0.6338314", "0.633105", "0.6327171", "0.6327025", "0.6301613", "0.6299663", "0.6293818", "0.6282278", "0.62717223", "0.62632585", "0.6261474", "0.62598723", "0.62588775", "0.6258813", "0.6245911", "0.6244981", "0.62441444", "0.62354136", "0.6225762", "0.62257314", "0.6225619", "0.62222815", "0.62080896", "0.62045103", "0.61916316", "0.6182688", "0.6178707", "0.61692894", "0.61593497", "0.6150362", "0.61297613", "0.61287665", "0.6128197", "0.6125236", "0.6122063", "0.61175054", "0.610839", "0.6097715", "0.6090031", "0.6085231", "0.6082563", "0.608157", "0.6077629", "0.60752654", "0.6069657", "0.60597426", "0.60582495", "0.6053571", "0.6053046", "0.60521394", "0.60495055", "0.6048217", "0.60428226", "0.6035924", "0.6033427", "0.60328513", "0.6032652", "0.6027584", "0.6025577", "0.60250837" ]
0.0
-1
Play a proper sound:
@Override public void onClick(View v) { if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start(); // Dismiss dialog: verificationDialog.dismiss(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void play() {\n\t\tlog.finest(\"Playing sound\");\n\t\ttone.trigger();\n\t}", "public void playSound() {\n\t\tmediaPlayer.play();\n\t}", "private void playSound() {\n\t\tif (controllerVars.isLoaded() && !controllerVars.isPlays()) {\n\t\t\tcontrollerVars.getSoundPool().play(controllerVars.getSoundID(), controllerVars.getVolume(), controllerVars.getVolume(), 1, 0, 1f);\n\t\t\tcontrollerVars.COUNTER++;\n\t\t\t//Toast.makeText(act, \"Played sound\", Toast.LENGTH_SHORT).show();optional Playing message \n\t\t\tcontrollerVars.setPlays(true);\n\t\t\tonComplete(controllerVars.getMediaPlayer().getDuration());\n\t\t}\n\t\t//controllerVars.getMediaPlayer().start();\n\t\t//controllerVars.setPlays(true);\n\t}", "@Override\n public void playSound(int soundId) {\n\n }", "public static void playSound(){\r\n try{\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(AudioSystem.getAudioInputStream(new File(\"Cheering.wav\")));\r\n clip.start();\r\n }\r\n catch (Exception exc){\r\n exc.printStackTrace(System.out);\r\n } \r\n }", "public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}", "PlaySound getSound();", "public static void playShootingSound(){\n String musicFile = \"Sounds\\\\Shoot.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }", "public void playSoundAt(IPos pos, String sound, float volume, float pitch);", "private static void playSound(String s) {\n try {\n Media hit = new Media(new File(s).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(hit);\n mediaPlayer.play();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "@Override\n\tpublic void playLivingSound() {\n\t\tgetSoundManager().playLivingSound();\n\t}", "public void playSound() {\n String path = \"Data\\\\\\\\Acceptance.wav\";\n InputStream success;\n try {\n success = new FileInputStream(new File(path));\n AudioStream audioStream = new AudioStream(success);\n AudioPlayer.player.start(audioStream);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error playing sounds\");\n }\n }", "public void StartSound(ISoundOrigin origin, sfxenum_t sound_id);", "public void play(int soundID) {\n System.out.println(\"PlaySound: \" + soundID);\n// if (soundID == SOUND_EAT)\n// return;\n play(soundID, 1);\n }", "public void StartSound(ISoundOrigin origin, int sound_id);", "public void playSound(File soundFile);", "public void playSound(String sound) {\n\t\t \n\t\t // open the sound file as a Java input stream\n\t\tString soundFile = null;\n\t\tswitch (sound) {\n\t\tcase \"opening\":\n\t\t\tsoundFile = \"ConfigFiles\\\\opening.wav\";\n\t\t\tbreak;\n\t\tcase \"ending\":\n\t\t\tsoundFile = \"ConfigFiles\\\\ending.wav\";\n\t\t\tbreak;\n\t\tcase \"shop\":\n\t\t\tsoundFile = \"ConfigFiles\\\\shop.wav\";\n\t\t\tbreak;\n\t\tcase \"monsterbattle\":\n\t\t\tsoundFile = \"ConfigFiles\\\\monsterbattle.wav\";\n\t\t\tbreak;\n\t\tcase \"battlewin\":\n\t\t\tsoundFile = \"ConfigFiles\\\\monstervictory.wav\";\n\t\t\tbreak;\n\t\tcase \"trainerbattle\":\n\t\t\tsoundFile = \"ConfigFiles\\\\trainerBattle.wav\";\n\t\t\tbreak;\n\t\tcase \"trainerbattlewin\":\n\t\t\tsoundFile = \"ConfigFiles\\\\trainerVictory.wav\";\n\t\t\tbreak;\n\t\tcase \"map\":\n\t\t\tsoundFile = \"ConfigFiles\\\\map.wav\";\n\t\t\tbreak;\n\t\t}\n\t\t\t\n\t\t \n\t\t InputStream in = null;\n\t\t\ttry {\n\t\t\t\tin = new FileInputStream(soundFile);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t \n\t\t\tif(audioStream != null ) {\n\t\t\t\tAudioPlayer.player.stop(audioStream);\n\t\t\t}\n\t\t\t // create an audiostream from the inputstream\n\t\t\ttry {\n\t\t\t\taudioStream = new AudioStream(in);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t // play the audio clip with the audioplayer class\n\t\t\t\n\t\t AudioPlayer.player.start(audioStream);\n\t\t \n\t}", "public abstract String play(SoundLibrary library, String... sound);", "private void playYouWinSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\tada.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }", "public void playSoundFail() {\n\t\tfailSound.play();\n\t}", "private void playSound(String sound) {\r\n try {\r\n BufferedInputStream soundFileStream = new BufferedInputStream(this\r\n .getClass().getResourceAsStream(sound));\r\n AudioInputStream audioInputStream = AudioSystem\r\n .getAudioInputStream(soundFileStream);\r\n AudioFormat audioFormat = audioInputStream.getFormat();\r\n DataLine.Info dataLineInfo = new DataLine.Info(Clip.class, audioFormat);\r\n Clip clip = (Clip) AudioSystem.getLine(dataLineInfo);\r\n clip.open(audioInputStream);\r\n clip.start();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "static void PlaySound(File Sound)\n {\n try{\n Clip clip = AudioSystem.getClip();\n clip.open(AudioSystem.getAudioInputStream(Sound));\n clip.start();\n //BGM = new AudioStream(new FileInputStream(\"OST.WAV\"));\n //MD = BGM.getData();\n //loop = new ContinuousAudioDataStream(MD);\n }catch(Exception e) {}\n //MGP.start(loop); \n }", "public void startSound() {\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\tURL url = this.getClass().getResource(\"/\"+wavMusicFile);\n\t\t\t//System.out.println(\"url: \" + url);\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tclip = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tclip.open(audioIn);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void playSound(int sound) {\n \t currentstreamID=soundPool.play(soundPoolMap.get(sound), 0.5f, 0.5f, 1, -1, 1f);\n Log.e(\"MYT\",currentstreamID+\" play output\"); \n }", "public static void playSound(Player p, Location loc, Sound sound, float pitch, float volume){\n p.playSound(loc, sound, volume, pitch);\n }", "public void playSound(String filename) {\r\n\t\tif (debugLevel > 1)\r\n\t\t\tSystem.out.println(\" ... play audio file: \" + filename);\r\n\t\ttry {\r\n\t\t\tFile file = new File(filename);\r\n\t\t\tAudioInputStream in = AudioSystem.getAudioInputStream(file);\r\n\t\t\tclip = AudioSystem.getClip();\r\n\t\t\tclip.open(in);\r\n\t\t\tclip.start();\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void playAudio() {\r\n Play.au(audioFileName, false);\r\n }", "public void play(Sound s, PlayMode mode) throws IOException {\n if (s != null) getClip(s).play(mode);\n }", "public String play(String sound) {\r\n return play(SoundLibrarian.getInstance(), sound);\r\n }", "public void playSound(SoundType type) {\n if (!gameController.getGameStatPanel().getUserData().isSoundDisabled()) soundMap.get(type).play();\n }", "public void play() {\n if (audio != null) {\n audio.play(sfxVolume);\n }\n }", "@Override\n public void makeSound() {\n\n }", "@Override\n public void makeSound() {\n\n }", "public void PauseSound();", "public void startSound()\n \n {try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Start 2.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n startClip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n startClip.open(audioIn); \n \n startClip.start();\n \n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n \n }", "public void playWinSound()\n {\n InputStream pathSoundFile = getClass().getResourceAsStream(\"bellringing.wav\");\n playSound(pathSoundFile);\n }", "public abstract void makeSound();", "public void playSound(Location loc) {\n if (_sound != null) {\n loc.getWorld().playSound(loc, _sound, _soundVolume, _soundPitch);\n }\n }", "public void playSound(SoundEvent debug1, float debug2, float debug3) {\n/* 466 */ this.level.playSound(this, getX(), getY(), getZ(), debug1, getSoundSource(), debug2, debug3);\n/* */ }", "public void soundPressed() {\n // display\n TextLCD.print(SOUND);\n // sound\n Sound.beep();\n }", "private void playSound(int index, float pitch) {\n try {\n metaObject.playSound(index, pitch, 1f);\n } catch (NullPointerException | IndexOutOfBoundsException ex) {\n System.out.println(\"Could not play sound with index \" + index + \" for \" + this.toString() + \".\");\n }\n }", "public static void game_sound() {\n\t\tm_player_game.start();\n\t\tm_player_game.setMediaTime(new Time(0));\n\t}", "public void playSound ( Location location , Sound sound , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , volume , pitch ) );\n\t}", "private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }", "private void playSound(String soundFile){\n try {\n AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File(soundFile).getAbsoluteFile());\n Clip clip = AudioSystem.getClip();\n clip.open(audioInputStream);\n clip.start();\n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void playSound() {\n if (isFlashOn) {\n mp = MediaPlayer.create(this, R.raw.light_switch_off);\n } else {\n mp = MediaPlayer.create(this, R.raw.light_switch_on);\n }\n mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\n @Override\n public void onCompletion(MediaPlayer mp) {\n // TODO Auto-generated method stub\n mp.release();\n }\n });\n mp.start();\n }", "public void playSound(int sample, boolean looped) {\n\t\t\tm_soundManager.playSound(sample, looped);\n\t\t}", "public void playAudio() {\n\t\tmusic[currentSong].stop();\n\t\tcurrentSong++;\n\t\tcurrentSong %= music.length;\n\t\tmusic[currentSong].play();\n\t}", "private void playGameOverSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\ringout.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }", "@Override\r\n\tpublic void sound() {\r\n\t\tsuper.sound();\r\n\t\tSystem.out.println(\"SportsCar sound: Vutututututu\");\r\n\t}", "public void playAudio() {\n\n }", "private static void playAudio(String musicFile) {\n }", "public void playSound(String soundName) {\r\n try {\r\n audioInputStream = AudioSystem.getAudioInputStream(new File(soundName).getAbsoluteFile());\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(audioInputStream);\r\n clip.start();\r\n } catch (Exception ex) {\r\n System.out.println(\"Error with playing sound.\");\r\n ex.printStackTrace();\r\n }\r\n }", "public void playSound() {\n if (this.mIsSupportVibrator) {\n this.mVibratorEx.setHwVibrator(\"haptic.control.time_scroll\");\n }\n if (this.mSoundPool == null || this.mSoundId == 0 || !this.mSoundLoadFinished) {\n Log.w(TAG, \"SoundPool is not initialized properly!\");\n } else {\n this.mSoundPool.play(this.mSoundId, 1.0f, 1.0f, 0, 0, 1.0f);\n }\n }", "public Sound createSound(String file);", "public void play(String soundName)\n {\n try{\n Clip clip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new File(soundName));\n clip.open(inputStream);\n clip.start();\n }\n catch (Exception e){\n System.out.println(\"Play sound error: \" + e.getMessage() + \" for \" + soundName);\n }\n }", "public void playSound ( Location location , String sound , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , volume , pitch ) );\n\t}", "public Sound loadSound(String file);", "public void playAmbientSound() {\n if (!this.isClosed()) {\n super.playAmbientSound();\n }\n\n }", "protected void playTheSound(int position) {\n if (mp != null) {\n mp.reset();\n mp.release();\n }\n mp = MediaPlayer.create(this, sons[position]);\n mp.start();\n }", "public void playSoundSuccess() {\n\t\tsucceededSound.play();\n\t}", "public static void portail_sound() {\n\t\tm_player_portail.start();\n\t\tm_player_portail.setMediaTime(new Time(0));\n\t}", "public static void PlaySound(String soundToPlay)\n {\n AudioNode sound = new AudioNode(Game.getInstance().getAssetManager(), soundToPlay);\n sound.setReverbEnabled(false);\n sound.play();\n }", "public static void playInternal( LayeredSound.SoundClip s )\r\n\t{\r\n\t\tif ( Settings.isSoundOn() )\r\n\t\t\tnew SpeakerThread( s ).start();\r\n\t}", "public void playSoundGameWon() {\n\t\tcompletedGameSound.play();\n\t}", "void play(int soundIndex) {\n\t\tsounds.get(soundIndex).play();\n\t}", "public static void playPickupSound(){\n String musicFile = \"Sounds\\\\Pickup.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }", "public void play() {\n\t\tplay(true, true);\n\t}", "private void playSound(String fileName) {\n\t\tAudioClip sound = JApplet.newAudioClip(getClass().getResource(fileName));\n\t\tsound.play();\n\t}", "public void playSoundGameLost() {\n\t\tlostGameSound.play();\n\t}", "public static void playSoundEffect(String path) {\n Thread thread = new Thread(() -> {\n Player soundEffectPlayer = new Player();\n soundEffectPlayer.setSourceLocation(path);\n soundEffectPlayer.play();\n });\n thread.setDaemon(true);\n thread.start();\n }", "public static void sound(String sound){\n System.out.println(\"The dog \"+sound);\n }", "public void playSoundtrack() {\n if(this.musicEnabled) {\n try {\n Clip soundtrackClip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new BufferedInputStream(Assets.soundTrack));\n soundtrackClip.open(inputStream);\n soundtrackClip.start();\n soundtrackClip.loop(Clip.LOOP_CONTINUOUSLY);\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(e.getMessage());\n }\n }\n }", "private void gameSound(int attack){\n switch (attack){\n case 1:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_lightattack);\n break;\n case 2:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_strongattack);\n break;\n case 3:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_brutalattack);\n break;\n }\n mediaPlayer.start();\n }", "public void playGoombaSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, GOOMBA);\n\t}", "@Override\n\tpublic void play() {\n\t\tGuitar.super.play();\n\t\tPiano.super.play();\n\t}", "public void playBeep(){\n //https://stackoverflow.com/questions/2618182/how-to-play-ringtone-alarm-sound-in-android\n try{\n //gets notification sound then plays it.\n Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification);\n\n r.play();\n TimeUnit.MILLISECONDS.sleep(300);\n r.stop();\n\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }", "public void playSound(String fileName){\n \n Random rand = new Random();\n if (fileName == null) {\n int nextSongNumber = rand.nextInt(soundList.size());\n while(nextSongNumber == currentSongNumber){\n nextSongNumber = rand.nextInt(soundList.size());\n }\n currentSongNumber = nextSongNumber;\n fileName = soundList.get(currentSongNumber);\n }\n \n try {\n \n \n soundSequencer = MidiSystem.getSequencer();\n soundSequencer.open();\n \n soundSequencer.setSequence(this.getClass().getResourceAsStream(fileName));\n soundSequencer.setLoopCount(Sequencer.LOOP_CONTINUOUSLY);\n soundSequencer.start();\n \n } catch (IOException | InvalidMidiDataException | MidiUnavailableException ex) {\n //Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void playSound(String soundURL){\n if (mySoundPlayer == null){\n logMessage(TAG, \"playSound() -> mSoundPlayer is null\");\n return;\n }\n mySoundPlayer.play(soundURL);\n }", "public void playSound ( Location location , Sound sound , SoundCategory category , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , category , volume , pitch ) );\n\t}", "public void play()\n\t{\n\t\tif (canPlay)\n\t\t{\n\t\t\tsong.play();\n\t\t\tsong.rewind();\n\t\t\tif (theSong == \"SG1\" || theSong == \"SG2\")\n\t\t\t\tcanPlay = false;\n\t\t}\n\t}", "@Override\r\n\tpublic String doSound() {\n\t\treturn null;\r\n\t}", "void playSound() {\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n soundPlaying = true;\n audioTrack.play();\n while (soundPlaying) {\n genWhiteNoise();\n audioTrack.write(noise, 0, SAMPLE_COUNT);\n }\n\n }\n });\n thread.start();\n }", "void play(final Context context, final int soundId, final OnCompletionPlayNextListener playNextListener);", "public void errorSound()\n {\n InputStream pathSoundFile = getClass().getResourceAsStream(\"Error.wav\");\n playSound(pathSoundFile);\n }", "public static void enableSound() {\n\t\tvelocity = 127;\n\t}", "public void continueSound() {\n\t\tclip.start();\n\t}", "public void PlaySound(Context context) {\r\n\t\tif (!this.mp.isPlaying()) {\r\n\t\t\tmp.start();\r\n\t\t}\r\n\t}", "protected void playStepSound(int par1, int par2, int par3, int par4)\n {\n this.playSound(\"mob.spider.step\", 0.15F, 1.0F);\n }", "abstract String getSound();", "@Override\n protected String produceSound(){\n return \"BauBau\";\n\n }", "public static void playSound(Context context) {\n mAudioManager = (AudioManager) context.getSystemService(AUDIO_SERVICE);\n assert mAudioManager != null;\n originalVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);\n Log.d(TAG, \"originalVolume: \"+ originalVolume);\n mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC), 0);\n mAudioManager.setMode(AudioManager.STREAM_MUSIC);\n mAudioManager.setSpeakerphoneOn(true);\n\n if (mp != null) {\n mp.stop();\n }\n\n mp = MediaPlayer.create(context, R.raw.ringingsound);\n mp.setLooping(true);\n mp.start();\n\n }", "public void playSound(EnvironmentEvent event) {\r\n // a precaution check... usually the event can't be null\r\n if (event == null) {\r\n return;\r\n }\r\n\r\n String eventTypeName = event.getType();\r\n\r\n // manage the OutMessageEvents\r\n if (event instanceof OutMessageEvent) {\r\n String messageTypeName = ((OutMessageEvent) event).getMessage().getType();\r\n\r\n // check if we deal with out messages generic or with out message that\r\n // have a sound assigned for a specific type and not for any out message\r\n if (this.soundsMap.get(eventTypeName + this.typesNameDelimiter\r\n + messageTypeName) != null) {\r\n eventTypeName += (this.typesNameDelimiter + messageTypeName);\r\n }\r\n }\r\n\r\n // play this sound if need to play and is allowed to play.\r\n if (this.soundOn\r\n && this.soundEventActiveStateMap.get(eventTypeName) != null\r\n && this.soundEventActiveStateMap.get(eventTypeName)\r\n && this.soundsMap.get(eventTypeName) != null) {\r\n\r\n SonificationMap sMap = this.sonificationMap.get(eventTypeName);\r\n if (sMap != null\r\n && this.soundsMap.get(eventTypeName) instanceof SoundMIDI) {\r\n boolean fromMsg = eventTypeName.contains(this.typesNameDelimiter);\r\n\r\n Object evtPropValue = null;\r\n\r\n try {\r\n evtPropValue = getValue(sMap.getPropertyName(), event, fromMsg);\r\n\r\n } catch (Exception ex) {\r\n }\r\n\r\n int instrument = -1;\r\n if (sMap.getSoundPropertyName().equals(NOTE)) {\r\n ((SoundMIDI) this.soundsMap.get(eventTypeName)).setNotes(sMap\r\n .mapNotes(evtPropValue));\r\n }\r\n if (sMap.getSoundPropertyName().equals(DURATION)) {\r\n ((SoundMIDI) this.soundsMap.get(eventTypeName)).setNotes(sMap\r\n .mapDuration(evtPropValue));\r\n }\r\n if (sMap.getSoundPropertyName().equals(VOLUME)) {\r\n ((SoundMIDI) this.soundsMap.get(eventTypeName)).setNotes(sMap\r\n .mapVolume(evtPropValue));\r\n }\r\n if (sMap.getSoundPropertyName().equals(INSTRUMENT_NO)) {\r\n instrument = sMap.mapInstrument(evtPropValue);\r\n ((SoundMIDI) this.soundsMap.get(eventTypeName))\r\n .setInstrument(instrument);\r\n }\r\n\r\n }\r\n\r\n this.soundsMap.get(eventTypeName).play();\r\n }\r\n }", "public static Action playSound(final InputStream sound) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n //MP3.play(sound);\n }\n\n @Override\n public int getCost() {\n return 5;\n }\n\n @Override\n public boolean isExclusive() {\n return false;\n }\n\n @Override\n public Object getData() {\n return sound;\n }\n\n @Override\n public String toString() {\n return \"PlaySound(\" + (sound != null ? sound.toString() : \"null\") + \")\";\n }\n };\n }", "public void toggleSound() { \n\t\tif (mSoundEnable) {\n\t\t\tmSoundEnable = false; \n\t\t\tif (ResourceManager.getInstance().gameMusic.isPlaying())\n\t\t\t\tResourceManager.getInstance().gameMusic.pause();\n\t\t}\n\t\telse {\n\t\t\tmSoundEnable = true;\n\t\t\tif (!ResourceManager.getInstance().gameMusic.isPlaying()) {\n\t\t\t\tResourceManager.getInstance().gameMusic.play();\n\t\t\t}\n\t\t}\n\t}", "public void playClickSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, CLICK);\n\t}", "public void playBeep() {\n // Cách 1: Sử dụng audio có sẵn của android\n// ToneGenerator toneGenerator = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, 500);\n// toneGenerator.startTone(ToneGenerator.TONE_PROP_PROMPT);\n\n // Cách 2: Sử dụng audio của mình\n Uri beepSound = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + File.pathSeparator\n + File.separator + getPackageName() + \"/raw/notifications.mp3\");\n Ringtone ringtone = RingtoneManager.getRingtone(this, beepSound);\n ringtone.play();\n }", "public void playSound(InputStream access)\n {\n if(!mute)\n {\n try{\n InputStream bufferedIn = new BufferedInputStream(access);\n AudioInputStream audioIn = AudioSystem.getAudioInputStream(bufferedIn);\n Clip clip = AudioSystem.getClip();\n clip.open(audioIn);\n clip.start();\n }\n catch(UnsupportedAudioFileException | IOException | LineUnavailableException e1){\n System.out.println(\"Selected Audio File is not compatible/available.\");};\n }\n }", "public void playHitWall() {\r\n hitWall.play(soundFxVol);\r\n }", "private void playAudio(int winLose)\t\t\t\t\t\t\t\n {\n // win\n if(winLose == 1)\n {\n String path = \"src/winningSound.wav\";\n Media media = new Media(new File(path).toURI().toString());\n\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.setCycleCount(1);\n mediaPlayer.setAutoPlay(true);\n }\n // lose\n else\n {\n String path = \"src/loserSound.wav\";\n Media media = new Media(new File(path).toURI().toString());\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.setCycleCount(1);\n mediaPlayer.setAutoPlay(true);\n }\n }", "public void toggleSound()\n\t{\n\t\tif (sound)\n\t\t\tsound = false;\n\t\telse\n\t\t\tsound = true;\n\t\tnotifyObservers();\n\t}" ]
[ "0.83235884", "0.81556326", "0.8148567", "0.8113563", "0.7984178", "0.79256266", "0.7917265", "0.78503263", "0.7840744", "0.7820898", "0.7769528", "0.77254564", "0.7717483", "0.77147645", "0.77011305", "0.7650783", "0.76360875", "0.7615948", "0.75898665", "0.7584792", "0.7555749", "0.7517612", "0.7502664", "0.74705446", "0.7469099", "0.74652123", "0.74569386", "0.7448758", "0.7447555", "0.7425488", "0.74206585", "0.7404806", "0.7404806", "0.7389854", "0.73626596", "0.73579574", "0.73431134", "0.73419124", "0.73387253", "0.73362345", "0.7324693", "0.73215735", "0.7307207", "0.72998786", "0.7283501", "0.72771937", "0.7272033", "0.7270975", "0.7261973", "0.7256658", "0.7224673", "0.7218581", "0.7209637", "0.719152", "0.718487", "0.7182722", "0.7177821", "0.71746916", "0.7174577", "0.71719646", "0.71670586", "0.716532", "0.7165202", "0.7152077", "0.7147661", "0.71460336", "0.7144399", "0.71431977", "0.7138812", "0.7130137", "0.7115003", "0.71140754", "0.71057457", "0.70985603", "0.7097408", "0.70695716", "0.7068212", "0.7061955", "0.7061945", "0.7060284", "0.7048156", "0.70385957", "0.7037609", "0.70334643", "0.70331746", "0.70315295", "0.7021205", "0.7016848", "0.7015027", "0.70103115", "0.6997001", "0.6996057", "0.6993478", "0.69812596", "0.69797134", "0.69787", "0.6977624", "0.6976392", "0.6972811", "0.69700164", "0.6969788" ]
0.0
-1
Play a proper sound:
@Override public void onClick(View v) { if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start(); // Creating a new game and reinitializing UI components: mGame = new Game(); setupGrid(); mBlackCounter.setText("2"); mWhiteCounter.setText("2"); startGame(); // Dismiss dialog: verificationDialog.dismiss(); // Showing a promo ad by chance: showPromoAdByChance(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void play() {\n\t\tlog.finest(\"Playing sound\");\n\t\ttone.trigger();\n\t}", "public void playSound() {\n\t\tmediaPlayer.play();\n\t}", "private void playSound() {\n\t\tif (controllerVars.isLoaded() && !controllerVars.isPlays()) {\n\t\t\tcontrollerVars.getSoundPool().play(controllerVars.getSoundID(), controllerVars.getVolume(), controllerVars.getVolume(), 1, 0, 1f);\n\t\t\tcontrollerVars.COUNTER++;\n\t\t\t//Toast.makeText(act, \"Played sound\", Toast.LENGTH_SHORT).show();optional Playing message \n\t\t\tcontrollerVars.setPlays(true);\n\t\t\tonComplete(controllerVars.getMediaPlayer().getDuration());\n\t\t}\n\t\t//controllerVars.getMediaPlayer().start();\n\t\t//controllerVars.setPlays(true);\n\t}", "@Override\n public void playSound(int soundId) {\n\n }", "public static void playSound(){\r\n try{\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(AudioSystem.getAudioInputStream(new File(\"Cheering.wav\")));\r\n clip.start();\r\n }\r\n catch (Exception exc){\r\n exc.printStackTrace(System.out);\r\n } \r\n }", "public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}", "PlaySound getSound();", "public static void playShootingSound(){\n String musicFile = \"Sounds\\\\Shoot.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }", "public void playSoundAt(IPos pos, String sound, float volume, float pitch);", "private static void playSound(String s) {\n try {\n Media hit = new Media(new File(s).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(hit);\n mediaPlayer.play();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "@Override\n\tpublic void playLivingSound() {\n\t\tgetSoundManager().playLivingSound();\n\t}", "public void playSound() {\n String path = \"Data\\\\\\\\Acceptance.wav\";\n InputStream success;\n try {\n success = new FileInputStream(new File(path));\n AudioStream audioStream = new AudioStream(success);\n AudioPlayer.player.start(audioStream);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error playing sounds\");\n }\n }", "public void StartSound(ISoundOrigin origin, sfxenum_t sound_id);", "public void play(int soundID) {\n System.out.println(\"PlaySound: \" + soundID);\n// if (soundID == SOUND_EAT)\n// return;\n play(soundID, 1);\n }", "public void StartSound(ISoundOrigin origin, int sound_id);", "public void playSound(File soundFile);", "public void playSound(String sound) {\n\t\t \n\t\t // open the sound file as a Java input stream\n\t\tString soundFile = null;\n\t\tswitch (sound) {\n\t\tcase \"opening\":\n\t\t\tsoundFile = \"ConfigFiles\\\\opening.wav\";\n\t\t\tbreak;\n\t\tcase \"ending\":\n\t\t\tsoundFile = \"ConfigFiles\\\\ending.wav\";\n\t\t\tbreak;\n\t\tcase \"shop\":\n\t\t\tsoundFile = \"ConfigFiles\\\\shop.wav\";\n\t\t\tbreak;\n\t\tcase \"monsterbattle\":\n\t\t\tsoundFile = \"ConfigFiles\\\\monsterbattle.wav\";\n\t\t\tbreak;\n\t\tcase \"battlewin\":\n\t\t\tsoundFile = \"ConfigFiles\\\\monstervictory.wav\";\n\t\t\tbreak;\n\t\tcase \"trainerbattle\":\n\t\t\tsoundFile = \"ConfigFiles\\\\trainerBattle.wav\";\n\t\t\tbreak;\n\t\tcase \"trainerbattlewin\":\n\t\t\tsoundFile = \"ConfigFiles\\\\trainerVictory.wav\";\n\t\t\tbreak;\n\t\tcase \"map\":\n\t\t\tsoundFile = \"ConfigFiles\\\\map.wav\";\n\t\t\tbreak;\n\t\t}\n\t\t\t\n\t\t \n\t\t InputStream in = null;\n\t\t\ttry {\n\t\t\t\tin = new FileInputStream(soundFile);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t \n\t\t\tif(audioStream != null ) {\n\t\t\t\tAudioPlayer.player.stop(audioStream);\n\t\t\t}\n\t\t\t // create an audiostream from the inputstream\n\t\t\ttry {\n\t\t\t\taudioStream = new AudioStream(in);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t // play the audio clip with the audioplayer class\n\t\t\t\n\t\t AudioPlayer.player.start(audioStream);\n\t\t \n\t}", "public abstract String play(SoundLibrary library, String... sound);", "private void playYouWinSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\tada.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }", "public void playSoundFail() {\n\t\tfailSound.play();\n\t}", "private void playSound(String sound) {\r\n try {\r\n BufferedInputStream soundFileStream = new BufferedInputStream(this\r\n .getClass().getResourceAsStream(sound));\r\n AudioInputStream audioInputStream = AudioSystem\r\n .getAudioInputStream(soundFileStream);\r\n AudioFormat audioFormat = audioInputStream.getFormat();\r\n DataLine.Info dataLineInfo = new DataLine.Info(Clip.class, audioFormat);\r\n Clip clip = (Clip) AudioSystem.getLine(dataLineInfo);\r\n clip.open(audioInputStream);\r\n clip.start();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "static void PlaySound(File Sound)\n {\n try{\n Clip clip = AudioSystem.getClip();\n clip.open(AudioSystem.getAudioInputStream(Sound));\n clip.start();\n //BGM = new AudioStream(new FileInputStream(\"OST.WAV\"));\n //MD = BGM.getData();\n //loop = new ContinuousAudioDataStream(MD);\n }catch(Exception e) {}\n //MGP.start(loop); \n }", "public void startSound() {\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\tURL url = this.getClass().getResource(\"/\"+wavMusicFile);\n\t\t\t//System.out.println(\"url: \" + url);\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tclip = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tclip.open(audioIn);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void playSound(int sound) {\n \t currentstreamID=soundPool.play(soundPoolMap.get(sound), 0.5f, 0.5f, 1, -1, 1f);\n Log.e(\"MYT\",currentstreamID+\" play output\"); \n }", "public static void playSound(Player p, Location loc, Sound sound, float pitch, float volume){\n p.playSound(loc, sound, volume, pitch);\n }", "public void playSound(String filename) {\r\n\t\tif (debugLevel > 1)\r\n\t\t\tSystem.out.println(\" ... play audio file: \" + filename);\r\n\t\ttry {\r\n\t\t\tFile file = new File(filename);\r\n\t\t\tAudioInputStream in = AudioSystem.getAudioInputStream(file);\r\n\t\t\tclip = AudioSystem.getClip();\r\n\t\t\tclip.open(in);\r\n\t\t\tclip.start();\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void playAudio() {\r\n Play.au(audioFileName, false);\r\n }", "public void play(Sound s, PlayMode mode) throws IOException {\n if (s != null) getClip(s).play(mode);\n }", "public String play(String sound) {\r\n return play(SoundLibrarian.getInstance(), sound);\r\n }", "public void playSound(SoundType type) {\n if (!gameController.getGameStatPanel().getUserData().isSoundDisabled()) soundMap.get(type).play();\n }", "public void play() {\n if (audio != null) {\n audio.play(sfxVolume);\n }\n }", "@Override\n public void makeSound() {\n\n }", "@Override\n public void makeSound() {\n\n }", "public void PauseSound();", "public void startSound()\n \n {try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Start 2.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n startClip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n startClip.open(audioIn); \n \n startClip.start();\n \n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n \n }", "public void playWinSound()\n {\n InputStream pathSoundFile = getClass().getResourceAsStream(\"bellringing.wav\");\n playSound(pathSoundFile);\n }", "public abstract void makeSound();", "public void playSound(Location loc) {\n if (_sound != null) {\n loc.getWorld().playSound(loc, _sound, _soundVolume, _soundPitch);\n }\n }", "public void playSound(SoundEvent debug1, float debug2, float debug3) {\n/* 466 */ this.level.playSound(this, getX(), getY(), getZ(), debug1, getSoundSource(), debug2, debug3);\n/* */ }", "public void soundPressed() {\n // display\n TextLCD.print(SOUND);\n // sound\n Sound.beep();\n }", "private void playSound(int index, float pitch) {\n try {\n metaObject.playSound(index, pitch, 1f);\n } catch (NullPointerException | IndexOutOfBoundsException ex) {\n System.out.println(\"Could not play sound with index \" + index + \" for \" + this.toString() + \".\");\n }\n }", "public static void game_sound() {\n\t\tm_player_game.start();\n\t\tm_player_game.setMediaTime(new Time(0));\n\t}", "public void playSound ( Location location , Sound sound , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , volume , pitch ) );\n\t}", "private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }", "private void playSound(String soundFile){\n try {\n AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File(soundFile).getAbsoluteFile());\n Clip clip = AudioSystem.getClip();\n clip.open(audioInputStream);\n clip.start();\n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void playSound() {\n if (isFlashOn) {\n mp = MediaPlayer.create(this, R.raw.light_switch_off);\n } else {\n mp = MediaPlayer.create(this, R.raw.light_switch_on);\n }\n mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\n @Override\n public void onCompletion(MediaPlayer mp) {\n // TODO Auto-generated method stub\n mp.release();\n }\n });\n mp.start();\n }", "public void playSound(int sample, boolean looped) {\n\t\t\tm_soundManager.playSound(sample, looped);\n\t\t}", "public void playAudio() {\n\t\tmusic[currentSong].stop();\n\t\tcurrentSong++;\n\t\tcurrentSong %= music.length;\n\t\tmusic[currentSong].play();\n\t}", "private void playGameOverSound()\n {\n try\n {\n java.io.File soundFile = new java.io.File(\n \"C:\\\\Windows\\\\Media\\\\ringout.wav\");\n javax.sound.sampled.AudioInputStream audioIn =\n javax.sound.sampled.AudioSystem.getAudioInputStream(\n soundFile);\n javax.sound.sampled.Clip clip =\n javax.sound.sampled.AudioSystem.getClip();\n\n clip.open(audioIn);\n clip.start();\n }\n catch (Exception ex)\n {\n System.out.println(ex);\n }\n }", "@Override\r\n\tpublic void sound() {\r\n\t\tsuper.sound();\r\n\t\tSystem.out.println(\"SportsCar sound: Vutututututu\");\r\n\t}", "public void playAudio() {\n\n }", "private static void playAudio(String musicFile) {\n }", "public void playSound(String soundName) {\r\n try {\r\n audioInputStream = AudioSystem.getAudioInputStream(new File(soundName).getAbsoluteFile());\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(audioInputStream);\r\n clip.start();\r\n } catch (Exception ex) {\r\n System.out.println(\"Error with playing sound.\");\r\n ex.printStackTrace();\r\n }\r\n }", "public void playSound() {\n if (this.mIsSupportVibrator) {\n this.mVibratorEx.setHwVibrator(\"haptic.control.time_scroll\");\n }\n if (this.mSoundPool == null || this.mSoundId == 0 || !this.mSoundLoadFinished) {\n Log.w(TAG, \"SoundPool is not initialized properly!\");\n } else {\n this.mSoundPool.play(this.mSoundId, 1.0f, 1.0f, 0, 0, 1.0f);\n }\n }", "public Sound createSound(String file);", "public void play(String soundName)\n {\n try{\n Clip clip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new File(soundName));\n clip.open(inputStream);\n clip.start();\n }\n catch (Exception e){\n System.out.println(\"Play sound error: \" + e.getMessage() + \" for \" + soundName);\n }\n }", "public void playSound ( Location location , String sound , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , volume , pitch ) );\n\t}", "public Sound loadSound(String file);", "public void playAmbientSound() {\n if (!this.isClosed()) {\n super.playAmbientSound();\n }\n\n }", "protected void playTheSound(int position) {\n if (mp != null) {\n mp.reset();\n mp.release();\n }\n mp = MediaPlayer.create(this, sons[position]);\n mp.start();\n }", "public void playSoundSuccess() {\n\t\tsucceededSound.play();\n\t}", "public static void portail_sound() {\n\t\tm_player_portail.start();\n\t\tm_player_portail.setMediaTime(new Time(0));\n\t}", "public static void PlaySound(String soundToPlay)\n {\n AudioNode sound = new AudioNode(Game.getInstance().getAssetManager(), soundToPlay);\n sound.setReverbEnabled(false);\n sound.play();\n }", "public static void playInternal( LayeredSound.SoundClip s )\r\n\t{\r\n\t\tif ( Settings.isSoundOn() )\r\n\t\t\tnew SpeakerThread( s ).start();\r\n\t}", "public void playSoundGameWon() {\n\t\tcompletedGameSound.play();\n\t}", "void play(int soundIndex) {\n\t\tsounds.get(soundIndex).play();\n\t}", "public static void playPickupSound(){\n String musicFile = \"Sounds\\\\Pickup.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }", "public void play() {\n\t\tplay(true, true);\n\t}", "private void playSound(String fileName) {\n\t\tAudioClip sound = JApplet.newAudioClip(getClass().getResource(fileName));\n\t\tsound.play();\n\t}", "public void playSoundGameLost() {\n\t\tlostGameSound.play();\n\t}", "public static void playSoundEffect(String path) {\n Thread thread = new Thread(() -> {\n Player soundEffectPlayer = new Player();\n soundEffectPlayer.setSourceLocation(path);\n soundEffectPlayer.play();\n });\n thread.setDaemon(true);\n thread.start();\n }", "public static void sound(String sound){\n System.out.println(\"The dog \"+sound);\n }", "public void playSoundtrack() {\n if(this.musicEnabled) {\n try {\n Clip soundtrackClip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new BufferedInputStream(Assets.soundTrack));\n soundtrackClip.open(inputStream);\n soundtrackClip.start();\n soundtrackClip.loop(Clip.LOOP_CONTINUOUSLY);\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(e.getMessage());\n }\n }\n }", "private void gameSound(int attack){\n switch (attack){\n case 1:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_lightattack);\n break;\n case 2:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_strongattack);\n break;\n case 3:\n mediaPlayer = MediaPlayer.create(Activity_Game.this, R.raw.sound_brutalattack);\n break;\n }\n mediaPlayer.start();\n }", "public void playGoombaSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, GOOMBA);\n\t}", "@Override\n\tpublic void play() {\n\t\tGuitar.super.play();\n\t\tPiano.super.play();\n\t}", "public void playBeep(){\n //https://stackoverflow.com/questions/2618182/how-to-play-ringtone-alarm-sound-in-android\n try{\n //gets notification sound then plays it.\n Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification);\n\n r.play();\n TimeUnit.MILLISECONDS.sleep(300);\n r.stop();\n\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }", "public void playSound(String fileName){\n \n Random rand = new Random();\n if (fileName == null) {\n int nextSongNumber = rand.nextInt(soundList.size());\n while(nextSongNumber == currentSongNumber){\n nextSongNumber = rand.nextInt(soundList.size());\n }\n currentSongNumber = nextSongNumber;\n fileName = soundList.get(currentSongNumber);\n }\n \n try {\n \n \n soundSequencer = MidiSystem.getSequencer();\n soundSequencer.open();\n \n soundSequencer.setSequence(this.getClass().getResourceAsStream(fileName));\n soundSequencer.setLoopCount(Sequencer.LOOP_CONTINUOUSLY);\n soundSequencer.start();\n \n } catch (IOException | InvalidMidiDataException | MidiUnavailableException ex) {\n //Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void playSound(String soundURL){\n if (mySoundPlayer == null){\n logMessage(TAG, \"playSound() -> mSoundPlayer is null\");\n return;\n }\n mySoundPlayer.play(soundURL);\n }", "public void playSound ( Location location , Sound sound , SoundCategory category , float volume , float pitch ) {\n\t\texecute ( handle -> handle.playSound ( location , sound , category , volume , pitch ) );\n\t}", "public void play()\n\t{\n\t\tif (canPlay)\n\t\t{\n\t\t\tsong.play();\n\t\t\tsong.rewind();\n\t\t\tif (theSong == \"SG1\" || theSong == \"SG2\")\n\t\t\t\tcanPlay = false;\n\t\t}\n\t}", "@Override\r\n\tpublic String doSound() {\n\t\treturn null;\r\n\t}", "void playSound() {\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n soundPlaying = true;\n audioTrack.play();\n while (soundPlaying) {\n genWhiteNoise();\n audioTrack.write(noise, 0, SAMPLE_COUNT);\n }\n\n }\n });\n thread.start();\n }", "void play(final Context context, final int soundId, final OnCompletionPlayNextListener playNextListener);", "public void errorSound()\n {\n InputStream pathSoundFile = getClass().getResourceAsStream(\"Error.wav\");\n playSound(pathSoundFile);\n }", "public static void enableSound() {\n\t\tvelocity = 127;\n\t}", "public void continueSound() {\n\t\tclip.start();\n\t}", "public void PlaySound(Context context) {\r\n\t\tif (!this.mp.isPlaying()) {\r\n\t\t\tmp.start();\r\n\t\t}\r\n\t}", "protected void playStepSound(int par1, int par2, int par3, int par4)\n {\n this.playSound(\"mob.spider.step\", 0.15F, 1.0F);\n }", "abstract String getSound();", "@Override\n protected String produceSound(){\n return \"BauBau\";\n\n }", "public static void playSound(Context context) {\n mAudioManager = (AudioManager) context.getSystemService(AUDIO_SERVICE);\n assert mAudioManager != null;\n originalVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);\n Log.d(TAG, \"originalVolume: \"+ originalVolume);\n mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC), 0);\n mAudioManager.setMode(AudioManager.STREAM_MUSIC);\n mAudioManager.setSpeakerphoneOn(true);\n\n if (mp != null) {\n mp.stop();\n }\n\n mp = MediaPlayer.create(context, R.raw.ringingsound);\n mp.setLooping(true);\n mp.start();\n\n }", "public void playSound(EnvironmentEvent event) {\r\n // a precaution check... usually the event can't be null\r\n if (event == null) {\r\n return;\r\n }\r\n\r\n String eventTypeName = event.getType();\r\n\r\n // manage the OutMessageEvents\r\n if (event instanceof OutMessageEvent) {\r\n String messageTypeName = ((OutMessageEvent) event).getMessage().getType();\r\n\r\n // check if we deal with out messages generic or with out message that\r\n // have a sound assigned for a specific type and not for any out message\r\n if (this.soundsMap.get(eventTypeName + this.typesNameDelimiter\r\n + messageTypeName) != null) {\r\n eventTypeName += (this.typesNameDelimiter + messageTypeName);\r\n }\r\n }\r\n\r\n // play this sound if need to play and is allowed to play.\r\n if (this.soundOn\r\n && this.soundEventActiveStateMap.get(eventTypeName) != null\r\n && this.soundEventActiveStateMap.get(eventTypeName)\r\n && this.soundsMap.get(eventTypeName) != null) {\r\n\r\n SonificationMap sMap = this.sonificationMap.get(eventTypeName);\r\n if (sMap != null\r\n && this.soundsMap.get(eventTypeName) instanceof SoundMIDI) {\r\n boolean fromMsg = eventTypeName.contains(this.typesNameDelimiter);\r\n\r\n Object evtPropValue = null;\r\n\r\n try {\r\n evtPropValue = getValue(sMap.getPropertyName(), event, fromMsg);\r\n\r\n } catch (Exception ex) {\r\n }\r\n\r\n int instrument = -1;\r\n if (sMap.getSoundPropertyName().equals(NOTE)) {\r\n ((SoundMIDI) this.soundsMap.get(eventTypeName)).setNotes(sMap\r\n .mapNotes(evtPropValue));\r\n }\r\n if (sMap.getSoundPropertyName().equals(DURATION)) {\r\n ((SoundMIDI) this.soundsMap.get(eventTypeName)).setNotes(sMap\r\n .mapDuration(evtPropValue));\r\n }\r\n if (sMap.getSoundPropertyName().equals(VOLUME)) {\r\n ((SoundMIDI) this.soundsMap.get(eventTypeName)).setNotes(sMap\r\n .mapVolume(evtPropValue));\r\n }\r\n if (sMap.getSoundPropertyName().equals(INSTRUMENT_NO)) {\r\n instrument = sMap.mapInstrument(evtPropValue);\r\n ((SoundMIDI) this.soundsMap.get(eventTypeName))\r\n .setInstrument(instrument);\r\n }\r\n\r\n }\r\n\r\n this.soundsMap.get(eventTypeName).play();\r\n }\r\n }", "public static Action playSound(final InputStream sound) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n //MP3.play(sound);\n }\n\n @Override\n public int getCost() {\n return 5;\n }\n\n @Override\n public boolean isExclusive() {\n return false;\n }\n\n @Override\n public Object getData() {\n return sound;\n }\n\n @Override\n public String toString() {\n return \"PlaySound(\" + (sound != null ? sound.toString() : \"null\") + \")\";\n }\n };\n }", "public void toggleSound() { \n\t\tif (mSoundEnable) {\n\t\t\tmSoundEnable = false; \n\t\t\tif (ResourceManager.getInstance().gameMusic.isPlaying())\n\t\t\t\tResourceManager.getInstance().gameMusic.pause();\n\t\t}\n\t\telse {\n\t\t\tmSoundEnable = true;\n\t\t\tif (!ResourceManager.getInstance().gameMusic.isPlaying()) {\n\t\t\t\tResourceManager.getInstance().gameMusic.play();\n\t\t\t}\n\t\t}\n\t}", "public void playClickSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, CLICK);\n\t}", "public void playBeep() {\n // Cách 1: Sử dụng audio có sẵn của android\n// ToneGenerator toneGenerator = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, 500);\n// toneGenerator.startTone(ToneGenerator.TONE_PROP_PROMPT);\n\n // Cách 2: Sử dụng audio của mình\n Uri beepSound = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + File.pathSeparator\n + File.separator + getPackageName() + \"/raw/notifications.mp3\");\n Ringtone ringtone = RingtoneManager.getRingtone(this, beepSound);\n ringtone.play();\n }", "public void playSound(InputStream access)\n {\n if(!mute)\n {\n try{\n InputStream bufferedIn = new BufferedInputStream(access);\n AudioInputStream audioIn = AudioSystem.getAudioInputStream(bufferedIn);\n Clip clip = AudioSystem.getClip();\n clip.open(audioIn);\n clip.start();\n }\n catch(UnsupportedAudioFileException | IOException | LineUnavailableException e1){\n System.out.println(\"Selected Audio File is not compatible/available.\");};\n }\n }", "public void playHitWall() {\r\n hitWall.play(soundFxVol);\r\n }", "private void playAudio(int winLose)\t\t\t\t\t\t\t\n {\n // win\n if(winLose == 1)\n {\n String path = \"src/winningSound.wav\";\n Media media = new Media(new File(path).toURI().toString());\n\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.setCycleCount(1);\n mediaPlayer.setAutoPlay(true);\n }\n // lose\n else\n {\n String path = \"src/loserSound.wav\";\n Media media = new Media(new File(path).toURI().toString());\n mediaPlayer = new MediaPlayer(media);\n mediaPlayer.setCycleCount(1);\n mediaPlayer.setAutoPlay(true);\n }\n }", "public void toggleSound()\n\t{\n\t\tif (sound)\n\t\t\tsound = false;\n\t\telse\n\t\t\tsound = true;\n\t\tnotifyObservers();\n\t}" ]
[ "0.83235884", "0.81556326", "0.8148567", "0.8113563", "0.7984178", "0.79256266", "0.7917265", "0.78503263", "0.7840744", "0.7820898", "0.7769528", "0.77254564", "0.7717483", "0.77147645", "0.77011305", "0.7650783", "0.76360875", "0.7615948", "0.75898665", "0.7584792", "0.7555749", "0.7517612", "0.7502664", "0.74705446", "0.7469099", "0.74652123", "0.74569386", "0.7448758", "0.7447555", "0.7425488", "0.74206585", "0.7404806", "0.7404806", "0.7389854", "0.73626596", "0.73579574", "0.73431134", "0.73419124", "0.73387253", "0.73362345", "0.7324693", "0.73215735", "0.7307207", "0.72998786", "0.7283501", "0.72771937", "0.7272033", "0.7270975", "0.7261973", "0.7256658", "0.7224673", "0.7218581", "0.7209637", "0.719152", "0.718487", "0.7182722", "0.7177821", "0.71746916", "0.7174577", "0.71719646", "0.71670586", "0.716532", "0.7165202", "0.7152077", "0.7147661", "0.71460336", "0.7144399", "0.71431977", "0.7138812", "0.7130137", "0.7115003", "0.71140754", "0.71057457", "0.70985603", "0.7097408", "0.70695716", "0.7068212", "0.7061955", "0.7061945", "0.7060284", "0.7048156", "0.70385957", "0.7037609", "0.70334643", "0.70331746", "0.70315295", "0.7021205", "0.7016848", "0.7015027", "0.70103115", "0.6997001", "0.6996057", "0.6993478", "0.69812596", "0.69797134", "0.69787", "0.6977624", "0.6976392", "0.6972811", "0.69700164", "0.6969788" ]
0.0
-1
logger.info("sent msg :\r\n " + writeRequest.getMessage());
@Override public void messageSent(NextFilter nextFilter, IoSession session, WriteRequest writeRequest) throws Exception { nextFilter.messageSent(session, writeRequest); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void log(String msg) throws IOException {\n\t\t\n\t}", "void log(HandlerInput input, String message) {\n System.out.printf(\"[%s] [%s] : %s]\\n\",\n input.getRequestEnvelope().getRequest().getRequestId().toString(),\n new Date(),\n message);\n }", "protected void log(String s ) {\r\n\tmessageSB.append( s ).append(\"\\r\\n\");\r\n }", "public void log(String msg) {\n\n\t}", "private void logIt(String msg) {\n\tSystem.out.println(\"PLATINUM-SYNC-LOG: \" + msg);\n}", "protected final void log(String msg)\r\n {\r\n Debug.println(\"Server: \" + msg);\r\n }", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "private void log(String msg) {\r\n\t\tif (logger != null) {\r\n\t\t\tlogger.append(msg);\r\n\t\t\tlogger.println();\r\n\t\t}\r\n\t}", "void messageSent();", "private static void log(String aMsg){\n\t System.out.println(aMsg);\n\t }", "private ACLMessage respondToLogMessage(ACLMessage request, Action a) {\n\t\t\n\t\tLogMessage logMessage = (LogMessage) a.getAction();\t\t\n\t\tString message = logMessage.getMessage();\n\t\tgetLogger().log(Level.INFO, message);\n\t\t\n\t\treturn null;\n\t}", "void log(Message message);", "private void log(String msg) {\r\n\t\tif(this.out != null) {\r\n\t\t\tthis.out.println(msg);\r\n\t\t\tthis.out.flush();\r\n\t\t}\r\n\t}", "private static void log(String msg) {\n System.out.println(msg);\n }", "public void writeMassege() {\n m = ChatClient.message;\n jtaChatHistory.setText(\"You : \" + m);\n //writeMassageServer();\n }", "private void write(String msg)\r\n {\r\n System.out.println(msg);\r\n if (report_ != null) {\r\n report_.write(msg);\r\n }\r\n }", "private void log(String message) {\n System.out.println( message );\n sb.append( message ).append( \"\\n\" );\n }", "@Override\n public void log(String message) {\n }", "public void sendMessage(String message) {\n\t\tSystem.out.println(\"DEBUG : response sent by server = \" + message);\n\t\tprinter.println(message);\n\t}", "@Override\r\n\tprotected void logMessage(String message) {\n\t\t\r\n\t}", "void write(String message) {\n this.message = message;\n }", "void out( Object msg );", "java.lang.String getLogMessage();", "void sendMessage() {\n\n\t}", "private static final void log(String msg) {\n\t\tlog.println(msg);\n\t}", "private static void print(Object msg){\n if (WAMClient.Debug){\n System.out.println(msg);\n }\n\n }", "void sendMessage(String message) {\n writer.println(message);\n }", "public void sendLoggerMessage(String msg) {\n\t\tif (!connectionActive()) {\n\t\t\tthrow new IllegalOperationException(\"Cannot send a message if you are not connected to a server!\\n\");\n\t\t}\n\t\tMessage loggerMessage = Message.makeLoggerMessage(getUserName(), msg);\n\t\tsocketConnection.print(loggerMessage);\n\t}", "public void sendMsgToClient() {\n\n try {\n\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())), true);\n\n Log.d(TAG, \"The transmitted data:\" + msg);\n\n writer.println(msg);\n\n } catch (Exception e) {\n\n e.printStackTrace();\n\n }\n\n }", "public void writeOutput(String msg){\n msg = \"Message:\" + username + \" : \" + msg;//koristi se zbog parsiranja u metodi readInput\n out.println(msg);\n }", "@Override\n\tpublic ReturnCode loggerWrite(byte[] buffer, int len) {\n\t\t\n\t\tSystem.out.println(new String(buffer));\n\t\treturn InstaMsg.ReturnCode.SUCCESS;\n\t}", "private void sendMsgToClient(String msg) {\n controlOutWriter.println(msg);\n }", "private String requesttosend() throws IOException {\n\t\tsender.sendMsg(Constants.REQSEND);\r\n\t\t//等待接收的返回状态\r\n\t\treturn sender.getMsg();\r\n\t}", "void sendData(String msg) throws IOException\n {\n if ( msg.length() == 0 ) return;\n//\n msg += \"\\n\";\n// Log.d(msg, msg);\n if (outputStream != null)\n outputStream.write(msg.getBytes());\n// myLabel.setText(\"Data Sent\");\n// myTextbox.setText(\" \");\n }", "void sendMessage(String msg) {\n\t\ttry {\n\t\t\tout.writeObject(msg);\n\t\t\tout.flush();\n\t\t\tSystem.out.println(\"Sending to server => \" + msg);\n\t\t} catch (IOException ioException) {\n\t\t\tioException.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void log(Level level, Message msg) {\n\n\t}", "public void logMessage( Object p_msg);", "final void out (String msg) { if (m_debugMode) { Logger.println (msg); } }", "public void sendMessage(String msg){\n \n try{\n out.writeObject(msg.toString()); \n \n }catch(Exception e){\n e.printStackTrace();\n }\n }", "public abstract void outWrite(final String msg);", "public void logthis(String msg) {\n logger.append(msg + \"\\n\");\n Log.d(TAG, msg);\n }", "private void logMessage(String msg) {\n\n\t\tlog.logMsg(\"(L\" + lexAnalyser.getLineCount() + \")\" + msg + \"\\n\");\n\n\t\t// System.out.println(\"(L\" + lexAnalyser.getLineCount() + \")\" + msg);\n\n\t}", "void sendMessage(ChatMessage msg) {\n\t\ttry {\n\t\t\tsOutput.writeObject(msg);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tdisplay(\"Não foi possível enviar a mesagem !!!\");\n\t\t}\n\t}", "private void sendMsg()\n {\n try {\n spauldingApp.println(\"AckRequest.sendMsg() - sending request to nodeID= \" + node.getNodeID() + \" ...\");\n this.nbrTransmits++;\n //spauldingApp.eventLogger.writeMsgSentPing(fetchReqMsg);\n spauldingApp.getMoteIF().send(node.getNodeID(), requestMsg);\n } catch (Exception e) {\n spauldingApp.println(\"ERROR: Can't send message: \" + e);\n e.printStackTrace();\n }\n }", "@Override\r\n\tvoid updateMessage(String msg) {\n\t\tSystem.out.println(msg);\r\n\t}", "private void log(String msg) {\n\t\tSystem.out.println(new Date() + \": \" + msg);\n\t}", "public void log(HttpServletRequest request, HttpServletResponse response) {\n\t\tObjectNode ecs = getLoggableMessage(request, response);\n\t\tlog.info(new ObjectMessage(ecs));\n\t}", "private void log(String message) {\n System.out.println(message);\n }", "private static void postMessageAndLog(MessageChannel chan, String message){\n chan.sendMessage(message).queue();\n if(Config.debug){\n System.out.println(\"<\" + Config.bot_name + \"> \" + message);\n }\n }", "public void write(String message) {\n System.out.println(\"Sent \" + message + \" to client \" + client + \".\");\n out.println(message);\n }", "public String getRequestMessage()\r\n/* 34: */ {\r\n/* 35:26 */ return this.requestMessage;\r\n/* 36: */ }", "@Override\n\tpublic void sendMessage() {\n\t\t\n\t}", "public void info(Object message)\n/* */ {\n/* 145 */ if (message != null) {\n/* 146 */ getLogger().info(String.valueOf(message));\n/* */ }\n/* */ }", "public void log (Object msg) {\n getLogEvent().addMessage (msg);\n }", "@Override\n\tpublic void log(Level level, Marker marker, Message msg) {\n\n\t}", "@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}", "@Override\n public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {\n String body = (String) msg;\n System.out.println(body);\n System.out.println(\"第\"+ ++count + \"次收到服务器回应\");\n }", "public void getMessage() {\n\r\n\t}", "public void save(String msg) {\n\t\tSystem.out.println(\"测试——msg\"+msg);\n\t}", "@Override\n\tpublic void info(Message msg) {\n\n\t}", "protected void logging(Message message) throws Fault {\n\t\tif (message.containsKey(LoggingMessage.ID_KEY)) {\n return;\n }\n String id = (String)message.getExchange().get(LoggingMessage.ID_KEY);\n if (id == null) {\n id = LoggingMessage.nextId();\n message.getExchange().put(LoggingMessage.ID_KEY, id);\n }\n message.put(LoggingMessage.ID_KEY, id);\n final LoggingMessage buffer \n = new LoggingMessage(\"Inbound Message\\n--------------------------\", id);\n\n Integer responseCode = (Integer)message.get(Message.RESPONSE_CODE);\n if (responseCode != null) {\n buffer.getResponseCode().append(responseCode);\n }\n\n String encoding = (String)message.get(Message.ENCODING);\n\n if (encoding != null) {\n buffer.getEncoding().append(encoding);\n }\n String httpMethod = (String)message.get(Message.HTTP_REQUEST_METHOD);\n if (httpMethod != null) {\n buffer.getHttpMethod().append(httpMethod);\n }\n String ct = (String)message.get(Message.CONTENT_TYPE);\n if (ct != null) {\n buffer.getContentType().append(ct);\n }\n Object headers = message.get(Message.PROTOCOL_HEADERS);\n\n if (headers != null) {\n buffer.getHeader().append(headers);\n }\n String uri = (String)message.get(Message.REQUEST_URL);\n if (uri != null) {\n buffer.getAddress().append(uri);\n String query = (String)message.get(Message.QUERY_STRING);\n if (query != null) {\n buffer.getAddress().append(\"?\").append(query);\n }\n }\n \n if (!isShowBinaryContent() && isBinaryContent(ct)) {\n buffer.getMessage().append(BINARY_CONTENT_MESSAGE).append('\\n');\n log.handle(RequestLogController.getInstance().getRequestLogLevel(), \n \t\tbuffer.toString());\n return;\n }\n \n InputStream is = message.getContent(InputStream.class);\n if (is != null) {\n CachedOutputStream bos = new CachedOutputStream();\n if (threshold > 0) {\n bos.setThreshold(threshold);\n }\n try {\n // use the appropriate input stream and restore it later\n InputStream bis = is instanceof DelegatingInputStream \n ? ((DelegatingInputStream)is).getInputStream() : is;\n \n IOUtils.copyAndCloseInput(bis, bos);\n bos.flush();\n bis = bos.getInputStream();\n \n // restore the delegating input stream or the input stream\n if (is instanceof DelegatingInputStream) {\n ((DelegatingInputStream)is).setInputStream(bis);\n } else {\n message.setContent(InputStream.class, bis);\n }\n\n if (bos.getTempFile() != null) {\n //large thing on disk...\n buffer.getMessage().append(\"\\nMessage (saved to tmp file):\\n\");\n buffer.getMessage().append(\"Filename: \" + bos.getTempFile().getAbsolutePath() + \"\\n\");\n }\n if (bos.size() > limit) {\n buffer.getMessage().append(\"(message truncated to \" + limit + \" bytes)\\n\");\n }\n writePayload(buffer.getPayload(), bos, encoding, ct); \n \n bos.close();\n } catch (Exception e) {\n throw new Fault(e);\n }\n }\n log.handle(RequestLogController.getInstance().getRequestLogLevel(), \n \t\tbuffer.toString());\n\t}", "private String logString(String s) {\n Log.i(\"write string\", s);\n return s;\n }", "public void sendMessage(String msg) {\n try {\n out.write(msg);\n out.newLine();\n out.flush();\n \n } catch (IOException e) {\n \tshutdown();\n e.printStackTrace();\n }\n }", "public void write(String message) {\n\t Log.d(TAG, \"...Данные для отправки: \" + message + \"...\");\n\t byte[] msgBuffer = message.getBytes();\n\t try {\n\t mmOutStream.write(msgBuffer);\n\t } catch (IOException e) {\n\t Log.d(TAG, \"...Ошибка отправки данных: \" + e.getMessage() + \"...\"); \n\t }\n\t }", "public void log(String message) {\n\t}", "void sendMessage(String msg);", "public void logMsg(String msg) {\r\n if (this.logger != null) {\r\n logger.info(msg);\r\n }\r\n }", "ExtendedCommonLogger() {\n this.msgbuf = new byte[128];\n }", "void sendMessage(String msg) {\n\t\ttry {\n\t\t\tout.writeObject(msg);\n\t\t\tout.flush();\n\t\t\tSystem.out.println(\"Sending to client => \" + msg);\n\t\t} catch (IOException ioException) {\n\t\t\tioException.printStackTrace();\n\t\t}\n\t}", "public synchronized void log(String msg) {\n\t\tSystem.err.println(msg);\n\t}", "public void send(String request){\n try {\n streamOut.writeUTF(request);\n streamOut.flush();\n connected = true;\n System.out.println(clientID+\": send: \"+request);\n } catch (IOException ioe) {\n System.out.println(ioe);\n System.out.println(clientID+\": failedToSend: \"+request+\": IOException: \"+ioe);\n }\n }", "@Override\n public void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception {\n System.err.println(\"来自client的信息:\" + msg);\n Gson gson = new Gson();\n UserInfo userInfo = gson.fromJson(msg, UserInfo.class);\n\n msg = \"用户名:\"+ userInfo.getUsername()+ \" 密码:\" + userInfo.getPassword() + \"----\" + ctx.channel().remoteAddress()+ \"----\" + msg;\n Log.d(\"tag\",msg);\n System.out.println(ctx.channel().id());\n ctx.writeAndFlush(\"1\\n\");\n //ctx.writeAndFlush(\"[\" + ctx.channel().remoteAddress() + \"] \" + msg + '\\n');\n\n }", "protected void log(Object msg) {\n\t\n\t\tSystem.out.println(\"MusicDataAccessor: \" + msg);\n\t}", "public StringBuilder sendMessage(String msg) throws IOException {\n out.println(msg);\n String resp = \"\";\n StringBuilder stringBuilder = new StringBuilder();\n if(msg.length() >3 && msg.substring(0,3).equals(\"GET\")) {\n while (true) {\n String newLine;\n newLine = in.readLine();\n\n if (newLine.equals(\"~~~END~~~\")) {\n return stringBuilder;\n }\n else{stringBuilder.append(newLine);\n stringBuilder.append(System.getProperty(\"line.separator\"));\n }\n }\n }\n else {\n stringBuilder.append(in.readLine());\n\n\n }\n return stringBuilder;\n\n }", "@Override\n\tpublic void processRequest(RequestEvent requestEvent) {\n\t\t requestEvent.getServerTransaction();\n\t\tSystem.out.println(\"Sending ------------------------------------------------------------------------------------------\");\n\t\tSystem.out.println(\"[]:\"+requestEvent.toString());\n\t}", "private void logInfo(String msgText) {\n System.out.println (\"[INFO] \" + msgText);\n \n }", "abstract void logMessage(String message);", "private void log(String message) {\n System.out.println(message);\n }", "public void log(Request request, Reply reply, int nbytes, long duration) {\n Client client = request.getClient();\n long date = reply.getDate();\n String user = (String) request.getState(AuthFilter.STATE_AUTHUSER);\n URL urlst = (URL) request.getState(Request.ORIG_URL_STATE);\n String requrl;\n if (urlst == null) {\n URL u = request.getURL();\n if (u == null) {\n requrl = noUrl;\n } else {\n requrl = u.toExternalForm();\n }\n } else {\n requrl = urlst.toExternalForm();\n }\n StringBuffer sb = new StringBuffer(512);\n String logs;\n int status = reply.getStatus();\n if ((status > 999) || (status < 0)) {\n status = 999;\n }\n synchronized (sb) {\n byte ib[] = client.getInetAddress().getAddress();\n if (ib.length == 4) {\n boolean doit;\n edu.hkust.clap.monitor.Monitor.loopBegin(349);\nfor (int i = 0; i < 4; i++) { \nedu.hkust.clap.monitor.Monitor.loopInc(349);\n{\n doit = false;\n int b = ib[i];\n if (b < 0) {\n b += 256;\n }\n if (b > 99) {\n sb.append((char) ('0' + (b / 100)));\n b = b % 100;\n doit = true;\n }\n if (doit || (b > 9)) {\n sb.append((char) ('0' + (b / 10)));\n b = b % 10;\n }\n sb.append((char) ('0' + b));\n if (i < 3) {\n sb.append('.');\n }\n }} \nedu.hkust.clap.monitor.Monitor.loopEnd(349);\n\n } else {\n sb.append(client.getInetAddress().getHostAddress());\n }\n sb.append(\" - \");\n if (user == null) {\n sb.append(\"- [\");\n } else {\n sb.append(user);\n sb.append(\" [\");\n }\n dateCache(date, sb);\n sb.append(\"] \\\"\");\n sb.append(request.getMethod());\n sb.append(' ');\n sb.append(requrl);\n sb.append(' ');\n sb.append(request.getVersion());\n sb.append(\"\\\" \");\n sb.append((char) ('0' + status / 100));\n status = status % 100;\n sb.append((char) ('0' + status / 10));\n status = status % 10;\n sb.append((char) ('0' + status));\n sb.append(' ');\n if (nbytes < 0) {\n sb.append('-');\n } else {\n sb.append(nbytes);\n }\n if (request.getReferer() == null) {\n if (request.getUserAgent() == null) {\n sb.append(\" \\\"-\\\" \\\"-\\\"\");\n } else {\n sb.append(\" \\\"-\\\" \\\"\");\n sb.append(request.getUserAgent());\n sb.append('\\\"');\n }\n } else {\n if (request.getUserAgent() == null) {\n sb.append(\" \\\"\");\n sb.append(request.getReferer());\n sb.append(\"\\\" \\\"-\\\"\");\n } else {\n sb.append(\" \\\"\");\n sb.append(request.getReferer());\n sb.append(\"\\\" \\\"\");\n sb.append(request.getUserAgent());\n sb.append('\\\"');\n }\n }\n sb.append('\\n');\n logs = sb.toString();\n }\n logmsg(logs);\n }", "@Override\n public void logs() {\n \n }", "private void printMsg(String msg) {\n Log.i(\"memorycat_log_tag\",msg);\n }", "@Override\n protected void encode(ChannelHandlerContext channelHandlerContext, RequestMessage msg, ByteBuf out) throws Exception {\n byte[] bytes = REQUEST_MESSAGE_CODEC.encode(msg);\n out.writeBytes(REQUEST_HEADER);\n out.writeBytes(Integer.toString(bytes.length).getBytes(StandardCharsets.US_ASCII));\n out.writeBytes(CRLF);\n out.writeBytes(bytes);\n }", "public void writeString(String message);", "@Override\n\t\t\tpublic void onResponse(Response response) throws IOException {\n Log.i(\"info\",response.body().string());\n\t\t\t}", "@Override\n\tpublic void send(String msg) {\n\t}", "private static void log(String message) {\n System.out.println(message);\n }", "public void logs(Object message) {\n System.out.println(message.toString());\n }", "private void sendMessage(ChatMessage msg) throws IOException {\n try {\n sOutput.writeObject(msg);\n } catch (IOException e) {\n sOutput.close();\n sInput.close();\n e.printStackTrace();\n }\n //sOutput.flush();\n }", "private void writeMessage(Message message) throws IOException {\n Message.Command temp = message.getCommand();\n if (temp != Message.Command.GET_RESERVED && temp != Message.Command.GET_AVAILABLE) {\n connectionLoggerService.add(\"Bank : \" + message.toString());\n }\n objectOutputStream.reset();\n objectOutputStream.writeObject(message);\n }", "@Override\n\tpublic void sendMsg(String msg) {\n\n\t}", "public void info(String msg) {\n LOGGER_BASE.info(msg);\n }", "@Override\n public void handleMessage(Message message) {\n Bundle data = message.getData();\n\n // reference input id\n final int inputId = message.arg1;\n\n// Log.i(TAG, \"Received message[\"+message.arg1+\"] => \"+message.what);\n\n // depending on the objective of the message\n switch(message.what) {\n\n // get recording status\n case Geotracer.MESSAGE_OBJECTIVE_RECORDING_STATUS:\n success(message, mService.getRecordingStatus());\n break;\n\n // create a logger\n case Geotracer.MESSAGE_OBJECTIVE_LOGGER_CREATE:\n try {\n\n // get class name\n String className = data.getString(Geotracer.EXTRA_LOGGER_CLASS);\n\n // reference class object\n Class loggerClass = Class.forName(className);\n\n // fetch constructors\n Constructor constructor = loggerClass.getConstructors()[0]; //(Context.class, Bundle.class);\n\n // fetch args bundle\n Bundle args = data.getBundle(Geotracer.EXTRA_LOGGER_ARGS);\n\n // instantiate logger\n _Logger logger = (_Logger) constructor.newInstance(mContext, args);\n\n // feed logger to service, get logger id\n int loggerId = mService.addLogger(logger);\n\n Log.d(TAG, \"Constructed new _Logger: \"+loggerId);\n\n // send logger id back to activity\n success(message, loggerId);\n\n// } catch(NoSuchMethodException x) {\n// x.printStackTrace();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch(IndexOutOfBoundsException x) {\n x.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n\n // create an encoder\n case Geotracer.MESSAGE_OBJECTIVE_ENCODER_CREATE:\n\n try {\n // get class name\n String className = data.getString(Geotracer.EXTRA_ENCODER_CLASS);\n\n // reference class object\n Class encoderClass = Class.forName(className);\n\n // fetch constructor\n Constructor constructor = encoderClass.getConstructors()[0];\n\n // fetch logger id\n int loggerId = data.getInt(Geotracer.EXTRA_INPUT_ID);\n\n // get logger\n _Logger logger = mService.getLogger(loggerId);\n\n // instantiate encoder\n _Encoder encoder = (_Encoder) constructor.newInstance(mContext, logger);\n\n // feed encoder to service, get encoder id\n int encoderId = mService.addEncoder(encoder, className);\n\n //\n Log.d(TAG, \"Constructed new _Encoder [#\"+encoderId+\"]: \"+encoder+\" using Logger #\"+loggerId);\n\n // send encoder id back to activity\n success(message, encoderId);\n\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch(IndexOutOfBoundsException x) {\n x.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n\n //\n case Geotracer.MESSAGE_OBJECTIVE_ENCODER_START:\n\n // requester wants to receive updates\n if(Geotracer.MESSAGE_ARG_REQUEST_OPTION == message.arg2) {\n\n // establish a final connection to the reply address\n final Messenger replyTo = message.replyTo;\n\n // start the encoder\n mService.getEncoder(inputId).start(new IpcSubscriber() {\n @Override\n public void event(Parcelable eventData, EventDetails eventDetails) {\n Bundle response = new Bundle();\n response.putParcelable(Geotracer.EXTRA_EVENT_DATA, eventData);\n response.putParcelable(Geotracer.EXTRA_EVENT_DETAILS, eventDetails);\n data(replyTo, inputId, response);\n }\n\n @Override\n public void notice(int noticeType, int noticeValue, Parcelable data) {\n Bundle response = new Bundle();\n response.putInt(Geotracer.EXTRA_NOTICE_TYPE, noticeType);\n response.putInt(Geotracer.EXTRA_NOTICE_VALUE, noticeValue);\n response.putParcelable(Geotracer.EXTRA_NOTICE_DATA, data);\n// noticefy(replyTo, inputId, response);\n }\n\n @Override\n public void error(String error) {\n Bundle response = new Bundle();\n response.putString(Geotracer.EXTRA_ERROR, error);\n err(replyTo, inputId, response);\n }\n });\n }\n //\n else {\n mService.getEncoder(inputId).start();\n }\n break;\n\n case Geotracer.MESSAGE_OBJECTIVE_ENCODER_STOP: {\n // non-immediate success callbacks\n final Messenger replyTo = message.replyTo;\n final int objectiveId = message.what;\n final int requestId = data.getInt(Geotracer.EXTRA_REQUEST_ID, -1);\n\n //\n mService.getEncoder(inputId).stop(new Attempt() {\n @Override\n public void ready() {\n Log.w(TAG, \"Stopped Encoder \"+mService.getEncoder(inputId).getClass().getSimpleName());\n mService.removeEncoder(inputId);\n success(replyTo, objectiveId, requestId, inputId);\n }\n });\n } break;\n\n case Geotracer.MESSAGE_OBJECTIVE_LOGGER_CLOSE:\n mService.closeLogger(inputId, data);\n success(message, inputId);\n break;\n\n case Geotracer.MESSAGE_OBJECTIVE_ENCODER_SUBSCRIBE: {\n// String encoderClassName = data.getString(Geotracer.EXTRA_ENCODER_CLASS);\n// int requestId = data.getInt(Geotracer.EXTRA_REQUEST_ID, -1);\n//\n// int encoderId = mService.lookupEncoder(encoderClassName);\n final Messenger replyTo = message.replyTo;\n\n mService.getEncoder(inputId).replaceCuriousSubscriber(new IpcSubscriber() {\n @Override\n public void event(Parcelable eventData, EventDetails eventDetails) {\n Bundle response = new Bundle();\n response.putParcelable(Geotracer.EXTRA_EVENT_DATA, eventData);\n response.putParcelable(Geotracer.EXTRA_EVENT_DETAILS, eventDetails);\n data(replyTo, inputId, response);\n }\n\n @Override\n public void notice(int noticeType, int noticeValue, Parcelable data) {\n Bundle response = new Bundle();\n response.putInt(Geotracer.EXTRA_NOTICE_TYPE, noticeType);\n response.putInt(Geotracer.EXTRA_NOTICE_VALUE, noticeValue);\n response.putParcelable(Geotracer.EXTRA_NOTICE_DATA, data);\n// noticefy(replyTo, inputId, response);\n }\n\n @Override\n public void error(String error) {\n Bundle response = new Bundle();\n response.putString(Geotracer.EXTRA_ERROR, error);\n err(replyTo, inputId, response);\n }\n });\n } break;\n }\n }", "@Override\r\n public void writeMessage(Message msg) throws IOException {\n final StringBuilder buf = new StringBuilder();\r\n msg.accept(new DefaultVisitor() {\r\n\r\n @Override\r\n public void visitNonlocalizableTextFragment(VisitorContext ctx,\r\n NonlocalizableTextFragment fragment) {\r\n buf.append(fragment.getText());\r\n }\r\n\r\n @Override\r\n public void visitPlaceholder(VisitorContext ctx, Placeholder placeholder) {\r\n buf.append(placeholder.getTextRepresentation());\r\n }\r\n\r\n @Override\r\n public void visitTextFragment(VisitorContext ctx, TextFragment fragment) {\r\n buf.append(fragment.getText());\r\n }\r\n });\r\n out.write(buf.toString().getBytes(UTF8));\r\n }", "private void sendMessage(ChatMessage msg) {\n try {\n sOutput.writeObject(msg);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void sendMessage(ChatMessage msg) {\n try{\n loginOutput.writeObject(msg);\n }\n catch(IOException e){\n display(\"Exception on send message to server: \" + e);\n }\n }", "public void send() {\n\t}", "@Override\n\tpublic void SendMessage(String message) {\n\t\t\n\t\ttry\n\t\t{\n\t\tprintWriters.get(clients.get(0)).println(message);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\n\t}", "boolean log(String msg) {\n String name = \"log_peer[\" + id + \"]\" + \".log\";\n java.util.Date date = new java.util.Date();\n Timestamp ts = new Timestamp(date.getTime());\n msg = \"[\" + ts + \"]: \" + msg;\n try (PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(name, true)))) {\n out.println(msg);\n } catch (IOException e) {\n //exception handling left as an exercise for the reader\n System.out.println(e);\n return false;\n }\n return true;\n }", "public void sendMessage(String message) {}" ]
[ "0.6396673", "0.63775", "0.6369656", "0.63375175", "0.63193905", "0.62893116", "0.6284978", "0.6284978", "0.6284978", "0.62707305", "0.6194711", "0.61870486", "0.61469144", "0.6127196", "0.6100903", "0.607817", "0.60744137", "0.6052935", "0.6032985", "0.60146105", "0.6005665", "0.59929883", "0.5982961", "0.59791654", "0.59736615", "0.5969378", "0.59650195", "0.5932131", "0.59232706", "0.5917935", "0.5899126", "0.5893277", "0.5892669", "0.5884434", "0.5882644", "0.587909", "0.5867113", "0.58668303", "0.5856533", "0.58424973", "0.5837322", "0.58368206", "0.5834911", "0.58268124", "0.5826652", "0.58134824", "0.5798545", "0.57980955", "0.5795736", "0.57866967", "0.5773655", "0.5768111", "0.57630044", "0.57603276", "0.57561797", "0.5754277", "0.5752322", "0.5751709", "0.57481736", "0.57436234", "0.57427967", "0.5741407", "0.57410425", "0.57287556", "0.57286465", "0.5723276", "0.5719922", "0.571629", "0.57075226", "0.5699037", "0.56967026", "0.56771284", "0.56673443", "0.56659603", "0.56650543", "0.5662735", "0.56584394", "0.56559867", "0.56517196", "0.5649057", "0.5641439", "0.56380355", "0.5627203", "0.56256175", "0.5625292", "0.562347", "0.56225085", "0.5611279", "0.5602144", "0.55890214", "0.5578452", "0.5578071", "0.55776143", "0.55728835", "0.5562706", "0.55602723", "0.55584407", "0.55473775", "0.5543854", "0.55365646", "0.55335844" ]
0.0
-1
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Estadio)) { return false; } Estadio other = (Estadio) object; if ((this.codEstadio == null && other.codEstadio != null) || (this.codEstadio != null && !this.codEstadio.equals(other.codEstadio))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public int getId(){ return id; }", "public int getId() {return id;}", "public int getId() {return Id;}", "public int getId(){return id;}", "public void setId(long id) {\n id_ = id;\n }", "private int getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId(){return id;}", "public int id() {return id;}", "public long getId(){return this.id;}", "public int getId(){\r\n return this.id;\r\n }", "@Override public String getID() { return id;}", "public Long id() { return this.id; }", "public Integer getId() { return id; }", "@Override\n\tpublic Integer getId() {\n return id;\n }", "@Override\n public Long getId () {\n return id;\n }", "@Override\n public long getId() {\n return id;\n }", "public Long getId() {return id;}", "public Long getId() {return id;}", "public String getId(){return id;}", "@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}", "public Integer getId() { return this.id; }", "@Override\r\n public int getId() {\n return id;\r\n }", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "public int getId() {\n return id;\n }", "public long getId() { return _id; }", "public int getId() {\n/* 35 */ return this.id;\n/* */ }", "public long getId() { return id; }", "public long getId() { return id; }", "public void setId(Long id) \n {\n this.id = id;\n }", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "public void setId(String id) {\n this.id = id;\n }", "@Override\n\tpublic void setId(Long id) {\n\t}", "public Long getId() {\n return id;\n }", "public long getId() { return this.id; }", "public int getId()\n {\n return id;\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}", "protected abstract String getId();", "@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}", "public String getId() { return id; }", "public String getId() { return id; }", "public String getId() { return id; }", "public int getID() {return id;}", "public int getID() {return id;}", "public int getId ()\r\n {\r\n return id;\r\n }", "@Override\n public int getField(int id) {\n return 0;\n }", "public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }", "public int getId(){\r\n return localId;\r\n }", "void setId(int id) {\n this.id = id;\n }", "@Override\n public Integer getId() {\n return id;\n }", "@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "@Override\n public int getId() {\n return id;\n }", "@Override\n public int getId() {\n return id;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }", "@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}", "public int getId()\r\n {\r\n return id;\r\n }", "public void setId(Long id){\n this.id = id;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "final protected int getId() {\n\t\treturn id;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "public abstract Long getId();", "public void setId(Long id) \r\n {\r\n this.id = id;\r\n }", "@Override\n public long getId() {\n return this.id;\n }", "public String getId(){ return id.get(); }", "@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }", "public Long getId() \n {\n return id;\n }", "@Override\n\tpublic void setId(int id) {\n\n\t}", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}", "public int getId()\n {\n return id;\n }", "public int getID(){\n return id;\n }", "public String getID(){\n return Id;\n }" ]
[ "0.6897049", "0.6839498", "0.67057544", "0.66417086", "0.66417086", "0.6592169", "0.6579292", "0.6579292", "0.6575263", "0.6575263", "0.6575263", "0.6575263", "0.6575263", "0.6575263", "0.656245", "0.656245", "0.65447694", "0.65251684", "0.6516205", "0.6487982", "0.6477638", "0.6428175", "0.64196116", "0.6418121", "0.64022696", "0.6367566", "0.6355691", "0.6352598", "0.6348783", "0.6325491", "0.63200915", "0.63026214", "0.62942576", "0.62942576", "0.62838596", "0.62720686", "0.6267314", "0.62664306", "0.62634486", "0.626002", "0.6256922", "0.6251961", "0.6248661", "0.6248661", "0.6245221", "0.62398785", "0.62398785", "0.62326866", "0.62245816", "0.6220949", "0.6220645", "0.6212643", "0.6210262", "0.62027115", "0.62024575", "0.6193926", "0.61905754", "0.61905754", "0.61905754", "0.6190146", "0.6190146", "0.618559", "0.61844486", "0.61750674", "0.61745095", "0.6168598", "0.6167194", "0.6161174", "0.61578095", "0.61578095", "0.61578095", "0.61578095", "0.61578095", "0.61578095", "0.61578095", "0.6156709", "0.6156709", "0.6143479", "0.6135095", "0.6129762", "0.6129127", "0.61063343", "0.61055714", "0.61055714", "0.6104239", "0.61037016", "0.6102918", "0.61012363", "0.6100267", "0.6094533", "0.60939157", "0.60936975", "0.60936975", "0.60916936", "0.60904694", "0.6077306", "0.6073186", "0.60725886", "0.60711926", "0.60707015", "0.6070076" ]
0.0
-1
Delete method get column pointer from getRow() and delete the value of that column
public void deleteSelectRecord(User selectUser) { Connection con; try { con = ClassSQL.getConnect(); Statement stmt = con.createStatement(); String sql = Deletestmt(selectUser.getmNum()); // System.out.println(sql); //for testing purposes stmt.executeUpdate(sql); con.close(); } catch (SQLException ex) { ex.printStackTrace(); } finally { // Place code in here that will always be run. } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public native void deleteRow(int row) /*-{\n\t\tvar jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();\n\t\tjso.deleteRow(row);\n }-*/;", "private void delete(ByteBuffer rowKey,\n Clustering<?> clustering,\n Cell<?> cell,\n WriteContext ctx,\n long nowInSec)\n {\n DecoratedKey valueKey = getIndexKeyFor(getIndexedValue(rowKey,\n clustering,\n cell));\n doDelete(valueKey,\n buildIndexClustering(rowKey, clustering, cell),\n DeletionTime.build(cell.timestamp(), nowInSec),\n ctx);\n }", "void removeRow(int row_index) throws IOException;", "public void removeRow(String rowName);", "public int deleteIndex(FeatureRow row) {\n return deleteIndex(row.getId());\n }", "public void removeRow(int ind) throws SQLException {\n/* 417 */ notSupported();\n/* */ }", "void remove(int row, int column) {\n SparseArrayCompat<TObj> array = mData.get(row);\n if (array != null) {\n array.remove(column);\n }\n }", "public void removeRow(int row) {\r\n\t\tdata.remove(row);\r\n\t}", "public void deleteRow(Row _deleteThis){\r\n if(!validTable()){\r\n System.out.println(\"Error:Table:deleteRow: table invalid, nothing done\");\r\n return;\r\n }\r\n Set<String> keys = rows.keySet();\r\n //Searches for row to delete and then removes it\r\n for(String k : keys) {\r\n if(_deleteThis.getData() == rows.get(k).getData()){\r\n rows.remove(k);\r\n return;\r\n }\r\n }\r\n System.out.println(\"Error:Table:deleteRow: Unable to find passed row, no row deleted\");\r\n }", "private void delete(ByteBuffer rowKey,\n Clustering<?> clustering,\n DeletionTime deletion,\n WriteContext ctx)\n {\n DecoratedKey valueKey = getIndexKeyFor(getIndexedValue(rowKey,\n clustering,\n null));\n doDelete(valueKey,\n buildIndexClustering(rowKey, clustering, null),\n deletion,\n ctx);\n }", "public void deleteRow(int row) throws IndexOutOfBoundsException{\r\n data.remove(row);\r\n fireTableRowsDeleted(row,row);\r\n }", "public void deleteColumn(Column column) {\n\t\t// Start of user code for method deleteColumn\n\t\t// End of user code\n\t}", "public DResult delete(byte[] row, long startId) throws IOException;", "byte[] getRow() {\r\n return delete.getRow();\r\n }", "public void removeRowAt(int row)\r\n throws IllegalStateException {\r\n if(!(Integer.parseInt(((Vector)data.elementAt(row)).elementAt\r\n (numberOfcolumns).toString()) == IS_INSERTED)){\r\n ( (Vector) data.elementAt(row)).\r\n setElementAt(new Integer(IS_DELETED), numberOfcolumns);\r\n dataDeleted.add((Vector)data.elementAt(row));\r\n }\r\n data.removeElementAt(row);\r\n this.deletedStatus = true;\r\n }", "public void toDeletIndex()\n {\n try\n { \n //DefaultTableModel model=(DefaultTableModel)jt.getModel(); \n //jt.getModel();\n int num=Integer.parseInt(JOptionPane.showInputDialog(rootPane,\"Enter the row number\")); \n jtModel.removeRow(num-1);\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted selected row number \" +num);\n }\n catch(NumberFormatException ex)\n {\n JOptionPane.showMessageDialog(rootPane,\"Enter integer not alphabet\");\n } \n catch(ArrayIndexOutOfBoundsException ex)\n {\n JOptionPane.showMessageDialog(rootPane,\"This row dosent exist\");\n }\n }", "public abstract void rowsDeleted(int firstRow, int endRow);", "@Override\r\n\tpublic int deleteOne(int idx) throws SQLException {\n\t\treturn 0;\r\n\t}", "@FXML\n public void deleteColumn() {\n try {\n foreignCarCompareController.getMainHbox().getChildren().remove(nextGridPane);\n //nextGridPane.getChildren().clear();\n foreignMainController.getListOfGridPaneColumns().remove(nextGridPane);\n //System.out.println(\"size after removing: \" + foreignMainController.getListOfGridPaneColumns().size());\n setIdentifyColumnForDelete(1);\n } catch (Exception e) {\n DialogWindows.errorDialog(e.getMessage());\n }\n }", "public void deleteRow(int row) {\n\t\tif (row == -1) return;\n\t\t\n\t\tdata.remove(row);\n\t\tfireTableRowsDeleted(row, row);\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdelRow();\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdelRow();\n\t\t\t}", "private void deleteRow(int selectedRow){\r\n BudgetSubAwardBean budgetSubAwardBean = (BudgetSubAwardBean)data.get(selectedRow);\r\n if(budgetSubAwardBean.getAcType() == null || budgetSubAwardBean.getAcType().equals(TypeConstants.UPDATE_RECORD)){\r\n budgetSubAwardBean.setAcType(TypeConstants.DELETE_RECORD);\r\n budgetSubAwardBean.setUpdateUser(userId);\r\n if(deletedData ==null) {\r\n deletedData = new ArrayList();\r\n }\r\n deletedData.add(budgetSubAwardBean);\r\n }\r\n data.remove(selectedRow);\r\n \r\n //If Last Row nothing to do\r\n //else Update Sub Award Number for rest of the Rows\r\n /*int size = data.size();\r\n if(selectedRow != size) {\r\n for(int index = selectedRow; index < size; index++) {\r\n budgetSubAwardBean = (BudgetSubAwardBean)data.get(index);\r\n budgetSubAwardBean.setSubAwardNumber(index + 1);\r\n if(budgetSubAwardBean.getAcType() == null) {\r\n budgetSubAwardBean.setAcType(TypeConstants.UPDATE_RECORD);\r\n }\r\n }//End For\r\n }//End If\r\n */\r\n \r\n subAwardBudgetTableModel.fireTableRowsDeleted(selectedRow, selectedRow);\r\n }", "public void removeColumn(String columnName);", "@Override\r\n\tpublic void removeRow(int row) {\r\n\t\tsuper.removeRow(row);\r\n\t\telenco = lista.getElenco();\r\n\t\tPersona removable = new Persona();\r\n\t\tremovable.setNome(elenco.elementAt(row).getNome());\r\n\t\tremovable.setCognome(elenco.elementAt(row).getCognome());\r\n\t\tremovable.setTelefono(elenco.elementAt(row).getTelefono());\r\n\t\tremovable.setIndirizzo(elenco.elementAt(row).getIndirizzo());\r\n\t\tremovable.setEta(elenco.elementAt(row).getEta());\r\n\t\ttry {\r\n\t\t\tlista.delete(removable, row);\r\n\t\t\t}\r\n\t\t\tcatch (ArrayIndexOutOfBoundsException aioe) {\r\n\t\t\t\tString message = AIOE_MESSAGE\r\n\t\t\t\t\t\t+row + \" on table \"\r\n\t\t\t\t\t\t+lista.getElenco().indexOf(removable)\r\n\t\t\t\t\t\t+ \" on Lista \";\r\n\t\t\t\tJOptionPane.showMessageDialog(null, message);\r\n\t\t\t}\r\n\t}", "public void decrementRow() {\n setRowAndColumn(Math.max(row - 1, 0), column);\n }", "@Override\n public void revoke() {\n\t\t\tcore(HexEditorConstants.CELL_STATUS_UNDO);\n\t\t\tif (singleCommand) {\n\t\t\t\ttable.select(row);\n\t\t\t\tcursor.setSelection(row, col + 1);\n\t\t\t}\n\t\t}", "void rowRemoved(Sheet s, int sheetIndex, int row)\r\n/* 203: */ {\r\n/* 204:375 */ this.parser.rowRemoved(sheetIndex, row, s == getSheet());\r\n/* 205:376 */ this.formulaBytes = this.parser.getBytes();\r\n/* 206: */ }", "public void deleteRow(int row)\n throws JPARSECException {\n \tif (row >= m || row < 0)\n \t\tthrow new JPARSECException(\"invalid row.\");\n double newData[][] = new double[m-1][n];\n\n \tint iindex = -1;\n for (int i=0; i<m; i++)\n {\n \tif (i != row) {\n \t\tiindex ++;\n\t for (int j=0; j<n; j++)\n\t {\n\t \tnewData[iindex][j] = this.data[i][j];\n\t }\n \t}\n }\n Matrix m = new Matrix(newData);\n this.m = m.m;\n this.data = m.data;\n }", "public void actionPerformed(ActionEvent e) {\n model.deleteRow();\n }", "private void toDelete() {\n if(toCount()==0)\n {\n JOptionPane.showMessageDialog(rootPane,\"No paint detail has been currently added\");\n }\n else\n {\n String[] choices={\"Delete First Row\",\"Delete Last Row\",\"Delete With Index\"};\n int option=JOptionPane.showOptionDialog(rootPane, \"How would you like to delete data?\", \"Delete Data\", WIDTH, HEIGHT,null , choices, NORMAL);\n if(option==0)\n {\n jtModel.removeRow(toCount()-toCount());\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted first row\");\n }\n else if(option==1)\n {\n jtModel.removeRow(toCount()-1);\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted last row\");\n }\n else if(option==2)\n {\n toDeletIndex();\n }\n else\n {\n \n }\n }\n }", "private void clearData() throws SQLException {\n//Lay chi so dong cuoi cung\n int n = tableModel.getRowCount() - 1;\n for (int i = n; i >= 0; i--) {\n tableModel.removeRow(i);//Remove tung dong\n }\n }", "private void delete(int selectedRow) {\r\n removing = true;\r\n deletingRow = selectedRow;\r\n //subAwardBudgetTableModel.deleteRow(selectedRow);\r\n deleteRow(selectedRow);\r\n \r\n //Select a Row\r\n int selectRow = 0;\r\n int rowCount = subAwardBudgetTableModel.getRowCount();\r\n if(selectedRow == 0 && rowCount > 0) {\r\n //Select First Row\r\n selectRow = 0;\r\n }else if(selectedRow == rowCount) {\r\n //Select Last Row\r\n selectRow = rowCount - 1;\r\n }else {\r\n //Select This Row\r\n selectRow = selectedRow;\r\n }\r\n removing = false;\r\n if(selectRow != -1) {\r\n subAwardBudget.tblSubAwardBudget.setRowSelectionInterval(selectRow, selectRow);\r\n }else{\r\n //If All rows Deleted, then Details panel should be cleared\r\n displayDetails();\r\n }\r\n deletingRow = -1;\r\n }", "@Override\n\t\t\t\tpublic void rowsDeleted(int firstRow, int endRow) {\n\n\t\t\t\t}", "public void deleteRow(String row) {\n database.delete(ORDER_MASTER, ORDER_ID + \"=\" + row, null);\n }", "void deleteRow(int rowPos)\n {\n System.out.println(\n \"@deleteRow rowPos: \" + rowPos + \", vs stackSize: \" + compositeRowStack.size());\n if(rowPos > 0) transferChildren(rowPos, rowPos - 1);\n if(rowPos < compositeRowStack.size())\n {\n compositeRowStack.remove(rowPos);\n }\n }", "@FXML\r\n private void bRemCell() throws SQLException {\n int index = tableView.getSelectionModel().getSelectedIndex();\r\n if(index>=0)\r\n {\r\n calc calc = data.get(index);\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Delete cell\");\r\n alert.setHeaderText(\"Start of Day: \" + String.valueOf(calc.getStartDay()) + \"\\n\" +\r\n \"End of Day: \" + String.valueOf(calc.getOverDay()) + \"\\n\" +\r\n \"Start of Receipt: \" + String.valueOf(calc.getStartOfReceipt()) + \"\\n\" +\r\n \"End of Receipt: \" + String.valueOf(calc.getEndOfReceipt()) + \"\\n\" +\r\n \"Sum of Receipt: \" + String.valueOf(calc.getSumReceipt()) + \"\\n\" +\r\n \"User: \" + String.valueOf(calc.getUser()) + \"\\n\" +\r\n \"Date: \" + String.valueOf(calc.getDate()) + \"\\n\" +\r\n \"Comment: \" + String.valueOf(calc.getComment()));\r\n alert.setContentText(\"Are you sure you want to delete cell with data?\");\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if(result.get() == ButtonType.OK)\r\n {\r\n delete(String.valueOf(calc.getDate()));\r\n refresh();\r\n }\r\n else\r\n {\r\n refresh();\r\n }\r\n }else\r\n {\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"ERROR\");\r\n alert.setContentText(\"Nothing Selected!!!\");\r\n alert.showAndWait();\r\n }\r\n }", "public native void deleteRow(int row, TableViewAnimation animation) /*-{\n\t\tvar jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();\n\t\tjso\n\t\t\t\t.deleteRow(\n\t\t\t\t\t\trow,\n\t\t\t\t\t\tanimation.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()());\n }-*/;", "private void tampilkan() {\n int row = table.getRowCount();\n for(int a= 0; a<row;a++){\n model.removeRow(0);\n }\n \n \n }", "@Override\n public void delete(Integer key) throws SQLException {\n //Ei toteutettu\n }", "public void deleteColumn(int column)\n throws JPARSECException {\n \tif (column >= n || column < 0)\n \t\tthrow new JPARSECException(\"invalid column.\");\n double newData[][] = new double[m][n-1];\n\n for (int i=0; i<m; i++)\n {\n \tint jindex = -1;\n for (int j=0; j<n; j++)\n {\n \tif (j != column) {\n \t\tjindex ++;\n \tnewData[i][jindex] = this.data[i][j];\n \t}\n }\n }\n Matrix m = new Matrix(newData);\n this.n = m.n;\n this.data = m.data;\n }", "public void deleteRow() throws SQLException {\n\n try {\n debugCodeCall(\"deleteRow\");\n checkClosed();\n if (insertRow != null) { throw Message.getSQLException(ErrorCode.NOT_ON_UPDATABLE_ROW); }\n checkOnValidRow();\n getUpdatableRow().deleteRow(result.currentRow());\n updateRow = null;\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public boolean deleteRow(int row) {\n try {\n resultSet.absolute(row + 1);\n resultSet.deleteRow();\n //tell table to redraw itself\n fireTableDataChanged();\n return true;\n } catch (SQLException se) {\n System.out.println(\"Delete row error \" + se);\n return false;\n }\n }", "private void removeColumn() {\n gridWidth--;\n for (ArrayList<EscapeBlock> row : grid) { // for each row\n this.remove(row.get(gridWidth)); // remove the last block from the UI\n for(EscapeBlock block : row)\n block.disconnectAll();\n row.remove(gridWidth); // remove the last block from the grid\n }\n \n }", "public void decrementColumn() {\n setRowAndColumn(row, Math.max(column - 1, 0));\n }", "public Integer deleteData(String name) {\n SQLiteDatabase db = this.getWritableDatabase();\n int i = db.delete(TABLE_NAME, col1 + \" =?\", new String[]{name});\n return i;\n }", "public Feature removeRow(int row){\n if (debug) logger.info(\"feature added\");\n Feature f = fc.remove(row);\n fcLastEdits.clear();\n fcLastEdits.add(f);\n lastEditType = EDIT_REMOVE;\n fireTableRowsDeleted(row, row);\n return f;\n }", "public void deleteRow() throws SQLException\n {\n m_rs.deleteRow();\n }", "int getColumn();", "private void deleteButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN\n // -\n // FIRST\n // :\n // event_deleteButtonActionPerformed\n int rowIndex = headerTable.getSelectedRow();\n if (rowIndex > -1) {\n removeRow(rowIndex);\n }\n }", "public void deleteRow(int row){\n\t\tfor(int j = row; j > 0; j--)\n\t\t\tfor(int i = 0; i < well.length; i++)\n\t\t\t\twell[i][j] = well[i][j-1];\n\t}", "public void deleteRow(MyItem row) {\n\n\t\tif (MyItemAdapter.rows.contains(row)) {\n\t\t\tMyItemAdapter.rows.remove(row);\n\t\t}\n\n\t}", "public void deleteCartRow() {\n CarComponent selectedRow = cartTable.getSelectionModel().getSelectedItem();\n cartTable.getItems().remove(selectedRow);\n componentsCart.remove(selectedRow);\n\n updateTotal();\n }", "void columnRemoved(Sheet s, int sheetIndex, int col)\r\n/* 191: */ {\r\n/* 192:347 */ this.parser.columnRemoved(sheetIndex, col, s == getSheet());\r\n/* 193:348 */ this.formulaBytes = this.parser.getBytes();\r\n/* 194: */ }", "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 }", "public int getColumn();", "private void popupMenuDeleteData(int rowIndex, int columnIndex) {\n\t\t//\n\t\t// Display the dialog\n\t\t//\n\t\tDeleteDataDialog deleteDataDialog = new DeleteDataDialog(parent.getShell());\n\t\tif (deleteDataDialog.open() != Window.OK)\n\t\t\treturn;\n\t\tint delSize = deleteDataDialog.getResult();\n\n\t\tif (delSize == 0) {\n\t\t\t//\n\t\t\t// Cancel button pressed - do nothing\n\t\t\t//\n\t\t\treturn;\n\t\t}\n\n\t\t//\n\t\t// Delete data from the table\n\t\tdelete(rowIndex, columnIndex - 1, delSize);\n\n\t\t//\n\t\t// Update the status panel\n\t\t//\n\t\tupdateStatusPanel();\n\t}", "public native void deselectRow(int row) /*-{\n\t\tvar jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();\n\t\tjso.deselectRow(row);\n }-*/;", "public void removeRow(int row) {\r\n\t\tdataVector.removeElementAt(row);\r\n\t\tthis.dataObjects.removeElementAt(row);\r\n\r\n\t\t// Generate notification\r\n\t\tfireTableRowsDeleted(row, row);\r\n\t}", "public void delete()\n\t{\n\t\t_Status = DBRowStatus.Deleted;\n\t}", "void row_delete(int id){\n\t\t//Delete tuple by executing SQL command\n\t\tStatement stm=null;\n\t\tString sql=\"delete from \"+tableName+\" where id=\"+id;\n\t\ttry{\n\t \t stm=con.createStatement(); \n\t \t System.out.println(\"sql: \"+sql); \n\t \t stm.executeUpdate(sql);\n\t \t \n\t \t //Append SQL command and time stamp on log file\n\t \t outfile.write(\"TIMESTAMP: \"+getTimestamp());\n\t\t\t outfile.newLine();\n\t\t\t outfile.write(sql);\n\t\t\t outfile.newLine();\n\t\t\t outfile.newLine();\n\t\t \n\t\t //Catch SQL exception\t \t \n\t }catch (SQLException e ) {\n\t \t e.printStackTrace();\n\t //Catch I/O exception\n\t } catch(IOException ioe){ \n\t \t ioe.printStackTrace();\n\t }finally {\n\t \t try{\n\t if (stm != null) stm.close(); \n\t }\n\t \t catch (SQLException e ) {\n\t \t\t e.printStackTrace();\n\t\t }\n\t }\t\n\t\t \n\t }", "public void deleteEntry(long row) {\n database.delete(ORDER_MASTER, ROW_ID + \"=\" + row, null);\n }", "@Override\n public void remove() throws IOException {\n int i = listEnterprisePanel.getTableListE().getSelectedRow(); // chọn hàng để xóa\n if (i >= 0) {\n String strID = listEnterprisePanel.getTableListE().getValueAt(i, 1).toString().trim(); // lấy ID\n Enterprise enterprise = enterpriseBN.getEnterpriseByID(strID); // Tìm kiếm Enterprise theo ID\n content.set(Collections.singleton(enterprise), null);\n enterpriseBN.deleteEnterprise(enterprise);\n model.removeRow(i);\n loadData();\n }\n\n }", "public void deleteSelectedFile(int row) {\n\t\tArrayList<File> files = currConfig.getSelectedFiles();\n\t\tfiles.remove(row);\n\t}", "public int del(int key) {\n int retval = 0;\n\n String sql = \"DELETE FROM data_map WHERE data_key = ?\";\n\n try (Connection con = this.connect();\n PreparedStatement pstmt = con.prepareStatement(sql)) {\n pstmt.setInt(1, key);\n retval = pstmt.executeUpdate();\n }\n catch (SQLException e) {\n retval = -1;\n }\n\n return retval;\n }", "public void deleteCertainRow(String itemname, String tableName, String columnName) throws SQLException\n {\n\n String deletetStr=\"DELETE FROM \"+tableName+\" WHERE \"+columnName+\" = \"+quotate(itemname);\n stmt.executeUpdate(deletetStr);\n return;\n\n }", "io.dstore.engine.procedures.ImModifyNodeCharacsAd.Response.Row getRow(int index);", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.out.println(\"btnDelete\");\n\t\t\t\tint i = table.getSelectedRow();\n\t\t\t\tif (i >= 0) {\n\t\t\t\t\tSystem.out.println(\"row-Delete\" + i);\n\t\t\t\t\tSystem.out.println(\"row-Delete\" + textSuppD.getText());\n\t\t\t\t\tint suppID = Integer.parseInt(textSuppD.getText().trim());\n\n\t\t\t\t\tDatabase db = new Database();\n\t\t\t\t\tSuppliersDAO suppDAO = new SuppliersDAO(db);\n\t\t\t\t\tSuppliersModel suppModel = new SuppliersModel();\n\t\t\t\t\tsuppModel.setSuppliers_id(suppID);\n\t\t\t\t\tsuppDAO.Delete(suppModel);\n\t\t\t\t\tdb.commit();\n\t\t\t\t\tdb.close();\n\n\t\t\t\t\tmodel.removeRow(i);\n\t\t\t\t} else {\n\t\t\t\t}\n\t\t\t}", "int getRow();", "public static void vaciartabla(){\n DefaultTableModel modelo=(DefaultTableModel) jtproveedores.getModel(); \n for (int i = 0; i < jtproveedores.getRowCount(); i++) {\n modelo.removeRow(i);\n i-=1;\n } \n }", "public int deleteEntry(long lRow1) throws SQLException {\n\t\treturn ourDatabase\n\t\t\t\t.delete(DATABASE_TABLE, KEY_ROWID + \"=\" + lRow1, null);\n\t}", "public void removeRow(T obj) {\r\n\t\t\r\n\t\tlogger.trace(\"Enter removeRow - T obj\");\r\n\t\t\r\n\t\tint row = data.indexOf(obj);\r\n\t\tif (row >= 0) {\r\n\t\t\tdata.remove(row);\r\n\t\t\tfireTableRowsDeleted(row, row);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.trace(\"Exit removeRow - T obj\");\r\n\t}", "private void deleteItem(int position){\n deleteItem(dataset.get(position),position);\n }", "public void remove(int oldRow, int oldCol)\n {\n Maze.maze[oldRow][oldCol] = ' ';\n }", "public void deleteRows(int[] rows) throws IndexOutOfBoundsException{\r\n if (rows.length > 0){\r\n LinkedList data_to_remove = new LinkedList();\r\n for (int i=0; i<rows.length; i++){\r\n data_to_remove.add(data.get(rows[i]));\r\n }\r\n for (int i=0; i<data_to_remove.size(); i++){\r\n data.remove(data_to_remove.get(i)); \r\n }\r\n this.fireTableRowsDeleted(rows[0], rows[rows.length -1]);\r\n }\r\n }", "@Override\n\tpublic List<T> removeRow(long rowIndex) throws IndexOutOfBoundsException {\n\t\tMatrixValidator.throwIfBadIndex(this, rowIndex, Plane.Y);\n\t\t\n\t\tList<T> removedItems = this.getRow(rowIndex);\n\t\t\n\t\tthis.numRows--;\n\t\tif(this.numRows == 0){\n\t\t\tthis.numCols = 0;\n\t\t\tthis.valueMap.clear();\n\t\t}else {\n\t\t\tList<MatrixCoordinate> coordsToMove = new LongLinkedList<>();\n\t\t\tList<MatrixCoordinate> coordsToRemove = new LongLinkedList<>();\n\t\t\t\n\t\t\tfor(Map.Entry<MatrixCoordinate, T> curEntry : this.valueMap.entrySet()){\n\t\t\t\tif(curEntry.getKey().getRow() > rowIndex){\n\t\t\t\t\tcoordsToMove.add(curEntry.getKey());\n\t\t\t\t}else if(curEntry.getKey().getRow() == rowIndex){\n\t\t\t\t\tcoordsToRemove.add(curEntry.getKey());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(MatrixCoordinate curCoord : coordsToRemove) {\n\t\t\t\tthis.valueMap.remove(curCoord);\n\t\t\t}\n\t\t\t\n\t\t\tfor(MatrixCoordinate curCoord : coordsToMove){\n\t\t\t\tT curVal = this.valueMap.remove(curCoord);\n\t\t\t\t\n\t\t\t\tcurCoord.setY(curCoord.getRow() - 1);\n\t\t\t\tthis.valueMap.put(curCoord, curVal);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn removedItems;\n\t}", "public void deleteEntry(int rowid) {\n\t\t\tourDatabase.delete(DATABASE_TABLE1, KEY_ID + \"=\" + rowid, null);\n\t\t}", "public Handle delete(Handle handle) {\n\n int homePos = hash(table, handle.getStringAt());\n int pos;\n\n // QUADRATIC PROBE\n for (int i = 0; i < table.length; i++) {\n pos = (homePos + i * i) % table.length;\n\n if (table[pos] == null) {\n // element not in table\n break;\n }\n else if (table[pos].equals(handle)) {\n // we are currently at the element\n Handle toRet = table[pos];\n table[pos] = GRAVESTONE;\n logicalSize--;\n return toRet;\n }\n } // end for-loop\n\n return null; // could not find element\n }", "@Override\n\tpublic void deletRow(HongXunWorkNum hongXunWorkNum) {\n\t\tgetHibernateTemplate().delete(hongXunWorkNum);\n\t}", "@Override\n\tpublic void delete(String key) throws SQLException {\n\t\t\n\t}", "void removeRowsLock();", "public void remove(Record r) \n\t{\n\t\tfilled--; //reduce load factor\n\t\tif (r.placement != -1){ //if r's expected position isnt null\n\t\t\tRecord newRecord = new Record(\"deleted\"); //make a new record with value \"deleted\n\t\t\tnewRecord.placement = -2; //set position to -1 (as is standard for deleted\n\t\t\tTable[r.placement] = newRecord; //puts deleted slot in table\n\t\t}\t\n\t}", "@Override\n\tpublic void removeCell(Cell arg0) {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\tint removeIndex = listtel.indexOf(rowb);\n\t\t\t\t\tlisttel.remove(removeIndex);\n\t\t\t\t\tgetView().getTelefono().removeRow(removeIndex + 1);\n\t\t\t\t}", "private void undoMove(int row, int column) {\n numbersAdded--;\n square[row * dimensions + column] = 0;\n }", "public int getColumn() {\n // YOUR CODE HERE\n return this.column;\n }", "public int getRow() { return _row; }", "@Test\n public void testDeleteColumn() throws Exception {\n RowKeyFormat2 format = makeHashPrefixedRowKeyFormat();\n // Reference layout with a single column : \"family_name:column_name\"\n final TableLayoutDesc refDesc = 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 refLayout = FijiTableLayout.newLayout(refDesc);\n\n {\n // Target layout deleting the column\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 .setDelete(true)\n .build()))\n .build()))\n .build()))\n .build();\n final FijiTableLayout layout = FijiTableLayout.createUpdatedLayout(desc, refLayout);\n final FijiTableLayout.LocalityGroupLayout.FamilyLayout fLayout =\n layout.getFamilyMap().get(\"family_name\");\n assertNotNull(fLayout);\n assertTrue(fLayout.getColumns().isEmpty());\n assertTrue(fLayout.getColumnMap().isEmpty());\n }\n\n {\n // Target layout with an invalid column deletion\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 .build()))\n .build()))\n .build();\n try {\n FijiTableLayout.createUpdatedLayout(desc, refLayout);\n Assert.fail(\"Layout update with missing column did not fail.\");\n } catch (InvalidLayoutException ile) {\n // Exception is expected!\n }\n }\n\n {\n // Target layout with an invalid column rename\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-renamed\")\n .setColumnSchema(CellSchema.newBuilder()\n .setStorage(SchemaStorage.UID)\n .setType(SchemaType.INLINE)\n .setValue(\"\\\"string\\\"\")\n .build())\n .build()))\n .build()))\n .build()))\n .build();\n try {\n FijiTableLayout.createUpdatedLayout(desc, refLayout);\n Assert.fail(\"Invalid layout update with bad column renaming did not throw.\");\n } catch (InvalidLayoutException ile) {\n // Expected\n }\n }\n }", "public int getRow()\n {\n return row;\n }", "private void removePerson(){\r\n\t\t// can't remove a value if there's nothing there\r\n\t\tif (dataTable.getSelectedRow()== -1)\r\n\t\t\treturn;\r\n\t\tpeople.remove(dataTable.getSelectedRow());\r\n\t\tpersonTableModel.fireTableRowsDeleted(dataTable.getSelectedRow(),dataTable.getSelectedRow());\r\n\t}", "public void localDeleteCell(long cellId)\n\t{\n\t\tCIntentionCell cell = cells.remove(cellId);\n\t\tcellsByCanvasId.remove(cell.getCanvasId());\n\t\tcell.delete();\n\n\t\tIntentionGraph.getInstance().repaint();\n\t}", "public int deleteDBrow(Long rowId) {\n SQLiteDatabase db = mDbHelper.getWritableDatabase();\n\n // Define 'where' part of query.\n String selection = FeedEntry._ID + \" LIKE ?\";\n // Specify arguments in placeholder order.\n String[] selectionArgs = {rowId.toString()};\n // Issue SQL statement.\n return db.delete(FeedEntry.TABLE_NAME, selection, selectionArgs);\n }", "public void deleteCertainRow(String itemname1,String itemname2, String tableName, String columnName1,String columnName2) throws SQLException\n {\n\n String deletetStr = \"DELETE FROM \"+tableName+\" WHERE \"+columnName1+\" = \"+quotate(itemname1)+\"AND \"+columnName2+\" = \"+quotate(itemname2);\n stmt.executeUpdate(deletetStr);\n return;\n\n }", "int getColumnIndex();", "int getColumnIndex();", "int getColumnIndex();", "public void onDelete(Statement delete, Connection cx, SimpleFeatureType featureType) throws SQLException {\r\n }", "public void dbDeleteRow(EdaContext xContext)\n\tthrows IcofException{\n\n\t\t// Create the SQL query in the PreparedStatement.\n\t\tsetDeleteStatement(xContext);\n\t\ttry {\n\t\t\tgetStatement().setLong(1, getId());\n\n\t\t}\n\t\tcatch(SQLException trap) {\n\t\t\tIcofException ie = new IcofException(this.getClass().getName(),\n\t\t\t \"dbDeleteRow()\",\n\t\t\t IcofException.SEVERE,\n\t\t\t \"Unable to prepare SQL statement.\",\n\t\t\t IcofException.printStackTraceAsString(trap) + \n\t\t\t \"\\n\" + getQuery());\n\t\t\txContext.getSessionLog().log(ie);\n\t\t\tthrow ie;\n\t\t}\n\n\t\t// Run the query.\n\t\tif (! insertRow(xContext)) {\n\t\t\tIcofException ie = new IcofException(this.getClass().getName(),\n\t\t\t \"dbDeleteRow()\",\n\t\t\t IcofException.SEVERE,\n\t\t\t \"Unable to delete row.\\n\",\n\t\t\t \"QUERY: \" + getQuery());\n\t\t\txContext.getSessionLog().log(ie);\n\t\t\tthrow ie;\n\t\t}\n\n\t\t// Close the PreparedStatement.\n\t\tcloseStatement(xContext);\n\n\t}", "int deleteByPrimaryKey(String maht);", "@Override\n\tpublic List<T> removeCol(long colIndex) throws IndexOutOfBoundsException {\n\t\tMatrixValidator.throwIfBadIndex(this, colIndex, Plane.X);\n\t\t\n\t\tList<T> removedItems = this.getCol(colIndex);\n\n\t\tthis.numCols--;\n\t\tif(this.numCols == 0){\n\t\t\tthis.numRows = 0;\n\t\t\tthis.valueMap.clear();\n\t\t}else {\n\t\t\tList<MatrixCoordinate> coordsToMove = new LongLinkedList<>();\n\t\t\tList<MatrixCoordinate> coordsToRemove = new LongLinkedList<>();\n\t\t\t\n\t\t\tfor(Map.Entry<MatrixCoordinate, T> curEntry : this.valueMap.entrySet()){\n\t\t\t\tif(curEntry.getKey().getCol() > colIndex){\n\t\t\t\t\tcoordsToMove.add(curEntry.getKey());\n\t\t\t\t}else if(curEntry.getKey().getCol() == colIndex){\n\t\t\t\t\tcoordsToRemove.add(curEntry.getKey());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(MatrixCoordinate curCoord : coordsToRemove) {\n\t\t\t\tthis.valueMap.remove(curCoord);\n\t\t\t}\n\t\t\t\n\t\t\tfor(MatrixCoordinate curCoord : coordsToMove){\n\t\t\t\tT curVal = this.valueMap.remove(curCoord);\n\t\t\t\t\n\t\t\t\tcurCoord.setX(curCoord.getCol() - 1);\n\t\t\t\tthis.valueMap.put(curCoord, curVal);\n\t\t\t}\n\t\t}\n\t\treturn removedItems;\n\t}", "public void delete(JTable tblUser)\n {\n int i = tblUser.getSelectedRow();\n \n if(i != -1)\n {\n usersDto = users[i];\n \n if(usersDto.getState() != 3)\n {\n if(JOptionPane.showConfirmDialog(null, \"¿Está seguro que desea eliminar el registro?\", \"Eliminar\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)\n {\n try {\n usersDto.setState((short) 3);\n \n if(usersDao.update(usersDto.createPk(), usersDto)) {\n tableModel = (DefaultTableModel) tblUser.getModel();\n tableModel.setValueAt(\"*\", i, 6);\n }\n \n } catch (UsersDaoException exception) {}\n }\n \n } else { JOptionPane.showMessageDialog(null, \"El registro ya está eliminado\", \"ERROR\", JOptionPane.ERROR_MESSAGE); }\n \n } else { JOptionPane.showMessageDialog(null, \"Seleccione un registro a eliminar\", \"ERROR\", JOptionPane.ERROR_MESSAGE); }\n }" ]
[ "0.6940106", "0.67426807", "0.6735865", "0.6615396", "0.6569558", "0.6459916", "0.64434016", "0.64058656", "0.63944644", "0.6375773", "0.6353345", "0.6352597", "0.6325254", "0.629632", "0.6271769", "0.6265366", "0.6205165", "0.62039953", "0.61995023", "0.6166832", "0.6158091", "0.6158091", "0.6144037", "0.613228", "0.6094973", "0.6052347", "0.604772", "0.60211265", "0.6019127", "0.6017109", "0.6009744", "0.6004219", "0.5995048", "0.598533", "0.59740305", "0.59553075", "0.5947722", "0.594558", "0.59313196", "0.5930977", "0.5908376", "0.5903302", "0.589874", "0.5896351", "0.5893308", "0.5884542", "0.58807003", "0.58777946", "0.5869566", "0.58689034", "0.58676386", "0.5860204", "0.5854144", "0.5850187", "0.58331287", "0.58256364", "0.5824287", "0.5811276", "0.58103555", "0.58047724", "0.57978797", "0.57820916", "0.5765666", "0.5744417", "0.5742363", "0.57414484", "0.57284474", "0.5723261", "0.57047224", "0.57022226", "0.5700271", "0.5689112", "0.5678401", "0.5676125", "0.56733507", "0.5672694", "0.5665977", "0.5655232", "0.5651191", "0.5646628", "0.5644874", "0.56392354", "0.56261975", "0.56258523", "0.5616087", "0.5615648", "0.56145173", "0.5611658", "0.5609541", "0.56040233", "0.55944645", "0.55933976", "0.5590576", "0.5589572", "0.5589572", "0.5589572", "0.55868024", "0.55862147", "0.558367", "0.5578006", "0.5572059" ]
0.0
-1
Search data will use data in Search field to Select for data according from db
private void Searchdata() { Connection con; String searchby; String sortby; String keyword; searchby = (String)cboSearchby.getSelectedItem(); sortby = (String)cboSortby.getSelectedItem(); keyword = txfSearch.getText(); try { con = ClassSQL.getConnect(); Statement stmt = con.createStatement(); String sql = Searchstmt(searchby,sortby,keyword); // System.out.println(sql); //for testing purposes stmt.executeQuery(sql); con.close(); } catch (SQLException ex) { ex.printStackTrace(); } finally { // Place code in here that will always be run. } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void search() {\n int userSelected = selectFromList(crudParamOptions);\n switch (userSelected){\n case 1:\n searchFirstName();\n break;\n case 2:\n searchLastName();\n break;\n case 3:\n searchPhone();\n break;\n case 4:\n searchEmail();\n break;\n default:\n break;\n }\n }", "List<DataTerm> search(String searchTerm);", "public void search() {\n listTbagendamentos\n = agendamentoLogic.findAllTbagendamentoByDataAndPacienteAndFuncionario(dataSearch, tbcliente, tbfuncionario);\n }", "private void searchExec(){\r\n\t\tString key=jComboBox1.getSelectedItem().toString();\r\n\t\tkey=NameConverter.convertViewName2PhysicName(\"Discount\", key);\r\n\t\tString valueLike=searchTxtArea.getText();\r\n\t\tList<DiscountBean>searchResult=discountService.searchDiscountByKey(key, valueLike);\r\n\t\tjTable1.setModel(ViewUtil.transferBeanList2DefaultTableModel(searchResult,\"Discount\"));\r\n\t}", "public void performSearch() {\n OASelect<QueryInfo> sel = getQueryInfoSearch().getSelect();\n sel.setSearchHub(getSearchFromHub());\n sel.setFinder(getFinder());\n getHub().select(sel);\n }", "public void search() {\r\n \t\r\n }", "public void search() {\n\n lazyModel = new LazyDataModel<Pesquisa>() {\n private static final long serialVersionUID = -6541913048403958674L;\n\n @Override\n public List<Pesquisa> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, String> filters) {\n\n pesquisarBC.searhValidation(searchParam);\n\n int count = pesquisarBC.count(searchParam);\n lazyModel.setRowCount(count);\n\n if (count > 0) {\n if (first > count) {\n // Go to last page\n first = (count / pageSize) * pageSize;\n }\n SearchFilter parameters = new SearchFilter();\n parameters.setFirst(first);\n parameters.setPageSize(pageSize);\n List<Pesquisa> list = pesquisarBC.search(searchParam, parameters);\n\n logger.info(\"END: load\");\n return list;\n } else {\n return null;\n }\n }\n };\n\n }", "@FXML\r\n private void search(){\n \r\n String s = tfSearch.getText().trim(); \r\n String type = cmbType.getSelectionModel().getSelectedItem();\r\n String col = cmbFilterBy.getSelectionModel().getSelectedItem();\r\n \r\n /**\r\n * Column Filters\r\n * \r\n */\r\n \r\n \r\n if(!s.isEmpty()){\r\n if(!chbtoggleInActiveTraining.isSelected()){\r\n db.populateTable(trainingFields+ \" WHERE title LIKE '%\"+s+\"%' AND status<>'active'\", tblTrainingList);\r\n }\r\n\r\n if(chbtoggleInActiveTraining.isSelected()){\r\n db.populateTable(trainingFields+ \" WHERE title LIKE '%\"+s+\"%'\", tblTrainingList);\r\n } \r\n } \r\n }", "Search getSearch();", "public void search() {\n String q = this.query.getText();\n String cat = this.category.getValue();\n if(cat.equals(\"Book\")) {\n searchBook(q);\n } else {\n searchCharacter(q);\n }\n }", "@Override\n public Data3DPlastic search() {\n return super.search();\n }", "protected final void searchForText() {\n Logger.debug(\" - search for text\");\n final String searchText = theSearchEdit.getText().toString();\n\n MultiDaoSearchTask task = new MultiDaoSearchTask() {\n @Override\n protected void onSearchCompleted(List<Object> results) {\n adapter.setData(results);\n }\n\n @Override\n protected int getMinSearchTextLength() {\n return 0;\n }\n };\n task.readDaos.add(crDao);\n task.readDaos.add(monsterDao);\n task.readDaos.add(customMonsterDao);\n task.execute(searchText.toUpperCase());\n }", "@Override\r\n public List<Anggota> search(String category, String data) {\r\n List<Anggota> datas = new ArrayList<>();\r\n String query = \"SELECT *FROM Anggota WHERE \" + category + \" \" + \" like '%\" + data + \"%'\";\r\n try {\r\n\r\n PreparedStatement preparedStatement = connection.prepareStatement(query);\r\n ResultSet rs = preparedStatement.executeQuery();\r\n\r\n while (rs.next()) {\r\n Anggota anggota = new Anggota();\r\n anggota.setKdAnggota(rs.getString(1));\r\n anggota.setNmAnggota(rs.getString(2));\r\n anggota.setTelepon(rs.getString(3));\r\n anggota.setAlamat(rs.getString(4));\r\n datas.add(anggota);\r\n }\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(AnggotaDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return datas;\r\n }", "public void performSearch() {\n OASelect<CorpToStore> sel = getCorpToStoreSearch().getSelect();\n sel.setSearchHub(getSearchFromHub());\n sel.setFinder(getFinder());\n getHub().select(sel);\n }", "@In String search();", "private void searchFunction() {\n\t\t\r\n\t}", "abstract public void search();", "private void executeSearch() {\n if (!view.getSearchContent().getText().isEmpty()) {\n SearchModuleDataHolder filter = SearchModuleDataHolder.getSearchModuleDataHolder();\n //set search content text for full text search\n filter.setSearchText(view.getSearchContent().getText());\n forwardToCurrentView(filter);\n } else {\n eventBus.showPopupNoSearchCriteria();\n }\n }", "List<SearchResult> search(SearchQuery searchQuery);", "@RequestMapping(value={\"/search\"}, method={RequestMethod.GET})\n \tpublic ModelAndView handleSearch(@RequestParam(required=false) String q, @RequestParam(required=false,defaultValue=\"1\") Integer page){\n \t\tMap<String,Object> model = new HashMap<String,Object>();\n \t\t\n \t HashMap<String,Object> search = new HashMap<String,Object>();\n \t search.put(\"term\", \"\");\n \t search.put(\"total\",0);\n \n \t List<Map<String,String>> searchResult = new ArrayList<Map<String,String>>();\n \t if(StringUtils.isNotBlank(q)){\n \t \tsearch.put(\"term\", q);\n \t \tLimitedResult<List<NameConceptModelIF>> nameConceptModelList = null;\n \t \tint pageIndex = (page <= 0)?0:(page-1);\n \t \t//use page index +1 to avoid returning a bad page number\n \t\tsearch.put(\"pageNumber\", (pageIndex+1));\n \t\tsearch.put(\"pageSize\", searchService.getPageSize());\n \t\t//check if we want another page than the first one\n \t \tif(pageIndex > 0){\n \t \t\tnameConceptModelList = searchService.searchName(q,pageIndex);\n \t \t}\n \t \telse{\n \t \t\tnameConceptModelList = searchService.searchName(q);\n \t \t}\n \n \t\t search.put(\"total\",nameConceptModelList.getTotal_rows());\n \t\t List<Map<String,String>> searchResults = new ArrayList<Map<String,String>>();\n \t\t Map<String,String> searchRow = null;\n \t\t //TODO use objects directly instead of map\n \t\t for(NameConceptModelIF currNameConceptModel : nameConceptModelList.getRows()){\n \t\t \tif(currNameConceptModel.getClass().equals(NameConceptTaxonModel.class)){\n \t\t \t\tsearchRow = new HashMap<String,String>();\n \t\t \t\tsearchRow.put(\"type\",\"taxon\");\n \t\t \t\tsearchRow.put(\"name\", currNameConceptModel.getName());\n \t\t \t\tsearchRow.put(\"id\", currNameConceptModel.getTaxonId().toString());\n \t\t \t\tsearchRow.put(\"status\", currNameConceptModel.getStatus());\n \t\t \t\tsearchRow.put(\"namehtml\",((NameConceptTaxonModel)currNameConceptModel).getNamehtml());\n \t\t \t\tsearchRow.put(\"namehtmlauthor\",((NameConceptTaxonModel)currNameConceptModel).getNamehtmlauthor());\n \t\t \t\tsearchRow.put(\"rankname\",((NameConceptTaxonModel)currNameConceptModel).getRankname());\n \t\t \t\tsearchRow.put(\"parentid\",((NameConceptTaxonModel)currNameConceptModel).getParentid().toString());\n \t\t \t\tsearchRow.put(\"parentnamehtml\",((NameConceptTaxonModel)currNameConceptModel).getParentnamehtml());\n \t\t \t\tsearchResult.add(searchRow);\n \t\t \t}\n \t\t \telse if(currNameConceptModel.getClass().equals(NameConceptVernacularNameModel.class)){\n \t\t \t\tsearchRow = new HashMap<String, String>();\n \t\t \t\tsearchRow.put(\"type\",\"vernacular\");\n \t\t \t\tsearchRow.put(\"name\", currNameConceptModel.getName());\n \t\t \t\tsearchRow.put(\"id\", Integer.toString(((NameConceptVernacularNameModel)currNameConceptModel).getId()));\n \t\t \t\tsearchRow.put(\"status\", currNameConceptModel.getStatus());\n \t\t \t\tsearchRow.put(\"lang\",((NameConceptVernacularNameModel)currNameConceptModel).getLang());\n \t\t \t\tsearchRow.put(\"taxonid\",currNameConceptModel.getTaxonId().toString());\n \t\t \t\tsearchRow.put(\"taxonnamehtml\",((NameConceptVernacularNameModel)currNameConceptModel).getTaxonnamehtml());\n \t\t \t\tsearchResult.add(searchRow);\n \t\t \t}\n \t\t \telse{\n \t\t \t\t//logger\n \t\t \t\tsearchRow = null;\n \t\t \t}\n \t\t \tsearchResults.add(searchRow);\n \t\t }\n \t\t model.put(\"results\",searchResults);\n \t }\n \t \n \t model.put(\"search\",search);\n \t return new ModelAndView(\"search\", model);\n \t}", "Data<User> getUserSearch(String user);", "DataSelector getDataSelector(SqlSearch search) throws FxSqlSearchException;", "private void search() {\n if (dateFind.getValue() == null) {\n dateFind.setValue(LocalDate.now().minusDays(DEFAULT_PERIOD));\n }\n Long days = ChronoUnit.DAYS.between(dateFind.getValue(), LocalDate.now());\n final List<Project> findProject = ServiceFactory.getProjectService().getFindProject(days, comboProject.getValue());\n observableProjects.clear();\n observableProjects.addAll(findProject);\n table.setItems(observableProjects);\n }", "private void search() {\n if (isConnected()) {\r\n query = searchField.getText().toString();\r\n mLoader.setVisibility(View.VISIBLE);\r\n emptyStateTextView.setText(\"\");\r\n //restart the loader with the new data\r\n loaderManager.restartLoader(1, null, this);\r\n } else {\r\n String message = getString(R.string.no_internet);\r\n new AlertDialog.Builder(this).setMessage(message).show();\r\n }\r\n }", "public List<Product> search(String searchString);", "private void search()\n {\n JTextField searchField = (currentSearchView.equals(SEARCH_PANE_VIEW))? searchBar : resultsSearchBar;\n String searchTerm = searchField.getText();\n \n showTransition(2000);\n \n currentPage = 1;\n showResultsView(true);\n paginate(1, getResultsPerPage());\n\n if(searchWeb) showResultsTableView(WEB_RESULTS_PANE);\n else showResultsTableView(IMAGE_RESULTS_PANE);\n\n \n showSearchView(RESULTS_PANE_VIEW);\n resultsSearchBar.setText(searchTerm);\n }", "Data<User> getUserSearch(String user, String fields);", "private void searchLeisure(String searchQuery) {\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"Leisure\");\n //get all data from this ref\n ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n postList.clear();\n for (DataSnapshot ds : dataSnapshot.getChildren()) {\n LeisureModel leisureModel = ds.getValue(LeisureModel.class);\n if (leisureModel.getName().toLowerCase().contains(searchQuery.toLowerCase())) {\n postList.add(leisureModel);\n }\n //adapter\n postAdapter = new LeisureAdapter(SearchAllLeisure.this, postList);\n //set adapter to recyclerview\n rvLeisureCategory.setAdapter(postAdapter);\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n //in case of error\n Toast.makeText(SearchAllLeisure.this, \"\" + databaseError.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void search() {\n try {\n String searchKey = txt_SearchKey.getText();\n Search s = new Search();\n con = dc.connect();\n stmt1 = con.createStatement();\n\n\n String sql = s.getSQLQuery(\"tblUsers\", searchKey);\n\n vtdata_user = new Vector();\n ResultSet rsUser = stmt1.executeQuery(sql);\n while (rsUser.next()) {\n\n Vector temp = new Vector();\n\n temp.add(rsUser.getString(\"UserName\"));\n temp.add(rsUser.getString(\"U_Name\"));\n temp.add(rsUser.getString(\"Email\"));\n // temp.add(rsUser.getDate(\"BirthDate\"));\n\n temp.add(formatDate.format(rsUser.getDate(\"BirthDate\")));\n boolean gender = rsUser.getBoolean(\"Gender\");\n\n\n if (gender == true) {\n temp.add(\"Male\");\n }\n\n if (gender == false) {\n temp.add(\"Female\");\n }\n temp.add(rsUser.getString(\"Phone\"));\n vtdata_user.add(temp);\n }\n\n user_model = new DefaultTableModel(vtdata_user, vtcolumn_user) {\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return false;\n }\n };\n\n tb_User.setModel(user_model);\n if (vtdata_user.size() == 0) {\n\n JOptionPane.showMessageDialog(this, \"No Search User! \");\n }\n dc.disconnect(rsUser);\n dc.disconnect(stmt1);\n dc.disconnect(con);\n } catch (SQLException ex) {\n Logger.getLogger(UserManagement.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "List<ResultDTO> search(String query);", "private Object queryDatabase(String searchType, String searchTerm) {\n Connection connection = null;\n PreparedStatement statement = null;\n Search search = new Search();\n ResultSet resultSet = null;\n String queryString = null;\n\n try {\n connection = getConnection(connection);\n\n queryString = getQueryString(searchType);\n\n statement = connection.prepareStatement(queryString);\n \n if (searchType.equals(\"employeeId\")) {\n statement.setString(1, searchTerm);\n } else {\n statement.setString(1, searchTerm + \"%\");\n }\n\n resultSet = statement.executeQuery();\n\n buildEmployeeList(resultSet, search);\n } catch (SQLException sqlException) {\n sqlException.printStackTrace();\n } catch (Exception exception) {\n System.err.println(\"General Error\");\n exception.printStackTrace();\n } finally {\n try {\n if (resultSet != null) {\n resultSet.close();\n }\n\n\n if (statement != null) {\n statement.close();\n }\n\n\n if (connection != null) {\n connection.close();\n }\n } catch (SQLException sqlException) {\n sqlException.printStackTrace();\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n }\n return search;\n }", "java.lang.String getSearchValue();", "private void search(String querySearch) {\n searchResult = new ArrayList<>();\n for (MonitoringModel item : searchList) {\n if (item.getPROG_ID().toLowerCase().contains(querySearch) || item.getPROG_ID().contains(querySearch) ||\n item.getKEPUTUSAN().toLowerCase().contains(querySearch) || item.getKEPUTUSAN().contains(querySearch) ||\n Common.formatTgl(item.getTGL_TARGET()).toLowerCase().contains(querySearch) || Common.formatTgl(item.getTGL_TARGET()).contains(querySearch) ||\n Common.formatStatusMonitoringToString(item.getLAST_STATUS()).toLowerCase().contains(querySearch) || Common.formatStatusMonitoringToString(item.getLAST_STATUS()).contains(querySearch)) {\n searchResult.add(item);\n }\n }\n if (searchResult.isEmpty())\n tvEmptySearch.setText(\"No results found for '\" + querySearch + \"'\");\n else\n tvEmptySearch.setText(\"\");\n\n searchAdapter = new ListAdapter(getContext(), searchResult);\n rvList.setAdapter(searchAdapter);\n }", "private List<BusinessVO> searchBusiness(String search, String sendingId) {\n\t\tString searchTerm = \"%\"+StringUtil.checkVal(search).toLowerCase()+\"%\";\n\t\tlog.debug(\"searching businesses for \" + searchTerm);\n\t\tStringBuilder sql = new StringBuilder(250);\n\t\tString schema = getCustomSchema();\n\t\tList<Object> params = new ArrayList<>();\n\t\tString[] idParts = sendingId.split(\"_\");\n\n\t\tsql.append(\"select * from \").append(schema).append(\"rezdox_business b \");\n\t\tsql.append(DBUtil.INNER_JOIN).append(\"(select business_id from \").append(schema).append(\"rezdox_business_member_xr where status_flg = 1 group by business_id) bmxa on b.business_id = bmxa.business_id \");\n\t\t//omit business over their connection quota\n\t\tsql.append(DBUtil.INNER_JOIN).append(schema).append(\"rezdox_connection_quota_view q on b.business_id=q.business_id and q.quota_no > 0 \");\n\n\t\tsql.append(\"where (lower(b.business_nm) like ? or lower(b.email_address_txt) like ? or lower(b.address_txt) like ?) \");\n\t\tparams.add(searchTerm);\n\t\tparams.add(searchTerm);\n\t\tparams.add(searchTerm);\n\n\t\tsql.append(\"and b.business_id != ? and b.business_id not in ( select case \");\n\t\tparams.add(idParts[1]);\n\n\t\tif(\"m\".equalsIgnoreCase(idParts[0])) {\n\t\t\t//member looking for business\n\t\t\tsql.append(\"when sndr_member_id is not null and sndr_member_id=? and rcpt_business_id is not null then rcpt_business_id \");\n\t\t\tsql.append(\"when rcpt_member_id is not null and rcpt_member_id=? and sndr_business_id is not null then sndr_business_id \");\t\t\n\t\t\tparams.add(idParts[1]);\n\t\t\tparams.add(idParts[1]);\n\t\t}else {\n\t\t\t//business looking for business\n\t\t\tsql.append(\"when sndr_business_id is not null and sndr_business_id=? and rcpt_business_id is not null then rcpt_business_id \");\n\t\t\tsql.append(\"when rcpt_business_id is not null and rcpt_business_id=? and sndr_business_id is not null then sndr_business_id \");\n\t\t\tparams.add(idParts[1]);\n\t\t\tparams.add(idParts[1]);\n\t\t}\n\t\tsql.append(\"else '-1' end as business_id from \").append(schema).append(\"rezdox_connection group by business_id)\");\n\t\tsql.append(\" order by business_nm asc\");\n\n\t\t//run the query & return the results\n\t\tDBProcessor dbp = new DBProcessor(dbConn, schema);\n\t\tdbp.setGenerateExecutedSQL(log.isDebugEnabled());\n\t\tList<BusinessVO> data = dbp.executeSelect(sql.toString(), params, new BusinessVO());\n\t\tlog.debug(\"number of businesses found \" + data.size());\n\t\treturn data;\n\t}", "public LiveData<List<Adoption>> searchAdoptions(Context ctx, String adoptionToSearch)\n {\n // crear bd room\n ProjectDatabase db = Room.databaseBuilder(ctx,\n ProjectDatabase.class,\n \"projectDB\").build();\n\n // si no se recibio nada muestra todos los productos del catalogo\n if(adoptionToSearch.isEmpty())\n {\n adoptions= db.adoptionDao().getAll();\n }\n // busca el nombre de un producto en especifico\n else\n {\n adoptions = db.adoptionDao().search(adoptionToSearch);\n }\n\n return adoptions;\n }", "void loadSearch(UserSearch search);", "void search();", "void search();", "public void retriveSearchSaleDataFromDB(String search1,String search2, String selection) throws SQLException {\r\n\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n\r\n\r\n Character x = '\\'';\r\n String y = \"%\";\r\n ResultSet rs = null;\r\n ResultSet rs2 = null;\r\n\r\n String searchWord = x + y + search1 + y + x;\r\n String searchWord1 = x + search1 + x;\r\n String searchWord2 = x + search2 + x;\r\n\r\n\r\n try (Connection con = DBConnection.getconnection(); Statement stmt = con.createStatement()) {\r\n\r\n // selction of the SQL statment depending on RadioButton clicked by the user\r\n if (selection.equals(\"SaleNumber\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.SaleNumber>=\" + search1 + \" AND \" + \"Sales.SaleNumber<=\" + search2; // filters rows by Sale Number\r\n rs = stmt.executeQuery(SQL);\r\n\r\n\r\n } else if (selection.equals(\"dateSelected\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Date between \" + searchWord1 + \" AND \" + searchWord2; // filters rows by selected date\r\n rs = stmt.executeQuery(SQL);\r\n\r\n\r\n } else if (selection.equals(\"customerName\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Customer like \" + searchWord; // filters rows by typed Customer Name\r\n rs = stmt.executeQuery(SQL);\r\n } else if (selection.equals(\"productName\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Product like \" + searchWord; // filters rows by typed Product Name\r\n rs = stmt.executeQuery(SQL);\r\n } else if (selection.equals(\"category\")) {\r\n\r\n String SQL = \"SELECT * FROM Sales where Sales.Category like \" + searchWord; // filters rows by typed Category\r\n rs = stmt.executeQuery(SQL);\r\n }\r\n\r\n while (rs.next()) {\r\n addSaleToTableList(new Sales(rs.getInt(\"SaleNumber\"), simpleDateFormat.format(rs.getDate(\"Date\")), rs.getString(\"Time\"), rs.getString(\"Customer\"),\r\n rs.getString(\"Product\"), rs.getString(\"Code\"), rs.getString(\"Size\"),\r\n rs.getString(\"Units\"), rs.getString(\"Category\"), rs.getString(\"Quantity\"), rs.getString(\"UnitPrice\"), rs.getString(\"SalePrice\")));\r\n\r\n }\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public List<User> searchUser(String searchValue);", "public void search() throws SQLException;", "public void searchFunction() {\n textField_Search.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n tableView.setPredicate(new Predicate<TreeItem<EntryProperty>>() {\n @Override\n public boolean test(TreeItem<EntryProperty> entryTreeItem) {\n Boolean flag = entryTreeItem.getValue().titleProperty().getValue().toLowerCase().contains(newValue.toLowerCase()) ||\n entryTreeItem.getValue().usernameProperty().getValue().toLowerCase().contains(newValue.toLowerCase());\n return flag;\n }\n });\n }\n });\n }", "private static void searchForItem() {\r\n\t\tSystem.out.println(\"******************************************************************************************\");\r\n\t\tSystem.out.println(\" Please type your search queries\");\r\n\t\tSystem.out.println();\r\n\t\tString choice = \"\";\r\n\t\tif (scanner.hasNextLine()) {\r\n\t\t\tchoice = scanner.nextLine();\r\n\t\t}\r\n\t\t//Currently only supports filtering by name\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" All products that matches your search are as listed\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Id|Name |Brand |Price |Total Sales\");\r\n\t\tint productId = 0;\r\n\t\tfor (Shop shop : shops) {\r\n\t\t\tint l = shop.getAllSales().length;\r\n\t\t\tfor (int j = 0; j < l; j++) {\r\n\t\t\t\tif (shop.getAllSales()[j].getName().contains(choice)) {\r\n\t\t\t\t\tprintProduct(productId, shop.getAllSales()[j]);\r\n\t\t\t\t}\r\n\t\t\t\tproductId++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void searchTableDetailFilter() {\n DefaultTableModel table = (DefaultTableModel) tblLimitDetail.getModel();\n String search;\n search = txtSearchFilterDetail.getText();\n TableRowSorter<DefaultTableModel> tr;\n tr = new TableRowSorter<>(table);\n tblLimitDetail.setRowSorter(tr);\n tr.setRowFilter(RowFilter.regexFilter(\"(?i)\" + search, 1, 2, 3, 4));\n }", "public void treatmentSearch(){\r\n searchcb.getItems().addAll(\"treatmentID\",\"treatmentName\",\"medicineID\", \"departmentID\", \"diseaseID\");\r\n searchcb.setValue(\"treatmentID\");;\r\n }", "List<ShipmentInfoPODDTO> search(String query);", "public abstract S getSearch();", "List<Revenue> search(String query);", "public void search() {\n }", "@Override\n\tpublic void searchByMobile() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Mobile\").toString().equals(search)) {\n\t\t\t\tpMob = jsnobj.get(\"Mobile\").toString();\n\t\t\t\tpName = jsnobj.get(\"Patient's name\").toString();\n\t\t\t\tpId = jsnobj.get(\"Patient's ID\").toString();\n\t\t\t\tSystem.out.print(++count + \" Name:\" + pName + \" ID:\" + pId + \" Mobile:\" + pMob + \" Age:\"\n\t\t\t\t\t\t+ jsnobj.get(\"Age\") + \"\\n\\n\");\n\t\t\t}\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void performSearch() {\n History.newItem(MyWebApp.SEARCH_RESULTS);\n getMessagePanel().clear();\n if (keywordsTextBox.getValue().isEmpty()) {\n getMessagePanel().displayMessage(\"Search term is required.\");\n return;\n }\n mywebapp.getResultsPanel().resetSearchParameters();\n //keyword search does not restrict to spots\n mywebapp.addCurrentLocation();\n if (markFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(markFilterCheckbox.getValue());\n }\n if (contestFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setContests(contestFilterCheckbox.getValue());\n }\n if (geoFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setGeospatialOff(!geoFilterCheckbox.getValue());\n }\n if (plateFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(plateFilterCheckbox.getValue());\n }\n if (spotFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setSpots(spotFilterCheckbox.getValue());\n }\n String color = getValue(colorsListBox);\n mywebapp.getResultsPanel().getSearchParameters().setColor(color);\n String manufacturer = getValue(manufacturersListBox);\n if (manufacturer != null) {\n Long id = new Long(manufacturer);\n mywebapp.getResultsPanel().getSearchParameters().setManufacturerId(id);\n }\n String vehicleType = getValue(vehicleTypeListBox);\n mywebapp.getResultsPanel().getSearchParameters().setVehicleType(vehicleType);\n// for (TagHolder tagHolder : tagHolders) {\n// mywebapp.getResultsPanel().getSearchParameters().getTags().add(tagHolder);\n// }\n mywebapp.getResultsPanel().getSearchParameters().setKeywords(keywordsTextBox.getValue());\n mywebapp.getMessagePanel().clear();\n mywebapp.getResultsPanel().performSearch();\n mywebapp.getTopMenuPanel().setTitleBar(\"Search\");\n //mywebapp.getResultsPanel().setImageResources(resources.search(), resources.searchMobile());\n }", "List<ResultDTO> searchUser(String query);", "public void search(String text){\n filteredList.clear();\n\n if(TextUtils.isEmpty(text)){\n filteredList.addAll(filteredListForSearch);\n }\n\n else{\n String query = text.toLowerCase();\n for(SensorResponse item : filteredListForSearch){\n if(item.getSensor_Type().toLowerCase().contains(query) || Long.toString(item.getBattery()).toLowerCase().contains(query)\n || Long.toString(item.getDate_Time()).toLowerCase().contains(query) || Double.toString(item.getLat()).toLowerCase().contains(query)\n || Double.toString(item.getLong()).toLowerCase().contains(query) || item.getSensorHealth().toLowerCase().contains(query)\n || Long.toString(item.getSensor_ID()).toLowerCase().contains(query) || Double.toString(item.getSensor_Val()).toLowerCase().contains(query)){\n filteredList.add(item);\n }\n }\n }\n removeDuplicates();\n notifyDataSetChanged();\n }", "public void searchField(String name) {\r\n\t\tsafeType(addVehiclesHeader.replace(\"Add Vehicle\", \"Search\"), name);\r\n\t\t;\r\n\t}", "private void search(String product) {\n // ..\n }", "List<Cemetery> search(String query);", "public Cursor[] search(String data[]) {\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor results[] = new Cursor[6];\n String innerProduct = TABLE_ORGANIZATION + \" O\";\n String whereClause = \"\";\n boolean hasLoc = false;\n// Log.e(\"Data Length\",String.valueOf(data.length));\n for (int i = 0; i < data.length; ++i) {\n Log.e(\"HERE\", \"HERE\");\n Log.e(\"Data[i]\", data.toString());\n if ((data[i].length() > 0)) {\n if (i == 1) {\n innerProduct = innerProduct + \", \" + TABLE_CATEGORY + \" C\";\n innerProduct = innerProduct + \", \" + TABLE_FALLS_IN + \" F\";\n whereClause = whereClause + \" AND O.\" + FIELD_ORG_OID + \" = \" + \" F.\" + RELATION_FALLS_IN_OID;\n whereClause = whereClause + \" AND F.\" + RELATION_FALLS_IN_CNAME + \" = \" + \" C.\" + FIELD_CAT_cName;\n whereClause = whereClause + \" AND C.\" + FIELD_CAT_cName + \" LIKE '%\" + data[i] + \"%'\";\n }\n if ((i >= 2) && (i <= 4) && (!hasLoc)) {\n whereClause = whereClause + \" AND O.\" + FIELD_ORG_OID + \" = \" + \" LOC.\" + FIELD_ORG_OID;\n innerProduct = innerProduct + \", \" + TABLE_LOCATION + \" LOC\";\n hasLoc = true;\n }\n if (i == 2) {\n whereClause = whereClause + \" AND LOC.\" + FIELD_LOC_ZIP + \" LIKE '%\" + data[i] + \"%'\";\n }\n if (i == 3) {\n whereClause = whereClause + \" AND LOC.\" + FIELD_LOC_CITY + \" LIKE '%\" + data[i] + \"%'\";\n }\n if (i == 4) {\n whereClause = whereClause + \" AND LOC.\" + FIELD_LOC_STATE + \" LIKE '%\" + data[i] + \"%'\";\n }\n if (i == 6) {\n innerProduct = innerProduct + \", \" + TABLE_POPULATION + \" P\";\n innerProduct = innerProduct + \", \" + TABLE_SERVES_PEOPLE + \" SP\";\n whereClause = whereClause + \" AND SP.\" + RELATION_SERVESP_OID + \" = \" + \" O.\" + FIELD_ORG_OID;\n whereClause = whereClause + \" AND SP.\" + RELATION_SERVESP_TYPE + \" = \" + \" P.\" + FIELD_POP_TYPE;\n whereClause = whereClause + \" AND P.\" + FIELD_POP_TYPE + \" LIKE '%\" + data[i] + \"%'\";\n }\n if (i == 7) {\n innerProduct = innerProduct + \", \" + TABLE_LANGUAGE + \" L\";\n innerProduct = innerProduct + \", \" + TABLE_SERVESL + \" SL\";\n whereClause = whereClause + \" AND SL.\" + RELATION_SERVES_LAN_OID + \" = \" + \" O.\" + FIELD_ORG_OID;\n whereClause = whereClause + \" AND SL.\" + RELATION_SERVES_LAN_LTYPE + \" = \" + \" L.\" + FIELD_LAN_LTYPE;\n whereClause = whereClause + \" AND L.\" + FIELD_LAN_LTYPE + \" LIKE '%\" + data[i] + \"%'\";\n }\n }\n }\n Log.e(\"Querry\", \"SELECT O.\" + FIELD_ORG_OID + \", O.\" + FIELD_ORG_NAME +\n \", O.\" + FIELD_ORG_EMAIL + \", O.\" + FIELD_ORG_WEBSITE +\n \", O.\" + FIELD_ORG_COST + \", O.\" + FIELD_ORG_ADDITIONAL\n + \", O.\" + FIELD_ORG_ASSISTANCE + \", O.\" + FIELD_ORG_OTHER\n + \" FROM \" + innerProduct + \" WHERE O.\"\n + FIELD_ORG_NAME + \" LIKE '%\" + data[0] + \"%'\" +\n \" AND O.\" + FIELD_ORG_COST + \" LIKE '%\" + data[5]\n + \"%'\" + whereClause + \";\");\n Cursor Organization = db.rawQuery(\"SELECT O.\" + FIELD_ORG_OID + \", O.\" + FIELD_ORG_NAME +\n \", O.\" + FIELD_ORG_EMAIL + \", O.\" + FIELD_ORG_WEBSITE +\n \", O.\" + FIELD_ORG_COST + \", O.\" + FIELD_ORG_ADDITIONAL\n + \", O.\" + FIELD_ORG_ASSISTANCE + \", O.\" + FIELD_ORG_OTHER\n + \" FROM \" + innerProduct + \" WHERE O.\"\n + FIELD_ORG_NAME + \" LIKE '%\" + data[0] + \"%'\" +\n \" AND O.\" + FIELD_ORG_COST + \" LIKE '%\" + data[5]\n + \"%'\" + whereClause + \";\", null);\n Cursor Language = null;\n Cursor Population = null;\n Cursor Category = null;\n Cursor Location = null;\n Cursor Phone = null;\n if (Organization.moveToFirst()) {\n Log.e(\"More\", \"stuff\");\n String sLang = \" SL.\" + RELATION_SERVES_LAN_OID + \" = \" + Organization.getString(0) +\n \" AND SL.\" + RELATION_SERVES_LAN_LTYPE + \" = \" + \" L.\" + FIELD_LAN_LTYPE;\n String sPop = \" SP.\" + RELATION_SERVESP_OID + \" = \" + Organization.getString(0) +\n \" AND SP.\" + RELATION_SERVESP_TYPE + \" = \" + \" P.\" + FIELD_POP_TYPE;\n String sCat = \" F.\" + RELATION_FALLS_IN_OID + \" = \" + Organization.getString(0) +\n \" AND F.\" + RELATION_FALLS_IN_CNAME + \" = \" + \" C.\" + FIELD_CAT_cName;\n String sLoc = \" LOC.\" + FIELD_LOC_OID + \" = \" + Organization.getString(0);\n String sPhone = \" P.\" + FIELD_ORG_OID + \" = \" + Organization.getString(0);\n Log.e(\"Die\", \"1\");\n while (Organization.move(1)) {\n Log.e(\"In\", \"While\");\n sCat = sCat + \" AND F.\" + RELATION_FALLS_IN_OID + \" = \" + Organization.getString(0) +\n \" AND F.\" + RELATION_FALLS_IN_CNAME + \" = \" + \" C.\" + FIELD_CAT_cName;\n sPop = sPop + \" AND SP.\" + RELATION_SERVESP_OID + \" = \" + Organization.getString(0) +\n \" AND SP.\" + RELATION_SERVESP_TYPE + \" = \" + \" P.\" + FIELD_POP_TYPE;\n sLang = sLang + \" AND SL.\" + RELATION_SERVES_LAN_OID + \" = \" + Organization.getString(0) +\n \" AND SL.\" + RELATION_SERVES_LAN_LTYPE + \" = \" + \" L.\" + FIELD_LAN_LTYPE;\n sLoc = sLoc + \" AND LOC.\" + FIELD_LOC_OID + \" = \" + Organization.getString(0);\n sPhone = sPhone + \" AND P.\" + FIELD_ORG_OID + \" = \" + Organization.getString(0);\n }\n Category = db.rawQuery(\"SELECT C.\" + FIELD_CAT_cName + \", F.\" + RELATION_FALLS_IN_OID + \" FROM \" + TABLE_FALLS_IN + \" F, \" +\n TABLE_CATEGORY + \" C WHERE\" + sCat, null);\n Population = db.rawQuery(\"SELECT P.\" + FIELD_POP_TYPE + \", SP.\" + RELATION_SERVESP_OID + \" FROM \" + TABLE_POPULATION + \" P, \" +\n TABLE_SERVES_PEOPLE + \" SP WHERE\" + sPop, null);\n Language = db.rawQuery(\"SELECT L.\" + FIELD_LAN_LTYPE + \", SL.\" + RELATION_SERVES_LAN_OID + \" FROM \" + TABLE_LANGUAGE + \" L, \" +\n TABLE_SERVESL + \" SL WHERE\" + sLang, null);\n Location = db.rawQuery(\"SELECT LOC.\" + FIELD_LOC_STREET + \", LOC.\" + FIELD_LOC_CITY + \", LOC.\" +\n FIELD_LOC_STATE + \", LOC.\" + FIELD_LOC_ZIP + \", LOC.\" + FIELD_LOC_OID + \" FROM \" + TABLE_LOCATION + \" LOC \" +\n \"WHERE\" + sLoc, null);\n Phone = db.rawQuery(\"SELECT P.\" + FIELD_PHONE_PHONENUM + \", P.\" + FIELD_ORG_OID + \" FROM \" + TABLE_PHONE + \" P WHERE\" + sPhone, null);\n\n }\n results[0] = Organization;\n results[1] = Category;\n results[2] = Population;\n results[3] = Language;\n results[4] = Location;\n results[5] = Phone;\n return results;\n }", "@Override\n\tpublic List<SApplicationcategory> find(String searchinfo, int page, int rows) {\n\t\tString hql=\"from \"+tablename +\" where 1=1 \";\t\t\n\t\tif(searchinfo!=null&& !searchinfo.equals(\"\")){\t\t\t\n\t\t\thql+=\" and t.name like '%\"+ searchinfo+\"%' \";\n\t\t}\t\t\n\t\treturn SApplicationcategorydao.find(hql, page, rows);\n\t}", "private void createSearch(boolean realSearch) {\n\n\t\tString sqlQuery = new String();\n\n\t\tif (useLucene.isSelected()) {\n\n\t\t\tif (datachoose.getSelectedIndex() == data_ABOVE) {\n\t\t\t\t// need to reference the above data.\n\t\t\t\tString usp = (String) winG.getSelectedUser();\n\t\t\t\tString dates[] = winG.getDateRange_toptoolbar();\n\t\t\t\tsqlQuery = \"select distinct mailref,dates from email where sender = '\" + usp + \"' or rcpt = '\" + usp\n\t\t\t\t\t\t+ \"' and dates BETWEEN '\" + dates[winGui.startDate] + \"' AND '\" + dates[winGui.endDate]\n\t\t\t\t\t\t+ \"' \";\n\n\t\t\t} else if (datachoose.getSelectedIndex() == data_ALL) {\n\t\t\t\tsqlQuery = \"select distinct mailref,dates from email where type like 'text%'\";\n\t\t\t} else {\n\t\t\t\t// need to pop up sql\n\t\t\t\tsqlQuery = \"select distinct mailref,dates from email \" + queryText.getText().trim();\n\t\t\t}\n\n\t\t\tString results[][];\n\t\t\t// actual fetch of data\n\t\t\ttry {\n\t\t\t\tsynchronized (DBConnect) {\n\t\t\t\t\tresults = DBConnect.getSQLData(sqlQuery);\n\t\t\t\t}\n\t\t\t} catch (SQLException sqle) {\n\t\t\t\tsqle.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!realSearch) {\n\n\t\t\t\tJOptionPane.showMessageDialog(SearchEMT.this, \"The number of returned mailrefs are: \" + results.length);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tBusyWindow bw = new BusyWindow(\"Search Engine Setup\", \"Running\",true);\n\t\t\tbw.setMax(results.length);\n\t\t\tbw.setVisible(true);\n\t\t\t// need to setup prefetch cache\n\t\t\ttry {\n\t\t\t\tPreparedStatement ps = DBConnect\n\t\t\t\t\t\t.prepareStatementHelper(\"select hash,filename,type,body from message where mailref=?\");\n\n\t\t\t\t// real search need to build index here\n\t\t\t\t// TODO: see about adding path between folder and name\n\t\t\t\tIndexWriter writer = null;\n\t\t\t\t// stopanalyzer\n\t\t\t\t//writer = new IndexWriter(indexfolder + indexName.getText().trim(), new StandardAnalyzer(), true);\n\t\t\t\twriter = new IndexWriter(getIndexFileName(indexName.getText()), analyzer, true);\n\n\t\t\t\tDate start = new Date();\n\t\t\t\tfor (int i = 0; i < results.length; i++) {\n\t\t\t\t\tbw.progress(i);\n\n\t\t\t\t\tps.setString(1, results[i][0]);\n\n\t\t\t\t\tResultSet rs = ps.executeQuery();\n\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\tString type = rs.getString(3).toLowerCase();\n\n\t\t\t\t\t\tif (type.startsWith(\"image\") || type.startsWith(\"video\") || type.startsWith(\"audio\")) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tString hash = rs.getString(1);\n\t\t\t\t\t\tString name = rs.getString(2);\n\n\t\t\t\t\t\t// make a new, empty document\n\t\t\t\t\t\tDocument doc = new Document();\n\n\t\t\t\t\t\t// Add the path of the file as a field named \"path\". Use\n\t\t\t\t\t\t// a Text field, so\n\t\t\t\t\t\t// that the index stores the path, and so that the path\n\t\t\t\t\t\t// is searchable\n\t\t\t\t\t\tdoc.add(new Field(\"path\", hash,Field.Store.YES, Field.Index.UN_TOKENIZED));\n\t\t\t\t\t\tdoc.add(new Field(\"Date\", results[i][1],Field.Store.YES, Field.Index.UN_TOKENIZED));\n\t\t\t\t\t\tdoc.add(new Field(\"Type\", type,Field.Store.YES, Field.Index.UN_TOKENIZED));\n\t\t\t\t\t\tdoc.add(new Field(\"Name\", name,Field.Store.YES, Field.Index.UN_TOKENIZED));\n\t\t\t\t\t\tdoc.add(new Field(\"Mailref\", new String(results[i][0]),Field.Store.YES, Field.Index.UN_TOKENIZED));\n\t\t\t\t\t\t// Add the last modified date of the file a field named\n\t\t\t\t\t\t// \"modified\". Use a\n\t\t\t\t\t\t// Keyword field, so that it's searchable, but so that\n\t\t\t\t\t\t// no attempt is made\n\t\t\t\t\t\t// to tokenize the field into words.\n\t\t\t\t\t\t// doc.add(Field.Keyword(\"modified\",\n\t\t\t\t\t\t// DateField.timeToString(f.lastModified())));\n\n\t\t\t\t\t\t// Add the contents of the file a field named\n\t\t\t\t\t\t// \"contents\". Use a Text\n\t\t\t\t\t\t// field, specifying a Reader, so that the text of the\n\t\t\t\t\t\t// file is tokenized.\n\t\t\t\t\t\t// ?? why doesn't FileReader work here ??\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tjava.sql.Blob blob = rs.getBlob(4);\n\t\t\t\t\t\t\tint c;\n\t\t\t\t\t\t\tbyte buf[] = new byte[512];//\n\n\t\t\t\t\t\t\tInputStream is = blob.getBinaryStream();\n\t\t\t\t\t\t\tStringBuffer small2 = new StringBuffer(256);\n\t\t\t\t\t\t\twhile ((c = is.read(buf)) != -1) {\n\t\t\t\t\t\t\t\tsmall2.append(new String(buf, 0, c));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tString bodytext = small2.toString();\n\n\t\t\t\t\t\t\tdoc.add(new Field(\"contents\", bodytext,Field.Store.YES, Field.Index.TOKENIZED));\n\n\t\t\t\t\t\t\t// now to insert this doc.\n\t\t\t\t\t\t\twriter.addDocument(doc);\n\t\t\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\t\t\tioe.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbw.setTitle(\"optimizing\");\n\t\t\t\twriter.optimize();\n\t\t\t\twriter.close();\n\n\t\t\t\tDate end = new Date();\n\n\t\t\t\tSystem.out.print(end.getTime() - start.getTime());\n\t\t\t\tSystem.out.println(\" total milliseconds\");\n\n\t\t\t\tbw.setVisible(false);\n\n\t\t\t} catch (SQLException se) {\n\t\t\t\tse.printStackTrace();\n\t\t\t\treturn;\n\t\t\t} catch (IOException eio) {\n\t\t\t\teio.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t} else {\n\t\t\t// we use emt indexing\n\t\t\t// TODO: create code here\n\n\t\t}\n\t}", "@Query(\n \"Select t FROM Ticket t WHERE t.user.id = :userId \"\n + \"AND (LOWER(t.title) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR LOWER(t.id) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR LOWER(t.client.name) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR LOWER(t.user.name) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR LOWER(t.category.name) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR DATE_FORMAT(t.lastInteration, '%d/%m/%Y') LIKE CONCAT('%', :searchTerm, '%')) \"\n )\n public Page<Ticket> searchType1(@Param(\"userId\") Long userId,@Param(\"searchTerm\") String searchTerm,Pageable pageable);", "List<Card> search(String searchString, long userId) throws PersistenceCoreException;", "private void performSearch() {\n String text = txtSearch.getText();\n String haystack = field.getText();\n \n // Is this case sensitive?\n if (!chkMatchCase.isSelected()) {\n text = text.toLowerCase();\n haystack = haystack.toLowerCase();\n }\n \n // Check if it is a new string that the user is searching for.\n if (!text.equals(needle)) {\n needle = text;\n curr_index = 0;\n }\n \n // Grab the list of places where we found it.\n populateFoundList(haystack);\n \n // Nothing was found.\n if (found.isEmpty()) {\n Debug.println(\"FINDING\", \"No occurrences of \" + needle + \" found.\");\n JOptionPane.showMessageDialog(null, \"No occurrences of \" + needle + \" found.\",\n \"Nothing found\", JOptionPane.INFORMATION_MESSAGE);\n \n return;\n }\n \n // Loop back the indexes if we have reached the end.\n if (curr_index == found.size()) {\n curr_index = 0;\n }\n \n // Go through the findings one at a time.\n int indexes[] = found.get(curr_index);\n field.select(indexes[0], indexes[1]);\n curr_index++;\n }", "public List<Budget> search (String search) throws SQLException{\n List<Budget> found = new ArrayList<Budget>();\n DatabaseConnection dbaInfo = new DatabaseConnection();\n Connection conn = null;\n try {\n conn = dbaInfo.getConnection();\n search = search + \"%\";\n PreparedStatement ps = conn.prepareStatement(\"SELECT * FROM finance.budget WHERE (bud_category ILIKE ?) OR (bud_description ILIKE ?);\");\n ps.setString(1, search);\n ps.setString(2, search);\n ResultSet rs = ps.executeQuery();\n found = listResults(rs);\n }catch (Exception error) {\n error.printStackTrace();\n conn.rollback();\n }finally {\n conn.close();\n }\n return found;\n }", "public List<Ve> searchVe(String maSearch);", "@Override\n\tpublic void search() {\n\n\t\tif (firstMonth.equalsIgnoreCase(secondMonth)) {\n\t\t\tFacesContext.getCurrentInstance().addMessage(\n\t\t\t\t\tnull,\n\t\t\t\t\tnew FacesMessage(\n\t\t\t\t\t\t\t\"please choose different months to compare\"));\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\n\t\t\tString queury = \"SELECT nvl(TO_CHAR(INVOICES.INVOICE_ORDER) ,'NA') AS INVOICE_ORDER \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.INVOICE_NUMBER ,'NA') AS INVOICE_NUMBER \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.BOOKING_FILE_NUMBER ,'NA') AS BOOKING_FILE_NUMBER \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.DEPARTURE_DATE, 'dd/mm/yyyy') ,'NA') AS DEPARTURE_DATE \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.ARRIVAL_DATE, 'dd/mm/yyyy') ,'NA') AS ARRIVAL_DATE \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.EMPLOYEE_ID ,'NA') AS EMPLOYEE_ID \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.COST_CENTER ,'NA') AS COST_CENTER \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.COST_CENTER_DEPARTMENT ,'NA') AS COST_CENTER_DEPARTMENT \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.PASSENGER_NAME ,'NA') AS PASSENGER_NAME \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.SERVICE_TYPE ,'NA') AS SERVICE_TYPE \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.SERVICE_DESC ,'NA') AS SERVICE_DESC \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.ROUTING ,'NA') AS ROUTING \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.INTER_DOM ,'NA') AS INTER_DOM \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.CHECK_IN, 'dd/mm/yyyy') ,'NA') AS CHECK_IN \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.CHECK_OUT, 'dd/mm/yyyy') ,'NA') AS CHECK_OUT \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.NUMBER_OF_NIGHTS) ,0) AS NUMBER_OF_NIGHTS \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.NUMBER_OF_ROOMS) ,0) AS NUMBER_OF_ROOMS \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.AIRLINE ,'NA') AS AIRLINE \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.ROOM_TYPE ,'NA') AS ROOM_TYPE \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.SUPPLIER_NAME ,'NA') AS SUPPLIER_NAME \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.NET_AMOUNT ,0) AS NET_AMOUNT \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.OPERATION_FEES ,0) AS OPERATION_FEES \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.TOTAL_AMOUNT ,0) AS TOTAL_AMOUNT \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.TICKET_NO ,'NA') AS TICKET_NO \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.TRAVEL_FORM_NUMBER ,'NA') AS TRAVEL_FORM_NUMBER \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.DESCRIPTION ,'NA') AS DESCRIPTION \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.FROM_DATE, 'dd/mm/yyyy') ,'NA') AS FROM_DATE \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.TO_DATE, 'dd/mm/yyyy') ,'NA') AS TO_DATE \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.EMPLOYEE_DEPARTMENT ,'NA') AS EMPLOYEE_DEPARTMENT \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.INVOICE_DATE, 'dd/mm/yyyy') ,'NA') AS INVOICE_DATE \\n\"\n\t\t\t\t\t+ \" ,nvl(UPLOADED_INVOICE_FILE.INVOICES_MONTH ,'NA') AS INVOICES_MONTH \\n\"\n\t\t\t\t\t+ \" FROM INVOICES INNER JOIN UPLOADED_INVOICE_FILE \\n\"\n\t\t\t\t\t+ \" ON INVOICES.UPLOADED_INVOICE_FILE_ID = UPLOADED_INVOICE_FILE.ID \\n\"\n\t\t\t\t\t+ \" WHERE UPLOADED_INVOICE_FILE.INVOICES_MONTH IN ('\"\n\t\t\t\t\t+ firstMonth\n\t\t\t\t\t+ \"','\"\n\t\t\t\t\t+ secondMonth\n\t\t\t\t\t+ \"') \\n\"\n\t\t\t\t\t+ \" ORDER BY UPLOADED_INVOICE_FILE.INVOICES_MONTH,INVOICES.INVOICE_ORDER \\n\";\n\n\t\t\tdynamicReport = new GenerateDynamicReport();\n\t\t\tdynamicReport.setReportName(\"InvoicesComparisonReport\");\n\t\t\tdynamicReport.setReportTitle(\"Invoices Comparison Report\");\n\t\t\tdynamicReport.setReportQuery(queury);\n\n\t\t\tdynamicReport.columnsNames.add(\"Invoice Order\");\n\t\t\tdynamicReport.columnsNames.add(\"Invoice Number\");\n\t\t\tdynamicReport.columnsNames.add(\"Booking File Number\");\n\t\t\tdynamicReport.columnsNames.add(\"Departure Date\");\n\t\t\tdynamicReport.columnsNames.add(\"Arrival Date\");\n\t\t\tdynamicReport.columnsNames.add(\"Employee Id\");\n\t\t\tdynamicReport.columnsNames.add(\"Cost Center\");\n\t\t\tdynamicReport.columnsNames.add(\"Cost Center Department\");\n\t\t\tdynamicReport.columnsNames.add(\"Passenger Name\");\n\t\t\tdynamicReport.columnsNames.add(\"Service Type\");\n\t\t\tdynamicReport.columnsNames.add(\"Service Description\");\n\t\t\tdynamicReport.columnsNames.add(\"Routing\");\n\t\t\tdynamicReport.columnsNames.add(\"Int'l / Dom\");\n\t\t\tdynamicReport.columnsNames.add(\"Check In\");\n\t\t\tdynamicReport.columnsNames.add(\"Check Out\");\n\t\t\tdynamicReport.columnsNames.add(\"Number of Nights\");\n\t\t\tdynamicReport.columnsNames.add(\"Number of Rooms\");\n\t\t\tdynamicReport.columnsNames.add(\"Airline\");\n\t\t\tdynamicReport.columnsNames.add(\"Room Type\");\n\t\t\tdynamicReport.columnsNames.add(\"Supplier Name\");\n\t\t\tdynamicReport.columnsNames.add(\"Net Amount\");\n\t\t\tdynamicReport.columnsNames.add(\"Operation Fees\");\n\t\t\tdynamicReport.columnsNames.add(\"Total Amount\");\n\t\t\tdynamicReport.columnsNames.add(\"Ticket No\");\n\t\t\tdynamicReport.columnsNames.add(\"Travel Form Number\");\n\t\t\tdynamicReport.columnsNames.add(\"Description\");\n\t\t\tdynamicReport.columnsNames.add(\"From Date\");\n\t\t\tdynamicReport.columnsNames.add(\"To Date\");\n\t\t\tdynamicReport.columnsNames.add(\"Employee Department\");\n\t\t\tdynamicReport.columnsNames.add(\"Invoice Date\");\n\t\t\tdynamicReport.columnsNames.add(\"Invoices Month\");\n\n\t\t\tdynamicReport.fieldsNames.add(\"INVOICE_ORDER\");\n\t\t\tdynamicReport.fieldsNames.add(\"INVOICE_NUMBER\");\n\t\t\tdynamicReport.fieldsNames.add(\"BOOKING_FILE_NUMBER\");\n\t\t\tdynamicReport.fieldsNames.add(\"DEPARTURE_DATE\");\n\t\t\tdynamicReport.fieldsNames.add(\"ARRIVAL_DATE\");\n\t\t\tdynamicReport.fieldsNames.add(\"EMPLOYEE_ID\");\n\t\t\tdynamicReport.fieldsNames.add(\"COST_CENTER\");\n\t\t\tdynamicReport.fieldsNames.add(\"COST_CENTER_DEPARTMENT\");\n\t\t\tdynamicReport.fieldsNames.add(\"PASSENGER_NAME\");\n\t\t\tdynamicReport.fieldsNames.add(\"SERVICE_TYPE\");\n\t\t\tdynamicReport.fieldsNames.add(\"SERVICE_DESC\");\n\t\t\tdynamicReport.fieldsNames.add(\"ROUTING\");\n\t\t\tdynamicReport.fieldsNames.add(\"INTER_DOM\");\n\t\t\tdynamicReport.fieldsNames.add(\"CHECK_IN\");\n\t\t\tdynamicReport.fieldsNames.add(\"CHECK_OUT\");\n\t\t\tdynamicReport.fieldsNames.add(\"NUMBER_OF_NIGHTS\");\n\t\t\tdynamicReport.fieldsNames.add(\"NUMBER_OF_ROOMS\");\n\t\t\tdynamicReport.fieldsNames.add(\"AIRLINE\");\n\t\t\tdynamicReport.fieldsNames.add(\"ROOM_TYPE\");\n\t\t\tdynamicReport.fieldsNames.add(\"SUPPLIER_NAME\");\n\t\t\tdynamicReport.fieldsNames.add(\"NET_AMOUNT\");\n\t\t\tdynamicReport.fieldsNames.add(\"OPERATION_FEES\");\n\t\t\tdynamicReport.fieldsNames.add(\"TOTAL_AMOUNT\");\n\t\t\tdynamicReport.fieldsNames.add(\"TICKET_NO\");\n\t\t\tdynamicReport.fieldsNames.add(\"TRAVEL_FORM_NUMBER\");\n\t\t\tdynamicReport.fieldsNames.add(\"DESCRIPTION\");\n\t\t\tdynamicReport.fieldsNames.add(\"FROM_DATE\");\n\t\t\tdynamicReport.fieldsNames.add(\"TO_DATE\");\n\t\t\tdynamicReport.fieldsNames.add(\"EMPLOYEE_DEPARTMENT\");\n\t\t\tdynamicReport.fieldsNames.add(\"INVOICE_DATE\");\n\t\t\tdynamicReport.fieldsNames.add(\"INVOICES_MONTH\");\n\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.DOUBLE.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.DOUBLE.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.DOUBLE.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\n\t\t\tString reportPath = dynamicReport.exportDynamicReportToExcel();\n\t\t\tgetDownloadableReportFile(reportPath);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "Customer search(String login);", "LazyDataModel<ReagentResult> getSearchResults();", "private void search(Object value)\r\n\t\t{\n\r\n\t\t}", "public void search(Map<String, String> searchParam);", "private void btnSearchActionPerformed(java.awt.event.ActionEvent evt) {\n if (!txtSearch.getText().equals(\"\")) {\n Flights x = new Flights();\n Flights returned = x.searchFlight(txtSearch.getText());\n if (returned.getFlightID().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Not Found\");\n } else {\n SetData(returned);\n \n }\n } else {\n JOptionPane.showMessageDialog(null, \"Enter Data\");\n }\n }", "private void search(SearchRequest request) {\r\n\t\tif(request == null)return;\r\n\t\tList<Record> results = handler.search(request);\r\n\t\tlist.show(results);\r\n\t\tpanInfo.setNumRec(results.size());\r\n\t\tpanInfo.setTotalAmt(Record.sumBalance(results));\r\n\t}", "@Override\r\n\tpublic void search() {\n\r\n\t}", "public void search(String searchTerm)\r\n\t{\r\n\t\tpalicoWeapons = FXCollections.observableArrayList();\r\n\t\tselect(\"SELECT * FROM Palico_Weapon WHERE name LIKE '%\" + searchTerm + \"%'\");\r\n\t}", "void row_search(String[] col, String orderType){\n\t\t//Search Tuple by executing SQL command\n\t\tStatement stm=null;\n\t\tResultSet rs=null;\n\t\tString conditions=\"\";\n\t\tfor(int i=1;i<colNum;i++){\n\t\t\tif(!col[i].isEmpty()){\n\t\t\t\tif(i!=1 && conditions !=\"\") conditions+=\" and \";\n\t\t\t\tif(i==1) conditions+=\"Type='\"+col[i]+\"' \";\n\t\t\t\telse if(i==2) conditions+=\"lower(Address) like lower('%\"+col[2]+\"%') \";\n\t\t\t\telse if(i==3) conditions+=\"lower(City) like lower('%\"+col[3]+\"%') \";\n\t\t\t\telse if(i==4) conditions+=\"State like '\"+col[4]+\"' \";\n\t\t\t\telse if(i==5) conditions+=\"Zip like '\"+col[5]+\"' \";\n\t\t\t\telse if(i==6) conditions+=\"Price<=\"+col[6]+\" \";\n\t\t\t\telse if(i==7) conditions+=\"Beds>=\"+col[7]+\" \";\n\t\t\t\telse if(i==8) conditions+=\"Baths>=\"+col[8]+\" \";\n\t\t\t\t//else if(i==9) conditions+=\"SQFT>=\"+col[9]+\" \";\n\t\t\t\t//else if(i==10) conditions+=\"Year_built>=\"+col[10]+\" \";\n\t\t\t\telse if(i==11) conditions+=\"Parking_spot>=\"+col[11]+\" \";\n\t\t\t\telse if(i==12) conditions+=\"Days_on_Market<=\"+col[12]+\" \";\n\t\t\t\telse if(i==13) conditions+=\"Status like '\"+col[13]+\"' \";\n\t\t\t\telse if(i==14) conditions+=\"lower(Agency) like lower('%\"+col[14]+\"%') \";\n\t\t\t}\n\t\t}\n\t\t\n\t\tString sql=\"select * from \"+tableName;\n\t\tif(conditions!=\"\") sql+=\" where \"+conditions;\n\t\tsql+=orderType;\n\t\tSystem.out.println(\"sql: \"+sql); \n\t\t try{\n\t\t \t stm=con.createStatement(); \n\t\t \t rs=stm.executeQuery(sql);\n\t\t \t DataGUI.model.setRowCount(0);\n\t\t \t //Add rows to table model\n\t\t\t\t while(rs.next()){\n\t\t\t\t \tVector<Object> tempRow=new Vector<Object>();\n\t\t\t\t \t//Add cells to each row\n\t\t\t\t \tfor (int i = 1; i <= colNum; i++)\n\t\t\t\t \t\ttempRow.addElement(rs.getObject(i));\n\t\t\t\t \tDataGUI.model.addRow(tempRow);\n\t\t\t\t }\n\t\t\t//Catch SQL exception\t \n\t\t }catch (SQLException e ) {\n\t\t \t e.printStackTrace();\n\t\t } finally {\n\t\t \t try{\n\t\t if (stm != null) stm.close(); \n\t\t if (rs != null) rs.close(); \n\t\t }\n\t\t \t catch (SQLException e ) {\n\t\t \t\t e.printStackTrace(); \n\t\t\t }\n\t\t }\t\n\t}", "void searchProbed (Search search);", "List<Card> search(String searchString) throws PersistenceCoreException;", "void searchView(String name);", "@GetMapping(\"/search\")\n public ResponseEntity searchField(@RequestParam(\"type\") String type,@RequestParam(\"value\")String value){\n return new ResponseEntity<>(hr_service.findByField(type,value),HttpStatus.OK);\n }", "public void searchValue(ActionEvent actionEvent) {\n RadioButton selectedRadioButton = (RadioButton) radioSelector.getSelectedToggle();\n String toogleGroupValue = selectedRadioButton.getText();\n boolean valueSearch = false;\n if (toogleGroupValue.equals(\"Value\")) {\n valueSearch = true;\n }\n String text = searchText.getText();\n DataBase dataBase = new DataBase(file);\n ArrayList <KeyValue> data = dataBase.searchData(text, valueSearch);\n tableKeyValue.getItems().clear();\n if (data.size() > 0) {\n this.list.addAll(data);\n }\n\n }", "@Query(\n \"Select t FROM Ticket t WHERE t.responsible IS NOT NULL \"\n + \"AND (t.isOpen = :isOpen) \"\n + \"AND (LOWER(t.title) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR LOWER(t.id) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR LOWER(t.client.name) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR LOWER(t.user.name) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR LOWER(t.category.name) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR DATE_FORMAT(t.lastInteration, '%d/%m/%Y') LIKE CONCAT('%', :searchTerm, '%')) \"\n )\n public Page<Ticket> searchType4(@Param(\"isOpen\") Boolean isOpen, @Param(\"searchTerm\") String searchTerm,Pageable pageable);", "@Override\n\tpublic List<Map<String, Object>> selectDataListMap(Map<String, String> search) {\n\t\treturn null;\n\t}", "public Cursor getSearchedData(String filterData)\n {\n filterData = filterData.toUpperCase();\n\n /* We are using the rawQuery method to execute the SQLite Query we have made and return\n * the Data in the form of a Cursor. As for the Query itself SELECT specifies what Columns\n * we want to select in this case its everything (*), WHERE specifies the Condition\n * we place in this case we First check COL2 which contains the Movie Titles and Use Upper\n * to make it Upper Case and we use LIKE to see if the Movie Title from COL2 contains the\n * data that we are filtering, this same condition applies for COL4 and COl5 and by\n * using OR we can fulfil the WHERE Condition if any of these Conditions are met\n * */\n return this.getWritableDatabase().rawQuery(\n \"SELECT * FROM \" + TABLE_NAME +\n \" WHERE upper(\" + COL2 + \") LIKE '%\" + filterData + \"%'\" +\n \" OR upper(\" + COL4 + \") LIKE '%\" + filterData + \"%'\" +\n \" OR upper(\" + COL5 + \") LIKE '%\" + filterData + \"%'\", null);\n }", "@Override\n\tpublic void searchByName() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Patient's name\").toString().equals(search))\n\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t++count + \" Name:\" + jsnobj.get(\"Patient's name\") + \" ID:\" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t\t\t\t+ \" Mobile:\" + jsnobj.get(\"Mobile\") + \" Age:\" + jsnobj.get(\"Age\"));\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t}", "List<Codebadge> search(String query);", "public Cursor searchMovie(String search){\n SQLiteDatabase db = this.getReadableDatabase();\n String selectQuarry = \"SELECT * FROM \"+Db_Table+\" WHERE \" +MOVIE_NAME+\" LIKE '%\"+search+\"%' OR \"+MOVIE_DIRECTOR+\" LIKE '%\"+search+\"%' OR \"+MOVIE_CAST+\" LIKE '%\"+search+\"%'\";\n Cursor cursor =db.rawQuery(selectQuarry,null);\n return cursor;\n }", "List<SongVO> searchSong(String searchText) throws Exception;", "private void setSearchItems(Number index) {\n String searchSelected;\n if (index == null) {\n searchSelected = searchSelection.getSelectionModel().getSelectedItem();\n } else {\n searchSelected = menuItems[index.intValue()];\n }\n\n final String searchText = searchField.getText().trim().toUpperCase();\n if (searchText == null || \"\".equals(searchText)) {\n // Search field is blank, remove filters if active\n if (searchFilter != null) {\n filterList.remove(searchFilter);\n searchFilter = null;\n }\n applyFilters();\n return;\n }\n\n boolean matchAny = MATCHANY.equals(searchSelected);\n\n if (searchFilter == null) {\n searchFilter = new CustomerListFilter();\n searchFilter.setOr(true);\n filterList.add(searchFilter);\n } else {\n searchFilter.getFilterList().clear();\n }\n if ((matchAny || SURNAME.equals(searchSelected))) {\n searchFilter.addFilter(a -> {\n String aSurname = a.getSurname().toUpperCase();\n return (aSurname.contains(searchText));\n });\n }\n if ((matchAny || FORENAME.equals(searchSelected))) {\n searchFilter.addFilter(a -> {\n String aForename = a.getForename().toUpperCase();\n return (aForename.contains(searchText));\n });\n }\n if (matchAny || CHILD.equals(searchSelected)) {\n searchFilter.addFilter(a -> {\n String aChildname = a.getChildrenProperty().getValue().toUpperCase();\n return (aChildname.contains(searchText));\n });\n }\n if ((matchAny || CARREG.equals(searchSelected))) {\n searchFilter.addFilter(a -> {\n String aCars = a.getCarRegProperty().getValue().toUpperCase();\n return (aCars.contains(searchText));\n });\n }\n // No filter to apply?\n if (searchFilter.getFilterList().size() == 0) {\n filterList.remove(searchFilter);\n searchFilter = null;\n }\n applyFilters();\n }", "public List<Product> getProductBySearchName(String search) {\r\n List<Product> list = new ArrayList<>();\r\n String query = \"select * from Trungnxhe141261_Product\\n \"\r\n + \"where [name] like ? \";\r\n try {\r\n conn = new DBContext().getConnection();//mo ket noi voi sql\r\n ps = conn.prepareStatement(query);\r\n ps.setString(1, \"%\" + search + \"%\");\r\n rs = ps.executeQuery();\r\n while (rs.next()) {\r\n list.add(new Product(rs.getInt(1),\r\n rs.getString(2),\r\n rs.getString(3),\r\n rs.getDouble(4),\r\n rs.getString(5),\r\n rs.getString(6)));\r\n }\r\n } catch (Exception e) {\r\n }\r\n return list;\r\n }", "@Override\n\tpublic void search() {\n\t}", "DataFilter getDataFilter(Connection con, SqlSearch search) throws FxSqlSearchException;", "List<Corretor> search(String query);", "private void search(){\n solo.waitForView(R.id.search_action_button);\n solo.clickOnView(solo.getView(R.id.search_action_button));\n\n //Click on search bar\n SearchView searchBar = (SearchView) solo.getView(R.id.search_experiment_query);\n solo.clickOnView(searchBar);\n solo.sleep(500);\n\n //Type in a word from the description\n solo.clearEditText(0);\n solo.typeText(0, searchTerm);\n }", "public List search() {\n\t\tSessionFactory sf = new Configuration().configure()\n\t\t\t\t.buildSessionFactory();\n\t\tSession s = sf.openSession();\n\t\tQuery q = s.createQuery(\"from cat_vo\");\n\t\tList ls = q.list();\n\t\treturn ls;\n\t}", "private void doSearch(String queryStr) {\n\t\t\n\t\t\n\t\tdbHelper = new DatabaseHelper(getApplicationContext());\n\t\tall_Item = Items.getSearchResults(dbHelper, queryStr);\n\t\t\n\n\t\tsearch_list = (ListView) findViewById(R.id.search_list);\n\t\tadapter = new SearchResultListAdaptor(this, R.layout.search_list_display, all_Item);\n\t\tfor(int i=0;i<all_Item.size();i++)\n\t\t adapter.add(all_Item.get(i));\n\t\t\n\t\tsearch_list.setAdapter(adapter);\n\t\t\n\t\t\n\t}", "List<TypePatientPropertyCondition> search(String query);", "List<AlbumVO> searchAlbum(String searchText) throws Exception;", "@Action\r\n public String search() {\n ServiceFunctions.clearCache();\r\n\r\n if (isAdmin()) {\r\n return adminSearch();\r\n }\r\n\r\n return publicSearch();\r\n }", "public void searchFunction1() {\n textField_Search.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n tableView_recylce.setPredicate(new Predicate<TreeItem<EntryProperty>>() {\n @Override\n public boolean test(TreeItem<EntryProperty> entryTreeItem) {\n Boolean flag = entryTreeItem.getValue().titleProperty().getValue().toLowerCase().contains(newValue.toLowerCase()) ||\n entryTreeItem.getValue().usernameProperty().getValue().toLowerCase().contains(newValue.toLowerCase());\n return flag;\n }\n });\n }\n });\n }", "private void getBySearch(HttpServletRequest request, HttpServletResponse response, ArticleService artService) {\n\t\tString search = request.getParameter(\"search\");\n\t\tList<Article> list = new ArrayList<Article>();\n\t\tlist = artService.getAll(\"atitle\", search);\n\t\trequest.setAttribute(\"list\", list);\n\t\ttry {\n\t\t\trequest.getRequestDispatcher(\"/essay/other_essay.jsp\").forward(request, response);\n\t\t} catch (ServletException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\tpublic List<Post> searchInfResult(String word) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\treturn postDao.selectPosts(word);\r\n\t}" ]
[ "0.71918553", "0.68413895", "0.682011", "0.6707216", "0.6623851", "0.6614234", "0.66074985", "0.6554763", "0.6547657", "0.65304", "0.6428994", "0.6426049", "0.63850486", "0.635027", "0.63370126", "0.6331882", "0.6251683", "0.6245596", "0.6222158", "0.6210699", "0.61745054", "0.61584234", "0.61494255", "0.6148888", "0.6139199", "0.6128926", "0.6128808", "0.61196214", "0.6115938", "0.6115514", "0.611466", "0.61131644", "0.6110761", "0.61078274", "0.6102175", "0.6085708", "0.60796505", "0.60796505", "0.6076366", "0.6062762", "0.60577124", "0.60568637", "0.6030199", "0.6028117", "0.60206497", "0.60199636", "0.60191894", "0.6010051", "0.6008634", "0.60071826", "0.60070246", "0.5999558", "0.5997249", "0.59952664", "0.59787434", "0.5963688", "0.59568965", "0.5941923", "0.59368783", "0.59335643", "0.592438", "0.59238315", "0.5915385", "0.5913969", "0.5912591", "0.59081674", "0.5904907", "0.589578", "0.5894364", "0.58926535", "0.5888959", "0.58828735", "0.5879161", "0.5873478", "0.5865035", "0.5864098", "0.58607227", "0.5858419", "0.58480346", "0.58439344", "0.5841156", "0.5839877", "0.58325535", "0.5824166", "0.58189315", "0.5815367", "0.58105445", "0.5803352", "0.58032215", "0.57962525", "0.57957035", "0.5793693", "0.5782568", "0.5779557", "0.5773231", "0.57634336", "0.57586783", "0.5755098", "0.5754481", "0.5752546" ]
0.7071646
1
close this and open parent
private void Exit() { this.dispose(); app.setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void doClose() {\n\t if (parent==null)\n\t System.exit(0);\n\t else {\n setVisible(false);\n dispose();\n }\n\t}", "private void close(){\n\t\tparent.setEnabled(true);\n\t\tparent.requestFocus();\n\t\tdispose();\n\t}", "protected void closeThis() {\n\t\tthis.setVisible(false);\n\t}", "private void close(){\n this.dispose();\n }", "public void close()\n {\n setVisible (false);\n dispose();\n }", "public void closeDown() {\n\t\tdispose();\n\n\t}", "public void close() {\t\t\n\t}", "public void close() {\n\t\t\r\n\t}", "@Override\n\tpublic void closeIfStillOpen() {\n\n\t}", "@Override\r\n\tpublic void closeMe()\r\n\t{\r\n\t\t// stop listening to node changes\r\n\r\n\t\t// and let the parent close\r\n\t\tsuper.closeMe();\r\n\t}", "public void close() {\n\n\t}", "public void close() {\n\n\t}", "public void close() {\n\t\tchildOperator.close();\n\t\tsuper.close();\n\t}", "@Override\r\n\tpublic void close() {\n\t\tsuper.close();\r\n\t}", "public void CloseScope(){\n currentScope = currentScope.GetParent();\n }", "public void close() {\n\t\t}", "@Override\n\tpublic void close() {\n\t\tsuper.close();\n\t}", "@Override\n\tpublic void close() {\n\t\tsuper.close();\n\t}", "public void close() {\r\n\t}", "public void close() {\n\t\t\n\t}", "public void close() {\n\t\t\n\t}", "public void close() {\n\t\t\n\t}", "@Override\n public void close() {\n \n }", "public void close() {\n close = true;\n }", "public void close() {\n\t}", "public void close(){\n \n }", "public void close() {}", "public void close()\n\t\t{\n\t\t}", "@Override\n public void close() {\n }", "public void close() {\n closeItems();\n }", "@Override\n public void close() {\n }", "@Override\n public void close() {\n }", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "public void close();", "@Override\r\n\tpublic void close()\r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic synchronized void close() {\n\t\tsuper.close();\r\n\t}", "@Override\r\n\tpublic void close() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void close() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void close() {\n\t\t\r\n\t}", "void forceClose();", "@Override\n\t\tpublic void close() {\n\t\t\t\n\t\t}", "@Override\n void close();", "@Override\n void close();", "@Override\n void close();", "@Override\n void close();", "public void close() {\n }", "public void close() {\n }", "public void close() {\n }", "public abstract void close();", "public abstract void close();", "public abstract void close();", "public abstract void close();", "public abstract void close();", "public void close() {\n }", "public void close() {\n }", "public void close() {\n }", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();", "void close();" ]
[ "0.6985309", "0.6850294", "0.67963", "0.65537685", "0.6493575", "0.6419765", "0.64106256", "0.6380355", "0.63661903", "0.63534313", "0.63261753", "0.63261753", "0.63258857", "0.6301395", "0.62700754", "0.6262827", "0.6242786", "0.6242786", "0.62424266", "0.62211204", "0.62211204", "0.62211204", "0.6188424", "0.617917", "0.61761814", "0.61679935", "0.6147165", "0.61361164", "0.611187", "0.60837513", "0.6070024", "0.6070024", "0.6068183", "0.6068183", "0.6068183", "0.6068183", "0.6068183", "0.6068183", "0.6068183", "0.6068183", "0.6068183", "0.6068183", "0.6068183", "0.6068183", "0.6068183", "0.6068183", "0.6068183", "0.60667694", "0.60615736", "0.6061413", "0.6061413", "0.60503566", "0.60366404", "0.6027915", "0.6023515", "0.6023515", "0.6023515", "0.6023515", "0.60180867", "0.60180867", "0.60180867", "0.60167617", "0.60167617", "0.60167617", "0.60167617", "0.60167617", "0.6006511", "0.6006511", "0.6006511", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233", "0.6001233" ]
0.0
-1
Creates a stack of 10 patients with varying priority and pushes them into a stack in the order they entered the hospital before sorting them
private static ArrayStack stackOfPatients() { Patient p0 = new Patient("Jerry Smith", 3); Patient p1 = new Patient("Morty Smith", 9); Patient p2 = new Patient("Saint Petes", 1); Patient p3 = new Patient("Anner Bananer", 1); Patient p4 = new Patient("Bruce Wayne", 4); Patient p5 = new Patient("Thomas Muller", 8); Patient p6 = new Patient("Mario Gotze", 6); Patient p7 = new Patient("Philip Lahm", 5); Patient p8 = new Patient("Sir Tiny Eyes", 3); Patient p9 = new Patient("Celery Man", 10); ArrayStack<Patient> patientStack = new ArrayStack<>(); patientStack.push(p0); patientStack.push(p6); patientStack.push(p5); patientStack.push(p3); patientStack.push(p8); patientStack.push(p4); patientStack.push(p7); patientStack.push(p1); patientStack.push(p2); patientStack.push(p9); return patientStack; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args)\n {\n Stack<Integer> s = new Stack<>();\n \n Random generate = new Random();\n \n for (int i = 0; i < 20; i++) // add values to s\n {\n s.push(generate.nextInt(50));\n }\n\n System.out.println(StackSort.sort(s)); \n }", "public void stackUsage() {\n\t\tStack<String> s = new Stack<String>();\n\t\ts.add(\"1\");\n\t\ts.add(\"2\");\n\t\ts.add(\"3\");\n\t\ts.add(\"10\");\n\t\ts.add(\"11\");\n\t\tSystem.out.println(s.peek());\n\t\t\n\t\tCollections.sort(s, new Comparator<String>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\tint a = Integer.valueOf(o1);\n\t\t\t\tint b = Integer.valueOf(o2);\n\t\t\t\tif (a > b) {\n\t\t\t\t\treturn 1;\n\t\t\t\t} else {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t\tSystem.out.println(s.peek());\n\t}", "private void fillPRStack() {\n for (int i = 0; i < PRToVR.length - 1; i++) {\n PRStack.push(i);\n }\n }", "public static Stack<Integer> sortstack(Stack<Integer> input) {\n\n Stack<Integer> tmpStack = new Stack<Integer>(); \n \n while(!input.isEmpty()) {\n // pop out the first element \n int tmp = input.pop(); \n // while temporary stack is not empty and top of stack is greater than temp \n while(!tmpStack.isEmpty() && tmpStack.peek() > tmp) { \n // pop from temporary stack and push it to the input stack \n input.push(tmpStack.pop()); \n } \n // push temp in tempory of stack \n tmpStack.push(tmp); \n } \n return tmpStack; \n }", "public void sortStack(){\n Stack small = new Stack();\n Stack large = new Stack();\n while(isEmpty()==false){\n Node n = pop();\n if(small.isEmpty() == true){\n small.push(n);\n }\n else if(n.data > small.peek()){\n small.push(n); \n }\n else{\n while(small.isEmpty() == false){\n if(small.peek() > n.data){\n large.push(small.pop());\n }else{\n break;\n }\n }\n small.push(n);\n shift(large,small);\n }\n }\n shift(small,large);\n shift(large,this);\n }", "static void sortStack(Stack<Integer> s)\n\t{\n\t\t// If stack is not empty\n\t\tif (!s.isEmpty()) \n\t\t{\n\t\t\t// Remove the top item\n\t\t\tint x = s.pop();\n\n\t\t\t// Sort remaining stack\n\t\t\tsortStack(s);\n\n\t\t\t// Push the top item back in sorted stack\n\t\t\tsortedInsert(s, x);\n\t\t}\n\t}", "public static void main(String[] args) {\n Stack<Integer> s = new Stack<>();\n s.push(11);\n s.push(2);\n\n s.push(32);\n s.push(3);\n s.push(41);\n System.out.println(s);\n s = sort(s);\n System.out.println(s);\n\n }", "@Test\r\n\tpublic void addPatientStackTest() {\r\n\t\tstack.addPatient(sp1);\r\n\t\tAssert.assertEquals(\"failed to add patient to StackHospital\", 1, stack.numPatients(),0.0000001);\r\n\t\t\r\n\t\tstack.addPatient(sp2);\r\n\t\tAssert.assertEquals(\"allPatientInfo incorrect for Stack Hospital\",sp1.toString() + sp2.toString(), stack.allPatientInfo());\r\n\t}", "public static void sort(Stack<Integer> s) {\n Stack<Integer> temp = new Stack<Integer>();\n\n while(!s.isEmpty()) {\n int n = s.pop();\n\n while(!temp.isEmpty() && n > temp.peek())\n s.push(temp.pop());\n\n temp.push(n);\n }\n\n while(!temp.isEmpty())\n s.push(temp.pop());\n }", "public ArrayStack<Integer> sort(ArrayStack<Integer> inputStack) {\r\n\t\tArrayStack<Integer> resStack = new ArrayStack<>();\r\n\t\twhile (!inputStack.isEmpty()) {\r\n\t\t\tint elem = inputStack.pop();\r\n\t\t\twhile (!resStack.isEmpty() && (Integer) resStack.top() > elem) {// for smallest item on top change to <\r\n\t\t\t\tinputStack.push((Integer) resStack.pop());\r\n\t\t\t}\r\n\t\t\tresStack.push(elem);\r\n\t\t}\r\n\t\treturn resStack;\r\n\t}", "public static void sortStack(Stack<Integer> toSort) {\n Stack<Integer> tempStack = new Stack<>();\n sortStack(toSort, tempStack);\n }", "public static void QtoS(){\n while(!POOR.isEmpty()){\n stack.push(POOR.remove());\n }\n while(!FAIR.isEmpty()){\n stack.push(FAIR.remove());\n }\n while(!GOOD.isEmpty()){\n stack.push(GOOD.remove());\n }\n while(!VGOOD.isEmpty()){\n stack.push(VGOOD.remove());\n }\n while(!EXCELLENT.isEmpty()){\n stack.push(EXCELLENT.remove());\n }\n \n \n}", "public static void main(String[] args) {\n\t\tStack<Integer>stack =new Stack<>();\n\t\tstack.push(23);\n\t\tstack.push(12);\n\t\tstack.push(78);\n\t\tstack.push(2);\n\t\tstack.push(14);\n sort(stack);\n while(!stack.isEmpty())\n {\n \tSystem.out.print(stack.pop()+\" \");\n }\n\t}", "public static void sortStack2(Stack s){\n Stack ordered = new Stack();\n while(s.isEmpty() == false){\n Node top = s.pop();\n while(ordered.isEmpty() == false && ordered.peek() >= top.data){\n s.push(ordered.pop());\n }\n ordered.push(top);\n }\n while(ordered.isEmpty()==false){\n s.push(ordered.pop());\n }\n }", "public T push(T data){\r\n \tboolean sorted = false;\r\n \twhile(!sorted) {\r\n \t\tif(stack1.empty() || data.compareTo(stack1.peek()) < 0) {\r\n \t\t\tstack2.push(data);\r\n \t\t\tsorted = true;\r\n \t\t}else {\r\n \t\t\tstack2.push(stack1.pop());\r\n \t\t}\r\n \t}\r\n \twhile(stack1.size() > 0) {\r\n \t\tstack2.push(stack1.pop());\r\n \t}\r\n \twhile(stack2.size() > 0) {\r\n \t\tstack1.push(stack2.pop());\r\n \t}\r\n \t++this.size;\r\n \treturn data;\r\n }", "public static void main(String[] args) {\n TeacherStack stack = new TeacherStack();\n stack.push(1); stack.push(2); stack.push(3); stack.push(4);stack.push(5);\n stack.push(6); stack.push(7);stack.push(8);stack.push(9);stack.push(10);\n stack.push(11);\n\n stack.pop(); stack.pop(); stack.pop(); stack.pop(); stack.pop(); stack.pop(); stack.pop(); stack.pop(); stack.pop(); stack.pop(); stack.pop();\n stack.pop();\n\t}", "Stack(int sizeYouWantYourDataStuctureToBe){\n stackArray = new int [sizeYouWantYourDataStuctureToBe];\n }", "public void push(Employee employee){\n if(isFull()){\n Employee[] newArray = new Employee[2 * employeeStack.length];\n // System.arraycopy(srcArray, srcPos, destisnationArray, destPos, length);\n System.arraycopy(employeeStack, 0, newArray, 0, employeeStack.length);\n employeeStack = newArray;\n }\n employeeStack[top++] = employee;\n }", "public static void main(String[] args) throws Exception {\n StackUsingArrays stack=new StackUsingArrays(5);\n \n for(int i=1;i<=5;i++) {\n \tstack.push(i*10);\n \tstack.display();\n }\n \n System.out.println(stack.size());\n \n //stack.push(60);\n System.out.println(stack.top());\n \n// while(!stack.isEmpty()) {\n// \tstack.display();\n// \tstack.pop();\n// \t\n// }\n// \n// stack.pop();\n\t}", "public void sort() {\n Stack<Pair> stack = new Stack();\n //fill the stack\n Pair temp = new Pair(0, a.length);\n stack.push(temp);\n quickSort(stack,stack.peek().first, stack.peek().n);\n }", "public static void main(String[] args){\n Queue<Patient> pQ = new PriorityQueue<>();\n Scanner in = new Scanner(System.in);\n String line = in.nextLine();\n \n while(!line.equalsIgnoreCase(\"QUIT\")){\n \n if(line.equalsIgnoreCase(\"process\")){\n //Collections.sort(pQ);\n \n while(pQ.peek() != null){\n System.out.println(pQ.poll());\n }\n }\n else{\n String name;\n int severity;\n double time;\n Scanner scan = new Scanner(line);\n name = scan.next();\n severity = scan.nextInt();\n time = scan.nextDouble();\n\n try{\n pQ.add(new Patient(name, severity, time));\n }\n catch (PatientException pe){\n System.out.println(\"Severity is not within 1-10\");\n }\n }\n line = in.nextLine();\n } \n }", "void topologicalSort(){ \n Stack<Integer> stack = new Stack<Integer>(); \n \n // Mark all the vertices as not visited \n boolean visited[] = new boolean[V]; \n for (int i = 0; i < V; i++) \n visited[i] = false; \n \n // Call the recursive helper function to store Topological Sort starting from all vertices one by one \n for (int i = 0; i < V; i++) \n if (visited[i] == false) \n topologicalSortUtil(i, visited, stack); \n \n // Print contents of stack \n while (stack.empty()==false) \n System.out.print(stack.pop() + \" \"); \n }", "public static void main(String[] args)\n {\n Stack<Integer> s=new Stack<Integer>();\n s.push(28);\n s.push(2);\n s.push(16);\n s.push(3);\n s.push(72);\n s.push(19);\n s.push(6);\n System.out.print(\"Before sorting: \");\n for(int e : s)\n System.out.print(e+\" \");\n System.out.println();\n sort(s);\n //the iteration starts from stack bottom\n System.out.print(\"After sorting: \");\n for(int e : s)\n System.out.print(e+\" \");\n System.out.println();\n }", "public static void main(String[] args) throws StackFullException, StackEmptyException {\n\t try {\n\t DiscardPile<Card> discardPile1 = null; \n\t\tdiscardPile1 = new DiscardPile<Card>(52, 0);// max is 52\n\t\tdiscardPile1.push(new Card(8));\n\t\tdiscardPile1.push(new Card(32));\n\t\tdiscardPile1.push(new Card(48));\t\t\n\t\tdiscardPile1.push(new Card(2));\n\t\tdiscardPile1.push(new Card(17));\n\t\tdiscardPile1.push(new Card(20)); //removeTopCard should remove all that's above\n\t\tdiscardPile1.push(new Card(25));\n\t\tdiscardPile1.push(new Card(50));\n\t\tdiscardPile1.push(new Card(19));\n\t\tdiscardPile1.push(new Card(41)); //10 Cards that must be popped\n\t\tSystem.out.println(\"*********************************************************************************\"); \n\t\tCollections.reverse(discardPile1);\n\t\tfor(Card comi : discardPile1) { //for loop for objects\n\t\t\tSystem.out.println(comi);\n\t\t\t}\t\t\t\n\t }\n\t catch (StackFullException SFE) {\n\t System.out.println(\"StackFullException: \" + SFE.getMessage());\n}\n\t try {\n\t\t\tDiscardPile<Card> discardPile = null; \n\t\t\tdiscardPile = new DiscardPile<Card>(52, 0);\n\t\t\tdiscardPile.push(new Card(8));\n\t\t\tdiscardPile.push(new Card(32));\n\t\t\tdiscardPile.push(new Card(48));\t\t\n\t\t\tdiscardPile.push(new Card(2));\n\t\t\tdiscardPile.push(new Card(17));\n\t\t\tdiscardPile.push(new Card(20)); //removeTopCard should remove all that's above\n\t\t\tdiscardPile.push(new Card(25));\n\t\t\tdiscardPile.push(new Card(50));\n\t\t\tdiscardPile.push(new Card(19));\n\t\t\tdiscardPile.push(new Card(41)); //10 Cards that must be popped\n\t\t\t \n\t\t\tSystem.out.println(\"*********************************************************************************\"); \n\t\t\t\n\t\t\tCard[] cardArr = discardPile.removeTopCard(new Card(20));\n\t\t\tfor(Card co : cardArr) { //for loop for objects\n\t\t\t\tSystem.out.println(co);\n\t\t\t\t}\t\t\n\t\t\tSystem.out.println(\"*********************************************************************************\"); \n\n\t\t }\n\t\t catch (StackFullException SFE) {\n\t\t \tSystem.out.println(\"StackFullException: \" + SFE.getMessage());\n\t\t }\n\t\t catch (StackEmptyException SEE) {\n\t\t \tSystem.out.println(\"StackFullException: \" + SEE.getMessage());\n\t\t }\n\t try {\n\t\t\tDiscardPile<Card> discardPile = null; \n\t\t\tdiscardPile = new DiscardPile<Card>(52, 0);\n\t\t\tdiscardPile.push(new Card(8));\n\t\t\tdiscardPile.push(new Card(32));\n\t\t\tdiscardPile.push(new Card(48));\t\t\n\t\t\tdiscardPile.push(new Card(2));\n\t\t\tdiscardPile.push(new Card(17));\n\t\t\tdiscardPile.push(new Card(20)); //removeTopCard should remove all that's above\n\t\t\tdiscardPile.push(new Card(25));\n\t\t\tdiscardPile.push(new Card(50));\n\t\t\tdiscardPile.push(new Card(19));\n\t\t\tdiscardPile.push(new Card(41)); //10 Cards that must be popped\n\t\t\t \n\t\t\t\n\t\t\tCard[] cardArr = discardPile.removeTopCard(new Card(50));\n\t\t\tfor(Card co : cardArr) { //for loop for objects\n\t\t\t\tSystem.out.println(co);\n\t\t\t\t}\t\t\n\t\t\tSystem.out.println(\"*********************************************************************************\"); \n\n\t\t }\n\t\t catch (StackFullException SFE) {\n\t\t \tSystem.out.println(\"StackFullException: \" + SFE.getMessage());\n\t\t }\n\t\t catch (StackEmptyException SEE) {\n\t\t \tSystem.out.println(\"StackFullException: \" + SEE.getMessage());\n\t\t }\n\n}", "static void stackPush(Stack<Integer> stack)\r\n\t{\r\n\t\tfor(int i=0;i<5;i++)\r\n\t\t{\r\n\t\t\tstack.push(i*5);\r\n\t\t}\r\n\t\tSystem.out.println(\"Printing the stack value which is push:\");\r\n\t\tSystem.out.println(\"Push :\"+stack +\"\\nsize of stack: \"+ stack.size());\r\n\t}", "public static void main(String[] args) {\n\r\n\r\n\r\n\t\tPerson p1 = new Person(\"1\", \"Nishant\");\r\n\t\tPerson p2 = new Person(\"2\", \"Nikhil\");\r\n\t\t\r\n\t\tPersonStack ps = new PersonStack();\r\n\t\t\r\n\t\tps.push(p1);\r\n\t\tps.push(p2);\r\n\t\t\r\n\t\tSystem.out.println(ps.pop().toString());\r\n\t\tSystem.out.println(ps.pop().toString());\r\n\t\t\r\n\r\n\t}", "public void pushStack(int newStack){\n // creates a new object\n GenericStack temp = new GenericStack(newStack);\n temp.next = top;\n top = temp;\n }", "Stack<Integer> createStack() {\n\t\tStack<Integer> my_stack = new Stack<Integer>();\n\t\t\n\t\t// Add all numbers in linkedlist to stack one by one\n\t\tNode curr = head;\n\t\twhile (curr != null) {\n\t\t\tmy_stack.push(curr.data);\n\t\t\tcurr = curr.next;\n\t\t}\n\t\treturn my_stack;\n\t}", "public void quickSort(Stack<Pair> stack, int first, int n){\n while(!stack.empty()){\n Pair temp2 = stack.pop();\n int test = partition(temp2.first, temp2.n);\n if(test>1){\n Pair temp3 = new Pair(test,n);\n stack.push(temp3);\n }\n } \n }", "public static void main(String[] args) {\n\t\tlist.add(new Node13(1));\n\t\tlist.add(new Node13(2));\n\t\tlist.add(new Node13(3));\n\t\tlist.add(new Node13(4));\n\t\tlist.add(new Node13(5));\n\t\tlist.add(new Node13(6));\n\t\tlist.add(new Node13(7));\n\t\tlist.add(new Node13(8));\n\t\taddEdge(1, 3);\n\t\taddEdge(2, 3);\n\t\taddEdge(2, 4);\n\t\taddEdge(3, 5);\n\t\taddEdge(4, 6);\n\t\taddEdge(5, 7);\n\t\taddEdge(5, 6);\n\t\taddEdge(6, 8);\n\t\tfor(Node13 n:list){\n\t\t\twhile(n!=null){\n\t\t\t\tSystem.out.print(n.c+\"-->\");\n\t\t\t\tn=n.next;\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\ttopolSort();\n\t\tSystem.out.println(\"After Topological sort : \"+stack.size());\n\t\tfor(Node13 p:stack){\n\t\t\tSystem.out.print(p.c+\" \");\n\t\t}\n\t}", "public void printStack(){\n Stack<Integer> tempStack = new Stack<>();\n if (numStack.empty()==true){\n System.out.println(Integer.MIN_VALUE);\n }\n else{\n while (numStack.empty() == false){\n tempStack.push(numStack.peek());\n numStack.pop();\n }\n while (tempStack.empty() == false){\n int i = tempStack.peek();\n System.out.println(i);\n tempStack.pop();\n numStack.push(i);\n } \n }\n }", "public void pushImproved(int data){\n elementStack.push(data);\n if(minStack.isEmpty() || (Integer)minStack.top() >= (Integer)data){\n minStack.push(data);\n }\n }", "public static void main(String[] args)\n\t{\n\t\t// data added with the same priority value as already-preasent data, have less\n\t\t// priority than objects with the same priority value that were there before\n\t\t// being added.\n\t\tSystem.out.println(\"Data given all have equal priority so data\\nis ordered by the order it is provided in:\");\n\t\tPriorityQueue<String> q = new PriorityQueue<String>();\n\t\tq.add(\"highest\", 8);\n\t\tq.add(\"second highest\", 8);\n\t\tq.add(\"third highest\", 8);\n\t\tq.add(\"fourth highest\", 8);\n\t\tq.add(\"fifth highest\", 8);\n\t\tq.add(\"least\", 8);\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\n\t\t// sorting data provided in ascending order\n\t\tSystem.out.println(\"-------------\\nData given in ascending priority order:\");\n\t\tPriorityQueue<String> r = new PriorityQueue<String>();\n\t\tr.add(\"one\", 1);\n\t\tr.add(\"two\", 2);\n\t\tr.add(\"three\", 3);\n\t\tr.add(\"four\", 4);\n\t\tr.add(\"five\", 5);\n\t\tr.add(\"six\", 6);\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\n\t\t// sorting data provided in descending order\n\t\tSystem.out.println(\"-------------\\nData given in descending priority order:\");\n\t\tPriorityQueue<String> s = new PriorityQueue<String>();\n\t\ts.add(\"six\", 6);\n\t\ts.add(\"five\", 5);\n\t\ts.add(\"four\", 4);\n\t\ts.add(\"three\", 3);\n\t\ts.add(\"two\", 2);\n\t\ts.add(\"one\", 1);\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\n\t\t// sorting data provided in a mixed order\n\t\tSystem.out.println(\"-------------\\nData given in a mixed priority order:\");\n\t\tPriorityQueue<String> t = new PriorityQueue<String>();\n\t\tt.add(\"four\", 4);\n\t\tt.add(\"six\", 6);\n\t\tt.add(\"two\", 2);\n\t\tt.add(\"three\", 3);\n\t\tt.add(\"one\", 1);\n\t\tt.add(\"five\", 5);\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\n\t\t// sorting data provided in a mixed priority order including some repitition and\n\t\t// negative values\n\t\tSystem.out.println(\n\t\t\t\t\"-------------\\nData given in a mixed priority order\\nincluding repitition and negative priority:\");\n\t\tPriorityQueue<String> u = new PriorityQueue<String>();\n\t\tu.add(\"-two\", -2);\n\t\tu.add(\"two\", 2);\n\t\tu.add(\"zero\", 0);\n\t\tu.add(\"one\", 1);\n\t\tu.add(\"zero again\", 0);\n\t\tu.add(\"-one\", -1);\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\n\t\t// sorting data provided in a mixed priority order and is of type Double this\n\t\t// time\n\t\tSystem.out.println(\n\t\t\t\t\"-------------\\nData given in a mixed priority order\\nbut using double as the objects this time:\");\n\t\tPriorityQueue<Double> v = new PriorityQueue<Double>();\n\t\tv.add(.002, 2);\n\t\tv.add(.006, 6);\n\t\tv.add(.005, 5);\n\t\tv.add(.001, 1);\n\t\tv.add(.004, 4);\n\t\tv.add(.003, 3);\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t}", "public static void toTop(Patient[] pRay){\r\n \t\ttry{\r\n \t\t\tint index = 0;\r\n \t\t\tfor(Patient p: pRay){\r\n \t\t\t\tSystem.out.println(p.getFirstName());\r\n \t\t\t\t\r\n \t\t\t\tint remIndex = patientArray.indexOf(p);\r\n \t\t\t\tlistModel.remove(remIndex);\r\n \t\t\t\tlistModel.add(index, p.getFirstName());\r\n \t\t\t\tindex++;\r\n \t\t\t}\r\n \t\t}catch(NullPointerException e){\r\n \t\t\tSystem.out.println(e);\r\n \t\t}\r\n \t}", "public MinStack() {\n sort = new Stack<>();\n stack = new Stack<>();\n }", "protected abstract void arrange(List<Skill> skills) throws SkillTreeException;", "public Stack<Integer> sortInAscendingOrder(Stack<Integer> s) {\n Stack<Integer> r = new Stack<>();\n while (s.size() != 0) {\n int temp = s.pop();\n while (!r.isEmpty() && temp > r.peek())\n s.push(r.pop());\n r.push(temp);\n }\n return r;\n }", "public static void sort(Comparable[] pq) {\n int n = pq.length;\n \n /*\n * Fill in this method! Use the code on p. 324 of the book as a model,\n * but change it so each node in the heap has 3 children instead of 2.\n */\n }", "public static void sortStack(Stack<Integer> toSort, Stack<Integer> tempStack) {\n tempStack.push(toSort.pop());\n while (!toSort.isEmpty()) {\n if(toSort.peek() >= tempStack.peek()) {\n tempStack.push(toSort.pop());\n }\n else {\n int left = toSort.pop();\n int right = tempStack.pop();\n toSort.push(right);\n toSort.push(left);\n }\n }\n while (!tempStack.isEmpty()) {\n toSort.push(tempStack.pop());\n }\n }", "public CustomStack() {\n this.myCustomStack = new Object[10]; //array starts with 10 spaces, all empty\n numElements = 0; //stack starts with zero elements\n\n }", "public static void main(String[] args) {\n\t\tGenericStack<String> myStringStack = new GenericStack<>();// Declearing a GenericStack object\n\t\t\n\t\t// Places string literals into the GenericStack object \n\t\tmyStringStack.push(\"Apple\");\n\t\tmyStringStack.push(\"Pie\");\n\t\tmyStringStack.push(\"Is\");\n\t\tmyStringStack.push(\"Good\");\n\t\tmyStringStack.push(\"By\");\n\t\tmyStringStack.push(\"Itself\");\n\t\tmyStringStack.push(\"But\");\n\t\tmyStringStack.push(\"Better\");\n\t\tmyStringStack.push(\"With\");\n\t\tmyStringStack.push(\"Icecream\");\n\t\t\n\t\tmyStringStack.toString();// Display the object \n\t\t\n\t\t// Remove string literals from the object \n\t\tmyStringStack.pop();\n\t\tmyStringStack.pop();\n\t\tmyStringStack.pop();\n\t\tmyStringStack.pop();\n\t\tmyStringStack.pop();\n\t\tmyStringStack.pop();\n\t\t\n\t\tmyStringStack.toString();// Display the object\n\t\t\n\t\tGenericStack<Integer> myIntStack = new GenericStack<>();// Declearing another GenericStack object\n\t\t\n\t\tfor(int i = 0; i <= 10; i++) {\n\t\t\tmyIntStack.push(i); // Filling the Integer \"stack\"\n\t\t}\n\t\t\n\t\tmyIntStack.toString(); // Display the object \n\t\t\n\t\t// Removing Integer objects from the GenericStack object myIntStack\n\t\tmyIntStack.pop();\n\t\tmyIntStack.pop();\n\t\tmyIntStack.pop();\n\t\tmyIntStack.pop();\n\t\tmyIntStack.pop();\n\t\n\t\t\n\t\tmyIntStack.toString();// Display the object\n\t}", "public static Stack<Integer> sort(Stack<Integer> s)\n {\n if (s.isEmpty()) // check if the stack is empty\n {\n return s;\n }\n else // otherwise...\n {\n int slinky = s.pop();\n\n // divide the s stack into 2 parts\n Stack<Integer> low = new Stack<>();\n Stack<Integer> high = new Stack<>();\n\n while (!s.isEmpty())\n {\n int i = s.pop();\n if (i < slinky)\n {\n low.push(i);\n }\n else\n {\n high.push(i);\n }\n } \n // sort both stacks\n sort(low);\n sort(high);\n\n // combine low and high values\n Stack<Integer> t = new Stack<>();\n while (!high.isEmpty()) // push high values first\n {\n t.push(high.pop());\n }\n t.push(slinky); //.. then the middle values\n while (!low.isEmpty()) //...following the small values\n {\n t.push(low.pop());\n }\n while (!t.isEmpty()) // push values into s\n {\n s.push(t.pop());\n } \n }\n return s; // s is now sorted\n }", "public static void main(String[] args) {\n\t\tStack<Integer> Driveway = new Stack<>();\r\n\t\t\r\n\t\t//putting cars into driveway\r\n\t\t\r\n\t\tDriveway.push(1);\r\n\t\tDriveway.push(2);\r\n\t\tDriveway.push(3);\r\n\t\tDriveway.push(4);\r\n\t\tDriveway.push(5);\r\n\t\tDriveway.push(6);\r\n\t\tDriveway.push(7);\r\n\t\t\r\n\t\t//displaying cars parked in driveway\r\n\t\t\r\n\t\tSystem.out.println(\"The cars parked inside the driveway are\" + Driveway);\r\n\t\t\r\n\t\tSystem.out.println(\"license plate numbers\");\r\n\t\tScanner number = new Scanner(System.in);\r\n\t\t\r\n\t\tint numb = number.nextInt();\r\n\t\t\r\n\t\t//initialising queue\r\n\t\t\r\n\t\tQueue<Integer> tempDriveaway = new LinkedList<>();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//iterate inside a stack\r\n\t\t\r\n\t\t\r\n\t\twhile(Driveway.peek() != null) {\r\n\t\t\tSystem.out.println(\"inside the stack\");\r\n\t\t\tif(Driveway.peek()!=numb) {\r\n\t\t\t\tInteger l1=Driveway.pop();\r\n\t\t\t\ttempDriveaway.add(l1);\r\n\t\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\tDriveway.pop();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int value:tempDriveaway) {\r\n\t\t\tDriveway.add(value);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"the updated Driveaway is \" + Driveway);\r\n\t\tSystem.out.println(\"the temporary driveaway is \" + tempDriveaway);\r\n\t\t\r\n\t\r\n\t}", "public static void main(String[] args) {\n Queue<Integer> values=new PriorityQueue<>();\r\n values.add(87);\r\n\t values.add(97);\r\n\t values.add(34);\r\n\t values.add(92);\r\n\t System.out.println(values);\r\n\t}", "static int poisonousPlantsStackList(int[] plants) \n\t{\n\t\tif(plants.length <= 0)\n\t\t\treturn 0;\n\t\t\n\t\tint days = 0;\n\t\tList<Stack<Integer>> pests = new ArrayList<Stack<Integer>>();\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\t\n\t\tstack.push(plants[0]);\n\t\t\n\t\tfor(int i=1; i<plants.length; i++)\n\t\t{\n\t\t\tif(plants[i] <= plants[i-1])\n\t\t\t\tstack.push(plants[i]);\n\t\t\telse\n\t\t\t{\t\t\t\t\n\t\t\t\tpests.add(stack);\n\t\t\t\tstack = new Stack<Integer>();\n\t\t\t\tstack.push(plants[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tpests.add(stack);\n\t\t\n\t\treturn days;\n\t}", "public void pushCards(Card c, Card d, int i)\n {\n if( i == P1)\n {\n dw.enqueue(d);\n dw.enqueue(c);\n }\n else if (i == P2)\n {\n de.enqueue(d);\n de.enqueue(c); \n }\n }", "public synchronized void addPatientToStack(String idStack, String idPatient) throws SQLException {\n statement.execute(\"INSERT INTO \" + idStack + \" (id) VALUES ('\" + idPatient + \"')\");\r\n }", "public static void main(String[] args) {\n// System.out.println(\"as.getSize() == \" + as.getSize());\n// as.pop();\n// System.out.println(\"as.pop() == \" + as);\n// System.out.println(\"as.peek() == \" + as.peek());\n// as.push(\"17\");\n// System.out.println(as);\n\n LinkedListStack<Integer> stack = new LinkedListStack<>();\n\n for(int i = 0 ; i < 5 ; i ++){\n stack.push(i);\n System.out.println(stack);\n }\n\n stack.pop();\n System.out.println(stack);\n\n }", "public static void main(String[] args) {\r\n\r\n\t\tArrayStack arrst = new ArrayStack(5);\r\n\t\tIntStream.range(0, 5).forEach(arrst::push);\r\n\t\tSystem.out.println(\"Response of peek \" + arrst.peek());\r\n\t\tSystem.out.println(\"Response of pop\" + arrst.pop());\r\n\t\tSystem.out.println(\"push one random number in the middle\");\r\n\t\tarrst.push(10);\r\n\t\tSystem.out.println(\"printing stack after first pop\");\r\n\t\tarrst.display();\r\n\r\n\t\tIntStream.range(0, arrst.size()).forEach(i -> arrst.pop());\r\n\r\n\t\tSystem.out.println(\"isEmpty after poping all the elements ???\" + arrst.isEmpty());\r\n\r\n\t\tarrst.display();\r\n\r\n\t}", "public void assignStackOrdering() {\n this.mTaskStackContainers.assignStackOrdering(getPendingTransaction());\n }", "private static void sortedInsert(Stack<Integer> stack, int x) {\n if (stack.isEmpty() || stack.peek() < x) {\n stack.push(x);\n return;\n }\n int temp = stack.pop();\n sortedInsert(stack, x);\n stack.push(temp);\n }", "static void sortedInsert(Stack<Integer> s, int x)\n\t{\n\t\t// Base case: Either stack is empty or newly\n\t\t// inserted item is greater than top (more than all\n\t\t// existing)\n\t\tif (s.isEmpty() || x > s.peek()) \n\t\t{\n\t\t\ts.push(x);\n\t\t\treturn;\n\t\t}\n\t\t// If top is greater, remove the top item and recur\n\t\tint temp = s.pop();\n\t\tsortedInsert(s, x);\n\n\t\t// Put back the top item removed earlier\n\t\ts.push(temp);\n\t}", "public _30_min_stack() {\n data = new Stack<>();\n help = new Stack<>();\n }", "private synchronized void PCToStack() throws RuntimeException\n {\n int first8bites, second8bites, third8bits;\n \n first8bites = Utils.get_lobyte(mPC);\n second8bites = Utils.get_hibyte(mPC);\n if (PC_BIT_SIZE == 22)\n third8bits = Utils.get_lobyte(mPC >> 16);\n else\n third8bits = 0;\n mStack.push(first8bites);\n mStack.push(second8bites);\n if (PC_BIT_SIZE == 22)\n mStack.push(third8bits);\n }", "@Test\n public void testStack() {\n DatastructureTest.STACK.push(3);\n DatastructureTest.STACK.push(7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == 7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == 7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == 3);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == 3);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == -1);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == -1);\n }", "public static void main(String[] args) {\n \n QueuetoStack a=new QueuetoStack();\n a.add(1);\n a.add(2);\n a.add(3);\n a.add(4);\n a.remove();\n a.remove();\n a.remove();\n a.remove();\n }", "public static void main(String[] args) {\n\t\t\n\t\tSolution sol = new Solution();\n\t\t\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\tstack.push(1);\n\t\tstack.push(5);\n\t\tstack.push(4);\n\t\tstack.push(3);\n\t\t\n\t\tstack = sol.sortStack(stack);\n\t\t\n\t\twhile(!stack.isEmpty()){\n\t\t\tSystem.out.println(stack.pop());\n\t\t}\n\t}", "public Solution_155() {\n stack = new Stack();\n minStack = new Stack();\n }", "public static void main(String[] args) {\n\t\tString palabrejas[] = { \"columnas\", \"filas\", \"zalamero\", \"zascandil\" };\n\t\tStack<String> palabrasPila = new Stack<String>();\n\t\t// Aunque tiene varios métodos suelen usarse los de ingreso o extraccion\n\t\t// a la pila\n\t\t// para poner en la pila\n\t\t// push coloca un elemento en la cima de la pila\n\t\tpalabrasPila.push(palabrejas[0]);\n\t\tpalabrasPila.push(palabrejas[1]);\n\t\tSystem.out.println(palabrasPila);\n\t\t// como se obtienen los elementos seegun el criterio de una pila\n\t\t// dos formas\n\t\t// 1º obteniendo el elemento y borrandolo de la pila\n\t\t// con pop se retorna el elemento en la cima y se borra de la pila\n\t\tSystem.out.println(\"cima \" + palabrasPila.pop());\n\t\tSystem.out.println(\"cima \" + palabrasPila.pop());\n\t\tSystem.out.println(palabrasPila);\n\t\ttry {\n\t\t\tSystem.out.println(\"cima \" + palabrasPila.pop());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"pila vacia\");\n\t\t}\n\t\t// Como hemos dicho se puede trabajar con Stack como si fuese una colecction\n\t\tfor (int i = 0; i < palabrejas.length; i++) {\n\t\t\tpalabrasPila.push(palabrejas[i]);\n\t\t}\n\t\t// 2º metodo de acceso a Stack como pila\n\t\t// Se trata del metodo peek que es como el pop pero\n\t\t// no elimina el elemento de la cima\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tSystem.out.println(\"cima \" + palabrasPila.peek());\n\t\t}\n\t\t// Si usas una Stack es porque lo necesitas. java te permite usarla como\n\t\t// una collection normal, pero en realidad solo se deberian usar las\n\t\t// cuatro funciones asociadas a a pila\n\t\t// pop,push,peek,isEmpty\n\t\tSystem.out.println(palabrasPila.size());\n\t}", "public void addPatty() {\n\t\tMyStack newBurger = new MyStack();\n\t\tif (pattyCount < MAX_PATTY) {\n\t\t\twhile (myBurger.size() != 0) {\n\t\t\t\tString top = (String) myBurger.peek();\n\t\t\t\tif (pattyCount > 0) {\n\t\t\t\t\tif (top.equals(\"Cheddar\") || top.equals(\"Mozzarella\") || top.equals(\"Pepperjack\")\t\n\t\t\t\t\t\t\t|| top.equals(\"Beef\") || top.equals(\"Chicken\") || top.equals(\"Veggie\")) {\t\n\t\t\t\t\t\tnewBurger.push(\"Beef\");\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tString ingredient = (String) myBurger.pop();\t\t\t\t\t\n\t\t\t\t\t\tnewBurger.push(ingredient);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tString ingredient = (String) myBurger.pop();\t\t\t\t\t\t\n\t\t\t\t\tnewBurger.push(ingredient);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t} else if (pattyCount == 0) {\n\t\t\t\t\tif (top.equals(\"Mushrooms\") || top.equals(\"Mustard\") || top.equals(\"Ketchup\")\n\t\t\t\t\t\t\t|| top.equals(\"Bottom Bun\")) {\n\t\t\t\t\t\tnewBurger.push(\"Beef\");\n\t\t\t\t\t\tString ingredient = (String) myBurger.pop();\n\t\t\t\t\t\tnewBurger.push(ingredient);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} \n\t\t\t\t\tString ingredient = (String) myBurger.pop();\n\t\t\t\t\tnewBurger.push(ingredient);\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (myBurger.size() != 0) {\n\t\t\t\tString ingredient = (String) myBurger.pop();\n\t\t\t\tnewBurger.push(ingredient);\n\t\t\t}\n\t\t\twhile (newBurger.size() != 0) {\n\t\t\t\tString ingredient = (String) newBurger.pop();\n\t\t\t\tmyBurger.push(ingredient);\n\t\t\t}\n\t\t\tpattyCount++;\n\t\t} else {\n\t\t\tSystem.out.println(\"cant add anymore patties\");\n\t\t}\n\t}", "public MyStack(){\n\ta = new String[10];\n\ttop = -1;\n }", "private void heapSort() {\n\n\t\tint queueSize = priorityQueue.size();\n\n\t\tfor (int j = 0; j < queueSize; j++) {\n\n\t\t\theapified[j] = binaryHeap.top(priorityQueue);\n\t\t\tbinaryHeap.outHeap(priorityQueue);\n\n\t\t}\n\n\t}", "public MinStack() {\n mainstack = new Stack<Integer>();\n secondaryminstack = new Stack<Integer>();\n }", "public static void main(String[] args){\n\n Mystack ms = new Mystack();\n for ( int i = 0; i <= 11; i++){\n ms.push(i+1);\n }\n\n for( int j = 0 ; j < 1 ; j++){\n ms.pop();\n }\n \n ms.print(); \n\n for( int j = 0 ; j <= 1; j++){\n ms.push(j);\n }\n \n ms.print(); \n\n }", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint item;\n\t\tpriority c=new priority();\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\titem=sc.nextInt();\n\t\t\tc.add(item);\n\t\t\t\n\t\t}\n\t\t//c.highestremove();\n\t\tc.hightest();\n\tc.display();\n\t\t//c.display();\n\n\t}", "Stack(Recycler<T> parent, Thread thread, int maxCapacity, int maxSharedCapacityFactor, int ratioMask, int maxDelayedQueues)\r\n/* 408: */ {\r\n/* 409:440 */ this.parent = parent;\r\n/* 410:441 */ this.threadRef = new WeakReference(thread);\r\n/* 411:442 */ this.maxCapacity = maxCapacity;\r\n/* 412:443 */ this.availableSharedCapacity = new AtomicInteger(Math.max(maxCapacity / maxSharedCapacityFactor, Recycler.LINK_CAPACITY));\r\n/* 413:444 */ this.elements = new Recycler.DefaultHandle[Math.min(Recycler.INITIAL_CAPACITY, maxCapacity)];\r\n/* 414:445 */ this.ratioMask = ratioMask;\r\n/* 415:446 */ this.maxDelayedQueues = maxDelayedQueues;\r\n/* 416: */ }", "public void printStack(Stack list){\n while(!list.isEmpty()){\n temp.push(list.peek());\n list.pop();\n }\n\n //printing temp and inserting items back to list\n while(!temp.isEmpty()){\n System.out.println(temp.peek()+\" \");\n list.push(temp.peek());\n temp.pop();\n }\n System.out.println();\n\n }", "public static void main(String[] args) {\n\t\tstack s = new stack();\n\t\ts.push(6);\n\t\ts.push(5);\n\t\ts.min();\n\t\ts.push(3);\n\t\ts.push(4);\n\t\ts.push(2);\n\t\ts.min();\n\t\ts.push(6);\n\t\t// s.print();\n\t\ts.pop();\n\t\ts.pop();\n\t\ts.min();\n\t\ts.min();\n\t\ts.pop();\n\t\ts.pop();\n\t\ts.pop();\n\t\ts.pop();\n\t\ts.min();\n\t\t// s.print();\n\n\t}", "public static void main(String[] args) {\n Solution solution = new Solution();\n TreeNode root = new TreeNode(1);\n root.left = new TreeNode(2);\n root.left.left = new TreeNode(6);\n root.left.left.right = new TreeNode(10);\n root.left.left.right.left = new TreeNode(-1);\n root.left.right = new TreeNode(9);\n\n root.right = new TreeNode(3);\n root.right.right = new TreeNode(5);\n root.right.left = new TreeNode(4);\n root.right.left.left = new TreeNode(7);\n root.right.left.right = new TreeNode(8);\n \n solution.stackList(root);\n for (int i = 0 ; i < solution.list.size(); i++) System.out.print(solution.list.get(i) + \" \");\n }", "public Solution67() {\n stack = new Stack<>();\n min_stack = new Stack<>();\n }", "static\nboolean\ncheck(\nint\nA[], \nint\nN) { \n\n// Stack S \n\nStack<Integer> S = \nnew\nStack<Integer>(); \n\n\n// Pointer to the end value of array B. \n\nint\nB_end = \n0\n; \n\n\n// Traversing each element of A[] from starting \n\n// Checking if there is a valid operation \n\n// that can be performed. \n\nfor\n(\nint\ni = \n0\n; i < N; i++) { \n\n// If the stack is not empty \n\nif\n(!S.empty()) { \n\n// Top of the Stack. \n\nint\ntop = S.peek(); \n\n\n// If the top of the stack is \n\n// Equal to B_end+1, we will pop it \n\n// And increment B_end by 1. \n\nwhile\n(top == B_end + \n1\n) { \n\n// if current top is equal to \n\n// B_end+1, we will increment \n\n// B_end to B_end+1 \n\nB_end = B_end + \n1\n; \n\n\n// Pop the top element. \n\nS.pop(); \n\n\n// If the stack is empty We cannot \n\n// further perfom this operation. \n\n// Therefore break \n\nif\n(S.empty()) { \n\nbreak\n; \n\n} \n\n\n// Current Top \n\ntop = S.peek(); \n\n} \n\n\n// If stack is empty \n\n// Push the Current element \n\nif\n(S.empty()) { \n\nS.push(A[i]); \n\n} \nelse\n{ \n\ntop = S.peek(); \n\n\n// If the Current element of the array A[] \n\n// if smaller than the top of the stack \n\n// We can push it in the Stack. \n\nif\n(A[i] < top) { \n\nS.push(A[i]); \n\n} \n// Else We cannot sort the array \n\n// Using any valid operations. \n\nelse\n{ \n\n// Not Stack Sortable \n\nreturn\nfalse\n; \n\n} \n\n} \n\n} \nelse\n{ \n\n// If the stack is empty push the current \n\n// element in the stack. \n\nS.push(A[i]); \n\n} \n\n} \n\n\n// Stack Sortable \n\nreturn\ntrue\n; \n\n}", "public static void main(String[] args) {\n\t\tStack<String> stack=new Stack<String>();\r\n\t\tfor(int i=0; i<100; i++) {\r\n\t\t\tstack.push(\"\"+i);\r\n\t\t}\r\n\t\tSystem.out.println(stack.pop());\r\n\t\t\r\n\t\tQueue<Integer> queue=new LinkedList<Integer>();\r\n\t\t\r\n\t\tfor(int i=0; i<100;i++) {\r\n\t\t\tqueue.offer(i);\r\n\t\t}\r\n\t\tSystem.out.println(queue.poll());\r\n\t}", "void push(int a)\n\t{\n\t // Your code here\n\t top++;\n\t arr[top]=a;\n\t}", "public static void main(String[] args) {\n Timer timer = new Timer();\r\n timer.start();\r\n \r\n /*Integer[] a = new Integer[1000000];\r\n Random rand = new Random();\r\n double d;\r\n int in;\r\n for(int x = 0; x < 1000000; x++){\r\n d = Math.random()*50;\r\n in = (int) d;\r\n a[x] = in;\r\n }*/\r\n \r\n Integer[] a = new Integer[5];\r\n a[0] = new Integer(2);\r\n a[1] = new Integer(1);\r\n a[2] = new Integer(4);\r\n a[3] = new Integer(3);\r\n\ta[4] = new Integer(8);\r\n priorityqSort(a);\r\n /*Queue<Integer> pq1 = new PriorityQueue<Integer>();\r\n for (Integer x: a){\r\n pq1.add(x);\r\n }\r\n System.out.println(\"pq1: \" + pq1);*/\r\n \r\n /*Queue<String> pq2 = new PriorityQueue<>();\r\n pq2.add(\"4\");\r\n pq2.add(\"9\");\r\n pq2.add(\"2\");\r\n pq2.add(\"1\");\r\n pq2.add(\"5\");\r\n pq2.add(\"0\");\r\n System.out.println(\"pq: \" + pq2);*/\r\n \r\n timer.end();\r\n System.out.println(timer);\r\n }", "private static void push(Stack<Integer> top_ref, int new_data) {\n //Push the data onto the stack\n top_ref.push(new_data);\n }", "Stack_Using_Arrays(){\n\t\ttop=-1;\n\t}", "public void push(int data){\n \tif(top == size)\n \tSystem.out.println(\"Stack is overflow\");\n \telse{\n \ttop++;\n \telements[top]=data;\n \t} \n\t}", "public static void main(String[] args) {\n\t\tQueue<Integer> integerPriorityQueue = new PriorityQueue<>(7);\r\n\t\tRandom rand = new Random();\r\n\t\tfor (int i = 0; i < 7; i++) {\r\n\t\t\tintegerPriorityQueue.add(new Integer(rand.nextInt(100)));\r\n\t\t}\r\n\t\tfor (int i = 0; i < 7; i++) {\r\n\t\t\tInteger in = integerPriorityQueue.poll();\r\n\t\t\tSystem.out.println(\"Processing Integer:\" + in);\r\n\t\t}\r\n\r\n\t\t// PriorityQueue example with Comparator\r\n\t\tQueue<Customer> customerPriorityQueue = new PriorityQueue<>(7, idComparator);\r\n\t\taddDataToQueue(customerPriorityQueue);\r\n\r\n\t\tpollDataFromQueue(customerPriorityQueue);\r\n\r\n\t}", "public void AddToLine(PriorityCustomer newcustomer)\n {\n // put your code here\n int index = size + 1; //where we'll add the new value\n heap[index] = newcustomer; // add new customer to that position\n while (index > 3) //while customer has parents since we dont want to swap the current customer being served, it is index > 3 instead of index > 1\n {\n int parentIndex = index/2; //get parent index \n if (heap[parentIndex].getPriority() < newcustomer.getPriority()) // if parent value is lower\n {\n heap[index] = heap[parentIndex]; //perform swap\n heap[parentIndex] = newcustomer; //sets parent to new customer\n index = parentIndex; //update index\n }\n else\n {\n break; //no swap needed\n }\n }\n size++; //increase size\n }", "public stackTesting(int size){\n\t\tMaxSize = size;\n\t\tStack = new int[MaxSize];\n\t\tStackTop = -1;\n\t}", "public static void buildHeap(int[]data){\n for (int i = data.length-1; i>=0; i--){\n pushDown(data, data.length, i);\n }\n }", "public void testPush() {\n assertEquals(this.stack.size(), 10, 0.01);\n this.stack.push(10);\n assertEquals(this.stack.size(), 11, 0.01);\n assertEquals(this.stack.peek(), 10, 0.01);\n }", "public myStackUsingDynamicArray(){\n A = new dynamicArray();\n top=-1;\n bottom=-1;\n localSize=0;\n //Othe initializations to be done by student\n }", "private void addRValueToStack (){\n if (numStack.size() < 23){\n numStack.push(rValues[rCount]);\n if(rCount< rValues.length){ // cycles through the 'r' values\n rCount++;\n }\n else{ \n rCount=0; // if end of r values reached, rCount is set to 0.\n }\n }\n else {\n System.out.println(\"Stack overflow.\"); \n }\n }", "LevelStacks() {\n stacks = new ArrayList<>();\n }", "public static void main(String[] args) {\n\t\t\t\t\n\t\t//Displays assignment info\n\t\tSystem.out.println(\"COP3538 Project 3 - Xudong Liu\\n\\nStacks and Priority Queues\");\n\t\n\t\t//Locate file, must be in same directory\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter the file Name: \");\n\t\tString file = keyboard.next();\n\t\tkeyboard.close();\n\t\t\n\t\t//Read file and parse for input\n\t\tint i = 0;//counter\n\t\tint newEngCount=0, midAtlCount=0, southCount=0;\n\t\tStack stateStackList=new Stack();\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\tString line = br.readLine(); //Reads and bypasses header\n\t\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\t\t\tString[] split = line.split(\",\");\n\t\t\t\t\t\tState nextState = new State(split[0], split[1], split[2], Integer.parseInt(split[3]), split[4], Integer.parseInt(split[5])); \t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (nextState.getRegion().equalsIgnoreCase(\"New England\")) {\n\t\t\t\t\t\t\tstateStackList.push(nextState);\n\t\t\t\t\t\t\ti++; newEngCount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (nextState.getRegion().equalsIgnoreCase(\"Middle Atlantic\")) {\n\t\t\t\t\t\t\tstateStackList.push(nextState);\n\t\t\t\t\t\t\ti++; midAtlCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (nextState.getRegion().equalsIgnoreCase(\"South\")) {\n\t\t\t\t\t\t\tstateStackList.push(nextState);\n\t\t\t\t\t\t\ti++; southCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t\ti++;\n\t\t\t\t}\t\n\t\t\t\tbr.close();\n\t\t\t\t\n\t\t}\n\t\tcatch(IOException ioe) {\n\t\t\tSystem.out.format(\"\\nFile was not found. The application will terminate.\\n\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tSystem.out.format(\"\\nThere were %s state records put on the stack.\\n\", southCount + midAtlCount+ newEngCount);\n\t\tSystem.out.println(\"\\nStack Contents:\");\n\t\tSystem.out.printf(\"%-17s\", \"\\nState Name\");\n\t\tSystem.out.printf(\"%-16s\", \"Capital City\");\n\t\tSystem.out.printf(\"%-12s\", \"State Abbr\");\n\t\tSystem.out.printf(\"%-18s\", \"State Population\");\n\t\tSystem.out.printf(\"%-10s\", \"\\tRegion\");\n\t\tSystem.out.print(\"\\t\\tUS House Seats\\n\");\n\t\t System.out.println(\"----------------------------------------------------------------------------------------------\");\n\t\tstateStackList.printStackedList();\n\t\tQueue queuedList = new Queue();\n\t\tint counter = 0;\n\t\twhile(!stateStackList.isEmpty()){\n\t\t\tif(counter %2 ==0 ){\n\t\t\t\tqueuedList.insertFront(stateStackList.pop());\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tqueuedList.insertEnd(stateStackList.pop());\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Queue Contents:\");\n\t\tSystem.out.printf(\"%-17s\", \"\\nState Name\");\n\t\tSystem.out.printf(\"%-16s\", \"Capital City\");\n\t\tSystem.out.printf(\"%-12s\", \"State Abbr\");\n\t\tSystem.out.printf(\"%-18s\", \"State Population\");\n\t\tSystem.out.printf(\"%-10s\", \"\\tRegion\");\n\t\tSystem.out.print(\"\\t\\tUS House Seats\\n\");\n\t\t System.out.println(\"----------------------------------------------------------------------------------------------\");\n\t\t queuedList.printQueue();\n\t\t \n\t\t queuedList.findDelete(\"Massachusetts\");\n\t\t queuedList.findDelete(\"New Hampshire\");\n\t\t queuedList.findDelete(\"Rhode Island\");\n\t\t queuedList.findDelete(\"Maryland\");\n\t\t queuedList.findDelete(\"New Jersey\");\n\t\t queuedList.findDelete(\"Pennsylvania\");\n\t\t queuedList.findDelete(\"Alabama\");\n\t\t queuedList.findDelete(\"Kentucky\");\n\t\t queuedList.findDelete(\"North Carolina\");\n\t\t \n\t\t System.out.println(\"Queue Contents:\");\n\t\t System.out.printf(\"%-17s\", \"\\nState Name\");\n\t\t System.out.printf(\"%-16s\", \"Capital City\");\n\t\t System.out.printf(\"%-12s\", \"State Abbr\");\n\t\t System.out.printf(\"%-18s\", \"State Population\");\n\t\t System.out.printf(\"%-10s\", \"\\tRegion\");\n\t\t System.out.print(\"\\t\\tUS House Seats\\n\");\n\t\t\t System.out.println(\"----------------------------------------------------------------------------------------------\");\n\t\t\t queuedList.printQueue();\n\t\t\t i=1;\n\t\t\t while(!queuedList.isEmpty()){\n\t\t\t\t\n\t\t\t\t if(i%2!=0){\n\t\t\t\t\tstateStackList.push(queuedList.removeFront().stateObject);\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tstateStackList.push(queuedList.removeEnd().stateObject);\n\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t}\t \n\t\t System.out.println(\"\\nStack Contents:\");\n\t\t System.out.printf(\"%-17s\", \"\\nState Name\");\n\t\t System.out.printf(\"%-16s\", \"Capital City\");\n\t\t System.out.printf(\"%-12s\", \"State Abbr\");\n\t\t System.out.printf(\"%-18s\", \"State Population\");\n\t\t System.out.printf(\"%-10s\", \"\\tRegion\");\n\t\t System.out.print(\"\\t\\tUS House Seats\\n\");\n\t\t\t\t System.out.println(\"----------------------------------------------------------------------------------------------\");\n\t\t\t\tstateStackList.printStackedList();\n\t\t System.exit(0);\n\t}", "public void push(int data)\n\t{\n\t\n\t\tarr[top]=data;\n\t\ttop++;\n\t\t\n\t}", "public static void main(String[] args) {\r\n\t\tStack <Integer> s=new Stack<>();//Stack s=new Stack();\r\n\t\ts.push(12);\r\n\t\ts.push(32);\r\n\t\ts.push(62);\r\n\t\ts.push(72);\r\n\t\tSystem.out.println(s.pop());\r\n\t\tSystem.out.println(s.pop());\r\n\t\tSystem.out.println(s.pop());\r\n\t\t\r\n\t\tStack <String> s2=new Stack<>();\r\n\t\ts2.push(\"h\");\r\n\t\ts2.push(\"o\");\r\n\t\ts2.push(\"l\");\r\n\t\ts2.push(\"a\");\r\n\t\tSystem.out.println(s2.pop());\r\n\t\tSystem.out.println(s2.pop());\r\n\t\tSystem.out.println(s2.pop());\r\n\r\n\t\t\r\n\t}", "public MinStack() {\n dataStack=new Stack<>();\n minStack=new Stack<>();\n }", "void topologicalSort() {\n Stack stack = new Stack();\n\n // Mark all the vertices as not visited\n Boolean visited[] = new Boolean[V];\n for (int i = 0; i < V; i++)\n visited [i] = false;\n\n // Call the recursive helper function to store Topological\n // Sort starting from all vertices one by one\n for (int i = 0; i < V; i++)\n if (visited [i] == false)\n topologicalSortUtil(i, visited, stack);\n\n // Print contents of stack\n while (stack.empty() == false)\n System.out.print(stack.pop() + \" \");\n }", "ArrayStack() {\r\n\t\tstack = new int[10];\r\n\t\ttop = 0;\r\n\t}", "@Test\n public void testStackInteger() {\n DatastructureTest.INTSTACK.push(3);\n DatastructureTest.INTSTACK.push(7);\n Assert.assertTrue(DatastructureTest.INTSTACK.peek() == 7);\n Assert.assertTrue(DatastructureTest.INTSTACK.pop() == 7);\n Assert.assertTrue(DatastructureTest.INTSTACK.peek() == 3);\n Assert.assertTrue(DatastructureTest.INTSTACK.pop() == 3);\n Assert.assertTrue(DatastructureTest.INTSTACK.peek() == -1);\n Assert.assertTrue(DatastructureTest.INTSTACK.pop() == -1);\n }", "public void push(T newData) throws StackOverflowException{\r\n\t\t\r\n\t\t// check if stack is full\r\n\t\tif(top>MAX_SIZE)\r\n\t\t\tthrow new StackOverflowException();\r\n\t\t\r\n\t\tstackData.add(newData); //add new data to the stack\r\n\t\ttop++;\r\n\t\r\n\t}", "public static void heapify() {\n //배열을 heap 자료형으로 만든다.\n // 1d 2d 2d 3d 3d 3d 3d 4d\n// int[] numbers = {9, 12, 1, 3, 6, 2, 8, 4};\n // 1depth의 자식노드 numbers[2i], numbers[2i+1]\n int[] numbers = {4, 1, 3, 2, 16, 9, 10, 14, 8, 7};\n int i = 1;\n while (true) {\n int target = numbers[i-1];\n int left = numbers[2*i-1];\n\n if (2*i == numbers.length) {\n if (left > target){\n numbers[i-1] = left;\n numbers[2*i-1] = target;\n }\n print(numbers);\n break;\n }\n int right =numbers[2*i];\n\n if (left > right) {\n if(left > target) {\n numbers[i-1] = left;\n numbers[2*i-1] = target;\n }\n }else if (right > left) {\n if (right > target) {\n numbers[i-1] = right;\n numbers[2*i] = target;\n }\n }\n i++;\n\n print(numbers);\n }\n\n }", "static void push(Stack<Integer> top_ref, int new_data) {\r\n // Push the data onto the stack\r\n top_ref.push(new_data);\r\n }", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tPriorityQueue<Integer>heap=new PriorityQueue<Integer>(new comparison());\n\t\tPriorityQueue<Integer>heap1=new PriorityQueue<Integer>();\n\t\tint num=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\tfor(int i=0;i<num;i++)\n\t\t{\n\t\t\tint value=sc.nextInt();\n\t\t\theap.add(value);\n\t\t\theap1.add(value);\n\t\t\tif(heap.size()>k)\n\t\t\t{\n\t\t\t\theap.remove();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(heap.peek());\n\t\tfor(int i=0;i<k-1;i++)\n\t\t{\n\t\t\theap.remove();\n\t\t}\n\t\tSystem.out.println(heap.peek());\n\t}", "public static void main(String[] args) {\n\t\tStack<Integer> S = new Stack<>();\r\n\t\tfor(int i = 0; i<5; i++){\r\n\t\t\t//S.push(args);\r\n\t\t\tS.push(i);\r\n\t\t}\r\n\t\tSystem.out.println(\"Bottom-->\"+S+\"<--Top\");\r\n\t\t//S.pop();\r\n\t\twhile(!S.isEmpty()){\r\n\t\t\tSystem.out.println(\"After poping \"+S.pop());\r\n\t\t\tSystem.out.println(\"Now\tBottom-->\"+S+\"<--Top\");\r\n\t\t}\r\n\t\t\r\n\t\t//System.out.println(\"After poping \"+S.pop());\r\n\t\t//System.out.println(\"Now\tBottom-->\"+S+\"<--Top\");\r\n\t}", "public SolutionStack()\n {\n stack = new ArrayList<ILocation>(0);\n top = 0;\n }", "void shiftUp(int i) {\n\t while(i>1&&patients.get(parent(i)).compareTo(patients.get(i))<0){\n\t\t Patient p=patients.get(i);\n\t\t patients.set(i,patients.get(parent(i)));\n\t\t queueMap.put(patients.get(parent(i)).getName(), i);\n\t\t patients.set(parent(i),p);\n\t\t queueMap.put(p.getName(), parent(i));\n\t\t i=parent(i);\n\t }\n }", "public void push(int data)\n {\n if (top==size-1)\n {\n System.out.println(\"Stack is full\");\n return;\n\n }else\n {\n top++;\n stack[top]=data;\n }\n\n }" ]
[ "0.62095994", "0.58420205", "0.5696375", "0.56925267", "0.5685335", "0.5652627", "0.5612228", "0.56011987", "0.5579088", "0.5537825", "0.54992306", "0.54923505", "0.54335105", "0.53399366", "0.5339278", "0.52783585", "0.5269021", "0.52678615", "0.5258089", "0.5209305", "0.5200524", "0.5196219", "0.5182693", "0.5174968", "0.5135894", "0.51166254", "0.511083", "0.5099238", "0.5069222", "0.5053696", "0.5048592", "0.502579", "0.50170946", "0.5013327", "0.50114775", "0.5002681", "0.49964646", "0.49940073", "0.49844438", "0.49815726", "0.4973925", "0.49721548", "0.49567342", "0.49270457", "0.49022156", "0.4885043", "0.48840836", "0.4882727", "0.48826694", "0.4881457", "0.4880961", "0.4879777", "0.4876587", "0.48762584", "0.48746884", "0.48725352", "0.48677722", "0.486305", "0.48590747", "0.48420474", "0.48407203", "0.4839093", "0.48390546", "0.4838491", "0.48356393", "0.48334306", "0.48319933", "0.4823825", "0.4823439", "0.48171523", "0.48158452", "0.481371", "0.48027188", "0.47991088", "0.47917736", "0.4790425", "0.47888726", "0.4784465", "0.4776812", "0.47764048", "0.4772115", "0.47718954", "0.4769584", "0.47694865", "0.47659197", "0.4759883", "0.4753712", "0.47506958", "0.47490567", "0.4734073", "0.47340304", "0.47185004", "0.47182548", "0.47146899", "0.4696974", "0.46953416", "0.46877563", "0.46855703", "0.4676676", "0.46746117" ]
0.6963026
0
Creates a linked list of beds and assigns the bed a location in the hospital
private static LinkedList<Bed> listOfBeds() { Bed b1 = new Bed("Bed 1", "Ward 3"); Bed b2 = new Bed("Bed 2", "Ward 2"); Bed b3 = new Bed("Bed 3", "Ward 1"); Bed b4 = new Bed("Bed 4", "ICU"); Bed b5 = new Bed("Bed 5", "ER"); LinkedList<Bed> bedList = new LinkedList<>(); bedList.addFirst(b5); bedList.addFirst(b4); bedList.addFirst(b3); bedList.addFirst(b2); bedList.addFirst(b1); return bedList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void create_building(ArrayList bulding){\n House house = new House(Adress.RUE_DE_LA_PAIX);\n System.out.println(\"Vous venez de créer une maison\");\n bulding.add(house);\n }", "public List<Bed> solvedBeds() {\n // TODO: Fix me.\n return bed;\n }", "public void creatList()\n\t{\n\t\tbowlers.add(new Bowler(\"A\",44));\n\t\tbowlers.add(new Bowler(\"B\",25));\n\t\tbowlers.add(new Bowler(\"C\",2));\n\t\tbowlers.add(new Bowler(\"D\",10));\n\t\tbowlers.add(new Bowler(\"E\",6));\n\t}", "public void setBed(Integer bed) {\n this.bed = bed;\n }", "@Override\n\tpublic Location getBedLocation() {\n\t\treturn this.bedLocation;\n\t}", "public BuildingList() {\n Building temp = new Building(1);\n temp.createSubAreas(6);\n temp.setSystemPass(\"0000\");\n URL url = this.getClass().getClassLoader()\n .getResource(\"singleHouse.jpg\");\n temp.setImage(url);\n\n buildings.add(temp);\n temp = new Building(2);\n url = this.getClass().getClassLoader()\n .getResource(\"commercial.jpg\");\n temp.setImage(url);\n buildings.add(temp);\n }", "public ArrayList<BEDentry> getHallmarkBEDEntries() {\n\t\t\n\t\tfinal String chrom = getBEDentry().getChrom(); \n\t\tfinal String parent_name = getBEDentry().getName(); \n\t\tfinal String strand = getBEDentry().getStrand(); \n\t\t \n\t\tArrayList<BEDentry> bedList = new ArrayList<BEDentry>(); \n\t\tbedList.add( new BEDentry(chrom, getLast5SSPos(), getLast5SSPos()+1, (parent_name + \"_5SS\"), strand ) ); \n\t\tbedList.add( new BEDentry(chrom, getLast3SSPos(), getLast3SSPos()+1, (parent_name + \"_3SS\"), strand ) );\n\t\tbedList.add( new BEDentry(chrom, getPolyA(), getPolyA()+1, (parent_name + \"_PolyASite\"), strand ) ); \n\t\t\n\t\n\t\treturn( bedList ); \n\t}", "public void createNewHouseAndAddToList(){\n\t\t\tHouse newHouse = new House();\r\n\t\t\tString id = createAutomaticallyID().trim();\r\n\t\t\tnewHouse.setId(id);\r\n\t\t\tnewHouse.setPrice(Double.parseDouble(priceTextField.getText().trim()));\r\n\t\t\tnewHouse.setNumberOfBathrooms(Integer.parseInt(bathroomsTextField.getText().trim()));\r\n\t\t\tnewHouse.setAirConditionerFeature(airConditionerComboBox.getSelectedItem().toString());\r\n\t\t\tnewHouse.setNumberOfRooms(Integer.parseInt(roomsTextField.getText().trim()));\r\n\t\t\tnewHouse.setSize(Double.parseDouble(sizeTextField.getText().trim()));\r\n\t\t\t\r\n\t\t\toriginalHouseList.add(newHouse);//first adding newHouse to arrayList\r\n\t\t\tcopyEstateAgent.setHouseList(originalHouseList);//then set new arrayList in copyEstateAgent\r\n\r\n\t\t}", "public static void main(String[] args) {\n\t\tHotel h = new Hotel();\r\n\t\tRoom r = new Room();\r\n\t\tBed b = new Bed();\r\n\t\tint totalbeds = 0;\r\n\t\tList<Room> rooms = new ArrayList<Room>();\r\n\t\tList<Bed> beds = new ArrayList<Bed>();\r\n\t\tList<Integer> bedsperroom = new ArrayList<Integer>();\r\n\t\tHotelReport report = new HotelReport();\r\n\t\t//these are the values that can change, here they are hard coded in\r\n\t\tString hotelname=\"test\";\r\n\t\tint noofrooms=5;\r\n\t\t\r\n\t\th.setName(hotelname);\r\n\t\t//iterates through the number of rooms\r\n\t\tfor (int i = 1; i <= noofrooms; i++) {\r\n\t\t\t// here if the room is vacent or not has to be set for all rooms simultaneously,\r\n\t\t\t//in reality the user would be able to input different values for each room\r\n\t\t\tint roomfree=0;\r\n\t\t\th.gotVacencies(roomfree);\r\n\t\t\t// a new room object is created and added to the array list of rooms\r\n\t\t\tRoom e = new Room();\r\n\t\t\trooms.add(e);\r\n\t\t\t//again the number of beds in each room has to be the same for each room, \r\n\t\t\t//but in the proper system the user can input different numbers\r\n\t\t\tint bedsinroom=5;\r\n\t\t\t//checks to make sure the beds in room is a vaid number\r\n\t\t\tr.checkBeds(bedsinroom);\r\n\t\t\t//adds the beds in one room to an array list\r\n\t\t\tbedsperroom.add(bedsinroom);\r\n\t\t\t//iterates through the number of beds\r\n\t\t\tfor (int i2 = 1; i2 <= bedsinroom; i2++) {\r\n\t\t\t\t//a new bed object is created and added to the list of beds\r\n\t\t\t\tBed c = new Bed();\r\n\t\t\t\tbeds.add(c);\r\n\t\t\t\t//a bed type is set. as before, in the real system a different type \r\n\t\t\t\t//can be set for each bed\r\n\t\t\t\tint x = 1;\r\n\t\t\t\tc.setBedtype(x);\r\n\t\t\t\t//a running total of the max occupency is taken\r\n\t\t\t\ttotalbeds = totalbeds + x;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//the two arrays are set\r\n\t\th.setRooms(rooms);\r\n\t\tr.setBeds(beds);\r\n\t\t//all values are fed into the report class, which outputs a formatted report\r\n\t\treport.Report(h, bedsperroom, r, totalbeds);\t\r\n\t\t\t\t\r\n\t\t\r\n\r\n}", "public House(double f, int s, int be, int ba){\r\n \r\n super(f, s);\r\n bedrooms = be;\r\n bathrooms = ba;\r\n }", "public AdressBook() {\r\n addressEntryList = new LinkedList<>();\r\n }", "public CorePlayer setBedLocation(final Location bedLocation) {\n\t\tthis.bedLocation = bedLocation;\n\t\treturn this;\n\t}", "public void addBankDDLocation() {\n\t\t System.out.println(\"the value of country\"+this.countryId);\n\t\t System.out.println(\"the map value is\"+mapCountryList.get(this.countryId));\n\t\t System.out.println(\"dDAgent :\"+ dDAgent +\"the map value is\"+mapAgentList.get(new BigDecimal(this.dDAgent)));\n\t\t try {\n\t\t AddBankDDPrintLocBean addBankDDPrintLocBean = new AddBankDDPrintLocBean(mapCountryList.get(this.countryId),this.dDAgent,this.dDPrintLocation,this.countryId,this.stateId,this.districtId,this.cityId,this.bankBranchId,mapAgentList.get(new BigDecimal(this.dDAgent)));\n\t\t bankDdPrintLocationList.add(addBankDDPrintLocBean);\n\t\t }catch(NullPointerException npexp) {\n\t\t\t System.out.println(\"null pointer exception is occured\");\n\t\t\t npexp.printStackTrace();\n\t\t }catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t \n\t\t setRenderDDDataTable(true);\n\t\t setBankBranchId(null);\n\t\t setBankId(null);\n\t\t setCountryId(null);\n\t\t setStateId(null);\n\t\t setDistrictId(null);\n\t\t setCityId(null);\n\t\t setdDAgent(\"\");\n\t\t setdDPrintLocation(\"\");\n\t\t setRenderDdprintLocation(false);\n\t }", "public static com.surwing.model.Bed createBed(long bedId) {\n return getService().createBed(bedId);\n }", "public MeldingBeheer(List<Melding> meldingen) {\n\n this.meldingen = meldingen;\n }", "private ArrayList<Bedrijf> fillBedrijfListFromResultSet(ResultSet resultSet, ArrayList<Bedrijf> list) throws SQLException {\n\n while (resultSet.next()) {\n Bedrijf bedrijf = new Bedrijf();\n bedrijf.setId(resultSet.getInt(\"id\"));\n bedrijf.setBedrijfsnaam(resultSet.getString(\"bedrijfsnaam\"));\n bedrijf.setAdres(resultSet.getString(\"adres\"));\n bedrijf.setPostcode(resultSet.getString(\"postcode\"));\n bedrijf.setWebsite(resultSet.getString(\"website\"));\n bedrijf.setPlaats(resultSet.getString(\"plaats\"));\n bedrijf.setContactpersoon(resultSet.getString(\"contactpersoon\"));\n bedrijf.setTelefoon(resultSet.getString(\"telefoon\"));\n bedrijf.setEmail(resultSet.getString(\"email\"));\n list.add(bedrijf);\n }\n return list;\n }", "public Location getBedLocation ( ) {\n\t\treturn extract ( handle -> handle.getBedLocation ( ) );\n\t}", "private void addSpawnsToList()\n\t{\n\t\tSPAWNS.put(1, new ESSpawn(1, GraciaSeeds.DESTRUCTION, new Location(-245790,220320,-12104), new int[]{TEMPORARY_TELEPORTER}));\n\t\tSPAWNS.put(2, new ESSpawn(2, GraciaSeeds.DESTRUCTION, new Location(-249770,207300,-11952), new int[]{TEMPORARY_TELEPORTER}));\n\t\t//Energy Seeds\n\t\tSPAWNS.put(3, new ESSpawn(3, GraciaSeeds.DESTRUCTION, new Location(-248360,219272,-12448), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(4, new ESSpawn(4, GraciaSeeds.DESTRUCTION, new Location(-249448,219256,-12448), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(5, new ESSpawn(5, GraciaSeeds.DESTRUCTION, new Location(-249432,220872,-12448), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(6, new ESSpawn(6, GraciaSeeds.DESTRUCTION, new Location(-248360,220888,-12448), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(7, new ESSpawn(7, GraciaSeeds.DESTRUCTION, new Location(-250088,219256,-12448), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(8, new ESSpawn(8, GraciaSeeds.DESTRUCTION, new Location(-250600,219272,-12448), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(9, new ESSpawn(9, GraciaSeeds.DESTRUCTION, new Location(-250584,220904,-12448), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(10, new ESSpawn(10, GraciaSeeds.DESTRUCTION, new Location(-250072,220888,-12448), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(11, new ESSpawn(11, GraciaSeeds.DESTRUCTION, new Location(-253096,217704,-12296), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(12, new ESSpawn(12, GraciaSeeds.DESTRUCTION, new Location(-253112,217048,-12288), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(13, new ESSpawn(13, GraciaSeeds.DESTRUCTION, new Location(-251448,217032,-12288), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(14, new ESSpawn(14, GraciaSeeds.DESTRUCTION, new Location(-251416,217672,-12296), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(15, new ESSpawn(15, GraciaSeeds.DESTRUCTION, new Location(-251416,217672,-12296), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(16, new ESSpawn(16, GraciaSeeds.DESTRUCTION, new Location(-251416,217016,-12280), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(17, new ESSpawn(17, GraciaSeeds.DESTRUCTION, new Location(-249752,217016,-12280), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(18, new ESSpawn(18, GraciaSeeds.DESTRUCTION, new Location(-249736,217688,-12296), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(19, new ESSpawn(19, GraciaSeeds.DESTRUCTION, new Location(-252472,215208,-12120), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(20, new ESSpawn(20, GraciaSeeds.DESTRUCTION, new Location(-252552,216760,-12248), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(21, new ESSpawn(21, GraciaSeeds.DESTRUCTION, new Location(-253160,216744,-12248), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(22, new ESSpawn(22, GraciaSeeds.DESTRUCTION, new Location(-253128,215160,-12096), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(23, new ESSpawn(23, GraciaSeeds.DESTRUCTION, new Location(-250392,215208,-12120), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(24, new ESSpawn(24, GraciaSeeds.DESTRUCTION, new Location(-250264,216744,-12248), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(25, new ESSpawn(25, GraciaSeeds.DESTRUCTION, new Location(-249720,216744,-12248), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(26, new ESSpawn(26, GraciaSeeds.DESTRUCTION, new Location(-249752,215128,-12096), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(27, new ESSpawn(27, GraciaSeeds.DESTRUCTION, new Location(-250280,216760,-12248), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(28, new ESSpawn(28, GraciaSeeds.DESTRUCTION, new Location(-250344,216152,-12248), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(29, new ESSpawn(29, GraciaSeeds.DESTRUCTION, new Location(-252504,216152,-12248), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(30, new ESSpawn(30, GraciaSeeds.DESTRUCTION, new Location(-252520,216792,-12248), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(31, new ESSpawn(31, GraciaSeeds.DESTRUCTION, new Location(-242520,217272,-12384), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(32, new ESSpawn(32, GraciaSeeds.DESTRUCTION, new Location(-241432,217288,-12384), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(33, new ESSpawn(33, GraciaSeeds.DESTRUCTION, new Location(-241432,218936,-12384), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(34, new ESSpawn(34, GraciaSeeds.DESTRUCTION, new Location(-242536,218936,-12384), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(35, new ESSpawn(35, GraciaSeeds.DESTRUCTION, new Location(-240808,217272,-12384), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(36, new ESSpawn(36, GraciaSeeds.DESTRUCTION, new Location(-240280,217272,-12384), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(37, new ESSpawn(37, GraciaSeeds.DESTRUCTION, new Location(-240280,218952,-12384), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(38, new ESSpawn(38, GraciaSeeds.DESTRUCTION, new Location(-240792,218936,-12384), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(39, new ESSpawn(39, GraciaSeeds.DESTRUCTION, new Location(-239576,217240,-12640), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(40, new ESSpawn(40, GraciaSeeds.DESTRUCTION, new Location(-239560,216168,-12640), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(41, new ESSpawn(41, GraciaSeeds.DESTRUCTION, new Location(-237896,216152,-12640), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(42, new ESSpawn(42, GraciaSeeds.DESTRUCTION, new Location(-237912,217256,-12640), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(43, new ESSpawn(43, GraciaSeeds.DESTRUCTION, new Location(-237896,215528,-12640), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(44, new ESSpawn(44, GraciaSeeds.DESTRUCTION, new Location(-239560,215528,-12640), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(45, new ESSpawn(45, GraciaSeeds.DESTRUCTION, new Location(-239560,214984,-12640), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(46, new ESSpawn(46, GraciaSeeds.DESTRUCTION, new Location(-237896,215000,-12640), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(47, new ESSpawn(47, GraciaSeeds.DESTRUCTION, new Location(-237896,213640,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(48, new ESSpawn(48, GraciaSeeds.DESTRUCTION, new Location(-239560,213640,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(49, new ESSpawn(49, GraciaSeeds.DESTRUCTION, new Location(-239544,212552,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(50, new ESSpawn(50, GraciaSeeds.DESTRUCTION, new Location(-237912,212552,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(51, new ESSpawn(51, GraciaSeeds.DESTRUCTION, new Location(-237912,211912,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(52, new ESSpawn(52, GraciaSeeds.DESTRUCTION, new Location(-237912,211400,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(53, new ESSpawn(53, GraciaSeeds.DESTRUCTION, new Location(-239560,211400,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(54, new ESSpawn(54, GraciaSeeds.DESTRUCTION, new Location(-239560,211912,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(55, new ESSpawn(55, GraciaSeeds.DESTRUCTION, new Location(-241960,214536,-12512), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(56, new ESSpawn(56, GraciaSeeds.DESTRUCTION, new Location(-241976,213448,-12512), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(57, new ESSpawn(57, GraciaSeeds.DESTRUCTION, new Location(-243624,213448,-12512), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(58, new ESSpawn(58, GraciaSeeds.DESTRUCTION, new Location(-243624,214520,-12512), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(59, new ESSpawn(59, GraciaSeeds.DESTRUCTION, new Location(-241976,212808,-12504), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(60, new ESSpawn(60, GraciaSeeds.DESTRUCTION, new Location(-241960,212280,-12504), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(61, new ESSpawn(61, GraciaSeeds.DESTRUCTION, new Location(-243624,212264,-12504), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(62, new ESSpawn(62, GraciaSeeds.DESTRUCTION, new Location(-243624,212792,-12504), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(63, new ESSpawn(63, GraciaSeeds.DESTRUCTION, new Location(-243640,210920,-12640), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(64, new ESSpawn(64, GraciaSeeds.DESTRUCTION, new Location(-243624,209832,-12640), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(65, new ESSpawn(65, GraciaSeeds.DESTRUCTION, new Location(-241976,209832,-12640), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(66, new ESSpawn(66, GraciaSeeds.DESTRUCTION, new Location(-241976,210920,-12640), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(67, new ESSpawn(67, GraciaSeeds.DESTRUCTION, new Location(-241976,209192,-12640), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(68, new ESSpawn(68, GraciaSeeds.DESTRUCTION, new Location(-241976,208664,-12640), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(69, new ESSpawn(69, GraciaSeeds.DESTRUCTION, new Location(-243624,208664,-12640), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(70, new ESSpawn(70, GraciaSeeds.DESTRUCTION, new Location(-243624,209192,-12640), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(71, new ESSpawn(71, GraciaSeeds.DESTRUCTION, new Location(-241256,208664,-12896), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(72, new ESSpawn(72, GraciaSeeds.DESTRUCTION, new Location(-240168,208648,-12896), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(73, new ESSpawn(73, GraciaSeeds.DESTRUCTION, new Location(-240168,207000,-12896), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(74, new ESSpawn(74, GraciaSeeds.DESTRUCTION, new Location(-241256,207000,-12896), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(75, new ESSpawn(75, GraciaSeeds.DESTRUCTION, new Location(-239528,208648,-12896), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(76, new ESSpawn(76, GraciaSeeds.DESTRUCTION, new Location(-238984,208664,-12896), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(77, new ESSpawn(77, GraciaSeeds.DESTRUCTION, new Location(-239000,207000,-12896), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(78, new ESSpawn(78, GraciaSeeds.DESTRUCTION, new Location(-239512,207000,-12896), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE}));\n\t\tSPAWNS.put(79, new ESSpawn(79, GraciaSeeds.DESTRUCTION, new Location(-245064,213144,-12384), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(80, new ESSpawn(80, GraciaSeeds.DESTRUCTION, new Location(-245064,212072,-12384), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(81, new ESSpawn(81, GraciaSeeds.DESTRUCTION, new Location(-246696,212072,-12384), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(82, new ESSpawn(82, GraciaSeeds.DESTRUCTION, new Location(-246696,213160,-12384), new int[]{ENERGY_SEED_WIND,ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(83, new ESSpawn(83, GraciaSeeds.DESTRUCTION, new Location(-245064,211416,-12384), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(84, new ESSpawn(84, GraciaSeeds.DESTRUCTION, new Location(-245048,210904,-12384), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(85, new ESSpawn(85, GraciaSeeds.DESTRUCTION, new Location(-246712,210888,-12384), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(86, new ESSpawn(86, GraciaSeeds.DESTRUCTION, new Location(-246712,211416,-12384), new int[]{ENERGY_SEED_DARKNESS,ENERGY_SEED_WATER}));\n\t\tSPAWNS.put(87, new ESSpawn(87, GraciaSeeds.DESTRUCTION, new Location(-245048,209544,-12512), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(88, new ESSpawn(88, GraciaSeeds.DESTRUCTION, new Location(-245064,208456,-12512), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(89, new ESSpawn(89, GraciaSeeds.DESTRUCTION, new Location(-246696,208456,-12512), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(90, new ESSpawn(90, GraciaSeeds.DESTRUCTION, new Location(-246712,209544,-12512), new int[]{ENERGY_SEED_FIRE,ENERGY_SEED_WIND,ENERGY_SEED_EARTH}));\n\t\tSPAWNS.put(91, new ESSpawn(91, GraciaSeeds.DESTRUCTION, new Location(-245048,207816,-12512), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(92, new ESSpawn(92, GraciaSeeds.DESTRUCTION, new Location(-245048,207288,-12512), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(93, new ESSpawn(93, GraciaSeeds.DESTRUCTION, new Location(-246696,207304,-12512), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(94, new ESSpawn(94, GraciaSeeds.DESTRUCTION, new Location(-246712,207816,-12512), new int[]{ENERGY_SEED_DIVINITY,ENERGY_SEED_DARKNESS}));\n\t\tSPAWNS.put(95, new ESSpawn(95, GraciaSeeds.DESTRUCTION, new Location(-244328,207272,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(96, new ESSpawn(96, GraciaSeeds.DESTRUCTION, new Location(-243256,207256,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(97, new ESSpawn(97, GraciaSeeds.DESTRUCTION, new Location(-243256,205624,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(98, new ESSpawn(98, GraciaSeeds.DESTRUCTION, new Location(-244328,205608,-12768), new int[]{ENERGY_SEED_WATER,ENERGY_SEED_FIRE,ENERGY_SEED_WIND}));\n\t\tSPAWNS.put(99, new ESSpawn(99, GraciaSeeds.DESTRUCTION, new Location(-242616,207272,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(100, new ESSpawn(100, GraciaSeeds.DESTRUCTION, new Location(-242104,207272,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(101, new ESSpawn(101, GraciaSeeds.DESTRUCTION, new Location(-242088,205624,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\tSPAWNS.put(102, new ESSpawn(102, GraciaSeeds.DESTRUCTION, new Location(-242600,205608,-12768), new int[]{ENERGY_SEED_EARTH,ENERGY_SEED_DIVINITY}));\n\t\t// Seed of Annihilation\n\t\tSPAWNS.put(103, new ESSpawn(103, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184519,183007,-10456), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(104, new ESSpawn(104, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184873,181445,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(105, new ESSpawn(105, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184009,180962,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(106, new ESSpawn(106, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185321,181641,-10448), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(107, new ESSpawn(107, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184035,182775,-10512), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(108, new ESSpawn(108, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185433,181935,-10424), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(109, new ESSpawn(109, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183309,183007,-10560), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(110, new ESSpawn(110, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184929,181886,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(111, new ESSpawn(111, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184009,180392,-10424), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(112, new ESSpawn(112, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183793,183239,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(113, new ESSpawn(113, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184245,180848,-10464), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(114, new ESSpawn(114, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-182704,183761,-10528), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(115, new ESSpawn(115, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184705,181886,-10504), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(116, new ESSpawn(116, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184304,181076,-10488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(117, new ESSpawn(117, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183596,180430,-10424), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(118, new ESSpawn(118, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184422,181038,-10480), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(119, new ESSpawn(119, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184929,181543,-10496), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(120, new ESSpawn(120, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184398,182891,-10472), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(121, new ESSpawn(121, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177606,182848,-10584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(122, new ESSpawn(122, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178104,183224,-10560), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(123, new ESSpawn(123, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177274,182284,-10600), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(124, new ESSpawn(124, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177772,183224,-10560), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(125, new ESSpawn(125, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181532,180364,-10504), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(126, new ESSpawn(126, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181802,180276,-10496), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(127, new ESSpawn(127, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178429,180444,-10512), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(128, new ESSpawn(128, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177606,182190,-10600), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(129, new ESSpawn(129, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-177357,181908,-10576), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(130, new ESSpawn(130, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178747,179534,-10408), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(131, new ESSpawn(131, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178429,179534,-10392), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(132, new ESSpawn(132, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178853,180094,-10472), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(133, new ESSpawn(133, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181937,179660,-10416), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(134, new ESSpawn(134, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-180992,179572,-10416), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(135, new ESSpawn(135, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185552,179252,-10368), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(136, new ESSpawn(136, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184572,178913,-10400), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(137, new ESSpawn(137, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184768,178348,-10312), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(138, new ESSpawn(138, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-184572,178574,-10352), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(139, new ESSpawn(139, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185062,178913,-10384), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(140, new ESSpawn(140, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181397,179484,-10416), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(141, new ESSpawn(141, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-181667,179044,-10408), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(142, new ESSpawn(142, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-185258,177896,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(143, new ESSpawn(143, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183506,176570,-10280), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(144, new ESSpawn(144, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183719,176804,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(145, new ESSpawn(145, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183648,177116,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(146, new ESSpawn(146, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183932,176492,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(147, new ESSpawn(147, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183861,176570,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(148, new ESSpawn(148, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-183790,175946,-10240), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(149, new ESSpawn(149, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178641,179604,-10416), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(150, new ESSpawn(150, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-178959,179814,-10432), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(151, new ESSpawn(151, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-176367,178456,-10376), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(152, new ESSpawn(152, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-175845,177172,-10264), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(153, new ESSpawn(153, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-175323,177600,-10248), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(154, new ESSpawn(154, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-174975,177172,-10216), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(155, new ESSpawn(155, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-176019,178242,-10352), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(156, new ESSpawn(156, GraciaSeeds.ANNIHILATION_BISTAKON, new Location(-174801,178456,-10264), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(157, new ESSpawn(157, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185648,183384,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(158, new ESSpawn(158, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186740,180908,-15528), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(159, new ESSpawn(159, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185297,184658,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(160, new ESSpawn(160, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185697,181601,-15488), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(161, new ESSpawn(161, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186684,182744,-15536), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(162, new ESSpawn(162, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184908,183384,-15616), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(163, new ESSpawn(163, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184994,185572,-15784), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(164, new ESSpawn(164, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185796,182616,-15608), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(165, new ESSpawn(165, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184970,184385,-15648), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(166, new ESSpawn(166, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185995,180809,-15512), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(167, new ESSpawn(167, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185352,182872,-15632), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(168, new ESSpawn(168, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185624,184294,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(169, new ESSpawn(169, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184486,185774,-15816), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(170, new ESSpawn(170, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186496,184112,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(171, new ESSpawn(171, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184232,185976,-15816), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(172, new ESSpawn(172, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184994,185673,-15792), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(173, new ESSpawn(173, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185733,184203,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(174, new ESSpawn(174, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185079,184294,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(175, new ESSpawn(175, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184803,180710,-15528), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(176, new ESSpawn(176, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186293,180413,-15528), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(177, new ESSpawn(177, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185352,182936,-15632), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(178, new ESSpawn(178, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184356,180611,-15496), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(179, new ESSpawn(179, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185375,186784,-15816), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(180, new ESSpawn(180, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184867,186784,-15816), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(181, new ESSpawn(181, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180553,180454,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(182, new ESSpawn(182, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180422,180454,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(183, new ESSpawn(183, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-181863,181138,-15120), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(184, new ESSpawn(184, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-181732,180454,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(185, new ESSpawn(185, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180684,180397,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(186, new ESSpawn(186, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-182256,180682,-15112), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(187, new ESSpawn(187, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185492,179492,-15392), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(188, new ESSpawn(188, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185894,178538,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(189, new ESSpawn(189, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-186028,178856,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(190, new ESSpawn(190, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185224,179068,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(191, new ESSpawn(191, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185492,178538,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(192, new ESSpawn(192, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185894,178538,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(193, new ESSpawn(193, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180619,178855,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(194, new ESSpawn(194, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180255,177892,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(195, new ESSpawn(195, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-185804,176472,-15336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(196, new ESSpawn(196, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184580,176370,-15320), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(197, new ESSpawn(197, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184308,176166,-15320), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(198, new ESSpawn(198, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-183764,177186,-15304), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(199, new ESSpawn(199, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180801,177571,-15144), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(200, new ESSpawn(200, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184716,176064,-15320), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(201, new ESSpawn(201, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-184444,175452,-15296), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(202, new ESSpawn(202, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180164,177464,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(203, new ESSpawn(203, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-180164,178213,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(204, new ESSpawn(204, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-179982,178320,-15152), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(205, new ESSpawn(205, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-176925,177757,-15824), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(206, new ESSpawn(206, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-176164,179282,-15720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(207, new ESSpawn(207, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175692,177613,-15800), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(208, new ESSpawn(208, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175418,178117,-15824), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(209, new ESSpawn(209, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-176103,177829,-15824), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(210, new ESSpawn(210, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175966,177325,-15792), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(211, new ESSpawn(211, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174778,179732,-15664), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(212, new ESSpawn(212, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175692,178261,-15824), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(213, new ESSpawn(213, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-176038,179192,-15736), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(214, new ESSpawn(214, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175660,179462,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(215, new ESSpawn(215, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175912,179732,-15664), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(216, new ESSpawn(216, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175156,180182,-15680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(217, new ESSpawn(217, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174240,182059,-15664), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(218, new ESSpawn(218, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-175590,181478,-15640), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(219, new ESSpawn(219, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174510,181561,-15616), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(220, new ESSpawn(220, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174240,182391,-15688), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(221, new ESSpawn(221, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174105,182806,-15672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(222, new ESSpawn(222, GraciaSeeds.ANNIHILATION_REPTILIKON, new Location(-174645,182806,-15712), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(223, new ESSpawn(223, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-214962,182403,-10992), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(224, new ESSpawn(224, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-215019,182493,-11000), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(225, new ESSpawn(225, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-211374,180793,-11672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(226, new ESSpawn(226, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-211198,180661,-11680), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(227, new ESSpawn(227, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-213097,178936,-12720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(228, new ESSpawn(228, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-213517,178936,-12712), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(229, new ESSpawn(229, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-214105,179191,-12720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(230, new ESSpawn(230, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-213769,179446,-12720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(231, new ESSpawn(231, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-214021,179344,-12720), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(232, new ESSpawn(232, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-210582,180595,-11672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(233, new ESSpawn(233, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-210934,180661,-11696), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(234, new ESSpawn(234, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207058,178460,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(235, new ESSpawn(235, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207454,179151,-11368), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(236, new ESSpawn(236, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207422,181365,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(237, new ESSpawn(237, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207358,180627,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(238, new ESSpawn(238, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207230,180996,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(239, new ESSpawn(239, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-208515,184160,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(240, new ESSpawn(240, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207613,184000,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(241, new ESSpawn(241, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-208597,183760,-11352), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(242, new ESSpawn(242, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206710,176142,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(243, new ESSpawn(243, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206361,178136,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(244, new ESSpawn(244, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206178,178630,-12672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(245, new ESSpawn(245, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-205738,178715,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(246, new ESSpawn(246, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206442,178205,-12648), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(247, new ESSpawn(247, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206585,178874,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(248, new ESSpawn(248, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206073,179366,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(249, new ESSpawn(249, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206009,178628,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(250, new ESSpawn(250, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206155,181301,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(251, new ESSpawn(251, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206595,181641,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(252, new ESSpawn(252, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206507,181641,-12656), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(253, new ESSpawn(253, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206507,181471,-12640), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(254, new ESSpawn(254, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206974,175972,-12672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(255, new ESSpawn(255, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206304,175130,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(256, new ESSpawn(256, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206886,175802,-12672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(257, new ESSpawn(257, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207238,175972,-12672), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(258, new ESSpawn(258, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206386,174857,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(259, new ESSpawn(259, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-206386,175039,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(260, new ESSpawn(260, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-205976,174584,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(261, new ESSpawn(261, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-207367,184320,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(262, new ESSpawn(262, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219002,180419,-12608), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(263, new ESSpawn(263, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218853,182790,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(264, new ESSpawn(264, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218853,183343,-12600), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(265, new ESSpawn(265, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218358,186247,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(266, new ESSpawn(266, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218358,186083,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(267, new ESSpawn(267, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-217574,185796,-11352), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(268, new ESSpawn(268, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219178,181051,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(269, new ESSpawn(269, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-220171,180313,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(270, new ESSpawn(270, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219293,183738,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(271, new ESSpawn(271, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219381,182553,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(272, new ESSpawn(272, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219600,183024,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(273, new ESSpawn(273, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219940,182680,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(274, new ESSpawn(274, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219260,183884,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(275, new ESSpawn(275, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219855,183540,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(276, new ESSpawn(276, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218946,186575,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(277, new ESSpawn(277, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219882,180103,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(278, new ESSpawn(278, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219266,179787,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(279, new ESSpawn(279, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219201,178337,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(280, new ESSpawn(280, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219716,179875,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(281, new ESSpawn(281, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219716,180021,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(282, new ESSpawn(282, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219989,179437,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(283, new ESSpawn(283, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219078,178298,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(284, new ESSpawn(284, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218684,178954,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(285, new ESSpawn(285, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219089,178456,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(286, new ESSpawn(286, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-220266,177623,-12608), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(287, new ESSpawn(287, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219201,178025,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(288, new ESSpawn(288, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219142,177044,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(289, new ESSpawn(289, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219690,177895,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(290, new ESSpawn(290, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219754,177623,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(291, new ESSpawn(291, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218791,177830,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(292, new ESSpawn(292, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218904,176219,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(293, new ESSpawn(293, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218768,176384,-12584), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(294, new ESSpawn(294, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218774,177626,-11320), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(295, new ESSpawn(295, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218774,177792,-11328), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(296, new ESSpawn(296, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219880,175901,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(297, new ESSpawn(297, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219210,176054,-12592), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(298, new ESSpawn(298, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219850,175991,-12608), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(299, new ESSpawn(299, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-219079,175021,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(300, new ESSpawn(300, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218812,174229,-11344), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\tSPAWNS.put(301, new ESSpawn(301, GraciaSeeds.ANNIHILATION_COKRAKON, new Location(-218723,174669,-11336), new int[]{ ENERGY_SEED_WATER, ENERGY_SEED_FIRE, ENERGY_SEED_WIND, ENERGY_SEED_EARTH, ENERGY_SEED_DIVINITY, ENERGY_SEED_DARKNESS }));\n\t\t//@formatter:on\n\t}", "public static void main(String[] ar){\n Room living = new Room(\"Living\");\n Room kitchen = new Room(\"Kitchen\");\n Room bathroom = new Room(\"Bathroom\");\n Room garage = new Room(\"Garage\");\n \n Room bedroom1 = new Room(\"Bedroom1\");\n Room bedroom2 = new Room(\"Bedroom2\");\n Room bathroom1stf=new Room(\"Bathroom\");\n \n \n //Living\n living.addDevice(new Device(\"Aire acondicionado\", \"LG\", \"pm07sp\", true));\n living.addDevice(new Device(\"Luces\", \"Philips\", \"Hue\", true));\n //Kitchen\n kitchen.addDevice(new Device(\"luces\",\"Ahorradoras\",\"34234\", true));\n //Bathroom\n bathroom.addDevice(new Device(\"luce\",\"simple\",\"354676\", true));\n //Garage\n garage.addDevice(new Device(\"lightbulb\",\"the best\",\"X3000\",true));\n \n //Bedroom 1\n bedroom1.addDevice(new Device(\"Aire acondicionado\", \"Mabe\" , \"Mmt12cdbs3\", true));\n bedroom1.addDevice(new Device(\"Luces\",\"Philips\",\"EcoVantage\",true));\n \n //Bedroom 2\n bedroom2.addDevice(new Device(\"Aire acondicionado\", \"Hisense\" , \"AS-12CR5FVETD/1TR\", true));\n bedroom2.addDevice(new Device(\"Luces\",\"Ho Iluminacion\",\"A19 60W Claro\",true));\n \n //baño primer piso\n bathroom1stf.addDevice(new Device(\"Luces\",\"Alefco\",\"lw100\",true));\n \n \n \n Level groundFloor = new Level(\"Ground Floor\");\n Level firstFloor = new Level(\"First Floor\");\n \n \n groundFloor.addRoom(living);\n groundFloor.addRoom(kitchen);\n groundFloor.addRoom(bathroom);\n groundFloor.addRoom(garage);\n \n firstFloor.addRoom(bedroom1);\n firstFloor.addRoom(bedroom2);\n firstFloor.addRoom(bathroom1stf);\n \n\n House myhouse = new House(\"MyHome\");\n \n myhouse.addLevel(groundFloor);\n myhouse.addLevel(firstFloor);\n \n System.out.println(myhouse);\n \n \n /*\n room.addDevice(new Device(\"Reynaldo\", \"LG\", \"123456\", true));\n room.addDevice(new Device(\"Andrea\", \"Nokia\", \"Lumia-520\", true));\n room.addDevice(new Device(\"Karina\",\"Panasonic\",\"465464\", true));\n room.addDevice(new Device(\"Martin\", \"ZTE\", \"V7\",true));\n room.addDevice(new Device(\"Antonio\",\"Samsung\",\"J5\",true));\n room.addDevice(new Device(\"Roberto\",\"HP\",\"SpectreX360\",true));\n room.addDevice(new Device(\"Gabriel\",\"Linu\",\"Ilium_S106\",true));\n room.addDevice(new Device (\"Limberth\",\"LG\", \"lg-206\",true));\n room.addDevice(new Device(\"jesus\", \"hp\",\"2997\", true));\n room.addDevice(new Device(\"Rich\", \"Asus\",\"Zenfone_4_Max\",true));\n room.addDevice(new Device(\"Adrian\",\"Apple\",\"SE\",true));\n room.addDevice(new Device (\"Jonatan\",\"samsung\",\"J5\",true));\n room.addDevice(new Device(\"Jessica\", \"Huaweii\", \"P9LITE\", true));\n */\n \n \n \n \n \n }", "public AdressBook() {\n initComponents();\n file = new File(filePath);\n adressBook = new LinkedList();\n }", "@Override\n protected void createLocationCLI() {\n /*The rooms in the hallway01 location are created---------------------*/\n \n /*Hallway-------------------------------------------------------------*/\n Room hallway = new Room(\"Hallway 01\", \"This hallway connects the Personal, Laser and Net\");\n super.addRoom(hallway);\n }", "@Test\n public void canAddBedroomToArrayList() {\n hotel.addBedroom(bedroom1);\n assertEquals(5, hotel.checkNumberOfBedrooms());\n }", "public void fillPassengersWithRealPeople(){\r\n Passenger p1 = new Passenger(\"Jimmy\", \"Quaresmini\", 5100, 7, \"London\", 40);\r\n Passenger p2 = new Passenger(\"Masod\", \"Jalalian\", 5200, 9, \"London\", 60);\r\n Passenger p8 = new Passenger(\"Bardia\", \"Fathi\", 5300, 6, \"London\", 38);\r\n Passenger p9 = new Passenger(\"Sami\", \"Norola\", 5300, 8, \"London\", 37);\r\n Passenger p10 = new Passenger(\"Bardias\", \"Girlfriend\", 5200, 10, \"London\", 35);\r\n /*seats.add(6, new Seat(7,p1));//Jimmy\r\n seats.add(8, new Seat(9,p2));//Masod\r\n seats.add(5, new Seat(6,p8));//Bardia\r\n seats.add(7, new Seat(8,p9));//Sami\r\n seats.add(9, new Seat(10,p10));//Bardias Girlfriend*/\r\n\r\n Passenger p3 = new Passenger(\"Mattias\", \"Svensson-Nordell\", 22000, 1, \"London\", 29);\r\n //seats.add(0, new Seat(1,p3));\r\n Passenger p4 = new Passenger(\"Bita\", \"Jabbari\", 21000, 3, \"London\", 43);\r\n //seats.add(2, new Seat(3,p4));\r\n Passenger p5 = new Passenger(\"Marcus\", \"Lippert\", 24000, 2, \"London\", 45);\r\n //seats.add(1, new Seat(2,p5));\r\n Passenger p6 = new Passenger(\"Christer\", \"Barousen\", 21000, 4, \"London\", 44);\r\n //seats.add(3, new Seat(4,p6));\r\n Passenger p7 = new Passenger(\"Linda\", \"Hilding\", 21500, 5, \"London\", 42);\r\n //seats.add(4, new Seat(5,p7));\r\n\r\n passengers.add(p1);\r\n passengers.add(p2);\r\n passengers.add(p3);\r\n passengers.add(p4);\r\n passengers.add(p5);\r\n\r\n passengers.add(p6);\r\n passengers.add(p7);\r\n passengers.add(p8);\r\n passengers.add(p9);\r\n passengers.add(p10);\r\n\r\n seats.add(0, new Seat(1,p3));//Mattias\r\n seats.add(1, new Seat(2,p5));//Marcus\r\n seats.add(2, new Seat(3,p4));//Bita\r\n seats.add(3, new Seat(4,p6));//Christer\r\n seats.add(4, new Seat(5,p7));//Linda\r\n\r\n seats.add(5, new Seat(6,p8));//Bardia\r\n seats.add(6, new Seat(7,p1));//Jimmy\r\n seats.add(7, new Seat(8,p9));//Sami\r\n seats.add(8, new Seat(9,p2));//Masod\r\n seats.add(9, new Seat(10,p10));//Bardias Girlfriend\r\n }", "public void setBed(java.lang.String param) {\r\n localBedTracker = param != null;\r\n\r\n this.localBed = param;\r\n }", "public Hamburg(){\n trackDepartureHolder = TrackHolder.getTrackHolder(8);\n trackArrivalHolder = TrackHolder.getTrackHolder(10);\n scratchTrack = new TrackList<>();\n }", "public static com.surwing.model.Bed getBed(long bedId)\n throws com.liferay.portal.kernel.exception.PortalException,\n com.liferay.portal.kernel.exception.SystemException {\n return getService().getBed(bedId);\n }", "public Station(String location) {\n this.stationID = counter++;\n this.location = location;\n this.bikes = new ArrayList<>();\n }", "public void generate() {\n\t\tLocation location0 = new Location();\n\t\tlocation0.setAddress(\"Zhong Nan Hai\");\n\n\t\tlocation0.setLatitude(0.0);\n\t\tlocation0.setLongitude(0.0);\n;\n\t\tTestDriver.locationList.add(location0);\n\t\t\n\t\t\n\t\tLocation location1 = new Location();\n\t\tlocation1.setAddress(\"Tian An Men\");\n\t\tlocation1.setLatitude(0.1);\n\t\tlocation1.setLongitude(0.1);\n\n\t\tTestDriver.locationList.add(location1);\n\t\t\n\t\t\n\t\tLocation location2 = new Location();\n\t\tlocation2.setAddress(\"White House\");\n\t\tlocation2.setLatitude(100.21);\n\t\tlocation2.setLongitude(102.36);\n\t\tTestDriver.locationList.add(location2);\n\t}", "LinkedListCelest<celestialBody> createList() {\n\t\tLinkedListCelest<celestialBody> b = new LinkedListCelest<celestialBody>();\r\n\t\tfilehandler f = new filehandler();\r\n\t\tf.openfile(f.path);\r\n\t\tf.GetAtt();\r\n\t\tb.pixeldist = f.distance;\r\n\t\tfor(int i = 2; i< f.g.size(); i++) {\r\n\t\t\tcelestialBody j = new celestialBody();\r\n\t\t\tString [] arr = f.g.get(i).split(\",\");\r\n\t\t\tfor(int g=0; g< arr.length; g++) {\r\n\t\t\t\tswitch(g) {\r\n\t\t\t\tcase 1:j.setName(arr[0]);\r\n\t\t\t\tcase 2: j.setMass(Double.parseDouble(arr[1]));\r\n\t\t\t\tcase 3: j.setXC(Integer.parseInt(arr[2]));\r\n\t\t\t\tcase 4: j.setYC(Integer.parseInt(arr[3]));\r\n\t\t\t\tcase 5: j.setXV(Double.parseDouble(arr[4]));\r\n\t\t\t\tcase 6: j.setYV( Double.parseDouble(arr[5]));\r\n\t\t\t\tcase 7: j.setPixels( Integer.parseInt(arr[6]));\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tb.add(j);\r\n\t\t//b.pixeldist = f.distance;\r\n\t\t}\r\n\t\t\r\n\t\treturn b;\r\n\t}", "public void addRoomList(Detail list) {\n\t\t\tRoomList = list;\r\n\t\t}", "public Bedroom(int number, int capacity , TypesOfBedrooms type, int nightlyrate) {\n super(capacity);\n this.number = number;\n this.type = type;\n this.nightlyrate = nightlyrate;\n this.guests = new ArrayList<Guest>();\n }", "public ArrayList<LinkedList<Inhabitant>> allinhabDeparture() {\n ArrayList<LinkedList<Inhabitant>> allinhabDeparture =new ArrayList<LinkedList<Inhabitant>>(288);\n LinkedList<Inhabitant> temp;\n\n for(int i=0;i<287;i++) {\n temp=new LinkedList<Inhabitant>();\n allinhabDeparture.add(i, temp);\n }\n Iterator it = this.boardBuilding.housePopulation.iterator();\n while (it.hasNext()) {\n Inhabitant curin = (Inhabitant)it.next();\n int h=curin.getworkingHour();\n int m=curin.getworkingMinute();\n int t=60*h+m;\n int q=(int)t/5;\n allinhabDeparture.get(q).add(curin);\n }\n return allinhabDeparture;\n }", "public Hotel(ArrayList<Room> rooms) {\n this.rooms = rooms;\n }", "@Override\n\tpublic List<ApartmentDetailsBean> getApartmentList(String location) {\n\t\tList<ApartmentDetailsBean> apartment = new ArrayList<ApartmentDetailsBean>();\n\t\tString query = \"Select * from Apartments where area=?\";\n\t\t//Connection con = DatabaseConnection.connect();\n\t\t\n\t\tResultSet rs=null;\n//\t\tPreparedStatement pstmt=null;\n\t\tSystem.out.println(\"Inside AparmentDaoImpl\");\n\t\ttry {\n\t\t\n\t\t\t//pstmt = con.prepareStatement(query);\n\t\t\tPreparedStatement pstmt = dataSource.getConnection().prepareStatement(query);\n\t\t\tpstmt.setString(1, location);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tApartmentDetailsBean apt = new ApartmentDetailsBean();\n\t\t\t\tapt.setApartmentId(rs.getInt(\"apartmentId\"));\n\t\t\t\tapt.setDepositAmt(rs.getInt(\"depositAmt\"));\n\t\t\t\tapt.setRent(rs.getInt(\"rent\"));\n\t\t\t\tapt.setAvailablityFrom(rs.getDate(\"availablityFrom\"));\n\t\t\t\tapt.setUtilities(rs.getString(\"utilities\"));\n\t\t\t\tapt.setArea(rs.getString(\"area\"));\n\t\t\t\tapt.setStreet(rs.getString(\"street\"));\n\t\t\t\tapt.setDoorNo(rs.getString(\"doorNo\"));\n\t\t\t\tapt.setCity(rs.getString(\"city\"));\n\t\t\t\tapt.setno_of_rooms(rs.getInt(\"no_of_rooms\"));\n\t\t\t\tapt.setno_of_bathroom(rs.getInt(\"no_of_bathroom\"));\n\t\t\t\tapt.setFlooring(rs.getString(\"flooring\"));\n\t\t\t\tapt.setType_bathroom(rs.getString(\"type_bathroom\"));\n\t\t\t\tapartment.add(apt);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\n\t\treturn apartment;\n\t}", "public Location getBedSpawnLocation ( ) {\n\t\treturn extract ( handle -> handle.getBedSpawnLocation ( ) );\n\t}", "private void populateBranches() {\n\t\tStationsDTO[] station = null;\n\t\ttry {\n\t\t\tstation = handler.getAllBranches();\n\t\t\tif (null != station) {\n\t\t\t\tint len = station.length;\n\t\t\t\tfor (int i = 0; i < len; i++) {\n\t\t\t\t\tcoBranch.add(station[i].getName() + \" - \"\n\t\t\t\t\t\t\t+ station[i].getId());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t}\n\t}", "private static void addBoatToList(Boat b) {\n\t\tboats.add(b);\n\t}", "private void parseBed() {\n\t\tBed[] bed = Bed.parseFile(bedFile, 0, 0);\n\t\tHashMap<String, ArrayList<Bed>> geneBed = new HashMap<String, ArrayList<Bed>>();\n\t\tfor (Bed b: bed){\n\t\t\tif (b.getName() == null || b.getName().equals(\".\")) Misc.printErrAndExit(\"ERROR; this bed line doesn't contain a gene name \"+b.toString());\n\t\t\tString[] splitName = Misc.COMMA.split(b.getName());\n\t\t\tfor (String sn: splitName) {\n\t\t\t\t//appropriate anno type\n\t\t\t\tif (requiredAnnoType !=null && sn.contains(requiredAnnoType)==false) continue;\n\t\t\t\tint lastUnderscore = sn.lastIndexOf('_');\n\t\t\t\tString geneName = sn.substring(0, lastUnderscore);\n\t\t\t\tArrayList<Bed> beds = geneBed.get(geneName);\n\t\t\t\tif (beds == null) {\n\t\t\t\t\tbeds = new ArrayList<Bed>();\n\t\t\t\t\tgeneBed.put(geneName, beds);\n\t\t\t\t}\n\t\t\t\tbeds.add(b);\n\t\t\t}\n\t\t}\n\t\tIO.pl(\"\\t\"+geneBed.size()+ \"\\tNumber of Genes \");\n\n\t\t//build genes for those with two or more exons\n\t\tArrayList<UCSCGeneLine> genesAL = new ArrayList<UCSCGeneLine>();\n\t\tfor (String name: geneBed.keySet()) {\n\t\t\tArrayList<Bed> beds = geneBed.get(name);\n\t\t\tif (beds.size() < minNumExons) continue;\n\t\t\tBed[] toSort = new Bed[beds.size()];\n\t\t\tbeds.toArray(toSort);\n\t\t\tArrays.sort(toSort);\n\t\t\tUCSCGeneLine ugl = new UCSCGeneLine(toSort, name);\n\t\t\tgenesAL.add(ugl);\n\t\t}\n\t\tUCSCGeneModelTableReader reader = new UCSCGeneModelTableReader();\n\t\tUCSCGeneLine[] genes = new UCSCGeneLine[genesAL.size()];\n\t\tgenesAL.toArray(genes);\n\t\treader.setGeneLines(genes);\n\n\t\tIO.pl(\"\\t\"+ genes.length + \"\\tPassing criteria\");\n\n\t\tif (genes == null || genes.length == 0) Misc.printExit(\"\\nProblem loading your USCS gene model table or bed file? No genes/ regions?\\n\");\n\t\t//check ordering\n\t\tif (reader.checkStartStopOrder() == false) Misc.printExit(\"\\nOne of your regions's coordinates are reversed. Check that each start is less than the stop.\\n\");\n\t\t//check gene name is unique\n\t\tif (reader.uniqueGeneNames() == false) Misc.printExit(\"\\nDuplicate gene names were found in your gene / bed file, these must be unique.\\n\");\n\t\t//check that genes are stranded\n\t\tif (reader.checkStrand() == false) Misc.printExit(\"\\nError: your bed file doesn't appear to be stranded?\\n\");\n\t\tchromGenes = reader.getChromSpecificGeneLines();\n\n\t}", "public Room(String description) \n {\n this.description = description;\n items = new ArrayList<>();\n exits = new HashMap<>();\n }", "public Bathroom(int size) {\n this.size = size;\n myBathtub = new Bathtub(100); //instantiate bathtub object during Bathroom object creation\n }", "private List<BedData> readBedDataBlock(RPTreeLeafNodeItem leafHitItem) {\n\n // get the chromosome names associated with the hit region ID's\n int startChromID = leafHitItem.getChromosomeBounds().getStartChromID();\n int endChromID = leafHitItem.getChromosomeBounds().getEndChromID();\n chromosomeMap = chromIDTree.getChromosomeIDMap(startChromID, endChromID);\n\n boolean isLowToHigh = chromDataTree.isIsLowToHigh();\n int uncompressBufSize = chromDataTree.getUncompressBuffSize();\n\n // decompress leaf item data block for feature extraction\n BigBedDataBlock bedDataBlock = new BigBedDataBlock(fis, header, leafHitItem, chromosomeMap, isLowToHigh, uncompressBufSize);\n\n // get data block Bed feature list and set next index to first item\n return bedDataBlock.getBedData(selectionRegion, contained);\n\n }", "public ArrayList<Cell> findPlacesToGiveBirth() {\r\n\r\n // Randomly choose the number of babies.\r\n int numOfBabyToBeBorn = new Random().nextInt(this.numOfBaby()) + 1;\r\n\r\n ArrayList<Cell> newEmpty = this.getNeighbours(1);\r\n Collections.shuffle(newEmpty);\r\n\r\n ArrayList<Cell> placeToBeBorn = new ArrayList<Cell>();\r\n\r\n int countEmptyCell = 0;\r\n\r\n for (int findEmpt = 0; findEmpt < newEmpty.size()\r\n && countEmptyCell < numOfBabyToBeBorn; findEmpt++, countEmptyCell++) {\r\n if (newEmpty.get(findEmpt).getInhabit() == null \r\n && isTerrainAccessiable(newEmpty.get(findEmpt))) {\r\n placeToBeBorn.add(newEmpty.get(findEmpt));\r\n }\r\n }\r\n return placeToBeBorn;\r\n }", "BookList insert(int location, Node book){\n int count = 0;\n BookList l = this;\n BookList target = new BookList(null);\n if(count == location){\n this.append(book);\n }\n else{\n while(count<location){\n target.append(l.book);\n l = l.next;\n if(count+1==location){\n target.append(book);\n }\n count++;\n }\n while(l.next != null){\n target.append(l.book);\n l=l.next;\n }\n this.book = target.book;\n this.next = target; \n }\n \n return target;\n }", "public void setBedSpawnLocation ( Location location ) {\n\t\texecute ( handle -> handle.setBedSpawnLocation ( location ) );\n\t}", "public Behandeling(int behandelingsID, int bsn, String behandelingscode, int fysiotherapeutBSN, Date begintijd, Date eindtijd, Status status, String opmerking) {\n this.behandelingsID = behandelingsID;\n this.bsn = bsn;\n this.behandelingscode = behandelingscode;\n this.fysiotherapeutBSN = fysiotherapeutBSN;\n this.begintijd = begintijd;\n this.eindtijd = eindtijd;\n this.status = status;\n this.opmerking = opmerking;\n }", "Seed(){\r\n seedCells = new ArrayList<>();\r\n edgeCells = new ArrayList<>();\r\n }", "public void initArrayList()\n {\n\tSQLiteDatabase db = getWritableDatabase();\n\tCursor cursor = db.rawQuery(\"SELECT * FROM \" + TABLE_NAME, null);\n\n\tif (cursor.moveToFirst())\n\t{\n\t do\n\t {\n\t\tJacocDBLocation newLocation = new JacocDBLocation();\n\t\tnewLocation.setLocationName(cursor.getString(1));\n\t\tnewLocation.setRealLocation(new LocationBorder(new LatLng(cursor.getDouble(2), cursor.getDouble(3)), new LatLng(cursor.getDouble(4), cursor.getDouble(5))));\n\t\tnewLocation.setMapLocation(new LocationBorder(new LatLng(cursor.getInt(6), cursor.getInt(7)), new LatLng(cursor.getInt(8), cursor.getInt(9))));\n\t\tnewLocation.setHighSpectrumRange(cursor.getDouble(10));\n\t\tnewLocation.setLowSpectrumRange(cursor.getDouble(11));\n\n\t\t// adding the new Location to the collection\n\t\tlocationList.add(newLocation);\n\t }\n\t while (cursor.moveToNext()); // move to the next row in the DB\n\n\t}\n\tcursor.close();\n\tdb.close();\n }", "@Override\r\n\tpublic Town getDroghedaLocation() {\n\t\treturn new Town(\"36 Saint Laurence Street\");\r\n\t}", "private void createRooms()\n {\n Room outside, garden, kitchen, frontyard, garage, livingroom,\n upperhallway, downhallway, bedroom1, bedroom2, toilet,teleporter;\n\n // create the rooms\n outside = new Room(\"outside the house\",\"Outside\");\n garden = new Room(\"in the Garden\", \"Garden\");\n kitchen = new Room(\"in the Kitchen\",\"Kitchen\");\n frontyard = new Room(\"in the Frontyard of the house\", \"Frontyard\");\n garage = new Room(\"in the Garage\", \"Garage\");\n livingroom = new Room(\"in the Living room\", \"Living Room\");\n upperhallway = new Room(\"in the Upstairs Hallway\",\"Upstairs Hallway\");\n downhallway = new Room(\"in the Downstairs Hallway\", \"Downstairs Hallway\");\n bedroom1 = new Room(\"in one of the Bedrooms\", \"Bedroom\");\n bedroom2 = new Room(\"in the other Bedroom\", \"Bedroom\");\n toilet = new Room(\"in the Toilet upstairs\",\"Toilet\");\n teleporter = new Room(\"in the Warp Pipe\", \"Warp Pipe\");\n\n // initialise room exits\n outside.setExit(\"north\", garden);\n outside.setExit(\"east\", frontyard);\n\n garden.setExit(\"south\", outside);\n garden.setExit(\"east\", kitchen);\n\n kitchen.setExit(\"west\", garden);\n kitchen.setExit(\"north\", livingroom);\n kitchen.setExit(\"south\", downhallway);\n\n frontyard.setExit(\"west\", outside);\n frontyard.setExit(\"north\", downhallway);\n frontyard.setExit(\"east\", garage);\n\n garage.setExit(\"west\", frontyard);\n garage.setExit(\"north\", downhallway);\n\n livingroom.setExit(\"west\", kitchen);\n\n downhallway.setExit(\"north\",kitchen);\n downhallway.setExit(\"west\",frontyard);\n downhallway.setExit(\"south\",garage);\n downhallway.setExit(\"east\",upperhallway);\n\n upperhallway.setExit(\"north\", bedroom2);\n upperhallway.setExit(\"east\", bedroom1);\n upperhallway.setExit(\"south\", toilet);\n upperhallway.setExit(\"west\", downhallway);\n\n toilet.setExit(\"north\", upperhallway);\n\n bedroom1.setExit(\"west\",upperhallway);\n\n bedroom2.setExit(\"south\", upperhallway);\n\n rooms.add(outside);\n rooms.add(garden);\n rooms.add(kitchen);\n rooms.add(frontyard);\n rooms.add(garage);\n rooms.add(livingroom);\n rooms.add(upperhallway);\n rooms.add(downhallway);\n rooms.add(bedroom1);\n rooms.add(bedroom2);\n rooms.add(toilet);\n }", "public BallSpawner(Board board, String name, GridLocation location) {\n super(board, name, location, Constants.BALLSPAWNER_REFLECTION_COEFF);\n collidables.add(new FixedCircle(location.toVect().plus(new Vect(0.5,0.5)), 0.5, reflectionCoeff));\n representation = Collections.unmodifiableList(Arrays.asList(\"@\"));\n assert(checkRep());\n }", "public DobbeltLenketListe() {\n this.hode= null;\n this.hale= null;\n antall=0; }", "public MyNode(Station station){\r\n this.station=station;\r\n this.neighbors=new LinkedList<MyNode>();\r\n }", "public BowlingGame(List<BowlingPlayer> bowlingPlayers){\n _bowlingPlayers = bowlingPlayers;\n }", "public void givePlaceInList() {\r\n\t\tmyPlaceInList = allyTracker.getPlaceInList();\r\n\t}", "public ArrayList<Booking> createList(String dname) {\n\tStudentDAO studentDAO=new StudentDAO();\n\treturn studentDAO.createList(dname);\n\t\n}", "public void setSeed(ArrayList<Cell> newSeed) {\n\t\n\t\t for (int y=0;y<MAX_Y;y++) {\n\t\t\tfor (int x=0;x<MAX_X;x++) {\n\t\t\t\tseed[x][y] = new Cell(x,y,false);\t\t \n\t\t\t}//end for x\n\t\t }//end for y\n\t\t \n\t\t for (int k=0; k<newSeed.size();k++) {\n\t\t\t int x1 = Math.abs(newSeed.get(k).getX()) % MAX_X;\n\t\t\t int y1 = Math.abs(newSeed.get(k).getY()) % MAX_Y;\n\t\t\t \n\t\t\t seed[x1][y1] = newSeed.get(k);\n\t\t }//end for k\n\t\t repaint(); //repaint's the grid with new generation\n\t\t updateUI();\n\t }", "public void fillPassengersOnPlane(){//private, ändrar till public för grafiska\r\n //int i = 0;\r\n //for (Passenger p : passengers) {//fel med foreach tror jag\r\n for(int i = 0; i < 10; i++){\r\n if (passengers.size() >= 10) {\r\n passengers.get(i).setFirstName(\"Passenger\");//p\r\n passengers.get(i).setLastName(\"Unnamed\" + i);\r\n passengers.get(i).setAge(35 + i);\r\n passengers.get(i).setDestination(getDestination());\r\n passengers.get(i).setSeatNr(i + 1);\r\n if (i < 5) {\r\n passengers.get(i).setTicketPrice(21500);\r\n } else {\r\n passengers.get(i).setTicketPrice(5300);\r\n }\r\n if (seats.size() >= 10) {\r\n seats.get(i).setBooked(true);\r\n seats.get(i).setSeatNumber(i + 1);\r\n seats.get(i).setPassenger(passengers.get(i)); \r\n } else {\r\n seats.add(i, new Seat(i + 1, passengers.get(i)));\r\n }\r\n }\r\n else {\r\n Passenger nyP = new Passenger();\r\n nyP.setFirstName(\"Passenger\");//p\r\n nyP.setLastName(\"Unnamed\" + i);\r\n nyP.setAge(35 + i);\r\n nyP.setDestination(getDestination());\r\n nyP.setSeatNr(i + 1);\r\n if (i < 5) {\r\n nyP.setTicketPrice(21500);\r\n } else {\r\n nyP.setTicketPrice(5300);\r\n }\r\n passengers.add(nyP);\r\n \r\n if (seats.size() >= 10) {\r\n seats.get(i).setBooked(true);\r\n seats.get(i).setSeatNumber(i + 1);\r\n seats.get(i).setPassenger(nyP); \r\n } else {\r\n seats.add(i, new Seat(i + 1, nyP));\r\n }\r\n } \r\n }\r\n }", "ListOfBooks(){\n \tlist = new LinkedList<Book>();\n }", "public void addHotel(int hotelId, List<Hotel_Room_Detail> hotelRoomDetailList){\n\n }", "public void createLocations() {\n createAirports();\n createDocks();\n createEdges();\n createCrossroads();\n }", "public void drawBed(double x, double y, double length, double height){\n double bedPostLength = length/15;\n double mattressLength = length - bedPostLength*2;\n double mattressHeight = height/10 * 6;\n //for measurement\n double bedunit = height/10;\n \n //make both bed posts\n Rectangle2D.Double fstpost = new Rectangle2D.Double(x, y, bedPostLength, height);\n Rectangle2D.Double sndpost = new Rectangle2D.Double(x+length-bedPostLength, y, bedPostLength, height);\n \n //make slat\n Rectangle2D.Double slat = new Rectangle2D.Double(x+bedPostLength, y+(bedunit*8), mattressLength, bedunit);\n \n //make mattress\n Rectangle2D.Double mattress = new Rectangle2D.Double(x+bedPostLength, y+(bedunit*2), mattressLength, (bedunit*7));\n \n //put bed together\n \n GeneralPath wholeBed = this.get();\n \n wholeBed.append(fstpost, false);\n wholeBed.append(sndpost, false);\n wholeBed.append(slat, false);\n wholeBed.append(mattress, false);\n }", "public Hotel() throws FileNotFoundException\n {\n data_set = new ArrayList<Room>();\n get_rooms();\n }", "private void initTestBuildingWithRoomsAndWorkplaces() {\n\t\tinfoBuilding = dataHelper.createPersistedBuilding(\"50.20\", \"Informatik\", new ArrayList<Property>());\n\t\troom1 = dataHelper.createPersistedRoom(\"Seminarraum\", \"-101\", -1, Arrays.asList(new Property(\"WLAN\")));\n\n\t\tworkplace1 = dataHelper.createPersistedWorkplace(\"WP1\",\n\t\t\t\tArrays.asList(new Property(\"LAN\"), new Property(\"Lampe\")));\n\t\tworkplace2 = dataHelper.createPersistedWorkplace(\"WP2\", Arrays.asList(new Property(\"LAN\")));\n\n\t\troom1.addContainedFacility(workplace1);\n\t\troom1.addContainedFacility(workplace2);\n\n\t\tinfoBuilding.addContainedFacility(room1);\n\t}", "private void createInstances()\n {\n Room EnchantedForest, IdyllicGlade, GumdropHill, DenseWoods, VolcanoHell, SecretHotSpring, MagmaChamber, MysteriousCloud, SkyParadise, Cirrostratus, Nimbostratus, Stratocumulus, WaterTemple, Whirlpool, EyeoftheStorm, BossQuarters, Portal;\n \n random = new Random();\n allrooms = new ArrayList<Room>();\n \n // create the rooms providing an ID to be passed into the room constructor\n EnchantedForest = new EnchantedForestRoom();\n allrooms.add(EnchantedForest);\n IdyllicGlade = new IdyllicGladeRoom();\n allrooms.add(IdyllicGlade);\n GumdropHill = new GumdropHillRoom();\n allrooms.add(GumdropHill);\n DenseWoods = new DenseWoodsRoom();\n allrooms.add(DenseWoods);\n VolcanoHell = new VolcanoHellRoom();\n allrooms.add(VolcanoHell);\n SecretHotSpring = new SecretHotSpringRoom();\n allrooms.add(SecretHotSpring);\n MagmaChamber = new MagmaChamberRoom();\n allrooms.add(MagmaChamber);\n MysteriousCloud = new MysteriousCloudRoom();\n allrooms.add(MysteriousCloud);\n SkyParadise = new SkyParadiseRoom();\n allrooms.add(SkyParadise);\n Cirrostratus = new CirrostratusRoom();\n allrooms.add(Cirrostratus);\n Nimbostratus = new NimbostratusRoom();\n allrooms.add(Nimbostratus);\n Stratocumulus = new StratocumulusRoom();\n allrooms.add(Stratocumulus);\n WaterTemple = new WaterTempleRoom();\n allrooms.add(WaterTemple);\n Whirlpool = new WhirlpoolRoom();\n allrooms.add(Whirlpool);\n EyeoftheStorm = new EyeoftheStormRoom();\n allrooms.add(EyeoftheStorm);\n BossQuarters = new BossQuartersRoom(); \n allrooms.add(BossQuarters);\n Portal = new PortalRoom();\n \n \n // initialise room exits, items and creatures\n EnchantedForest.setExit(\"east\", IdyllicGlade);\n EnchantedForest.setExit(\"west\", GumdropHill);\n EnchantedForest.setExit(\"south\", DenseWoods);\n \n IdyllicGlade.setExit(\"west\", EnchantedForest);\n \n GumdropHill.setExit(\"down\", EnchantedForest);\n GumdropHill.setExit(\"up\", MysteriousCloud);\n\n DenseWoods.setExit(\"north\", EnchantedForest);\n DenseWoods.setExit(\"south\", VolcanoHell);\n \n MagmaChamber.setExit(\"north\",VolcanoHell);\n \n VolcanoHell.setExit(\"east\", SecretHotSpring);\n VolcanoHell.setExit(\"north\", DenseWoods);\n VolcanoHell.setExit(\"west\", MysteriousCloud);\n VolcanoHell.setExit(\"south\", MagmaChamber);\n \n SecretHotSpring.setExit(\"west\", VolcanoHell);\n \n MysteriousCloud.setExit(\"west\", VolcanoHell);\n MysteriousCloud.setExit(\"in\", Portal);\n MysteriousCloud.setExit(\"up\", SkyParadise);\n \n SkyParadise.setExit(\"down\", MysteriousCloud);\n SkyParadise.setExit(\"up\", Cirrostratus);\n SkyParadise.setExit(\"east\", Nimbostratus);\n \n Cirrostratus.setExit(\"north\", SkyParadise);\n Cirrostratus.setExit(\"down\", WaterTemple);\n \n Nimbostratus.setExit(\"west\", SkyParadise);\n Nimbostratus.setExit(\"east\", Stratocumulus);\n \n Stratocumulus.setExit(\"west\", Nimbostratus);\n Stratocumulus.setExit(\"down\", WaterTemple);\n \n WaterTemple.setExit(\"up\",Stratocumulus);\n WaterTemple.setExit(\"high\", Cirrostratus);\n WaterTemple.setExit(\"down\", Whirlpool);\n WaterTemple.setExit(\"in\", BossQuarters);\n \n Whirlpool.setExit(\"up\", WaterTemple);\n Whirlpool.setExit(\"down\", EyeoftheStorm);\n \n EyeoftheStorm.setExit(\"up\", Whirlpool);\n EyeoftheStorm.setExit(\"in\", BossQuarters);\n \n BossQuarters.setExit(\"out\", WaterTemple);\n \n currentRoom = EnchantedForest; \n }", "public LivingBeingsPanel() {\n setLayout(new BorderLayout());\n setBorder(new CompoundBorder(new EmptyBorder(0, 5, 0, 5),\n new TitledBorder(\" Living beings \")));\n setPreferredSize(new Dimension(250, 0));\n\n listLivingBeings = new JList();\n listLivingBeings.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\n DefaultListCellRenderer renderer = new LivingBeingsListRenderer();\n listLivingBeings.setCellRenderer(renderer);\n\n scroll = new JScrollPane(listLivingBeings);\n scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n scroll.setBorder(\n new CompoundBorder(new EmptyBorder(3, 3, 3, 3), new LineBorder(Color.BLACK, 1)));\n\n btnShow = new JButton(SHOW);\n btnShow.setActionCommand(SHOW);\n btnShow.addActionListener(this);\n\n add(scroll, BorderLayout.CENTER);\n add(btnShow, BorderLayout.SOUTH);\n }", "public void createRooms()\n { \n // create the rooms\n //RDC//\n hall = new Room(\"Hall\", \"..\\\\pictures\\\\Rooms\\\\hall.png\");\n banquetinghall = new Room (\"Banqueting hall\", \"..\\\\pictures\\\\Rooms\\\\banquet.png\");\n poolroom = new Room (\"PoolRoom\", \"..\\\\pictures\\\\Rooms\\\\billard.png\");\n dancingroom = new Room (\"Dancing Room\", \"..\\\\pictures\\\\Rooms\\\\bal.png\");\n kitchen = new Room(\"Kitchen\", null);\n garden = new Room(\"Garden\", null);\n well = new Room(\"Well\", null);\n gardenerhut = new Room(\"Gardener hut\", null);\n //Fin RDN //\n \n //-1//\n anteroom = new Room(\"Anteroom\", null);\n ritualroom = new Room(\"Ritual Room\", null);\n cellar = new Room(\"Cellar\", null);\n // FIN -1//\n // +1 //\n livingroom = new Room(\"Living Room\", null); \n library = new Room (\"Library\", null);\n laboratory = new Room(\"Laboratory\", null);\n corridor= new Room(\"Corridor\", null);\n bathroom = new Room(\"Bathroom\", null);\n bedroom = new Room(\"Bedroom\", null);\n guestbedroom = new Room(\"Guest Bedroom\", null); \n //FIN +1 //\n //+2//\n attic = new Room(\"Attic\", null);\n //Fin +2//\n //Fin create room // \n \n // initialise room exits\n //RDC\n hall.setExits(\"north\",garden, false, \"> You must explore the mansion before\");\n hall.setExits(\"south\",banquetinghall, true, null); \n banquetinghall.setExits(\"north\",hall, true, null);\n banquetinghall.setExits(\"south\",dancingroom, false, \"> The door is blocked by Bob's toys\");\n banquetinghall.setExits(\"east\",kitchen, true, null);\n banquetinghall.setExits(\"west\",poolroom, true, null);\n //poolroom.setExits(\"east\",banquetinghall, false, \"> You have not finished examining the crime scene\");\n poolroom.setExits(\"east\",banquetinghall, true, \"> You have not finished examining the crime scene\");\n dancingroom.setExits(\"north\",banquetinghall, true, null);\n dancingroom.setExits(\"up\",livingroom, true, null);\n kitchen.setExits(\"west\",banquetinghall, true, null);\n kitchen.setExits(\"down\",cellar, true, null);\n garden.setExits(\"south\",hall, true, null);\n garden.setExits(\"north\",well, true, null);\n garden.setExits(\"east\",gardenerhut, true, null);\n well.setExits(\"south\",garden, true, null);\n gardenerhut.setExits(\"west\",garden, true, null);\n //gardenerhut.setExits(\"down\",anteroom, false, null);\n //-1// \n anteroom.setExits(\"south\",ritualroom, true, null);\n anteroom.setExits(\"up\",gardenerhut, false, \"> The door is locked. You cannot go backward\");\n anteroom.setExits(\"west\",cellar, true, null);\n ritualroom.setExits(\"north\",anteroom, true, null);\n cellar.setExits(\"up\",kitchen, true, null);\n //cellar.setExits(\"east\", anteroom, false); To unlock\n //+1//\n livingroom.setExits(\"down\",dancingroom, true, null);\n livingroom.setExits(\"north\",library, true, null);\n livingroom.setExits(\"west\",corridor, true, null);\n library.setExits(\"south\",livingroom, true, null);\n //library.setExits(\"north\",laboratory, false); To unlock\n laboratory.setExits(\"south\",library, true, null);\n corridor.setExits(\"north\",bathroom, true, null);\n corridor.setExits(\"south\",bedroom, false, \"> The door is locked. A key may be mandatory\");\n corridor.setExits(\"east\",livingroom, true, null);\n corridor.setExits(\"west\",guestbedroom, true, null);\n corridor.setExits(\"up\",attic, false, \"> You see a weird lock in the ceiling\");\n bathroom.setExits(\"south\",corridor, true, null);\n bedroom.setExits(\"north\",corridor, true, null);\n guestbedroom.setExits(\"east\",corridor, true, null);\n attic.setExits(\"down\",corridor, true, null);\n \n //currentRoom = poolroom; // start game outside\n currentRoom = poolroom;\n }", "public void setBedType(BedType bedType) {\n\t\tthis.bedType = bedType;\n\t}", "public void createLinkedStructure() {\n\t\t\n\t\tfor (ArrayList<String> s : stations.values())\n\t\t//Check every ArrayList of stations in the stations hashmap\n\t\t{\n\t\t\tArrayList<String> stationsInLine = s;\n\t\t\t// get the arraylist of stations value and put it into a new arraylist stationsInLine\n\t\t\tint i = 0;\n\t\t\twhile(i < stationsInLine.size())\n\t\t\t//loop through the list of stations 1 by 1\n\t\t\t{\n\t\t\t\tString currentStation = stationsInLine.get(i);\n\t\t\t\t//get current station at position i in the arraylist and assign it to String variable currentStation\n\n\t\t\t\tArrayList<String> links;\n\t\t\t\t//create empty arraylist links for storing relevant stations\n\n\t\t\t\tif (linkedStations.containsKey(currentStation))\n\t\t\t\t//if the linkedStations hashmap has the current station as the key\n\t\t\t\t{\n\t\t\t\t\tlinks = linkedStations.get(currentStation);\n\t\t\t\t\t//assign the current station to the links array list\n\t\t\t\t} else \n\t\t\t\t{\n\t\t\t\t\tlinks = new ArrayList<>();\n\t\t\t\t\t//if it is the very first link then create an new arraylist\n\t\t\t\t}\n\t\t\t\tif (i + 1 < stationsInLine.size()) {\n\t\t\t\t\tlinks.add(stationsInLine.get(i + 1));\n\t\t\t\t\t//if it is not the last station, add the next station to the current one\n\t\t\t\t}\n\t\t\t\tif (i > 0) {\n\t\t\t\t\tlinks.add(stationsInLine.get(i - 1));\n\t\t\t\t\t//if it is not the first item add the station previous to the one you are at - this will form a line of stations\n\t\t\t\t}\n\t\t\t\t//populate the HashMap with station as key and the relevant links arraylist created\n\t\t\t\tlinkedStations.put(currentStation, links);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t}", "public House(int HID)\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t \n\t String query = \"SELECT * FROM Housing WHERE h_id = '\"+HID+\"'\"; \n\t ResultSet rs = con.stmt.executeQuery(query); \n\t \n\t while(rs.next())\n\t {\n\t \thid = rs.getInt(\"h_id\"); \n\t \tname = rs.getString(\"name\"); \n\t \taddress = rs.getString(\"address\"); \n\t \tphoneNumber = rs.getString(\"phone_number\"); \n\t \tyearBuilt = rs.getInt(\"year_built\"); \n\t \tprice = rs.getInt(\"price\");\n\t \tuid = rs.getInt(\"housing_uid\"); \n\t \tmaxResidents = rs.getInt(\"max_residents\"); \n\t \tcatagory = rs.getString(\"catagory\"); \n\t \t\n\t \tGetKeywords(); \n\t \tGetAvailableDates();\n\t }\n\t \n\t con.closeConnection();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\n\t}", "private void setDeadlinesList()\n\t{\n\t\t// get the deadlines\n\t\tdatabase = new DatabaseController(this);\n\t\tdeadlines = database.getGroupDeadlines(groupName);\n\t\tsortDeadlines();\n\n\t\t// manage the expandable list\n\t\tlistView = (ExpandableListView) findViewById(R.id.expandableListMyGroupDeadlinesList);\n\t\tlistAdapter = new DeadlineListAdapter(this, listView, this);\n\t\tlistView.setAdapter(listAdapter);\n\n\t\t// register for context menu\n\t\tregisterForContextMenu(listView);\n\t}", "public Neighborhood()\n\t{\n\t\tlistOfNeighborhoods = new ArrayList<ArrayList<Pokemon>>(numberOfNeighborhoods);\n\t\tfor (int i=0; i<numberOfNeighborhoods; i++)\n\t\t{\n\t\t\tlistOfNeighborhoods.add(i, new ArrayList<Pokemon>());\n\t\t}\n\t}", "private Room createCastle(){\n Room hallway = new Room(\"the hallway\");\n\n Room theStairs = new Room(\"the staircase\");\n Medic medic = new Medic(20, 3);\n theStairs.medic = medic;\n\n Room livingRoom = new Room(\"the living room\");\n Monster monster = new Monster(\"Grimeteeth\", 10, 100);\n livingRoom.monster = monster;\n\n Room firstFloor = new Room(\"first floor\");\n Room secondFloor = new Room(\"second floor\");\n Room thirdFloor = new Room(\"third floor\");\n monster = new Monster(\"Voodoobug\", 30, 100);\n thirdFloor.monster = monster;\n\n Room balcony = new Room(\"balcony\");\n balcony.endOfGameText = \"You fall out of the balcony, and die\";\n Room chamber = new Room(\"Chamber\");\n monster = new Monster (\"Smogstrike\", 50, 100);\n chamber.monster = monster;\n chamber.hasTreasure = true;\n chamber.endOfGameText = \"YEEES! You won the game, and found the treasure!\";\n\n Room bedchamber = new Room(\"bedchamber\");\n bedchamber.endOfGameText = \"You fall in a deep sleep, and will never wake up!\";\n\n\n /**\n * Options connecting to the rooms hallway,theStairs,sale,livingRoom variable\n */\n Connections[] hallwayConnections = new Connections[2];\n hallwayConnections[0] = new Connections(\"go left\",\"l\", theStairs);\n hallwayConnections[1] = new Connections(\"go right\",\"r\", livingRoom);\n hallway.connections = hallwayConnections;\n\n Connections[] stairsConnections = new Connections[3];\n stairsConnections[0] = new Connections(\"first floor\",\"1\", firstFloor);\n stairsConnections[1] = new Connections(\"second floor\",\"2\", secondFloor);\n stairsConnections[2] = new Connections(\"third floor\",\"3\", thirdFloor);\n theStairs.connections = stairsConnections;\n\n Connections[] firstFloorConnections = new Connections[3];\n firstFloorConnections[0] = new Connections(\"blue door\",\"b\",hallway);\n firstFloorConnections[1] = new Connections(\"red door\",\"r\",balcony);\n firstFloorConnections[2] = new Connections(\"yellow door\",\"y\",chamber);\n firstFloor.connections = firstFloorConnections;\n\n Connections[] secondFloorConnections = new Connections[1];\n secondFloorConnections[0] = new Connections(\"small door\",\"s\",chamber);\n secondFloor.connections = secondFloorConnections;\n\n Connections[] thridConnections = new Connections[2];\n thridConnections[0] = new Connections(\"big door\",\"bd\",balcony);\n thridConnections[1] = new Connections(\"elevator\",\"e\",firstFloor);\n thirdFloor.connections = thridConnections;\n\n Connections[] livingRoomConnections = new Connections[2];\n livingRoomConnections[0] = new Connections(\"iron door\",\"i\",hallway);\n livingRoomConnections[1] = new Connections(\"tree door\",\"t\",bedchamber);\n livingRoom.connections = livingRoomConnections;\n\n return hallway;\n }", "@Override\n public void init(Entity entity) {\n entity.add(AI_DATA, new BuildingSpawnerStratAIData());\n }", "public Population()\n{\n year = 0;\n fate = new Random();\n eligibleDuas = new ArrayList<Caldean>();\n eligibleDuises = new ArrayList<Caldean>();\n theHouses = new LinkedList<House>();\n}", "public void setBasicNewGameWorld()\r\n\t{\r\n\t\tlistCharacter = new ArrayList<Character>();\r\n\t\tlistRelationship = new ArrayList<Relationship>();\r\n\t\tlistLocation = new ArrayList<Location>();\r\n\t\t\r\n\t\t//Location;\r\n\t\t\r\n\t\tLocation newLocationCity = new Location();\r\n\t\tnewLocationCity.setToGenericCity();\r\n\t\tLocation newLocationDungeon = new Location();\r\n\t\tnewLocationDungeon.setToGenericDungeon();\r\n\t\tLocation newLocationForest = new Location();\r\n\t\tnewLocationForest.setToGenericForest();\r\n\t\tLocation newLocationJail = new Location();\r\n\t\tnewLocationJail.setToGenericJail();\r\n\t\tLocation newLocationPalace = new Location();\r\n\t\tnewLocationPalace.setToGenericPalace();\r\n\t\t\r\n\t\tlistLocation.add(newLocationCity);\r\n\t\tlistLocation.add(newLocationDungeon);\r\n\t\tlistLocation.add(newLocationForest);\r\n\t\tlistLocation.add(newLocationJail);\r\n\t\tlistLocation.add(newLocationPalace);\r\n\t\t\r\n\t\t\r\n\t\t//Item\r\n\t\tItem newItem = new Item();\r\n\t\t\r\n\t\tString[] type =\t\tnew String[]\t{\"luxury\"};\r\n\t\tString[] function = new String[]\t{\"object\"};\t\r\n\t\tString[] property = new String[]\t{\"\"};\r\n\t\tnewItem.setNewItem(900101,\"diamond\", type, function, \"null\", property, 2, true);\r\n\t\tnewLocationPalace.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"weapon\"};\r\n\t\tfunction = new String[]\t{\"equipment\"};\t\r\n\t\tproperty = new String[]\t{\"weapon\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(500101,\"dagger\", type, function, \"null\", property, 1, false);\t\t\r\n\t\tnewLocationJail.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t\r\n\t\ttype =\t\tnew String[]\t{\"quest\"};\r\n\t\tfunction = new String[]\t{\"object\"};\t\r\n\t\tproperty = new String[]\t{\"\"};\r\n\t\tnewItem.setNewItem(900201,\"treasure_map\", type, function, \"null\", property, 2, true);\r\n\t\tnewLocationDungeon.addOrUpdateItem(newItem);\r\n\r\n\t\t\r\n\t\t////// Add very generic item (10+ items of same name)\r\n\t\t////// These item start ID at 100000\r\n\t\t\r\n\t\t//Add 1 berry\r\n\t\t//100000\r\n\t\tnewItem = new Item();\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"berry\"};\r\n\t\tnewItem.setNewItem(100101,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t/* REMOVE 19-2-2019 to increase performance\r\n\t\t\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100102,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100102,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100103,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t*/\r\n\r\n\t\t\r\n\t\t//Add 2 poison_plant\r\n\t\t//101000\r\n\t\tnewItem = new Item();\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"poison\"};\r\n\t\tnewItem.setNewItem(100201,\"poison_plant\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100202,\"poison_plant\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\r\n\t\t//player\r\n\t\tCharacter newChar = new Character(\"player\", 1, true,\"city\", 0, false);\r\n\t\tnewChar.setIsPlayer(true);\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t//UNIQUE NPC\r\n\t\tnewChar = new Character(\"mob_NPC_1\", 15, true,\"city\", 0, false);\r\n\t\tlistCharacter.add(newChar);\r\n\r\n\t\t\r\n\t\tnewChar = new Character(\"king\", 20, true,\"palace\", 3, true);\r\n\t\tnewChar.addOccupation(\"king\");\r\n\t\tnewChar.addOccupation(\"noble\");\r\n\t\tnewChar.addStatus(\"rich\");\r\n\t\t\r\n\t\tlistCharacter.add(newChar);\r\n\r\n\r\n\t\t//Mob character\r\n\t\tnewChar = new Character(\"soldier1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t// REMOVE to improve performance\r\n\t\t/*\r\n\t\tnewChar = new Character(\"soldier2\", 20, true,\"jail\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"soldier3\", 20, true,\"palace\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t//listLocation.add(newLocationCity);\r\n\t\t//listLocation.add(newLocationDungeon);\r\n\t\t//listLocation.add(newLocationForest);\r\n\t\t//listLocation.add(newLocationJail);\r\n\t\t//listLocation.add(newLocationPalace);\r\n\t\t\r\n\t\tnewChar = new Character(\"doctor1\", 20, true,\"city\", 3, true);\r\n\t\tnewChar.addSkill(\"heal\");\r\n\t\tnewChar.addOccupation(\"doctor\");\r\n\t\tlistCharacter.add(newChar);\t\r\n\t\tnewChar = new Character(\"blacksmith1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"blacksmith\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"thief1\", 20, true,\"jail\", 2, true);\r\n\t\tnewChar.addOccupation(\"thief\");\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"unlock\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(300101,\"lockpick\", type, function, \"thief1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t// Remove to improve performance\r\n\t\t/*\r\n\t\tnewChar = new Character(\"messenger1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"messenger\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t*/\r\n\t\t\r\n\t\tnewChar = new Character(\"miner1\", 20, true,\"dungeon\", 1, true);\r\n\t\tnewChar.addOccupation(\"miner\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\tnewChar = new Character(\"lumberjack1\", 20, true,\"forest\", 1, true);\r\n\t\tnewChar.addOccupation(\"lumberjack\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t/* REMOVE 19-2-2019 to increase performance\r\n\t\t\r\n\t\tnewChar = new Character(\"scout1\", 20, true,\"forest\", 2, true);\r\n\t\tnewChar.addOccupation(\"scout\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\tnewChar = new Character(\"farmer1\", 20, true,\"forest\", 1, true);\r\n\t\tnewChar.addOccupation(\"farmer\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"merchant1\", 20, true,\"city\", 3, true);\r\n\t\tnewChar.addOccupation(\"merchant\");\r\n\t\tnewChar.addStatus(\"rich\");\r\n\t\t\r\n\t\t// Merchant Item\r\n\t\t//NPC item start at 50000\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"poison\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200101,\"potion_poison\", type, function, \"merchant1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"healing\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200201,\"potion_heal\", type, function, \"merchant1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"cure_poison\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200301,\"antidote\", type, function, \"merchant1\", property, 1, false);\t\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t\r\n\t\t//add merchant to List\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Relation\r\n\t\tRelationship newRelation = new Relationship();\r\n\t\tnewRelation.setRelationship(\"merchant1\", \"soldier1\", \"friend\");\r\n\t\tlistRelationship.add(newRelation);\r\n\t\t\r\n\t\t//\r\n\t\r\n\t}", "public void add(Evolver occupant)\n {\n Location loc = getRandomEmptyLocation();\n if (loc != null)\n add(loc, occupant);\n }", "public java.lang.String getBed() {\r\n return localBed;\r\n }", "protected bed e()\r\n/* 210: */ {\r\n/* 211:245 */ return new bed(this, new IBlockData[] { a, b });\r\n/* 212: */ }", "public House() {\n this.pointsHistory = new ArrayList<>();\n }", "public void addBooking(Booking b)\r\n {\r\n bookings.add(b);\r\n }", "public BikeStation(Location location, String name) {\n super(location, name);\n this.name = name;\n }", "public void createRooms()\n {\n Room outside,bedroom, bathroom, hallway1, hallway2, spareroom, kitchen, fridge;\n\n // create the rooms\n bedroom = new Room(\"Bedroom\", \"your bedroom. A simple room with a little bit too much lego\");\n bathroom = new Room(\"Bathroom\", \"the bathroom where you take your business calls. Also plenty of toilet paper\");\n hallway1 = new Room(\"Hallway1\", \"the hallway outside your room, there is a dog here blocking your path. Youll need to USE something to distract him\");\n hallway2 = new Room(\"Hallway2\", \"the same hallway? This part leads to the spare room and kitchen\");\n spareroom = new Room(\"Spare room\", \"the spare room. This is for guests\");\n kitchen = new Room(\"Kitchen\", \"your kitchen. There is a bowl with cereal in it waiting for you,But its still missing some things\");\n fridge = new Room (\"Walk in Fridge\", \"a walkin fridge. Have you ever seen Ratatouille? Its like that\");\n outside = new Room(\"Outside\", \"the outside world, breathe it in\");\n \n \n Item toiletPaper, milk, spoon, poison;// creates the items and sets their room\n \n toiletPaper = new Item(\"Toilet-Paper\", hallway1);\n toiletPaper.setDescription(\"Just your standard bog roll. Dont let your dog get a hold of it\");\n bathroom.setItems(\"Toilet-Paper\",toiletPaper);\n \n milk = new Item(\"Milk\", kitchen);\n milk.setDescription(\"white and creamy, just like mama used to make\");\n fridge.setItems(\"Milk\", milk);\n \n spoon = new Item(\"Spoon\", kitchen);\n spoon.setDescription(\"Like a fork but for liquids\");\n spareroom.setItems(\"Spoon\", spoon);\n \n poison = new Item(\"Poison\", outside);\n poison.setDescription(\"This will probably drain all of your energy, dont USE it\");\n outside.setItems(\"Poison\", poison);\n \n // initialise room exits\n bedroom.setExit(\"east\", bathroom);\n bedroom.setExit(\"north\", hallway1);\n \n bathroom.setExit(\"west\", bedroom);\n \n hallway1.setExit(\"south\", bedroom);\n hallway1.setExit(\"north\", hallway2);\n \n hallway2.setExit(\"south\", hallway1);\n hallway2.setExit(\"west\", spareroom);\n hallway2.setExit(\"north\", kitchen);\n \n spareroom.setExit(\"east\", hallway2);\n \n kitchen.setExit(\"east\", outside);\n kitchen.setExit(\"west\", fridge);\n \n fridge.setExit(\"east\", kitchen);\n \n \n outside.setExit(\"west\", kitchen);\n \n\n this.currentRoom = bedroom; // start game in bedroom\n \n }", "public sightings (double id,String name,String location,String date) {\n this.name=name;\n this.location=location;\n this.date=date;\n\n }", "@Test\n\tpublic void testfindHouseRoomWithBedsList(){\n\t\tSystem.out.println();\n\t}", "public WCLinkedList(){\n size=0;\n head = null;\n tail = null;\n }", "private void testDB(){\n DB=new LinkedList<>(); \n DB.add(new Offer(\"ID1\",\"AGV923\",\"Nico\",\"Leo\",\"Salvo\",\"\"));\n DB.add(new Offer(\"ID2\",\"ADJ325\",\"Tizio\", \"Caio\", \"Sempronio\",\"\"));\n DB.add(new Offer(\"ID3\",\"T56G2G\",\"Antonella\", \"Daniele\",\"\",\"\"));\n }", "public Integer getBed() {\n return bed;\n }", "Sporthall() {\n reservationsList = new ArrayList<>();\n }", "public void buildStation(Station station) {\n stations.add(station);\n }", "public void setNbrOfEachBed(int[] numberOfBeds) {\n\t\tthis.numberOfBeds = numberOfBeds;\n\t}", "public Mountain(String name, int height, String location){\n this.name = name;\n this.height = height;\n this.location = location;\n }", "private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }", "public void addSegment()\n { \n Location tail = new Location();\n \n if(up)\n {\n tail.setA(list.get(0).getA());\n tail.setB(list.get(0).getB()+15);\n }\n else if(down)\n {\n tail.setA(list.get(0).getA());\n tail.setB(list.get(0).getB()-15);\n }\n else if(left)\n {\n tail.setA(list.get(0).getA()+15);\n tail.setB(list.get(0).getB());\n }\n else if(right)\n {\n tail.setA(list.get(0).getA()-15);\n tail.setB(list.get(0).getB());\n } \n \n ArrayList<Location> temp = new ArrayList<Location>();\n \n \n temp.add(tail);\n \n for(int i=0 ; i<list.size() ; i++)\n {\n temp.add(list.get(i));\n }\n list = temp; \n }", "@Override\r\n public void setRoom(Room room) {\n this.room = room; //set the hive room\r\n roomList.add(this.room); // add room to the list\r\n }", "public ArrayList <Branch> createBranch(){\n\t\tPVector dir1 =PVector.sub(loc_end,loc_begin);\n\t\tPVector dir2 =PVector.sub(loc_end,loc_begin);\n\t\t//println(\"loc_newEnd1: \"+loc_end.x+\" : \"+loc_end.y);\n\t\t//println(\"loc_newEnd1: \"+dir1.x+\" : \"+dir1.y);\n\t\tdir1.rotate(random(PI/4,PI/5));\n\t\tdir1.mult(0.67f);\n\t\tPVector loc_newEnd1 = PVector.add(loc_end,dir1);\n\t\tBranch branch_a = new Branch(this.loc_end,loc_newEnd1);\n\t\t\n\t\tdir2.rotate(random(-PI/4,-PI/5));\n\t\tdir2.mult(0.67f);\n\t\tPVector loc_newEnd2 = PVector.add(loc_end,dir2);\n\t\tBranch branch_b = new Branch(this.loc_end,loc_newEnd2);\n\n\t\tArrayList<Branch> bs = new ArrayList<Branch>() ;\n\t\tbs.add(branch_a);\n\t\tbs.add(branch_b);\n\t\tcomplete=true;\n\n\t\t\n\t\t//println(\"loc_newEnd2: \"+loc_newEnd2.x+\" : \"+loc_newEnd2.y);\n\t\t\n\t\treturn bs;\n\n\t}", "public void assignBoat(Boat boat) {\n\t\tboatList.add(boat);\n\t}", "public static List<Location> generateLocations() {\n\t\tList<Location> locations = new ArrayList<Location>();\n\t\t\n\t\tfor(AREA area : AREA.values()) {\n\t\t\tLocation l = new Location(area);\n\t\t\t\n\t\t\tswitch (area) {\n\t\t\tcase Study:\n\t\t\t\tl.neighbors.add(AREA.HW_SH);\n\t\t\t\tl.neighbors.add(AREA.HW_SL);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Hall:\n\t\t\t\tl.neighbors.add(AREA.HW_SH);\n\t\t\t\tl.neighbors.add(AREA.HW_HL);\n\t\t\t\tl.neighbors.add(AREA.HW_HB);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Lounge:\n\t\t\t\tl.neighbors.add(AREA.HW_HL);\n\t\t\t\tl.neighbors.add(AREA.HW_LD);\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Library:\n\t\t\t\tl.neighbors.add(AREA.HW_SL);\n\t\t\t\tl.neighbors.add(AREA.HW_LB);\n\t\t\t\tl.neighbors.add(AREA.HW_LC);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase BilliardRoom:\n\t\t\t\tl.neighbors.add(AREA.HW_HB);\n\t\t\t\tl.neighbors.add(AREA.HW_LB);\n\t\t\t\tl.neighbors.add(AREA.HW_BD);\n\t\t\t\tl.neighbors.add(AREA.HW_BB);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase DiningRoom:\n\t\t\t\tl.neighbors.add(AREA.HW_LD);\n\t\t\t\tl.neighbors.add(AREA.HW_BD);\n\t\t\t\tl.neighbors.add(AREA.HW_DK);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Conservatory:\n\t\t\t\tl.neighbors.add(AREA.HW_LC);\n\t\t\t\tl.neighbors.add(AREA.HW_CB);\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Ballroom:\n\t\t\t\tl.neighbors.add(AREA.HW_BB);\n\t\t\t\tl.neighbors.add(AREA.HW_CB);\n\t\t\t\tl.neighbors.add(AREA.HW_BK);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Kitchen:\n\t\t\t\tl.neighbors.add(AREA.HW_DK);\n\t\t\t\tl.neighbors.add(AREA.HW_BK);\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase HW_SH:\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tbreak;\n\t\t\tcase HW_HL:\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tbreak;\n\t\t\tcase HW_SL:\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tbreak;\n\t\t\tcase HW_HB:\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LD:\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LB:\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_BD:\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LC:\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tbreak;\n\t\t\tcase HW_BB:\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tbreak;\n\t\t\tcase HW_DK:\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tbreak;\n\t\t\tcase HW_CB:\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tbreak;\n\t\t\tcase HW_BK:\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlocations.add(l);\n\t\t}\n\t\t\n\t\treturn locations;\n\t}", "public static void reproduce (Species [][] map, int sheepHealth, int wolfHealth, int plantHealth) {\n \n // Place the baby\n int babyY, babyX;\n \n // Check if the baby has been placed\n int spawned = 0;\n \n for (int y = 0; y < map[0].length; y++){\n for (int x = 0; x < map.length; x++){\n \n boolean [][] breeding = breedChoice (map, x, y, plantHealth);\n \n // Sheep upwards to breed with\n if (breeding[0][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y-1][x]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep downwards to breed with\n } else if (breeding[1][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y+1][x]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep to the left to breed with\n } else if (breeding[2][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y][x-1]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep to the right to breed with\n } else if (breeding[3][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y][x+1]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Wolf upwards to breed with\n } else if (breeding[0][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y-1][x]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf downwards to breed with\n } else if (breeding[1][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y+1][x]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf to the left to breed with\n } else if (breeding[2][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y][x-1]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf to the right to breed with\n } else if (breeding[3][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y][x+1]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n }\n \n }\n }\n \n }", "public void addBoat(Boat b){\r\n boats.add(b);\r\n }", "public BikeStation(CSVRecord record) {\n this(new Location(Double.parseDouble(record.get(\"bikestation_latitude\")),\n Double.parseDouble(record.get(\"bikestation_longitude\"))),\n record.get(\"bikestation_name\"));\n }" ]
[ "0.634415", "0.61630017", "0.5898951", "0.5549866", "0.5515731", "0.5476512", "0.5423464", "0.534598", "0.52696973", "0.5260453", "0.5248818", "0.5245614", "0.52427816", "0.5197658", "0.5195115", "0.51810056", "0.5171892", "0.51169723", "0.50951385", "0.5073208", "0.5055405", "0.5038048", "0.4991937", "0.49748707", "0.49422523", "0.4941684", "0.49411726", "0.4910771", "0.49085987", "0.48874578", "0.48792073", "0.48627114", "0.4860401", "0.48556912", "0.48508197", "0.48440439", "0.48399386", "0.4835965", "0.48321113", "0.48299134", "0.48235807", "0.48221588", "0.4818269", "0.481657", "0.48150834", "0.4808724", "0.48066732", "0.4791153", "0.47877336", "0.47865543", "0.47851962", "0.47832203", "0.4782569", "0.4782431", "0.47772628", "0.47628498", "0.47589248", "0.47583807", "0.47583073", "0.47566465", "0.47551912", "0.4751179", "0.47449863", "0.47436988", "0.47344655", "0.47337133", "0.47231805", "0.47222328", "0.47169614", "0.47156045", "0.47140944", "0.47139063", "0.47100553", "0.47063679", "0.47009158", "0.4693709", "0.46934807", "0.46917394", "0.46905193", "0.46902996", "0.467092", "0.46690512", "0.46649265", "0.46603546", "0.46589032", "0.4655025", "0.46508256", "0.4645702", "0.46385697", "0.46350238", "0.46338907", "0.46326157", "0.46152443", "0.461485", "0.46097437", "0.46086392", "0.4607419", "0.46039635", "0.46027708", "0.45947087" ]
0.7060954
0
Creates a Linked Queue of casual employees on duty and inserts them into a queue
private static LinkedQueue<CasualEmployee> queueOfCasual() { CasualEmployee c1 = new CasualEmployee("Tim", true); CasualEmployee c2 = new CasualEmployee("Eric", true); CasualEmployee c3 = new CasualEmployee("Dr Brule", true); LinkedQueue<CasualEmployee> casualQueue; casualQueue = new LinkedQueue<>(); casualQueue.enqueue(c1); casualQueue.enqueue(c2); casualQueue.enqueue(c3); return casualQueue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void enqueue(E e) {\n\t\tNode node = new Node();\n\t\tnode.element = e;\n\t\tnode.next = null;\n\t\t\n\t\tif (last != null)\n\t\t\tlast.next = node;\n\t\telse\n\t\t\tfirst = node;\n\t\tlast = node;\n\t\t\n\t}", "public void enqueue( MyTreeNode<T> treeNode ) {\n\t\tQueueNode newNode = new QueueNode(treeNode);\n\t\t// the queue is empty\n\t\tif ( tail == null ) {\n\t\t\t// the tail and the head point to the same only element in the collection\n\t\t\tthis.tail = newNode;\n\t\t\tthis.head = newNode;\n\t\t// the queue is not empty\n\t\t} else {\n\t\t\t// the second from the end item of the collection keeps track with the tail\n\t\t\tthis.tail.next = newNode;\n\t\t\t// the new element becomes the tail of the collection\n\t\t\tthis.tail = newNode;\n\t\t}\n\t}", "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}", "private Employee setNextEmployee(Employee nextEmployee, Employee currentEmployee) {\n\tcurrentEmployee.setFree(true);\n\tswitch (currentEmployee.getEmType().getValue()) {\n\tcase 0:\n\t respondentQueue.enqueue(currentEmployee);\n\t break;\n\tcase 1:\n\t managerQueue.enqueue(currentEmployee);\n\t break;\n\tcase 2:\n\t directorQueue.enqueue(currentEmployee);\n\t break;\n\t}\n\treturn nextEmployee;\n }", "public void enqueue(Person person) {\r\n saf.add(person);\r\n }", "private PQHeap makeQueue(){\n \tPQHeap queue = new PQHeap(frequency.length);\n \tfor (int i = 0; i < frequency.length; i++) {\n \t\tqueue.insert(new Element(frequency[i], new HuffmanTempTree(i)));\n \t}\n \treturn queue;\n \t}", "public EventQueue() {\n\t\tqueue = new LinkedList<Event>();\n\t}", "private Queue(){\r\n\t\tgenerateQueue();\r\n\t}", "void enqueue(T data) \n { \n \n // Create a new LL node \n LinkedListQueue temp = new LinkedListQueue(data); \n \n // If queue is empty, then new node is front and rear both \n if (this.rear == null) { \n this.front = this.rear = temp; \n return; \n } \n \n // Add the new node at the end of queue and change rear \n this.rear.next = temp; \n this.rear = temp; \n }", "public Deque() {}", "void enqueue(int idNumber, int arrival_time) \r\n\t { \r\n\t \r\n\t // Create a new LL node \r\n\t QNode temp = new QNode(idNumber, arrival_time); \r\n\t \r\n\t // If queue is empty, then new node is front and rear both \r\n\t if (this.rear == null) \r\n\t { \r\n\t this.front = this.rear = temp; \r\n\t size++;\r\n\t maxSize++;\r\n\t return; \r\n\t } \r\n\t \r\n\t // Add the new node at the end of queue and change rear \r\n\t else {\r\n\t \tthis.rear.next = temp;\r\n\t \tthis.rear = temp; \r\n\t \tsize++;\r\n\t \tmaxSize++;\r\n\t }\r\n\t \r\n\t }", "public static void main(String[] args) {\n\t\tCreate_queue new_queue= new Create_queue();\n\t\tnew_queue.enqueu(12);\n\t\tnew_queue.enqueu(5);\n\t\tnew_queue.enqueu(36);\n\t\tnew_queue.enqueu(5);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(10);\n\t\tnew_queue.enqueu(8);\n\t\tnew_queue.enqueu(2);\n\t\tnew_queue.enqueu(14);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.dequeu();\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(32);\n\t\tnew_queue.enqueu(11);\n\t\tnew_queue.enqueu(21);\n\t\tnew_queue.enqueu(44);\n\t\tnew_queue.enqueu(46);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(50);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(100);\n\t\tSystem.out.println(new_queue);\n\t\tSystem.out.println(new_queue.peek());\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue.peek());\n\t\t\n\t\t\n\t}", "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 static LinkedQueue makeQueueOfQueues(LinkedQueue q) {\n // Replace the following line with your solution.\n LinkedQueue overall = new LinkedQueue();\n while (!q.isEmpty())\n {\n try \n {\n LinkedQueue single = new LinkedQueue();\n single.enqueue(q.dequeue());\n overall.enqueue(single);\n } \n catch (QueueEmptyException e) \n {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } \n }\n \n return overall;\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 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 void enqueue(Person p) throws FullQueueException {\n if (p == null) {\n throw new IllegalArgumentException(\"This input is invalid.\");\n }\n if (numPeople == maxSize) throw new FullQueueException(\"This queue is\" +\n \" full\");\n holdingQueue.add(p);\n numPeople++;\n }", "private static void addDataToQueue(Queue<Customer> customerPriorityQueue) {\r\n\t\tRandom rand = new Random();\r\n\t\tfor (int i = 0; i < 7; i++) {\r\n\t\t\tint id = rand.nextInt(100);\r\n\t\t\tcustomerPriorityQueue.add(new Customer(id, \"Pankaj \" + id));\r\n\t\t}\r\n\t}", "public void declareQueue() {\n try {\n mChannel.queueDeclare();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n }", "private static void addDataToQueue(Queue<Customer> customerPriorityQueue) {\n\t\tRandom rand = new Random();\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tint id = rand.nextInt(100);\n\t\t\tSystem.out.println(\"customer arrived and his id is: \" + id);\n\t\t\tcustomerPriorityQueue.add(new Customer(id, \"Pankaj \" + id));\n\t\t}\n\t}", "public HoldingQueue(int maxSize) {\n this.maxSize = maxSize;\n holdingQueue = new ArrayList<Person>(maxSize);\n numPeople = 0;\n }", "public static void enter(PriorityQueue<Student> queue,\n String name, double cgpa, int token){\n Student s=new Student(name,cgpa,token);\n queue.add(s); //added to queue\n\n }", "public void enqueue(Patient data) {\n Node tail = new Node(data, null);\n if (size == 0) {\n front = tail;\n rear = tail;\n } else {\n Node head = new Node();\n Node temp = head;\n head.next = front;\n\n while (temp.next != null && temp.next.patient.priority <= tail.patient.priority)\n temp = temp.next;\n\n tail.next = temp.next;\n temp.next = tail;\n front = head.next;\n }\n size++;\n }", "@Override\n\tpublic void addToQueue() {\n\t}", "public void enqueue(E e) {\n\t\tNode<E> p=new Node<E>(e,null);\n\t\ttail.next=p;\n\t\ttail=p;\n\t\t\n\t}", "Queue() {\n head = null;\n tail = null;\n }", "public void enqueue(Node newNode) \r\n {\r\n if (isEmpty()) //si la cola está vacia el nuevo nodo será la cabeza\r\n head = newNode;\r\n else\r\n {\r\n Node temp = head;\r\n while(temp.next != null) //recorre hasta que el apuntador de un nodo sea null y ahí se agrega el nuevo nodo\r\n temp = temp.next;\r\n \r\n temp.next = newNode; //inserta al final\r\n } \r\n }", "public void enqueue(Paciente paciente) {\r\n\t\tif (this.head == null) {\r\n\t\t\tNodo primeiroNodo = new Nodo(paciente);\r\n\t\t\tthis.head = primeiroNodo;\r\n\t\t} else {\r\n\t\t\tNodo atual = this.head;\r\n\t\t\twhile (atual.getProximo() != null) {\r\n\t\t\t\tatual = atual.getProximo();\r\n\t\t\t}\r\n\t\t\tatual.setProximo(new Nodo(paciente));\r\n\t\t}\r\n\t}", "void enqueue(E newEntry);", "public static void testPersistence()throws Exception {\n\t\tQueue queue = new InMemoryQueue();\n//\t\tqueue.init(\"com.mysql.jdbc.Driver\",\n//\t\t\t\"jdbc:mysql://127.0.0.1/queue?user=root\",\n//\t\t\t\"jdbc:mysql://127.0.0.1/mysql?user=root\", \"queue\",\n//\t\t\t\ttrue);\n\t\t\n\t\tfor (int i = 0; i < 1; i++){\n\t\t\tqueue.clear();\n\t\t\tSystem.out.println(\"I: \"+i);\n\t\t\tArrayList l = new ArrayList();\n\t\t\tl.add(\"http://www.4shared.com\");\n\t\t\tl.add(\"http://www.89.com\");\n\t\t\tl.add(\"http://www.about.com\");\n\t\t\tl.add(\"http://www.adobe.com\");\n\t\t\tl.add(\"http://www.adultfriendfinder.com\");\n\t\t\tl.add(\"http://www.aebn.net\");\n\t\t\tl.add(\"http://www.alibaba.com\");\n\t\t\tl.add(\"http://www.amazon.co.uk\");\n\t\t\tl.add(\"http://www.amazon.com\");\n\t\t\tl.add(\"http://www.aol.com\");\n\t\t\tl.add(\"http://www.apple.com\");\n\t\t\tl.add(\"http://www.badongo.com\");\n\t\t\tl.add(\"http://www.badoo.com\");\n\t\t\tl.add(\"http://www.bbc.co.uk\");\n\t\t\tl.add(\"http://www.bebo.com\");\n\t\t\tl.add(\"http://www.blogger.com\");\n\t\t\tl.add(\"http://www.cnet.com\");\n\t\t\tl.add(\"http://www.cnn.com\");\n\t\t\tl.add(\"http://www.comcast.net\");\n\t\t\tl.add(\"http://www.craigslist.org\");\n\t\t\tl.add(\"http://www.dailymotion.com\");\n\t\t\tl.add(\"http://www.deviantart.com\");\n\t\t\tl.add(\"http://www.digg.com\");\n\t\t\tl.add(\"http://www.digitalpoint.com\");\n\t\t\tl.add(\"http://www.download.com\");\n\t\t\tl.add(\"http://www.ebay.co.uk\");\n\t\t\tl.add(\"http://www.ebay.com\");\n\t\t\tl.add(\"http://www.facebook.com\");\n\t\t\tl.add(\"http://www.facebox.com\");\n\t\t\tl.add(\"http://www.flickr.com\");\n\t\t\tl.add(\"http://www.fotolog.net\");\n\t\t\tl.add(\"http://www.friendster.com\");\n\t\t\tl.add(\"http://www.gamespot.com\");\n\t\t\tl.add(\"http://www.geocities.com\");\n\t\t\tl.add(\"http://www.gmx.net\");\n\t\t\tl.add(\"http://www.go.com\");\n\t\t\tl.add(\"http://www.google.ca\");\n\t\t\tl.add(\"http://www.google.co.hu\");\n\t\t\tl.add(\"http://www.google.co.in\");\n\t\t\tl.add(\"http://www.google.co.th\");\n\t\t\tl.add(\"http://www.google.co.uk\");\n\t\t\tl.add(\"http://www.google.com\");\n\t\t\tl.add(\"http://www.google.com.au\");\n\t\t\tl.add(\"http://www.google.com.co\");\n\t\t\tl.add(\"http://www.google.com.vn\");\n\t\t\tl.add(\"http://www.google.lt\");\n\t\t\tl.add(\"http://www.google.ro\");\n\t\t\tl.add(\"http://www.google.sk\");\n\t\t\tl.add(\"http://www.hi5.com\");\n\t\t\tl.add(\"http://www.hp.com\");\n\t\t\tl.add(\"http://www.icio.us\");\n\t\t\tl.add(\"http://www.icq.com\");\n\t\t\tl.add(\"http://www.ign.com\");\n\t\t\tl.add(\"http://www.imageshack.us\");\n\t\t\tl.add(\"http://www.imagevenue.com\");\n\t\t\tl.add(\"http://www.imdb.com\");\n\t\t\tl.add(\"http://www.information.com\");\n\t\t\tl.add(\"http://www.invisionfree.com\");\n\t\t\tl.add(\"http://www.iwiw.hu\");\n\t\t\tl.add(\"http://www.linkedin.com\");\n\t\t\tl.add(\"http://www.live.com\");\n\t\t\tl.add(\"http://www.mapquest.com\");\n\t\t\tl.add(\"http://www.megarotic.com\");\n\t\t\tl.add(\"http://www.megaupload.com\");\n\t\t\tl.add(\"http://www.metacafe.com\");\n\t\t\tl.add(\"http://www.microsoft.com\");\n\t\t\tl.add(\"http://www.miniclip.com\");\n\t\t\tl.add(\"http://www.mininova.org\");\n\t\t\tl.add(\"http://www.msn.com\");\n\t\t\tl.add(\"http://www.myspace.com\");\n\t\t\tl.add(\"http://www.mywebsearch.com\");\n\t\t\tl.add(\"http://www.nastydollars.com\");\n\t\t\tl.add(\"http://www.nba.com\");\n\t\t\tl.add(\"http://www.nytimes.com\");\n\t\t\tl.add(\"http://www.orkut.com\");\n\t\t\tl.add(\"http://www.passport.net\");\n\t\t\tl.add(\"http://www.photobucket.com\");\n\t\t\tl.add(\"http://www.pornotube.com\");\n\t\t\tl.add(\"http://www.rapidshare.com\");\n\t\t\tl.add(\"http://www.rediff.com\");\n\t\t\tl.add(\"http://www.reference.com\");\n\t\t\tl.add(\"http://www.sendspace.com\");\n\t\t\tl.add(\"http://www.soso.com\");\n\t\t\tl.add(\"http://www.sourceforge.net\");\n\t\t\tl.add(\"http://www.starware.com\");\n\t\t\tl.add(\"http://www.statcounter.com\");\n\t\t\tl.add(\"http://www.tagged.com\");\n\t\t\tl.add(\"http://www.theplanet.com\");\n\t\t\tl.add(\"http://www.torrentspy.com\");\n\t\t\tl.add(\"http://www.tripod.com\");\n\t\t\tl.add(\"http://www.typepad.com\");\n\t\t\tl.add(\"http://www.vnexpress.net\");\n\t\t\tl.add(\"http://www.weather.com\");\n\t\t\tl.add(\"http://www.whenu.com\");\n\t\t\tl.add(\"http://www.wordpress.com\");\n\t\t\tl.add(\"http://www.wwe.com\");\n\t\t\tl.add(\"http://www.xanga.com\");\n\t\t\tl.add(\"http://www.yahoo.com\");\n\t\t\tl.add(\"http://www.yourfilehost.com\");\n\t\t\tl.add(\"http://www.youtube.com\");\n\t\t\t//InMemoryQueue queue = new InMemoryQueue();\n\t\t\tDownloader d = new Downloader(queue);\n\t\t\td.setMaxThreads(20);\n\t\t\t// Listener\n\t\t\tCrawlerListener listener=new CrawlerListener();\n\t\t\td.addListener(listener);\n\t\t\n\t\t\t\n\t\n\t\t\t//d.setFollowRedirect(false);\n\t\t\t//d.setMaxSize(2000);\n\t\t\td.addURLs(l);\n\t\t\td.start();\n\t\t\td.waitDone();\n\t\t\tint j=0;\n\t\t\tfor(ResourceDownloader r: listener.resources){\n\t\t\t\tSystem.out.println(j++ +\"-\"+r.getURL());\n\t\t\t\tbyte[] page = r.getObject();\n\t\t\t\tif(page!=null){\n\t\t\t\t\tString p=new String(page);\n\t\t\t\t\tSystem.out.println(p);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public Queue()\n\t{\n\t\thead = null;\n\t}", "public Deque() {\n\n }", "public Deque() {\n\n }", "public PersistentQueue<E> enqueue(E e) {\n if(e == null)\n throw new IllegalArgumentException();\n return new PersistentQueue<>(head, tail, e, size + 1, extHeads, extTails);\n }", "public void enqueue(final E data) {\n if (head == null) {\n head = new Node(data);\n tail = head;\n size++;\n return;\n }\n Node node = new Node(data, null);\n tail.next = node;\n tail = node;\n size++;\n\n }", "void insertCustomer(Customer headRef)\r\n {\r\n // Create a new LinkList node/Customer object\r\n Customer temp = new Customer(1,0.0);\r\n \r\n // If queue is empty, then new node is the first and last customer both\r\n if (this.last == null)\r\n {\r\n this.first = this.last = temp;//first and last are initialized to temp node\r\n return;\r\n }\r\n \r\n // If temp is not the only node, add the temp node at the end of queue and change last node\r\n this.last.next = temp;\r\n this.last = temp;\r\n }", "private PersistentQueue(Node<E> h, Node<E> t, E e, int n, List<Node<E>> bh, List<Node<E>> bt) {\n extHeads = new ArrayList<>(bh);\n extTails = new ArrayList<>(bt);\n tail = new Node<>(e);\n if(t != null) {\n // if next pointer of tail has already been assigned, do branching\n if(t.next == null){\n t.next = tail;\n //System.out.println(\"adfadsfasdfa\");\n } \n else {\n System.out.println(\"adfadsfasdfa\");\n extTails.add(t);\n extHeads.add(tail);\n }\n }\n head = h;\n if(head == null)\n head = tail;\n size = n;\n }", "@Override\n\tpublic void run() {\n\t\tSystem.out.println(\"AddToQueue Thread Running\");\n\t\t//Create passenger creator\n\t\tCreatePassenger creator = new CreatePassenger();\n\t\t//Start time\n\t\tint start = LocalDateTime.now().getSecond();\n\t\tint time = 0;\n\t\tcounter = 0;\n\t\t//Loop until counter reaches max passengers or time equals max time\n\t\twhile(counter <= MAX_PASSENGERS && time < MAX_TIME) {\n\t\t\t//Create new passenger\n\t\t\tPassenger arrived = creator.create();\n\t\t\t//Add passenger to order array\n\t\t\tthis.arrivedAdd(arrived);\n\t\t\t//Clear line\n\t\t\tSystem.out.print(\"\\033[2K\");\n\t\t\t//Add passenger to queue\n\t\t\tqueue.offer(arrived);\n\t\t\t//Incremement counter\n\t\t\tcounter++;\n\t\t\t//Print out new queue\n\t\t\tSystem.out.print(\"\\r\" + queue);\n\t\t\tint now = LocalDateTime.now().getSecond();\n\t\t\tif(now >= start) {\n\t\t\t\t\ttime = now - start;\n\t\t\t} else {\n\t\t\t\ttime = (now + 59) - start;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tThread.sleep(300); \n\t\t\t} catch(InterruptedException e) {\n\t\t\t\tSystem.out.println(\"Error! Thread was interrupted!\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void workOnQueue() {\n }", "public QueueHandler(int numberOfQueues){\n queues = new ArrayList<LinkedList<Passenger>>();\n closed = false;\n \n for(int i = 0; i < numberOfQueues; i++) {\n \tqueues.add(new LinkedList<Passenger>());\n }\n }", "private void initializeQueue() {\n this.queue.clear();\n for (Map.Entry<String, NodeT> entry : nodeTable.entrySet()) {\n if (!entry.getValue().hasDependencies()) {\n this.queue.add(entry.getKey());\n }\n }\n if (queue.isEmpty()) {\n throw logger.logExceptionAsError(new IllegalStateException(\"Detected circular dependency\"));\n }\n }", "public void enqueue(T newEntry){\n Node newNode = new Node(newEntry, null);\n\n if (isEmpty()){\n firstNode = newNode;\n }\n else {\n lastNode.setNext(newNode);\n }\n lastNode = newNode;\n }", "public Queue(){\n first = null;\n last = null;\n N = 0;\n }", "public LQT_Message_Queue() {\n\ta_list = new LinkedList<LQT_Message>();\n }", "public DVDQueue() { \n\t\tqueue = new LinkedList<DVDPackage>(); \n\t}", "public Deque() {\n }", "void enqueue(E e);", "void enqueue(Node n) {\r\n\t\tEntry add = new Entry(n);\r\n\t\tlast.prev.nextSet(add);\r\n\t\tadd.prevSet(last.prev);\r\n\t\tadd.nextSet(last);\r\n\t\tlast.prevSet(add);\r\n\t\tlength++;\r\n\t}", "public CheckOutQ() {\r\n\t\tq = new LinkedList<Person>();\r\n\t\tmaxQ = 0;\r\n\t}", "public static void main(String[] args) {\n MyQueue queue = new MyQueue();\n student obj1 = new student();\n obj1.setName(\"shashank\");\n obj1.setRoll(6);\n queue.enqueue(obj1);\n student obj2 = new student();\n obj2.setName(\"prashant\");\n obj2.setRoll(2);\n queue.enqueue(obj2);\n student obj = new student();\n obj.setName(\"maneesh\");\n obj.setRoll(10);\n queue.enqueue(obj);\n student obj4 = new student();\n obj4.setName(\"shreya\");\n obj4.setRoll(4);\n queue.enqueue(obj);\n System.out.println(\"the size queue is = \" + queue.getSize());\n queue.sortList();\n queue.traverse();\n }", "public Queue() {}", "public WBLeftistHeapPriorityQueueFIFO() {\n\t\theap = new WBLeftistHeap<>();\n\t}", "public AddToQueue(PriorityQueue<Passenger> queue, Passenger[] arrivedOrder) {\n\t\tthis.queue = queue;\n\t\tthis.arrivedOrder = arrivedOrder;\n\t\tthis.capacity = arrivedOrder.length;\n\t}", "public void enqueue(E e) {\n\t\tlist.addLast(e);\n\t}", "void addToQueuing(int tu){\n\t\tfor(Request req : queue.list){\n\t\t\tif(req.getReqTime() * 2 > tu){\t//大于当前时间的就不管了\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif(req.getValid() == true){\t//如果没被删除,拷贝一份,删之,并将拷贝添加到Queuing里面\n\t\t\t\tRequest tmp = req.cloneAnObj();\t\t//克隆一个新的对象\n\t\t\t\treq.setValid(false);\n\t\t\t\tqueuing.list.add(tmp);\t//可以用引用对Queuing进行操作\n\t\t\t}\n\t\t}\n\t}", "public DesignMyStack225LeetCode() {\n queue = new LinkedList();\n }", "public void linkedListQueue(){\r\n\t\tfirst = null;\r\n\t\tlast = null;\r\n\t\tN = 0;\r\n\t}", "public static void main(String[] args) {\n\t\tQueueUsingLinkedList queue = new QueueUsingLinkedList();\r\n\t\tqueue.enqueue(6);\r\n\t\t queue.dequeue();\r\n\t\t queue.enqueue(3);\r\n\t\t queue.enqueue(99);\r\n\t\t queue.enqueue(56);\r\n\t\t queue.dequeue();\r\n\t\t queue.enqueue(43);\r\n\t\t queue.dequeue();\r\n\t\t queue.enqueue(89);\r\n\t\t queue.enqueue(77);\r\n\t\t queue.dequeue();\r\n\t\t queue.enqueue(32);\r\n\t\t queue.enqueue(232);\r\n\t}", "void enqueue(E el);", "public static void main(String args[]) {\n Instant start = Instant.now();\n\n QueueStudentIDs studentsInLine = new QueueStudentIDs(8);\n studentsInLine.insertStudent(885475); // first-in\n studentsInLine.insertStudent(290451);\n studentsInLine.insertStudent(500324);\n studentsInLine.insertStudent(769012);\n studentsInLine.insertStudent(489926);\n studentsInLine.insertStudent(319319);\n studentsInLine.insertStudent(652432);\n studentsInLine.insertStudent(824323); // last-in\n\n // [1] output number in queue\n System.out.println(\"\\n[1] There are \" + studentsInLine.size() +\n \" students in queue.\");\n // [2] output value of top element\n System.out.println(\"[2] First Student in queue: \"\n + studentsInLine.peekAtFirstStudent() + \" (top of stack)\");\n // [3] serve next student -- FIFO\n System.out.println(\"[3] Now Serving: \" + studentsInLine.serveNextStudent() +\n \" (removed from queue)\");\n // [4] output number in queue\n System.out.println(\"[4] There are \" + studentsInLine.size() +\n \" students in queue.\");\n\n // [5] output stack\n System.out.print(\"[5] Students Left in queue: \");\n while (!studentsInLine.isEmpty() ) {\n long value = studentsInLine.serveNextStudent();\n System.out.print(value);\n System.out.print(\"\\t\");\n }\n System.out.println();\n\n // [6] output number in queue\n System.out.println(\"[6] There are \" + studentsInLine.size() +\n \" students in queue.\");\n\n // Save current date-time in UTC\n Instant end = Instant.now();\n System.out.println(\"\\nTime elapsed: \" + Duration.between(start, end).toMillis() + \" milliseconds.\");\n }", "private void fillQueue(Node node) {\n if (node == null) {\n return;\n }\n fillQueue(node.leftChild);\n queue.offer(node.value);\n fillQueue(node.rightChild);\n }", "public LinkedListOfEmployees() {\r\n\t\thead = null;\r\n\t}", "public Deque() {\n first = null;\n last = null;\n }", "public Deque() {\n first = null;\n last = null;\n n = 0;\n }", "@Test\n public void testCreateAllocationScraperWorkerJob() throws Exception {\n LocalDate currentDate = LocalDate.parse(\"2018-05-25\");\n LocalDate endDate = LocalDate.parse( \"2018-10-06\" );\n while ( currentDate.isBefore( endDate ) ) {\n CloudbedsAllocationScraperWorkerJob workerJob = new CloudbedsAllocationScraperWorkerJob();\n workerJob.setStatus( JobStatus.submitted );\n workerJob.setAllocationScraperJobId( 440052 ); // dbpurge job (no recs)\n workerJob.setStartDate( currentDate );\n workerJob.setEndDate( currentDate.plusDays( 7 ) );\n dao.insertJob( workerJob );\n currentDate = currentDate.plusDays( 7 ); // calendar page shows 2 weeks at a time\n }\n }", "public Queue() {\n\t\tfirst = null;\n\t\tlast = null;\n\t\tN = 0;\n\t}", "public QueueExplorator() {\n\t\tqueue = new LinkedQueue<Square>();\t\n\t}", "public void addJob(String jobID, String jobTitle, String jobType,\n String salary, String jobDescription, String expirationDate,\n String contactEmail) {\n //Will check if the amount is less than 100 jobs added\n //then Will add the job to the end of the arrayList\n //will return true if added else return false\n currentJob = new Job(contactEmail, jobType, jobID, jobDescription, salary, jobTitle, expirationDate);\n if(jobs.size() <= 100)\n {\n jobs.add(currentJob);\n String success = String.format(\"================JOB POSTING SUCCESS================\\n\" +\n \"A new job has been posted with following details:\\n\" +\n \"Job ID: %s\\n\" +\n \"Job Name: %s\\n\" +\n \"Job Type: %s\\n\" +\n \"Salary: %s\\n\" +\n \"Job Description: %s\\n\" +\n \"Expiration Date: %s\\n\" +\n \"Contact email: %s\\n\", jobID, jobTitle, jobType, salary, jobDescription, expirationDate, contactEmail);\n\n System.out.println(success);\n } else {\n String success = String.format(\"================JOB POSTING FAILURE ================\\n\" +\n \"THERE ARE MORE THAN 100 JOBS IN THE SYSTEM:\\n\");\n System.out.println(success);\n }\n }", "public MyQueue() {\n \n }", "public void enqueue(E item) {\n Node<E> oldlast = last;\n last = new Node<E>();\n last.item = item;\n last.next = null;\n if (isEmpty()) first = last;\n else oldlast.next = last;\n n++;\n }", "@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}", "myQueue(){\n }", "public LinkedQueue(){\n this.firstNode = null;\n this.lastNode = null;\n }", "public MyQueue() {\n queue = new PriorityQueue<>();\n }", "public void loadToQueue(Elements columns) throws IOException {\n Element element = columns.get(1).child(0);\n LocalDateTime date = this.parseDate(columns.get(5).text());\n String name = element.text();\n String url = element.attr(\"href\");\n Document job = Jsoup.connect(url).get();\n Element jobTable = job.select(\"table[class=msgTable]\").get(0);\n Elements trJobTable = jobTable.select(\"tr\");\n Elements tdJobTable = trJobTable.get(1).select(\"td\");\n String description = tdJobTable.get(1).text();\n vacancies.add(new Vacancy(name, url, description, date));\n }", "public BlaqDeque(){super();}", "public Queue(){ }", "public Deque() {\n first = null;\n last = null;\n N = 0;\n }", "public static void main(String[] args) {\n\t\tlinkedListQueue<String> queue = new linkedListQueue<String>();\r\n\t\tqueue.printQueue();\r\n\t\tqueue.enqueue(\"a\");\r\n\t\tqueue.enqueue(\"b\");\r\n\t\tqueue.enqueue(\"c\");\r\n\t\tqueue.enqueue(\"d\");\r\n\t\tqueue.printQueue();\r\n\t\tqueue.dequeue();\r\n\t\tqueue.dequeue();\r\n\t\tqueue.dequeue();\r\n\t\tqueue.dequeue();\r\n\t\tqueue.dequeue();\r\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 QueueLinkedList()\r\n {\r\n first = null; //assigning variables to null\r\n last = null;\r\n \r\n }", "public void enqueue (E element);", "public Data()\n {\n //initialize the queues\n for (int i=0;i<10;i++)\n data[i] = new LinkedList<String >();\n }", "public I0304MyQueue() {\n nums = new Stack<>();\n temp = new Stack<>();\n }", "@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 initQueue() {\n ListEntry defaultEntry = new ListEntry(0, 0);\n accumulate.add(defaultEntry);\n\n }", "public void initiateOfferQueue() {\n List<Offer> offerList = offerRepository.findAll();\n\n if (!offerList.isEmpty()) {\n\n for (Offer offer : offerList) {\n\n addOfferToOfferBook(offer);\n }\n }\n\n }", "public void enQueue(Object data)\n {\n Node temp = new Node(data, null);\n if(this.isEmpty())\n {\n this.front = temp;\n this.rear = temp;\n }\n else\n {\n this.rear.setNext(temp);\n this.rear = temp;\n }\n }", "public void enqueue(E data) {\n Noder<E> temp = new Noder<>(data);\n if (first == null) {\n last = temp;\n first = last;\n } else {\n if (first.next == null) {\n first.next = temp;\n }\n last.next = temp;\n last = temp;\n }\n }", "public void newQueue(){\r\n\t\tgenerateQueue();\r\n\t\trefreshLeft = true;\r\n\t}", "public static void main(String[] args) {\n\t\tQueueLL q=new QueueLL();\n\t\tq.enqueue(1);\n\t\tq.enqueue(2);\n\t\tq.enqueue(3);\n\t\t\n\t\tSystem.out.println(q.isEmpty());\n\t\tSystem.out.println(q.dequeue());\n\t\tSystem.out.println(q.dequeue());\n\t\tSystem.out.println(q.dequeue());\n\t\tSystem.out.println(q.isEmpty());\n\n\t}", "public Deque() {\n size = 0;\n head = null;\n tail = null;\n }", "@Override\n protected void insertJobInQueueUponArrival (final J job, final double time)\n {\n addRealJobLocal (job);\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 MyQueue() {\n\n }", "@Override\r\n\tpublic void enqueue(T data) {\n\t\tQueueADTNode<T> temp = new QueueADTNode<T>();\r\n\t\ttemp.data = data;\r\n\t\ttemp.next = null;\r\n\t\t\r\n\t\tif(isEmpty())\r\n\t\t{\r\n\t\t\thead = temp;\r\n\t\t\ttail = temp;\r\n\t\t\tcount++;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\ttail.next = temp;\r\n\t\ttail = temp;\r\n\t\tcount++;\r\n\t}", "public Deque() {\n first = null;\n last = null;\n size = 0;\n assert check();\n }", "public Deque() {\n size = 0;\n first = null;\n last = null;\n }", "public MessageQueue(int capacity) \n { \n elements = new Message[capacity]; \n count = 0; \n head = 0; \n tail = 0; \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 }" ]
[ "0.57789415", "0.57734674", "0.57726467", "0.5721846", "0.5710203", "0.56968546", "0.5656832", "0.55952054", "0.5586019", "0.55771196", "0.55734265", "0.5563154", "0.5560579", "0.55484873", "0.55416256", "0.55395055", "0.55394727", "0.5538054", "0.5519976", "0.55160034", "0.5486716", "0.54534787", "0.5444838", "0.5433183", "0.5416035", "0.5376473", "0.5369592", "0.53607416", "0.5355716", "0.53474987", "0.53012383", "0.5286684", "0.5286684", "0.5281936", "0.5276887", "0.5276255", "0.5264629", "0.52612555", "0.52563685", "0.52551335", "0.52446353", "0.5244315", "0.52420074", "0.5239078", "0.5235953", "0.5230196", "0.5212037", "0.5209174", "0.5205915", "0.5205194", "0.52050465", "0.5198945", "0.51802504", "0.5175143", "0.51742667", "0.51637536", "0.51552874", "0.51545167", "0.5149606", "0.5148467", "0.51406395", "0.51370806", "0.5134541", "0.51251495", "0.5120989", "0.51197743", "0.5119457", "0.51190215", "0.5115666", "0.51085657", "0.510486", "0.5103469", "0.51026714", "0.5092988", "0.5087107", "0.5085825", "0.50790906", "0.5074876", "0.5072214", "0.50713766", "0.5068514", "0.5068037", "0.5062961", "0.5061942", "0.5058445", "0.5057864", "0.5053906", "0.5050463", "0.50501335", "0.5044606", "0.5043949", "0.5039489", "0.5038597", "0.5037615", "0.5027315", "0.5026683", "0.50219697", "0.5018908", "0.50156003", "0.5015142" ]
0.7604982
0
Zusammenfassen der Einstellungen und schreiben in die Datenbank
public void onWritePersistent(View view) { if(view != null) { // Create and populate the properites ApplikationEinstellungen applikationEinstellungen = new ApplikationEinstellungen(getApplicationContext()); ArrayList<String> zeiten = new ArrayList<>(); zeiten.add(this.zeit1Von.getText().toString()); zeiten.add(this.zeit1Bis.getText().toString()); zeiten.add(this.zeit2Von.getText().toString()); zeiten.add(this.zeit2Bis.getText().toString()); zeiten.add(this.zeit3Von.getText().toString()); zeiten.add(this.zeit3Bis.getText().toString()); zeiten.add(this.zeit4Von.getText().toString()); zeiten.add(this.zeit4Bis.getText().toString()); applikationEinstellungen.setZeiten(zeiten); applikationEinstellungen.setSchwellwertBewegungssensor(this.seekbarSchwellwert.getProgress()); applikationEinstellungen.setIntervallSmsBenachrichtigung(Integer.parseInt(smsIntervall.getText().toString()) * 60 * 1000); applikationEinstellungen.setMonitorAktiv(this.monitorAktiv.isChecked() ? 1 : 0); applikationEinstellungen.setBenutzerName(this.benutzerName.getText().toString()); // Write persistent Datenbank.getInstanz(getApplicationContext()).set(applikationEinstellungen); finish(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Data() {\n initComponents();\n koneksi_db();\n tampil_data();\n }", "public void steuern() {\n\t\teinlesenUndInitialisieren();\n\t\tausgabe();\n\t}", "public void trenneVerbindung();", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initdata() {\n\n\t}", "public ElevSeRegKurser() {\n initComponents();\n try {\n idb = new InfDB(\"C://db//HOGDB.FDB\");\n } catch (InfException e) {\n JOptionPane.showMessageDialog(null, \"Något gick visst fel\");\n System.out.println(\"Internt felmeddelande\" + e.getMessage());\n }\n }", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\r\n\tpublic void publierEnchere() {\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}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "protected void loadData()\n {\n }", "public void inizializza() {\n\n /* invoca il metodo sovrascritto della superclasse */\n super.inizializza();\n\n }", "public AutomatZustand()\r\n\t{\r\n\t\tthis.ew_lokal = Automat.eingabewort;\r\n\t}", "@PostConstruct\n\tpublic void init() {\n\t\twarningWindowCounter = WARNINGWINDOWTIME;\n\t\tsessionTimeoutCounter = TIMEOUTAFTERWARNING;\n\t\tanzeigeSessionTimeoutCounter = false;\n\t\tsessionGone = false;\n\t\tautosaveFrequency = AUTOSAVEPERIOD;\n\t\tautoSaveController.setValidSessionId(selection.getSessionId());\n\t\tMainEntry entry = selection.getEntry();\n\t\tnavigationList = entrySteuerung.getEntryList(selection.getThema());\n\t\tif (null != navigationList && entry != null) {\n\t\t\t//int entryIndex = navigationList.indexOf(entry);\n\t\t\tentryIterator = navigationList.listIterator();\n\t\t\twhile (entry.getId() != entryIterator.next().getId()) {\n\t\t\t}\n\t\t}\n\t\treferenzArt = true;\n\t\tlabelReferenz = \"Buch\";\n\t\tlabelUReferenz = \"Seite\";\n\t\tquRes = entrySteuerung.findReferences();\n\t\taBeschreibungen = entrySteuerung.findBeschreibungen(selection.getThema());\n\t\tbearbeiten = false;\n\t\tif (null == entry) {\n\t\t\treferenzen = new ArrayList<>();\n\t\t\tabfragen = new ArrayList<>();\n\t\t\tneu = true;\n\t\t\tmainEntry = new MainEntry();\n\t\t} else {\n\t\t\tkBeschreibung = entry.getKurzEintrag();\n\t\t\tlBeschreibung = entry.getLangEintrag();\n\t\t\treferenzen = entry.getReferenzen();\n\t\t\tbeispiel = entry.getBeispiel();\n\t\t\tabfragen = entry.getAbfragen();\n\t\t\tneu = false;\n\t\t\tmainEntry = entry;\n\t\t}\n\t}", "public MaschinenVerwaltung() {\r\n setMaschinenListe();\r\n setEinKopfMaschinenListe();\r\n setZweiBisAchtKopfMaschine();\r\n setZehnUndMehrKopfMaschine();\r\n }", "private TigerData() {\n initFields();\n }", "@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}", "private void Initialized_Data() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "public void init(){\n\t\tEmployee first = new Employee(\"Diego\", \"Gerente\", \"bebexitaHemoxita@gmail.com\");\n\t\tHighSchool toAdd = new HighSchool(\"Santiago Apostol\", \"4656465\", \"cra 33a #44-56\", \"3145689879\", 30, 5000, \"Jose\", new Date(1, 3, 2001), 3, \"Servicios educativos\", \"451616\", 15, \"Piedrahita\", 45, 1200, 500);\n\t\ttoAdd.addEmployee(first);\n\t\tProduct pilot = new Product(\"jet\", \"A00358994\", 1.5, 5000);\n\t\tFood firstFood = new Food(\"Colombina\", \"454161\", \"cra 18\", \"454611313\", 565, 60000, \"Alberto\", new Date(1, 8, 2015), 6, \"Manufactura\", 4);\n\t\tfirstFood.addProduct(pilot);\n\t\ttheHolding = new Holding(\"Hertz\", \"15545\", \"cra 39a #30a-55\", \"3147886693\", 80, 500000, \"Daniel\", new Date(1, 2, 2015), 5);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\ttheHolding.addSubordinate(firstFood);\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "void initData() {\r\n\t\tthis.daVinci = new Artist(\"da Vinci\");\r\n\t\tthis.mona = new Painting(daVinci, \"Mona Lisa\");\r\n\t\t//this.lastSupper = new Painting(this.daVinci, \"Last Supper\");\r\n\t}", "public void initData(){\r\n \r\n }", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "public Biodata() {\n initComponents();\n //pemanggilan fungsi koneksi database yang sudah kita buat pada class koneksi.java\n ConnectionDB DB = new ConnectionDB();\n DB.config();\n con = DB.con;\n stat = DB.stm;\n pst = DB.pst;\n data_table_mahasiswa();\n }", "public beranda() {\n initComponents();\n koneksi DB = new koneksi();\n DB.config();\n con = DB.con;\n st = DB.stm;\n ShowDataStore();\n ShowPermintaanStore();\n ShowPermintaanGudang();\n ShowDataStoreKurang15();\n }", "public void verarbeite() {\n\t\t\r\n\t}", "public void initialiserBD() {\n\n // on crée une personne avec tous les champs à vide, cela nous permettra de tester l'existence de la BD pour les futurs lancements.\n pdao.open();\n pdao.creerPersonnePremierLancement();\n pdao.close();\n\n // création des 3 listes\n Liste liste1 = new Liste(1, \"Maison\", \"La liste de ma maison\");\n Liste liste2 = new Liste(2, \"Garage\", \"La liste de mon garage\");\n Liste liste3 = new Liste(3, \"Magasin\", \"La liste de mon magasin\");\n\n // ajout des listes\n ldao.open();\n ldao.ajouterListe(liste1);\n ldao.ajouterListe(liste2);\n ldao.ajouterListe(liste3);\n ldao.close();\n\n // on ajoute 3 catégories\n CategorieDAO categorieDAO = new CategorieDAO(this);\n categorieDAO.open();\n Categorie cuisine = new Categorie(0, \"Cuisine\", \"Tous les objets de la cuisine\");\n Categorie salon = new Categorie(0, \"Salon\", \"Tous les objets du Salon\");\n Categorie chambre = new Categorie(0, \"Chambre\", \"Tous les objets de la chambre\");\n categorieDAO.addCategorie(cuisine);\n categorieDAO.addCategorie(salon);\n categorieDAO.addCategorie(chambre);\n categorieDAO.close();\n\n Date date = new Date();\n\n // Création de la classe utilitaire pour les dates\n Utils utils = new Utils(this);\n String dateSimpleDateFormat = utils.getDateSimpleDateFormat();\n SimpleDateFormat sdf = new SimpleDateFormat(dateSimpleDateFormat);\n String dateDuJour = sdf.format(date);\n\n // texte explicatif\n String explication = \"Cet objet est crée au demarrage de l'application, vous pouvez le supprimer en cliquant dessus.\";\n\n // on ajoute 6 bien pour exemple\n Bien bien1 = new Bien(1, \"Lunette\", dateDuJour, dateDuJour, \"\", \"Légèrement rayées sur le coté\", \"251\", \"\", \"\", \"\", \"\", 2, explication, \"\");\n Bien bien2 = new Bien(2, \"Frigo\", dateDuJour, dateDuJour, \"\", \"\", \"3599\", \"\", \"\", \"\", \"\", 1, explication, \"45DG425845DA\");\n Bien bien3 = new Bien(3, \"Ordinateur\", dateDuJour, dateDuJour, \"\", \"Manque une touche\", \"1099\", \"\", \"\", \"\", \"\", 3, explication, \"515D-TGH2336\");\n Bien bien4 = new Bien(4, \"Vaisselle\", dateDuJour, dateDuJour, \"\", \"Vaisselle de Mémé\", \"6902\", \"\", \"\", \"\", \"\", 1, explication, \"\");\n Bien bien5 = new Bien(5, \"TV\", dateDuJour, dateDuJour, \"\", \"\", \"350\", \"\", \"\", \"\", \"\", 2, explication, \"\");\n Bien bien6 = new Bien(6, \"Home cinéma\", dateDuJour, dateDuJour, \"\", \"Marque Pioneer - Une enceinte grésille un peu\", \"400\", \"\", \"\", \"\", \"\", 2, explication, \"\");\n\n\n // dans la liste 1\n ArrayList<Integer> listeIdListe1 = new ArrayList<Integer>();\n listeIdListe1.add(1);\n\n\n bdao.open();\n\n bdao.addBien(bien1, listeIdListe1);\n bdao.addBien(bien2, listeIdListe1);\n bdao.addBien(bien3, listeIdListe1);\n bdao.addBien(bien4, listeIdListe1);\n bdao.addBien(bien5, listeIdListe1);\n bdao.addBien(bien6, listeIdListe1);\n\n bdao.close();\n }", "public dataPegawai() {\n initComponents();\n koneksiDatabase();\n tampilGolongan();\n tampilDepartemen();\n tampilJabatan();\n Baru();\n }", "@Override\n\tpublic void initData() {\n\n\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void InitData() {\n\t}", "public void initialDatabaseAutomatikFunctionInformation () {\n Calendar calendar = Calendar.getInstance();\n Integer currentYear = calendar.get(Calendar.YEAR);\n Integer month = calendar.get(Calendar.MONTH); //Januar wird als \"0\" übergeben.\n Integer currentMonth = month + 1;\n\n String initialDateName = \"AutoDBFunction\" + currentYear.toString() + currentMonth.toString();\n\n //erstelle Speicherdatei und anlegen von Eintrag\n SharedPreferences sharedPreferences = getSharedPreferences(\"SP_DBFunction\", 0);\n SharedPreferences.Editor editor = sharedPreferences.edit(); //Editorklasse initialisieren (um zu schreiben)\n editor.putBoolean(initialDateName, true); //Inhalt übergeben (Key, Value)\n editor.commit();\n }", "public DesastreData() { //\r\n\t}", "public Datenauswahl() {\n initComponents();\n }", "public void createDienst()\n\t{\n\t\twriteDb(\"INSERT INTO dienstleistung (Bezeichnung, Preis)\" + \"VALUES('\" + typ + \"', '\" + preis +\"')\", getWriteCon());\n\t\tcommitDbConnection(getWriteCon());\n\t}", "public void inicializar();", "public AdminData() {\n initComponents();\n TampilData();\n }", "@Override\n\tpublic void verkaufen() {\n\t}", "public DanielPatricio() throws SQLException {\n initComponents();\n //limpiar();\n recargarDropDownCarros();\n recargarTextArea();\n recargarDataTable();\n \n \n }", "private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "abstract void initializeNeededData();", "public void setdat()\n {\n }", "private FundInfo() {\n initFields();\n }", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "@Override\n\tpublic void initData() {\n\n\t}", "public void loescheEintrag() {\n\t\tzahl = 0;\n\t\tistEbenenStart = false;\n\t}", "public Saida() {\n initComponents();\n defaults();\n preencherTabela();\n \n }", "public Kelola_Data_Dokter() {\n initComponents();\n }", "private void initData() {\n\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\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tprotected void initVentajas() {\n\r\n\t}", "@Override\r\n\tpublic void initData() {\n\t}", "private void initData() {\n\n }", "private synchronized void init(){\n _2_zum_vorbereiten.addAll(spielzeilenRepo.find_B_ZurVorbereitung());\n _3_vorbereitet.addAll(spielzeilenRepo.find_C_Vorbereitet());\n _4_spielend.addAll(spielzeilenRepo.find_D_Spielend());\n }", "@Override\n\tpublic void initData() {\n\t\t\n\t}", "private void initData(){\n\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n nomeUtilizador.setText(f.getNome());\n factory = Persistence.createEntityManagerFactory(Persistence_UNIT_NAME);\n EntityManager em = factory.createEntityManager();\n Query q = em.createNamedQuery(\"Funcionario.findByIdfuncionario\");\n q.setParameter(\"idfuncionario\", a.getIdfuncionario());\n \n Funcionario admin = new Funcionario();\n admin = (Funcionario) q.getSingleResult();\n \n BigDecimal id = ((Funcionario) admin).getIdfuncionario();\n String nome = ((Funcionario) admin).getNome();\n password = ((Funcionario) admin).getPassword();\n String morada = ((Funcionario) admin).getRua();\n String email = ((Funcionario) admin).getEmail();\n BigInteger ncc = ((Funcionario) admin).getNcc();\n BigInteger nif = ((Funcionario) admin).getNif();\n String data = ((Funcionario) admin).getDataNascimento();\n BigInteger telemovel = ((Funcionario) admin).getTelemovel();\n \n \n adminNome.setText(nome);\n //adminPassword.setText(password);\n adminMorada.setText(morada);\n adminEmail.setText(email);\n adminNcc.setText(ncc.toString() );\n adminNif.setText(nif.toString());\n adminData.setValue(LocalDate.parse(data));\n adminTelemovel.setText(telemovel.toString());\n }", "Kerucut(){\r\n Tabung tab = new Tabung();\r\n tinggi=tab.getTinggi();\r\n }", "@Override\n public void afficher() {\n super.afficher();\n System.out.println(\"Sexe : \" + getSexe());\n System.out.println(\"Numéro de sécurité sociale : \" + getNumeroSecuriteSociale());\n System.out.println(\"Date de naissance : \" + getDateDeNaissance().format(DateTimeFormatter.ofLocalizedDate(FormatStyle.LONG)));\n System.out.println(\"Commentaires : \" + getCommentaires());\n this.adresse.afficher();\n }", "public Estudiante() {\r\n\t\tsuper();\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "private void initData() {\n Author steinbeck = new Author(\"John\", \"Steinbeck\");\n Publisher p1 = new Publisher(\"Covici Friede\", \"111 Main Street\", \"Santa Cruz\", \"CA\", \"95034\");\n Book omam = new Book(\"Of Mice And Men\", \"11234\", p1);\n \n publisherRepository.save(p1);\n\n steinbeck.getBooks().add(omam);\n omam.getAuthors().add(steinbeck);\n authorRepository.save(steinbeck);\n bookRepository.save(omam);\n\n // Create Crime & Punishment\n Author a2 = new Author(\"Fyodor\", \"Dostoevsky\");\n Publisher p2 = new Publisher( \"The Russian Messenger\", \"303 Stazysky Rao\", \"Rustovia\", \"OAL\", \"00933434-3943\");\n Book b2 = new Book(\"Crime and Punishment\", \"22334\", p2);\n a2.getBooks().add(b2);\n b2.getAuthors().add(a2);\n\n publisherRepository.save(p2);\n authorRepository.save(a2);\n bookRepository.save(b2);\n }", "@PostConstruct\n\tprivate void init() {\n\t\tEntrada entr = new Entrada(\n\t\t\t\tnew Persona(\"Manuel\",\"Jimenex\",\"52422\",\"100000\",\"Cra 340\"),\n\t\t\t\t(new PreFactura(1l,new Date())), itemsService.lista());\n\t\t\n\t\tlistaEntrada.add(entr);\n\t}", "public void initForAddNew() {\r\n\r\n\t}", "private void initData() {\n }", "public static void init()\n\t{\n\t\t\n\t\tu.creerGalaxie(\"VoieLactee\", \"spirale\", 0);\n\t\tu.creerEtoile(\"Soleil\", 0, 'F', u.getGalaxie(\"VoieLactee\")); //1\n\t\tu.creerObjetFroid(\"Terre\", 150000 , 13000 , 365 , u.getObjet(1)); //2\n\n\t\tu.creerObjetFroid(\"Lune\", 200 , 5000 , 30 , u.getObjet(2)); //3\n\n\t\tu.creerObjetFroid(\"Mars\", 200000 , 11000 , 750 , u.getObjet(1)); //4\n\n\t\tu.creerObjetFroid(\"Phobos\", 150 , 500 , 40 , u.getObjet(4)); //5\n\n\t\tu.creerObjetFroid(\"Pluton\", 1200000 , 4000 , 900 , u.getObjet(1)); //6\n\n\t\tu.creerEtoile(\"Sirius\", 2, 'B', u.getGalaxie(\"VoieLactee\")); //7\n\n\t\tu.creerObjetFroid(\"BIG-1\", 1000 , 50000 , 333 , u.getObjet(7)); //8\n\n\t\tu.creerGalaxie(\"M31\", \"lenticulaire\", 900000);\n\t\tu.creerEtoile(\"XS67\", 8, 'F', u.getGalaxie(\"M31\")); //9\n\t\tu.creerObjetFroid(\"XP88\", 160000 , 40000 , 400 , u.getObjet(9)); //10\n\t}", "@PrePersist\n\tvoid erstelltam() {\n\t\tthis.erstelltam = new GregorianCalendar();\n\t}", "public Descripcion() {\n cnx= new ConexionDB();\n }", "public CTematicaBienestar() {\r\n\t}", "@Override\r\n\tpublic void loeschen() {\r\n//\t\tsuper.leuchterAbmelden(this);\r\n\t\tsuper.loeschen();\r\n\t}", "public Gestionnaire_Bdd(){\n\t\ttry {\n\t\t\t//Chargement driver hsqldb\n\t\t\tClass.forName(\"org.hsqldb.jdbcDriver\").newInstance();\n\t\t\t\n\t\t\tconnexion = DriverManager.getConnection(\"jdbc:hsqldb:file:BiblioBDD\", \"sa\", \"\");\n\t\t\trequete = connexion.createStatement();\n\t\t\tcreerTables();\n\t\t\t\n\t\t\tselection(new String[]{\"niveau\", \"professeur\"}, \"classes\");\n\t\t\trafraichir_tableau();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InstantiationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public RekapKamar() {\n Koneksi DB = new Koneksi();\n DB.koneksi();\n con = DB.conn;\n stat = DB.stmn;\n initComponents();\n loadTabel();\n }", "public void InitData() {\n }", "private void loadStaticData(){\n this.specialisaties = this.dbFacade.getAllSpecialisaties();\n this.jComboBoxSpecialisatie.setModel(new DefaultComboBoxModel(this.specialisaties.toArray()));\n this.SpecialisatieSitueert = this.dbFacade.getAllSitueert();\n this.jComboBoxSitueert.setModel(new DefaultComboBoxModel(this.SpecialisatieSitueert.toArray()));\n }", "private void remplirUtiliseData() {\n\t}", "public void wuerfeln() {\n if (istGefängnis) {\n setIstGefängnis(false);\n if (aktuellesFeldName instanceof GefängnisFeld && !(aktuellesFeldName instanceof NurZuBesuchFeld)) {\n GefängnisFeld g = (GefängnisFeld) aktuellesFeldName;\n g.gefaengnisAktion(this);\n \n return;\n }\n\n } else {\n String[] worte = {\"Eins\", \"Zwei\", \"Drei\", \"Vier\", \"Fünf\", \"Sechs\", \"Sieben\", \"Acht\", \"Neun\", \"Zehn\", \"Elf\", \"Zwölf\"};\n\n wuerfelZahl = getRandomInteger(12, 1);\n\n this.aktuellesFeld = this.aktuellesFeld + wuerfelZahl + 1;\n if (this.aktuellesFeld >= 40) {\n setAktuellesFeld(0);\n\n }\n\n System.out.println(worte[wuerfelZahl] + \" gewürfelt\");\n\n aktuellesFeldName = spielfigurSetzen(this.aktuellesFeld);\n System.out.println(\"Du befindest dich auf Feld-Nr: \" + (this.aktuellesFeld));\n boolean check = false;\n for (Spielfelder s : felderInBesitz) {\n if (aktuellesFeldName.equals(s)) {\n check = true;\n }\n }\n\n if (!check) {\n aktuellesFeldName.spielfeldAktion(this, aktuellesFeldName);\n } else {\n System.out.println(\"Das Feld: \" + aktuellesFeldName.getFeldname() + \"(Nr: \" + aktuellesFeldName.getFeldnummer() + \")gehört dir!\");\n if (aktuellesFeldName instanceof Straße) {\n Straße strasse = (Straße) aktuellesFeldName;\n System.out.println(\"Farbe: \" + strasse.getFarbe());\n try {\n strasse.hausBauen(this, strasse);\n } catch (IOException ex) {\n Logger.getLogger(Spieler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n }\n }\n }", "private DittaAutonoleggio(){\n \n }", "public DataManage() {\r\n\t\tsuper();\r\n\t}", "public void initData() {\n }", "public void initData() {\n }", "protected Asignatura()\r\n\t{}", "private void initialData() {\n\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "protected @Override\r\n abstract void initData();", "public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "public RecipeDataBase(){\n //recipes = new ArrayList<>();\n loadDatabase();\n \n }", "public Empfänger() {\t\t\t\t\t// std. Konstruktor\r\n\t\t}", "private void remplirPrestaraireData() {\n\t}" ]
[ "0.6883984", "0.67601603", "0.6747022", "0.669013", "0.6576804", "0.65303826", "0.6400503", "0.6395176", "0.6386332", "0.6380618", "0.6380618", "0.6380618", "0.6380618", "0.6380618", "0.6380618", "0.636853", "0.63662875", "0.6343627", "0.63369197", "0.63256276", "0.6313038", "0.63130116", "0.6303696", "0.6288185", "0.6288185", "0.62851", "0.62741596", "0.6273799", "0.6264849", "0.6264066", "0.6261734", "0.6258986", "0.625337", "0.62488633", "0.6239953", "0.6229557", "0.62216944", "0.62175125", "0.62118894", "0.6208531", "0.61973417", "0.6187369", "0.6173535", "0.6169602", "0.6164353", "0.61475956", "0.6141525", "0.61385477", "0.61384445", "0.61384445", "0.61363256", "0.6136199", "0.60962176", "0.6096076", "0.60939914", "0.60939914", "0.60939914", "0.60920453", "0.60897464", "0.6088681", "0.6081922", "0.60816884", "0.60816884", "0.6061364", "0.60577476", "0.60551834", "0.60526246", "0.6052026", "0.6040979", "0.60352623", "0.6026886", "0.6025039", "0.60172653", "0.60157704", "0.601472", "0.6007922", "0.6004816", "0.60038847", "0.59911376", "0.59907997", "0.59872854", "0.5985832", "0.59760463", "0.59754074", "0.59751856", "0.5969045", "0.59684354", "0.5960164", "0.59590995", "0.59550136", "0.59549445", "0.59542173", "0.59542173", "0.59508777", "0.59500843", "0.5948939", "0.59467083", "0.5941003", "0.5932556", "0.5927745", "0.59211004" ]
0.0
-1
Users cannot naturally specify an optional type in YAML format. This override allows users to declare a nondefault namespace for the Ingress object.
public IngressContactPointProvider(Node node, String serviceName, String ingressName, String namespace) { this(node, serviceName, ingressName, Optional.of(namespace)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Ingress() {\n }", "public interface IDevopsIngressService {\n\n void createIngress(String ingressYaml, String name, String namespace);\n\n void deleteIngress(String name, String namespace);\n}", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/ingresses/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<Ingress> replaceIngress(\n @Path(\"name\") String name, \n @Body Ingress body);", "@Override\n\tpublic String getNamespace() {\n\t\treturn null;\n\t}", "@Override\npublic String getType() {\n\treturn null;\n}", "default @org.jetbrains.annotations.Nullable java.lang.String getType() {\n return null;\n }", "@Deprecated\n public V1IngressBackend getDefaultBackend();", "@Override\r\n\tpublic String getNamespace() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic String getTypeAsName() {\n\t\treturn null;\n\t}", "@FeignClient(value = \"${noun-id}\", fallback = NounFallback.class)\n@Order(5)\npublic interface NounClient extends WordServicesClient {\n @Override\n default ServiceNameOrder getServiceName(){\n return ServiceNameOrder.noun;\n }\n}", "@ProviderType\npublic interface ServiceUserMapped {\n\n\n /**\n * The name of the osgi property holding the sub service name.\n */\n String SUBSERVICENAME = \"subServiceName\";\n\n}", "public interface YamlMapping extends YamlElement {\n}", "@Override\r\n\tpublic String getType() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getType() {\n\t\treturn null;\r\n\t}", "public ReplaceIngress pretty(String pretty) {\n put(\"pretty\", pretty);\n return this;\n }", "String getDefaultType();", "BasicRestAnnotation() {\n\t}", "public interface IDevopsIngressService {\n\n void createIngress(String ingressYaml, String name, String namespace, Long envId, Long commandId);\n\n void deleteIngress(String name, String namespace, Long envId, Long commandId);\n}", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/ingresses/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Ingress> patchIngress(\n @Path(\"name\") String name, \n @Body Ingress body);", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/ingresses/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<Ingress> replaceIngress(\n @Path(\"name\") String name, \n @Body Ingress body, \n @QueryMap ReplaceIngress queryParameters);", "ApiEndpointType getType();", "@Override\r\n\tpublic String getNamespaceURI() {\n\t\treturn null;\r\n\t}", "@HTTP(\n method = \"PUT\",\n path = \"/apis/config.openshift.io/v1/ingresses/{name}/status\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/json\",\n \"Accept: */*\"\n })\n KubernetesCall<Ingress> replaceIngressStatus(\n @Path(\"name\") String name, \n @Body Ingress body);", "public Class<? extends Annotation> getDeploymentType()\n {\n return _deploymentType;\n }", "@Override\r\n\t\tpublic String getNamespaceURI()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "AutomaticScalingType createAutomaticScalingType();", "void setDefaultEndpoint(Endpoint defaultEndpoint);", "Endpoint getDefaultEndpoint();", "@ProviderType\npublic interface StringConstraint extends BaseConstraint, FormatConstraint {\n\n /**\n * Returns the minimum length of the data. The constraint is applicable only for field with type string\n *\n * @return minimum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMinLength();\n\n /**\n * Returns the maximum length of the data. The constraint is applicable only for field with type string\n *\n * @return maximum length of the data\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n @JsonInclude(JsonInclude.Include.NON_NULL)\n Integer getMaxLength();\n\n /**\n * As specified in the JSON Schema specification, the regex against which the value of the field should be tested with.\n *\n * Returns the regex. The constraint is applicable only for field with type string\n *\n * @return string represented as pattern\n * @since com.adobe.cq.forms.core.components.models.form 0.0.1\n */\n default String getPattern() {\n return null;\n }\n}", "public boolean usesTypeAnnotations() {\n return true;\n }", "public String typeOf() { return null; }", "@Override\n\tprotected String getNamespace() {\n\t\treturn NAMESPACE;\n\t}", "public interface Aspect {\n /**\n * Deployment model, when no aspect name is specified\n *\n * @org.codehaus.backport175.DefaultValue(\"perJVM\")\n */\n String value();\n\n /**\n * Deployment model, when aspect name is specified\n *\n * @org.codehaus.backport175.DefaultValue(\"perJVM\")\n */\n String deploymentModel();\n\n /**\n * Aspect name (defaults to fully qualified name of aspect class)\n */\n String name();\n}", "interface Blank\n extends GroupableResource.DefinitionWithRegion<WithGroup> {\n }", "@Override\n\tpublic String getAoType() {\n\t\treturn null;\n\t}", "public void parameterAnnotation_WithRuntimeRetention(@ParamAnnoRuntime final int input) {\n }", "@NotNull\n/* 42 */ public PolicyType getType() { return this.myType; }", "public Class<? extends Annotation> annotationType() {\n\t\treturn null;\r\n\t}", "@Override\n public Type getType() {\n return null;\n }", "@Override\n public String getType()\n {\n return \"OO\";\n }", "default void putConcept(ConceptName name, Concept concept) {}", "interface Definition extends\n NamespaceAuthorizationRule.DefinitionStages.Blank,\n NamespaceAuthorizationRule.DefinitionStages.WithCreate {\n }", "public Optional<String> namespace() {\n return Codegen.stringProp(\"namespace\").config(config).get();\n }", "TypeConstraintMappingContext<C> ignoreAllAnnotations();", "public static TypeDescription getTypeDescription(){\n return new TypeDescription(ToscaInputsAnnotation.class);\n\t}", "public interface AwesomeService {\n\n public final static String label = \"core::service::ui::AwesomeService\";\n\n public Node getIcon(final Path path);\n}", "@Override\r\n\t\tpublic boolean isDefaultNamespace(String namespaceURI)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}", "public interface ServerLabelGenerator\n{\n /**\n * Builds a label from the supplied server type.\n *\n * @param type the type of server instantiation\n * @return a string that identifies the type to a user\n */\n String buildLabelFromType(String type);\n}", "@Override\r\n\tpublic String getTypeName() {\n\t\treturn null;\r\n\t}", "@NonNull\n @Override\n public String getType() {\n return \"\";\n }", "java.lang.String getNamespace();", "public static int intAnnotation(PodTemplateSpec podSpec, String annotation, int defaultValue, String... deprecatedAnnotations) {\n ObjectMeta metadata = podSpec.getMetadata();\n String str = annotation(annotation, null, metadata, deprecatedAnnotations);\n return str != null ? parseInt(str) : defaultValue;\n }", "interface Blank extends GroupableResourceCore.DefinitionWithRegion<WithGroup> {\n }", "interface Blank extends GroupableResourceCore.DefinitionWithRegion<WithGroup> {\n }", "public String getNamespace() {\n return getTypeDefinition().getNamespace();\n }", "@Override\n\tpublic Type getType() {\n\t\treturn null;\n\t}", "@Override\n public abstract void serializeWithType(JsonGenerator jgen, SerializerProvider ctxt,\n TypeSerializer typeSer)\n throws JacksonException;", "EndpointType endpointType();", "public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }", "public CreateIngress pretty(String pretty) {\n put(\"pretty\", pretty);\n return this;\n }", "public static String stringAnnotation(PodTemplateSpec podSpec, String annotation, String defaultValue, String... deprecatedAnnotations) {\n ObjectMeta metadata = podSpec.getMetadata();\n String str = annotation(annotation, null, metadata, deprecatedAnnotations);\n return str != null ? str : defaultValue;\n }", "@Override\n\tpublic void namespace() {\n\t\t\n\t}", "@Override\n public boolean isNotationDeclared(String name) { return false; }", "void setObjectType(String objectType);", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "public InsulinType(){\n super();\n }", "@Override\n public Type type() {\n return null;\n }", "interface Blank extends WithResourceGroup {\n }", "interface Blank extends WithResourceGroup {\n }", "interface Blank extends WithResourceGroup {\n }", "@Override\r\n\tpublic Annotation annotate() {\n\t\treturn null;\r\n\t}", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/ingresses/{name}/status\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Ingress> patchIngressStatus(\n @Path(\"name\") String name, \n @Body Ingress body);", "public interface AttentionService extends CoreService<AttentionDO> {\n \n}", "@javax.annotation.Generated(value = \"jsii-pacmak/1.30.0 (build adae23f)\", date = \"2021-06-28T03:55:36.027Z\")\n@software.amazon.jsii.Jsii(module = imports.k8s.$Module.class, fqn = \"k8s.KubeServiceAccountProps\")\n@software.amazon.jsii.Jsii.Proxy(KubeServiceAccountProps.Jsii$Proxy.class)\npublic interface KubeServiceAccountProps extends software.amazon.jsii.JsiiSerializable {\n\n /**\n * AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted.\n * <p>\n * Can be overridden at the pod level.\n */\n default @org.jetbrains.annotations.Nullable java.lang.Boolean getAutomountServiceAccountToken() {\n return null;\n }\n\n /**\n * ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount.\n * <p>\n * ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod\n */\n default @org.jetbrains.annotations.Nullable java.util.List<imports.k8s.LocalObjectReference> getImagePullSecrets() {\n return null;\n }\n\n /**\n * Standard object's metadata.\n * <p>\n * More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata\n */\n default @org.jetbrains.annotations.Nullable imports.k8s.ObjectMeta getMetadata() {\n return null;\n }\n\n /**\n * Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount.\n * <p>\n * More info: https://kubernetes.io/docs/concepts/configuration/secret\n */\n default @org.jetbrains.annotations.Nullable java.util.List<imports.k8s.ObjectReference> getSecrets() {\n return null;\n }\n\n /**\n * @return a {@link Builder} of {@link KubeServiceAccountProps}\n */\n static Builder builder() {\n return new Builder();\n }\n /**\n * A builder for {@link KubeServiceAccountProps}\n */\n public static final class Builder implements software.amazon.jsii.Builder<KubeServiceAccountProps> {\n private java.lang.Boolean automountServiceAccountToken;\n private java.util.List<imports.k8s.LocalObjectReference> imagePullSecrets;\n private imports.k8s.ObjectMeta metadata;\n private java.util.List<imports.k8s.ObjectReference> secrets;\n\n /**\n * Sets the value of {@link KubeServiceAccountProps#getAutomountServiceAccountToken}\n * @param automountServiceAccountToken AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted.\n * Can be overridden at the pod level.\n * @return {@code this}\n */\n public Builder automountServiceAccountToken(java.lang.Boolean automountServiceAccountToken) {\n this.automountServiceAccountToken = automountServiceAccountToken;\n return this;\n }\n\n /**\n * Sets the value of {@link KubeServiceAccountProps#getImagePullSecrets}\n * @param imagePullSecrets ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount.\n * ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod\n * @return {@code this}\n */\n @SuppressWarnings(\"unchecked\")\n public Builder imagePullSecrets(java.util.List<? extends imports.k8s.LocalObjectReference> imagePullSecrets) {\n this.imagePullSecrets = (java.util.List<imports.k8s.LocalObjectReference>)imagePullSecrets;\n return this;\n }\n\n /**\n * Sets the value of {@link KubeServiceAccountProps#getMetadata}\n * @param metadata Standard object's metadata.\n * More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata\n * @return {@code this}\n */\n public Builder metadata(imports.k8s.ObjectMeta metadata) {\n this.metadata = metadata;\n return this;\n }\n\n /**\n * Sets the value of {@link KubeServiceAccountProps#getSecrets}\n * @param secrets Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount.\n * More info: https://kubernetes.io/docs/concepts/configuration/secret\n * @return {@code this}\n */\n @SuppressWarnings(\"unchecked\")\n public Builder secrets(java.util.List<? extends imports.k8s.ObjectReference> secrets) {\n this.secrets = (java.util.List<imports.k8s.ObjectReference>)secrets;\n return this;\n }\n\n /**\n * Builds the configured instance.\n * @return a new instance of {@link KubeServiceAccountProps}\n * @throws NullPointerException if any required attribute was not provided\n */\n @Override\n public KubeServiceAccountProps build() {\n return new Jsii$Proxy(automountServiceAccountToken, imagePullSecrets, metadata, secrets);\n }\n }\n\n /**\n * An implementation for {@link KubeServiceAccountProps}\n */\n @software.amazon.jsii.Internal\n final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements KubeServiceAccountProps {\n private final java.lang.Boolean automountServiceAccountToken;\n private final java.util.List<imports.k8s.LocalObjectReference> imagePullSecrets;\n private final imports.k8s.ObjectMeta metadata;\n private final java.util.List<imports.k8s.ObjectReference> secrets;\n\n /**\n * Constructor that initializes the object based on values retrieved from the JsiiObject.\n * @param objRef Reference to the JSII managed object.\n */\n protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {\n super(objRef);\n this.automountServiceAccountToken = software.amazon.jsii.Kernel.get(this, \"automountServiceAccountToken\", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));\n this.imagePullSecrets = software.amazon.jsii.Kernel.get(this, \"imagePullSecrets\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(imports.k8s.LocalObjectReference.class)));\n this.metadata = software.amazon.jsii.Kernel.get(this, \"metadata\", software.amazon.jsii.NativeType.forClass(imports.k8s.ObjectMeta.class));\n this.secrets = software.amazon.jsii.Kernel.get(this, \"secrets\", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(imports.k8s.ObjectReference.class)));\n }\n\n /**\n * Constructor that initializes the object based on literal property values passed by the {@link Builder}.\n */\n @SuppressWarnings(\"unchecked\")\n protected Jsii$Proxy(final java.lang.Boolean automountServiceAccountToken, final java.util.List<? extends imports.k8s.LocalObjectReference> imagePullSecrets, final imports.k8s.ObjectMeta metadata, final java.util.List<? extends imports.k8s.ObjectReference> secrets) {\n super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);\n this.automountServiceAccountToken = automountServiceAccountToken;\n this.imagePullSecrets = (java.util.List<imports.k8s.LocalObjectReference>)imagePullSecrets;\n this.metadata = metadata;\n this.secrets = (java.util.List<imports.k8s.ObjectReference>)secrets;\n }\n\n @Override\n public final java.lang.Boolean getAutomountServiceAccountToken() {\n return this.automountServiceAccountToken;\n }\n\n @Override\n public final java.util.List<imports.k8s.LocalObjectReference> getImagePullSecrets() {\n return this.imagePullSecrets;\n }\n\n @Override\n public final imports.k8s.ObjectMeta getMetadata() {\n return this.metadata;\n }\n\n @Override\n public final java.util.List<imports.k8s.ObjectReference> getSecrets() {\n return this.secrets;\n }\n\n @Override\n @software.amazon.jsii.Internal\n public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {\n final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;\n final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();\n\n if (this.getAutomountServiceAccountToken() != null) {\n data.set(\"automountServiceAccountToken\", om.valueToTree(this.getAutomountServiceAccountToken()));\n }\n if (this.getImagePullSecrets() != null) {\n data.set(\"imagePullSecrets\", om.valueToTree(this.getImagePullSecrets()));\n }\n if (this.getMetadata() != null) {\n data.set(\"metadata\", om.valueToTree(this.getMetadata()));\n }\n if (this.getSecrets() != null) {\n data.set(\"secrets\", om.valueToTree(this.getSecrets()));\n }\n\n final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();\n struct.set(\"fqn\", om.valueToTree(\"k8s.KubeServiceAccountProps\"));\n struct.set(\"data\", data);\n\n final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();\n obj.set(\"$jsii.struct\", struct);\n\n return obj;\n }\n\n @Override\n public final boolean equals(final Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n\n KubeServiceAccountProps.Jsii$Proxy that = (KubeServiceAccountProps.Jsii$Proxy) o;\n\n if (this.automountServiceAccountToken != null ? !this.automountServiceAccountToken.equals(that.automountServiceAccountToken) : that.automountServiceAccountToken != null) return false;\n if (this.imagePullSecrets != null ? !this.imagePullSecrets.equals(that.imagePullSecrets) : that.imagePullSecrets != null) return false;\n if (this.metadata != null ? !this.metadata.equals(that.metadata) : that.metadata != null) return false;\n return this.secrets != null ? this.secrets.equals(that.secrets) : that.secrets == null;\n }\n\n @Override\n public final int hashCode() {\n int result = this.automountServiceAccountToken != null ? this.automountServiceAccountToken.hashCode() : 0;\n result = 31 * result + (this.imagePullSecrets != null ? this.imagePullSecrets.hashCode() : 0);\n result = 31 * result + (this.metadata != null ? this.metadata.hashCode() : 0);\n result = 31 * result + (this.secrets != null ? this.secrets.hashCode() : 0);\n return result;\n }\n }\n}", "public void setTypeName(java.lang.String value);", "public ReadIngress pretty(String pretty) {\n put(\"pretty\", pretty);\n return this;\n }", "@Override\n public String getType() {\n return \"\";\n }", "public void setReviewType(java.lang.String value);", "Builder addLearningResourceType(String value);", "void setNamespace(java.lang.String namespace);", "@JsonSetter(\"restrictionType\")\r\n public void setRestrictionType (String value) { \r\n this.restrictionType = value;\r\n }", "ConceptType createConceptType();", "TypeDescription validated();", "public String getOntologyType(){\r\n\t\treturn null;\r\n\t}", "public interface AnnotationValue {\n}", "String getNamespaceStringValue(Object ns);", "public String getAnnotationSubPackageProperty() {\n return null;\n }", "public ReplaceIngressStatus pretty(String pretty) {\n put(\"pretty\", pretty);\n return this;\n }", "@HTTP(\n method = \"PATCH\",\n path = \"/apis/config.openshift.io/v1/ingresses/{name}\",\n hasBody = true\n )\n @Headers({ \n \"Content-Type: application/merge-patch+json\",\n \"Accept: */*\"\n })\n KubernetesCall<Ingress> patchIngress(\n @Path(\"name\") String name, \n @Body Ingress body, \n @QueryMap PatchIngress queryParameters);", "@javax.annotation.Generated(value = \"jsii-pacmak/1.30.0 (build adae23f)\", date = \"2021-06-28T03:55:35.889Z\")\n@software.amazon.jsii.Jsii(module = imports.k8s.$Module.class, fqn = \"k8s.DeploymentStrategy\")\n@software.amazon.jsii.Jsii.Proxy(DeploymentStrategy.Jsii$Proxy.class)\npublic interface DeploymentStrategy extends software.amazon.jsii.JsiiSerializable {\n\n /**\n * Rolling update config params.\n * <p>\n * Present only if DeploymentStrategyType = RollingUpdate.\n */\n default @org.jetbrains.annotations.Nullable imports.k8s.RollingUpdateDeployment getRollingUpdate() {\n return null;\n }\n\n /**\n * Type of deployment.\n * <p>\n * Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.\n * <p>\n * Default: RollingUpdate.\n */\n default @org.jetbrains.annotations.Nullable java.lang.String getType() {\n return null;\n }\n\n /**\n * @return a {@link Builder} of {@link DeploymentStrategy}\n */\n static Builder builder() {\n return new Builder();\n }\n /**\n * A builder for {@link DeploymentStrategy}\n */\n public static final class Builder implements software.amazon.jsii.Builder<DeploymentStrategy> {\n private imports.k8s.RollingUpdateDeployment rollingUpdate;\n private java.lang.String type;\n\n /**\n * Sets the value of {@link DeploymentStrategy#getRollingUpdate}\n * @param rollingUpdate Rolling update config params.\n * Present only if DeploymentStrategyType = RollingUpdate.\n * @return {@code this}\n */\n public Builder rollingUpdate(imports.k8s.RollingUpdateDeployment rollingUpdate) {\n this.rollingUpdate = rollingUpdate;\n return this;\n }\n\n /**\n * Sets the value of {@link DeploymentStrategy#getType}\n * @param type Type of deployment.\n * Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.\n * @return {@code this}\n */\n public Builder type(java.lang.String type) {\n this.type = type;\n return this;\n }\n\n /**\n * Builds the configured instance.\n * @return a new instance of {@link DeploymentStrategy}\n * @throws NullPointerException if any required attribute was not provided\n */\n @Override\n public DeploymentStrategy build() {\n return new Jsii$Proxy(rollingUpdate, type);\n }\n }\n\n /**\n * An implementation for {@link DeploymentStrategy}\n */\n @software.amazon.jsii.Internal\n final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DeploymentStrategy {\n private final imports.k8s.RollingUpdateDeployment rollingUpdate;\n private final java.lang.String type;\n\n /**\n * Constructor that initializes the object based on values retrieved from the JsiiObject.\n * @param objRef Reference to the JSII managed object.\n */\n protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {\n super(objRef);\n this.rollingUpdate = software.amazon.jsii.Kernel.get(this, \"rollingUpdate\", software.amazon.jsii.NativeType.forClass(imports.k8s.RollingUpdateDeployment.class));\n this.type = software.amazon.jsii.Kernel.get(this, \"type\", software.amazon.jsii.NativeType.forClass(java.lang.String.class));\n }\n\n /**\n * Constructor that initializes the object based on literal property values passed by the {@link Builder}.\n */\n protected Jsii$Proxy(final imports.k8s.RollingUpdateDeployment rollingUpdate, final java.lang.String type) {\n super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);\n this.rollingUpdate = rollingUpdate;\n this.type = type;\n }\n\n @Override\n public final imports.k8s.RollingUpdateDeployment getRollingUpdate() {\n return this.rollingUpdate;\n }\n\n @Override\n public final java.lang.String getType() {\n return this.type;\n }\n\n @Override\n @software.amazon.jsii.Internal\n public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {\n final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;\n final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();\n\n if (this.getRollingUpdate() != null) {\n data.set(\"rollingUpdate\", om.valueToTree(this.getRollingUpdate()));\n }\n if (this.getType() != null) {\n data.set(\"type\", om.valueToTree(this.getType()));\n }\n\n final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();\n struct.set(\"fqn\", om.valueToTree(\"k8s.DeploymentStrategy\"));\n struct.set(\"data\", data);\n\n final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();\n obj.set(\"$jsii.struct\", struct);\n\n return obj;\n }\n\n @Override\n public final boolean equals(final Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n\n DeploymentStrategy.Jsii$Proxy that = (DeploymentStrategy.Jsii$Proxy) o;\n\n if (this.rollingUpdate != null ? !this.rollingUpdate.equals(that.rollingUpdate) : that.rollingUpdate != null) return false;\n return this.type != null ? this.type.equals(that.type) : that.type == null;\n }\n\n @Override\n public final int hashCode() {\n int result = this.rollingUpdate != null ? this.rollingUpdate.hashCode() : 0;\n result = 31 * result + (this.type != null ? this.type.hashCode() : 0);\n return result;\n }\n }\n}", "String getKubernetesServiceType();", "public interface SRSTet extends Tetromino {\r\n @Override\r\n default String getName() {\r\n return \"SRS \" + getType();\r\n }\r\n}", "IJvmTypeReferenceProvider getTypeProvider();", "boolean no_type(DiagnosticChain diagnostics, Map<Object, Object> context);", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:42.016 -0500\", hash_original_method = \"E4793A664EF98A715ED3BAC198AF4EBD\", hash_generated_method = \"B72ADD4A151BC578FAD8448CF7ED8D16\")\n \n public void setNetworkType(String type, String subtype){\n \taddTaint(type.getTaint());\n \taddTaint(subtype.getTaint());\n }", "public interface DynamicFeignClient {\n\n @RequestLine(\"POST \")\n @Headers(\"Content-Type: application/json\")\n public ResponseModel callback(@RequestBody RequestModel requestModel);\n}", "private String mapToAmazonResourceType(String resourceType) {\n if (resourceType.equalsIgnoreCase(\"template\"))\n return (\"image\");\n else if (resourceType.equalsIgnoreCase(\"userVm\"))\n return (\"instance\");\n else if (resourceType.equalsIgnoreCase(\"securityGroup\"))\n return (\"security-group\");\n else\n return (resourceType.toLowerCase());\n }", "private void defaultAnnotationTypeShouldNotBeFound(String filter) throws Exception {\n restAnnotationTypeMockMvc.perform(get(\"/api/projects/{projectId}/annotation-types?sort=id,desc&\" + filter, DEFAULT_PROJECT_ID))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restAnnotationTypeMockMvc.perform(get(\"/api/projects/{projectId}/annotation-types/count?sort=id,desc&\" + filter, DEFAULT_PROJECT_ID))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }", "void setNamespace(String namespace);", "public PatchIngress pretty(String pretty) {\n put(\"pretty\", pretty);\n return this;\n }" ]
[ "0.5483861", "0.4745404", "0.47161415", "0.4649803", "0.46257496", "0.46086556", "0.4604977", "0.45961198", "0.45759293", "0.45536032", "0.45316738", "0.4529005", "0.45157808", "0.45157808", "0.45048714", "0.44616798", "0.44521707", "0.44508094", "0.439624", "0.43869388", "0.43578056", "0.43502507", "0.4347667", "0.42409503", "0.42336094", "0.42318666", "0.42276528", "0.42267546", "0.4203968", "0.41994762", "0.41978842", "0.41907674", "0.4190283", "0.4189095", "0.41841465", "0.4183013", "0.41767484", "0.41737863", "0.41712496", "0.4164501", "0.4161865", "0.41617393", "0.4157274", "0.41520345", "0.41513684", "0.41432655", "0.4132386", "0.4131371", "0.41296327", "0.4128708", "0.41249225", "0.4121473", "0.41074535", "0.41074535", "0.41034287", "0.40962058", "0.4080019", "0.40777114", "0.4073369", "0.40697014", "0.40671512", "0.40665418", "0.40664262", "0.40642282", "0.40633333", "0.40596172", "0.40455028", "0.40445888", "0.40445888", "0.40445888", "0.40392774", "0.4037043", "0.40302616", "0.40251276", "0.4023683", "0.40127817", "0.40081677", "0.40076154", "0.40057272", "0.40043917", "0.40031815", "0.40014574", "0.39989915", "0.39979413", "0.39934844", "0.39868003", "0.39749202", "0.39707595", "0.3968867", "0.39684188", "0.3967351", "0.396375", "0.39598054", "0.39590105", "0.3958292", "0.3955528", "0.3952598", "0.39486367", "0.39466345", "0.3944224" ]
0.49078643
1
/ access modifiers changed from: protected / renamed from: b
public void mo18880b() { Class<?> cls; if (this.f6352f != null) { cls = this.f6352f.getClass(); } else { cls = this.f6353g; } this.f6354h = C2140au.m5787a(this.f6351e, cls, this.f6353g, this.f6355i); this.f6349a = this.f6354h.mo18697a((Scriptable) this, this.f6352f, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "@Override\n\tpublic void b() {\n\n\t}", "public abstract void mo70713b();", "@Override\n protected void prot() {\n }", "protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "public void b() {\r\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "@Override\n\tpublic void b1() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public void b() {\n }", "public void b() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public abstract void mo35054b();", "@Override\n\tpublic void a() {\n\t\t\n\t}", "protected void h() {}", "@Override\n\tpublic void anular() {\n\n\t}", "public abstract void mo6549b();", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "private abstract void privateabstract();", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "public abstract int b();", "public abstract Object mo1185b();", "public int b()\r\n/* 45: */ {\r\n/* 46: 58 */ g();\r\n/* 47: */ \r\n/* 48: 60 */ return super.b();\r\n/* 49: */ }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public abstract void mo45765b();", "public abstract void mo27386d();", "public abstract void mo56925d();", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public abstract Object mo26777y();", "public abstract void mo957b();", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public void mo21825b() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "public final /* bridge */ /* synthetic */ void mo43569b() {\n super.mo43569b();\n }", "protected void b(dh paramdh) {}", "public abstract void mo27385c();", "public abstract void mo27464a();", "@Override\r\n\tpublic void a1() {\n\t\t\r\n\t}", "public abstract String mo118046b();", "public abstract void m15813a();", "public abstract void mo30696a();", "@Override\n\tpublic void b() {\n\t\tSystem.out.println(\"b method\");\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "protected FanisamBato(){\n\t}", "@Override\n\tpublic void A() {\n\t\t\n\t}", "@Override\n\tpublic void A() {\n\t\t\n\t}", "public abstract void mo102899a();", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public static void bi() {\n\t}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public abstract B zzjo();", "public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo23813b() {\n }", "public void mo115190b() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void aaa() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "public /* bridge */ /* synthetic */ void mo55097d() {\n super.mo55097d();\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "public abstract int mo4375b();", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract Object mo1771a();", "public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }", "public /* bridge */ /* synthetic */ void mo55095b() {\n super.mo55095b();\n }", "protected abstract void a(bru parambru);", "public abstract C0631bt mo9227aB();", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public abstract void b(StringBuilder sb);", "public abstract BoundType b();", "public abstract void mo3994a();", "private BigB()\r\n{\tsuper();\t\r\n}", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void dormir() {\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}", "public final void mo1285b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public abstract void mo42331g();", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void b() {\n ((a) this.a).b();\n }" ]
[ "0.7265736", "0.7075669", "0.6953705", "0.6844136", "0.68171227", "0.6797052", "0.6787405", "0.6787405", "0.6724562", "0.6686567", "0.6653214", "0.6634125", "0.6575341", "0.65463716", "0.653766", "0.6515596", "0.6515596", "0.6452365", "0.64499015", "0.64412", "0.64150465", "0.6412333", "0.63859385", "0.63558835", "0.6351365", "0.633515", "0.63244826", "0.63134176", "0.6292326", "0.6290942", "0.6273222", "0.62705016", "0.6259892", "0.6259133", "0.6251753", "0.62514216", "0.62501335", "0.62420803", "0.623544", "0.62352586", "0.6230252", "0.62170464", "0.6211564", "0.6210468", "0.6170684", "0.61693376", "0.6166007", "0.61588705", "0.61464643", "0.6143804", "0.61386263", "0.61336493", "0.61323416", "0.61010426", "0.61010426", "0.60995185", "0.60924965", "0.6088509", "0.6081953", "0.60758495", "0.60745", "0.60610807", "0.6060036", "0.6047215", "0.604289", "0.60333407", "0.60307", "0.60285914", "0.60244894", "0.6024285", "0.60202384", "0.6019423", "0.60181934", "0.60101134", "0.59942377", "0.59929407", "0.59886783", "0.5984881", "0.5976094", "0.5976094", "0.5973135", "0.59697944", "0.5964492", "0.5962761", "0.5954763", "0.59541535", "0.59535825", "0.59472513", "0.5943289", "0.5939305", "0.5938501", "0.5934277", "0.5924139", "0.59232587", "0.59232587", "0.59114265", "0.5909803", "0.59096956", "0.59063077", "0.59018534", "0.58923566" ]
0.0
-1
/ renamed from: a
public Object mo18879a() { return this.f6352f; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public static boolean m6087a(Object obj, Class<?> cls) { return m6089b(obj, cls) < 99; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: b
static int m6089b(Object obj, Class<?> cls) { int a = m6083a(obj); switch (a) { case 0: if (cls == ScriptRuntime.f6505l || cls == ScriptRuntime.f6503j) { return 1; } case 1: if (!cls.isPrimitive()) { return 1; } break; case 2: if (cls == Boolean.TYPE) { return 1; } if (cls == ScriptRuntime.f6494a) { return 2; } if (cls == ScriptRuntime.f6503j) { return 3; } if (cls == ScriptRuntime.f6505l) { return 4; } break; case 3: if (cls.isPrimitive()) { if (cls == Double.TYPE) { return 1; } if (cls != Boolean.TYPE) { return m6082a(cls) + 1; } } else if (cls == ScriptRuntime.f6505l) { return 9; } else { if (cls == ScriptRuntime.f6503j) { return 10; } if (ScriptRuntime.f6502i.isAssignableFrom(cls)) { return 2; } } break; case 4: if (cls == ScriptRuntime.f6505l) { return 1; } if (cls.isInstance(obj)) { return 2; } if (cls.isPrimitive()) { if (cls == Character.TYPE) { return 3; } if (cls != Boolean.TYPE) { return 4; } } break; case 5: if (cls == ScriptRuntime.f6497d) { return 1; } if (cls == ScriptRuntime.f6503j) { return 3; } if (cls == ScriptRuntime.f6505l) { return 4; } break; case 6: case 7: if (obj instanceof Wrapper) { obj = ((Wrapper) obj).mo18879a(); } if (cls.isInstance(obj)) { return 0; } if (cls == ScriptRuntime.f6505l) { return 2; } if (cls.isPrimitive() && cls != Boolean.TYPE) { if (a == 7) { return 99; } return m6082a(cls) + 2; } case 8: if (cls != ScriptRuntime.f6503j && cls.isInstance(obj)) { return 1; } if (cls.isArray()) { if (obj instanceof NativeArray) { return 2; } } else if (cls == ScriptRuntime.f6503j) { return 3; } else { if (cls == ScriptRuntime.f6505l) { return 4; } if (cls == ScriptRuntime.f6506m) { if (obj instanceof NativeDate) { return 1; } } else if (cls.isInterface()) { if ((obj instanceof NativeObject) || (obj instanceof NativeFunction)) { return 1; } return 12; } else if (cls.isPrimitive() && cls != Boolean.TYPE) { return m6082a(cls) + 4; } } break; } return 99; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "@Override\n\tpublic void b() {\n\n\t}", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public bb b() {\n return a(this.a);\n }", "@Override\n\tpublic void b1() {\n\t\t\n\t}", "public void b() {\r\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public abstract void b(StringBuilder sb);", "public void b() {\n }", "public void b() {\n }", "protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }", "public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }", "public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public void b() {\n ((a) this.a).b();\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "public t b() {\n return a(this.a);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }", "private void m678b(byte b) {\n byte[] bArr = this.f523r;\n bArr[0] = b;\n this.f552g.mo502b(bArr);\n }", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "public abstract T zzm(B b);", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }", "public abstract void zzc(B b, int i, int i2);", "public interface b {\n}", "public interface b {\n}", "private void m10263b(byte b) throws cf {\r\n this.f6483r[0] = b;\r\n this.g.m10347b(this.f6483r);\r\n }", "BSubstitution createBSubstitution();", "public void b(ahd paramahd) {}", "void b();", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "B database(S database);", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public abstract C0631bt mo9227aB();", "public an b() {\n return a(this.a);\n }", "protected abstract void a(bru parambru);", "static void go(Base b) {\n\t\tb.add(8);\n\t}", "void mo46242a(bmc bmc);", "public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }", "public interface bca extends bbn {\n bca a();\n\n bca a(String str);\n\n bca b(String str);\n\n bca c(String str);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public abstract BoundType b();", "public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }", "b(a aVar, com.bytedance.jedi.model.h.a aVar2) {\n super(aVar2);\n this.f21531a = aVar;\n this.f21532b = new com.bytedance.jedi.model.h.f(aVar);\n }", "private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }", "public void b(ahb paramahb)\r\n/* 583: */ {\r\n/* 584:625 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 585:626 */ this.a[i] = amj.b(paramahb.a[i]);\r\n/* 586: */ }\r\n/* 587:628 */ for (i = 0; i < this.b.length; i++) {\r\n/* 588:629 */ this.b[i] = amj.b(paramahb.b[i]);\r\n/* 589: */ }\r\n/* 590:631 */ this.c = paramahb.c;\r\n/* 591: */ }", "interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}", "@Override\n\tpublic void visit(PartB partB) {\n\n\t}", "public abstract void zzb(B b, int i, long j);", "public abstract void zza(B b, int i, zzeh zzeh);", "int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}", "private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public void b(StringBuilder sb) {\n sb.append(this.a);\n sb.append(')');\n }", "public void b() {\n e$a e$a;\n try {\n e$a = this.b;\n }\n catch (IOException iOException) {\n return;\n }\n Object object = this.c;\n e$a.b(object);\n }", "public abstract void a(StringBuilder sb);", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public abstract void zzf(Object obj, B b);", "public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}", "@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void a(b paramb, int paramInt1, int paramInt2);", "public void mo1945a(byte b) throws cf {\r\n m10263b(b);\r\n }", "void mo83703a(C32456b<T> bVar);", "public void a(String str) {\n ((b.b) this.b).d(str);\n }", "public void selectB() { }", "BOperation createBOperation();", "void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}", "private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public void b(fv paramfv)\r\n/* 408: */ {\r\n/* 409:423 */ this.a = new amj[36];\r\n/* 410:424 */ this.b = new amj[4];\r\n/* 411:425 */ for (int i = 0; i < paramfv.c(); i++)\r\n/* 412: */ {\r\n/* 413:426 */ fn localfn = paramfv.b(i);\r\n/* 414:427 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 415:428 */ amj localamj = amj.a(localfn);\r\n/* 416:429 */ if (localamj != null)\r\n/* 417: */ {\r\n/* 418:430 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 419:431 */ this.a[j] = localamj;\r\n/* 420: */ }\r\n/* 421:433 */ if ((j >= 100) && (j < this.b.length + 100)) {\r\n/* 422:434 */ this.b[(j - 100)] = localamj;\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425: */ }\r\n/* 426: */ }", "public void b(String str) {\n ((b.b) this.b).e(str);\n }", "public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }", "public abstract void zza(B b, int i, T t);", "public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 189: */ {\r\n/* 190:220 */ return null;\r\n/* 191: */ }", "public abstract void zza(B b, int i, long j);", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public abstract void mo9798a(byte b);", "public void mo9798a(byte b) {\n if (this.f9108f == this.f9107e) {\n mo9827i();\n }\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n bArr[i] = b;\n this.f9109g++;\n }", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "private void m676a(TField bkVar, byte b) {\n if (b == -1) {\n b = m687e(bkVar.f538b);\n }\n short s = bkVar.f539c;\n short s2 = this.f519n;\n if (s <= s2 || s - s2 > 15) {\n m678b(b);\n mo446a(bkVar.f539c);\n } else {\n m686d(b | ((s - s2) << 4));\n }\n this.f519n = bkVar.f539c;\n }", "private static void m831a(C0741g<?> gVar, C0747b bVar) {\n gVar.mo9477a(C0743i.f718b, (C0739e<? super Object>) bVar);\n gVar.mo9476a(C0743i.f718b, (C0738d) bVar);\n gVar.mo9474a(C0743i.f718b, (C0736b) bVar);\n }", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }", "public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }", "public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.5886636", "0.58828026", "0.5855491", "0.584618", "0.5842517", "0.5824137", "0.5824071", "0.58097327", "0.5802052", "0.58012927", "0.579443", "0.5792392", "0.57902914", "0.5785124", "0.57718205", "0.57589084", "0.5735892", "0.5735892", "0.5734873", "0.5727929", "0.5720821", "0.5712531", "0.5706813", "0.56896514", "0.56543154", "0.5651059", "0.5649904", "0.56496733", "0.5647035", "0.5640965", "0.5640109", "0.563993", "0.5631903", "0.5597427", "0.55843794", "0.5583287", "0.557783", "0.55734867", "0.55733293", "0.5572254", "0.55683887", "0.55624336", "0.55540246", "0.5553985", "0.55480546", "0.554261", "0.5535739", "0.5529958", "0.5519634", "0.5517503", "0.55160624", "0.5511545", "0.5505353", "0.5500533", "0.5491741", "0.5486198", "0.5481978", "0.547701", "0.54725856", "0.5471632", "0.5463497", "0.5460805", "0.5454913", "0.5454885", "0.54519916", "0.5441594", "0.5436747", "0.5432453", "0.5425923", "0.5424724", "0.54189867", "0.54162544", "0.54051477", "0.53998184", "0.53945845", "0.53887725", "0.5388146", "0.5387678", "0.53858143", "0.53850687", "0.5384439" ]
0.0
-1
/ renamed from: a
private static int m6082a(Class<?> cls) { if (cls == Double.TYPE) { return 1; } if (cls == Float.TYPE) { return 2; } if (cls == Long.TYPE) { return 3; } if (cls == Integer.TYPE) { return 4; } if (cls == Short.TYPE) { return 5; } if (cls == Character.TYPE) { return 6; } if (cls == Byte.TYPE) { return 7; } if (cls == Boolean.TYPE) { return 99; } return 8; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
private static int m6083a(Object obj) { if (obj == null) { return 1; } if (obj == Undefined.f6689a) { return 0; } if (obj instanceof CharSequence) { return 4; } if (obj instanceof Number) { return 3; } if (obj instanceof Boolean) { return 2; } if (obj instanceof Scriptable) { if (obj instanceof NativeJavaClass) { return 5; } if (obj instanceof NativeJavaArray) { return 7; } if (obj instanceof Wrapper) { return 6; } return 8; } else if (obj instanceof Class) { return 5; } else { if (obj.getClass().isArray()) { return 7; } return 6; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
static Object m6085a(Class<?> cls, Object obj) { if (obj != null && obj.getClass() == cls) { return obj; } switch (m6083a(obj)) { case 0: if (cls == ScriptRuntime.f6505l || cls == ScriptRuntime.f6503j) { return "undefined"; } m6091c("undefined", cls); return obj; case 1: if (cls.isPrimitive()) { m6091c(obj, cls); } return null; case 2: if (cls == Boolean.TYPE || cls == ScriptRuntime.f6494a || cls == ScriptRuntime.f6503j) { return obj; } if (cls == ScriptRuntime.f6505l) { return obj.toString(); } m6091c(obj, cls); return obj; case 3: if (cls == ScriptRuntime.f6505l) { return ScriptRuntime.m6436d(obj); } if (cls == ScriptRuntime.f6503j) { return m6090b(Double.TYPE, obj); } if ((cls.isPrimitive() && cls != Boolean.TYPE) || ScriptRuntime.f6502i.isAssignableFrom(cls)) { return m6090b(cls, obj); } m6091c(obj, cls); return obj; case 4: if (cls == ScriptRuntime.f6505l || cls.isInstance(obj)) { return obj.toString(); } if (cls == Character.TYPE || cls == ScriptRuntime.f6496c) { if (((CharSequence) obj).length() == 1) { return Character.valueOf(((CharSequence) obj).charAt(0)); } return m6090b(cls, obj); } else if ((cls.isPrimitive() && cls != Boolean.TYPE) || ScriptRuntime.f6502i.isAssignableFrom(cls)) { return m6090b(cls, obj); } else { m6091c(obj, cls); return obj; } case 5: if (obj instanceof Wrapper) { obj = ((Wrapper) obj).mo18879a(); } if (cls == ScriptRuntime.f6497d || cls == ScriptRuntime.f6503j) { return obj; } if (cls == ScriptRuntime.f6505l) { return obj.toString(); } m6091c(obj, cls); return obj; case 6: case 7: if (obj instanceof Wrapper) { obj = ((Wrapper) obj).mo18879a(); } if (cls.isPrimitive()) { if (cls == Boolean.TYPE) { m6091c(obj, cls); } return m6090b(cls, obj); } else if (cls == ScriptRuntime.f6505l) { return obj.toString(); } else { if (cls.isInstance(obj)) { return obj; } m6091c(obj, cls); return obj; } case 8: if (cls == ScriptRuntime.f6505l) { return ScriptRuntime.m6436d(obj); } if (cls.isPrimitive()) { if (cls == Boolean.TYPE) { m6091c(obj, cls); } return m6090b(cls, obj); } else if (cls.isInstance(obj)) { return obj; } else { if (cls == ScriptRuntime.f6506m && (obj instanceof NativeDate)) { return new Date((long) ((NativeDate) obj).f6314a); } if (cls.isArray() && (obj instanceof NativeArray)) { NativeArray bcVar = (NativeArray) obj; long j = bcVar.f6285a; Class componentType = cls.getComponentType(); Object newInstance = Array.newInstance(componentType, (int) j); for (int i = 0; ((long) i) < j; i++) { try { Array.set(newInstance, i, m6085a(componentType, bcVar.get(i, bcVar))); } catch (EvaluatorException e) { m6091c(obj, cls); } } return newInstance; } else if (obj instanceof Wrapper) { Object a = ((Wrapper) obj).mo18879a(); if (cls.isInstance(a)) { return a; } m6091c(a, cls); return a; } else if (cls.isInterface() && ((obj instanceof NativeObject) || (obj instanceof NativeFunction))) { return m6086a(cls, (ScriptableObject) obj); } else { m6091c(obj, cls); return obj; } } default: return obj; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
protected static Object m6086a(Class<?> cls, ScriptableObject dsVar) { InterfaceAdapter akVar; Object a = Kit.m5808a(f6346b, (Object) cls); Object associatedValue = dsVar.getAssociatedValue(a); if (associatedValue != null) { return associatedValue; } Context k = Context.m6769k(); if (!cls.isInterface()) { throw new IllegalArgumentException(); } Scriptable d = ScriptRuntime.m6438d(k); ClassCache a2 = ClassCache.m6667a(d); InterfaceAdapter akVar2 = (InterfaceAdapter) (a2.f6701e == null ? null : a2.f6701e.get(cls)); ContextFactory oVar = k.f6778b; if (akVar2 == null) { Method[] methods = cls.getMethods(); if (dsVar instanceof Callable) { int length = methods.length; if (length == 0) { throw Context.m6755a("msg.no.empty.interface.conversion", (Object) cls.getName()); } else if (length > 1) { String name = methods[0].getName(); for (int i = 1; i < length; i++) { if (!name.equals(methods[i].getName())) { throw Context.m6755a("msg.no.function.interface.conversion", (Object) cls.getName()); } } } } akVar = new InterfaceAdapter(cls); a2.mo19105a(cls, akVar); } else { akVar = akVar2; } return dsVar.associateValue(a, VMBridge.f6694a.mo19096a(akVar.f6007a, oVar, akVar, dsVar, d)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: b
private static Object m6090b(Class<?> cls, Object obj) { double d = 0.0d; Class<?> cls2 = obj.getClass(); if (cls == Character.TYPE || cls == ScriptRuntime.f6496c) { if (cls2 == ScriptRuntime.f6496c) { return obj; } return Character.valueOf((char) ((int) m6084a(obj, ScriptRuntime.f6496c, 0.0d, 65535.0d))); } else if (cls == ScriptRuntime.f6503j || cls == ScriptRuntime.f6498e || cls == Double.TYPE) { if (cls2 != ScriptRuntime.f6498e) { return new Double(m6088b(obj)); } return obj; } else if (cls == ScriptRuntime.f6499f || cls == Float.TYPE) { if (cls2 == ScriptRuntime.f6499f) { return obj; } double b = m6088b(obj); if (Double.isInfinite(b) || Double.isNaN(b) || b == 0.0d) { return new Float((float) b); } double abs = Math.abs(b); if (abs < 1.401298464324817E-45d) { if (b <= 0.0d) { d = -0.0d; } return new Float(d); } else if (abs <= 3.4028234663852886E38d) { return new Float((float) b); } else { return new Float(b > 0.0d ? Float.POSITIVE_INFINITY : Float.NEGATIVE_INFINITY); } } else if (cls == ScriptRuntime.f6500g || cls == Integer.TYPE) { if (cls2 == ScriptRuntime.f6500g) { return obj; } return Integer.valueOf((int) m6084a(obj, ScriptRuntime.f6500g, -2.147483648E9d, 2.147483647E9d)); } else if (cls == ScriptRuntime.f6501h || cls == Long.TYPE) { if (cls2 == ScriptRuntime.f6501h) { return obj; } return Long.valueOf(m6084a(obj, ScriptRuntime.f6501h, Double.longBitsToDouble(-4332462841530417152L), Double.longBitsToDouble(4890909195324358655L))); } else if (cls == ScriptRuntime.f6504k || cls == Short.TYPE) { if (cls2 == ScriptRuntime.f6504k) { return obj; } return Short.valueOf((short) ((int) m6084a(obj, ScriptRuntime.f6504k, -32768.0d, 32767.0d))); } else if (cls != ScriptRuntime.f6495b && cls != Byte.TYPE) { return new Double(m6088b(obj)); } else { if (cls2 == ScriptRuntime.f6495b) { return obj; } return Byte.valueOf((byte) ((int) m6084a(obj, ScriptRuntime.f6495b, -128.0d, 127.0d))); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "@Override\n\tpublic void b() {\n\n\t}", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public bb b() {\n return a(this.a);\n }", "@Override\n\tpublic void b1() {\n\t\t\n\t}", "public void b() {\r\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public abstract void b(StringBuilder sb);", "public void b() {\n }", "public void b() {\n }", "protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }", "public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }", "public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public void b() {\n ((a) this.a).b();\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "public t b() {\n return a(this.a);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }", "private void m678b(byte b) {\n byte[] bArr = this.f523r;\n bArr[0] = b;\n this.f552g.mo502b(bArr);\n }", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "public abstract T zzm(B b);", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }", "public abstract void zzc(B b, int i, int i2);", "public interface b {\n}", "public interface b {\n}", "private void m10263b(byte b) throws cf {\r\n this.f6483r[0] = b;\r\n this.g.m10347b(this.f6483r);\r\n }", "BSubstitution createBSubstitution();", "public void b(ahd paramahd) {}", "void b();", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "B database(S database);", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public abstract C0631bt mo9227aB();", "public an b() {\n return a(this.a);\n }", "protected abstract void a(bru parambru);", "static void go(Base b) {\n\t\tb.add(8);\n\t}", "void mo46242a(bmc bmc);", "public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }", "public interface bca extends bbn {\n bca a();\n\n bca a(String str);\n\n bca b(String str);\n\n bca c(String str);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public abstract BoundType b();", "public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }", "b(a aVar, com.bytedance.jedi.model.h.a aVar2) {\n super(aVar2);\n this.f21531a = aVar;\n this.f21532b = new com.bytedance.jedi.model.h.f(aVar);\n }", "private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }", "public void b(ahb paramahb)\r\n/* 583: */ {\r\n/* 584:625 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 585:626 */ this.a[i] = amj.b(paramahb.a[i]);\r\n/* 586: */ }\r\n/* 587:628 */ for (i = 0; i < this.b.length; i++) {\r\n/* 588:629 */ this.b[i] = amj.b(paramahb.b[i]);\r\n/* 589: */ }\r\n/* 590:631 */ this.c = paramahb.c;\r\n/* 591: */ }", "interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}", "@Override\n\tpublic void visit(PartB partB) {\n\n\t}", "public abstract void zzb(B b, int i, long j);", "public abstract void zza(B b, int i, zzeh zzeh);", "int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}", "private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public void b(StringBuilder sb) {\n sb.append(this.a);\n sb.append(')');\n }", "public void b() {\n e$a e$a;\n try {\n e$a = this.b;\n }\n catch (IOException iOException) {\n return;\n }\n Object object = this.c;\n e$a.b(object);\n }", "public abstract void a(StringBuilder sb);", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public abstract void zzf(Object obj, B b);", "public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}", "@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void a(b paramb, int paramInt1, int paramInt2);", "public void mo1945a(byte b) throws cf {\r\n m10263b(b);\r\n }", "void mo83703a(C32456b<T> bVar);", "public void a(String str) {\n ((b.b) this.b).d(str);\n }", "public void selectB() { }", "BOperation createBOperation();", "void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}", "private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public void b(fv paramfv)\r\n/* 408: */ {\r\n/* 409:423 */ this.a = new amj[36];\r\n/* 410:424 */ this.b = new amj[4];\r\n/* 411:425 */ for (int i = 0; i < paramfv.c(); i++)\r\n/* 412: */ {\r\n/* 413:426 */ fn localfn = paramfv.b(i);\r\n/* 414:427 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 415:428 */ amj localamj = amj.a(localfn);\r\n/* 416:429 */ if (localamj != null)\r\n/* 417: */ {\r\n/* 418:430 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 419:431 */ this.a[j] = localamj;\r\n/* 420: */ }\r\n/* 421:433 */ if ((j >= 100) && (j < this.b.length + 100)) {\r\n/* 422:434 */ this.b[(j - 100)] = localamj;\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425: */ }\r\n/* 426: */ }", "public void b(String str) {\n ((b.b) this.b).e(str);\n }", "public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }", "public abstract void zza(B b, int i, T t);", "public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 189: */ {\r\n/* 190:220 */ return null;\r\n/* 191: */ }", "public abstract void zza(B b, int i, long j);", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public abstract void mo9798a(byte b);", "public void mo9798a(byte b) {\n if (this.f9108f == this.f9107e) {\n mo9827i();\n }\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n bArr[i] = b;\n this.f9109g++;\n }", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "private void m676a(TField bkVar, byte b) {\n if (b == -1) {\n b = m687e(bkVar.f538b);\n }\n short s = bkVar.f539c;\n short s2 = this.f519n;\n if (s <= s2 || s - s2 > 15) {\n m678b(b);\n mo446a(bkVar.f539c);\n } else {\n m686d(b | ((s - s2) << 4));\n }\n this.f519n = bkVar.f539c;\n }", "private static void m831a(C0741g<?> gVar, C0747b bVar) {\n gVar.mo9477a(C0743i.f718b, (C0739e<? super Object>) bVar);\n gVar.mo9476a(C0743i.f718b, (C0738d) bVar);\n gVar.mo9474a(C0743i.f718b, (C0736b) bVar);\n }", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }", "public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }", "public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.5886636", "0.58828026", "0.5855491", "0.584618", "0.5842517", "0.5824137", "0.5824071", "0.58097327", "0.5802052", "0.58012927", "0.579443", "0.5792392", "0.57902914", "0.5785124", "0.57718205", "0.57589084", "0.5735892", "0.5735892", "0.5734873", "0.5727929", "0.5720821", "0.5712531", "0.5706813", "0.56896514", "0.56543154", "0.5651059", "0.5649904", "0.56496733", "0.5647035", "0.5640965", "0.5640109", "0.563993", "0.5631903", "0.5597427", "0.55843794", "0.5583287", "0.557783", "0.55734867", "0.55733293", "0.5572254", "0.55683887", "0.55624336", "0.55540246", "0.5553985", "0.55480546", "0.554261", "0.5535739", "0.5529958", "0.5519634", "0.5517503", "0.55160624", "0.5511545", "0.5505353", "0.5500533", "0.5491741", "0.5486198", "0.5481978", "0.547701", "0.54725856", "0.5471632", "0.5463497", "0.5460805", "0.5454913", "0.5454885", "0.54519916", "0.5441594", "0.5436747", "0.5432453", "0.5425923", "0.5424724", "0.54189867", "0.54162544", "0.54051477", "0.53998184", "0.53945845", "0.53887725", "0.5388146", "0.5387678", "0.53858143", "0.53850687", "0.5384439" ]
0.0
-1
/ renamed from: b
private static double m6088b(Object obj) { Method method = null; Object obj2 = obj; while (!(obj2 instanceof Number)) { if (obj2 instanceof String) { return ScriptRuntime.m6309a((String) obj2); } if (!(obj2 instanceof Scriptable)) { try { method = obj2.getClass().getMethod("doubleValue"); } catch (NoSuchMethodException | SecurityException e) { } if (method != null) { try { return ((Number) method.invoke(obj2)).doubleValue(); } catch (IllegalAccessException e2) { m6091c(obj2, Double.TYPE); } catch (InvocationTargetException e3) { m6091c(obj2, Double.TYPE); } } return ScriptRuntime.m6309a(obj2.toString()); } else if (!(obj2 instanceof Wrapper)) { return ScriptRuntime.m6395b(obj2); } else { obj2 = ((Wrapper) obj2).mo18879a(); } } return ((Number) obj2).doubleValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "@Override\n\tpublic void b() {\n\n\t}", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public bb b() {\n return a(this.a);\n }", "@Override\n\tpublic void b1() {\n\t\t\n\t}", "public void b() {\r\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public abstract void b(StringBuilder sb);", "public void b() {\n }", "public void b() {\n }", "protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }", "public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }", "public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public void b() {\n ((a) this.a).b();\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "public t b() {\n return a(this.a);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }", "private void m678b(byte b) {\n byte[] bArr = this.f523r;\n bArr[0] = b;\n this.f552g.mo502b(bArr);\n }", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "public abstract T zzm(B b);", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }", "public abstract void zzc(B b, int i, int i2);", "public interface b {\n}", "public interface b {\n}", "private void m10263b(byte b) throws cf {\r\n this.f6483r[0] = b;\r\n this.g.m10347b(this.f6483r);\r\n }", "BSubstitution createBSubstitution();", "public void b(ahd paramahd) {}", "void b();", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "B database(S database);", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public abstract C0631bt mo9227aB();", "public an b() {\n return a(this.a);\n }", "protected abstract void a(bru parambru);", "static void go(Base b) {\n\t\tb.add(8);\n\t}", "void mo46242a(bmc bmc);", "public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }", "public interface bca extends bbn {\n bca a();\n\n bca a(String str);\n\n bca b(String str);\n\n bca c(String str);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public abstract BoundType b();", "public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }", "b(a aVar, com.bytedance.jedi.model.h.a aVar2) {\n super(aVar2);\n this.f21531a = aVar;\n this.f21532b = new com.bytedance.jedi.model.h.f(aVar);\n }", "private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }", "public void b(ahb paramahb)\r\n/* 583: */ {\r\n/* 584:625 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 585:626 */ this.a[i] = amj.b(paramahb.a[i]);\r\n/* 586: */ }\r\n/* 587:628 */ for (i = 0; i < this.b.length; i++) {\r\n/* 588:629 */ this.b[i] = amj.b(paramahb.b[i]);\r\n/* 589: */ }\r\n/* 590:631 */ this.c = paramahb.c;\r\n/* 591: */ }", "interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}", "@Override\n\tpublic void visit(PartB partB) {\n\n\t}", "public abstract void zzb(B b, int i, long j);", "public abstract void zza(B b, int i, zzeh zzeh);", "int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}", "private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public void b(StringBuilder sb) {\n sb.append(this.a);\n sb.append(')');\n }", "public void b() {\n e$a e$a;\n try {\n e$a = this.b;\n }\n catch (IOException iOException) {\n return;\n }\n Object object = this.c;\n e$a.b(object);\n }", "public abstract void a(StringBuilder sb);", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public abstract void zzf(Object obj, B b);", "public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}", "@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void a(b paramb, int paramInt1, int paramInt2);", "public void mo1945a(byte b) throws cf {\r\n m10263b(b);\r\n }", "void mo83703a(C32456b<T> bVar);", "public void a(String str) {\n ((b.b) this.b).d(str);\n }", "public void selectB() { }", "BOperation createBOperation();", "void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}", "private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public void b(fv paramfv)\r\n/* 408: */ {\r\n/* 409:423 */ this.a = new amj[36];\r\n/* 410:424 */ this.b = new amj[4];\r\n/* 411:425 */ for (int i = 0; i < paramfv.c(); i++)\r\n/* 412: */ {\r\n/* 413:426 */ fn localfn = paramfv.b(i);\r\n/* 414:427 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 415:428 */ amj localamj = amj.a(localfn);\r\n/* 416:429 */ if (localamj != null)\r\n/* 417: */ {\r\n/* 418:430 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 419:431 */ this.a[j] = localamj;\r\n/* 420: */ }\r\n/* 421:433 */ if ((j >= 100) && (j < this.b.length + 100)) {\r\n/* 422:434 */ this.b[(j - 100)] = localamj;\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425: */ }\r\n/* 426: */ }", "public void b(String str) {\n ((b.b) this.b).e(str);\n }", "public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }", "public abstract void zza(B b, int i, T t);", "public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 189: */ {\r\n/* 190:220 */ return null;\r\n/* 191: */ }", "public abstract void zza(B b, int i, long j);", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public abstract void mo9798a(byte b);", "public void mo9798a(byte b) {\n if (this.f9108f == this.f9107e) {\n mo9827i();\n }\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n bArr[i] = b;\n this.f9109g++;\n }", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "private void m676a(TField bkVar, byte b) {\n if (b == -1) {\n b = m687e(bkVar.f538b);\n }\n short s = bkVar.f539c;\n short s2 = this.f519n;\n if (s <= s2 || s - s2 > 15) {\n m678b(b);\n mo446a(bkVar.f539c);\n } else {\n m686d(b | ((s - s2) << 4));\n }\n this.f519n = bkVar.f539c;\n }", "private static void m831a(C0741g<?> gVar, C0747b bVar) {\n gVar.mo9477a(C0743i.f718b, (C0739e<? super Object>) bVar);\n gVar.mo9476a(C0743i.f718b, (C0738d) bVar);\n gVar.mo9474a(C0743i.f718b, (C0736b) bVar);\n }", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }", "public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }", "public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.5886636", "0.58828026", "0.5855491", "0.584618", "0.5842517", "0.5824137", "0.5824071", "0.58097327", "0.5802052", "0.58012927", "0.579443", "0.5792392", "0.57902914", "0.5785124", "0.57718205", "0.57589084", "0.5735892", "0.5735892", "0.5734873", "0.5727929", "0.5720821", "0.5712531", "0.5706813", "0.56896514", "0.56543154", "0.5651059", "0.5649904", "0.56496733", "0.5647035", "0.5640965", "0.5640109", "0.563993", "0.5631903", "0.5597427", "0.55843794", "0.5583287", "0.557783", "0.55734867", "0.55733293", "0.5572254", "0.55683887", "0.55624336", "0.55540246", "0.5553985", "0.55480546", "0.554261", "0.5535739", "0.5529958", "0.5519634", "0.5517503", "0.55160624", "0.5511545", "0.5505353", "0.5500533", "0.5491741", "0.5486198", "0.5481978", "0.547701", "0.54725856", "0.5471632", "0.5463497", "0.5460805", "0.5454913", "0.5454885", "0.54519916", "0.5441594", "0.5436747", "0.5432453", "0.5425923", "0.5424724", "0.54189867", "0.54162544", "0.54051477", "0.53998184", "0.53945845", "0.53887725", "0.5388146", "0.5387678", "0.53858143", "0.53850687", "0.5384439" ]
0.0
-1
/ renamed from: a
private static long m6084a(Object obj, Class<?> cls, double d, double d2) { double ceil; double b = m6088b(obj); if (Double.isInfinite(b) || Double.isNaN(b)) { m6091c(ScriptRuntime.m6436d(obj), cls); } if (b > 0.0d) { ceil = Math.floor(b); } else { ceil = Math.ceil(b); } if (ceil < d || ceil > d2) { m6091c(ScriptRuntime.m6436d(obj), cls); } return (long) ceil; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: c
private static void m6091c(Object obj, Class<?> cls) { throw Context.m6756a("msg.conversion.not.allowed", (Object) String.valueOf(obj), (Object) C2140au.m5785a(cls)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo5289a(C5102c c5102c);", "public static void c0() {\n\t}", "void mo57278c();", "private static void cajas() {\n\t\t\n\t}", "void mo5290b(C5102c c5102c);", "void mo80457c();", "void mo12638c();", "void mo28717a(zzc zzc);", "void mo21072c();", "@Override\n\tpublic void ccc() {\n\t\t\n\t}", "public void c() {\n }", "void mo17012c();", "C2451d mo3408a(C2457e c2457e);", "void mo88524c();", "void mo86a(C0163d c0163d);", "void mo17021c();", "public abstract void mo53562a(C18796a c18796a);", "void mo4874b(C4718l c4718l);", "void mo4873a(C4718l c4718l);", "C12017a mo41088c();", "public abstract void mo70702a(C30989b c30989b);", "void mo72114c();", "public void mo12628c() {\n }", "C2841w mo7234g();", "public interface C0335c {\n }", "public void mo1403c() {\n }", "public static void c3() {\n\t}", "public static void c1() {\n\t}", "void mo8712a(C9714a c9714a);", "void mo67924c();", "public void mo97906c() {\n }", "public abstract void mo27385c();", "String mo20731c();", "public int c()\r\n/* 74: */ {\r\n/* 75:78 */ return this.c;\r\n/* 76: */ }", "public interface C0939c {\n }", "void mo1582a(String str, C1329do c1329do);", "void mo304a(C0366h c0366h);", "void mo1493c();", "private String getString(byte c) {\n\t\treturn c==1? \"$ \": \" \";\n\t}", "java.lang.String getC3();", "C45321i mo90380a();", "public interface C11910c {\n}", "void mo57277b();", "String mo38972c();", "static int type_of_cnc(String passed){\n\t\treturn 1;\n\t}", "public static void CC2_1() {\n\t}", "static int type_of_cc(String passed){\n\t\treturn 1;\n\t}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public void mo56167c() {\n }", "public interface C0136c {\n }", "private void kk12() {\n\n\t}", "abstract String mo1748c();", "public abstract void mo70710a(String str, C24343db c24343db);", "public interface C0303q extends C0291e {\n /* renamed from: a */\n void mo1747a(int i);\n\n /* renamed from: a */\n void mo1749a(C0288c cVar);\n\n /* renamed from: a */\n void mo1751a(byte[] bArr);\n\n /* renamed from: b */\n void mo1753b(int i);\n\n /* renamed from: c */\n void mo1754c(int i);\n\n /* renamed from: d */\n void mo1755d(int i);\n\n /* renamed from: e */\n int mo1756e(int i);\n\n /* renamed from: g */\n int mo1760g();\n\n /* renamed from: g */\n void mo1761g(int i);\n\n /* renamed from: h */\n void mo1763h(int i);\n}", "C3577c mo19678C();", "public abstract int c();", "public abstract int c();", "public final void mo11687c() {\n }", "byte mo30283c();", "private java.lang.String c(java.lang.String r7) {\n /*\n r6 = this;\n r2 = \"\";\n r0 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n if (r0 == 0) goto L_0x0050;\n L_0x0006:\n r0 = new java.lang.StringBuilder;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = java.lang.String.valueOf(r7);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0.<init>(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = \".\";\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.toString();\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x001f:\n r1 = r6.d;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r1.openFileInput(r0);\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x0025:\n r3 = new java.io.BufferedReader;\n r4 = new java.io.InputStreamReader;\n r0 = r1;\n r0 = (java.io.InputStream) r0;\n r5 = \"UTF-8\";\n r5 = java.nio.charset.Charset.forName(r5);\n r4.<init>(r0, r5);\n r3.<init>(r4);\n r0 = new java.lang.StringBuffer;\n r0.<init>();\n L_0x003d:\n r4 = r3.readLine();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n if (r4 != 0) goto L_0x0061;\n L_0x0043:\n r0 = r0.toString();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007d }\n r1.close();\t Catch:{ IOException -> 0x007d }\n r3.close();\t Catch:{ IOException -> 0x007d }\n L_0x004f:\n return r0;\n L_0x0050:\n r0 = r7;\n goto L_0x001f;\n L_0x0052:\n r0 = move-exception;\n r0 = r6.d;\t Catch:{ IOException -> 0x005e }\n r0 = r0.getAssets();\t Catch:{ IOException -> 0x005e }\n r1 = r0.open(r7);\t Catch:{ IOException -> 0x005e }\n goto L_0x0025;\n L_0x005e:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0061:\n r0.append(r4);\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n goto L_0x003d;\n L_0x0065:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x0070 }\n r1.close();\t Catch:{ IOException -> 0x0070 }\n r3.close();\t Catch:{ IOException -> 0x0070 }\n r0 = r2;\n goto L_0x004f;\n L_0x0070:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0073:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007f }\n r1.close();\t Catch:{ IOException -> 0x007f }\n r3.close();\t Catch:{ IOException -> 0x007f }\n L_0x007c:\n throw r0;\n L_0x007d:\n r1 = move-exception;\n goto L_0x004f;\n L_0x007f:\n r1 = move-exception;\n goto L_0x007c;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.a.b.b.c(java.lang.String):java.lang.String\");\n }", "@Override\n\tpublic void compile(CodeBlock c, CompilerEnvironment environment) {\n\n\t}", "public interface C3196it extends C3208jc {\n /* renamed from: a */\n void mo30275a(long j);\n\n /* renamed from: b */\n C3197iu mo30281b(long j);\n\n /* renamed from: b */\n boolean mo30282b();\n\n /* renamed from: c */\n byte mo30283c();\n\n /* renamed from: c */\n String mo30285c(long j);\n\n /* renamed from: d */\n void mo30290d(long j);\n\n /* renamed from: e */\n int mo30291e();\n\n /* renamed from: f */\n long mo30295f();\n}", "public static void mmcc() {\n\t}", "java.lang.String getCit();", "public abstract C mo29734a();", "C15430g mo56154a();", "void mo41086b();", "@Override\n public void func_104112_b() {\n \n }", "public interface C9223b {\n }", "public abstract String mo11611b();", "void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);", "String getCmt();", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "interface C2578d {\n}", "public interface C1803l extends C1813t {\n /* renamed from: b */\n C1803l mo7382b(C2778au auVar);\n\n /* renamed from: f */\n List<C1700ar> mo7233f();\n\n /* renamed from: g */\n C2841w mo7234g();\n\n /* renamed from: q */\n C1800i mo7384q();\n}", "double fFromC(double c) {\n return (c * 9 / 5) + 32;\n }", "void mo72113b();", "void mo1749a(C0288c cVar);", "public interface C0764b {\n}", "void mo41083a();", "String[] mo1153c();", "C1458cs mo7613iS();", "public interface C0333a {\n }", "public abstract int mo41077c();", "public interface C8843g {\n}", "public abstract void mo70709a(String str, C41018cm c41018cm);", "void mo28307a(zzgd zzgd);", "public static void mcdc() {\n\t}", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "C1435c mo1754a(C1433a c1433a, C1434b c1434b);", "public interface C0389gj extends C0388gi {\n}", "C5727e mo33224a();", "C12000e mo41087c(String str);", "public abstract String mo118046b();", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C0938b {\n }", "void mo80455b();", "public interface C0385a {\n }", "public interface C5527c {\n /* renamed from: a */\n int mo4095a(int i);\n\n /* renamed from: b */\n C5537g mo4096b(int i);\n}", "public interface C32231g {\n /* renamed from: a */\n void mo8280a(int i, int i2, C1207m c1207m);\n}", "public interface C11994b {\n /* renamed from: a */\n C11996a mo41079a(String str);\n\n /* renamed from: a */\n C11996a mo41080a(String str, C11997b bVar, String... strArr);\n\n /* renamed from: a */\n C11998c mo41081a(String str, C11999d dVar, String... strArr);\n\n /* renamed from: a */\n C12000e mo41082a(String str, C12001f fVar, String... strArr);\n\n /* renamed from: a */\n void mo41083a();\n\n /* renamed from: a */\n void mo41084a(C12018b bVar, ConnectionState... connectionStateArr);\n\n /* renamed from: b */\n C11996a mo41085b(String str);\n\n /* renamed from: b */\n void mo41086b();\n\n /* renamed from: c */\n C12000e mo41087c(String str);\n\n /* renamed from: c */\n C12017a mo41088c();\n\n /* renamed from: d */\n void mo41089d(String str);\n\n /* renamed from: e */\n C11998c mo41090e(String str);\n\n /* renamed from: f */\n C12000e mo41091f(String str);\n\n /* renamed from: g */\n C11998c mo41092g(String str);\n}" ]
[ "0.64592767", "0.644052", "0.6431582", "0.6418656", "0.64118475", "0.6397491", "0.6250796", "0.62470585", "0.6244832", "0.6232792", "0.618864", "0.61662376", "0.6152657", "0.61496663", "0.6138441", "0.6137171", "0.6131197", "0.6103783", "0.60983956", "0.6077118", "0.6061723", "0.60513836", "0.6049069", "0.6030368", "0.60263443", "0.60089093", "0.59970635", "0.59756917", "0.5956231", "0.5949343", "0.5937446", "0.5911776", "0.59034705", "0.5901311", "0.5883238", "0.5871533", "0.5865361", "0.5851141", "0.581793", "0.5815705", "0.58012", "0.578891", "0.57870495", "0.5775621", "0.57608724", "0.5734331", "0.5731584", "0.5728505", "0.57239383", "0.57130504", "0.57094604", "0.570793", "0.5697671", "0.56975955", "0.56911296", "0.5684489", "0.5684489", "0.56768984", "0.56749034", "0.5659463", "0.56589085", "0.56573", "0.56537443", "0.5651912", "0.5648272", "0.5641736", "0.5639226", "0.5638583", "0.56299245", "0.56297386", "0.56186295", "0.5615729", "0.56117755", "0.5596015", "0.55905765", "0.55816257", "0.55813104", "0.55723965", "0.5572061", "0.55696625", "0.5566985", "0.55633485", "0.555888", "0.5555646", "0.55525774", "0.5549722", "0.5548184", "0.55460495", "0.5539394", "0.5535825", "0.55300397", "0.5527975", "0.55183905", "0.5517322", "0.5517183", "0.55152744", "0.5514932", "0.55128884", "0.5509501", "0.55044043", "0.54984957" ]
0.0
-1
1, "Human Resources", manager_1, dept1Employees
public Department(int departmentID, String departmentName, Manager departmentManager, ArrayList<Employee> listOfEmployees1) { this.departmentID = departmentID; this.departmentName = departmentName; this.departmentManager = departmentManager; this.listOfEmployees = listOfEmployees1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\nEmployee emp = new Employee(1,\"Pankaj\",\"CEO\");\nEmployee emp1 = new Employee(2,\"AAAA\",\"CTO\");\n\t\tArrayList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\temployees.add(emp1);\n\t\temployees.add(emp);\n\t\temployees.add(new Employee(3,\"sdfd\",\"hr\"));\n\t\t\n\t\tfor(Employee e : employees)\n\t\t{\n\t\t\t//System.out.println(e.id+\" \"+e.name);\n\t\t\tif(e.getId()>2)\n\t\t\t\te.setDept(\"Manager\");\n\t\t\t\n\t\t\tSystem.out.println(e.getDept()+\" \"+e.getId()+\" \"+e.getName());\n\t\t\t\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\r\n System.out.println(\"* * * * * Welcome to the employee inform * * * * * \");\r\n\r\n Employee_Company Jane = new Employee_Company();\r\n Employee_Company Lucas = new Employee_Company();\r\n Employee_Company Intern_Sophia = new Employee_Company();\r\n Employee_Company Intern_Ava = new Employee_Company();\r\n Employee_Company Intern_James = new Employee_Company();\r\n Employee_Company Intern_Nicholas = new Employee_Company();\r\n\r\n\r\n Lucas.Set_name_employee(\"Lucas Smith\");\r\n Lucas.Set_Email_employee(\"Lucas_Smith@TechCompany.org\");\r\n Lucas.Set_role_employee(\"Software Engineer\");\r\n Lucas.setSalary_employee(103438);\r\n\r\n\r\n Jane.Set_name_employee(\"Jane charlotte\");\r\n Jane.Set_Email_employee(\"Jane_Charlotte@TechCompany.org\");\r\n Jane.setSalary_employee(623100);\r\n Jane.Set_role_employee(\"CEO Tech Company\");\r\n\r\n\r\n Intern_Sophia.Set_name_employee(\"Sophia Wood\");\r\n Intern_Sophia.Set_Intern_application('A');\r\n Intern_Sophia.Set_role_employee(\"Intern Artificial Intelligence \");\r\n\r\n\r\n Intern_Ava.Set_name_employee(\"Ava Richardson\");\r\n Intern_Ava.Set_Intern_application('B');\r\n Intern_Ava.Set_role_employee(\"Intern Computer Science\");\r\n\r\n\r\n Intern_James.Set_name_employee(\"James Benjamin\");\r\n Intern_James.Set_Intern_application('B');\r\n Intern_James.Set_role_employee(\"Intern Business Analyst\");\r\n\r\n\r\n Intern_Nicholas.Set_name_employee(\"Nicholas Miller\");\r\n Intern_Nicholas.Set_Intern_application('C');\r\n Intern_Nicholas.Set_role_employee(\"Intern Systems Integration Engineering\");\r\n\r\n\r\n\r\n System.out.println(\"\\n\\t*** Tech Company employee information ***\");\r\n System.out.println(\"1. View Salary\");\r\n System.out.println(\"2. View Name of the Employee\");\r\n System.out.println(\"3. View Email Address\");\r\n System.out.println(\"4. View Employee Role\");\r\n System.out.println(\"5. View Intern Application grade\");\r\n\r\n\r\n\r\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"Direction: Input the number is addressed in Tech Company employee information\");\r\n int input_user = input.nextInt();\r\n\r\n switch (input_user){\r\n case 1 -> {\r\n System.out.println(\"Here is the salary of the employee of Tech Company\");\r\n System.out.println(\"Salary of Software engineering: \"+Lucas.getSalary_employee());\r\n System.out.println(\"Salary of CEO: \"+Jane.getSalary_employee());\r\n }\r\n case 2 ->{\r\n System.out.println(\"Here is the name of the employee of Tech Company\");\r\n System.out.println(\"The software engineering of Tech Company name of the employee is: \"+Jane.Get_name_employee());\r\n System.out.println(\"The CEO Tech Company name of the employee is: \"+Lucas.Get_name_employee());\r\n }\r\n case 3 ->{\r\n System.out.println(\"Here is the Email Address of employee of Tech Company\");\r\n System.out.println(\"Jane Charlotte is CEO of Tech company Email Address its : \"+Jane.Get_Email_employee());\r\n System.out.println(\"Lucas Smith is Software Engineering of Tech Company Email Address its: \"+Lucas.Get_Email_employee());\r\n }\r\n case 4 ->{\r\n System.out.println(\"Here is the Employee Role of Tech Company\");\r\n System.out.println(Jane.Get_role_employee());\r\n System.out.println(Lucas.Get_role_employee());\r\n }\r\n case 5 ->{\r\n System.out.println(\"Here is all the Intern get accepted to Tech Company \");\r\n System.out.println(\"1.\"+Intern_Ava.Get_name_employee()+\" GPA college: \"+Intern_Ava.Get_Intern_application()+\"- \"+\" Application: Accepted \"+Intern_Ava.Get_role_employee());\r\n System.out.println(\"2.\"+Intern_Sophia.Get_name_employee()+\" GPA college: \"+Intern_Sophia.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Sophia.Get_role_employee());\r\n System.out.println(\"3.\"+Intern_James.Get_name_employee()+\" GPA college: \"+Intern_James.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_James.Get_role_employee());\r\n System.out.println(\"4.\"+Intern_Nicholas.Get_name_employee()+\"GPA college: \"+Intern_Nicholas.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Nicholas.Get_role_employee());\r\n }\r\n }\r\n\r\n\r\n\r\n }", "public static void main(String[] args) {\n ArrayList saleEmployees = new ArrayList<>();\n saleEmployees.add(\"Irene\");\n saleEmployees.add(\"Mihael\");\n\n // emplyees list for service\n ArrayList purchaseEmployees = new ArrayList<>();\n purchaseEmployees.add(\"Eric\");\n purchaseEmployees.add(\"Irene\");\n\n\n Department direction = new Department(\"Alfred Boss\", \"Vorstand\");\n Department sale = new Department(\"Mustermann Max\", \"Vertrieb\", direction, saleEmployees);\n Department salePrivat = new Department(\"Musterfrau Angela\", \"Vertrieb Privatkunden\", sale);\n Department saleB2B = new Department(\"Muste Alfons\", \"Vertrieb Firmenkunden\", sale);\n Department purchase = new Department(\"Kufmann Alois\", \"Einkauf\", direction);\n Department purchaseMechanic = new Department(\"Gunz Herlinde\", \"Einkauf Mechanik\", purchase, purchaseEmployees);\n Department purchaseMechanicSmall = new Department(\"Friedrich Hermann\", \"Einkauf Kleinteile\", purchaseMechanic);\n Department purchaseMechanicBig = new Department(\"Peter Hannelore\", \"Einkauf Großteile\", purchaseMechanic);\n Department purchaseMechanicBigEU = new Department(\"But Moritz\", \"Einkauf Europa\", purchaseMechanicBig);\n Department service = new Department(\"Gyula H\", \"Service\");\n\n service.switchDepartment(saleB2B);\n service.switchDepartment(purchase);\n\n service.removeDepartment();\n\n sale.switchEmployees(\"Mihael\", purchaseMechanicBigEU);\n\n purchaseMechanicBigEU.switchDepartment(direction);\n direction.printOrganisation(\" \", \"- \", 1);\n\n }", "public static void main(String[] args) throws NullPointerException {\n\n\t\t// default constructor\n\t\tEmployeeInfo employeeInfo = new EmployeeInfo();\n\t\tEmployeeInfo employeeInfo1 = new EmployeeInfo(\" FORTUNE COMPANY \");\n\n\t\tEmployeeInfo emp1 = new EmployeeInfo(1, \"Abrah Lincoln\", \"Accounts\", \"Manager\", \"Hodgenville, KY\");\n\t\tEmployeeInfo emp2 = new EmployeeInfo(2, \"John F Kenedey\", \"Marketing\", \"Executive\", \"Brookline, MA\");\n\t\tEmployeeInfo emp3 = new EmployeeInfo(3, \"Franklin D Rossevelt\", \"Customer Realation\", \"Assistnt Manager\",\n\t\t\t\t\"Hyde Park, NY\");\n\n\n\t\t// Printing Employee information in this pattern\n\t\t// \"ID Name Number Department Position Years Worked Pension Bonus Total salary \"\n\n\t\tSystem.out.println(emp1.employeeId() + \"\\t\" + emp1.employeeName() + \"\\t\\t\" + emp1.getDepartment() + \"\\t\\t\"\n\t\t\t\t+ emp1.getJobTitle() + \"\\t\\t\\t\" + emp1.getYearsWorked() + \"\\t\\t\" + emp1.calculateEmployeePension()\n\t\t\t\t+ \"\\t\" + emp1.calculateEmployeeBonus() + \"\\t\\t\" + emp1.calculateSalary());\n\n\t\tSystem.out.println(emp2.employeeId() + \"\\t\" + emp2.employeeName() + \"\\t\\t\" + emp2.getDepartment() + \"\\t\\t\"\n\t\t\t\t+ emp2.getJobTitle() + \"\\t\\t\" + emp2.getYearsWorked() + \"\\t\\t\" + emp2.calculateEmployeePension() + \"\\t \"\n\t\t\t\t+ emp2.calculateEmployeeBonus() + \"\\t\\t\" + emp2.calculateSalary());\n\n\t\tSystem.out.println(emp3.employeeId() + \"\\t\" + emp3.employeeName() + \"\\t\" + emp3.getDepartment() + \"\\t\"\n\t\t\t\t+ emp3.getJobTitle() + \"\\t\" + emp3.getYearsWorked() + \"\\t\\t \" + emp3.calculateEmployeePension() + \"\\t\"\n\t\t\t\t+ emp3.calculateEmployeeBonus() + \" \\t\\t\" + emp3.calculateSalary());\n\n\n\n\t}", "public String getEmployeeMangerDetails(Employeedetails employeedetails);", "public Manager(Employee[] employees, String name, String jobTitle, int level, String dept) {\n\t\tsuper(name, jobTitle, level, dept);\n\t\tthis.employees = employees;\n\t}", "public String toString(){\r\n return getNumber() + \":\" + getLastName() + \",\" + getFirstName() + \",\" + \"Sales Employee\";\r\n }", "public void setEmployees(int _employees){\n employees = _employees;\n }", "java.lang.String getEmployeeName();", "public EmployeeBoarding addEmployee(RetailscmUserContext userContext, String employeeBoardingId, String companyId, String title, String departmentId, String familyName, String givenName, String email, String city, String address, String cellPhone, String occupationId, String responsibleForId, String currentSalaryGradeId, String salaryAccount , String [] tokensExpr) throws Exception;", "public String getEmployeeName();", "public void DisplayAllEmployees(){\r\n String format = \"%-20s %-20s %-9s\";\r\n System.out.println(\"\\n\");\r\n System.out.printf(format, \"|\"+\" Name \", \"|\"+\" Department \", \"|\"+\" phone number|\"+\"\\n\");\r\n System.out.println(\"----------------------------------------------------------\");\r\n for(Employee employee: listOfEmployees){\r\n System.out.format(format,\"|\"+employee.name,\"|\"+employee.departmentName,\"|\"+employee.contactNumber+\" |\"+ \"\\n\");\r\n }\r\n }", "public String getEmployees(){\n return employees;\n }", "public ResultSet getDepartmentByID(int dept_no);", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tMap<String, String > empRecord = new HashMap<>();\n\t\t\n\t\tempRecord.put(\"CEO\", null);\n\t\tempRecord.put(\"DU Head\", \"CEO\");\n\t\tempRecord.put(\"Project Manager\", \"DU Head\");\n\t\tempRecord.put(\"Team Lead\", \"Project Manager\");\n\t\tempRecord.put(\"SSE\", \"Team Lead\");\n\t\tempRecord.put(\"SE\", \"SSE\");\n\t\tempRecord.put(\"ASE\" , \"SE\");\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the name of employee\");\n\t\tString emp = sc.nextLine();\n\t\tSystem.out.println(emp);\n\t\t\n\t\tdisplayManagerEmployee(empRecord, emp);\n\t\t\n\t\t\n\t}", "public ResultSet getDepartmentByName(String dept_name);", "void assign (int departmentId, AssignEmployeeRequest empList);", "HashSet<String> displayEmployee();", "public void setManagerEmpId(String managerEmpId) {\n _managerEmpId = managerEmpId;\n }", "@Override\n public String toString() {\n return \"Manager{\" +\n \"name='\" + name + '\\'' +\n \", lastname='\" + lastname + '\\'' +\n \", yearOfBirth=\" + yearOfBirth +\n \", phone='\" + phone + '\\'' +\n \", nameOfDepartment='\" + nameOfDepartment + '\\'' +\n '}';\n }", "@Test\n\tvoid testGetDepartmentsByCrit() {\n\t\tDepartmentDAO ddao = new DepartmentDAO();\n\t\tList<Department> ls = ddao.getDepartmentsByCrit();\n\t\tIterator<Department> it = ls.iterator();\n\n\t\twhile (it.hasNext()) {\n\t\t\tDepartment dpt = it.next();\n\t\t\tSystem.out.println(dpt.getDepartment_name() + \" \" + dpt.getLocation_id() + \" \" + dpt.getManager_id());\n\t\t}\n\t\t// assertEquals(203, ls.get(0).getManager_id());\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tDeveloper d1 = new Developer(1, \"chandu\", 200000);\n\t\tDeveloper d2 = new Developer(2, \"Reddy\", 250000);\n\t\tManager m1 = new Manager(1, \"Chandu\", 4000000);\n\t\tManager m2 = new Manager(2, \"Reddy\", 6000000);\n\n\t\tSystem.out.println(\"Name of Employee:\" + d1.getEmployeeName() + \"---\" + \"Salary:\" + d1.getSalary());\n\t\tSystem.out.println(\"Name of Employee:\" + d2.getEmployeeName() + \"---\" + \"Salary:\" + d2.getSalary());\n\t\tSystem.out.println(\"Name of Employee:\" + m1.getEmployeeName() + \"---\" + \"Salary:\" + m1.getSalary());\n\t\tSystem.out.println(\"Name of Employee:\" + m2.getEmployeeName() + \"---\" + \"Salary:\" + m2.getSalary());\n\t}", "public void empDetails() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "public String getManagerEmpId() {\n return _managerEmpId;\n }", "public Map<String, String> getNamesAndDptsOfEmployeesFromDepartmentTabs() {\n\n List<WebElement> teamCats = teamPageFactory.teamDepartments;\n int qtyCategories = teamCats.size();\n Map<String, String> otherEmployeesNamesDpts = new HashMap<>();\n\n for (int i = 1; i < qtyCategories; i++) {\n teamCats.get(i).click();\n otherEmployeesNamesDpts.putAll(getNamesAndDepartmentsOfEmployees());\n }\n return otherEmployeesNamesDpts;\n }", "public static void main(String[] args) {\nmanager xx=new manager(\"sarath\",34,\"9895639874\",\"eloor\",30000,\"BPO\");\r\nemployee xx1=new employee(\"jomon\",24,\"9899999999\",\"eloor\",50000,\"testing\");\r\n\r\n\t}", "private void addEmployeeInfo(Section catPart) throws SQLException, IOException{\r\n PdfPTable employee = new PdfPTable(1);\r\n \r\n Paragraph empId = new Paragraph(\"Medarbejdernummer: \"+model.getTimeSheet(0).getEmployeeId());\r\n PdfPCell empIdCell = new PdfPCell(empId);\r\n empIdCell.setBorderColor(BaseColor.WHITE);\r\n String name = fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getFirstName() +\" \"+ fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getLastName();\r\n Paragraph empName = new Paragraph(\"Navn: \" + name);\r\n PdfPCell empNameCell = new PdfPCell(empName);\r\n empNameCell.setBorderColor(BaseColor.WHITE);\r\n \r\n employee.setHeaderRows(0);\r\n employee.addCell(empIdCell);\r\n employee.addCell(empNameCell);\r\n employee.setWidthPercentage(80.0f);\r\n \r\n catPart.add(employee);\r\n }", "public static void main(String[] args) {\n\n\n String employeeName = \"Gurcu\";\n String companyName = \"Kucuk Holding\";\n int employeeId = 5;\n String jobTitle = \" CEO \";\n double salary = 100000.5;\n int ssn = 12345678;\n\n System.out.println(\"Employee Name: \"+employeeName);\n System.out.println(\"Company Name: \"+companyName);\n System.out.println(\"Employee Id :\" +employeeId );\n System.out.println(\"Job Title :\"+jobTitle);\n System.out.println(\"Social Security Number:\"+ssn);\n System.out.println(\"Salary:\"+salary);\n\n System.out.println(\"Employee Name:\"+employeeName + \"\\nCompany Name:\"+companyName +\n \"\\nEmployee ID: \" +employeeId + \"\\nJob Title: \" + jobTitle +\n \"\\nSalary:\"+ salary + \"\\nSnn:\" +ssn);\n\n System.out.println(\"==================================================\");\n\n String firstName = \"Zeynep\";\n String lastName = \"Dere\";\n\n System.out.println(\"Full Name: \" + firstName+\" \"+lastName);\n\n\n }", "private static void LessonCollections() {\n List<Employee> employeeList = new ArrayList<Employee>();\n\n //Create Employees from Employee objects constructor\n Employee emp1 = new Employee(\"Jordan\", \"Walker\");\n Employee emp2 = new Employee(\"Mark\", \"Tuttle\");\n Employee emp3 = new Employee(\"Wayne\", \"Henderson\");\n\n //Add them to employee list\n employeeList.add(emp1);\n employeeList.add(emp2);\n employeeList.add(emp3);\n\n //Create employee and add to list in one line\n employeeList.add(new Employee(\"Erick\", \"Jensen\"));\n\n //Get info from list\n System.out.println(employeeList.get(3).GetFullName());\n\n //Print all full names from employee list\n for(Employee e : employeeList) {\n System.out.println(e.GetFullName());\n }\n\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t// Employers DATA BASE ----------------------------\n\t\t\n\t\temployee emp1 = new employee();\n\t\temp1.Name = \"John Billa\";\n\t\temp1.employeeCode = 001;\n\t\t\n\t\temployee emp2 = new employee();\n\t\temp2.Name = \"Anthony Woods\";\n\t\temp2.employeeCode = 002;\n\t\t\n\t\temployee emp3 = new employee();\n\t\temp3.Name = \"Jessica Underwood\";\n\t\temp3.employeeCode = 003;\n\t\t\t\t\n\t\t// End of Employers DATA BASE ---------------------\n\t\t\n\t\tSystem.out.println(\"Welcome! Please insert your EmployeeCode:\");\n\t\tint codeEnter = sc.nextInt();\n\t\t\n\t\tif(codeEnter == 001) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp1.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\telse if(codeEnter == 002) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp2.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\telse if(codeEnter == 003) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp3.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"ERROR!!! ERROR!!!\");\n\t\t\twhile (codeEnter > 003) {\n\t\t\t\tSystem.out.println(\"=====================================\");\n\t\t\t\tSystem.out.println(\"Insert Again your EmployeeCode\");\n\t\t\t\tcodeEnter = sc.nextInt();\n\t\t\t\t\n\t\t\t\tif(codeEnter == 001) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp1.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\telse if(codeEnter == 002) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp2.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\telse if(codeEnter == 003) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp3.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"======================================================= \");\n\t\tSystem.out.println(\"\");\n\t\t\n\t\tif (codeEnter == 001) {\n\t\t\tSystem.out.println(emp1.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\t\telse if (codeEnter == 002) {\n\t\t\tSystem.out.println(emp2.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(emp3.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"1. New Delivery\");\n\t\tSystem.out.println(\"2. New Client\");\n\t\tSystem.out.println(\"3. Exit System\");\n\t\t\n\t\tint employeeChoice = sc.nextInt();\n\t\t\n\t\tswitch(employeeChoice){\n\t\t\tcase 1: \n\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 2: \n\t\t\t\tSystem.out.println(\"2\");\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println(\"3\");\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tsc.close();\n\t}", "public static void main(String[] args) {\n\t\tEmpleados empleado1 = new Empleados(\"Carlos Arquero\",16000,2016,6,03);\r\n\t\tEmpleados empleado2 = new Empleados(\"Luisa Lopez\",25000,2010,12,19);\r\n\t\tEmpleados empleado3 = new Empleados(\"Juaquin Moreno\",12000,2017,11,27);\t\r\n\t\r\n\t\templeado1.subeSueldo(4);\r\n\t\templeado2.subeSueldo(6);\r\n\t\templeado3.subeSueldo(3);\r\n\t\tSystem.out.println(\"nombre :\"+empleado1.dameNombre()+\" sueldo :\"+empleado1.dameSueldo()\r\n\t\t+\" Fecha de incorporacion :\"+empleado1.damealtaContrato());\r\n\t\tSystem.out.println(\"nombre :\"+empleado2.dameNombre()+\" sueldo :\"+empleado2.dameSueldo()\r\n\t\t+\" Fecha de incorporacion :\"+empleado2.damealtaContrato());\r\n\t\tSystem.out.println(\"nombre :\"+empleado3.dameNombre()+\" sueldo :\"+empleado3.dameSueldo()\r\n\t\t+\" Fecha de incorporacion :\"+empleado3.damealtaContrato());\r\n\t}", "public static void main(String[] args) {\n\nCeo c=new Manager();\nc.manage();\nc.invest();\nManager n=new Manager();\nn.employee();\n//ManagingDirector md=new Manager();\n\n\n//Manager m=new Manager();\n//m.manage();\n//m.employee();\n \n }", "public void xxx() {\n System.out.println(\"Salary: \" + salary);\n printInfo();\n\n Employee e = new Employee(\"Andy\", \"123\", 26);\n// System.out.println(\"Name: \" + e.name + \"; Age: \" + e.age + \";ID: \" + e.id);\n\n Manager m = new Manager(\"Andylee\", \"124\", 27);\n// System.out.println(\"Name: \" + m.name + \"; Age: \" + m.age + \";ID: \" + m.id);\n\n }", "public Departmentdetails getDepartmentByName(String departmentName);", "public void listEmployees()\n\t{\n\t\tString str = \"Name\\tSurname\\tMail\\tPassword\\tBranchId\\tId\\n\";\n\t\t\n\t\tList<Employee> employees = this.company.getEmployees();\n\n\t\tfor(int i=0; i<employees.length(); i++)\n\t\t{\n\t\t\tstr += employees.get(i).getName() + \"\\t\" + employees.get(i).getSurname() + \"\\t\" + employees.get(i).getMail() + \"\\t\" + employees.get(i).getPassword() + \"\\t\\t\" + employees.get(i).getBranchId() + \"\\t\\t\" + employees.get(i).getId() + \"\\n\";\n\t\t}\n\n\t\tSystem.out.println(str);\n\n\t}", "public static void main(String[] args) {\n\t\t\n\t\temployeerecords e1 = new employeerecords(\"emp001\",\"John Smith\",\"IT\",150000);\n\t\temployeerecords e2 = new employeerecords(\"emp002\",\"Brenda Kein\",\"FINANCE\",250000);\n\t\temployeerecords e3 = new employeerecords(\"emp003\", \"Clark Hope\",\"HR\",100000);\n\t\temployeerecords e4 = new employeerecords(\"emp004\",\"Diane Garner\",\"IT\",200000);\n\t\temployeerecords e5 = new employeerecords(\"emp005\",\"Julian Aniston\",\"MARKETING\",125000);\n\t\t\n\t\t\n\t\tHashMap hm = new HashMap();\n\t\t\n\t\thm.put(1,e1);\n\t\thm.put(2,e2);\n\t\thm.put(3,e3);\n\t\thm.put(4,e4);\n\t\thm.put(5,e5);\n\t\t\n\t\tIterator trav = hm.entrySet().iterator();\n\t\t\n\t\twhile(trav.hasNext())\n\t\t{\n\t\t\t\n\t\tMap.Entry record = (Map.Entry)trav.next();\n\t\temployeerecords e=(employeerecords)record.getValue();\n\t\tSystem.out.print(record.getKey() + \" \");\n\t\tSystem.out.println(e.employeeid +\" \"+ e.employeename+\" \"+e.officedepartment+\" \"+e.empsalary);\n\t\t}\n\t}", "public void displayEmployees(){\n System.out.println(\"NAME --- SALARY --- AGE \");\n for (Employee employee : employees) {\n System.out.println(employee.getName() + \" \" + employee.getSalary() + \" \" + employee.getAge());\n }\n }", "public String toString() {\r\n\t\treturn \"Name : \"+name+\"\\nEmp# : \"+employeeNum;\r\n\t}", "public static void main(String[] args) throws Exception { \n\t\t\n/*------------------------------------------------------------------------------------------------*/\n\t//managname,h_id,dept_count\n\t\n\t //obj.joinempdept() ; }}\n\t\t//System.out.println(obj.toString());; \n\t\t\n/*------------------------------------------------------------------------------------------------*/\n\t\t\n\t\t\n//emptab k= new emptab(eId,departmentId,employeeName,gender,birthDate,joiningDate, panCard,adharNum,drivingLicense_num,employeeMobnum);\n\t\t//obj.jdate();\n\t\t\n\t\t//System.out.println(k);\n\t\t//obj.deptcount(); }}\n\t//Scanner sc = new Scanner(System.in);\n\t//System.out.println(\"Enter the Dept id\");\n\t//int deptid=sc.nextInt();\n\t//obj.empdept(gender, e_id)\n\t//obj.empdet(deptid);\n\t//EmployeeDetail e = new EmployeeDetail();\n\t\t//e.seteId1(-1);\n\t\t//e.setEId(-1);\n\t\t\n\t\t//obj.Allemp();\n\t\t//System.out.println(obj.toString());\n\t\n\n Scanner scan = new Scanner(System.in);\n Scanner scan2 = new Scanner(System.in);\n \n SelectQuery sq = new SelectQuery();\n InsertQuery iq = new InsertQuery();\n UpdateQuery uq = new UpdateQuery();\n DeleteQuery dq = new DeleteQuery(); \n empdetailsDAOImpl obj1 = new empdetailsDAOImpl();\n //deptcount Dc= new deptcount(obj1);\n \n \n \n Connection connection = dbconnection.getConnection();\n \n String con = \"y\";\n\n while(con.equalsIgnoreCase(\"y\"))\n {\n System.out.println(\"Enter Choice:\\n1.ViewData\\n2.Insert Data\\n3.Update Data\\n4.Delete Data\\n5.Department Members\\n6.DeptEmpName\");\n int choice = scan.nextInt();\n \n switch(String.valueOf(choice))\n {\n \n case \"1\":{sq.sel();} break;\n case \"2\":{iq.insert();} break; \n case \"3\":{uq.upd();} break;\n case \"4\":{dq.delete();} break;\n case \"5\":{obj1.deptcount(); } break;\n case \"6\":{\n \t Scanner ec = new Scanner(System.in);\n \t\tSystem.out.println(\" Enter employeeID ->\");\n \t\tint dId= ec.nextInt();\n \t \n \t obj1.empdet(dId);} break;\n default :{System.out.println(\"Wrong Choice\");} break; \n \n }\n System.out.println(\"\\n\\nContinue? (Y/N): \");\n con = scan2.nextLine();\n }\n }", "public static void main(String[] args) {\n\t\tEmployee employee= new Employee(\"Gowtham\",\"Subramanian\");\r\n\t\tSystem.out.println(\"Hello \"+employee.getfName()+\" Enter Department Name\");\r\n\t\tSystem.out.println(\"1.Technical\\n2.Admin\\n3.HR\\n4.Legal\");\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\tint depChoice = in.nextInt();\r\n\t\tDepartment department = new Department();\r\n\t\tCredentialService cr = new CredentialService();\r\n\t\tswitch(depChoice) {\r\n\t\tcase 1:\r\n\t\t\tdepartment.setDeptName(\"technical\");\r\n\t\t\tString email = cr.generateEmail(employee, department);\r\n\t\t\tString password = cr.generatePassword();\r\n\t\t\tcr.showCredentials(email, password);\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tdepartment.setDeptName(\"admin\");\r\n\t\t\temail = cr.generateEmail(employee, department);\r\n\t\t\tpassword = cr.generatePassword();\r\n\t\t\tcr.showCredentials(email, password);\r\n\t\t\tbreak;\r\n\r\n\t\tcase 3:\r\n\t\t\tdepartment.setDeptName(\"hr\");\r\n\t\t\temail = cr.generateEmail(employee, department);\r\n\t\t\tpassword = cr.generatePassword();\r\n\t\t\tcr.showCredentials(email, password);\r\n\t\t\tbreak;\r\n\r\n\t\tcase 4:\r\n\t\t\tdepartment.setDeptName(\"legal\");\r\n\t\t\temail = cr.generateEmail(employee, department);\r\n\t\t\tpassword = cr.generatePassword();\r\n\t\t\tcr.showCredentials(email, password);\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Invalid\");\r\n\t\t}\r\n\t}", "public static void getEmployeeInformation(Employee [] employee) {\n\t\tif (Employee.getEmployeeQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no employee!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"-------List of Employees-------\\n\"\n\t\t\t\t\t\t+ (i+1) + \": \"+ employee[i+1].getName() + \"\\n\");\n\t\t\t}\t\t\t\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\tDepartamento dep40= new Departamento ( 40, \"Formacion\", null );\n\t\t\n\t\t\n\t\tEmpleado emp1 =new Empleado(1,\"paco\",\"perez\",\"h\", 5000, 28, 5, dep40) ;\n\t\t\n\t\t// para introducir el departaementp \n\t\t\n\t\t//primer metodo\n\t\t\n\t\t\n\t\t\t\t\n\t\tEmpleado emp2 =new Empleado(2,\"luis\",\"sanchez\",\"h\", 4000, 45, 2, dep40) ;\t\n\t\tEmpleado emp3 =new Empleado(4, \"javi\", \"perez\", \"h\", 8000, 54, 0.2, dep40);\n\t\t\t\t\n\t\t\n\t\t\t\t\n\t\t\n\t\tSystem.out.println(emp1);\n\t\tSystem.out.println(emp2);\t\n\t\tSystem.out.println(emp3);\n\t\t\n\t\tdep40.setJefe(emp1); // adjudico el Jefe al departamento 40\n\t\t\n\t\t\n\t\t// creo un departaemnto nuevo adjudicado a un empleado ade un departamento inicial ( no tienen por que ser el departamento del que ahora le reclama) usando el constructoe directamente ne vez de la variable que alude a la clase\n\t\t//departamento= new Departamento(120, \"formacion\", jefe)\n\t\tDepartamento dep120 = new Departamento (120, \"formacion\", new Empleado(5, \"luisa\", \"sanchez\", \"M\", 14000, 35, 2, dep40)); //he creado un empleado del depto 30 y luego le hago jefe del 120\n\t\t dep120.getJefe().setDepartamento(dep120); /* actuando con dos variables. como ese new empleado no tiene variable adjudicada \n\t\t *y tengo que hacer alusion a Úl para cambiaer en el empleado su departaemento , me valgo del un metodo dep120.getJefe()que averigua qcual es la direccion de ese empleado en la tabla departamento y con un set le ingerso el departaento nuievo\n\t\t \n\t\t \n\t\t */\n\t\t System.out.println (\"departaqmento 120\" + dep120.getJefe().getNombre());\n\t\t\n\t/* SALIDA POR CONSOLA :\n\t * el niombre del emp2, su salario y el nombre del departamento al que pertenence.\t// \n\t\t* como el nombre departamento no es un atributo normal sino que es NDE una clase relacionada .SE INVOCA AL GET DE LL ATRIBUTO INCLUIDO CONN LA CLASE Y TRAS EL LOS METODOS GET DE LA CLASE DEPARTAMENTO EN ESTE CLASO EL DEL CAMPO NOMBRE DEL DEPARTAMENTO\n\t*/\t\n\t\tSystem.out.println(\" nombre emp2:\"+emp2.getNombre()+ \" su salalrio es\"+ emp2.getSalario()+\" , su departamento es: \"+emp2.getDepartamento().getNombre().toUpperCase());\n\t\t/*\n\t\t * el empleado \n\t\t * \n\t\t * */\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\" nombre emp2:\"+emp2.getNombre()+ \" su salalrio es\"+ emp2.getSalario()+\" , su departamento es: \"+emp2.getDepartamento().getNombre());\n\tSystem.out.println(dep120);\n\t// OJO SE BUCLA POR QUE LOS TO STRING DE DEPARTAEMNTO Y CLIENTE SE CRIUZARIAN DEBORDANDO LA MEMORIA. PUEDO HACER VARIAS COSAS\n\t/* PUEDO QUITAR DEUNO DE LOS TO STRING DE UNA CLASE O DE LA OTRA SEGUN ME INTERESE EL CAMPO QUE LAS LIGA ( PEJ DEPARTAMENTO EN EMPLEADO)\n\t * PUEDO CREAR UN METODO QUE SALVE LA CONDICION DE NULL SI ALGUNA VARIABLE ESTA VACICA.\n\t * \n\t * \n\t */\n\t//SALIDA DEL NOMBRE DEL JEFE DEL DEAPARTAEMENTO QUE SEA POR EJEMPLO DE UN EMPLEADO ()\n\t\n\tSystem.out.println ( dep120.getJefe().getNombre()); //get jefe me dedevuelve el monbre de jefe dela tabala departaemnto. get Nombre me devuelve de la tabla empleados el nombre que estaba como jefe en departamento.\n\tSystem.out.println (\"el jefe de emp2 luis: \"+ emp2.getDepartamento().getJefe().getNombre());\n\tSystem.out.println(dep120);\n\t\n\t\n\t\n\t\n\t}", "List<Employee> allEmpInfo();", "public Department employeeDepartment(String employeeName) {\n\n String departmentOfEmployee = \"\";\n\n try {\n Connection conn = ConnectToSqlDB.connectToSqlDatabase();\n String query = \"SELECT * FROM employees;\";\n\n ConnectToSqlDB.statement = conn.createStatement();\n\n ConnectToSqlDB.resultSet = ConnectToSqlDB.statement.executeQuery(query);\n\n while (ConnectToSqlDB.resultSet.next()) {\n int idField = ConnectToSqlDB.resultSet.getInt(\"employee_id\");\n String nameField = ConnectToSqlDB.resultSet.getString(\"employee_name\");\n String salaryField = ConnectToSqlDB.resultSet.getString(\"employee_salary\");\n String departmentField = ConnectToSqlDB.resultSet.getString(\"department\");\n\n if (nameField.equals(employeeName)) {\n departmentOfEmployee = departmentField;\n }\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n System.out.print(\"This employee belongs to the following department: \");\n if (departmentOfEmployee.equals(Department.Executive.toString())) {\n return Department.Executive;\n }\n if (departmentOfEmployee.equals(Department.Development.toString())) {\n return Department.Development;\n }\n if (departmentOfEmployee.equals(Department.Accounting.toString())) {\n return Department.Accounting;\n }\n if (departmentOfEmployee.equals(Department.Human_Resources.toString())) {\n return Department.Human_Resources;\n }\n else return Department.No_Department;\n\n }", "int getEmployeeId();", "private void getemp( String name,int id ) {\r\n\t\tSystem.out.println(\" name and id\"+name+\" \"+id);\r\n\t}", "public static void main (String args[] ){\n\t\tScanner scanner = new Scanner( System.in );\r\n\t\tSystem.out.print ( \" 1. Load Employee (From File) \\n 2. Exit Program \\n Enter Your Selection: \" );\r\n\t\tint input = scanner.nextInt();\r\n\t\t\r\n\t\t//if user inputs 1 read the text file and print employees loaded from the file\r\n\t\tif (input == 1 ){\r\n\t\t\tString[] Data;\r\n\t\t\t/**\r\n\t\t\t**create four arrays each of type StaffPharmacist, PharmacyManager, StaffTechnician, Senior technician\r\n\t\t\t**in order to store the employee objects. create arrays of length 1\r\n\t\t\t**/\r\n\t\t\tStaffPharmacist [] Pharmacist = new StaffPharmacist[1];\t\t\r\n\t\t\tPharmacyManager [] Manager = new PharmacyManager[1];\t\t\t\r\n\t\t\tStaffTechnician [] staffTech = new StaffTechnician[1];\t\t\t\r\n\t\t\tSeniorTechnician [] seniorTech = new SeniorTechnician[1];\r\n\t\t\ttry{\r\n\t\t\t\t//read the text file using scanner\r\n\t\t\t\tFile file = new File(\"employees.txt\");\r\n\t\t\t\t\t\t\r\n\t\t\t\tScanner sc = new Scanner(file);\r\n\t\t\t\t\t\r\n\t\t\t\t//while text file has next line split the text to store all elements in to an array\r\n\t\t\t\twhile (sc.hasNextLine()){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//read the text file and store it in an array called data. split the text file at , and read until we have next line\r\n\t\t\t\t\tData = sc.nextLine().split(\",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t//create 4 employee objects of each employee type \r\n\t\t\t\t\tPharmacyManager pharmacyManager = new PharmacyManager(Data);\r\n\t\t\t\t\tStaffPharmacist staffPharmacist = new StaffPharmacist(Data);\r\n\t\t\t\t\tStaffTechnician staffTechnician = new StaffTechnician(Data);\r\n\t\t\t\t\tSeniorTechnician seniorTechnician = new SeniorTechnician(Data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tint i;\r\n\t\t\t\t\t/** parse through the text files to check the job id number.\r\n\t\t\t\t\tif the job id is one than the employee is pharmacy manager and there fore store it in an array of type pharmacy manager, else if job id == 2 than it is a staff pharmacist there fore store the staff pharmacist employee in the respective array. else if job id == 3 the employee is a staff technician therefore store the employee object staff technician in array of type staff technician and if the id == 4 than the employee is senior technician so store the employee senior technician in an array of type senior technician\r\n\t\t\t\t\t**/\r\n\t\t\t\t\tfor( i = 0; i < Data.length; i = i + 4){\r\n\t\t\t\t\t\tif( Integer.parseInt(Data[i]) == 1 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tManager[0] = pharmacyManager;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 2 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tPharmacist[0] = staffPharmacist;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 3 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tstaffTech[0] = staffTechnician;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 4 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tseniorTech[0] = seniorTechnician;\r\n\t\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\t\t\r\n\t\t\t\t//close the file \r\n\t\t\t\tsc.close();\r\n\t\t\t\t\t\r\n\t\t\t\t//print that the file loaded success fully\r\n\t\t\t\tSystem.out.println ( \" \\n File Successfully Loaded! \" );\r\n\t\t\t\t\t\r\n\t\t\t\t//set a boolean variable named keepgoing equal to true.\r\n\t\t\t\tboolean keepGoing = true;\r\n\t\t\t\t//as long as keep going remains true, do the following steps\r\n\t\t\t\twhile(keepGoing){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//ask the user what they would like to do next\r\n\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\tdo{\r\n\t\t\t\t\t\t//if user inputs 3 that is tries to print checks prior to entering hours worked than throw an error\r\n\t\t\t\t\t\tif(input == 3){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tSystem.out.println( \" Please enter the hours worked (Option #2) before trying to calculate the paycheck amounts! \" );\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//again ask the user after throwing the exception about what they would like to do\r\n\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//do this steps as long as user inputs 1 or 2\r\n\t\t\t\t\t\tdo{\r\n\t\t\t\t\t\t\t//if the user inputs 1 print the employee information described in respective classes of employees\r\n\t\t\t\t\t\t\tif(input == 1){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tManager[0].printPharmacyManager();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tPharmacist[0].printStaffPharmacist();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tseniorTech[0].printSeniorTechnician();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tstaffTech[0].printStaffTechnician();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\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\r\n\t\t\t\t\t\t\t//if the user inputs 2 prompt the user asking the number of hours worked by employees\r\n\t\t\t\t\t\t\telse if(input == 2){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tSystem.out.print( \" \\n Please enter the hours worked: \" );\r\n\t\t\t\t\t\t\t\tint workingHours = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//than again ask user what they would like to do\r\n\t\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t/**if user inputs 3 after they entered number of hours employees worked than calculate the employee pay checks\r\n\t\t\t\t\t\t\t\tusing the calculate pay method defined in employee class\r\n\t\t\t\t\t\t\t\tget the employees pay rate by using getHourlyRate method defined in employee class\r\n\t\t\t\t\t\t\t\t**/\r\n\t\t\t\t\t\t\t\tif(input == 3){\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tManager[0].calculatePay(workingHours, Manager[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tPharmacist[0].calculatePay(workingHours, Pharmacist[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tstaffTech[0].calculatePay(workingHours, seniorTech[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tseniorTech[0].calculatePay(workingHours, staffTech[0].getHourlyRate() );\r\n\t\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\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t//again show the menu to the user asking them what they would like to do\r\n\t\t\t\t\t\t\t//if user enters one or two or three repeat the above steps else exit the loop\r\n\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}while(input == 1 || input == 2 );\r\n\t\t\t\t\t}while(input == 3);\r\n\t\t\t\t\t//if user enters 4 set keepGoing = false print good bye and exit the loop.\r\n\t\t\t\t\tif(input == 4){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tkeepGoing = false;\r\n\t\t\t\t\t\tSystem.out.println( \" Goodbye! \" );\r\n\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t//if the file is not found in the system throw an IO exception printing file not found\t\t\t\t\t\t\t\r\n\t\t\t}catch(FileNotFoundException fnfe){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t//catch the exception if the file is not found\r\n\t\t\t\tSystem.out.println(\" File Load Failed! \\n java.io.FileNotFoundException: employees.txt ( The system cannot find the file specified) \\n Program Exiting..... \");\r\n\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t//if the user inputs 2 in the main menu bar exit the loop and say goodBye!\r\n\t\tif(input == 2){\r\n\t\t\t\t\r\n\t\t\tSystem.out.println ( \"\\n Good Bye! \\n\" );\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}", "public static void main(String[] args) \r\n\t{\n\t\tSystem.out.print(\"*****Lab Description: Design and implement a class hierarchy representing individuals involved in a business***** \\n\");\r\n\t\tSystem.out.print(\"**[A. The Company Executive list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\t\r\n\t\tAddress E1 = new Address();\r\n\t\tExecutive EX1 = new Executive(\"Bob\", \"Jim\", 18, 1001);\r\n\t\tE1.setCity(\"San Jose\");\r\n\t\tE1.setState(\"CA\");\r\n\t\tE1.setStreetName(\"S 11st street\");\r\n\t\tE1.setZipCode(98119);\r\n\t\tE1.setStreetNumber(89);\r\n\t\tEX1.setEmployeeId(\"EX-01\");\r\n\t\tEX1.setlevelOfEducation(\"Master\");\r\n\t\tEX1.setspecoalAccomo(\"NO\");\r\n\t\tEX1.setYearlyBonus(8000);\r\n\t\tEX1.setYearlySalary(380000);\r\n\t\tEX1.computePay();\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tEX1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tE1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tAddress E2 = new Address();\r\n\t\tExecutive EX2 = new Executive(\"Sam\", \"Time\", 26, 1002);\t\r\n\t\tE2.setCity(\"San Jose\");\r\n\t\tE2.setState(\"CA\");\r\n\t\tE2.setStreetName(\"N 68st street\");\r\n\t\tE2.setZipCode(92269);\r\n\t\tE2.setStreetNumber(669);\r\n\t\tEX2.setEmployeeId(\"EX-02\");\r\n\t\tEX2.setlevelOfEducation(\"Master\");\r\n\t\tEX2.setspecoalAccomo(\"NO\");\r\n\t\tEX2.setYearlyBonus(5000);\r\n\t\tEX2.setYearlySalary(520000);\r\n\t\tEX2.computePay();\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tEX2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tE2.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\t\t\r\n\t\tSystem.out.print(\"**[B. The Company Full-time Salaried Employees list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tAddress F1 = new Address();\r\n\t\tFullTimeSalaryEmployee FS1 = new FullTimeSalaryEmployee(\"Kit\", \"Amy\", 24, 2001);\r\n\t\tF1.setCity(\"San, Jose\");\r\n\t\tF1.setState(\"CA\");\r\n\t\tF1.setStreetName(\"W 16th strret\");\r\n\t\tF1.setStreetNumber(669);\r\n\t\tF1.setZipCode(96335);\r\n\t\tFS1.setEmployeeId(\"FS-2001\");\r\n\t\tFS1.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tFS1.setspecoalAccomo(\"Yes\");\r\n\t\tFS1.setYearlySalary(30000);\r\n\t\tFS1.setYearlyBonus(2000);\r\n\t\tFS1.computePay(4);\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tFS1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tF1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tAddress F2 = new Address();\r\n\t\tFullTimeSalaryEmployee FS2 = new FullTimeSalaryEmployee(\"Him\", \"Lmy\", 28, 2002);\r\n\t\tF2.setCity(\"San, Cruz\");\r\n\t\tF2.setState(\"CA\");\r\n\t\tF2.setStreetName(\"E 169th strret\");\r\n\t\tF2.setStreetNumber(42);\r\n\t\tF2.setZipCode(94561);\r\n\t\tFS2.setEmployeeId(\"FS-2002\");\r\n\t\tFS2.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tFS2.setspecoalAccomo(\"NO\");\r\n\t\tFS2.setYearlySalary(45000);\r\n\t\tFS2.setYearlyBonus(2000);\r\n\t\tFS2.computePay(3);\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tFS2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tF2.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tSystem.out.print(\"**[C. The Company Full-time Hourly Employees list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tAddress H1 = new Address();\r\n\t\tFullTimeHourlyEmployee FH1 = new FullTimeHourlyEmployee(\"Lk\", \"Bit\", 19, 3001);\r\n\t\tH1.setCity(\"San Jose\");\r\n\t\tH1.setState(\"CA\");\r\n\t\tH1.setStreetName(\"Willmams Street\");\r\n\t\tH1.setStreetNumber(779);\r\n\t\tH1.setZipCode(96654);\r\n\t\tFH1.setEmployeeId(\"FH-3001\");\r\n\t\tFH1.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tFH1.setspecoalAccomo(\"NO\");\r\n\t\tFH1.setHourlyPay(100);\r\n\t\tFH1.setOverTimePay(200);\r\n\t\tFH1.computePay(43);\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tFH1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tH1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tAddress H2 = new Address();\r\n\t\tFullTimeHourlyEmployee FH2 = new FullTimeHourlyEmployee(\"Ak\", \"Jit\", 21, 3002);\r\n\t\tH2.setCity(\"San Jose\");\r\n\t\tH2.setState(\"CA\");\r\n\t\tH2.setStreetName(\"Willmams Street\");\r\n\t\tH2.setStreetNumber(779);\r\n\t\tH2.setZipCode(96654);\r\n\t\tFH2.setEmployeeId(\"FH-3002\");\r\n\t\tFH2.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tFH2.setspecoalAccomo(\"NO\");\r\n\t\tFH2.setHourlyPay(100);\r\n\t\tFH2.setOverTimePay(200);\r\n\t\tFH2.computePay(38);\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tFH2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tH1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tSystem.out.print(\"**[D. The Company Part-time Hourly Employees list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tAddress P1 = new Address();\r\n\t\tPartTimeHourlyEmployee PH1 = new PartTimeHourlyEmployee(\"Kitch\", \"Aml\", 18, 4001);\r\n\t\tP1.setCity(\"San jose\");\r\n\t\tP1.setState(\"CA\");\r\n\t\tP1.setStreetName(\"Jim Street\");\r\n\t\tP1.setStreetNumber(66);\r\n\t\tP1.setZipCode(96334);\r\n\t\tPH1.setlevelOfEducation(\"Master\");\r\n\t\tPH1.setspecoalAccomo(\"NO\");\r\n\t\tPH1.setHourlyPay(60);\r\n\t\tPH1.computePay(30);\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tPH1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tP1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tAddress P2 = new Address();\r\n\t\tPartTimeHourlyEmployee PH2 = new PartTimeHourlyEmployee(\"Kim\", \"Boy\", 19, 4002);\r\n\t\tP2.setCity(\"San jose\");\r\n\t\tP2.setState(\"CA\");\r\n\t\tP2.setStreetName(\"Amy Street\");\r\n\t\tP2.setStreetNumber(696);\r\n\t\tP2.setZipCode(96465);\r\n\t\tPH2.setlevelOfEducation(\"Master\");\r\n\t\tPH2.setspecoalAccomo(\"NO\");\r\n\t\tPH2.setHourlyPay(60);\r\n\t\tPH2.computePay(30);\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tPH2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tP2.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tSystem.out.print(\"**[E. The Company Hourly Paid Contractors list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tAddress c1 = new Address();\r\n\t\tContractor C1 = new Contractor(\"Ace\", \"EL\", 27, 5001);\r\n\t\tc1.setCity(\"San Jose\");\r\n\t\tc1.setState(\"CA\");\r\n\t\tc1.setStreetNumber(556);\r\n\t\tc1.setStreetName(\"S 28th Street\");\r\n\t\tc1.setZipCode(96348);\r\n\t\tC1.setEmployeeId(\"CO-5001\");\r\n\t\tC1.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tC1.setspecoalAccomo(\"NO\");\r\n\t\tC1.setHourlyPay(180.5);\r\n\t\tC1.setOverTimePay(400);\r\n\t\tC1.computePay(40);\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tC1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tc1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\r\n\t\tAddress c2 = new Address();\r\n\t\tContractor C2 = new Contractor(\"Aty\", \"Jack\", 24, 5002);\r\n\t\tc2.setCity(\"San Jose\");\r\n\t\tc2.setState(\"CA\");\r\n\t\tc2.setStreetNumber(556);\r\n\t\tc2.setStreetName(\"W 18th Street\");\r\n\t\tc2.setZipCode(96987);\r\n\t\tC2.setEmployeeId(\"CO-5002\");\r\n\t\tC2.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tC2.setspecoalAccomo(\"NO\");\r\n\t\tC2.setHourlyPay(150.5);\r\n\t\tC2.setOverTimePay(300);\r\n\t\tC2.computePay(42);\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tC2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tc2.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tSystem.out.print(\"**[F. The Company Customers/Clients list]:***************************************** \\n\");\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\tAddress U1 = new Address();\r\n\t\tCustomer CU1 = new Customer(\"Cat\", \"AP\", 34, 6001);\r\n\t\tU1.setCity(\"LA\");\r\n\t\tU1.setState(\"CA\");\r\n\t\tU1.setStreetName(\"Josh Street\");\r\n\t\tU1.setStreetNumber(447);\r\n\t\tU1.setZipCode(50063);\r\n\t\tCU1.setCustomerId(\"CU-6001\");\r\n\t\tCU1.setDirectDeposit(\"YES\");\r\n\t\tCU1.setlevelOfEducation(\"Master\");\r\n\t\tCU1.setPaymentMethod(\"Credit Card\");\r\n\t\tCU1.setPreferredMethod(\"Credit Card\");\r\n\t\tCU1.setspecoalAccomo(\"NO\");\r\n\t\tCU1.makePayment();\r\n\t\tSystem.out.print(\"1. \");\r\n\t\tCU1.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tU1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\t\r\n\t\tAddress U2 = new Address();\r\n\t\tCustomer CU2 = new Customer(\"Frank\", \"Keeny\", 29, 6002);\r\n\t\tU2.setCity(\"San Jose\");\r\n\t\tU2.setState(\"CA\");\r\n\t\tU2.setStreetName(\"E 19th Street\");\r\n\t\tU2.setStreetNumber(112);\r\n\t\tU2.setZipCode(92663);\r\n\t\tCU2.setCustomerId(\"CU-6002\");\r\n\t\tCU2.setDirectDeposit(\"NO\");\r\n\t\tCU2.setlevelOfEducation(\"Undergraduate Degree\");\r\n\t\tCU2.setPaymentMethod(\"Cash\");\r\n\t\tCU2.setPreferredMethod(\"Cash Check\");\r\n\t\tCU2.setspecoalAccomo(\"NO\");\r\n\t\tCU2.makePayment();\r\n\t\tSystem.out.print(\"2. \");\r\n\t\tCU2.introduce();\r\n\t\tSystem.out.print(\"[Address]: \");\r\n\t\tU1.Dispaly();\r\n\t\tSystem.out.print(\"\\n\");\t\r\n\t}", "public static void main(String args[])\r\n\t{\r\n\t\t\r\n\t\tSystem.out.println(\"Enter your first name:\");\r\n\t\tString firstname = sc.nextLine();\r\n\t\tSystem.out.println(\"Enter your last name:\");\r\n\t\tString lastname = sc.nextLine();\r\n\t\tSystem.out.println(\"Please enter the department from the folloiwng \\n 1.Technical \\n 2.Admin \\n 3.Human Resource \\n 4.Legal \");\r\n\t\tint choice = sc.nextInt();\r\n\t\t\r\n\t\tEmployee emp;\r\n\t\t\r\n\t\tswitch( choice ) {\r\n\t\t\tcase 1:\r\n\t\t\t\temp = new Employee( firstname, lastname, \"tech\" );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\temp = new Employee( firstname, lastname, \"adm\" );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\temp = new Employee( firstname, lastname, \"hr\" );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\temp = new Employee( firstname, lastname, \"lg\" );\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.out.println( \"Incorrect choice\" );\r\n\t\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t\t//generate email\r\n\t\tCredentialService cs = new CredentialService();\r\n\t\tString email = cs.generateEmailAddress( emp );\r\n\t\tString password = cs.GeneratePassword();\r\n\t\tcs.showCredentials(emp, email, password);\r\n\r\n\r\n\t\t}", "public static void main(String[] args) {\n\n\n String employeeName = \"Orkhan\";\n String companyName = \"Amazon\";\n int employeeID = 9;\n String jobTitle = \"QA\";\n double salary = 100000.5;\n int ssn = 123456789;\n // employee name : Orkhan\n\n System.out.println(\" Employee Name: \"+employeeName);\n System.out.println(\" Company Name: \"+companyName);\n System.out.println(\" Employee ID: \"+jobTitle);\n System.out.println(\" Salary: \"+salary);\n System.out.println(\" SSN: \"+ ssn);\n\n\n\n/*\nSystem.out.println(\"Employee Name: \" + employeeName + \"\\nCompany Name: \" + companyName + \"\\nEmployee ID: \" + salary + \"\\nSSN: \" + ssn);\n */\n\n System.out.println(\"==========================================================================================================================\");\n String FirstName = \"Yegana\";\n String LastName = \"Musayeva\";\n\n System.out.println(\"My full name is: \" + FirstName + \" \"+ LastName);\n\n\n\n // Full Name: Yegana Musayeva\n\n\n\n }", "public Employeedetails getEmployeeDetailByName(String employeeId);", "public void setEmployeeID(int employeeID) { this.employeeID = employeeID; }", "public String GetDept()\r\n {\r\n return Department;\r\n }", "public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tEmployeeService service=new EmployeeService();\r\n\t Map<Integer,Employee> acc=new TreeMap<Integer,Employee>();\r\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\r\n\t\tString choice=\"\";\r\n\t\twhile(true)\r\n\t\t{\r\n\t\tSystem.out.println(\"Menu\");\r\n\t\tSystem.out.println(\"======================\");\r\n\t\tSystem.out.println(\"1 for creating employee and getting details from user\");\r\n\t\tSystem.out.println(\"2 for calculating scheme\");\r\n\t\tSystem.out.println(\"3 for display\");\r\n\t\tSystem.out.println(\"4 for exit\");\r\n\t\tchoice=br.readLine();\r\n\t\tswitch(choice)\r\n\t\t{\r\n\t\tcase \"1\":int eid=0;String ename=\"\"; double salary=0.0; String designation=\"\";\r\n\t\t\t System.out.println(\"employee id\");\r\n\t\t\t while(true)\r\n\t\t\t {\r\n\t\t\t \t String s_id=br.readLine();\r\n\t\t\t \t boolean c=Validator.validate(s_id, Validator.idpattern);\r\n\t\t\t \t if(c==true)\r\n\t\t\t \t {\r\n\t\t\t \t\t try {\r\n\t\t\t \t\t eid=Integer.parseInt(s_id);\r\n\t\t\t \t\t break;\r\n\t\t\t \t }\r\n\t\t\t \t\t catch(NumberFormatException e)\r\n\t\t\t \t\t {\r\n\t\t\t \t\t\t System.out.println(\"Enter employee number in numeric\");\r\n\t\t\t \t\t }\r\n\t\t\t }\r\n\t\t\t \t else\r\n\t\t\t \t {\r\n\t\t\t \t\t System.out.println(\"Enter id in 3 digits\");\r\n\t\t\t \t }\r\n\t\t }//end of employee id while\r\n\t\t \r\n\t\t\t System.out.println(\"employee name\");\r\n\t\t\t while(true)\r\n\t\t\t {\r\n\t\t\t \t String s_na=br.readLine();\r\n\t\t\t \t boolean c=Validator.validate(s_na, Validator.namepattern);\r\n\t\t\t \t if(c==true)\r\n\t\t\t \t {\r\n\t\t\t \t\t try {\r\n\t\t\t \t\t ename=s_na;\r\n\t\t\t \t\t break;\r\n\t\t\t \t }\r\n\t\t\t \t\t catch(NumberFormatException e)\r\n\t\t\t \t\t {\r\n\t\t\t \t\t\t System.out.println(\"Enter employee number in alphabetical order\");\r\n\t\t\t \t\t }\r\n\t\t\t }\r\n\t\t\t \t else\r\n\t\t\t \t {\r\n\t\t\t \t\t System.out.println(\"Enter name in correct format\");\r\n\t\t\t \t }\r\n\t\t }//end of employee name while\r\n\t\t \r\n\t\t\t System.out.println(\"employee designation\");\r\n\t\t\t while(true)\r\n\t\t\t {\r\n\t\t\t \t String s_d=br.readLine();\r\n\t\t\t \t boolean c=Validator.validate(s_d, Validator.despattern);\r\n\t\t\t \t if(c==true)\r\n\t\t\t \t {\r\n\t\t\t \t\t try {\r\n\t\t\t \t\t designation=s_d;\r\n\t\t\t \t\t break;\r\n\t\t\t \t }\r\n\t\t\t \t\t catch(NumberFormatException e)\r\n\t\t\t \t\t {\r\n\t\t\t \t\t\t System.out.println(\"Enter employee designation in alphabets\");\r\n\t\t\t \t\t }\r\n\t\t\t }\r\n\t\t\t \t else\r\n\t\t\t \t {\r\n\t\t\t \t\t System.out.println(\"Enter designation again\");\r\n\t\t\t \t }\r\n\t\t }//end of employee id while\r\n\t\t\t System.out.println(\"employee salary\");\r\n\t\t\t while(true)\r\n\t\t\t {\r\n\t\t\t \t String s_sa=br.readLine();\r\n\t\t\t \t boolean c=Validator.validate(s_sa, Validator.salpattern);\r\n\t\t\t \t \r\n\t\t\t \t if(c==true)\r\n\t\t\t \t {\r\n\t\t\t \t\t try {\r\n\t\t\t \t\t salary=Double.parseDouble(s_sa);\r\n\t\t\t \t\t break;\r\n\t\t\t \t }\r\n\t\t\t \t\t catch(NumberFormatException e)\r\n\t\t\t \t\t {\r\n\t\t\t \t\t\t System.out.println(\"Enter employee salary in numeric\");\r\n\t\t\t \t\t }\r\n\t\t\t }\r\n\t\t\t \t else\r\n\t\t\t \t {\r\n\t\t\t \t\t System.out.println(\"Enter salary again \");\r\n\t\t\t \t }\r\n\t\t\t \t \r\n\t\t\t \t if(salary<0)\r\n\t\t\t \t {\r\n\t\t\t \t\t System.out.println(\"Enter the salary greater than zero \");\r\n\t\t\t \t\t break;\r\n\t\t\t \t }\r\n\t\t\t \t \r\n\t\t }//end of employee id while\r\n\t\t\t Employee ob=new Employee(eid,ename,salary,designation);\r\n\t \t\t acc.put(ob.getEid(),ob);\r\n\t\t\t System.out.println(\"Employee added\");\r\n\t\t break;\r\n\t\t \r\n\t\tcase \"2\"://System.out.println(\"enter employee id \");\r\n\t\t //eid=Integer.parseInt(br.readLine());\r\n\t\t\t Collection<Employee> v=acc.values();\r\n\t List<Employee> acclis=new ArrayList<Employee>(v);\r\n\t for(Employee o:acclis)\r\n\t {\r\n\t \t service.calculateScheme(o);\r\n\t }\r\n\t\t //System.out.println(service.calculateScheme(acc.get(eid)));\r\n\t\t break;\r\n\t\t \r\n\t\tcase \"3\":System.out.println(\"The details for employees are\");\r\n\t\t System.out.println(\"=============================\");\r\n\t\t Collection<Employee> vc=acc.values();\r\n\t\t List<Employee> acclist=new ArrayList<Employee>(vc);\r\n\t\t for(Employee o:acclist)\r\n\t\t {\r\n\t\t \t service.display(o);\r\n\t\t }\r\n\t\t break;\r\n\t\t \r\n\t\tcase \"4\":System.out.println(\"System exiting\");\r\n\t\t System.exit(0);\r\n\t\t break;\r\n\t\t \r\n\t\tdefault:System.out.println(\"wrong choice\");\r\n\t\t}\r\n\t\t}\r\n\t}", "public LevelOneDepartment addLevelTwoDepartment(RetailscmUserContext userContext, String levelOneDepartmentId, String name, String description, Date founded , String [] tokensExpr) throws Exception;", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"----------------HR representatives Log in----------------\");\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter your USERNAME: \");\n\t\tString username = input.nextLine();\n\t\tSystem.out.println(\"Please enter your PASSWORD: \");\n\t\tString password = input.nextLine();\n\t\tSystem.out.println();\n\t\t\n\t\t//test public static int getEmployeeID (String user, String password) method\n\t\tint empID = DAManager.getEmployeeID(username, password);\n\t\t\n\t\tif (empID == 0) {\n\t\t\tSystem.out.println(\"You are an unauthorized user.\");\n\t\t\tSystem.exit(0);\n\t\t}else {\n\t\t\tSystem.out.println(\"You have passed the credential check.\\n\");\n\t\t\tSystem.out.println(\"Your information is : \");\n\t\t\t//test public static Employee getEmployeeByID(int empid) method \n\t\t\tEmployee HR_emp = DAManager.getEmployeeByID(empID);\n\t\t\tHR_emp.display();\n\t\t\t\n\t\t\t//test public static void addEmployee (Employe emp) method\n\t\t\tSystem.out.println(\"\\nAdd one employee inte EMPLOYEE table\");\n\t\t Employee added_emp = new Employee(207, \"Yuhang\", \"Zhao\", \"yzhao248@myseneca.ca\", \"111-222-3333\", java.sql.Date.valueOf(\"2020-09-01\"), \"IT_PROG\", 30000, 0.0,102,60);\n\t\t\tDAManager.addEmployee(added_emp);\n\t\t\t\n\t\t\t//test public static ArrayList<Employe> getAllEmployees() method\n\t\t\tSystem.out.println(\"\\nGet an ArrayList including all employee info\");\n\t\t\tArrayList<Employee> empList = DAManager.getAllEmployees();\n\t\t\tSystem.out.println(\"The 1st employee info within this arrayList is:\");\n\t\t\t(empList.get(0)).display();\n\t\t\tSystem.out.println(\"The number of employees in EMPLOYEES table is: \"+ empList.size());\n\t\t\t\n\t\t\t//test public static ArrayList<Employe> getEmployeesByDepartmentID (int depid) method \n\t\t\tSystem.out.println(\"\\nGet an ArrayList including all employee info in the department_ID 60: \");\n\t\t\tArrayList<Employee> empListByDep = DAManager.getEmployeesByDepartmentID(60);\n\t\t\tSystem.out.println(\"The 1st employee info within this arrayList is:\");\n\t\t\t(empListByDep.get(0)).display();\n\t\t\tSystem.out.println(\"The number of employees in deaprtment ID 60 is: \"+empListByDep.size());\n\t\t\t\n\t\t\t//test public static int updateEmployee (Employee emp) method\n\t\t\tSystem.out.println(\"\\nUpdate the employee#99 info\");\n\t\t\tEmployee updated_emp = new Employee(207, \"James\", \"Bob\", \"1111@gmail.com\", \"123-345-1111\", java.sql.Date.valueOf(\"2019-11-01\"), \"FI_ACCOUNT\", 24000, 0.0, 108, 100);\n\t\t\tDAManager.updateEmployee(updated_emp);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//test public static boolean batchUpdate(String[] SQLs) method\n\t\t\tSystem.out.println(\"\\nTest batchUpdate method: \");\n\t\t\tString batchSQL1 = \"INSERT INTO EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, hire_date, job_id) \" + \n\t\t\t\t\t\"VALUES(208, 'Lebron', 'James', 'aaa@aaa.com', '111-111-2222', TO_DATE('01-Jan-2017', 'DD-MM-YYYY','NLS_DATE_LANGUAGE = American'), 'IT_PROG')\";\n\t\t\tString batchSQL2 = \"INSERT INTO EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, hire_date, job_id) \" + \n\t\t\t\t\t\"VALUES(209, 'Kevin', 'Durant', 'bbb@aaa.com', '111-222-3333', SYSDATE, 'AD_VP')\";\n\t\t\tString batchSQL3 = \"INSERT INTO EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, hire_date, job_id) \" + \n\t\t\t\t\t\"VALUES(210, 'Kris', 'Smith', 'ccc@aaa.com', '111-333-4444', SYSDATE, 'ST_MAN')\";\n\t\t\tString[] SQLs = new String[3];\n\t\t\tSQLs[0] = batchSQL1;\n\t\t\tSQLs[1] = batchSQL2;\n\t\t\tSQLs[2] = batchSQL3;\n\t\t\tif(DAManager.batchUpdate(SQLs)) {\n\t\t\t\tSystem.out.println(\"Success. This transaction is successfully executed!\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Failed. All SQL statements are rolled back.\");\n\t\t\t};\n\t\t\t\n\t\t\t//test public static int deleteEmployeeByID (int empid) method\n\t\t\tSystem.out.println(\"\\nDelete the employee#210\");\n\t\t\tDAManager.deleteEmployeeByID(210);\n\t\t}\n\n\t}", "public void outputNames(){\n System.out.printf(\"\\n%9s%11s\\n\",\"Last Name\",\"First Name\");\n pw.printf(\"\\n%9s%11s\",\"Last Name\",\"First Name\");\n ObjectListNode p=payroll.getFirstNode();\n while(p!=null){\n ((Employee)p.getInfo()).displayName(pw);\n p=p.getNext();\n }\n System.out.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n pw.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n }", "public static int selectDepartment() {\r\n\t\tSystem.out.println(\"ENTER THE DEPARTMENT\");\r\n\t\tSystem.out.println(\"1.MECH\");\r\n\t\tSystem.out.println(\"2.CIVIL\");\r\n\t\tSystem.out.println(\"3.CSE\");\r\n\t\treturn 0;\r\n\t}", "public String getEmployeeDepartment(){\n return profile.getDepartment();\n }", "public static void main(String[] args) {\n \n Manager manager = new Manager(\"mgr@asu.edu\", \"Sally Manager\", \"mgrPass\");\n \n BookAndCancelAppointment bookAndCancelAppointment = new BookAndCancelAppointment();\n \n\n ManageAppointments ma = new ManageAppointments();\n bookAndCancelAppointment.set_ma(ma);\n ma.set_bookAndCancelAppointment(bookAndCancelAppointment);\n\n ManageSystem ms = new ManageSystem();\n ma.set_ms(ms);\n ms.set_ma(ma);\n ms.set_manager(manager);\n \n // Create Subjects\n Subject sub0 = new Subject(\"Intro to Programming\");\n Subject sub1 = new Subject(\"Operating Systems and Networks\");\n Subject sub2 = new Subject(\"Web and Mobile Applications\");\n Subject sub3 = new Subject(\"Computer Architecture\");\n \n // Add subjects to Manager (chosen to only put this uni directional in the implementation since the subject does not need to know the manager, but could be added)\n ms.add_subject(sub0);\n ms.add_subject(sub1);\n ms.add_subject(sub2);\n ms.add_subject(sub3);\n \n // Create Tutors\n TutorData t0 = new TutorData(\"progtutor@asu.edu\", \"John Tutor\", \"tutpass\");\n TutorData t1 = new TutorData(\"optutor@asu.edu\", \"Tutor May\", \"password\");\n TutorData t2 = new TutorData(\"webtutor@asu.edu\", \"Dave Tutor\", \"tutpassword\");\n TutorData t3 = new TutorData(\"comptutor@asu.edu\", \"Jane Tutor\", \"passtutor\");\n \n // Add subjects to Manager (needed based on diagram - only implemented uni directional since both directions are not needed)\n ms.add_tutor(t0);\n ms.add_tutor(t1);\n ms.add_tutor(t2);\n ms.add_tutor(t3);\n \n // Add Subjects to Tutors\n t0.add_subject(sub0);\n t0.add_subject(sub1);\n t1.add_subject(sub1);\n t2.add_subject(sub2);\n t2.add_subject(sub3);\n t3.add_subject(sub3);\n t3.add_subject(sub0);\n \n // Create Appointments and add to Tutors\n Date date0 = new Date();\n Date date1 = new Date();\n Date date2 = new Date();\n Date date3 = new Date();\n Date date4 = new Date();\n Date date5 = new Date();\n for(int i = 0; i < 100000; i++){\n int x = 0;\n }\n Date date6 = new Date();\n /*\n String response0 = ma.create_appointment(date0, t0.get_email());\n String response1 = ma.create_appointment(date1, t0.get_email());\n String response2 = ma.create_appointment(date2, t1.get_email());\n String response3 = ma.create_appointment(date3, t2.get_email());\n String response4 = ma.create_appointment(date4, t2.get_email());\n String response5 = ma.create_appointment(date5, t2.get_email());\n String response6 = ma.create_appointment(date6, t2.get_email());\n */\n /* \n Appointment appt0 = new Appointment(date0, 0, t0);\n Appointment appt1 = new Appointment(date1, 1, t0);\n Appointment appt2 = new Appointment(date2, 2, t1);\n Appointment appt3 = new Appointment(date3, 3, t2);\n Appointment appt4 = new Appointment(date4, 4, t2);\n Appointment appt5 = new Appointment(date5, 5, t2);\n Appointment appt6 = new Appointment(date6, 6, t2);\n */\n /* \n // Add appointments to appointment list\n ma.add_appointment(appt0);\n ma.add_appointment(appt1);\n ma.add_appointment(appt2);\n ma.add_appointment(appt3);\n ma.add_appointment(appt4);\n ma.add_appointment(appt5);\n ma.add_appointment(appt6);\n */\n \n /*\n // Create Students\n StudentData s0 = new StudentData(\"student@asu.edu\", \"John Student\", \"studpass\", 5);\n StudentData s1 = new StudentData(\"studentjane@asu.edu\", \"Jane Student\", \"pass\", 2);\n StudentData s2 = new StudentData(\"studentjack@asu.edu\", \"Jack Student\", \"passwo\", 1);\n StudentData s3 = new StudentData(\"studentbob@asu.edu\", \"Bob Student\", \"studentpass\", 0);\n */\n /* \n // Add students to list\n bookAndCancelAppointment.add_student(s0);\n bookAndCancelAppointment.add_student(s1);\n bookAndCancelAppointment.add_student(s2);\n bookAndCancelAppointment.add_student(s3);\n */\n //test create appointment\n //pass\n System.out.println(ma.create_appointment(date0, t0.get_email()));\n //fail\n System.out.println(ma.create_appointment(date0, t0.get_email()));\n //pass\n System.out.println(ma.create_appointment(date0, t1.get_email()));\n //pass\n System.out.println(ma.create_appointment(date6, t0.get_email()));\n // Add Appointments to Students\n //appt0.student = s1;\n //appt0.booked = true;\n //s1.appointments.add(appt0);\n /* \n // Test Book Appointment method\n \n // Not enough credits case\n System.out.println(bookAndCancelAppointment.bookAppointmentBySubjectAndTime(\"studentbob@asu.edu\", \"Computer Architecture\", date0));\n \n // Already an appointment booked\n System.out.println(bookAndCancelAppointment.bookAppointmentBySubjectAndTime(\"studentjane@asu.edu\", \"Web and Mobile Applications\", date1));\n \n // No available tutor case\n System.out.println(bookAndCancelAppointment.bookAppointmentBySubjectAndTime(\"student@asu.edu\", \"Intro to Programming\", date2));\n \n // Appointment can be booked case\n int s2Credits = s2.numCredits;\n assert(appt4.student == null);\n System.out.println(bookAndCancelAppointment.bookAppointmentBySubjectAndTime(\"studentjack@asu.edu\", \"Web and Mobile Applications\", date3));\n assert(s2Credits - 1 == s2.numCredits);\n assert(appt4.student == s2);\n // test book by id\n // Not enough credits case\n //System.out.println(bookAndCancelAppointments.BookAppointmentByID(\"studentbob@asu.edu\", 0));\n \n // Already an appointment booked\n //System.out.println(bookAndCancelAppointments.BookAppointmentByID(\"studentjane@asu.edu\", 6));\n \n // No available tutor case\n //System.out.println(bookAndCancelAppointments.BookAppointmentByID(\"student@asu.edu\", 0));\n \n // Appointment can be booked case\n //System.out.println(bookAndCancelAppointments.BookAppointmentByID(\"studentjack@asu.edu\", 1));\n */\n }", "public List<Employee> listEmployees (int managerId){\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\ttry {\n\t\t\t// use prepared statements to prevent sql injection attacks\n\t\t\tPreparedStatement stmt = null;\n\t\t\t\n // the query to send to the database\n String query = \"SELECT e.EmployeeID, e.FirstName, e.LastName, e.ManagerID As ManagerID, (SELECT COUNT(*) FROM employees WHERE ManagerID = e.EmployeeID) AS DirectReports FROM employees e \"; \n \n if (managerId == 0) {\n // select where employees reportsto is null\n query += \"WHERE e.ManagerID = 0\";\n stmt = _conn.prepareStatement(query);\n }else{\n // select where the reportsto is equal to the employeeId parameter\n query += \"WHERE e.ManagerID = ?\" ;\n stmt = _conn.prepareStatement(query);\n stmt.setInt(1, managerId);\n }\n\t\t\t// execute the query into a result set\n\t\t\tResultSet rs = stmt.executeQuery();\n \n\t\t\t// iterate through the result set\n\t\t\twhile(rs.next()) {\t\n\t\t\t\t// create a new employee model object\n\t\t\t\tEmployee employee = new Employee();\n\t\t\t\t\n\t\t\t\t// select fields out of the database and set them on the class\n\t\t\t\t//employee.setEmployeeID(rs.getString(\"EmployeeID\"));\n\t\t\t\t//employee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\t//employee.setLastName(rs.getString(\"LastName\"));\n\t\t\t\t//employee.setManagerID(rs.getString(\"ManagerID\"));\n employee.setHasChildren(rs.getInt(\"DirectReports\") > 0); \n\t\t\t\t//employee.setFullName();\n\t\t\t\t\n\t\t\t\t// add the class to the list\n\t\t\t\temployees.add(employee);\n\t\t\t}\n\t\t}\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// return the result list\n\t\treturn employees;\n\t\t\n\t}", "public void displayAllContacts() {\n\n for (int i = 0; i < contacts.size(); i ++) {\n\n Contact contact = contacts.get(i);\n\n System.out.println(\" Name: \" + contact.getName());\n System.out.println(\" Title: \" + contact.getTitle());\n System.out.println(\" ID #: \" + contact.getID());\n System.out.println(\" Hoursrate: \" + contact.getHoursrate());\n System.out.println(\" Workhours \" + contact.getWorkhours());\n System.out.println(\"-------------\");\n\n\n\n Employee one = new Employee(\"A\", \"A\", \"A\", \"A\"); // I give it some contact information first.\n Employee two = new Employee(\"Bob\", \"Bob\", \"A\", \"A\");\n\n\n\n\n\n\n}\n\n\n//***************************************************************", "public Employee getHRhead();", "public int getEmployeeId();", "public static void main(String[] args) {\n\t\tScanner myScan = new Scanner(System.in);\r\n\t\tString strAns, empName;\r\n\t\tdouble sumSalaries=0;\r\n\t\tboolean found=false;\r\n\t\tDeptEmployee[ ] department = new DeptEmployee [6];\r\n\t\tGregorianCalendar hired;\r\n\t\t\r\n\t\t//Professors\r\n\t\thired = new GregorianCalendar(1973,1,1);\r\n\t\tProfessor prof1 = new Professor(\"Joseph\",200000,hired.getTime(),10);\r\n\t\thired = new GregorianCalendar(2019,5,1);\r\n\t\tProfessor prof2 = new Professor(\"Carlos\",150000,hired.getTime(),10);\r\n\t\thired = new GregorianCalendar(2019,6,1);\r\n\t\tProfessor prof3 = new Professor(\"Mauricio\",100000,hired.getTime(),10);\r\n\t\t\r\n\t\t//Secretaries\r\n\t\thired = new GregorianCalendar(1973,1,1);\r\n\t\tSecretary sec1 = new Secretary(\"Lina\",50000,hired.getTime(),200);\r\n\t\thired = new GregorianCalendar(1998,5,1);\r\n\t\tSecretary sec2 = new Secretary(\"Lucy\",55000,hired.getTime(),200);\r\n\t\t\r\n\t\t//Administrators\r\n\t\thired = new GregorianCalendar(1973,1,1);\r\n\t\tAdministrator admin1 = new Administrator(\"Monica\",180,hired.getTime(),160);\r\n\t\t\r\n\t\t//Populate array\r\n\t\tdepartment[0] = prof1;\r\n\t\tdepartment[1] = prof2;\r\n\t\tdepartment[2] = prof3;\r\n\t\tdepartment[3] = sec1;\r\n\t\tdepartment[4] = sec2;\r\n\t\tdepartment[5] = admin1;\r\n\t\t\r\n\t\tSystem.out.println(\"Do you want to see the sum of salaries in department? (Y/N)\");\r\n\t\tstrAns = myScan.next();\r\n\t\tif (strAns.equalsIgnoreCase(\"Y\")) {\r\n\t\t\tfor (DeptEmployee e : department) \r\n\t\t\t\tsumSalaries += e.computeSalary();\r\n\t\t\tSystem.out.println(\"Sum of department salaries is: \"+sumSalaries);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Do you want to locate an employee in department? (Y/N)\");\r\n\t\tstrAns = myScan.next();\r\n\t\tif (strAns.equalsIgnoreCase(\"Y\")) {\r\n\t\t\tSystem.out.println(\"Enter the employee name:\");\r\n\t\t\tstrAns = myScan.next();\r\n\t\t\t\r\n\t\t\tfor (DeptEmployee e : department) {\r\n\t\t\t\tempName=e.getName();\r\n\t\t\t\tif (strAns.equals(e.getName())) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t\tSystem.out.println(e);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!found) {\r\n\t\t\t\tSystem.out.printf(\"The employee %s doesn't exists in department\",strAns);\r\n\t\t\t}\r\n\t }\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tEmployee emp1 = new Employee();\r\n\t\tEmployee emp2 = new Employee();\r\n\t\t\r\n\t\temp1.empName = \"Rob\";\r\n\t\temp1.empid = 200;\r\n\t\temp1.empsalary = 12345;\r\n\t\t\r\n\t\temp1.displayEmployeebonus();\r\n\t\t\r\n\t\temp2.empName = \"Rob\";\r\n\t\temp2.empid = 300;\r\n\t\temp2.empsalary = 98765;\r\n\t\t\r\n\t\temp2.displayEmployeebonus();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tEmployee[] staff = new Employee[3];\n\t\tstaff[0] = new Employee(\"Jim\",50000);\n\t\tstaff[1] = new Employee(\"Tony\",60000);\n\t\tstaff[2] = new Employee(\"Sarach\",65000);\n\t\t\n\t\t//print out information about all Employee objects\n\t\tfor(Employee e:staff) {\n\t\t\te.setId();\n\t\t\tSystem.out.println(\"name=\"+e.getName()+\",id=\" +e.getId()+\",salsry=\"\n\t\t\t\t\t+e.getSalary());\n\t\tint n = Employee.getNextId();\n\t\tSystem.out.println(\"Next available id=\"+n);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// Give all details of first employee\n\t\tSystem.out.println(\"Give the information about first employee\");\n\t\tSystem.out.println(\"Name of first employee\");\n\n\t\t// Take name of first employee from user\n\t\tString name1 = sc.next();\n\n\t\tSystem.out.println(\"Department id of first employee\");\n\n\t\t// Take department id of first employee from user\n\t\tString id1 = sc.next();\n\n\t\tSystem.out.println(\"Salary of first employee\");\n\n\t\t// Take salary of first employee from user\n\t\tint salary1 = sc.nextInt();\n\n\t\t// Provide details of first employee\n\t\tEmployeeQ7 e1 = new EmployeeQ7(name1, id1, salary1);\n\n\t\t// Give all details of second employee\n\t\tSystem.out.println(\"Give the information about second employee\");\n\t\tSystem.out.println(\"Name of second employee\");\n\n\t\t// Take name of second employee from user\n\t\tString name2 = sc.next();\n\n\t\tSystem.out.println(\"Department id of second employee\");\n\n\t\t// Take department id of second employee from user\n\t\tString id2 = sc.next();\n\n\t\tSystem.out.println(\"salary of second employee\");\n\n\t\t// Take salary of second employee from user\n\t\tint salary2 = sc.nextInt();\n\n\t\t// Provide details of second employee\n\t\tEmployeeQ7 e2 = new EmployeeQ7(name2, id2, salary2);\n\n\t\t// Call compareEmployeeSalary method and provide details of both\n\t\t// employee\n\t\tcompareEmployeeSalary(e1, e2);\n\n\t}", "public static void main(String[] args) {\n String inputLine = \"\";\n char action = ' ';\n Employee[] employees = new Employee[] {\n new Employee(\"John\", \"+1-518-383-9901\", 9000),\n new Employee(\"Tom\", \"+1-518-383-6664\", 12000),\n new Employee(\"Diane\", \"+1-518-383-4025\", 5000),\n new Employee(\"Robert\", \"+1-518-383-7971\", 16000),\n new Employee(\"Patrick\", \"+1-518-383-5503\", 7000),\n new Employee(\"David\", \"+1-518-383-9905\", 8000),\n new Employee(\"Kate\", \"+1-518-383-3334\", 2000),\n new Employee(\"Mary\", \"+1-518-383-4545\", 4500),\n new Employee(\"Steven\", \"+1-518-383-7845\", 3500),\n new Employee(\"Bill\", \"+1-518-383-0456\", 7500),\n new Employee(\"Peter\", \"+1-518-383-3578\", 2500),\n new Employee(\"Mike\", \"+1-518-383-3895\", 3500),\n new Employee(\"Amanda\", \"+1-518-383-1001\", 4000)\n } ;\n Company company = new Company(\"1741 Technology Drive, Suite 400, San Jose, California 95110\", \"+1-408-273-8900\", employees);\n\n while (true) {\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n System.out.println(\"Input 1 to add new employee/ Input 2 to remove employee / Input 3 to get list of company employees\");\n System.out.println(\"Input 3 to print sum of all salaries/ Input 4 to print average salary / Input 5 to print employee name with the highest salary\");\n System.out.println(\"Input 7 to Exit\");\n inputLine = br.readLine();\n action = inputLine.charAt(0);\n\n switch (action) {\n case '1':\n System.out.print(\"Input employee name: \");\n String name = br.readLine();\n System.out.print(\"Input employee phone: \");\n String phone = br.readLine();\n System.out.print(\"Input employee salary: \");\n String salaryStr = br.readLine();\n int salary = Integer.parseInt(salaryStr);\n Employee emp = new Employee(name, phone, salary);\n company.addEmployee(emp);\n break;\n case '2':\n System.out.println(\"Input name of employee to remove\");\n String employeeName = br.readLine();\n company.removeEmployee(employeeName);\n break;\n case '3':\n System.out.println(\"Here is list of all company employees\");\n company.printEmployees();\n break;\n case '4':\n System.out.println(\"Sum of all salaries is \" + company.getSumOfAllSalaries());\n break;\n case '5':\n System.out.println(\"Average company salary is \" + company.getAverageSalary());\n break;\n case '6':\n System.out.println(\"Employee name with the highest salary is \" + company.getEmployeeNameWithMaxSalary());\n break;\n case '7': System.exit(0);\n default:\n System.out.println(\"You have written wrong or not supported action!\");\n break;\n }\n }\n catch (NumberFormatException e) {\n System.out.println(\"You entered non-number salary for employee!\");\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n\tpublic List<Employee_Table> employeeUnderManager(int employee_id) {\n\t\tList<Employee_Table> tables = new ArrayList<Employee_Table>();\n\t\ttry (Connection con = ConnectionService.getConnection()) {\n\t\t\t\n\t\t\tString sql = \"SELECT * FROM (SELECT * FROM (SELECT E.EMPLOYEE_ID ,E.FIRSTNAME, E.LASTNAME, E.ISADMIN, E.MANAGER_ID, M.FIRSTNAME AS M_F, M.LASTNAME AS M_L\\r\\n\" + \n\t\t\t\t\t\"FROM EMPLOYEE_TABLE E, EMPLOYEE_TABLE M\\r\\n\" + \n\t\t\t\t\t\"WHERE E.MANAGER_ID = M.EMPLOYEE_ID) E\\r\\n\" + \n\t\t\t\t\t\"JOIN REIMBURSEMENT_TABLE R\\r\\n\" + \n\t\t\t\t\t\"ON E.EMPLOYEE_ID = R.EMPLOYEE_ID)\\r\\n\" + \n\t\t\t\t\t\"WHERE MANAGER_ID = ? ORDER\\r\\n\" + \n\t\t\t\t\t\"BY REIMBURSEMENT_ID DESC\";\t\t\t\n\t\t\tPreparedStatement pstmt = con.prepareStatement(sql);\n\t\t\tpstmt.setInt(1, employee_id);\n\t\t\tpstmt.executeQuery();\n\t\t\tResultSet rs=pstmt.getResultSet();\n\t\t\twhile(rs.next()) {\n\t\t\t\tEmployee_Table table = new Employee_Table();\n\t\t\t\ttable.setEmployee_id(rs.getInt(\"EMPLOYEE_ID\")); \n\t\t\t\ttable.setFirstName(rs.getString(\"FIRSTNAME\"));\n\t\t\t\ttable.setLastName(rs.getString(\"LASTNAME\"));\n\t\t\t\ttable.setIsAdmin(rs.getInt(\"ISADMIN\"));\n\t\t\t\ttable.setManager_id(rs.getInt(\"MANAGER_ID\"));\n\t\t\t\ttable.setM_f(rs.getString(\"M_F\"));\n\t\t\t\ttable.setM_l(rs.getString(\"M_L\"));\n\t\t\t\tint reimbursement_id = rs.getInt(\"REIMBURSEMENT_ID\");\n\t\t\t\tString details = rs.getString(\"DETAILS\");\n\t\t\t\tString status = rs.getString(\"STATUS\");\n\t\t\t\tdouble balance = rs.getDouble(\"BALANCE\");\n\t\t\t\t//int employee_id = rs.getInt(\"EMPLOYEE_ID\");\n\t\t\t\tLocalDate s_date = rs.getDate(\"S_DATE\").toLocalDate();\n\t\t\t\ttable.setRtable(new Reimbursement_Table(reimbursement_id, details, balance, employee_id, status, s_date));\n\t\t\t\ttables.add(table);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn tables;\n\t}", "public static void main(String[] args) {\n\t\tDepartment department1 = new Department ();\n\t\tdepartment1.id = 1;\n\t\tdepartment1.name = \" Marketing \";\n\t\t\n\t\tDepartment department2 = new Department ();\n\t\tdepartment2.id = 2;\n\t\tdepartment2.name = \" Sale \";\n\t\t\n\t\tDepartment department3 = new Department ();\n\t\tdepartment3.id = 3;\n\t\tdepartment3.name = \" Bảo Vệ \";\n\t\t\n\t\t// add data position\n\t\tPosition position1 = new Position ();\n\t\tposition1.id = 1;\n\t\tposition1.name = PositionName.DEVELOPER;\n\t\t\n\t\tPosition position2 = new Position ();\n\t\tposition2.id = 2;\n\t\tposition2.name = PositionName.TEST;\n\t\t\n\t\tPosition position3 = new Position ();\n\t\tposition3.id = 3;\n\t\tposition3.name = PositionName.SCRUM_MASTER;\n\t\t\n\t\tPosition position4 = new Position ();\n\t\tposition4.id = 4;\n\t\tposition4.name = PositionName.PM;\n\t\t\n\t\t\n\t\t// add data Account\n\t\tAccount account1 = new Account() ;\n\t\taccount1.id = 1;\n\t\taccount1.email = \" nguyenvanthuong@gmail.com \";\n\t\taccount1.userName = \" thuong \";\n\t\taccount1.fullName = \" Nguyễn Văn Thưởng \";\n\t\taccount1.department = department2;\n\t\taccount1.position = position3;\n\t\taccount1.createDate = LocalDate.now();\n\t\t\n\t\tAccount account2 = new Account() ;\n\t\taccount2.id = 2;\n\t\taccount2.email = \" phanvinhhien@gmail.com \";\n\t\taccount2.userName = \" Hien \";\n\t\taccount2.fullName = \" Phan Vĩnh Hiển \";\n\t\taccount2.department = department1;\n\t\taccount2.position = position4;\n\t\taccount2.createDate = LocalDate.now();\n\t\t\n\t\tAccount account3 = new Account() ;\n\t\taccount3.id = 3;\n\t\taccount3.email = \" luuquangthien@gmail.com \";\n\t\taccount3.userName = \" Thien \";\n\t\taccount3.fullName = \"Lưu Quang Thiện \";\n\t\taccount3.department = department3;\n\t\taccount3.position = position2;\n\t\taccount3.createDate = LocalDate.now();\n\t\t\n\t\tSystem.out.println(account1.toString());\n\t\t\n\t\t// add data Group\n\t\t\n\t\tGroup group1 = new Group ();\n\t\tgroup1.id = 1;\n\t\tgroup1.name = \"Cái Bang\";\n\t\tgroup1.account = account1;\n\t\tgroup1.createDate = LocalDate.now();\n\t\t\t\t\n\t\tGroup group2 = new Group ();\n\t\tgroup2.id = 2;\n\t\tgroup2.name = \"Nga Mi\";\n\t\tgroup2.account = account2;\n\t\tgroup2.createDate = LocalDate.now();\n\t\t\t\t\n\t\tGroup group3 = new Group ();\n\t\tgroup3.id = 3;\n\t\tgroup3.name = \"Thiếu Lâm\";\n\t\tgroup3.account = account3;\n\t\tgroup3.createDate = LocalDate.now();\n\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t// add data GroupAccount\n\t\tGroupAccount grAcc1 = new GroupAccount();\n\t\tgrAcc1.group = group1;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}", "private void createManagersList(){\n\t\tmanagerList.clear();\n\t\tArrayList<User> users = jdbc.get_Managers();\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tmanagerList.addElement(String.format(\"%s, %s\", users.get(i).get_lastname(), users.get(i).get_firstname()));\n\t\t}\n\t}", "public List<User> getAllEmployees(String companyShortName);", "public void addEmployee(){\n\t\tSystem.out.println(\"Of what company is the employee?\");\n\t\tSystem.out.println(theHolding.companies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name:\");\n\t\t\tString name = reader.nextLine();\n\t\t\tSystem.out.println(\"Position:\");\n\t\t\tString position = reader.nextLine();\n\t\t\tSystem.out.println(\"Mail:\");\n\t\t\tString mail = reader.nextLine();\n\t\t\tEmployee toAdd = new Employee(name, position, mail);\n\t\t\tSystem.out.println(theHolding.addEmployee(selected, toAdd));\n\t\t}\n\t}", "public String toString(){\n StringBuilder builder = new StringBuilder();\n builder.append(\"Employee :[ Name : \" + name + \", dept : \" + dept + \", salary :\"\n + salary+\", subordinates = \\n\");\n for(Employee e : this.subordinates) {\n builder.append(\"\\t\" + e + \"\\n\");\n }\n builder.append(\" ]\");\n return builder.toString();\n }", "public String EmployeeSummary(){\r\n\t\treturn String.format(\"%d\\t%d\\t\\tJunior\\t\\t$%,.2f\\t\\t$%,.2f\\r\\n\", getID(), getYearHired(), getBaseSalary(), CalculateTotalCompensation());\r\n\t}", "public int getHC_ManagerTo_ID();", "public static void main(String[] args) {\n \n Employee[] employees = readFile(\"C:\\\\Users\\\\gdemirturk\\\\OneDrive\\\\Shared\\\\Coding\\\\git\\\\javabyLiang\\\\src\\\\JavaIII\\\\Project_1\\\\employee.txt\");\n \n //pass the employee list to employee manager class\n EmployeeManager employeeManager = new EmployeeManager(employees);\n String manager = \"Joseph\";\n int empCount = employeeManager.countEmployeesUnder(manager);\n System.out.println(\"Number of employees report to \" + manager + \" are:\"+ empCount);\n }", "public void AddEmployee(String firstName ,String lastName , String name_department)\n\t{\n\t\tEmployee emp = new Employee();\n\t\temp.setName(firstName);\n\t\temp.setSurname(lastName);\n\t\temp.setDepartment(SearchDepartment(name_department));\n\t\tAddEmployeeToDepartement(name_department,emp);\n\t}", "public String toString(){\n return \"Name: \"+this.name+\" Salary: \"+this.salary; // returning emp name and salary\r\n }", "public void addDepartmentRow(Departmentdetails departmentDetailsFeed);", "public void empdetails() {\r\n\t\tSystem.out.println(\"name : \"+ name);\r\n\t}", "public void assignDepartment(String departmentName);", "public static Map<Integer,Employee1> getEmployeeList(){\r\n\t return employees;\r\n\t \r\n }", "public Departments getDeptTable();", "public static void main(String[] args) {\n\t\tAdminDepartment A = new AdminDepartment();//Object created to access AdminDepartment class\r\n\t\tHrDepartment H = new HrDepartment(); // Object created to access HrDepartment class\r\n\t\tTechDepartment T = new TechDepartment();//Object created to access TechDepartment class\r\n\t\t\r\n\t A.departmentName();\r\n\t A.getTodaysWork();\r\n\t A.getWorkDeadline();\r\n\t A.isTodayAHoliday();\r\n\t System.out.println(\"\");\r\n\t \r\n\t H.departmentName();\r\n\t H.getTodaysWork();\r\n\t H.getWorkDeadline();\r\n\t H.isTodayAHoliday();\r\n\t System.out.println(\"\");\r\n\t \r\n\t T.departmentName();\r\n\t T.getTodaysWork();\r\n\t T.getWorkDeadline();\r\n\t T.isTodayAHoliday();\r\n\r\n\r\n\r\n\t}", "public int getEmployeeID() { return employeeID; }", "public String f9employee() throws Exception {\r\n\t\t/**\r\n\t\t * BUILD COMPLETE QUERY (ALONG WITH PARAMETERS) WHICH GIVES THE DESIRED\r\n\t\t * OUTPUT ALONG WITH PROFILES\r\n\t\t */\r\n\t\tString query = \"SELECT EMP_TOKEN, EMP_FNAME || ' ' || EMP_MNAME || ' ' || EMP_LNAME,\"\r\n\t\t\t\t+ \" EMP_ID,CENTER_NAME,RANK_NAME\"\r\n\t\t\t\t+ \" FROM HRMS_EMP_OFFC\"\r\n\t\t\t\t+ \" LEFT JOIN HRMS_CENTER ON(HRMS_CENTER.CENTER_ID=HRMS_EMP_OFFC.EMP_CENTER)\"\r\n\t\t\t\t+ \" LEFT JOIN HRMS_RANK ON(HRMS_RANK.RANK_ID=HRMS_EMP_OFFC.EMP_RANK) \";\r\n\r\n\t\tquery += \"\tORDER BY EMP_ID ASC \";\r\n\r\n\t\t/**\r\n\t\t * SET THE HEADER NAMES OF TABLE WHICH IS DISPLAYED IN POP-UP WINDOW. *\r\n\t\t */\r\n\r\n\t\tString[] headers = { getMessage(\"employee.id\"), getMessage(\"employee\") };\r\n\r\n\t\t/**\r\n\t\t * DEFINE THE PERCENT WIDTH OF EACH COLUMN\r\n\t\t */\r\n\t\tString[] headerWidth = { \"15\", \"35\" };\r\n\r\n\t\t/**\r\n\t\t * -SET THE FIELDNAMES INTO WHICH THE VALUES ARE BEING POPULATED AFTER A\r\n\t\t * ROW IS SELECTED. -USEFULL IN CASES WHERE SUBMIT FLAG IS 'false'\r\n\t\t * -PARENT FORM WILL SHOW THE VALUES IN THE FILDS CORRSPONDING TO COLUMN\r\n\t\t * INDEX. NOTE: LENGHT OF COLUMN INDEX MUST BE SAME AS THE LENGTH OF\r\n\t\t * FIELDNAMES\r\n\t\t */\r\n\r\n\t\tString[] fieldNames = { \"searchemptoken\", \"searchempName\",\r\n\t\t\t\t\"searchempId\" };\r\n\r\n\t\t/**\r\n\t\t * SET THE COLUMN INDEX E.G. SUPPOSE THE POP-UP SHOWS 4 COLUMNS, BUT ON\r\n\t\t * CLICKING A ROW ONLY SECOND AND FORTH COLUMN VALUES NEED TO BE SHOWN\r\n\t\t * IN THE PARENT WINDOW FIELDS THEN THE COLUMN INDEX CAN BE {1,3}\r\n\t\t * \r\n\t\t * NOTE: COLUMN NUMBERS STARTS WITH 0\r\n\t\t * \r\n\t\t */\r\n\t\tint[] columnIndex = { 0, 1, 2 };\r\n\r\n\t\t/**\r\n\t\t * WHEN SET TO 'true' WILL SUBMIT THE FORM\r\n\t\t * \r\n\t\t */\r\n\t\tString submitFlag = \"false\";\r\n\r\n\t\t/**\r\n\t\t * IF THE 'submitFlag' IS 'true' , THE FORM WILL SUBMIT AND CALL\r\n\t\t * FOLLOWING METHOD IN THE ACTION * NAMING CONVENSTION: <NAME OF\r\n\t\t * ACTION>_<METHOD TO CALL>.action\r\n\t\t */\r\n\t\tString submitToMethod = \"\";\r\n\r\n\t\t/**\r\n\t\t * CALL THIS METHOD AFTER ALL PARAMETERS ARE DEFINED *\r\n\t\t */\r\n\r\n\t\tsetF9Window(query, headers, headerWidth, fieldNames, columnIndex,\r\n\t\t\t\tsubmitFlag, submitToMethod);\r\n\r\n\t\treturn \"f9page\";\r\n\t}", "@Override\n\tString searchEmployee(String snum) {\n\t\treturn null;\n\t}", "public Map<String, String> getNamesAndDepartmentsOfEmployees() {\n HashMap<String, String> nameDpt = new HashMap<>();\n List<String> names = getNamesFromAllTab();\n List<String> dpts = getEmployeeDepartmentsFromDisplayedDptTab();\n\n for (int i = 0; i < countEmployeeCardsDisplayed(); i++) {\n nameDpt.put(names.get(i), dpts.get(i));\n }\n return nameDpt;\n }", "public static void main(String[] args) {\n\t\tEmployee emp1 = new Employee();// 객체생성\r\n\t\temp1.display();\r\n\t\t\r\n\t\tEmployee emp2 = new Employee();\r\n\t\temp2.setAge(01);\r\n\t\temp2.setName(\"홍길동\");\r\n\t\temp2.setDept(\"인사부\");\r\n\t\temp2.setSingle(true);\r\n\t\temp2.display();\r\n\r\n\t\tEmployee emp3 = new Employee();\r\n\t\temp3.setAge(02);\r\n\t\temp3.setName(\"고길동\");\r\n\t\temp3.setDept(\"영업부\");\r\n\t\temp2.setSingle(false);\r\n\t\temp3.display();\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tPerson person = new Person(\"Kali\", \"Sofia\", \"+359 88 0000000\", \"kali@gmail.com\");\r\n\t\tSystem.out.println(person.toString());\r\n\t\tStudent student = new Student(\"Sofi\", \"Sofia\", \"+359 88 0000000\", \"sofi@gmail.com\", ClassStatus.FRESHMAN);\r\n\t\tSystem.out.println(student.toString());\r\n\t\tEmployee employee = new Employee(\"George\", \"Sofia\", \"+359 88 0000000\", \"george@gmail.com\", \"Office 1\", 3000, \"02.10.2018\");\r\n\t\tSystem.out.println(employee.toString());\r\n\t\tFaculty faculty = new Faculty(\"George\", \"Sofia\", \"+359 88 0000000\", \"george@gmail.com\", \"Office 1\", 3000, \"02.10.2018\", 8, \"Professor\");\r\n\t\tSystem.out.println(faculty.toString());\r\n\t\tStaff staff = new Staff(\"George\", \"Sofia\", \"+359 88 0000000\", \"george@gmail.com\", \"Office 1\", 3000, \"02.10.2018\", \"Manager\");\r\n\t\tSystem.out.println(staff.toString());\r\n\t\t\r\n\t}", "void getAllDeparments(Vector<Integer> departmentIDs, Vector<String> departmentCodes, Vector<Integer> categoryIDs, String empresa);", "public LinkedListOfEmployees getEmployees(String g) {\n\t}", "private void doCreateEmployee() {\n Scanner sc = new Scanner(System.in);\n Employee newEmployee = new Employee();\n int response;\n\n System.out.println(\"*** Hors Management System::System Administration::Create New Employee ***\");\n System.out.print(\"Enter First name>\");\n newEmployee.setFirstName(sc.nextLine().trim());\n System.out.print(\"Enter Last name>\");\n newEmployee.setLastName(sc.nextLine().trim());\n\n while (true) {\n System.out.println(\"Select Job Role:\");\n System.out.println(\"1. System Administrator\");\n System.out.println(\"2. Operation Manager\");\n System.out.println(\"3. Sales Manager\");\n System.out.println(\"4. Guest Officer\\n\");\n\n response = sc.nextInt();\n\n //set job role\n if (response >= 1 && response <= 4) {\n newEmployee.setJobRole(JobRoleEnum.values()[response - 1]);\n break;\n } else {\n System.out.println(\"Invalid option, please try again \\n\");\n }\n }\n sc.nextLine();\n System.out.print(\"Enter Username\");\n newEmployee.setUserName(sc.nextLine().trim());\n System.out.println(\"Enter Password\");\n newEmployee.setPassword(sc.nextLine().trim());\n\n Set<ConstraintViolation<Employee>> constraintViolations = validator.validate(newEmployee);\n\n if (constraintViolations.isEmpty()) {\n newEmployee = employeeControllerRemote.createNewEmployee(newEmployee);\n System.out.println(\"New Staff created successfully, employee ID is: \"+newEmployee.getEmployeeId());\n }else{\n showInputDataValidationErrorsForEmployee(constraintViolations);\n }\n\n }", "public String getEmployee()\r\n/* 38: */ {\r\n/* 39:43 */ return this.employee;\r\n/* 40: */ }", "public static void main(String[] args) {\n\t\t\n\t\tEmployee theEmployee = new Employee();\n\t\t\n//\t\twhat does it mean below setter? by this section we assign value to variables.\n\t\ttheEmployee.setId(1000);\n\t\ttheEmployee.setName(\"Ramesh\");\n\t\ttheEmployee.setPosition(\"Mangaer\");\n\t\ttheEmployee.setSalary(10000.88);\n//\t\tby thes getters we print the data.\n\t\tSystem.out.println(theEmployee.getId());\n\t\tSystem.out.println(theEmployee.getName());\n\t\tSystem.out.println(theEmployee.getPosition());\n\t\tSystem.out.println(theEmployee.getSalary());\n\t\tSystem.out.println(theEmployee.getClass());\n\t\n\t\tSystem.out.println(\"====================================\");\n\t\t\n\t\tEmployee theEmployee1 = new Employee();\n\t\t\n\t\ttheEmployee1.setId(2);\n\t\ttheEmployee1.setName(\"Rahim\");\n\t\ttheEmployee1.setPosition(\"Team leader\");\n\t\ttheEmployee1.setSalary(22.88);\n\t\t\n\t\tSystem.out.println(theEmployee1.getId());\n\t\tSystem.out.println(theEmployee1.getName());\n\t\tSystem.out.println(theEmployee1.getPosition());\n\t\tSystem.out.println(theEmployee1.getSalary());\n\t\tSystem.out.println(theEmployee1.getClass());\n\t\t\n\t\t\n\tSystem.out.println(\"============================\");\n\t\n\tEmployee theEmployee2 = new Employee();\n\t\n\ttheEmployee2.setId(9);\n\ttheEmployee2.setName(\"Ramin\");\n\ttheEmployee2.setPosition(\"Superwiser\");\n\ttheEmployee2.setSalary(15000.00);\n\t\n\tSystem.out.println(theEmployee2.getId());\n\tSystem.out.println(theEmployee2.getName());\n\tSystem.out.println(theEmployee2.getPosition());\n\tSystem.out.println(theEmployee2.getSalary());\n\tSystem.out.println(theEmployee2.getClass());\n\t\n\t\t\n\t}", "void printEmployeeDetail(){\n\t\tSystem.out.println(\"First name: \" + firstName);\n\t\tSystem.out.println(\"Last name: \" + lastName);\n\t\tSystem.out.println(\"Age: \" + age);\n\t\tSystem.out.println(\"Salary: \" + salary);\n\t\tSystem.out.println(firstName + \" has \" + car.color + \" \" + car.model + \" it's VIN is \" + car.VIN + \" and it is make year is \" + car.year );\n\t\t\n\t}", "public int getHC_EmployeeGrade2_ID();", "public void addEmployee(Person person, ArrayList<Integer> paidBy, ArrayList<Integer> takes, ArrayList<JobHistory> history,\n ArrayList<Integer> skills, HashMap<String, String> phoneNumbers) {\n try{\n // insert person\n PreparedStatement pStmt = conn.prepareStatement(\"INSERT INTO person\\n\" +\n \"VALUES(?, ?, ?, ?, ?, ?, ?, ?)\");\n\n pStmt.setString(1, person.getPerId() + \"\");\n pStmt.setString(2, person.getName());\n pStmt.setString(3, person.getCity());\n pStmt.setString(4, person.getStreet());\n pStmt.setString(5, person.getState());\n pStmt.setString(6, person.getZipCode() + \"\");\n pStmt.setString(7, person.getEmail());\n pStmt.setString(8, person.getGender());\n ResultSet rset = pStmt.executeQuery();\n\n // insert phone numbers\n pStmt = conn.prepareStatement(\"INSERT INTO phone_number \" +\n \"VALUES (?, ?, ?)\");\n\n pStmt.setString(1, person.getPerId() + \"\");\n pStmt.setString(2, phoneNumbers.get(\"home\"));\n pStmt.setString(3, phoneNumbers.get(\"mobile\"));\n rset = pStmt.executeQuery();\n\n // insert skills\n for(Integer skill : skills) {\n pStmt = conn.prepareStatement(\"INSERT INTO person_skill VALUES (?, ?)\");\n\n pStmt.setString(1, person.getPerId() + \"\");\n pStmt.setString(2, skill + \"\");\n rset = pStmt.executeQuery();\n }\n\n // insert job histories\n for(JobHistory job : history) {\n pStmt = conn.prepareStatement(\"INSERT INTO job_history VALUES (?, ?, ?, ?)\");\n\n pStmt.setString(1, job.getStartDate());\n pStmt.setString(2, job.getEndDate());\n pStmt.setString(3, job.getJobListing() + \"\");\n pStmt.setString(4, person.getPerId() + \"\");\n rset = pStmt.executeQuery();\n }\n\n // insert sections taken\n for(Integer section : takes) {\n pStmt = conn.prepareStatement(\"INSERT INTO takes VALUES (?, ?)\");\n\n pStmt.setString(1, person.getPerId() + \"\");\n pStmt.setString(2, section + \"\");\n rset = pStmt.executeQuery();\n }\n\n // add job a person is paid by\n for(Integer jobListing : paidBy) {\n pStmt = conn.prepareStatement(\"INSERT INTO paid_by VALUES (?, ?)\");\n\n pStmt.setString(1, person.getPerId() + \"\");\n pStmt.setString(2, jobListing + \"\");\n rset = pStmt.executeQuery();\n }\n\n employees.add(person);\n System.out.println(\"\\n\" + person.getName() + \" added successfully to company \" + getCompName());\n\n } catch(Exception e){\n System.out.println(\"\\nError in method addEmployee: \" + e);\n }\n\n }" ]
[ "0.63353574", "0.6327358", "0.61405647", "0.61194247", "0.5991262", "0.57682395", "0.56091094", "0.55949163", "0.5581586", "0.55559576", "0.55462307", "0.5538364", "0.54832613", "0.54781544", "0.5462365", "0.5462141", "0.5440012", "0.5437302", "0.5435418", "0.5420553", "0.53984964", "0.53839344", "0.53721285", "0.5372091", "0.53645784", "0.53593594", "0.53575134", "0.53464276", "0.5346235", "0.5337041", "0.53351635", "0.5313969", "0.5309889", "0.5307408", "0.53002864", "0.5296312", "0.52952427", "0.5291699", "0.5284062", "0.5282954", "0.5282569", "0.5278927", "0.5275739", "0.5275576", "0.527075", "0.52676874", "0.5267324", "0.52597016", "0.5246808", "0.52444875", "0.52434444", "0.52408427", "0.52398336", "0.52351344", "0.52337193", "0.52238774", "0.52235526", "0.5219854", "0.5217754", "0.51994705", "0.5195948", "0.5186717", "0.5183274", "0.5178338", "0.5165115", "0.51593363", "0.51592153", "0.5153614", "0.51429", "0.5136363", "0.5132562", "0.5127984", "0.5127586", "0.5124938", "0.51220644", "0.5112493", "0.51039606", "0.5101411", "0.5097989", "0.50960547", "0.5092647", "0.50715953", "0.5070339", "0.50636774", "0.5052111", "0.50481665", "0.5041955", "0.5041556", "0.5036389", "0.50358945", "0.50341105", "0.50328857", "0.5025865", "0.50210744", "0.50204736", "0.50191355", "0.5007291", "0.50064886", "0.50064576", "0.5005344" ]
0.5508028
12
Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the nonoverlapping intervals that cover all the intervals in the input. Example 1: Input: intervals = [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] Explanation: Since intervals [1,3] and [2,6] overlaps, merge them into [1,6]. Example 2: Input: intervals = [[1,4],[4,5]] Output: [[1,5]] Explanation: Intervals [1,4] and [4,5] are considered overlapping. Constraints: 1 <= intervals.length <= 104 intervals[i].length == 2 0 <= starti <= endi <= 104
public static int[][] merge(int[][] intervals) { //Runtime: 5 ms, faster than 95.11% of Java online submissions for Merge Intervals. //Memory Usage: 41.8 MB, less than 39.70% of Java online submissions for Merge Intervals. if (intervals.length <= 0) return intervals; Arrays.sort(intervals, (i1, i2) -> Integer.compare(i1[0], i2[0])); List<int[]> solution = new LinkedList<>(); int[] tempIntervals = intervals[0]; solution.add(tempIntervals); for (int[] ints : intervals) { if (ints[0] <= tempIntervals[1]) { tempIntervals[1] = Math.max(ints[1], tempIntervals[1]); } else { tempIntervals = ints; solution.add(tempIntervals); } } return solution.toArray(new int[solution.size()][2]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int[][] merge(int[][] intervals) {\n Arrays.sort(intervals, new Comparator<int[]>() {\n @Override\n public int compare(int[] arr1, int[] arr2) {\n if (arr1[0] == arr2[0]) {\n return 0;\n }\n return arr1[0] < arr2[0] ? -1 : 1;\n }\n });\n List<int[]> ans = new ArrayList<>();\n // Take the first interval and compare its end with the starts of the next intervals. As long as they overlap,\n // we update the end to be the max end of the overlapping inervals. Once we find a non-overlapping interval,\n // we add the previous extended interval to the result and start over.\n int[] newInterval = intervals[0];\n ans.add(newInterval);\n for (int[] interval : intervals) {\n if (interval[0] <= newInterval[1]) {\n // Overlapping interval, update the end\n newInterval[1] = Math.max(newInterval[1], interval[1]);\n } else {\n // Non-overlapping interval, add it to the result and start over\n newInterval = interval;\n ans.add(newInterval);\n }\n }\n return ans.toArray(new int[ans.size()][]);\n }", "public int eraseOverlapIntervals(int[][] intervals) {\n \n Arrays.sort(intervals, new Comparator<int[]>() {\n public int compare(int[] a, int[] b) {\n return a[1] - b[1];\n }\n });\n \n int count = 1;\n int n = intervals.length;\n \n if (n == 0) return 0;\n \n int start = intervals[0][0];\n int end = intervals[0][1];\n for (int i = 1; i < n; ++i) {\n if (intervals[i][0] >= end) {\n end = intervals[i][1];\n count++;\n }\n }\n \n return n - count;\n }", "public ArrayList<Interval> merge(ArrayList<Interval> intervals) {\n if (intervals.size() > 1) {\n int[] startArray = new int[intervals.size()];\n int[] endArray = new int[intervals.size()];\n ArrayList<Interval> ans = new ArrayList<>();\n int count = 0;\n for (Interval val : intervals) {\n startArray[count] = val.start;\n endArray[count] = val.end;\n count++;\n }\n Arrays.sort(startArray);\n Arrays.sort(endArray);\n\n\n for (int i = 0; i < intervals.size()-1; i++) {\n int start = startArray[i];\n int end = endArray[i];\n\n while (i<intervals.size()-1 && startArray[i+1]<=end){\n end=endArray[i+1];\n i++;\n }\n\n Interval interval = new Interval(start,end);\n ans.add(interval);\n\n }\n\n return ans;\n }\n return intervals;\n }", "static List<Interval> merge(List<Interval> intervals) {\n intervals.sort((Interval interval1, Interval interval2) -> Integer.compare(interval1.start, interval2.start));\n\n Iterator<Interval> itr = intervals.iterator();\n\n List<Interval> result = new ArrayList<>();\n Interval first = itr.next();\n int start = first.start;\n int end = first.end;\n\n while (itr.hasNext()) {\n Interval currentInterval = itr.next();\n //overlap\n if (end > currentInterval.start) {\n // change the end value to take the max of the two\n // TIP: changing max to min gives us mutually exclusive intervals , ie, it gets rid if the overlapping intervals\n end = Math.max(end, currentInterval.end);\n // Not adding to final list here cause the next interval could also be overlapped\n } else {\n //add s,e to final list here as we know current interval end < start\n result.add(new Interval(start, end));\n // last pair will not be added in this loop as hasNext will return false\n start = currentInterval.start;\n end = currentInterval.end;\n }\n }\n\n result.add(new Interval(start, end));\n return result;\n\n }", "public int nonOverlapIntervals(Interval[] intervals) {\n\t\tif (intervals == null || intervals.length == 0)\n\t\t\treturn 0;\n\t\tArrays.sort(intervals, (o1, o2) -> o1.end - o2.end);\n\t\t// comparator is quicker than lambda\n\t\tArrays.sort(intervals, new Comparator<Interval>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Interval o1, Interval o2) {\n\t\t\t\treturn o1.end - o2.end;\n\t\t\t}\n\t\t});\n\t\tint end = intervals[0].end, count = 1;\n\t\t// find longest non-conflict\n\t\tfor (int i = 1; i < intervals.length; i++) {\n\t\t\t// conflict\n\t\t\tif (intervals[i].start >= end) {\n\t\t\t\tcount++;\n\t\t\t\tend = intervals[i].end;\n\t\t\t}\n\t\t}\n\t\treturn intervals.length - count;\n\t}", "public List<Interval> merge(List<Interval> intervals) {\n // sort the interval list by start\n Collections.sort(intervals, new Comparator<Interval>() {\n @Override\n public int compare(Interval o1, Interval o2) {\n return o1.start - o2.start;\n }\n });\n // use a linked list as data structure\n LinkedList<Interval> output = new LinkedList<>();\n for (Interval interval : intervals) {\n if (output.isEmpty()) {\n output.addLast(interval);\n } else {\n if (interval.start <= output.getLast().end) {\n // if present interval.start <= last interval.end,\n // update last interval.end by max interval.end between present and last\n output.getLast().end = Math.max(interval.end, output.getLast().end);\n } else {\n output.addLast(interval);\n }\n }\n }\n return output;\n }", "public List<Interval> merge(List<Interval> intervals) {\n Collections.sort(intervals, new Comparator<Interval>() {\n @Override\n public int compare(Interval o1, Interval o2) {\n if (o1.start < o2.start) {\n return -1;\n }\n if (o1.start > o2.start) {\n return 1;\n }\n return 0;\n }\n });\n if (intervals.size() <= 1) {\n return intervals;\n }\n List<Interval> res = new ArrayList<>();\n int start = intervals.get(0).start;\n int end = intervals.get(0).end;\n for (Interval interval : intervals) {\n if (end >= interval.start) {\n end = Math.max(interval.end, end);\n } else {\n res.add(new Interval(start, end));\n start = interval.start;\n end = interval.end;\n }\n }\n res.add(new Interval(start, end));\n return res;\n }", "public List<Interval> merge(List<Interval> intervals) {\n ArrayList<Interval> result = new ArrayList<Interval>();\n if(intervals.size()==0) return result;\n Comparator<Interval> comp = new Comparator<Interval>() \n { \n @Override \n public int compare(Interval i1, Interval i2) \n { \n if(i1.start==i2.start){ \n return i1.end-i2.end;\n }\n return i1.start-i2.start; \n } \n }; \n Collections.sort(intervals,comp); \n Interval cur=intervals.get(0);\n \tfor(int i=1;i<intervals.size();i++){\n \t\tInterval newInterval=intervals.get(i);\n \t\tif(newInterval.start>cur.end){\n \t\t\tInterval tmp=new Interval(cur.start,cur.end);\n \t\t\tresult.add(tmp);\n \t\t\tcur.start=newInterval.start;\n \t\t\tcur.end=newInterval.end;\n \t\t}\n \t\telse{\n \t\t\tcur.start=Math.min(cur.start, newInterval.start);\n \t\t\tcur.end=Math.max(cur.end, newInterval.end);\n \t\t}\n \t}\n \tresult.add(cur);\n \treturn result;\n }", "public List<Interval> merge(List<Interval> intervals) {\n List<Interval> result = new ArrayList<>();\n Interval current = null;\n\n Collections.sort(intervals, new Comparator<Interval>() {\n @Override\n public int compare(Interval o1, Interval o2) {\n return Integer.compare(o1.start, o2.start);\n }\n });\n\n for (int i = 0; i < intervals.size(); i++) {\n current = intervals.get(i);\n Interval last = result.size() == 0 ? current : result.get(result.size() - 1);\n\n if (last.end < current.start) {\n result.add(current);\n continue;\n } else {\n result.remove(last);\n\n last.start = Math.min(last.start, current.start);\n last.end = Math.max(last.end, current.end);\n\n result.add(last);\n }\n }\n\n\n return result;\n }", "public ArrayList<Interval> merge(ArrayList<Interval> intervals){\n Stack<Interval> st = new Stack<Interval>();\n st.push(intervals.get(0));\n int size = intervals.size();\n for(int i = 1; i < size;i++){\n Interval temp = intervals.get(i);\n Interval first = st.peek();\n if(first.end >= temp.start){\n st.pop();\n st.push(mergeInterval(first,temp));\n }else{\n st.push(temp);\n }\n }\n ArrayList<Interval> ans = new ArrayList<Interval>();\n while(!st.isEmpty()){\n ans.add(st.peek());\n st.pop();\n }\n // reverse all the intervals in the arrayList\n Collections.reverse(ans);\n return ans;\n }", "public List<Interval> merge(List<Interval> intervals, Interval dnd) {\n if (intervals.isEmpty()) {\n return Collections.singletonList(dnd);\n }\n Comparator<Interval> comparator = Comparator.comparing(Interval::getA).thenComparing(Interval::getB);\n\n //1. sort in ascending order based on starting point. if same then based on end point\n List<Interval> sorted = intervals.stream()\n .sorted(comparator)\n .collect(Collectors.toList());\n\n //2. merge intervals\n List<Interval> merged = new ArrayList<>();\n int start = sorted.get(0).a;\n int end = sorted.get(0).b;\n for (int i = 1; i < sorted.size(); i++) {\n Interval interval = sorted.get(i);\n // if there was previous interval, check, if it can be merged -> merge\n // otherwise flush previous interval and start new\n if (end >= interval.a) {\n end = interval.b;\n } else {\n merged.add(new Interval(start, end, IntervalType.E));\n start = interval.a;\n end = interval.b;\n }\n }\n merged.add(new Interval(start, end, IntervalType.E));\n\n //3. merge with dnd\n List<Interval> cutted = new ArrayList<>();\n for (Interval interval : merged) {\n cutted.addAll(merge(interval, dnd));\n }\n\n //4. add dnd\n cutted.add(dnd);\n\n // 5. sort\n return cutted.stream()\n .sorted(comparator)\n .collect(Collectors.toList());\n }", "int mergeIntervals(Interval arr[], int n) {\n if (n <= 0)\n return 0;\n\n // Create an empty stack of intervals\n Stack<Interval> s = new Stack<>();\n\n // sort the intervals in increasing order of start time\n // sort(arr, arr+n, compareInterval);\n Arrays.sort(arr, (o1, o2) -> {\n return o1.start - o2.start;\n });\n // push the first interval to stack\n s.push(arr[0]);\n\n // Start from the next interval and merge if necessary\n for (int i = 1; i < n; i++) {\n // get interval from stack top\n Interval top = s.peek();\n\n // if current interval is not overlapping with stack top,\n // push it to the stack\n if (top.end < arr[i].start)\n s.push(arr[i]);\n\n // Otherwise update the ending time of top if ending of current\n // interval is more\n else if (top.end < arr[i].end) {\n top.end = arr[i].end;\n s.pop();\n s.push(top);\n }\n }\n\n // Print contents of stack\n\n int count = 0;\n while (!s.empty()) {\n Interval t = s.peek();\n count += (t.end - t.start + 1);\n s.pop();\n }\n System.out.println(count);\n return count;\n }", "public static void test() {\n List<Interval> list = new ArrayList<>();\n list.add(new Interval(1, 4));\n list.add(new Interval(2, 3)); // completely covered by previous\n list.add(new Interval(3, 6)); // partially overlapping over 1st one\n list.add(new Interval(5, 9)); // partially overlapping with the merged one (1, 6) to become (1, 9)\n list.add(new Interval(11, 15));\n list.add(new Interval(14, 18)); // merge with previous one as (11, 18)\n \n MergeIntervals p = new MergeIntervals();\n // works\n //p.merge(list);\n \n p.mergeWithStack(list);\n \n for(Interval i : list) {\n System.out.print(\"(\" + i.start + \", \" + i.end + \") \");\n }\n \n System.out.println(\"end\");\n }", "private ArrayList<int[]> getOverlapping(ArrayList<int[]> list, int start, int end) {\n ArrayList<int[]> result=new ArrayList<int[]>();\n for (int[] seg:list) {\n if (!(start>seg[1] || end<seg[0])) result.add(seg);\n }\n return result;\n }", "private void merge(List<Interval> list) {\n if(list == null) {\n return;\n }\n \n // first sort the list on their start time\n Collections.sort(list, new Comparator<Interval>() {\n\n @Override\n public int compare(Interval i1, Interval i2) {\n if(i1 == null && i2 == null) {\n return 0;\n } else if(i1 != null && i2 != null) {\n if(i1.start > i2.start) {\n return 1;\n } else if(i1.start == i2.start) {\n return 0;\n } else {\n return -1;\n }\n } else if(i1 != null) {\n return 1;\n } else {\n return -1;\n }\n }\n \n });\n \n int index = 0;\n \n // ensure there are at least 2 elements left\n while(index < list.size() - 1) {\n // get the next 2 consecutive elements from the list\n Interval a = list.get(index++);\n Interval b = list.get(index);\n \n\n if(a.start <= b.start && b.end <= a.end) {\n // a completely covers b then delete b\n list.remove(index--);\n } else if(a.start <= b.start && b.start < a.end) {\n // a and b overlaps some \n list.remove(index--);\n list.remove(index);\n \n // replace with the merged one\n list.add(index, new Interval(a.start, b.end));\n }\n }\n }", "private void merge(int[] array, int start, int mid, int end) {\n\t\t\n\t\t// Instantiate and populate subarrays.\n\t\tint leftSize = mid - start + 1;\n\t\tint rightSize = end - mid;\n\t\tint[] leftSubarray = new int[leftSize + 1];\n\t\tint[] rightSubarray = new int[rightSize + 1];\n\t\t\n\t\tfor (int i = 0; i < leftSize; i++) {\n\t\t\tleftSubarray[i] = array[start + i];\n\t\t}\n\t\tfor (int i = 0; i < rightSize; i++) {\n\t\t\trightSubarray[i] = array[mid + i + 1];\n\t\t}\n\t\t\n\t\t// \"Sentinel\" values = approximate infinity.\n\t\tleftSubarray[leftSize] = Integer.MAX_VALUE;\n\t\trightSubarray[rightSize] = Integer.MAX_VALUE;\n\n\t\t// Merge subarrays.\n\t\tint i = 0;\n\t\tint j = 0;\n\t\tfor (int k = start; k <= end; k++) {\n\t\t\tif (leftSubarray[i] < rightSubarray[j]) {\n\t\t\t\tarray[k] = leftSubarray[i];\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tarray[k] = rightSubarray[j];\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t}", "public List<Interval> checkMerge (Interval interval1, List<Interval> mergedIntervals) {\r\n\t\tInterval mergeInterval = mergedIntervals.get(mergedIntervals.size() - 1);\r\n\t\tif (interval1.getValue1() <= mergeInterval.getValue2() && interval1.getValue2() > mergeInterval.getValue2()) {\r\n\t\t\tInterval intervally = combine(mergeInterval.getValue1(), interval1.getValue2());\r\n\t\t\tmergedIntervals.set(mergedIntervals.size() - 1, intervally);\r\n\t\t\treturn mergedIntervals;\r\n\t\t}else if (interval1.getValue2() <= mergeInterval.getValue2()){\r\n\t\t\treturn mergedIntervals;\r\n\t\t}else {\r\n\t\t\tmergedIntervals.add(interval1);\r\n\t\t\treturn mergedIntervals;\r\n\t\t}\r\n\t}", "private List<Interval> merge(Interval interval, Interval dnd) {\n if (dnd.a <= interval.a && dnd.b >= interval.b) {\n return Collections.emptyList();\n }\n // [ dnd [ ] interval ]\n if (dnd.a <= interval.a && dnd.b >= interval.a) {\n return Collections.singletonList(new Interval(dnd.b, interval.b, IntervalType.E));\n }\n // [ interval [ dnd ] ]\n if (interval.a <= dnd.a && dnd.b <= interval.b) {\n return Arrays.asList(\n new Interval(interval.a, dnd.a, IntervalType.E),\n new Interval(dnd.b, interval.b, IntervalType.E)\n );\n }\n // [ interval [ ] dnd ]\n if (interval.a <= dnd.a && interval.b >= dnd.a) {\n return Collections.singletonList(new Interval(interval.a, dnd.a, IntervalType.E));\n }\n // else\n // [ int ] [ dnd ]\n // [dnd] [int]\n // return int\n return Collections.singletonList(interval);\n }", "public List<Interval> sortCombine (List<Interval> intervals){\r\n\t\tCompareIntervals compareIntervals = new CompareIntervals();\r\n\t\tList<Interval> mergedIntervals = new ArrayList<>();\r\n\t\t/*goes through intervals in the list and switches the higher and the lower values if \r\n\t\tthe higher value is the first. this makes comparisons easier, at the same time, \r\n\t\tusers don`t have to remember to only enter lower value first*/\r\n\t\tfor (Interval interval : intervals) {\r\n\t\t\tintervals.set(intervals.indexOf(interval), sort(interval));\r\n\t\t}\r\n\t\t//now thie list is sorted from lowest to highest, this again will make comparison easier and reduce the number of if statements slightly\r\n\t\tCollections.sort(intervals, compareIntervals);\r\n\t\t// this will add the first interval of the intervals list to the merged intervals list, so the comparison does work in the next step\r\n\t\tmergedIntervals.add(intervals.get(0));\r\n\t\t\r\n\t\t/* now the program will loop through the intervals and call checkMerge to see if the\r\n\t\tinterval shall be added to the List or merged with a existing entry*/\r\n\t\tfor (int i = 1; i < intervals.size(); i++) {\r\n\t\t\tInterval interval1 = intervals.get(i);\r\n\t\t\tmergedIntervals = checkMerge(interval1, mergedIntervals);\t\r\n\t\t}\r\n\t\treturn mergedIntervals;\t//finally merged intervals list is returned to controller, to have it display on the screen\r\n\t\t}", "public static void merge(int inputArray[], int start, int mid, int end) {\n // must account for first marker being pos 0\n int tempArray[] = new int[end - start + 1];\n\n // index counter for l array\n int leftMarker = start;\n // index counter for r array\n int rightMarker = mid + 1;\n // index counter for temporary array\n int k = 0;\n\n // while L isn't past midpoint and R isn't past end\n // fill out tempArray based on which value is higher\n while (leftMarker <= mid && rightMarker <= end) {\n if (inputArray[leftMarker] < inputArray[rightMarker]) {\n tempArray[k] = inputArray[leftMarker];\n leftMarker = leftMarker + 1;\n } else {\n tempArray[k] = inputArray[rightMarker];\n rightMarker = rightMarker + 1;\n }\n k = k + 1;\n }\n\n // Only one condition must be true to break out of above loop\n // we could theoretically make it to the end of left array\n // without making it to the end of right array\n if (leftMarker <= mid) {\n while (leftMarker <= mid) {\n tempArray[k] = inputArray[leftMarker];\n leftMarker = leftMarker + 1;\n k = k + 1;\n\n }\n } else if (rightMarker <= end) {\n while (rightMarker <= end) {\n tempArray[k] = inputArray[rightMarker];\n rightMarker = rightMarker + 1;\n k = k + 1;\n }\n }\n\n // copy over the temp array into inputArray\n for (int i = 0; i < tempArray.length; i++) {\n // we add \"start\" to i so that\n // we only write to the \"window\"'s location\n // and the window frame will move from left to right and expand\n // as the recursion proceeds\n inputArray[i + start] = tempArray[i];\n }\n }", "private void findMaxOverlaps(int[] start, int[] end) {\n // sort both arrays\n sort(start);\n sort(end);\n \n // walk through all starts\n int cur_overlaps = 1;\n int max_overlaps = cur_overlaps;\n int when_max_overlaps = start[0];\n \n int j = 0;\n for(int i = 1; i < start.length; i++) {\n // one more started and it may be overlapping wither others\n cur_overlaps++;\n \n /*\n * Concurrent overlaps are determined by how many has ended BEFORE\n * the LAST one starts\n */\n if(start[i] > end[j]) {\n // one {more] has ended\n cur_overlaps--;\n j++;\n }\n \n if(cur_overlaps > max_overlaps) {\n max_overlaps = cur_overlaps;\n when_max_overlaps = start[i];\n }\n }\n \n print( String.format(\"Max overlaps: %d at %d\", max_overlaps, when_max_overlaps));\n }", "public static boolean overlap(List<Interval> intervals) {\n for (int i = 0; i < intervals.size(); i++) {\n for (int j = i + 1; j < intervals.size(); j++) {\n Interval interval1 = intervals.get(i);\n Interval interval2 = intervals.get(j);\n if (interval1.overlaps(interval2)) {\n return true;\n }\n }\n }\n return false;\n }", "public void merge(int[] inputArray, int start, int mid, int end) {\n int s1 = mid - start + 1;\n int s2 = end - mid;\n\n //Create a left and right array\n int L[] = new int [s1];\n int R[] = new int [s2];\n\n //Copy elements into two separate arrays\n for (int i=0; i<s1; ++i)\n L[i] = inputArray[start + i];\n for (int j=0; j<s2; ++j)\n R[j] = inputArray[mid + 1+ j];\n\n\n int i = 0, j = 0;\n int k = start;\n\n //Start your comparision\n while (i < s1 && j < s2)\n {\n if (L[i] <= R[j])\n {\n inputArray[k] = L[i];\n i++;\n }\n else\n {\n inputArray[k] = R[j];\n j++;\n }\n k++;\n }\n\n //Copy the remaining elements\n while (i < s1)\n {\n inputArray[k] = L[i];\n i++;\n k++;\n }\n while (j < s2)\n {\n inputArray[k] = R[j];\n j++;\n k++;\n }\n }", "public static List<MissingDataInterval> getMissingRanges(TreeMap<LocalDateTime, Consumption> data, LocalDateTime start, LocalDateTime end, int interval) {\n List<MissingDataInterval> result = new ArrayList<>();\n boolean inMissing = false;\n LocalDateTime lastStart = null;\n\n LocalDateTime time = start;\n while (!time.isAfter(end)) {\n if (!inMissing && !data.containsKey(time)) {\n inMissing = true;\n lastStart = time;\n }\n if (inMissing && data.containsKey(time)) {\n inMissing = false;\n result.add(new MissingDataInterval(lastStart, time.minusSeconds(interval)));\n lastStart = null;\n }\n time = time.plusSeconds(interval);\n }\n if (inMissing) {\n result.add(new MissingDataInterval(lastStart, time.minusSeconds(interval)));\n }\n return result;\n }", "public static void test() {\n int[] start = {1, 2, 9, 5, 5};\n int[] end = {4, 5, 12, 9, 12};\n \n MaxOverlapInterval p = new MaxOverlapInterval();\n p.findMaxOverlaps(start, end);\n }", "public static void merge(int[] array, int start, int mid, int end) {\n if (array[mid - 1] <= array[mid]) {\n return;\n }\n\n // Index variables\n int i = start;\n int j = mid;\n int tempIndex = 0;\n\n // Create a temp array large enough to hold all elements in the left and right partitions\n int[] temp = new int[end - start];\n\n // While there are elements left in any of the left and right partitions...\n while (i < mid && j < end) {\n /* \n temp[tempIndex++] = array[i] <= array[j] ? array[i++] : array[j++];\n */\n // If the left element is smaller than or equal to the right...\n if (array[i] <= array[j]) {\n // Assign the left element to the temp array, and increment tempIndex and i\n temp[tempIndex++] = array[i++];\n } else {\n // Else assign the right element to the temp array, and increment tempIndex and j\n temp[tempIndex++] = array[j++];\n }\n }\n\n // At this point, either left or right partition will now be empty. \n // Then we simply merge the rest from another partition into temp array \n // as elements left are all larger than the largest elements in the temp array.\n /*\n System.arraycopy(src, srcPos, dest, destPos, length)\n src => source array\n srcPos => source index\n dest => destination array\n destPos => destination index\n */\n\n // Start at unhandled index of the left partition and copy over the rest of the elements\n // to the end of the array from index we've copied over to temp array so far.\n // If there are left over elements in the right partitions, they're already in the end of the array.\n // In the next step, we will be copying over the sorted and merged array from temp array \n // back to the original array, so the the beginning of the array is now sorted in the original array.\n System.arraycopy(array, i, array, start + tempIndex, mid - i);\n\n // Copy the elements in the temp array back into the original array\n System.arraycopy(temp, 0, array, start, tempIndex);\n }", "private void mergeWithStack(List<Interval> list) {\n if(list == null) {\n return;\n }\n \n // first sort the list on their start time\n Collections.sort(list, new Comparator<Interval>() {\n\n @Override\n public int compare(Interval i1, Interval i2) {\n if(i1 == null && i2 == null) {\n return 0;\n } else if(i1 != null && i2 != null) {\n if(i1.start > i2.start) {\n return 1;\n } else if(i1.start == i2.start) {\n return 0;\n } else {\n return -1;\n }\n } else if(i1 != null) {\n return 1;\n } else {\n return -1;\n }\n }\n \n });\n \n Interval cur;\n Stack<Interval> s = new Stack<>();\n \n // push the first one into satck\n s.push(list.get(0));\n \n // ensure there are at least 2 elements left\n for(int index = 1; index < list.size(); index++) {\n Interval top = s.peek();\n cur = list.get(index);\n \n if(top.end < cur.start) {\n // no overlapping\n s.push(cur);\n } else if(top.end >= cur.start) {\n // 2 intervals are interleaved\n top.end = cur.end;\n }\n }\n \n list.clear();\n while(!s.isEmpty()) {\n list.add(0, s.pop());\n }\n }", "private static void merge(int[] arr, int start, int mid, int end) {\n\t\tint length1 = mid - start + 1;\n\t\tint length2 = end - mid;\n\t\tint left[] = new int[length1];\n\t\tint right[] = new int[length2];\n\t\tfor (int index =0; index < length1; index++) {\n\t\t\tleft[index] = arr[start+index];\n\t\t}\n\t\tfor (int index =0; index < length2; index++) {\n\t\t\tright[index] = arr[mid+index+1];\n\t\t}\n\t\tint leftIndex = 0;\n\t\tint rightIndex = 0;\n\t\tint index = start;\n\t\twhile (leftIndex < length1 && rightIndex < length2) {\n\t\t\tif (left [leftIndex] < right[rightIndex]) {\n\t\t\t\tarr[index] = left[leftIndex];\n\t\t\t\tleftIndex ++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tarr[index] = right[rightIndex];\n\t\t\t\trightIndex++;\n\t\t\t\tnumberOfInversions += (mid - leftIndex)+1;\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\t\twhile (leftIndex < length1) {\n\t\t\tarr[index] = left[leftIndex];\n\t\t\tleftIndex++;\n\t\t\tindex++;\n\t\t}\n\t\twhile (rightIndex < length2) {\n\t\t\tarr[index] = right[rightIndex];\n\t\t\trightIndex++;\n\t\t\tindex++;\n\t\t}\n\t\t\t\n\t\t\n\t}", "public void add(Interval<T> interval) {\n ArrayList<Interval<T>> that = new ArrayList<Interval<T>>();\n that.add(interval);\n\n /*\n * The following algorithm works with any size ArrayList<Interval<T>>.\n * We do only one interval at a time to do an insertion sort like adding of intervals, so that they don't need to be sorted.\n */\n int pos1 = 0, pos2 = 0;\n Interval<T> i1, i2, i1_2;\n\n for (; pos1 < this.size() && pos2 < that.size(); ++pos2) {\n i1 = this.intervals.get(pos1);\n i2 = that.get(pos2);\n\n if (i1.is(IntervalRelation.DURING_INVERSE, i2) || i1.is(IntervalRelation.START_INVERSE, i2) || i1.is(IntervalRelation.FINISH_INVERSE, i2) || i1.is(IntervalRelation.EQUAL, i2)) {//i1 includes i2\n //ignore i2; do nothing\n } else if (i1.is(IntervalRelation.DURING, i2) || i1.is(IntervalRelation.START, i2) || i1.is(IntervalRelation.FINISH, i2)) {//i2 includes i1\n this.intervals.remove(pos1);//replace i1 with i2\n --pos2;\n } else if (i1.is(IntervalRelation.OVERLAP, i2) || i1.is(IntervalRelation.MEET, i2)) {//i1 begin < i2 begin < i1 end < i2 end; i1 end = i2 begin\n i1_2 = new Interval<T>(i1.begin(), i2.end());//merge i1 and i2\n this.intervals.remove(pos1);\n that.add(pos2 + 1, i1_2);\n } else if (i1.is(IntervalRelation.OVERLAP_INVERSE, i2) || i1.is(IntervalRelation.MEET_INVERSE, i2)) {//i2 begin < i1 begin < i2 end < i1 end; i2 end = i1 begin\n i1_2 = new Interval<T>(i2.begin(), i1.end());//merge i2 and i1\n this.intervals.remove(pos1);\n this.intervals.add(pos1, i1_2);\n } else if (i1.is(IntervalRelation.BEFORE, i2)) {//i1 < i2 < (next i1 or next i2)\n ++pos1;\n --pos2;\n } else if (i1.is(IntervalRelation.AFTER, i2)) {//i2 < i1 < (i1 or next i2)\n this.intervals.add(pos1, i2);\n ++pos1;\n }\n }\n\n //this finishes; just append the rest of that\n if (pos2 < that.size()) {\n for (int i = pos2; i < that.size(); ++i) {\n this.intervals.add(that.get(i));\n }\n }\n }", "public static List<Interval> insert(List<Interval> intervals, Interval newInterval) {\n\t\t\tList<Interval> res = new ArrayList<Interval>();\n\t if (intervals == null||intervals.size() == 0){\n\t res.add(newInterval);\n\t return res;\n\t }\n\t\t\tint start=0, end = 0; \n\t\t\t// find the insert position for newInterval , to be insert or merged\n\t\t\tfor( Interval interval : intervals) {\n\t\t\t\tif(newInterval.start > interval.end) start++;\n\t\t\t\tif(newInterval.end >= interval.start) end++;\n\t\t\t else break;\n\t\t\t}\n\t\t\t\n\t\t\tif(start== end) { // no need merge, just copy all intervals into res\n\t\t\t\tres.addAll(intervals);\n\t\t\t\tres.add(start, newInterval) ; // insert the new one\n\t\t\t\treturn res;\n\t\t\t}\n\t\t\tfor(int i=0; i< start; i++) res.add(intervals.get(i));\n\t\t\t// intervl and newInterval are a closer range\n\t\t\tInterval interval = new Interval( Math.min( intervals.get(start).start, newInterval.start),\n\t\t\t\t\t\t\t\t\t\t\t\tMath.max( intervals.get(end-1).end, newInterval.end)); // note that, it's end-1\n\t\t\tres.add(interval);\n\t\t\tfor(int j=end; j< intervals.size(); j++) {\n\t\t\t\tres.add(intervals.get(j)); // after the newInterval insert, copy the remains into res\n\t\t\t}\n\t\t\treturn res;\n\t\t}", "@Test\n public void sample1(){\n int[][] a = new int[][] {\n new int [] {0,2},\n new int [] {5,10},\n new int [] {13,23},\n new int [] {24,25}\n };\n int [][] b = new int [][] {\n new int [] {1,5},\n new int [] {8,12},\n new int [] {15,24},\n new int [] {25,26}\n };\n int [][] expected = new int [][] {\n new int [] {1,2},\n new int [] {5,5},\n new int [] {8,10},\n new int [] {15,23},\n new int [] {24,24},\n new int [] {25,25},\n };\n int [][] output = underTest.intervalIntersection(a,b);\n assertArrayEquals(expected,output);\n }", "public static void mergeReverse(int[] nums, int start, int mid, int end) {\n\n if (nums[mid - 1] >= nums[mid]) {\n return;\n }\n\n int i = start; // i points to first index of left array\n int j = mid; // j points to first index of right array\n int tempIndex = 0;\n int[] tempArray = new int[end - start]; //new array to hold the sorted elements.\n while (i < mid && j < end) {\n tempArray[tempIndex++] = nums[i] >= nums[j] ? nums[i++] : nums[j++];\n }\n\n System.arraycopy(nums, i, nums, start + tempIndex, mid - i);\n // now copying complete temp array to input array.\n System.arraycopy(tempArray, 0, nums, start, tempIndex);\n\n }", "public static int[] merge(int[] A, int start, int middle, int end, int[] B) {\n int i = start;\n int j = middle;\n for (int k = start; k < end; k++) {\n if (i < middle && (j >= end || A[i] <= A[j])) {\n B[k] = A[i];\n i++;\n } else {\n B[k] = A[j];\n j++;\n }\n }//end for\n return A;\n }", "private int[] mergeSort(int[] nums, int start, int end) {\n if (start == end) {\n return new int[]{nums[start]};\n }\n\n // keep dividing the entire array into sub-arrays\n int mid = (end - start) / 2 + start;\n int[] left = mergeSort(nums, start, mid);\n int[] right = mergeSort(nums, mid + 1, end);\n // return merged array\n return mergeTwoSortedArrays(left, right);\n }", "public interface Interval extends Comparable<Interval> {\n\n /**\n * Returns the start coordinate of this interval.\n * \n * @return the start coordinate of this interval\n */\n int getStart();\n\n /**\n * Returns the end coordinate of this interval.\n * <p>\n * An interval is closed-open. It does not include the returned point.\n * \n * @return the end coordinate of this interval\n */\n int getEnd();\n\n default int length() {\n return getEnd() - getStart();\n }\n\n /**\n * Returns whether this interval is adjacent to another.\n * <p>\n * Two intervals are adjacent if either one ends where the other starts.\n * \n * @param interval - the interval to compare this one to\n * @return <code>true</code> if the intervals are adjacent; otherwise\n * <code>false</code>\n */\n default boolean isAdjacent(Interval other) {\n return getStart() == other.getEnd() || getEnd() == other.getStart();\n }\n \n /**\n * Returns whether this interval overlaps another.\n * \n * This method assumes that intervals are contiguous, i.e., there are no\n * breaks or gaps in them.\n * \n * @param o - the interval to compare this one to\n * @return <code>true</code> if the intervals overlap; otherwise\n * <code>false</code>\n */\n default boolean overlaps(Interval o) {\n return getEnd() > o.getStart() && o.getEnd() > getStart();\n }\n \n /**\n * Compares this interval with another.\n * <p>\n * Ordering of intervals is done first by start coordinate, then by end\n * coordinate.\n * \n * @param o - the interval to compare this one to\n * @return -1 if this interval is less than the other; 1 if greater\n * than; 0 if equal\n */\n default int compareTo(Interval o) {\n if (getStart() > o.getStart()) {\n return 1;\n } else if (getStart() < o.getStart()) {\n return -1;\n } else if (getEnd() > o.getEnd()) {\n return 1;\n } else if (getEnd() < o.getEnd()) {\n return -1;\n } else {\n return 0;\n }\n }\n}", "public List<Interval> insert(List<Interval> intervals, Interval newInterval) {\n int start = Collections.binarySearch(intervals, newInterval, (l, r) -> l.start - r.start);\n if(start < 0) {\n start = -start - 1;\n }\n if(start != 0) {\n if(intervals.get(start-1).end >= newInterval.start) newInterval.start = intervals.get(--start).start;\n }\n\n // find end index to delete\n int end = Collections.binarySearch(intervals, newInterval, (l, r) -> l.end - r.end);\n if(end < 0) {end = - end - 1;}\n if(end != intervals.size()) {\n if(intervals.get(end).start <= newInterval.end) newInterval.end = intervals.get(end++).end;\n }\n //System.out.println(start+\",\" + end + \",\" + newInterval.start +\",\" +newInterval.end);\n\n // delete all the intervals\n for(int i = start; i<end; i++) {\n intervals.remove(start);\n }\n\n intervals.add(start, newInterval);\n return intervals;\n }", "private static void mergeAsc(int arr[], int start, int mid, int end) {\n\r\n\t\tint subArrLen1 = mid - start + 1;\r\n\t\tint subArrLen2 = end - mid;\r\n\r\n\t\t// create the sub Arrays as temporary storage\r\n\t\tint subArray1[] = new int[subArrLen1];\r\n\t\tint subArray2[] = new int[subArrLen2];\r\n\r\n\t\t// copy data in temporary arrays\r\n\r\n\t\tfor (int i = 0; i < subArrLen1; i++) {\r\n\t\t\tsubArray1[i] = arr[start + i];\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < subArrLen2; i++) {\r\n\t\t\tsubArray2[i] = arr[mid + i + 1];\r\n\t\t}\r\n\r\n\t\t// merging the temporary arrays\r\n\r\n\t\tint i = 0, j = 0;\r\n\t\tint k = start;\r\n\r\n\t\twhile (i < subArrLen1 && j < subArrLen2) {\r\n\t\t\tif (subArray1[i] <= subArray2[j]) {\r\n\t\t\t\tarr[k] = subArray1[i];\r\n\t\t\t\ti++;\r\n\t\t\t} else {\r\n\t\t\t\tarr[k] = subArray2[j];\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\r\n\t\t}\r\n\r\n\t\t// copy left over elements of subArray2[]\r\n\t\twhile (i < subArrLen1) {\r\n\t\t\tarr[k] = subArray1[i];\r\n\t\t\ti++;\r\n\t\t\tk++;\r\n\t\t}\r\n\r\n\t\t// copy left over elements of subArray2[]\r\n\t\twhile (j < subArrLen2) {\r\n\t\t\tarr[k] = subArray2[j];\r\n\t\t\tj++;\r\n\t\t\tk++;\r\n\t\t}\r\n\r\n\t}", "public static int[] mergeSort(int[] elements, int start, int end) {\n\t\tif (start == end)\n\t\t\treturn elements;\n\t\t\n\t\tint middle = (end + start) / 2;\n\t\tmergeSort(elements, start, middle);\n\t\tmergeSort(elements, middle + 1, end);\n\t\tmerge(elements, start, middle, end);\n\t\t\n\t\treturn elements;\n\t}", "public int[][] insert(int[][] intervals, int[] newInterval) {\n int[][] result = new int[intervals.length + 1][2];\n int i = 0, j = 0;\n while (i < intervals.length) {\n int[] interval = intervals[i];\n if (interval[0] < newInterval[0]) {\n if (interval[1] < newInterval[0]) {\n result[j][0] = interval[0];\n result[j][1] = interval[1];\n j++;\n } else {\n newInterval[0] = interval[0];\n newInterval[1] = Math.max(newInterval[1], interval[1]);\n }\n } else if (interval[0] <= newInterval[1]) {\n newInterval[1] = Math.max(newInterval[1], interval[1]);\n } else {\n result[j][0] = newInterval[0];\n result[j][1] = newInterval[1];\n j++;\n break;\n }\n i++;\n }\n\n while (i < intervals.length) {\n result[j][0] = intervals[i][0];\n result[j][1] = intervals[i][1];\n i++;\n j++;\n }\n\n if (j == 0 || result[j - 1][1] < newInterval[0]) {\n result[j][0] = newInterval[0];\n result[j][1] = newInterval[1];\n j++;\n }\n\n if (j == result.length) {\n return result;\n } else {\n int[][] actualSize = new int[j][2];\n for (int k = 0; k < actualSize.length; k++) {\n actualSize[k][0] = result[k][0];\n actualSize[k][1] = result[k][1];\n }\n return actualSize;\n }\n }", "public static void mergeSortReverse(int[] nums, int start, int end) {\n // check for the base condition\n if (end - start < 2) {\n return;\n }\n // otherwise break the array [10, 2, 6, -12, 5,12,16] into parts\n int mid = (start + end) / 2;\n // now got the mid and array is divided\n // Left array - [10, 2, 6] & Right array - [-12, 5, 12, 16]\n mergeSortReverse(nums, start, mid); //calling mergeSort for left array\n mergeSortReverse(nums, mid, end); //calling mergeSort for right array\n // merge the sorted array\n mergeReverse(nums, start, mid, end);\n }", "public List<String> findMissingRanges(int[] nums, int lower, int upper) {\n List<String> res = new ArrayList<>();\n if (nums == null || nums.length == 0) {\n if (lower == upper) {\n res.add(\"\" + lower);\n } else {\n res.add(lower + \"->\" + upper);\n }\n return res;\n }\n\n if (nums[0] > lower) {\n if (nums[0] - 1 == lower) {\n res.add(\"\" + lower);\n } else {\n res.add(lower + \"->\" + (nums[0] - 1));\n }\n }\n\n for (int i = 0; i < nums.length - 1; i++) {\n if ((nums[i + 1] == nums[i] + 1) || nums[i] == nums[i + 1]) {\n continue;\n }\n if (nums[i + 1] - nums[i] == 2) {\n res.add(\"\" + (nums[i] + 1));\n } else {\n res.add((nums[i] + 1) + \"->\" + (nums[i + 1] - 1));\n }\n }\n\n if (nums[nums.length - 1] < upper) {\n if (upper - 1 == nums[nums.length - 1]) {\n res.add(\"\" + upper);\n } else {\n res.add((nums[nums.length - 1] + 1) + \"->\" + upper);\n }\n }\n\n return res;\n\n }", "public int intersectionSizeTwo(int[][] intervals) {\n \tint n = intervals.length;\n \tArrays.sort(intervals, new Comparator<int[]>() {\n\t\t\t@Override\n\t\t\tpublic int compare(int[] o1, int[] o2) {\n\t\t\t\treturn o1[1] == o2[1]?o2[0]-o1[0]:o1[1]-o2[1];\n\t\t\t}\n\t\t});\n \t\n \tint res = 0;\n \t// two highest most point have more chances of being picked later\n \t/* proof why largest two elements are enough\n \t * intervals are sorted in increasing end point.\nhttps://leetcode.com/problems/set-intersection-size-at-least-two/discuss/113085/Ever-wonder-why-the-greedy-algorithm-works-Here-is-the-explanation!\n \t */\n \tint l = intervals[0][1] - 1, r = intervals[0][1];\n \tres += 2;\n \t\n \tfor(int i = 0;i < n;i++) {\n \t\tint []curr = intervals[i];\n \t\t// 1 element common\n \t\tif(l < curr[0] && curr[0] <= r) {\n \t\t\tres++;\n \t\t\tl = r;\n \t\t\tr = curr[1];\n \t\t// none common \n \t\t} else if(curr[0] > r) {\n \t\t\tres += 2;\n \t\t\tl = curr[1]-1;\n \t\t\tr = curr[1];\n \t\t}\n \t}\n \treturn res;\n }", "private static void merge(int[] inputArray, int start, int mid, int end) {\n int tempArray [] = new int[end - start + 1]; //length of array\n\n // index counter for left side of Array\n int leftSlot = start;\n\n // index counter for right side of Array\n int rightSlot = mid + 1;\n\n // index for temp array\n int k = 0;\n\n while(leftSlot <= mid && rightSlot <= end){ //loop will run till left slot is less than mid value, and right slot is less than end index\n if(inputArray[leftSlot] < inputArray[rightSlot]){\n tempArray[k] = inputArray[leftSlot];\n leftSlot = leftSlot + 1; // incrementing the left slot\n }else {\n tempArray[k] = inputArray[rightSlot];\n rightSlot = rightSlot + 1; // incrementing the right slot\n }\n\n k = k+1; //need to increment the index of temp array so that value gets copied to correct place\n }\n\n /**\n * when it gets to here that means the above loop is completed and\n * both the left and right side of array are sorted\n */\n\n //there can be scenario that right array is sorted and left index is always less than right\n\n if(leftSlot <= mid){\n while(leftSlot <= mid){\n tempArray[k] = inputArray[leftSlot];\n leftSlot = leftSlot + 1;\n k = k + 1;\n }\n }else if(rightSlot <= end){\n while(rightSlot <= end){\n tempArray[k] = inputArray[rightSlot];\n rightSlot = rightSlot + 1;\n k = k + 1;\n }\n }\n for(int i=0;i< tempArray.length;i++){\n inputArray[start + i] = tempArray[i]; // copying back to original array\n }\n }", "public static void merge(int start, int mid, int end, int[] numbers) {\n int[] tempArray = new int[numbers.length]; // Create a temporary array\n int tmpArrayIndex = start; // create a temporary index\n\n // initialize start index and mid index to be used as counters\n int startIndex = start;\n int midIndex = mid + 1;\n\n // Iterate until the smaller array reaches the end.\n while (startIndex <= mid && midIndex <= end) {\n if (numbers[startIndex] < numbers[midIndex]) {\n // The ++ increases the value by one after it has been used\n // to prevent the while loop from giving us an infinite loop\n tempArray[tmpArrayIndex++] = numbers[startIndex++];\n } else {\n tempArray[tmpArrayIndex++] = numbers[midIndex++];\n }\n }\n\n // copy the remaining elements into the array\n while(startIndex <= mid) {\n tempArray[tmpArrayIndex++] = numbers[startIndex++];\n }\n\n while (midIndex <= end) {\n tempArray[tmpArrayIndex++] = numbers[midIndex++];\n }\n\n // copy our temporary array to the actual array after sorting\n if (end + 1 - start >= 0) {\n\n // java method for copying arrays\n System.arraycopy(tempArray, start, numbers, start, end + 1 - start);\n }\n }", "@Test\n public void isOverlap_interval1OverlapsInterval2OnStart_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(3,12);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }", "public void addRange(int left, int right) {\n Interval cur = intervals.get(left);\n if (cur == null) {\n cur = new Interval(left, right);\n intervals.put(left, cur);\n } else {\n cur.end = Math.max(cur.end, right);\n }\n\n // now merge intervals\n\n // lower one\n Integer lower = intervals.lowerKey(cur.start);\n if (lower != null && intervals.get(lower).end >= cur.start) { //overlap\n int end = Math.max(cur.end, intervals.get(lower).end);\n cur = intervals.get(lower);\n cur.end = end;\n intervals.remove(left);\n }\n\n // higher ones\n Integer higher = intervals.higherKey(cur.start); //like next\n while (higher != null) {\n if (intervals.get(higher).start > cur.end) {\n break;\n }\n\n cur.end = Math.max(cur.end, intervals.get(higher).end);\n intervals.remove(higher);\n\n higher = intervals.higherKey(cur.start);\n }\n }", "public static void main(String[] args) {\n\tLeetCodeNonOverLappingIntervals me = new LeetCodeNonOverLappingIntervals();\n\t\n\tint[][] testcase1 = { {1,2}, {2,3}, {3,4}, {1,3} }; // 1. remove {1,3}\n\tint[][] testcase2 = { {1,2}, {1,2}, {1,2} }; // 2.. remove 2 {1,2}\n\tint[][] testcase3 = { {1,2}, {2,3}}; // 0.. remove nothing\n\tint[][] testcase4 = { {1,4}}; // 0.. remove nothing\n\t\n\tlong startTime = System.currentTimeMillis();\n\n\tSystem.out.println(me.eraseOverlapIntervals(testcase1)); // 1\n\tSystem.out.println(me.eraseOverlapIntervals(testcase2)); // 2\n\tSystem.out.println(me.eraseOverlapIntervals(testcase3)); // 0\n\tSystem.out.println(me.eraseOverlapIntervals(testcase4)); // 0\n\t\n\tSystem.out.println(\"Time taken \" + (System.currentTimeMillis() - startTime));\n\t\n\n}", "@Test(dataProvider = \"optionalOrNot\", expectedExceptions = CommandLineException.BadArgumentValue.class)\n public void testIntervalSetAndMergingOverlap(IntervalArgumentCollection iac){\n iac.addToIntervalStrings(\"1:1-100\");\n iac.addToIntervalStrings(\"1:101-200\");\n iac.addToIntervalStrings(\"1:90-110\");\n iac.intervalSetRule = IntervalSetRule.INTERSECTION;\n iac.intervalMergingRule = IntervalMergingRule.ALL;\n iac.getIntervals(hg19GenomeLocParser.getSequenceDictionary());\n }", "@Test\n public void isOverlap_interval1ContainsInterval2OnEnd_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(0,3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }", "public Interval mergeInterval(Interval first, Interval second){\n Interval result = new Interval();\n result.start = Math.min(first.start,second.start);\n result.end = Math.max(first.end,second.end);\n return result;\n }", "private void merge(int lb, int mid, int ub, int[] ar){\n\t\tint i = lb ,j = lb + mid, k = 0;\n\t\tint[] out = new int[ub - lb + 1];\n\t\twhile( (i <= lb + mid - 1) && (j <= ub)){\n\t\t if(ar[i] <= ar[j]) out[k++] = ar[i++];\n\t\t else out[k++] = ar[j++];\n\t\t}\n\t\twhile(i <= lb + mid - 1) out[k++] = ar[i++];\n\t\twhile(j <= ub) \t out[k++] = ar[j++];\n\t\tfor(int l = 0; l < k; l++) ar[lb + l] = out[l];\n\t}", "public ArrayList<Interval> insert(ArrayList<Interval> intervals, Interval newInterval) {\n ArrayList<Interval> res = new ArrayList<Interval>(); \n Interval t= new Interval(newInterval.start,newInterval.end);\n Iterator<Interval> itr = intervals.iterator();\n \n while(itr.hasNext()){\n Interval i = itr.next();\n if(i.start>t.end){\n res.add(t);\n res.add(i);\n while(itr.hasNext()){res.add(itr.next());}\n return res;\n }\n \n if(t.start>i.end) \n res.add(i);\n else{\n t.start = Math.min(i.start,t.start);\n t.end = Math.max(i.end,t.end); \n }\n }\n res.add(t);\n return res;\n\n }", "static void merge(double a[],int start,int mid, int end) {\r\n \tint i,j,k;\r\n \tint size1 = mid - start +1;\r\n \tint size2 = end - mid;\r\n \tif (size2 > 0 && size1 > 0) {\r\n \t\tdouble leftA[] = new double[size1]; // temp arrays\r\n \tdouble rightA[] = new double[size2];\r\n \tfor(i=0;i < size1;i++) leftA[i] = a[start+i]; //Copy data into temp arrays \r\n \tfor(j=0;j<size2;j++) rightA[j] = a[mid+1+j];\r\n \ti=0; // Merge temp arrays back into a[]\r\n \tj=0;\r\n \tk=start;\r\n \twhile (i<size1 && j < size2) {\r\n \t\tif(leftA[i]<=rightA[j]) {\r\n \t\t\ta[k]=leftA[i];\r\n \t\t\ti++;\r\n \t\t}else {\r\n \t\t\ta[k]=rightA[j];\r\n \t\t\tj++;\r\n \t\t}\r\n \t\tk++;\r\n \t}\r\n \twhile(i<size1) { //if remaining in leftA[] copy in\r\n \t\ta[k]=leftA[i];\r\n \t\ti++;\r\n \t\tk++;\r\n \t}\r\n \twhile(j<size2) { //if remaining in rightA[] copy in\r\n \t\ta[k]=rightA[j];\r\n \t\tj++;\r\n \t\tk++;\r\n \t}\r\n \t}\t\r\n }", "private static boolean areOverlapping( int ix0, int ix1, int len )\n {\n if( ix0<ix1 ){\n return ix0+len>ix1;\n }\n else {\n return ix1+len>ix0;\n }\n }", "@Test\n public void isOverlap_interval1BeforeInterval2_falseReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(8,12);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(false));\n }", "void merge(int []arr,int low, int mid, int high){\n int n1 = mid-low+1;\n int n2 = high-mid; //high - (mid+1)+1\n\n //create temp arrays\n int temp1[] = new int[n1];\n int temp2[] = new int[n2];\n\n //copy data to temp arrays\n for(int i=0;i<n1;i++){\n temp1[i] = arr[low+i];\n }\n for(int i=0;i<n2;i++){\n temp2[i] = arr[mid+1+i];\n }\n\n //Merge the temp arrays\n int i=0, j=0,k=low;\n while(i<n1 && j <n2){\n if(temp1[i]<temp2[j]){\n arr[k++] = temp1[i++];\n }else{\n arr[k++] = temp2[j++];\n }\n }\n\n //copy remaining elements\n while(i<n1){\n arr[k++]= temp1[i++];\n }\n while(j<n2){\n arr[k++] = temp2[j++];\n }\n }", "private static void merge(int[] array, int lowIndex, int middleIndex, int highIndex) {\n int n1 = middleIndex - lowIndex + 1;\n int n2 = highIndex - middleIndex;\n\n /*Create temp arrays*/\n int L[] = new int[n1];\n int R[] = new int[n2];\n\n /*Copy data to temp arrays*/\n for (int i = 0; i < L.length; i++) {\n L[i] = array[lowIndex + i];\n }\n for (int i = 0; i < R.length; i++) {\n R[i] = array[middleIndex + 1 + i];\n }\n\n /* Merge the temp arrays */\n\n // Initial indexes of first and second subarrays\n int i = 0, j = 0;\n\n // Initial index of merged subarray\n int k = lowIndex;\n\n while (i < n1 && j < n2) {\n if (L[i] <= R[j]) {\n array[k] = L[i];\n i++;\n } else {\n array[k] = R[j];\n j++;\n }\n k++;\n }\n\n /*Copy remaining elements of L[] if any */\n while (i < n1) {\n array[k] = L[i];\n i++;\n k++;\n }\n\n /*Copy remaining elements of R[] if any */\n while (j < n2) {\n array[k] = R[j];\n j++;\n k++;\n }\n }", "public ArrayList<Interval> insert(ArrayList<Interval> intervals, Interval newInterval) {\n int[] points = new int[2 * intervals.size()];\n int i = 0;\n for (Interval inter: intervals) {\n points[i++] = inter.start;\n points[i++] = inter.end;\n }\n \n int l = insertIndex(points, newInterval.start);\n int i1 = l / 2;\n if (l % 2 == 1) { // within an interval\n newInterval.start = points[l - 1];\n }\n else if (l > 0 && newInterval.start == points[l - 1]) { // start equal last interval's end\n newInterval.start = points[l - 2];\n i1--;\n }\n \n int r = insertIndex(points, newInterval.end);\n int i2 = (r + 1) / 2 - 1;\n if (r % 2 == 1) {\n newInterval.end = points[r];\n }\n \n for (i = i1; i <= i2; i++) intervals.remove(i1); // **important** indexes change after remove each one\n intervals.add(i1, newInterval);\n return intervals;\n \n }", "static void merge(int arr[], int low, int mid, int high){\n int len1 = mid-low+1;\n int len2 = high - mid;\n\n //Create temp arrays\n int left[] = new int[len1];\n int right[] = new int[len2];\n\n //Copy data into the temp arrays\n for(int i=0;i<len1;++i) left[i] = arr[low+i];\n\n for(int j=0;j<len2;++j) right[j] = arr[mid+1+j];\n\n /*Merge two arrays*/\n\n int i=0, j=0, k=low;\n\n while(i<len1 && j<len2)\n {\n if (left[i] <= right[j])\n {\n arr[k] = left[i];\n i++;\n }\n else\n {\n arr[k] = right[j];\n j++;\n }\n k++;\n\n }\n\n /* Copy remaining elements of left[] if any */\n while (i < len1)\n {\n arr[k] = left[i];\n i++;\n k++;\n }\n\n /* Copy remaining elements of right[] if any */\n while (j < len2)\n {\n arr[k] = right[j];\n j++;\n k++;\n }\n }", "public static MissingRangesStatistics getMissingRangeStatistics(TreeMap<LocalDateTime, Consumption> data, LocalDateTime start, LocalDateTime end, int interval) {\n TreeMap<Integer, Integer> result = new TreeMap<>();\n for (MissingDataInterval entry : getMissingRanges(data, start, end, interval)) {\n int duration = entry.getEntryCount(interval);\n if (!result.containsKey(duration)) {\n result.put(duration, 0);\n }\n result.put(duration, result.get(duration) + 1);\n }\n return new MissingRangesStatistics(result);\n }", "private void mergeSort(int[] array, int start, int end) {\n\t\tif (start < end) {\n\t\t\tint mid = (start + end) / 2;\n\t\t\tmergeSort(array, start, mid);\n\t\t\tmergeSort(array, mid + 1, end);\n\t\t\tmerge(array, start, mid, end);\n\t\t}\n\t}", "public int[] findRightInterval(int[][] intervals) {\n\tTreeMap<Integer, Integer> tMap = new TreeMap<>();\n\tfor (int i=0; i<intervals.length; i++) {\n\t tMap.put(intervals[i][0], i);\n\t}\n\t\n\tint[] result = new int[intervals.length];\n\tfor (int i = 0; i < intervals.length; i++) {\n\t int right = intervals[i][1];\n\t Map.Entry<Integer, Integer> entry = tMap.ceilingEntry(right);\n\t int index = entry == null ? -1 : entry.getValue();\n\t result[i] = index;\n\t}\n\n\treturn result;\n }", "public static Interval intersection(Interval in1, Interval in2){\r\n double a = in1.getFirstExtreme();\r\n double b = in1.getSecondExtreme();\r\n double c = in2.getFirstExtreme();\r\n double d = in2.getSecondExtreme();\r\n char p1 = in1.getFEincluded();\r\n char p2 = in1.getSEincluded();\r\n char p3 = in2.getFEincluded();\r\n char p4 = in2.getSEincluded();\r\n \r\n if (a==c && b==d){\r\n if (a==b){\r\n if (p1=='[' && p3=='[' && p2==']' && p4==']'){\r\n return new Interval(in1);\r\n }else{\r\n return new Interval(0,0,'(',')');\r\n }\r\n }else{\r\n return new Interval(a,b,p1==p3?p1:'(',p2==p4?p2:')');\r\n }\r\n }else if (a<c && b<=c){\r\n if (b==c && p2==']' && p3=='['){\r\n return new Interval(b,b,p3,p2);\r\n }else{\r\n return new Interval(0,0,'(',')');\r\n }\r\n }else if (a<=c && b<d){\r\n if (a==c){\r\n return new Interval(a,b,p1==p3?p1:'(',p2);\r\n }else{\r\n return new Interval(c,b,p3,p2);\r\n }\r\n }else if(a<c && b==d){\r\n return new Interval(c,b,p3,p2==p4?p2:')');\r\n }else if(a<=c && b>d){\r\n if (a==c){\r\n return new Interval(a,d,p1==p3?p1:'(',p4);\r\n }else{\r\n return new Interval(in2);\r\n }\r\n }else if (a>c && b<=d){\r\n if (b==d){\r\n return new Interval(a,b,p1,p2==p4?p2:')');\r\n }else{\r\n return new Interval(in1);\r\n }\r\n }else if (a<=d && b>d){\r\n if (a==d){\r\n if (p1=='[' && p4==']'){\r\n return new Interval(a,a,p1,p4);\r\n }else{\r\n return new Interval(0,0,'(',')');\r\n }\r\n }else{\r\n return new Interval(a,d,p1,p4);\r\n }\r\n }else{\r\n return new Interval(0,0,'(',')');\r\n }\r\n }", "public List<Interval> getUnionWithList(Interval i){\n\t\t\n\t\tList<Interval> unionList = new ArrayList<Interval>();\n\t\t\n\t\tif (isAdjacentTo(i)){\n\t\t\tunionList.add(new Interval(\n\t\t\t\t\t\tmin(leftbound, i.getLeftBound()),\n\t\t\t\t\t\tmax(rightbound, i.getRightBound())\n\t\t\t\t\t));\n\t\t}\n\t\telse{\n\t\t\tunionList.add(this);\n\t\t\tunionList.add(i);\n\t\t}\n\t\t\t\n\t\treturn unionList;\n\t\t\n\t}", "public List<Interval> insert(List<Interval> intervals, Interval newInterval) {\n List<Interval> res = new ArrayList<Interval>();\n\n for (Interval cur : intervals) {\n if (newInterval == null) {\n res.add(cur);\n continue;\n }\n if (cur.end < newInterval.start) {\n res.add(cur);\n continue;\n }\n if (cur.start > newInterval.end) {\n res.add(newInterval);\n newInterval = null;\n res.add(cur);\n continue;\n }\n\n newInterval.start = Math.min(newInterval.start, cur.start);\n newInterval.end = Math.max(newInterval.end, cur.end);\n }\n\n if (newInterval != null) res.add(newInterval);\n\n return res;\n }", "public static int[] merge(int[] arrLeft, int[] arrRight){\n int[] vals = new int[arrLeft.length + arrRight.length];\n int i = 0;\n int j = 0;\n while(i < arrLeft.length && j < arrRight.length){\n if(arrLeft[i] < arrRight[j]){\n vals[i+j] = arrLeft[i];\n i++;\n }else{\n vals[i+j] = arrRight[j];\n j++;\n }\n }\n while(i < arrLeft.length){\n vals[i+j] = arrLeft[i];\n i++;\n }\n while(j < arrRight.length){\n vals[i+j] = arrRight[j];\n j++;\n }\n return vals;\n\n}", "static int findOverlappingArea(int a[][], int b[][]){\n int startX,startY,endX,endY;\n if(a[0][0]>b[0][0]){\n startX = a[0][0];\n }else{\n startX = b[0][0];\n }\n \n if(a[0][1] > b[0][1]){\n startY = a[0][1];\n }else{\n startY = b[0][1];\n }\n \n /*Find minimum X and Y values from the top coordinates */\n \n if(a[1][0] < b[1][0]){\n endX = a[1][0];\n }else{\n endX = b[1][0];\n }\n \n if(a[1][1] < b[1][1]){\n endY = a[1][1];\n }else{\n endY = b[1][1];\n }\n \n return (endX-startX)*(endY-startY);\n }", "private static void mergeDesc(int arr[], int start,int mid, int end) {\n\r\n\t\t\t\tint subArrLen1 = mid - start + 1;\r\n\t\t\t\tint subArrLen2 = end - mid;\r\n\r\n\t\t\t\t// create the sub Arrays as temporary storage\r\n\t\t\t\tint subArray1[] = new int[subArrLen1];\r\n\t\t\t\tint subArray2[] = new int[subArrLen2];\r\n\r\n\t\t\t\t// copy data in temporary arrays\r\n\r\n\t\t\t\tfor (int i = 0; i < subArrLen1; i++) {\r\n\t\t\t\t\tsubArray1[i] = arr[start + i];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (int i = 0; i < subArrLen2; i++) {\r\n\t\t\t\t\tsubArray2[i] = arr[mid + i + 1];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// merging the temporary arrays\r\n\r\n\t\t\t\tint i = 0, j = 0;\r\n\t\t\t\tint k = start;\r\n\r\n\t\t\t\twhile (i < subArrLen1 && j < subArrLen2) {\r\n\t\t\t\t\tif (subArray1[i] > subArray2[j]) {\r\n\t\t\t\t\t\tarr[k] = subArray1[i];\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tarr[k] = subArray2[j];\r\n\t\t\t\t\t\tj++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tk++;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// copy left over elements of subArray2[]\r\n\t\t\t\twhile (i < subArrLen1) {\r\n\t\t\t\t\tarr[k] = subArray1[i];\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// copy left over elements of subArray2[]\r\n\t\t\t\twhile (j < subArrLen2) {\r\n\t\t\t\t\tarr[k] = subArray2[j];\r\n\t\t\t\t\tj++;\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\r\n\t}", "private static void merge(ArrayList<Score> items, int start, int mid, int end) {\r\n Object[] temp = new Object[items.size()];\r\n int pos1 = start;\r\n int pos2 = mid + 1;\r\n int spot = start;\r\n\r\n while (!(pos1 > mid && pos2 > end)) {\r\n if ((pos1 > mid) || ((pos2 <= end) && (items.get(pos2).compareTo(items.get(pos1)) < 0))) {\r\n temp[spot] = items.get(pos2);\r\n pos2 += 1;\r\n } else {\r\n temp[spot] = items.get(pos1);\r\n pos1 += 1;\r\n }\r\n spot += 1;\r\n }\r\n for (int i = start; i <= end; i++) {\r\n items.set(i, (Score) temp[i]);\r\n }\r\n }", "private static void mergeSort(int[] array, int startIndex, int endIndex) {\n if (startIndex < endIndex) {\n int halfIndex = (int) Math.floor((startIndex + endIndex) / 2);\n mergeSort(array, startIndex, halfIndex);\n mergeSort(array, halfIndex + 1, endIndex);\n mergeLogic(array, startIndex, halfIndex, endIndex);\n }\n }", "default boolean overlaps(Interval o) {\n return getEnd() > o.getStart() && o.getEnd() > getStart();\n }", "@Test\n public void isOverlap_interval1AfterInterval2_falseReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(-10,-3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(false));\n }", "private boolean hasOverlap(int[] i1, int[] i2)\n {\n // Special case of consecutive STEP-BY-STEP intervals\n if(i1[0] <= i2[0] && i2[0] <= i1[1])\n return true;\n if(i2[0] <= i1[0] && i1[0] <= i2[1])\n return true;\n return false;\n }", "public List<Interval> insert(List<Interval> intervals, Interval newInterval) {\n List<Interval> ans = new ArrayList<>();\n if (intervals == null || intervals.size() == 0) {\n ans.add(newInterval);\n return ans;\n }\n \n boolean isInserted = false;\n \n for (int i = 0; i < intervals.size(); i++) {\n Interval cur = intervals.get(i);\n if (newInterval.start > cur.end) {\n ans.add(cur);\n } else if (newInterval.end < cur.start) {\n if (!isInserted) {\n ans.add(newInterval);\n isInserted = true;\n }\n ans.add(cur);\n } else {\n i = helper(intervals, newInterval, i, ans);\n isInserted = true;\n }\n }\n \n if (!isInserted) {\n ans.add(newInterval);\n }\n return ans;\n }", "static void mergeSort(int array[], int start, int end) {\n if (start < end) {\n // Find the middle point\n int middle = start + (end - start)/2;\n\n // Sort first and second parts\n mergeSort(array, start, middle);\n mergeSort(array, middle + 1, end);\n\n // Merge the sorted parts\n merge(array, start, middle, end);\n\n }\n\n }", "@Test\n public void isOverlap_interval1ContainWithinInterval2_trueReturned() throws Exception{\n Interval interval1 = new Interval(-1,5);\n Interval interval2 = new Interval(0,3);\n\n boolean result = SUT.isOverlap(interval1,interval2);\n Assert.assertThat(result,is(true));\n }", "private static void merge(int[] nums, int low, int mid, int high) {\n int n1=mid-low+1;\n int n2=high-mid;\n int[] left=new int[n1];\n int[] right=new int[n2];\n for (int i = 0; i <n1 ; i++) {\n left[i]=nums[i+low];\n }\n for (int j = 0; j < n2; j++) {\n right[j]=nums[mid+1+j];\n }\n int k=low;\n int i=0,j=0;\n while (i< left.length && j< right.length){\n if(left[i]<right[j]){\n nums[k++]=left[i++];\n }\n else {\n nums[k++]=right[j++];\n }\n }\n //copy the remaining elements\n\n while (i<left.length){\n nums[k++]=left[i++];\n }\n while (j< right.length){\n nums[k++]=right[j++];\n }\n }", "public static void mergeSort(int[] array, int start, int end) {\n // start = 0\n // end = array.length\n // mid = (start + end) / 2\n\n // Base case: break recursion if there are less than 2 elements in the array - 1 or 0 elements\n if (end - start < 2) {\n return;\n }\n\n // Logical partition of the array\n int mid = (start + end) / 2;\n\n // Recursive calls\n mergeSort(array, start, mid); // mergeSort left partition\n mergeSort(array, mid, end); // mergeSort right partition\n\n // Finally merge the sorted arrays. \n // By the time this method is called, left and right partitions are already handled.\n merge(array, start, mid, end);\n }", "private boolean isOverlapping( int[] t0, int[] t1)\n {\n if ( t0.length == 1)\n {\n return t0[ 0] >= t1[ 0]; \n }\n else\n {\n return t0[ 1] >= t1[ 0]; \n }\n }", "public boolean overlaps(ReadableInterval interval) {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[11]++;\r\n long thisStart = getStartMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[12]++;\r\n long thisEnd = getEndMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[13]++;\nint CodeCoverConditionCoverageHelper_C4;\r\n if ((((((CodeCoverConditionCoverageHelper_C4 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C4 |= (2)) == 0 || true) &&\n ((interval == null) && \n ((CodeCoverConditionCoverageHelper_C4 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.conditionCounters[4].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C4, 1) || true)) || (CodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.conditionCounters[4].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C4, 1) && false)) {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.branches[7]++;\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[14]++;\r\n long now = DateTimeUtils.currentTimeMillis();\r\n return (thisStart < now && now < thisEnd);\n\r\n } else {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.branches[8]++;\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[15]++;\r\n long otherStart = interval.getStartMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[16]++;\r\n long otherEnd = interval.getEndMillis();\r\n return (thisStart < otherEnd && otherStart < thisEnd);\r\n }\r\n }", "public boolean hasNonEmptyIntersectionWith(Interval i){\n\t\t\n\t\tif (rightbound < i.leftbound)\n\t\t\treturn false;\n\t\t\n\t\tif (i.rightbound < leftbound)\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t\t\n\t}", "private static long merge(int start, int end, int mid) {\n\t\tfor(int i=start; i<=end; i++){\n\t\t\ttempArr[i] = numArr[i];\n\t\t}\n\t\t\t\n\t\tint i=start, j=mid+1, temp=start;\n\t\tlong cnt = 0L;\n\t\twhile(i <= mid && j <= end){\n\t\t\tif(tempArr[i] <= tempArr[j]){\n\t\t\t\tnumArr[temp++] = tempArr[i++];\n\t\t\t}else{\n\t\t\t\tnumArr[temp++] = tempArr[j++];\n\t\t\t\tcnt += (long)(mid+1-i);\n\t\t\t}\n\t\t}\n\t\t\n\t\twhile(i<=mid){\n\t\t\tnumArr[temp++] = tempArr[i++];\n\t\t}\n\t\twhile(j<=end){\n\t\t\tnumArr[temp++] = tempArr[j++];\n\t\t}\n\t\treturn cnt;\n\t}", "public void removeSubArray(int start , int end ){\n\n if( !this.checkIndex(start) ) { this.raiseException(start); }\n if( !this.checkIndex(end) ) { this.raiseException(end); }\n\n int intervalLength = end - start;\n for(int i = start ; i < this.array.length - intervalLength - 1 ; i++){\n this.array[i] = this.array[i+1+intervalLength];\n }\n Object newArray[] = new Object[ this.array.length - intervalLength - 1 ];\n for(int i = 0 ; i < this.array.length - intervalLength - 1; i++){\n newArray[i] = this.array[i];\n }\n this.array = newArray;\n }", "void merge(int arr[], int left, int mid, int right) {\n\t\tint n1 = mid - left + 1;\n\t\tint n2 = right - mid;\n\n\t\t/* Create temporary arrays */\n\t\tint leftArray[] = new int[n1];\n\t\tint rightArray[] = new int[n2];\n\n\t\t/* Copy data to temporary arrays */\n\t\tfor (int i = 0; i < n1; ++i)\n\t\t\tleftArray[i] = arr[left + i];\n\t\tfor (int j = 0; j < n2; ++j)\n\t\t\trightArray[j] = arr[mid + 1 + j];\n\n\t\t/* Merge the temporary arrays */\n\n\t\t// Initial indexes of first and second sub-arrays\n\t\tint i = 0, j = 0;\n\n\t\t// Initial index of merged sub-array array\n\t\tint k = left;\n\t\twhile (i < n1 && j < n2) {\n\t\t\tif (leftArray[i] >= rightArray[j]) {\n\t\t\t\tarr[k] = leftArray[i];\n\t\t\t\ti++;\n\t\t\t} else {\n\t\t\t\tarr[k] = rightArray[j];\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\n\t\t/* Copy remaining elements of L[] if any */\n\t\twhile (i < n1) {\n\t\t\tarr[k] = leftArray[i];\n\t\t\ti++;\n\t\t\tk++;\n\t\t}\n\n\t\t/* Copy remaining elements of R[] if any */\n\t\twhile (j < n2) {\n\t\t\tarr[k] = rightArray[j];\n\t\t\tj++;\n\t\t\tk++;\n\t\t}\n\t\t\n\t}", "private static <T extends Comparable<T>> void merge(T[] arrayToSort, int startIndex, int centerIndex, int endIndex) {\n List<T> left = new ArrayList<>(centerIndex - startIndex);\n List<T> right = new ArrayList<>(endIndex - centerIndex);\n for(int i = startIndex; i < centerIndex; i++)\n left.add(arrayToSort[i]);\n for(int i = centerIndex; i < endIndex; i++)\n right.add(arrayToSort[i]);\n int leftItr = 0;\n int rightItr = 0;\n for(int i = startIndex; i < endIndex; i++) {\n if(leftItr < left.size())\n if(rightItr < right.size())\n if(left.get(leftItr).compareTo(right.get(rightItr)) < 0)\n arrayToSort[i] = left.get(leftItr++);\n else\n arrayToSort[i] = right.get(rightItr++);\n else\n arrayToSort[i] = left.get(leftItr++);\n else\n arrayToSort[i] = right.get(rightItr++);\n }\n }", "private static void merge(int[] nums, int[] work, int start, int mid, int end){\n\t\tboolean loop = true;\n\t\tint counter1 = start;\n\t\tint counter2 = mid+1;\n\t\tint workCounter = start;\n\t\t\n\t\twhile(loop){\n\t\t\tif(counter1 > mid){\n\t\t\t\t// Copy all elements from 2nd end to work\n\t\t\t\tfor(int i=counter2; i<=end; i++)\n\t\t\t\t\twork[workCounter++] = nums[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif(counter2 > end){\n\t\t\t\t// Copy all elements from start-mid to work\n\t\t\t\tfor(int i=counter1; i<=mid; i++)\n\t\t\t\t\twork[workCounter++] = nums[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t// Swap the number if the numbers in are not is sorted order\n\t\t\tif(nums[counter1] < nums[counter2]){\n\t\t\t\twork[workCounter] = nums[counter1]; \n\t\t\t\tcounter1++;\n\t\t\t}else{\n\t\t\t\twork[workCounter] = nums[counter2]; \n\t\t\t\tcounter2++;\n\t\t\t}\n\t\t\t\n\t\t\tworkCounter++;\n\t\t}\n\t\t\n\t\t// Copy the sorted work array into main array\n\t\tfor(int i=start; i <= end; i++)\n\t\t\tnums[i] = work[i];\n\t}", "public static Interval union(Interval in1, Interval in2){\r\n if (Interval.intersection(in1, in2).isEmpty())\r\n return new Interval();\r\n double a = in1.getFirstExtreme();\r\n double b = in1.getSecondExtreme();\r\n double c = in2.getFirstExtreme();\r\n double d = in2.getSecondExtreme();\r\n double fe, se;\r\n char ai = in1.getFEincluded();\r\n char bi = in1.getSEincluded();\r\n char ci = in2.getFEincluded();\r\n char di = in2.getSEincluded();\r\n char fei, sei;\r\n if (a<c){\r\n fe = a;\r\n fei = ai;\r\n }\r\n else if (a>c){\r\n fe = c;\r\n fei = ci;\r\n }\r\n else{\r\n fe = a;\r\n fei = ai==ci?ai:'(';\r\n }\r\n if (d<b){\r\n se = b;\r\n sei = bi;\r\n }\r\n else if (d>b){\r\n se = d;\r\n sei = di;\r\n }\r\n else{\r\n se = b;\r\n sei = bi==di?bi:')';\r\n }\r\n return new Interval(fe,se,fei,sei);\r\n }", "private void mergeSubArr(int lowerIndex, int middle, int higherIndex) {\n \t\n \tArrayList tempMergArr = new ArrayList();\n \t\n \t\n \tfor (int i = 0; i < lowerIndex; i++){\n \t\ttempMergArr.add(i, 0);\n \t} \t\n \t\n for (int i = lowerIndex; i <= higherIndex; i++) {\n tempMergArr.add(i, (int)unsorted.get(i));\n }\n \n int i = lowerIndex;\n int j = middle + 1;\n int l = lowerIndex;\n while (i <= middle && j <= higherIndex) {\n if ((int)tempMergArr.get(i) <= (int)tempMergArr.get(j)) {\n unsorted.set(l, tempMergArr.get(i));\n i++;\n } else {\n unsorted.set(l, tempMergArr.get(j));\n j++;\n }\n l++;\n }\n while (i <= middle) {\n unsorted.set(l, tempMergArr.get(i));\n l++;\n i++;\n }\n while (j <= middle) {\n \tunsorted.set(l, tempMergArr.get(j));\n \tl++;\n \ti++;\n }\n\n \n }", "public static void merge(Integer[] gArray, int low, int mid1, int mid2, int high, Integer[] destArray) {\n\t\tint i = low, j = mid1, k = mid2, l = low;\n// escoje el más pequeño de los más pequeños en los\n//tres rangos\n\t\twhile ((i < mid1) && (j < mid2) && (k < high)) {\n\t\t\tif (gArray[i].compareTo(gArray[j]) < 0) {\n\t\t\t\tif (gArray[i].compareTo(gArray[k]) < 0) {\n\t\t\t\t\tdestArray[l++] = gArray[i++];\n\t\t\t\t} else {\n\t\t\t\t\tdestArray[l++] = gArray[k++];\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tif (gArray[j].compareTo(gArray[k]) < 0) {\n\t\t\t\t\tdestArray[l++] = gArray[j++];\n\t\t\t\t} else {\n\t\t\t\t\tdestArray[l++] = gArray[k++];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twhile ((i < mid1) && (j < mid2)) {\n\t\t\tif (gArray[i].compareTo(gArray[j]) < 0) {\n\t\t\t\tdestArray[l++] = gArray[i++];\n\t\t\t} else {\n\t\t\t\tdestArray[l++] = gArray[j++];\n\t\t\t}\n\t\t}\n\t\twhile ((j < mid2) && (k < high)) {\n\t\t\tif (gArray[j].compareTo(gArray[k]) < 0) {\n\t\t\t\tdestArray[l++] = gArray[j++];\n\t\t\t} else {\n\t\t\t\tdestArray[l++] = gArray[k++];\n\t\t\t}\n\t\t}\n\t\twhile ((i < mid1) && (k < high)) {\n\t\t\tif (gArray[i].compareTo(gArray[k]) < 0) {\n\t\t\t\tdestArray[l++] = gArray[i++];\n\t\t\t} else {\n\t\t\t\tdestArray[l++] = gArray[k++];\n\t\t\t}\n\t\t}\n\t\twhile (i < mid1) {\n\t\t\tdestArray[l++] = gArray[i++];\n\t\t}\n\t\twhile (j < mid2) {\n\t\t\tdestArray[l++] = gArray[j++];\n\t\t}\n\t\twhile (k < high) {\n\t\t\tdestArray[l++] = gArray[k++];\n\t\t}\n\t}", "private void merge(Comparable[] a, int min, int mid, int max){\n for(int t = min; t <= max;t++){\n aux[t] = a[t];\n }\n \n int i = min; // start index for left side\n int j = mid + 1; // start index for right side\n \n for(int k = min; k <= max; k++){\n if(i > mid){\n a[k] = aux[j++];\n }\n else if(j > max){\n a[k] = aux[i++];\n }\n else if(aux[i].compareTo(aux[j]) < 0 ){\n a[k] = aux[i++];\n }\n else {\n a[k] = aux[j++];\n }\n }\n }", "private int[] merge(int[] left, int[] right) {\r\n\t\tint[] merged = new int[(left.length + right.length)];\r\n\r\n\t\t// l -> arrL index and r -> arrR index\r\n\t\tint l = 0, r = 0;\r\n\t\tfor (int i = 0; i < merged.length; i++) {\r\n\r\n\t\t\tif (l >= left.length) {\r\n\t\t\t\tmerged[i] = right[r++];\r\n\t\t\t} \r\n\t\t\telse if (r >= right.length) {\r\n\t\t\t\tmerged[i] = left[l++];\r\n\t\t\t}\r\n\t\t\telse if (left[l] >= right[r]) {\r\n\t\t\t\t// The total inversions will always be left.length - l\r\n\t\t\t\tcounter += (left.length - l);\r\n\t\t\t\tmerged[i] = right[r++];\r\n\t\t\t}\r\n\t\t\telse if (left[l] < right[r]) {\r\n\t\t\t\tmerged[i] = left[l++];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn merged;\r\n\t}", "public int minMeetingRooms(Interval[] intervals) {\n int result = 0;\n if(intervals.length <2){\n return intervals.length;\n }\n Arrays.sort(intervals, new MyCustomComparator());\n\n PriorityQueue<Integer> minHeap = new PriorityQueue();\n\n for(int i=0; i<intervals.length;i++){\n if(!minHeap.isEmpty()){\n if(minHeap.peek() <= intervals[i].start){\n minHeap.remove();\n }\n }\n minHeap.add(intervals[i].end);\n }\n\n return minHeap.size();\n\n }", "public static void mergeSort(int start, int end, int[] numbers) {\n int mid = (start + end) / 2;\n\n if (start < end) {\n // sort left half\n mergeSort(start, mid, numbers);\n\n // sort right half\n mergeSort(mid + 1, end, numbers);\n\n // merge\n merge(start, mid, end, numbers);\n }\n }", "@Test\n public void findOverlap() {\n\n int[] A = new int[] {1,3,5,7,10};\n int[] B = new int[] {-2,2,5,6,7,11};\n\n List<Integer> overlap = new ArrayList<Integer>();\n overlap.add(5);\n overlap.add(7);\n\n Assert.assertEquals(overlap,Computation.findOverlap(A,B));\n\n }", "private static HashMap<Integer, ArrayList<String>> checkAndMergeIntersectedPoints(HashMap<Integer, ArrayList<String>> boundedRegionPointsMap) {\n\n\t\t// Iterate over regions one by one, to validate with rest of the regions iteratively.\n\t for(Integer key1 : boundedRegionPointsMap.keySet()) {\n\t ArrayList<String> list1 = boundedRegionPointsMap.get(key1);\n\n\t for (Integer key2 : boundedRegionPointsMap.keySet()) {\n\t \t// Only need to check for keys (region counters) incrementally\n\t if (key1 < key2) {\n\t ArrayList<String> list2 = boundedRegionPointsMap.get(key2);\n\t for(String point : list2) {\n\t \t// If there is an intersecting point in two regions, merge them.\n\t if (list1.contains(point)) {\n\t list1.addAll(list2);\n\t // Just to make sure there won't be any duplicate points introduced after the merge.\n\t Set<String> uniquePoints = new HashSet<String>(list1);\n\t boundedRegionPointsMap.put(key1, new ArrayList<String>(uniquePoints));\n\t break;\n\t }\n\t }\n\t }\n\t }\n\n\t }\n\t return boundedRegionPointsMap;\n\t}", "private void mergeHalves(int[] array, int[] temp, int leftStart, int rightEnd){\r\n int leftEnd = (rightEnd + leftStart)/2;\r\n int rightStart = leftEnd + 1;\r\n int size = rightEnd - leftStart + 1;\r\n\r\n int left = leftStart;\r\n int right = rightStart;\r\n int index = leftStart;\r\n\r\n while(left <= leftEnd && right <= rightEnd){\r\n if(array[left] <= array[right]){\r\n temp[index] = array[left];\r\n left++;\r\n }else {\r\n temp[index] = array[right];\r\n right++;\r\n }\r\n index++;\r\n }\r\n System.arraycopy(array, left, temp, index, leftEnd - left + 1);\r\n System.arraycopy(array, right, temp, index, rightEnd - right + 1);\r\n System.arraycopy(temp, leftStart, array, leftStart, size);\r\n }", "public SequenceRegion interval(Sequence start, Sequence stop) {\n\t/* Ravi thingToDo. */\n\t/* use a single constructor */\n\t/* Performance */\n\treturn (SequenceRegion) ((above(start, true)).intersect((below(stop, false))));\n/*\nudanax-top.st:15693:SequenceSpace methodsFor: 'making'!\n{SequenceRegion CLIENT} interval: start {Sequence} with: stop {Sequence}\n\t\"Return a region of all sequence >= lower and < upper.\"\n\t\n\t\"Ravi thingToDo.\" \"use a single constructor\" \"Performance\"\n\t^((self above: start with: true)\n\t\tintersect: (self below: stop with: false)) cast: SequenceRegion!\n*/\n}", "private static boolean areOverlapping( int a[], int sz, int pos, int len )\n {\n \tfor( int i=0; i<sz; i++ ){\n \t if( areOverlapping( a[i], pos, len ) ){\n \t\treturn true;\n \t }\n \t}\n \treturn false;\n }", "public static List<MissingDataInterval> getMissingRanges(TreeMap<LocalDateTime, Consumption> data, int interval) {\n return getMissingRanges(data, data.firstKey(), data.lastKey(), interval);\n }", "public int[] intersection(int[] nums1, int[] nums2) {\n \n HashSet<Integer> set = new HashSet<>();\n ArrayList<Integer> inter = new ArrayList<>();\n if(nums1.length > nums2.length)\n {\n for(int i = 0; i < nums1.length ;i ++)\n set.add(nums1[i]);\n\n for(int i = 0; i < nums2.length ;i ++)\n if(set.contains(nums2[i])&& !inter.contains(nums2[i]))\n inter.add(nums2[i]);\n }\n else {\n for(int i = 0; i < nums2.length ;i ++)\n set.add(nums2[i]);\n\n for(int i = 0; i < nums1.length ;i ++)\n if(set.contains(nums1[i]) && !inter.contains(nums1[i]))\n inter.add(nums1[i]);\n }\n\n int [] arr = new int[inter.size()];\n for(int i = 0; i < arr.length ;i ++)\n arr[i] = inter.get(i);\n return arr;\n\n }" ]
[ "0.8236036", "0.737395", "0.7328234", "0.70402646", "0.6985984", "0.6977622", "0.6909851", "0.6896205", "0.6684476", "0.66673803", "0.6638057", "0.6470285", "0.6469528", "0.6392692", "0.63627136", "0.631212", "0.6220329", "0.61828935", "0.60445064", "0.6025827", "0.5934553", "0.59007466", "0.58762825", "0.5872478", "0.58114624", "0.57872796", "0.5782183", "0.5780501", "0.57753915", "0.5741263", "0.5706799", "0.5676066", "0.5669326", "0.56360495", "0.56322384", "0.56194025", "0.5603403", "0.55914307", "0.5586809", "0.5575563", "0.5552826", "0.5546315", "0.5546165", "0.55125326", "0.55080277", "0.54971206", "0.5490803", "0.5490363", "0.54886085", "0.5456309", "0.5438309", "0.5401814", "0.5395464", "0.53783584", "0.5350823", "0.5341385", "0.5335577", "0.5323107", "0.53116786", "0.530733", "0.5300504", "0.5299726", "0.52666867", "0.5266262", "0.52653724", "0.5261812", "0.5253654", "0.52494466", "0.52487695", "0.5247402", "0.5238273", "0.52175164", "0.5213605", "0.52079785", "0.5201298", "0.5180773", "0.51802826", "0.51791877", "0.5174219", "0.51704085", "0.5169123", "0.5165447", "0.5137278", "0.5136646", "0.51345366", "0.5127537", "0.51015437", "0.50921047", "0.50801533", "0.50704825", "0.50684416", "0.5036111", "0.50152904", "0.50100386", "0.50039464", "0.49867517", "0.49858987", "0.4934318", "0.49050185", "0.49023724" ]
0.7264474
3
PUnsubscrib = Pattern unSubscribe
@Override public void onPUnsubscribe(String pattern, int subscribedChannels) { log.debug("====== onPUnsubscribe(): pattern = {}, subscribedChannels = {}", pattern, subscribedChannels); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void unsubscribe(){}", "void unsubscribe();", "private void unsubscribe() {\n subscriber=null;\n }", "void unsubscribe(Subscription subscription);", "@Override\n\tpublic void onPUnsubscribe(String arg0, int arg1) {\n\t\t\n\t}", "public void onUnsubscribe() {\n\n }", "@Override\n\tpublic void onUnsubscribe(String arg0, int arg1) {\n\t\t\n\t}", "void unsubscribeAll();", "@Override\n public void onPUnsubscribe(String s, int i) {\n }", "void unsubscribe(Player player);", "@Override\n\tpublic void unsubscribe(Strategy strategy) {\n\t\t\n\t}", "@Override\n public void unsubscribe(ISubscriber subscriber) {\n subscribers.remove(subscriber);\n }", "@Override\n public void onUnsubscribe(String s, int i) {\n }", "void unsubscribe(String id);", "void unsubscribe(Player player, boolean fast);", "@Override\n public void unregister(Object subscriber) {\n }", "void unpublish() {\n pendingOps.decrementAndGet();\n }", "private void doUnsubscribe(IoSession session, MessageProtocol request) throws Exception {\n \t\n \tdoExit(session);\n }", "@Override\r\n public void unsubscribe() {\n t.interrupt();\r\n }", "private void unsubscribeHandler(MqttUnsubscribeMessage unsubscribe) {\n\n final int messageId = unsubscribe.messageId();\n LOG.info(\"UNSUBSCRIBE [{}] from MQTT client {}\", messageId, this.mqttEndpoint.clientIdentifier());\n\n // sending AMQP_UNSUBSCRIBE\n\n AmqpUnsubscribeMessage amqpUnsubscribeMessage =\n new AmqpUnsubscribeMessage(this.mqttEndpoint.clientIdentifier(), unsubscribe.topics());\n\n this.ssEndpoint.sendUnsubscribe(amqpUnsubscribeMessage, done -> {\n\n if (done.succeeded()) {\n\n this.mqttEndpoint.unsubscribeAcknowledge(messageId);\n\n // removing topics from local collection\n unsubscribe.topics().stream().forEach(topic -> {\n\n this.grantedQoSLevels.remove(topic);\n });\n\n LOG.info(\"UNSUBACK [{}] to MQTT client {}\", messageId, this.mqttEndpoint.clientIdentifier());\n }\n });\n }", "private void genericUnsubscribeFactory(String request, BandInfo band) {\n if (bandStreams.containsKey(band) && bandStreams.get(band).contains(request)) {\n if (bandStreams.get(band).size() == 1) {\n // Only stream open for this band, remove from bandStreams\n bandStreams.remove(band);\n } else {\n // Other streams open, remove from list\n bandStreams.get(band).remove(request);\n }\n\n // Remove stream from preferences\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n Set<String> streams = prefs.getStringSet(Preferences.getDeviceKey(band.getMacAddress()), new HashSet<String>());\n if (streams.contains(request)) {\n Log.v(TAG, \"Removing stream \" + request);\n streams.remove(request);\n Log.v(TAG, \"Streams after removing \" + request + \": \" + streams);\n prefs.edit().putStringSet(Preferences.getDeviceKey(band.getMacAddress()), streams).apply();\n }\n\n // Unsubscribe from the appropriate stream\n switch (request) {\n case ACCEL_REQ_EXTRA:\n if (accManager != null)\n accManager.unSubscribe(band);\n break;\n case ALT_REQ_EXTRA:\n if (altManager != null)\n altManager.unSubscribe(band);\n break;\n case AMBIENT_REQ_EXTRA:\n if (ambManager != null)\n ambManager.unSubscribe(band);\n break;\n case BAROMETER_REQ_EXTRA:\n if (barometerManager != null)\n barometerManager.unSubscribe(band);\n break;\n case CALORIES_REQ_EXTRA:\n if (calManager != null)\n calManager.unSubscribe(band);\n break;\n case CONTACT_REQ_EXTRA:\n if (conManager != null)\n conManager.unSubscribe(band);\n break;\n case DISTANCE_REQ_EXTRA:\n if (distManager != null)\n distManager.unSubscribe(band);\n break;\n case GSR_REQ_EXTRA:\n if (gsrManager != null)\n gsrManager.unSubscribe(band);\n break;\n case GYRO_REQ_EXTRA:\n if (gyroManager != null)\n gyroManager.unSubscribe(band);\n break;\n case HEART_RATE_REQ_EXTRA:\n if (heartManager != null)\n heartManager.unSubscribe(band);\n break;\n case PEDOMETER_REQ_EXTRA:\n if (pedoManager != null)\n pedoManager.unSubscribe(band);\n break;\n case SKIN_TEMP_REQ_EXTRA:\n if (skinTempManager != null)\n skinTempManager.unSubscribe(band);\n break;\n case UV_REQ_EXTRA:\n if (uvManager != null)\n uvManager.unSubscribe(band);\n break;\n default:\n Log.e(TAG, \"Unknown subscription requested \" + request);\n }\n } else {\n if (!bandStreams.containsKey(band)) {\n Log.e(TAG, \"Error: unsubscribe request for a band that isnt stored\");\n Log.v(TAG, \"Band: \" + band.toString());\n for (BandInfo info :\n bandStreams.keySet()) {\n Log.v(TAG, \"Key: \" + info.toString());\n }\n } else {\n if (!bandStreams.get(band).contains(request)) {\n Log.e(TAG, \"Error: unsubscribe request for unregistered request\");\n }\n }\n }\n }", "private void unsubscribe() {\n Log.i(TAG, \"Unsubscribing.\");\n Nearby.Messages.unsubscribe(mGoogleApiClient, mMessageListener);\n }", "public void unsubscribeSwitchState() {\n\t\t\n\t}", "@Override\n public void rxUnsubscribe() {\n if (placesSubscriber != null) {\n if (!placesSubscriber.isDisposed()) {\n placesSubscriber.dispose();\n }\n }\n }", "@Override\n public void onUnsubscribe(String channel, int subscribedChannels) {\n super.onUnsubscribe(channel, subscribedChannels);\n System.out.println(\"Channel unsubscribed at : \" + channel);\n }", "void unsetSubject();", "public abstract void unsubscribeImpl(String str, Resolver<Void> resolver);", "public void unsubscribe(ClientAddress address, ChannelAddress channelAddress);", "public interface aps {\n boolean isUnsubscribed();\n\n void unsubscribe();\n}", "public void unsubscribe(String inOutMethod) {\r\n unsubscribe(inOutMethod, inOutMethod, (Class<?>[]) null);\r\n }", "static void confirmUnSubscribe_C(Messenger messenger, Response_e response)\n {\n sendToClient( messenger, Request_e.Request_UnSubscribe_Event_C_en.valueOf(), response, null );\n }", "void unsubscribe(LogListener listener);", "public void unsubscribe() {\r\n new Thread(new Runnable() {\r\n public void run() {\r\n int attempts = 0;\r\n while(++attempts < 20) {\r\n try {\r\n if (server.removeSubscriber(PubSubAgent.this.agentID)) {\r\n subscriberKeywords.clear();\r\n subscriberTopics.clear();\r\n }\r\n System.out.print(\"Unsubscribed from all Topics.\");\r\n return;\r\n } catch(RemoteException e) {\r\n System.err.println(\"Could not connect to server. Retrying...\");\r\n try {\r\n Thread.sleep(800);\r\n } catch(Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }\r\n System.err.println(\"Couldn't Unsubscribe from all the topics...\");\r\n }\r\n }).start();\r\n }", "void subscribe();", "@Test\n public void subscribe_unsubscribe() {\n String channelName = \"subscribe_unsubscribe_\" + testParams.name;\n AblyRealtime ably = null;\n try {\n ClientOptions opts = createOptions(testVars.keys[0].keyStr);\n ably = new AblyRealtime(opts);\n\n /* create a channel and attach */\n final Channel channel = ably.channels.get(channelName);\n channel.attach();\n (new ChannelWaiter(channel)).waitFor(ChannelState.attached);\n assertEquals(\"Verify attached state reached\", channel.state, ChannelState.attached);\n\n /* subscribe */\n MessageListener testListener = new MessageListener() {\n @Override\n public void onMessage(Message message) {\n }};\n channel.subscribe(\"test_event\", testListener);\n /* unsubscribe */\n channel.unsubscribe(\"test_event\", testListener);\n } catch (AblyException e) {\n e.printStackTrace();\n fail(\"init0: Unexpected exception instantiating library\");\n } finally {\n if(ably != null)\n ably.close();\n }\n }", "public interface IBasePresenter {\n void unSubscribe();\n}", "void wipeSubscriptions(String sessionID);", "@Override\n\t\tpublic void onUserListUnsubscription(User arg0, User arg1, UserList arg2) {\n\t\t\t\n\t\t}", "@Override\n public void unpin(IObserver observer) {\n listeners.remove(observer);\n }", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable p1) {\n\t\t\t\t\t}", "@Override\n\tpublic void onUserListUnsubscription(User subscriber, User listOwner, UserList list) {\n\n\t}", "protected void processUnsubscribe(IoSession session, String clientID, List<String> topics, int messageID) {\n LOG.debug(\"processSubscribe invoked\");\n \n for (String topic : topics) {\n subscriptions.removeSubscription(topic, clientID);\n }\n //ack the client\n UnsubAckMessage ackMessage = new UnsubAckMessage();\n ackMessage.setMessageID(messageID);\n \n LOG.info(\"replying with UnsubAck to MSG ID {0}\", messageID);\n session.write(ackMessage);\n }", "public void unregister(Object aSubscriber)\r\n\t{\r\n\t\tfinal Iterator<SubscriberInfo> lIter = this.subscriberInfos.iterator();\r\n\t\twhile (lIter.hasNext())\r\n\t\t{\r\n\t\t\tfinal SubscriberInfo lInfo = lIter.next();\r\n\t\t\tif (lInfo.isGarbage() || lInfo.isForSpecifiedSubscriber(aSubscriber))\r\n\t\t\t{\r\n\t\t\t\tlIter.remove();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void onPsubscribe(String pattern, int no);", "@Override\n\tpublic void onUnSubscribeLobbyDone(LobbyEvent arg0) {\n\t\tMain.log(getClass(), \"onUnSubscribeLobbyDone\");\n\t}", "protected abstract void unregisterObserver();", "private void unsubscribeAll(MicroService m){\n\t\tConcurrentLinkedQueue<Class> queue=microToEvent.get(m);\n\t\tif(queue!=null)\n\t\tfor(Class cla:queue){\n\t\t\tif(Broadcast.class.isAssignableFrom(cla)){\t\t// checks if broadcast is super/interface of cla (meaning cla implements/extends broadcast)\n\t\t\t\t\tbroadcastToMicroServices.get(cla).remove(m);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\teventToMicroHandlers.get(cla).remove(m);\n\t\t\t}\n\t\t}\n\t}", "public void unsubscribe(String topic, String inboundPortUri) {\n\n\t}", "public org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeServiceResponse unSubscribeService(org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeServiceRequest parameters) {\n throw new UnsupportedOperationException(\"Not implemented yet.\");\r\n }", "void clearSubscriber() {\n if (!(subscriber instanceof AbortingSubscriber)) {\n subscriber = NeverInvokedSubscriber.get();\n }\n }", "public void streamSubscriberClose(ISubscriberStream stream);", "private void removeSubscriber(Function<? super E, Subscription> subscriber) {\n int index = -1;\n int i = 0;\n Iterator<Function<? super E, Subscription>> iter = subscribers.iterator();\n while (iter.hasNext() && index == -1) {\n Function<? super E, Subscription> s = iter.next();\n if (s == subscriber) {\n iter.remove();\n index = i;\n } else {\n i++;\n }\n }\n\n final int finalIndex = index;\n List<E> keys = new ArrayList<>(map.keySet());\n\n // if this subscriber is being removed, we no longer need to store\n // its corresponding subscription. Thus, it can be removed and unsubscribed\n keys.forEach(key -> map.get(key).remove(finalIndex).unsubscribe());\n }", "default void unsubscribe()\n throws TopicReceiverException\n {\n try {\n close();\n } catch ( Exception e ) {\n throw new TopicReceiverException(getTopic(), e);\n }\n }", "public void Unsubscribe(Integer busLineID, final ConfigurationActivity configurationActivity) { //unsubscribe antoistoixi gia ena buslineid\n subscribedLists.remove(busLineID);\n Client client = subscribedThreads.get(busLineID);\n\n Message message = MapsActivity.mainHandler.obtainMessage();\n message.what = 6;\n message.obj = busLineID;\n MapsActivity.mainHandler.sendMessage(message);\n\n configurationActivity.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n configurationActivity.updateGUI();\n }\n });\n\n Socket socket = subscribedSockets.get(busLineID);\n try {\n socket.close();\n } catch (IOException e) {\n }\n }", "public void unregister(Object subscriber)\n\t{\n\t\ttry\n\t\t{\n\t\t\tm_bus.unregister(subscriber);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tLog.e(TAG, \"Error in unregister: \" + e.getMessage());\n\t\t}\n\t}", "private static void removeObservingPattern(String pattern, SessionState state)\n\t{\n//\t\t// get the observer and remove the pattern\n//\t\tContentObservingCourier o = (ContentObservingCourier) state.getAttribute(STATE_OBSERVER);\n//\t\to.removeResourcePattern(ContentHostingService.getReference(pattern));\n//\n//\t\t// add it back to state\n//\t\tstate.setAttribute(STATE_OBSERVER, o);\n\n\t}", "@Test\n public void unregister() {\n BaseEventBus eventBus = new SynchronousEventBus(LOG);\n\n Object object1 = new Object() {\n @Subscriber\n public void onIntEvent(Integer event) {\n LOG.debug(\"handled event: {}\", event);\n }\n };\n\n Object object2 = new Object() {\n @Subscriber\n public void onStringEvent(String event) {\n LOG.debug(\"handled event: {}\", event);\n }\n };\n\n eventBus.register(object1);\n eventBus.register(object2);\n assertThat(eventBus.objectSubscriberMethods.size(), is(2));\n assertThat(eventBus.eventTypeToSubscriberMethods.size(), is(2));\n assertThat(eventBus.eventTypeToSubscriberMethods.get(String.class).size(), is(1));\n assertThat(eventBus.eventTypeToSubscriberMethods.get(Integer.class).size(), is(1));\n\n eventBus.unregister(object2);\n assertThat(eventBus.objectSubscriberMethods.size(), is(1));\n assertThat(eventBus.eventTypeToSubscriberMethods.size(), is(1));\n assertThat(eventBus.eventTypeToSubscriberMethods.containsKey(String.class), is(false));\n assertThat(eventBus.eventTypeToSubscriberMethods.get(Integer.class).size(), is(1));\n\n eventBus.unregister(object1);\n assertThat(eventBus.objectSubscriberMethods.size(), is(0));\n assertThat(eventBus.eventTypeToSubscriberMethods.size(), is(0));\n }", "private void unpublish() {\n Log.i(TAG, \"Unpublishing.\");\n Nearby.Messages.unpublish(mGoogleApiClient, mPubMessage);\n }", "@Override\n public void onSubscribe(Disposable d) {\n }", "public void unsubscribe(Player spectator) {\r\n\t\tspectators.remove(spectator);\r\n\t}", "@Override\n public void unsubscribe(Entity e) {\n unsub_queue.add(e);\n }", "void unsetExchange();", "@SneakyThrows\n private void unsubscribe(String name) {\n call(\"unsubscribe\", new Subscription(name)).toFuture().get(UNSUBSCRIBE_DELAY_S, TimeUnit.SECONDS);\n }", "@Override\n\t\t\tpublic void onSubscribe(Disposable arg0) {\n\t\t\t\t\n\t\t\t}", "public org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeProductResponse unSubscribeProduct(org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeProductRequest parameters) {\n throw new UnsupportedOperationException(\"Not implemented yet.\");\r\n }", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "public void unregister(Observer obj);", "public void unregisterNotify( Notify notify );", "private void doUnsubscribe(JSONArray args, CallbackContext callbackContext,\n\t\t\tMqttAndroidClient client) throws JSONException {\n\t\tString topicFilter = args.getString(1);\n\t\tfinal JSONObject invocationContext = args.optJSONObject(2);\n\t\ttry {\n\t\t\tclient.unsubscribe(topicFilter, null,\n\t\t\t\t\tnew GeneralCallback(invocationContext, callbackContext));\n\t\t\n\t\t} catch (MqttException exception) {\n\t\t\tcallbackContext.error(createError(exception, invocationContext));\n\t\t}\n\t}", "void delete(UnsubscribeRequest request, ResultCapture<Void> extractor);", "protected EventSink doUnplug(EventSink sink)\r\n\t{\n\t\tEventProcessor proc = sink.getProcessor();\r\n\t\tsink = (EventSink)proc;\r\n\t\t\r\n\t\t// deactivate, destroy and deregister the sink\r\n\t\tsink.passivate();\r\n\t\tsink.exit();\r\n\t\tbroker.deregisterSink(sink);\r\n\t\t\r\n\t\treturn sink;\r\n\t}", "public void onSubscribe() {\n\n }", "public void removeSubscriptions(String removeSub){\n\t subscriptions.remove(removeSub);\n\t}", "@Override\n\tpublic void onPSubscribe(String arg0, int arg1) {\n\t\t\n\t}", "void delete(UnsubscribeRequest request);", "public void unsubscribe(IMouseListener l)\n {\n // ADD new listener to the listeners list:\n _listeners.remove(l);\n }", "void unDo();", "public void unsubscribe(final Topic topic) {\r\n\r\n new Thread(new Runnable() {\r\n public void run() {\r\n int attempts = 0;\r\n while(++attempts < 20) {\r\n try {\r\n if (server.removeSubscriber(PubSubAgent.this.agentID, topic))\r\n subscriberTopics.remove(topic);\r\n System.out.println(\"Unsubscribed from the Topic: \" + topic.getTopicID() + \" - \" + topic.getTopicName());\r\n return;\r\n } catch(RemoteException e) {\r\n System.err.println(\"Could not connect to server. Retrying...\");\r\n try {\r\n Thread.sleep(800);\r\n } catch(Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }\r\n System.err.println(\"Couldn't Unsubscribe from \" + topic.getTopicID() + \" - \" + topic.getTopicName());\r\n }\r\n }).start();\r\n }", "void unRegister(NotificationListener<ObservableIntentServiceNotificationType> notificationStrategy);", "default void subscribe(Subscriber<? super Void> s) {\n\t\tOperators.complete(s);\n\t}", "void unpublish(List<String> uuids) throws GWTJahiaServiceException;", "public void unsubscribeAll() {\n \t\tint failCount = 0;\n \t\t// Make a copy of the collection because it will be modified in #unsubscribe()\n \t\tSet<String> removal = new HashSet<String>(subscriptions.keySet());\n \t\tfor (String subscriptionID : removal) {\n \t\t\tunsubscribe(subscriptionID);\n \t\t}\n \t\tif (failCount > 0) {\n \t\t\tlogger.warn(\n \t\t\t\t\t\"Problem while unsubcribing from all subscriptions: \"\n \t\t\t\t\t\t\t+ failCount\n \t\t\t\t\t\t\t+ \" unsubscriptions failed at DSB endpoint '\"\n \t\t\t\t\t\t\t+ subscriptionsTarget.getUri() + \"'\");\n \t\t} else {\n \t\t\tlogger.info(\n \t\t\t\t\t\"Successfully unsubcribed from all subscriptions at DSB endpoint '\"\n \t\t\t\t\t\t\t+ subscriptionsTarget.getUri() + \"'\");\n \t\t}\n \t}", "public abstract void unregister();", "public void removeOrDisconnectClient(String mqttClientChannelID, String unSubscribedTopic, String username,\n SubscriptionEvent action) throws MQTTException {\n\n log.info(\"Disconnecting channel for clientID: \" + mqttClientChannelID);\n\n Collection<MQTTSubscription> topicSubscriptionList;\n MQTTopics mqtTopics = topicSubscriptions.get(mqttClientChannelID);\n\n if (null != mqtTopics) {\n if (null == unSubscribedTopic) {\n //this means we need to remove all subscriptions relevant for the channel\n topicSubscriptionList = mqtTopics.getAllSubscriptionsForChannel();\n } else {\n topicSubscriptionList = new ArrayList<>();\n topicSubscriptionList.add(mqtTopics.getSubscription(unSubscribedTopic));\n }\n\n for (MQTTSubscription subscription : topicSubscriptionList) {\n //Will get the topic name bound for subscription\n String topic = subscription.getTopicName();\n //Will remove the subscriber off the list\n mqtTopics.removeSubscriber(topic);\n String subscriberChannelID = subscription.getSubscriberChannelID();\n UUID subscriberChannel = subscription.getSubscriptionChannel();\n boolean isCleanSession = subscription.isCleanSession();\n QOSLevel qos = subscription.getQOSLevel();\n //The corresponding subscription created cluster wide will be topic name and the local channel id\n //Will remove the subscriber cluster wide\n try {\n //Will indicate the disconnection of the topic\n if (action == SubscriptionEvent.DISCONNECT && MQTTUtils.isDurable(isCleanSession, qos.getValue())) {\n connector.disconnectSubscriber(this, topic, username, subscriberChannelID, subscriberChannel,\n isCleanSession, mqttClientChannelID, qos);\n } else {\n //If un-subscribed we need to remove the subscription off\n connector.removeSubscriber(this, topic, username, subscriberChannelID, subscriberChannel,\n isCleanSession, mqttClientChannelID, qos);\n }\n if (log.isDebugEnabled()) {\n final String message = \"Subscription with cluster id \" + subscriberChannelID + \" disconnected \" +\n \"from topic \" + topic;\n log.debug(message);\n }\n\n } catch (MQTTException ex) {\n //Should re state the connection of the subscriber back to the map\n mqtTopics.addSubscriber(unSubscribedTopic, subscription);\n final String error = \"Error occurred while removing the subscription \" + mqttClientChannelID;\n log.error(error, ex);\n throw ex;\n }\n }\n\n //Finally will check if there're any relevant subscriptions for the topic\n //If there arn't we could remove the entry\n if(mqtTopics.getAllSubscriptionsForChannel().isEmpty()){\n topicSubscriptions.remove(mqttClientChannelID);\n }\n } else {\n //If the connection is publisher based\n UUID publisherID = connector.removePublisher(mqttClientChannelID);\n if (null == publisherID) {\n log.warn(\"A subscriber or a publisher with Connection with id \" + mqttClientChannelID + \" cannot be \" +\n \"found to disconnect.\");\n }\n }\n }", "@Override\n public void unsubscribe(final Set<ValueSpecification> valueSpecifications) {\n LOGGER.debug(\"Unsubscribed from {}\", valueSpecifications);\n }", "public void removeTopicDurableSubscriber(String name)\n {\n topicDurableSubscriberMap.remove(name);\n }", "void disposeObservable();", "@Override\n\tpublic void unregister(Subscriber m) {\n\t\t\tif (subscribersMessages.containsKey(m) == false) {\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\t}\n\t\t\tfor (Message message : subscribersMessages.get(m)) {\n\t\t\t\tsubscribersMessages.get(m).remove(message);\n\t\t\t\tresults.get(message).resolve(null);\n\n\t\t\t}\n\t\t\tsubscribersMessages.remove(m);\n\n\t\tIterator it=typesQueue.entrySet().iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tMap.Entry set=(Map.Entry) it.next();\n\t\t\tfor(Object s: (ConcurrentLinkedQueue)set.getValue())\n\t\t\t{\n\t\t\t\tif(s==m)\n\t\t\t\t\t((ConcurrentLinkedQueue)set.getValue()).remove(s);\n\t\t\t}\n\t\t}\n\n\t\t}", "@Test\n public void testSPLPublishNoFilterWithSubscribe() throws Exception {\n final Topology t = new Topology();\n \n SPLStream source = SPLStreamsTest.testTupleStream(t);\n \n source = addStartupDelay(source);\n \n source.publish(\"testSPLPublishNoFilterSFilteredSubscribe\", false);\n \n SPLStream sub = SPLStreams.subscribe(t, \"testSPLPublishNoFilterSFilteredSubscribe\", source.getSchema());\n \n TStream<String> subscribe = sub.transform(new GetTupleId());\n\n completeAndValidate(subscribe, 20, \"SPL:0\", \"SPL:1\", \"SPL:2\", \"SPL:3\");\n }", "public abstract void unregisterListeners();", "@Override\n protected synchronized void removeWrite(ChannelHandlerWriteSubscription subscription) {\n super.removeWrite(subscription);\n }", "Flow.Subscriber<T> subscriber();", "public void removeObserver(Observer observer);", "public void unsubscribeToCovRequest() {\n try {\n DeviceService.localDevice.send(bacnetDevice, new SubscribeCOVRequest(new UnsignedInteger(1), getObjectIdentifier(), null, null)).get();\n LOG.info(\"Unsubscription @: '\" + getObjectIdentifier() + \"' on: \" + bacnetDevice.getObjectIdentifier());\n } catch (BACnetException e) {\n LOG.warn(\"Can't unsubscribe : '\" + getObjectIdentifier() + \"' on: \" + bacnetDevice.getObjectIdentifier());\n }\n\n }", "@Test\r\n\tpublic void aTestValidSubscribe() {\r\n\t\tbroker.subscribe(intSub);\r\n\t\tbroker.subscribe(unreadSub);\r\n\t\tbroker.subscribe(pIntSub);\r\n\t}" ]
[ "0.79262006", "0.78445023", "0.75825304", "0.75645113", "0.73034024", "0.723462", "0.7145366", "0.71119654", "0.70661926", "0.70404476", "0.692109", "0.68892455", "0.6847124", "0.68316376", "0.68132454", "0.6779553", "0.66713613", "0.6587374", "0.6569751", "0.65057766", "0.639408", "0.6388439", "0.6361037", "0.63603026", "0.6357704", "0.6313535", "0.62918735", "0.6271715", "0.62373626", "0.62255085", "0.6198053", "0.61864746", "0.61860406", "0.61737156", "0.6140668", "0.6114659", "0.6100686", "0.6053549", "0.60422957", "0.5962133", "0.5956312", "0.5926735", "0.59176934", "0.5917063", "0.58091956", "0.5807713", "0.5800714", "0.5793512", "0.57916564", "0.57802284", "0.5776427", "0.5760107", "0.5753403", "0.5744725", "0.5738918", "0.5737819", "0.573647", "0.5735574", "0.5734869", "0.57070005", "0.57069063", "0.5693947", "0.568725", "0.5683451", "0.56766963", "0.56680125", "0.56680125", "0.56680125", "0.56680125", "0.56680125", "0.56680125", "0.5662191", "0.5636347", "0.56227285", "0.56008345", "0.55884343", "0.55865186", "0.5580367", "0.557898", "0.55738294", "0.5557826", "0.5539915", "0.553844", "0.553157", "0.5501372", "0.5499907", "0.5496578", "0.5490864", "0.54905534", "0.5480537", "0.5480283", "0.5472506", "0.5466332", "0.54489136", "0.5431537", "0.54159117", "0.54138213", "0.5399754", "0.5393579", "0.53903043" ]
0.72549474
5
PUnsubscrib = Pattern unSubscribe
@Override public void onPSubscribe(String pattern, int subscribedChannels) { super.onPSubscribe(pattern, subscribedChannels); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void unsubscribe(){}", "void unsubscribe();", "private void unsubscribe() {\n subscriber=null;\n }", "void unsubscribe(Subscription subscription);", "@Override\n\tpublic void onPUnsubscribe(String arg0, int arg1) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void onPUnsubscribe(String pattern, int subscribedChannels) {\n\t\t\t\tlog.debug(\"====== onPUnsubscribe(): pattern = {}, subscribedChannels = {}\", pattern, subscribedChannels);\n\t\t\t}", "public void onUnsubscribe() {\n\n }", "@Override\n\tpublic void onUnsubscribe(String arg0, int arg1) {\n\t\t\n\t}", "void unsubscribeAll();", "@Override\n public void onPUnsubscribe(String s, int i) {\n }", "void unsubscribe(Player player);", "@Override\n\tpublic void unsubscribe(Strategy strategy) {\n\t\t\n\t}", "@Override\n public void unsubscribe(ISubscriber subscriber) {\n subscribers.remove(subscriber);\n }", "@Override\n public void onUnsubscribe(String s, int i) {\n }", "void unsubscribe(String id);", "void unsubscribe(Player player, boolean fast);", "@Override\n public void unregister(Object subscriber) {\n }", "void unpublish() {\n pendingOps.decrementAndGet();\n }", "private void doUnsubscribe(IoSession session, MessageProtocol request) throws Exception {\n \t\n \tdoExit(session);\n }", "@Override\r\n public void unsubscribe() {\n t.interrupt();\r\n }", "private void unsubscribeHandler(MqttUnsubscribeMessage unsubscribe) {\n\n final int messageId = unsubscribe.messageId();\n LOG.info(\"UNSUBSCRIBE [{}] from MQTT client {}\", messageId, this.mqttEndpoint.clientIdentifier());\n\n // sending AMQP_UNSUBSCRIBE\n\n AmqpUnsubscribeMessage amqpUnsubscribeMessage =\n new AmqpUnsubscribeMessage(this.mqttEndpoint.clientIdentifier(), unsubscribe.topics());\n\n this.ssEndpoint.sendUnsubscribe(amqpUnsubscribeMessage, done -> {\n\n if (done.succeeded()) {\n\n this.mqttEndpoint.unsubscribeAcknowledge(messageId);\n\n // removing topics from local collection\n unsubscribe.topics().stream().forEach(topic -> {\n\n this.grantedQoSLevels.remove(topic);\n });\n\n LOG.info(\"UNSUBACK [{}] to MQTT client {}\", messageId, this.mqttEndpoint.clientIdentifier());\n }\n });\n }", "private void genericUnsubscribeFactory(String request, BandInfo band) {\n if (bandStreams.containsKey(band) && bandStreams.get(band).contains(request)) {\n if (bandStreams.get(band).size() == 1) {\n // Only stream open for this band, remove from bandStreams\n bandStreams.remove(band);\n } else {\n // Other streams open, remove from list\n bandStreams.get(band).remove(request);\n }\n\n // Remove stream from preferences\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n Set<String> streams = prefs.getStringSet(Preferences.getDeviceKey(band.getMacAddress()), new HashSet<String>());\n if (streams.contains(request)) {\n Log.v(TAG, \"Removing stream \" + request);\n streams.remove(request);\n Log.v(TAG, \"Streams after removing \" + request + \": \" + streams);\n prefs.edit().putStringSet(Preferences.getDeviceKey(band.getMacAddress()), streams).apply();\n }\n\n // Unsubscribe from the appropriate stream\n switch (request) {\n case ACCEL_REQ_EXTRA:\n if (accManager != null)\n accManager.unSubscribe(band);\n break;\n case ALT_REQ_EXTRA:\n if (altManager != null)\n altManager.unSubscribe(band);\n break;\n case AMBIENT_REQ_EXTRA:\n if (ambManager != null)\n ambManager.unSubscribe(band);\n break;\n case BAROMETER_REQ_EXTRA:\n if (barometerManager != null)\n barometerManager.unSubscribe(band);\n break;\n case CALORIES_REQ_EXTRA:\n if (calManager != null)\n calManager.unSubscribe(band);\n break;\n case CONTACT_REQ_EXTRA:\n if (conManager != null)\n conManager.unSubscribe(band);\n break;\n case DISTANCE_REQ_EXTRA:\n if (distManager != null)\n distManager.unSubscribe(band);\n break;\n case GSR_REQ_EXTRA:\n if (gsrManager != null)\n gsrManager.unSubscribe(band);\n break;\n case GYRO_REQ_EXTRA:\n if (gyroManager != null)\n gyroManager.unSubscribe(band);\n break;\n case HEART_RATE_REQ_EXTRA:\n if (heartManager != null)\n heartManager.unSubscribe(band);\n break;\n case PEDOMETER_REQ_EXTRA:\n if (pedoManager != null)\n pedoManager.unSubscribe(band);\n break;\n case SKIN_TEMP_REQ_EXTRA:\n if (skinTempManager != null)\n skinTempManager.unSubscribe(band);\n break;\n case UV_REQ_EXTRA:\n if (uvManager != null)\n uvManager.unSubscribe(band);\n break;\n default:\n Log.e(TAG, \"Unknown subscription requested \" + request);\n }\n } else {\n if (!bandStreams.containsKey(band)) {\n Log.e(TAG, \"Error: unsubscribe request for a band that isnt stored\");\n Log.v(TAG, \"Band: \" + band.toString());\n for (BandInfo info :\n bandStreams.keySet()) {\n Log.v(TAG, \"Key: \" + info.toString());\n }\n } else {\n if (!bandStreams.get(band).contains(request)) {\n Log.e(TAG, \"Error: unsubscribe request for unregistered request\");\n }\n }\n }\n }", "private void unsubscribe() {\n Log.i(TAG, \"Unsubscribing.\");\n Nearby.Messages.unsubscribe(mGoogleApiClient, mMessageListener);\n }", "public void unsubscribeSwitchState() {\n\t\t\n\t}", "@Override\n public void rxUnsubscribe() {\n if (placesSubscriber != null) {\n if (!placesSubscriber.isDisposed()) {\n placesSubscriber.dispose();\n }\n }\n }", "@Override\n public void onUnsubscribe(String channel, int subscribedChannels) {\n super.onUnsubscribe(channel, subscribedChannels);\n System.out.println(\"Channel unsubscribed at : \" + channel);\n }", "void unsetSubject();", "public abstract void unsubscribeImpl(String str, Resolver<Void> resolver);", "public void unsubscribe(ClientAddress address, ChannelAddress channelAddress);", "public interface aps {\n boolean isUnsubscribed();\n\n void unsubscribe();\n}", "public void unsubscribe(String inOutMethod) {\r\n unsubscribe(inOutMethod, inOutMethod, (Class<?>[]) null);\r\n }", "static void confirmUnSubscribe_C(Messenger messenger, Response_e response)\n {\n sendToClient( messenger, Request_e.Request_UnSubscribe_Event_C_en.valueOf(), response, null );\n }", "public void unsubscribe() {\r\n new Thread(new Runnable() {\r\n public void run() {\r\n int attempts = 0;\r\n while(++attempts < 20) {\r\n try {\r\n if (server.removeSubscriber(PubSubAgent.this.agentID)) {\r\n subscriberKeywords.clear();\r\n subscriberTopics.clear();\r\n }\r\n System.out.print(\"Unsubscribed from all Topics.\");\r\n return;\r\n } catch(RemoteException e) {\r\n System.err.println(\"Could not connect to server. Retrying...\");\r\n try {\r\n Thread.sleep(800);\r\n } catch(Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }\r\n System.err.println(\"Couldn't Unsubscribe from all the topics...\");\r\n }\r\n }).start();\r\n }", "void unsubscribe(LogListener listener);", "void subscribe();", "@Test\n public void subscribe_unsubscribe() {\n String channelName = \"subscribe_unsubscribe_\" + testParams.name;\n AblyRealtime ably = null;\n try {\n ClientOptions opts = createOptions(testVars.keys[0].keyStr);\n ably = new AblyRealtime(opts);\n\n /* create a channel and attach */\n final Channel channel = ably.channels.get(channelName);\n channel.attach();\n (new ChannelWaiter(channel)).waitFor(ChannelState.attached);\n assertEquals(\"Verify attached state reached\", channel.state, ChannelState.attached);\n\n /* subscribe */\n MessageListener testListener = new MessageListener() {\n @Override\n public void onMessage(Message message) {\n }};\n channel.subscribe(\"test_event\", testListener);\n /* unsubscribe */\n channel.unsubscribe(\"test_event\", testListener);\n } catch (AblyException e) {\n e.printStackTrace();\n fail(\"init0: Unexpected exception instantiating library\");\n } finally {\n if(ably != null)\n ably.close();\n }\n }", "public interface IBasePresenter {\n void unSubscribe();\n}", "void wipeSubscriptions(String sessionID);", "@Override\n\t\tpublic void onUserListUnsubscription(User arg0, User arg1, UserList arg2) {\n\t\t\t\n\t\t}", "@Override\n public void unpin(IObserver observer) {\n listeners.remove(observer);\n }", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable p1) {\n\t\t\t\t\t}", "@Override\n\tpublic void onUserListUnsubscription(User subscriber, User listOwner, UserList list) {\n\n\t}", "protected void processUnsubscribe(IoSession session, String clientID, List<String> topics, int messageID) {\n LOG.debug(\"processSubscribe invoked\");\n \n for (String topic : topics) {\n subscriptions.removeSubscription(topic, clientID);\n }\n //ack the client\n UnsubAckMessage ackMessage = new UnsubAckMessage();\n ackMessage.setMessageID(messageID);\n \n LOG.info(\"replying with UnsubAck to MSG ID {0}\", messageID);\n session.write(ackMessage);\n }", "public void unregister(Object aSubscriber)\r\n\t{\r\n\t\tfinal Iterator<SubscriberInfo> lIter = this.subscriberInfos.iterator();\r\n\t\twhile (lIter.hasNext())\r\n\t\t{\r\n\t\t\tfinal SubscriberInfo lInfo = lIter.next();\r\n\t\t\tif (lInfo.isGarbage() || lInfo.isForSpecifiedSubscriber(aSubscriber))\r\n\t\t\t{\r\n\t\t\t\tlIter.remove();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void onPsubscribe(String pattern, int no);", "@Override\n\tpublic void onUnSubscribeLobbyDone(LobbyEvent arg0) {\n\t\tMain.log(getClass(), \"onUnSubscribeLobbyDone\");\n\t}", "protected abstract void unregisterObserver();", "private void unsubscribeAll(MicroService m){\n\t\tConcurrentLinkedQueue<Class> queue=microToEvent.get(m);\n\t\tif(queue!=null)\n\t\tfor(Class cla:queue){\n\t\t\tif(Broadcast.class.isAssignableFrom(cla)){\t\t// checks if broadcast is super/interface of cla (meaning cla implements/extends broadcast)\n\t\t\t\t\tbroadcastToMicroServices.get(cla).remove(m);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\teventToMicroHandlers.get(cla).remove(m);\n\t\t\t}\n\t\t}\n\t}", "public void unsubscribe(String topic, String inboundPortUri) {\n\n\t}", "public org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeServiceResponse unSubscribeService(org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeServiceRequest parameters) {\n throw new UnsupportedOperationException(\"Not implemented yet.\");\r\n }", "void clearSubscriber() {\n if (!(subscriber instanceof AbortingSubscriber)) {\n subscriber = NeverInvokedSubscriber.get();\n }\n }", "public void streamSubscriberClose(ISubscriberStream stream);", "private void removeSubscriber(Function<? super E, Subscription> subscriber) {\n int index = -1;\n int i = 0;\n Iterator<Function<? super E, Subscription>> iter = subscribers.iterator();\n while (iter.hasNext() && index == -1) {\n Function<? super E, Subscription> s = iter.next();\n if (s == subscriber) {\n iter.remove();\n index = i;\n } else {\n i++;\n }\n }\n\n final int finalIndex = index;\n List<E> keys = new ArrayList<>(map.keySet());\n\n // if this subscriber is being removed, we no longer need to store\n // its corresponding subscription. Thus, it can be removed and unsubscribed\n keys.forEach(key -> map.get(key).remove(finalIndex).unsubscribe());\n }", "default void unsubscribe()\n throws TopicReceiverException\n {\n try {\n close();\n } catch ( Exception e ) {\n throw new TopicReceiverException(getTopic(), e);\n }\n }", "public void Unsubscribe(Integer busLineID, final ConfigurationActivity configurationActivity) { //unsubscribe antoistoixi gia ena buslineid\n subscribedLists.remove(busLineID);\n Client client = subscribedThreads.get(busLineID);\n\n Message message = MapsActivity.mainHandler.obtainMessage();\n message.what = 6;\n message.obj = busLineID;\n MapsActivity.mainHandler.sendMessage(message);\n\n configurationActivity.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n configurationActivity.updateGUI();\n }\n });\n\n Socket socket = subscribedSockets.get(busLineID);\n try {\n socket.close();\n } catch (IOException e) {\n }\n }", "public void unregister(Object subscriber)\n\t{\n\t\ttry\n\t\t{\n\t\t\tm_bus.unregister(subscriber);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tLog.e(TAG, \"Error in unregister: \" + e.getMessage());\n\t\t}\n\t}", "private static void removeObservingPattern(String pattern, SessionState state)\n\t{\n//\t\t// get the observer and remove the pattern\n//\t\tContentObservingCourier o = (ContentObservingCourier) state.getAttribute(STATE_OBSERVER);\n//\t\to.removeResourcePattern(ContentHostingService.getReference(pattern));\n//\n//\t\t// add it back to state\n//\t\tstate.setAttribute(STATE_OBSERVER, o);\n\n\t}", "@Test\n public void unregister() {\n BaseEventBus eventBus = new SynchronousEventBus(LOG);\n\n Object object1 = new Object() {\n @Subscriber\n public void onIntEvent(Integer event) {\n LOG.debug(\"handled event: {}\", event);\n }\n };\n\n Object object2 = new Object() {\n @Subscriber\n public void onStringEvent(String event) {\n LOG.debug(\"handled event: {}\", event);\n }\n };\n\n eventBus.register(object1);\n eventBus.register(object2);\n assertThat(eventBus.objectSubscriberMethods.size(), is(2));\n assertThat(eventBus.eventTypeToSubscriberMethods.size(), is(2));\n assertThat(eventBus.eventTypeToSubscriberMethods.get(String.class).size(), is(1));\n assertThat(eventBus.eventTypeToSubscriberMethods.get(Integer.class).size(), is(1));\n\n eventBus.unregister(object2);\n assertThat(eventBus.objectSubscriberMethods.size(), is(1));\n assertThat(eventBus.eventTypeToSubscriberMethods.size(), is(1));\n assertThat(eventBus.eventTypeToSubscriberMethods.containsKey(String.class), is(false));\n assertThat(eventBus.eventTypeToSubscriberMethods.get(Integer.class).size(), is(1));\n\n eventBus.unregister(object1);\n assertThat(eventBus.objectSubscriberMethods.size(), is(0));\n assertThat(eventBus.eventTypeToSubscriberMethods.size(), is(0));\n }", "private void unpublish() {\n Log.i(TAG, \"Unpublishing.\");\n Nearby.Messages.unpublish(mGoogleApiClient, mPubMessage);\n }", "@Override\n public void onSubscribe(Disposable d) {\n }", "@Override\n public void unsubscribe(Entity e) {\n unsub_queue.add(e);\n }", "public void unsubscribe(Player spectator) {\r\n\t\tspectators.remove(spectator);\r\n\t}", "void unsetExchange();", "@SneakyThrows\n private void unsubscribe(String name) {\n call(\"unsubscribe\", new Subscription(name)).toFuture().get(UNSUBSCRIBE_DELAY_S, TimeUnit.SECONDS);\n }", "@Override\n\t\t\tpublic void onSubscribe(Disposable arg0) {\n\t\t\t\t\n\t\t\t}", "public org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeProductResponse unSubscribeProduct(org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeProductRequest parameters) {\n throw new UnsupportedOperationException(\"Not implemented yet.\");\r\n }", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSubscribe(Disposable d) {\n\n\t\t\t\t\t}", "public void unregister(Observer obj);", "public void unregisterNotify( Notify notify );", "private void doUnsubscribe(JSONArray args, CallbackContext callbackContext,\n\t\t\tMqttAndroidClient client) throws JSONException {\n\t\tString topicFilter = args.getString(1);\n\t\tfinal JSONObject invocationContext = args.optJSONObject(2);\n\t\ttry {\n\t\t\tclient.unsubscribe(topicFilter, null,\n\t\t\t\t\tnew GeneralCallback(invocationContext, callbackContext));\n\t\t\n\t\t} catch (MqttException exception) {\n\t\t\tcallbackContext.error(createError(exception, invocationContext));\n\t\t}\n\t}", "void delete(UnsubscribeRequest request, ResultCapture<Void> extractor);", "protected EventSink doUnplug(EventSink sink)\r\n\t{\n\t\tEventProcessor proc = sink.getProcessor();\r\n\t\tsink = (EventSink)proc;\r\n\t\t\r\n\t\t// deactivate, destroy and deregister the sink\r\n\t\tsink.passivate();\r\n\t\tsink.exit();\r\n\t\tbroker.deregisterSink(sink);\r\n\t\t\r\n\t\treturn sink;\r\n\t}", "public void onSubscribe() {\n\n }", "public void removeSubscriptions(String removeSub){\n\t subscriptions.remove(removeSub);\n\t}", "@Override\n\tpublic void onPSubscribe(String arg0, int arg1) {\n\t\t\n\t}", "void delete(UnsubscribeRequest request);", "public void unsubscribe(IMouseListener l)\n {\n // ADD new listener to the listeners list:\n _listeners.remove(l);\n }", "void unDo();", "public void unsubscribe(final Topic topic) {\r\n\r\n new Thread(new Runnable() {\r\n public void run() {\r\n int attempts = 0;\r\n while(++attempts < 20) {\r\n try {\r\n if (server.removeSubscriber(PubSubAgent.this.agentID, topic))\r\n subscriberTopics.remove(topic);\r\n System.out.println(\"Unsubscribed from the Topic: \" + topic.getTopicID() + \" - \" + topic.getTopicName());\r\n return;\r\n } catch(RemoteException e) {\r\n System.err.println(\"Could not connect to server. Retrying...\");\r\n try {\r\n Thread.sleep(800);\r\n } catch(Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }\r\n System.err.println(\"Couldn't Unsubscribe from \" + topic.getTopicID() + \" - \" + topic.getTopicName());\r\n }\r\n }).start();\r\n }", "void unRegister(NotificationListener<ObservableIntentServiceNotificationType> notificationStrategy);", "default void subscribe(Subscriber<? super Void> s) {\n\t\tOperators.complete(s);\n\t}", "void unpublish(List<String> uuids) throws GWTJahiaServiceException;", "public void unsubscribeAll() {\n \t\tint failCount = 0;\n \t\t// Make a copy of the collection because it will be modified in #unsubscribe()\n \t\tSet<String> removal = new HashSet<String>(subscriptions.keySet());\n \t\tfor (String subscriptionID : removal) {\n \t\t\tunsubscribe(subscriptionID);\n \t\t}\n \t\tif (failCount > 0) {\n \t\t\tlogger.warn(\n \t\t\t\t\t\"Problem while unsubcribing from all subscriptions: \"\n \t\t\t\t\t\t\t+ failCount\n \t\t\t\t\t\t\t+ \" unsubscriptions failed at DSB endpoint '\"\n \t\t\t\t\t\t\t+ subscriptionsTarget.getUri() + \"'\");\n \t\t} else {\n \t\t\tlogger.info(\n \t\t\t\t\t\"Successfully unsubcribed from all subscriptions at DSB endpoint '\"\n \t\t\t\t\t\t\t+ subscriptionsTarget.getUri() + \"'\");\n \t\t}\n \t}", "public void removeOrDisconnectClient(String mqttClientChannelID, String unSubscribedTopic, String username,\n SubscriptionEvent action) throws MQTTException {\n\n log.info(\"Disconnecting channel for clientID: \" + mqttClientChannelID);\n\n Collection<MQTTSubscription> topicSubscriptionList;\n MQTTopics mqtTopics = topicSubscriptions.get(mqttClientChannelID);\n\n if (null != mqtTopics) {\n if (null == unSubscribedTopic) {\n //this means we need to remove all subscriptions relevant for the channel\n topicSubscriptionList = mqtTopics.getAllSubscriptionsForChannel();\n } else {\n topicSubscriptionList = new ArrayList<>();\n topicSubscriptionList.add(mqtTopics.getSubscription(unSubscribedTopic));\n }\n\n for (MQTTSubscription subscription : topicSubscriptionList) {\n //Will get the topic name bound for subscription\n String topic = subscription.getTopicName();\n //Will remove the subscriber off the list\n mqtTopics.removeSubscriber(topic);\n String subscriberChannelID = subscription.getSubscriberChannelID();\n UUID subscriberChannel = subscription.getSubscriptionChannel();\n boolean isCleanSession = subscription.isCleanSession();\n QOSLevel qos = subscription.getQOSLevel();\n //The corresponding subscription created cluster wide will be topic name and the local channel id\n //Will remove the subscriber cluster wide\n try {\n //Will indicate the disconnection of the topic\n if (action == SubscriptionEvent.DISCONNECT && MQTTUtils.isDurable(isCleanSession, qos.getValue())) {\n connector.disconnectSubscriber(this, topic, username, subscriberChannelID, subscriberChannel,\n isCleanSession, mqttClientChannelID, qos);\n } else {\n //If un-subscribed we need to remove the subscription off\n connector.removeSubscriber(this, topic, username, subscriberChannelID, subscriberChannel,\n isCleanSession, mqttClientChannelID, qos);\n }\n if (log.isDebugEnabled()) {\n final String message = \"Subscription with cluster id \" + subscriberChannelID + \" disconnected \" +\n \"from topic \" + topic;\n log.debug(message);\n }\n\n } catch (MQTTException ex) {\n //Should re state the connection of the subscriber back to the map\n mqtTopics.addSubscriber(unSubscribedTopic, subscription);\n final String error = \"Error occurred while removing the subscription \" + mqttClientChannelID;\n log.error(error, ex);\n throw ex;\n }\n }\n\n //Finally will check if there're any relevant subscriptions for the topic\n //If there arn't we could remove the entry\n if(mqtTopics.getAllSubscriptionsForChannel().isEmpty()){\n topicSubscriptions.remove(mqttClientChannelID);\n }\n } else {\n //If the connection is publisher based\n UUID publisherID = connector.removePublisher(mqttClientChannelID);\n if (null == publisherID) {\n log.warn(\"A subscriber or a publisher with Connection with id \" + mqttClientChannelID + \" cannot be \" +\n \"found to disconnect.\");\n }\n }\n }", "public abstract void unregister();", "@Override\n public void unsubscribe(final Set<ValueSpecification> valueSpecifications) {\n LOGGER.debug(\"Unsubscribed from {}\", valueSpecifications);\n }", "public void removeTopicDurableSubscriber(String name)\n {\n topicDurableSubscriberMap.remove(name);\n }", "void disposeObservable();", "@Override\n\tpublic void unregister(Subscriber m) {\n\t\t\tif (subscribersMessages.containsKey(m) == false) {\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\t}\n\t\t\tfor (Message message : subscribersMessages.get(m)) {\n\t\t\t\tsubscribersMessages.get(m).remove(message);\n\t\t\t\tresults.get(message).resolve(null);\n\n\t\t\t}\n\t\t\tsubscribersMessages.remove(m);\n\n\t\tIterator it=typesQueue.entrySet().iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tMap.Entry set=(Map.Entry) it.next();\n\t\t\tfor(Object s: (ConcurrentLinkedQueue)set.getValue())\n\t\t\t{\n\t\t\t\tif(s==m)\n\t\t\t\t\t((ConcurrentLinkedQueue)set.getValue()).remove(s);\n\t\t\t}\n\t\t}\n\n\t\t}", "@Test\n public void testSPLPublishNoFilterWithSubscribe() throws Exception {\n final Topology t = new Topology();\n \n SPLStream source = SPLStreamsTest.testTupleStream(t);\n \n source = addStartupDelay(source);\n \n source.publish(\"testSPLPublishNoFilterSFilteredSubscribe\", false);\n \n SPLStream sub = SPLStreams.subscribe(t, \"testSPLPublishNoFilterSFilteredSubscribe\", source.getSchema());\n \n TStream<String> subscribe = sub.transform(new GetTupleId());\n\n completeAndValidate(subscribe, 20, \"SPL:0\", \"SPL:1\", \"SPL:2\", \"SPL:3\");\n }", "public abstract void unregisterListeners();", "@Override\n protected synchronized void removeWrite(ChannelHandlerWriteSubscription subscription) {\n super.removeWrite(subscription);\n }", "Flow.Subscriber<T> subscriber();", "public void removeObserver(Observer observer);", "public void unsubscribeToCovRequest() {\n try {\n DeviceService.localDevice.send(bacnetDevice, new SubscribeCOVRequest(new UnsignedInteger(1), getObjectIdentifier(), null, null)).get();\n LOG.info(\"Unsubscription @: '\" + getObjectIdentifier() + \"' on: \" + bacnetDevice.getObjectIdentifier());\n } catch (BACnetException e) {\n LOG.warn(\"Can't unsubscribe : '\" + getObjectIdentifier() + \"' on: \" + bacnetDevice.getObjectIdentifier());\n }\n\n }", "@Test\r\n\tpublic void aTestValidSubscribe() {\r\n\t\tbroker.subscribe(intSub);\r\n\t\tbroker.subscribe(unreadSub);\r\n\t\tbroker.subscribe(pIntSub);\r\n\t}" ]
[ "0.7926935", "0.7845233", "0.75838023", "0.7565081", "0.730368", "0.7254182", "0.7235544", "0.7146433", "0.7113041", "0.7066816", "0.7040451", "0.69216865", "0.6889738", "0.6848421", "0.68319035", "0.68140364", "0.6779944", "0.6672216", "0.6588548", "0.6571154", "0.65068406", "0.6395688", "0.6389482", "0.6362573", "0.6360879", "0.63577455", "0.63138807", "0.62927455", "0.6272038", "0.62372696", "0.6226133", "0.61989284", "0.6187425", "0.61864626", "0.6173658", "0.61421275", "0.6113218", "0.61019975", "0.6054041", "0.6042314", "0.5961746", "0.59567416", "0.5927541", "0.5919065", "0.59163535", "0.58100075", "0.58077383", "0.5801661", "0.5793878", "0.5791496", "0.57812375", "0.57768387", "0.5761306", "0.5753817", "0.5745793", "0.5739888", "0.57384056", "0.57379377", "0.5735482", "0.5734484", "0.57079494", "0.5707763", "0.5695165", "0.5688231", "0.56838673", "0.56767035", "0.566791", "0.566791", "0.566791", "0.566791", "0.566791", "0.566791", "0.56624734", "0.56363446", "0.56232446", "0.56008995", "0.55896014", "0.55864567", "0.558264", "0.55778617", "0.5573587", "0.55573535", "0.5540859", "0.5539072", "0.5531375", "0.5501796", "0.549985", "0.54984426", "0.5491333", "0.5491113", "0.5481088", "0.5480176", "0.547259", "0.54670626", "0.5449238", "0.54318625", "0.54166555", "0.5413134", "0.5399449", "0.53950304", "0.5390955" ]
0.0
-1
TODO Autogenerated method stub
@Override public String getNamespace() { return InfInnerMsg.class.getName(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public List getUnreadMsgList(String userId, QueryFilter queryFilter) { Map<String,Object> params = new HashMap<String, Object>(); params.put("userId", userId); return this.getBySqlKey("getUnreadMsgList", params,queryFilter.getPage()); }
{ "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
Given a string s and a nonempty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the length of both strings s and p will not be larger than 20,100. The order of output does not matter. Example 1: Input: s: "cbaebabacd" p: "abc" Output: [0, 6] Explanation: The substring with start index = 0 is "cba", which is an anagram of "abc". The substring with start index = 6 is "bac", which is an anagram of "abc". Example 2: Input: s: "abab" p: "ab" Output: [0, 1, 2] Explanation: The substring with start index = 0 is "ab", which is an anagram of "ab". The substring with start index = 1 is "ba", which is an anagram of "ab". The substring with start index = 2 is "ab", which is an anagram of "ab". sliding window (two pointers) O(N) O(N)
public List<Integer> findAnagrams(String s, String p) { List<Integer> ans = new ArrayList<>(); if(s == null || "".equals(s) || p == null || "".equals(p) || p.length() > s.length()) return ans; // use map to track chars in p Map<Character, Integer> map = new HashMap<>(); for (int i = 0; i < p.length(); i++) { // key is distinct char, value is times of current char appears map.put(p.charAt(i) , map.getOrDefault(p.charAt(i) , 0) + 1); } int len = p.length(); // two pointers indicate window's left boundary and right boundary int left = 0; int right = 0; // counter indicates whether our window contains all chars or not int counter = map.size(); while (right < s.length()){ // pick out current char char cur = s.charAt(right); // check whether cur in map or not, if in, we find one so decrease counter if(map.containsKey(cur)){ // update map map.put(cur, map.get(cur) - 1); if(map.get(cur) == 0) counter --; } // move right boundary of window forward right ++; // when counter equals to 0, it means that we have all chars in p in our current window, // then we'll try to make the window smaller by moving left pointer while (counter == 0){ // check whether the char to remove is in map or not, if in, we need to increase counter char temp = s.charAt(left); if(map.containsKey(temp)){ // update map map.put(temp, map.get(temp) + 1); if(map.get(temp) > 0) counter ++; } // check whether there is an answer before increase left if(right - left == len) ans.add(left); left ++; } } return ans; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static List<Integer> findAnagrams(String s, String p) {\n int ns = s.length(), np = p.length();\n if (ns < np) return new ArrayList<>();\n\n int [] pCount = new int[26];\n int [] sCount = new int[26];\n // build reference array using string p\n for (char ch : p.toCharArray()) {\n pCount[ch - 'a']++;\n }\n\n List<Integer> output = new ArrayList<>();\n // sliding window on the string s\n for (int i = 0; i < ns; ++i) {\n // add one more letter\n // on the right side of the window\n sCount[s.charAt(i) - 'a']++;\n // remove one letter\n // from the left side of the window\n if (i >= np) {\n sCount[s.charAt(i - np) - 'a']--;\n }\n // compare array in the sliding window\n // with the reference array\n if (Arrays.equals(pCount, sCount)) {\n output.add(i - np + 1);\n }\n }\n return output;\n }", "public List<Integer> findAnagrams(String s, String p) {\n\t\t\n\t\tList<Integer> res = new ArrayList<>();\n\t\tint lens = s.length();\n\t\tint lenp = p.length();\n\t\tif(lens < lenp)\n\t\t\treturn res;\n\t\tint[] words = new int[26];\n\t\tint[] wordp = new int[26];\n\t\tfor (int i = 0; i < lenp; ++i) {\n\t\t\t++wordp[p.charAt(i) - 'a'];\n\t\t}\n\t\tfor (int i = 0; i < lenp; ++i) {\n\t\t\t++words[s.charAt(i) - 'a'];\n\t\t}\n\t\tfor (int i = 0; i < lens; ++i) {\n\t\t\tif (isSameValue(wordp, words))\n\t\t\t\tres.add(i);\n\t\t\tif((i + lenp) < lens)\n\t\t\t{\n\t\t\t\t// slide window\n\t\t\t\t--words[s.charAt(i) - 'a'];\n\t\t\t\t++words[s.charAt(i + lenp) - 'a'];\n\t\t\t}\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\treturn res;\n\t}", "public List<Integer> findAnagrams(String s, String p) {\n //simple case\n //s1 is within s2\n List<Integer> result= new ArrayList<Integer>();\n if(s.length()<p.length())\n return result;\n int[] p_charset = new int[26];\n int[] s_charset= new int[26];\n for(int i=0;i<p.length();i++){\n int index_p= p.charAt(i)-'a';\n p_charset[index_p]++;\n int index_s= s.charAt(i)-'a';\n s_charset[index_s]++;\n }\n\n int i=0;\n for(;i<s.length()-p.length();i++){\n if(charsetEquals(s_charset,p_charset))\n result.add(i);\n int index_old= s.charAt(i)-'a';\n int index_new= s.charAt(i+p.length())-'a';\n s_charset[index_old]--;\n s_charset[index_new]++;\n }\n if(charsetEquals(s_charset,p_charset))\n result.add(i);\n\n return result;\n }", "public static ArrayList<Integer> findAnagrams(String s, String p) {\r\n\t \t \r\n\t \t //write your code here\r\n\t\t if(s.length()<p.length()) {\r\n\t\t\t ArrayList<Integer> arr = new ArrayList<>();\r\n\t\t\t return arr;\r\n\t\t }\r\n\t\t ArrayList<Integer> result = new ArrayList<>();\r\n\t\t HashMap<Character,Integer> P = new HashMap<>();\r\n\t\t HashMap<Character,Integer> H = new HashMap<>();\r\n\t\t \r\n\t\t for(int i=0;i<p.length();i++) {\r\n\t\t\t char ch = p.charAt(i);\r\n\t\t\t if(!P.containsKey(ch)) {\r\n\t\t\t\t P.put(ch,1);\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t P.put(ch,P.get(ch)+1);\r\n\t\t\t }\r\n\t\t }\r\n\t\t int start =0;\r\n\t\t int end=0;\r\n\t\t int mcount=0;\r\n\t\t for(int i=0;i<p.length();i++) {\r\n\t\t\t char ch = s.charAt(i);\r\n\t\t\t if(!H.containsKey(ch)) {\r\n\t\t\t\t H.put(ch,1);\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t H.put(ch,H.get(ch)+1);\r\n\t\t\t }\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t if(P.get(ch)>=H.get(ch)) {\r\n\t\t\t\t\t mcount++;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t end=i;\r\n\t\t }\r\n\t\t if(mcount==p.length()) {\r\n\t\t\t result.add(start);\r\n\t\t }\r\n\t\t while(end<s.length()-1) {\r\n\t\t\t char ch=s.charAt(start);\r\n\t\t\t int hfreq = H.get(ch)-1;\r\n\t\t\t H.put(ch,hfreq);\r\n\t\t\t if(H.get(ch)==0) {\r\n\t\t\t\t H.remove(ch);\r\n\t\t\t }\r\n\t\t\t int pfreq=0;\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t pfreq=P.get(ch);\r\n\t\t\t }\r\n\t\t\t if(hfreq<pfreq) {\r\n\t\t\t\t mcount--;\r\n\t\t\t }\r\n\t\t\t ch=s.charAt(end+1);\r\n\t\t\t int hfreqend=0;\r\n\t\t\t if(H.containsKey(ch)) {\r\n\t\t\t\t hfreqend = H.get(ch);\r\n\t\t\t }\r\n\t\t\t hfreqend++;\r\n\t\t\t H.put(ch, hfreqend);\r\n\t\t\t int pfreqend=0;\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t pfreqend = P.get(ch);\r\n\t\t\t }\r\n\t\t\t if(hfreqend<=pfreqend) {\r\n\t\t\t\t mcount++;\r\n\t\t\t }\r\n\t\t\t start++;\r\n\t\t\t end++;\r\n\t\t\t if(mcount==p.length()) {\r\n\t\t\t\t result.add(start);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t }\r\n\t\t return result;\r\n\t\t \r\n\t \t \r\n\t }", "static int sherlockAndAnagrams(String s){\n // Complete this function\n ArrayList<String> substringArray = new ArrayList<>();\n for(int i=0;i<s.length();i++){\n for(int j=i+1;j<s.length()+1;j++){\n substringArray.add(s.substring(i,j));\n }\n }\n int count = countAnagrams(substringArray);\n return count;\n }", "static int sherlockAndAnagrams(String s) {\n\n // **** initialize count of anagrams ****\n int count = 0;\n\n // **** loop once per grouping of characters [1 : s.length() - 1] ****\n for (int g = 1; g < s.length(); g++) {\n\n // **** generate the base sub string ****\n for (int i = 0; i < s.length() - g; i++) {\n\n // **** starting string ****\n String bs = s.substring(i, i + g);\n\n // **** generate sub strings ****\n for (int j = i + 1; j <= s.length() - g; j++) {\n\n // **** generate current sub string ****\n String cs = s.substring(j, j + g);\n\n // **** check if anagram ****\n if (areAnagram(bs, cs)) {\n count++;\n }\n }\n }\n }\n\n // **** count of anagrams ****\n return count;\n }", "static int sherlockAndAnagrams(String s) {\n int anagramCount = 0;\n Map<String, Integer> map = new HashMap<>();\n for (int i = 0; i < s.length(); i++) {\n for (int k = i + 1; k <= s.length(); k++) {\n String sub = s.substring(i, k);\n System.out.println(sub);\n sub = new String(sort(sub.toCharArray()));\n int value = map.getOrDefault(sub, 0);\n if(value > 0) {\n anagramCount = anagramCount + value;\n }\n map.put(sub, value+1);\n\n }\n }\n return anagramCount;\n }", "static int sherlockAndAnagrams(String s) {\n int anagramCount = 0;\n HashMap<String, Integer> map = new HashMap<>();\n\n int length = s.length();\n int wordSize = 1;\n while (wordSize != length) {\n for(int i = 0; i <= length-wordSize; i++) {\n char[] charArray = s.substring(i, i+wordSize).toCharArray();\n Arrays.sort(charArray);\n String sortedWord = new String(charArray);\n Integer num = map.get(sortedWord);\n if(num == null)\n map.put(sortedWord, 1);\n else {\n map.put(sortedWord, num+1);\n anagramCount += num;\n }\n }\n wordSize++;\n }\n\n return anagramCount;\n }", "static int sherlockAndAnagrams(String s) {\n int total = 0;\n for (int width = 1; width <= s.length() - 1; width++) {\n\n for(int k = 0 ;k <= s.length() - width; k++){\n\n String sub = s.substring(k, k + width);\n\n int[] subFreq = frequenciesOf(sub);\n for (int j = k + 1; j <= s.length() - width; j++) {\n String target = s.substring(j, j + width);\n if (areAnagrams(subFreq,frequenciesOf(target))) total = total + 1;\n }\n }\n }\n return total;\n }", "List<Integer> allAnagrams(String s, String l) {\n\t\t// Write your solution here.\n\t\tList<Integer> result = new ArrayList<Integer>();\n\t\tif (s == null || l == null || s.length() == 0 || l.length() == 0) {\n\t\t\treturn result;\n\t\t}\n\t\tif (s.length() > l.length()) {\n\t\t\treturn result;\n\t\t}\n\t\tMap<Character, Integer> map = countMap(s);\n\t\tint match = 0;\n\t\tfor (int i = 0; i < l.length(); i++) {\n\t\t\tchar temp = l.charAt(i);\n\t\t\tInteger count = map.get(temp);\n\t\t\tif (count != null) {\n\t\t\t\tmap.put(temp, count - 1);\n\n\t\t\t\tif (count == 1) {\n\t\t\t\t\tmatch++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i >= s.length()) {\n\t\t\t\ttemp = l.charAt(i - s.length());\n\t\t\t\tcount = map.get(temp);\n\t\t\t\tif (count != null) {\n\t\t\t\t\tmap.put(temp, count + 1);\n\t\t\t\t\tif (count == 0) {\n\t\t\t\t\t\tmatch--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (match == map.size()) {\n\t\t\t\tresult.add(i - s.length() + 1);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static int sherlock(String s) {\n\t\tint count = 0;\n\t\t// find the substrings to find the anagrams of\n\t\t// isAnagram function\n\t\t// with k unique chars, subset is k (k + 1) / 2\n\t\t\n\t\tList<String> subsets = getALlSubstring(s);\n\t\t\n\t\tfor(int i = 0 ;i < subsets.size() ; i++) {\n\t\t\tfor(int j = i + 1 ; j < subsets.size() ; j++) {\n\t\t\t\tif(i != j && subsets.get(i).length() == subsets.get(j).length() && isAnagram(subsets.get(i), subsets.get(j)))\n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "public static List<Integer> allAnagrams(String s, String l) {\n List<Integer> ans = new ArrayList<Integer>();\n \n if(s == null || s.length() < 1 || l == null || l.length() < 1)\n return ans;\n StringBuilder sb = new StringBuilder();\n char[] sarray = s.toCharArray();\n permute(sarray,sb,0);\n for(int i = 0; i < l.length() - s.length()+1; i++){\n if(set.contains(l.substring(i,i+s.length()))){\n ans.add(i);\n }\n }\n return ans;\n }", "static int sherlockAndAnagrams(String s) {\n HashTable hashTable = new HashTable(s.length() * s.length() * 4);\n substrings(s).map(Solution::ordered).forEach(hashTable::insert);\n return substrings(s).map(Solution::ordered).mapToInt(s1 -> {\n hashTable.remove(s1);\n return hashTable.count(s1);\n }).sum();\n }", "static int anagram(String s){\n // Complete this function\n int len = s.length();\n if(len%2 != 0){\n return -1;\n }\n String a=s.substring(0,(len/2));\n StringBuilder b = new StringBuilder(s.substring((len/2),len)); \n //System.out.println(\"a: \" + a);\n //System.out.println(\"b: \" + b);\n //char[] aChar = a.toCharArray();\n //char[] bChar = b.toCharArray();\n //Arrays.sort(aChar);\n //Arrays.sort(bChar);\n int count =0;\n for(int i=0;i<len/2;i++){\n int j = b.indexOf(String.valueOf(a.charAt(i)));\n if(j > -1){\n b.deleteCharAt(j); \n }else{\n count++;\n }\n }\n return count;\n }", "public int findSubstringInWraproundString1(String p) {\n if(p == null || p.length() == 0) {\n return 0;\n }\n int pLength = p.length();\n // keep track of the number of consecutive letters for each substrings which starts from a...z\n int[] consecutiveNumberFrom = new int[26]; \n consecutiveNumberFrom[p.charAt(0) - 'a'] = 1;\n // keep track of the number of legacy consecutive letters\n int[] consecutiveCount = new int[pLength];\n consecutiveCount[0] = 1;\n int result = 1;\n for(int i = 1; i < pLength; i++) {\n consecutiveCount[i] = isConsecutive(p.charAt(i - 1), p.charAt(i))\n ? consecutiveCount[i - 1] + 1\n : 1;\n for(int j = i - consecutiveCount[i] + 1; j <= i; j++) {\n if(consecutiveNumberFrom[p.charAt(j) - 'a'] < i - j + 1) {\n result++;\n consecutiveNumberFrom[p.charAt(j) - 'a']++;\n } else {\n break;\n }\n }\n }\n return result;\n }", "int main() \n{\n string s1,s2;\n cin>>s1>>s2;\n int freq[128]={0},i;\n for(i=0;i<s1.length();i++)\n freq[s1[i]]++;\n for(i=0;i<s2.length();i++)\n freq[s2[i]]--;\n for(i=0;i<128;i++)\n {\n if(freq[i]!=0)\n {\n cout<<\"Not anagrams\";\n return 0;\n }\n }\n cout<<\"Anagram\";\n}", "private static ArrayList<Integer> patternSearch(String s, String p){\n ArrayList<Integer> indexes = new ArrayList<>(); \n\n for(int i = 0 ; i < s.length() - p.length(); i++){\n\n if(s.substring(i, i + p.length()).equals(p)) indexes.add(i);\n\n\n }\n\n return indexes;\n }", "public int findSubstringInWraproundString(String p) {\n if(p == null || p.length() == 0) {\n return 0;\n }\n // count[i] is the maximum unique substring that ends with a...z\n int[] count = new int[26];\n // keep track of the number of consecutive letters ended with current letter\n int consecutiveCount = 1;\n for(int i = 0; i < p.length(); i++) {\n if(i > 0 && isConsecutive(p.charAt(i - 1), p.charAt(i))) {\n consecutiveCount++;\n } else {\n consecutiveCount = 1;\n }\n int index = p.charAt(i) - 'a';\n count[index] = Math.max(count[index], consecutiveCount);\n }\n int result = 0;\n for(int singleCount : count) {\n result += singleCount;\n }\n return result;\n }", "public List<Integer> partitionLabels(String S) {\n List<Integer> sizes = new ArrayList<>();\n\n int[] lastIndex = new int[26]; //cuz only lower case letters will be given to us\n\n //finding the lastIndexes of all the characters in the given string so that inside the loop start->end, we don't have to\n //do S.lastIndexOf('someCharacter') over & over cuz if we do that than the solution will be O(n^2) cuz string.lastIndexOf loops\n //through the string everytime it needs to find the last occurance & if the character happens to be at the end of the string\n //than it'll string.lastIndexOf would have to loop through the entire string over and over inside the start->end loop\n for(int i=0; i< S.length(); i++) {\n //subtracting the current character from a that's how we can map the lower case letters to an array of 26 Eg. 'a' -'a' = 0, 'b' -'a' = 1 so on and so forth. Otherwise we can also use an array of length 128 and loop from 97->122 but the array slots from 0->97 & 123->128 will be taking memory for nothing\n lastIndex[S.charAt(i) - 'a'] = i;\n }\n\n int start=0, end = 0, extendedEnd = 0;\n while(start < S.length()) {\n char startCharacter = S.charAt(start);\n end = lastIndex[startCharacter - 'a'];\n extendedEnd = end;\n\n for(int i=start; i<end; i++) {\n\n //checking if the current character that lies in the window start till end has last occurance index that's greater than current end, than we extend end.\n //NOTE: if we don't check the occurance like lastIndex[S.charAt(i)- 'a'] instead we check it like lastIndex[i], we won't be getting correct answer cuz lastIndex[] contains last occurances of characters from a-z\n //the characters in String S might not occur in the order a-z. They'll be jumbled across the string.\n //therefore in order to get the last occurance of current character, we do it like lastIndex[S.charAt(i)- 'a']\n if(lastIndex[S.charAt(i)- 'a'] > end) {\n extendedEnd = lastIndex[S.charAt(i)- 'a'];\n end = extendedEnd;\n }\n }\n\n sizes.add((extendedEnd - start + 1));\n start = extendedEnd + 1;\n }\n\n return sizes;\n }", "static int makeAnagram1(String a, String b) {\n int count = 0;\n Map<Character, Integer> mapA = initMap(a);\n Map<Character, Integer> mapB = initMap(b);\n\n Iterator<Character> it = mapA.keySet().iterator();\n while (it.hasNext()) {\n char c = it.next();\n int frequencyA = mapA.get(c);\n if (mapB.containsKey(c)) {\n int frequencyB = mapB.get(c);\n count += Math.abs(frequencyA - frequencyB);\n int min = Math.min(frequencyA, frequencyB);\n mapA.put(c, min);\n mapB.put(c, min);\n } else {\n count += frequencyA;\n }\n }\n\n it = mapB.keySet().iterator();\n while (it.hasNext()) {\n char c = it.next();\n int frequencyB = mapB.get(c);\n if (mapA.containsKey(c)) {\n int frequencyA = mapA.get(c);\n count += Math.abs(frequencyA - frequencyB);\n int min = Math.min(frequencyA, frequencyB);\n mapA.put(c, min);\n mapB.put(c, min);\n } else {\n count += frequencyB;\n }\n }\n return count;\n }", "private int createPosition (String s) {\r\n\t\tint x = 37;\r\n\t\tdouble hashCode=0;\r\n\t\tfor (int i=0; i<s.length(); i++) {\r\n\t\t\thashCode = (double) (hashCode+ (int)(s.charAt(s.length()-(i+1)))*(Math.pow(x,i)));\r\n\t\t}\r\n\t\treturn (int)(hashCode % size);\r\n\t}", "public ArrayList<ArrayList<Integer>> anagrams(final List<String> a) \n {\n //The idea here is simple we can make sure two strings are anagrams if we sort them and then check \n HashMap<String,ArrayList<Integer>> map=new HashMap<>();\n for(int i=0;i<a.size();i++)\n {\n char c[]=a.get(i).toCharArray();//pick every String\n Arrays.sort(c);//sort the string\n String s=new String(c);\n ArrayList<Integer> b;\n if(map.containsKey(s))//put its relative index in the HashMap\n {\n b=map.get(s);\n b.add(i+1);\n map.put(s,b);\n }\n else\n {\n b=new ArrayList<>();\n b.add(i+1);\n map.put(s,b);\n }\n }\n //Add the values of HashMap to ArrayList\n ArrayList<ArrayList<Integer>> ans=new ArrayList<>();\n for(Map.Entry<String,ArrayList<Integer>> it:map.entrySet())\n {\n ans.add(it.getValue());\n }\n \n return ans;\n }", "public boolean permutation(String s1, String s2) {\n if(s1.length()>s2.length()) return false;\n int s1_sum[] = new int[26];\n int s2_sum[] = new int[26];\n // initiate the sliding window\n for(int i =0; i< s1.length(); i++){\n s1_sum[s1.charAt(i)-'a']++;\n s2_sum[s2.charAt(i) - 'a']++;\n }\n int count = 0;\n for(int i = 0; i< 26; i++){\n if(s1_sum[i] == s2_sum[i]){\n count++;\n }\n }\n for(int j = 0; j<s2.length()-s1.length();j++) {\n int left = s2.charAt(j)-'a';\n int right = s2.charAt(j+s1.length()) - 'a';\n if(count == 26) return true;\n\n s2_sum[right]++;\n if(s2_sum[right] == s1_sum[right]){\n count++;\n } else if(s2_sum[right] = s1_sum[right]+1 ) {\n count--;\n }\n s2_sum[left]--;\n if(s2_sum[left]==s1_sum[left]) {\n count++;\n } else if(s2_sum[left] = s1_sum[left]-1){\n count--;\n }\n\n\n\n }\n return count==26;\n }", "static int makingAnagrams(String s1, String s2){\n // Complete this function\n StringBuilder b = new StringBuilder(s2);\n int delCount =0;\n for(int i=0;i<s1.length();i++){\n int index = b.indexOf(String.valueOf(s1.charAt(i)));\n if(index == -1){\n delCount++;\n }else{\n b.deleteCharAt(index);\n } \n }\n return delCount + b.length();\n }", "public static List<String> getAnagrams(List<String> strings)\n {\n /*Each character 'a'-'z' can be mapped to the nth prime number, where n is the index of\n the character in the alphabet. E.g. 'a': prime(0)=2, 'b': prime(1)=3, 'c': prime(2)=5, etc.\n Compute the product of the prime number mappings of the characters in s. Anagrams will have\n the same character product. Thus we can use the product as a key to a set of anagrams.*/\n\n Map<Long, Set<String>> map = new HashMap<Long, Set<String>>();\n\n for (String s : strings)\n {\n long prod = 1;\n for (char c : s.toCharArray())\n {\n prod *= (long) getCharToPrimeMap().get(c);\n }\n if (!map.containsKey(prod))\n {\n /*Key-value pair doesn't exist, so for the new key, create a new HashSet instance\n * for the new word (not yet an anagram match)*/\n map.put(prod, new HashSet<String>());\n }\n map.get(prod).add(s);\n }\n\n /*Add only the sets in the mapping with 2 or more elements (anagram match exists) to the result list*/\n List<String> result = new ArrayList<String>(map.size());\n for (Set<String> set : map.values())\n {\n if (set.size() > 1) result.addAll(set);\n }\n\n return result;\n }", "public void permutationOfString(String s, int start, int end){\n if(start == end && !hs.contains(s)){\n hs.add(s);\n System.out.println(s);\n return;\n }\n\n for(int i=start;i<=end;i++){\n s=swap(s,i,start);\n permutationOfString(s,start+1, end);\n s=swap(s,i,start);\n }\n\n }", "public static void main(String[] args) {\r\n\r\n\t\tSystem.out.println(\"string=\\\"ppqp\\\", pattern=\\\"pq\\\" output:[1,2] got : \" + findStringAnagrams(\"ppqp\", \"pq\"));\r\n\t\tSystem.out.println(\r\n\t\t\t\t\"string=\\\"abbcabc\\\", pattern=\\\"abc\\\" output:[2,3,4] got : \" + findStringAnagrams(\"abbcabc\", \"abc\"));\r\n\t}", "static int makeAnagram(String a, String b) {\n \n \tchar arr[] = a.toCharArray();\n char brr[] = b.toCharArray();\n Arrays.sort(arr);\n Arrays.sort(brr);\n Map<Character, Integer> aMap = new HashMap<>();\n Map<Character, Integer> bMap = new HashMap<>();\n for(int i =0 ;i <arr.length;i++){\n \tif(!aMap.containsKey(arr[i])){\n \t\taMap.put(arr[i], 1);\n \t}else{\n \t\taMap.put(arr[i], aMap.get(arr[i])+1);\n \t}\n }\n for(int i =0 ;i <brr.length;i++){\n \tif(!bMap.containsKey(brr[i])){\n \t\tbMap.put(brr[i], 1);\n \t}else{\n \t\tbMap.put(brr[i], bMap.get(brr[i])+1);\n \t}\n }\n int removeCharCount = 0;\n \n for(char ch = 'a'; ch<='z';ch++){\n \tif(aMap.containsKey(ch) && bMap.containsKey(ch)){\n \t\tif(aMap.get(ch) > bMap.get(ch)){\n \t\t\tint count = aMap.get(ch) - bMap.get(ch);\n \t\t\tremoveCharCount+=count;\n \t\t\taMap.put(ch, aMap.get(ch) - count);\n \t\t}else if(aMap.get(ch) < bMap.get(ch)){\n \t\t\tint count = bMap.get(ch) - aMap.get(ch);\n \t\t\tremoveCharCount+=count;\n \t\t\taMap.put(ch, bMap.get(ch) - count);\n \t\t}\n \t}else if(aMap.containsKey(ch) && !bMap.containsKey(ch)){\n \t\tint count = aMap.get(ch);\n \t\tremoveCharCount+=count;\n \t\taMap.remove(ch);\n \t}else if(!aMap.containsKey(ch) && bMap.containsKey(ch)){\n \t\tint count = bMap.get(ch);\n \t\tremoveCharCount+=count;\n \t\tbMap.remove(ch);\n \t}\n }\n /* if(removeCharCount == Math.min(arr.length, brr.length)){\n \treturn 0;\n }*/\n return removeCharCount;\n }", "public List<String> findRepeatedDnaSequences(String s) {\n if(s.length() < 10) return new ArrayList<String>();\n \n int[] map = new int[256];\n map['A'] = 0;\n map['T'] = 1;\n map['C'] = 2;\n map['G'] = 3;\n \n List<String> result = new ArrayList<String>();\n \n //this set contains string that occurs before\n Set<Integer> visited = new HashSet<Integer>();\n //this set contains string that we have inserted into result\n Set<Integer> inResult = new HashSet<Integer>();\n \n int key = 0;\n \n //Since we only partially modify the key, we need to firstly initialize it\n for(int i = 0; i < 9; i++){\n key <<= 2;\n key |= map[s.charAt(i)];\n }\n \n for(int i = 9; i < s.length(); i++){\n key <<= 2;\n key |= map[s.charAt(i)];\n //our valid key has 20 digits, we use 0xFFFFF to remove digits that beyong this range\n key &= 0xFFFFF;\n \n String temp = s.substring(i - 9, i+1);\n \n //if this is not the first time we visit this substring\n if(!visited.add(key)){\n //if this is the first time we add this substring into result\n if(inResult.add(key)){\n result.add(temp);\n }\n }\n }\n \n return result;\n }", "static int makeAnagram(String a, String b) {\n List<String> arr = new ArrayList<>(Arrays.asList(a.split(\"(?<!^)\")));\n List<String> arr2 = new ArrayList<>(Arrays.asList(b.split(\"(?<!^)\")));\n Iterator<String> iter = arr.iterator();\n \n while (iter.hasNext()) {\n String s = iter.next();\n\n if (arr2.contains(s)) {\n arr2.remove(arr2.indexOf(s));\n iter.remove();\n }\n }\n\n return (arr.size()) + (arr2.size());\n }", "public int minInsertions(String s) {\n int n = s.length();\n //Initialising dp array. It will represent the longest common subsequence between first i characters of first string and first j characters of second string\n int[][] dp = new int[n+1][n+1];\n \n //Looping through start and end of the string. Thus dp will consider the string from start and string from end and then store the ans\n for (int i = 0; i < n; ++i){\n for (int j = 0; j < n; ++j){\n \n //If both the characters are equal, then we increment the previous dp value otherwise we take max of the next character considered for both strings\n dp[i + 1][j + 1] = s.charAt(i) == s.charAt(n - 1 - j) ? dp[i][j] + 1 : Math.max(dp[i][j + 1], dp[i + 1][j]);\n } \n }\n //Returning ans\n return n - dp[n][n];\n }", "static int makeAnagram(String a, String b) {\n int[] arr1 = new int[26];\n int[] arr2 = new int[26];\n\n for (int i = 0; i < a.length() ; i++) {\n arr1[a.charAt(i) - 'a']++;\n }\n\n for (int i = 0; i < b.length(); i++)\n arr2[b.charAt(i) - 'a']++;\n\n int times = 0;\n for (int i = 0; i < 26; i++)\n times += Math.abs(arr1[i] - arr2[i]);\n\n\n return times;\n }", "private int dp(String s){\n\n int n = s.length();\n boolean[][] dp = new boolean[n][n];\n int[] cuts = new int[n];\n\n for(int i = 0; i < n; i ++){\n int min = i;\n for(int j = 0; j <= i; j ++){\n if(s.charAt(i) == s.charAt(j) && ( i - j < 2 || dp[i - 1][j + 1])){\n // String(j~i) is a palindrom\n //\n dp[i][j] = true;\n min = j == 0? 0 : Math.min(min, cuts[j - 1] + 1);\n }\n }\n cuts[i] = min;\n }\n return cuts[n - 1];\n }", "public boolean isAnagram(String s, String t) {\n if (s.length() != t.length()) return false; // O(1)\n int[] charFrequency = new int[26]; // O(1)\n\n for (char c : s.toCharArray()) { // O(N)\n int index = c - 'a'; // O(1)\n charFrequency[index]++; // O(1)\n }\n\n for (char c : t.toCharArray()) { // O(N)\n int index = c - 'a'; // O(1)\n if (charFrequency[index] == 0) return false; // O(1)\n charFrequency[index]--; // O(1)\n }\n\n for (int i : charFrequency) { // O(26) -> O(1)\n if (i > 0) return false; // O(1)\n }\n\n return true; // O(1)\n }", "static int makeAnagram(String a, String b) {\n int[] letters = new int[26];\n\n for (char c: a.toCharArray()){\n letters[c-'a']++;\n }\n\n for (char c: b.toCharArray()){\n letters[c-'a']--;\n }\n\n int sum = 0;\n\n for (int x:letters){\n sum+=Math.abs(x);\n }\n return sum;\n\n }", "private boolean checkPAnagrams(int[] mapElements, int[] pElements) {\n for (int i = 0; i < 26; i++) {\n if(mapElements[i]!=pElements[i])\n return false;\n }\n// System.out.println(\"check p anagrams :\" + (System.nanoTime() - startTime));\n return true;\n }", "public boolean containsAnagram(String s, String t) {\n\t\tint[] tmap = new int[26];\n\t\tfor (char c : t.toCharArray())\n\t\t\ttmap[c - 'A']++;\n\t\tint p1 = 0, p2 = 0;\n\t\tint minimumLen = Integer.MAX_VALUE;\n\t\tint expandedLength = t.length();\n\t\twhile (p1 < s.length() && p1 < s.length()) {\n\t\t\tif (tmap[s.charAt(p2++) - 'A']-- > 0) expandedLength--;\n\t\t\twhile (expandedLength == 0) {\n\t\t\t\tif (p2 - p1 < minimumLen) {\n\t\t\t\t\tminimumLen = p2 - p1;\n\t\t\t\t\tif (minimumLen == t.length()) return true;\n\t\t\t\t}\n\t\t\t\tif (p1 >= s.length()) break;\n\t\t\t\t// Exists in t.\n\t\t\t\tif (tmap[s.charAt(p1++) - 'A']++ == 0) expandedLength++;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static boolean isAnagram1(String s1, String s2) {\r\n int[] arr = new int[256]; //Number of Ascii Values\r\n\r\n for (int i = 0; i < s1.length(); i++) {\r\n arr[s1.charAt(i)]++;\r\n arr[s2.charAt(i)]--;\r\n }\r\n\r\n for (int i = 0; i < arr.length; i++) {\r\n if (arr[i] != 0) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }", "public static int[] manacherEven(String s) {\n int n = s.length();\n int[] ans = new int[n];\n for (int i = 0, l = 0, r = -1; i < n; i++) {\n int k = i > r ? 0 : Math.min(ans[l + r - i + 1], r - i + 1);\n while (i - k - 1 >= 0 && i + k < n && s.charAt(i - k - 1) == s.charAt(i + k)) k++;\n ans[i] = k--;\n if (i + k > r) {\n l = i - k - 1;\n r = i + k;\n }\n }\n return ans;\n }", "public List<List<String>> groupAnagrams(String[] strs) {\n Map<String, List<String>> map = new HashMap<>();\n StringBuilder sb = new StringBuilder();\n for (String currStr : strs) {\n int[] counts = new int[26];\n for (int i = 0; i < currStr.length(); i++)\n counts[currStr.charAt(i) - 97]++;\n sb.setLength(0);\n for (int i = 0; i < counts.length; i++)\n for (int j = 0; j < counts[i]; j++)\n sb.append('a' + i);\n\n map.computeIfAbsent(sb.toString(), k -> new LinkedList<>()).add(currStr);\n }\n\n return new LinkedList<>(map.values());\n }", "static\nint\ncountPairs(String str) \n\n{ \n\nint\nresult = \n0\n; \n\nint\nn = str.length(); \n\n\nfor\n(\nint\ni = \n0\n; i < n; i++) \n\n\n// This loop runs at most 26 times \n\nfor\n(\nint\nj = \n1\n; (i + j) < n && j <= MAX_CHAR; j++) \n\nif\n((Math.abs(str.charAt(i + j) - str.charAt(i)) == j)) \n\nresult++; \n\n\nreturn\nresult; \n\n}", "public List<List<String>> groupAnagramsApproach2(String[] strs) {\n\t\tif (strs.length == 0) return new ArrayList();\n\t\tMap<String, List> ans = new HashMap<String, List>();\n\t\tint[] count = new int[26];\n\t\tfor (String s : strs) {\n\t\t\tArrays.fill(count, 0);\n\t\t\tfor (char c : s.toCharArray()) count[c - 'a']++;\n\n\t\t\tStringBuilder sb = new StringBuilder(\"\");\n\t\t\tfor (int i = 0; i < 26; i++) {\n\t\t\t\tsb.append('#');\n\t\t\t\tsb.append(count[i]);\n\t\t\t}\n\t\t\tString key = sb.toString();\n\t\t\tif (!ans.containsKey(key)) ans.put(key, new ArrayList());\n\t\t\tans.get(key).add(s);\n\t\t}\n\t\treturn new ArrayList(ans.values());\n\t}", "public static ArrayList<String> getPerms(String s){\n\t\tArrayList<String> permutations = new ArrayList<String>();\n\t\t\n\t\tif(s==null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(s.length()==0){\n\t\t\tpermutations.add(\"\");\n\t\t\treturn permutations;\n\t\t}\n\t\t\n\t\t//firstly, choose the first char\n\t\tchar first = s.charAt(0);\n\t\t\n\t\t//store the remainder\n\t\tString remainder = s.substring(1);\n\t\t\n\t\t\n\t\t//using recursion\n\t\tArrayList<String> words = getPerms(remainder);\n\t\t\n\t\t//adding the first char to the result of the getPerms(remainder)\n\t\tfor(String word:words){\n\t\t\tfor(int i=0;i<=word.length();i++){\n\t\t\t\tpermutations.add(insertCharAt(word,first,i));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn permutations;\n\t}", "public void checkAnagram(String s, String s1) {\r\n\t\tint count=0;\r\n\t\tif(s.length()==s1.length()){\r\n\t\t\tfor(int i=0;i<s.length();i++){\r\n\t\t\t\tfor(int j=0;j<s1.length();j++){\r\n\t\t\t\t\tif(s.charAt(i)==s1.charAt(j)){\r\n\t\t\t\t\t\tcount++;\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\tif(count==s.length()){\r\n\t\t\tSystem.out.println(\"anagram\");\r\n\t\t}else\r\n\t\t\tSystem.out.println(\"not anagram\");\r\n\t}", "public static void main(String[] args) {\n\t\tStringBuilder sb=new StringBuilder();\n\t\tString str=\"xheixhixhi\";\n\t\tint x=0;\n\t\tfor(int i=0;i<str.length();i++)\n\t\t{\n\t\t\tif(str.charAt(i)=='x')\n\t\t\t\tx++;\n\t\t\n\t\t\telse\n\t\t\t\tsb.append(str.charAt(i));\n\t\t}\n\t\tfor(int i=0;i<x;i++)\n\t\t\tsb.append('x');\n\t\tSystem.out.println(sb);\n\t\t\n\t\tString str1=\"xxxyyy\";\n\t\tStringBuffer sb1=new StringBuffer(str1);\n\t\tSystem.out.println(sb1.toString());\n\t\tfor(int i=0;i<(str1.length());i++)\n\t\t{\n\t\t\tif(sb1.charAt(i)==sb1.charAt(i+1))\n\t\t\t{\n\t\t\t\tSystem.out.println(i);\n\t\t\t\tsb1.insert(++i,'*');\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\tSystem.out.println(sb1.toString());\n\t\t\n\t\t//anagram\n\t\tString s1=\"niveda\";\n\t\tString s2=\"Nivedas\";\n\t\tString s4=s2.toLowerCase();\n\t\tchar[] s3=s1.toCharArray();\n\t\tchar[] s5=s4.toCharArray();\n\t\tArrays.sort(s3);\n\t\tArrays.sort(s5);\n\t\tboolean result=Arrays.equals(s3, s5);\n\t\tSystem.out.println(\"result is \"+result);\n\t\t\n\t\t//check all digits\n\t\tString s=\"09779\";\n\t\tif (s.isEmpty())\n\t\t\tSystem.out.println(\"empty\");;\n\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\tint temp = s.charAt(i) - (int)'0';\n\t\tSystem.out.println(temp);\n\t\tif (temp < 0 || temp > 9)\n\t\t\tSystem.out.println(\"false\");\n\t\t\n\t\t}\n\n\t\tSystem.out.println(\"true\");\n\n\t\t//reverse a string\n\t\tString s6=\"niveda is\";\n\t\tString sb4=new StringBuffer(s6).reverse().toString();\n\t\tSystem.out.println(sb4);\n\t\t\n\t\tStringBuilder s7=new StringBuilder();\n\t\tchar[] c1=s6.toCharArray();\n\t\tfor(int i=c1.length-1;i>=0;i--)\n\t\t{\n\t\t\ts7.append(c1[i]);\n\t\t}\n\t\tSystem.out.println(s7);\n\t\t\n\t\t//replace with space\n\t\tString str5=\"xxx yyy\";\n\t\tStringBuilder sb6=new StringBuilder(str5);\n\t\tSystem.out.println(sb6.toString());\n\t\tfor(int i=0;i<(str5.length());i++)\n\t\t{\n\t\t\tif(sb6.charAt(i)==32)\n\t\t\t{\n\t\t\t\tSystem.out.println(i);\n\t\t\t\tsb6.replace(i,i+1,\"%20\");\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\tSystem.out.println(sb6.toString());\n\t\t\n\t\tString sentence=\"my name is niveda\";\n\t\tList< String> words = Arrays.asList(sentence.split(\"\\\\s\")); \n\t\tCollections.reverse(words); \n\t\t\n\t\tSystem.out.println(words);\n\t\tStringBuilder sb8 = new StringBuilder(sentence.length()); \n\t\t\n\t\tfor (int i = 0; i <=words.size() - 1; i++)\n\t\t{ \n\t\t\tsb8.append(words.get(i)); \n\t\t\t\n\t\tsb8.append(' ');\n\t\t}\n\t\tSystem.out.println(sb8.toString().trim());\n\t\t\n\t\tStringBuffer sb9=new StringBuffer(sentence);\n\t\tString sb10=sb9.reverse().toString();\n\t\tSystem.out.println(\"old \"+sb10.toString().trim());\n\t\t\n\t\tStringBuilder reverse = new StringBuilder(); \n\t\tString[] sa = sentence.trim().split(\"\\\\s\"); \n\t\tString newest=\"\";\n\t\tfor (int i = sa.length - 1; i >= 0; i--) \n\t\t{ \n\t\t\tString newword=sa[i]; \n\t\t\t//reverse.append(' '); \n\t\t\tString newstring=\"\";\n\t\t\tfor(int n=newword.length()-1;n>=0;n--)\n\t\t\t{\n\t\t\t\tnewstring=newstring+newword.charAt(n);\n\t\t\n\t\t\t}\n\t\t\tnewest=newest+newstring+\" \";\n\t\t} \n\t\tSystem.out.println( reverse.toString().trim());\n\t\tSystem.out.println(\"newest \"+newest);\n\t\tSystem.out.println(\"number of words in the string \"+sa.length);\n\n\t\t\n\t\t//reverse chars in the word in place\n\t\tString s11=\"my name is niveda\";\n\t\tString reversestring=\"\";\n\t\tString[] c11=s11.trim().split(\"\\\\s\");\n\t\tfor(int k=0;k<c11.length;k++)\n\t\t{\n\t\t\tString word=c11[k];\n\t\t\tString reverseword=\"\";\n\t\t\tfor(int m=word.length()-1;m>=0;m--)\n\t\t\t{\n\t\t\t\t\n\t\t\treverseword=reverseword+word.charAt(m);\n\t\t\t}\n\t\t\treversestring=reversestring+reverseword+\" \";\n\t\t}\n\t\t\n\t\tSystem.out.println( reversestring);\n\t}", "public ArrayList<String> anagrams(String[] strs) {\n HashMap<String, ArrayList<String>> rec=new HashMap<String,ArrayList<String>>();\n ArrayList<String> ans=new ArrayList<String>();\n if(strs.length==0)return ans;\n for(int i=0;i<strs.length;i++){\n char[] key=strs[i].toCharArray();\n Arrays.sort(key);\n String newkey=new String(key);\n if(rec.containsKey(newkey)){\n rec.get(newkey).add(strs[i]);\n }\n else{\n ArrayList<String> ad=new ArrayList<String>();\n ad.add(strs[i]);\n rec.put(newkey,ad);\n }\n }\n for(ArrayList<String> value:rec.values()){\n if(value.size()>1)ans.addAll(value);\n }\n return ans;\n }", "public List<List<String>> groupAnagrams_var2(String[] strs) {\n Map<Map<Character, Integer>, List<String>> map = new HashMap<>();\n for (String currStr : strs) {\n Map<Character, Integer> currMap = new HashMap<>();\n for (int i = 0; i < currStr.length(); i++)\n currMap.put(currStr.charAt(i), currMap.getOrDefault(currStr.charAt(i), 0) + 1);\n map.computeIfAbsent(currMap, k -> new LinkedList<>()).add(currStr);\n }\n\n return new LinkedList<>(map.values());\n }", "public int countPalindromicSubsequences(String s) {\n \n Integer[][][] memo = new Integer[s.length()][s.length()][4];\n \n int ans = 0;\n for (int i = 0; i < 4; i++) {\n ans = (ans + distinct(s, memo, 0, s.length() - 1, i)) % MOD;\n }\n \n return ans;\n }", "static String pangrams(String str) {\n boolean[] mark = new boolean[26]; \n \n int index=0; \n \n for (int i=0;i<str.length();i++) \n { \n \n if ('A'<=str.charAt(i) && str.charAt(i)<='Z') \n {\n index=str.charAt(i)-'A'; \n }\n \n else if ('a'<=str.charAt(i) && str.charAt(i)<='z') \n {\n index=str.charAt(i)-'a'; \n }\n \n else\n continue; \n mark[index]=true; \n } \n \n for (int i =0;i<=25;i++) \n {\n if (mark[i]==false) \n {\n return \"not pangram\";\n }\n }\n \n return \"pangram\";\n\n\n }", "private static void longestSubstringAllUnique(String s) {\n\t\tif(s == null || s.length() == 0) {\n\t\t\tSystem.out.println(\"\");\n\t\t\treturn;\n\t\t}\n\t\t//sliding window : 2 pointers (one is use for traverse)\n\t\tint l = 0;\n\t\tSet<Character> set = new HashSet<>();//keep track of current window char\n\t\tint longest = 0;\n\t\t\n\t\tfor(int r = 0; r < s.length(); r++) {\n//\t\t\tif(set.contains(s.charAt(r))) {\n//\t\t\t\twhile(set.contains(s.charAt(r))) {\n//\t\t\t\t\tset.remove(s.charAt(l));\n//\t\t\t\t\tl++;\n//\t\t\t\t}\n//\t\t\t}\n\t\t\t\n\t\t\twhile(set.contains(s.charAt(r))) {//set == itself give distinct key: our requirement is all distinct \n\t\t\t\tset.remove(s.charAt(l));\n\t\t\t\tl++;\n\t\t\t}\n\t\t\t\n\t\t\tset.add(s.charAt(r));\n\t\t\tint currentWindowSize = r - l + 1;\n\t\t\tlongest = Math.max(longest, currentWindowSize);\n\t\t}\n\t\tSystem.out.println(longest);\n\t}", "public static String minimumWindow_Map(String s, String t) {\n\t\tif(s==null || t==null || s.length()==0 || t.length()==0 || s.length()<t.length()) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tMap<Character, Integer> pmap = new HashMap<>();\n\t\t// initialize the pattern frequency map\n\t\tfor(int i=0;i<t.length();i++) {\n\t\t\tchar c = t.charAt(i);\n\t\t\tpmap.put(c, pmap.getOrDefault(c, 0)+1);\n\t\t}\n\n\t\tMap<Character,Integer> foundMap = new HashMap<>();\n\t\tint start = 0;\n\t\tint minLength = Integer.MAX_VALUE;\n\t\tint startIndex = -1;\n\t\tint count = 0;\n\t\t\n\t\tfor (int end = 0; end < s.length(); end++) {\n\t\t\tif (pmap.containsKey(s.charAt(end))) {\n\t\t\t\tfoundMap.put(s.charAt(end), foundMap.getOrDefault(s.charAt(end), 0) + 1);\n\t\t\t\tif (foundMap.get(s.charAt(end)) <= pmap.get(s.charAt(end))) {\n\t\t\t\t\t++count;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (count == t.length()) {\n\t\t\t\tchar c = s.charAt(start);\n\t\t\t\twhile (foundMap.getOrDefault(c, 0) > pmap.getOrDefault(c, 0) || !pmap.containsKey(c)) {\n\t\t\t\t\tif (foundMap.getOrDefault(c, 0) > pmap.getOrDefault(c, 0)) {\n\t\t\t\t\t\tfoundMap.put(c, foundMap.get(c) - 1);\n\t\t\t\t\t}\n\t\t\t\t\t++start;\n\t\t\t\t\tc = s.charAt(start);\n\t\t\t\t}\n\t\t\t\tint currentLength2 = end - start + 1;\n\t\t\t\tif (minLength > currentLength2) {\n\t\t\t\t\tminLength = currentLength2;\n\t\t\t\t\tstartIndex = start;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn startIndex==-1 ? \"\": s.substring(startIndex, startIndex+minLength) ;\n\t}", "public static List<String> anagrams(String[] strs) {\n ArrayList<String> ret = new ArrayList<String>();\n if (strs == null || strs.length == 0) return ret;\n HashMap<String, ArrayList<String>> map = new HashMap<String, ArrayList<String>>();\n for (int i = 0; i < strs.length; ++i) {\n String temp = strs[i];\n char[] chars = temp.toCharArray();\n Arrays.sort(chars);\n String sorted = new String(chars);\n if (map.containsKey(sorted)) {\n map.get(sorted).add(strs[i]);\n }\n else {\n ArrayList<String> list = new ArrayList<String>();\n list.add(strs[i]);\n map.put(sorted, list);\n }\n }\n Iterator<ArrayList<String>> iter = map.values().iterator();\n while (iter.hasNext()) {\n ArrayList<String> item = (ArrayList<String>)iter.next();\n if (item.size() > 1) {\n ret.addAll(item);\n }\n }\n return ret;\n }", "public boolean isAnagram(String s, String t) {\n HashMap<Character, Integer> map = new HashMap<>();\n\n // Return false if the strings are of different length\n if (s.length() != t.length()) {\n return false;\n }\n\n /**\n * Loop through the string and update the count in the hashmap in the following\n * way Increment the counter for the character from string1 Decrement the\n * counter for the character from string2\n */\n\n for (int i = 0; i < s.length(); i++) {\n map.put(s.charAt(i), map.getOrDefault(s.charAt(i), 0) + 1);\n map.put(t.charAt(i), map.getOrDefault(t.charAt(i), 0) - 1);\n }\n\n /**\n * Check if all characters in the hashmap as 0, if yes, return true, \n * else return false, as it isn't a valid anagram\n */\n\n for (Map.Entry mapElement : map.entrySet()) {\n\n if ((int) mapElement.getValue() != 0) {\n return false;\n }\n\n }\n\n return true;\n }", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString input1=sc.nextLine();\r\ninput1=input1.toLowerCase();\r\nint l=input1.length();\r\nchar a[]=input1.toCharArray();\r\nint d[]=new int[1000];\r\nString str=\"\";\r\nint i=0,k1=0,k2=0,m=0,c1=0,c2=0,c3=0,l1=0,u=0,u1=0;\r\nchar b[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\r\nfor(i=0;i<l;i++)\r\n{ c3=0;\r\n\tif(a[i]==' ')\r\n\t{u=i;c3=0;\r\n\t\tfor(k1=u1,k2=i-1;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tu1=i+1;\r\n\t\tc3=0;\r\n\t}\r\n\tif(i==l-1)\r\n\t{\r\n\t\tfor(k1=u+1,k2=i;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tk1=i+1;\r\n\t}\r\n}\r\n\r\n for(i=0;i<l1;i++)\r\n {\r\n\t str=str+Integer.toString(d[i]);\r\n }\r\n int ans=Integer.parseInt(str);\r\n System.out.print(ans);\r\n}", "private int[] hashpositions(String str) {\n\t\tint[] hashposition=new int[k];\n\t\tint hashcode;\n\t\tint index;\n\t\tMurmurHash3 hash=new MurmurHash3();\n\t\tfor(int i=1;i<=k;i++){\n\t\t\t\n\t\t\thashcode=hash.murmurhash3_x86_32(str, 0, str.length(), i);\n\t\t\tif(hashcode<0)\n\t\t\t\thashcode=~hashcode;\n\t\t\t\n\t\t\tindex= hashcode - (hashcode/m) * m;\n\t\t\t\n\t\t\thashposition[i-1]=index;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn hashposition;\n\t}", "public static void main(String[] args) {\n \n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n String[] p = new String[n];\n int[] counter = new int[n];\n for(int i = 0; i<n;i++ ){\n \tp[i] = input.next();\n \t\n \tint j = 0;\n \twhile(j<p[i].length()){\n \t\tint t =1;\n \t\tif(j + t < p[i].length()){\n \t\twhile(p[i].charAt(j) == p[i].charAt(j+t) ){\n \t\t\tt++;\n \t\t\tcounter[i]++;\n \t\t\tif(j+t >= p[i].length())\n \t\t\t\tbreak;\n \t\t\t\n \t\t}\n \t\t}\n \t\tj = j+t;\n \t\t\n \t\t\n \t\t\n \t}\n }\n \n for(int i= 0; i<n;i++){\n\t System.out.println(counter[i]);\n }\n \n \n \n input.close();\n }", "public int firstUniqChar(String s) {\n int n = s.length();\n int[] cnt = new int[26];\n int[] index = new int[26];\n Arrays.fill(index, n+1);\n \n // Keep the index \n for(int i=0; i<n; i++){\n cnt[s.charAt(i) - 'a']++;\n index[s.charAt(i) - 'a'] = i;\n }\n \n int minIndex = n+1;\n for(int i=0; i<26; ++i){\n if(cnt[i] > 1)\n continue;\n minIndex = Math.min(minIndex, index[i]);\n }\n return minIndex == n+1 ? -1 : minIndex;\n }", "public static int[] manacherOdd(String s) {\n int n = s.length();\n int[] ans = new int[n];\n for (int i = 0, l = 0, r = -1; i < n; i++) {\n int k = i > r ? 1 : Math.min(ans[l + r - i], r - i + 1);\n while (i - k >= 0 && i + k < n && s.charAt(i - k) == s.charAt(i + k)) k++;\n ans[i] = k--;\n if (i + k > r) {\n l = i - k;\n r = i + k;\n }\n }\n return ans;\n }", "public List<List<String>> groupAnagramsI(String[] strs) {\n\t\tList<List<String>> res = new ArrayList<>();\n\t\tif (strs == null || strs.length == 0) return res;\n\t\tint[] primes = new int[] {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103};\n\t\tMap<Integer, List<String>> map = new HashMap<>();\n\t\tfor (String str: strs) {\n\t\t\tint key = 1;\n\t\t\tfor (char c: str.toCharArray()) {\n\t\t\t\tkey *= primes[c - 'a'];\n\t\t\t}\n\t\t\tif (!map.containsKey(key)) map.put(key, new ArrayList<String>());\n\t\t\tmap.get(key).add(str);\n\t\t}\n\t\tfor (List<String> list: map.values()) {\n\t\t\tCollections.sort(list);\n\t\t\tres.add(list);\n\t\t}\n\t\treturn res;\n\t}", "public boolean anagram(char [] a, char [] b);", "private void start(Substring sub) {\n\t\tint i=0,j=0,k=0,l=0,m=0,n=0,sum=sub.n;\n\t\tfor(i=1;i<sub.n;i++)\n\t\t{\n\t\t\tfor(j=0,l=i;l<sub.n;j++,l++)\n\t\t\t{\n\t\t\t\t//HashMap<Integer,Integer> map=new HashMap<Integer,Integer>();\n\t\t\t\tint[]count=new int[10000];\n\t\t\t\t\t\tfor(m=j;m<=l;m++) {\n\t\t\t\t\t\t\tcount[sub.arr[m]]++;\n\t\t\t\t\t\t\tif(count[sub.arr[m]]<=1) {continue;}\n\t\t\t\t\t\t\telse break;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\tif(m==l+1)sum=sum+i+1;\t\t\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t\n\t}", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString s1=sc.nextLine();\r\nString s2=sc.nextLine();\r\ns1=s1.replaceAll(\"\\\\s\",\"\");\r\ns2=s2.replaceAll(\"\\\\s\",\"\");\r\ns1=s1.toLowerCase();\r\ns2=s2.toLowerCase();\r\nchar str1[]=s1.toCharArray();\r\nchar str2[]=s2.toCharArray();\r\nArrays.sort(str1);\r\nArrays.sort(str2);\r\nboolean k=true;\r\nif(s1.length()!=s2.length())\r\n\tk=false;\r\nelse\r\n{\r\nk=Arrays.equals(str1,str2);\t\r\n}\r\nif(k==false)\r\n\tSystem.out.print(\"not annagram\");\r\nelse\r\n\tSystem.out.print(\"annagram\");\r\n\t}", "public static void main(String [] args) {\n\t\tString str = \"ccacacabccacabaaaabbcbccbabcbbcaccabaababcbcacabcabacbbbccccabcbcabbaaaaabacbcbbbcababaabcbbaa\"\n\t\t\t\t+ \"ababababbabcaabcaacacbbaccbbabbcbbcbacbacabaaaaccacbaabccabbacabaabaaaabbccbaaaab\"\n\t\t\t\t+ \"acabcacbbabbacbcbccbbbaaabaaacaabacccaacbcccaacbbcaabcbbccbccacbbcbcaaabbaababacccbaca\"\n\t\t\t\t+ \"cbcbcbbccaacbbacbcbaaaacaccbcaaacbbcbbabaaacbaccaccbbabbcccbcbcbcbcabbccbacccbacabcaacbcac\"\n\t\t\t\t+ \"cabbacbbccccaabbacccaacbbbacbccbcaaaaaabaacaaabccbbcccaacbacbccaaacaacaaaacbbaaccacbcbaaaccaab\"\n\t\t\t\t+ \"cbccacaaccccacaacbcacccbcababcabacaabbcacccbacbbaaaccabbabaaccabbcbbcaabbcabaacabacbcabbaaabccab\"\n\t\t\t\t+ \"cacbcbabcbccbabcabbbcbacaaacaabb\"\n\t\t\t\t+ \"babbaacbbacaccccabbabcbcabababbcbaaacbaacbacacbabbcacccbccbbbcbcabcabbbcaabbaccccabaa\"\n\t\t\t\t+ \"bbcbcccabaacccccaaacbbbcbcacacbabaccccbcbabacaaaabcccaaccacbcbbcccaacccbbcaaaccccaabacabc\"\n\t\t\t\t+ \"abbccaababbcabccbcaccccbaaabbbcbabaccacaabcabcbacaccbaccbbaabccbbbccaccabccbabbbccbaabcaab\"\n\t\t\t\t+ \"cabcbbabccbaaccabaacbbaaaabcbcabaacacbcaabbaaabaaccacbaacababcbacbaacacccacaacbacbbaacbcbbbabc\"\n\t\t\t\t+ \"cbababcbcccbccbcacccbababbcacaaaaacbabcabcacaccabaabcaaaacacbccccaaccbcbccaccacbcaaaba\";\n\t\tSystem.out.println(substrCount2(1017, str));\n\t}", "static int makeAnagram(String a, String b) {\r\n int[] charCount = new int[26];\r\n int deletions = 0;\r\n\r\n for(char c : a.toCharArray()) {\r\n charCount[c-'a'] += 1;\r\n }\r\n for(char c : b.toCharArray()) {\r\n charCount[c-'a'] -= 1;\r\n }\r\n for(int count : charCount) {\r\n deletions += Math.abs(count);\r\n }\r\n return deletions;\r\n }", "public static int[] lcp(int[] sa, CharSequence s) {\n int n = sa.length;\n int[] rank = new int[n];\n for (int i = 0; i < n; i++)\n rank[sa[i]] = i;\n int[] lcp = new int[n - 1];\n for (int i = 0, h = 0; i < n; i++) {\n if (rank[i] < n - 1) {\n for (int j = sa[rank[i] + 1]; Math.max(i, j) + h < s.length()\n && s.charAt(i + h) == s.charAt(j + h); ++h)\n ;\n lcp[rank[i]] = h;\n if (h > 0)\n --h;\n }\n }\n return lcp;\n }", "public void permutation2(String s){\r\n\t\tHashMap<Character,Integer> m = new HashMap<Character, Integer>();\r\n\t\tfor(int i=0;i<s.length();i++){\r\n\t\t\tif(m.containsKey(s.charAt(i))){\r\n\t\t\t\tint val = m.get(s.charAt(i));\r\n\t\t\t\tm.put(s.charAt(i), ++val);\r\n\t\t\t}else{\r\n\t\t\t\tm.put(s.charAt(i), 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\tint [] count = new int[m.size()];\r\n\t\tchar [] str = new char[m.size()];\r\n\t\tint index = 0;\r\n\t\tfor(Map.Entry<Character, Integer> entry: m.entrySet()){\r\n\t\t\tcount[index] = entry.getValue();\r\n\t\t\tstr[index] = entry.getKey();\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\tpermUtil(str,count,0,new char[s.length()]);\r\n\t}", "public static int isAnagram(String st,String st1) {\n\t\tint k=0;\n\t\tString str=remove(st);\n\t\tString str1=remove(st1);\n\t\t/*if(str.length()!=str1.length()){\n\t\t\tk=1;\n\t\t\treturn k;\n\t\t}*/\n\t\tchar[] c=toLowercase(str);\n\t\tchar[] c1=toLowercase(str1);\n\t\tchar[] stt=sort(c);\n\t\tchar[] stt1=sort(c1);\n\t\t/*for(int i=0;i<stt.length;i++)\n\t\t\tSystem.out.print(stt[i]);\n\t\tSystem.out.println();\n\t\tfor(int i=0;i<stt1.length;i++)\n\t\t\tSystem.out.print(stt1[i]);\n\t\tSystem.out.println();*/\n\t\tfor(int i=0;i<stt1.length;i++){\n\t\tif(stt[i]==stt1[i])\n\t\t\tk=1;\n\t\t}\n\t\treturn k;\n\t}", "public static int lengthOfLongestSubstring(String s) \r\n {\r\n \tif (s.length()==0) \r\n \t\treturn 0;\r\n \t\r\n HashMap<Character, Integer> map = new HashMap<Character, Integer>();\r\n int length = 0;\r\n int start = 0;\r\n \r\n for (int end=0; end < s.length(); end++)\r\n {\r\n \t// When we have reached a repeated character, then the currently held string is potentially the largest string.\r\n \t// If the character is there in the map, start needs to be changed. \r\n \t// If it is not there, start remains the same so that it can increase the count\r\n if (map.containsKey(s.charAt(end)))\r\n {\r\n \t// Consider input as abba. For b[2], start < map.get(s.charAt(end)) + 1 \r\n \t// For b[3], start > map.get(s.charAt(end)) + 1. It means, if the character has occured towards the beginning, we dont want the start to be modified.\r\n \tstart = Math.max(start, map.get(s.charAt(end)) + 1);\r\n } \r\n \r\n map.put(s.charAt(end), end);\r\n \r\n // Why +1? Lets say start=2, end=5. Then the length will be 5-2=3. And, 3+1 = 4.\r\n length = Math.max(length, end-start+1);\r\n \r\n }\r\n return length;\r\n }", "static int makeAnagram(String a, String b) {\n int[] frequencyA = countFrequency(a);\n int[] frequencyB = countFrequency(b);\n\n int count = 0;\n\n for (int i = 0; i < frequencyA.length; i++) {\n count += Math.abs(frequencyA[i] - frequencyB[i]);\n }\n return count;\n }", "public static String isPanagram(String inputString) {\n\t\tchar[] inputStringChars = inputString.toCharArray();\n\t\tchar[] alphabets = new char[26];\n\t\tfor (int i = 0; i < inputStringChars.length; i++) {\n\t\t\tif ((inputStringChars[i] - 65) >= 0 && (inputStringChars[i] - 65) <= 97) {\n\t\t\t\talphabets[inputStringChars[i] - 65] = '1';\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < alphabets.length; i++) {\n\t\t\tif (alphabets[i] == '\\u0000') {\n\t\t\t\treturn \"not pangram\";\n\t\t\t}\n\t\t}\n\t\treturn \"pangram\";\n\t}", "public static void main(String[] args) {\n\t\tString s = \"aabacbebebe\";\n\n\t\tSystem.out.println(\"Given String : \" + s);\n\n\t\tSystem.out.println(\"Longest Substring Using Set (2-pointer) : \"\n\t\t\t\t+ lengthOfLongestSubstringUsingSet(s));\n\t\tSystem.out.println(\"Longest Substring Using Sliding Window : \"\n\t\t\t\t+ longestStringWithNoRepeatingChars(s));\n\n\t\tSystem.out.println(\"\\n ===== Longest string with 2 distinct characters ===== \");\n\t\tSystem.out.println(\"Original String : \" + s);\n\t\tSystem.out\n\t\t\t\t.println(\"Length of Longest Substring with at most 2 distinct characters: \"\n\t\t\t\t\t\t+ longestStringWithTwoDistinctChars(s));\n\n\t\tSystem.out.println(\"\\n ===== Longest string with K distinct characters ===== \");\n\n\t\tPair<Integer, Pair<Integer, Integer>> pair = longestStringWithKDistinctChars(s, 3);\n\t\tSystem.out.print(\"Longest Substring length with 3 Distinct Chars : \");\n\t\tSystem.out.print(pair.getKey() + \", \" + pair.getValue().getKey() + \" \"\n\t\t\t\t+ pair.getValue().getValue());\n\n\t\tif (pair.getValue().getKey() != -1)\n\t\t\tSystem.out.println(\", \"\n\t\t\t\t\t+ s.substring(pair.getValue().getKey(), pair.getValue()\n\t\t\t\t\t\t\t.getValue() + 1));\n\t\telse\n\t\t\tSystem.out.println(\", Empty String\");\n\t\t\n\t\tSystem.out.println(\"\\n ===== Longest string with K distinct characters (AS approach) ===== \");\n\n\t\tPair<Integer, Pair<Integer, Integer>> pair1 = longestStringWithKDistinctCharsAS(s, 3);\n\t\tSystem.out.print(\"Longest Substring length with 3 Distinct Chars : \");\n\t\tSystem.out.print(pair1.getKey() + \", \" + pair1.getValue().getKey() + \" \"\n\t\t\t\t+ pair1.getValue().getValue());\n\n\t\tif (pair1.getValue().getKey() != -1)\n\t\t\tSystem.out.println(\", \"\n\t\t\t\t\t+ s.substring(pair1.getValue().getKey(), pair1.getValue()\n\t\t\t\t\t\t\t.getValue() + 1));\n\t\telse\n\t\t\tSystem.out.println(\", Empty String\");\n\n\t\tSystem.out.println(\"\\n ===== Longest string with no repeating characters ===== \");\n\n\t\ts = \"abcabcbb\";\n\t\tSystem.out.print(\"For string: \" + s);\n\t\tSystem.out.print(\"; Method Other: \"\n\t\t\t\t+ longestStringWithNoRepeatingChars(s));\n\t\tSystem.out.println(\"; AS: \" + longestStringWithNoRepeatingCharsAS(s));\n\n\t\ts = \"bbbbb\";\n\t\tSystem.out.print(\"For string: \" + s);\n\t\tSystem.out.print(\"; Method Other: \"\n\t\t\t\t+ longestStringWithNoRepeatingChars(s));\n\t\tSystem.out.println(\"; AS: \" + longestStringWithNoRepeatingCharsAS(s));\n\n\t\ts = \"pwwkew\";\n\t\tSystem.out.print(\"For string: \" + s);\n\t\tSystem.out.print(\"; Method Other: \"\n\t\t\t\t+ longestStringWithNoRepeatingChars(s));\n\t\tSystem.out.println(\"; AS: \" + longestStringWithNoRepeatingCharsAS(s));\n\t}", "private static int solution4(String s) {\r\n int n = s.length(), ans = 0;\r\n Map<Character, Integer> map = new HashMap<>();\r\n for (int j = 0, i = 0; j < n; j++) {\r\n if (map.containsKey(s.charAt(j)))\r\n i = Math.max(map.get(s.charAt(j)), i);\r\n ans = Math.max(ans, j - i + 1);\r\n map.put(s.charAt(j), j + 1);\r\n }\r\n return ans;\r\n }", "private static List<List<String>> groupAnagrams(String[] strs) {\n List<List<String>> result = new ArrayList<List<String>>();\n\n HashMap<Integer, ArrayList<String>> map = new HashMap<Integer, ArrayList<String>>();\n for(String str: strs){\n int key = 0;\n for(int i=0; i<str.length(); i++){\n key = key + (str.charAt(i)-'a');\n }\n\n if(map.containsKey(key)){\n map.get(key).add(str);\n }else{\n ArrayList<String> al = new ArrayList<String>();\n al.add(str);\n map.put(key, al);\n }\n }\n\n result.addAll(map.values());\n\n return result;\n }", "public static void main(String[] args) {\n\t\tint p[]=new int[200];\n\t\tint n;int count=0;\n\t\tint pp=0;\n\t\tfor(int i=2;i<1000;i++) {\n\t\t\tint flag=1;\n\t\t\tfor(int j=2;j<i;j++) {\n\t\t\t\tif(i%j==0) {\n\t\t\t\t\tflag++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t//checking if flag is 0 or not\t\n\t\t\t}if(flag==1) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(i);\n\t\t\t \n\t\t\t\tp[pp]=i;\n\t\t\t pp++;\n\t\t\t count++;\n\t\t\t}\n\t}\n\t\tn=count;\n\t//for(int i=0;i<p.length;i++) {\n\t//if(p[i]!=0)\n\t //System.out.println(p[i]);\n\t//}\n\tint k=0;\n\tint count1=0;\n\tboolean b=false;\n\tint aa[]=new int[200];\t\n\t//calling my stack class \n\tMyStack m=new MyStack();\n\n\tfor(int i=0;i<p.length-2;i++) {\n\t\tfor(int j=i+1;j<p.length;j++) {\n\t\tif(p[i]!=0&&p[j]!=0)\n\t\t//calling check method anagram calss\t\n\t\t\tb=AnaQueue.check(p[i],p[j]);\n\t\tif(b==true) {\n\t\t\tSystem.out.println(p[i]+\" \"+p[j]);\n\t\t\taa[k]=p[i];\n\t\t\tm.push(p[i]);\n\t\t//\tSystem.out.println(aa[k]);\n\t\t\tk++; \n\t\t\taa[k]=p[j];\n\t\t\tk++;\n\t\t\tm.push(p[j]);\n\t\t\tcount1++;\n//\t\t\tif(p[i]==aa[k-2]) {\n//\t\t\t\tSystem.out.println(p[i]+\" \"+aa[k-2]);\n//\t\t\t}\n\t\t//\tSystem.out.println(aa[k]);\n\t\t//\tSystem.out.println(aa[k-1]+\" \"+aa[k-2]);\n\t\t\t\t}\n\t\t}\n\n\n\t}\n\t//for(int i=0;i<count1*2;i++)\n\t//{int a=m.popint();\n\t//if(p[i]!=0)\n\t\t//System.out.println(a);\n\t//}\n\t//for(int t=0;t<aa.length;t++) {\n\t\t//if(aa[t]!=0) {\n\t\t//\tSystem.out.println(aa[t]);\n\t\t//}\n\t//}\n\tSystem.out.println(\"this is for stack\");\n\tSystem.out.println(\" ************************\");\n\n\tm.reverse();\n\t System.out.println(count1); \n\tSystem.out.println(\"this for queue\");\n\tSystem.out.println(\" ************************\");\n\tMyQueue mq=new MyQueue(count1*2);\n\tfor(int i=0;i<p.length-2;i++) {\n\t\tfor(int j=i+1;j<p.length;j++) {\n\t\tif(p[i]!=0&&p[j]!=0)\n\t\t\tb=AnaQueue.check(p[i],p[j]);\n\t\tif(b==true) {\n\t\t\t//System.out.println(p[i]+\" \"+p[j]);\n\t\t\t//aa[k]=p[i];\n\t\t\tmq.enqueue(p[i]);\n\t\t//\tSystem.out.println(aa[k]);\n\t\t\t//k++; \n\t\t\t//aa[k]=p[j];\n\t\t\t//k++;\n\t\t\tmq.enqueue(p[j]);\n\t\t\t\n//\t\t\tif(p[i]==aa[k-2]) {\n//\t\t\t\tSystem.out.println(p[i]+\" \"+aa[k-2]);\n//\t\t\t}\n\t\t//\tSystem.out.println(aa[k]);\n\t\t//\tSystem.out.println(aa[k-1]+\" \"+aa[k-2]);\n\t\t\t\t}\n\t\t}\n\n\n\t}\n\t//for(int i=0;i<(count1*2)-1;i++);\n\t//{\n\t//int a=mq.dequeue();\n\t//System.out.println(a);\n\t//}\n\tSystem.out.println(mq);\n\n\n\t}", "private static String minWindowCaseII(String s, String t) {\n if(s.length() == 0 || t.length() == 0) {\n return \"\";\n }\n\n HashMap<Character, Integer> uniqueCharsInT = new HashMap<>();\n HashMap<Character, Integer> uniqueCharsInCurrWindowInS = new HashMap<>();\n\n for(char c : t.toCharArray()) {\n uniqueCharsInT.put(c, uniqueCharsInT.getOrDefault(c, 0) + 1);\n }\n\n List<Pair<Integer, Character>> filteredS = new ArrayList<>();\n for(int i = 0; i < s.length(); i++) {\n if(uniqueCharsInT.containsKey(s.charAt(i))) {\n filteredS.add(new Pair<>(i, s.charAt(i)));\n }\n }\n int[] ans = new int[] {-1, 0, 0}; // window length, left, right\n int left = 0, right = 0, uniqueCharsInTCount = uniqueCharsInT.size(), uniqueCharsInCurrWindowCount = 0;\n\n\n while(right < filteredS.size()) {\n char rightChar = filteredS.get(right).getValue();\n uniqueCharsInCurrWindowInS.put(rightChar, uniqueCharsInCurrWindowInS.getOrDefault(uniqueCharsInCurrWindowInS, 0) + 1);\n\n if(uniqueCharsInT.get(rightChar).intValue() == uniqueCharsInCurrWindowInS.get(rightChar).intValue()) {\n uniqueCharsInCurrWindowCount++;\n }\n\n while(left <= right && uniqueCharsInCurrWindowCount == uniqueCharsInTCount) {\n char leftChar = filteredS.get(left).getValue();\n\n int start = filteredS.get(left).getKey();\n int end = filteredS.get(right).getKey();\n if(ans[0] == -1 || end - start + 1 < ans[0]) {\n ans[0] = end - start + 1;\n ans[1] = start;\n ans[2] = end;\n }\n\n uniqueCharsInCurrWindowInS.put(leftChar, uniqueCharsInCurrWindowInS.get(leftChar) - 1);\n if(uniqueCharsInT.containsKey(leftChar) && uniqueCharsInT.get(leftChar).intValue() > uniqueCharsInCurrWindowInS.get(leftChar).intValue()) {\n uniqueCharsInCurrWindowCount--;\n }\n\n left++;\n }\n\n right++;\n }\n\n return ans[0] == -1 ? \"\" : s.substring(ans[1], ans[2] + 1);\n }", "public int minCuts(String input) {\n if (input.length() <= 1) {\n return 0;\n }\n int n = input.length();\n char[] arr = input.toCharArray();\n int[] minCut = new int[n + 1];\n\n // preproces, isP[start][end] represent if substring start - 1][end -1] is P\n // a string is P: single char; two char and same; same char at out + inner isP opp direction\n boolean [][] isP = new boolean[n + 1][n + 1];\n for (int e = 1; e < n + 1; e++) {\n minCut[e] = e - 1;\n for (int s = e; s > 0; s--) {\n if (arr[s - 1] == arr[e - 1]) {\n isP[s][e] = e - s < 2 || isP[s + 1][e - 1];\n }\n if (isP[s][e]) {\n minCut[e] = Math.min(minCut[e], minCut[s - 1] + 1);\n }\n }\n }\n return minCut[n];\n\n }", "public static void main(String[] args)\n {\n String string = \"101101101\";\n int[][] dp = new int[string.length()+1][string.length() +1];\n int len = string.length();\n for (int i=0 ; i<= len ;i++) {\n for (int j=0 ;j<=len ;j++) {\n dp[i][j] = -1;\n }\n }\n System.out.println(minPartitions(string, 0, string.length() -1, dp));\n }", "public int firstUniqChar2(String s) {\r\n \r\n char[] arr= s.toCharArray();\r\n int index = -1;\r\n HashMap<Character, Integer> map = new HashMap<>();\r\n \r\n for (int i=0;i<arr.length;i++){\r\n if (map.containsKey(arr[i])){\r\n map.put(arr[i], -1);\r\n } else {\r\n map.put(arr[i],i);\r\n }\r\n }\r\n \r\n for (int i : map.values()){\r\n if (i >-1){\r\n if (index == -1){\r\n index = i;\r\n } else if (i<index) {\r\n index = i; \r\n }\r\n \r\n }\r\n }\r\n \r\n return index;\r\n }", "public static List<String> findRepeatedDnaSequences(String s) {\n \tList<String> re=new ArrayList<String>();\n \tif(s.length()<=10){\n \t\treturn re;\n \t}\n \tMap<String, Integer> map=new HashMap<String, Integer>(); \t\n \tfor(int i=10; i<=s.length(); i++){\n \t\tString k=s.substring(i-10, i);\n \t\tif(map.containsKey(k)){\n \t\t\tint val=map.get(k);\n \t\t\tif(val==1){\n \t\t\t\tre.add(k);\n \t\t\t}\n \t\t\tmap.put(k, val+1);\n \t\t}else{\n \t\t\tmap.put(k, 1);\n \t\t}\n \t}\n \treturn re;\n }", "public int getIndex(String s){\r\n int b = 1;\r\n int l = hashFunction(s);\r\n if(table[l].getKey().equals(s)){\r\n return l;\r\n }\r\n else{\r\n while(table[l + b*b] != null){\r\n if(table[l].getKey().equals(s)){\r\n break;\r\n }\r\n else{\r\n b++;\r\n } \r\n }\r\n if(table[l].getKey().equals(s)){\r\n return l;\r\n }\r\n else{\r\n return 0;\r\n }\r\n }\r\n }", "public Stack<String> primeAnagram1() \n\t\t{\n\t\t\tStack<String> stack = new Stack<String>(); \t\t\t\n\t\t\tArrayList<String> arr = Utility. primeNumbers(1000);\n\t\t\t\tfor(int i=0; i<arr.size()-1; i++) \n\t\t\t\t{\n\t\t\t\tfor(int j=i+1; j<arr.size(); j++) \n\t\t\t\t{\n\t\t\t\t\tif(Utility.isAnagram(String.valueOf(arr.get(i)),String.valueOf(arr.get(j)))) \n\t\t\t\t\t{ \n\t\t\t\t\t\tstack.push(String.valueOf(arr.get(i))); \n\t\t\t\t\t\tstack.push(String.valueOf(arr.get(j)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\treturn stack;\n\t\t}", "public int fromBeginning(String str) {\n if(str == null || str.length() == 0)\n return 0;\n char[] ca = str.toCharArray();\n int res = 0, pre = 0;\n for(char c : ca) {\n res += map.get(c);\n if(pre != 0 && pre < map.get(c))\n res -= 2 * pre;\n pre = map.get(c);\n }\n return res;\n }", "public static String minWindow(String s, String t) \n {\n String ans = \"\";\n int[] ascii = new int[128]; // fill the ascii, \n for(char e: t.toCharArray())\n {\n \t ascii[e]++; // letters in String T contribute positive value to the ascii array\n }\n \n int counter = t.length(), begin = 0, end = 0,minLen = Integer.MAX_VALUE, head = 0;\n// we need to keep track of the letter left in t, where it starts and where it end.\n while(end<s.length())\n {\n \t if(ascii[s.charAt(end)]>0) \n \t {\n \t\t counter--; // find one letter from String t in String s, counter--,\n \t }\n \t ascii[s.charAt(end)]--; // letters in String S contribute negative value to the ascii array\n\t\t end++; // keep moving end to the last index of String s. \n\t\t // end index records the last index of the possible window.\n \t\t \n/*\n * once the letters in t are all traversed, counter should be zero, and we have found a possible window\n * the while loop below is to update the begin index of the window\n * while ascii[char] is above 0, which means a letter in string T is found in string S\n * then counter++ and letters in String S \n * after a possible window is found now contribute positive values to ascii\n * while traverse each letter in String, update the length of minimum window. \n * \n */\n \t while(counter ==0) \n \t { \n \t\t if(end - begin < minLen)\n \t\t {\n \t\t\t head = begin;\n \t\t\t minLen = end-begin;\n \t\t }\n \t\t \n \t\t ascii[s.charAt(begin)]++;\n \t\t if(ascii[s.charAt(begin)]>0)\n \t\t {\n \t\t\t counter++;\n \t\t }\n \t\t begin++;\n \t }\n }\n \n if(minLen != Integer.MAX_VALUE)\n \t ans = s.substring(head, head+minLen);\n return ans;\n }", "public void getPermutation(String s1,int start,int end){\n\t\tif(start==end-1) {\n\t\t\tSystem.out.println(s1);\n\t\t}\n\t\telse {\n\t\t\tfor(int i=start;i<end;i++) {\n\t\t\t\ts1=swap(s1,start,i);\n\t\t\t\t//calling recursive function \n\t\t\t\tgetPermutation(s1,start+1,end);\n\t\t\t\ts1=swap(s1,start,i);\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private boolean isAnagrams(String s1, String s2) {\n char[] ss1 = s1.toCharArray();\n \n char[] ss2 = s2.toCharArray();\n \n Arrays.sort(ss1);\n Arrays.sort(ss2);\n return ss1.equals(ss2);\n\n }", "private static int solution2(String s) {\r\n int n = s.length();\r\n int ans = 0;\r\n for (int i = 0; i < n; i++)\r\n for (int j = i + 1; j <= n; j++)\r\n if (allUnique(s, i, j)) ans = Math.max(ans, j - i);\r\n return ans;\r\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while(true){\n try{\n \tint n=sc.nextInt();\t\n }\n catch(Exception e){\n break;\n }\n String p=sc.next();\n String t1=sc.next();\n char text[]=t1.toCharArray();\n char pat[]=p.toCharArray();\n if(p.length()>t1.length()){\n System.out.println();\n }\n else {\n int f[]=new int[pat.length];\n f[0]=0;\n int j=0;\n for(int i=1;i<pat.length;){\n if(pat[i]==pat[j]){\n f[i]=j+1;\n i++;\n j++;\n }\n else {\n if(j>0){\n j=f[j-1];\n }\n else {\n f[i]=0;\n i++;\n }\n }\n }\n int i=0;\n j=0;\n boolean b=false;\n while(i<text.length&&j<pat.length){\n if(pat[j]==text[i]){ \n i++;\n j++;\n if(j==pat.length){\n System.out.println(i-pat.length);\n b=true;\n j=f[j-1];\n }\n }\n else if(j>0){ \n j=f[j-1];\n }\n else {\n i++;\n }\n }\n if(!b) {\n System.out.println();\n }\n System.out.println();\n \n }\n }\n }", "public List<List<String>> groupAnagrams(String[] strs) {\n \n int len = strs.length;\n Hashtable<String, List<String>> anagrams = new Hashtable<>();\n \n for(int i=0; i<len; i++){\n char[] sorted = strs[i].toCharArray(); \n Arrays.sort(sorted);\n String key = String.valueOf(sorted);\n List<String> temp = new ArrayList<>();\n \n if(anagrams.containsKey(key)){\n temp = anagrams.get(key);\n \n }\n temp.add(strs[i]);\n anagrams.put(key, temp);\n }\n \n \n List<List<String>> answer = new ArrayList<>();\n \n for(List<String> item: anagrams.values() ){\n answer.add(item);\n }\n \n return answer;\n \n }", "public static int solution(String s) {\n if (s == null || s.length() == 0) {\n return 0;\n }\n if (s.length() == 1) {\n return 1;\n }\n int result = 0;\n int index = 0;\n Map<Character, Integer> map = new HashMap<Character, Integer>();\n while (index < s.length()) {\n char temp = s.charAt(index);\n if (!map.containsKey(temp)) {\n map.put(temp, index);\n index++;\n } else {\n int start = map.get(temp);\n index = start + 1;\n if (map.size() > result) {\n result = map.size();\n }\n map.clear();\n }\n }\n if (map.size() > result) {\n result = map.size();\n }\n return result;\n }", "static boolean areAnagram(String sa, String sb) {\n\n // **** populate character arrays ****\n char[] aa = sa.toCharArray();\n char[] ab = sb.toCharArray();\n\n // **** sort character arrays ****\n Arrays.sort(aa);\n Arrays.sort(ab);\n\n // **** traverse arrays checking for mismatches ****\n for (int i = 0; i < aa.length; i++) {\n if (aa[i] != ab[i]) {\n return false;\n }\n }\n\n // **** strings are anagrams ****\n return true;\n }", "public static void main(String[] args) {\n\t\tAnagrams q = new Anagrams();\r\n\t\tString s1 = \"abcd\";\r\n\t\tString s2 = \"acbd\";\r\n\t\tString s3 = \"bcad\";\r\n\t\tString s4 = \"acb\";\r\n\t\tString s5 = \"abc\";\r\n\t\tString s6 = \"abd\";\r\n\t\tString s7 = \"abdc\";\r\n\t\tString s8 = \"ac\";\r\n\t\t//ArrayList<String> result = new ArrayList<String>();\r\n\t\tString[] strs = {s1,s2,s3,s4,s5,s6,s7,s8};\r\n\r\n\t\tList<String> list = q.anagrams(strs);\r\n\t\t//char[] charArray = {'h','e','l','l','o'};\r\n\t\tfor(String s:list){\r\n\t\t\tSystem.out.println(s);\r\n\t\t}\r\n\t\t//System.out.println(charArray.toString());\r\n\t}", "public int lengthOfLongestSubstringKDistinctImprvd(String s, int k) {\n if (s == null || s.length() == 0) {\n return 0;\n }\n \n int[] map = new int[256];\n int j = 0;\n int distinctCt = 0;\n int maxLen = 0;\n\n for (int i = 0; i < s.length(); i++) {\n while (j < s.length()) {\n map[s.charAt(j)] += 1;\n if (map[s.charAt(j)] == 1) {\n distinctCt++;\n }\n j++;\n if (distinctCt > k) {\n break;\n }\n maxLen = Math.max(j- i, maxLen);\n }\n map[s.charAt(i)] -= 1;\n if (map[s.charAt(i)] == 0) {\n distinctCt--;\n }\n }\n\n return maxLen;\n}", "public List<String> findRepeatedDnaSequences(String s){\n HashMap<Character,Integer> map=new HashMap<>();\n Set<Integer> firstSet=new HashSet<>();\n Set<Integer> dupSet=new HashSet<>();\n List<String> res=new ArrayList<>();\n map.put('A',0);\n map.put('C',1);\n map.put('G',2);\n map.put('T',3);\n char[] chars=s.toCharArray();\n for(int i=0;i<chars.length-9;i++){\n int v=0;\n for(int j=i;j<i+10;j++){\n v<<=2;\n v|=map.get(chars[j]);\n }\n if(!firstSet.add(v)&&dupSet.add(v)){\n res.add(s.substring(i,i+10));\n }\n }\n return res;\n }", "public int minCut(String s) {\n if (s == null || s.length() < 2) return 0;\n int len = s.length();\n int[][] dp = new int[len][len];\n for (int i = 0; i < len; i++) {\n Arrays.fill(dp[i], len + 1);\n dp[i][i] = 0; // [i,i] is palindome, no need to cut\n }\n for (int l = 2; l <= len; l++) {\n for (int i = 0; i < len - l + 1; i++) {\n int j = l + i - 1;\n if (isPalindrome(i, j, s)) dp[i][j] = 0;\n else {\n for (int k = i; k < j; k++) {\n dp[i][j] = Math.min(dp[i][j], 1 + dp[i][k] + dp[k + 1][j]);\n }\n }\n }\n }\n\n return dp[0][len - 1];\n }", "static long substrCount(int n, String s) {\n ArrayList<Point> points = new ArrayList<>();\n\n char current = s.charAt(0);\n int count = 1;\n\n for (int i = 1; i < s.length(); i++) {\n char ch = s.charAt(i);\n if (current == ch) {\n count++;\n } else {\n points.add(new Point(current, count));\n current = ch;\n count = 1;\n }\n }\n points.add(new Point(current, count));\n\n count = 0;\n if (points.size() > 2) {\n\n count += addup(points.get(0).count);\n\n for (int i = 1; i < points.size() - 1; i++) {\n Point prev = points.get(i - 1);\n Point curr = points.get(i);\n Point next = points.get(i + 1);\n\n\n count += addup(curr.count);\n\n if (prev.ch == next.ch && curr.count == 1) {\n int min = Math.min(prev.count, next.count);\n count += min;\n }\n }\n\n count += addup(points.get(points.size() - 1).count);\n\n } else if (points.size() == 1) {\n Point curr = points.get(0);\n count += addup(curr.count);\n } else if (points.size() == 2) {\n Point prev = points.get(0);\n count += addup(prev.count);\n Point next = points.get(1);\n count += addup(next.count);\n }\n\n\n System.out.println(points);\n\n return count;\n\n }", "public static void findLongestSubPalindramic(String s) {\n\t\tchar[] arr = s.toCharArray();\n\t\tint begin = -1;\n\t\tint end;\n\t\tint temp_begin;\n\t\tint maxLength = -1;\n\t\tboolean[][] table = new boolean[1000][1000];\n\n\t\tfor (int i = 0; i < table.length; i++) {\n\t\t\ttable[i][i] = true;\n\t\t}\n\t\tfor (int i = 0; i < s.length() - 1; i++) {\n\t\t\tif (arr[i] == arr[i + 1]) {\n\t\t\t\ttable[i][i + 1] = true;\n\t\t\t\tbegin = i;\n\t\t\t\tmaxLength = 2;\n\t\t\t}\n\t\t}\n\t\tfor (int len = 2; len < arr.length; len++) {\n\t\t\tfor (int i = 0; i < arr.length - len + 1; i++) {\n\t\t\t\tint j = len + i - 1;\n\t\t\t\tif (table[i + 1][j - 1] && (arr[i] == arr[j])) {\n\t\t\t\t\ttable[i][j] = true;\n\t\t\t\t\tif (j - i + 1 > maxLength) {\n\t\t\t\t\t\tbegin = i;\n\t\t\t\t\t\tmaxLength = maxLength + 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"begin:\" + begin + \", length:\" + maxLength);\n\t}", "public static boolean isAnagram(char[]s1, char[]s2)\r\n{\n\t if(s1.length!=s2.length)\r\n\t\t return false; \r\n\t \r\n\t //sort both strings using Arrays sort method\r\n\t Arrays.sort(s1); \r\n\t Arrays.sort(s2);\r\n\t \r\n\t for(int i=0; i<s1.length;i++)\r\n\t if(s1[i]!=s2[i])\r\n\t\t return false; \r\n\t\r\n\treturn true; \r\n\t \r\n}", "private static int substringPalindromes(String input) {\n // To check for duplicate palidromes we store them in hashset\n HashSet<String> palindromes = new HashSet<>();\n for(int i=0;i<input.length();i++){\n // For palidromes with odd length\n checkPalindrome(input,i,i,palindromes);\n // For palidromes with even length\n checkPalindrome(input,i,i+1,palindromes);\n }\n return palindromes.size();\n }", "public static void isPermutation(String s1, String s2){\r\n\t\t\t\r\n\t\t\t// Can also do by sorting both string and comparing each character by character\r\n\t\t\t\r\n\t\t\tboolean flag = true;\r\n\t\t\t\r\n\t\t\tArrayList hm = new ArrayList();\r\n\t\t\t\r\n\t\t\tfor(int i = 0 ; i < s1.length(); i++){\r\n\t\t\t\t\r\n\t\t\t\t\thm.add(s1.charAt(i));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tfor(int i = 0 ; i < s2.length(); i++){\r\n\t\t\t\tif(hm.contains(s2.charAt(i))){\r\n\t\t\t\t\thm.remove((Character)s2.charAt(i));\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Not A permutation\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n//\t\t\tHashMap hm = new HashMap();\r\n//\t\t\t\r\n//\t\t\tfor(int i = 0 ; i < s1.length(); i++){\r\n//\t\t\t\tif(hm.containsKey(s1.charAt(i))){\r\n//\t\t\t\t\thm.put(s1.charAt(i),hm.get(s1.charAt(i) + 1 ));\r\n//\t\t\t\t}\r\n//\t\t\t\telse{\r\n//\t\t\t\t\thm.put(s1.charAt(i), 1);\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t\tfor(int i = 0 ; i < s2.length(); i++){\r\n//\t\t\t\tif(hm.containsKey(s2.charAt(i))){\r\n//\t\t\t\t\thm.put(s2.charAt(i),hm.get(s2.charAt(i) - 1 ));\r\n//\t\t\t\t}\r\n//\t\t\t\telse{\r\n//\t\t\t\t\tflag = false;\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n\t\t\t\r\n\t\t\tif (hm.size()==0)\r\n\t\t\t\tSystem.out.println(\"Permutations\");\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"Not Permutations\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// Checking by creating ascii character array\r\n\t\t\tif (s1.length() != s2.length()) {\r\n\t\t\t\tSystem.out.println(\"Second Solution Not Permutation\");\r\n\t\t\t\t}\r\n\t\t\t\tint[] letters = new int[256]; // Assumption\r\n\t\t\t\t\tchar[] s_array = s1.toCharArray();\r\n\t\t\t\tfor (char c : s_array) { // count number of each char in s.\r\n\t\t\t\t letters[c]++;\r\n\t\t\t\t }\r\n\t\t\t\t\r\n\t\t\t\t for (int i = 0; i < s2.length(); i++) {\r\n\t\t\t\t int c = (int) s2.charAt(i);\r\n\t\t\t\t if (--letters[c] < 0) {\r\n\t\t\t\t System.out.println(\" Second Solution Not Permutation\");\r\n\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\r\n\t\t}", "private List<List<String>> groupAnagrams(String[] strs) {\n List<List<String>> ans = new ArrayList<>();\n if (strs.length == 0) {\n return ans;\n }\n\n List<String> group = new ArrayList<>();\n group.add(strs[0]);\n ans.add(group);\n\n for (int i = 1; i < strs.length; i++) {\n boolean flag = false;\n for (int j = 0; j < ans.size(); j++) { // cause time cost\n if (isAnagram(strs[i], ans.get(j).get(0))) {\n ans.get(j).add(strs[i]);\n flag = true;\n break;\n }\n }\n if (!flag) {\n List<String> newGroup = new ArrayList<>();\n newGroup.add(strs[i]);\n ans.add(newGroup);\n }\n }\n\n return ans;\n }" ]
[ "0.85141015", "0.8293296", "0.76312834", "0.7076127", "0.6924591", "0.6738279", "0.67020935", "0.6579586", "0.6572929", "0.6392969", "0.63634187", "0.6346383", "0.63000387", "0.6106145", "0.59465796", "0.59051955", "0.5750358", "0.56862724", "0.5664409", "0.56407934", "0.5618582", "0.56119084", "0.5611043", "0.5597832", "0.55900514", "0.5565358", "0.5556855", "0.5512718", "0.5507693", "0.54757696", "0.54652536", "0.5441725", "0.53877956", "0.5359122", "0.5339105", "0.5337646", "0.5319501", "0.53105575", "0.5302339", "0.5301258", "0.52975124", "0.5297361", "0.52909356", "0.5278118", "0.5270642", "0.5261849", "0.52591616", "0.5255314", "0.52176577", "0.52058977", "0.5197239", "0.5190397", "0.51897997", "0.5189604", "0.5185332", "0.51832694", "0.51567507", "0.51563483", "0.515203", "0.5133026", "0.51289403", "0.51240194", "0.5124019", "0.5122908", "0.5106269", "0.5104381", "0.51016134", "0.5100081", "0.50965846", "0.50932264", "0.50887674", "0.50881153", "0.50864166", "0.50860006", "0.5074756", "0.50743514", "0.5073777", "0.5068039", "0.50631976", "0.50600344", "0.5057862", "0.50558037", "0.50493675", "0.5049102", "0.50411886", "0.50334215", "0.5031793", "0.50300545", "0.5010793", "0.50063133", "0.5002763", "0.5000056", "0.4998626", "0.49853033", "0.4984247", "0.49752426", "0.49715498", "0.49712935", "0.49676853", "0.4954183" ]
0.77789694
2
Start typing your Java solution below DO NOT write main() function
public TreeNode sortedListToBST(ListNode head) { if (head == null) return null; ListNode preP = null; ListNode p = head; ListNode p2 = head; while (p2 != null && p2.next != null) { preP = p; p = p.next; p2 = p2.next.next; } ListNode left = head; if (preP != null) { preP.next = null; } ListNode right = p.next; TreeNode node = new TreeNode(p.val); if (preP != null) { node.left = sortedListToBST(left); } node.right = sortedListToBST(right); return node; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main() {\n \n }", "public static void main(String[] args) {\n\n Solution2.solution();\n }", "public static void main(String[] args) {\n // write your code here - this is called comment and it always starts with double slash\n // and comlier will ignore this because of the // sign.\n // I am gonna say hello\n // JAVA IS CASE SENSITIVE LANGUAGE\n // System and system are very different things in java\n //Hello AND hello are different for java\n // System.out.println(\"Hello Batch 15!\");\n // System.out.println(\"I am still here.\");\n // System.out.println(\"I love Java.\");\n\n // Write a program to display your information.\n // When you run it, it should have this outcome.\n // I am your name here\n // I am from batch 15\n // I am from your city here\n // I love Java\n\n System.out.println(\"I am Sevim.\");\n System.out.println(\"I am from Batch 15.\");\n System.out.println(\"I'm from New Jersey.\");\n System.out.println(\"I love Java.\");\n\n\n\n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public static void main(String[] args) {\n\t\tSolution s = new Solution();\n\t\ts.solution(2, 4, 2, 1);\n\t}", "public static void main()\n\t{\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(solution());\r\n\t}", "public static void main(String[] args) {\n \n \n \n \n }", "public static void main(String[] args) {\n \n \n \n\t}", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "public void solution() {\n\t\t\n\t}", "public static void main(String[] args) {\r\n\t\tSomeJava8Features obj = new SomeJava8Features();\r\n\r\n\t\t// StringJoiner\r\n\t\texampleStringJoiner();\r\n\t\t\r\n\t\t// Default\r\n\t\tint ary[] = {3,6,8,9,0};\r\n\t\tSystem.out.println(\"\\nsumOfGivenIntArray ... \" + obj.sumOfGivenIntArray(ary));\r\n\t\tobj.sayMore(\"Hello Rohini\");\r\n\t\t\r\n\t\t// ForEach & Lambda Expression\r\n\t\texampleForEach_FindMaximum(ary);\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSolution s = new Solution();\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Wow I really love this class!\");\n\t\tSystem.out.println(\"Thanks again for the V8 energy drink!\");\n\t\tSystem.out.println(\"I think next time im going to have a redbull though\");\n\t\tSystem.out.println(\"We can sip on some energy drinks and make more fun of JJ\");\n\t\tSystem.out.println(\"I still cant believe JJ had a baby\");\n\t\tSystem.out.println(\"You can call me Uncle Louie\");\n\t\tSystem.out.println(\"Does Uncle Louie sound like a creepy name though?\");\n\t\tSystem.out.println(\"Anyways, I think ill be a good uncle\");\n\t\tSystem.out.println(\"I just have to figure out how to properly hold a baby\");\n\t\tSystem.out.println(\"Well, thank you for reading. Can't wait to see what else this class has to offer!\");\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args)\n\t{\n\n\n\n\n\n\n\t}", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public static void main(String[] args) {\n Last_coding_exercises.task17();\n\n\n }", "public static void main(){\n\t}", "public static void main() {\n }", "public static void main (String []args){\n }", "public static void main(String[] args) {\n \n\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static int Main()\n\t{\n\t\tint len;\n\t\tint i;\n\t\tint j;\n\t\tint p;\n\t\tint l;\n\t\tMain_str = new Scanner(System.in).nextLine();\n\t\tfor (len = 0;Main_str.charAt(len) != '\\0';len++)\n\t\t{\n\t\t\t;\n\t\t}\n\t\tfor (l = 2;l <= len;l++)\n\t\t{\n\t\t\tfor (i = 0;i <= len - l;i++)\n\t\t\t{\n\t\t\t\tfor (j = 0;j < l / 2;j++)\n\t\t\t\t{\n\t\t\t\t\tif (Main_str.charAt(i + j) != Main_str.charAt(i + l - 1 - j))\n\t\t\t\t\t{\n//C++ TO JAVA CONVERTER TODO TASK: There are no gotos or labels in Java:\n\t\t\t\t\t\tgoto here;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\tfor (p = i;p < i + l;p++)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.printf(\"%c\",Main_str.charAt(p));\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.print(\"\\n\");\n//C++ TO JAVA CONVERTER TODO TASK: There are no gotos or labels in Java:\n\t\t\t\t\there:\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}", "public static void main(String [] args)\n {\n System.out.println(\"Programming is great fun!\");\n }", "public static void main(String[] args) {\t\n\t\t\n\t}", "public static void main(String[] args) {\n \r\n\t}", "public static void main(String[] args) // every Java program starts with a main method or function\r\n\t{\n\t}", "public static void main(String[] args){\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }", "public static void main(String []args){\n }", "public static void main(String []args){\n }", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}", "public static void main(String []args){\n\n }", "public static void main(String[] args) {}", "public static void main(String[] args) {}", "public static void main(String[] args) {\r\n \r\n }", "public static void main(String[] args) {\r\n \r\n }", "public static void main (String args[]) {\n\t\t\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(solution(0));\n\n\t}", "public static void main(String[] args) {\n \n }", "@Override\r\n public void run() {\n System.out.println(\"Running in Java (regular algorithm)\");\r\n }", "public static void main (String[] args) {\r\n\t\t \r\n\t\t}", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args){\n\t\t\n\t\t\n \t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t \t\n\t \t\n\t }", "public static void main(String[] args) {\n\t\t\tSystem.out.println(Solution(5, 83));\n\t\t\t\n\t\t}", "public static void main(String[] args) {\r\n\t\t//method body\r\n\t}", "public static void main (String[] args) {\n\t\t\n\t}", "public static void main(String args[]){\n\t\t\n\t\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n \n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t}", "public static void main (String[]args) throws IOException {\n }", "public void Main(){\n }", "private void generateSolution() {\n\t\t// TODO\n\n\t}", "public static void main(String args[]) {\r\n }", "public static void main(String[] args){\n \t\n }", "public static void main(String[] args) {\r\n// Use for unit testing\r\n }", "public static void main(String[] args) {\n\t\t// public static=> access modifies. accessable from anywhere in the project.\n\t\t// Main method is always public static\n\t\t// main method name\n\t\t// void=> return type. Void=no special return type.\n\t\t// args =>argument\n\t\t// String[] = String of Array\n\t\t// What is main method\n\t\t// Engine of a car. Without main method, we cannot run any code.\n\t\t// Do we have to have a main method to build and run any code?\n\t\t// Yes we need main to build and run an application\n\n\t\t// How many data type are there in JAVA?\n\t\t// 2.Primetive and Non-primetive\n\t\t// How many primitive data type are there?\n\t\t// 8:boolean, char, byte, short, int, long, float, double\n\t\t// NOTE: all primitives start with lowercase\n\n\t\t// Please declare all the primitive data types?\n\t\tboolean b; // b =true\n\t\t// assign a value after\n\t\tb = false;\n\t\tboolean th = true;\n\t\t// In Java every character has a value. Space (bosluk) called whitespace.\n\t\tchar c;\n\t\tc = 'a';\n\t\tbyte by;\n\t\tshort s;\n\t\t// int=> is Data Type, i=> variable(container), 1 =>value.\n\t\t// variables are important in JAVA.\n\t\t// Because, we create object/variable and use them in our codes to make our code\n\t\t// DYNAMIC\n\t\t// Also to use the same value again and again\n\t\tint i;\n\t\tlong l;\n\t\tfloat f;\n\t\tdouble d;\n\n\t\t// print int\n\t\t// We have to initialize the variables ( int i = 1; i ye deger verme) to print\n\t\t// the values.\n\t\tSystem.out.println();\n\t\t// Find the minimum and maximum value of a short. Use the same variable s\n\t\ts = Short.MIN_VALUE;\n\t\tSystem.out.println(\"The Smallest Value of a short => \" + s);\n\t\ts = Short.MAX_VALUE;\n\t\t// We are printing dynamically\n\t\tSystem.out.println(\"The Biggest Value of a short => \" + s);\n\t\t//\n\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t}" ]
[ "0.708473", "0.70149416", "0.7005105", "0.6863306", "0.6836085", "0.6820204", "0.68135685", "0.6797073", "0.678379", "0.6755512", "0.6755512", "0.6755512", "0.6755512", "0.6755512", "0.6755512", "0.67430377", "0.6730029", "0.67234117", "0.6722889", "0.6699645", "0.66878253", "0.66878253", "0.6682454", "0.6681", "0.6679755", "0.6659996", "0.6653415", "0.66500723", "0.6643882", "0.6642326", "0.6642326", "0.6626567", "0.6623309", "0.66127914", "0.66117346", "0.6608671", "0.6606835", "0.660449", "0.660449", "0.6593216", "0.6591371", "0.6587174", "0.6587174", "0.65814066", "0.65814066", "0.6578452", "0.65776193", "0.65756416", "0.6571164", "0.65708095", "0.6562627", "0.6551185", "0.654968", "0.654968", "0.654968", "0.654968", "0.6548372", "0.65471023", "0.6545394", "0.6543279", "0.6536251", "0.65319633", "0.652431", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6517081", "0.6512132", "0.65037495", "0.65030056", "0.64997846", "0.6499709", "0.64986706", "0.6490134", "0.6486541", "0.6486541", "0.6486541" ]
0.0
-1
The current state of the run.
public void setState(String state) { this.state = state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ExecutionState getCurrentExecutionState() {\n\t\treturn currentExecutionState;\n\t}", "public String getCurrentState() {\n\t\treturn currentState;\n\t}", "public int getState()\r\n\t{\r\n\t\treturn currentstate;\r\n\t}", "public S getCurrentState();", "public int getCurrentState() {\n return myState;\n }", "public State getCurrentState() {\n \t\treturn currentState;\n \t}", "public String state() {\n return this.state;\n }", "public String state() {\n return this.state;\n }", "public State state() {\n return state;\n }", "public State getCurrentState() {\n\t\treturn currentState;\n\t}", "public State getCurrentState() {\n\t\treturn currentState;\n\t}", "com.google.dataflow.v1beta3.ExecutionState getState();", "public State state() {\n return _state;\n }", "String getCurrentState() {\n return context.getString(allStates[currentIdx]);\n }", "public State getState() {\n return state.get();\n }", "public RunStatus status() {\n return this.status;\n }", "public State getState() {\n\t\treturn state;\n\t}", "public State getState() {\n\t\treturn state;\n\t}", "public State getCurrentState() {\n return currentState;\n }", "public TurtleState getCurrentState() {\n\t\treturn states.peek();\n\t}", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public synchronized EventState state() {\n return this.currentState;\n }", "public String state() {\n\treturn state(points, temperature, currentStateEnergy);\n }", "public CoreState getCurrentStatus() {\n return doStuffStrategy.determineCurrentStatus(this, 3000);\r\n }", "public STATE getState() {\n\t\n\t\treturn state;\n\t}", "public String getState() {\n\t\treturn state.toString();\n\t}", "public int getState() {\n return state.getValue();\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public S getState() {\r\n\t\treturn state;\r\n\t}", "public int getState() {\n return state_;\n }", "public int getState() {\n\t\treturn state;\n\t}", "protected S state() {\n return state;\n }", "public T getState() {\r\n\t\treturn state;\r\n\t}", "public State getState()\r\n\t{\r\n\t\treturn this.state;\r\n\t}", "public int getState() {\n return state;\n }", "public int getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public int getState() {\n \t\treturn state;\n \t}", "public STATE getState() {\n return this.lastState;\n }", "public int getState();", "public int getState();", "public int getState();", "public int getState();", "public int getState() {return state;}", "public int getState() {return state;}", "public java.lang.String getState () {\n\t\treturn state;\n\t}", "public State getState () {\n synchronized (this) {\n return state;\n }\n }", "public int getState()\n {\n return m_state.getState();\n }", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "public int getState(){\n\t\treturn state;\n\t}", "public GameState getState() {\n\t\treturn state;\n\t}", "public State getState();", "public State getState();", "public S getState() {\n return currentState;\n }", "public String getState() {\n\t\treturn state;\n\t}", "public String getState() {\r\n\t\treturn state;\t\t\r\n\t}", "public boolean getState( ) { return state; }", "public String getState()\n\t{\n\t\treturn state;\n\t}", "public Integer getState() {\r\n return state;\r\n }", "public Integer getState() {\r\n return state;\r\n }", "public int getState() {\n return state;\n }", "public String getState() {\n\t\treturn State;\n\t}", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public String getState() \n\t{\n\t\treturn state;\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState()\n\t{\n\t\treturn State;\n\t\t\n\t}", "public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}", "public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}", "public State state();", "@Output\n public String getState() {\n return state;\n }", "public TState getState() {\n return state;\n }", "public int getState(){\n return state;\n }", "public SimulationState getState() {\n\t\treturn state;\n\t}", "private State getState()\n {\n return state;\n }", "public boolean getState() {\n\t\treturn state;\n\t}", "public int getState() {\n return _state;\n }", "public State getMyCurrentState () {\n return myCurrentState;\n }", "public synchronized int getState() {\n return mState;\n }" ]
[ "0.7659221", "0.7528995", "0.72839963", "0.7240588", "0.72296005", "0.7229599", "0.71921754", "0.71921754", "0.718765", "0.7163739", "0.7163739", "0.7141082", "0.7140648", "0.71084917", "0.7106651", "0.70945734", "0.7072249", "0.7072249", "0.70437205", "0.7037785", "0.7037016", "0.7037016", "0.7037016", "0.7037016", "0.7037016", "0.7034434", "0.70267457", "0.7026345", "0.6999876", "0.6958103", "0.69516426", "0.6949539", "0.6949539", "0.6949539", "0.6949539", "0.69490916", "0.6948102", "0.6948005", "0.69461447", "0.69278395", "0.6926637", "0.69215834", "0.69215834", "0.691669", "0.691669", "0.691669", "0.691669", "0.691669", "0.6916356", "0.6913512", "0.69088185", "0.69088185", "0.69088185", "0.69088185", "0.69065064", "0.69065064", "0.69033194", "0.6896199", "0.68913627", "0.6889402", "0.6889402", "0.6889402", "0.6889402", "0.6889402", "0.6889402", "0.68803525", "0.6870299", "0.6862354", "0.6862354", "0.685066", "0.6849674", "0.6849017", "0.68470716", "0.6846234", "0.6840206", "0.6840206", "0.6836115", "0.6828582", "0.68263704", "0.68263704", "0.68263704", "0.68263704", "0.68263704", "0.68263704", "0.6825357", "0.68198186", "0.68198186", "0.68198186", "0.68162966", "0.6815105", "0.6815105", "0.68086636", "0.6801163", "0.6799721", "0.6796323", "0.6791088", "0.67841905", "0.678259", "0.67822975", "0.6778846", "0.67781216" ]
0.0
-1
The current state of the run.
public String getState() { return this.state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ExecutionState getCurrentExecutionState() {\n\t\treturn currentExecutionState;\n\t}", "public String getCurrentState() {\n\t\treturn currentState;\n\t}", "public int getState()\r\n\t{\r\n\t\treturn currentstate;\r\n\t}", "public S getCurrentState();", "public int getCurrentState() {\n return myState;\n }", "public State getCurrentState() {\n \t\treturn currentState;\n \t}", "public String state() {\n return this.state;\n }", "public String state() {\n return this.state;\n }", "public State state() {\n return state;\n }", "public State getCurrentState() {\n\t\treturn currentState;\n\t}", "public State getCurrentState() {\n\t\treturn currentState;\n\t}", "com.google.dataflow.v1beta3.ExecutionState getState();", "public State state() {\n return _state;\n }", "String getCurrentState() {\n return context.getString(allStates[currentIdx]);\n }", "public State getState() {\n return state.get();\n }", "public RunStatus status() {\n return this.status;\n }", "public State getState() {\n\t\treturn state;\n\t}", "public State getState() {\n\t\treturn state;\n\t}", "public State getCurrentState() {\n return currentState;\n }", "public TurtleState getCurrentState() {\n\t\treturn states.peek();\n\t}", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public synchronized EventState state() {\n return this.currentState;\n }", "public String state() {\n\treturn state(points, temperature, currentStateEnergy);\n }", "public CoreState getCurrentStatus() {\n return doStuffStrategy.determineCurrentStatus(this, 3000);\r\n }", "public STATE getState() {\n\t\n\t\treturn state;\n\t}", "public String getState() {\n\t\treturn state.toString();\n\t}", "public int getState() {\n return state.getValue();\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public S getState() {\r\n\t\treturn state;\r\n\t}", "public int getState() {\n return state_;\n }", "public int getState() {\n\t\treturn state;\n\t}", "protected S state() {\n return state;\n }", "public T getState() {\r\n\t\treturn state;\r\n\t}", "public State getState()\r\n\t{\r\n\t\treturn this.state;\r\n\t}", "public int getState() {\n return state;\n }", "public int getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public int getState() {\n \t\treturn state;\n \t}", "public STATE getState() {\n return this.lastState;\n }", "public int getState();", "public int getState();", "public int getState();", "public int getState();", "public int getState() {return state;}", "public int getState() {return state;}", "public java.lang.String getState () {\n\t\treturn state;\n\t}", "public State getState () {\n synchronized (this) {\n return state;\n }\n }", "public int getState()\n {\n return m_state.getState();\n }", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "public int getState(){\n\t\treturn state;\n\t}", "public GameState getState() {\n\t\treturn state;\n\t}", "public State getState();", "public State getState();", "public S getState() {\n return currentState;\n }", "public String getState() {\n\t\treturn state;\n\t}", "public String getState() {\r\n\t\treturn state;\t\t\r\n\t}", "public boolean getState( ) { return state; }", "public String getState()\n\t{\n\t\treturn state;\n\t}", "public Integer getState() {\r\n return state;\r\n }", "public Integer getState() {\r\n return state;\r\n }", "public int getState() {\n return state;\n }", "public String getState() {\n\t\treturn State;\n\t}", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public String getState() \n\t{\n\t\treturn state;\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState()\n\t{\n\t\treturn State;\n\t\t\n\t}", "public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}", "public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}", "public State state();", "@Output\n public String getState() {\n return state;\n }", "public TState getState() {\n return state;\n }", "public int getState(){\n return state;\n }", "public SimulationState getState() {\n\t\treturn state;\n\t}", "private State getState()\n {\n return state;\n }", "public boolean getState() {\n\t\treturn state;\n\t}", "public int getState() {\n return _state;\n }", "public State getMyCurrentState () {\n return myCurrentState;\n }", "public synchronized int getState() {\n return mState;\n }" ]
[ "0.7659221", "0.7528995", "0.72839963", "0.7240588", "0.72296005", "0.7229599", "0.71921754", "0.71921754", "0.718765", "0.7163739", "0.7163739", "0.7141082", "0.7140648", "0.71084917", "0.7106651", "0.70945734", "0.7072249", "0.7072249", "0.70437205", "0.7037785", "0.7037016", "0.7037016", "0.7037016", "0.7037016", "0.7037016", "0.7034434", "0.70267457", "0.7026345", "0.6999876", "0.6958103", "0.69516426", "0.6949539", "0.6949539", "0.6949539", "0.6949539", "0.69490916", "0.6948102", "0.6948005", "0.69461447", "0.69278395", "0.6926637", "0.69215834", "0.69215834", "0.691669", "0.691669", "0.691669", "0.691669", "0.691669", "0.6916356", "0.6913512", "0.69088185", "0.69088185", "0.69088185", "0.69088185", "0.69065064", "0.69065064", "0.69033194", "0.6896199", "0.68913627", "0.6889402", "0.6889402", "0.6889402", "0.6889402", "0.6889402", "0.6889402", "0.68803525", "0.6870299", "0.6862354", "0.6862354", "0.685066", "0.6849674", "0.6849017", "0.68470716", "0.6846234", "0.6840206", "0.6840206", "0.6836115", "0.6828582", "0.68263704", "0.68263704", "0.68263704", "0.68263704", "0.68263704", "0.68263704", "0.6825357", "0.68198186", "0.68198186", "0.68198186", "0.68162966", "0.6815105", "0.6815105", "0.68086636", "0.6801163", "0.6799721", "0.6796323", "0.6791088", "0.67841905", "0.678259", "0.67822975", "0.6778846", "0.67781216" ]
0.0
-1
The current state of the run.
public CanaryRunStatus withState(String state) { setState(state); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ExecutionState getCurrentExecutionState() {\n\t\treturn currentExecutionState;\n\t}", "public String getCurrentState() {\n\t\treturn currentState;\n\t}", "public int getState()\r\n\t{\r\n\t\treturn currentstate;\r\n\t}", "public S getCurrentState();", "public int getCurrentState() {\n return myState;\n }", "public State getCurrentState() {\n \t\treturn currentState;\n \t}", "public String state() {\n return this.state;\n }", "public String state() {\n return this.state;\n }", "public State state() {\n return state;\n }", "public State getCurrentState() {\n\t\treturn currentState;\n\t}", "public State getCurrentState() {\n\t\treturn currentState;\n\t}", "public State state() {\n return _state;\n }", "com.google.dataflow.v1beta3.ExecutionState getState();", "String getCurrentState() {\n return context.getString(allStates[currentIdx]);\n }", "public State getState() {\n return state.get();\n }", "public RunStatus status() {\n return this.status;\n }", "public State getState() {\n\t\treturn state;\n\t}", "public State getState() {\n\t\treturn state;\n\t}", "public State getCurrentState() {\n return currentState;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public TurtleState getCurrentState() {\n\t\treturn states.peek();\n\t}", "public synchronized EventState state() {\n return this.currentState;\n }", "public String state() {\n\treturn state(points, temperature, currentStateEnergy);\n }", "public CoreState getCurrentStatus() {\n return doStuffStrategy.determineCurrentStatus(this, 3000);\r\n }", "public STATE getState() {\n\t\n\t\treturn state;\n\t}", "public String getState() {\n\t\treturn state.toString();\n\t}", "public int getState() {\n return state.getValue();\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public S getState() {\r\n\t\treturn state;\r\n\t}", "public int getState() {\n\t\treturn state;\n\t}", "public int getState() {\n return state_;\n }", "protected S state() {\n return state;\n }", "public T getState() {\r\n\t\treturn state;\r\n\t}", "public State getState()\r\n\t{\r\n\t\treturn this.state;\r\n\t}", "public int getState() {\n return state;\n }", "public int getState() {\n return state;\n }", "public int getState() {\n \t\treturn state;\n \t}", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public STATE getState() {\n return this.lastState;\n }", "public int getState();", "public int getState();", "public int getState();", "public int getState();", "public int getState() {return state;}", "public int getState() {return state;}", "public java.lang.String getState () {\n\t\treturn state;\n\t}", "public State getState () {\n synchronized (this) {\n return state;\n }\n }", "public int getState()\n {\n return m_state.getState();\n }", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "public int getState(){\n\t\treturn state;\n\t}", "public GameState getState() {\n\t\treturn state;\n\t}", "public State getState();", "public State getState();", "public S getState() {\n return currentState;\n }", "public String getState() {\n\t\treturn state;\n\t}", "public String getState() {\r\n\t\treturn state;\t\t\r\n\t}", "public boolean getState( ) { return state; }", "public String getState()\n\t{\n\t\treturn state;\n\t}", "public Integer getState() {\r\n return state;\r\n }", "public Integer getState() {\r\n return state;\r\n }", "public int getState() {\n return state;\n }", "public String getState() {\n\t\treturn State;\n\t}", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public String getState() \n\t{\n\t\treturn state;\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState()\n\t{\n\t\treturn State;\n\t\t\n\t}", "public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}", "public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}", "public State state();", "@Output\n public String getState() {\n return state;\n }", "public TState getState() {\n return state;\n }", "public int getState(){\n return state;\n }", "public SimulationState getState() {\n\t\treturn state;\n\t}", "private State getState()\n {\n return state;\n }", "public boolean getState() {\n\t\treturn state;\n\t}", "public int getState() {\n return _state;\n }", "public State getMyCurrentState () {\n return myCurrentState;\n }", "public synchronized int getState() {\n return mState;\n }" ]
[ "0.7658354", "0.7529957", "0.72864234", "0.72424716", "0.72313756", "0.72311056", "0.71942466", "0.71942466", "0.71893936", "0.7165015", "0.7165015", "0.7142581", "0.7141438", "0.71093595", "0.71077394", "0.70924735", "0.7074075", "0.7074075", "0.704479", "0.7039571", "0.7039571", "0.7039571", "0.7039571", "0.7039571", "0.70391387", "0.703556", "0.7028179", "0.7026647", "0.70027834", "0.6959737", "0.6953487", "0.69519323", "0.69519323", "0.69519323", "0.69519323", "0.6951847", "0.69506806", "0.69504887", "0.6949027", "0.69301903", "0.69282556", "0.6924132", "0.6924132", "0.69195247", "0.6918345", "0.6918345", "0.6918345", "0.6918345", "0.6918345", "0.69149834", "0.6911407", "0.6911407", "0.6911407", "0.6911407", "0.69100755", "0.69100755", "0.69053715", "0.6897087", "0.68931", "0.6892374", "0.6892374", "0.6892374", "0.6892374", "0.6892374", "0.6892374", "0.6883465", "0.6872072", "0.68647945", "0.68647945", "0.68532795", "0.68519443", "0.6851572", "0.6851106", "0.6848751", "0.6842439", "0.6842439", "0.6838605", "0.6830717", "0.6828525", "0.6828525", "0.6828525", "0.6828525", "0.6828525", "0.6828525", "0.6827931", "0.68222547", "0.68222547", "0.68222547", "0.68186754", "0.68177575", "0.68177575", "0.6811499", "0.68021154", "0.6801984", "0.67993486", "0.67935085", "0.67862564", "0.67858964", "0.6784836", "0.6780614", "0.67804796" ]
0.0
-1
The current state of the run.
public CanaryRunStatus withState(CanaryRunState state) { this.state = state.toString(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ExecutionState getCurrentExecutionState() {\n\t\treturn currentExecutionState;\n\t}", "public String getCurrentState() {\n\t\treturn currentState;\n\t}", "public int getState()\r\n\t{\r\n\t\treturn currentstate;\r\n\t}", "public S getCurrentState();", "public int getCurrentState() {\n return myState;\n }", "public State getCurrentState() {\n \t\treturn currentState;\n \t}", "public String state() {\n return this.state;\n }", "public String state() {\n return this.state;\n }", "public State state() {\n return state;\n }", "public State getCurrentState() {\n\t\treturn currentState;\n\t}", "public State getCurrentState() {\n\t\treturn currentState;\n\t}", "com.google.dataflow.v1beta3.ExecutionState getState();", "public State state() {\n return _state;\n }", "String getCurrentState() {\n return context.getString(allStates[currentIdx]);\n }", "public State getState() {\n return state.get();\n }", "public RunStatus status() {\n return this.status;\n }", "public State getState() {\n\t\treturn state;\n\t}", "public State getState() {\n\t\treturn state;\n\t}", "public State getCurrentState() {\n return currentState;\n }", "public TurtleState getCurrentState() {\n\t\treturn states.peek();\n\t}", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public synchronized EventState state() {\n return this.currentState;\n }", "public String state() {\n\treturn state(points, temperature, currentStateEnergy);\n }", "public CoreState getCurrentStatus() {\n return doStuffStrategy.determineCurrentStatus(this, 3000);\r\n }", "public STATE getState() {\n\t\n\t\treturn state;\n\t}", "public String getState() {\n\t\treturn state.toString();\n\t}", "public int getState() {\n return state.getValue();\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public S getState() {\r\n\t\treturn state;\r\n\t}", "public int getState() {\n return state_;\n }", "public int getState() {\n\t\treturn state;\n\t}", "protected S state() {\n return state;\n }", "public T getState() {\r\n\t\treturn state;\r\n\t}", "public State getState()\r\n\t{\r\n\t\treturn this.state;\r\n\t}", "public int getState() {\n return state;\n }", "public int getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public State getState() {\n return state;\n }", "public int getState() {\n \t\treturn state;\n \t}", "public STATE getState() {\n return this.lastState;\n }", "public int getState();", "public int getState();", "public int getState();", "public int getState();", "public int getState() {return state;}", "public int getState() {return state;}", "public java.lang.String getState () {\n\t\treturn state;\n\t}", "public State getState () {\n synchronized (this) {\n return state;\n }\n }", "public int getState()\n {\n return m_state.getState();\n }", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "public int getState(){\n\t\treturn state;\n\t}", "public GameState getState() {\n\t\treturn state;\n\t}", "public State getState();", "public State getState();", "public S getState() {\n return currentState;\n }", "public String getState() {\n\t\treturn state;\n\t}", "public String getState() {\r\n\t\treturn state;\t\t\r\n\t}", "public boolean getState( ) { return state; }", "public String getState()\n\t{\n\t\treturn state;\n\t}", "public Integer getState() {\r\n return state;\r\n }", "public Integer getState() {\r\n return state;\r\n }", "public int getState() {\n return state;\n }", "public String getState() {\n\t\treturn State;\n\t}", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public String getState() \n\t{\n\t\treturn state;\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState()\n\t{\n\t\treturn State;\n\t\t\n\t}", "public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}", "public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}", "public State state();", "@Output\n public String getState() {\n return state;\n }", "public TState getState() {\n return state;\n }", "public int getState(){\n return state;\n }", "public SimulationState getState() {\n\t\treturn state;\n\t}", "private State getState()\n {\n return state;\n }", "public boolean getState() {\n\t\treturn state;\n\t}", "public int getState() {\n return _state;\n }", "public State getMyCurrentState () {\n return myCurrentState;\n }", "public synchronized int getState() {\n return mState;\n }" ]
[ "0.7659221", "0.7528995", "0.72839963", "0.7240588", "0.72296005", "0.7229599", "0.71921754", "0.71921754", "0.718765", "0.7163739", "0.7163739", "0.7141082", "0.7140648", "0.71084917", "0.7106651", "0.70945734", "0.7072249", "0.7072249", "0.70437205", "0.7037785", "0.7037016", "0.7037016", "0.7037016", "0.7037016", "0.7037016", "0.7034434", "0.70267457", "0.7026345", "0.6999876", "0.6958103", "0.69516426", "0.6949539", "0.6949539", "0.6949539", "0.6949539", "0.69490916", "0.6948102", "0.6948005", "0.69461447", "0.69278395", "0.6926637", "0.69215834", "0.69215834", "0.691669", "0.691669", "0.691669", "0.691669", "0.691669", "0.6916356", "0.6913512", "0.69088185", "0.69088185", "0.69088185", "0.69088185", "0.69065064", "0.69065064", "0.69033194", "0.6896199", "0.68913627", "0.6889402", "0.6889402", "0.6889402", "0.6889402", "0.6889402", "0.6889402", "0.68803525", "0.6870299", "0.6862354", "0.6862354", "0.685066", "0.6849674", "0.6849017", "0.68470716", "0.6846234", "0.6840206", "0.6840206", "0.6836115", "0.6828582", "0.68263704", "0.68263704", "0.68263704", "0.68263704", "0.68263704", "0.68263704", "0.6825357", "0.68198186", "0.68198186", "0.68198186", "0.68162966", "0.6815105", "0.6815105", "0.68086636", "0.6801163", "0.6799721", "0.6796323", "0.6791088", "0.67841905", "0.678259", "0.67822975", "0.6778846", "0.67781216" ]
0.0
-1
If run of the canary failed, this field contains the reason for the error.
public void setStateReason(String stateReason) { this.stateReason = stateReason; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getFailureReason() {\n return this.failureReason;\n }", "public String getFailureReason() {\n return this.failureReason;\n }", "public Throwable getReason() { return err; }", "public int failed() {\n return this.failed;\n }", "public String getFailedRemark() {\r\n return failedRemark;\r\n }", "public String getFailureCode() {\n return this.failureCode;\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn \"Failed\";\r\n\t}", "@Override\r\n\tpublic String getMessage() {\n\t\treturn \"Failed\";\r\n\t}", "String failureReason();", "@Override\r\n\tpublic String getFailDescription() {\n\t\treturn null;\r\n\t}", "public String getFailureMessage() {\n return this.failureMessage;\n }", "@Override\n public void onAnalysisFailed(IntegrationAnalyzer.FailReason failReason) {\n String message = failReason.getMessage();\n Log.d(TAG, \"Fail Reason message is\" + message);\n //..\n\n }", "public String getError() {\n return writeResult.getError();\n }", "@Override\n\tpublic String getFailureMessage() {\n\t return null;\n\t}", "public int error() {\n return this.error;\n }", "java.lang.String getReason();", "public String getError() {\n\treturn mistake;\n }", "public int getError() {\n return error;\n }", "public PipelineJobError error() {\n return this.innerProperties() == null ? null : this.innerProperties().error();\n }", "String getFailureMessage();", "public String getError() {\n return error != null ? error : \"An unknown error occurred.\";\n }", "public final boolean isFailed() {\n return failed;\n }", "public boolean isErrored() {\n return errored;\n }", "public static String operationFailed() {\n return holder.format(\"operationFailed\");\n }", "public java.lang.String getFailStatus() {\n\treturn failStatus;\n}", "public String getError() {\r\n\t\treturn error;\r\n\t}", "public void setFailureReason(String failureReason) {\n this.failureReason = failureReason;\n }", "public String getError() {\n return error;\n }", "public String getError() {\n return error;\n }", "public String getError() {\n return error;\n }", "public String getError() {\n return error;\n }", "java.lang.String getError();", "java.lang.String getError();", "java.lang.String getError();", "@JsonProperty(\"failureReason\")\n public String getFailureReason() {\n return failureReason;\n }", "public final String getError(){\n return lastKnownError;\n }", "public String errorDescription()\n {\n return edma_errorDesc;\n }", "public String getError() {\n\t\treturn error;\n\t}", "public String getError() {\n\t\treturn error;\n\t}", "public boolean getFailOnErr() {\n return mFailonerr;\n }", "public String errorDetails() {\n return this.errorDetails;\n }", "public boolean hasFail() {\n return result.hasFail();\n }", "public void setFailureReason(String failureReason) {\n this.failureReason = failureReason;\n }", "public void setFailureReason(String failureReason) {\n this.failureReason = failureReason;\n }", "public String getError() {\n return errMsg;\n }", "@ApiModelProperty(value = \"The reason this auto order failed during the last rebill attempt\")\r\n public String getFailureReason() {\r\n return failureReason;\r\n }", "public boolean isFailure( ) {\n\t\treturn failed;\n\t}", "public String getErrorText() {\n return m_ErrorText;\n }", "public String getErrorDescription() {\n return errorDescription;\n }", "public String errorMessage() {\n return this.errorMessage;\n }", "public String getErrorText() {\n\t\treturn errorText;\n\t}", "@Override\n boolean isFailed() {\n return false;\n }", "protected String failedMatcherMessage() {\n return \"FAILED!\";\n }", "public String getErrorMsg() {\r\n\t\treturn errorMsg;\r\n\t}", "public String networkFailureMessage();", "public AfFailure getFailure()\n {\n return _failure;\n }", "public void failure(Object content){\n\n\t\tif (isParticipant() && (getState() == RequestProtocolState.SENDING_RESULT)) {\n\t\t\tsendMessage(content, Performative.FAILURE, getInitiator());\n\t\t\tsetFinalStep();\n\t\t}\n\t\telse if( isInitiator() ){\n\t\t\taddError(Locale.getString(\"FipaRequestProtocol.12\")); //$NON-NLS-1$\n\t\t}\n\t\telse{\n\t\t\taddError(Locale.getString(\"FipaRequestProtocol.13\")); //$NON-NLS-1$\n\t\t}\n\t}", "java.lang.String getErr();", "@ErrorType\n public int getErrorType() {\n return mErrorType;\n }", "public ExecutionResult failed(Throwable throwable) {\n var duration = Duration.between(start(), Instant.now());\n return new ExecutionResult(1, duration, out.toString(), err.toString(), throwable);\n }", "public String getFailResult(String response) {\n\n\t\tString result=\"failed\";\n\t\tPattern pattern = Pattern.compile(FAULT_CODE);\n\n\t\tMatcher match = pattern.matcher(response);\n\t\tif (match.find(1)) {\n\t\t\tresult= (match.group(1));\n\t\t}\n\t\treturn result;\t\n\t}", "void recordExecutionError() {\n hadExecutionError = true;\n }", "public void fail( String reason );", "public int getErrcode() {\n return errcode_;\n }", "public String getErrorMsg() {\n return errorMsg;\n }", "public void markAsFailed() {\n execution.setErrorReported();\n }", "public int getErrorNo() {\n return this.errorNo;\n }", "public int getErrcode() {\n return errcode_;\n }", "public TCodeRep getErr() {\n return err;\n }", "public boolean hasFailed() {\n\t\treturn failed;\n\t}", "@Override\n\t\t\t\tpublic void doFail() {\n\t\t\t\t}", "public String getErrorMsg() {\n return this.emsg;\n }", "public Map getError() {\n return this.error;\n }", "public String errorCode() {\n return this.errorCode;\n }", "public java.lang.String getError() {\n return error;\n }", "public String getErrorMsg() {\n return this.state == null ? null : this.state.msg;\n }", "public Error getError() {\r\n\t\treturn error;\r\n\t}", "public String getErrorMessage() {\n\t\treturn this.errMsg;\n\t}", "public String getFailDetail(String response) {\n\n\t\tString detailReason=\"Reason\";\n\t\tPattern pattern = Pattern.compile(FAULT_MESSAGE);\n\t\tMatcher match = pattern.matcher(response);\n\t\tif (match.find(1)) {\n\t\t\tdetailReason= (match.group(1));\n\t\t}\n\t\treturn detailReason;\t\n\t}", "public String getError() {\r\n if (scriptError == null) return \"\";\r\n return scriptError;\r\n }", "@Override\r\n\t\t\t\t\tpublic void failed(String message) {\n\r\n\t\t\t\t\t}", "public String getReason();", "public java.lang.String getReason() {\n java.lang.Object ref = reason_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n reason_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String reason() {\n return this.reason;\n }", "public Integer getCodError() {\r\n\t\treturn codError;\r\n\t}", "public GoatRunnerException(String reason){\n\t this.reason = reason;\n\t }", "public String getErrorMessage() {\r\n return this.errorMessage;\r\n }", "public String reason() {\n return reason;\n }", "@Override\n\tpublic void setFailedError() {\n\t\tnew Customdialog_Base(this, \"정보가 올바르지 않습니다.\").show();\n\t}", "public boolean isFailure() {\n return _type == Type.FAILURE;\n }", "public String getReason() {\n return reason;\n }", "@Override\n\tpublic String getMessage()\n\t{\n\t\treturn errMessage;\n\t}", "public BuildException getException() {\n return failure;\n }", "public void markAsFailed() {\n \n \t\texecutionStateChanged(ExecutionState.FAILED, \"Execution thread died unexpectedly\");\n \t}", "public Byte getNumChargedFail() {\n return numChargedFail;\n }", "public synchronized boolean isErrored() {\n return error != null;\n }", "public AGG_GuidePacketError getError()\n {\n return error;\n }", "@Override\n public void onFailure(Rule rule, Exception e) {\n RulesContext.put(\"status\", \"failed\");\n RulesContext.put(\"message\", this.getClass().getCanonicalName() + \" \" + e.getCause().getMessage());\n\n }", "public String getReason() {\n return reason;\n }", "public String getReason() {\n return reason;\n }", "public String getReason() {\n return reason;\n }" ]
[ "0.7091393", "0.7091393", "0.66118604", "0.65497935", "0.6479944", "0.63662916", "0.63583994", "0.63452834", "0.633421", "0.62598675", "0.62307096", "0.62068605", "0.6120499", "0.60402125", "0.6030832", "0.6027501", "0.59611404", "0.5959054", "0.5950226", "0.5939591", "0.58959955", "0.58918095", "0.58711135", "0.5866256", "0.5856234", "0.58534324", "0.58393437", "0.58297616", "0.58297616", "0.58297616", "0.58297616", "0.5828166", "0.5828166", "0.5828166", "0.58239245", "0.58188796", "0.5810109", "0.5806161", "0.5806161", "0.5792927", "0.5789021", "0.5771118", "0.57615304", "0.57615304", "0.5751653", "0.5742658", "0.5734489", "0.57315034", "0.5711203", "0.5698606", "0.5695964", "0.568788", "0.5669274", "0.5655302", "0.5654138", "0.5652701", "0.5648322", "0.56372714", "0.56273514", "0.56264645", "0.56079817", "0.55936635", "0.55893785", "0.5587761", "0.5586163", "0.5579255", "0.55710334", "0.5568271", "0.55666006", "0.55591285", "0.5550029", "0.5536648", "0.55269706", "0.55269104", "0.55251014", "0.55249846", "0.552407", "0.5520826", "0.5516365", "0.5515023", "0.55056244", "0.5499987", "0.5497371", "0.5493533", "0.5493307", "0.54818475", "0.54782706", "0.54777384", "0.54762775", "0.5470834", "0.5463047", "0.5460474", "0.5458762", "0.54567677", "0.54532665", "0.5447738", "0.54442614", "0.54392105", "0.54357505", "0.54357505", "0.54357505" ]
0.0
-1
If run of the canary failed, this field contains the reason for the error.
public String getStateReason() { return this.stateReason; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getFailureReason() {\n return this.failureReason;\n }", "public String getFailureReason() {\n return this.failureReason;\n }", "public Throwable getReason() { return err; }", "public int failed() {\n return this.failed;\n }", "public String getFailedRemark() {\r\n return failedRemark;\r\n }", "public String getFailureCode() {\n return this.failureCode;\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn \"Failed\";\r\n\t}", "@Override\r\n\tpublic String getMessage() {\n\t\treturn \"Failed\";\r\n\t}", "String failureReason();", "@Override\r\n\tpublic String getFailDescription() {\n\t\treturn null;\r\n\t}", "public String getFailureMessage() {\n return this.failureMessage;\n }", "@Override\n public void onAnalysisFailed(IntegrationAnalyzer.FailReason failReason) {\n String message = failReason.getMessage();\n Log.d(TAG, \"Fail Reason message is\" + message);\n //..\n\n }", "public String getError() {\n return writeResult.getError();\n }", "@Override\n\tpublic String getFailureMessage() {\n\t return null;\n\t}", "public int error() {\n return this.error;\n }", "java.lang.String getReason();", "public String getError() {\n\treturn mistake;\n }", "public int getError() {\n return error;\n }", "public PipelineJobError error() {\n return this.innerProperties() == null ? null : this.innerProperties().error();\n }", "String getFailureMessage();", "public String getError() {\n return error != null ? error : \"An unknown error occurred.\";\n }", "public final boolean isFailed() {\n return failed;\n }", "public boolean isErrored() {\n return errored;\n }", "public static String operationFailed() {\n return holder.format(\"operationFailed\");\n }", "public java.lang.String getFailStatus() {\n\treturn failStatus;\n}", "public String getError() {\r\n\t\treturn error;\r\n\t}", "public void setFailureReason(String failureReason) {\n this.failureReason = failureReason;\n }", "public String getError() {\n return error;\n }", "public String getError() {\n return error;\n }", "public String getError() {\n return error;\n }", "public String getError() {\n return error;\n }", "java.lang.String getError();", "java.lang.String getError();", "java.lang.String getError();", "@JsonProperty(\"failureReason\")\n public String getFailureReason() {\n return failureReason;\n }", "public final String getError(){\n return lastKnownError;\n }", "public String errorDescription()\n {\n return edma_errorDesc;\n }", "public String getError() {\n\t\treturn error;\n\t}", "public String getError() {\n\t\treturn error;\n\t}", "public boolean getFailOnErr() {\n return mFailonerr;\n }", "public String errorDetails() {\n return this.errorDetails;\n }", "public boolean hasFail() {\n return result.hasFail();\n }", "public void setFailureReason(String failureReason) {\n this.failureReason = failureReason;\n }", "public void setFailureReason(String failureReason) {\n this.failureReason = failureReason;\n }", "public String getError() {\n return errMsg;\n }", "@ApiModelProperty(value = \"The reason this auto order failed during the last rebill attempt\")\r\n public String getFailureReason() {\r\n return failureReason;\r\n }", "public boolean isFailure( ) {\n\t\treturn failed;\n\t}", "public String getErrorText() {\n return m_ErrorText;\n }", "public String getErrorDescription() {\n return errorDescription;\n }", "public String errorMessage() {\n return this.errorMessage;\n }", "public String getErrorText() {\n\t\treturn errorText;\n\t}", "@Override\n boolean isFailed() {\n return false;\n }", "protected String failedMatcherMessage() {\n return \"FAILED!\";\n }", "public String getErrorMsg() {\r\n\t\treturn errorMsg;\r\n\t}", "public String networkFailureMessage();", "public AfFailure getFailure()\n {\n return _failure;\n }", "public void failure(Object content){\n\n\t\tif (isParticipant() && (getState() == RequestProtocolState.SENDING_RESULT)) {\n\t\t\tsendMessage(content, Performative.FAILURE, getInitiator());\n\t\t\tsetFinalStep();\n\t\t}\n\t\telse if( isInitiator() ){\n\t\t\taddError(Locale.getString(\"FipaRequestProtocol.12\")); //$NON-NLS-1$\n\t\t}\n\t\telse{\n\t\t\taddError(Locale.getString(\"FipaRequestProtocol.13\")); //$NON-NLS-1$\n\t\t}\n\t}", "java.lang.String getErr();", "@ErrorType\n public int getErrorType() {\n return mErrorType;\n }", "public ExecutionResult failed(Throwable throwable) {\n var duration = Duration.between(start(), Instant.now());\n return new ExecutionResult(1, duration, out.toString(), err.toString(), throwable);\n }", "public String getFailResult(String response) {\n\n\t\tString result=\"failed\";\n\t\tPattern pattern = Pattern.compile(FAULT_CODE);\n\n\t\tMatcher match = pattern.matcher(response);\n\t\tif (match.find(1)) {\n\t\t\tresult= (match.group(1));\n\t\t}\n\t\treturn result;\t\n\t}", "void recordExecutionError() {\n hadExecutionError = true;\n }", "public void fail( String reason );", "public int getErrcode() {\n return errcode_;\n }", "public String getErrorMsg() {\n return errorMsg;\n }", "public void markAsFailed() {\n execution.setErrorReported();\n }", "public int getErrorNo() {\n return this.errorNo;\n }", "public int getErrcode() {\n return errcode_;\n }", "public TCodeRep getErr() {\n return err;\n }", "public boolean hasFailed() {\n\t\treturn failed;\n\t}", "@Override\n\t\t\t\tpublic void doFail() {\n\t\t\t\t}", "public String getErrorMsg() {\n return this.emsg;\n }", "public Map getError() {\n return this.error;\n }", "public String errorCode() {\n return this.errorCode;\n }", "public String getErrorMsg() {\n return this.state == null ? null : this.state.msg;\n }", "public java.lang.String getError() {\n return error;\n }", "public Error getError() {\r\n\t\treturn error;\r\n\t}", "public String getErrorMessage() {\n\t\treturn this.errMsg;\n\t}", "public String getFailDetail(String response) {\n\n\t\tString detailReason=\"Reason\";\n\t\tPattern pattern = Pattern.compile(FAULT_MESSAGE);\n\t\tMatcher match = pattern.matcher(response);\n\t\tif (match.find(1)) {\n\t\t\tdetailReason= (match.group(1));\n\t\t}\n\t\treturn detailReason;\t\n\t}", "public String getError() {\r\n if (scriptError == null) return \"\";\r\n return scriptError;\r\n }", "@Override\r\n\t\t\t\t\tpublic void failed(String message) {\n\r\n\t\t\t\t\t}", "public String getReason();", "public java.lang.String getReason() {\n java.lang.Object ref = reason_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n reason_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String reason() {\n return this.reason;\n }", "public Integer getCodError() {\r\n\t\treturn codError;\r\n\t}", "public GoatRunnerException(String reason){\n\t this.reason = reason;\n\t }", "public String reason() {\n return reason;\n }", "public String getErrorMessage() {\r\n return this.errorMessage;\r\n }", "@Override\n\tpublic void setFailedError() {\n\t\tnew Customdialog_Base(this, \"정보가 올바르지 않습니다.\").show();\n\t}", "public boolean isFailure() {\n return _type == Type.FAILURE;\n }", "public String getReason() {\n return reason;\n }", "@Override\n\tpublic String getMessage()\n\t{\n\t\treturn errMessage;\n\t}", "public BuildException getException() {\n return failure;\n }", "public void markAsFailed() {\n \n \t\texecutionStateChanged(ExecutionState.FAILED, \"Execution thread died unexpectedly\");\n \t}", "public Byte getNumChargedFail() {\n return numChargedFail;\n }", "public synchronized boolean isErrored() {\n return error != null;\n }", "public AGG_GuidePacketError getError()\n {\n return error;\n }", "@Override\n public void onFailure(Rule rule, Exception e) {\n RulesContext.put(\"status\", \"failed\");\n RulesContext.put(\"message\", this.getClass().getCanonicalName() + \" \" + e.getCause().getMessage());\n\n }", "public String getReason() {\n return reason;\n }", "public String getReason() {\n return reason;\n }", "public String getReason() {\n return reason;\n }" ]
[ "0.709104", "0.709104", "0.66127753", "0.654964", "0.6480257", "0.6365709", "0.6359918", "0.63470453", "0.63354623", "0.6261161", "0.6230585", "0.62085193", "0.61206275", "0.6041374", "0.6030752", "0.6029081", "0.5962125", "0.5958636", "0.5949829", "0.59407663", "0.5896691", "0.5891455", "0.5870867", "0.5867137", "0.58562344", "0.5853496", "0.5839489", "0.58296347", "0.58296347", "0.58296347", "0.58296347", "0.5828869", "0.5828869", "0.5828869", "0.5823492", "0.5819696", "0.58109194", "0.5806233", "0.5806233", "0.57925487", "0.57895786", "0.5771204", "0.5761652", "0.5761652", "0.5751625", "0.5742436", "0.5733975", "0.5732164", "0.5711774", "0.56989413", "0.569659", "0.5688761", "0.5670725", "0.5655454", "0.56554496", "0.56521875", "0.5647755", "0.5638974", "0.56271106", "0.5627078", "0.56078947", "0.5595491", "0.55887425", "0.55878764", "0.5586259", "0.558011", "0.5571276", "0.5568447", "0.5567373", "0.5559634", "0.5549997", "0.5537255", "0.5526966", "0.5526813", "0.5525214", "0.5525202", "0.5523882", "0.55211425", "0.5517244", "0.55154365", "0.55069566", "0.55014783", "0.5498702", "0.54948866", "0.549346", "0.5484357", "0.54791945", "0.5478434", "0.5478076", "0.54704016", "0.54644376", "0.54627186", "0.5459243", "0.5457706", "0.5453412", "0.54474753", "0.544469", "0.54394525", "0.5437072", "0.5437072", "0.5437072" ]
0.0
-1
If run of the canary failed, this field contains the reason for the error.
public CanaryRunStatus withStateReason(String stateReason) { setStateReason(stateReason); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getFailureReason() {\n return this.failureReason;\n }", "public String getFailureReason() {\n return this.failureReason;\n }", "public Throwable getReason() { return err; }", "public int failed() {\n return this.failed;\n }", "public String getFailedRemark() {\r\n return failedRemark;\r\n }", "public String getFailureCode() {\n return this.failureCode;\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn \"Failed\";\r\n\t}", "@Override\r\n\tpublic String getMessage() {\n\t\treturn \"Failed\";\r\n\t}", "String failureReason();", "@Override\r\n\tpublic String getFailDescription() {\n\t\treturn null;\r\n\t}", "public String getFailureMessage() {\n return this.failureMessage;\n }", "@Override\n public void onAnalysisFailed(IntegrationAnalyzer.FailReason failReason) {\n String message = failReason.getMessage();\n Log.d(TAG, \"Fail Reason message is\" + message);\n //..\n\n }", "public String getError() {\n return writeResult.getError();\n }", "@Override\n\tpublic String getFailureMessage() {\n\t return null;\n\t}", "public int error() {\n return this.error;\n }", "java.lang.String getReason();", "public String getError() {\n\treturn mistake;\n }", "public int getError() {\n return error;\n }", "public PipelineJobError error() {\n return this.innerProperties() == null ? null : this.innerProperties().error();\n }", "String getFailureMessage();", "public String getError() {\n return error != null ? error : \"An unknown error occurred.\";\n }", "public final boolean isFailed() {\n return failed;\n }", "public boolean isErrored() {\n return errored;\n }", "public static String operationFailed() {\n return holder.format(\"operationFailed\");\n }", "public java.lang.String getFailStatus() {\n\treturn failStatus;\n}", "public String getError() {\r\n\t\treturn error;\r\n\t}", "public void setFailureReason(String failureReason) {\n this.failureReason = failureReason;\n }", "public String getError() {\n return error;\n }", "public String getError() {\n return error;\n }", "public String getError() {\n return error;\n }", "public String getError() {\n return error;\n }", "java.lang.String getError();", "java.lang.String getError();", "java.lang.String getError();", "@JsonProperty(\"failureReason\")\n public String getFailureReason() {\n return failureReason;\n }", "public final String getError(){\n return lastKnownError;\n }", "public String errorDescription()\n {\n return edma_errorDesc;\n }", "public String getError() {\n\t\treturn error;\n\t}", "public String getError() {\n\t\treturn error;\n\t}", "public boolean getFailOnErr() {\n return mFailonerr;\n }", "public String errorDetails() {\n return this.errorDetails;\n }", "public boolean hasFail() {\n return result.hasFail();\n }", "public void setFailureReason(String failureReason) {\n this.failureReason = failureReason;\n }", "public void setFailureReason(String failureReason) {\n this.failureReason = failureReason;\n }", "public String getError() {\n return errMsg;\n }", "@ApiModelProperty(value = \"The reason this auto order failed during the last rebill attempt\")\r\n public String getFailureReason() {\r\n return failureReason;\r\n }", "public boolean isFailure( ) {\n\t\treturn failed;\n\t}", "public String getErrorText() {\n return m_ErrorText;\n }", "public String getErrorDescription() {\n return errorDescription;\n }", "public String errorMessage() {\n return this.errorMessage;\n }", "public String getErrorText() {\n\t\treturn errorText;\n\t}", "@Override\n boolean isFailed() {\n return false;\n }", "protected String failedMatcherMessage() {\n return \"FAILED!\";\n }", "public String getErrorMsg() {\r\n\t\treturn errorMsg;\r\n\t}", "public String networkFailureMessage();", "public AfFailure getFailure()\n {\n return _failure;\n }", "public void failure(Object content){\n\n\t\tif (isParticipant() && (getState() == RequestProtocolState.SENDING_RESULT)) {\n\t\t\tsendMessage(content, Performative.FAILURE, getInitiator());\n\t\t\tsetFinalStep();\n\t\t}\n\t\telse if( isInitiator() ){\n\t\t\taddError(Locale.getString(\"FipaRequestProtocol.12\")); //$NON-NLS-1$\n\t\t}\n\t\telse{\n\t\t\taddError(Locale.getString(\"FipaRequestProtocol.13\")); //$NON-NLS-1$\n\t\t}\n\t}", "java.lang.String getErr();", "@ErrorType\n public int getErrorType() {\n return mErrorType;\n }", "public ExecutionResult failed(Throwable throwable) {\n var duration = Duration.between(start(), Instant.now());\n return new ExecutionResult(1, duration, out.toString(), err.toString(), throwable);\n }", "public String getFailResult(String response) {\n\n\t\tString result=\"failed\";\n\t\tPattern pattern = Pattern.compile(FAULT_CODE);\n\n\t\tMatcher match = pattern.matcher(response);\n\t\tif (match.find(1)) {\n\t\t\tresult= (match.group(1));\n\t\t}\n\t\treturn result;\t\n\t}", "void recordExecutionError() {\n hadExecutionError = true;\n }", "public void fail( String reason );", "public int getErrcode() {\n return errcode_;\n }", "public String getErrorMsg() {\n return errorMsg;\n }", "public void markAsFailed() {\n execution.setErrorReported();\n }", "public int getErrorNo() {\n return this.errorNo;\n }", "public int getErrcode() {\n return errcode_;\n }", "public TCodeRep getErr() {\n return err;\n }", "public boolean hasFailed() {\n\t\treturn failed;\n\t}", "@Override\n\t\t\t\tpublic void doFail() {\n\t\t\t\t}", "public String getErrorMsg() {\n return this.emsg;\n }", "public Map getError() {\n return this.error;\n }", "public java.lang.String getError() {\n return error;\n }", "public String errorCode() {\n return this.errorCode;\n }", "public Error getError() {\r\n\t\treturn error;\r\n\t}", "public String getErrorMsg() {\n return this.state == null ? null : this.state.msg;\n }", "public String getErrorMessage() {\n\t\treturn this.errMsg;\n\t}", "public String getError() {\r\n if (scriptError == null) return \"\";\r\n return scriptError;\r\n }", "public String getFailDetail(String response) {\n\n\t\tString detailReason=\"Reason\";\n\t\tPattern pattern = Pattern.compile(FAULT_MESSAGE);\n\t\tMatcher match = pattern.matcher(response);\n\t\tif (match.find(1)) {\n\t\t\tdetailReason= (match.group(1));\n\t\t}\n\t\treturn detailReason;\t\n\t}", "@Override\r\n\t\t\t\t\tpublic void failed(String message) {\n\r\n\t\t\t\t\t}", "public String getReason();", "public java.lang.String getReason() {\n java.lang.Object ref = reason_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n reason_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public Integer getCodError() {\r\n\t\treturn codError;\r\n\t}", "public String reason() {\n return this.reason;\n }", "public GoatRunnerException(String reason){\n\t this.reason = reason;\n\t }", "public String getErrorMessage() {\r\n return this.errorMessage;\r\n }", "public String reason() {\n return reason;\n }", "@Override\n\tpublic void setFailedError() {\n\t\tnew Customdialog_Base(this, \"정보가 올바르지 않습니다.\").show();\n\t}", "public boolean isFailure() {\n return _type == Type.FAILURE;\n }", "public String getReason() {\n return reason;\n }", "@Override\n\tpublic String getMessage()\n\t{\n\t\treturn errMessage;\n\t}", "public BuildException getException() {\n return failure;\n }", "public void markAsFailed() {\n \n \t\texecutionStateChanged(ExecutionState.FAILED, \"Execution thread died unexpectedly\");\n \t}", "public Byte getNumChargedFail() {\n return numChargedFail;\n }", "public synchronized boolean isErrored() {\n return error != null;\n }", "public AGG_GuidePacketError getError()\n {\n return error;\n }", "@Override\n public void onFailure(Rule rule, Exception e) {\n RulesContext.put(\"status\", \"failed\");\n RulesContext.put(\"message\", this.getClass().getCanonicalName() + \" \" + e.getCause().getMessage());\n\n }", "public void setWorkitemsFailed(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(WORKITEMSFAILED_PROP.get(), value);\n }", "public String getReason() {\n return reason;\n }", "public String getReason() {\n return reason;\n }" ]
[ "0.7089927", "0.7089927", "0.6611714", "0.65501153", "0.64783657", "0.63650584", "0.6359494", "0.63465375", "0.63336354", "0.62602186", "0.6229832", "0.6207291", "0.6121275", "0.60401773", "0.6032159", "0.602737", "0.59621876", "0.5960344", "0.5950257", "0.5939339", "0.58961195", "0.58918786", "0.5870801", "0.5867004", "0.58566713", "0.5854236", "0.583846", "0.58305365", "0.58305365", "0.58305365", "0.58305365", "0.5829061", "0.5829061", "0.5829061", "0.5822784", "0.5819669", "0.581023", "0.5806926", "0.5806926", "0.57928896", "0.5788463", "0.57715064", "0.5760663", "0.5760663", "0.5751846", "0.5742163", "0.57336605", "0.573293", "0.5711188", "0.56987035", "0.56968826", "0.56889904", "0.5669813", "0.56554306", "0.56545496", "0.56526774", "0.5648185", "0.56379414", "0.562859", "0.56258196", "0.5606985", "0.5595909", "0.5588756", "0.55875546", "0.55863404", "0.5580899", "0.55720854", "0.556808", "0.55675423", "0.55594516", "0.5551523", "0.5537185", "0.5527803", "0.55264914", "0.5526403", "0.55249774", "0.5524846", "0.55206203", "0.5515537", "0.5515438", "0.55060756", "0.5500037", "0.54971933", "0.54936486", "0.5493452", "0.54830754", "0.5478209", "0.5477861", "0.54776627", "0.54706174", "0.5463047", "0.54617333", "0.5458654", "0.5458569", "0.5453786", "0.5447179", "0.54455906", "0.54383653", "0.54367393", "0.54355824", "0.54355824" ]
0.0
-1
If this value is CANARY_FAILURE, an exception occurred in the canary code. If this value is EXECUTION_FAILURE, an exception occurred in CloudWatch Synthetics.
public void setStateReasonCode(String stateReasonCode) { this.stateReasonCode = stateReasonCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getFailureCode() {\n return this.failureCode;\n }", "private ErrorCode getErrorCodeFromHystrixFailure(FailureType failureType) {\n switch (failureType) {\n case TIMEOUT:\n return ErrorCode.TIMEOUT_ERROR;\n case SHORTCIRCUIT:\n return ErrorCode.SHORTCIRCUIT_ERROR;\n case REJECTED_THREAD_EXECUTION:\n return ErrorCode.TOO_MANY_REQUESTS_ERROR;\n default:\n return ErrorCode.INTEGRATION_ERROR;\n }\n }", "@Test\n public void testFailure() throws ComponentInitializationException, ParseException {\n Set<ResponseType> responseTypes = new HashSet<ResponseType>();\n responseTypes.add(ResponseType.parse(\"code\"));\n metaData.setResponseTypes(responseTypes);\n final Event event = action.execute(requestCtx);\n ActionTestingSupport.assertEvent(event, OidcEventIds.INVALID_RESPONSE_TYPE);\n }", "public String getFailureReason() {\n return this.failureReason;\n }", "public String getFailureReason() {\n return this.failureReason;\n }", "public boolean isFailure() {\n return _type == Type.FAILURE;\n }", "@Override\n\t\t\tpublic void onBizFailure(String responseDescription, JSONObject data, String flag) {\n\n\t\t\t}", "String failureReason();", "String getFailureMessage();", "public int failureLevel(){\n return RESULT_WARNING;\n }", "public ExecutionResult failed(Throwable throwable) {\n var duration = Duration.between(start(), Instant.now());\n return new ExecutionResult(1, duration, out.toString(), err.toString(), throwable);\n }", "@Override\n\tpublic String getFailureMessage() {\n\t return null;\n\t}", "void failure(ServiceExecutionEvent e) {\n\n }", "public String getFailureMessage() {\n return this.failureMessage;\n }", "public String getFailResult(String response) {\n\n\t\tString result=\"failed\";\n\t\tPattern pattern = Pattern.compile(FAULT_CODE);\n\n\t\tMatcher match = pattern.matcher(response);\n\t\tif (match.find(1)) {\n\t\t\tresult= (match.group(1));\n\t\t}\n\t\treturn result;\t\n\t}", "public ConfigurationServerFailureException(String message) {\n\t\tsuper(PlatformErrorMessages.RPR_CMB_CONFIGURATION_SERVER_FAILURE_EXCEPTION.getCode(), message);\n\t}", "public static String operationFailed() {\n return holder.format(\"operationFailed\");\n }", "@Override\n\t\t\tpublic void onFail(int code) {\n\t\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onFail(int code) {\n\t\t\t\t\n\t\t\t}", "int getReturnCode();", "int getReturnCode();", "@Override\n\t\t\t\t\tpublic void onFailure(Integer result, String resultMsg) {\n\t\t\t\t\t\thandleErrorCode(result, resultMsg);\n\t\t\t\t\t}", "@Override\n public void onFailure(Throwable e) {\n handleFailure(key, value, e);\n }", "@Override\n public void onFailure(Throwable e) {\n handleFailure(key, value, e);\n }", "public boolean isFailure( ) {\n\t\treturn failed;\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void HttpFail(int ErrCode) {\n\n\t\t\t\t\t\t\t}", "public abstract void onFailure(FailureCode code, Throwable ex);", "public String networkFailureMessage();", "@Test\n @ConditionalIgnoreRule.ConditionalIgnore(condition = RunningOnGithubAction.class)\n public void testFailure() throws Exception {\n ExecutorService executorService = Executors.newFixedThreadPool(1);\n try {\n Future<?> future =\n executorService.submit(\n () -> {\n try {\n submitQuery(false, 0);\n } catch (SQLException e) {\n throw new RuntimeSQLException(\"SQLException\", e);\n } catch (InterruptedException e) {\n throw new IllegalStateException(\"task interrupted\", e);\n }\n });\n executorService.shutdown();\n future.get();\n fail(\"should fail and raise an exception\");\n } catch (ExecutionException ex) {\n Throwable rootCause = ex.getCause();\n assertThat(\"Runtime Exception\", rootCause, instanceOf(RuntimeSQLException.class));\n\n rootCause = rootCause.getCause();\n\n assertThat(\"Root cause class\", rootCause, instanceOf(SnowflakeSQLException.class));\n assertThat(\"Error code\", ((SnowflakeSQLException) rootCause).getErrorCode(), equalTo(390114));\n }\n }", "SendFailure() {\n super(ACLMessage.FAILURE);\n }", "@Test\n public void executeWithFailure() {\n new SimpleCommandFailure(\"badRequest\", HystrixRuntimeException.FailureType.COMMAND_EXCEPTION).execute();\n }", "public void onFailure(WorkContainer<K, V> wc) {\n wc.fail(clock);\n putBack(wc);\n }", "@Override\r\n\tpublic void onFail() {\n\t\tif(bSendStatus)\r\n\t\t\tnativeadstatus(E_ONFAIL);\r\n\t}", "public static FailureReasons get(int value) {\r\n\t\tswitch (value) {\r\n\t\t\tcase UNABLETO_PLAN_FOR_TASK_VALUE: return UNABLETO_PLAN_FOR_TASK;\r\n\t\t\tcase ACTION_NOT_PERFORMED_BY_AROLE_VALUE: return ACTION_NOT_PERFORMED_BY_AROLE;\r\n\t\t\tcase PRECONDITION_FAIL_VALUE: return PRECONDITION_FAIL;\r\n\t\t\tcase ZERO_SERVICE_MATCHES_FOR_ACTION_VALUE: return ZERO_SERVICE_MATCHES_FOR_ACTION;\r\n\t\t\tcase NO_USABLE_SERVICE_MATCHES_FOR_ACTION_VALUE: return NO_USABLE_SERVICE_MATCHES_FOR_ACTION;\r\n\t\t\tcase SERVICE_UNAVAILABLE_VALUE: return SERVICE_UNAVAILABLE;\r\n\t\t\tcase SERVICE_FAILURE_VALUE: return SERVICE_FAILURE;\r\n\t\t\tcase NULL_POINTER_EXCEPTION_VALUE: return NULL_POINTER_EXCEPTION;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public void failure(Object content){\n\n\t\tif (isParticipant() && (getState() == RequestProtocolState.SENDING_RESULT)) {\n\t\t\tsendMessage(content, Performative.FAILURE, getInitiator());\n\t\t\tsetFinalStep();\n\t\t}\n\t\telse if( isInitiator() ){\n\t\t\taddError(Locale.getString(\"FipaRequestProtocol.12\")); //$NON-NLS-1$\n\t\t}\n\t\telse{\n\t\t\taddError(Locale.getString(\"FipaRequestProtocol.13\")); //$NON-NLS-1$\n\t\t}\n\t}", "public BuildException getException() {\n return failure;\n }", "boolean isFailure();", "public AfFailure getFailure()\n {\n return _failure;\n }", "@Nullable\n public ApolloException awaitFailure() {\n Await.latch(failureLatch, waitTimeMs);\n return failureContainer.get();\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, String content,\n Throwable e) {\n Log.d(\"statusCode\", \"4XX\");\n // Hide Progress Dialog\n //progress.hide();\n String resultErrorMsg = \"\";\n // When Http response code is '404'\n if (statusCode == 404) {\n resultErrorMsg = \"Requested resource not found\";\n }\n // When Http response code is '500'\n else if (statusCode == 500) {\n resultErrorMsg = \"Something went wrong at server end\";\n }\n // When Http response code other than 404, 500\n else {\n resultErrorMsg = \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]\";\n }\n bro.setResultStateCode(statusCode);\n bro.setResultMsg(resultErrorMsg);\n bro.setResultJSONArray(null);\n listener.onShowJobsFailure(bro);\n }", "String getFaultReasonValue();", "int getErrorCode();", "void persistentFailure(String category);", "public abstract R createFailedResult(Status status);", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"提交超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"提交超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"提交超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"提交超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "boolean processFailure(Throwable t);", "@Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n loopjListener.getResponse(\"Error Bro:(\");\n Log.d(TAG, \"onFailure#1: \" + errorResponse);\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n loopjListener.getResponse(\"Error Bro:(\");\n Log.d(TAG, \"onFailure#1: \" + errorResponse);\n }", "public ErrorCode error() {\n return new ErrorCode(alert.getError());\n }", "@DISPID(37)\r\n\t// = 0x25. The runtime will prefer the VTID if present\r\n\t@VTID(36)\r\n\tint lastInstanceReturnCode();", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n Fog.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "public int getErrorCode() {\n return parameter.getErrCode();\n }", "public void engineFailureStatus() {\n \tthis.engineFailureActive = this.trainModelGUI.engineFailStatus();\n }", "@Override\n\tpublic boolean isFailureMode() {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic String getMessage() {\n\t\treturn \"Failed\";\r\n\t}", "public void onFail(int statusCode, String address);", "public void testFailure(Failure failure) throws java.lang.Exception {\n test.fail(failure.getException().getLocalizedMessage());\n\n System.out.println(\"Execution of test case failed : \" + failure.getMessage());\n }", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tbyte[] responseBody, Throwable error) {\n\t\t\t\t\t\terror.printStackTrace();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tbyte[] responseBody, Throwable error) {\n\t\t\t\t\t\terror.printStackTrace();\n\t\t\t\t\t}", "@Override\n boolean canFail() {\n return true;\n }", "public InsertErrorException() {\n super(ErrorConstants.DEFAULT_TYPE, MessageContants.CONST_ERROR_CODE_INSERT_FAILURE, Status.INTERNAL_SERVER_ERROR);\n }", "public RightsManagementFailureCode(java.lang.Object instance) {\n super(instance);\n if (instance instanceof JCObject) {\n try {\n String enumName = NetEnum.GetName(classType, (JCObject)instance);\n classInstance = enumReflected.fromValue(enumName);\n } catch (Throwable t) {\n JCOReflector.writeLog(t);\n classInstance = enumReflected;\n }\n } else if (instance instanceof JCEnum) {\n classInstance = (JCEnum)instance;\n }\n }", "public void setFailureCode(String failureCode) {\n this.failureCode = failureCode;\n }", "@Override\r\n\t\t\t\t\t\tpublic void onFailed(String failReason) {\n\t\t\t\t\t\t\tTypeSDKLogger.e(\"return Error\");\r\n\t\t\t\t\t\t\tTypeSDKLogger.e(\"failReason:\" + failReason);\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT, \"0\");\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT_REASON, \"PAY_FAIL\");\r\n\t\t\t\t\t\t\tnotify.Pay(payResult.DataToString());\r\n\t\t\t\t\t\t}", "public java.lang.String getFailStatus() {\n\treturn failStatus;\n}", "public static <Data> Result<Data> failure(Data data) {\n return new Result<>(data, Type.FAILURE);\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \" + connectionResult.getErrorCode());\n }", "private FailureReasons(int value, String name, String literal) {\r\n\t\tthis.value = value;\r\n\t\tthis.name = name;\r\n\t\tthis.literal = literal;\r\n\t}", "@Test\n void testFailure_unrecognizedStatus() {\n assertThrows(\n IllegalArgumentException.class,\n () ->\n runCommandForced(\n \"--client=NewRegistrar\",\n \"--registrar_request=true\",\n \"--reason=Test\",\n \"--domain_name=example.tld\",\n \"--apply=foo\"));\n }", "@Override\r\n\t\t\t\t\t\tpublic void onPayFailed(CPOrderInfo arg0, ErrorInfoBean arg1) {\n\t\t\t\t\t\t\tTypeSDKLogger.e( \"return Error\");\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT, \"0\");\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT_REASON, \"PAY_FAIL\");\r\n\t\t\t\t\t\t\tnotify.Pay(payResult.DataToString());\r\n\t\t\t\t\t\t}", "public int failed() {\n return this.failed;\n }", "@Test\n void testFailure_illegalStatus() {\n assertThrows(\n IllegalArgumentException.class,\n () ->\n runCommandForced(\n \"--client=NewRegistrar\",\n \"--registrar_request=true\",\n \"--reason=Test\",\n \"--domain_name=example.tld\",\n \"--apply=clientRenewProhibited\"));\n }", "@DISPID(4)\r\n\t// = 0x4. The runtime will prefer the VTID if present\r\n\t@VTID(10)\r\n\tint lastInstanceReturnCode();", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }", "@Override\n public void onFailure(Throwable caught) {\n result.onFailure(caught);\n }", "public org.xms.g.common.api.Status onFailure(org.xms.g.common.api.Status param0) {\n if (wrapper) {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.support.api.client.ResultConvert) this.getHInstance()).onFailed(((com.huawei.hms.support.api.client.Status) ((param0) == null ? null : (param0.getHInstance()))))\");\n com.huawei.hms.support.api.client.Status hReturn = ((com.huawei.hms.support.api.client.ResultConvert) this.getHInstance()).onFailed(((com.huawei.hms.support.api.client.Status) ((param0) == null ? null : (param0.getHInstance()))));\n return ((hReturn) == null ? null : (new org.xms.g.common.api.Status(new org.xms.g.utils.XBox(null, hReturn))));\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.common.api.ResultTransform) this.getGInstance()).onFailure(((com.google.android.gms.common.api.Status) ((param0) == null ? null : (param0.getGInstance()))))\");\n com.google.android.gms.common.api.Status gReturn = ((com.google.android.gms.common.api.ResultTransform) this.getGInstance()).onFailure(((com.google.android.gms.common.api.Status) ((param0) == null ? null : (param0.getGInstance()))));\n return ((gReturn) == null ? null : (new org.xms.g.common.api.Status(new org.xms.g.utils.XBox(gReturn, null))));\n }\n } else {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((HImpl) ((com.huawei.hms.support.api.client.ResultConvert) this.getHInstance())).onFailedCallSuper(((com.huawei.hms.support.api.client.Status) ((param0) == null ? null : (param0.getHInstance()))))\");\n com.huawei.hms.support.api.client.Status hReturn = ((HImpl) ((com.huawei.hms.support.api.client.ResultConvert) this.getHInstance())).onFailedCallSuper(((com.huawei.hms.support.api.client.Status) ((param0) == null ? null : (param0.getHInstance()))));\n return ((hReturn) == null ? null : (new org.xms.g.common.api.Status(new org.xms.g.utils.XBox(null, hReturn))));\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((GImpl) ((com.google.android.gms.common.api.ResultTransform) this.getGInstance())).onFailureCallSuper(((com.google.android.gms.common.api.Status) ((param0) == null ? null : (param0.getGInstance()))))\");\n com.google.android.gms.common.api.Status gReturn = ((GImpl) ((com.google.android.gms.common.api.ResultTransform) this.getGInstance())).onFailureCallSuper(((com.google.android.gms.common.api.Status) ((param0) == null ? null : (param0.getGInstance()))));\n return ((gReturn) == null ? null : (new org.xms.g.common.api.Status(new org.xms.g.utils.XBox(gReturn, null))));\n }\n }\n }", "@Override\n public void onFailure(Rule rule, Exception e) {\n RulesContext.put(\"status\", \"failed\");\n RulesContext.put(\"message\", this.getClass().getCanonicalName() + \" \" + e.getCause().getMessage());\n\n }", "public void setWorkitemsFailed(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(WORKITEMSFAILED_PROP.get(), value);\n }", "@Override\n\t\t\tpublic void onFailure(Throwable t, String errorMsg, int statusCode) {\n\t\t\t}", "private int exitUnitException() {\r\n\t\tthis.updateUnitStatus();\r\n\t\tthis.eventLogger.logLine(\" => UNIT_EXCEPTION, DEVICE_END\");\r\n\t\treturn iDeviceStatus.UNIT_EXCEPTION | iDeviceStatus.DEVICE_END;\r\n\t}", "private void setFailed(int errorCode){\n\t\tCartPayIndent currentIndent = mCoffeeIndentsList.get(mCurrentIndentIndex);\n\t\tString indentID = currentIndent.getIndentID();\n\t\tint coffeeID = currentIndent.getCoffeeID();\n\t\tLogUtil.e(TAG, \"make coffee unsuccessully, code:\" + errorCode + \", indent:\" + indentID);\n\t\tupdateIndentStatusDB(FLAG_ERROR, indentID, coffeeID);\n\t\t// rollback order\n\t\trollBackOrder(errorCode);\n\t\t// report server\n\t\tList<Integer> status = new ArrayList<Integer>();\n\t\tMachineStatusReportInfo info = new MachineStatusReportInfo();\n\t\tinfo.setUid(U.getMyVendorNum());\n\t\tinfo.setTimestamp(TimeUtil.getNow_millisecond());\n\t\tstatus.add(errorCode);\n\t\tinfo.setStatus(status);\n\t\texecute(info.toRemote());\n\n\t\tmMachineStatus = CoffeeMachineStatus.READY;\n\t\t// quit time\n\t\tmUIHandler.sendEmptyMessage(MSG_UI_MAKE_COFFEE_FAIL);\n\t\tmQuitTimer.startCountDownTimer(QUIT_WAIT_TIME, 1000, 1000);\n\t}", "void failure(String category);", "@Override\r\n\tpublic String getFailDescription() {\n\t\treturn null;\r\n\t}", "public String getErrorCode();", "public void onFailure();", "@Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n loopjListener.getResponse(\"Error Bro:(\");\n Log.d(TAG, \"onFailure#2: \" + responseString);\n }", "public void test_GetContestStatus_Failure2() throws Exception {\r\n try {\r\n initContext();\r\n\r\n entityManager.enablePersistenceException(true);\r\n beanUnderTest.getContestStatus(1);\r\n\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "@Override\n public void onAnalysisFailed(IntegrationAnalyzer.FailReason failReason) {\n String message = failReason.getMessage();\n Log.d(TAG, \"Fail Reason message is\" + message);\n //..\n\n }", "@Test\n public void CloudScriptErrorServer()\n {\n PlayFabServerModels.ExecuteCloudScriptServerRequest errRequest = new PlayFabServerModels.ExecuteCloudScriptServerRequest();\n errRequest.FunctionName = \"throwError\";\n errRequest.PlayFabId = playFabId;\n PlayFabResult<PlayFabServerModels.ExecuteCloudScriptResult> errResult = PlayFabServerAPI.ExecuteCloudScript(errRequest);\n\n String errorMessage = CompileErrorsFromResult(errResult);\n assertNotNull(errorMessage, errResult.Error);\n\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, String res, Throwable t) {\n\n Log.i(\"onFailure\", res);\n }", "@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\tWindow.alert(\"Fail\");\n\t\t\t\t\t}", "public ConfigurationServerFailureException() {\n\t\tsuper();\n\t}", "public void setWorkitemsFailed(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(WORKITEMSFAILED_PROP.get(), value);\n }", "public String getFailureMode() {\r\n\t\treturn failureMode;\r\n\t}", "public ValidationFailure(Exception exception) {\n message = exception.getMessage();\n if (exception instanceof XPathException) {\n errorCode = ((XPathException)exception).getErrorCodeLocalPart();\n }\n }", "public SOAPErrorCodes() {\n\t\terrorMap = new Hashtable<>();\n\t\terrorMap.put(\"401\", new String[] {\"Invalid Action\",\n\t\t\t\t\"No action by that name at this service.\"});\n\t\terrorMap\n\t\t\t\t.put(\n\t\t\t\t\t\t\"402\",\n\t\t\t\t\t\tnew String[] {\n\t\t\t\t\t\t\t\t\"Invalid Args\",\n\t\t\t\t\t\t\t\t\"Could be any of the following: not \"\n\t\t\t\t\t\t\t\t\t\t+ \"enough in args, too many in args, no in args, no in args by that name, \"\n\t\t\t\t\t\t\t\t\t\t+ \"one or more in args are of the wrong data type.\"});\n\t\terrorMap.put(\"403\", new String[] {\"Out of Sync\",\n\t\t\t\t\"Out of synchronization.\"});\n\t\terrorMap.put(\"501\", new String[] {\n\t\t\t\t\"Action Failed\",\n\t\t\t\t\"May be returned in current state of \"\n\t\t\t\t\t\t+ \"service prevents invoking that action.\"});\n\t\terrorMap.put(\"404\", new String[] {\"Invalid Var\",\n\t\t\t\t\"No state variable by that name at this service.\"});\n\t}", "@Override\n\t\t\tpublic void onFailure(int code, String msg, Object object) {\n\n\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tString responseString, Throwable throwable) {\n\t\t\t\t\t\tLoger.i(\"TEST\", \"topic->statusCode->\"+statusCode);\r\n\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\tmessage.what = REFUSE_CODE;\r\n\t\t\t\t\t\tgetTopicHandler.sendMessage(message);\r\n\t\t\t\t\t\tnew ErrorServer(PropertyRepairActivity.this, responseString.toString());\r\n\t\t\t\t\t\tsuper.onFailure(statusCode, headers, responseString, throwable);\r\n\t\t\t\t\t}" ]
[ "0.6316154", "0.6075494", "0.5950665", "0.589796", "0.589796", "0.58863413", "0.5877686", "0.58080214", "0.5749763", "0.57475764", "0.56570095", "0.5621877", "0.5614455", "0.56062293", "0.55849636", "0.5563218", "0.55280936", "0.5519749", "0.5514857", "0.55035627", "0.55035627", "0.5502933", "0.5500742", "0.5500742", "0.54102635", "0.53936994", "0.538172", "0.53702337", "0.5362953", "0.5351089", "0.5347092", "0.534521", "0.53373516", "0.53162783", "0.52919436", "0.52784306", "0.52745426", "0.52662075", "0.52421415", "0.5241618", "0.52099794", "0.52073574", "0.5195291", "0.51879925", "0.5179996", "0.5179996", "0.5179996", "0.5179996", "0.51555854", "0.51543206", "0.51543206", "0.5144227", "0.514165", "0.5136648", "0.5124824", "0.5120955", "0.51089275", "0.51038516", "0.5103258", "0.5092868", "0.50813913", "0.50813913", "0.5079224", "0.5076525", "0.50751746", "0.50737935", "0.5071215", "0.5071131", "0.50656587", "0.50643814", "0.50536406", "0.5050006", "0.5048016", "0.50454533", "0.50407696", "0.50397277", "0.5031112", "0.5030527", "0.5022932", "0.50189346", "0.5015102", "0.5014916", "0.50145787", "0.5014175", "0.5011144", "0.5010924", "0.5010057", "0.5009719", "0.50068927", "0.5006732", "0.500144", "0.5001061", "0.50003135", "0.49996588", "0.49966535", "0.49960506", "0.49802363", "0.4978709", "0.49770463", "0.4970864", "0.4970442" ]
0.0
-1
If this value is CANARY_FAILURE, an exception occurred in the canary code. If this value is EXECUTION_FAILURE, an exception occurred in CloudWatch Synthetics.
public String getStateReasonCode() { return this.stateReasonCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getFailureCode() {\n return this.failureCode;\n }", "private ErrorCode getErrorCodeFromHystrixFailure(FailureType failureType) {\n switch (failureType) {\n case TIMEOUT:\n return ErrorCode.TIMEOUT_ERROR;\n case SHORTCIRCUIT:\n return ErrorCode.SHORTCIRCUIT_ERROR;\n case REJECTED_THREAD_EXECUTION:\n return ErrorCode.TOO_MANY_REQUESTS_ERROR;\n default:\n return ErrorCode.INTEGRATION_ERROR;\n }\n }", "@Test\n public void testFailure() throws ComponentInitializationException, ParseException {\n Set<ResponseType> responseTypes = new HashSet<ResponseType>();\n responseTypes.add(ResponseType.parse(\"code\"));\n metaData.setResponseTypes(responseTypes);\n final Event event = action.execute(requestCtx);\n ActionTestingSupport.assertEvent(event, OidcEventIds.INVALID_RESPONSE_TYPE);\n }", "public String getFailureReason() {\n return this.failureReason;\n }", "public String getFailureReason() {\n return this.failureReason;\n }", "public boolean isFailure() {\n return _type == Type.FAILURE;\n }", "@Override\n\t\t\tpublic void onBizFailure(String responseDescription, JSONObject data, String flag) {\n\n\t\t\t}", "String failureReason();", "String getFailureMessage();", "public int failureLevel(){\n return RESULT_WARNING;\n }", "public ExecutionResult failed(Throwable throwable) {\n var duration = Duration.between(start(), Instant.now());\n return new ExecutionResult(1, duration, out.toString(), err.toString(), throwable);\n }", "@Override\n\tpublic String getFailureMessage() {\n\t return null;\n\t}", "void failure(ServiceExecutionEvent e) {\n\n }", "public String getFailureMessage() {\n return this.failureMessage;\n }", "public String getFailResult(String response) {\n\n\t\tString result=\"failed\";\n\t\tPattern pattern = Pattern.compile(FAULT_CODE);\n\n\t\tMatcher match = pattern.matcher(response);\n\t\tif (match.find(1)) {\n\t\t\tresult= (match.group(1));\n\t\t}\n\t\treturn result;\t\n\t}", "public ConfigurationServerFailureException(String message) {\n\t\tsuper(PlatformErrorMessages.RPR_CMB_CONFIGURATION_SERVER_FAILURE_EXCEPTION.getCode(), message);\n\t}", "public static String operationFailed() {\n return holder.format(\"operationFailed\");\n }", "@Override\n\t\t\tpublic void onFail(int code) {\n\t\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onFail(int code) {\n\t\t\t\t\n\t\t\t}", "int getReturnCode();", "int getReturnCode();", "@Override\n\t\t\t\t\tpublic void onFailure(Integer result, String resultMsg) {\n\t\t\t\t\t\thandleErrorCode(result, resultMsg);\n\t\t\t\t\t}", "@Override\n public void onFailure(Throwable e) {\n handleFailure(key, value, e);\n }", "@Override\n public void onFailure(Throwable e) {\n handleFailure(key, value, e);\n }", "public boolean isFailure( ) {\n\t\treturn failed;\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void HttpFail(int ErrCode) {\n\n\t\t\t\t\t\t\t}", "public abstract void onFailure(FailureCode code, Throwable ex);", "public String networkFailureMessage();", "@Test\n @ConditionalIgnoreRule.ConditionalIgnore(condition = RunningOnGithubAction.class)\n public void testFailure() throws Exception {\n ExecutorService executorService = Executors.newFixedThreadPool(1);\n try {\n Future<?> future =\n executorService.submit(\n () -> {\n try {\n submitQuery(false, 0);\n } catch (SQLException e) {\n throw new RuntimeSQLException(\"SQLException\", e);\n } catch (InterruptedException e) {\n throw new IllegalStateException(\"task interrupted\", e);\n }\n });\n executorService.shutdown();\n future.get();\n fail(\"should fail and raise an exception\");\n } catch (ExecutionException ex) {\n Throwable rootCause = ex.getCause();\n assertThat(\"Runtime Exception\", rootCause, instanceOf(RuntimeSQLException.class));\n\n rootCause = rootCause.getCause();\n\n assertThat(\"Root cause class\", rootCause, instanceOf(SnowflakeSQLException.class));\n assertThat(\"Error code\", ((SnowflakeSQLException) rootCause).getErrorCode(), equalTo(390114));\n }\n }", "SendFailure() {\n super(ACLMessage.FAILURE);\n }", "@Test\n public void executeWithFailure() {\n new SimpleCommandFailure(\"badRequest\", HystrixRuntimeException.FailureType.COMMAND_EXCEPTION).execute();\n }", "public void onFailure(WorkContainer<K, V> wc) {\n wc.fail(clock);\n putBack(wc);\n }", "@Override\r\n\tpublic void onFail() {\n\t\tif(bSendStatus)\r\n\t\t\tnativeadstatus(E_ONFAIL);\r\n\t}", "public static FailureReasons get(int value) {\r\n\t\tswitch (value) {\r\n\t\t\tcase UNABLETO_PLAN_FOR_TASK_VALUE: return UNABLETO_PLAN_FOR_TASK;\r\n\t\t\tcase ACTION_NOT_PERFORMED_BY_AROLE_VALUE: return ACTION_NOT_PERFORMED_BY_AROLE;\r\n\t\t\tcase PRECONDITION_FAIL_VALUE: return PRECONDITION_FAIL;\r\n\t\t\tcase ZERO_SERVICE_MATCHES_FOR_ACTION_VALUE: return ZERO_SERVICE_MATCHES_FOR_ACTION;\r\n\t\t\tcase NO_USABLE_SERVICE_MATCHES_FOR_ACTION_VALUE: return NO_USABLE_SERVICE_MATCHES_FOR_ACTION;\r\n\t\t\tcase SERVICE_UNAVAILABLE_VALUE: return SERVICE_UNAVAILABLE;\r\n\t\t\tcase SERVICE_FAILURE_VALUE: return SERVICE_FAILURE;\r\n\t\t\tcase NULL_POINTER_EXCEPTION_VALUE: return NULL_POINTER_EXCEPTION;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public void failure(Object content){\n\n\t\tif (isParticipant() && (getState() == RequestProtocolState.SENDING_RESULT)) {\n\t\t\tsendMessage(content, Performative.FAILURE, getInitiator());\n\t\t\tsetFinalStep();\n\t\t}\n\t\telse if( isInitiator() ){\n\t\t\taddError(Locale.getString(\"FipaRequestProtocol.12\")); //$NON-NLS-1$\n\t\t}\n\t\telse{\n\t\t\taddError(Locale.getString(\"FipaRequestProtocol.13\")); //$NON-NLS-1$\n\t\t}\n\t}", "public BuildException getException() {\n return failure;\n }", "boolean isFailure();", "public AfFailure getFailure()\n {\n return _failure;\n }", "@Nullable\n public ApolloException awaitFailure() {\n Await.latch(failureLatch, waitTimeMs);\n return failureContainer.get();\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, String content,\n Throwable e) {\n Log.d(\"statusCode\", \"4XX\");\n // Hide Progress Dialog\n //progress.hide();\n String resultErrorMsg = \"\";\n // When Http response code is '404'\n if (statusCode == 404) {\n resultErrorMsg = \"Requested resource not found\";\n }\n // When Http response code is '500'\n else if (statusCode == 500) {\n resultErrorMsg = \"Something went wrong at server end\";\n }\n // When Http response code other than 404, 500\n else {\n resultErrorMsg = \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]\";\n }\n bro.setResultStateCode(statusCode);\n bro.setResultMsg(resultErrorMsg);\n bro.setResultJSONArray(null);\n listener.onShowJobsFailure(bro);\n }", "String getFaultReasonValue();", "int getErrorCode();", "void persistentFailure(String category);", "public abstract R createFailedResult(Status status);", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"提交超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"提交超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"提交超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"提交超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "boolean processFailure(Throwable t);", "@Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n loopjListener.getResponse(\"Error Bro:(\");\n Log.d(TAG, \"onFailure#1: \" + errorResponse);\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n loopjListener.getResponse(\"Error Bro:(\");\n Log.d(TAG, \"onFailure#1: \" + errorResponse);\n }", "public ErrorCode error() {\n return new ErrorCode(alert.getError());\n }", "@DISPID(37)\r\n\t// = 0x25. The runtime will prefer the VTID if present\r\n\t@VTID(36)\r\n\tint lastInstanceReturnCode();", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n Fog.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "public int getErrorCode() {\n return parameter.getErrCode();\n }", "public void engineFailureStatus() {\n \tthis.engineFailureActive = this.trainModelGUI.engineFailStatus();\n }", "@Override\n\tpublic boolean isFailureMode() {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic String getMessage() {\n\t\treturn \"Failed\";\r\n\t}", "public void onFail(int statusCode, String address);", "public void testFailure(Failure failure) throws java.lang.Exception {\n test.fail(failure.getException().getLocalizedMessage());\n\n System.out.println(\"Execution of test case failed : \" + failure.getMessage());\n }", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tbyte[] responseBody, Throwable error) {\n\t\t\t\t\t\terror.printStackTrace();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tbyte[] responseBody, Throwable error) {\n\t\t\t\t\t\terror.printStackTrace();\n\t\t\t\t\t}", "@Override\n boolean canFail() {\n return true;\n }", "public InsertErrorException() {\n super(ErrorConstants.DEFAULT_TYPE, MessageContants.CONST_ERROR_CODE_INSERT_FAILURE, Status.INTERNAL_SERVER_ERROR);\n }", "public void setFailureCode(String failureCode) {\n this.failureCode = failureCode;\n }", "public RightsManagementFailureCode(java.lang.Object instance) {\n super(instance);\n if (instance instanceof JCObject) {\n try {\n String enumName = NetEnum.GetName(classType, (JCObject)instance);\n classInstance = enumReflected.fromValue(enumName);\n } catch (Throwable t) {\n JCOReflector.writeLog(t);\n classInstance = enumReflected;\n }\n } else if (instance instanceof JCEnum) {\n classInstance = (JCEnum)instance;\n }\n }", "public java.lang.String getFailStatus() {\n\treturn failStatus;\n}", "@Override\r\n\t\t\t\t\t\tpublic void onFailed(String failReason) {\n\t\t\t\t\t\t\tTypeSDKLogger.e(\"return Error\");\r\n\t\t\t\t\t\t\tTypeSDKLogger.e(\"failReason:\" + failReason);\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT, \"0\");\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT_REASON, \"PAY_FAIL\");\r\n\t\t\t\t\t\t\tnotify.Pay(payResult.DataToString());\r\n\t\t\t\t\t\t}", "public static <Data> Result<Data> failure(Data data) {\n return new Result<>(data, Type.FAILURE);\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \" + connectionResult.getErrorCode());\n }", "private FailureReasons(int value, String name, String literal) {\r\n\t\tthis.value = value;\r\n\t\tthis.name = name;\r\n\t\tthis.literal = literal;\r\n\t}", "@Test\n void testFailure_unrecognizedStatus() {\n assertThrows(\n IllegalArgumentException.class,\n () ->\n runCommandForced(\n \"--client=NewRegistrar\",\n \"--registrar_request=true\",\n \"--reason=Test\",\n \"--domain_name=example.tld\",\n \"--apply=foo\"));\n }", "@Override\r\n\t\t\t\t\t\tpublic void onPayFailed(CPOrderInfo arg0, ErrorInfoBean arg1) {\n\t\t\t\t\t\t\tTypeSDKLogger.e( \"return Error\");\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT, \"0\");\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT_REASON, \"PAY_FAIL\");\r\n\t\t\t\t\t\t\tnotify.Pay(payResult.DataToString());\r\n\t\t\t\t\t\t}", "public int failed() {\n return this.failed;\n }", "@Test\n void testFailure_illegalStatus() {\n assertThrows(\n IllegalArgumentException.class,\n () ->\n runCommandForced(\n \"--client=NewRegistrar\",\n \"--registrar_request=true\",\n \"--reason=Test\",\n \"--domain_name=example.tld\",\n \"--apply=clientRenewProhibited\"));\n }", "@DISPID(4)\r\n\t// = 0x4. The runtime will prefer the VTID if present\r\n\t@VTID(10)\r\n\tint lastInstanceReturnCode();", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }", "@Override\n public void onFailure(Throwable caught) {\n result.onFailure(caught);\n }", "public org.xms.g.common.api.Status onFailure(org.xms.g.common.api.Status param0) {\n if (wrapper) {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.support.api.client.ResultConvert) this.getHInstance()).onFailed(((com.huawei.hms.support.api.client.Status) ((param0) == null ? null : (param0.getHInstance()))))\");\n com.huawei.hms.support.api.client.Status hReturn = ((com.huawei.hms.support.api.client.ResultConvert) this.getHInstance()).onFailed(((com.huawei.hms.support.api.client.Status) ((param0) == null ? null : (param0.getHInstance()))));\n return ((hReturn) == null ? null : (new org.xms.g.common.api.Status(new org.xms.g.utils.XBox(null, hReturn))));\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.common.api.ResultTransform) this.getGInstance()).onFailure(((com.google.android.gms.common.api.Status) ((param0) == null ? null : (param0.getGInstance()))))\");\n com.google.android.gms.common.api.Status gReturn = ((com.google.android.gms.common.api.ResultTransform) this.getGInstance()).onFailure(((com.google.android.gms.common.api.Status) ((param0) == null ? null : (param0.getGInstance()))));\n return ((gReturn) == null ? null : (new org.xms.g.common.api.Status(new org.xms.g.utils.XBox(gReturn, null))));\n }\n } else {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((HImpl) ((com.huawei.hms.support.api.client.ResultConvert) this.getHInstance())).onFailedCallSuper(((com.huawei.hms.support.api.client.Status) ((param0) == null ? null : (param0.getHInstance()))))\");\n com.huawei.hms.support.api.client.Status hReturn = ((HImpl) ((com.huawei.hms.support.api.client.ResultConvert) this.getHInstance())).onFailedCallSuper(((com.huawei.hms.support.api.client.Status) ((param0) == null ? null : (param0.getHInstance()))));\n return ((hReturn) == null ? null : (new org.xms.g.common.api.Status(new org.xms.g.utils.XBox(null, hReturn))));\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((GImpl) ((com.google.android.gms.common.api.ResultTransform) this.getGInstance())).onFailureCallSuper(((com.google.android.gms.common.api.Status) ((param0) == null ? null : (param0.getGInstance()))))\");\n com.google.android.gms.common.api.Status gReturn = ((GImpl) ((com.google.android.gms.common.api.ResultTransform) this.getGInstance())).onFailureCallSuper(((com.google.android.gms.common.api.Status) ((param0) == null ? null : (param0.getGInstance()))));\n return ((gReturn) == null ? null : (new org.xms.g.common.api.Status(new org.xms.g.utils.XBox(gReturn, null))));\n }\n }\n }", "@Override\n public void onFailure(Rule rule, Exception e) {\n RulesContext.put(\"status\", \"failed\");\n RulesContext.put(\"message\", this.getClass().getCanonicalName() + \" \" + e.getCause().getMessage());\n\n }", "@Override\n\t\t\tpublic void onFailure(Throwable t, String errorMsg, int statusCode) {\n\t\t\t}", "private void setFailed(int errorCode){\n\t\tCartPayIndent currentIndent = mCoffeeIndentsList.get(mCurrentIndentIndex);\n\t\tString indentID = currentIndent.getIndentID();\n\t\tint coffeeID = currentIndent.getCoffeeID();\n\t\tLogUtil.e(TAG, \"make coffee unsuccessully, code:\" + errorCode + \", indent:\" + indentID);\n\t\tupdateIndentStatusDB(FLAG_ERROR, indentID, coffeeID);\n\t\t// rollback order\n\t\trollBackOrder(errorCode);\n\t\t// report server\n\t\tList<Integer> status = new ArrayList<Integer>();\n\t\tMachineStatusReportInfo info = new MachineStatusReportInfo();\n\t\tinfo.setUid(U.getMyVendorNum());\n\t\tinfo.setTimestamp(TimeUtil.getNow_millisecond());\n\t\tstatus.add(errorCode);\n\t\tinfo.setStatus(status);\n\t\texecute(info.toRemote());\n\n\t\tmMachineStatus = CoffeeMachineStatus.READY;\n\t\t// quit time\n\t\tmUIHandler.sendEmptyMessage(MSG_UI_MAKE_COFFEE_FAIL);\n\t\tmQuitTimer.startCountDownTimer(QUIT_WAIT_TIME, 1000, 1000);\n\t}", "public void setWorkitemsFailed(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(WORKITEMSFAILED_PROP.get(), value);\n }", "private int exitUnitException() {\r\n\t\tthis.updateUnitStatus();\r\n\t\tthis.eventLogger.logLine(\" => UNIT_EXCEPTION, DEVICE_END\");\r\n\t\treturn iDeviceStatus.UNIT_EXCEPTION | iDeviceStatus.DEVICE_END;\r\n\t}", "public String getErrorCode();", "@Override\r\n\tpublic String getFailDescription() {\n\t\treturn null;\r\n\t}", "public void onFailure();", "void failure(String category);", "@Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n loopjListener.getResponse(\"Error Bro:(\");\n Log.d(TAG, \"onFailure#2: \" + responseString);\n }", "public void test_GetContestStatus_Failure2() throws Exception {\r\n try {\r\n initContext();\r\n\r\n entityManager.enablePersistenceException(true);\r\n beanUnderTest.getContestStatus(1);\r\n\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, String res, Throwable t) {\n\n Log.i(\"onFailure\", res);\n }", "@Override\n public void onAnalysisFailed(IntegrationAnalyzer.FailReason failReason) {\n String message = failReason.getMessage();\n Log.d(TAG, \"Fail Reason message is\" + message);\n //..\n\n }", "@Test\n public void CloudScriptErrorServer()\n {\n PlayFabServerModels.ExecuteCloudScriptServerRequest errRequest = new PlayFabServerModels.ExecuteCloudScriptServerRequest();\n errRequest.FunctionName = \"throwError\";\n errRequest.PlayFabId = playFabId;\n PlayFabResult<PlayFabServerModels.ExecuteCloudScriptResult> errResult = PlayFabServerAPI.ExecuteCloudScript(errRequest);\n\n String errorMessage = CompileErrorsFromResult(errResult);\n assertNotNull(errorMessage, errResult.Error);\n\n }", "@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\tWindow.alert(\"Fail\");\n\t\t\t\t\t}", "public ConfigurationServerFailureException() {\n\t\tsuper();\n\t}", "public void setWorkitemsFailed(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(WORKITEMSFAILED_PROP.get(), value);\n }", "public ValidationFailure(Exception exception) {\n message = exception.getMessage();\n if (exception instanceof XPathException) {\n errorCode = ((XPathException)exception).getErrorCodeLocalPart();\n }\n }", "public String getFailureMode() {\r\n\t\treturn failureMode;\r\n\t}", "public SOAPErrorCodes() {\n\t\terrorMap = new Hashtable<>();\n\t\terrorMap.put(\"401\", new String[] {\"Invalid Action\",\n\t\t\t\t\"No action by that name at this service.\"});\n\t\terrorMap\n\t\t\t\t.put(\n\t\t\t\t\t\t\"402\",\n\t\t\t\t\t\tnew String[] {\n\t\t\t\t\t\t\t\t\"Invalid Args\",\n\t\t\t\t\t\t\t\t\"Could be any of the following: not \"\n\t\t\t\t\t\t\t\t\t\t+ \"enough in args, too many in args, no in args, no in args by that name, \"\n\t\t\t\t\t\t\t\t\t\t+ \"one or more in args are of the wrong data type.\"});\n\t\terrorMap.put(\"403\", new String[] {\"Out of Sync\",\n\t\t\t\t\"Out of synchronization.\"});\n\t\terrorMap.put(\"501\", new String[] {\n\t\t\t\t\"Action Failed\",\n\t\t\t\t\"May be returned in current state of \"\n\t\t\t\t\t\t+ \"service prevents invoking that action.\"});\n\t\terrorMap.put(\"404\", new String[] {\"Invalid Var\",\n\t\t\t\t\"No state variable by that name at this service.\"});\n\t}", "@Override\r\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tString responseString, Throwable throwable) {\n\t\t\t\t\t\tLoger.i(\"TEST\", \"topic->statusCode->\"+statusCode);\r\n\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\tmessage.what = REFUSE_CODE;\r\n\t\t\t\t\t\tgetTopicHandler.sendMessage(message);\r\n\t\t\t\t\t\tnew ErrorServer(PropertyRepairActivity.this, responseString.toString());\r\n\t\t\t\t\t\tsuper.onFailure(statusCode, headers, responseString, throwable);\r\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void onFailure(int code, String msg, Object object) {\n\n\t\t\t}" ]
[ "0.6317342", "0.60770243", "0.5951622", "0.5898107", "0.5898107", "0.5886225", "0.5877191", "0.5807641", "0.5749607", "0.5746594", "0.56579465", "0.5622087", "0.5613637", "0.56064206", "0.55857676", "0.55641997", "0.55276555", "0.5520718", "0.5515554", "0.55044276", "0.55044276", "0.5502876", "0.5500921", "0.5500921", "0.5410009", "0.53938425", "0.53831106", "0.53706217", "0.5363568", "0.5350883", "0.5347073", "0.5345241", "0.53371227", "0.5317193", "0.52915984", "0.52799046", "0.52741545", "0.52666014", "0.5243268", "0.52429223", "0.52100956", "0.5208427", "0.5194197", "0.5187632", "0.5181485", "0.5181485", "0.5181485", "0.5181485", "0.51564205", "0.51562464", "0.51562464", "0.5144454", "0.5140739", "0.5137265", "0.51259553", "0.51197374", "0.5108011", "0.5103867", "0.51037115", "0.50920445", "0.5083067", "0.5083067", "0.50796926", "0.5077961", "0.5075123", "0.50747496", "0.50719047", "0.5070128", "0.50651586", "0.50650823", "0.5053507", "0.50509685", "0.5047141", "0.5045572", "0.50417966", "0.5039013", "0.50315773", "0.50304806", "0.50232905", "0.5019279", "0.50162405", "0.5014913", "0.501485", "0.50143534", "0.501133", "0.5010983", "0.5010218", "0.50101525", "0.50086653", "0.50077415", "0.50015366", "0.50007147", "0.50005543", "0.49989846", "0.49982974", "0.49958143", "0.49797696", "0.49794993", "0.49781144", "0.49722135", "0.49716565" ]
0.0
-1
If this value is CANARY_FAILURE, an exception occurred in the canary code. If this value is EXECUTION_FAILURE, an exception occurred in CloudWatch Synthetics.
public CanaryRunStatus withStateReasonCode(String stateReasonCode) { setStateReasonCode(stateReasonCode); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getFailureCode() {\n return this.failureCode;\n }", "private ErrorCode getErrorCodeFromHystrixFailure(FailureType failureType) {\n switch (failureType) {\n case TIMEOUT:\n return ErrorCode.TIMEOUT_ERROR;\n case SHORTCIRCUIT:\n return ErrorCode.SHORTCIRCUIT_ERROR;\n case REJECTED_THREAD_EXECUTION:\n return ErrorCode.TOO_MANY_REQUESTS_ERROR;\n default:\n return ErrorCode.INTEGRATION_ERROR;\n }\n }", "@Test\n public void testFailure() throws ComponentInitializationException, ParseException {\n Set<ResponseType> responseTypes = new HashSet<ResponseType>();\n responseTypes.add(ResponseType.parse(\"code\"));\n metaData.setResponseTypes(responseTypes);\n final Event event = action.execute(requestCtx);\n ActionTestingSupport.assertEvent(event, OidcEventIds.INVALID_RESPONSE_TYPE);\n }", "public String getFailureReason() {\n return this.failureReason;\n }", "public String getFailureReason() {\n return this.failureReason;\n }", "public boolean isFailure() {\n return _type == Type.FAILURE;\n }", "@Override\n\t\t\tpublic void onBizFailure(String responseDescription, JSONObject data, String flag) {\n\n\t\t\t}", "String failureReason();", "String getFailureMessage();", "public int failureLevel(){\n return RESULT_WARNING;\n }", "public ExecutionResult failed(Throwable throwable) {\n var duration = Duration.between(start(), Instant.now());\n return new ExecutionResult(1, duration, out.toString(), err.toString(), throwable);\n }", "@Override\n\tpublic String getFailureMessage() {\n\t return null;\n\t}", "void failure(ServiceExecutionEvent e) {\n\n }", "public String getFailureMessage() {\n return this.failureMessage;\n }", "public String getFailResult(String response) {\n\n\t\tString result=\"failed\";\n\t\tPattern pattern = Pattern.compile(FAULT_CODE);\n\n\t\tMatcher match = pattern.matcher(response);\n\t\tif (match.find(1)) {\n\t\t\tresult= (match.group(1));\n\t\t}\n\t\treturn result;\t\n\t}", "public ConfigurationServerFailureException(String message) {\n\t\tsuper(PlatformErrorMessages.RPR_CMB_CONFIGURATION_SERVER_FAILURE_EXCEPTION.getCode(), message);\n\t}", "public static String operationFailed() {\n return holder.format(\"operationFailed\");\n }", "@Override\n\t\t\tpublic void onFail(int code) {\n\t\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onFail(int code) {\n\t\t\t\t\n\t\t\t}", "int getReturnCode();", "int getReturnCode();", "@Override\n\t\t\t\t\tpublic void onFailure(Integer result, String resultMsg) {\n\t\t\t\t\t\thandleErrorCode(result, resultMsg);\n\t\t\t\t\t}", "@Override\n public void onFailure(Throwable e) {\n handleFailure(key, value, e);\n }", "@Override\n public void onFailure(Throwable e) {\n handleFailure(key, value, e);\n }", "public boolean isFailure( ) {\n\t\treturn failed;\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void HttpFail(int ErrCode) {\n\n\t\t\t\t\t\t\t}", "public abstract void onFailure(FailureCode code, Throwable ex);", "public String networkFailureMessage();", "@Test\n @ConditionalIgnoreRule.ConditionalIgnore(condition = RunningOnGithubAction.class)\n public void testFailure() throws Exception {\n ExecutorService executorService = Executors.newFixedThreadPool(1);\n try {\n Future<?> future =\n executorService.submit(\n () -> {\n try {\n submitQuery(false, 0);\n } catch (SQLException e) {\n throw new RuntimeSQLException(\"SQLException\", e);\n } catch (InterruptedException e) {\n throw new IllegalStateException(\"task interrupted\", e);\n }\n });\n executorService.shutdown();\n future.get();\n fail(\"should fail and raise an exception\");\n } catch (ExecutionException ex) {\n Throwable rootCause = ex.getCause();\n assertThat(\"Runtime Exception\", rootCause, instanceOf(RuntimeSQLException.class));\n\n rootCause = rootCause.getCause();\n\n assertThat(\"Root cause class\", rootCause, instanceOf(SnowflakeSQLException.class));\n assertThat(\"Error code\", ((SnowflakeSQLException) rootCause).getErrorCode(), equalTo(390114));\n }\n }", "SendFailure() {\n super(ACLMessage.FAILURE);\n }", "public void onFailure(WorkContainer<K, V> wc) {\n wc.fail(clock);\n putBack(wc);\n }", "@Test\n public void executeWithFailure() {\n new SimpleCommandFailure(\"badRequest\", HystrixRuntimeException.FailureType.COMMAND_EXCEPTION).execute();\n }", "@Override\r\n\tpublic void onFail() {\n\t\tif(bSendStatus)\r\n\t\t\tnativeadstatus(E_ONFAIL);\r\n\t}", "public static FailureReasons get(int value) {\r\n\t\tswitch (value) {\r\n\t\t\tcase UNABLETO_PLAN_FOR_TASK_VALUE: return UNABLETO_PLAN_FOR_TASK;\r\n\t\t\tcase ACTION_NOT_PERFORMED_BY_AROLE_VALUE: return ACTION_NOT_PERFORMED_BY_AROLE;\r\n\t\t\tcase PRECONDITION_FAIL_VALUE: return PRECONDITION_FAIL;\r\n\t\t\tcase ZERO_SERVICE_MATCHES_FOR_ACTION_VALUE: return ZERO_SERVICE_MATCHES_FOR_ACTION;\r\n\t\t\tcase NO_USABLE_SERVICE_MATCHES_FOR_ACTION_VALUE: return NO_USABLE_SERVICE_MATCHES_FOR_ACTION;\r\n\t\t\tcase SERVICE_UNAVAILABLE_VALUE: return SERVICE_UNAVAILABLE;\r\n\t\t\tcase SERVICE_FAILURE_VALUE: return SERVICE_FAILURE;\r\n\t\t\tcase NULL_POINTER_EXCEPTION_VALUE: return NULL_POINTER_EXCEPTION;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public void failure(Object content){\n\n\t\tif (isParticipant() && (getState() == RequestProtocolState.SENDING_RESULT)) {\n\t\t\tsendMessage(content, Performative.FAILURE, getInitiator());\n\t\t\tsetFinalStep();\n\t\t}\n\t\telse if( isInitiator() ){\n\t\t\taddError(Locale.getString(\"FipaRequestProtocol.12\")); //$NON-NLS-1$\n\t\t}\n\t\telse{\n\t\t\taddError(Locale.getString(\"FipaRequestProtocol.13\")); //$NON-NLS-1$\n\t\t}\n\t}", "public BuildException getException() {\n return failure;\n }", "boolean isFailure();", "public AfFailure getFailure()\n {\n return _failure;\n }", "@Nullable\n public ApolloException awaitFailure() {\n Await.latch(failureLatch, waitTimeMs);\n return failureContainer.get();\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, String content,\n Throwable e) {\n Log.d(\"statusCode\", \"4XX\");\n // Hide Progress Dialog\n //progress.hide();\n String resultErrorMsg = \"\";\n // When Http response code is '404'\n if (statusCode == 404) {\n resultErrorMsg = \"Requested resource not found\";\n }\n // When Http response code is '500'\n else if (statusCode == 500) {\n resultErrorMsg = \"Something went wrong at server end\";\n }\n // When Http response code other than 404, 500\n else {\n resultErrorMsg = \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]\";\n }\n bro.setResultStateCode(statusCode);\n bro.setResultMsg(resultErrorMsg);\n bro.setResultJSONArray(null);\n listener.onShowJobsFailure(bro);\n }", "String getFaultReasonValue();", "int getErrorCode();", "void persistentFailure(String category);", "public abstract R createFailedResult(Status status);", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"提交超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"提交超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"提交超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"提交超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "@Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n loopjListener.getResponse(\"Error Bro:(\");\n Log.d(TAG, \"onFailure#1: \" + errorResponse);\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n loopjListener.getResponse(\"Error Bro:(\");\n Log.d(TAG, \"onFailure#1: \" + errorResponse);\n }", "boolean processFailure(Throwable t);", "public ErrorCode error() {\n return new ErrorCode(alert.getError());\n }", "@DISPID(37)\r\n\t// = 0x25. The runtime will prefer the VTID if present\r\n\t@VTID(36)\r\n\tint lastInstanceReturnCode();", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n Fog.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "public int getErrorCode() {\n return parameter.getErrCode();\n }", "public void engineFailureStatus() {\n \tthis.engineFailureActive = this.trainModelGUI.engineFailStatus();\n }", "@Override\n\tpublic boolean isFailureMode() {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic String getMessage() {\n\t\treturn \"Failed\";\r\n\t}", "public void onFail(int statusCode, String address);", "public void testFailure(Failure failure) throws java.lang.Exception {\n test.fail(failure.getException().getLocalizedMessage());\n\n System.out.println(\"Execution of test case failed : \" + failure.getMessage());\n }", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tbyte[] responseBody, Throwable error) {\n\t\t\t\t\t\terror.printStackTrace();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tbyte[] responseBody, Throwable error) {\n\t\t\t\t\t\terror.printStackTrace();\n\t\t\t\t\t}", "@Override\n boolean canFail() {\n return true;\n }", "public InsertErrorException() {\n super(ErrorConstants.DEFAULT_TYPE, MessageContants.CONST_ERROR_CODE_INSERT_FAILURE, Status.INTERNAL_SERVER_ERROR);\n }", "public RightsManagementFailureCode(java.lang.Object instance) {\n super(instance);\n if (instance instanceof JCObject) {\n try {\n String enumName = NetEnum.GetName(classType, (JCObject)instance);\n classInstance = enumReflected.fromValue(enumName);\n } catch (Throwable t) {\n JCOReflector.writeLog(t);\n classInstance = enumReflected;\n }\n } else if (instance instanceof JCEnum) {\n classInstance = (JCEnum)instance;\n }\n }", "public void setFailureCode(String failureCode) {\n this.failureCode = failureCode;\n }", "public java.lang.String getFailStatus() {\n\treturn failStatus;\n}", "@Override\r\n\t\t\t\t\t\tpublic void onFailed(String failReason) {\n\t\t\t\t\t\t\tTypeSDKLogger.e(\"return Error\");\r\n\t\t\t\t\t\t\tTypeSDKLogger.e(\"failReason:\" + failReason);\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT, \"0\");\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT_REASON, \"PAY_FAIL\");\r\n\t\t\t\t\t\t\tnotify.Pay(payResult.DataToString());\r\n\t\t\t\t\t\t}", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \" + connectionResult.getErrorCode());\n }", "public static <Data> Result<Data> failure(Data data) {\n return new Result<>(data, Type.FAILURE);\n }", "private FailureReasons(int value, String name, String literal) {\r\n\t\tthis.value = value;\r\n\t\tthis.name = name;\r\n\t\tthis.literal = literal;\r\n\t}", "@Test\n void testFailure_unrecognizedStatus() {\n assertThrows(\n IllegalArgumentException.class,\n () ->\n runCommandForced(\n \"--client=NewRegistrar\",\n \"--registrar_request=true\",\n \"--reason=Test\",\n \"--domain_name=example.tld\",\n \"--apply=foo\"));\n }", "@Override\r\n\t\t\t\t\t\tpublic void onPayFailed(CPOrderInfo arg0, ErrorInfoBean arg1) {\n\t\t\t\t\t\t\tTypeSDKLogger.e( \"return Error\");\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT, \"0\");\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT_REASON, \"PAY_FAIL\");\r\n\t\t\t\t\t\t\tnotify.Pay(payResult.DataToString());\r\n\t\t\t\t\t\t}", "public int failed() {\n return this.failed;\n }", "@Test\n void testFailure_illegalStatus() {\n assertThrows(\n IllegalArgumentException.class,\n () ->\n runCommandForced(\n \"--client=NewRegistrar\",\n \"--registrar_request=true\",\n \"--reason=Test\",\n \"--domain_name=example.tld\",\n \"--apply=clientRenewProhibited\"));\n }", "@DISPID(4)\r\n\t// = 0x4. The runtime will prefer the VTID if present\r\n\t@VTID(10)\r\n\tint lastInstanceReturnCode();", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }", "@Override\n public void onFailure(Throwable caught) {\n result.onFailure(caught);\n }", "public org.xms.g.common.api.Status onFailure(org.xms.g.common.api.Status param0) {\n if (wrapper) {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.support.api.client.ResultConvert) this.getHInstance()).onFailed(((com.huawei.hms.support.api.client.Status) ((param0) == null ? null : (param0.getHInstance()))))\");\n com.huawei.hms.support.api.client.Status hReturn = ((com.huawei.hms.support.api.client.ResultConvert) this.getHInstance()).onFailed(((com.huawei.hms.support.api.client.Status) ((param0) == null ? null : (param0.getHInstance()))));\n return ((hReturn) == null ? null : (new org.xms.g.common.api.Status(new org.xms.g.utils.XBox(null, hReturn))));\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.common.api.ResultTransform) this.getGInstance()).onFailure(((com.google.android.gms.common.api.Status) ((param0) == null ? null : (param0.getGInstance()))))\");\n com.google.android.gms.common.api.Status gReturn = ((com.google.android.gms.common.api.ResultTransform) this.getGInstance()).onFailure(((com.google.android.gms.common.api.Status) ((param0) == null ? null : (param0.getGInstance()))));\n return ((gReturn) == null ? null : (new org.xms.g.common.api.Status(new org.xms.g.utils.XBox(gReturn, null))));\n }\n } else {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((HImpl) ((com.huawei.hms.support.api.client.ResultConvert) this.getHInstance())).onFailedCallSuper(((com.huawei.hms.support.api.client.Status) ((param0) == null ? null : (param0.getHInstance()))))\");\n com.huawei.hms.support.api.client.Status hReturn = ((HImpl) ((com.huawei.hms.support.api.client.ResultConvert) this.getHInstance())).onFailedCallSuper(((com.huawei.hms.support.api.client.Status) ((param0) == null ? null : (param0.getHInstance()))));\n return ((hReturn) == null ? null : (new org.xms.g.common.api.Status(new org.xms.g.utils.XBox(null, hReturn))));\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((GImpl) ((com.google.android.gms.common.api.ResultTransform) this.getGInstance())).onFailureCallSuper(((com.google.android.gms.common.api.Status) ((param0) == null ? null : (param0.getGInstance()))))\");\n com.google.android.gms.common.api.Status gReturn = ((GImpl) ((com.google.android.gms.common.api.ResultTransform) this.getGInstance())).onFailureCallSuper(((com.google.android.gms.common.api.Status) ((param0) == null ? null : (param0.getGInstance()))));\n return ((gReturn) == null ? null : (new org.xms.g.common.api.Status(new org.xms.g.utils.XBox(gReturn, null))));\n }\n }\n }", "@Override\n public void onFailure(Rule rule, Exception e) {\n RulesContext.put(\"status\", \"failed\");\n RulesContext.put(\"message\", this.getClass().getCanonicalName() + \" \" + e.getCause().getMessage());\n\n }", "@Override\n\t\t\tpublic void onFailure(Throwable t, String errorMsg, int statusCode) {\n\t\t\t}", "public void setWorkitemsFailed(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(WORKITEMSFAILED_PROP.get(), value);\n }", "private void setFailed(int errorCode){\n\t\tCartPayIndent currentIndent = mCoffeeIndentsList.get(mCurrentIndentIndex);\n\t\tString indentID = currentIndent.getIndentID();\n\t\tint coffeeID = currentIndent.getCoffeeID();\n\t\tLogUtil.e(TAG, \"make coffee unsuccessully, code:\" + errorCode + \", indent:\" + indentID);\n\t\tupdateIndentStatusDB(FLAG_ERROR, indentID, coffeeID);\n\t\t// rollback order\n\t\trollBackOrder(errorCode);\n\t\t// report server\n\t\tList<Integer> status = new ArrayList<Integer>();\n\t\tMachineStatusReportInfo info = new MachineStatusReportInfo();\n\t\tinfo.setUid(U.getMyVendorNum());\n\t\tinfo.setTimestamp(TimeUtil.getNow_millisecond());\n\t\tstatus.add(errorCode);\n\t\tinfo.setStatus(status);\n\t\texecute(info.toRemote());\n\n\t\tmMachineStatus = CoffeeMachineStatus.READY;\n\t\t// quit time\n\t\tmUIHandler.sendEmptyMessage(MSG_UI_MAKE_COFFEE_FAIL);\n\t\tmQuitTimer.startCountDownTimer(QUIT_WAIT_TIME, 1000, 1000);\n\t}", "private int exitUnitException() {\r\n\t\tthis.updateUnitStatus();\r\n\t\tthis.eventLogger.logLine(\" => UNIT_EXCEPTION, DEVICE_END\");\r\n\t\treturn iDeviceStatus.UNIT_EXCEPTION | iDeviceStatus.DEVICE_END;\r\n\t}", "public String getErrorCode();", "@Override\r\n\tpublic String getFailDescription() {\n\t\treturn null;\r\n\t}", "void failure(String category);", "public void onFailure();", "@Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n loopjListener.getResponse(\"Error Bro:(\");\n Log.d(TAG, \"onFailure#2: \" + responseString);\n }", "public void test_GetContestStatus_Failure2() throws Exception {\r\n try {\r\n initContext();\r\n\r\n entityManager.enablePersistenceException(true);\r\n beanUnderTest.getContestStatus(1);\r\n\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "@Test\n public void CloudScriptErrorServer()\n {\n PlayFabServerModels.ExecuteCloudScriptServerRequest errRequest = new PlayFabServerModels.ExecuteCloudScriptServerRequest();\n errRequest.FunctionName = \"throwError\";\n errRequest.PlayFabId = playFabId;\n PlayFabResult<PlayFabServerModels.ExecuteCloudScriptResult> errResult = PlayFabServerAPI.ExecuteCloudScript(errRequest);\n\n String errorMessage = CompileErrorsFromResult(errResult);\n assertNotNull(errorMessage, errResult.Error);\n\n }", "@Override\n public void onAnalysisFailed(IntegrationAnalyzer.FailReason failReason) {\n String message = failReason.getMessage();\n Log.d(TAG, \"Fail Reason message is\" + message);\n //..\n\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, String res, Throwable t) {\n\n Log.i(\"onFailure\", res);\n }", "@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\tWindow.alert(\"Fail\");\n\t\t\t\t\t}", "public ConfigurationServerFailureException() {\n\t\tsuper();\n\t}", "public void setWorkitemsFailed(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(WORKITEMSFAILED_PROP.get(), value);\n }", "public ValidationFailure(Exception exception) {\n message = exception.getMessage();\n if (exception instanceof XPathException) {\n errorCode = ((XPathException)exception).getErrorCodeLocalPart();\n }\n }", "public SOAPErrorCodes() {\n\t\terrorMap = new Hashtable<>();\n\t\terrorMap.put(\"401\", new String[] {\"Invalid Action\",\n\t\t\t\t\"No action by that name at this service.\"});\n\t\terrorMap\n\t\t\t\t.put(\n\t\t\t\t\t\t\"402\",\n\t\t\t\t\t\tnew String[] {\n\t\t\t\t\t\t\t\t\"Invalid Args\",\n\t\t\t\t\t\t\t\t\"Could be any of the following: not \"\n\t\t\t\t\t\t\t\t\t\t+ \"enough in args, too many in args, no in args, no in args by that name, \"\n\t\t\t\t\t\t\t\t\t\t+ \"one or more in args are of the wrong data type.\"});\n\t\terrorMap.put(\"403\", new String[] {\"Out of Sync\",\n\t\t\t\t\"Out of synchronization.\"});\n\t\terrorMap.put(\"501\", new String[] {\n\t\t\t\t\"Action Failed\",\n\t\t\t\t\"May be returned in current state of \"\n\t\t\t\t\t\t+ \"service prevents invoking that action.\"});\n\t\terrorMap.put(\"404\", new String[] {\"Invalid Var\",\n\t\t\t\t\"No state variable by that name at this service.\"});\n\t}", "public String getFailureMode() {\r\n\t\treturn failureMode;\r\n\t}", "@Override\r\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tString responseString, Throwable throwable) {\n\t\t\t\t\t\tLoger.i(\"TEST\", \"topic->statusCode->\"+statusCode);\r\n\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\tmessage.what = REFUSE_CODE;\r\n\t\t\t\t\t\tgetTopicHandler.sendMessage(message);\r\n\t\t\t\t\t\tnew ErrorServer(PropertyRepairActivity.this, responseString.toString());\r\n\t\t\t\t\t\tsuper.onFailure(statusCode, headers, responseString, throwable);\r\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void onFailure(int code, String msg, Object object) {\n\n\t\t\t}" ]
[ "0.63158506", "0.60759753", "0.5950535", "0.58969915", "0.58969915", "0.58843756", "0.5877651", "0.5807976", "0.574959", "0.57444274", "0.5655649", "0.5621646", "0.5613771", "0.5605476", "0.55847794", "0.556311", "0.55291504", "0.5519142", "0.5514126", "0.550356", "0.550356", "0.5501986", "0.5500311", "0.5500311", "0.5408279", "0.5393037", "0.5381811", "0.5370859", "0.53623724", "0.5348474", "0.53450084", "0.53450024", "0.5335819", "0.53159904", "0.52904856", "0.5278884", "0.5273137", "0.5265509", "0.52418643", "0.52417994", "0.52117056", "0.5209006", "0.51938057", "0.5187344", "0.5180775", "0.5180775", "0.5180775", "0.5180775", "0.5154754", "0.5154754", "0.5154407", "0.5145101", "0.51409674", "0.5137016", "0.512633", "0.51188964", "0.5106425", "0.51039696", "0.51029557", "0.508988", "0.5081847", "0.5081847", "0.50774217", "0.50773305", "0.50749624", "0.50737864", "0.5069961", "0.5069741", "0.5064631", "0.5064143", "0.505311", "0.50502497", "0.5047747", "0.5044033", "0.50413543", "0.50389993", "0.5031148", "0.50289696", "0.50225866", "0.5017375", "0.5014932", "0.5014878", "0.5014744", "0.50130874", "0.50124395", "0.5009972", "0.500953", "0.5009268", "0.50070107", "0.5006162", "0.500132", "0.5000729", "0.50001276", "0.49977404", "0.4996267", "0.4995791", "0.4979559", "0.49789995", "0.49782252", "0.4970821", "0.49707696" ]
0.0
-1
If this value is CANARY_FAILURE, an exception occurred in the canary code. If this value is EXECUTION_FAILURE, an exception occurred in CloudWatch Synthetics.
public CanaryRunStatus withStateReasonCode(CanaryRunStateReasonCode stateReasonCode) { this.stateReasonCode = stateReasonCode.toString(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getFailureCode() {\n return this.failureCode;\n }", "private ErrorCode getErrorCodeFromHystrixFailure(FailureType failureType) {\n switch (failureType) {\n case TIMEOUT:\n return ErrorCode.TIMEOUT_ERROR;\n case SHORTCIRCUIT:\n return ErrorCode.SHORTCIRCUIT_ERROR;\n case REJECTED_THREAD_EXECUTION:\n return ErrorCode.TOO_MANY_REQUESTS_ERROR;\n default:\n return ErrorCode.INTEGRATION_ERROR;\n }\n }", "@Test\n public void testFailure() throws ComponentInitializationException, ParseException {\n Set<ResponseType> responseTypes = new HashSet<ResponseType>();\n responseTypes.add(ResponseType.parse(\"code\"));\n metaData.setResponseTypes(responseTypes);\n final Event event = action.execute(requestCtx);\n ActionTestingSupport.assertEvent(event, OidcEventIds.INVALID_RESPONSE_TYPE);\n }", "public String getFailureReason() {\n return this.failureReason;\n }", "public String getFailureReason() {\n return this.failureReason;\n }", "public boolean isFailure() {\n return _type == Type.FAILURE;\n }", "@Override\n\t\t\tpublic void onBizFailure(String responseDescription, JSONObject data, String flag) {\n\n\t\t\t}", "String failureReason();", "String getFailureMessage();", "public int failureLevel(){\n return RESULT_WARNING;\n }", "public ExecutionResult failed(Throwable throwable) {\n var duration = Duration.between(start(), Instant.now());\n return new ExecutionResult(1, duration, out.toString(), err.toString(), throwable);\n }", "@Override\n\tpublic String getFailureMessage() {\n\t return null;\n\t}", "void failure(ServiceExecutionEvent e) {\n\n }", "public String getFailureMessage() {\n return this.failureMessage;\n }", "public String getFailResult(String response) {\n\n\t\tString result=\"failed\";\n\t\tPattern pattern = Pattern.compile(FAULT_CODE);\n\n\t\tMatcher match = pattern.matcher(response);\n\t\tif (match.find(1)) {\n\t\t\tresult= (match.group(1));\n\t\t}\n\t\treturn result;\t\n\t}", "public ConfigurationServerFailureException(String message) {\n\t\tsuper(PlatformErrorMessages.RPR_CMB_CONFIGURATION_SERVER_FAILURE_EXCEPTION.getCode(), message);\n\t}", "public static String operationFailed() {\n return holder.format(\"operationFailed\");\n }", "@Override\n\t\t\tpublic void onFail(int code) {\n\t\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onFail(int code) {\n\t\t\t\t\n\t\t\t}", "int getReturnCode();", "int getReturnCode();", "@Override\n\t\t\t\t\tpublic void onFailure(Integer result, String resultMsg) {\n\t\t\t\t\t\thandleErrorCode(result, resultMsg);\n\t\t\t\t\t}", "@Override\n public void onFailure(Throwable e) {\n handleFailure(key, value, e);\n }", "@Override\n public void onFailure(Throwable e) {\n handleFailure(key, value, e);\n }", "public boolean isFailure( ) {\n\t\treturn failed;\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void HttpFail(int ErrCode) {\n\n\t\t\t\t\t\t\t}", "public abstract void onFailure(FailureCode code, Throwable ex);", "public String networkFailureMessage();", "@Test\n @ConditionalIgnoreRule.ConditionalIgnore(condition = RunningOnGithubAction.class)\n public void testFailure() throws Exception {\n ExecutorService executorService = Executors.newFixedThreadPool(1);\n try {\n Future<?> future =\n executorService.submit(\n () -> {\n try {\n submitQuery(false, 0);\n } catch (SQLException e) {\n throw new RuntimeSQLException(\"SQLException\", e);\n } catch (InterruptedException e) {\n throw new IllegalStateException(\"task interrupted\", e);\n }\n });\n executorService.shutdown();\n future.get();\n fail(\"should fail and raise an exception\");\n } catch (ExecutionException ex) {\n Throwable rootCause = ex.getCause();\n assertThat(\"Runtime Exception\", rootCause, instanceOf(RuntimeSQLException.class));\n\n rootCause = rootCause.getCause();\n\n assertThat(\"Root cause class\", rootCause, instanceOf(SnowflakeSQLException.class));\n assertThat(\"Error code\", ((SnowflakeSQLException) rootCause).getErrorCode(), equalTo(390114));\n }\n }", "SendFailure() {\n super(ACLMessage.FAILURE);\n }", "@Test\n public void executeWithFailure() {\n new SimpleCommandFailure(\"badRequest\", HystrixRuntimeException.FailureType.COMMAND_EXCEPTION).execute();\n }", "public void onFailure(WorkContainer<K, V> wc) {\n wc.fail(clock);\n putBack(wc);\n }", "@Override\r\n\tpublic void onFail() {\n\t\tif(bSendStatus)\r\n\t\t\tnativeadstatus(E_ONFAIL);\r\n\t}", "public static FailureReasons get(int value) {\r\n\t\tswitch (value) {\r\n\t\t\tcase UNABLETO_PLAN_FOR_TASK_VALUE: return UNABLETO_PLAN_FOR_TASK;\r\n\t\t\tcase ACTION_NOT_PERFORMED_BY_AROLE_VALUE: return ACTION_NOT_PERFORMED_BY_AROLE;\r\n\t\t\tcase PRECONDITION_FAIL_VALUE: return PRECONDITION_FAIL;\r\n\t\t\tcase ZERO_SERVICE_MATCHES_FOR_ACTION_VALUE: return ZERO_SERVICE_MATCHES_FOR_ACTION;\r\n\t\t\tcase NO_USABLE_SERVICE_MATCHES_FOR_ACTION_VALUE: return NO_USABLE_SERVICE_MATCHES_FOR_ACTION;\r\n\t\t\tcase SERVICE_UNAVAILABLE_VALUE: return SERVICE_UNAVAILABLE;\r\n\t\t\tcase SERVICE_FAILURE_VALUE: return SERVICE_FAILURE;\r\n\t\t\tcase NULL_POINTER_EXCEPTION_VALUE: return NULL_POINTER_EXCEPTION;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public void failure(Object content){\n\n\t\tif (isParticipant() && (getState() == RequestProtocolState.SENDING_RESULT)) {\n\t\t\tsendMessage(content, Performative.FAILURE, getInitiator());\n\t\t\tsetFinalStep();\n\t\t}\n\t\telse if( isInitiator() ){\n\t\t\taddError(Locale.getString(\"FipaRequestProtocol.12\")); //$NON-NLS-1$\n\t\t}\n\t\telse{\n\t\t\taddError(Locale.getString(\"FipaRequestProtocol.13\")); //$NON-NLS-1$\n\t\t}\n\t}", "public BuildException getException() {\n return failure;\n }", "boolean isFailure();", "public AfFailure getFailure()\n {\n return _failure;\n }", "@Nullable\n public ApolloException awaitFailure() {\n Await.latch(failureLatch, waitTimeMs);\n return failureContainer.get();\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, String content,\n Throwable e) {\n Log.d(\"statusCode\", \"4XX\");\n // Hide Progress Dialog\n //progress.hide();\n String resultErrorMsg = \"\";\n // When Http response code is '404'\n if (statusCode == 404) {\n resultErrorMsg = \"Requested resource not found\";\n }\n // When Http response code is '500'\n else if (statusCode == 500) {\n resultErrorMsg = \"Something went wrong at server end\";\n }\n // When Http response code other than 404, 500\n else {\n resultErrorMsg = \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]\";\n }\n bro.setResultStateCode(statusCode);\n bro.setResultMsg(resultErrorMsg);\n bro.setResultJSONArray(null);\n listener.onShowJobsFailure(bro);\n }", "String getFaultReasonValue();", "int getErrorCode();", "void persistentFailure(String category);", "public abstract R createFailedResult(Status status);", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"提交超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"提交超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"提交超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"提交超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}", "@Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n loopjListener.getResponse(\"Error Bro:(\");\n Log.d(TAG, \"onFailure#1: \" + errorResponse);\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n loopjListener.getResponse(\"Error Bro:(\");\n Log.d(TAG, \"onFailure#1: \" + errorResponse);\n }", "boolean processFailure(Throwable t);", "public ErrorCode error() {\n return new ErrorCode(alert.getError());\n }", "@DISPID(37)\r\n\t// = 0x25. The runtime will prefer the VTID if present\r\n\t@VTID(36)\r\n\tint lastInstanceReturnCode();", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n Fog.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "public int getErrorCode() {\n return parameter.getErrCode();\n }", "public void engineFailureStatus() {\n \tthis.engineFailureActive = this.trainModelGUI.engineFailStatus();\n }", "@Override\n\tpublic boolean isFailureMode() {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic String getMessage() {\n\t\treturn \"Failed\";\r\n\t}", "public void onFail(int statusCode, String address);", "public void testFailure(Failure failure) throws java.lang.Exception {\n test.fail(failure.getException().getLocalizedMessage());\n\n System.out.println(\"Execution of test case failed : \" + failure.getMessage());\n }", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tbyte[] responseBody, Throwable error) {\n\t\t\t\t\t\terror.printStackTrace();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tbyte[] responseBody, Throwable error) {\n\t\t\t\t\t\terror.printStackTrace();\n\t\t\t\t\t}", "@Override\n boolean canFail() {\n return true;\n }", "public InsertErrorException() {\n super(ErrorConstants.DEFAULT_TYPE, MessageContants.CONST_ERROR_CODE_INSERT_FAILURE, Status.INTERNAL_SERVER_ERROR);\n }", "public void setFailureCode(String failureCode) {\n this.failureCode = failureCode;\n }", "public RightsManagementFailureCode(java.lang.Object instance) {\n super(instance);\n if (instance instanceof JCObject) {\n try {\n String enumName = NetEnum.GetName(classType, (JCObject)instance);\n classInstance = enumReflected.fromValue(enumName);\n } catch (Throwable t) {\n JCOReflector.writeLog(t);\n classInstance = enumReflected;\n }\n } else if (instance instanceof JCEnum) {\n classInstance = (JCEnum)instance;\n }\n }", "public java.lang.String getFailStatus() {\n\treturn failStatus;\n}", "@Override\r\n\t\t\t\t\t\tpublic void onFailed(String failReason) {\n\t\t\t\t\t\t\tTypeSDKLogger.e(\"return Error\");\r\n\t\t\t\t\t\t\tTypeSDKLogger.e(\"failReason:\" + failReason);\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT, \"0\");\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT_REASON, \"PAY_FAIL\");\r\n\t\t\t\t\t\t\tnotify.Pay(payResult.DataToString());\r\n\t\t\t\t\t\t}", "public static <Data> Result<Data> failure(Data data) {\n return new Result<>(data, Type.FAILURE);\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \" + connectionResult.getErrorCode());\n }", "private FailureReasons(int value, String name, String literal) {\r\n\t\tthis.value = value;\r\n\t\tthis.name = name;\r\n\t\tthis.literal = literal;\r\n\t}", "@Test\n void testFailure_unrecognizedStatus() {\n assertThrows(\n IllegalArgumentException.class,\n () ->\n runCommandForced(\n \"--client=NewRegistrar\",\n \"--registrar_request=true\",\n \"--reason=Test\",\n \"--domain_name=example.tld\",\n \"--apply=foo\"));\n }", "@Override\r\n\t\t\t\t\t\tpublic void onPayFailed(CPOrderInfo arg0, ErrorInfoBean arg1) {\n\t\t\t\t\t\t\tTypeSDKLogger.e( \"return Error\");\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT, \"0\");\r\n\t\t\t\t\t\t\tpayResult.SetData(AttName.PAY_RESULT_REASON, \"PAY_FAIL\");\r\n\t\t\t\t\t\t\tnotify.Pay(payResult.DataToString());\r\n\t\t\t\t\t\t}", "public int failed() {\n return this.failed;\n }", "@Test\n void testFailure_illegalStatus() {\n assertThrows(\n IllegalArgumentException.class,\n () ->\n runCommandForced(\n \"--client=NewRegistrar\",\n \"--registrar_request=true\",\n \"--reason=Test\",\n \"--domain_name=example.tld\",\n \"--apply=clientRenewProhibited\"));\n }", "@DISPID(4)\r\n\t// = 0x4. The runtime will prefer the VTID if present\r\n\t@VTID(10)\r\n\tint lastInstanceReturnCode();", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }", "@Override\n public void onFailure(Throwable caught) {\n result.onFailure(caught);\n }", "public org.xms.g.common.api.Status onFailure(org.xms.g.common.api.Status param0) {\n if (wrapper) {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.support.api.client.ResultConvert) this.getHInstance()).onFailed(((com.huawei.hms.support.api.client.Status) ((param0) == null ? null : (param0.getHInstance()))))\");\n com.huawei.hms.support.api.client.Status hReturn = ((com.huawei.hms.support.api.client.ResultConvert) this.getHInstance()).onFailed(((com.huawei.hms.support.api.client.Status) ((param0) == null ? null : (param0.getHInstance()))));\n return ((hReturn) == null ? null : (new org.xms.g.common.api.Status(new org.xms.g.utils.XBox(null, hReturn))));\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.common.api.ResultTransform) this.getGInstance()).onFailure(((com.google.android.gms.common.api.Status) ((param0) == null ? null : (param0.getGInstance()))))\");\n com.google.android.gms.common.api.Status gReturn = ((com.google.android.gms.common.api.ResultTransform) this.getGInstance()).onFailure(((com.google.android.gms.common.api.Status) ((param0) == null ? null : (param0.getGInstance()))));\n return ((gReturn) == null ? null : (new org.xms.g.common.api.Status(new org.xms.g.utils.XBox(gReturn, null))));\n }\n } else {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((HImpl) ((com.huawei.hms.support.api.client.ResultConvert) this.getHInstance())).onFailedCallSuper(((com.huawei.hms.support.api.client.Status) ((param0) == null ? null : (param0.getHInstance()))))\");\n com.huawei.hms.support.api.client.Status hReturn = ((HImpl) ((com.huawei.hms.support.api.client.ResultConvert) this.getHInstance())).onFailedCallSuper(((com.huawei.hms.support.api.client.Status) ((param0) == null ? null : (param0.getHInstance()))));\n return ((hReturn) == null ? null : (new org.xms.g.common.api.Status(new org.xms.g.utils.XBox(null, hReturn))));\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((GImpl) ((com.google.android.gms.common.api.ResultTransform) this.getGInstance())).onFailureCallSuper(((com.google.android.gms.common.api.Status) ((param0) == null ? null : (param0.getGInstance()))))\");\n com.google.android.gms.common.api.Status gReturn = ((GImpl) ((com.google.android.gms.common.api.ResultTransform) this.getGInstance())).onFailureCallSuper(((com.google.android.gms.common.api.Status) ((param0) == null ? null : (param0.getGInstance()))));\n return ((gReturn) == null ? null : (new org.xms.g.common.api.Status(new org.xms.g.utils.XBox(gReturn, null))));\n }\n }\n }", "@Override\n public void onFailure(Rule rule, Exception e) {\n RulesContext.put(\"status\", \"failed\");\n RulesContext.put(\"message\", this.getClass().getCanonicalName() + \" \" + e.getCause().getMessage());\n\n }", "@Override\n\t\t\tpublic void onFailure(Throwable t, String errorMsg, int statusCode) {\n\t\t\t}", "private void setFailed(int errorCode){\n\t\tCartPayIndent currentIndent = mCoffeeIndentsList.get(mCurrentIndentIndex);\n\t\tString indentID = currentIndent.getIndentID();\n\t\tint coffeeID = currentIndent.getCoffeeID();\n\t\tLogUtil.e(TAG, \"make coffee unsuccessully, code:\" + errorCode + \", indent:\" + indentID);\n\t\tupdateIndentStatusDB(FLAG_ERROR, indentID, coffeeID);\n\t\t// rollback order\n\t\trollBackOrder(errorCode);\n\t\t// report server\n\t\tList<Integer> status = new ArrayList<Integer>();\n\t\tMachineStatusReportInfo info = new MachineStatusReportInfo();\n\t\tinfo.setUid(U.getMyVendorNum());\n\t\tinfo.setTimestamp(TimeUtil.getNow_millisecond());\n\t\tstatus.add(errorCode);\n\t\tinfo.setStatus(status);\n\t\texecute(info.toRemote());\n\n\t\tmMachineStatus = CoffeeMachineStatus.READY;\n\t\t// quit time\n\t\tmUIHandler.sendEmptyMessage(MSG_UI_MAKE_COFFEE_FAIL);\n\t\tmQuitTimer.startCountDownTimer(QUIT_WAIT_TIME, 1000, 1000);\n\t}", "public void setWorkitemsFailed(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(WORKITEMSFAILED_PROP.get(), value);\n }", "private int exitUnitException() {\r\n\t\tthis.updateUnitStatus();\r\n\t\tthis.eventLogger.logLine(\" => UNIT_EXCEPTION, DEVICE_END\");\r\n\t\treturn iDeviceStatus.UNIT_EXCEPTION | iDeviceStatus.DEVICE_END;\r\n\t}", "@Override\r\n\tpublic String getFailDescription() {\n\t\treturn null;\r\n\t}", "public String getErrorCode();", "void failure(String category);", "public void onFailure();", "@Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n loopjListener.getResponse(\"Error Bro:(\");\n Log.d(TAG, \"onFailure#2: \" + responseString);\n }", "public void test_GetContestStatus_Failure2() throws Exception {\r\n try {\r\n initContext();\r\n\r\n entityManager.enablePersistenceException(true);\r\n beanUnderTest.getContestStatus(1);\r\n\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "@Override\n public void onAnalysisFailed(IntegrationAnalyzer.FailReason failReason) {\n String message = failReason.getMessage();\n Log.d(TAG, \"Fail Reason message is\" + message);\n //..\n\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, String res, Throwable t) {\n\n Log.i(\"onFailure\", res);\n }", "@Test\n public void CloudScriptErrorServer()\n {\n PlayFabServerModels.ExecuteCloudScriptServerRequest errRequest = new PlayFabServerModels.ExecuteCloudScriptServerRequest();\n errRequest.FunctionName = \"throwError\";\n errRequest.PlayFabId = playFabId;\n PlayFabResult<PlayFabServerModels.ExecuteCloudScriptResult> errResult = PlayFabServerAPI.ExecuteCloudScript(errRequest);\n\n String errorMessage = CompileErrorsFromResult(errResult);\n assertNotNull(errorMessage, errResult.Error);\n\n }", "@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\tWindow.alert(\"Fail\");\n\t\t\t\t\t}", "public ConfigurationServerFailureException() {\n\t\tsuper();\n\t}", "public void setWorkitemsFailed(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(WORKITEMSFAILED_PROP.get(), value);\n }", "public String getFailureMode() {\r\n\t\treturn failureMode;\r\n\t}", "public ValidationFailure(Exception exception) {\n message = exception.getMessage();\n if (exception instanceof XPathException) {\n errorCode = ((XPathException)exception).getErrorCodeLocalPart();\n }\n }", "public SOAPErrorCodes() {\n\t\terrorMap = new Hashtable<>();\n\t\terrorMap.put(\"401\", new String[] {\"Invalid Action\",\n\t\t\t\t\"No action by that name at this service.\"});\n\t\terrorMap\n\t\t\t\t.put(\n\t\t\t\t\t\t\"402\",\n\t\t\t\t\t\tnew String[] {\n\t\t\t\t\t\t\t\t\"Invalid Args\",\n\t\t\t\t\t\t\t\t\"Could be any of the following: not \"\n\t\t\t\t\t\t\t\t\t\t+ \"enough in args, too many in args, no in args, no in args by that name, \"\n\t\t\t\t\t\t\t\t\t\t+ \"one or more in args are of the wrong data type.\"});\n\t\terrorMap.put(\"403\", new String[] {\"Out of Sync\",\n\t\t\t\t\"Out of synchronization.\"});\n\t\terrorMap.put(\"501\", new String[] {\n\t\t\t\t\"Action Failed\",\n\t\t\t\t\"May be returned in current state of \"\n\t\t\t\t\t\t+ \"service prevents invoking that action.\"});\n\t\terrorMap.put(\"404\", new String[] {\"Invalid Var\",\n\t\t\t\t\"No state variable by that name at this service.\"});\n\t}", "@Override\r\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tString responseString, Throwable throwable) {\n\t\t\t\t\t\tLoger.i(\"TEST\", \"topic->statusCode->\"+statusCode);\r\n\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\tmessage.what = REFUSE_CODE;\r\n\t\t\t\t\t\tgetTopicHandler.sendMessage(message);\r\n\t\t\t\t\t\tnew ErrorServer(PropertyRepairActivity.this, responseString.toString());\r\n\t\t\t\t\t\tsuper.onFailure(statusCode, headers, responseString, throwable);\r\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void onFailure(int code, String msg, Object object) {\n\n\t\t\t}" ]
[ "0.63182443", "0.6077589", "0.59506935", "0.5900359", "0.5900359", "0.5887508", "0.5877919", "0.58102256", "0.5752061", "0.5748186", "0.56560755", "0.562398", "0.5613143", "0.560865", "0.55868423", "0.55638814", "0.5530026", "0.55191064", "0.55141205", "0.55045635", "0.55045635", "0.55031246", "0.5499779", "0.5499779", "0.54111636", "0.5393838", "0.5381954", "0.5372728", "0.5361495", "0.53521025", "0.5345995", "0.5344267", "0.53365886", "0.53172314", "0.5291576", "0.5279594", "0.527529", "0.52681816", "0.5243412", "0.52421397", "0.52118725", "0.520882", "0.5194815", "0.5187307", "0.5180759", "0.5180759", "0.5180759", "0.5180759", "0.51554215", "0.51554215", "0.5155311", "0.51449984", "0.5141998", "0.51375335", "0.51267374", "0.51203585", "0.5108524", "0.5105932", "0.5103432", "0.50921357", "0.5082289", "0.5082289", "0.50791407", "0.5078051", "0.50753284", "0.50742686", "0.50730443", "0.5070691", "0.50655353", "0.5065375", "0.50546545", "0.50497544", "0.50473887", "0.50468177", "0.5040245", "0.5040188", "0.50320077", "0.5029859", "0.5023105", "0.5019024", "0.50158435", "0.50143325", "0.50141877", "0.50135535", "0.50129694", "0.5012668", "0.5011399", "0.50101256", "0.50082237", "0.5005859", "0.50017864", "0.5001606", "0.5000531", "0.49989754", "0.49975947", "0.4995174", "0.49811652", "0.49803492", "0.49791974", "0.49715403", "0.49714798" ]
0.0
-1
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getStateReason() != null) sb.append("StateReason: ").append(getStateReason()).append(","); if (getStateReasonCode() != null) sb.append("StateReasonCode: ").append(getStateReasonCode()); sb.append("}"); return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() { return stringify(this, true); }", "@Override\n public String toString() {\n return new JSONSerializer().serialize(this);\n }", "public String toString() {\n\t\treturn this.toJSON().toString();\n\t}", "public String toString() {\n\t\treturn this.toJSON().toString();\n\t}", "@Override\n public String toString() {\n // TODO: Using Serializer\n return Serializer.toByteArray(this).toString();\n }", "@Override\n public String toString() {\n return new Gson().toJson(this);\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 }", "@Override\n public String toString() {\n return new GsonBuilder().serializeNulls().create().toJson(this).toString();\n }", "public String toString() {\n StringWriter writer = new StringWriter();\n this.write(writer);\n return writer.toString();\n }", "@Override\n public String toString() {\n return gson.toJson(this);\n }", "@Override\n public String toString() {\n final Map<String, Object> augmentedToStringFields = Reflect.getStringInstanceVarEntries(this);\n augmentToStringFields(augmentedToStringFields);\n return Reflect.joinStringMap(augmentedToStringFields, this);\n }", "@Override\n\tpublic String toString() {\n\t\treturn toStringBuilder(new StringBuilder()).toString();\n\t}", "@Override\r\n public String toString() {\r\n return JsonSerializer.SerializeObject(this);\r\n }", "@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 }", "@Override()\n public String toString()\n {\n final StringBuilder buffer = new StringBuilder();\n toString(buffer);\n return buffer.toString();\n }", "@Override\n public String toString() {\n // TODO this is a sudo method only for testing puroposes\n return \"{name: 5aled, age:15}\";\n }", "public String toString()\n\t{\n\t\treturn Printer.stringify(this, false);\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 toString() {\n\t\t//TODO add your own field name here\t\t\n\t\t//return buffer.append(this.yourFieldName).toString();\n\t\treturn \"\";\n\t}", "public String toString() {\n\t\treturn toString(true);\n\t}", "public String toString() {\n return ToStringBuilder.reflectionToString(this);\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getName() != null)\n sb.append(\"Name: \").append(getName()).append(\",\");\n if (getPhoneNumber() != null)\n sb.append(\"PhoneNumber: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getEmail() != null)\n sb.append(\"Email: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getIdentificationNumber() != null)\n sb.append(\"IdentificationNumber: \").append(getIdentificationNumber()).append(\",\");\n if (getIdentificationExpirationDate() != null)\n sb.append(\"IdentificationExpirationDate: \").append(getIdentificationExpirationDate()).append(\",\");\n if (getIdentificationIssuingOrg() != null)\n sb.append(\"IdentificationIssuingOrg: \").append(getIdentificationIssuingOrg()).append(\",\");\n if (getDevicePickupId() != null)\n sb.append(\"DevicePickupId: \").append(getDevicePickupId());\n sb.append(\"}\");\n return sb.toString();\n }", "@Override\n\tpublic String toString() {\n\t\ttry {\n\t\t\treturn this.toJSONString(0);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public String toString() {\n String str = \"\";\n\n //TODO: Complete Method\n\n return str;\n }", "@Override\n\tpublic String toString() {\n\t\treturn toText();\n\t}", "@Override\r\n\tpublic String toString() {\n\t\tString str = \"\";\r\n\t\treturn str;\r\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 toString(false, true, true, null);\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn JSONObject.toJSONString(this);\r\n\t}", "public String toString() {\n\t\treturn toString(this);\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn Json.pretty( this );\n\t}", "@Override\n public final String toString() {\n return asString(0, 4);\n }", "@Override\n public String toString() {\n return MoreObjects.toStringHelper(this) //\n .add(\"name\", getName()) //\n .add(\"phNumber\", getPhNumber()) //\n .add(\"emailId\", getEmailId()) //\n .add(\"parent\", getParent()) //\n .toString();\n }", "public java.lang.String toString() {\n return this.stringValue;\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn MoreObjects.toStringHelper(this) //\r\n\t\t\t\t.add(\"id\", getId()) //\r\n\t\t\t\t.add(\"parameter\", getParameter()) //\r\n\t\t\t\t.add(\"value\", getValue()) //\r\n\t\t\t\t.add(\"hieraAddress\", getHieraAddress()) //\r\n\t\t\t\t.toString();\r\n\t}", "@Override\n\tpublic String toString()\n\t{\n\t\treturn this.str;\n\t}", "public String toString() {\n StringBuilder stringBuilder = new StringBuilder(40);\n stringBuilder.append(\"property '\").append(this.getName()).append(\"' (\");\n if (this._accessorMethod != null) {\n stringBuilder.append(\"via method \").append(this._accessorMethod.getDeclaringClass().getName()).append(\"#\").append(this._accessorMethod.getName());\n } else {\n stringBuilder.append(\"field \\\"\").append(this._field.getDeclaringClass().getName()).append(\"#\").append(this._field.getName());\n }\n if (this._serializer == null) {\n stringBuilder.append(\", no static serializer\");\n } else {\n stringBuilder.append(\", static serializer of type \" + this._serializer.getClass().getName());\n }\n stringBuilder.append(')');\n return stringBuilder.toString();\n }", "@Override\n public String toString() {\n byte[] buffer = toBuffer();\n return (buffer == null) ? null : new String(buffer, StandardCharsets.UTF_8);\n }", "@Override\n public String toString() {\n return (this.str);\n }", "public String toString()\n\t{\n\t\tString result = \"\";\n\t\tresult += this.data;\n\t\treturn result;\n\t}", "@Override\n public String toString()\n {\n StringBuilder builder = new StringBuilder();\n dump(builder, 0, '\\'');\n return builder.toString();\n }", "@Override\n\tpublic String toString() {\n\t\treturn JSON.toJSONString(this,SerializerFeature.WriteMapNullValue,\n\t\t\t\tSerializerFeature.WriteNonStringKeyAsString,\n\t\t\t\tSerializerFeature.WriteNullListAsEmpty,\n\t\t\t\tSerializerFeature.WriteNullNumberAsZero,\n\t\t\t\tSerializerFeature.WriteNullStringAsEmpty);\n\t}", "@Override\n\tpublic String toString() {\n\t\tif (repr == null)\n\t\t\trepr = toString(null);\n\n\t\treturn repr;\n\t}", "public String toString() {\n\treturn createString(data);\n }", "@Override\n public String toString() {\n return mString;\n }", "public String toString() {\n\t\t\tif (this.getKey() == null) {\n\t\t\t\treturn \"\";\n\t\t\t} else {\n\t\t\t\treturn \"Key:\" + this.getKey() + \" Value:\" + this.getValue();\n\t\t\t}\n\t\t}", "public String toString() {\n return toDisplayString();\n }", "public java.lang.String toString()\n {\n return this.stringValue;\n }", "public String toString() {\n StringBuffer buffer = new StringBuffer();\n\n buffer.append(getClass().getName());\n buffer.append(\"@\");\n buffer.append(Integer.toHexString(hashCode()));\n buffer.append(\" [\");\n buffer.append(objectToString(\"Id\", getId()));\n buffer.append(objectToStringFK(\"Project\", getProject()));\n buffer.append(objectToStringFK(\"User\", getUser()));\n buffer.append(objectToString(\"Status\", getStatus()));\n buffer.append(objectToString(\"LastActivityDate\", getLastActivityDate()));\n buffer.append(objectToString(\"HasPiSeen\", getHasPiSeen()));\n buffer.append(objectToString(\"HasDpSeen\", getHasDpSeen()));\n buffer.append(objectToString(\"HasAdminSeen\", getHasAdminSeen()));\n buffer.append(objectToString(\"HasRequestorSeen\", getHasRequestorSeen()));\n buffer.append(objectToString(\"EmailStatus\", getEmailStatus()));\n buffer.append(\"]\");\n\n return buffer.toString();\n }", "public String toString() {\n\t\treturn EPPUtil.toString(this);\n\t}", "public String toString() {\n\t\treturn EPPUtil.toString(this);\n\t}", "public String toString() {\r\n\t\treturn \"Name: \" + getName() + \" Phone: \" + phoneNumber + \" Email: \" + email;\r\n\t\t\r\n\t}", "@Override\n public String toString() {\n return string;\n }", "@Override\n public final String toString() {\n return this.value;\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn value + \"\";\r\n\t}", "public String toString() {\n\t\treturn toString(0, 0);\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn \"\";\r\n\t}", "@Override\n public String toString() {\n ByteArrayOutputStream bs = new ByteArrayOutputStream();\n PrintStream out = new PrintStream(bs);\n output(out, \"\");\n return bs.toString();\n }", "@Override\n\tpublic String toString() {\n\t\treturn toJSON().toString();\n\t}", "public String toString() {\r\n\t\treturn \"Name: \" + name + \"\\nAddress: \" + addr + \"\\n\" + city + \"\\n\"\r\n\t\t\t\t+ state + \"\\n\" + zip + \"\\nPhone: \" + phone + \"\\nId: \" + id\r\n\t\t\t\t+ \"\\nMajor: \" + major + \"\\nGPA: \" + gpa;\r\n\t}", "public synchronized String toString() {\n StringBuffer oBuffer = new StringBuffer();\n\n oBuffer\n .append(\"Preprocessing params: \").append(this.oPreprocessingParams).append(\"\\n\")\n .append(\"Feature extraction params: \").append(this.oFeatureExtractionParams).append(\"\\n\")\n .append(\"Classification params: \").append(this.oClassificationParams);\n\n return oBuffer.toString();\n }", "public String toString() {\r\n\t\treturn \"Name: \" + getName() + \"\\nAddress: \" + getAddress() + \"\\nPhone Number: \" + getPhoneNumber();\r\n\t}", "@Override String toString();", "@Override\n\tpublic String toString() {\n\t\treturn \"\";\n\t}", "@Override\n public String toString() {\n return value();\n }", "@Override\n\tpublic String toString() {\n\t\treturn this.toAnticipatedString();\n\t}", "public String toString(){\r\n\t\tString superString = super.toString();\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\t//Add the object to the string\r\n\t\tbuilder.append(\". \");\r\n\t\tif (this.error != null) {\r\n\t\t\tbuilder.append(error.toString());\r\n\t\t\tbuilder.append(\". \");\r\n\t\t}\r\n\t\tbuilder.append(\"Object: \");\r\n\t\tbuilder.append(object.toString());\r\n\t\tif (this.recordRoute)\r\n\t\t\tbuilder.append(\", [RECORD_ROUTE]\");\r\n\t\tif (this.reRouting) \r\n\t\t\tbuilder.append(\", [RE-ROUTING]\");\r\n\t\t//Add the masks to the string\r\n\t\tif (this.mask != null) {\r\n\t\t\tbuilder.append(\", label set: \");\r\n\t\t\tbuilder.append(mask.toString());\r\n\t\t}\r\n\t\treturn superString.concat(builder.toString());\r\n\t}", "public String toString()\r\n\t{\r\n\t\treturn toCharSequence().toString();\r\n\t}", "@Override\n public String toString() {\n try {\n return new ObjectMapper().writeValueAsString(this);\n } catch (final JsonProcessingException ioe) {\n return ioe.getLocalizedMessage();\n }\n }", "public String toString() {\n\t\treturn \"{\\\"username\\\":\\\"\" + this.username + \"\\\",\\\"apiKey\\\":\\\"\"\n\t\t\t\t+ this.apiKey + \"\\\",\\\"apiSecret:\\\"\" + this.apiSecret\n\t\t\t\t+ \"\\\",\\\"nonce:\\\"\" + this.nonce + \"\\\"}\";\n\t}", "@Override\n public String toString() {\n return Objects.toStringHelper(this)\n .addValue(this.id)\n .addValue(this.name)\n .addValue(this.author)\n .addValue(this.description)\n .addValue(this.pictureOfCover)\n .toString();\n }", "public String getAsString() {\n\t\treturn new String(this.getAsBytes());\n\t}", "@Override\n public String toString() {\n return toStringHelper(this)\n .addValue(id)\n .addValue(firstName)\n .addValue(lastName)\n .addValue(email)\n .addValue(activities)\n .addValue(password).toString();\n }", "public String toString() {\n return \"\" + data;\n }", "public String toString()\r\n\t{\r\n\t\tStringBuffer OutString = new StringBuffer();\r\n\t\t// Open tag\r\n\t\tOutString.append(\"<\");\r\n\t\t// Add the object's type\r\n\t\tOutString.append(getType());\r\n\t\t// attach the ID if required.\r\n\t\tif (DEBUG)\r\n\t\t\tOutString.append(getObjID());\r\n\t\t// add the class attribute if required; default: don't.\r\n\t\tif (getIncludeClassAttribute() == true)\r\n\t\t\tOutString.append(getClassAttribute());\r\n\t\t// Add any transformation information,\r\n\t\t// probably the minimum is the x and y values.\r\n\t\t// again this is new to Java 1.4;\r\n\t\t// this function returns a StringBuffer.\r\n\t\tOutString.append(getAttributes());\r\n\t\t// close the tag.\r\n\t\tOutString.append(\">\");\r\n\t\tOutString.append(\"&\"+entityReferenceName+\";\");\r\n\t\t// close tag\r\n\t\tOutString.append(\"</\");\r\n\t\tOutString.append(getType());\r\n\t\tOutString.append(\">\");\r\n\r\n\t\treturn OutString.toString();\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn new StringBuilder()\n\t\t\t.append(this.getClass().getSimpleName())\n\t\t\t.append(\" { id:\").append(id)\n\t\t\t.append(\", version:\").append(version)\n\t\t\t.append(\" }\")\n\t\t\t.toString();\n\t}", "public String toString() {\n\t\treturn (getValue().toString());\r\n\t}", "public String toString() {\n StringBuffer buffer = new StringBuffer();\n\n buffer.append(getClass().getName());\n buffer.append(\"@\");\n buffer.append(Integer.toHexString(hashCode()));\n buffer.append(\" [\");\n buffer.append(objectToString(\"Id\", getId()));\n buffer.append(objectToString(\"ProjectName\", getProjectName()));\n buffer.append(objectToStringFK(\"DataProvider\", getDataProvider()));\n buffer.append(objectToStringFK(\"PrimaryInvestigator\", getPrimaryInvestigator()));\n buffer.append(objectToStringFK(\"CreatedBy\", getCreatedBy()));\n buffer.append(objectToString(\"CreatedTime\", getCreatedTime()));\n buffer.append(\"]\");\n\n return buffer.toString();\n }", "public String toString ( ) {\r\n String returnString = _name + \"{ id: \" + _uniqueID + \" pos: [\"+ getPosition().getPosition() + \"] }\";\r\n return returnString;\r\n }", "public String toString() {\n String output = \"\\nName: \" + name;\n output += \"\\nType: \" + type;\n output += \"\\nContact Details: \" + contactNo;\n output += \"\\nEmail address: \" + email;\n output += \"\\nResidentail Address: \" + address;\n\n return output;\n }", "@Override \n\tpublic String toString() {\n\t\treturn stringForm;\n\t}", "@Override public String toString();", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\" {\");\n sb.append(\" \\\"fileid\\\":\\\"\").append(fileid);\n sb.append(\", \\\"filename\\\":\\\"\").append(filename);\n sb.append(\", \\\"fileupdate\\\":\\\"\").append(fileupdate);\n sb.append(\", \\\"filepath\\\":\\\"\").append(filepath);\n sb.append(\", \\\"fileuploader\\\":\\\"\").append(fileuploader);\n sb.append(\", \\\"isdelete\\\":\\\"\").append(isdelete);\n sb.append(\", \\\"filedesc\\\":\\\"\").append(filedesc);\n sb.append(\", \\\"filetype\\\":\\\"\").append(filetype);\n sb.append(\"\\\"}\");\n return sb.toString();\n }", "public final String toString() {\n\t\tStringWriter write = new StringWriter();\n\t\tString out = null;\n\t\ttry {\n\t\t\toutput(write);\n\t\t\twrite.flush();\n\t\t\tout = write.toString();\n\t\t\twrite.close();\n\t\t} catch (UnsupportedEncodingException use) {\n\t\t\tuse.printStackTrace();\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\treturn (out);\n\t}", "public String toString() {\n\t\treturn super.toString();\n\t\t// This gives stack overflows:\n\t\t// return ToStringBuilder.reflectionToString(this);\n\t}", "public String toString() {\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\n\t\tDocument document = XMLUtils.newDocument();\n\t\tdocument.appendChild(toXML(document));\n\t\tXMLUtils.write(bos, document);\n\n\t\treturn bos.toString();\n\t}", "public String toString() {\n\t\treturn String.format(\"%s\\nID: %d\\nDescription: %s\\n\", name.toUpperCase(), id, description); \n\t}", "public String toString() {\r\n String result = \"Name: \" + name + \"\\n\";\r\n\r\n result += \"Address: \" + address + \"\\n\";\r\n result += \"Phone: \" + phone;\r\n\r\n return result;\r\n }", "@Override\n public String toString() {\n return \"\" + this.value;\n }", "public String toString()\n\t{\n\t\treturn String.format(\"%-25s%-15s\\n%-25s%-15s\\n%-25s%-15s\\n%-25s%-15d\\n%-25s%-15s\\n%-25s$%,-13.2f\", \n\t\t\t\t \t\t \t \"Name\", this.getName(), \"Address:\", this.getAddress(), \"Telephone number:\", this.getTelephone(), \n\t\t\t\t \t\t \t \"Customer Number:\", this.getCustNum(), \"Email notifications:\", this.getSignedUp() == true ? \"Yes\" : \"No\",\n\t\t\t\t \t\t \t \"Purchase amount:\", this.getCustomerPurchase());\n\t}", "public String toString() {\n\t\treturn str;\n\t}", "public String toString() {\n return String.format(mFormat,\n format(mManufacturer),\n format(mBrand),\n format(mModel),\n mResolution,\n mDensity,\n mAndroidDensity,\n mVersion,\n mSdk,\n mLanguage);\n }", "@Override\r\n public String toString() {\r\n return toSmartText().toString();\r\n }", "@Override\n public String toString()\n {\n return this.toLsString();\n }", "public String toString()\n {\n return this.string;\n }", "@Override\n public String toString() {\n return Helper.concat(this.getClass().getName(), \"{\",\n \"id:\", getId(),\n \", name:\", getName(),\n \", positions:\", positions,\n \", resourceRoles:\", resourceRoles,\n \"}\");\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getVersion() != null)\n sb.append(\"version: \").append(getVersion()).append(\",\");\n if (getResource() != null)\n sb.append(\"resource: \").append(getResource()).append(\",\");\n if (getPath() != null)\n sb.append(\"path: \").append(getPath()).append(\",\");\n if (getHttpMethod() != null)\n sb.append(\"httpMethod: \").append(getHttpMethod()).append(\",\");\n if (getHeaders() != null)\n sb.append(\"headers: \").append(getHeaders().toString()).append(\",\");\n if (getMultiValueHeaders() != null)\n sb.append(\"multiValueHeaders: \").append(getMultiValueHeaders().toString()).append(\",\");\n if (getQueryStringParameters() != null)\n sb.append(\"queryStringParameters: \").append(getQueryStringParameters().toString()).append(\",\");\n if (getMultiValueQueryStringParameters() != null)\n sb.append(\"multiValueQueryStringParameters: \").append(getMultiValueQueryStringParameters().toString()).append(\",\");\n if (getPathParameters() != null)\n sb.append(\"pathParameters: \").append(getPathParameters().toString()).append(\",\");\n if (getStageVariables() != null)\n sb.append(\"stageVariables: \").append(getStageVariables().toString()).append(\",\");\n if (getRequestContext() != null)\n sb.append(\"requestContext: \").append(getRequestContext().toString()).append(\",\");\n if (getBody() != null)\n sb.append(\"body: \").append(getBody()).append(\",\");\n if (getIsBase64Encoded() != null)\n sb.append(\"isBase64Encoded: \").append(getIsBase64Encoded());\n sb.append(\"}\");\n return sb.toString();\n }", "public String toString() {\n return \"\";\n }" ]
[ "0.8100615", "0.8075129", "0.80493397", "0.80493397", "0.8026168", "0.7975271", "0.7939094", "0.79294294", "0.79116815", "0.78960097", "0.7784765", "0.77844536", "0.77691835", "0.77683777", "0.77683777", "0.77683777", "0.7757559", "0.77284676", "0.7723956", "0.76756173", "0.76756173", "0.76692086", "0.7654793", "0.7653188", "0.76435244", "0.76434803", "0.7637885", "0.763587", "0.76234025", "0.7622123", "0.76198125", "0.75992966", "0.75907856", "0.75905097", "0.75559664", "0.75383794", "0.75365", "0.75318193", "0.7527218", "0.7527168", "0.75206417", "0.7507902", "0.75005764", "0.7475749", "0.7454012", "0.7422608", "0.7421741", "0.7419291", "0.7418795", "0.7418333", "0.7413099", "0.7407248", "0.7404625", "0.7404625", "0.7404351", "0.73969483", "0.73959684", "0.7395966", "0.7392615", "0.7390311", "0.7378705", "0.7378194", "0.73712283", "0.7361871", "0.7360193", "0.73499906", "0.7343122", "0.73424107", "0.73362726", "0.73300934", "0.73281384", "0.73281085", "0.7321833", "0.731992", "0.7315513", "0.7313988", "0.7312755", "0.7302213", "0.72955364", "0.72932297", "0.7292118", "0.7291991", "0.7288276", "0.7279718", "0.72773874", "0.72759235", "0.7273329", "0.72621465", "0.726152", "0.7259058", "0.72569185", "0.7251922", "0.7248893", "0.72488266", "0.72465265", "0.72431153", "0.7242123", "0.72389954", "0.7238517", "0.72325176", "0.7226302" ]
0.0
-1
Interface of an item.
public interface Item { /** * Use the item on the player. If it's gold, it is added to his inventory. Else, it directly modify the player stats. * @param character - the player ( a monster cannot use an item) who's using an item * @return the player with his new stats due to the item */ public Character isUsedBy(Character character); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Item {\n}", "public interface Item {\n \n /**\n * Returns the name of the item\n * @return \n */\n public String getName();\n \n /**\n * Returns the price of the item\n * @return \n */\n public double getPrice();\n \n /**\n * Returns the # of the items\n * @return \n */\n public int getQuantity();\n /**\n * Returns the item type\n * @return ItemCategory\n */\n public ItemCategory getCategory();\n}", "public interface ItemDescriptor {\n\n /**\n * Get the ID of the item\n *\n * @return item id\n */\n public int getID();\n\n /**\n * Get the name of the item\n *\n * @return item name\n */\n public String getName();\n\n /**\n * Get the type descriptor\n *\n * @return item type\n */\n public ItemType getType();\n\n}", "public interface BaseItem {\n}", "public interface IItem {\n // Which hotbar slot the item is stored in\n int getItemID();\n\n // Path to the item image\n String getItemImage();\n\n // Activates the item\n void activate();\n}", "public interface Item {\n\n String getName();\n\n String getDescription();\n\n int getSkill(SkillType skillType);\n\n String getSkillDescr();\n}", "@Override\n public int getItemType() {\n return ITEM_TYPE;\n }", "ICpItem getCpItem();", "@Override\n\tprotected DataTypes getDataType() {\n\t\treturn DataTypes.ITEM;\n\t}", "public interface Item {\n void fill(RecyclerView.ViewHolder viewHolder);\n\n int getType();\n\n}", "public interface FAQsItem {\n public int getType();\n public int getId();\n}", "public interface ItemInterface {\n void OnItemSwitchedListener(int pos);\n\n void OnItemClickedListener(ArrayList<Track> tracks, int adapterPosition);\n }", "public interface SystemItem {\n}", "public interface MultiItemInterface {\n int getItemType();\n int getSpanSize();\n}", "public interface CompItem {\n String getName();\n}", "CodeableConcept getItem();", "public interface Item {\n\t\n\tboolean isSection();\n\n}", "public interface LocatedItem<E> {\r\n /**\r\n * Get the item.\r\n * \r\n * @return\r\n */\r\n public E getItem();\r\n\r\n /**\r\n * Get the ontology URI to which the item belongs.\r\n * \r\n * @return\r\n */\r\n public String getOntologyURI();\r\n}", "public interface CompItem\n{\n String getName();\n}", "public Item getItem() { \n return myItem;\n }", "public interface IItemDataEnum extends IStringSerializable{\n\t/**\n\t * This should return the unlocalized name of the sub item/block, without the mod ID or the item ID this is a sub item/block of\n\t * \n\t * @return\n\t */\n\tString getUnlocalizedName();\n\t\n\t/**\n\t * This should return the full unlocalized name for use in texture registry\n\t * \n\t * @return\n\t */\n\tString getTextureName();\n\t\n\t/**\n\t * Returns the meta value of the sub item/block\n\t * \n\t * @return\n\t */\n\tint getMeta();\n}", "public Item getItem() { return this; }", "public interface IdItem {\n int getId();\n}", "Identifiable item();", "public interface IModelItem<Item extends IModelItem<Item>> {\n\n /**\n * Gets the value of this item in the specified column.\n *\n * @param column The column.\n * @return The current value.\n */\n @Nullable\n Object getValueOfColumn(ModelColumnInfo<Item> column);\n\n /**\n * Sets the value of this item in the specified column.\n *\n * @param column The column.\n * @param value The new value.\n */\n void setValueOfColumn(ModelColumnInfo<Item> column, @Nullable Object value);\n\n /**\n * Gets whether the value of this item in the specified column can be edited.\n *\n * @param column The column.\n * @return <code>true</code> when the value can be edited;\n * otherwise, <code>false</code>.\n */\n boolean canEditValueOfColumn(ModelColumnInfo<Item> column);\n}", "public interface Item {\n\n boolean isTask();\n}", "public interface IItemList<StackType extends IAEStack> extends IItemContainer<StackType>, Iterable<StackType>\n{\n\n\t/**\n\t * add a stack to the list stackSize is used to add to stackSize, this will merge the stack with an item already in\n\t * the list if found.\n\t * \n\t * @param option stacktype option\n\t */\n\tpublic void addStorage(StackType option); // adds a stack as stored\n\n\t/**\n\t * add a stack to the list as craftable, this will merge the stack with an item already in the list if found.\n\t * \n\t * @param option stacktype option\n\t */\n\tpublic void addCrafting(StackType option);\n\n\t/**\n\t * add a stack to the list, stack size is used to add to requestable, this will merge the stack with an item already\n\t * in the list if found.\n\t * \n\t * @param option stacktype option\n\t */\n\tpublic void addRequestable(StackType option); // adds a stack as requestable\n\n\t/**\n\t * @return the first item in the list\n\t */\n\tStackType getFirstItem();\n\n\t/**\n\t * @return the number of items in the list\n\t */\n\tint size();\n\n\t/**\n\t * allows you to iterate the list.\n\t */\n\t@Override\n\tpublic Iterator<StackType> iterator();\n\n\t/**\n\t * resets stack sizes to 0.\n\t */\n\tvoid resetStatus();\n\n}", "public interface LifeItem{\n List getTitle();\n List getContent();\n}", "public interface IItemTypeHandler {\n\n\t/**\n\t * Get the item for this type of handler for the given node element, can just be a text node.\n\t * @param itemNode The node containing info about this item, for example\n\t * \"&lt;item&gt;evilcraft:darkGem&lt;/item&gt;\"\n\t * @return An item stack for this item or a string representing an ore dict id.\n\t * @throws XmlRecipeException If an error occured\n\t */\n\tpublic Object getItem(Node itemNode) throws XmlRecipeException;\n\t\n}", "public interface PickerItem {\n String getText();\n\n Bitmap getBitmap();\n\n @DrawableRes\n int getDrawable();\n\n boolean hasDrawable();\n }", "public interface ShopItem\n{\n\tDrawable getIcon();\n\n\tString getDisplayName();\n\n\tString getDescription();\n\n\tString getDataName();\n\n\tBigDecimal getCost(int count);\n\n\tvoid init(GameResources resources, AtomicInteger progress);\n\n\tint getProgressCount();\n}", "public interface Item {\n\t\n\t/**\n\t * Invoked for visiting this node.\n\t * @param visitor visitor\n\t */\n\tvoid visit(Visitor visitor);\n}", "public interface IItem extends IAction {\n\n\t/**\n\t * Additional bag option to handle quantity manifest\n\t * @return bagEmpty\n\t */\n\tpublic abstract boolean depleteItem();\n}", "public interface ItemListView {\n\n void showItems(List<ModelItem> items);\n void onItemSelected(ModelItem item);\n\n}", "@Override // see item.java\n\tpublic void useItem() {\n\n\t}", "public T getItem() {\r\n return item;\r\n }", "public ItemType getItem() {\n\t return this.item;\n\t}", "public ItemType getItem() {\n\t return this.item;\n\t}", "public T getItem() {\n return item;\n }", "public Item getItem() {\n return item;\n }", "public Item getItem ()\n\t{\n\t\treturn item;\n\t}", "public interface IInventoryObject extends IID\n{\n}", "ItemStack getItem();", "public interface PickerItem {\n String getText();\n\n @DrawableRes\n int getDrawable();\n\n boolean hasDrawable();\n }", "public interface ItemInfo extends Info, Comparable<ItemInfo> {\n RepoPath getRepoPath();\n\n boolean isFolder();\n\n /**\n * @return The file/folder name of this item\n * @see org.artifactory.repo.RepoPath#getName()\n */\n String getName();\n\n String getRepoKey();\n\n String getRelPath();\n\n long getCreated();\n\n long getLastModified();\n\n String getModifiedBy();\n\n String getCreatedBy();\n\n long getLastUpdated();\n\n boolean isIdentical(ItemInfo info);\n}", "public interface Item {\n\n public boolean isSection();\n\n}", "public interface ItemVisitor< T >\n{\n\tboolean isDuplicate( T item );\n\n\tItemState open( T item );\n\n\tboolean close( T item );\n\n\tenum ItemState\n\t{\n\t\tLOST,\n\t\tDUPLICATE,\n\t\tINSERT\n\t}\n}", "public T getItem() {\n\t\treturn item;\n\t}", "public T getItem() {\n\t\treturn item;\n\t}", "protected ResourceReference getItem()\n\t{\n\t\treturn ITEM;\n\t}", "public Item getItem() {\n\t\treturn item;\n\t}", "public Item getItem() {\n return item;\n }", "InventoryItem getInventoryItem();", "public interface PIMItem {\n\n public static final int ATTR_NONE = 0;\n public static final int BINARY = 0;\n public static final int BOOLEAN = 1;\n public static final int DATE = 2;\n public static final int EXTENDED_ATTRIBUTE_MIN_VALUE = 0x1000000;\n public static final int EXTENDED_FIELD_MIN_VALUE = 0x1000000;\n public static final int INT = 3;\n public static final int STRING = 4;\n public static final int STRING_ARRAY = 5;\n\n public abstract PIMList getPIMList();\n\n public abstract void commit() throws PIMException;\n\n public abstract boolean isModified();\n\n public abstract int[] getFields();\n\n public abstract byte[] getBinary(int i, int j);\n\n public abstract void addBinary(int i, int j, byte abyte0[], int k, int l);\n\n public abstract void setBinary(int i, int j, int k, byte abyte0[], int l, int i1);\n\n public abstract long getDate(int i, int j);\n\n public abstract void addDate(int i, int j, long l);\n\n public abstract void setDate(int i, int j, int k, long l);\n\n public abstract int getInt(int i, int j);\n\n public abstract void addInt(int i, int j, int k);\n\n public abstract void setInt(int i, int j, int k, int l);\n\n public abstract String getString(int i, int j);\n\n public abstract void addString(int i, int j, String s);\n\n public abstract void setString(int i, int j, int k, String s);\n\n public abstract boolean getBoolean(int i, int j);\n\n public abstract void addBoolean(int i, int j, boolean flag);\n\n public abstract void setBoolean(int i, int j, int k, boolean flag);\n\n public abstract String[] getStringArray(int i, int j);\n\n public abstract void addStringArray(int i, int j, String as[]);\n\n public abstract void setStringArray(int i, int j, int k, String as[]);\n\n public abstract int countValues(int i);\n\n public abstract void removeValue(int i, int j);\n\n public abstract int getAttributes(int i, int j);\n\n public abstract void addToCategory(String s) throws PIMException;\n\n public abstract void removeFromCategory(String s);\n\n public abstract String[] getCategories();\n\n public abstract int maxCategories();\n}", "public interface ResultItem {\n public int getViewType();\n public View getView(LayoutInflater inflater, View convertView);\n}", "public interface IMaterialItem {\n\n /**\n * Returns the material identifier of the material of the part this itemstack holds.\n *\n * @return Identifier of a material or \"Unknown\", null or empty if invalid.\n */\n String getMaterialID(ItemStack stack);\n\n /**\n * Returns the material of the part this itemstack holds.\n *\n * @return Material or Material.UNKNOWN if invalid\n */\n Material getMaterial(ItemStack stack);\n\n /**\n * Returns the item with the given material\n */\n ItemStack getItemstackWithMaterial(Material material);\n}", "@Override\n public T getItemVO() {\n return this.itemVO;\n }", "public interface MeleteItemDetail\n{\n\t/**\n\t * @return The item's status.\n\t */\n\tItemAccessStatus getAccessStatus();\n\n\t/**\n\t * @return The close date.\n\t */\n\tDate getCloseDate();\n\n\t/**\n\t * @return A display title for the section's module.\n\t */\n\tString getModuleTitle();\n\n\t/**\n\t * @return The number of \"Student\" participants who have viewed this section. TODO: drop\n\t */\n\tInteger getNumViewed();\n\n\t/**\n\t * @return The open date.\n\t */\n\tDate getOpenDate();\n\n\t/**\n\t * @return The percent (0..100) of \"Student\" participants who have viewed this section.\n\t */\n\tInteger getPctViewed();\n\n\t/**\n\t * @return A display title for the section.\n\t */\n\tString getTitle();\n\n\t/**\n\t * @return The total number of \"Student\" participants who have access to this section. TODO: drop\n\t */\n\tInteger getTotal();\n}", "@Override\n\tpublic Class<? extends Item> getItemClass() {\n\t\treturn MarkItem.class;\n\t}", "public Item getItem() {\n return mItem;\n }", "public Item getItem() {\r\n\t\treturn this.item;\r\n\t}", "public Item getItem() {\n\t\treturn this.item;\n\t}", "public Item getItem() {\n\t\treturn this.item;\n\t}", "public CPRIMITIVEALTERNATIVES getItem()\n {\n return item;\n }", "public interface IItemList<T extends INode> {\n\n /**\n * Adds an item to the item list and assigns a unique item key to the item\n * and return it. The item key is the negatived index of the item in the\n * item list. The key is negatived to make it distinguishable from a node.\n * \n * @param pNode\n * the item to add\n * @return the item key\n */\n int addItem(final T pNode);\n\n /**\n * Returns the item at a given index in the item list. If the given index is\n * the item key, it has to be negated before.\n * \n * @param pKey\n * key of the item, that should be returned\n * @return item at the given index\n */\n Optional<T> getItem(final long pKey);\n\n /**\n * Determines how many items are in the list.\n * \n * @return list size\n */\n int size();\n}", "public interface VisualItem\r\n\textends ActivityItem\r\n{\r\n\t//////////////////////////////////////////////////\r\n\t// @@ Property access\r\n\t//////////////////////////////////////////////////\r\n\r\n\t/**\r\n\t * Gets the Id of the visual item.\r\n\t * @nowarn\r\n\t */\r\n\tpublic String getVisualId();\r\n\r\n\t/**\r\n\t * Set the Id for the visual item.\r\n\t * @nowarn\r\n\t */\r\n\tpublic void setVisualId(String visualId);\r\n}", "public interface AgileItem {\n\n /**\n * Get the label.\n *\n * @return The label\n */\n String getLabel();\n\n /**\n * Set the label.\n * @param label label of agile item\n */\n void setLabel(String label);\n\n /**\n * Copy values from an existing AgileItem object to the current AgileItem\n *\n * @param agileItem The AgileItem object to copy values from\n */\n void copyValues(AgileItem agileItem);\n\n /**\n * What will display in the list.\n *\n * @return String representation of item.\n */\n String toString();\n\n /**\n * The function which will be used to compare AgileItems. Assumes labels are unique and non null.\n *\n * @param obj Object to compare to.\n * @return Whether labels are equal or not.\n */\n boolean equals(Object obj);\n\n}", "public ItemType getType();", "protected abstract void makeItem();", "public interface TaskItem {\n \n public List<File> getAllFiles();\n \n public void addFiles(List<File> files) throws Exception;\n \n public File getFile(int index);\n \n public ItemType getType();\n \n public Integer getNumber();\n \n public String getDescription();\n}", "@CatalogedBy(ItemTypes.class)\npublic interface ItemType extends CatalogType, Translatable {\n\n /**\n * Gets the id of this item.\n *\n * <p>Ex. Minecraft registers a golden carrot as\n * \"minecraft:golden_carrot\".</p>\n *\n * @return The id\n */\n @Override\n String getName();\n\n /**\n * Get the default maximum quantity for\n * {@link ItemStack}s of this item.\n *\n * @return Max stack quantity\n */\n int getMaxStackQuantity();\n\n /**\n * Gets the default {@link Property} of this {@link ItemType}.\n *\n * <p>While item stacks do have properties, generally, there is an\n * intrinsic default property for many item types. However, it should be\n * considered that when mods are introducing their own custom items, they\n * too could introduce different item properties based on various data on\n * the item stack. The default properties retrieved from here should merely\n * be considered as a default, not as a definitive property.</p>\n *\n * @param propertyClass The item property class\n * @param <T> The type of item property\n * @return The item property, if available\n */\n <T extends Property<?, ?>> Optional<T> getDefaultProperty(Class<T> propertyClass);\n\n}", "public interface ItemClickListener {\n// void onShareClick(T item);\n// void onDownloadClick(T item);\n void onChannelTitleClick(Item item);\n void onPlayClick(Item item);\n}", "public InputStream getItemAsInputStream() {\r\n\t\treturn item;\r\n\t}", "public interface ItemView {\n\n void setFocus(boolean isFocused);\n\n void setImage(String url);\n}", "public void setItem (Object anObject)\r\n {\r\n // TODO: implement (?)\r\n }", "public String getItemObjectType() {\r\n\t\treturn itemObjectType;\r\n\t}", "public interface DataType extends CodeItem {\n}", "public Object get(String itemName);", "public BoxItem.Info getItem() {\n return this.item;\n }", "public interface ItemSelector<T> {\n\t/**\n * @return all of the items in the collection\n */\n\tpublic List<T> getItems();\n /**\n * @param set of items.<br/>\n * Set all of the items in the collection\n */\n\tpublic void setItems(List<T> items);\n /**\n * Choose the next item from the set collection.\n * @return the next item from the list (selected by the subclass).\n */\n\tpublic T getNextItem();\n}", "public interface MIInventoryInterface {\n\n /**\n * @return The inventory contents.\n */\n ItemStack[] getInventoryContents();\n\n /**\n * @return The armor contents.\n */\n ItemStack[] getArmorContents();\n}", "public interface ILitePackItem extends ITreeObject {\n\t\n\t/**\n\t * Returns item ID \n\t * @return item ID \n\t */\n\tString getId();\n\n\t/** \n\t * Returns version string, for Pack ist version, for Pack family - effectively used versions \n\t * @return version string\n\t */\n\tString getVersion();\n\n\t/**\n\t * Returns pack version mode\n\t * @return EVersionMatchMode\n\t */\n\tEVersionMatchMode getVersionMatchMode();\n\n\t/**\n\t * Check is to latest versions of all installed packs \n\t * @return true if the latest versions of packs should be used\n\t */\n\tboolean isUseAllLatestPacks();\n\t\n\t/**\n\t * Adds ICpItem to the item\n\t * @param item ICpItem to add (IcpPack, ICpPackInfo or ICpPackFamily )\n\t */\n\tvoid addCpItem(ICpItem item);\n\n\t/**\n\t * Returns ICpItem associated with this item\n\t * @return ICpItem associated with this item (IcpPack, ICpPackInfo or ICpPackFamily )\n\t */\n\tICpItem getCpItem();\n\n\t\n\t/**\n\t * Returns parent IRtePacktem if any \n\t * @return parent IRtePacktem if any \n\t */\n\tILitePackItem getParent();\t\n\n\t/**\n\t * Checks if the item is explicitly or implicitly selected \n\t * @return true if the item is selected \n\t */\n\tboolean isSelected(); \n\n\t/**\n\t * Checks if the pack item is used in an ICpConfigurationInfo \n\t * @return true if the item is used \n\t */\n\tboolean isUsed(); \n\n\t/**\n\t * Checks if all pack corresponding to this item are installed\n\t * @return true if installed, false if not\n\t */\n\tboolean isInstalled();\n\n\t\n\t/**\n\t * Checks if the pack family is excluded \n\t * @return true if the item is excluded \n\t */\n\tboolean isExcluded();\n\t\n\t/**\n\t * Returns URL associated with the item if any\n\t * @return URL associated with the item\n\t */\n\tString getUrl();\n\t\n\t/** \n\t * Return item description text of the element if any \n\t * @return description or empty string \n\t */\n\tString getDescription();\n\t\n\t/**\n\t * Returns corresponding ICpPack if installed\n\t * @return ICpPack if installed or null \n\t */\n\tICpPack getPack();\n\n\t/**\n\t * Returns corresponding ICpPackInfo if assigned\n\t * @return ICpPack if assigned or null \n\t */\n\tICpPackInfo getPackInfo();\n\t\n\t/**\n\t * Returns pack attributes taken either from underlying pack or ICPackItem \n\t * @returns pack attributes\n\t */\n\tIAttributes getAttributes();\n\n\t/**\n\t * Returns the first child item \n\t * @return the first child IRtePackItem\n\t */\n\tILitePackItem getFirstChild();\n\t\n\t/**\n\t * Returns root pack collection\n\t * @return root IRtePackCollection \n\t */\n\tILitePackCollection getRoot();\n\n\t\n\t/**\n\t * Returns parent pack family if any \n\t * @return IRtePackFamily \n\t */\n\tILitePackFamily getFamily();\n\n\t\n}", "public interface IsInventoryItem extends IsSceneSpriteObject, hasUserActions {\n\n\n\t/** KeepHeld mode - normally a item is dropped back into the inventory after use.\n\t * This mode determines if it should be kept held on certain conditions **/\n\tpublic enum KeepHeldMode {\n\t\tnever,onuse\n\t}\n\n\n\tpublic InventoryPanelCore getNativeInventoryPanel();\n\n\n\tpublic void setPopedUp(Boolean settothis);\n\n\tpublic boolean isPopedUp();\n\n\n\tpublic void setKeepHeldMode(KeepHeldMode mode);\n\tpublic KeepHeldMode getKeepHeldMode();\n\n\n\n\n\t/**\n\t * returns the name of the inventory item associated with this icon\n\t * this should be the same as .sceneobjectsstate().objectsname\n\t * @return\n\t */\n\tpublic String getName();\n\n\t/**\n\t * should trigger a popup to pop if there is one\n\t */\n\tpublic void triggerPopup();\n\n\n\tpublic IsInventoryItemPopupContent getPopup();\n\n\n\t/**\n\t * This gets the widget that represents the visuals needed for a popup\n\t * For GWT apps, this will be something that implements \"asWidget()\"\n\t * @return\n\t */\n\t//public Object getPopupImpl();\n\n\n\tpublic enum IconMode {\t\t\n\t\tImage,Text,CaptionedImage\t\t\n\t}\n\n\n\tpublic SceneObject getAssociatedSceneObject();\n\n\tvoid updateState(InventoryObjectState sceneObjectData, boolean runOnLoad, boolean repositionObjectsRelativeToThis);\n\n\n\t//subclasses have to override these to provide their own more specific types\n\t@Override\t\n\tpublic InventoryObjectState getObjectsCurrentState();\n\n\t@Override\n\tpublic InventoryObjectState getTempState();\n\n\t@Override\n\tpublic InventoryObjectState getInitialState();\n\n\n\t/**\n\t * Setws the popup to appear at a specific zindex\n\t * @param expectedZIndex\n\t */\n\tpublic void setFixedZdepth(int expectedZIndex);\n\n\n\tpublic void setPopupsBackgroundToTransparent();\n\n\n\t/**\n\t * In future inventorys might have two or more modes that visually represent them (ie, text or text and image).\n\t * This might enable gameplay such as selecting a concept from a text list\n\t * @param currentInventoryMode\n\t */\n\tpublic void setIconMode(IconMode currentInventoryMode);\n\n\n\t/**\n\t * should trigger the inventorys onItemAdded commands - first local then global\n\t */\n\tpublic void fireOnItemAddedToInventoryCommands();\n\n\n\t/**\n\t * fired if the item is picked up\n\t * @param b\n\t */\n\tpublic void triggerPickedUp(boolean b);\n\n\n\tpublic void triggerPutDown();\n\t\n\n\n\t\n\n\n\n\n}", "public Item getItemById(Integer itemId);", "public interface ReferentialItem extends Persistable<Long>, SecuredObject {\n\n boolean isEnabled();\n void setEnabled(boolean enabled);\n int getOrder();\n void setOrder(int order);\n String getDescription();\n void setDescription(String description);\n String getName();\n void setName(String name);\n String getShortName();\n void setShortName(String shortName);\n\n}", "public Item getItem(final String pItem){return this.aItemsList.getItem(pItem);}", "public interface Item extends org.apache.xmlbeans.XmlAnySimpleType\n {\n java.lang.Object getObjectValue();\n void setObjectValue(java.lang.Object val);\n /** @deprecated */\n java.lang.Object objectValue();\n /** @deprecated */\n void objectSet(java.lang.Object val);\n org.apache.xmlbeans.SchemaType instanceType();\n public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)\n org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Item.class.getClassLoader(), \"schemaorg_apache_xmlbeans.system.sXMLSCHEMA\").resolveHandle(\"anon16cetype\");\n \n /**\n * An anonymous inner XML type.\n *\n * This is an atomic type that is a restriction of org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList$Member2$Item$Member.\n */\n public interface Member extends org.apache.xmlbeans.XmlToken\n {\n public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)\n org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Member.class.getClassLoader(), \"schemaorg_apache_xmlbeans.system.sXMLSCHEMA\").resolveHandle(\"anon0c73type\");\n \n org.apache.xmlbeans.StringEnumAbstractBase enumValue();\n void set(org.apache.xmlbeans.StringEnumAbstractBase e);\n \n static final Enum TARGET_NAMESPACE = Enum.forString(\"##targetNamespace\");\n static final Enum LOCAL = Enum.forString(\"##local\");\n \n static final int INT_TARGET_NAMESPACE = Enum.INT_TARGET_NAMESPACE;\n static final int INT_LOCAL = Enum.INT_LOCAL;\n \n /**\n * Enumeration value class for org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList$Member2$Item$Member.\n * These enum values can be used as follows:\n * <pre>\n * enum.toString(); // returns the string value of the enum\n * enum.intValue(); // returns an int value, useful for switches\n * // e.g., case Enum.INT_TARGET_NAMESPACE\n * Enum.forString(s); // returns the enum value for a string\n * Enum.forInt(i); // returns the enum value for an int\n * </pre>\n * Enumeration objects are immutable singleton objects that\n * can be compared using == object equality. They have no\n * public constructor. See the constants defined within this\n * class for all the valid values.\n */\n static final class Enum extends org.apache.xmlbeans.StringEnumAbstractBase\n {\n /**\n * Returns the enum value for a string, or null if none.\n */\n public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }\n /**\n * Returns the enum value corresponding to an int, or null if none.\n */\n public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }\n \n private Enum(java.lang.String s, int i)\n { super(s, i); }\n \n static final int INT_TARGET_NAMESPACE = 1;\n static final int INT_LOCAL = 2;\n \n public static final org.apache.xmlbeans.StringEnumAbstractBase.Table table =\n new org.apache.xmlbeans.StringEnumAbstractBase.Table\n (\n new Enum[]\n {\n new Enum(\"##targetNamespace\", INT_TARGET_NAMESPACE),\n new Enum(\"##local\", INT_LOCAL),\n }\n );\n private static final long serialVersionUID = 1L;\n private java.lang.Object readResolve() { return forInt(intValue()); } \n }\n \n /**\n * A factory class with static methods for creating instances\n * of this type.\n */\n \n public static final class Factory\n {\n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newValue(java.lang.Object obj) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) type.newValue( obj ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newInstance() {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newInstance(org.apache.xmlbeans.XmlOptions options) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }\n \n private Factory() { } // No instance of this class allowed\n }\n }\n \n /**\n * A factory class with static methods for creating instances\n * of this type.\n */\n \n public static final class Factory\n {\n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item newValue(java.lang.Object obj) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item) type.newValue( obj ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item newInstance() {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item newInstance(org.apache.xmlbeans.XmlOptions options) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }\n \n private Factory() { } // No instance of this class allowed\n }\n }", "public interface OnItemClick {\n void onClick(String id);\n}", "public RepositoryItem getItem() {\n\t\t\treturn item;\n\t\t}", "public void setItem(ItemType item) {\n\t this.item = item;\n\t}", "public void setItem(ItemType item) {\n\t this.item = item;\n\t}", "public int getITEM() {\r\n return item;\r\n }", "@Override\r\n\t\tpublic Item getItem() {\n\t\t\treturn null;\r\n\t\t}", "public interface IPickupItem extends WrapperItem {\n\n void onPlayerPickupItem(Kit kit, PlayerPickupItemEvent event);\n\n}", "public String getItemType() {\n\t\treturn itemType;\n\t}", "public String getItem() {\r\n\t\treturn item;\r\n\t}", "public interface OnItemListClickListener {\n void onItemListSelected(Medicine item);\n }", "public interface ItemDetailView extends TIBaseView{\n}", "public Object getItem(Node itemNode) throws XmlRecipeException;", "public GItem(Item i) {\n this.mGItem = i.getId();\n this.title = i.getTitle();\n\n if (!i.getAddress().equals(\"\")){\n this.address = i.getAddress();\n }\n\n if (i instanceof OfficerItem){\n this.type = 1;\n\n } else if (i instanceof CompanyItem){\n this.type = 0;\n }\n\n }" ]
[ "0.8022842", "0.78389287", "0.73625046", "0.73248595", "0.73165125", "0.73135215", "0.7178897", "0.71539605", "0.71420693", "0.7138587", "0.71044534", "0.7060758", "0.7026852", "0.6936974", "0.6842367", "0.6840763", "0.6833173", "0.6816942", "0.68150586", "0.6792494", "0.67742896", "0.6756073", "0.67523354", "0.6749152", "0.6740358", "0.6714771", "0.67132473", "0.6707255", "0.67065763", "0.66577244", "0.6640247", "0.66372204", "0.6636356", "0.66212064", "0.6618665", "0.6609744", "0.6596466", "0.6596466", "0.65875596", "0.6567262", "0.654393", "0.6536453", "0.6534436", "0.6527308", "0.6515234", "0.65076196", "0.6504456", "0.649903", "0.649903", "0.6496875", "0.6496323", "0.64954895", "0.6461681", "0.645431", "0.64461654", "0.6442368", "0.6441345", "0.64224887", "0.63963085", "0.6393908", "0.6390422", "0.63805866", "0.63805866", "0.63767827", "0.63702494", "0.63700485", "0.63609165", "0.6344476", "0.63418657", "0.6335258", "0.63295424", "0.63286096", "0.6316776", "0.6311144", "0.62988555", "0.62906", "0.62828994", "0.6268334", "0.6265635", "0.62644625", "0.6243242", "0.6238505", "0.6235684", "0.61999536", "0.61964065", "0.6191617", "0.6189305", "0.6188745", "0.6184919", "0.6184548", "0.6184548", "0.6159347", "0.613929", "0.61244404", "0.61066216", "0.6105515", "0.6097018", "0.6095549", "0.6082086", "0.6081781" ]
0.6502091
47
Use the item on the player. If it's gold, it is added to his inventory. Else, it directly modify the player stats.
public Character isUsedBy(Character character);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Item {\n\t/**\n\t * Use the item on the player. If it's gold, it is added to his inventory. Else, it directly modify the player stats.\n\t * @param character - the player ( a monster cannot use an item) who's using an item\n\t * @return the player with his new stats due to the item\n\t */\n\tpublic Character isUsedBy(Character character);\n}", "public void useItem(Item i)\n\t{\n\t\tString name = i.getName();\n\t\tPlayer player = GameController.getPlayer();\n\t\t\n\t\tswitch(name)\n\t\t{\n\t\tcase \"Polar Pop\":\n\t\t\tplayer.addHealth(30);\n\t\t\tTextHandler.displayText(\"Mmm, tastes like root beer. You restored 30 HP.\");\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Klondike Bar\":\n\t\t\tplayer.addHealth(50);\n\t\t\tTextHandler.displayText(\"What would you dooOOOoooo, for a klondike bar? Ha. You restored 50 HP.\");\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Big tiddy goth GF\":\n\t\t\tplayer.setHealth(player.getMaxHealth());\n\t\t\tplayer.setMana(player.getMaxMana());\n\t\t\tplayer.setXp(player.getMaxXp());\n\t\t\tTextHandler.displayText(\"Very scrumptious. You have regained all life and mana, and have even gained a new level\");\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tTextHandler.displayText(\"There is no use for \" + name + \".\");\n\t\t}\n\t}", "public final void give(final Player player) {\n\t\tplayer.getInventory().addItem(this.getItem());\n\t}", "public void usePotion() {\n Potion potion = this.getInventory().getFirstPotion();\n if (potion != null){\n this.setLife(this.getLife() + potion.getGainLife());\n this.getInventory().removeItems(potion);\n }\n }", "public boolean use(Inventory i, Player p);", "public void playerUseItem(Player player, Item item) {\n\t\tif (item instanceof FloatingDevice) {\n\t\t\tplayer.setHasFloatingDevice(!player.getHasFloatingDevice());\n\t\t} else if (item instanceof Teleporter) {\n\t\t\tplayer.getTile().setGameObject(null);\n\t\t\tplayer.setLocation(0);\n\t\t\tTile t;\n\t\t\tif (!(player.getLocation().getTileAtPosition(new Position(5, 5)).getGameObject() instanceof Player)) {\n\t\t\t\tplayer.setTile(player.getLocation().getTileAtPosition(new Position(5, 5)));\n\t\t\t\tplayer.getTile().setGameObject(player);\n\t\t\t} else if (!(player.getLocation().getTileAtPosition(new Position(4, 5))\n\t\t\t\t\t.getGameObject() instanceof Player)) {\n\t\t\t\tplayer.setTile(player.getLocation().getTileAtPosition(new Position(4, 5)));\n\t\t\t\tplayer.getTile().setGameObject(player);\n\t\t\t} else if (!(player.getLocation().getTileAtPosition(new Position(4, 4))\n\t\t\t\t\t.getGameObject() instanceof Player)) {\n\t\t\t\tplayer.setTile(player.getLocation().getTileAtPosition(new Position(4, 4)));\n\t\t\t\tplayer.getTile().setGameObject(player);\n\t\t\t} else if (!(player.getLocation().getTileAtPosition(new Position(5, 4))\n\t\t\t\t\t.getGameObject() instanceof Player)) {\n\t\t\t\tplayer.setTile(player.getLocation().getTileAtPosition(new Position(5, 4)));\n\t\t\t\tplayer.getTile().setGameObject(player);\n\t\t\t}\n\t\t\tplayer.getInventory().remove(item);\n\n\t\t} else if (item instanceof FishingRod) {\n\t\t\tif (player.getLocation().getTileInDirection(player.getTile().getPos(),\n\t\t\t\t\tplayer.getFacing()) instanceof WaterTile) {\n\t\t\t\tif (player.inventoryIsFull()) {\n\t\t\t\t\tserverController.broadcastPlayerMessage(\"You can't fish now, you have no room for the spoils\",\n\t\t\t\t\t\t\tplayer);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tint randy = (int) (Math.random() * 5);\n\t\t\t\tif (randy == 0) {\n\t\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\t\"You caught a fish against all odds, sadly your rod was lost in the process\", player);\n\t\t\t\t\tplayer.getInventory().remove(item);\n\t\t\t\t\tplayer.pickUpItem(new Fish(\"Fish\"));\n\t\t\t\t} else {\n\t\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\t\"A nibble felt, however sometimes we just aren't that lucky\", player);\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\"Harambe is disgusted with you incompetence, you can't fish on land fool!\", player);\n\t\t\t}\n\t\t}\n\t}", "public void use(Consume item)\r\n {\r\n int gain = item.getRating();\r\n health += gain;\r\n \r\n if (health > maxHealth)\r\n health = maxHealth;\r\n \r\n say(\"I gained \" + gain + \" health by using \" + item.getName() + \" and now have \" + health + \"/\" + maxHealth);\r\n \r\n items.remove(item);\r\n }", "@Override\n public void onCrafting(EntityPlayer player, ItemStack item, IInventory craftMatrix) \n {\n if (item.itemID == mod_TFmaterials.RubyPickaxe.itemID)\n {\n \t//player.addStat(mod_TFmaterials.RubyPickAchieve, 1);\n \tplayer.addStat(mod_TFmaterials.RubyPickAchieve, 1);\n }\n }", "private void sellItem(ShopItem item) {\n if (!world.ifHasItem(item.getName())) {\n System.out.println(\"You don't have Item : \" + item.getName());\n return;\n }\n world.removeItem(item.getName());\n int gold = world.getCharacter().getGold().get();\n world.getCharacter().setGold(gold + item.getPrice());\n System.out.println(\"You have sold Item : \" + item.getName());\n }", "public static void giveStuff(GamePlayer player) {\r\n\t\tItemStack sword = new ItemStack(Material.WOOD_SWORD);\r\n\t\tItemStack bow = new ItemStack(Material.BOW);\r\n\t\tItemStack arrow = new ItemStack(Material.ARROW);\r\n\t\tItemStack compass = new ItemStack(Material.COMPASS);\r\n\t\tItemMeta compassMeta = sword.getItemMeta();\r\n\t\tItemMeta swordMeta = sword.getItemMeta();\r\n\t\tItemMeta bowMeta = sword.getItemMeta();\r\n\t\t\r\n\t\tplayer.getPlayer().getInventory().clear();\r\n\t\tswordMeta.spigot().setUnbreakable(true);\r\n\t\tsword.setItemMeta(swordMeta);\r\n\t\tsword.setAmount(1);\r\n\t\t\r\n\t\tbowMeta.spigot().setUnbreakable(true);\r\n\t\tbowMeta.setDisplayName(\"§aSniper§r §7(One Shot Kill)\");\r\n\t\tbow.setItemMeta(bowMeta);\r\n\t\tbow.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 10);\r\n\t\tbow.setAmount(1);\r\n\t\t\r\n\t\tarrow.setAmount(1);\r\n\t\t\r\n\t\tcompassMeta.setDisplayName(\"§aTarget Tracker\");\r\n\t\tcompass.setItemMeta(compassMeta);\r\n\t\tcompass.setAmount(1);\r\n\t\t\r\n player.getPlayer().getInventory().addItem(sword);\r\n player.getPlayer().getInventory().addItem(bow);\r\n player.getPlayer().getInventory().addItem(arrow);\r\n player.getPlayer().getInventory().addItem(compass);\r\n\t}", "abstract void applyItem(JuggernautPlayer player, int level);", "private void buyItem(ShopItem item) {\n int gold = world.getCharacter().getGold().get();\n if (world.isSurvivalMode() && item.getName().equals(\"Potion\")){\n this.potionNum = 0;\n System.out.println(\"This shop has 0 Potion left.\");\n }\n if (world.isBerserkerMode() && \n (item.getName().equals(\"Helmet\")\n || item.getName().equals(\"Shield\")\n || item.getName().equals(\"Armour\"))){\n this.defenseNum = 0;\n System.out.println(\"This shop has 0 defensive item left.\");\n }\n if (item.getPrice() > gold) {\n System.out.println(\"You don't have enough money.\");\n }\n loadItem(item.getName());\n world.getCharacter().setGold(gold - item.getPrice());\n System.out.println(\"You have bought Item : \" + item.getName() + \".\");\n }", "boolean useItem(Command command) {\n HashMap newInventory = inventory.getInventory();\n Iterator iterator = newInventory.entrySet().iterator();\n String seeItem;\n String nameOfItem = \"\";\n String useItem = \"debug\";\n\n while (iterator.hasNext()) {\n HashMap.Entry liste = (HashMap.Entry) iterator.next();\n String itemName = (String) liste.getKey();\n if (itemName.equalsIgnoreCase(command.getSecondWord())) {\n useItem = itemName;\n nameOfItem = itemName;\n break;\n }\n }\n if (!nameOfItem.equals(\"\") && inventory.getUseable(nameOfItem)) {\n\n System.out.println(\"You have dropped: \" + nameOfItem);\n inventory.removeItemInventory(nameOfItem);\n player.setEnergy(player.getEnergy() + 20);\n player.setHealth(player.getHealth() + 5);\n\n return true;\n }\n return false;\n }", "public void use(Player player){\r\n\t\t\tif(this.getEffect()==\"HEAL\"){\r\n\t\t\t\tplayer.heal(this.getValue());\r\n\t\t\t}\r\n\t\t\tif(this.getEffect() == \"BOOK\"){ \r\n\t\t\t\tplayer.increaseSkill(this.getValue(), 1); \r\n\t\t\t}\r\n\t\t\tif(this.getEffect() == \"RESSURECTION\"){\r\n\t\t\t\ttry {TrackLog.writeLog(\"I think I should keep this one, migth save my life some days\");} \r\n\t\t\t\tcatch (IOException e) {e.printStackTrace();}\r\n\t\t\t}\r\n\t\t}", "public void useItem(Human user){\n user.addEnergy(10);\n user.removefromInv(this); \n }", "@Override\n public void onSmelting(EntityPlayer player, ItemStack item) {\n }", "@Override\n\tpublic boolean inventory(Player player, Item item, int opcode) {\n\t\treturn false;\n// Clan channel = ClanRepository.get(player.clan);\n// if (channel == null) {\n// player.send(new SendMessage(\"You need to be in a clan to do this!\"));\n// return true;\n// }\n// player.inventory.remove(item);\n// Item showcaseReward = new Item(Utility.randomElement(ClanUtility.getRewardItems(channel)));\n// channel.showcaseItems.add(showcaseReward.getId());\n// player.send(new SendMessage(\"Inside the box you found \" + showcaseReward.getName() + \"! Showcase size: \" + channel.showcaseItems.size() + \"/28\", SendMessage.MessageColor.DARK_PURPLE));\n// return true;\n\t}", "@Override\n public void onSmelting(EntityPlayer player, ItemStack item) \n {\n \n }", "public void softAddItem(ItemStack item, Player player){\n\t\tHashMap<Integer,ItemStack> excess = player.getInventory().addItem(item);\n\t\tfor( Map.Entry<Integer, ItemStack> me : excess.entrySet() ){\n\t\t\tplayer.getWorld().dropItem(player.getLocation(), me.getValue() );\n\t\t}\n\t}", "@Override\r\n\t@SuppressWarnings(\"deprecation\")\r\n\tpublic void raiseEvent(Event e) {\r\n\t\tPlayer p = ((PlayerInteractEvent) e).getPlayer();\r\n\t\tPlayerStats stats = plugin.getStats(p);\r\n\t\tif (stats.subtractmoney(cost)) {\r\n\t\t\tif (!items.isEmpty()) {\r\n\t\t\t\tLinkedList<ItemStack> givenItems = new LinkedList<ItemStack>();\r\n\t\t\t\tfor (ItemStack item : items.getItemStacks()) {\r\n\t\t\t\t\tgivenItems.add(item);\r\n\t\t\t\t\tHashMap<Integer, ItemStack> failed = p.getInventory().addItem(item);\r\n\r\n\t\t\t\t\tif (failed != null && failed.size() > 0) {\r\n\t\t\t\t\t\t// the inventory may be full\r\n\t\t\t\t\t\tTribu.messagePlayer(p, (plugin.getLocale(\"Message.UnableToGiveYouThatItem\")),ChatColor.RED);\r\n\t\t\t\t\t\tstats.addMoney(cost);\r\n\t\t\t\t\t\tfor (ItemStack i : givenItems)\r\n\t\t\t\t\t\t\tp.getInventory().remove(i);\r\n\t\t\t\t\t\tgivenItems = null;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tp.updateInventory();\r\n\t\t\t\t// Alright\r\n\t\t\t\tTribu.messagePlayer(p,String.format(plugin.getLocale(\"Message.PurchaseSuccessfulMoney\"), String.valueOf(stats.getMoney())),ChatColor.GREEN);\r\n\t\t\t} else {\r\n\t\t\t\tTribu.messagePlayer(p,plugin.getLocale(\"Message.UnknownItem\"),ChatColor.RED);\r\n\t\t\t\tstats.addMoney(cost);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tTribu.messagePlayer(p,plugin.getLocale(\"Message.YouDontHaveEnoughMoney\"),ChatColor.RED);\r\n\t\t}\r\n\r\n\t}", "private void givePlayer(ItemStack item,EntityPlayer entityplayer){\n ItemStack itemstack3 = entityplayer.inventory.getItemStack();\n if(itemstack3 == null){\n \tentityplayer.inventory.setItemStack(item);\n }\n else if(NoppesUtilPlayer.compareItems(itemstack3, item, false, false)){\n\n int k1 = item.stackSize;\n if(k1 > 0 && k1 + itemstack3.stackSize <= itemstack3.getMaxStackSize())\n {\n itemstack3.stackSize += k1;\n }\n }\n }", "private void useItem(Command command) \n { \n if(!command.hasSecondWord()) { \n // if there is no second word, we don't know where to go... \n Logger.Log(\"What are you trying to use?\"); \n return; \n } \n \n String itemUsed = command.getSecondWord();\n String secondUsed = itemUsed + \"2\";\n \n Item thisItem = player.getItem(itemUsed);\n Item secondItem = player.getItem(secondUsed);\n \n Creature thisFriend = player.getCompanion(itemUsed);\n \n //Tries to retrieve which item or creature to use. If not, an error message is returned \n if (thisItem == null&&secondItem == null&&thisFriend == null) {\n Logger.Log(\"You don't have a \" + itemUsed);\n }\n else if (player.inventory.containsKey(itemUsed)) { \n player.removeItem(itemUsed); //The item is removed from inventory\n thisItem.UseItem(this);\n }\n else if (player.inventory.containsKey(secondUsed)) {\n player.removeItem(secondUsed); //The item is removed from inventory\n secondItem.UseItem(this);\n }\n else if (player.friends.containsKey(itemUsed)){ \n thisFriend.UseCompanion(this);\n if (thisFriend.flees){\n player.removeCompanion(itemUsed); //Companions do not get removed from inventory unless the flees boolean has been set to true.\n }\n } \n }", "boolean addSteam(ItemStack me, int amount, EntityPlayer player);", "@Override\n public void applyItem() {\n Player player;\n if (Battle.getRunningBattle().getTurn() % 2 == 1)\n player = Battle.getRunningBattle().getPlayer2();\n else\n player = Battle.getRunningBattle().getPlayer1();\n\n if (player.getInGameCards().size() == 0)\n return;\n Random random = new Random();\n int randomIndex = random.nextInt(player.getInGameCards().size());\n while (!(getPlayer().getInGameCards().get(randomIndex) instanceof Warrior)) {\n randomIndex = random.nextInt(getPlayer().getInGameCards().size());\n }\n\n Buff buff = new PoisonBuff(1, true);\n buff.setWarrior((Warrior) player.getInGameCards().get(randomIndex));\n Battle.getRunningBattle().getPassiveBuffs().add(buff);\n }", "private void useInventoryByAI() {\n\t\tChampion AI = currentTask.getCurrentChamp();\n\t\tArrayList<Collectible> inventory = ((Wizard)AI).getInventory();\n\t\tif(inventory.size()>0){\n\t\t\tint randomPotion = (int)(Math.random()*inventory.size());\n\t\t\tcurrentTask.usePotion((Potion)inventory.get(randomPotion));\n\t\t}\n\n\t\t\n\t}", "public void pickUp(Item item) {\n this.curItem = item;\n this.curItem.setNonDamagablePlayer(this);\n if (item instanceof PickupableWeaponHolder) {\n this.weapon = ((PickupableWeaponHolder)(item)).getWeapon();\n }\n }", "public boolean updatePlayerItem(PlayerItem playerItem);", "@EventHandler(ignoreCancelled = true)\n\tpublic void onItemHeldChange(PlayerItemHeldEvent event)\n\t{\n\t\tPlayer player = event.getPlayer();\n\t\t\n\t\t//if he's switching to the golden shovel\n\t\tint newSlot = event.getNewSlot();\n\t\tItemStack newItemStack = player.getInventory().getItem(newSlot);\n\t\tif(newItemStack != null && newItemStack.getType() == instance.config_claims_modificationTool)\n\t\t{\n\t\t\t//give the player his available claim blocks count and claiming instructions, but only if he keeps the shovel equipped for a minimum time, to avoid mouse wheel spam\n\t\t\tif(instance.claimsEnabledForWorld(player.getWorld()))\n\t\t\t{\n\t\t\t\tEquipShovelProcessingTask task = new EquipShovelProcessingTask(player);\n\t\t\t\tinstance.getServer().getScheduler().scheduleSyncDelayedTask(instance, task, 15L); //15L is approx. 3/4 of a second\n\t\t\t}\n\t\t}\n\t}", "static void weapon(char item)\r\n {\r\n \tString pClass = MainApp.playerClass;\r\n \tif(MainApp.alreadyEquipped == false)\r\n\t\t{\r\n\t\t\tif(pClass == \"Warrior\")\r\n\t\t\t{\r\n\t \t\tif(item == '0')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Warrior Equipped!\");\r\n\t \t\t}\r\n\t \t\t//System.out.print(\"Post Equip Warrior\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Archer\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '&')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Archer Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Archer\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Rogue\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '!')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Rogue Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Rogue\");\r\n\t\t\t}\r\n\t }\r\n }", "@Override\r\n public void use(AbstractPlayer p, AbstractMonster m) {\r\n // Gain Block\r\n AbstractDungeon.actionManager.addToBottom(new GainBlockAction(p, p, block));\r\n\r\n // Food eaten += 3\r\n this.addToBot(new ApplyPowerAction(p, p, new FoodEatenPower(p, p, baseMagicNumber)));\r\n }", "public void useItem(int num) {\r\n\t\tif (num < currentPlayer.getConsumables().size()) {\r\n\t\t\tString item = currentPlayer.getConsumables().get(num);\r\n\t\t\t// Find corresponding name\r\n\t\t\tif (item.contentEquals(\"LargeHealing\")) {\r\n\t\t\t\taddEvent(\"``\"+currentName+\"`` used a **Large Health Potion** :gift_heart:\",true);\r\n\t\t\t\tupdateHealth(currentPlayer,2);\r\n\t\t\t\tcurrentPlayer.getConsumables().remove(num);\r\n\t\t\t\tupdateBoardNoImageChange();\r\n\t\t\t} else if (item.contentEquals(\"SmallHealing\")) {\r\n\t\t\t\taddEvent(\"``\"+currentName+\"`` used a **Small Health Potion** :heartpulse:\",true);\r\n\t\t\t\tupdateHealth(currentPlayer,1);\r\n\t\t\t\tcurrentPlayer.getConsumables().remove(num);\r\n\t\t\t\tupdateBoardNoImageChange();\r\n\t\t\t} else if (item.contentEquals(\"Swift\")) {\r\n\t\t\t\taddEvent(\"``\"+currentName+\"`` used a **Potion of Swiftness** :ice_skate:\",true);\r\n\t\t\t\tcurrentPlayer.updateBoots(1);\r\n\t\t\t\tcurrentPlayer.getConsumables().remove(num);\r\n\t\t\t} else if (item.contentEquals(\"Strength\")) {\r\n\t\t\t\taddEvent(\"``\"+currentName+\"`` used a **Potion of Strength** :muscle:\",true);\r\n\t\t\t\tcurrentPlayer.updateSwords(2);\r\n\t\t\t\tcurrentPlayer.getConsumables().remove(num);\r\n\t\t\t}\r\n\t\t}\r\n\t\tupdateInfo(currentPlayer, false);\r\n\t\tupdatePlayArea(currentPlayer, false);\r\n\t}", "@Override\n\tpublic void onDamage(WorldObj obj, Items item) {\n\n\t\tif(is_stunned) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint dmg = (int) item.type.ATK;\n\t\t\n\t\tOnScreenText.AddText(\"\"+dmg, bounds.x , bounds.y + 1.1f);\n\t\t\n\t\tvelX = obj.direction * 5;\n\t\tvelY = 5;\n\t\tgrounded = false;\n\t\t\n\t\tHP -= dmg;\n\t\t\n\n\t\tstun_counter = 0;\n\t\t\n\t\tif(HP <= 0 && !isDead) {\n\t\t\tonDeath();\n\t\t}\n\t\t\n\t}", "public void addItemInventory(Item item){\n playerItem.add(item);\n System.out.println(item.getDescription() + \" was taken \");\n System.out.println(item.getDescription() + \" was removed from the room\"); // add extra information to inform user that the item has been taken\n }", "public void addItemInventory(Item item){\r\n playerItem.add(item);\r\n System.out.println(item.getDescription() + \" was taken \");\r\n }", "public void eatItem(Command command) {\n if (!command.hasSecondWord()) { // check if there's a second word\n System.out.println(\"Eat what?\");\n return;\n }\n String itemToBeEaten = command.getSecondWord();\n List<Item> playerInventory = player.getPlayerInventory(); // load the inventory of the player\n\n boolean somethingToUse = false;\n int notThisItem = 0;\n int loop;\n\n for (loop = 0; loop < playerInventory.size(); loop++) { // loop through the player inventory\n Item currentItem = playerInventory.get(loop); // set currentitem on the item that is currently in the loop\n if (itemToBeEaten.equals(currentItem.getItemName()) ){ // get the item name, then check if that matches the secondWord\n if (currentItem.getItemCategory().equals(\"food\")){ // check if the item used is an item in the \"food\" category\n if((player.getHealth())<(20)) { // check if the player's health is full\n player.addHealth(currentItem.getHealAmount()); // heal the player\n player.removeItemFromInventory(currentItem); // remove item from inventory\n System.out.println(\"You eat the \" + itemToBeEaten + \". It heals for \" + currentItem.getHealAmount()+\".\");\n } else { // the player's health is full\n System.out.println(\"Your are at full health!\");\n }\n } else { // item is not a food item\n System.out.println(\"You can't eat that item!\");\n }\n } else { // the item did not match the player provided name\n notThisItem++;\n }\n somethingToUse = true;\n }\n\n //errors afvangen\n if (!somethingToUse) { // the item is not found in the player inventory\n System.out.println(\"You can't eat that!\");\n }\n\n if (loop == notThisItem) { // the player has nothing to burn secondWord with\n //ThisItem is the same amount as loop. Then the player put something in that is not in the room\n System.out.println(\"You cannot eat \" + itemToBeEaten + \" because you don't have it in your inventory!\");\n }\n }", "@SuppressWarnings(\"deprecation\")\r\n\t@Override\r\n public EnumActionResult onItemUse(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)\r\n {\r\n \tItemStack stack = playerIn.getHeldItem(hand);\r\n \tif (side == EnumFacing.DOWN && side == EnumFacing.UP)\r\n {\r\n return EnumActionResult.PASS;\r\n }\r\n else if (!playerIn.canPlayerEdit(pos.offset(side), side, stack))\r\n {\r\n return EnumActionResult.PASS;\r\n }\r\n \tIBlockState iblockstate = worldIn.getBlockState(pos);\r\n Block block = iblockstate.getBlock();\r\n if (block == ModBlocks.crystalLog)\r\n {\r\n \tCrystalColors.Basic wood = iblockstate.getValue(CrystalColors.COLOR_BASIC);\r\n \tif(wood == CrystalColors.Basic.BLUE && TYPE !=PlantType.BLUE)return EnumActionResult.PASS;\r\n \tif(wood == CrystalColors.Basic.RED && TYPE !=PlantType.RED)return EnumActionResult.PASS;\r\n \tif(wood == CrystalColors.Basic.GREEN && TYPE !=PlantType.GREEN)return EnumActionResult.PASS;\r\n \tif(wood == CrystalColors.Basic.DARK && TYPE !=PlantType.DARK)return EnumActionResult.PASS;\r\n pos = pos.offset(side);\r\n\r\n if (worldIn.isAirBlock(pos))\r\n {\r\n IBlockState iblockstate1 = getPlant().getBlock().getStateForPlacement(worldIn, pos, side, hitX, hitY, hitZ, 0, playerIn);\r\n worldIn.setBlockState(pos, iblockstate1, 10);\r\n SoundType soundtype = worldIn.getBlockState(pos).getBlock().getSoundType(worldIn.getBlockState(pos), worldIn, pos, playerIn);\r\n worldIn.playSound(playerIn, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F);\r\n \r\n if (!playerIn.capabilities.isCreativeMode)\r\n {\r\n \tItemStackTools.incStackSize(stack, -1);\r\n }\r\n }\r\n\r\n return EnumActionResult.SUCCESS;\r\n }\r\n return EnumActionResult.PASS;\r\n }", "public static void handleBoostPotionShare(Player player, Item item) {\n\t\t\n\t}", "public void getAttackedByDarknessMagicBook(IEquipableItem item){item.strongAttackTo(this.getOwner());}", "@Override\n\tpublic boolean onItemUse(ItemStack is, EntityPlayer player, World w, int x, int y, int z, int l, float f, float f1, float f3){\n\t\tif(w.getBlock(x, y, z) == Blocks.planks){\n\t\t\tw.setBlockMetadataWithNotify(x, y, z, w.getBlockMetadata(x, y, z)+1, 0);\n\t\t\tis.damageItem(50, player);\n\t\t}else if(w.getBlock(x, y, z) == Blocks.leaves){\n\t\t\tw.setBlockMetadataWithNotify(x, y, z, w.getBlockMetadata(x, y, z)+1, 0);\n\t\t\tis.damageItem(50, player);\n\t\t}else if(w.getBlock(x, y, z) == Blocks.log){\n\t\t\tw.setBlockMetadataWithNotify(x, y, z, w.getBlockMetadata(x, y, z)+1, 0);\n\t\t\tis.damageItem(50, player);\n\t\t}else if(w.getBlock(x, y, z) == Blocks.sapling){\n\t\t\tw.setBlockMetadataWithNotify(x, y, z, w.getBlockMetadata(x, y, z)+1, 0);\n\t\t\tis.damageItem(50, player);\n\t\t}else if(w.getBlock(x, y, z) == Blocks.leaves2){\n\t\t\tw.setBlockMetadataWithNotify(x, y, z, w.getBlockMetadata(x, y, z)+1, 0);\n\t\t\tis.damageItem(50, player);\n\t\t}else if(w.getBlock(x, y, z) == Blocks.log2){\n\t\t\tw.setBlockMetadataWithNotify(x, y, z, w.getBlockMetadata(x, y, z)+1, 0);\n\t\t\tis.damageItem(50, player);\n\t\t}\n\t\treturn false;\n\t}", "private void doItemVerification() {\n\t\tif (actor != null && !actor.attributes.getInventory().contains(Items.FISHING_ROD)) {\r\n\t\t\tactor.say(\"fishing.norod\", getAssigningPlayer());\r\n\t\t\treset();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tactor.setHeldItem(actor.attributes.getInventory()\r\n\t\t\t\t.getStackInSlot(actor.attributes.getInventory().getFirstSlotContainingItem(Items.FISHING_ROD))\r\n\t\t\t\t.getItem());\r\n\t}", "public final void give(final Player player, final int slot) {\n\t\tplayer.getInventory().setItem(slot, this.getItem());\n\t}", "private void itemIntersectsPlayer(Entity item){\n WeaponComponent weaponComponent = player.weaponComponent;\n HealthComponent healthComponent = (HealthComponent) player.getComponent(ComponentType.HEALTH);\n\n EntityType type = item.getEntityType();\n\n\n switch (type){\n\n case ASSAULT_RIFLE:\n AssaultRifle rifle = (AssaultRifle) item;\n rifle.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(rifle);\n break;\n\n case SHOTGUN:\n Shotgun shotgun = (Shotgun) item;\n shotgun.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(shotgun);\n break;\n\n case SWORD:\n Sword sword = (Sword) item;\n sword.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(sword);\n break;\n\n\n case SHIELD:\n Shield shield = (Shield) item;\n shield.setInInventory(true);\n healthComponent.setHasShield(true);\n room.getEntityManager().removeEntity(shield);\n break;\n\n case SPEEDBOOST:\n SpeedBoost speedBoost = (SpeedBoost) item;\n speedBoost.setInInventory(true);\n player.startBoost(10000);\n room.getEntityManager().removeEntity(speedBoost);\n break;\n\n case HEART:\n Heart heart = (Heart) item;\n heart.setInInventory(true);\n healthComponent.incrementCurrentHealth();\n //do player logic here\n room.getEntityManager().removeEntity(heart);\n break;\n\n\n }\n\n\n }", "public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune) {\n/* 78 */ if (!worldIn.isRemote && worldIn.getGameRules().getGameRuleBooleanValue(\"doTileDrops\")) {\n/* */ \n/* 80 */ EntitySilverfish var6 = new EntitySilverfish(worldIn);\n/* 81 */ var6.setLocationAndAngles(pos.getX() + 0.5D, pos.getY(), pos.getZ() + 0.5D, 0.0F, 0.0F);\n/* 82 */ worldIn.spawnEntityInWorld((Entity)var6);\n/* 83 */ var6.spawnExplosionParticle();\n/* */ } \n/* */ }", "private void useItem(String itemToUse) {\n if (itemToUse.equalsIgnoreCase(\"\") || itemToUse.equalsIgnoreCase(\"use\")) {\n System.out.println(\"Use what?\");\n return;\n }\n\n // Get a reference to the item\n Item item = player.getItemFromInventory(itemToUse);\n\n // If the reference is not null (i.e., the Item exists)\n if (item != null) {\n // Display a message\n System.out.println(\"You use the \" + item.getName());\n\n // Check if using the item will destroy a creature\n if (currentRoom.getCreature() != null && currentRoom.getCreature().getItemToDestroy() != null && currentRoom.getCreature().getItemToDestroy() == item) {\n // Display the text for defeating the creature. \n System.out.println(currentRoom.getCreature().getDefeatedText());\n currentRoom.setCreature(null);\n\n // Remove the item from the Player's inventory.\n player.removeItemFromInventory(item);\n }\n } // The player does not have the specified item\n else {\n System.out.println(\"There is no \" + itemToUse + \" in your inventory.\");\n }\n }", "@Override\n public void use(AbstractPlayer p, AbstractMonster m) {\n addToBot(new GainBlockAction(p,block));\n if (AbstractDungeon.player.hand.contains(this)){\n if (AbstractDungeon.player.hand.group.indexOf(this)-1 >= 0){\n addToBot(new RewindAction(AbstractDungeon.player.hand.group.get(AbstractDungeon.player.hand.group.indexOf(this)-1),AbstractDungeon.player.hand));\n }\n if (AbstractDungeon.player.hand.group.indexOf(this)+1 <= AbstractDungeon.player.hand.group.size()-1){\n addToBot(new RewindAction(AbstractDungeon.player.hand.group.get(AbstractDungeon.player.hand.group.indexOf(this)+1),AbstractDungeon.player.hand));\n }\n }\n }", "public void doItemEffect(RobotPeer robot){\n\t\t//System.out.println(\"Energy = \" + robot.getEnergy());\n\t\trobot.updateEnergy(-15);\n\t\t//System.out.println(\"Poison item USED\");\n\t\t//System.out.println(\"Energy = \" + robot.getEnergy());\n\t\t\n\t}", "@Override\n public boolean use(Player p) {\n // Increase energy cap.\n p.setEnergyCap(p.getEnergyCap() + ENERGY_CAP_INCREASE);\n \n if (p.getEnergyCap() > ENERGY_RESTORE + p.getEnergy()) {\n // Replenish energy.\n p.setEnergy(ENERGY_RESTORE + p.getEnergy());\n\n // Otherwise set energy to max of capacity.\n } else {\n p.setEnergy(p.getEnergyCap());\n }\n return true;\n }", "public void useItem(L2PlayableInstance playable, L2ItemInstance item)\r\n\t{\r\n\t\tif (!(playable instanceof L2PcInstance))\r\n\t\t\treturn;\r\n\r\n\t\tL2PcInstance activeChar = (L2PcInstance) playable;\r\n\t\tL2Object target = activeChar.getTarget();\r\n\t\tif (!(target instanceof L2MonsterInstance))\r\n\t\t{\r\n\t\t\t// Send a System Message to the caster\r\n\t\t\tSystemMessage sm = new SystemMessage(SystemMessageId.INCORRECT_TARGET);\r\n\t\t\tactiveChar.sendPacket(sm);\r\n\r\n\t\t\t// Send a Server->Client packet ActionFailed to the L2PcInstance \r\n\t\t\tactiveChar.sendPacket(ActionFailed.STATIC_PACKET);\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// u can use soul crystal only when target hp goes below <50%\r\n\t\tif (((L2MonsterInstance) target).getStatus().getCurrentHp() > ((L2MonsterInstance) target).getMaxHp() / 2.0)\r\n\t\t{\r\n\t\t\tactiveChar.sendPacket(ActionFailed.STATIC_PACKET);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tint crystalId = item.getItemId();\r\n\r\n\t\t// Soul Crystal Casting section\r\n\t\tL2Skill skill = SkillTable.getInstance().getInfo(2096, 1);\r\n\t\tactiveChar.useMagic(skill, false, true);\r\n\t\t// End Soul Crystal Casting section\r\n\r\n\t\t// Continue execution later\r\n\t\tCrystalFinalizer cf = new CrystalFinalizer(activeChar, target, crystalId);\r\n\t\tThreadPoolManager.getInstance().scheduleEffect(cf, skill.getHitTime());\r\n\r\n\t}", "public boolean addPlayerItem(PlayerItem playerItem);", "public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }", "@Override\n\tpublic void use(Hero player) {\n\t\t\n\t}", "@Override\n public void use(AbstractPlayer p, AbstractMonster m) {\n //give player plated armor\n AbstractDungeon.actionManager.addToBottom( // 2.Gain plated armor\n new com.megacrit.cardcrawl.actions.common.ApplyPowerAction(AbstractDungeon.player, AbstractDungeon.player,\n new com.megacrit.cardcrawl.powers.PlatedArmorPower(AbstractDungeon.player, 3), 3));\n }", "@Override\n\tpublic int use() {\n\t\treturn Game.getInstance().getPlayer().equip(this);\n\t}", "public void heal(ItemPotion itemPotion) {\n\t\tint old_life = life;\n\t\tlife += itemPotion.getValue(); //On récupère une valeur temporaire\n\t\tif(life<MIN_LIFE) life = MIN_LIFE;\n\t\tif(life>MAX_LIFE) life = MAX_LIFE;\n\t\t\n\t\tif(life<old_life) {\n\t\t\tDisplay.sendMessage(\"Vous avez perdu \" + (old_life-life) + \" point\"+(old_life-life>1?\"s\":\"\")+\" de vie\");\n\t\t}\n\t\telse {\n\t\t\tDisplay.sendMessage(\"Vous avez regagné \" + (life-old_life) + \" point\"+(life-old_life>1?\"s\":\"\")+\" de vie\");\n\t\t}\n\t}", "public void useItem(Item item) {\n\t\twillRun = pokemonRun();\n\t\t\n\t\tif (item.getClass() == items.SafariBall.class){\n\t\t\tcalcCatchProbability();\n\t\t\tisEating = false;\n\t\t\tisAngry = false;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!isEating && !isAngry) {\n\t\t\tif (item.getClass() == items.Rock.class){\n\t\t\t\tisAngry = true;\n\t\t\t}\n\t\t\telse if (item.getClass() == items.Bait.class){\n\t\t\t\tisEating = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (isEating && !isAngry){\n\t\t\tif (item.getClass() == items.Rock.class){\n\t\t\t\tisEating = false;\n\t\t\t\tisAngry = true;\n\t\t\t}\n\t\t\telse if (item.getClass() == items.Bait.class){\n\t\t\t\tisEating = true;\n\t\t\t\tisAngry = false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tisEating = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!isEating && isAngry){\n\t\t\tif (item.getClass() == items.Bait.class){\n\t\t\t\tisEating = true;\n\t\t\t\tisAngry = false;\n\t\t\t}\n\t\t\telse if (item.getClass() == items.Rock.class){\n\t\t\t\tisEating = false;\n\t\t\t\tisAngry = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tisAngry = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tsetCatchRate(item.getCatchModifier());\n\t\tsetHP(item.hpModifier());\n\t\tcalcCatchProbability();\n\t}", "public void examine (Player player) {\n\t\tString desc = getType().getDescription()+\" (id=\"+id+\", amount=\"+amount+\")\";\n\t\tplayer.getDispatcher().sendGameMessage(desc);\n\t\tint value = Virtue.getInstance().getExchange().lookupPrice(id);\n\t\tif (value != -1) {\n\t\t\tplayer.getDispatcher().sendGameMessage(\"This item is worth: \"+StringUtility.formatNumber(value)\n\t\t\t\t\t+\"gp on the Grand Exchange.\");\n\t\t}\n\t}", "@Override\n\tpublic int buy(Weapon item) {\n\t\treturn 0;\n\t}", "public boolean processInteract(EntityPlayer entityplayer, EnumHand hand, @Nullable ItemStack stack)\n {\n ItemStack itemstack = entityplayer.inventory.getCurrentItem();\n\n if (!bumgave && angerLevel == 0)\n {\n if (itemstack != null && (itemstack.getItem() == Items.DIAMOND || itemstack.getItem() == Items.GOLD_INGOT || itemstack.getItem() == Items.IRON_INGOT))\n {\n if (itemstack.getItem() == Items.IRON_INGOT)\n {\n value = rand.nextInt(2) + 1;\n }\n else if (itemstack.getItem() == Items.GOLD_INGOT)\n {\n value = rand.nextInt(5) + 1;\n }\n else if (itemstack.getItem() == Items.DIAMOND)\n {\n value = rand.nextInt(10) + 1;\n }\n\n if (itemstack.stackSize - 1 == 0)\n {\n entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, null);\n }\n else\n {\n itemstack.stackSize--;\n }\n\n for (int i = 0; i < 4; i++)\n {\n for (int i1 = 0; i1 < 10; i1++)\n {\n double d1 = rand.nextGaussian() * 0.02D;\n double d3 = rand.nextGaussian() * 0.02D;\n double d6 = rand.nextGaussian() * 0.02D;\n worldObj.spawnParticle(EnumParticleTypes.EXPLOSION_NORMAL, (posX + (double)(rand.nextFloat() * width * 2.0F)) - (double)width, posY + (double)(rand.nextFloat() * height) + (double)i, (posZ + (double)(rand.nextFloat() * width * 2.0F)) - (double)width, d1, d3, d6);\n }\n }\n\n texture = new ResourceLocation(Reference.MODID, Reference.TEXTURE_PATH_ENTITES +\n \t\tReference.TEXTURE_BUM_DRESSED);\n angerLevel = 0;\n //findPlayerToAttack();\n\n if (rand.nextInt(5) == 0)\n {\n // worldObj.playSoundAtEntity(this, \"morecreeps:bumsucker\", 1.0F, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);\n worldObj.playSound((EntityPlayer) null, getPosition(), MCSoundEvents.ENTITY_BUM_SUCKER, SoundCategory.NEUTRAL, 1.0F, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);\n bumgave = true;\n }\n else\n {\n // worldObj.playSoundAtEntity(this, \"morecreeps:bumthankyou\", 1.0F, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);\n worldObj.playSound((EntityPlayer) null, getPosition(), MCSoundEvents.ENTITY_BUM_THANKYOU, SoundCategory.NEUTRAL, 1.0F, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);\n bumgave = true;\n\n for (int j = 0; j < 10; j++)\n {\n double d = rand.nextGaussian() * 0.02D;\n double d2 = rand.nextGaussian() * 0.02D;\n double d5 = rand.nextGaussian() * 0.02D;\n worldObj.spawnParticle(EnumParticleTypes.EXPLOSION_NORMAL, (posX + (double)(rand.nextFloat() * width * 2.0F)) - (double)width, posY + (double)(rand.nextFloat() * height), (posZ + (double)(rand.nextFloat() * width * 2.0F)) - (double)width, d, d2, d5);\n }\n\n for (int k = 0; k < value; k++)\n {\n \tif(!worldObj.isRemote) {\n\t dropItem(Item.getItemById(rand.nextInt(95)), 1);\n\t dropItem(Items.IRON_SHOVEL, 1);\n \t}\n }\n\n return true;\n }\n }\n else if (itemstack != null)\n {\n if (timetopee > 0)\n {\n // worldObj.playSoundAtEntity(this, \"morecreeps:bumdontwant\", 1.0F, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);\n worldObj.playSound((EntityPlayer) null, getPosition(), MCSoundEvents.ENTITY_BUM_DONTWANT, SoundCategory.NEUTRAL, 1.0F, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);\n \n }\n else if (itemstack != null && (itemstack.getItem() == Item.getItemFromBlock(Blocks.YELLOW_FLOWER) || itemstack.getItem() == Item.getItemFromBlock(Blocks.RED_FLOWER)))\n {\n \t/* TODO\n \tif(!((EntityPlayerMP)entityplayer).getStatFile().hasAchievementUnlocked(MoreCreepsAndWeirdos.achievebumflower))\n \t{\n \tworldObj.playSoundAtEntity(entityplayer, \"morecreeps:achievement\", 1.0F, 1.0F);\n \tentityplayer.addStat(MoreCreepsAndWeirdos.achievebumflower, 1);\n \tconfetti(entityplayer);\n \t} */\n\n // worldObj.playSoundAtEntity(this, \"morecreeps:bumthanks\", 1.0F, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);\n worldObj.playSound((EntityPlayer) null, getPosition(), MCSoundEvents.ENTITY_BUM_THANKS, SoundCategory.NEUTRAL, 1.0F, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);\n timetopee = rand.nextInt(1900) + 1500;\n\n if (itemstack.stackSize - 1 == 0)\n {\n entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, null);\n }\n else\n {\n itemstack.stackSize--;\n }\n }\n else if (itemstack != null && itemstack.getItem() == Items.BUCKET)\n {\n \t/* TODO\n if (!((EntityPlayerMP)entityplayer).getStatFile().hasAchievementUnlocked(MoreCreepsAndWeirdos.achievebumpot) && ((EntityPlayerMP)entityplayer).getStatFile().hasAchievementUnlocked(MoreCreepsAndWeirdos.achievebumflower))\n {\n worldObj.playSoundAtEntity(entityplayer, \"morecreeps:achievement\", 1.0F, 1.0F);\n entityplayer.addStat(MoreCreepsAndWeirdos.achievebumpot, 1);\n confetti(entityplayer);\n } \n entityplayer.addStat(MoreCreepsAndWeirdos.achievebumpot, 1);\n */\n // worldObj.playSoundAtEntity(this, \"morecreeps:bumthanks\", 1.0F, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);\n worldObj.playSound((EntityPlayer) null, getPosition(), MCSoundEvents.ENTITY_BUM_THANKS, SoundCategory.NEUTRAL, 1.0F, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);\n timetopee = rand.nextInt(1900) + 1500;\n\n if (itemstack.stackSize - 1 == 0)\n {\n entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, null);\n }\n else\n {\n itemstack.stackSize--;\n }\n }\n else if (itemstack != null && itemstack.getItem() == Items.LAVA_BUCKET)\n {\n \t/* \n if (!((EntityPlayerMP)entityplayer).getStatFile().hasAchievementUnlocked(MoreCreepsAndWeirdos.achievebumlava) && ((EntityPlayerMP)entityplayer).getStatFile().hasAchievementUnlocked(MoreCreepsAndWeirdos.achievebumpot))\n {\n worldObj.playSoundAtEntity(entityplayer, \"morecreeps:achievement\", 1.0F, 1.0F);\n entityplayer.addStat(MoreCreepsAndWeirdos.achievebumlava, 1);\n confetti(entityplayer);\n }\n\n entityplayer.addStat(MoreCreepsAndWeirdos.achievebumpot, 1);\n */\n // worldObj.playSoundAtEntity(this, \"morecreeps:bumthanks\", 1.0F, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);\n worldObj.playSound((EntityPlayer) null, getPosition(), MCSoundEvents.ENTITY_BUM_THANKS, SoundCategory.NEUTRAL, 1.0F, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);\n timetopee = rand.nextInt(1900) + 1500;\n\n if (itemstack.stackSize - 1 == 0)\n {\n entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, null);\n }\n else\n {\n itemstack.stackSize--;\n }\n\n int l = (int)posX;\n int j1 = (int)posY;\n int k1 = (int)posZ;\n\n if (rand.nextInt(4) == 0)\n {\n for (int l1 = 0; l1 < rand.nextInt(3) + 1; l1++)\n {\n Blocks.OBSIDIAN.dropBlockAsItem(worldObj, new BlockPos(l, j1, k1), worldObj.getBlockState(new BlockPos(l, j1, k1)), 0);\n }\n }\n\n for (int i2 = 0; i2 < 15; i2++)\n {\n double d4 = (float)l + worldObj.rand.nextFloat();\n double d7 = (float)j1 + worldObj.rand.nextFloat();\n double d8 = (float)k1 + worldObj.rand.nextFloat();\n double d9 = d4 - posX;\n double d10 = d7 - posY;\n double d11 = d8 - posZ;\n double d12 = MathHelper.sqrt_double(d9 * d9 + d10 * d10 + d11 * d11);\n d9 /= d12;\n d10 /= d12;\n d11 /= d12;\n double d13 = 0.5D / (d12 / 10D + 0.10000000000000001D);\n d13 *= worldObj.rand.nextFloat() * worldObj.rand.nextFloat() + 0.3F;\n d9 *= d13;\n d10 *= d13;\n d11 *= d13;\n worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (d4 + posX * 1.0D) / 2D, (d7 + posY * 1.0D) / 2D + 2D, (d8 + posZ * 1.0D) / 2D, d9, d10, d11);\n worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d4, d7, d8, d9, d10, d11);\n }\n\n if (rand.nextInt(4) == 0)\n {\n entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, new ItemStack(Items.BUCKET));\n }\n }\n else if (!bumgave)\n {\n // worldObj.playSoundAtEntity(this, \"morecreeps:bumpee\", 1.0F, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);\n worldObj.playSound((EntityPlayer) null, getPosition(), MCSoundEvents.ENTITY_BUM_PEE, SoundCategory.NEUTRAL, 1.0F, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);\n }\n }\n }\n else\n {\n // worldObj.playSoundAtEntity(this, \"morecreeps:bumleavemealone\", 1.0F, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);\n worldObj.playSound((EntityPlayer) null, getPosition(), MCSoundEvents.ENTITY_BUM_LEAVEMEALONE, SoundCategory.NEUTRAL, 1.0F, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);\n }\n\n return super.processInteract(entityplayer, hand, stack);\n }", "private void spawnSomeGold() {\n if (goldSpawned.size() >= goldSpawnPoints.size()) {\n return;\n }\n Location loc = goldSpawnPoints.get(random.nextInt(goldSpawnPoints.size()));\n Item item = loc.getWorld().dropItem(loc, new ItemStack(Material.GOLD_INGOT, 1));\n goldSpawned.add(item);\n }", "public Item giveItem(String itemName, Player character) {\n Item item = items.remove(itemName);\n if(item != null) {\n character.items.put(item.getName(), item);\n }\n return item;\n }", "@Override\r\n\tpublic void use(Creature creature, Bag bag) {\n\t\tif(!bag.containsItem(this)) {\r\n\t\t\tSystem.out.println(\"Not found in bag\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tcreature.increaseStamina(staminaIncrement);\r\n\t\tremoveFromBag(bag);\r\n\t}", "private void triggerDropPotion(double percentage) {\n if (isDropped(percentage)) {\n loadItem(\"Potion\");\n }\n }", "public void attack(Player player) {\n this.damage = 18 - player.getfPoint(); // the higher the Fighter skill,\n // the lower the damage. change the math.\n int newHealth = player.getShip().getHealth() - damage;\n player.getShip().setHealth(newHealth);\n }", "public void pickUp(String itemName, World world) {\n\t\tItem item = world.dbItems().get(itemName);\n\t\tRoom room = super.getRoom();\n\t\tList<Item> roomItems = room.getItems();\n\n\t\tif (roomItems.contains(item)) {\n\t\t\tif (checkCapacity(item)) {\n\t\t\t\tsuper.addItem(item);\n\t\t\t\troom.removeItem(item);\n\t\t\t\tSystem.out.println(\"Picked up \" + item);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Not enough capacity.\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"No item '\" + itemName + \"' in the room.\");\n\t\t}\n\t}", "@Override\n public void setEquippedItem(IEquipableItem item) {}", "public void attackPlayerByPlayer(Player attacker, Player player, ItemStack it) {\r\n\t\tif(it==null) return;\r\n\t\t\r\n\t\tAttributeStorage storage = AttributeStorage.newTarget(it, SpellItems.itemUUID);\r\n\t\tif(!storage.getData(\"\").startsWith(\"si_customenchant_\")) return;\r\n\t\tString enchants = storage.getData(\"\").replace(\"si_customenchant_\", \"\");\r\n\t\t\r\n\t\tfor(String st : enchants.split(\"|\")) {\r\n\t\t\tString[] info = st.split(\":\");\r\n\t\t\tCustomEnchant ce = getEnchantmentByName(info[0]);\r\n\t\t\tif(ce!=null) {\r\n\t\t\t\tcastOn(attacker, player, ce);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_) {}", "void DoMining(float x, float y) {\n\t\tWorld world = World.CurrentWorld;\n\t\t\n\t\tMapRenderer.CurrentRenderer.ItemAnimation = null;\n\t\t\tmineTime = 0;\n\t\t\tlastDamaged.set(x,y);\n\t\t\n\t\t\tInvObject item = null;\n\t\t\tif(inventory.BagItem[inventory.currSelected][1] > 0)\n\t\t\t\titem = inventory.Items[inventory.BagItem[inventory.currSelected][0]];\n\t\t\tint delay = 100;\n\t\t\tif(item != null)\n\t\t\t\tdelay = item.Delay;\n\t\t\n//\t\t\tif(TimeUtils.millis() - LastUsed > delay)\n//\t\t\t{\n\t\t\t\tif(inventory.BagItem[inventory.currSelected][1] > 0)\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tprog2.x = pos.x+0.5f;\n\t\t\t\t\tprog2.y = pos.y+0.5f;\n\t\t\t\t\tMapRenderer.CurrentCam.project(prog2);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tRay projectCoordinates = MapRenderer.CurrentCam.getPickRay(Gdx.input.getX(0), Gdx.input.getY(0));\n\t\t\t\t\tfloat x2 = (projectCoordinates.origin.x);\n\t\t\t\t\tfloat y2 = (projectCoordinates.origin.y);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tfloat angle = (float) Math.toDegrees(MathUtils.atan2(y-prog2.y, x-prog2.x));\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(World.CurrentWorld.isClient) {\n\n\t\t\t\t\t\tWorld.CurrentWorld.client.serverBob.remoteOnUse((int)x2,(int)y2,angle);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(World.CurrentWorld.server != null) {\n\t\t\t\t\t\tonServerUse(item,x2,y2,angle);\n\t\t\t\t\t}\n\t\t\t\t\tif(item.HoldTouch) {\n\t\t\t\t\titem.OnUse(this,x2, y2,angle);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(Gdx.input.justTouched())\n\t\t\t\t\t\t\titem.OnUse(this,x2, y2,angle);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n//\t\t\t\tLastUsed = TimeUtils.millis();\n//\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t}", "public void carry(Item item)\n {\n\n // Check if item to be added doesn't go over carry limit.\n if (!((getPerson(PLAYER).getWeight() + item.getWeight()) > getPerson(PLAYER).getCarryLimit())){\n getPerson(PLAYER).getInventory().getItems().add(item); \n\n removeRoomItem(item);\n System.out.println();\n System.out.println(item.getName() + \" has been added to your bag.\");\n System.out.println(\"You are carrying \" + getPerson(PLAYER).getWeight()+ \"kg.\");\n }\n else {\n System.out.println(\"Your bag is too heavy to add more items.\");\n }\n\n }", "@Override\n public void equip(@NotNull IWeapon weapon) {\n weapon.equipToMage(this);\n }", "@Test\n public void useEffect() {\n \t//should normally run useItem method, but for testing it is not needed here.\n \tHealthEffect bombEff = (HealthEffect) bomb.getEffect().get(0);\n \tbombEff.applyEffect(com);\n \tAssert.assertTrue(com.getHealth() == baseHP - 700);\n \tSpecial heal = new Special(SpecialType.HEALTHBLESS);\n \theal.getEffect().get(0).applyEffect(com);\n \tAssert.assertTrue(com.getHealth() == baseHP);\n }", "@Override\n\tpublic Quest itemUsed(Map map, Item item) {\n\t\treturn this;\n\t}", "@Override // see item.java\n\tpublic void useItem() {\n\n\t}", "@Override\n public void use(AbstractPlayer p, AbstractMonster m) {\n addToBot(new DamageAction(m, new DamageInfo(p, damage, damageTypeForTurn), AbstractGameAction.AttackEffect.BLUNT_LIGHT));\n int count = 0;\n for (AbstractMonster monster : AbstractDungeon.getMonsters().monsters) {\n if (!monster.isDeadOrEscaped()) {\n count++;\n }\n }\n if (count > 1) {\n addToBot(new DamageAllEnemiesAction(p, multiDamage, damageTypeForTurn, AbstractGameAction.AttackEffect.BLUNT_LIGHT));\n }\n }", "public Item setHatItem(StatItem hatItem) {\n if (hatItem.getName().equals(\"Shoes\")) {\n if (this.hatItem == null) {\n this.hatItem = hatItem;\n return null;\n } else {\n Item returnItem = this.hatItem;\n this.hatItem = hatItem;\n return returnItem;\n }\n } else {\n return null;\n }\n }", "@Override\n protected boolean preUseCheck(Event event, ItemStack item) {\n return event instanceof EntityDamageByEntityEvent;\n }", "public void lootObject(Items loot) {\n if (loot != null)\n this.inventory.add(loot);\n }", "public void useWeapon(Character victim) {\n Weapons weapons = this.getInventory().getFirstWeapon();\n if (weapons == null)\n this.hit(victim);\n else {\n int vStrength = victim.getStrength();\n int mStrength = this.getStrength() * Hero.HERO_BONUS_OVER_ALL_CHARS + weapons.getDamage();\n if (vStrength >= mStrength) return;\n int strDif = mStrength - vStrength;\n int vLife = victim.getLife();\n vLife -= strDif;\n victim.setLife(vLife);\n this.getInventory().removeItems(weapons);\n }\n }", "private void buy() {\n if (asset >= S_I.getPirce()) {\n Item item = S_I.buy();\n asset -= item.getPrice();\n S_I.setAsset(asset);\n } else {\n System.out.println(\"cannot afford\");\n }\n }", "@Override\n public void dropBlockAsItemWithChance(@Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull IBlockState state, float chance, int fortune)\n {\n }", "@Override\n public void use(AbstractPlayer p, AbstractMonster m) {\n AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p, new ArtifactPower(p, magicNumber), magicNumber));\n }", "private void getHealthItem(double x, double y, String option,\r\n\t\t\tBufferedImage itemimage, SpriteGroup items) {\r\n\t\tint health = Resources.getInt(option);\r\n\t\tItem healthkit = new HealthItem(player, new Sprite(itemimage), health,\r\n\t\t\t\tx, y);\r\n\t\titems.add(healthkit);\r\n\t\thealthkit.setActive(true);\r\n\t}", "public int getGoldGivenBy(Player player) {\n for (TradeItem ti : items) {\n if (ti instanceof GoldTradeItem && player == ti.getSource()) {\n return ((GoldTradeItem)ti).getGold();\n }\n }\n return -1;\n }", "@Override\n public void applyEffect(Battle battle, Cell cell, Account player, int activeTime) {\n /* if (activeTime != -1)\n return;\n ManaItemBuff manaItemBuff = new ManaItemBuff(player, 1);\n manaItemBuff.setTurnCounter(-5);\n manaItemBuff.castBuff();\n player.getOwnBuffs().add(manaItemBuff);*/\n }", "public static void updateEquipment(Player player) {\n\t\tCombat.updatePlayerStance(player);\n\t}", "@Override\n public void execute(final Player pPlayer)\n {\n if( ! hasSecondWord())\n {\n GameEngine.aGui.println(\"What Item do tou want to drop ?\");\n }\n else\n {\n String vC = getSecondWord();\n Item vItemInv = pPlayer.getInventaire().get(vC);\n\n if( vItemInv == null)\n {\n GameEngine.aGui.println(\"You don't have this Item in you're possession\");\n }\n else\n {\n pPlayer.removeInventaire(vC);\n pPlayer.getCurrentRoom().getItems().put(vItemInv);\n GameEngine.aGui.println(\"You droped this \" + vItemInv.getName());\n }\n }\n }", "@Override\n public void addInfo(CurrentPlayer currentPlayer) {\n godPower.addInfo(currentPlayer);\n }", "@Override\n\tpublic void apply(final ItemStack scrap, final World world, final EntityPlayer player) {\n\t\tif(player instanceof FakePlayer)\n\t\t\treturn;\n\t\t\n\t\tfinal int count = this.rnd.nextInt(this.maxCount) + 1;\n\t\tfor(int i = 0; i < count; i++) {\n\t\t\tEntityHelper.summon(player, this.type, this.jsonTags);\n\t\t}\n\t}", "private void tryEquipItem() {\n if (fakePlayer.get().getHeldItem(EnumHand.MAIN_HAND).isEmpty()) {\n ItemStack unbreakingPickaxe = new ItemStack(Items.DIAMOND_PICKAXE, 1);\n unbreakingPickaxe.addEnchantment(Enchantments.EFFICIENCY, 3);\n unbreakingPickaxe.setTagCompound(new NBTTagCompound());\n unbreakingPickaxe.getTagCompound().setBoolean(\"Unbreakable\", true);\n fakePlayer.get().setItemStackToSlot(EntityEquipmentSlot.MAINHAND, unbreakingPickaxe);\n }\n }", "@Override\n protected boolean preUseCheck(Event event, ItemStack item) {\n return event instanceof EntityShootBowEvent;\n }", "private void transact(int owner, ItemType item) {\n\t\tint[] cost = item.getCost();\n\t\tResourceManager rm = (ResourceManager) GameManager.get()\n\t\t\t\t.getManager(ResourceManager.class);\n\t\trm.setRocks(rm.getRocks(owner) - cost[0], owner);\n\t\trm.setCrystal(rm.getCrystal(owner) - cost[1], owner);\n\t\trm.setBiomass(rm.getBiomass(owner) - cost[2], owner);\n\t}", "public void onSkillUse(L2Player player, int skill_id)\n\t{\n\t\tint npcId = getNpcId();\n\t\t// check if the npc and skills used are valid\n\t\tif(!feedableBeasts.contains(npcId))\n\t\t\treturn;\n\t\tif(skill_id != SKILL_GOLDEN_SPICE && skill_id != SKILL_CRYSTAL_SPICE)\n\t\t\treturn;\n\n\t\tint food = GOLDEN_SPICE;\n\t\tif(skill_id == SKILL_CRYSTAL_SPICE)\n\t\t\tfood = CRYSTAL_SPICE;\n\n\t\tint objectId = getObjectId();\n\t\t// display the social action of the beast eating the food.\n\t\tbroadcastPacket(new SocialAction(objectId, 2));\n\n\t\t// if this pet can't grow, it's all done.\n\t\tif(growthCapableMobs.containsKey(npcId))\n\t\t{\n\t\t\t// do nothing if this mob doesn't eat the specified food (food gets consumed but has no effect).\n\t\t\tif(growthCapableMobs.get(npcId).spice[food].length == 0)\n\t\t\t\treturn;\n\n\t\t\t// more value gathering on local variables\n\t\t\tint growthLevel = growthCapableMobs.get(npcId).growth_level;\n\n\t\t\tif(growthLevel > 0)\n\t\t\t\t// check if this is the same player as the one who raised it from growth 0.\n\t\t\t\t// if no, then do not allow a chance to raise the pet (food gets consumed but has no effect).\n\t\t\t\tif(feedInfo.get(objectId) != null && feedInfo.get(objectId) != player.getObjectId())\n\t\t\t\t\treturn;\n\n\t\t\t// Polymorph the mob, with a certain chance, given its current growth level\n\t\t\tif(Rnd.chance(growthCapableMobs.get(npcId).growth_chance))\n\t\t\t\tspawnNext(player, growthLevel, food);\n\t\t}\n\t\telse if(tamedBeasts.contains(npcId))\n\t\t\tif(skill_id == ((L2TamedBeastInstance) this).getFoodType())\n\t\t\t{\n\t\t\t\t((L2TamedBeastInstance) this).onReceiveFood();\n\t\t\t\tFunctions.npcSayCustomMessage(this, mytext[Rnd.get(mytext.length)]);\n\t\t\t}\n\t}", "public void setItemInHand ( ItemStack item ) {\n\t\tPlayer handle = handle ( );\n\t\t\n\t\tif ( handle != null ) {\n\t\t\ttry {\n\t\t\t\tsafeGetMethod ( PlayerInventory.class , \"setItemInMainHand\" , new Class[] { ItemStack.class } )\n\t\t\t\t\t\t.invoke ( handle.getInventory ( ) , item );\n\t\t\t} catch ( Exception e ) {\n\t\t\t\ttry {\n\t\t\t\t\tsafeGetMethod ( PlayerInventory.class , \"setItemInHand\" , new Class[] { ItemStack.class } )\n\t\t\t\t\t\t\t.invoke ( handle.getInventory ( ) , item );\n\t\t\t\t} catch ( IllegalAccessException | InvocationTargetException ex ) {\n\t\t\t\t\tex.printStackTrace ( );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void addGold(int g){\n this.gold += g;\n }", "public void handleItem(String item) {\r\n switch (item) {\r\n // Restore all health points\r\n case \"potionvie\":\r\n setHealthPoints(5);\r\n System.out.println(\"Vous trouvez une potion de vie!\");\r\n break;\r\n // Restore health points by 1\r\n case \"coeur\":\r\n if (getHealthPoints() < 5) {\r\n setHealthPoints(getHealthPoints() + 1);\r\n }\r\n System.out.println(\"Vous trouvez un coeur!\");\r\n break;\r\n // Increase hexaforce count by 1\r\n case \"hexaforce\":\r\n setHexaforces(getHexaforces() + 1);\r\n System.out.println(\"Vous trouvez un morceau d'Hexaforce!\");\r\n break;\r\n default:\r\n break;\r\n }\r\n }", "public static void useItem(int itemIndex) { // public static void useItem(int itemIndex)\n\t\t\t\n\t\t\tBackpackItem selectedItem = backpackArr[backpackInput];\n\t\t\t\n\t\t\t\tif (selectedItem == null) { // if there is no item in this backpack slot, print this message\n\t\t\t\t\tSystem.out.println(\"\\nYou don't have anything to use...\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (backpackInput >= 0 && backpackInput <= 6 && selectedItem.getItemName().length() > 0) { // Checks to see if player inputs a valid backpack slot and the slot actually has an item inside\n\t\t\t\t\tSystem.out.println(\"\\nYou used the \" + selectedItem + \".\");\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(selectedItem.getEffectDescription());\n\t\t\t\t\tsetStartHealth(getStartHealth() + selectedItem.getEnergyEffect()); // increases health if HealthItem\n\t\t\t\t\tsetStartGPA(getStartGPA() + selectedItem.getGpaEffect()); // increases GPA if GpaItem\n\t\t\t\t\t\n\t\t\t\t\tif (getStartHealth() >= 100) {\n\t\t\t\t\t\tsetStartHealth(100);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (getStartGPA() >= 4.0) {\n\t\t\t\t\t\tsetStartGPA(4.0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbackpackArr[backpackInput] = null; // item is removed from inventory\n\t\t\t\t}\n\t\t\t}", "public GlowItem(GlowServer server, GlowWorld world, ItemStack item) {\n super(server, world);\n this.item = item;\n pickupDelay = 20;\n }", "public void buyItem(int id, int q)\n\t{\n\t\t/* If the player isn't shopping, in a normal shop */\n\t\tif(m_currentShop == null)\n\t\t{\n\t\t\t/* First, check if the player can afford this */\n\t\t\tint price = GameServer.getServiceManager().getItemDatabase().getItem(id).getPrice();\n\t\t\tif(m_money - q * price >= 0)\n\t\t\t{\n\t\t\t\t/* Finally, if the item is in stock, buy it */\n\n\t\t\t\tm_money = m_money - q * price;\n\t\t\t\tm_bag.addItem(id, q);\n\t\t\t\tupdateClientMoney();\n\t\t\t\t/* Let player know he bought the item. */\n\t\t\t\tServerMessage message = new ServerMessage(ClientPacket.BOUGHT_ITEM);\n\t\t\t\tmessage.addInt(GameServer.getServiceManager().getItemDatabase().getItem(id).getId());\n\t\t\t\tgetSession().Send(message);\n\t\t\t\t/* Update player inventory. */\n\t\t\t\tServerMessage update = new ServerMessage(ClientPacket.UPDATE_ITEM_TOT);\n\t\t\t\tupdate.addInt(GameServer.getServiceManager().getItemDatabase().getItem(id).getId());\n\t\t\t\tupdate.addInt(q);\n\t\t\t\tgetSession().Send(update);\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* Return You have no money, fool! */\n\t\t\t\tServerMessage message = new ServerMessage(ClientPacket.NOT_ENOUGH_MONEY);\n\t\t\t\tgetSession().Send(message);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif(m_bag.hasSpace(id))\n\t\t{\n\t\t\t/* First, check if the player can afford this */\n\t\t\tif(m_money - q * m_currentShop.getPriceForItem(id) >= 0)\n\t\t\t{\n\t\t\t\t/* Finally, if the item is in stock, buy it */\n\t\t\t\tif(m_currentShop.buyItem(id, q))\n\t\t\t\t{\n\t\t\t\t\tm_money = m_money - q * m_currentShop.getPriceForItem(id);\n\t\t\t\t\tm_bag.addItem(id, q);\n\t\t\t\t\tupdateClientMoney();\n\t\t\t\t\t/* Let player know he bought the item. */\n\t\t\t\t\tServerMessage message = new ServerMessage(ClientPacket.BOUGHT_ITEM);\n\t\t\t\t\tmessage.addInt(GameServer.getServiceManager().getItemDatabase().getItem(id).getId());\n\t\t\t\t\tgetSession().Send(message);\n\t\t\t\t\t/* Update player inventory. */\n\t\t\t\t\tServerMessage update = new ServerMessage(ClientPacket.UPDATE_ITEM_TOT);\n\t\t\t\t\tupdate.addInt(GameServer.getServiceManager().getItemDatabase().getItem(id).getId());\n\t\t\t\t\tupdate.addInt(1);\n\t\t\t\t\tgetSession().Send(update);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* Return You have no money, fool! */\n\t\t\t\tServerMessage message = new ServerMessage(ClientPacket.NOT_ENOUGH_MONEY);\n\t\t\t\tgetSession().Send(message);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Send You cant carry any more items! */\n\t\t\tServerMessage message = new ServerMessage(ClientPacket.POCKET_FULL);\n\t\t\tgetSession().Send(message);\n\t\t}\n\t}", "@Override\n public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand,\n BlockHitResult hit) {\n return super.onUse(state, world, pos, player, hand, hit);\n }", "public void strike(Player player) {\n Random random = new Random();\n takeDamage(random.nextInt(100));\n if(isAlive()){\n player.takeDamage(strength);\n\n }\n\n }", "@Test\n\tpublic void testUseValidItem() {\n\t\tLightGrenade lightGrenade = new LightGrenade();\n\t\tSquare square = new Square();\n\t\t\n\t\tPlayer player = new Player(square, 0);\n\t\tplayer.addItem(lightGrenade);\n\t\t\n\t\tplayer.useItem(lightGrenade);\n\t\tassertFalse(player.hasItem(lightGrenade));\n\t}" ]
[ "0.7488502", "0.7416211", "0.73416346", "0.7328638", "0.7188941", "0.7169575", "0.7047719", "0.70466596", "0.69777036", "0.6966516", "0.69495094", "0.69359976", "0.6935365", "0.68998414", "0.6876393", "0.6808718", "0.67894864", "0.67869925", "0.6785582", "0.67613614", "0.6723008", "0.6699861", "0.6689176", "0.6659295", "0.6650316", "0.65977544", "0.65796447", "0.6576537", "0.6564231", "0.6542312", "0.6492746", "0.6453086", "0.6424141", "0.64211667", "0.641709", "0.6384235", "0.6382568", "0.6380425", "0.6369094", "0.63615286", "0.63586164", "0.6333822", "0.6328947", "0.6316708", "0.6308425", "0.6295067", "0.6293429", "0.6280705", "0.628011", "0.624996", "0.623081", "0.6220587", "0.62174386", "0.6213026", "0.62099427", "0.6200007", "0.618354", "0.6181457", "0.6156897", "0.6145754", "0.61453915", "0.6140553", "0.61380035", "0.61350924", "0.6133651", "0.61324424", "0.61180925", "0.6113194", "0.610624", "0.6105667", "0.6100851", "0.6090216", "0.60776395", "0.6072411", "0.6065804", "0.6059639", "0.60512745", "0.6051215", "0.6047548", "0.60458606", "0.604447", "0.6027107", "0.60268176", "0.60235596", "0.60231596", "0.60176563", "0.60122406", "0.60107404", "0.60072744", "0.6006716", "0.6003644", "0.6000187", "0.5995818", "0.59872186", "0.5977317", "0.5971861", "0.5965763", "0.5960265", "0.5956066", "0.5950505", "0.59479547" ]
0.0
-1
load new java key store with type PKCS12
@Override public void run() throws Exception { InputStream in = getClass().getResourceAsStream("/keystore.p12"); char[] password = "password".toCharArray(); KeyStore keystore = new JavaKeyStore("PKCS12", in, password); System.out.println("Loaded keystore: " + keystore); // create walletapi with loaded one WalletApi walletApi = new WalletApiFactory().create(keystore); System.out.println("Walletapi with loaded keystore: " + walletApi); // unlocked key Authentication authentication = Authentication.of(new KeyAlias("keyalias"), "password"); boolean unlockResult = walletApi.unlock(authentication); System.out.println("Unlock result: " + unlockResult); System.out.println("Unlocked account: " + walletApi.getPrincipal()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public KeyStore createPKCS12KeyStore(String alias, char[] password) {\n try {\r\n KeyStore keyStore = KeyStore.getInstance(CertificateHelper.TOLVEN_CREDENTIAL_FORMAT_PKCS12);\r\n try {\r\n keyStore.load(null, password);\r\n } catch (IOException ex) {\r\n throw new RuntimeException(\"Could not load keystore for alias: \" + alias, ex);\r\n }\r\n X509Certificate[] certificateChain = new X509Certificate[1];\r\n certificateChain[0] = getX509Certificate();\r\n keyStore.setKeyEntry(alias, getPrivateKey(), password, certificateChain);\r\n return keyStore;\r\n } catch (GeneralSecurityException ex) {\r\n throw new RuntimeException(\"Could not create a PKCS12 keystore for alias: \" + alias, ex);\r\n }\r\n }", "private static void readPrivateKeyFromPKCS11() throws KeyStoreException {\n String configFileName = jarPath + \"pkcs11.cfg\";\r\n\r\n Provider p = null;\r\n try {\r\n p = new SunPKCS11(configFileName);\r\n Security.addProvider(p);\r\n } catch (ProviderException e) {\r\n LanzaError( \"no es correcto el fichero de configuración de la tarjeta\" );\r\n }\r\n \r\n KeyStore ks = null;\r\n try {\r\n ks = KeyStore.getInstance(\"pkcs11\", p);\r\n ks.load(null, clave );\r\n } catch (NoSuchAlgorithmException e) {\r\n LanzaError( \"leyendo la tarjeta (n.1)\" );\r\n } catch (CertificateException e) {\r\n LanzaError( \"leyendo la tarjeta (n.2)\" );\r\n } catch (IOException e) {\r\n LanzaError( \"leyendo la tarjeta (n.3)\" );\r\n }\r\n\r\n String alias = \"\";\r\n try {\r\n alias = (String) ks.aliases().nextElement();\r\n privateKey = (PrivateKey) ks.getKey(alias, clave);\r\n } catch (NoSuchElementException e) {\r\n LanzaError( \"leyendo la clave de la tarjeta (n.1)\" );\r\n } catch (NoSuchAlgorithmException e) {\r\n LanzaError( \"leyendo la clave de la tarjeta (n.2)\" );\r\n } catch (UnrecoverableKeyException e) {\r\n LanzaError( \"leyendo la clave de la tarjeta (n.3)\" );\r\n }\r\n certificateChain = ks.getCertificateChain(alias);\r\n }", "void importPKCS12Certificate(InputStream is)\n {\n\tKeyStore myKeySto = null;\n\t// passord\n\tchar[] password = null;\n\t\n\ttry\n\t{\n\t myKeySto = KeyStore.getInstance(\"PKCS12\");\n\n\t // Pop up password dialog box\n Object dialogMsg = getMessage(\"dialog.password.text\");\n JPasswordField passwordField = new JPasswordField();\n\n Object[] msgs = new Object[2];\n msgs[0] = new JLabel(dialogMsg.toString());\n msgs[1] = passwordField;\n\n JButton okButton = new JButton(getMessage(\"dialog.password.okButton\"));\n JButton cancelButton = new JButton(getMessage(\"dialog.password.cancelButton\"));\n\n String title = getMessage(\"dialog.password.caption\");\n Object[] options = {okButton, cancelButton};\n int selectValue = DialogFactory.showOptionDialog(this, msgs, title, options, options[0]);\n\n\t // for security purpose, DO NOT put password into String. Reset password as soon as \n\t // possible.\n\t password = passwordField.getPassword();\n\n\t // User click OK button\n if (selectValue == 0)\n {\n\t // Load KeyStore based on the password\n\t myKeySto.load(is,password);\n\n\t // Get Alias list from KeyStore.\n\t Enumeration aliasList = myKeySto.aliases();\n\n\t while (aliasList.hasMoreElements())\n\t {\n\t\t\tX509Certificate cert = null;\n\n\t\t\t// Get Certificate based on the alias name\n\t\t\tString certAlias = (String)aliasList.nextElement();\n\t\t\tcert = (X509Certificate)myKeySto.getCertificate(certAlias);\n\n\t\t\t// Add to import list based on radio button selection\n\t\t\t\tif (getRadioPos() == mh.getMessage(\"SignedApplet_value\"))\n \t\t\t\t model.deactivateImpCertificate(cert);\n\t\t\t\telse if (getRadioPos() == mh.getMessage(\"SecureSite_value\"))\n \t\t\t\t model.deactivateImpHttpsCertificate(cert);\n\t }\n\t } // OK button\n\t}\n\tcatch(Throwable e)\n\t{\n\t // Show up Error dialog box if the user enter wrong password\n\t // Avoid to convert password array into String - security reason\n\t String uninitializedValue = \"uninitializedValue\";\n\t if (!compareCharArray(password, uninitializedValue.toCharArray()))\n\t {\n\t\t\tString errorMsg = getMessage(\"dialog.import.password.text\");\n\t\t\t\t\tString errorTitle = getMessage(\"dialog.import.error.caption\");\n\t \t\tDialogFactory.showExceptionDialog(this, e, errorMsg, errorTitle);\n\t }\n\t}\n\tfinally {\n\t\t// Reset password\n\t\tif(password != null) {\n\t\t\tjava.util.Arrays.fill(password, ' ');\n\t\t}\n\t}\n }", "public static void main(String args[]) throws Exception{\n\t KeyStore keyStore = KeyStore.getInstance(\"JCEKS\");\r\n\r\n //Cargar el objeto KeyStore \r\n char[] password = \"changeit\".toCharArray();\r\n java.io.FileInputStream fis = new FileInputStream(\r\n \t\t \"/usr/lib/jvm/java-11-openjdk-amd64/lib/security/cacerts\");\r\n \r\n keyStore.load(fis, password);\r\n \r\n //Crear el objeto KeyStore.ProtectionParameter \r\n ProtectionParameter protectionParam = new KeyStore.PasswordProtection(password);\r\n\r\n //Crear el objeto SecretKey \r\n SecretKey mySecretKey = new SecretKeySpec(\"myPassword\".getBytes(), \"DSA\");\r\n \r\n //Crear el objeto SecretKeyEntry \r\n SecretKeyEntry secretKeyEntry = new SecretKeyEntry(mySecretKey);\r\n keyStore.setEntry(\"AliasClaveSecreta\", secretKeyEntry, protectionParam);\r\n\r\n //Almacenar el objeto KeyStore \r\n java.io.FileOutputStream fos = null;\r\n fos = new java.io.FileOutputStream(\"newKeyStoreName\");\r\n keyStore.store(fos, password);\r\n \r\n //Crear el objeto KeyStore.SecretKeyEntry \r\n SecretKeyEntry secretKeyEnt = (SecretKeyEntry)keyStore.getEntry(\"AliasClaveSecreta\", protectionParam);\r\n\r\n //Crear el objeto SecretKey \r\n SecretKey mysecretKey = secretKeyEnt.getSecretKey(); \r\n System.out.println(\"Algoritmo usado para generar la clave: \"+mysecretKey.getAlgorithm()); \r\n System.out.println(\"Formato usado para la clave: \"+mysecretKey.getFormat());\r\n }", "private KeyManager getKeyManager() {\n\t\tDefaultResourceLoader loader = new FileSystemResourceLoader();\n\t\tResource storeFile = loader.getResource(\"file:\" + samlProps.get(\"keyStoreFilePath\"));\n\t\tMap<String, String> keyPasswords = new HashMap<String, String>();\n\t\tkeyPasswords.put(samlProps.get(\"keyAlias\"), samlProps.get(\"keyPasswd\"));\n\n\t\treturn new JKSKeyManager(storeFile, samlProps.get(\"keyStorePasswd\"), keyPasswords, samlProps.get(\"keyAlias\"));\n\t}", "public KeyStore getKeyStore(InputStream keystoreIS, String password) throws CertException;", "public SingleCertKeyStoreProvider() {\r\n super(\"PKCS7\", PROVIDER_VERSION, \"KeyStore for a PKCS7 or X.509 certificate\"); //$NON-NLS-1$ //$NON-NLS-2$\r\n AccessController.doPrivileged(new java.security.PrivilegedAction<Object>() {\r\n \t/** {@inheritdoc} */\r\n @Override\r\n\t\t\tpublic Object run() {\r\n put(\"KeyStore.PKCS7\", \"es.gob.afirma.keystores.single.SingleCertKeyStore\"); //$NON-NLS-1$ //$NON-NLS-2$\r\n return null;\r\n }\r\n });\r\n }", "public KeyStore getKeyStore();", "private void importKeyPair() {\n\t\t/*\n\t\t * Let the user choose a PKCS #12 file (keystore) containing a public\n\t\t * and private key pair to import\n\t\t */\n\t\tFile importFile = selectImportExportFile(\n\t\t\t\t\"PKCS #12 file to import from\", // title\n\t\t\t\tnew String[] { \".p12\", \".pfx\" }, // array of file extensions\n\t\t\t\t// for the file filter\n\t\t\t\t\"PKCS#12 Files (*.p12, *.pfx)\", // description of the filter\n\t\t\t\t\"Import\", // text for the file chooser's approve button\n\t\t\t\t\"keyPairDir\"); // preference string for saving the last chosen directory\n\n\t\tif (importFile == null)\n\t\t\treturn;\n\n\t\t// The PKCS #12 keystore is not a file\n\t\tif (!importFile.isFile()) {\n\t\t\tshowMessageDialog(this, \"Your selection is not a file\",\n\t\t\t\t\tALERT_TITLE, WARNING_MESSAGE);\n\t\t\treturn;\n\t\t}\n\n\t\t// Get the user to enter the password that was used to encrypt the\n\t\t// private key contained in the PKCS #12 file\n\t\tGetPasswordDialog getPasswordDialog = new GetPasswordDialog(this,\n\t\t\t\t\"Import key pair entry\", true,\n\t\t\t\t\"Enter the password that was used to encrypt the PKCS #12 file\");\n\t\tgetPasswordDialog.setLocationRelativeTo(this);\n\t\tgetPasswordDialog.setVisible(true);\n\n\t\tString pkcs12Password = getPasswordDialog.getPassword();\n\n\t\tif (pkcs12Password == null) // user cancelled\n\t\t\treturn;\n\t\telse if (pkcs12Password.isEmpty()) // empty password\n\t\t\t// FIXME: Maybe user did not have the password set for the private key???\n\t\t\treturn;\n\n\t\ttry {\n\t\t\t// Load the PKCS #12 keystore from the file\n\t\t\t// (this is using the BouncyCastle provider !!!)\n\t\t\tKeyStore pkcs12Keystore = credManager.loadPKCS12Keystore(importFile,\n\t\t\t\t\tpkcs12Password);\n\n\t\t\t/*\n\t\t\t * Display the import key pair dialog supplying all the private keys\n\t\t\t * stored in the PKCS #12 file (normally there will be only one\n\t\t\t * private key inside, but could be more as this is a keystore after\n\t\t\t * all).\n\t\t\t */\n\t\t\tNewKeyPairEntryDialog importKeyPairDialog = new NewKeyPairEntryDialog(\n\t\t\t\t\tthis, \"Credential Manager\", true, pkcs12Keystore, dnParser);\n\t\t\timportKeyPairDialog.setLocationRelativeTo(this);\n\t\t\timportKeyPairDialog.setVisible(true);\n\n\t\t\t// Get the private key and certificate chain of the key pair\n\t\t\tKey privateKey = importKeyPairDialog.getPrivateKey();\n\t\t\tCertificate[] certChain = importKeyPairDialog.getCertificateChain();\n\n\t\t\tif (privateKey == null || certChain == null)\n\t\t\t\t// User did not select a key pair for import or cancelled\n\t\t\t\treturn;\n\n\t\t\t/*\n\t\t\t * Check if a key pair entry with the same alias already exists in\n\t\t\t * the Keystore\n\t\t\t */\n\t\t\tif (credManager.hasKeyPair(privateKey, certChain)\n\t\t\t\t\t&& showConfirmDialog(this,\n\t\t\t\t\t\t\t\"The keystore already contains the key pair entry with the same private key.\\n\"\n\t\t\t\t\t\t\t\t\t+ \"Do you want to overwrite it?\",\n\t\t\t\t\t\t\tALERT_TITLE, YES_NO_OPTION) != YES_OPTION)\n\t\t\t\treturn;\n\n\t\t\t// Place the private key and certificate chain into the Keystore\n\t\t\tcredManager.addKeyPair(privateKey, certChain);\n\n\t\t\t// Display success message\n\t\t\tshowMessageDialog(this, \"Key pair import successful\", ALERT_TITLE,\n\t\t\t\t\tINFORMATION_MESSAGE);\n\t\t} catch (Exception ex) { // too many exceptions to catch separately\n\t\t\tString exMessage = \"Failed to import the key pair entry to the Keystore. \"\n\t\t\t\t\t+ ex.getMessage();\n\t\t\tlogger.error(exMessage, ex);\n\t\t\tshowMessageDialog(this, exMessage, ERROR_TITLE, ERROR_MESSAGE);\n\t\t}\n\t}", "private void loadWalletFromKeystore(String password, String keyStoreFileName) {\n mCredentials = Web3jWalletHelper.onInstance(mContext).getWallet(password, walletSuffixDir, keyStoreFileName);\n SharedPref.write(WALLET_ADDRESS, mCredentials.getAddress());\n // SharedPref.write(PUBLIC_KEY, mCredentials.getEcKeyPair().getPublicKey().toString(16));\n SharedPref.write(PRIVATE_KEY, mCredentials.getEcKeyPair().getPrivateKey().toString(16));\n SharedPref.write(PUBLIC_KEY, ECDSA.getHexEncodedPoint(SharedPref.read(PRIVATE_KEY)));\n }", "public static void main(String[] args) {\n KeyStore myStore = null;\n try {\n\n /* Note: could also use a keystore file, which contains the token label or slot no. to use. Load that via\n * \"new FileInputStream(ksFileName)\" instead of ByteArrayInputStream. Save objects to the keystore via a\n * FileOutputStream. */\n\n ByteArrayInputStream is1 = new ByteArrayInputStream((\"slot:\" + slot).getBytes());\n myStore = KeyStore.getInstance(keystoreProvider);\n myStore.load(is1, passwd.toCharArray());\n } catch (KeyStoreException kse) {\n System.out.println(\"Unable to create keystore object\");\n System.exit(-1);\n } catch (NoSuchAlgorithmException nsae) {\n System.out.println(\"Unexpected NoSuchAlgorithmException while loading keystore\");\n System.exit(-1);\n } catch (CertificateException e) {\n System.out.println(\"Unexpected CertificateException while loading keystore\");\n System.exit(-1);\n } catch (IOException e) {\n // this should never happen\n System.out.println(\"Unexpected IOException while loading keystore.\");\n System.exit(-1);\n }\n\n KeyPairGenerator keyGen = null;\n KeyPair keyPair = null;\n try {\n // Generate an ECDSA KeyPair\n /* The KeyPairGenerator class is used to determine the type of KeyPair being generated. For more information\n * concerning the algorithms available in the Luna provider please see the Luna Development Guide. For more\n * information concerning other providers, please read the documentation available for the provider in question. */\n System.out.println(\"Generating ECDSA Keypair\");\n /* The KeyPairGenerator.getInstance method also supports specifying providers as a parameter to the method. Many\n * other methods will allow you to specify the provider as a parameter. Please see the Sun JDK class reference at\n * http://java.sun.org for more information. */\n keyGen = KeyPairGenerator.getInstance(\"ECDSA\", provider);\n /* ECDSA keys need to know what curve to use. If you know the curve ID to use you can specify it directly. In the\n * Luna Provider all supported curves are defined in LunaECCurve */\n ECGenParameterSpec ecSpec = new ECGenParameterSpec(\"c2pnb304w1\");\n keyGen.initialize(ecSpec);\n keyPair = keyGen.generateKeyPair();\n } catch (Exception e) {\n System.out.println(\"Exception during Key Generation - \" + e.getMessage());\n System.exit(1);\n }\n\n // generate a self-signed ECDSA certificate.\n Date notBefore = new Date();\n Date notAfter = new Date(notBefore.getTime() + 1000000000);\n BigInteger serialNum = new BigInteger(\"123456\");\n LunaCertificateX509 cert = null;\n try {\n cert = LunaCertificateX509.SelfSign(keyPair, \"CN=ECDSA Sample Cert\", serialNum, notBefore, notAfter);\n } catch (InvalidKeyException ike) {\n System.out.println(\"Unexpected InvalidKeyException while generating cert.\");\n System.exit(-1);\n } catch (CertificateEncodingException cee) {\n System.out.println(\"Unexpected CertificateEncodingException while generating cert.\");\n System.exit(-1);\n }\n\n byte[] bytes = \"Some Text to Sign as an Example\".getBytes();\n System.out.println(\"PlainText = \" + com.safenetinc.luna.LunaUtils.getHexString(bytes, true));\n\n Signature ecdsaSig = null;\n byte[] signatureBytes = null;\n try {\n // Create a Signature Object and signUsingI2p the encrypted text\n /* Sign/Verify operations like Encrypt/Decrypt operations can be performed in either singlepart or multipart\n * steps. Single part Signing and Verify examples are given in this code. Multipart signatures use the\n * Signature.update() method to load all the bytes and then invoke the Signature.signUsingI2p() method to get the result.\n * For more information please see the class documentation for the java.security.Signature class with respect to\n * the version of the JDK you are using. */\n System.out.println(\"Signing encrypted text\");\n ecdsaSig = Signature.getInstance(\"ECDSA\", provider);\n ecdsaSig = Signature.getInstance(\"SHA256withECDSA\", provider);\n ecdsaSig.initSign(keyPair.getPrivate());\n ecdsaSig.update(bytes);\n signatureBytes = ecdsaSig.sign();\n\n // Verify the signature\n System.out.println(\"Verifying signature(via Signature.verify)\");\n ecdsaSig.initVerify(keyPair.getPublic());\n ecdsaSig.update(bytes);\n boolean verifies = ecdsaSig.verify(signatureBytes);\n if (verifies == true) {\n System.out.println(\"Signature passed verification\");\n } else {\n System.out.println(\"Signature failed verification\");\n }\n\n } catch (Exception e) {\n System.out.println(\"Exception during Signing - \" + e.getMessage());\n System.exit(1);\n }\n\n try {\n // Verify the signature\n System.out.println(\"Verifying signature(via cert)\");\n ecdsaSig.initVerify(cert);\n ecdsaSig.update(bytes);\n boolean verifies = ecdsaSig.verify(signatureBytes);\n if (verifies == true) {\n System.out.println(\"Signature passed verification\");\n } else {\n System.out.println(\"Signature failed verification\");\n }\n } catch (Exception e) {\n System.out.println(\"Exception during Verification - \" + e.getMessage());\n System.exit(1);\n }\n\n// // Logout of the token\n// HSM_Manager.hsmLogout();\n }", "KeyManager createKeyManager();", "@Bean\n public KeyManager keyManager() {\n final Resource storeFile\n = this.resourceLoader.getResource(\"classpath:\" + this.samlProperties.getKeystore().getName());\n final Map<String, String> passwords = new HashMap<>();\n passwords.put(\n this.samlProperties.getKeystore().getDefaultKey().getName(),\n this.samlProperties.getKeystore().getDefaultKey().getPassword()\n );\n return new JKSKeyManager(\n storeFile,\n this.samlProperties.getKeystore().getPassword(),\n passwords,\n this.samlProperties.getKeystore().getDefaultKey().getName()\n );\n }", "public void createKeyStore(String master_key) throws AEADBadTagException {\n SharedPreferences.Editor editor = getEncryptedSharedPreferences(master_key).edit();\n editor.putString(MASTER_KEY, master_key);\n editor.apply();\n\n Log.d(TAG, \"Encrypted SharedPreferences created...\");\n }", "OpenSSLKey mo134201a();", "private void initKeystores(SupportedOS supportedOS, SupportedBrowser supportedBrowser)\r\n {\r\n this.keyStoreManager.flushKeyStoresTable();\r\n this.keyStoreManager.initBrowserStores(apph.getOs(), apph.getNavigator());\r\n \r\n // this.keyStoreManager.initClauer();\r\n\r\n // Solo mostraremos el soporte PKCS11 para sistemas operativos no Windows\r\n// if (!supportedBrowser.equals(SupportedBrowser.IEXPLORER))\r\n if (!supportedOS.equals(SupportedOS.WINDOWS))\r\n {\r\n ConfigManager conf = ConfigManager.getInstance();\r\n\r\n for (Device device : conf.getDeviceConfig())\r\n {\r\n try\r\n {\r\n keyStoreManager.initPKCS11Device(device, null);\r\n }\r\n catch (DeviceInitializationException die)\r\n {\r\n for (int i = 0; i < 3; i++)\r\n {\r\n PasswordPrompt passwordPrompt = new PasswordPrompt(null, device.getName(), \"Pin:\");\r\n \r\n if (passwordPrompt.getPassword() == null)\r\n {\r\n \tbreak;\r\n }\r\n \r\n try\r\n {\r\n this.keyStoreManager.initPKCS11Device(device, passwordPrompt.getPassword());\r\n break;\r\n }\r\n catch (Exception e)\r\n {\r\n JOptionPane.showMessageDialog(null, LabelManager.get(\"ERROR_INCORRECT_DNIE_PWD\"), \"\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "@Override\n public KeyStore loadKeyStore(File file, String keyStoreType, String password) {\n KeyStore keyStore;\n try {\n keyStore = KeyStore.getInstance(keyStoreType);\n } catch (KeyStoreException e) {\n throw new KeyStoreAccessException(\"Unable to get KeyStore instance of type: \" + keyStoreType, e);\n }\n\n try (InputStream keystoreAsStream = new FileInputStream(file)) {\n keyStore.load(keystoreAsStream, password.toCharArray());\n } catch (IOException e) {\n throw new ImportException(\"Unable to read KeyStore from file: \" + file.getName(), e);\n } catch (CertificateException | NoSuchAlgorithmException e) {\n throw new ImportException(\"Error while reading KeyStore\", e);\n }\n\n return keyStore;\n }", "private void loadTM() throws ERMgmtException{\n try{\n KeyStore ts = KeyStore.getInstance(KeyStore.getDefaultType());\n //random number generate to generated aliases for the new keystore\n Random generator = new Random();\n \n ts.load(null, null);\n \n if(mCertList.size() > 0){\n for(int i=0; i<mCertList.size(); i++){\n int randomInt = generator.nextInt();\n while(ts.containsAlias(\"certificate\"+randomInt)){\n randomInt = generator.nextInt();\n }\n ts.setCertificateEntry(\"certificate\"+randomInt, (X509Certificate) mCertList.get(i));\n } \n mTrustManagerFactory.init(ts); \n } else { \n mTrustManagerFactory.init((KeyStore) null);\n }\n \n TrustManager[] tm = mTrustManagerFactory.getTrustManagers();\n for(int i=0; i<tm.length; i++){\n if (tm[i] instanceof X509TrustManager) {\n mTrustManager = (X509TrustManager)tm[i]; \n break;\n }\n }\n \n } catch (Exception e){ \n throw new ERMgmtException(\"Trust Manager Error\", e);\n }\n \n }", "private void loadStore() throws Exception {\n\t\tkeyStore = KeyStore.getInstance(keyStoreType.toUpperCase());\n\t\tFileInputStream fis = null;\n\t\ttry {\n\t\t\tfis = new FileInputStream(keyStorePath);\n\t\t\tkeyStore.load(fis, keyStorePass.toCharArray());\n\t\t} catch (CertificateException | IOException e) {\n\t\t\twriteToLog(\"Error while trying to load the key-store\");\n\t\t\tLogWriter.close();\n\t\t\tthrow new Exception(\"Error while trying to load the key-store\", e);\n\t\t} finally {\n\t\t\tif (fis != null) {\n\t\t\t\tfis.close();\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void testAddX509CertificateToKeyStore() throws KeyStoreException, CertificateException, IOException, NoSuchAlgorithmException, InvalidKeySpecException {\n\t\t\n\t\tX509Certificate cert = DbMock.readCert(\"apache-tomcat.pem\");\n\t\t\n\t\tKeyStore keyStore = KeyStore.getInstance(\"JKS\");\n\t\t//initialize keystore\n\t\tkeyStore.load(null, null);\n\t\t\n\t\tJcaUtils.addX509CertificateToKeyStore(keyStore, \"alias1\", cert);\n\t\t\n\t\t// Save the new keystore contents\n\t\tFileOutputStream out = new FileOutputStream(\"/Users/davide/Downloads/ks.dat\");\n\t\tkeyStore.store(out, \"davidedc\".toCharArray());\n\t\tout.close();\n\t}", "public void newKeystore(String alias,String password, String bodyCert) {\n try {\n CertAndKeyGen keyGen = new CertAndKeyGen(\"RSA\", ALGORITHM, null);\n try {\n keyGen.generate(KEY_LEN);\n PrivateKey pk = keyGen.getPrivateKey();\n X509Certificate cert;\n cert = keyGen.getSelfCertificate(new X500Name(bodyCert), (long) EXPIRATION * 24 * 60 * 60);\n X509Certificate[] chain = new X509Certificate[1];\n chain[0]= cert;\n //creo el request PKCS10\n PKCS10 certreq = new PKCS10 (keyGen.getPublicKey());\n Signature signature = Signature.getInstance(ALGORITHM);\n signature.initSign(pk);\n certreq.encodeAndSign(new X500Name(bodyCert), signature);\n //-creo el archivo CSR-\n //FileOutputStream filereq = new FileOutputStream(\"C:\\\\test\\\\certreq.csr\");\n FileOutputStream filereq = new FileOutputStream(OUTPUTCERT_PATH);\n PrintStream ps = new PrintStream(filereq);\n certreq.print(ps);\n ps.close();\n filereq.close();\n \n this.ks = KeyStore.getInstance(INSTANCE);\n this.ksPass = password.toCharArray();\n try (FileOutputStream newkeystore = new FileOutputStream(archivo)) {\n ks.load(null,null);\n ks.setKeyEntry(alias, pk, ksPass, chain);\n ks.store(newkeystore, ksPass);\n }\n } catch (InvalidKeyException | IOException | CertificateException | SignatureException | KeyStoreException ex) {\n LOG.error(\"Error a manipular el archivo: \"+archivo,ex);\n }\n \n } \n catch (NoSuchAlgorithmException | NoSuchProviderException ex) {\n LOG.error(ex);\n }\n }", "private void initKey() {\n String del = \":\";\n byte[] key;\n if (MainGame.applicationType == Application.ApplicationType.Android) {\n key = StringUtils.rightPad(Build.SERIAL + del + Build.ID + del, 32, \"~\").getBytes();\n } else if (MainGame.applicationType == Application.ApplicationType.Desktop) {\n key = new byte[]{0x12, 0x2d, 0x2f, 0x6c, 0x1f, 0x7a, 0x4f, 0x10, 0x48, 0x56, 0x17, 0x4b, 0x4f, 0x48, 0x3c, 0x17, 0x04, 0x06, 0x4b, 0x6d, 0x1d, 0x68, 0x4b, 0x52, 0x50, 0x50, 0x1f, 0x06, 0x29, 0x68, 0x5c, 0x65};\n } else {\n key = new byte[]{0x77, 0x61, 0x6c, 0x0b, 0x04, 0x5a, 0x4f, 0x4b, 0x65, 0x48, 0x52, 0x68, 0x1f, 0x1d, 0x3c, 0x4a, 0x5c, 0x06, 0x1f, 0x2f, 0x12, 0x32, 0x50, 0x19, 0x3c, 0x52, 0x04, 0x17, 0x48, 0x4f, 0x6d, 0x4b};\n }\n for (int i = 0; i < key.length; ++i) {\n key[i] = (byte) ((key[i] << 2) ^ magic);\n }\n privateKey = key;\n }", "public void loadKey(File in, File privateKeyFile) throws GeneralSecurityException, IOException {\n\t byte[] encodedKey = new byte[(int)privateKeyFile.length()];\n\t FileInputStream is = new FileInputStream(privateKeyFile);\n\t is.read(encodedKey);\n\t \n\t // create private key\n\t PKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(encodedKey);\n\t KeyFactory kf = KeyFactory.getInstance(\"RSA\");\n\t PrivateKey pk = kf.generatePrivate(privateKeySpec);\n\t \n\t // read AES key\n\t pkCipher.init(Cipher.DECRYPT_MODE, pk);\n\t aesKey = new byte[256/8];\n\t CipherInputStream cis = new CipherInputStream(new FileInputStream(in), pkCipher);\n\t cis.read(aesKey);\n\t aesKeySpec = new SecretKeySpec(aesKey, \"AES\");\n\t cis.close();\n\t is.close();\n\t }", "public void CreateCipher() {\n String key = \"IWantToPassTAP12\"; // 128 bit key\n aesKey = new javax.crypto.spec.SecretKeySpec(key.getBytes(), \"AES\");\n try {\n this.cipher = Cipher.getInstance(\"AES\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void getKeyAndCerts(String filePath, String pw)\n throws GeneralSecurityException, IOException {\n System.out\n .println(\"reading signature key and certificates from file \" + filePath + \".\");\n\n FileInputStream fis = new FileInputStream(filePath);\n KeyStore store = KeyStore.getInstance(\"PKCS12\", \"IAIK\");\n store.load(fis, pw.toCharArray());\n\n Enumeration<String> aliases = store.aliases();\n String alias = (String) aliases.nextElement();\n privKey_ = (PrivateKey) store.getKey(alias, pw.toCharArray());\n certChain_ = Util.convertCertificateChain(store.getCertificateChain(alias));\n fis.close();\n }", "public KeyProvider getKeyProvider() {\n return keystore; \n }", "private void initKeystore(Properties props) throws KeyStoreInitException {\n\t\tkeystorePassword = props.getProperty(\"keystorePassword\");\n\t\tkeystoreLocation = props.getProperty(\"keystoreLocation\");\n\t\tsecretKeyAlias = props.getProperty(\"secretKeyAlias\");\n\n\t\ttry {\n\t\t\tks = loadKeyStore();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new KeyStoreInitException(e.getMessage());\n\t\t} catch (KeyStoreException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new KeyStoreInitException(e.getMessage());\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new KeyStoreInitException(e.getMessage());\n\t\t} catch (CertificateException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new KeyStoreInitException(e.getMessage());\n\t\t}\n\t}", "public MEKeyTool() {\n keystore = new PublicKeyStoreBuilderBase();\n }", "@Nonnull\n public static KeyStore loadKeyStore(String filename, String password)\n throws IOException, GeneralSecurityException {\n return loadKeyStore(FileUtil.getContextFile(filename), password);\n }", "@Bean(name = \"keyManager\")\n\tpublic KeyManager keyManager() {\n\t\tDefaultResourceLoader loader = new DefaultResourceLoader();\n\t\tResource storeFile = loader\n\t\t\t\t.getResource(\"classpath:samlKeystoreDev.jks\");\n\t\tString storePass = \"nalle123\";\n\t\tMap<String, String> passwords = new HashMap<String, String>();\n\t\tpasswords.put(\"localhost\", \"nalle123\");\n\t\tString defaultKey = \"localhost\";\n\t\treturn new JKSKeyManager(storeFile, storePass, passwords, defaultKey);\n\t}", "private static KeyStore buildKeyStore(Context context, int certRawResId) throws KeyStoreException, CertificateException, NoSuchAlgorithmException, IOException {\n String keyStoreType = KeyStore.getDefaultType();\n KeyStore keyStore = KeyStore.getInstance(keyStoreType);\n keyStore.load(null, null);\n\n // read and add certificate authority\n Certificate cert = readCert(context, certRawResId);\n keyStore.setCertificateEntry(\"ca\", cert);\n\n return keyStore;\n }", "public KeyStore readKeyStore(File file, char[] password) {\n FileInputStream stream = null;\n try {\n stream = new FileInputStream(file);\n KeyStore ks = KeyStore.getInstance(\"JKS\"); \n ks.load(stream, password);\n return ks;\n } catch (RuntimeException | IOException | GeneralSecurityException e) {\n throw new RuntimeException(\"Failed to read keystore from [\"+file+\"]\", e);\n } finally {\n CloseablesExt.closeQuietly(stream);\n }\n }", "@SuppressFBWarnings(value = \"EXS_EXCEPTION_SOFTENING_NO_CONSTRAINTS\",\n\t\t\tjustification = \"converting checked to unchecked exceptions that must not be thrown\")\n\tpublic static KeyStore loadKeyStore(final Path jksFilePath, final String password)\n\t\t\tthrows CertificateException, IOException {\n\t\ttry (InputStream inputStream = Files.newInputStream(jksFilePath)) {\n\t\t\tfinal KeyStore keyStore = KeyStore.getInstance(\"JKS\");\n\t\t\tkeyStore.load(inputStream, password.toCharArray());\n\t\t\treturn keyStore;\n\t\t} catch (final KeyStoreException | NoSuchAlgorithmException e) {\n\t\t\tthrow new SneakyException(e);\n\t\t}\n\t}", "private static KeyStore getLoadKeyStore(File keyStoreFile, String keyStorePwd) throws Exception {\n\t\tKeyStore ks = null;\n\t\tInputStream ksInput = null;\n\t\ttry {\n\t\t\t//ks = KeyStore.getInstance(DEFAULT_KEYSTORE_TYPE, new BouncyCastleProvider());\n\t\t\tks = KeyStore.getInstance(DEFAULT_KEYSTORE_TYPE);\n\t\t\tksInput = new BufferedInputStream(new FileInputStream(keyStoreFile));\n\t\t\tks.load(ksInput, keyStorePwd.toCharArray());\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\tthrow new Exception(\"加载证书密钥库[\" + keyStoreFile.getName() + \"]失败,原因[\" + ex.getMessage() + \"]\");\n\t\t} finally {\n\t\t\t//IOUtils.closeQuietly(ksInput);\n\t\t}\n\t\treturn ks;\n\t}", "void saveKeys(String publicKeyFileLocation, String secretKeyFileLocation) throws IOException;", "public static void loadCryptoProviders() {\n }", "public void importKey(IsoBuffer isoBuffer);", "@Override\n public KeyStoreView fromKeyStore(KeyStore keyStore, Function<String, char[]> keyPassword) {\n return new DefaultKeyStoreView(\n new DefaultKeyStoreSourceImpl(metadataOper, keyStore, oper, keyPassword)\n );\n }", "KeyStore loadKeystore(char[] keystorePassword) {\n try {\n // Load the keystore in the user's home directory\n bufferedInputStream.reset();\n keystore.load(bufferedInputStream, keystorePassword);\n return keystore;\n // TODO: EOFException might mean we're skipping guesses\n } catch (CertificateException | NoSuchAlgorithmException | FileNotFoundException e) {\n throw new KeystoreException(e);\n } catch (IOException e) {\n if ((e.getCause() instanceof UnrecoverableKeyException) &&\n (e.getCause().getMessage().contains(\"Password verification failed\"))) return null;\n\n throw new KeystoreException(e);\n }\n }", "public static CryptoToken initFromPkcs11(String configDir, String pin)\r\n\t\t\tthrows BkavSignaturesException {\r\n\t\tCryptoToken token = null;\r\n\t\tFileInputStream fis = null;\r\n\t\ttry {\r\n\t\t\tfis = new FileInputStream(configDir);\r\n\t\t\tProvider provider = null;\r\n\t\t\ttry {\r\n\t\t\t\tprovider = new sun.security.pkcs11.SunPKCS11(fis);\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t\tthrow new BkavSignaturesException(\"ProviderException\", ex);\r\n\t\t\t}\r\n\r\n\t\t\tif (Security.getProvider(provider.getName()) == null) {\r\n\t\t\t\tSecurity.addProvider(provider);\r\n\t\t\t}\r\n\t\t\tKeyStore keystore = KeyStore.getInstance(\"PKCS11\", provider);\r\n\t\t\tkeystore.load(null, pin.toCharArray());\r\n\r\n\t\t\tEnumeration<String> aliases = keystore.aliases();\r\n\t\t\tif (aliases == null) {\r\n\t\t\t\tthrow new BkavSignaturesException(\r\n\t\t\t\t\t\t\"No key alias was found in keystore\");\r\n\t\t\t}\r\n\t\t\tString alias = null;\r\n\r\n\t\t\twhile (aliases.hasMoreElements()) {\r\n\t\t\t\tString currentAlias = aliases.nextElement();\r\n\t\t\t\tif (keystore.isKeyEntry(currentAlias)) {\r\n\t\t\t\t\talias = currentAlias;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Throw exception if no key entry was found\r\n\t\t\tif (alias == null) {\r\n\t\t\t\tthrow new BkavSignaturesException(\r\n\t\t\t\t\t\t\"No key entry was found in keystore\");\r\n\t\t\t}\r\n\r\n\t\t\ttoken = getFromKeystore(keystore, alias, pin);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tthrow new BkavSignaturesException(\"FileNotFoundException\", e);\r\n\t\t} catch (KeyStoreException e) {\r\n\t\t\tthrow new BkavSignaturesException(\"KeyStoreException\", e);\r\n\t\t} catch (NoSuchAlgorithmException e) {\r\n\t\t\tthrow new BkavSignaturesException(\"NoSuchAlgorithmException\", e);\r\n\t\t} catch (CertificateException e) {\r\n\t\t\tthrow new BkavSignaturesException(\"CertificateException\", e);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new BkavSignaturesException(\"IOException\", e);\r\n\t\t} catch (UnrecoverableKeyException e) {\r\n\t\t\tthrow new BkavSignaturesException(\"UnrecoverableKeyException\", e);\r\n\t\t} finally {\r\n\t\t\tif (fis != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfis.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// Do nothing here\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn token;\r\n\t}", "private void openKeystoreAndOutputJad() throws Exception {\n File ksfile;\n FileInputStream ksstream;\n\n if (alias == null) {\n usageError(command + \" requires -alias\");\n }\n\n if (outfile == null) {\n usageError(command + \" requires an output JAD\");\n }\n\n if (keystore == null) {\n keystore = System.getProperty(\"user.home\") + File.separator\n + \".keystore\";\n }\n\n try {\n ksfile = new File(keystore);\n // Check if keystore file is empty\n if (ksfile.exists() && ksfile.length() == 0) {\n throw new Exception(\"Keystore exists, but is empty: \" +\n keystore);\n }\n\n ksstream = new FileInputStream(ksfile);\n } catch (FileNotFoundException fnfe) {\n throw new Exception(\"Keystore does not exist: \" + keystore);\n }\n\n try {\n try {\n // the stream will be closed later\n outstream = new FileOutputStream(outfile);\n } catch (IOException ioe) {\n throw new Exception(\"Error opening output JAD: \" +\n outfile);\n }\n\n try {\n // load the keystore into the AppDescriptor\n appdesc.loadKeyStore(ksstream, storepass);\n } catch (Exception e) {\n throw new Exception(\"Keystore could not be loaded: \" +\n e.toString());\n }\n } finally {\n try {\n ksstream.close();\n } catch (IOException e) {\n // ignore\n }\n }\n }", "public static KeyManagerFactory loadKeyStore( String keyStoreFile, String keyStorePasswordStr ) throws Exception\n {\n char[] keyStorePassword = Strings.isEmpty( keyStorePasswordStr ) ? null : keyStorePasswordStr.toCharArray();\n\n if ( !Strings.isEmpty( keyStoreFile ) )\n {\n // We have a provided KeyStore file: read it\n KeyStore keyStore = KeyStore.getInstance( KeyStore.getDefaultType() );\n\n try ( InputStream is = Files.newInputStream( Paths.get( keyStoreFile ) ) )\n {\n keyStore.load( is, keyStorePassword );\n }\n \n /*\n * Verify key store:\n * * Must only contain one entry which must be a key entry\n * * Must contain a certificate chain\n * * The private key must be recoverable by the key store password\n */\n Enumeration<String> aliases = keyStore.aliases();\n \n if ( !aliases.hasMoreElements() )\n {\n throw new KeyStoreException( \"Key store is empty\" );\n }\n \n String alias = aliases.nextElement();\n \n if ( aliases.hasMoreElements() )\n {\n throw new KeyStoreException( \"Key store contains more than one entry\" );\n }\n \n if ( !keyStore.isKeyEntry( alias ) )\n {\n throw new KeyStoreException( \"Key store must contain a key entry\" );\n }\n \n if ( keyStore.getCertificateChain( alias ) == null )\n {\n throw new KeyStoreException( \"Key store must contain a certificate chain\" );\n }\n \n if ( keyStore.getKey( alias, keyStorePassword ) == null )\n {\n throw new KeyStoreException( \"Private key must be recoverable by the key store password\" );\n }\n \n // Set up key manager factory to use our key store\n String algorithm = Security.getProperty( \"ssl.KeyManagerFactory.algorithm\" );\n \n if ( algorithm == null )\n {\n algorithm = KeyManagerFactory.getDefaultAlgorithm();\n }\n \n KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance( algorithm );\n \n keyManagerFactory.init( keyStore, keyStorePassword );\n \n return keyManagerFactory;\n }\n else\n {\n return null;\n }\n }", "@Test\n\tpublic void pkcs12_exceptions() {\n\t\t// No algorithm\n\t\ttry {\n\t\t\tassertPkcs12LoadException(new Pkcs12LoadException(new NoSuchAlgorithmException()),\n\t\t\t\t\tPkcs12LoadException.Reason.ALGORITHM_NOT_FOUND);\n\t\t} catch (Pkcs12LoadException e) {\n\t\t\t// ignore\n\t\t}\n\n\t\t// cert error\n\t\ttry {\n\t\t\tassertPkcs12LoadException(new Pkcs12LoadException(new CertificateException()),\n\t\t\t\t\tPkcs12LoadException.Reason.CERTIFICATE_ERROR);\n\t\t} catch (Pkcs12LoadException e) {\n\t\t\t// ignore\n\t\t}\n\t}", "public void importCA(File certfile){\n try {\n File keystoreFile = new File(archivo);\n \n //copia .cer -> formato manipulacion\n FileInputStream fis = new FileInputStream(certfile);\n DataInputStream dis = new DataInputStream(fis);\n byte[] bytes = new byte[dis.available()];\n dis.readFully(bytes);\n ByteArrayInputStream bais = new ByteArrayInputStream(bytes);\n bais.close();\n CertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\n Certificate certs = cf.generateCertificate(bais);\n //System.out.println(certs.toString());\n //inic keystore\n FileInputStream newib = new FileInputStream(keystoreFile);\n KeyStore keystore = KeyStore.getInstance(INSTANCE);\n keystore.load(newib,ksPass );\n String alias = (String)keystore.aliases().nextElement();\n newib.close();\n \n //recupero el array de certificado del keystore generado para CA\n Certificate[] certChain = keystore.getCertificateChain(alias);\n certChain[0]= certs; //inserto el certificado entregado por CA\n //LOG.info(\"Inserto certifica CA: \"+certChain[0].toString());\n //recupero la clave privada para generar la nueva entrada\n Key pk = (PrivateKey)keystore.getKey(alias, ksPass); \n keystore.setKeyEntry(alias, pk, ksPass, certChain);\n LOG.info(\"Keystore actualizado: [OK]\");\n \n FileOutputStream fos = new FileOutputStream(keystoreFile);\n keystore.store(fos,ksPass);\n fos.close(); \n \n } catch (FileNotFoundException ex) {\n LOG.error(\"Error - no se encuentra el archivo\",ex);\n } catch (IOException | NoSuchAlgorithmException | CertificateException | KeyStoreException ex) {\n LOG.error(\"Error con el certificado\",ex);\n } catch (UnrecoverableKeyException ex) {\n LOG.error(ex);\n }\n }", "@Test\n\tpublic void createNewMyKeys() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tboolean r1 = ks.createNewMyKeyPair(\"newkp\");\n\t\tboolean r2 = ks.createNewMyKeyPair(\"newtwo\");\n\t\tassertTrue(\"Should have added the key\", r1);\n\t\tassertTrue(\"Should have added the second key\", r2);\n\t}", "public X509ExtendedKeyManager getKeyManager();", "public static PrivateKey load3tierTestRootCAPrivateKey() {\n return loadPrivateKeyFromResourcePath(\"classpath:attestation/3tier/private/3tier-test-root-CA.der\");\n }", "public void writeToP12(X509Certificate[] certChain, PrivateKey key, char[] password, File file) {\n OutputStream stream = null;\n try {\n \tX509Certificate targetCert = certChain[0];\n stream = new FileOutputStream(file);\n KeyStore ks = KeyStore.getInstance(\"PKCS12\", \"BC\"); \n ks.load(null,null);\n ks.setCertificateEntry(targetCert.getSerialNumber().toString(), targetCert);\n ks.setKeyEntry(targetCert.getSerialNumber().toString(), key, password, certChain);\n ks.store(stream, password);\n } catch (RuntimeException | IOException | GeneralSecurityException e) {\n throw new RuntimeException(\"Failed to write PKCS12 to [\"+file+\"]\", e);\n } finally {\n CloseablesExt.closeQuietly(stream);\n }\n }", "private KeyStore askForPin() throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException {\n char newPin[] = PinDialog.getPIN(this.providerDesc);\n try {\n KeyStore ks = getKeyStore(newPin);\n pin = newPin;\n return ks;\n } catch (IOException e2) {\n e2.printStackTrace();\n if (e2.getCause() instanceof LoginException) {\n JOptionPane.showMessageDialog(null, \"Wrong PIN\", \"Cryptographic card\", JOptionPane.WARNING_MESSAGE);\n }\n throw e2;\n }\n }", "public void storeCertificate(KeyStore keystore, OutputStream os, String keystorePassword) throws CertException;", "public interface CertService {\n\n /**\n * Retrieves the root certificate.\n * \n * @return\n * @throws CertException\n */\n public X509Certificate getRootCertificate() throws CertException;\n\n /**\n * Sets up a root service to be used for CA-related services like certificate request signing and certificate\n * revocation.\n * \n * @param keystore\n * @throws CertException\n */\n public void setRootService(RootService rootService) throws CertException;\n\n /**\n * Retrieves a KeyStore object from a supplied InputStream. Requires a keystore password.\n * \n * @param userId\n * @return\n */\n public KeyStore getKeyStore(InputStream keystoreIS, String password) throws CertException;\n\n /**\n * Retrieves existing private and public key from a KeyStore.\n * \n * @param userId\n * @return\n */\n public KeyPair getKeyPair(KeyStore ks, String keyAlias, String certificateAlias, String keyPassword)\n throws CertException;\n\n /**\n * Retrieves an existing certificate from a keystore using keystore's certificate alias.\n * \n * @param userId\n * @return\n */\n public X509Certificate getCertificate(KeyStore keystore, String certificateAlias) throws CertException;\n\n /**\n * Generates a private key and a public certificate for a user whose X.509 field information was enclosed in a\n * UserInfo parameter. Stores those artifacts in a password protected keystore. This is the principal method for\n * activating a new certificate and signing it with a root certificate.\n * \n * @param userId\n * @return KeyStore based on the provided userInfo\n */\n\n public KeyStore initializeUser(UserInfo userInfo, String keyPassword) throws CertException;\n\n /**\n * Wraps a certificate object into an OutputStream object secured by a keystore password\n * \n * @param keystore\n * @param os\n * @param keystorePassword\n * @throws CertException\n */\n public void storeCertificate(KeyStore keystore, OutputStream os, String keystorePassword) throws CertException;\n\n /**\n * Extracts the email address from a certificate\n * \n * @param certificate\n * @return\n * @throws CertException\n */\n public String getCertificateEmail(X509Certificate certificate) throws CertException;\n\n}", "@Nonnull\n public static KeyStore loadKeyStore(File file, String password)\n throws IOException, GeneralSecurityException {\n KeyStore keyStore = KeyStore.getInstance(\"jks\");\n FileInputStream stream = new FileInputStream(file);\n try {\n keyStore.load(stream, password.toCharArray());\n } finally {\n stream.close();\n }\n return keyStore;\n }", "public void importKeyFromJcaKeystore(KeyStore jcaKeystore,\n String alias, String domain)\n throws IOException, GeneralSecurityException {\n X509Certificate cert;\n byte[] der;\n TLV tbsCert;\n TLV subjectName;\n RSAPublicKey rsaKey;\n String owner;\n long notBefore;\n long notAfter;\n byte[] rawModulus;\n int i;\n int keyLen;\n byte[] modulus;\n byte[] exponent;\n Vector keys;\n\n // get the cert from the keystore\n try {\n cert = (X509Certificate)jcaKeystore.getCertificate(alias);\n } catch (ClassCastException cce) {\n throw new CertificateException(\"Certificate not X.509 type\");\n }\n\n if (cert == null) {\n throw new CertificateException(\"Certificate not found\");\n }\n\n /*\n * J2SE reorders the attributes when building a printable name\n * so we must build a printable name on our own.\n */\n\n /*\n * TBSCertificate ::= SEQUENCE {\n * version [0] EXPLICIT Version DEFAULT v1,\n * serialNumber CertificateSerialNumber,\n * signature AlgorithmIdentifier,\n * issuer Name,\n * validity Validity,\n * subject Name,\n * subjectPublicKeyInfo SubjectPublicKeyInfo,\n * issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,\n * -- If present, version shall be v2 or v3\n * subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,\n * -- If present, version shall be v2 or v3\n * extensions [3] EXPLICIT Extensions OPTIONAL\n * -- If present, version shall be v3\n * }\n */\n der = cert.getTBSCertificate();\n tbsCert = new TLV(der, 0);\n\n // walk down the tree of TLVs to find the subject name\n try {\n // Top level a is Sequence, drop down to the first child\n subjectName = tbsCert.child;\n\n // skip the version if present.\n if (subjectName.type == TLV.VERSION_TYPE) {\n subjectName = subjectName.next;\n }\n\n // skip the serial number\n subjectName = subjectName.next;\n \n // skip the signature alg. id.\n subjectName = subjectName.next;\n \n // skip the issuer\n subjectName = subjectName.next;\n \n // skip the validity\n subjectName = subjectName.next;\n\n owner = parseDN(der, subjectName);\n } catch (NullPointerException e) {\n throw new CertificateException(\"TBSCertificate corrupt 1\");\n } catch (IndexOutOfBoundsException e) {\n throw new CertificateException(\"TBSCertificate corrupt 2\");\n }\n\n notBefore = cert.getNotBefore().getTime();\n notAfter = cert.getNotAfter().getTime();\n\n // get the key from the cert\n try {\n rsaKey = (RSAPublicKey)cert.getPublicKey();\n } catch (ClassCastException cce) {\n throw new RuntimeException(\"Key in certificate is not an RSA key\");\n }\n\n // get the key parameters from the key\n rawModulus = rsaKey.getModulus().toByteArray();\n\n /*\n * the modulus is given as the minimum positive integer,\n * will not padded to the bit size of the key, or may have a extra\n * pad to make it positive. SSL expects the key to be signature\n * bit size. but we cannot get that from the key, so we should\n * remove any zero pad bytes and then pad out to a multiple of 8 bytes\n */\n for (i = 0; i < rawModulus.length && rawModulus[i] == 0; i++);\n\n keyLen = rawModulus.length - i;\n keyLen = (keyLen + 7) / 8 * 8;\n modulus = new byte[keyLen];\n\n int k, j;\n for (k = rawModulus.length - 1, j = keyLen - 1;\n k >= 0 && j >= 0; k--, j--) {\n modulus[j] = rawModulus[k];\n }\n\n exponent = rsaKey.getPublicExponent().toByteArray();\n\n // add the key\n keys = keystore.findKeys(owner);\n if (keys != null) {\n boolean duplicateKey = false;\n\n for (int n = 0; !duplicateKey && n < keys.size(); n++) {\n PublicKeyInfo key = (PublicKeyInfo)keys.elementAt(n);\n\n if (key.getOwner().equals(owner)) {\n byte[] temp = key.getModulus();\n\n if (modulus.length == temp.length) {\n duplicateKey = true;\n for (int m = 0; j < modulus.length && m < temp.length;\n m++) {\n if (modulus[m] != temp[m]) {\n duplicateKey = false;\n break;\n }\n }\n }\n }\n }\n \n if (duplicateKey) {\n throw new CertificateException(\n \"Owner already has this key in the ME keystore\");\n }\n }\n \n keystore.addKey(new PublicKeyInfo(owner, notBefore, notAfter,\n modulus, exponent, domain));\n }", "public MyKeyManager(Parameters p) throws Exception {\n\t\tparms = p;\n\t\tKeyManager[] keymanager = null; \n\t\tint printKeyManager = parms.getPrintKeyStore(); // if the key store should be printed\n\t\tString keyStoreName = parms.getKeystoreName();\n\t\tString keyStorePassword = parms.getKeyStorePassword();\n\t\tString keyStoreType = parms.getKeystoreType();\n\t\t\n\t\tSystem.out.println(\"==KeyManager KeyStore name:\" +keyStoreName + \", type:\" + keyStoreType );\n\t\t// AlgorithmConstraints a = new AlgorithmConstraints();\n\t\ttry {\n\t\t\t// standard stuff \n\t\t\tkeyStore = KeyStore.getInstance(keyStoreType );\n\t\t\tkeyStore.load(new FileInputStream(keyStoreName), keyStorePassword.toCharArray());\n\t\t\t\n\t\t\tSystem.out.println(\"==KeyManager provider:\" + keyStore.getProvider().toString());\n\t\t\t// list all of the names in the keystore \n\t\t\tif (printKeyManager > 0 )\n\t\t\t\tprintKeyStore(printKeyManager);\n\t\t//\tsummariseKeyStore();\n\t\t\t// set it up - standard stuff\n\t\t\tKeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());\n\n\t\t\t// read the file into the key manager factory\n\t\t\tkeyManagerFactory.init(keyStore, keyStorePassword.toCharArray());\n\t\t\tkeymanager = keyManagerFactory.getKeyManagers();\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"NoSuchAlgorithmException EXCEPTION:\" + e);\n\t\t\t// e.printStackTrace();\n\t\t\tthrow e;\n\t\t} catch (UnrecoverableKeyException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"UnrecoverableKeyException EXCEPTION:\" + e);\n\t\t\t// e.printStackTrace();\n\t\t\tthrow e;\n\t\t} catch (KeyStoreException | CertificateException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tthrow e;\n\t\t}\n\t\tmyKeyManager = (X509KeyManager) keymanager[0];\n\t}", "public static void main(String... args) throws Exception {\n String password = CipherFactory.KEYSTORE_PASSWORD;\n KeyStore store = CipherFactory.getKeyStore(password);\n printKeystore(store, password);\n }", "@Override\n public String getProviderName() {\n return \"SimpleEncryptionKeyStoreProvider\";\n }", "public MEKeyTool(String meKeystoreFilename)\n throws FileNotFoundException, IOException {\n\n FileInputStream input;\n\n input = new FileInputStream(new File(meKeystoreFilename));\n\n try {\n keystore = new PublicKeyStoreBuilderBase(input);\n } finally {\n input.close();\n }\n }", "public LocalRsaKeyLoader( CryptoService crypto, KeyStorageApi keyClient, DataStore dataStore )\n throws KodexException {\n if ( crypto == null || dataStore == null || keyClient == null ) {\n throw new KodexException(\n \"Crypto service, key network client, and data store are required to load from disk\" );\n }\n this.keyClient = keyClient;\n this.crypto = crypto;\n this.dataStore = dataStore;\n }", "private static void keyPairGenerator() throws NoSuchAlgorithmException, IOException {\n KeyPairGenerator kpg = KeyPairGenerator.getInstance(\"RSA\");\n kpg.initialize(2048);\n KeyPair keyPair = kpg.generateKeyPair();\n\n //Get public and private keys\n Key publicKey = keyPair.getPublic();\n Key privateKey = keyPair.getPrivate();\n\n String outFile = files_path + \"/Client_public\";\n PrintStream out = null;\n out = new PrintStream(new FileOutputStream(outFile + \".key\"));\n out.write(publicKey.getEncoded());\n out.close();\n\n outFile = files_path + \"/Client_private\";\n out = new PrintStream(new FileOutputStream(outFile + \".key\"));\n out.write(privateKey.getEncoded());\n out.close();\n\n System.err.println(\"Private key format: \" + privateKey.getFormat());\n // prints \"Private key format: PKCS#8\" on my machine\n\n System.err.println(\"Public key format: \" + publicKey.getFormat());\n // prints \"Public key format: X.509\" on my machine\n\n }", "@PostConstruct\n public void init() {\n KeyGenerator keyGen;\n try {\n int KEK_SIZE = 256;\n String KEK_ALGORITHM = \"AES\";\n\n keyGen = KeyGenerator.getInstance(KEK_ALGORITHM);\n keyGen.init(KEK_SIZE);\n\n SecretKey secretKey = keyGen.generateKey();\n byte[] encodedKey = secretKey.getEncoded();\n String baseKek = new String(Hex.encode(encodedKey));\n KeyDto key = new KeyDto(baseKek);\n keyValueOperations.put(KEK_STORAGE_PATH, key);\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n }", "public static PrivateKey loadPrivateKey(String path, String alias, String storepassword) {\n\n PrivateKey privateKey = null;\n try {\n KeyStore keyStore = KeyStore.getInstance(\"JKS\");\n keyStore.load(new FileInputStream(path), storepassword.toCharArray());\n KeyStore.PrivateKeyEntry prvKeyEntry = (KeyStore.PrivateKeyEntry) keyStore.getEntry(alias, new KeyStore.PasswordProtection(storepassword.toCharArray()));\n privateKey = prvKeyEntry.getPrivateKey();\n } catch (Exception e) {\n Logger.error(\"Error loading private key\");\n } finally {\n return privateKey;\n }\n }", "public java.security.KeyPair generateKeyPair() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00ef in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.dsa.KeyPairGeneratorSpi.generateKeyPair():java.security.KeyPair, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.dsa.KeyPairGeneratorSpi.generateKeyPair():java.security.KeyPair\");\n }", "private CryptoSunJCE() {\n\t}", "public MEKeyTool(File meKeystoreFile)\n throws FileNotFoundException, IOException {\n\n FileInputStream input;\n\n input = new FileInputStream(meKeystoreFile);\n\n try {\n keystore = new PublicKeyStoreBuilderBase(input);\n } finally {\n input.close();\n }\n }", "public static File createTempKeyStore( String keyStoreName, char[] keyStorePassword ) throws IOException, KeyStoreException,\n NoSuchAlgorithmException, CertificateException, InvalidKeyException, NoSuchProviderException, SignatureException\n {\n File keyStoreFile = Files.createTempFile( keyStoreName, \"ks\" ).toFile();\n keyStoreFile.deleteOnExit();\n \n KeyStore keyStore = KeyStore.getInstance( KeyStore.getDefaultType() );\n \n try ( InputStream keyStoreData = new FileInputStream( keyStoreFile ) )\n {\n keyStore.load( null, keyStorePassword );\n }\n\n // Generate the asymmetric keys, using EC algorithm\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance( \"EC\" );\n KeyPair keyPair = keyPairGenerator.generateKeyPair();\n \n // Generate the subject's name\n X500Principal owner = new X500Principal( \"CN=apacheds,OU=directory,O=apache,C=US\" );\n\n // Create the self-signed certificate\n X509Certificate certificate = CertificateUtil.generateSelfSignedCertificate( owner, keyPair, 365, \"SHA256WithECDSA\" );\n \n keyStore.setKeyEntry( \"apachedsKey\", keyPair.getPrivate(), keyStorePassword, new X509Certificate[] { certificate } );\n \n try ( FileOutputStream out = new FileOutputStream( keyStoreFile ) )\n {\n keyStore.store( out, keyStorePassword );\n }\n \n return keyStoreFile;\n }", "public MEKeyTool(InputStream meKeystoreStream)\n throws IOException {\n keystore = new PublicKeyStoreBuilderBase(meKeystoreStream);\n }", "public KeyStore initializeUser(UserInfo userInfo, String keyPassword) throws CertException;", "public interface IKeyCreator {\n byte[] generateKey(int n);\n\n byte[] getKeyFromFile(String p);\n\n byte[] inputKey(String s);\n}", "org.openxmlformats.schemas.presentationml.x2006.main.STCryptProv xgetCryptProviderType();", "@Override\n public void setKeyStore(KeyStore keyStore) {\n this.keyStore = keyStore;\n }", "public static void createKeyStore(String filename,\n String password, String keyPassword, String alias,\n Key privateKey, Certificate cert)\n throws GeneralSecurityException, IOException {\n KeyStore ks = createEmptyKeyStore();\n ks.setKeyEntry(alias, privateKey, keyPassword.toCharArray(),\n new Certificate[]{cert});\n saveKeyStore(ks, filename, password);\n }", "public void setKeyStore(KeyStore keyStore) {\n this.keyStore = keyStore;\n }", "public Object create(String key_letters) throws XtumlException;", "void saveFrom(String key, InputStream stream);", "private void createSSLContext() throws Exception {\n\n char[] passphrase = \"passphrase\".toCharArray();\n\n KeyStore ks = KeyStore.getInstance(\"JKS\");\n ks.load(new FileInputStream(\"testkeys\"), passphrase);\n\n KeyManagerFactory kmf = KeyManagerFactory.getInstance(\"SunX509\");\n kmf.init(ks, passphrase);\n\n TrustManagerFactory tmf = TrustManagerFactory.getInstance(\"SunX509\");\n tmf.init(ks);\n\n sslContext = SSLContext.getInstance(\"TLS\");\n sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);\n }", "public KeyEncryptionKeyInfo() {\n }", "protected static void setKeyStorePath(String keyStorePath) {\n Program.keyStorePath = keyStorePath;\n Program.authType = AUTH_TYPE.CERT;\n }", "private static SecretKey createSymmetricKey()\n\t{\n\t\tSecretKey secretKey = null;\n\n\t\ttry\n\t\t{\n\t\t\tKeyGenerator keyGen = KeyGenerator.getInstance(inputAlgorithmForFileEncryption);\n\t\t\tkeyGen.init(128);\n\t\t\tsecretKey = keyGen.generateKey();\n\t\t} catch (NoSuchAlgorithmException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn secretKey;\n\t}", "@Test\n public void testSslJks_loadTrustStoreFromFile() throws Exception {\n final InputStream inputStream = this.getClass().getResourceAsStream(\"/keystore.jks\");\n final String tempDirectoryPath = System.getProperty(\"java.io.tmpdir\");\n final File jks = new File(tempDirectoryPath + File.separator + \"keystore.jks\");\n final FileOutputStream outputStream = new FileOutputStream(jks);\n final byte[] buffer = new byte[1024];\n int noOfBytes = 0;\n while ((noOfBytes = inputStream.read(buffer)) != -1) {\n outputStream.write(buffer, 0, noOfBytes);\n }\n\n final MockVault mockVault = new MockVault(200, \"{\\\"data\\\":{\\\"value\\\":\\\"mock\\\"}}\");\n final Server server = VaultTestUtils.initHttpsMockVault(mockVault);\n server.start();\n\n final VaultConfig vaultConfig = new VaultConfig()\n .address(\"https://127.0.0.1:9998\")\n .token(\"mock_token\")\n .sslConfig(new SslConfig().trustStoreFile(jks).build())\n .build();\n final Vault vault = new Vault(vaultConfig);\n final LogicalResponse response = vault.logical().read(\"secret/hello\");\n\n VaultTestUtils.shutdownMockVault(server);\n }", "public SecretKey LoadAESKey(String keyFile) {\n\t\t\tObject[] keyb = null;\n\t\t\tbyte[] kb = null;\n\t\t\ttry {\n\t\t\t\t//keyb = Files.readAllBytes(Paths.get(keyFile));\n\t\t\t\tkeyb = this.ProcessAfterBytes(new File(keyFile), 16);\n\t\t\t\tkb = new byte[keyb.length];\n\t\t\t\tfor(int i=0; i<keyb.length;i+=1)\n\t\t\t\t\tkb[i]=(byte)keyb[i];\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\tSecretKeySpec skey = new SecretKeySpec(kb, \"AES\");\n\t\t\treturn skey;\n\t\t}", "public void importKeyFromJcaKeystore(String jcakeystoreFilename,\n String keystorePassword,\n String alias, String domain)\n throws IOException, GeneralSecurityException {\n FileInputStream keystoreStream;\n KeyStore jcaKeystore;\n\n // Load the keystore\n keystoreStream = new FileInputStream(new File(jcakeystoreFilename));\n\n try {\n jcaKeystore = KeyStore.getInstance(KeyStore.getDefaultType());\n\n if (keystorePassword == null) {\n jcaKeystore.load(keystoreStream, null);\n } else {\n jcaKeystore.load(keystoreStream,\n keystorePassword.toCharArray());\n }\n } finally {\n keystoreStream.close();\n }\n\n importKeyFromJcaKeystore(jcaKeystore,\n alias,\n domain);\n }", "Set getLocalKeySet();", "private void Initiat_Service(Object serviceAdm,Utilisateur user_en_cours) {\n\t\tlog.debug(\"user_en_cours.trustedApplication:\"+user_en_cours.trustedApplication);\n\t\t\t\tString filename =propIdentification.getProperty(Long.toString(user_en_cours.trustedApplication));\n\t\t\t\tlog.debug(\"filename:\"+filename);\n\t\t\t\t//System.out.println(\"my file \"+filename);\n\t\t\t\tFileInputStream is=null;\n\t\t\t\ttry {\n\t\t\t\t\tis = new FileInputStream(filename);\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tKeyStore myKeyStore=null;\n\t\t\t\ttry {\n\t\t\t\t\tmyKeyStore = KeyStore.getInstance(KeyStore.getDefaultType());\n\t\t\t\t} catch (KeyStoreException e2) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\t\t\t\tString password =propIdentification.getProperty(Long.toString(user_en_cours.trustedApplication)+\".password\");\n\n\t\t\t\ttry {\n\t\t\t\t\tmyKeyStore.load(is, password.toCharArray());\n\t\t\t\t} catch (NoSuchAlgorithmException e2) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t} catch (CertificateException e2) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t} catch (IOException e2) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tString filenameTrust =prop.getProperty(\"clienttrustore\");\n\t\t\t\tFileInputStream myKeys = null;\n\t\t\t\ttry {\n\t\t\t\t\tmyKeys = new FileInputStream(filenameTrust);\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t// Load your TrustedStore\n\t\t\t\tKeyStore myTrustedStore=null;\n\t\t\t\ttry {\n\t\t\t\t\tmyTrustedStore = KeyStore.getInstance(KeyStore.getDefaultType());\n\t\t\t\t} catch (KeyStoreException e2) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tmyTrustedStore.load(myKeys, prop.getProperty(\"clienttrustore.password\").toCharArray());\n\t\t\t\t} catch (NoSuchAlgorithmException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (CertificateException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (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\ttry {\n\t\t\t\t\tWSConnection.setupTLS(serviceAdm, myKeyStore, password, myTrustedStore);\n\t\t\t\t} catch (GeneralSecurityException 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}", "private void createStore() {\n\n try {\n\n MailboxProtocolEnum curMbPrtcl = this.loginData.getMailboxProtocol();\n\n // Get a Properties and Session object\n Properties props = JavamailUtils.getProperties();\n\n // Trustmanager needed?\n if(curMbPrtcl.isUseOfSsl()) {\n\n MailSSLSocketFactory socketFactory = new MailSSLSocketFactory();\n socketFactory.setTrustManagers(new TrustManager[]\n { this.trustManager });\n\n props.put((\"mail.\" + curMbPrtcl.getProtocolId() + \".ssl.socketFactory\"),\n socketFactory);\n }\n\n Session session = Session.getInstance(props, null);\n session.setDebug(false);\n\n this.store = session.getStore(curMbPrtcl.getProtocolId());\n }\n catch(NoSuchProviderException e) {\n\n throw(new RuntimeException((\"Unknown Protocol: \" +\n this.loginData.getMailboxProtocol()), e));\n }\n catch(GeneralSecurityException gse) {\n\n throw(new RuntimeException((\"Security-problem: \" + gse.getMessage()),\n gse));\n }\n }", "private static void createKeyFiles(String pass, String publicKeyFilename, String privateKeyFilename) throws Exception {\n\t\tString password = null;\n\t\tif (pass.isEmpty()) {\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tSystem.out.print(\"Password to encrypt the private key: \");\n\t\t\tpassword = in.readLine();\n\t\t\tSystem.out.println(\"Generating an RSA keypair...\");\n\t\t} else {\n\t\t\tpassword = pass;\n\t\t}\n\t\t\n\t\t// Create an RSA key\n\t\tKeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n\t\tkeyPairGenerator.initialize(1024);\n\t\tKeyPair keyPair = keyPairGenerator.genKeyPair();\n\n\t\tSystem.out.println(\"Done generating the keypair.\\n\");\n\n\t\t// Now we need to write the public key out to a file\n\t\tSystem.out.print(\"Public key filename: \");\n\n\t\t// Get the encoded form of the public key so we can\n\t\t// use it again in the future. This is X.509 by default.\n\t\tbyte[] publicKeyBytes = keyPair.getPublic().getEncoded();\n\n\t\t// Write the encoded public key out to the filesystem\n\t\tFileOutputStream fos = new FileOutputStream(publicKeyFilename);\n\t\tfos.write(publicKeyBytes);\n\t\tfos.close();\n\n\t\t// Now we need to do the same thing with the private key,\n\t\t// but we need to password encrypt it as well.\n\t\tSystem.out.print(\"Private key filename: \");\n \n\t\t// Get the encoded form. This is PKCS#8 by default.\n\t\tbyte[] privateKeyBytes = keyPair.getPrivate().getEncoded();\n\n\t\t// Here we actually encrypt the private key\n\t\tbyte[] encryptedPrivateKeyBytes = passwordEncrypt(password.toCharArray(), privateKeyBytes);\n\n\t\tfos = new FileOutputStream(privateKeyFilename);\n\t\tfos.write(encryptedPrivateKeyBytes);\n\t\tfos.close();\n\t}", "protected abstract InputStream openPrivateKeyStream(String id)\n throws FileNotFoundException, KeyStorageException, IOException;", "synchronized SecretKey loadSecretKeyForEncryption(String defaultBlobVersion) throws IOException,\n GeneralSecurityException {\n // Loading key only once for performance. If API is upgraded, it will\n // restart the device anyway. It will load the correct key for new API.\n if (mKey != null && mHMACKey != null) {\n return mKey;\n }\n\n mBlobVersion = defaultBlobVersion;\n return getKeyOrCreate(mBlobVersion);\n }", "public void saveKeystore(File meKeystoreFile) throws IOException {\n FileOutputStream output;\n\n output = new FileOutputStream(meKeystoreFile);\n\n keystore.serialize(output);\n output.close();\n }", "synchronized SecretKey loadSecretKeyForEncryption() throws IOException,\n GeneralSecurityException {\n final byte[] secretKeyData = AuthenticationSettings.INSTANCE.getSecretKeyData();\n return loadSecretKeyForEncryption(secretKeyData == null ? VERSION_ANDROID_KEY_STORE : VERSION_USER_DEFINED);\n }", "@Override\n public synchronized void saveKey(char[] key, String catalogName)\n throws SecurityKeyException\n {\n if (key == null || key.length < 1) {\n LOG.info(\"key is null or empty, will not create keystore for catalog[%s].\", catalogName);\n return;\n }\n createStoreDirIfNotExists();\n createAndSaveKeystore(key, catalogName);\n }", "@Test\n\tpublic void getMyKeyPairs() {\n\t\tRsaKeyStore ks = new RsaKeyStore();\n\t\tks.createNewMyKeyPair(\"ichi\");\n\t\tks.createNewMyKeyPair(\"ni\");\n\t\tKeyPair kp = ks.getMyKeyPair(\"ichi\");\n\t\tassertNotNull(\"should have returned keypair\", kp);\n\t\tKeyPair kpp = ks.getMyKeyPair(\"ni\");\n\t\tassertNotNull(\"should have returned keypair\", kpp);\n\t}", "private void createSslStartTlsKeystoreSection( FormToolkit toolkit, Composite parent )\n {\n // Creation of the section, compacted\n Section section = toolkit.createSection( parent, Section.TITLE_BAR | Section.TWISTIE | Section.COMPACT );\n section.setText( Messages.getString( \"LdapLdapsServersPage.SslStartTlsKeystore\" ) ); //$NON-NLS-1$\n section.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );\n Composite composite = toolkit.createComposite( section );\n toolkit.paintBordersFor( composite );\n GridLayout glayout = new GridLayout( 3, false );\n composite.setLayout( glayout );\n section.setClient( composite );\n\n // Keystore File Text\n toolkit.createLabel( composite, Messages.getString( \"LdapLdapsServersPage.Keystore\" ) ); //$NON-NLS-1$\n keystoreFileText = toolkit.createText( composite, \"\" ); //$NON-NLS-1$\n setGridDataWithDefaultWidth( keystoreFileText, new GridData( SWT.FILL, SWT.CENTER, true, false ) );\n keystoreFileBrowseButton = toolkit.createButton( composite,\n Messages.getString( \"LdapLdapsServersPage.Browse\" ), SWT.PUSH ); //$NON-NLS-1$\n\n // Password Text\n toolkit.createLabel( composite, Messages.getString( \"LdapLdapsServersPage.Password\" ) ); //$NON-NLS-1$\n keystorePasswordText = toolkit.createText( composite, \"\" ); //$NON-NLS-1$\n keystorePasswordText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );\n keystorePasswordText.setEchoChar( '\\u2022' );\n\n // Show Password Checkbox\n toolkit.createLabel( composite, \"\" ); //$NON-NLS-1$\n showPasswordCheckbox = toolkit.createButton( composite,\n Messages.getString( \"LdapLdapsServersPage.ShowPassword\" ), SWT.CHECK ); //$NON-NLS-1$\n showPasswordCheckbox.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, false ) );\n showPasswordCheckbox.setSelection( false );\n }", "private static void setupKeysAndCertificates() throws Exception {\n // set up our certificates\n //\n KeyPairGenerator kpg = KeyPairGenerator.getInstance(\"RSA\", \"BC\");\n\n kpg.initialize(1024, new SecureRandom());\n\n String issueDN = \"O=Punkhorn Software, C=US\";\n issueKP = kpg.generateKeyPair();\n issueCert = Utils.makeCertificate(\n issueKP, issueDN, issueKP, issueDN);\n\n //\n // certificate we sign against\n //\n String signingDN = \"CN=William J. Collins, E=punkhornsw@gmail.com, O=Punkhorn Software, C=US\";\n signingKP = kpg.generateKeyPair();\n signingCert = Utils.makeCertificate(\n signingKP, signingDN, issueKP, issueDN);\n\n certList = new ArrayList<>();\n\n certList.add(signingCert);\n certList.add(issueCert);\n\n decryptingKP = signingKP;\n\n }", "String newKey();", "private void initialiseSSLContext(KeyStore keystore, char[] password) throws NoSuchAlgorithmException, UnrecoverableKeyException, KeyStoreException, KeyManagementException{\n\t\tKeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());\n\t\tkmf.init(keystore, password);\n\t\tSSLContext sc = SSLContext.getInstance(\"TLS\");\n\t\t// TODO use trust factory?\n\t\tsc.init(kmf.getKeyManagers(), null, null);\t\t\n\t}", "private String exportkey() {\n\n\t\ttry {\n\t\t\tbyte[] keyBytes = serversharedkey.getEncoded();\n\t\t\tString encodedKey = new String(Base64.encodeBase64(keyBytes), \"UTF-8\");\n\t\t\tFile file = new File(\"serversharedKey\");\n\t\t\t//System.out.println(\"The server Private key: \" + encodedKey);\n\t\t\tPrintWriter writer = new PrintWriter(file, \"UTF-8\");\n\t\t\twriter.println(encodedKey);\n\t\t\twriter.close();\n\n\t\t\treturn encodedKey;\n\n\t\t} catch (UnsupportedEncodingException | FileNotFoundException ex) {\n\t\t\tLogger.getLogger(ClientTCP.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t\treturn null;\n\t}", "public void generateKeys() {\r\n try {\r\n SecureRandom random = SecureRandom.getInstance(Constants.SECURE_RANDOM_ALGORITHM);\r\n KeyPairGenerator generator = KeyPairGenerator.getInstance(Constants.ALGORITHM);\r\n generator.initialize(Constants.KEY_BIT_SIZE, random);\r\n \r\n KeyPair keys = generator.genKeyPair();\r\n \r\n persistPrivateKey(keys.getPrivate().getEncoded());\r\n persistPublicKey(keys.getPublic().getEncoded());\r\n logger.log(Level.INFO, \"Done with generating persisting Public and Private Key.\");\r\n \r\n } catch (NoSuchAlgorithmException ex) {\r\n logger.log(Level.SEVERE, \"En error occured while generating the Public and Private Key\");\r\n }\r\n }", "public static KeyStore getKeyStoreFromFile(String keystoreName, String password,\n String home) throws Exception {\n Path tenantKeystorePath = Paths.get(home, \"repository\", \"resources\", \"security\", keystoreName);\n FileInputStream file = new FileInputStream(tenantKeystorePath.toString());\n KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType());\n keystore.load(file, password.toCharArray());\n return keystore;\n }", "public interface KeyManager {\n CreateKeyResponse createKey(CreateKeyRequest createKeyRequest);\n RegisterKeyResponse registerKey(RegisterKeyRequest registerKeyRequest);\n RegisterKeyResponse registerAsymmetricKey(RegisterAsymmetricKeyRequest registerKeyRequest);\n DeleteKeyResponse deleteKey(DeleteKeyRequest deleteKeyRequest);\n TransferKeyResponse transferKey(TransferKeyRequest keyRequest);\n GetKeyAttributesResponse getKeyAttributes(GetKeyAttributesRequest keyAttributesRequest);\n SearchKeyAttributesResponse searchKeyAttributes(SearchKeyAttributesRequest searchKeyAttributesRequest);\n}", "public static void save() {\n\t\tif (!init)\n\t\t\tinit();\n\n\t\tDocument xmlDocument = DocumentHelper.createDocument();\n\n\t\tElement root = xmlDocument.addElement(\"protocolstore\");\n\n\t\tint id = 1;\n\n\t\tfor (ProtocolDescriptor td : installedAddons) {\n\t\t\tif (!td.storable) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tElement protocol = root.addElement(\"protocol\");\n\t\t\tprotocol.addAttribute(\"id\", \"\" + (id++));\n\t\t\tprotocol.addAttribute(\"file\", td.getFile().getName());\n\n\t\t\ttd.saveDescriptor();\n\t\t}\n\n\t\ttry {\n\t\t\tOutputFormat format = OutputFormat.createPrettyPrint();\n\n\t\t\tif (!Key.KEY_PROTOCOLSTORE_FILE.exists()) {\n\t\t\t\tKey.KEY_PROTOCOLSTORE_FILE.getParentFile().mkdirs();\n\t\t\t\tKey.KEY_PROTOCOLSTORE_FILE.createNewFile();\n\t\t\t}\n\n\t\t\tXMLWriter writer = new XMLWriter(new FileWriter(\n\t\t\t\t\tKey.KEY_PROTOCOLSTORE_FILE), format);\n\t\t\twriter.write(xmlDocument);\n\t\t\twriter.close();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}" ]
[ "0.6492084", "0.6210159", "0.60817724", "0.6064591", "0.59495026", "0.5904438", "0.5881924", "0.58552986", "0.5841382", "0.57842153", "0.5782277", "0.5734569", "0.56391203", "0.5593054", "0.5570046", "0.5508655", "0.54962456", "0.5453428", "0.54419947", "0.53832036", "0.53819835", "0.5354916", "0.53505725", "0.5303216", "0.5299582", "0.529494", "0.5276293", "0.52575636", "0.5239871", "0.52209175", "0.5194968", "0.5185494", "0.516832", "0.5164967", "0.51638633", "0.51570314", "0.5152318", "0.5143587", "0.5133652", "0.5132376", "0.5103755", "0.5101962", "0.5101416", "0.5088399", "0.5079403", "0.5078317", "0.50581795", "0.50445694", "0.5038847", "0.50320184", "0.50016093", "0.49775773", "0.49775764", "0.49531955", "0.4913951", "0.48818305", "0.48796576", "0.48454934", "0.48442957", "0.4830244", "0.48267922", "0.48145208", "0.48117167", "0.4808776", "0.48065704", "0.47891858", "0.47783798", "0.47734097", "0.47485295", "0.47438085", "0.47382864", "0.47342247", "0.47285983", "0.4725182", "0.47181866", "0.4716304", "0.4707609", "0.4702667", "0.46744186", "0.46716475", "0.46701083", "0.46454033", "0.46434465", "0.46400917", "0.46273232", "0.46034467", "0.46027598", "0.46016806", "0.4598147", "0.45934418", "0.4591168", "0.45896864", "0.4580981", "0.4578795", "0.45786127", "0.4577532", "0.45775", "0.45769405", "0.4575509", "0.45704347" ]
0.53749603
21
Copy files from srcHost to dstHost. Files are copied using overthere. So from file to file or from directory to directory. If copySpec's length is even then files/directories are copied pair wise. If copySpec's lenght is odd then everything is copied into the last entry.
public static void copyFiles(OverthereConnection srcHost, OverthereConnection dstHost, List<String> copySpec) { if (copySpec.isEmpty()) { return; } if (copySpec.size() % 2 == 0) { Iterator<String> toCopy = copySpec.iterator(); while (toCopy.hasNext()) { OverthereFile src = srcHost.getFile(toCopy.next()); OverthereFile dst = dstHost.getFile(toCopy.next()); src.copyTo(dst); } } else { List<String> srcFiles = copySpec.subList(0, copySpec.size() - 1); OverthereFile dst = dstHost.getFile(copySpec.get(copySpec.size() - 1)); for (String srcFile : srcFiles) { OverthereFile src = srcHost.getFile(srcFile); src.copyTo(dst); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void copy(File src, File dst) throws IOException \r\n {\r\n InputStream in = new FileInputStream(src);\r\n OutputStream out = new FileOutputStream(dst);\r\n \r\n // Transfer bytes from in to out\r\n byte[] buf = new byte[1024];\r\n int len;\r\n while ((len = in.read(buf)) > 0) \r\n {\r\n out.write(buf, 0, len);\r\n }\r\n in.close();\r\n out.close();\r\n }", "public boolean copy(File fileToLoadOrig, boolean withDuplicate, List<String> passedFiles) {\n //Let us get the current Date\n Date date = new Date();\n LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n int year = localDate.getYear();\n int month = localDate.getMonthValue();\n int day = localDate.getDayOfMonth();\n\n String destDirectoryPath = year + \"-\" + month + \"-\" + day;\n\n //check if directory is created\n\n File destDirecoty = new File(\"./testing/dest/\" + destDirectoryPath);\n System.out.println(\"the file path:\" + destDirecoty.getAbsolutePath());\n\n if (!destDirecoty.exists()) {\n System.out.println(\"creating a new directory with path:\" + destDirecoty.getAbsolutePath());\n boolean created = destDirecoty.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n System.out.println(\"Directory is created\");\n //Great, now let us check if the file already in the dirctory\n\n\n boolean duplicateFound = false;\n\n\n File[] sourceFiles = fileToLoadOrig.listFiles();\n\n for (File sourceFile : sourceFiles) {\n //let us get the file extension\n String sourceFileType = \"\";\n int location = sourceFile.getName().lastIndexOf('.');\n if (location > 0) {\n sourceFileType = sourceFile.getName().substring(location + 1);\n }\n //cool, let us go on\n String nestedDirectory;\n switch (sourceFileType) {\n case \"txt\":\n nestedDirectory = \"txt\";\n break;\n case \"pdf\":\n nestedDirectory = \"pdf\";\n break;\n case \"xls\":\n nestedDirectory = \"xls\";\n default:\n nestedDirectory = \"others\";\n }\n\n //check if the type directory is created or not\n File nestedDirecotyFile = new File(destDirecoty.getAbsolutePath()+\"/\" + nestedDirectory);\n System.out.println(\"the file path:\" + nestedDirecotyFile.getAbsolutePath());\n\n if (!nestedDirecotyFile.exists()) {\n System.out.println(\"creating a new directory with path:\" + nestedDirecotyFile.getAbsolutePath());\n boolean created = nestedDirecotyFile.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n\n\n\n File[] destinationFiles = nestedDirecotyFile.listFiles();\n\n for (File destinationFile : destinationFiles) {\n if (destinationFile.getName().equals(sourceFile.getName())) {\n if (withDuplicate) {\n int maxSeqNum = 0;\n //Let us find the last sequence of the destinationFile\n for (File fileForDuplicate : destinationFiles) {\n String[] fileParts = fileForDuplicate.getName().split(\"_\");\n if (fileParts.length == 2) {\n //got a split\n if (fileParts[0].equals(destinationFile.getName())) {\n maxSeqNum = Math.max(maxSeqNum, Integer.parseInt(fileParts[1]));\n }\n }else{\n new RuntimeException(\"Files were found with multiple _\");\n }\n }\n String newFilePath = sourceFile.getName() + \"_\" + (maxSeqNum + 1);\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + newFilePath));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n } else {\n // let us delete the destinationFile and replace it\n destinationFile.delete();\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n break;\n } else {\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n }\n\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n\n }\n return true;\n }", "public static void copy(String suffix) {\r\n boolean success = false;\r\n boolean doVideo = true;\r\n String imgSrcDir = zipDir0 + \"/R\";\r\n String videoSrcDir = zipDir0 + \"/Video\";\r\n String imgDstDir = rImagesDir0 + \"/Images\" + suffix;\r\n String videoDstDir = rVideoDir0 + \"/Video\" + suffix;\r\n File imgSrcDirFile = new File(imgSrcDir);\r\n File videoSrcDirFile = new File(videoSrcDir);\r\n File imgDstDirFile = new File(imgDstDir);\r\n File videoDstDirFile = new File(videoDstDir);\r\n\r\n // Check and create directories\r\n if(!imgSrcDirFile.isDirectory()) {\r\n System.err.println(\"Not a directory: \" + imgSrcDirFile.getPath());\r\n System.exit(1);\r\n }\r\n if(!videoSrcDirFile.isDirectory()) {\r\n doVideo = false;\r\n }\r\n if(!imgDstDirFile.isDirectory()) {\r\n success = imgDstDirFile.mkdir();\r\n if(!success) {\r\n System.err.println(\"Cannot create: \" + imgDstDirFile.getPath());\r\n System.exit(1);\r\n }\r\n }\r\n if(doVideo && !videoDstDirFile.isDirectory()) {\r\n success = videoDstDirFile.mkdir();\r\n if(!success) {\r\n System.err.println(\"Cannot create: \" + videoDstDirFile.getPath());\r\n System.exit(1);\r\n }\r\n }\r\n\r\n // Images\r\n System.out.println(\"\\nCopying images:\");\r\n System.out.println(\"From: \" + imgSrcDirFile.getPath());\r\n System.out.println(\"To: \" + imgDstDirFile.getPath());\r\n success = CopyUtils.copyDirectory(imgSrcDirFile, imgDstDirFile, saveSuffix);\r\n if(!success) {\r\n System.err.println(\"Copy failed:\\n From: \" + imgSrcDirFile.getPath()\r\n + \"\\n To: \" + imgDstDirFile.getPath() + \"\\n\");\r\n }\r\n\r\n // Video\r\n System.out.println(\"\\nCopying video:\");\r\n if(!doVideo) {\r\n System.out.println(\"No video found\");\r\n return;\r\n }\r\n System.out.println(\"From: \" + videoSrcDirFile.getPath());\r\n System.out.println(\"To: \" + videoDstDirFile.getPath());\r\n success = CopyUtils.copyDirectory(videoSrcDirFile, videoDstDirFile,\r\n saveSuffix);\r\n if(!success) {\r\n System.err.println(\"Copy failed:\\n From: \" + videoSrcDirFile.getPath()\r\n + \"\\n To: \" + videoDstDirFile.getPath() + \"\\n\");\r\n }\r\n }", "private static void copyFiles(File source, File dest) throws IOException {\n\t\tif(!source.equals(dest))\n\t\t\tFileUtils.copyFile(source, dest);\n\t}", "@Test(groups = \"Integration\")\n public void testCopyFileTo() throws Exception {\n File dest = Os.newTempFile(getClass(), \".dest.tmp\");\n File src = Os.newTempFile(getClass(), \".src.tmp\");\n try {\n Files.write(\"abc\", src, Charsets.UTF_8);\n host.copyTo(src, dest);\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n src.delete();\n dest.delete();\n }\n }", "void copyFile(String sourceFile, String destinationFile) throws IOException;", "public void copyAll(String src_path, String dest_path) {\n String sub_directory = null;\n for (String device : this.execAdbDevices()) {\n sub_directory = this.deviceid_hostname_map.get(device);\n this.copy(device, src_path, dest_path + File.separator + sub_directory);\n }\n }", "public void copy(){\n\t\tFileInputStream is = null;\n\t\tFileOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(source);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\tif(dest.exists())\n\t\t\t\tdest.delete();\n\t\t\tint i = -1;\n\t\t\twhile((i = is.read()) != -1)\n\t\t\t\tos.write(i);\n\t\t\tsource.deleteOnExit();\n\t\t} catch (IOException e) {\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t} finally {\n\t\t\tif(is != null)\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException ignored) {}\n\t\t\tif(os != null)\n\t\t\t\ttry {\n\t\t\t\t\tos.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t\t\t}\n\t\t}\n\t}", "private void copyFile(InputStream ins, OutputStream outs) throws IOException {\n byte[] buffer = new byte[1024];\n int read;\n while((read = ins.read(buffer)) != -1) {\n outs.write(buffer, 0, read);\n }\n }", "private void createSrcAndWorkFilesWithDifferentChecksum(FileSystem fs,\n String targetBase,\n String sourceBase,\n String filename,\n int blocksPerChunk)\n throws IOException {\n\n long srcSeed = System.currentTimeMillis();\n long dstSeed = srcSeed + rand.nextLong();\n int bufferLen = 128;\n short replFactor = 2;\n Path srcData = new Path(sourceBase + filename);\n\n // create data with 2 chunks: the 2nd chunk has half of the block size\n long firstChunkLength = BLOCK_SIZE * blocksPerChunk;\n long secondChunkLength = BLOCK_SIZE / 2;\n\n DFSTestUtil.createFile(fs, srcData,\n bufferLen, firstChunkLength, BLOCK_SIZE, replFactor,\n srcSeed);\n DFSTestUtil.appendFileNewBlock((DistributedFileSystem) fs, srcData,\n (int) secondChunkLength);\n\n DFSTestUtil.createFile(fs, new Path(targetBase\n + filename + \".____distcpSplit____0.\"\n + firstChunkLength), bufferLen,\n firstChunkLength, BLOCK_SIZE, replFactor, dstSeed);\n DFSTestUtil.createFile(fs, new Path(targetBase\n + filename + \".____distcpSplit____\"\n + firstChunkLength + \".\" + secondChunkLength), bufferLen,\n secondChunkLength, BLOCK_SIZE, replFactor, dstSeed);\n }", "public void copyFile(File src, File dst) throws IOException {\n File file = new File(dst + File.separator + src.getName());\n file.createNewFile();\n Log.i(\"pictureSelect\", \"Dest file: \" + file.getAbsolutePath());\n\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(file);\n\n // Transfer bytes from in to out\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n in.close();\n out.close();\n scanSD(file);\n }", "void copyFile(String sourceFile, String destinationFile, boolean overwrite) throws IOException;", "private void copyFiles() {\n if( !USE_EXTERNAL_FILES_DIR ) return;\n boolean ret = mFileUtil.copyFilesAssetToExternalFilesDir( FILE_EXT );\n if(ret) {\n showList();\n showToast(\"copy successful\");\n } else {\n showToast(\"copy faild\");\n }\n}", "@Override\n public boolean doWork() {\n\n logger.debug(\"CopyCommand->doWork()\");\n\n // Parameter ermitteln\n strSrcFile = getValueForKey(CONST_PARAM_SCRFILE);\n strDestFile = getValueForKey(CONST_PARAM_DESTFILE);\n bIsDirectory = Boolean.parseBoolean(getValueForKey(CONST_PARAM_ISDIRECTORY));\n\n // TODO: richtigen Replaces einfuegen\n VarReplace objVarRepl = new VarReplace();\n strSrcFile = objVarRepl.replacePlaceholder(strSrcFile);\n strDestFile = objVarRepl.replacePlaceholder(strDestFile);\n\n if ((strSrcFile == null) || (strDestFile == null)) {\n return false;\n }\n else if (new File(strSrcFile).isDirectory()) {\n try {\n FileUtils.copyDirectory(new File(strSrcFile), new File(strDestFile));\n }\n catch (IOException ioe) {\n logger.error(\" unable to copy file: \" + ioe.getMessage());\n }\n return true;\n\n }\n else {\n try {\n if (new File(strDestFile).getName().startsWith(\"v\")\n || new File(strDestFile).getName().startsWith(\"z\")) {\n strDestFile = new File(strDestFile).getParent() + File.separator\n + new File(strDestFile).getName().toUpperCase();\n }\n logger.debug(\"srcFile: \" + strSrcFile + \", destFile: \" + strDestFile);\n\n if (!new File(strSrcFile).getParentFile().exists()) {\n logger.debug(\"srcFile parent folder existiert nicht: \" + new File(strSrcFile).getParent());\n }\n\n if (!new File(strSrcFile).exists()) {\n logger.debug(\"srcFile existiert nicht: \" + new File(strSrcFile).getAbsolutePath());\n }\n\n if (!new File(strDestFile).getParentFile().exists()) {\n logger.debug(\"destFile parent folder existstiert nicht: \"\n + new File(strDestFile).getParentFile().getAbsolutePath());\n new File(strDestFile).getParentFile().mkdirs();\n }\n\n FileUtils.copyFile(new File(strSrcFile), new File(strDestFile));\n }\n catch (IOException ioe) {\n\n logger.error(\" unable to copy file: \" + ioe.getMessage());\n\n ioe.printStackTrace();\n\n while (iCounter < 20) {\n\n logger.debug(\"IOException loop: \" + iCounter);\n\n try {\n logger.debug(\"wait 20 seconds\");\n Thread.sleep(TimeUnit.SECONDS.toMillis(20));\n }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n try {\n FileUtils.copyFile(new File(strSrcFile), new File(strDestFile));\n logger.debug(\"break loop\");\n break;\n }\n catch (IOException e) {\n\n logger.debug(\"again an exception: \" + e.getMessage());\n }\n\n iCounter++ ;\n\n logger.debug(\"try it ounce again\");\n\n }\n\n }\n return true;\n }\n\n }", "@Test\n public void testCopyFileUsingChannel() throws Exception {\n long start = System.nanoTime();\n CopyFile.copyFileUsingChannel(sourceFile, channelDestFile);\n System.out.println(\"Time taken by file channel using:\" + (System.nanoTime() - start) / 1000);\n }", "private boolean copyFile(FileInputStream srcStream, String filePath) {\n FileChannel srcChannel;\n FileOutputStream destStream;\n Throwable th;\n if (srcStream != null) {\n if (filePath != null) {\n FileOutputStream destStream2 = null;\n FileChannel dstChannel = null;\n FileChannel dstChannel2 = null;\n try {\n destStream2 = new FileOutputStream(createDestFile(filePath));\n FileChannel srcChannel2 = srcStream.getChannel();\n try {\n FileChannel dstChannel3 = destStream2.getChannel();\n try {\n srcChannel2.transferTo(0, srcChannel2.size(), dstChannel3);\n boolean isSuccess = true;\n try {\n srcChannel2.close();\n } catch (IOException e) {\n isSuccess = false;\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n try {\n destStream2.close();\n } catch (IOException e2) {\n isSuccess = false;\n Log.e(TAG, \"destStream close error, IOException:\");\n }\n if (dstChannel3 != null) {\n try {\n dstChannel3.close();\n } catch (IOException e3) {\n Log.e(TAG, \"dstChannel close error, IOException:\");\n return false;\n }\n }\n return isSuccess;\n } catch (FileNotFoundException e4) {\n dstChannel2 = dstChannel3;\n dstChannel = srcChannel2;\n boolean isSuccess2 = false;\n Log.e(TAG, \"copyFile FileNotFoundException.\");\n if (dstChannel != null) {\n try {\n dstChannel.close();\n } catch (IOException e5) {\n isSuccess2 = false;\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n }\n if (destStream2 != null) {\n try {\n destStream2.close();\n } catch (IOException e6) {\n Log.e(TAG, \"destStream close error, IOException:\");\n isSuccess2 = false;\n }\n }\n if (dstChannel2 == null) {\n return isSuccess2;\n }\n dstChannel2.close();\n return isSuccess2;\n } catch (IOException e7) {\n dstChannel2 = dstChannel3;\n dstChannel = srcChannel2;\n boolean isSuccess3 = false;\n try {\n Log.e(TAG, \"init IO error, IOException:\");\n if (dstChannel != null) {\n try {\n dstChannel.close();\n } catch (IOException e8) {\n isSuccess3 = false;\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n }\n if (destStream2 != null) {\n try {\n destStream2.close();\n } catch (IOException e9) {\n Log.e(TAG, \"destStream close error, IOException:\");\n isSuccess3 = false;\n }\n }\n if (dstChannel2 == null) {\n return isSuccess3;\n }\n try {\n dstChannel2.close();\n return isSuccess3;\n } catch (IOException e10) {\n Log.e(TAG, \"dstChannel close error, IOException:\");\n return false;\n }\n } catch (Throwable th2) {\n srcChannel = dstChannel2;\n destStream = destStream2;\n th = th2;\n }\n } catch (Throwable th3) {\n destStream = destStream2;\n th = th3;\n srcChannel = dstChannel3;\n dstChannel = srcChannel2;\n if (dstChannel != null) {\n try {\n dstChannel.close();\n } catch (IOException e11) {\n Log.e(TAG, \"rcChannel close error, IOException:\");\n }\n }\n if (destStream != null) {\n try {\n destStream.close();\n } catch (IOException e12) {\n Log.e(TAG, \"destStream close error, IOException:\");\n }\n }\n if (srcChannel != null) {\n try {\n srcChannel.close();\n } catch (IOException e13) {\n Log.e(TAG, \"dstChannel close error, IOException:\");\n }\n }\n throw th;\n }\n } catch (FileNotFoundException e14) {\n dstChannel = srcChannel2;\n boolean isSuccess22 = false;\n Log.e(TAG, \"copyFile FileNotFoundException.\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n } catch (IOException e15) {\n dstChannel = srcChannel2;\n boolean isSuccess32 = false;\n Log.e(TAG, \"init IO error, IOException:\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n } catch (Throwable th4) {\n dstChannel = srcChannel2;\n srcChannel = null;\n destStream = destStream2;\n th = th4;\n if (dstChannel != null) {\n }\n if (destStream != null) {\n }\n if (srcChannel != null) {\n }\n throw th;\n }\n } catch (FileNotFoundException e16) {\n boolean isSuccess222 = false;\n Log.e(TAG, \"copyFile FileNotFoundException.\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n } catch (IOException e17) {\n boolean isSuccess322 = false;\n Log.e(TAG, \"init IO error, IOException:\");\n if (dstChannel != null) {\n }\n if (destStream2 != null) {\n }\n if (dstChannel2 == null) {\n }\n }\n }\n }\n return false;\n }", "public static synchronized void initializeArchiveFiles() {\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.initializeArchiveFiles\");\n File sourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"QVCSEnterpriseServer.kbwb\");\n String firstDestinationDirName = System.getProperty(USER_DIR)\n + File.separator\n + QVCSConstants.QVCS_PROJECTS_DIRECTORY\n + File.separator\n + getTestProjectName();\n File firstDestinationDirectory = new File(firstDestinationDirName);\n firstDestinationDirectory.mkdirs();\n File firstDestinationFile = new File(firstDestinationDirName + File.separator + \"QVCSEnterpriseServer.kbwb\");\n\n String secondDestinationDirName = firstDestinationDirName + File.separator + SUBPROJECT_DIR_NAME;\n File secondDestinationDirectory = new File(secondDestinationDirName);\n secondDestinationDirectory.mkdirs();\n File secondDestinationFile = new File(secondDestinationDirName + File.separator + \"QVCSEnterpriseServer.kbwb\");\n\n String thirdDestinationDirName = secondDestinationDirName + File.separator + SUBPROJECT2_DIR_NAME;\n File thirdDestinationDirectory = new File(thirdDestinationDirName);\n thirdDestinationDirectory.mkdirs();\n File thirdDestinationFile = new File(thirdDestinationDirName + File.separator + \"ThirdDirectoryFile.kbwb\");\n\n File fourthDestinationFile = new File(firstDestinationDirName + File.separator + \"Server.kbwb\");\n File fifthDestinationFile = new File(firstDestinationDirName + File.separator + \"AnotherServer.kbwb\");\n File sixthDestinationFile = new File(firstDestinationDirName + File.separator + \"ServerB.kbwb\");\n File seventhDestinationFile = new File(firstDestinationDirName + File.separator + \"ServerC.kbwb\");\n try {\n ServerUtility.copyFile(sourceFile, firstDestinationFile);\n ServerUtility.copyFile(sourceFile, secondDestinationFile);\n ServerUtility.copyFile(sourceFile, thirdDestinationFile);\n ServerUtility.copyFile(sourceFile, fourthDestinationFile);\n ServerUtility.copyFile(sourceFile, fifthDestinationFile);\n ServerUtility.copyFile(sourceFile, sixthDestinationFile);\n ServerUtility.copyFile(sourceFile, seventhDestinationFile);\n } catch (IOException ex) {\n Logger.getLogger(TestHelper.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private Step copyRemoteFiles() {\n return stepBuilderFactory.get(STEP_COPY_REMOTE_FILES)\n .tasklet(copyRemoteFilesTask)\n .build();\n }", "static void copyFile(File src, File dest) throws IOException {\r\n\t\tFileInputStream fis = new FileInputStream(src);\r\n\t\tFileOutputStream fos = new FileOutputStream (dest);\r\n\t\tbyte[] bytes = new byte[4*1048576];\r\n\t\tint numRead;\r\n\t\twhile ((numRead = fis.read(bytes)) > 0) {\r\n\t\t\tfos.write(bytes, 0, numRead);\r\n\t\t}\r\n\t\tfis.close();\r\n\t\tfos.close();\r\n\t}", "public static void smartCopyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] fromFiles = fromDir.listFiles();\n \t\t\tint fromSize = fromFiles.length;\n \t\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), 550);\n \t\n \t\t\tFile[] toFiles = null;\n \t\n \t\t\t// delete old files and directories from this directory\n \t\t\tif (toDir.exists() && toDir.isDirectory()) {\n \t\t\t\ttoFiles = toDir.listFiles();\n \t\t\t\tint toSize = toFiles.length;\n \t\n \t\t\t\t// check if this exact file exists in the new directory\n \t\t\t\tfor (int i = 0; i < toSize; i++) {\n \t\t\t\t\tString name = toFiles[i].getName();\n \t\t\t\t\tboolean isDir = toFiles[i].isDirectory();\n \t\t\t\t\tboolean found = false;\n \t\t\t\t\tfor (int j = 0; j < fromSize; j++) {\n \t\t\t\t\t\tif (name.equals(fromFiles[j].getName()) && isDir == fromFiles[j].isDirectory())\n \t\t\t\t\t\t\tfound = true;\n \t\t\t\t\t}\n \t\n \t\t\t\t\t// delete file if it can't be found or isn't the correct type\n \t\t\t\t\tif (!found) {\n \t\t\t\t\t\tif (isDir)\n \t\t\t\t\t\t\tPublishUtil.deleteDirectory(toFiles[i], null);\n \t\t\t\t\t\telse\n \t\t\t\t\t\t\ttoFiles[i].delete();\n \t\t\t\t\t}\n \t\t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tif (toDir.isFile())\n \t\t\t\t\ttoDir.delete();\n \t\t\t\ttoDir.mkdir();\n \t\t\t}\n \t\t\tmonitor.worked(50);\n \t\n \t\t\t// cycle through files and only copy when it doesn't exist\n \t\t\t// or is newer\n \t\t\ttoFiles = toDir.listFiles();\n \t\t\tint toSize = toFiles.length;\n \t\t\tint dw = 0;\n \t\t\tif (toSize > 0)\n \t\t\t\tdw = 500 / toSize;\n \t\n \t\t\tfor (int i = 0; i < fromSize; i++) {\n \t\t\t\tFile current = fromFiles[i];\n \t\n \t\t\t\t// check if this is a new or newer file\n \t\t\t\tboolean copy = true;\n \t\t\t\tif (!current.isDirectory()) {\n \t\t\t\t\tString name = current.getName();\n \t\t\t\t\tlong mod = current.lastModified();\n \t\t\t\t\tfor (int j = 0; j < toSize; j++) {\n \t\t\t\t\t\tif (name.equals(toFiles[j].getName()) && mod <= toFiles[j].lastModified())\n \t\t\t\t\t\t\tcopy = false;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\n \t\t\t\tif (copy) {\n \t\t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\t\tString toFile = to;\n \t\t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\t\ttoFile += File.separator;\n \t\t\t\t\ttoFile += current.getName();\n \t\t\t\t\tif (current.isFile()) {\n \t\t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\t\tmonitor.worked(dw);\n \t\t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\t\tsmartCopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, dw));\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.worked(500 - dw * toSize);\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error smart copying directory \" + from + \" - \" + to, e);\n \t\t}\n \t}", "public static boolean copyFile(String src, String dst) {\n FileChannel inChannel = null;\n FileChannel outChannel = null;\n try {\n inChannel = new FileInputStream(new File(src)).getChannel();\n outChannel = new FileOutputStream(new File(dst)).getChannel();\n inChannel.transferTo(0, inChannel.size(), outChannel);\n } catch (FileNotFoundException e) {\n MessageGenerator.briefError(\"ERROR could not find/access file(s): \" + src + \" and/or \" + dst);\n return false;\n } catch (IOException e) {\n MessageGenerator.briefError(\"ERROR copying file: \" + src + \" to \" + dst);\n return false;\n } finally {\n try {\n if (inChannel != null)\n inChannel.close();\n if (outChannel != null)\n outChannel.close();\n } catch (IOException e) {\n MessageGenerator.briefError(\"Error closing files involved in copying: \" + src + \" and \" + dst);\n return false;\n }\n }\n return true;\n }", "public static void copyFiles(File src, File dest) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"copyFiles: Can not find source: \" + src.getAbsolutePath() + \".\");\n } else if (!src.canRead()) { //check to ensure we have rights to the source...\n throw new IOException(\"copyFiles: No right to source: \" + src.getAbsolutePath() + \".\");\n }\n //is this a directory copy?\n if (src.isDirectory()) {\n if (!dest.exists()) { //does the destination already exist?\n //if not we need to make it exist if possible (note this is mkdirs not mkdir)\n if (!dest.mkdirs()) {\n throw new IOException(\"copyFiles: Could not create direcotry: \" + dest.getAbsolutePath() + \".\");\n }\n }\n //get a listing of files...\n String list[] = src.list();\n //copy all the files in the list.\n for (int i = 0; i < list.length; i++) {\n File dest1 = new File(dest, list[i]);\n File src1 = new File(src, list[i]);\n copyFiles(src1, dest1);\n }\n } else {\n //This was not a directory, so lets just copy the file\n try {\n copy(new FileInputStream(src), new FileOutputStream(dest));\n } catch (IOException e) { //Error copying file...\n IOException wrapper = new IOException(\"copyFiles: Unable to copy file: \"\n + src.getAbsolutePath() + \"to\" + dest.getAbsolutePath() + \".\");\n wrapper.initCause(e);\n wrapper.setStackTrace(e.getStackTrace());\n throw wrapper;\n }\n }\n }", "public void copyFile(String src, String dst) throws IOException {\n\n\t\tFile srcFile = new File(src);\n\t\tFile dstFile = new File(dst);\n\n\t\tcopyFile(srcFile, dstFile);\n\t}", "@Test\n public void testCopyFileUsingJavaFiles() throws Exception {\n long start = System.nanoTime();\n CopyFile.copyFileUsingJavaFiles(sourceFile, filesDestFile);\n System.out.println(\"Time taken by files using:\" + (System.nanoTime() - start) / 1000);\n }", "public static void copy(String owner, Path src, Path target) throws CWLException {\r\n final Path finalSrc = toFinalSrcPath(src);\r\n if (src.toFile().exists() && Files.isReadable(src)) {\r\n CopyOption[] options = new CopyOption[] {\r\n StandardCopyOption.COPY_ATTRIBUTES,\r\n StandardCopyOption.REPLACE_EXISTING\r\n };\r\n final Path finalTarget = toFinalTargetPath(src, target);\r\n if (!finalTarget.getParent().toFile().exists()) {\r\n logger.debug(\"mkdir \\\"{}\\\"\", finalTarget.getParent());\r\n mkdirs(owner, finalTarget.getParent());\r\n }\r\n logger.debug(\"copy \\\"{}\\\" to \\\"{}\\\"\", finalSrc, finalTarget);\r\n try {\r\n if (finalSrc.toFile().isDirectory()) {\r\n Files.walkFileTree(finalSrc, new FileVisitor<Path>() {\r\n @Override\r\n public FileVisitResult preVisitDirectory(Path dir,\r\n BasicFileAttributes attrs) throws IOException {\r\n Files.copy(dir, finalTarget.resolve(finalSrc.relativize(dir)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\r\n Files.copy(file, finalTarget.resolve(finalSrc.relativize(file)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\r\n throw exc;\r\n }\r\n });\r\n } else {\r\n Files.copy(finalSrc, finalTarget, options);\r\n }\r\n } catch (IOException e) {\r\n throw new CWLException(\r\n ResourceLoader.getMessage(\"cwl.io.copy.failed\",\r\n finalSrc.toString(),\r\n finalTarget.toString(),\r\n e.getMessage()),\r\n 255);\r\n }\r\n } else {\r\n throw new CWLException(ResourceLoader.getMessage(\"cwl.io.file.unaccessed\", finalSrc.toString()),\r\n 255);\r\n }\r\n }", "private static INodeFile[] verifySrcFiles(FSDirectory fsd, String[] srcs,\n INodesInPath targetIIP, FSPermissionChecker pc) throws IOException {\n Set<INodeFile> si = new LinkedHashSet<>();\n final INodeFile targetINode = targetIIP.getLastINode().asFile();\n final INodeDirectory targetParent = targetINode.getParent();\n // now check the srcs\n for (String src : srcs) {\n final INodesInPath iip = fsd.getINodesInPath4Write(src);\n // permission check for srcs\n if (pc != null) {\n fsd.checkPathAccess(pc, iip, FsAction.READ); // read the file\n fsd.checkParentAccess(pc, iip, FsAction.WRITE); // for delete\n }\n\n final INode srcINode = iip.getLastINode();\n final INodeFile srcINodeFile = INodeFile.valueOf(srcINode, src);\n // make sure the src file and the target file are in the same dir\n if (srcINodeFile.getParent() != targetParent) {\n throw new HadoopIllegalArgumentException(\"Source file \" + src\n + \" is not in the same directory with the target \"\n + targetIIP.getPath());\n }\n // source file cannot be the same with the target file\n if (srcINode == targetINode) {\n throw new HadoopIllegalArgumentException(\"concat: the src file \" + src\n + \" is the same with the target file \" + targetIIP.getPath());\n }\n\n if(srcINodeFile.getStoragePolicyID() == HdfsConstants.DB_STORAGE_POLICY_ID) {\n throw new HadoopIllegalArgumentException(\"concat: source file \" + src\n + \" is stored in DB.\");\n }\n\n // source file cannot be under construction or empty\n if(srcINodeFile.isUnderConstruction() || srcINodeFile.numBlocks() == 0) {\n throw new HadoopIllegalArgumentException(\"concat: source file \" + src\n + \" is invalid or empty or underConstruction\");\n }\n // source file's preferred block size cannot be greater than the target\n // file\n if (srcINodeFile.getPreferredBlockSize() >\n targetINode.getPreferredBlockSize()) {\n throw new HadoopIllegalArgumentException(\"concat: source file \" + src\n + \" has preferred block size \" + srcINodeFile.getPreferredBlockSize()\n + \" which is greater than the target file's preferred block size \"\n + targetINode.getPreferredBlockSize());\n }\n si.add(srcINodeFile);\n }\n \n // make sure no two files are the same\n if (si.size() < srcs.length) {\n // it means at least two files are the same\n throw new HadoopIllegalArgumentException(\n \"concat: at least two of the source files are the same\");\n }\n return si.toArray(new INodeFile[si.size()]);\n }", "public static void copyFile(File src, File dst) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"Source file does not exist: \" + src);\n }\n \n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n try (InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(dst)) {\n\n // Transfer bytes from in to out\n byte[] buf = new byte[10240];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n } catch (IOException e) {\n logger.warn(\"Unable to copy file \" + e.getMessage(), e);\n throw new IOException(\"Unable to copy file \", e);\n }\n }", "public static void copyFile(File src, File dst) throws IOException {\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(dst);\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) out.write(buf, 0, len);\n in.close();\n out.close();\n }", "public void copyFile(File src, File dst) throws IOException {\n\t\tInputStream in = new FileInputStream(src);\n\t\tOutputStream out = new FileOutputStream(dst);\n\n\t\t// Transfer bytes from in to out\n\t\tbyte[] buf = new byte[1024];\n\t\tint len;\n\t\twhile ((len = in.read(buf)) > 0) {\n\t\t\tif(logger.isDebugEnabled())\n\t\t\t\tlogger.debug(\"Copiando fichero \" + src.getAbsolutePath() + \" a \"\n\t\t\t\t\t+ dst.getAbsolutePath());\n\t\t\tout.write(buf, 0, len);\n\t\t}\n\t\tin.close();\n\t\tout.close();\n\t}", "static void copyFile(File srcFile, File destFile) {\n\t\ttry {\n\t\t\tLong start = System.currentTimeMillis();\n\t\t\tdestFile.createNewFile();\n\t\t\tInputStream oInStream = new FileInputStream(srcFile);\n\t\t\tOutputStream oOutStream = new FileOutputStream(destFile);\n\n\t\t\t// Transfer bytes from in to out\n\t\t\tbyte[] oBytes = new byte[1024];\n\t\t\tint nLength;\n\t\t\tBufferedInputStream oBuffInputStream = \n\t\t\t\t\tnew BufferedInputStream( oInStream );\n\t\t\twhile ((nLength = oBuffInputStream.read(oBytes)) > 0) {\n\t\t\t\toOutStream.write(oBytes, 0, nLength);\n\t\t\t}\n\t\t\toInStream.close();\n\t\t\toOutStream.close();\n\t\t\tLong end = System.currentTimeMillis();\n\t\t\tSystem.out.println((end-start));\n\t\t} catch (IOException e) {\n\t\t\tlogger.info(\"Error in creating the excels :\" +e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private static void copyFile(File scrFile, File file) {\n\t\r\n}", "private void copyFile(String source, String destination) throws IOException {\n File inputFile = new File(source);\n File outputFile = new File(destination);\n\t\n BufferedInputStream in = new BufferedInputStream(\n\t\t\t\t new FileInputStream(inputFile));\n BufferedOutputStream out = new BufferedOutputStream(\n\t\t\t\t new FileOutputStream(outputFile));\n int c;\n\tbyte[] tmp = new byte[4096];\n\t\n while ((c = in.read(tmp, 0, 4096)) != -1)\n\t out.write(tmp, 0, c);\n\t\n in.close();\n out.close();\n }", "void copyFolder(OrionCMContext ctx, Long sourceId, Long targetFolderId, List<SolutionParam> solutions) throws PhoenixDataAccessException, IOException;", "@Test(groups = \"Integration\")\n public void testCopyStreamTo() throws Exception {\n String contents = \"abc\";\n File dest = new File(Os.tmp(), \"sssMachineLocationTest_dest.tmp\");\n try {\n host.copyTo(Streams.newInputStreamWithContents(contents), dest.getAbsolutePath());\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n dest.delete();\n }\n }", "private static void copyFile(File in, File out)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFileChannel inChannel = new\tFileInputStream(in).getChannel();\n\t\t\tFileChannel outChannel = new FileOutputStream(out).getChannel();\n\t\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\t\t\tinChannel.close();\n\t\t\toutChannel.close();\t\t\t\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.copyFile(): \" + e);\n\t\t}\n\n\t}", "public void copy(String name, String oldPath, String newPath);", "public static void copy(URL src, File dst) throws IOException {\n\n try (InputStream in = src.openStream()) {\n try (OutputStream out = new FileOutputStream(dst)) {\n dst.mkdirs();\n copy(in, out);\n }\n }\n }", "public void copyConfig()\n {\n if (srcParts == null || dstParts == null)\n {\n logger.error(\"VObjectTreeCopier.copyConfig: null source or destination\");\n return;\n }\n if (hasRootTranslation)\n {\n srcParts[rootTranslationIdx].getTranslation(buf);\n dstParts[rootTranslationIdx].setTranslation(buf);\n }\n if (hasTranslation)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getTranslation(buf);\n dstParts[i].setTranslation(buf);\n }\n }\n if (hasRotation)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getRotation(buf);\n dstParts[i].setRotation(buf);\n }\n }\n if (hasScale)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getScale(buf);\n dstParts[i].setScale(buf);\n }\n }\n if (hasVelocity)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getVelocity(buf);\n dstParts[i].setVelocity(buf);\n }\n }\n if (hasAngularVelocity)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getAngularVelocity(buf);\n dstParts[i].setAngularVelocity(buf);\n }\n }\n\n }", "@Test\n public void testCopyFileUsingApacheCommonsIO() throws Exception {\n long start = System.nanoTime();\n CopyFile.copyFileUsingApacheCommonsIO(sourceFile, apacheDestFile);\n System.out.println(\"Time taken by apache using:\" + (System.nanoTime() - start) / 1000);\n }", "public static void copyFile(File source, File destination) throws IOException {\n\tFileChannel sourceChannel = null;\n\tFileChannel destinationChannel = null;\n\ttry {\n\t if (destination.exists()) {\n\t\tdestination.delete();\n\t }\n\t sourceChannel = new FileInputStream(source).getChannel();\n\t destinationChannel = new FileOutputStream(destination).getChannel();\n\t int maxCount = (64 * 1024 * 1024) - (32 * 1024);// magic number for Windows, 64Mb - 32Kb\n\t long size = sourceChannel.size();\n\t long position = 0;\n\t while (position < size) {\n\t\tposition += sourceChannel.transferTo(position, maxCount, destinationChannel);\n\t }\n\t} catch (IOException e) {\n\t throw e;\n\t} finally {\n\t if (null != sourceChannel) {\n\t\tsourceChannel.close();\n\t }\n\t if (null != destinationChannel) {\n\t\tdestinationChannel.close();\n\t }\n\t}\n }", "private void copy(int numBytes) {\n for (int i = 0; i < numBytes; i++) {\n dest[destPos + i] = src[srcPos + i];\n }\n srcPos += numBytes;\n destPos += numBytes;\n }", "public static void copyFileToDir(File src, File dst) throws IOException {\n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n File file = new File(dstAbsPath + File.separator + src.getName());\n copyFile(src, file);\n }", "private static void copyFile(String from, String to)\n\t{\n\t\tFile inputFile;\n\t File outputFile;\n\t\tint fIndex = from.indexOf(\"file:\");\n\t\tint tIndex = to.indexOf(\"file:\");\n\t\tif(fIndex < 0)\n\t\t\tinputFile = new File(from);\n\t\telse\n\t\t\tinputFile = new File(from.substring(fIndex + 5, from.length()));\n\t\tif(tIndex < 0)\n\t\t\toutputFile = new File(to);\n\t\telse\n\t\t\toutputFile = new File(to.substring(tIndex + 5, to.length())); \n\t\tcopyFile(inputFile, outputFile);\t\t\n\t}", "private void copyFile(String source, String destination, Environment env) throws IOException, InvalidPathException {\n\t\tPath sourcePath = Paths.get(source);\n\t\tPath destinationPath = Paths.get(destination);\n\n\t\tif (sourcePath.equals(destinationPath)) {\n\t\t\tenv.writeln(\"The source and the destination can not be equal.\");\n\t\t\treturn;\n\t\t}\n\t\tif (!Files.exists(sourcePath)) {\n\t\t\tenv.writeln(\"The specified file does not exist.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(sourcePath)) {\n\t\t\tenv.writeln(\"Copy command can not copy a directory.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(destinationPath)) {\n\t\t\tdestinationPath = Paths.get(destinationPath.toString(), sourcePath.getFileName().toString());\n\t\t}\n\t\tif (Files.exists(destinationPath)) {\n\t\t\tenv.write(\n\t\t\t\t\t\"There already is a file with the same name at the specified destination. \\nDo you want to overwrite it? [y/n] \");\n\n\t\t\twhile (true) {\n\t\t\t\tString answer;\n\t\t\t\ttry {\n\t\t\t\t\tanswer = env.readLine().trim();\n\t\t\t\t} catch (ShellIOException ex) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (answer.equals(\"n\")) {\n\t\t\t\t\tenv.writeln(\"Operation canceled.\");\n\t\t\t\t\treturn;\n\t\t\t\t} else if (answer.equals(\"y\")) {\n\t\t\t\t\tenv.writeln(\"Operation confirmed.\");\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tenv.writeln(\"Invalid answer. Answer 'y' for 'yes' or 'n' for 'no'.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tBufferedInputStream inputStream = new BufferedInputStream(Files.newInputStream(sourcePath));\n\t\tBufferedOutputStream outputStream = new BufferedOutputStream(Files.newOutputStream(destinationPath));\n\t\twhile (true) {\n\t\t\tint b = inputStream.read();\n\t\t\tif (b == -1) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\toutputStream.write(b);\n\t\t}\n\n\t\tinputStream.close();\n\t\toutputStream.close();\n\t}", "protected abstract boolean copyCheckedFiles();", "public int Copy(final String sSourceFile, final String sDestinationtFile, final int EXISITING_FILE_ACTION) throws Exception {\n OutputStream out = null;\n InputStream in = null;\n File fSrc = null;\n File fDest = null;\n File fDestDir = null;\n byte[] buf = null;\n int len = 0;\n int iFileCopied = 0;\n boolean bProcess = false;\n try {\n\n buf = new byte[4096];\n\n //reating source file object\n fSrc = new File(sSourceFile);\n if (!fSrc.exists()) {\n throw new Exception(\"Source File Does not exists!! :\" + sSourceFile);\n }\n\n //creating output file object\n fDest = new File(sDestinationtFile);\n\n //check for folder/directory\n if (fSrc.isDirectory()) {\n File[] fSubFiles = fSrc.listFiles();\n\n //creating destination directory\n if (!fDest.exists()) {\n fDest.mkdirs();\n }\n\n for (int i = 0; i < fSubFiles.length; i++) {\n String sSourceSubFile = sSourceFile + File.separator + fSubFiles[i].getName();\n String sDestinationtSubFile = sDestinationtFile + File.separator + fSubFiles[i].getName();\n\n iFileCopied = iFileCopied + Copy(sSourceSubFile, sDestinationtSubFile, EXISITING_FILE_ACTION);\n }\n\n //check for file \n } else {\n\n //creating input stream of source file\n in = new FileInputStream(fSrc);\n\n //check for destination file parent directory\n fDestDir = fDest.getParentFile();\n if (!fDestDir.exists()) {\n fDestDir.mkdirs();\n }\n\n //check for exisitng file\n //REPLACE EXISITNG FILE\n if (fDest.exists() && EXISITING_FILE_ACTION == FILE_REPLACE) {\n bProcess = true;\n out = new FileOutputStream(fDest);\n\n //APPEND EXISITNG FILE\n } else if (fDest.exists() && EXISITING_FILE_ACTION == FILE_APPEND) {//For Append the file.\n bProcess = true;\n out = new FileOutputStream(fDest, true);\n\n //COPY WITH TIMESTAMP WITH EXISITNG FILE\n } else if (fDest.exists() && EXISITING_FILE_ACTION == FILE_COPY_WITH_TIMESTAMP) {//For Append the file.\n bProcess = true;\n String sTimeStamp = fDest.lastModified() + \"_\";\n fDest = new File(fDest.getParent() + File.separator + sTimeStamp + fDest.getName());\n out = new FileOutputStream(fDest);\n\n //DO NOTHING EXISITNG FILE\n } else if (fDest.exists() && EXISITING_FILE_ACTION == FILE_DO_NOTHING) {//For Append the file.\n bProcess = false;\n\n //file does not exists\n } else if (!fDest.exists()) {\n bProcess = true;\n out = new FileOutputStream(fDest, true);\n\n }\n\n //loop to read buffer & copy in output file\n while ((len = in.read(buf)) > 0 && bProcess) {\n out.write(buf, 0, len);\n }\n\n iFileCopied = iFileCopied + 1;\n }\n\n return iFileCopied;\n } catch (Exception e) {\n throw e;\n } finally {\n try {\n in.close();\n } catch (Exception e) {\n }\n try {\n out.close();\n } catch (Exception e) {\n }\n in = null;\n out = null;\n fSrc = null;\n fDest = null;\n fDestDir = null;\n }\n }", "@Test\n public void testCopyFile() throws Exception {\n System.out.println(\"copyFile with existing source image file\");\n String sourcePath = System.getProperty(\"user.dir\")+fSeparator+\"src\"+fSeparator+\"test\"+fSeparator+\n \"java\"+fSeparator+\"resources\"+fSeparator+\"testImg.jpg\";\n File source = new File(sourcePath);\n \n File dest = new File(folder.toString()+fSeparator+\"Images\");\n FilesDao instance = new FilesDao();\n boolean result;\n try{\n instance.copyFile(source, dest);\n File copiedFile = new File(dest+fSeparator+\"testImg.jpg\");\n if(copiedFile.exists())\n result = true;\n else\n result = false;\n }catch(Exception ex){\n result = false;\n }\n boolean expResult = true;\n assertEquals(\"Some message\",expResult,result);\n }", "@SuppressFBWarnings(\"DLS_DEAD_LOCAL_STORE\")\n @Override\n protected Collection<CopyEntity> generateCopyEntities()\n throws IOException {\n MultiTimingEvent multiTimer = new MultiTimingEvent(this.helper.getEventSubmitter(), \"TableCopy\", true);\n\n int stepPriority = 0;\n String fileSet = getTable().getTableName();\n List<CopyEntity> copyEntities = Lists.newArrayList();\n\n Optional<Table> existingTargetTable = this.helper.getExistingTargetTable();\n if (existingTargetTable.isPresent()) {\n // Use update policy if user defined table path for their copy location does not match pre-existing table path\n if (!HiveUtils.areTablePathsEquivalent(this.helper.getTargetFs(), this.helper.getTargetTable().getDataLocation(),\n existingTargetTable.get().getDataLocation())) {\n switch (this.helper.getExistingEntityPolicy()){\n case UPDATE_TABLE:\n // Update the location of files while keep the existing table entity.\n log.warn(\"Source table will not be deregistered while file location has been changed, update source table's\"\n + \" file location to\" + this.helper.getTargetTable().getDataLocation());\n existingTargetTable = Optional.absent();\n break ;\n case REPLACE_TABLE:\n case REPLACE_TABLE_AND_PARTITIONS:\n // Required to de-register the original table.\n log.warn(\"Source and target table are not compatible. Will override target table \" + existingTargetTable.get()\n .getDataLocation());\n stepPriority = this.helper.addTableDeregisterSteps(copyEntities, fileSet, stepPriority, this.helper.getTargetTable());\n existingTargetTable = Optional.absent();\n break ;\n default:\n log.error(\"Source and target table are not compatible. Aborting copy of table \" + this.helper.getTargetTable());\n multiTimer.close();\n throw new HiveTableLocationNotMatchException(this.helper.getTargetTable().getDataLocation(),\n existingTargetTable.get().getDataLocation());\n }\n }\n }\n\n stepPriority = this.helper.addSharedSteps(copyEntities, fileSet, stepPriority);\n\n HiveLocationDescriptor sourceLocation =\n HiveLocationDescriptor.forTable(getTable(), getHiveDataset().getFs(), getHiveDataset().getProperties());\n HiveLocationDescriptor desiredTargetLocation =\n HiveLocationDescriptor.forTable(this.helper.getTargetTable(), this.helper.getTargetFs(), getHiveDataset().getProperties());\n\n Optional<HiveLocationDescriptor> existingTargetLocation = existingTargetTable.isPresent() ? Optional.of(\n HiveLocationDescriptor.forTable(existingTargetTable.get(), this.helper.getTargetFs(), getHiveDataset().getProperties()))\n : Optional.<HiveLocationDescriptor> absent();\n\n if (this.helper.getFastTableSkip().isPresent() && this.helper.getFastTableSkip().get().apply(this.helper)) {\n log.info(String.format(\"Skipping copy of table %s due to fast table skip predicate.\", getTable().getDbName()+\".\" + getTable().getTableName()));\n multiTimer.close();\n return Lists.newArrayList();\n }\n\n HiveCopyEntityHelper.DiffPathSet\n diffPathSet = HiveCopyEntityHelper.fullPathDiff(sourceLocation, desiredTargetLocation, existingTargetLocation,\n Optional.<Partition> absent(), multiTimer, this.helper);\n\n multiTimer.nextStage(HiveCopyEntityHelper.Stages.FULL_PATH_DIFF);\n\n // Could used to delete files for the existing snapshot\n DeleteFileCommitStep deleteStep =\n DeleteFileCommitStep.fromPaths(this.helper.getTargetFs(), diffPathSet.pathsToDelete, getHiveDataset().getProperties());\n copyEntities.add(new PrePublishStep(fileSet, Maps.<String, String> newHashMap(), deleteStep, stepPriority++));\n\n for (CopyableFile.Builder builder : this.helper.getCopyableFilesFromPaths(diffPathSet.filesToCopy, this.helper.getConfiguration(),\n Optional.<Partition> absent())) {\n CopyableFile fileEntity =\n builder.fileSet(fileSet).datasetOutputPath(desiredTargetLocation.location.toString()).build();\n fileEntity.setSourceData(this.helper.getSourceDataset());\n fileEntity.setDestinationData(this.helper.getDestinationDataset());\n copyEntities.add(fileEntity);\n }\n\n multiTimer.close();\n return copyEntities;\n }", "@Test\n public void testCopyFileUsingStream() throws Exception {\n long start = System.nanoTime();\n CopyFile.copyFileUsingStream(sourceFile, streamDestFile);\n System.out.println(\"Time taken by file stream using:\" + (System.nanoTime() - start) / 1000);\n }", "private boolean copyFile(File dest) {\n\t\tboolean result = false;\n\n\t\ttry {\n\t\t\tif (this.exists()) {\n\t\t\t\tif (!dest.exists()) dest.mkdirs();\n\t\t\t\t\n\t\t\t\tif (this.isDirectory() && dest.isDirectory()) {\n\t\t\t\t\tdest = new File(dest.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.mkdirs();\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isFile() && dest.isDirectory()) {\n\t\t\t\t\tdest = new File(dest.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.createNewFile();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isDirectory() && dest.isFile()) {\n\t\t\t\t\tdest = new File(dest.getParent().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tdest.mkdirs();\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (this.isFile() && dest.isFile()) {\n\t\t\t\t\tif (dest.exists()) {\n\t\t\t\t\t\tdest = new File(dest.getParent().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\t\tdest.createNewFile();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (this.getName().equals(dest.getName())) {\n\t\t\t\t\t\t//targetFile.deleteOnExit();\n\t\t\t\t\t\t//targetFile = new File(targetFile.getAbsolutePath());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tBufferedInputStream inBuff = null;\n\t\t\t\tBufferedOutputStream outBuff = null;\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tinBuff = new BufferedInputStream(new FileInputStream(this));\n\t\t\t\t\toutBuff = new BufferedOutputStream(new FileOutputStream(dest));\n\n\t\t\t\t\tbyte[] b = new byte[1024 * 5];\n\t\t\t\t\tint length;\n\t\t\t\t\twhile ((length = inBuff.read(b)) != -1) {\n\t\t\t\t\t\toutBuff.write(b, 0, length);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\toutBuff.flush();\n\t\t\t\t\t\n\t\t\t\t\tresult = true;\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}finally{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (inBuff != null) inBuff.close();\n\t\t\t\t\t\tif (outBuff != null) outBuff.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public void copyUserLibFiles(File srcDir, File trgDir) {\n //- get the appropriate list of lib files to exclude\n String osName = System.getProperty(\"os.name\");\n String pkgName = this.getClass().getPackage().getName();\n String excludeFile = pkgName + \".unixV2LibExcludeList\";\n if (osName.indexOf(\"Windows\") != -1) {\n excludeFile = pkgName + \".winV2LibExcludeList\";\n } else if (osName.indexOf(\"Mac\") != -1) {\n excludeFile = pkgName + \".macV2LibExcludeList\";\n }\n String verEd = CommonInfoModel.getInstance().getSource().getVersionEdition();\n if (verEd.startsWith(UpgradeConstants.VERSION_3_0)) {\n excludeFile = excludeFile.replaceFirst(\"V2\", \"V3\");\n }\n\n try {\n String excludeF = excludeFile.replace('.', '/') + \".properties\";\n UpgradeFileFilter fs = new UpgradeFileFilter(excludeF);\n File[] l = srcDir.listFiles(fs);\n\n for (File tmpF : l) {\n if (tmpF.isDirectory()) {\n try {\n File tmpDir = new File(trgDir, tmpF.getName());\n tmpDir.mkdir();\n copyDirectory(tmpF, tmpDir);\n logger.log(Level.INFO,\n stringManager.getString(\"upgrade.common.copied_dir\", tmpDir.getName()));\n } catch (IOException ioe) {\n logger.log(Level.SEVERE,\n stringManager.getString(\"upgrade.common.lib_copy_error\", ioe));\n }\n } else {\n try {\n File tmpFile = new File(trgDir, tmpF.getName());\n copyFile(tmpF.getCanonicalPath(), tmpFile.getCanonicalPath());\n logger.log(Level.INFO,\n stringManager.getString(\"upgrade.common.copied_file\", tmpFile.getName()));\n } catch (IOException ioe) {\n logger.log(Level.SEVERE,\n stringManager.getString(\"upgrade.common.lib_copy_error\", ioe));\n }\n }\n }\n } catch (FileNotFoundException e) {\n logger.log(Level.SEVERE,\n stringManager.getString(\"upgrade.common.lib_exclude_error\", e));\n } catch (IOException io) {\n logger.log(Level.SEVERE,\n stringManager.getString(\"upgrade.common.lib_exclude_error\", io));\n } catch (NullPointerException ne) {\n logger.log(Level.SEVERE,\n stringManager.getString(\"upgrade.common.lib_exclude_error\", ne.toString()));\n }\n }", "private void executeCopyFiles( final File folderResources, final File folderJava, final File targetJavaAppStub,\n final File jarWithDependsSource )\n throws MojoExecutionException\n {\n this.logger.info( \"Copying files ...\" );\n\n final File jarWithDependsTarget = new File( folderJava, jarWithDependsSource.getName() );\n\n if ( JAVA_APP_STUB.exists() == false )\n {\n throw new MojoExecutionException( \"Could not find Java Application stub at: \"\n + JAVA_APP_STUB.getAbsolutePath() );\n }\n\n copyFile( JAVA_APP_STUB, targetJavaAppStub );\n copyFile( jarWithDependsSource, jarWithDependsTarget );\n\n if ( this.data.getAppIcon() != null )\n {\n copyFile( this.data.getAppIcon(), new File( folderResources, this.data.getAppIcon().getName() ) );\n }\n\n if ( this.data.getAdditionalResources() != null )\n {\n for ( int i = 0, n = this.data.getAdditionalResources().size(); i < n; i++ )\n {\n final String rsrc = (String) this.data.getAdditionalResources().get( i );\n\n final File source = new File( this.data.getBaseDirectory(), rsrc );\n final File target = new File( folderResources, source.getName() );\n\n copyFile( source, target );\n }\n }\n }", "public static void copy(String srcPath, String destPath, SourceType sourceType) throws IOException {\n if(StringUtils.isEmpty(srcPath) || StringUtils.isEmpty(destPath) || sourceType == null) {\n throw new IllegalArgumentException(String.format(\n \"Null or empty parameters srcDataPath:%s, dstDataPath:%s, sourceType:%s\", srcPath, destPath,\n sourceType));\n }\n\n FileSystem fs = getFileSystemBySourceType(sourceType);\n // delete all files in dst firstly because of different folder if has dstDataPath\n if(!fs.delete(new Path(destPath), true)) {\n // ignore delete failed, it's ok.\n }\n\n FileUtil.copy(fs, new Path(srcPath), fs, new Path(destPath), false, new Configuration());\n }", "private void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n //Check if sourceFolder is a directory or file\n //If sourceFolder is file; then copy the file directly to new location\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n logAppend(\"Directory created :: \" + destinationFolder);\n nothingDone=false;\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n\n long dateSrc = sourceFolder.lastModified();\n long dateDest = destinationFolder.lastModified();\n\n if (dateSrc > dateDest) {\n //Copy the file content from one place to another\n Files.copy(sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n logAppend(\"File copied :: \" + destinationFolder);\n nothingDone=false;\n }\n\n }\n }", "private static void cp(File f1,File f2) throws IOException{\n\t\tFileInputStream fi=new FileInputStream(f1);\r\n\t\tFileOutputStream fo=new FileOutputStream(f2);\r\n\t\tBufferedOutputStream bof=new BufferedOutputStream(fo);\r\n\t\tBufferedInputStream bis=new BufferedInputStream(fi);\r\n\t\tbyte[] buffer=new byte[1024];\r\n\t\tint off=0;\r\n\t\tint length=1024;\r\n\t\twhile(true){\r\n\t\t\tif(fi.available()<1024){\r\n\t\t\t\tlength=fi.available();}\r\n\t\tbis.read(buffer, off, length);\r\n\t\tbof.write(buffer, off, length);\r\n//\t\tfi.read(buffer, off,length);\r\n//\t\tfo.write(buffer, off, length);\r\n\t\tif(length<1024){\r\n\t\t\tSystem.out.println(f1+\"-->\"+f2+\"复制完成!\");\r\n\t\t\tbof.flush();\r\n\t\t\tfi.close();\r\n\t\t\tfo.close();\r\n\t\t\treturn;}\r\n\t\t}\r\n\t\t\r\n\t}", "public boolean copy(String path, InputStream is) throws SystemException;", "private void copyComponents(IProgressMonitor monitor, File tmpWarDir, final File targetLibDir) throws ExportException\n\t{\n\t\ttry\n\t\t{\n\t\t\tComponentResourcesExporter.copyDefaultComponentsAndServices(tmpWarDir, exportModel.getExcludedComponentPackages(),\n\t\t\t\texportModel.getExcludedServicePackages());\n\n\t\t\tStringBuilder componentLocations = new StringBuilder();\n\t\t\tcomponentLocations.append(ComponentResourcesExporter.getComponentDirectoryNames(exportModel.getExcludedComponentPackages()));\n\t\t\tcomponentLocations.append(copyUserDefinedComponents(tmpWarDir, exportModel.getExcludedComponentPackages(), monitor));\n\t\t\tcreateSpecLocationsPropertiesFile(new File(tmpWarDir, \"WEB-INF/components.properties\"), componentLocations.toString());\n\n\t\t\tStringBuilder servicesLocations = new StringBuilder();\n\t\t\tservicesLocations.append(ComponentResourcesExporter.getServicesDirectoryNames(exportModel.getExcludedServicePackages()));\n\t\t\tservicesLocations.append(copyUserDefinedServices(tmpWarDir, exportModel.getExcludedServicePackages(), monitor));\n\t\t\tcreateSpecLocationsPropertiesFile(new File(tmpWarDir, \"WEB-INF/services.properties\"), servicesLocations.toString());\n\t\t\tcopyNGLibs(targetLibDir);\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\tthrow new ExportException(\"Could not copy the components\", e);\n\t\t}\n\t}", "@SuppressWarnings(\"resource\")\r\n\tpublic static synchronized void copyFile(File source, File dest)\r\n\t\t\tthrows IOException {\r\n\t\tFileChannel srcChannel = null;\r\n\t\tFileChannel dstChannel = null;\r\n\t\ttry {\r\n\t\t\tsrcChannel = new FileInputStream(source).getChannel();\r\n\t\t\tdstChannel = new FileOutputStream(dest).getChannel();\r\n\t\t\tdstChannel.transferFrom(srcChannel, 0, srcChannel.size());\r\n\t\t} finally {\r\n\t\t\tsrcChannel.close();\r\n\t\t\tdstChannel.close();\r\n\t\t}\r\n\t}", "private static void copyFile(Path srcPath, Path destPath) throws IOException {\n try (FileWriter outputStream = new FileWriter(destPath.toFile().getAbsolutePath(), false);\n FileReader inputStream = new FileReader(srcPath.toFile().getAbsolutePath())) {\n int i;\n while ((i = inputStream.read()) != -1) {\n outputStream.write(toChars(i));\n }\n }\n }", "public static void copyFolder(File src, File dest) throws IOException {\n\n\t\tif (src.isDirectory()) {\n\n\t\t\t// if directory not exists, create it\n\t\t\tif (!dest.exists()) {\n\t\t\t\tdest.mkdir();\n\t\t\t\t// System.out.println(\"Directory copied from \" + src + \" to \" +\n\t\t\t\t// dest);\n\t\t\t}\n\n\t\t\t// list all the directory contents\n\t\t\tString files[] = src.list();\n\n\t\t\tfor (String file : files) {\n\t\t\t\t// construct the src and dest file structure\n\t\t\t\tFile srcFile = new File(src, file);\n\t\t\t\tFile destFile = new File(dest, file);\n\t\t\t\t// recursive copy\n\t\t\t\tcopyFolder(srcFile, destFile);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// if file, then copy it\n\t\t\t// Use bytes stream to support all file types\n\t\t\tInputStream in = new FileInputStream(src);\n\t\t\tOutputStream out = new FileOutputStream(dest);\n\n\t\t\tbyte[] buffer = new byte[1024];\n\n\t\t\tint length;\n\t\t\t// copy the file content in bytes\n\t\t\twhile ((length = in.read(buffer)) > 0) {\n\t\t\t\tout.write(buffer, 0, length);\n\t\t\t}\n\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t// System.out.println(\"File copied from \" + src + \" to \" + dest);\n\t\t}\n\t}", "public void copy(int sourceIndex, int destIndex, int length) {\n\t\tint count = getChannelCount();\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tcopy(i, sourceIndex, destIndex, length);\n\t\t}\n\t}", "public static void copy(File srcDir, File relSrcFile, File destDir, File relDestFile) throws IOException {\n File finalSrcFile = (srcDir != null) ? new File(srcDir, relSrcFile.getPath()) : relSrcFile;\n File relDestDir = relDestFile.getParentFile();\n if (relDestDir != null) {\n File finalDestDir = (destDir != null) ? new File(destDir, relDestDir.getPath()) : relDestDir;\n finalDestDir.mkdirs();\n }\n File finalDestFile = new File(destDir, relDestFile.getPath());\n Files.copy(finalSrcFile.toPath(), finalDestFile.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n }", "private static void tezt_readXXXAndWriteXXX_overlapping_instance_FC_FC_io_impl() {\n // Using random arguments, in case treatments actually mess-up\n // with unthought combinations of counts, chunk sizes and byte shifts.\n final Random random = new Random(123456789L);\n // Doing all with a single file.\n final File file = TestUtils.newTempFile();\n final boolean appendMode = false;\n // Used if not using dst as src.\n final FCHolder otherSrcFCH = new FCHolder(file, \"r\");\n final FCHolder dstFCH = new FCHolder(file, \"rw\");\n \n final int maxSize = MAX_COUNT_IO;\n \n try {\n final int nbrOfCopies = NBR_OF_RANDOM_COPIES_IO;\n for (int k=0;k<nbrOfCopies;k++) {\n final int size = 1 + random.nextInt(maxSize);\n final int srcPos = random.nextInt(size);\n final int dstPos = random.nextInt(size);\n final int maxRem = Math.min(size-srcPos, size-dstPos);\n final int count = 1 + random.nextInt(maxRem);\n // Sometimes < count, sometimes not.\n final int maxChunkSize = 1 + random.nextInt(2*count);\n if (DEBUG) {\n System.out.println(\"count = \"+count);\n System.out.println(\"maxChunkSize = \"+maxChunkSize);\n }\n \n System.gc(); // making room\n final ByteCopyUtils utils = newBCU(\n DefaultMBBHelper.INSTANCE,\n false, // threadSafe\n maxChunkSize);\n if (DEBUG) {\n System.out.println(\"utils = \"+utils);\n }\n for (boolean sameInstance : FALSE_TRUE) {\n if (DEBUG) {\n System.out.println(\"sameInstance = \"+sameInstance);\n }\n final FCHolder srcFCH;\n if (sameInstance) {\n srcFCH = dstFCH;\n } else {\n srcFCH = otherSrcFCH;\n }\n\n final boolean posInSrc = false;\n final boolean posInDst = false;\n final boolean readAllCount = true;\n final boolean writeAllRead = true;\n\n dstFCH.setSizeAndFill(size);\n if (!sameInstance) {\n // size is in file\n assertEquals(size, UncheckedIO.size(srcFCH.getFC()));\n }\n final boolean cancelIfHugeCopy = false;\n final boolean checkAdjacentDstBytes = true;\n final boolean mightOverlap = true;\n callAndCheck_readXXXAndWriteXXX(\n utils,\n new MyFCHContainer(srcFCH, appendMode),\n new MyFCHContainer(dstFCH, appendMode),\n srcPos,\n dstPos,\n posInSrc,\n posInDst,\n count,\n readAllCount,\n writeAllRead,\n cancelIfHugeCopy,\n checkAdjacentDstBytes,\n mightOverlap);\n }\n }\n } finally {\n otherSrcFCH.release();\n dstFCH.release();\n }\n }", "private static void moveFiles(String src, String dest, int Num) // \n\t{\n\t File directoryPath = new File(src);\n\t \n\t // Creating filter for directories files, to select files only\n\t FileFilter fileFilter = new FileFilter(){\n\t public boolean accept(File dir) \n\t { \n\t if (dir.isFile()) \n\t {\n\t return true;\n\t } \n\t else \n\t {\n\t return false;\n\t }\n\t }\n\t }; \n\t \n\t // Get list of files in the source folder\n\t File[] list = directoryPath.listFiles(fileFilter);\n\t \n\t int i = 0;\n\t \n\t // Move Num file to destination folder\n\t while ((i < Num) && (i < list.length))\n\t {\n\t \tString srcFileName = src + \"/\" + list[i].getName();\n\t \tString destFileName = dest + \"/\" + list[i].getName();\n\t \tmoveFile(srcFileName, destFileName);\n\t \ti++;\t \t\n\t } \n\t}", "private File copyFiles(String filename, String directoryName) throws IOException { //after\n boolean success = false;\n String finalPath = this.rootLocation + \"/\" + directoryName +\"/\"+ filename;\n String tmpPath = this.tmpLocation + \"/\"+ filename;\n File finalFile = new File(finalPath);\n File directory = new File(this.rootLocation + \"/\" +directoryName);\n if (!directory.exists()) {\n directory.mkdir();\n }\n File tmpFile = new File(tmpPath);\n if(tmpFile.exists() && !tmpFile.isDirectory() && directory.exists() && directory.isDirectory()){\n if(finalFile.exists() && !finalFile.isDirectory()){\n finalFile = getNewName(finalPath);\n log.debug(\"compareToFiles -> rename to \"+ finalFile.getName());\n }\n success = copyFileUsingStream(tmpFile, finalFile);\n }\n\n log.debug(\"success copy...\"+success);\n return finalFile;\n }", "private List<String> copyResources(File targetDirectory, List<FileSet> fileSets) throws MojoExecutionException {\n ArrayList<String> addedFiles = new ArrayList<String>();\n for (FileSet fileSet : fileSets) {\n // Get the absolute base directory for the FileSet\n File sourceDirectory = new File(fileSet.getDirectory());\n\n if (!sourceDirectory.isAbsolute()) {\n sourceDirectory = new File(project.getBasedir(), sourceDirectory.getPath());\n }\n\n if (!sourceDirectory.exists()) {\n // If the requested directory does not exist, log it and carry on\n getLog().warn(\"Specified source directory \" + sourceDirectory.getPath() + \" does not exist.\");\n continue;\n }\n\n List<String> includedFiles = scanFileSet(sourceDirectory, fileSet);\n addedFiles.addAll(includedFiles);\n\n getLog().info(\"Copying \" + includedFiles.size() + \" additional resource\" + (includedFiles.size() > 1 ? \"s\" : \"\"));\n\n for (String destination : includedFiles) {\n File source = new File(sourceDirectory, destination);\n File destinationFile = new File(targetDirectory, destination);\n\n // Make sure that the directory we are copying into exists\n destinationFile.getParentFile().mkdirs();\n\n try {\n FileUtils.copyFile(source, destinationFile);\n destinationFile.setExecutable(fileSet.isExecutable(),false);\n\n } catch (IOException e) {\n throw new MojoExecutionException(\"Error copying additional resource \" + source, e);\n }\n }\n }\n return addedFiles;\n }", "private void mergeFiles(List<File> inputFiles, OutputStream outputStream) throws IOException {\n long startTime = System.nanoTime();\n //Merge files\n for (File f : inputFiles) {\n if (f.exists()) {\n log.info(\"Merging {} size={}\", f.getName(), f.length());\n Files.copy(f.toPath(), outputStream);\n } else {\n log.info(\"Skip merging file {} because it doesn't exist\", f.getName());\n }\n }\n log.debug(\"Time to merge {} s\", ((System.nanoTime() - startTime) / 1000000000.0));\n }", "public long FileChannelCopy(String inFile, String outFile) throws Exception {\n\t\tlong begin = System.currentTimeMillis();\n\t\tFile in = new File(inFile);\n\t\tFile out = new File(outFile);\n\t\tif (out.exists())\n\t\t\tout.delete();\n\t\tFileInputStream fin = new FileInputStream(in);\n\t\tFileOutputStream fout = new FileOutputStream(out);\n\t\tFileChannel inc = fin.getChannel();\n\t\tFileChannel outc = fout.getChannel();\n\t\tint bufferLen = (int) in.length();\n\t\tByteBuffer bb = ByteBuffer.allocateDirect(bufferLen);\n\t\twhile (true) {\n\t\t\tint ret = inc.read(bb);\n\t\t\tif (ret == -1) {\n\t\t\t\tfin.close();\n\t\t\t\tfout.flush();\n\t\t\t\tfout.close();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbb.flip();\n\t\t\toutc.write(bb);\n\t\t\tbb.clear();\n\t\t}\n\t\tlong end = System.currentTimeMillis();\n\t\tlong runtime = 0;\n\t\tif (end > begin)\n\t\t\truntime = end - begin;\n\t\treturn runtime;\n\t}", "@Override\n public void finish() {\n storeProperties();\n // retrieve the full list of files according to the selected mode\n List<org.jajuk.base.File> files = getFiles();\n if (files == null) {\n return;\n }\n // define the target directory\n final Date curDate = new Date();\n // Do not use ':' character in destination directory, it's\n // forbidden under Windows\n final SimpleDateFormat stamp = new SimpleDateFormat(\"yyyyMMdd-HHmm\", Locale.getDefault());\n final String dirName = \"Party-\" + stamp.format(curDate);\n final java.io.File destDir = new java.io.File(((String) data.get(Variable.DEST_PATH)), dirName);\n if (!destDir.mkdir()) {\n Log.warn(\"Could not create destination directory \" + destDir);\n }\n Log.debug(\"Going to copy \" + files.size() + \" files to directory {{\"\n + destDir.getAbsolutePath() + \"}}\");\n // perform the actual copying\n UtilPrepareParty.copyFiles(files, destDir, isTrue(Variable.NORMALIZE_FILENAME),\n isTrue(Variable.ONE_MEDIA_ENABLED) && isTrue(Variable.CONVERT_MEDIA),\n (String) data.get(Variable.ONE_MEDIA), (String) data.get(Variable.CONVERT_COMMAND));\n }", "private void calculateDuplicate(ArrayList<String> pathList) {\n\n HashMap<String, byte[]> pathMdHashMap = new HashMap<>();\n\n for (int i = 0; i < pathList.size(); i++) {\n\n LinkedHashMap<File, String> uniquePathAndFileHash = new LinkedHashMap<>();\n\n if (pathList.get(i) == null || !(new File(pathList.get(i)).isFile()) || !(new File(pathList.get(i)).exists()))\n continue;\n\n byte[] fileHash1 = Constant.fileHash(new File(pathList.get(i)));\n\n if (fileHash1 == null)\n continue;\n\n for (int j = i + 1; j < pathList.size(); j++) {\n\n String path = pathList.get(j);\n\n if (path == null || !(new File(path).isFile()) || !(new File(path).exists()))\n continue;\n\n byte[] fileHash2;\n\n if (pathMdHashMap.containsKey(path)) {\n fileHash2 = pathMdHashMap.get(path);\n } else {\n fileHash2 = Constant.fileHash(new File(pathList.get(j)));\n pathMdHashMap.put(path, fileHash2);\n }\n\n boolean flag = MessageDigest.isEqual(fileHash1, fileHash2);\n\n if (flag) {\n\n if (!uniquePathAndFileHashCopy.containsValue(pathList.get(i))) {\n uniquePathAndFileHash.put(new File(pathList.get(i)), pathList.get(i));\n }\n\n if (!uniquePathAndFileHashCopy.containsValue(path)) {\n uniquePathAndFileHash.put(new File(path), path);\n }\n }\n }\n\n if (uniquePathAndFileHash.size() > 1) {\n\n index++;\n\n\n LinkedHashMap<Integer, LinkedHashMap<File, String>> similarVideo = new LinkedHashMap<>();\n\n similarVideo.put(index, uniquePathAndFileHash);\n\n similarVideoCopy.put(index, uniquePathAndFileHash);\n\n uniquePathAndFileHashCopy.putAll(uniquePathAndFileHash);\n\n\n new Handler(Looper.getMainLooper()).post(() ->\n responseLiveData.setValue(FileRemoverResponse.success(similarVideo)));\n\n }\n }\n\n }", "public void copyFile(InputStream inputStream, OutputStream outputStream) throws IOException\n {\n byte[] buffer = new byte[1024];\n int length;\n while ((length = inputStream.read(buffer)) > 0)\n outputStream.write(buffer, 0, length);\n inputStream.close();\n outputStream.close();\n }", "private static boolean copyDirectory(File from, File to)\n {\n return copyDirectory(from, to, (byte[])null);\n }", "public void copy(String scrpath,String destpath) throws IOException \n\t{\n\t\ttry {\n\t\t\tInputStream in=new FileInputStream(scrpath);\n\t\t\tFileOutputStream out=new FileOutputStream(destpath);\n\t\t\tbyte[] buffer=new byte[1024];\n\t\t\tint length=0;\n\t\t\twhile((length=in.read(buffer))>0) {\n\t\t\t\tSystem.out.println(length);\n\t\t\t\tout.write(buffer,0,length);\n\t\t\t}\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void copyPaste(VMResource copiedRes, long targetId, TreeNode treeNode) {\n\n // copy and paste for Folder\n if (copiedRes instanceof VMDirectory) {\n String name = copiedRes.getName();\n if (treeNode != null && isSameNameExist(treeNode, name, true, \"\")) {\n name += \" - Copy\";\n if (copyNumber != 0) {\n name += \" (\" + copyNumber + \")\";\n }\n }\n VMDirectory newDir = new VMDirectory();\n newDir.setName(name);\n ZGCreateDirCommand createDirCommand = new ZGCreateDirCommand(editResourceService, viewHandler, targetId, newDir);\n createDirCommand.addCommandListener(new CommandListener() {\n\n @Override\n public void undoEvent() {\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.removeVMResource(createDirCommand.getFileId());\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n\n @Override\n public void redoEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createDirCommand.getParentId()), createDirCommand.getDirectory(), createDirCommand.getFileId(),\n false);\n getCopiedResources().get(copiedRes).forEach(res -> {\n copyPaste(res, createDirCommand.getDirectory().getId(), null);\n });\n }\n\n @Override\n public void executeEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createDirCommand.getParentId()), createDirCommand.getDirectory(), createDirCommand.getFileId(),\n false);\n // copy and paste for child resources\n getCopiedResources().get(copiedRes).forEach(res -> {\n copyPaste(res, createDirCommand.getDirectory().getId(), null);\n });\n }\n\n @Override\n public void bindEvent() {\n viewHandler.clear();\n registerRightClickEvent();\n }\n\n });\n\n CompoundCommand c = new CompoundCommand();\n c.append(createDirCommand);\n manager.execute(c.unwrap());\n\n } else if (copiedRes instanceof VMFile) { // copy and paste for file\n VMFile oldFile = (VMFile) copiedRes;\n editResourceService.getFileContent(oldFile.getId(), new AsyncCallback<byte[]>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(byte[] result) {\n String fileExtension = oldFile.getExtensionStr();\n VMFile newFile = new VMFile();\n // create new file name\n String fileName = oldFile.getName();\n if (treeNode != null && isSameNameExist(treeNode, fileName, false, fileExtension)) {\n fileName += \" - Copy\";\n if (copyNumber != 0) {\n fileName += \" (\" + copyNumber + \")\";\n }\n }\n newFile.setName(fileName);\n // get data from old file\n byte[] datas = new byte[result.length];\n for (int i = 0; i < result.length; i++) {\n datas[i] = (byte) (result[i] & 0xFF);\n }\n // Set file extension\n newFile.setExtensionStr(fileExtension);\n\n // create new file command\n ZGCreateFileCommand createFileCommand = new ZGCreateFileCommand(editResourceService, viewHandler, targetId, newFile, null);\n createFileCommand.addCommandListener(new CommandListener() {\n\n @Override\n public void undoEvent() {\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.removeVMResource(createFileCommand.getFileId());\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n\n @Override\n public void redoEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(), createFileCommand.getFileId(),\n false);\n editResourceService.saveFile(createFileCommand.getFileId(), datas, new AsyncCallback<Void>() {\n\n @Override\n public void onFailure(Throwable caught) {\n GWT.log(caught.getMessage());\n }\n\n @Override\n public void onSuccess(Void result) {\n fileTreeNodeFactory.getFileTreeNode(tree, createFileCommand.getParentId(), createFileCommand.getFile());\n if (treeGrid.anySelected())\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n treeGrid.deselectAllRecords();\n treeGrid.selectRecord(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getFileId()));\n }\n });\n }\n\n @Override\n public void executeEvent() {\n // save old file data\n editResourceService.saveFile(createFileCommand.getFileId(), datas, new AsyncCallback<Void>() {\n\n @Override\n public void onFailure(Throwable caught) {\n GWT.log(caught.getMessage());\n }\n\n @Override\n public void onSuccess(Void result) {\n fileTreeNodeFactory.getFileTreeNode(tree, createFileCommand.getParentId(), createFileCommand.getFile());\n if (treeGrid.anySelected())\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n treeGrid.deselectAllRecords();\n treeGrid.selectRecord(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getFileId()));\n }\n });\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(), createFileCommand.getFileId(),\n false);\n }\n\n @Override\n public void bindEvent() {\n viewHandler.clear();\n registerRightClickEvent();\n }\n });\n CompoundCommand c = new CompoundCommand();\n c.append(createFileCommand);\n manager.execute(c.unwrap());\n }\n\n });\n }\n }", "private boolean doSingleFileMove(Path src, Path dst) throws IOException {\n RecoverableWriter writer;\n try {\n writer = fileSystem.createRecoverableWriter();\n } catch (UnsupportedOperationException ignore) {\n // Some writer not support RecoverableWriter, so fallback to per record moving.\n // For example, see the constructor of HadoopRecoverableWriter. Although it not support\n // RecoverableWriter, but HadoopPathBasedBulkFormatBuilder can support streaming\n // writing.\n return false;\n }\n\n RecoverableFsDataOutputStream out = writer.open(dst);\n try (FSDataInputStream in = fileSystem.open(src)) {\n IOUtils.copyBytes(in, out, false);\n } catch (Throwable t) {\n out.close();\n throw t;\n }\n out.closeForCommit().commit();\n return true;\n }", "public void chooseCopyMethod(String[] names){\n\t\tFile check = new File(names[names.length-1]);\n\t\tif(names.length ==2){\n\t\t\tSystem.out.println(\"TWO FILES METHOD\");\n\t\t\tcopyOne(names[0], names[1]);\n\t\t}else if (names.length>2 && check.isDirectory()){\n\t\t\tSystem.out.println(\"MULTIPLE FILES METHOD\");\n\t\t\tcopyMultiple(names);\n\t\t}else{\n\t\t\tSystem.out.println(\"ERROR: Invalid entry.\");\n\t\t}\n\t}", "public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from); // set path of source directory from parent function\r\n Path dest = Paths.get(to); // set path of destination directory from parent function\r\n Files.copy(src, dest); //inbuilt function to copy files\r\n \r\n }", "public static void copyRemoteFiles(String ip, String userName, String password, String sourcePath, String destinationPath) throws Exception {\n\tOutputStream outputStream = null;\n\tFTPClient ftpClient = null;\n\ttry {\n\t File destination = new File(destinationPath);\n\t ftpClient = new FTPClient();\n\t log.info(\"Connecting to ftp...\" + new Timestamp(System.currentTimeMillis()));\n\t ftpClient.connect(ip);\n\t ftpClient.login(userName, password);\n\t FTPFile[] files = ftpClient.listFiles(sourcePath);\n\t if (null != files && files.length > 0) {\n\t\tlog.info(\"Moving files \" + sourcePath + \" to \" + destinationPath + \" started...\" + new Timestamp(System.currentTimeMillis()));\n\t\tfor (FTPFile file : files) {\n\t\t outputStream = new FileOutputStream(new File(destination, file.getName()));\n\t\t String sourceFilePath = sourcePath + file.getName();\n\t\t ftpClient.retrieveFile(sourceFilePath, outputStream);\n\t\t closeOutputStream(outputStream);\n\t\t ftpClient.deleteFile(sourceFilePath);\n\t\t}\n\t\tlog.info(\"Moving files from \" + sourcePath + \" to \" + destinationPath + \" finished...\" + new Timestamp(System.currentTimeMillis()));\n\t } else {\n\t\tlog.info(\"No files found in \" + sourcePath);\n\t }\n\t} catch (Exception e) {\n\t log.info(\"Moving files from \" + sourcePath + \" to \" + destinationPath + \" failed...\" + new Timestamp(System.currentTimeMillis()));\n\t throw e;\n\t} finally {\n\t closeFtp(ftpClient);\n\t closeOutputStream(outputStream);\n\t}\n }", "private void copyExampleWorkouts() {\n\t\ttry {\n\t\t\tString[] exampleWorkouts = mContext.getAssets().list(\n\t\t\t\t\tIDataProvider.EXAMPLE_WORKOUT_FOLDER);\n\t\t\tfor (String file : exampleWorkouts) {\n\t\t\t\tInputStream in = null;\n\t\t\t\tOutputStream out = null;\n\t\t\t\ttry {\n\t\t\t\t\tin = mContext.getAssets().open(IDataProvider.EXAMPLE_WORKOUT_FOLDER + \"/\" + file);\n\t\t\t\t\tout = new FileOutputStream(mContext.getFilesDir().toString() + \"/\" + file);\n\n\t\t\t\t\t// copy file\n\t\t\t\t\tbyte[] buffer = new byte[1024];\n\t\t\t\t\tint read;\n\t\t\t\t\twhile ((read = in.read(buffer)) != -1) {\n\t\t\t\t\t\tout.write(buffer, 0, read);\n\t\t\t\t\t}\n\n\t\t\t\t\tin.close();\n\t\t\t\t\tin = null;\n\t\t\t\t\tout.flush();\n\t\t\t\t\tout.close();\n\t\t\t\t\tout = null;\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tLog.e(\"tag\", \"Failed to copy asset file: \" + file, e);\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\tLog.e(TAG, \"Copying example workouts failed\", e);\n\t\t}\n\t}", "public static long copy(String srcName, String destName) throws FileNotFoundException, IOException\n\t{\n\t\tlong bytesWritten = 0;\n\t\tint bytesRead = 0;\n\t\tbyte[] buffer = new byte[BUFFER_SIZE];\n\t\tFile fSrc = new File(srcName), fDest = new File(destName);\n\t\ttry(\n\t\t\t\tBufferedInputStream instream = new BufferedInputStream(new FileInputStream(fSrc));\n\t\t\t\tBufferedOutputStream outstream = new BufferedOutputStream(new FileOutputStream(fDest));\n\t\t\t\t){\n\t\t\twhile((bytesRead = instream.read(buffer, 0, BUFFER_SIZE))!=-1) {\n\t\t\t\toutstream.write(buffer,0,bytesRead);\n\t\t\t\tbytesWritten += bytesRead;\n\t\t\t}\n\t\t}\n\t\treturn bytesWritten;\n\t}", "abstract void copy(Set<Source> sources, Target target);", "public static void copyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] files = fromDir.listFiles();\n \t\n \t\t\ttoDir.mkdir();\n \t\n \t\t\t// cycle through files\n \t\t\tint size = files.length;\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), size * 50);\n \t\n \t\t\tfor (int i = 0; i < size; i++) {\n \t\t\t\tFile current = files[i];\n \t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\tString toFile = to;\n \t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\ttoFile += File.separator;\n \t\t\t\ttoFile += current.getName();\n \t\t\t\tif (current.isFile()) {\n \t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\tmonitor.worked(50);\n \t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\tcopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, 50));\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying directory\", e);\n \t\t}\n \t}", "private File copyResources(String srcFileName, File sourceDir, File destinationDir) throws MojoExecutionException {\n File srcFile = new File(sourceDir.getAbsolutePath()+File.separator+srcFileName);\n if (srcFile.exists()) {\n getLog().info(\"Copying \"+srcFile.getName()+\"...\");\n try {\n File destFile = new File(destinationDir.getAbsolutePath()+File.separator+srcFile.getName());\n if (srcFile.isDirectory()) {\n FileUtils.copyDirectory(srcFile, destFile, false);\n } else {\n FileUtils.copyFile(srcFile, destFile, false);\n }\n return destFile;\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying resource '\"+srcFile.getName()+\"'\", ex);\n }\n } else {\n getLog().warn(\"No source file '\"+srcFile.getName()+\"' to copy\");\n return null;\n }\n }", "public static void copyFileSourceToDestination(File src, File dest) throws IOException {\n\t\tInputStream is = null;\n\t\tOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(src);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\t// buffer size 1K\n\t\t\tbyte[] buf = new byte[1024];\n\t\t\tint bytesRead;\n\t\t\twhile ((bytesRead = is.read(buf)) > 0) {\n\t\t\t\tos.write(buf, 0, bytesRead);\n\t\t\t}\n\t\t} finally {\n\t\t\tis.close();\n\t\t\tos.close();\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString sourcePathHdfs=args[0];\n\t\tString destinationPath=args[1];\n\t\tnew CopyToLocal().copyToLocal(sourcePathHdfs, destinationPath);\n\t\t\n\t}", "private void doNormalDiffSync(Workspace workspace,\n\t\t\t\t\t\t\t\t GitSyncDetails syncDetails,\n\t\t\t\t\t\t\t\t ObjectMapper mapper,\n\t\t\t\t\t\t\t\t CollectionDiffer diffMerger,\n\t\t\t\t\t\t\t\t File collectionFile,\n\t\t\t\t\t\t\t\t List<Collection> collectionCommonCopy,\n\t\t\t\t\t\t\t\t File environmentFile,\n\t\t\t\t\t\t\t\t List<Environment> environmentCommonCopy,\n\t\t\t\t\t\t\t\t Git repo,\n\t\t\t\t\t\t\t\t List<Collection> collectionServerCopy,\n\t\t\t\t\t\t\t\t List<Environment> environmentServerCopy,\n\t\t\t\t\t\t\t\t List<Collection> collectionWorkingCopy,\n\t\t\t\t\t\t\t\t List<Environment> environmentWorkingCopy) throws IOException, GitAPIException {\n\t\tDiffNode collectionWorkingCopyChanges = diffMerger.compare(collectionWorkingCopy, collectionCommonCopy);\n\t\tDiffNode environmentWorkingCopyChanges = diffMerger.compareEnvs(environmentWorkingCopy, environmentCommonCopy);\n\n\t\t//step2: merge diffs to server copy\n\t\tif (collectionWorkingCopyChanges.isChanged() || environmentWorkingCopyChanges.isChanged()) {\n\t\t\tdiffMerger.mergeDiffs(collectionWorkingCopy, collectionServerCopy, collectionWorkingCopyChanges);\n\t\t\tdiffMerger.mergeDiffsEnvs(environmentWorkingCopy, environmentServerCopy, environmentWorkingCopyChanges);\n\t\t\tmapper.writeValue(collectionFile, collectionServerCopy);\n\t\t\tmapper.writeValue(environmentFile, environmentServerCopy);\n\t\t\trepo.add()\n\t\t\t\t\t.addFilepattern(\".\")\n\t\t\t\t\t.call();\n\t\t\trepo.commit()\n\t\t\t\t\t.setMessage(\"milkman sync\")\n\t\t\t\t\t.call();\n\t\t\tinitWith(repo.push(), syncDetails)\n\t\t\t\t\t.call();\n\t\t}\n\n\n\t\t//step3: merge server-diffs to working copy\n\t\tworkspace.setCollections(collectionServerCopy);\n\t\tworkspace.setEnvironments(environmentServerCopy);\n\t}", "public void copyOne(String from, String to) {\n\t\tFile source = new File(from);\n\t\tif (sourceExists(source)) {\n\t\t\tFile target = new File(to);\n\t\t\ttry{\n\t\t\t\tif(!targetExists(target)){\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath());\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName()\n\t\t\t\t\t\t\t+ \" COPIED!\");\n\t\t\t\t} else if (target.exists() && confirmReplace()) {\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath(),\n\t\t\t\t\t\t\tREPLACE_EXISTING);\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName() + \" REPLACED!\");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"File WASN'T copied!\");\n\t\t\t\t}\n\t\t\t}catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static void copyFileOrDirectory(String source, String destination) throws KubernetesPluginException {\n File src = new File(source);\n File dst = new File(destination);\n try {\n // if source is file\n if (Files.isRegularFile(Paths.get(source))) {\n if (Files.isDirectory(dst.toPath())) {\n // if destination is directory\n FileUtils.copyFileToDirectory(src, dst);\n } else {\n // if destination is file\n FileUtils.copyFile(src, dst);\n }\n } else if (Files.isDirectory(Paths.get(source))) {\n FileUtils.copyDirectory(src, dst);\n }\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Error while copying file\", e);\n }\n }", "public static long copyFile(File source, File dest) throws IOException {\n\n\t\tif (source.isDirectory() || dest.isDirectory())\n\t\t\tthrow new IOException(\"wont copy directories\");\n\t\tInputStream i = null;\n\t\ttry {\n\t\t\ti = getInputStreamFromFile(source);\n\n\t\t\t// create parent directories\n\t\t\tif (dest.getParentFile().mkdirs()) {\n\t\t\t\t// all good\n\t\t\t} else\n\t\t\t\tthrow new IOException(\"\\\"\" + dest + \"\\\" cannot be created\");\n\t\t\treturn writeStreamToFile(i, dest);\n\n\t\t} finally {\n\t\t\tif (i != null)\n\t\t\t\ti.close();\n\t\t}\n\t}", "public void getFileData(int dLength,String charset) throws FileSystemUtilException\r\n\t{\r\n\t\tlogger.debug(\"Begin: \"+getClass().getName()+\":getFileData()\");\r\n\t\tFileOutputStream fOut=null;\r\n\t\tByteArrayOutputStream bOut = null;\r\n\t\tFileSystemUtilsPlugin zu = new FileSystemUtilPluginFactory().getFileUtils(FileSystemTypeConstants.ZIP);\r\n\t\tlong fileLen = 0;\r\n\t\tlong dataLength = dLength;\r\n\t\tif(isSample)\r\n\t\t{\r\n\t\t\tbOut = new ByteArrayOutputStream();\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\tlogger.debug(\"Opening output stream to file \"+localFilePath);\r\n\t\t\t\tlogger.debug(\"localFilePath:\"+localFilePath);\r\n\t\t\t\tfOut=new FileOutputStream(\"temp.txt\");\r\n\t\t\t\tlogger.debug(\"Output stream to file \"+localFilePath+\" is opened\");\r\n\t\t\t} \r\n\t\t\tcatch(FileNotFoundException fnfEx) \r\n\t\t\t{ fnfEx.printStackTrace();\r\n\t\t\t\t logger.info(new Date()+\":: File not found on connecting with parameters, \" +\r\n\t\t\t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n\t\t\t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\t\tthrow new FileSystemUtilException(\"ET0028\",null,Level.ERROR,fnfEx);\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\tString command = \"scp -f \"+remoteFilePath;\r\n\t\tObject[] ios= execCommand(command);\r\n\t\toutputstream=(OutputStream)ios[0];\r\n\t\tinputstream=(InputStream)ios[1];\r\n\t\tbyte[] buf = new byte[1024];\r\n\t\t// send '\\0'\r\n\t\tbuf[0] = 0;\r\n\t\ttry \r\n\t\t{\r\n\t\t\t//returning acknowledgement\r\n\t\t\toutputstream.write(buf, 0, 1);\t\t\r\n\t\t\toutputstream.flush();\r\n\t\t\tcheckAcknowledgement(inputstream);\r\n\t\t\t//getting filesize\r\n\t\t\t// read '0644 '\r\n\t\t\tinputstream.read(buf, 0, 5);\r\n\t\t\twhile (true) \r\n\t\t\t{\r\n\t\t\t\tinputstream.read(buf, 0, 1);\r\n\t\t\t\tif (buf[0] == ' ')\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tfileLen = fileLen * 10 + (buf[0] - '0');\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tString file = null;\r\n\t\t\tfor (int i = 0;; i++) \r\n\t\t\t{\r\n\t\t\t\tinputstream.read(buf, i, 1);\r\n\t\t\t\tif (buf[i] == (byte) 0x0a) \r\n\t\t\t\t{\r\n\t\t\t\t\tfile = new String(buf, 0, i);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlogger.debug(\"filesize=\"+fileLen+\", file=\"+file);\r\n\t\t\tif(dataLength == 0)\r\n\t\t\t{\r\n\t\t\t\tdataLength = fileLen;\r\n\t\t\t}\r\n\t\t\telse if(dataLength >= fileLen)\r\n\t\t\t{\r\n\t\t\t\tdataLength = fileLen;\r\n\t\t\t}else if(fileLen > dataLength * 10){\r\n\t\t\t\tdataLength = 1024 * 10;\r\n\t\t\t}\r\n\t\t\t// send '\\0'\r\n\t\t\tbuf[0] = 0;\r\n\t\t\toutputstream.write(buf, 0, 1);\r\n\t\t\toutputstream.flush();\r\n\t\t\tlong b=0;\r\n\t\t\tint l=0;\r\n\t\t\tint len=10240;\r\n\t\t\tif(len >= dataLength)\r\n\t\t\t{\r\n\t\t\t\tlen = (int)dataLength;\r\n\t\t\t}\r\n\t\t\tbyte[] barray = new byte[len];\r\n\t\t\tboolean noData = false;\r\n\t\t\tlong startTime = System.currentTimeMillis();\r\n\t\t\twhile( b < dataLength)\r\n\t\t\t{\r\n\t\t\t\tl=inputstream.read(barray,0,len);\r\n\t\t\t\tif(l != -1)\r\n\t\t\t\t{\r\n\t\t\t\t noData = false;\r\n\t\t\t\t\tb=b+l;\r\n\t\t\t\t\tif(isSample)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbOut.write(barray,0,l);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//check whether the data is crossed fileLength\r\n\t\t\t\t\t\tif(b > dataLength)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tl = l - (int)(b - dataLength);\t\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\tfOut.write(barray,0,l);\r\n\t\t\t\t\t}\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\t/* BUG-FIX thread hang due to network outage */\r\n\t\t\t\t //implementing readTImeout at client side.\r\n\t\t\t\t if(noData == false)\r\n\t\t\t\t {\r\n\t\t\t\t //this is first iteration with out data \r\n\t\t\t\t startTime = System.currentTimeMillis();\r\n\t\t\t\t noData = true;\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t //there is no data on prev iteration too\r\n\t\t\t\t if((System.currentTimeMillis()-startTime) >= this.readTimeOut)\r\n\t\t\t\t {\r\n\t\t\t\t throw new Exception(\"SCP fileDownload failed. readTimeout occured\");\r\n\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t\t}\r\n //check stop flag, if true throw FileSystemUtilException with errorcode 999\r\n if(stop)\r\n {\r\n \tthrow new FileSystemUtilException(\"999\");\r\n }\r\n\t\t\t}\t\r\n\t\t\t// send '\\0'\r\n\t\t\tbuf[0] = 0;\r\n\t\t\toutputstream.write(buf, 0, 1);\r\n\t\t\toutputstream.flush();\r\n\t\t\tif(isSample)\r\n\t\t\t{\r\n\t\t\t\tString s=null;\r\n\t\t\t if(zu.isZip(remoteFilePath))\r\n\t\t\t {\r\n\t\t\t \tbyte [] stUnZip=bOut.toByteArray(); \r\n\t\t\t \tbyte [] sample = zu.streamUnZipper(stUnZip);\r\n\t\t\t \tbOut.reset();\r\n\t\t\t \tbOut.write(sample);\r\n\t\t\t //create a byte array stream with bOut\r\n\t\t\t //unzip the stream here and use that stream\r\n\t\t\t }\r\n\t\t\t if(true)/*if(!\"cp1252\".equalsIgnoreCase(charset))*/\r\n\t\t\t {\r\n\t\t\t \tsampleData = new String(bOut.toByteArray(),charset);\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t \tsampleData = new String(bOut.toByteArray());\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t\tlogger.debug(\"Sample data is : \"+sampleData);\r\n\t\t\t}else{\r\n\t\t\t\tsampleData = new String(barray,charset);\r\n\t\t\t}\r\n\t\t} \r\n\t\tcatch(UnsupportedEncodingException use)\r\n\t\t{\r\n\t\t\t logger.info(new Date()+\":: Unable to get data on connecting with parameters, \" +\r\n\t\t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n\t\t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\tthrow new FileSystemUtilException(\"ET0564\",null,Level.ERROR,use);\r\n\t\t}\t\r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\tlogger.info(new Date()+\":: Unable to get data on connecting with parameters, \" +\r\n\t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n\t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\tthrow new FileSystemUtilException(\"EL0004\",null,Level.ERROR,e);\r\n\t\t}\r\n\t\tcatch(FileSystemUtilException ebizEx)\r\n\t\t{\r\n //suppress if errorcode is 999\r\n\t\t\t\r\n if(!ebizEx.getErrorCode().equals(\"999\"))\r\n\t\t\t{\r\n \tlogger.info(new Date()+\":: Unable to get data on connecting with parameters, \" +\r\n \t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n \t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\t\tthrow ebizEx;\r\n }\r\n\t\t}\r\n\t\tcatch(Exception ex)\r\n\t\t{\r\n\t\t\tlogger.info(new Date()+\":: Unable to get data on connecting with parameters, \" +\r\n\t\t\t\t\t\" username= \"+ username +\" , remotefilePath = \"+remoteFilePath +\", \" +\r\n\t\t\t\t\t\"localFilePath = \"+ localFilePath +\" , host= \"+ hostname +\" and port =\"+ port );\r\n\t\t\tthrow new FileSystemUtilException(\"EL0360\",null,Level.ERROR,ex);\t\t\t\t\r\n\t\t}\r\n\t\tfinally \r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tif(fOut != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tfOut.flush(); \r\n\t\t\t\t\tfOut.close();\r\n\t\t\t\t\tfOut = null;\r\n\t\t\t\t}\r\n\t\t\t\tif(bOut != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tbOut.flush(); \r\n\t\t\t\t\tbOut.close();\r\n\t\t\t\t\tbOut = null;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t} \r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\t//log warning\t\t\t\t\r\n\t\t\t}\t\t \r\n\t\t}\r\n\t\tlogger.debug(\"End: \"+getClass().getName()+\":getFileData()\");\r\n\t}", "public static void copyAll(File root, File dest) throws IOException {\n if(root.isDirectory()){\n for(File child : root.listFiles()){\n File childDest = new File(dest, child.getName());\n if(child.isDirectory()){\n if(!childDest.exists() && !childDest.mkdirs())\n throw new IOException(\"Failed to create dir \"+childDest.getPath());\n copyAll(child, childDest);\n }else{\n Files.copy(child.toPath(), childDest.toPath(), StandardCopyOption.COPY_ATTRIBUTES);\n }\n }\n }else{\n File childDest = new File(dest, root.getName());\n if(!dest.exists() && !dest.mkdirs())\n throw new IOException(\"Failed to create dir \"+dest.getPath());\n Files.copy(root.toPath(), childDest.toPath(), StandardCopyOption.COPY_ATTRIBUTES);\n }\n }", "@Override\n public void copyBlockdata(URI destination) throws IOException {\n getFileIoProvider().nativeCopyFileUnbuffered(\n getVolume(), getBlockFile(), new File(destination), true);\n }", "private void doReadOnlySync(Workspace workspace,\n\t\t\t\t\t\t\t\t GitSyncDetails syncDetails,\n\t\t\t\t\t\t\t\t ObjectMapper mapper,\n\t\t\t\t\t\t\t\t CollectionDiffer diffMerger,\n\t\t\t\t\t\t\t\t File collectionFile,\n\t\t\t\t\t\t\t\t List<Collection> collectionCommonCopy,\n\t\t\t\t\t\t\t\t File environmentFile,\n\t\t\t\t\t\t\t\t List<Environment> environmentCommonCopy,\n\t\t\t\t\t\t\t\t Git repo,\n\t\t\t\t\t\t\t\t List<Collection> collectionServerCopy,\n\t\t\t\t\t\t\t\t List<Environment> environmentServerCopy,\n\t\t\t\t\t\t\t\t List<Collection> collectionWorkingCopy,\n\t\t\t\t\t\t\t\t List<Environment> environmentWorkingCopy) throws IOException, GitAPIException {\n\t\tDiffNode collectionServerCopyChanges = diffMerger.compare(collectionServerCopy, collectionCommonCopy);\n\t\tDiffNode environmentServerCopyChanges = diffMerger.compareEnvs(environmentServerCopy, environmentCommonCopy);\n\n\t\t//step2: merge diffs to working copy\n\t\tif (collectionServerCopyChanges.isChanged() || environmentServerCopyChanges.isChanged()) {\n\t\t\tdiffMerger.mergeDiffs(collectionServerCopy, collectionWorkingCopy, collectionServerCopyChanges);\n\t\t\tdiffMerger.mergeDiffsEnvs(environmentServerCopy, environmentWorkingCopy, environmentServerCopyChanges);\n\t\t}\n\n\n\t\t//step3: apply\n\t\tworkspace.setCollections(collectionWorkingCopy);\n\t\tworkspace.setEnvironments(environmentWorkingCopy);\n\t}", "public MergeCompositeContextForOneEntitySelectively(CompositeInstanceContext.Selector selector,String[] srcs,String dstFolderName,MessageLogger logger) throws IOException, DicomException {\n\t\tthis.selector = selector;\n//System.err.println(\"MergeCompositeContextForOneEntitySelectively(): dstFolderName = \"+dstFolderName);\n\t\tthis.dstFolderName = dstFolderName;\n\t\tOurFirstPassMediaImporter firstPassImporter = new OurFirstPassMediaImporter(logger);\n\t\tfor (String src : srcs) {\n\t\t\tfirstPassImporter.importDicomFiles(src);\n\t\t}\n\t\tif (mergedContext != null) {\n\t\t\tmergedContext.removeAllButSelected(selector);\t// remove anything hanging around, such as empty attributes\n\t\t}\n\t\tMediaImporter secondPassImporter = new OurSecondPassMediaImporter(logger);\n\t\tfor (String src : srcs) {\n\t\t\tsecondPassImporter.importDicomFiles(src);\n\t\t}\n\t}", "public void insertFile(Packet packet) {\r\n\t\t\r\n\t\t// Use hashCode function to get a hash of the file name in the range 0 - 2^n - 1\r\n\t\tint fileHash = (int) (packet.fileName.hashCode() % (Math.pow(2, 4) - 1));\r\n\t\t\r\n\t\t// If hash is a negative number, multiply by -1 to get a positive hash value\r\n\t\tif(fileHash < 0) {\r\n\t\t\tfileHash = fileHash * -1;\r\n\t\t}\r\n\t\t\r\n\t\t// Create InetSocketAddress ArrayList, add InetSocketAddress\r\n\t\tArrayList<InetSocketAddress> fileLocationList = new ArrayList<InetSocketAddress>();\r\n\t\tInetSocketAddress fileLocation = new InetSocketAddress(packet.peerClientIP, packet.peerClientListenPort);\r\n\t\t\r\n\t\t// Check if fileHash is equal to Peer Node ID, check if file is in the DHT - if so, just add inet address else add file name and location to the DHT\r\n\t\tif(fileHash == peerNode.peerClientID) {\r\n\t\t\tjava.util.Date date = new java.util.Date();\r\n\t\t\tif(peerNode.distributedHashTable.containsKey(packet.fileName)) {\r\n\t\t\t\tpeerNode.distributedHashTable.get(packet.fileName).add(fileLocation);\r\n\t\t\t\tSystem.out.println(date + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tfileLocationList.add(fileLocation);\r\n\t\t\t\tpeerNode.distributedHashTable.put(packet.fileName, fileLocationList);\r\n\t\t\t\tSystem.out.println(date + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check if fileHash < Peer Node ID and Peer Node ID < Peer Node Predecessor Peer ID - if so, add file\r\n\t\telse if(fileHash < peerNode.peerClientID && peerNode.peerClientID < peerNode.predPeerID) {\r\n\t\t\tjava.util.Date date2 = new java.util.Date();\r\n\t\t\tif(peerNode.distributedHashTable.containsKey(packet.fileName)) {\r\n\t\t\t\tpeerNode.distributedHashTable.get(packet.fileName).add(fileLocation);\r\n\t\t\t\tSystem.out.println(date2 + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tfileLocationList.add(fileLocation);\r\n\t\t\t\tpeerNode.distributedHashTable.put(packet.fileName, fileLocationList);\r\n\t\t\t\tSystem.out.println(date2 + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check if fileHash < Peer Node ID and fileHash > Peer Node Predecessor Peer ID - if so, add file\r\n\t\telse if(fileHash < peerNode.peerClientID && fileHash > peerNode.predPeerID) {\r\n\t\t\tjava.util.Date date3 = new java.util.Date();\r\n\t\t\tif(peerNode.distributedHashTable.containsKey(packet.fileName)) {\r\n\t\t\t\tpeerNode.distributedHashTable.get(packet.fileName).add(fileLocation);\r\n\t\t\t\tSystem.out.println(date3 + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tfileLocationList.add(fileLocation);\r\n\t\t\t\tpeerNode.distributedHashTable.put(packet.fileName, fileLocationList);\r\n\t\t\t\tSystem.out.println(date3 + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// Check if fileHash > Peer Node ID and Peer Node Successor Peer ID < Peer Node ID - if so, add file\r\n\t\telse if(fileHash > peerNode.peerClientID && peerNode.succPeerID < peerNode.peerClientID) {\r\n\t\t\tjava.util.Date date4 = new java.util.Date();\r\n\t\t\tif(peerNode.distributedHashTable.containsKey(packet.fileName)) {\r\n\t\t\t\tpeerNode.distributedHashTable.get(packet.fileName).add(fileLocation);\r\n\t\t\t\tSystem.out.println(date4 + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tfileLocationList.add(fileLocation);\r\n\t\t\t\tpeerNode.distributedHashTable.put(packet.fileName, fileLocationList);\r\n\t\t\t\tSystem.out.println(date4 + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Otherwise, forward packet on\r\n\t\telse {\r\n\t\t\tPacket p = packet;\r\n\t\t\ttry {\r\n\t\t\t\tpeerNode.peer2Peer = new Socket(peerNode.succPeerIP, peerNode.succPeerPort);\r\n\t\t\t\tpeerNode.peer2PeerOutStream = new ObjectOutputStream(peerNode.peer2Peer.getOutputStream());\r\n\t\t\t\tpeerNode.peer2PeerInStream = new ObjectInputStream(peerNode.peer2Peer.getInputStream());\r\n\t\t\t\tpeerNode.peer2PeerOutStream.writeObject(p);\r\n\t\t\t\t\r\n\t\t\t\t// Close connection/socket\r\n\t\t\t\tcloseConnection();\r\n\t\t\t\t\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private FilesDelta copy(FilesDelta that) {\n if (!(key.contains(that.key))) {\n throw new IllegalArgumentException();\n }\n\n Set<IFile> newlyTouchedDirs = SetSequence.fromSet(new HashSet<IFile>());\n // copy all but stale values, stale entries shall not override explicitly set\n for (IFile file : MapSequence.fromMap(that.files).keySet()) {\n Status newStatus = MapSequence.fromMap(that.files).get(file);\n if (newStatus == Status.STALE && MapSequence.fromMap(files).containsKey(file)) {\n continue;\n } else {\n MapSequence.fromMap(files).put(file, newStatus);\n }\n SetSequence.fromSet(newlyTouchedDirs).addElement((file.isDirectory() ? file : file.getParent()));\n }\n // in case we've got stale directory, check if any updates from that didn't touch it\n for (IFile file : MapSequence.fromMap(files).keySet()) {\n if (MapSequence.fromMap(files).get(file) == Status.STALE && file.isDirectory()) {\n String staleDir = DirUtil.normalizeAsDir(file.getPath());\n for (IFile touchDir : newlyTouchedDirs) {\n // if staleDir is parent of any newly touched directories, it's not stale any more\n if (DirUtil.startsWith(DirUtil.normalizeAsDir(touchDir.getPath()), staleDir)) {\n MapSequence.fromMap(files).put(file, Status.KEPT);\n break;\n }\n }\n }\n }\n return this;\n }", "@Test\n public void shouldBeAbleToCloneFile() {\n graph.useWorkspace(\"otherWorkspace\");\n graph.create(\"/testFile\").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and();\n graph.create(\"/testFile/jcr:content\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE)\n .and(JcrLexicon.DATA, TEST_CONTENT.getBytes())\n .orReplace()\n .and();\n\n File newFile = new File(otherWorkspaceRoot, \"testFile\");\n assertContents(newFile, TEST_CONTENT);\n\n graph.useWorkspace(\"test\");\n graph.clone(\"/testFile\").fromWorkspace(\"otherWorkspace\").as(\"clonedFile\").into(\"/\").failingIfAnyUuidsMatch();\n File copiedFile = new File(testWorkspaceRoot, \"clonedFile\");\n assertContents(copiedFile, TEST_CONTENT);\n }", "@Override\n\t\tvoid putTo(ByteBuffer dst, TcpTxContext tx) {\n\t\t\tfor(ByteChunk bc: byteChunks)\n\t\t\t\tbc.putTo(dst);\n\t\t}", "public void copy(RasterImage src, RasterImage dst) {\n\t\t// TODO: just copy the image\n\n\t\tfor (int i = 0; i < dst.argb.length; i++) {\n\t\t\tdst.argb[i] = src.argb[i];\n\t\t}\n\t}", "protected void copyParameters( RestParamsPropertyHolder srcParams, RestParamsPropertyHolder destinationParams )\n\t{\n\t\tfor( int i = 0; i < srcParams.size(); i++ )\n\t\t{\n\t\t\tRestParamProperty prop = srcParams.getPropertyAt( i );\n\n\t\t\tdestinationParams.addParameter( prop );\n\n\t\t}\n\t}" ]
[ "0.58277535", "0.5626154", "0.556808", "0.5517612", "0.5514621", "0.54410166", "0.54332197", "0.54159796", "0.54029477", "0.5398505", "0.5351462", "0.5336752", "0.5320791", "0.5293234", "0.5261527", "0.5249008", "0.52031255", "0.51740026", "0.51728714", "0.51656693", "0.51644087", "0.51554304", "0.51465416", "0.5137734", "0.51236886", "0.5110948", "0.50914186", "0.507975", "0.5077387", "0.50364983", "0.49567407", "0.49347305", "0.49199703", "0.4892574", "0.48738787", "0.48694962", "0.48522317", "0.48345295", "0.48071086", "0.4800609", "0.47995332", "0.47910073", "0.47829583", "0.47827765", "0.47680256", "0.47140765", "0.47080198", "0.4701882", "0.4678765", "0.46388263", "0.46386415", "0.46302778", "0.46072438", "0.4583361", "0.4570863", "0.4558782", "0.45452264", "0.45402285", "0.45367995", "0.45271313", "0.45234707", "0.45224804", "0.45175794", "0.45106062", "0.44885623", "0.44881585", "0.44771138", "0.44743228", "0.447212", "0.4470121", "0.44682723", "0.44620132", "0.445737", "0.44512093", "0.4441408", "0.44358534", "0.44263119", "0.4414803", "0.44137284", "0.44062832", "0.44057614", "0.4401719", "0.44011414", "0.43928838", "0.4390544", "0.43857333", "0.437451", "0.4368963", "0.43681234", "0.43591097", "0.43559393", "0.43533814", "0.43499318", "0.43471515", "0.4343491", "0.43347377", "0.43316385", "0.43173593", "0.43121162", "0.43082276" ]
0.80843234
0
private static final int NUMBER_OF_Questions = 100;
public static QuestionRepository getInstance() { if (sCrimeRepository == null) sCrimeRepository = new QuestionRepository(); return sCrimeRepository; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getNumberOfQuestions();", "int getNumberOfAllQuestions();", "Integer getNumQuestions();", "public int getNumQuestions() {\n\t\treturn noOfQuestions;\n\t}", "@Test\r\n public void testTotalNumberOfQuestion() {\r\n Application.loadQuestions();\r\n assertEquals(Application.allQuestions.size(), 2126);\r\n }", "public void setNbLikesQuestion(int value) {\n this.nbLikesQuestion = value;\n }", "public int numberOfQuestions() {\n\t\treturn getQuestions().size();\n\t}", "public int getQuestionCount() {\r\n\t\treturn this.question.size();\r\n\t}", "public int getTotalQuestions() {\r\n\t\treturn totalQuestions;\r\n\t}", "private int getPreferredNumberOfQuestions() {\n\t\tSharedPreferences prefs = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tint num = Integer.parseInt(prefs.getString(\n\t\t\t\tgetString(R.string.number_pref), \"6\"));\n\t\treturn num;\n\t}", "public interface Constants {\r\n\r\n /**\r\n * The maximum number of Prizes allowed\r\n */\r\n int NUMBER_OF_PRIZES = 10;\r\n /**\r\n * The maximum number of students\r\n */\r\n int NUMBER_OF_STUDENTS = 1000;\r\n /**\r\n * The maximum number of topics a student can undertake\r\n */\r\n int NUMBER_OF_TOPICS = 40;\r\n}", "int getNumberOfServeyQuestions(Survey survey);", "int getQuestCount();", "public int numberOfQuestions() { \n\t\ttry {\n\t\t\treturn myQuestions.getNumberOfQuestions();\n\t\t} catch (RemoteException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn 0; \n\t\t} \n\t}", "public int getSize()\r\n\t{\r\n\t\treturn questions.size();\r\n\t}", "public int getNbLikesQuestion() {\n return this.nbLikesQuestion;\n }", "public int getLength(){\n return textQuestions.length;\n }", "@Ignore\n @Test\n public void shouldNotGiveQuestionIfAllQuestionsHaveBeenAnsweredWithInts() {\n attributes.put(FinancialPlanningSpeechlet.GOAL_AMOUNT_KEY, 1000);\n attributes.put(FinancialPlanningSpeechlet.MONTHLY_CONTRIBUTION_KEY, 1000);\n attributes.put(FinancialPlanningSpeechlet.GOAL_PERIOD_KEY, 1000);\n String question = NextQuestionFactory.get(session);\n\n assertThat(question, Is.is(\"\"));\n }", "public int get_howmany() {\n return how_many;\n }", "@Test\n public void shouldReturnRequestedNumOfCodenames()\n {\n String[] codenames = DatabaseHelper.getRandomCodenames(25);\n assertEquals(25, codenames.length);\n }", "public int getCount() {\n return questionList.size();\n }", "public QuestionQueue ()\n {\n count = 0;\n }", "public int getAnswers() {\n return answers;\n }", "public Integer getAnswerCount() {\n return answerCount;\n }", "int getNewlyAvailableQuestsCount();", "@Override\n\tpublic Integer getNumberOfPossibleAnswers() {\n\t\treturn null;\n\t}", "List<PlayedQuestion> getPlayedQuestionsCount();", "public void changeNumQuestions(int newNum) {\n\t\tnoOfQuestions = newNum;\n\t}", "public static void generateQuizz(int size)\n {\n nb1 = new int[size];\n nb2 = new int[size];\n answer = new int[size];\n for(int i = 0; i<size; i++)\n {\n nb1[i] = (int)(Math.random()*50+1);\n nb2[i] = (int)(Math.random()*50+1);\n answer[i] = 0;\n }\n \n }", "public abstract void newGuiQuestions(long ms, int n);", "int getNumFrequents() {\n return numFrequents;\n }", "public JLabel getQuestionCounter()\n {\n return questionCounter;\n }", "public static int numberOfQuestions(int selection)\n\t{\n\t\t\tselection+=1;\n\t\t\tint i=0, size=0;\t\t\t\n\t\t\tquestionsExists = false;\n\n\t\t\twhile(i < questionDetails.get(0).size())\n\t\t\t{\n\t\t\t\t//uses the topic number which was passed down and looks for matches\n\t\t\t\tif(questionDetails.get(0).get(i).equals(selection+\"\"))\n {\n\t\t\t\t\tsize++; \n\t\t\t\t\tquestionsExists = true;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\treturn size;\n\t}", "@Test\n public void initializeBasicQuizTest() throws CakeException {\n /*\n QuestionList test = new QuestionList(QuestionType.BASIC);\n\n //check if there are the correct number of test questions\n assertEquals(test.getQuestionList().size(), MAX_QUESTIONS);\n\n // check if there are any duplicate questions\n Set<Question> set = new HashSet<>(test.getQuestionList());\n assertEquals(set.size(), test.getQuestionList().size());\n */\n }", "public int getSize()\n {\n return questionList.size();\n }", "public void setNumNewQuestions() {\n\t\tif(newQuestions && checkNewQuestions().equals(\"\")) {\n\t\t\tanswerChoiceList.setSelectedIndex(2);\n\t\t}\n\t\tif(newQuestions && questionNo == noOfQuestions) {\n\t\t\tnewQuestions = false;\n\t\t}\n\t}", "@Override\n\t\tpublic int getCount() {\n\t\t\t// TODO Auto-generated method stub\n\t\t\treturn questions.size();\n\t\t}", "public int get_correctAnswer(){return this._correctAnswer;}", "int countByExample(QuestionExample example);", "int countByExample(QuestionExample example);", "public int getQuestionNumber() {\r\n\t\treturn questionNumber;\r\n\t}", "public int getQuestCount() {\n return quest_.size();\n }", "public int getNumAnswer() {\n return numAnswer;\n }", "public void generateRandomQuestions(){\r\n numberHolder = new ArrayList<>(NUMBER_OF_QUESTIONS);\r\n for (int i = 0; i < NUMBER_OF_QUESTIONS; i++)\r\n numberHolder.add(i);\r\n\r\n Collections.shuffle(numberHolder);\r\n System.out.println(numberHolder);\r\n\r\n }", "long countByExample(Question11Example example);", "long countByExample(Question27Example example);", "public void updateTotalQuestions() {\n\t\ttotalQuestionsNum.setText(Integer.toString(noOfQuestions));\n\t}", "public Integer getQuestionNumber()\n {\n return questionNumber;\n }", "public abstract void newSpeechQuestions(long ms, int n);", "long countByExample(Question14Example example);", "long countByExample(QuestionExample example);", "long countByExample(QuestionExample example);", "public abstract int getMaxQlength();", "public void setTotalQuestions(int totalQuestions) {\r\n\t\tthis.totalQuestions = totalQuestions;\r\n\t}", "public void numberOfChoices() {\n\t\tcommon.waitForElement(mcqChoices, 60);\n\t\tchoicesinMCQ = mcqChoices.getText();\n\t\tarr = choicesinMCQ.split(\"\\\\W+\");\n\t\tnumberOfChoicesinMCQ = arr[3];\n\t\tlastOption = numberOfChoicesinMCQ.charAt(0);\n\t\tint a = 1;\n\t\tfor (char x = firstOption; x < lastOption; x++) {\n\t\t\tfirstOption += 1;\n\t\t\ta += 1;\n\t\t}\n\t\tfor (choice = 0; choice < a; choice++) {\n\t\t\tcommon.waitForElement(mcqChoices, 60);\n\t\t\tanswerChoice.get(choice).click();\n\t\t}\n\t\tchoice = 0;\n\t\ta = 1;\n\t\tfirstOption = 'A';\n\t}", "public int getMax() {\n\t\treturn this.questions.size();\n\t}", "public int getAnswer()\n {\n return answer;\n }", "int getWrongAnswers();", "public void setAnswerCount(Integer answerCount) {\n this.answerCount = answerCount;\n }", "void calculateScore(){\r\n playerScore = 0;\r\n for(int i = 1; i<=10; i++) {\r\n scoreQuestion(i);\r\n }\r\n }", "public int getTotalCorrectAnswers() {\r\n\t\treturn totalCorrectAnswers;\r\n\t}", "public int getAnsweredQuestions(int index){\n\t\treturn _answeredQuestions[index];\n\n\t}", "public String manageCompanyquestions() {\n\t\treturn \"Company has 20 questions, edit question?\";\r\n\t}", "public String checkNewQuestions() {\n\t\tint numAnswers = testGenerator.getNumAnswers(questionNo);\n\t\tString question = \"\";\n\n\t\tquestion += testGenerator.getQuestionText(questionNo);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 1);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 2);\n\n\t\tif(numAnswers >= 3) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 3);\n\t\t} \n\t\tif(numAnswers == 4) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 4);\n\t\t}\n\t\treturn question;\n\t}", "public void setAnswers(int answers) {\n this.answers = answers;\n }", "public long getPublicQuestionCount() {\n return Question.count(\"select count(q.id) from Question q, User u, Company c \" +\n \"where q.user = u and u.company = c and u.company = ? and q.status = ? and active = ?\",\n this, QuestionStatus.ACCEPTED, true);\n }", "public static void takeTest(Question [] questions) {\n int score = 0;\n Scanner keyboardInput = new Scanner(System.in);\n for(int i = 0; i < questions.length; i++){\n System.out.println(questions[i].prompt);\n String answer = keyboardInput.nextLine();\n if(answer.equals(questions[i].answer)) {\n score++;\n }\n\n }\n System.out.println(\"Voce conseguiu \" + score + \"/\" + questions.length + \"pontos\");\n\n }", "public void setIdQuestion(int value) {\n this.idQuestion = value;\n }", "protected List<Question> getListNumOfQuestions(List<Question> q, int n) {\n \tList<Question> finalQuestions = new ArrayList<Question>();\n \tfor (int i = 0; i < n; i++) {\n finalQuestions.add(q.get(i));\n }\n return finalQuestions;\n }", "public static void quizz(int nbOfQuestions)\n {\n \tgenerateQuizz(nbOfQuestions);\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Début du quizz : \");\n for(int i = 0; i < nbOfQuestions; i++)\n {\n System.out.println(\"Question \" +(i+1) + \" : \"+nb1[i]+\" + \"+nb2[i]+ \" = ?\");\n answer[i] = sc.nextInt();\n \n if(answer[i] == nb1[i] + nb2[i])\n {\n System.out.println(\"You rock !\");\n }\n else\n {\n System.out.println(\"Too bad ! Here's the answer : \" +(nb1[i]+nb2[i]));\n }\n }\n }", "@Test\n public void shouldNotGiveQuestionIfAllQuestionsHaveBeenAnswered() {\n attributes.put(FinancialPlanningSpeechlet.GOAL_AMOUNT_KEY, 1000.0);\n attributes.put(FinancialPlanningSpeechlet.MONTHLY_CONTRIBUTION_KEY, 1000.0);\n attributes.put(FinancialPlanningSpeechlet.GOAL_PERIOD_KEY, 1000.0);\n String question = NextQuestionFactory.get(session);\n\n assertThat(question, Is.is(\"\"));\n }", "public int getWordsQuantity(){\n\t\treturn counter;\n\t}", "@Test\n public void shouldHaveNoMoreThan1000Books() {\n\n }", "@Test\n void studentMCQTotalAnsweredTest(){\n Student student = new Student(\"Lim\");\n\n int expectedResult = 10; // Input for testing\n student.setNumQuestionAns(expectedResult); // Set Total Number Question(s) Answered\n System.out.println(\"Test Case #2\");\n System.out.println(\"\\tExpected Result: \" + expectedResult); // print expected result\n int actualResult = student.getNumQuestionAns(); // Actual Result\n System.out.println(\"\\tActual Result: \" + actualResult); // Print actual result\n assertEquals(expectedResult, actualResult); // Compare the expected result (True) & Actual Result\n }", "public int getProblemCount();", "public int getScore(){\n \treturn 100;\n }", "public int getAnswer() {\n return answer;\n }", "public void setAnsweredQuestions() {\n\t\tFile file = new File(\"data/answered_questions\");\n\t\tif(!file.exists()) {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/answered_questions\");\n\n\t\t\tString answeredQuestions = \"\";\n\t\t\tfor (int i = 0;i<5;i++) {\n\t\t\t\tansweredQuestions = answeredQuestions + \" \" + String.valueOf(_answeredQuestions[i]);\n\t\t\t}\n\t\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/answered_questions\", answeredQuestions));\n\n\t\t}\n\t\tScanner myReader;\n\t\ttry {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/answered_questions\");\n\t\t\tmyReader = new Scanner(file);\n\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\tString[] splitFileLine = fileLine.trim().split(\" \");\n\t\t\t\tfor (int i=0; i<5; i++) {\n\t\t\t\t\t_answeredQuestions[i] = Integer.parseInt(splitFileLine[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmyReader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "List<Question> getQuestionsUsed();", "public interface DailyChallenges {\n\n int[] daily_challenges = {R.string.daily_challenge_01,\n R.string.daily_challenge_02,\n R.string.daily_challenge_03,\n R.string.daily_challenge_04,\n R.string.daily_challenge_05,\n R.string.daily_challenge_06\n };\n\n int len = daily_challenges.length;\n\n}", "public void loadQuestion() {\r\n\r\n //getting the number of the question stored in variable r\r\n //making sure that a question is not loaded up if the count exceeds the number of total questions\r\n if(count <NUMBER_OF_QUESTIONS) {\r\n int r = numberHolder.get(count);\r\n //creating object that will access the QuestionStore class and retrieve values and passing the value of the random question number to the class\r\n QuestionStore qs = new QuestionStore(r);\r\n //calling methods in order to fill up question text and mutliple choices and load the answer\r\n qs.storeQuestions();\r\n qs.storeChoices();\r\n qs.storeAnswers();\r\n //setting the question and multiple choices\r\n\r\n q.setText(qs.getQuestion());\r\n c1.setText(qs.getChoice1());\r\n c2.setText(qs.getChoice2());\r\n c3.setText(qs.getChoice3());\r\n answer = qs.getAnswer();\r\n }\r\n else{\r\n endGame();\r\n }\r\n\r\n\r\n\r\n\r\n }", "int getCompletedTutorialsCount();", "public void setNumAnswer(int value) {\n this.numAnswer = value;\n }", "int getRepeatCount();", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "public int getQuestionNumberAmount() {\r\n\t\treturn questionNumberAmount;\r\n\t}", "int getExamplesCount();", "int getExamplesCount();", "public void increseReplyCount() {\n\r\n\t}", "int countByExample(CommonQuestionStrategyTypeExample example);", "private void getQuestions(){\n final int[] countQuestions = new int[1];\n mQuestionCountReference = FirebaseDatabase.getInstance().getReference().child(\"Questions\");\n mQuestionCountReference.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n countQuestions[0] = (int) dataSnapshot.getChildrenCount();\n updateQuestion(countQuestions[0]);\n timer(30, quiz_timer);\n }else{\n quiz_question_label.setText(\"No Questions in database\");\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n\n });\n }", "public int getQuizNumber() {\n\t\treturn quizNumber;\n\t}", "@Override\n public boolean hasMoreQuestions() {\n return !(done);\n }", "@Override\r\n\tpublic int getQnACount(int boardNum) {\n\t\treturn QnARepository.getQnACount(boardNum);\r\n\t}", "public void setQuestionId(int tmp) {\n this.questionId = tmp;\n }", "int getLimit();", "int getLimit();", "public void setQuestion(){\n\n\n triggerReport(); //Check if max questions are displayed, if yes then show report\n\n MyDatabase db = new MyDatabase(QuizCorner.this);\n Cursor words = db.getQuizQuestion();\n TextView question_text = (TextView) findViewById(R.id.question_text);\n RadioButton rb;\n resetOptions();\n disableCheck();\n enableRadioButtons();\n hideAnswer();\n words.moveToFirst();\n word = words.getString(words.getColumnIndex(\"word\"));\n correct_answer = words.getString(words.getColumnIndex(\"meaning\"));\n question_text.setText(word + \" means:\");\n for (int i = 0; i < 4; i++){\n answers[i] = words.getString(words.getColumnIndex(\"meaning\"));\n words.moveToNext();\n }\n answers = randomizeArray(answers);\n for (int i = 0; i < 4; i++){\n rb = (RadioButton) findViewById(options[i]);\n rb.setText(answers[i]);\n }\n question_displayed_count++;\n }", "public int generateQuestionBox() {\n\n if(mGame.isInQuestion()) return 0;\n\n Vector2 relVel = mGame.getPlayer().getVelocity();\n\n QuestionBox e = new QuestionBox();\n e.setRelativeVelocity(relVel);\n e.setPosition(1000, rand.nextInt(mMap.getBottomBound()));\n\n Question question = mQuestionManager.getQuestion(); \n question.setVelocity(relVel.x, relVel.y);\n question.setPosition(mGame.getWidth() / 4, 20);\n question.setOptionsPosition(mGame.getWidth() - 40);\n question.setOptionsRelativeVelocity(relVel);\n question.pack(mGame.getWidth(), mGame.getHeight());\n question.reset();\n\n e.setQuestion(question);\n\n mGame.addEntity(e);\n return e.getWidth();\n }", "@Test\n void studentMCQTotalAnsweredCorrectlyTest(){\n Student student = new Student(\"Lim\");\n\n int expectedResult = 8; // Input for testing\n student.setNumCorrectAns(expectedResult); // Set Total Number Question(s) Answered Correctly\n System.out.println(\"Test Case #3\");\n System.out.println(\"\\tExpected Result: \" + expectedResult); // print expected result\n int actualResult = student.getNumCorrectAns(); // Actual Result\n System.out.println(\"\\tActual Result: \" + actualResult); // Print actual result\n assertEquals(expectedResult, actualResult); // Compare the expected result (True) & Actual Result\n }", "private int getNumberCorrect() {\n RadioButton rb1 = (RadioButton) findViewById(R.id.question_1_correct);\n RadioButton rb2 = (RadioButton) findViewById(R.id.question_2_correct);\n RadioButton rb3 = (RadioButton) findViewById(R.id.question_3_correct);\n RadioButton rb4 = (RadioButton) findViewById(R.id.question_4_correct);\n boolean q5Answer = checkQuestion5();\n boolean q6answer = checkQuestion6();\n ToggleButton tb7 = (ToggleButton) findViewById(R.id.question_7);\n ToggleButton tb8 = (ToggleButton) findViewById(R.id.question_8);\n boolean bool8 = !tb8.isChecked();\n ToggleButton tb9 = (ToggleButton) findViewById(R.id.question_9);\n ToggleButton tb10 = (ToggleButton) findViewById(R.id.question_10);\n\n boolean answers[] = new boolean[]{rb1.isChecked(), rb2.isChecked(), rb3.isChecked(), rb4.isChecked(),\n q5Answer, q6answer, tb7.isChecked(), bool8, tb9.isChecked(),\n tb10.isChecked()};\n return countCorrectAnswers(answers);\n }" ]
[ "0.76129043", "0.738149", "0.71542245", "0.7075576", "0.69022655", "0.6767935", "0.67258924", "0.65235627", "0.65130544", "0.6444916", "0.64217913", "0.63442534", "0.6342908", "0.6308772", "0.62608135", "0.6237051", "0.6212477", "0.61665106", "0.6133222", "0.6118381", "0.60659075", "0.6039962", "0.60114473", "0.6000535", "0.5987401", "0.5986074", "0.59635144", "0.59614223", "0.5927859", "0.592072", "0.59056234", "0.5904605", "0.58952224", "0.58723927", "0.5850913", "0.5850531", "0.58361113", "0.5819829", "0.5811553", "0.5811553", "0.580472", "0.57778084", "0.57776594", "0.57775337", "0.57604057", "0.5753376", "0.57362604", "0.5735729", "0.5735322", "0.5720426", "0.5716604", "0.5716604", "0.57025164", "0.57007205", "0.5694699", "0.56836945", "0.5666758", "0.5660966", "0.5654684", "0.5635359", "0.5608051", "0.5602082", "0.5595401", "0.5586355", "0.5578498", "0.55742633", "0.5565978", "0.5564817", "0.556191", "0.5559291", "0.55505353", "0.5546146", "0.55414456", "0.55237144", "0.55159104", "0.55150664", "0.5514978", "0.55140245", "0.5513145", "0.55125105", "0.55058277", "0.5503086", "0.54857075", "0.5484444", "0.54809755", "0.5471612", "0.54695785", "0.54695785", "0.5465654", "0.5457885", "0.5456509", "0.54557997", "0.54508513", "0.5417808", "0.5417466", "0.54155916", "0.54155916", "0.5413405", "0.54097575", "0.54083467", "0.540782" ]
0.0
-1
get some header on this page
public String getbyHeader(){ String byHed=driver.findElement(byHeader).getText(); return byHed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "PageHeader getPageHeader();", "PageHeader getPageHeader();", "public abstract String header();", "public String getHeader();", "com.didiyun.base.v1.Header getHeader();", "protected String getPageHeader()\n {\n if (this.pageHeader == null) {\n String title = (this.privateLabel != null)? this.privateLabel.getPageTitle() : \"\";\n StringBuffer sb = new StringBuffer();\n sb.append(\"<center>\");\n sb.append(\"<span style='font-size:14pt;'><b>\" + title + \"</b></span>\");\n sb.append(\"<hr>\");\n sb.append(\"</center>\");\n this.pageHeader = sb.toString();\n }\n return this.pageHeader;\n }", "String getResponseHeader();", "public String getHeader()\r\n\t{\r\n\t\treturn header;\r\n\t}", "private String collectHeading(Document doc) {\n String heading = doc.select(\"[class^=header1 style]\").first().text();\r\n\r\n return heading;\r\n }", "java.lang.String getHeader();", "public String getHeader() {\n\t\treturn _header;\n\t}", "public String getHeader() {\n\t\tif (null != this.header) {\n\t\t\treturn this.header;\n\t\t}\n\t\tValueExpression _ve = getValueExpression(\"header\");\n\t\tif (_ve != null) {\n\t\t\treturn (String) _ve.getValue(getFacesContext().getELContext());\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public String getHeader() {\n return header;\n }", "public String getHeader() {\n return header;\n }", "String getHeader(String headerName);", "org.apache.xmlbeans.XmlString xgetHeader();", "public Object getHeader() {\n return header;\n }", "public String getWantedProductHeader()throws Exception{\r\n SearchPageFactory pageFactory = new SearchPageFactory(driver);\r\n String listedItemHeader = getElementText(pageFactory.listedItemHeader);\r\n return listedItemHeader;\r\n }", "Headers getHeaders();", "public String getHeader() {\n\t\t\treturn header;\n\t\t}", "private static String getHTTPHeader(PortletRequest request, String name) {\n String value = null;\n String portalInfo = request.getPortalContext().getPortalInfo()\n .toLowerCase();\n if (portalInfo.contains(\"liferay\")) {\n value = getLiferayHTTPHeader(request, name);\n } else if (portalInfo.contains(\"gatein\")) {\n value = getGateInHTTPHeader(request, name);\n }\n return value;\n }", "protected ResponseHeader getHeader() {\n return this.header;\n }", "public String getPageHeaderParagraph() {\r\n\t\treturn controls.getText(\"eVisit\", \"CSS_header_paragraph\");\r\n\t}", "@Override\n\tpublic Map<String, String> getHeader() {\n\t\treturn this.header;\n\t}", "public String getHeader() {\n String header = FxSharedUtils.getHeader();\n if (header.indexOf(\"$user$\") > 0)\n header = header.replaceAll(\"\\\\$user\\\\$\", getRequest().getUserTicket().getUserName());\n return header;\n }", "public String getHeader() {\n\t\treturn header.toString();\n\t}", "private String readHeader(RoutingContext ctx) {\n String tok = ctx.request().getHeader(XOkapiHeaders.TOKEN);\n if (tok != null && ! tok.isEmpty()) {\n return tok;\n }\n return null;\n }", "public PHeader getHeader() {\n\t\treturn header;\n\t}", "public VCFHeader getHeader();", "public Header getHeader() {\n\t\treturn this.header;\n\t}", "ComponentHeaderType getHeader();", "public void generateGetHeader (\n HttpServletRequest request, HttpServletResponse response)\n throws IOException\n {\n BuildHtmlHeader(new PrintWriter (response.getOutputStream()), getTitle());\n }", "public Pattern getPageHeader() {\r\n return pattern_headerAttribute;\r\n }", "public String getHttpHeader() {\n return httpHeader;\n }", "public String getCustomHeader() {\n return this.customHeader;\n }", "public WebElement getSearchPageHeaderText()\n{\n\treturn driver.findElement(headertext);\n}", "public WebElement headerDiv() {\r\n return driver.findElement(By.id(\"header\"));\r\n }", "public Class<?> header() {\n return header;\n }", "private PageId getHeaderPage(RelationInfo relInfo) {\n\t\treturn new PageId(0, relInfo.getFileIdx());\n\t}", "@Override\n\t\tpublic String getHeader(String name) {\n\t\t\treturn null;\n\t\t}", "public Map<String, String> readHeader() {\r\n\t\tMap<String, String> headers = null;\r\n\t\tif (advanceToTag(\"Document\")) {\r\n\t\t\tif (advanceToTag(\"Header\")) {\r\n\t\t\t\theaders = this.in.readPropertyBlock();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn headers;\r\n\t}", "public String getHeaderLine() {\r\n\t\tif(header == null)return \"\";\r\n\t\treturn header;\r\n\t}", "public String getHeader() {\n\t\tString item_text = getQuantityString(getCount());\n\t\tString header = getActivity().getString(R.string.browse_items_text, item_text, getCount());\n\t\treturn header;\n\t}", "private void readHeader() {\n version = \"\";\n XmlNode node = _document.SelectSingleNode(\"//ovf:Envelope\", _xmlNS);\n if (node != null) {\n version = node.attributes.get(\"ovf:version\").getValue();\n }\n }", "public String getHeader(final String name) {\n final Collection<String> strings = headers.get(name);\n return strings == null ? null : strings.iterator().next();\n }", "public String getDeliveryAddressHeader(){\n String header =driver.findElement(oDeliveryAddressHeader).getText();\n logger.debug(\"delivery address header is :\" + header);\n return header;\n }", "abstract public void header();", "@GET\n @Path(\"/testHeader\")\n @Authenticated\n public String testHeader() {\n return testService.testHeader(\"test\");\n }", "public Optional<String> header(String header) {\n return this.header.getHeader(header);\n }", "public String getHeader1() {\n return header1;\n }", "public static String getHeader() {\n return \"S I R\";\n }", "public String getHead(Handler handler)\n {\n return \"<html><head><title>Logging: \" \n + getTime(System.currentTimeMillis()) + \"</title></head><body><pre>\\n\";\n }", "@Override\n public String getHeaderField(String name) {\n return jarUrlConnection.getHeaderField(name);\n }", "public String getHeader() {\n\t\tString header = \"id\" + \",\" + \"chrId\" + \",\" + \"strand\" + \",\" + \"TSS\" + \",\" + \"PolyASite\"\n\t\t\t\t\t\t+ \",\" + \"5SSPos\" + \",\" + \"3SSPos\" + \",\" + \"intronLength\" + \",\" + \"terminalExonLength\"\n\t\t\t\t\t\t+ \",\" + \"BPS_3SS_distance\" + \",\" + \"PolyPyGCContent\" + \",\" + \"IntronGCContent\" + \",\" + \"terminalExonGCContent\"\n\t\t\t\t\t\t+ \",\" + \"5SS\" + \",\" + \"3SS\" + \",\" + \"BPS\"\n\t\t\t\t\t\t+ \",\" + \"5SSRank\" + \",\" + \"3SSRank\" + \",\" + \"BPSRank\"\n\t\t\t\t\t\t+ \",\" + \"5SSLevenshteinDistance\" + \",\" + \"3SSLevenshteinDistance\" + \",\" + \"BPSLevenshteinDistance\";\n\t\treturn header; \n\t}", "public String getHeaderText(){\n\t\treturn headerText.toString();\n\t}", "public HashMap<String, String> getHeader() {\n HashMap<String, String> header = new HashMap<String, String>();\n//\t\theader.put(\"Content-Type\", pref.getString(\"application/json\", \"application/json\"));\n /*header.put(\"authId\", pref.getString(KEY_USER_ID, KEY_USER_ID));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, KEY_AUTH_TOKEN));*/\n\n\n header.put(\"authId\", pref.getString(KEY_USER_ID, \"1\"));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, \"s4nbp5FibJpfEY9q\"));\n\n return header;\n }", "@Test \n\tpublic void homePageHeaderTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// Validate page header \n\t\tString header = homePage.getHeader();\n\t\tAssert.assertTrue(header.equals(\"\"));\n\n\t\t// Fetch latin quote: \n\t\tString latinQuote = homePage.getQuote(\"latin\");\n\t\tAssert.assertEquals(\"\\\"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...\\\"\", latinQuote);\n\n\t\t// Fetch english quote, which is: \n\t\tString englishQuote = homePage.getQuote(\"english\"); \n\t\tAssert.assertEquals(\"\\\"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain...\\\"\",englishQuote); \n\t}", "public std_msgs.msg.dds.Header getHeader()\n {\n return header_;\n }", "protected static String getSingleHeaderValue(\n HttpResponse response,\n String headerName)\n {\n Header[] headers = response.getHeaders(headerName);\n if (headers != null && headers.length > 0)\n {\n return headers[0].getValue();\n }\n return null;\n }", "private org.gwtbootstrap3.client.ui.PageHeader get_f_PageHeader3() {\n return build_f_PageHeader3();\n }", "public static HeaderMyAccountPO getHeaderMyAccountPage(WebDriver driver) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic void loadHeader() {\n\r\n\t}", "public abstract SOAPHeader getSOAPHeader() throws SOAPException;", "public String getHeader(final String name) {\n return headers.get(name);\n }", "@Override\n\tpublic String getHead(Handler h) {\n\t\tStringBuffer buf = new StringBuffer(10000);\n\t\tbuf.append(\"<!DOCTYPE html>\\n\");\n\t\t\n\t\tbuf.append(\"\\t<head>\\n\");\n\t\tbuf.append(\"\\t\\t<style>\\n\");\n\t\tbuf.append(\"\\t\\ttable { width: 100% }\\n\");\n\t\tbuf.append(\"\\t\\tth { font: bold 10pt Tahoma; }\\n\");\n\t\tbuf.append(\"\\t\\ttd { font: normal 10pt Tahoma; }\\n\");\n\t\tbuf.append(\"\\t\\th1 { font: normal 11pt Tahoma; }\\n\");\n\t\tbuf.append(\"\\t\\t</style>\\n\");\n\t\tbuf.append(\"\\t</head>\\n\");\n\t\t\n\t\tbuf.append(\"\\t<body>\\n\");\n\t\tbuf.append(\"\\t\\t<h1>\" + (new Date()) + \"\\n\");\n\t\tbuf.append(\"\\t\\t<table border=\\\"0\\\" cellpadding=\\\"5\\\" cellspacing=\\\"3\\\">\\n\");\n\t\tbuf.append(\"\\t\\t\\t<tr align=\\\"left\\\">\\n\");\n\t\tbuf.append(\"\\t\\t\\t\\t<th style=\\\"width:10%\\\">LogLevel</th>\\n\");\n\t\tbuf.append(\"\\t\\t\\t\\t<th style=\\\"width:15%\\\">Time</th>\\n\");\n\t\tbuf.append(\"\\t\\t\\t\\t<th style=\\\"width:75%\\\">LogMessage</th>\\n\");\n\t\tbuf.append(\"\\t\\t\\t</tr>\\n\");\n\t\t\n\t\treturn buf.toString();\n\t}", "public String getHeaderName() {\n\tString value = getString(ATTR_HEADER_NAME, null);\n\treturn value;\n }", "private Header[] requestHeadMaker() {\n\t\tHeader[] header = {\n\t\t\t\tnew BasicHeader(\"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\")\n\t\t\t\t//new BasicHeader(HttpHeaders.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\")\n\t\t\t, new BasicHeader(\"Accpet-Language\", \"ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7,ja;q=0.6\")\n\t\t\t, new BasicHeader(\"Accept-Charset\", \"application/x-www-form-urlencoded; charset=UTF-8\")\n\t\t\t, new BasicHeader(\"Origin\", \"https://developer.riotgames.com\")\n\t\t\t, //new BasicHeader(\"X-Riot-Token\", riotApiKey)\n\t\t};\n\t\treturn header;\n\t}", "public byte[] getHeader() {\n\treturn header;\n }", "public String getHeader(final Header header) {\n return headers.get(header.toString());\n }", "public String getHeaderField(String paramString) {\n/* 270 */ return this.delegate.getHeaderField(paramString);\n/* */ }", "Header createHeader();", "@Override\n\tpublic final native HeadElement getHead() /*-{\n // IE8 does not have document.head\n // when removing IE8 support we remove the second statement\n return this.head || this.getElementsByTagName('head')[0];\n\t}-*/;", "public String getPageHeader(int pageNumber) {\n pageNumber++;\n String header = \"%%Page: \" + pageNumber + \" \" + pageNumber + \"\\n\" +\n \"%%BeginPageSetup\\n\" +\n \"/pagelevel save def\\n\";\n// \"90 rotate\\n\";\n header += \"%%EndPageSetup\\n\";\n return header;\n }", "@Override\n public RaftNode getHeader() {\n return allNodes.getHeader();\n }", "private static String header() {\r\n String output = \"\";\r\n output += \"\\\\documentclass[a4paper,10pt]{article}\\n\";\r\n output += \"\\\\title{Wilcoxon Signed Ranks test.}\\n\";\r\n output += \"\\\\date{\\\\today}\\n\\\\author{KEEL non-parametric statistical module}\\n\\\\begin{document}\\n\\n\\\\pagestyle{empty}\\n\\\\maketitle\\n\\\\thispagestyle{empty}\\n\\n\";\r\n\r\n return output;\r\n\r\n }", "boolean hasHeader();", "public String headerLine() {\n return headerLine;\n }", "@Override\n\tpublic String getCustomHtmlHeaders()\n\t{\n\t\treturn null;\n\t}", "public ElementHeader getElementHeader()\n {\n return elementHeader;\n }", "public NetFlowHeader getHeader() throws IOException {\n if (header == null) {\n header = prepareHeader();\n }\n\n return header;\n }", "Map<String, String> getHeaders();", "public void onHeaderRefresing();", "@Override\n public StreamHeader getHeader() throws Exception {\n return header;\n }", "@Test\n\tprivate void get_all_headers() {\n\t\tRestAssured.baseURI = \"https://reqres.in\";\n\t\tRequestSpecification httpRequest = RestAssured.given();\n\t\tResponse response = httpRequest.request(Method.GET, \"/api/users?page=2\");\n\t\tHeaders headers = response.getHeaders();\n\t\tfor (Header header : headers) {\n\t\t\tSystem.out.println(header.getName() + \" \\t : \" + header.getValue());\n\t\t}\n\t}", "@Override\n public ElementHeader getElementHeader()\n {\n return elementHeader;\n }", "stockFilePT102.StockHeaderDocument.StockHeader getStockHeader();", "public String getResponseHeader(String key)\n\t{\n\t\treturn this.responseHeader.getOrDefault(key, \"\");\n\t}", "public void Verify_Expected_Header_Visibility()\r\n\t{\r\n\t\tString Runtime_Header_text=Page_header.getText();\r\n\t\tif(Runtime_Header_text.equals(Exp_page_header))\r\n\t\t\tSystem.out.println(\"Expected Header visible at webpage\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Expected Header not visible at webpage\");\r\n\t}", "public String getHeaderValue() {\n\treturn getString(ATTR_HEADER_VALUE, null);\n }", "public boolean getHeader() {\n return isHeader;\n }", "public DnsHeader header() {\n return header;\n }", "public String getHeadIncludes() {\n return (String) get(\"head_includes\");\n }", "public java.lang.String getHeaderName() {\r\n return headerName;\r\n }", "@Override\n public ByteBuffer getIppHeader(URL url) throws UnsupportedEncodingException {\n return getIppHeader(url, createAttributeMap());\n }", "com.didiyun.base.v1.HeaderOrBuilder getHeaderOrBuilder();", "public String getTitle(){\n\t\tlog.debug(\"Getting title of Cruises page\");\n\t\tString title = driver.getTitle();\n\t\tlog.info(\"Title of Cruises page is: \"+title);\n\t\treturn title;\n\t}", "public ListIterator getHeaders()\n { return headers.listIterator(); }", "public String getHeader(String name, String delimiter) throws MessagingException {\n/* 382 */ if (this.headers == null)\n/* 383 */ loadHeaders(); \n/* 384 */ return this.headers.getHeader(name, delimiter);\n/* */ }", "public String getHeaderField(int paramInt) {\n/* 278 */ return this.delegate.getHeaderField(paramInt);\n/* */ }", "default boolean hasHeader() {\n return true;\n }" ]
[ "0.8003351", "0.8003351", "0.72867024", "0.72385496", "0.71795005", "0.7083262", "0.7013182", "0.70061517", "0.6948951", "0.6945914", "0.68592644", "0.68431157", "0.68349636", "0.68349636", "0.67835116", "0.6764089", "0.6729794", "0.671776", "0.67116445", "0.6697583", "0.66470623", "0.6637809", "0.6623459", "0.66160136", "0.6563476", "0.6528792", "0.652197", "0.6499746", "0.647288", "0.6454261", "0.6436341", "0.64363325", "0.6409315", "0.6363226", "0.6354738", "0.6333014", "0.6301846", "0.6274649", "0.6252097", "0.6233024", "0.61923766", "0.6183365", "0.6159963", "0.6156636", "0.6149461", "0.6122547", "0.61199313", "0.611817", "0.6111525", "0.60999495", "0.6097466", "0.6091369", "0.6085946", "0.60850877", "0.6084696", "0.60798264", "0.60733914", "0.6067601", "0.6065293", "0.6062182", "0.6042929", "0.6030337", "0.6029892", "0.6020394", "0.60174644", "0.6016376", "0.60110515", "0.6003722", "0.5982364", "0.5969388", "0.5969229", "0.5967474", "0.59624296", "0.59610754", "0.5950117", "0.5944338", "0.5944032", "0.5934689", "0.59328604", "0.5932804", "0.5922102", "0.5905172", "0.58977264", "0.5895373", "0.5894733", "0.58756226", "0.5868454", "0.58606637", "0.58559775", "0.5841409", "0.5837091", "0.58344704", "0.5825913", "0.58218414", "0.57995236", "0.57894075", "0.578788", "0.57787824", "0.57760555", "0.5771599" ]
0.72777736
3
TODO Autogenerated method stub
public static void main(String[] args) { Template robert = new ConcreteAnswer("Robert"); robert.question(); }
{ "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
/If it's private, then can't be overrided, the output will "is ", and if protected, it's overrided, and the output is: How to implement the templateMethod? a. Google b. Eclipse c. Baidu Robert's answer is a
protected abstract String answer();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.917 -0500\", hash_original_method = \"4F6254C867328A153FDD5BD23453E816\", hash_generated_method = \"627F9C594B5D3368AD9A21A5E43D2CB8\")\n \nprivate Extensions() {}", "@Override\r\n public String description() {\r\n return \"<html>Create a new method in class A that delegates the call to object B. <br/>\" +\r\n \"Now the client doesn’t know about, or depend on, class B. </html>\";\r\n }", "public interface Template {\n\n}", "public String methodBase() {\n\t\tString tmp = name;\n\t\ttmp = tmp.replaceFirst(\"^get\", \"\");\n\t\ttmp = tmp.replaceFirst(\"^is\", \"\");\n\t\treturn tmp.substring(0,1).toLowerCase()+tmp.substring(1);\n\t}", "public interface ITemplate {\n\n}", "@Override\npublic String say_it() {\n\treturn \"hello world\";\n}", "public E16_OverloadJavaDoc() {\n System.out.println(\"Planting a seedling\");\n }", "String superGetterCode() {\n return isPrivate ? String.format(\"super.%s()\", getterMethodName) : fieldName;\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.809 -0500\", hash_original_method = \"AC0A5CAC5D79A50D0A1A1A7D60109A25\", hash_generated_method = \"DDCD510819A32FF7BD9558A5CE176D29\")\n \nprivate ContactMethods() {}", "private void withMethodBody(){\n\t\tSystem.out.print(\"This is without abstract \");\n\t\t}", "void mo25968e(TemplateInfo templateInfo);", "public interface C5138c {\n /* renamed from: e */\n void mo25968e(TemplateInfo templateInfo);\n\n /* renamed from: f */\n void mo25969f(TemplateInfo templateInfo);\n}", "@Override\n protected void prot() {\n }", "public abstract void mo32008e(TemplateInfo templateInfo);", "abstract String applicable(Method[] getters) throws InvalidObjectException;", "protected void doSomethingElse()\r\n {\r\n \r\n }", "void mo25969f(TemplateInfo templateInfo);", "@Override\n public void matiz() {\n System.out.println(\"New not Abstract method\");\n }", "public abstract String getTemplDesc();", "protected void generateMethods(ClassContext classContext, IData data, String bean, SourceWriter sw) {\n }", "@Override\n protected String getMethodName() {\n return suitename() + \"-\" + super.getMethodName();\n }", "private abstract void privateabstract();", "String getTemplate();", "boolean isOverride();", "private void display3(){\n\t\tSystem.out.println(\"Private Method inside interface\");\n\t}", "@Test\n public void testProtectedAccessForProperties13() {\n testNoWarning(\n srcs(\n SourceFile.fromCode(\n \"a.js\",\n lines(\n \"goog.provide('A');\",\n \"\",\n \"/** @constructor */\",\n \"var A = function() {}\",\n \"\",\n \"/** @protected */\",\n \"A.prototype.method = function() {};\")),\n SourceFile.fromCode(\n \"b1.js\",\n lines(\n \"goog.require('A');\",\n \"goog.provide('B1');\",\n \"\",\n \"/**\",\n \" * @constructor\",\n \" * @extends {A}\",\n \" */\",\n \"var B1 = function() {};\",\n \"\",\n \"/** @override */\",\n \"B1.prototype.method = function() {};\")),\n SourceFile.fromCode(\n \"b2.js\",\n lines(\n \"goog.require('A');\",\n \"goog.provide('B2');\",\n \"\",\n \"/**\",\n \" * @constructor\",\n \" * @extends {A}\",\n \" */\",\n \"var B2 = function() {};\",\n \"\",\n \"/** @override */\",\n \"B2.prototype.method = function() {};\")),\n SourceFile.fromCode(\n \"c.js\",\n lines(\n \"goog.require('B1');\",\n \"goog.require('B2');\",\n \"\",\n \"/**\",\n \" * @param {!B1} b1\",\n \" * @constructor\",\n \" * @extends {B2}\",\n \" */\",\n \"var C = function(b1) {\",\n \" var x = b1.method();\",\n \"};\"))));\n }", "@Override\n\tpublic void testPringt() {\n\t\tSystem.out.println(\"我是一个被代理的类\");\n\t}", "@Override\n public boolean isPrivate() {\n return true;\n }", "private String getSomePrivateInfo() {\r\n \treturn \"private information of MySubject\";\r\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "boolean isPrivate();", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:42.000 -0500\", hash_original_method = \"46D026C452E34CB5D17D4D7413C83210\", hash_generated_method = \"78C5016E7109D19F8AD63CF42C68ACE4\")\n \n private void nativeFinalize(){\n }", "private static boolean willGenerateExtentionFor(IInterfaceDefinition iDef, Environment base)\n \t{\n \t\treturn base.lookUpType(iDef.getName().getName()) != null && !isUtilityOrTemplateClass(iDef, base);\n \t}", "private void insertRemoveYouMethod(String rootDir)\n {\n\t\tString propChSupport = \"firePropertyChange(\\\"REMOVE_YOU\\\", this, null);\";\n\t\tif (!getRepairClassModel().hasFeature(Feature.PROPERTYCHANGESUPPORT)) {\n\t\t\t// return;\n\t\t\tpropChSupport = \"\";\n\t\t}\n\t\tTemplate template = new Template(Parser.METHOD + \":removeYou()\");\n\t\t// add removeYou method\n\t\tString overrideText = \"\";\n\t\tClazzSet superClazzes = model.getSuperClazzes(true);\n\t\tsuperClazzes.without(model);\n\t\tfor (Clazz clazz : superClazzes) {\n\t\t\tif (GraphUtil.isInterface(clazz)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!GraphUtil.isExternal(clazz)) {\n\t\t\t\toverrideText = \"@Override\";\n\t\t\t}\n\t\t\tif (getGenerator(clazz).getOrCreateParser(rootDir).indexOf(searchString) >= 0) {\n\t\t\t\toverrideText = \"@Override\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\ttemplate.withTemplate(\"\\n \" +\n\t \"\\n //==========================================================================\" +\n\t \"\\n \" +\n\t \"\\n {{Override}}\" +\n\t \"\\n public void removeYou()\" +\n\t \"\\n {\" +\n\t \"\\n \" + propChSupport + \n\t \"\\n }\" +\n\t \"\\n\");\n\t\ttemplate.insert(parser, \"Override\", overrideText);\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.504 -0500\", hash_original_method = \"F5E3085137E37D29F0F8CB3C296F1F57\", hash_generated_method = \"47D4A76F75042B03A266F16D90E98429\")\n \nprivate Contacts() {}", "private void Nice(){\n }", "@Override\npublic String say_it_loud() {\n\treturn \"HELLO WORLD\";\n}", "default boolean isSpecial() { return false; }", "@Test\n\tvoid onPrivateMethod() {\n\t\tString classContent =\n\t\t//@formatter:off\n\t\t\t\t\"package methodinterception;\"\n\n\t\t\t\t+ \"import io.github.swingboot.concurrency.AssertUi;\"\n\t\t\t\t\n\t\t\t\t+ \"public class N {\"\n\t\t\t\t+ \"\tpublic N() {}\"\n\t\t\t\t\n\t\t\t\t+ \"\t@AssertUi\"\n\t\t\t\t+ \"\tprivate void doSomething() {}\"\n\t\t\t\t\n\t\t\t\t+ \"}\";\n\t\t//@formatter:on\n\t\tReflectException ex = assertThrows(ReflectException.class, () -> compile(\"N\", classContent));\n\t\tassertTrue(ex.getMessage().toLowerCase().contains(\"private methods\"));\n\t}", "public static void main(String[] args) {\n\t\tPrivateOverride po = new PrivateOverride();\n\t\t//po.f();\n\t}", "public static String getSynthName() \n {\n return \"Override Me\"; \n }", "public void doGeneralThings() {\n logger.debug(\"Overrided or implememted method - doGeneralThings!\");\n }", "public void calling(){ // when the abstract method is implemented in other class 'public' keyword is used..\r\n System.out.println(\"I am calling...\");\r\n }", "public void myPublicMethod() {\n\t\t\n\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "public abstract String mo41079d();", "public abstract String getDecoratorInfo();", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.877 -0500\", hash_original_method = \"6B80070A6DD2FB0EB3D1E45B8D1F67CF\", hash_generated_method = \"2A1ECFC7445D74F90AF7029089D02160\")\n \nprivate Organizations() {}", "public abstract Object mo26777y();", "public ITool getSuperClass();", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.663 -0500\", hash_original_method = \"7BA2DC4B038FD72F399C633B1C4B5B34\", hash_generated_method = \"3D1B22AE31FE9AB2658DC3713C91A6C9\")\n \nprivate Groups() {}", "@Override\n\tpublic void randomMethod(String name) {\n\t\t\n\t}", "default String display() { //just wanted to try out default methods we learned in class here-- abstract format below\r\n\t\treturn \"Nothing to show here\";\r\n\t}", "public java.lang.String explainInternal (boolean extended) { throw new RuntimeException(); }", "@Override\n public String cualquierMetodo2() {\n return \"Método implementado en la clase hija viaje de incentivo\";\n }", "java.lang.String getHowToUse();", "java.lang.String getHowToUse();", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "StackManipulation virtual(TypeDescription invocationTarget);", "public static void main(String[] args) {\n // since we declared the variables in access modifier class as static ==> we can call them through class name\n // here we will call the variables BUT private variable cannot be called into inherited\n System.out.println(c04_TestData2.publicVariable);\n System.out.println(c04_TestData2.protectedVariable);\n System.out.println(c04_TestData2.defaultVariable);\n\n // here we will call the method that were created in AccessModifier class into here\n // only public, protected, and default methods only can be inherited and used here\n c04_TestData2.publicMethod();\n c04_TestData2.protectedMethod();\n c04_TestData2.defaultMethod();\n\n // because they are static method we can call them like this too\n publicMethod();\n protectedMethod();\n defaultMethod();\n }", "public abstract String mo118046b();", "MethodSynthesizer getMethodSynthesizer();", "public Methods() {\n // what is this doing? -PMC\n }", "@Test\n public void testProtectedAccessForProperties16() {\n test(\n srcs(\n lines(\n \"/** @constructor */ var Foo = function() {};\",\n \"/** @protected */ Foo.prototype.bar = function() {};\"),\n lines(\n \"/** @constructor @extends {Foo} */\",\n \"var OtherFoo = function() { var f = () => this.bar(); };\",\n \"OtherFoo.prototype.baz = function() { return () => this.bar(); };\")));\n }", "@Override\n\tpublic void dosomething2() {\n\t\t\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "public abstract String mo13682d();", "protected void h() {}", "private test5() {\r\n\t\r\n\t}", "@Test\n public void testProtectedAccessForProperties14() {\n test(\n srcs(\n lines(\n \"/** @constructor */ var Foo = function() {};\",\n \"Foo.prototype = { /** @protected */ bar: function() {} }\"),\n lines(\n \"/** @constructor @extends {Foo} */\",\n \"var OtherFoo = function() { this.bar(); };\",\n \"OtherFoo.prototype = { moo() { new Foo().bar(); }};\")));\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.514 -0500\", hash_original_method = \"E49204FD271E895B10D86A1AFEA21B04\", hash_generated_method = \"59B3C6A592AE63BEE2BC1CC1723B36DF\")\n \nprivate Settings() {}", "@Override\n\tpublic void overrideMe() {\n\t\tSystem.out.println(instant);\n\t}", "@Test\n public void testProtectedAccessForProperties15() {\n test(\n srcs(\n lines(\n \"/** @constructor */ var Foo = function() {};\",\n \"Foo.prototype = { /** @protected */ bar: function() {} }\"),\n lines(\n \"/** @constructor @extends {Foo} */\",\n \"var OtherFoo = function() { this['bar'](); };\",\n \"OtherFoo.prototype = { ['bar']() { new Foo().bar(); }};\")));\n }", "@Override\n // khi extends class abstract thi tu mat key abstract trong method;\n public double rice() {\n System.out.println(\"$1000\");\n return 0;\n }", "String template();", "Traditional createTraditional();", "@Test\n public void testDecorateAllPublicMethodsFromTest() {\n Class<? extends Config> dynamicConfigClass = getDynamicConfigClass();\n Method[] methods = dynamicConfigClass.getMethods();\n for (Method method : methods) {\n if (DynamicConfigurationAwareConfigTest.isMethodStatic(method)) {\n continue;\n }\n if (DynamicConfigurationAwareConfigTest.isMethodDeclaredByClass(method, Object.class)) {\n // let's skip methods like wait() or notify() - declared directly in the Object class\n continue;\n }\n // all other public method should be overridden by the dynamic config aware decorator\n if (!(DynamicConfigurationAwareConfigTest.isMethodDeclaredByClass(method, dynamicConfigClass))) {\n Class<?> declaringClass = method.getDeclaringClass();\n Assert.fail(((((((\"Method \" + method) + \" is declared by \") + declaringClass) + \" whilst it should be\") + \" declared by \") + dynamicConfigClass));\n }\n }\n }", "@Override\n public Object generate(Object o, Method method, Object... objects) {\n StringBuilder sb = new StringBuilder();\n sb.append(o.getClass().getName());\n sb.append(method.getName());\n for (Object obj : objects) {\n sb.append(obj.toString());\n }\n return sb.toString();\n }", "public static void main(String[] args) {\n\t\n\tAccesingModifiers.hello();//heryerden accessable \n\tAccesingModifiers.hello1();\n\tAccesingModifiers.hello2();\n\t\n\t//AccesingModifiers.hello3(); not acceptable since permission is set to private\n\t\n}", "public abstract String tiposervicio();", "public default void defaultMethod(){\r\n System.out.println(\"This is a method from Other Interface and can be overriden.\");\r\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public void method_4270() {}", "public String Mostrar() {\r\n Generic c = this.generic;\r\n String Ret = \"\";\r\n System.out.println(c.getClass().getName());\r\n Ret += c.getClass().getName() + \"\\n\";\r\n System.out.println(c.getClass().getSimpleName());\r\n Ret += c.getClass().getSimpleName() + \"\\n\";\r\n System.out.println(\"Numero de Metodos: \" + c.getClass().getMethods().length);\r\n Ret += \"Numero de Metodos: \" + c.getClass().getMethods().length;\r\n System.out.println(\"Is extended by: \" + c.getClass().getSuperclass().getSimpleName());\r\n Ret += \"Is extended by: \" + c.getClass().getSuperclass().getSimpleName() + \"\\n\";\r\n System.out.println(\"Numero de atributos: \" + c.getClass().getDeclaredFields().length);\r\n Ret += \"Numero de atributos: \" + c.getClass().getDeclaredFields().length + \"\\n\";\r\n System.out.println(\"Numero de atributos (Superclase) : \" + c.getClass().getSuperclass().getDeclaredFields().length);\r\n Ret += \"Numero de atributos (Superclase) : \" + c.getClass().getSuperclass().getDeclaredFields().length + \"\\n\";\r\n Field[] declaredFields = c.getClass().getDeclaredFields();\r\n Field[] SuperDeclaredFields = this.SuperDeclaredFields;\r\n for (int i = 0; i < SuperDeclaredFields.length; i++) {\r\n System.out.println(SuperDeclaredFields[i].getType().getSimpleName() + \" \" + SuperDeclaredFields[i].getName() + \";\");\r\n Ret += SuperDeclaredFields[i].getType().getSimpleName() + \" \" + SuperDeclaredFields[i].getName() + \";\";\r\n }\r\n for (int i = 0; i < declaredFields.length; i++) {\r\n System.out.println(declaredFields[i].getType().getSimpleName() + \" \" + declaredFields[i].getName() + \";\");\r\n Ret += declaredFields[i].getType().getSimpleName() + \" \" + declaredFields[i].getName() + \";\";\r\n }\r\n return Ret;\r\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:28:20.919 -0500\", hash_original_method = \"D4C81D48070585F36B5352844546D049\", hash_generated_method = \"629B9A28DBC1AA3E670F6F3B511A78B5\")\n \nprivate static final boolean isIdeographic(char c, boolean includeNonStarters) {\n if (c >= '\\u2E80' && c <= '\\u2FFF') {\n return true; // CJK, KANGXI RADICALS, DESCRIPTION SYMBOLS\n }\n if (c == '\\u3000') {\n return true; // IDEOGRAPHIC SPACE\n }\n if (c >= '\\u3040' && c <= '\\u309F') {\n if (!includeNonStarters) {\n switch (c) {\n case '\\u3041': // # HIRAGANA LETTER SMALL A\n case '\\u3043': // # HIRAGANA LETTER SMALL I\n case '\\u3045': // # HIRAGANA LETTER SMALL U\n case '\\u3047': // # HIRAGANA LETTER SMALL E\n case '\\u3049': // # HIRAGANA LETTER SMALL O\n case '\\u3063': // # HIRAGANA LETTER SMALL TU\n case '\\u3083': // # HIRAGANA LETTER SMALL YA\n case '\\u3085': // # HIRAGANA LETTER SMALL YU\n case '\\u3087': // # HIRAGANA LETTER SMALL YO\n case '\\u308E': // # HIRAGANA LETTER SMALL WA\n case '\\u3095': // # HIRAGANA LETTER SMALL KA\n case '\\u3096': // # HIRAGANA LETTER SMALL KE\n case '\\u309B': // # KATAKANA-HIRAGANA VOICED SOUND MARK\n case '\\u309C': // # KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK\n case '\\u309D': // # HIRAGANA ITERATION MARK\n case '\\u309E': // # HIRAGANA VOICED ITERATION MARK\n return false;\n }\n }\n return true; // Hiragana (except small characters)\n }\n if (c >= '\\u30A0' && c <= '\\u30FF') {\n if (!includeNonStarters) {\n switch (c) {\n case '\\u30A0': // # KATAKANA-HIRAGANA DOUBLE HYPHEN\n case '\\u30A1': // # KATAKANA LETTER SMALL A\n case '\\u30A3': // # KATAKANA LETTER SMALL I\n case '\\u30A5': // # KATAKANA LETTER SMALL U\n case '\\u30A7': // # KATAKANA LETTER SMALL E\n case '\\u30A9': // # KATAKANA LETTER SMALL O\n case '\\u30C3': // # KATAKANA LETTER SMALL TU\n case '\\u30E3': // # KATAKANA LETTER SMALL YA\n case '\\u30E5': // # KATAKANA LETTER SMALL YU\n case '\\u30E7': // # KATAKANA LETTER SMALL YO\n case '\\u30EE': // # KATAKANA LETTER SMALL WA\n case '\\u30F5': // # KATAKANA LETTER SMALL KA\n case '\\u30F6': // # KATAKANA LETTER SMALL KE\n case '\\u30FB': // # KATAKANA MIDDLE DOT\n case '\\u30FC': // # KATAKANA-HIRAGANA PROLONGED SOUND MARK\n case '\\u30FD': // # KATAKANA ITERATION MARK\n case '\\u30FE': // # KATAKANA VOICED ITERATION MARK\n return false;\n }\n }\n return true; // Katakana (except small characters)\n }\n if (c >= '\\u3400' && c <= '\\u4DB5') {\n return true; // CJK UNIFIED IDEOGRAPHS EXTENSION A\n }\n if (c >= '\\u4E00' && c <= '\\u9FBB') {\n return true; // CJK UNIFIED IDEOGRAPHS\n }\n if (c >= '\\uF900' && c <= '\\uFAD9') {\n return true; // CJK COMPATIBILITY IDEOGRAPHS\n }\n if (c >= '\\uA000' && c <= '\\uA48F') {\n return true; // YI SYLLABLES\n }\n if (c >= '\\uA490' && c <= '\\uA4CF') {\n return true; // YI RADICALS\n }\n if (c >= '\\uFE62' && c <= '\\uFE66') {\n return true; // SMALL PLUS SIGN to SMALL EQUALS SIGN\n }\n if (c >= '\\uFF10' && c <= '\\uFF19') {\n return true; // WIDE DIGITS\n }\n\n return false;\n }", "public String getInfo()\n\t{\n\t\treturn \"Decorate\";\n\t}", "@Override\n\tpublic void A() {\n\t\t\n\t}", "@Override\n\tpublic void A() {\n\t\t\n\t}", "abstract int pregnancy();", "@Override\n\tvoid methodabstract() {\n\t\t\n\t}", "public void callmetoo(){\r\n\tSystem.out.println(\"This is a concrete method\");\r\n\t}", "java.lang.String printKeys() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: java.security.Signer.printKeys():java.lang.String, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.printKeys():java.lang.String\");\n }", "@Override\n\tpublic void some() {\n\t\t\n\t}", "boolean overrides(MethodDeclaration sub, MethodDeclaration sup);", "public abstract String mo9239aw();", "protected void method2() {\n\t}", "public interface ITemplateBaseMessage {\r\n\r\n\t/**\r\n\t * Method to get the module type class\r\n\t * \r\n\t * @return String\r\n\t */\r\n\tpublic String getModuleTypeClass();\t\r\n\t\r\n\t/**\r\n\t * Method to set the message address\r\n\t * \r\n\t * @param address\r\n\t */\r\n\tpublic void setMessageAddress(String address);\r\n\t\r\n\t/**\r\n\t * Method to set the message parameters\r\n\t * \r\n\t * @param parameters\r\n\t */\r\n\tpublic void setParameters(String parameters);\r\n\t\r\n\t/**\r\n\t * Method to get the message address\r\n\t * \r\n\t * @return String\r\n\t */\r\n\tpublic String getMessageAddress();\r\n}", "@Override\r\n\tpublic void a1() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void PrimitiveOperation2() {\n\t\tSystem.out.println(\"Concrete class B method 2 implemation\");\r\n\t}", "void fun() {\n\t\tSystem.out.println(\"Overriden Normal Method\");\n\t}" ]
[ "0.59853655", "0.57823515", "0.5697505", "0.56657916", "0.566248", "0.5651443", "0.55684245", "0.5557178", "0.5528724", "0.54474413", "0.54421794", "0.54209507", "0.54174364", "0.5415551", "0.5381019", "0.53654104", "0.53629714", "0.53362083", "0.5329778", "0.5312478", "0.5295516", "0.527889", "0.5275717", "0.5274746", "0.5273549", "0.5273392", "0.526023", "0.5251804", "0.5247914", "0.5242545", "0.5242545", "0.52390677", "0.52170944", "0.5215996", "0.5214441", "0.520834", "0.5201575", "0.51993227", "0.5176087", "0.5175703", "0.5172833", "0.51624596", "0.5156752", "0.51556325", "0.515485", "0.514968", "0.5148247", "0.51342636", "0.51317227", "0.5131072", "0.5119986", "0.5108397", "0.5108334", "0.51057", "0.5101073", "0.5100072", "0.50952655", "0.50952655", "0.50924546", "0.5087471", "0.5074091", "0.5056756", "0.5053978", "0.5053252", "0.5052956", "0.5051468", "0.5045064", "0.50446665", "0.50391257", "0.50363714", "0.50204766", "0.50171965", "0.5013002", "0.50089985", "0.50065273", "0.5003903", "0.500176", "0.49983582", "0.49951506", "0.49940053", "0.49908838", "0.49903628", "0.4984605", "0.49830025", "0.49777544", "0.49727258", "0.4971013", "0.4968132", "0.4968132", "0.49674803", "0.49672446", "0.49664438", "0.49658555", "0.49642235", "0.49625242", "0.49584192", "0.49584028", "0.4957069", "0.4954506", "0.49495104", "0.4947492" ]
0.0
-1
e.g. "boundingBox":"27, 66, 72, 18"
public boolean isVertical() { return isVertical; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Rectangle getBoundingBox(Rectangle rect);", "public static String bboxVertices(){\n \treturn \"0.5 0.5 0.5 0.5 0.5 -0.5 0.5 -0.5 0.5 0.5 -0.5 -0.5 -0.5 0.5 0.5 -0.5 0.5 -0.5 -0.5 -0.5 0.5 -0.5 -0.5 -0.5\";\n }", "public void selectTargetScreenArea(String boundingBoxJson) {\n sysMsgTextView.setText(\"Target bounding box:\\n\" + boundingBoxJson);\n\n String temp1 = boundingBoxJson.replace(\"[\", \"\");\n String temp2 = temp1.replace(\"]\", \"\");\n String temp3 = temp2.replace(\" \", \"\");\n String[] boundingBox = temp3.split(\"\\\\,\");\n\n float xLeft = Float.parseFloat((boundingBox[1]));\n float xRight = Float.parseFloat(boundingBox[3]);\n float yTop = Float.parseFloat(boundingBox[2]);\n float yBot = Float.parseFloat(boundingBox[4]);\n\n Log.d(\"XXX Left\", Float.toString(xLeft));\n Log.d(\"XXX Right\", Float.toString(xRight));\n Log.d(\"XXX Top\", Float.toString(yTop));\n Log.d(\"XXX Bot\", Float.toString(yBot));\n\n ArSceneView arSceneView = fragment.getArSceneView();\n final Bitmap bitmap = Bitmap.createBitmap(arSceneView.getWidth(), arSceneView.getHeight(), Bitmap.Config.ARGB_8888);\n\n float middlePoint = arSceneView.getWidth()/2;\n float centroidX = (xLeft + xRight)/2;\n\n if(centroidX < middlePoint) {\n targetScreenArea = \"LEFT\";\n } else {\n targetScreenArea = \"RIGHT\";\n }\n Log.d(\"targetScreenArea\", targetScreenArea);\n\n ImageView bbox=(ImageView) findViewById(R.id.bbox);\n\n Canvas canvas = new Canvas(bitmap);\n Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(5);\n paint.setColor(Color.parseColor(\"#00FF00\"));\n\n Rect rec = new Rect();\n rec.top= (int) yTop;\n rec.left= (int) xLeft;\n rec.bottom = (int) yBot;\n rec.right = (int) xRight;\n\n canvas.drawRect(rec,paint);\n bbox.setImageBitmap(bitmap);\n\n }", "@Override\n public int hashCode() {\n return getBoundingBox().hashCode();\n }", "private Coordinate[] generateBoundingBox(final Geometry geometry) {\n if (geometry == null || geometry.getCoordinates() == null || geometry.getCoordinates().length == 0) {\n return new Coordinate[]{new Coordinate(0,0),new Coordinate(0,0)};\n }\n final Coordinate firstPoint = geometry.getCoordinates()[0];\n double minLat = firstPoint.y;\n double minLon = firstPoint.x;\n double maxLat = firstPoint.y;\n double maxLon = firstPoint.x;\n for (final Coordinate coordinate : geometry.getCoordinates()) {\n if (coordinate.x < minLon) {\n minLon = coordinate.x;\n }\n if (coordinate.y < minLat) {\n minLat = coordinate.y;\n }\n if (coordinate.x > maxLon) {\n maxLon = coordinate.x;\n }\n if (coordinate.y > maxLat) {\n maxLat = coordinate.y;\n }\n }\n return new Coordinate[]{\n new Coordinate(minLon, minLat),\n new Coordinate(maxLon, maxLat)\n };\n }", "public BoundingBox()\n\t{\n\t\tcenter = new Vector2(0.0, 0.0);\n\t\twidth = 1.0;\n\t\theight = 1.0;\n\t}", "public CollisionBox(String parameters) {\n\n\t\tString coordinates[] = parameters.split(\",\");\n\n\t\ttopleft.x = Integer.parseInt(coordinates[0]);\n\t\ttopleft.y = Integer.parseInt(coordinates[1]);\n\t\tbottomright.x = Integer.parseInt(coordinates[2]);\n\t\tbottomright.y = Integer.parseInt(coordinates[3]);\n\n\t}", "public GeographicBoundingBox getBoundingBox()\r\n {\r\n return myBoundingBox;\r\n }", "@Override\n\tpublic Rectangle getBoundingBox() {\n\t\tRectangle rectangle = new Rectangle(this.image.getWidth(), this.image.getWidth());\n\t\trectangle.setLocation(this.position);\n\t\treturn rectangle;\n\t}", "public void computeBoundingBox() {\n\taveragePosition = new Point3(center);\n tMat.rightMultiply(averagePosition);\n \n minBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n maxBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n // Initialize\n Point3[] v = new Point3[8];\n for (int i = 0; i < 8; i++)\n \tv[i] = new Point3(center);\n // Vertices of the box\n v[0].add(new Vector3(-radius, -radius, -height/2.0));\n v[1].add(new Vector3(-radius, radius, -height/2.0));\n v[2].add(new Vector3(radius, -radius, -height/2.0));\n v[3].add(new Vector3(radius, radius, -height/2.0));\n v[4].add(new Vector3(-radius, -radius, height/2.0));\n v[5].add(new Vector3(-radius, radius, height/2.0));\n v[6].add(new Vector3(radius, -radius, height/2.0));\n v[7].add(new Vector3(radius, radius, height/2.0));\n // Update minBound and maxBound\n for (int i = 0; i < 8; i++)\n {\n \ttMat.rightMultiply(v[i]);\n \tif (v[i].x < minBound.x)\n \t\tminBound.x = v[i].x;\n \tif (v[i].x > maxBound.x)\n \t\tmaxBound.x = v[i].x;\n \tif (v[i].y < minBound.y)\n \t\tminBound.y = v[i].y;\n \tif (v[i].y > maxBound.y)\n \t\tmaxBound.y = v[i].y;\n \tif (v[i].z < minBound.z)\n \t\tminBound.z = v[i].z;\n \tif (v[i].z > maxBound.z)\n \t\tmaxBound.z = v[i].z;\n }\n \n }", "public void constructBoundingBox()\r\n\t{\n\t\tdouble a = m_Qmin.x;\r\n\t\tdouble b = m_Qmin.y;\r\n\t\tdouble c = m_Qmin.z;\r\n\r\n\t\tdouble d = m_Qmax.x;\r\n\t\tdouble e = m_Qmax.y;\r\n\t\tdouble f = m_Qmax.z;\r\n\r\n\t\t//constructing the vertexes of the bounding box\r\n\t\tSceneVertex A = new SceneVertex( new Vector3d(a, b, c));\r\n\t\tSceneVertex B = new SceneVertex( new Vector3d(d, b, c));\r\n\t\tSceneVertex C = new SceneVertex( new Vector3d(d, b, f));\r\n\t\tSceneVertex D = new SceneVertex( new Vector3d(d, e, f));\r\n\t\tSceneVertex E = new SceneVertex( new Vector3d(a, e, f));\r\n\t\tSceneVertex F = new SceneVertex( new Vector3d(a, e, c));\r\n\t\tSceneVertex G = new SceneVertex( new Vector3d(d, e, c));\r\n\t\tSceneVertex H = new SceneVertex( new Vector3d(a, b, f));\r\n\r\n\r\n\t\t// building the vertices arrays for the faces\r\n\t\tArrayList<SceneVertex> verArrP0front = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP0front.add(A);\r\n\t\tverArrP0front.add(B);\r\n\t\tverArrP0front.add(G);\r\n\t\tverArrP0front.add(F);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP1left = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP1left.add(A);\r\n\t\tverArrP1left.add(F);\r\n\t\tverArrP1left.add(E);\r\n\t\tverArrP1left.add(H);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP2back = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP2back.add(H);\r\n\t\tverArrP2back.add(C);\r\n\t\tverArrP2back.add(D);\r\n\t\tverArrP2back.add(E);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP3right = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP3right.add(G);\r\n\t\tverArrP3right.add(D);\r\n\t\tverArrP3right.add(C);\r\n\t\tverArrP3right.add(B);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP4bottom = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP4bottom.add(A);\r\n\t\tverArrP4bottom.add(H);\r\n\t\tverArrP4bottom.add(C);\r\n\t\tverArrP4bottom.add(B);\r\n\r\n\t\tArrayList<SceneVertex> verArrP5top = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP5top.add(F);\r\n\t\tverArrP5top.add(G);\r\n\t\tverArrP5top.add(D);\r\n\t\tverArrP5top.add(E);\r\n\t\t\r\n\t\t// creating BoundingBox\r\n\t\tm_BoundingBox = new SceneNode(DrawingMode.GL_LINE, \"BoundingBox\", null);\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP0front, \"FRONT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP1left, \"LEFT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP2back, \"BACK\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP3right, \"RIGHT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP4bottom, \"BOTTOM\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP5top, \"TOP\"));\r\n\r\n\t\t\r\n\t}", "private void updateBoundingBox(GM_Object geo) {\r\n double minx_ = 0; double miny_ = 0;\r\n double maxx_ = 0; double maxy_ = 0;\r\n \r\n if ( geo instanceof GM_Point ) {\r\n minx_ = ((GM_Point)geo).getX();\r\n miny_ = ((GM_Point)geo).getY();\r\n maxx_ = ((GM_Point)geo).getX();\r\n maxy_ = ((GM_Point)geo).getY();\r\n } else {\r\n GM_Envelope tmp = geo.getEnvelope();\r\n minx_ = tmp.getMin().getX();\r\n miny_ = tmp.getMin().getY();\r\n maxx_ = tmp.getMax().getX();\r\n maxy_ = tmp.getMax().getY();\r\n }\r\n \r\n if ( minx_ < minx ) minx = minx_;\r\n if ( maxx_ > maxx ) maxx = maxx_;\r\n if ( miny_ < miny ) miny = miny_;\r\n if ( maxy_ > maxy ) maxy = maxy_;\r\n }", "public Rectangle getBoundingBox() {\n return new Rectangle(this);\r\n }", "private void generateBoxGeom()\n {\n // textures all share the same array, so process separately.\n textureBuffer = createBuffer(BOX_TEX_COORDS.length);\n textureBuffer.put(BOX_TEX_COORDS);\n textureBuffer.rewind();\n\n vertexBuffer = new FloatBuffer[6];\n normalBuffer = new FloatBuffer[6];\n\n for(int i = 0; i < 6; i++)\n {\n vertexBuffer[i] = createBuffer(12);\n normalBuffer[i] = createBuffer(12);\n }\n\n vertexBuffer[POSITIVE_X].put(RIGHT_BOX_COORDS);\n normalBuffer[POSITIVE_X].put(RIGHT_BOX_NORMALS);\n\n vertexBuffer[NEGATIVE_X].put(LEFT_BOX_COORDS);\n normalBuffer[NEGATIVE_X].put(LEFT_BOX_NORMALS);\n\n vertexBuffer[POSITIVE_Y].put(TOP_BOX_COORDS);\n normalBuffer[POSITIVE_Y].put(TOP_BOX_NORMALS);\n\n vertexBuffer[NEGATIVE_Y].put(BOTTOM_BOX_COORDS);\n normalBuffer[NEGATIVE_Y].put(BOTTOM_BOX_NORMALS);\n\n vertexBuffer[POSITIVE_Z].put(BACK_BOX_COORDS);\n normalBuffer[POSITIVE_Z].put(BACK_BOX_NORMALS);\n\n vertexBuffer[NEGATIVE_Z].put(FRONT_BOX_COORDS);\n normalBuffer[NEGATIVE_Z].put(FRONT_BOX_NORMALS);\n\n for(int i = 0; i < 6; i++)\n {\n vertexBuffer[i].rewind();\n normalBuffer[i].rewind();\n }\n }", "private void updateBoundingBox(Point_dt p) {\n\t\tdouble x = p.x(), y = p.y(), z = p.z();\n\t\tif (m_boundingBoxMin == null) {\n\t\t\tm_boundingBoxMin = new Point_dt(p);\n\t\t\tm_boundingBoxMax = new Point_dt(p);\n\t\t} else {\n\t\t\tif (x < m_boundingBoxMin.x())\n\t\t\t\tm_boundingBoxMin.setX(x);\n\t\t\telse if (x > m_boundingBoxMax.x())\n\t\t\t\tm_boundingBoxMax.setX(x);\n\t\t\tif (y < m_boundingBoxMin.y())\n\t\t\t\tm_boundingBoxMin.setY(y);\n\t\t\telse if (y > m_boundingBoxMax.y())\n\t\t\t\tm_boundingBoxMax.setY(y);\n\t\t\tif (z < m_boundingBoxMin.z())\n\t\t\t\tm_boundingBoxMin.setZ(z);\n\t\t\telse if (z > m_boundingBoxMax.z())\n\t\t\t\tm_boundingBoxMax.setZ(z);\n\t\t}\n\t}", "public void addBoundingBox() {\n abstractEditor.drawNewShape(new EBoundingBoxDT());\n }", "public Rectangle getBoundingBox() {\n return location;\n }", "public static Box getBoundingBox(Entity entity)\n\t{\n\t\treturn (new REntity(entity)).getBox().getBox();\n\t}", "public BoundingBox getBoundingBox ( ) {\n\t\t// TODO: backwards compatibility required\n\t\treturn invokeSafe ( \"getBoundingBox\" );\n\t}", "public AxisAlignedBB getBoundingBox()\r\n {\r\n return null;\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"BB[\" + origin.getX0() + \",\" + origin.getY0() + \",\"\n\t\t\t\t+ this.width + \",\" + this.height + \"]\";\n\t}", "DAABBC getAABB ();", "public BoundingBox(Coord origin, int width, int height) {\n\t\tsuper();\n\t\tthis.origin = origin;\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t}", "private void updateBoundingBox() {\n // TODO(sonpham): Optimize this. There is an amazing amount of repetition in this code.\n double downUnitX = MathUtils.quickCos((float) (anchorAngle + Math.PI));\n double downUnitY = MathUtils.quickSin((float) (anchorAngle + Math.PI));\n double sideUnitX = MathUtils.quickCos((float) (anchorAngle + Math.PI / 2));\n double sideUnitY = MathUtils.quickSin((float) (anchorAngle + Math.PI / 2));\n\n double aliveHeight = aliveTroopsMap.size() * 1.0 / width * unitStats.spacing;\n double fullToAliveRatio = 1.0 * troops.size() / aliveTroopsMap.size() ;\n\n double topLeftX = averageX - downUnitX * aliveHeight / 2 - sideUnitX * unitStats.spacing * width / 2;\n double topLeftY = averageY - downUnitY * aliveHeight / 2 - sideUnitY * unitStats.spacing * width / 2;\n\n double topRightX = averageX - downUnitX * aliveHeight / 2 + sideUnitX * unitStats.spacing * width / 2;\n double topRightY = averageY - downUnitY * aliveHeight / 2 + sideUnitY * unitStats.spacing * width / 2;\n\n double healthBotLeftX = averageX + downUnitX * aliveHeight / 2 - sideUnitX * unitStats.spacing * width / 2;\n double healthBotLeftY = averageY + downUnitY * aliveHeight / 2 - sideUnitY * unitStats.spacing * width / 2;\n\n double healthBotRightX = averageX + downUnitX * aliveHeight / 2 + sideUnitX * unitStats.spacing * width / 2;\n double healthBotRightY = averageY + downUnitY * aliveHeight / 2 + sideUnitY * unitStats.spacing * width / 2;\n\n double botLeftX = (healthBotLeftX - topLeftX) * fullToAliveRatio + topLeftX;\n double botLeftY = (healthBotLeftY - topLeftY) * fullToAliveRatio + topLeftY;\n\n double botRightX = (healthBotRightX - topRightX) * fullToAliveRatio + topRightX;\n double botRightY = (healthBotRightY - topRightY) * fullToAliveRatio + topRightY;\n\n aliveBoundingBox[0][0] = topLeftX; aliveBoundingBox[0][1] = topLeftY;\n aliveBoundingBox[1][0] = topRightX; aliveBoundingBox[1][1] = topRightY;\n aliveBoundingBox[2][0] = healthBotRightX; aliveBoundingBox[2][1] = healthBotRightY;\n aliveBoundingBox[3][0] = healthBotLeftX; aliveBoundingBox[3][1] = healthBotLeftY;\n\n boundingBox[0][0] = topLeftX; boundingBox[0][1] = topLeftY;\n boundingBox[1][0] = topRightX; boundingBox[1][1] = topRightY;\n boundingBox[2][0] = botRightX; boundingBox[2][1] = botRightY;\n boundingBox[3][0] = botLeftX; boundingBox[3][1] = botLeftY;\n }", "@Override\n public STRegion getBoundingBox() {\n\n SQLiteDatabase db = this.getReadableDatabase();\n\n String query = \"SELECT minX FROM \" + this.table_identifier + \" ORDER BY minX ASC LIMIT 1;\";\n float minX = getRowValueHelper(db, query, 0);\n query = \"SELECT minY FROM \" + this.table_identifier + \" ORDER BY minY ASC Limit 1;\";\n float minY = getRowValueHelper(db, query, 0);\n query = \"SELECT minT FROM \" + this.table_identifier + \" ORDER BY minT ASC Limit 1;\";\n float minT = getRowValueHelper(db, query, 0);\n query = \"SELECT maxX FROM \" + this.table_identifier + \" ORDER BY maxX DESC Limit 1;\";\n float maxX = getRowValueHelper(db, query, 0);\n query = \"SELECT maxY FROM \" + this.table_identifier + \" ORDER BY maxY DESC Limit 1;\";\n float maxY = getRowValueHelper(db, query, 0);\n query = \"SELECT maxT FROM \" + this.table_identifier + \" ORDER BY maxT DESC Limit 1;\";\n float maxT = getRowValueHelper(db, query, 0);\n\n return new STRegion(new STPoint(minX, minY, minT), new STPoint(maxX, maxY, maxT));\n }", "@Override\r\n public String toString() {\r\n return \"Location:: xPos: \" + xPos + \" yPos: \" + yPos + \"\\nBoundingBox: \" + boundingBox;\r\n }", "@Override\n \tpublic Rectangle2D GetBoundingBox() {\n\t\treturn null;\n \t}", "public GJBox2D boundingBox() {\n\t\tdouble xmin = Double.MAX_VALUE;\n\t\tdouble ymin = Double.MAX_VALUE;\n\t\tdouble xmax = Double.MIN_VALUE;\n\t\tdouble ymax = Double.MIN_VALUE;\n\n\t\t// coordinates of current point\n\t\tdouble x, y;\n\t\t\n\t\t// Iterate on each control point of each segment\n\t\tfor (Segment seg : this.segments) {\n\t\t\tfor (GJPoint2D p : seg.controlPoints()) {\n\t\t\t\t// get current coordinates\n\t\t\t\tx = p.x();\n\t\t\t\ty = p.y();\n\t\t\t\t\n\t\t\t\t// update bounds\n\t\t\t\txmin = Math.min(xmin, x);\n\t\t\t\tymin = Math.min(ymin, y);\n\t\t\t\txmax = Math.max(xmax, x);\n\t\t\t\tymax = Math.max(ymax, y);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// createFromCollection a new GJBox2D with the bounds\n\t\treturn new GJBox2D(xmin, xmax, ymin, ymax);\n\t}", "godot.wire.Wire.AABBOrBuilder getAabbValueOrBuilder();", "public Rectangle getBoundingBox() {\n\t\treturn getBounds();\n\t}", "public BoundingBox3d() {\n reset();\n }", "private HashMap setupBoundBoxes(BioMightBoundBox bioMightBoundBoxIn) \r\n\t{\r\n\t\t// Set up the bounding boxes for the various components\r\n\t\t// The various components locations will be driven by the\r\n\t\t// bounding boxes\r\n\t\tHashMap boundingBoxMap = new HashMap();\r\n\t\t\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\r\n\t\t// Initialize the BoundBoxes. This is used for\r\n\t\t// collections such as arms, legs,lungs,etc\r\n\t\tBioMightBoundBoxes bioBoundBoxes = null;\r\n\t\r\n\t\t// Initialize the BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\r\n\t\t// Initialize the Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize the Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\t\r\n\t\t// Use the information in the incomiing Bound Box\r\n\t\t// to orientate the inner bound boxes\r\n\t\tif (bioMightBoundBoxIn != null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Arm - SetupBoundBoxes - Incoming BoundBox: \" + \r\n\t\t\t\t\tbioMightBoundBoxIn.getXPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxIn.getYPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxIn.getZPos());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//********************************************************************* \r\n\t\t// EPITHELIUM BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Arm\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-12.0);\r\n\t\tzPos= new BigDecimal(-1.0);\r\n\t\t\r\n\t\txVector= new BigDecimal(9.0);\r\n\t\tyVector= new BigDecimal(8.0); \r\n\t\tzVector= new BigDecimal(4.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\r\n\t\t// Arm Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -9.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"ArmEpithelialCell\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"ArmEpithelialCell\", bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\tboundingBoxMap.put(Constants.ArmEpitheliumRef, bioBoundBox);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\t//********************************************************************* \r\n\t\t// ARMS BOUND BOXES\r\n\t\t// Set up the Bounding Box for the Bronchi\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\t\r\n\t\t//********************************************************************* \r\n\t\t// LEFT ARMS BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Left Arm\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(1.0);\r\n\t\tyPos = new BigDecimal(-11.0);\r\n\t\tzPos= new BigDecimal(-3.5);\r\n\t\t\r\n\t\txVector= new BigDecimal(2.0);\r\n\t\tyVector= new BigDecimal(2.0); \r\n\t\tzVector= new BigDecimal(2.0);\r\n\r\n\t\tbioBoundBoxes = new BioMightBoundBoxes();\r\n\t\t\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\t\r\n\t\t// ArmEpithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -8.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.ArmEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.ArmEpitheliumRef, bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.LeftArmRef, bioBoundBox);\t\r\n\r\n\t\t//********************************************************************* \r\n\t\t// RIGHT ARMS BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Bronchi\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(-1.0);\r\n\t\tyPos = new BigDecimal(-11.0);\r\n\t\tzPos= new BigDecimal(-3.5);\r\n\t\t\r\n\t\txVector= new BigDecimal(2.0);\r\n\t\tyVector= new BigDecimal(2.0); \r\n\t\tzVector= new BigDecimal(2.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\t\r\n\t\t// ArmEpithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -8.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.ArmEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.ArmEpitheliumRef, bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.RightArmRef, bioBoundBox);\t\t\r\n\r\n\t\t// Put the BioMight BoundBoxes for the Bronchi \r\n\t\t// into the BoundingBoxMap \r\n\t\tboundingBoxMap.put(Constants.BronchiRef, bioBoundBoxes);\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn (boundingBoxMap);\r\n\t}", "godot.wire.Wire.AABB getAabbValue();", "godot.wire.Wire.Rect2OrBuilder getRect2ValueOrBuilder();", "private static Map<String, String> m36195a(Rect rect) {\n HashMap hashMap = new HashMap();\n hashMap.put(\"x\", String.valueOf(rect.left));\n hashMap.put(\"y\", String.valueOf(rect.top));\n hashMap.put(\"w\", String.valueOf(rect.right - rect.left));\n hashMap.put(\"h\", String.valueOf(rect.bottom - rect.top));\n return hashMap;\n }", "protected double[] calculateDataBoundingBox() {\n \t\tdouble min_x = Double.MAX_VALUE;\n \t\tdouble min_y = Double.MAX_VALUE;\n \t\tdouble max_x = 0.0D;\n \t\tdouble max_y = 0.0D;\n \t\t// check the points\n \t\tfor (int i=0; i<n_points; i++) {\n \t\t\tif (p[0][i] < min_x) min_x = p[0][i];\n \t\t\tif (p[1][i] < min_y) min_y = p[1][i];\n \t\t\tif (p[0][i] > max_x) max_x = p[0][i];\n \t\t\tif (p[1][i] > max_y) max_y = p[1][i];\n \t\t}\n \t\treturn new double[]{min_x, min_y, max_x, max_y};\n \t}", "public void setBoundingBoxBottom(double value) {\n this.boundingBoxBottom = value;\n }", "public double getBoundingBoxBottom() {\n return boundingBoxBottom;\n }", "public void setBoundingBoxLeft(double value) {\n this.boundingBoxLeft = value;\n }", "@Test\n\tpublic void testGeoJsonTupleBuilder() {\n\t\tfinal TupleBuilder tupleBuilder = TupleBuilderFactory.getBuilderForFormat(\n\t\t\t\tTupleBuilderFactory.Name.GEOJSON);\n\n\t\tfinal Tuple tuple = tupleBuilder.buildTuple(GEO_JSON_LINE, \"1\");\n\n\t\tAssert.assertNotNull(tuple);\n\t\tAssert.assertEquals(Integer.toString(1), tuple.getKey());\n\t\tfinal Hyperrectangle expectedBox = new Hyperrectangle(13.3327994, 13.3327994, 52.4688608, 52.4688608);\n\t\tAssert.assertEquals(expectedBox, tuple.getBoundingBox());\n\t}", "public Shape getBgetBoundingBox() {\r\n\t\t\r\n\t\tEllipse2D elilipse = new Ellipse2D.Double(0, 0, imageWidth, imageHeight);\r\n\t\tAffineTransform at = new AffineTransform(); \r\n\t\tat.translate(locationX, locationY);\r\n\t\tat.rotate(Math.toRadians(angle*sizeAngles));\r\n\t\t at.scale(0.5, 0.5);\r\n\t\tat.translate(-imageWidth/2, -imageHeight/2);\r\n\t\t\r\n\t\tShape rotatedRect = at.createTransformedShape(elilipse);\r\n\t\treturn rotatedRect;\r\n\t}", "public ArrayList<ArrayList<String>> extractCoordsFromWfsXml(String xml_og) {\r\n\t\tSystem.out.println(\"ParserXmlJson.extractBoundingBoxFromWfsXml: \"+ xml_og);\r\n\t\tPointPolygon point = new PointPolygon();\r\n\t\tArrayList<String> list_objectid = new ArrayList<String>();\r\n\t\tArrayList<String> list_coords = new ArrayList<String>();\r\n\t\tArrayList<ArrayList<String>> list_coords_objectid = new ArrayList<ArrayList<String>>();\r\n\t\t\r\n\t\t\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t Document doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(LoadOnStartAppConfiguration.arbeitsbereichXmlTagPolygon.equals(args)){\r\n\t\t\t \treturn LoadOnStartAppConfiguration.arbeitsbereichXmlTagPolygon;\r\n\t\t\t }else if(\"gml\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/gml/3.2\"; \t\r\n\t\t\t }else{\r\n\t\t\t \treturn null;\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t\t});\t\t\r\n//\t \tString path_offering = \"/wfs:FeatureCollection/wfs:member/geofence_sbg:geofence_sbg_bbox/@gml:id\";\r\n//\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n//\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getNodeValue());\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n//\t\t\t\tString pathToLoading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\t\r\n\t\t\t\t//jetzt werden hier aber alle X Y Koordinaten,die sich in InsertObservation.xml wiederholen, ausgelesen werden\r\n\t \tString pathToObjectid = \"//geofence_sbg:objectid\";\r\n\t \tNodeList nodes_Objectid = (NodeList)xPath.compile(pathToObjectid).evaluate(doc, XPathConstants.NODESET);\r\n\t \t\r\n\t\t\t\tString pathToCoordinates =\"//gml:LinearRing/gml:posList\";\r\n\t\t\t\tNodeList nodes_position = (NodeList)xPath.compile(pathToCoordinates).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t\t\t\tString xy= \"\";\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"vor for loop ParserXmlJson.extractPointFromIO:\"+ nodes_position.getLength());\t\r\n\t\t\t\tfor(int n = 0; n<nodes_position.getLength(); n++){\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.extractPointFromIO: \"+nodes_position.item(n).getTextContent());\r\n\t\t\t\t\tpoint.list_ofStrConsistingOf5CoordinatesForBoundingBox.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\tlist_coords.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.extractPointFromIO objectid: \"+nodes_Objectid.item(n).getTextContent());\r\n\t\t\t\t\tlist_objectid.add(nodes_Objectid.item(n).getTextContent());\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t//node_procedures.item(n).setTextContent(\"4444\");\r\n\t\t\t\t\t//System.out.println(\"ParserXmlJson.parseInsertObservation:parser EDITED:\"+node_procedures.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t\t\ttry{\r\n\t\t\t\t\t\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tSystem.out.println(\"Error: maybe no coordinates!\");\r\n\t\t\t\t\te.printStackTrace();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\t\r\n\t\tlist_coords_objectid.add(list_coords);\r\n\t\tlist_coords_objectid.add(list_objectid);\r\n\t\treturn list_coords_objectid;//point.list_ofStrConsistingOf5CoordinatesForBoundingBox;\t\t\t\t\r\n\t}", "public boolean\ngetShowBoundingBox()\n{\n\treturn (this.showBoundingBox);\n}", "godot.wire.Wire.Rect2 getRect2Value();", "public Rect getBBox() throws PDFNetException {\n/* 857 */ return new Rect(GetBBox(this.a));\n/* */ }", "public BoundingBox(Rectangle r) {\n\t\tthis(new Coord(r.x, r.y), r.width, r.height);\n\t}", "private HashMap setupBoundBoxes(BioMightBoundBoxes bioMightBoundBoxesIn) \r\n\t{\r\n\t\t// Set up the bounding boxes for the various components\r\n\t\t// The various components locations will be driven by the\r\n\t\t// bounding boxes\r\n\t\tHashMap boundingBoxesMap = new HashMap();\r\n\t\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\t\r\n\t\t// Initialize the BoundBoxes. These will have a bound\r\n\t\t// box for each foot by default\r\n\t\tBioMightBoundBoxes bioBoundBoxes = null;\r\n\t\r\n\t\t// Initialize the BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\t\r\n\t\t// Initialize the Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize the Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = null;\r\n\t\tdouble[] endPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] endPoints = null;\r\n\t\r\n\t\t// Use the information in the incoming Bound Box\r\n\t\t// to orientate the inner bound boxes\r\n\t\tif (bioMightBoundBoxesIn != null)\r\n\t\t{\r\n\t\t\t// In the default instance,there will be two bound boxes\r\n\t\t\tBioMightBoundBox bioMightBoundBoxTemp = bioMightBoundBoxesIn.getBoundingBox(Constants.LeftFootRef);\r\n\t\t\tSystem.out.println(\"LeftFoot - SetupBoundBoxes - Incoming BoundBox: \" + \r\n\t\t\t\t\tbioMightBoundBoxTemp.getXPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxTemp.getYPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxTemp.getZPos());\r\n\r\n\t\t\t// In the default instance,there will be two bound boxes\r\n\t\t\tbioMightBoundBoxTemp = bioMightBoundBoxesIn.getBoundingBox(Constants.RightFootRef);\r\n\t\t\tSystem.out.println(\"RightFoot - SetupBoundBoxes - Incoming BoundBox: \" + \r\n\t\t\t\t\tbioMightBoundBoxTemp.getXPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxTemp.getYPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxTemp.getZPos());\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Feet SetupBoundBoxes - Incoming BoundBoxes are Null\");\r\n\t\t}\r\n\t\r\n\t\r\n\t\tbioBoundBoxes = new BioMightBoundBoxes();\r\n\t\t\t\r\n\t\t//********************************************************************* \r\n\t\t// LEFT FOOT EPITHELIUM BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Feet\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(1.0);\r\n\t\tyPos = new BigDecimal(-48.0);\r\n\t\tzPos= new BigDecimal(0.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\r\n\t\t// Feet Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(1.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tendPos = getEndPoints(1.0, -67.50, -1.0);\r\n\t\tendPoints = BioGraphics.octogonYPlane(endPos, circumference);\r\n\t\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, endPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tSystem.out.println(\"Adding - LeftBoundBox to bioBoundBoxes\"); \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.FootEpitheliumRef, bioBoundBox);\r\n\t\t\r\n\t\t// Put the BioMight BoundBoxes for the Left Foot into the BoundingBoxMap \r\n\t\tboundingBoxesMap.put(Constants.LeftFootRef, bioBoundBoxes);\r\n\t\tSystem.out.println(\"Adding - Left Foot bioBoundBoxes into BoxesMap\"); \r\n\r\n\t\r\n\t\tbioBoundBoxes = new BioMightBoundBoxes();\r\n\t\t\t\r\n\t\t//********************************************************************* \r\n\t\t// RIGHT FOOT EPITHELIUM BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Feet\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(-8.0);\r\n\t\tyPos = new BigDecimal(-65.0);\r\n\t\tzPos= new BigDecimal(-1.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\r\n\t\t// Feet Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(-1.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tendPos = getEndPoints(-1.0, -67.50, -1.0);\r\n\t\tendPoints = BioGraphics.octogonYPlane(endPos, circumference);\r\n\t\t\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, endPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\t\t\r\n\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tSystem.out.println(\"Adding - RightBoundBox to bioBoundBoxes\"); \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.FootEpitheliumRef, bioBoundBox);\t\t\r\n\r\n\t\t// Put the BioMight BoundBoxes for the Left Shoulder into the BoundingBoxMap \r\n\t\tboundingBoxesMap.put(Constants.RightFootRef, bioBoundBoxes);\r\n\t\tSystem.out.println(\"Adding - Right Foot bioBoundBoxes into BoxesMap\"); \r\n\r\n\t\treturn (boundingBoxesMap);\r\n\t}", "@Override\n\tpublic BoundaryRectangle getBoundingBox() {\n\t\treturn new BoundaryRectangle(0, 0, drawView.getWidth(), drawView.getHeight());\n\t}", "public native Object parse( Object json, String texturePath );", "public void setBoundingBoxSize(float percentageWidthReduced,\n float percentageHeightReduced) {\n float width;\n float height;\n float widthReductionAmount = 1.0f - percentageWidthReduced;\n //.8f for 20% (1 - .20)\n float heightReductionAmount = 1.0f - percentageHeightReduced;\n //.8f for 20% (1 - .20)\n if (widthReductionAmount > 0 && widthReductionAmount < 1) {\n width = Entity.FRAME_WIDTH * widthReductionAmount;\n } else {\n width = Entity.FRAME_WIDTH;\n }\n\n if (heightReductionAmount > 0 && heightReductionAmount < 1) {\n height = Entity.FRAME_HEIGHT * heightReductionAmount;\n } else {\n height = Entity.FRAME_HEIGHT;\n }\n\n if (width == 0 || height == 0) {\n Gdx.app.debug(TAG, \"Width and Height are 0!! \" + width + \":\" + height);\n }\n\n //neet do account for the unitscale, since the map coordiantes will be in pixels\n float minX;\n float minY;\n if (MapManager.UNIT_SCALE > 0) {\n minX = _nextEntityPosition.x / MapManager.UNIT_SCALE;\n minY = _nextEntityPosition.y / MapManager.UNIT_SCALE;\n } else {\n minX = _nextEntityPosition.x;\n minY = _nextEntityPosition.y;\n }\n _boundingBox.set(minX, minY, width, height);\n }", "private Bounds getBounds(final Value value, final DebugContext context)\r\n throws ViewerException {\r\n Bounds b = new Bounds();\r\n Method getBoundsMethod = value.getMethod(context,\r\n \"getBounds\", \"java.awt.Rectangle\", null);\r\n Value bounds = value.invokeMethod(context, getBoundsMethod,\r\n null);\r\n String type = value.getType(context).getName(context);\r\n int dot = type.lastIndexOf('.');\r\n if (dot >= 0) {\r\n type = type.substring(dot + 1);\r\n }\r\n b.type = type;\r\n \r\n try {\r\n Method getTextMethod = value.getMethod(context, \"getText\",\r\n \"java.lang.String\", null);\r\n Value result = value.invokeMethod(context, getTextMethod,\r\n null);\r\n if (!result.isNull()) {\r\n String str = result.toString(context);\r\n if (str.length() > 10) {\r\n str = str.substring(0, 7) + \"...\";\r\n }\r\n b.type += \" \\\"\" + str + \"\\\"\";\r\n }\r\n }\r\n catch (ViewerException e) {\r\n }\r\n \r\n b.bounds.x = bounds.getFieldValue(context, \"x\").toInt(context);\r\n b.bounds.y = bounds.getFieldValue(context, \"y\").toInt(context);\r\n b.bounds.width = bounds.getFieldValue(context, \"width\").\r\n toInt(context);\r\n b.bounds.height = bounds.getFieldValue(context, \"height\").\r\n toInt(context);\r\n if (value.isInstanceOf(context, \"java.awt.Container\")) {\r\n Method getComponentsMethod = value.getMethod(context,\r\n \"getComponents\", \"java.awt.Component[]\", null);\r\n Value children;\r\n try {\r\n children = value.invokeMethod(context,\r\n getComponentsMethod, null);\r\n }\r\n catch (ViewerException e) {\r\n b.children = new Bounds[0];\r\n return b;\r\n }\r\n b.children = new Bounds[children.getArrayLength(context)];\r\n for (int c = 0; c < b.children.length; c++) {\r\n b.children[c] = getBounds(children.getArrayElement(context,\r\n c), context);\r\n }\r\n }\r\n return b; \r\n }", "public BoundingShape getBoundingShape() {\n\treturn boundingShape;\n }", "@Override\n\tpublic AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) \n\t{\n\t\treturn BOUNDING_BOX;\n\t}", "boolean inBoundingBox(Coord pos) {\n\t\treturn min(from.x, to.x) <= pos.x && pos.x <= max(from.x, to.x)\n\t\t\t\t&& min(from.y, to.y) <= pos.y && pos.y <= max(from.y, to.y);\n\t}", "@java.lang.Override\n public com.google.protobuf.UInt64ValueOrBuilder getBoundingBoxesCountOrBuilder() {\n return getBoundingBoxesCount();\n }", "public double getBoundingBoxLeft() {\n return boundingBoxLeft;\n }", "public BoundingBox(double minX, double minY, double maxX, double maxY) {\r\n this.setMinX(minX);\r\n this.setMinY(minY);\r\n this.setMaxX(maxX);\r\n this.setMaxY(maxY);\r\n }", "public void testGetBoundingBox(){\r\n\t\tdouble xc = 0;\r\n\t\tdouble yc = 0;\r\n\t\tdouble r = 10;\r\n\t\tdouble r2 = r*Math.sqrt(2)/2;\r\n\t\tdouble t0 = PI/4;\r\n\t\tdouble t1 = 3*PI/4;\r\n\t\tdouble t2 = 5*PI/4;\r\n\t\tdouble t3 = 7*PI/4;\r\n\t\tdouble dt = PI/2;\r\n\t\t\r\n\t\t// declare variables\r\n\t\tCircleArc2D arc0, arc1, arc2, arc3;\r\n\t\tBox2D box0, box1, box2, box3;\r\n\t\tBox2D bounds0, bounds1, bounds2, bounds3;\r\n\t\t\r\n\t\t// top\r\n\t\tarc0 \t= new CircleArc2D(xc, yc, r, t0, dt);\r\n\t\tbox0 \t= new Box2D(xc-r2, xc+r2, r2, r);\r\n\t\tbounds0 = arc0.boundingBox();\r\n\t\tassertTrue(box0.almostEquals(bounds0, Shape2D.ACCURACY));\r\n\r\n\t\t// left\r\n\t\tarc1 \t= new CircleArc2D(xc, yc, r, t1, dt);\r\n\t\tbox1 \t= new Box2D(xc-r, xc-r2, -r2, r2);\r\n\t\tbounds1 = arc1.boundingBox();\r\n\t\tassertTrue(box1.almostEquals(bounds1, Shape2D.ACCURACY));\r\n\r\n\t\t// bottom\r\n\t\tarc2 \t= new CircleArc2D(xc, yc, r, t2, dt);\r\n\t\tbox2 \t= new Box2D(xc-r2, xc+r2, -r, -r2);\r\n\t\tbounds2 = arc2.boundingBox();\r\n\t\tassertTrue(box2.almostEquals(bounds2, Shape2D.ACCURACY));\r\n\r\n\t\t// right\r\n\t\tarc3 \t= new CircleArc2D(xc, yc, r, t3, dt);\r\n\t\tbox3 \t= new Box2D(r2, r, -r2, r2);\r\n\t\tbounds3 = arc3.boundingBox();\r\n\t\tassertTrue(box3.almostEquals(bounds3, Shape2D.ACCURACY));\r\n\r\n\t\t/// circle arcs with extent 3*pi/2\r\n\t\tdt = 3*PI/2;\r\n\t\t\r\n\t\t// top\r\n\t\tarc0 \t= new CircleArc2D(xc, yc, r, t3, dt);\r\n\t\tbox0 \t= new Box2D(xc-r, xc+r, -r2, r);\r\n\t\tbounds0 = arc0.boundingBox();\r\n\t\tassertTrue(box0.almostEquals(bounds0, Shape2D.ACCURACY));\r\n\r\n\t\t// left\r\n\t\tarc1 \t= new CircleArc2D(xc, yc, r, t0, dt);\r\n\t\tbox1 \t= new Box2D(xc-r, xc+r2, -r, r);\r\n\t\tbounds1 = arc1.boundingBox();\r\n\t\tassertTrue(box1.almostEquals(bounds1, Shape2D.ACCURACY));\r\n\r\n\t\t// bottom\r\n\t\tarc2 \t= new CircleArc2D(xc, yc, r, t1, dt);\r\n\t\tbox2 \t= new Box2D(xc-r, xc+r, -r, r2);\r\n\t\tbounds2 = arc2.boundingBox();\r\n\t\tassertTrue(box2.almostEquals(bounds2, Shape2D.ACCURACY));\r\n\r\n\t\t// right\r\n\t\tarc3 \t= new CircleArc2D(xc, yc, r, t2, dt);\r\n\t\tbox3 \t= new Box2D(-r2, r, -r, r);\r\n\t\tbounds3 = arc3.boundingBox();\r\n\t\tassertTrue(box3.almostEquals(bounds3, Shape2D.ACCURACY));\r\n\t\r\n\t}", "public BoundingBox(Vector2 c, double w, double h)\n\t{\n\t\tcenter = c;\n\t\twidth = w;\n\t\theight = h;\n\t}", "private void updateBoundingBox()\n\t{\n\t\tif (this.facingDirection != null)\n\t\t{\n\t\t\tdouble d0 = (double) this.hangingPosition.getX() + 0.5D;\n\t\t\tdouble d1 = (double) this.hangingPosition.getY() + 0.5D;\n\t\t\tdouble d2 = (double) this.hangingPosition.getZ() + 0.5D;\n\t\t\tdouble d3 = 0.46875D;\n\t\t\tdouble d4 = this.someFunc(this.getWidthPixels());\n\t\t\tdouble d5 = this.someFunc(this.getHeightPixels());\n\t\t\td0 = d0 - (double) this.facingDirection.getFrontOffsetX() * 0.46875D;\n\t\t\td2 = d2 - (double) this.facingDirection.getFrontOffsetZ() * 0.46875D;\n\t\t\td1 = d1 + d5;\n\t\t\tEnumFacing enumfacing = this.facingDirection.rotateYCCW();\n\t\t\td0 = d0 + d4 * (double) enumfacing.getFrontOffsetX();\n\t\t\td2 = d2 + d4 * (double) enumfacing.getFrontOffsetZ();\n\t\t\tthis.posX = d0;\n\t\t\tthis.posY = d1;\n\t\t\tthis.posZ = d2;\n\t\t\tdouble d6 = (double) this.getWidthPixels();\n\t\t\tdouble d7 = (double) this.getHeightPixels();\n\t\t\tdouble d8 = (double) this.getWidthPixels();\n\n\t\t\tif (this.facingDirection.getAxis() == EnumFacing.Axis.Z)\n\t\t\t{\n\t\t\t\td8 = 1.0D;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\td6 = 1.0D;\n\t\t\t}\n\n\t\t\t// ???\n\n\t\t\td6 = d6 / (this.getWidthPixels() / this.blocksToTakeUp() * 2D);\n\t\t\td7 = d7 / (this.getHeightPixels() / this.blocksToTakeUp() * 2D);\n\t\t\td8 = d8 / (this.getWidthPixels() / this.blocksToTakeUp() * 2D);\n\t\t\tthis.setEntityBoundingBox(new AxisAlignedBB(d0 - d6, d1 - d7, d2 - d8, d0 + d6, d1 + d7, d2 + d8));\n\t\t}\n\t}", "@Override\n public String toString()\n {\n return TAG + \"[x:\" + x + \",y:\" + y + \"]\";\n }", "private String processOperationInput(String operationInput) {\n try {\n return \"bbox = \" + new JSONObject(operationInput).getString(\"bbox\");\n } catch (Exception ignore) {\n }\n return new String (\"No input parameters\");\n }", "@Override\n\tpublic MyRectangle getMyBoundingBox() {\n\t\t\n\t\treturn this;\n\t}", "private void setBoundingBox(Vector<Triangle_dt> triangulation) {\n\t\tfor (Integer i = 0; i < triangulation.size(); i++) {\n\t\t\tTriangle_dt currentTriangle = triangulation.get(i);\n\t\t\tPoint_dt p1 = currentTriangle.p1();\n\t\t\tPoint_dt p2 = currentTriangle.p2();\n\t\t\tPoint_dt p3 = currentTriangle.p3();\n\t\t\t\n\t\t\tupdateBoundingBox(p1);\n\t\t\tupdateBoundingBox(p2);\n\t\t\tif (p3 != null) {\n\t\t\t\tupdateBoundingBox(p3);\n\t\t\t}\n\t\t}\n\t}", "public LatLongRectangle getBoundingRectangle() {\n return boundingRectangle;\n }", "public BoundingBox3d(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax) {\n this.xmin = xmin;\n this.xmax = xmax;\n this.ymin = ymin;\n this.ymax = ymax;\n this.zmin = zmin;\n this.zmax = zmax;\n }", "public BoundingBox getFontBBox() throws IOException;", "private ArrayList<Figure> getBoxData(){\n ArrayList<Figure> box = new ArrayList<>();\n box.addAll(getCircleData());\n box.addAll(getRectangleData());\n\n return box;\n }", "Rectangle getCollisionBox();", "public int getBBoxLength()\r\n {\r\n return theBBoxLength;\r\n }", "public static void main(String[] args) {\n\t\tint numberCoords = 4;\n\t\tdouble[] boundBox = new double[4];\n\t\t\n\t\t\n\t\t\t\tif(args.length > 0){\n\t\t\tif(args.length < 4){\n\t\t\t\tSystem.err.println(\"not correct number of arguments\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tdouble args0 = Double.parseDouble(args[0]);\n\t\t\tdouble args1 = Double.parseDouble(args[1]);\n\t\t\tdouble args2 = Double.parseDouble(args[2]);\n\t\t\tdouble args3 = Double.parseDouble(args[3]);\n\t\t\t\n\t\t\tboundBox[0] = args0; //southwest\n\t\t\tboundBox[1] = args1;\n\t\t\tboundBox[2] = args2; //northeast 42.7125\n\t\t\tboundBox[3] = args3;\n\t\t}else{\n\t\t\n\t\t\n\t\tSystem.out.println(\"Enter the four coordinate for the bounding box: \\n\");\n\t\t//ask user for the bounding box\n\t\tfor(int i = 0; i < numberCoords; i++){\n\t\t\t\n\t\t\t//getting user input\n\t\t\tScanner reader = new Scanner(System.in); // Reading from System.in\n\t\t\t\n\t\t\tif(i < 2){\n\t\t\t\tif(i==0)\n\t\t\t\t\tSystem.out.println(\"lat1: \");\n\t\t\t\tif(i==1)\n\t\t\t\t\tSystem.out.println(\"long1: \");\n\t\t\t}else{\n\t\t\t\tif(i==2)\n\t\t\t\t\tSystem.out.println(\"lat2: \");\n\t\t\t\tif(i==3)\n\t\t\t\t\tSystem.out.println(\"long2: \");\n\t\t\t}\n\t\t\tboundBox[i] = reader.nextInt(); \n\t\t}\n\t\t\n\t }\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// random bounding box coordinates\n\t\t//South Latitude, West Longitude, North Latitude, East Longitude\n\t\t// 45.219,-122.325,47.610,-122.107\n\t\tboundBox[0] = 42.712439; //southwest\n\t\tboundBox[1] = -71.693370;\n\t\tboundBox[2] = 42.712439; //northeast 42.7125\n\t\tboundBox[3] = -71.693370;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tAerialData aData = null;\n\t\tdouble currentLat;\n\t\tdouble currentLong;\n\t\tdouble[] currentCenter = new double[]{boundBox[0], boundBox[1]};\n\t\tString centerString;\n\t\tString data;\n\t\tString image;\n\t\t\n\t\t// get all of the images and put in a 2D array\n\t\tArrayList<ArrayList<BufferedImage>> listOfListImages = new ArrayList<ArrayList<BufferedImage>>(); \n\t\t\n\t\twhile(currentCenter[0] <= boundBox[2]){\n\t\t\t\n\t\t\t// resetting the current long\n\t\t\tcurrentCenter[1] = boundBox[1];\n\t\t\t\n\t\t\t// the row we will add images to\n\t\t\tArrayList<BufferedImage> currentRow = new ArrayList<BufferedImage>(); \n\t\t\t\n\t\t\twhile(currentCenter[1] <= boundBox[3]){\n\t\t\t\t\n\t\t\t\t// this is the start point\n\t\t\t\tcenterString = currentCenter[0] + \",\" + currentCenter[1];\n\t\t\t\t\n\t\t\t\t// build request for image\n\t\t\t\tdata = buildRequest(centerString,\"1\");\n\t\t\t\timage = buildRequest(centerString,\"0\");\n\t\t\t\t\n\t\t\t\t// creating the image\n\t\t\t\taData = new AerialData(data);\n\t\t\t\tAerialImage aImage = new AerialImage(image);\n\t\t\t\t\n\t\t\t\t//adding the new image to the list\n\t\t\t\tcurrentRow.add(aImage.getImage());\n\t\t\t\t\n\t\t\t\t// incrementing the longitude\n\t\t\t\tcurrentCenter[1] = aData.getNextLong();\n\t\t\t}\n\t\t\t\n\t\t\tif(aData == null){\n\t\t\t// incrementing the longitude\n\t\t\tSystem.err.println(\"there is not image in those bounds\");\n\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcurrentCenter[0] = aData.getNextLat();\n\t\t\tlistOfListImages.add(currentRow);\n\t\t}\n\t\t\n\t\t//could to checking to make sure all columns are same number\n\t\t\n\t\t// number of pixels in image is 350\n\t\tint numberPixelsImage = 350;\n\t\t\n\t\t//add all the images togethere\n\t\t// width is the number of column * 350\n\t\tint width = listOfListImages.get(0).size() * 350;\n\t\t//height is the number of rows * 350\n\t\tint height = listOfListImages.size() * 350;\n\t\t\n\t\t// the new image that we will layer\n\t\tBufferedImage combined = new BufferedImage(width, height, listOfListImages.get(0).get(0).getType());\n\t\t\n\t\tGraphics graphics = combined.getGraphics();\n\t\t\n\t\tint yIndex = 0;\n\t\tint yCounter = 0;\n\t\t\n\t\tfor(int j = listOfListImages.size() - 1; j > -1; --j){\n\t\t\t\n\t\t\tfor(int i = 0; i < listOfListImages.get(j).size(); ++i){\n\t\t\t\t\n\t\t\tint xIndex = i * 350;\n\t\t\t// loop through adding the images to the finalImage\n\t\t\tgraphics.drawImage(listOfListImages.get(j).get(i), xIndex, yIndex, null);\n\n\t\t\t}\n\t\t\t\n\t\t\tyCounter++;\n\t\t\tyIndex = yCounter * 350;\n\t\t\t\n\t\t}\n\t\t\n\t\t// saving the final image\n\t\ttry {\n\t\t\tImageIO.write(combined, \"jpg\", new File(\"combined.jpeg\"));\n\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"could not save image\");\n\t\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\n\t}", "public void calculateBoundsAABB() {\n\t\tsuper.minY = 0;\n\t\tradius = 0;\n\t\tmaxY = 0;\n\t\tminX = 999999;\n\t\tmaxX = -999999;\n\t\tmaxZ = -99999;\n\t\tminZ = 99999;\n\t\tfor (int j = 0; j < vertexCount; j++) {\n\t\t\tint x = vertexX[j];\n\t\t\tint y = vertexY[j];\n\t\t\tint z = vertexZ[j];\n\t\t\tif (x < minX) {\n\t\t\t\tminX = x;\n\t\t\t}\n\t\t\tif (x > maxX) {\n\t\t\t\tmaxX = x;\n\t\t\t}\n\t\t\tif (z < minZ) {\n\t\t\t\tminZ = z;\n\t\t\t}\n\t\t\tif (z > maxZ) {\n\t\t\t\tmaxZ = z;\n\t\t\t}\n\t\t\tif (-y > super.minY) {\n\t\t\t\tsuper.minY = -y;\n\t\t\t}\n\t\t\tif (y > maxY) {\n\t\t\t\tmaxY = y;\n\t\t\t}\n\t\t\tint radiusSqr = (x * x) + (z * z);\n\t\t\tif (radiusSqr > radius) {\n\t\t\t\tradius = radiusSqr;\n\t\t\t}\n\t\t}\n\t\tradius = (int) Math.sqrt(radius);\n\t\tminDepth = (int) Math.sqrt((radius * radius) + (super.minY * super.minY));\n\t\tmaxDepth = minDepth + (int) Math.sqrt((radius * radius) + (maxY * maxY));\n\t}", "public void parseRectangleInfo( Node node, GraphObject go, Point2D.Double offset ) {\n NamedNodeMap map = node.getAttributes();\n double x = Double.parseDouble( getNamedAttributeFromMap( map, \"x\" ).replaceAll( \",\", \"\" ) ) + offset.x;\n double y = Double.parseDouble( getNamedAttributeFromMap( map, \"y\" ).replaceAll( \",\", \"\" ) ) + offset.y;\n double width = Double.parseDouble( getNamedAttributeFromMap( map, \"width\" ).replaceAll( \",\", \"\" ) );\n double height = Double.parseDouble( getNamedAttributeFromMap( map, \"height\" ).replaceAll( \",\", \"\" ) );\n\n go.setDisplayRect( new Rectangle2D.Double( x, y, width, height ) );\n }", "public BoundingBox(int x0, int y0, int width, int height) {\n\t\tthis(new Coord(x0, y0), width, height);\n\t}", "boolean hasRect2Value();", "public double getBoundingBoxTop() {\n return boundingBoxTop;\n }", "void storeObject(RectangleLatLng rectangle, String id);", "public void setBoundingBoxTop(double value) {\n this.boundingBoxTop = value;\n }", "@NonNull JavaBoundingBox[] collision();", "public Box() {\n \tsuper();\n \tthis.max = new Point3d( 1, 1, 1 );\n \tthis.min = new Point3d( -1, -1, -1 );\n }", "protected abstract Geometry decode(Object o);", "private RectHV rectLb() {\n\n if (!horizontal) {\n return new RectHV(\n rect.xmin(),\n rect.ymin(),\n p.x(),\n rect.ymax()\n );\n\n\n } else {\n return new RectHV(\n rect.xmin(),\n rect.ymin(),\n rect.xmax(),\n p.y()\n );\n }\n }", "private void calcBoxVerts() {\n\t\tif (verts != null) {\n\t\t\tdouble minX = verts[0].getElement(0);\n\t\t\tdouble maxX = minX;\n\t\t\tdouble minY = verts[0].getElement(1);\n\t\t\tdouble maxY = minY;\n\t\t\tdouble minZ = verts[0].getElement(2);\n\t\t\tdouble maxZ = minZ;\n\t\t\tfor (int i = 1; i < verts.length; i++) {\n\t\t\t\tif (verts[i].getElement(0) < minX) {\n\t\t\t\t\tminX = verts[i].getElement(0);\n\t\t\t\t} else if (verts[i].getElement(0) > maxX) {\n\t\t\t\t\tmaxX = verts[i].getElement(0);\n\t\t\t\t}\n\t\t\t\tif (verts[i].getElement(1) < minY) {\n\t\t\t\t\tminY = verts[i].getElement(1);\n\t\t\t\t} else if (verts[i].getElement(1) > maxY) {\n\t\t\t\t\tmaxY = verts[i].getElement(1);\n\t\t\t\t}\n\t\t\t\tif (verts[i].getElement(2) < minZ) {\n\t\t\t\t\tminZ = verts[i].getElement(2);\n\t\t\t\t} else if (verts[i].getElement(2) > maxZ) {\n\t\t\t\t\tmaxZ = verts[i].getElement(2);\n\t\t\t\t}\n\t\t\t}\n\t\t\tVector[] boxVerts = new Vector[8];\n\t\t\tboxVerts[0] = new Vector(3);\n\t\t\tboxVerts[0].setElements(new double[] {minX, minY, minZ});\n\t\t\tboxVerts[1] = new Vector(3);\n\t\t\tboxVerts[1].setElements(new double[] {maxX, minY, minZ});\n\t\t\tboxVerts[2] = new Vector(3);\n\t\t\tboxVerts[2].setElements(new double[] {minX, minY, maxZ});\n\t\t\tboxVerts[3] = new Vector(3);\n\t\t\tboxVerts[3].setElements(new double[] {maxX, minY, maxZ});\n\t\t\tboxVerts[4] = new Vector(3);\n\t\t\tboxVerts[4].setElements(new double[] {minX, maxY, minZ});\n\t\t\tboxVerts[5] = new Vector(3);\n\t\t\tboxVerts[5].setElements(new double[] {maxX, maxY, minZ});\n\t\t\tboxVerts[6] = new Vector(3);\n\t\t\tboxVerts[6].setElements(new double[] {minX, maxY, maxZ});\n\t\t\tboxVerts[7] = new Vector(3);\n\t\t\tboxVerts[7].setElements(new double[] {maxX, maxY, maxZ});\n\t\t\tthis.boxVerts = boxVerts;\n\t\t} else {\n\t\t\tthis.boxVerts = null;\n\t\t}\n\t}", "private Values getApproximateSizeValObj(String data){\n\t\tdata = data.replaceAll(\"[^0-9.x ]\", \"\");\r\n\t\tString[] values = data.split(\"x\");\r\n\t\tValue valObj1 = getValueObj(values[1].trim(), \"Length\", \"in\");\r\n\t\t Value valObj2 = getValueObj(values[2].trim(), \"Width\", \"in\");\r\n\t\t Values valuesObj = new Values();\r\n\t\t List<Value> listOfValue = new ArrayList<>();\r\n\t\t listOfValue.add(valObj1);\r\n\t\t listOfValue.add(valObj2);\r\n\t\t valuesObj.setValue(listOfValue);\r\n\t\t return valuesObj;\r\n\t}", "public BRectangle2D\ngetNucSymbolBoundingBox()\nthrows Exception\n{\n\tBRectangle2D rect = (BRectangle2D)\n\t\tthis.getNucDrawObject().getBoundingBox().clone();\n\tif (rect == null)\n\t\treturn (null);\n\t\n\trect.setRect(rect.getX() + this.getX(), rect.getY() - this.getY(),\n\t\trect.getWidth(), rect.getHeight());\n\treturn (rect);\n}", "@Override\n\tpublic Rectangle getBound() {\n\t\trectBound.setX(posX+20);\n\t\trectBound.setY(Y_LAND - image.getHeight() +10);\n\t\trectBound.setWidth(image.getWidth()-10);\n\t\trectBound.setHeight(image.getHeight());\n\t\treturn rectBound;\n\t}", "private void actualizaHitbox() {\n hitbox = new Rect((int)(posX + 0.2 * bala.getWidth()), (int)(posY + 0.2 * bala.getHeight()), (int)(posX + 0.8 * bala.getWidth()), (int)(posY + 0.8 * bala.getHeight()));\n }", "public String getBoundary()\n {\n return _rawBoundary;\n }", "public void\nGLRenderBoundingBox(SoGLRenderAction action, final SbBox3f bbox)\n//\n////////////////////////////////////////////////////////////////////////\n{\n int face, vert;\n final SoMaterialBundle mb = new SoMaterialBundle(action);\n final SbVec3f scale = new SbVec3f(), tmp = new SbVec3f();\n\n // Make sure textures are disabled, just to speed things up\n action.getState().push();\n SoGLMultiTextureEnabledElement.set(action.getState(),this,0, false);\n\n // Make sure first material is sent if necessary\n mb.sendFirst();\n\n // Scale and translate the cube to the correct spot\n final SbVec3f translate = bbox.getCenter();\n final SbVec3f size = new SbVec3f();\n bbox.getSize(size);\n scale.copyFrom(size.operator_mul(0.5f));\n\n GL2 gl2 = Ctx.get(SoGLCacheContextElement.get(action.getState())); \n \n for (face = 0; face < 6; face++) {\n\n if (! mb.isColorOnly())\n gl2.glNormal3fv(normals[face].getValueRead(),0);\n\n gl2.glBegin(GL2.GL_POLYGON);\n\n for (vert = 0; vert < 4; vert++)\n gl2.glVertex3fv((SCALE(verts[face][vert],tmp,scale).operator_add(translate)).getValueRead(),0);\n\n gl2.glEnd();\n }\n\n // Restore state\n action.getState().pop();\n mb.destructor(); // java port\n}", "private int[] getBounds(Node node) {\n String[] boundsAttr = (((Element) node).getAttribute(\"bounds\")).replace(\"[\",\"\").split(\"[^0-9]\");\n int[] bounds = new int[boundsAttr.length];\n for (int i = 0; i < boundsAttr.length; i++) {\n bounds[i] = Integer.parseInt(boundsAttr[i]);\n }\n return bounds;\n }", "public Rectangle getBound(){\n \tint x = (int)location.getX();\n \tint y = (int)location.getY();\n \t\n \tif(isExploded == false)\n \t\treturn new Rectangle(x, y, image.getWidth(null), image.getHeight(null));\n \telse\n \t\treturn new Rectangle(x,y, 1,1);\n }", "public String getGVCoordsForPosition() {\n return \"\\\"\" + coords[0] + \",\" + coords[1] + \"!\\\"\";\n }", "public void drawBoundingBoxes(Graphics g)\n\t{\n\t\tGraphics2D g2d = (Graphics2D) g;\n\t\t/*g2d.drawRect(0,0, originalBbox.getPoint(2).x - originalBbox.getPoint(0).x,\n \t\toriginalBbox.getPoint(2).y - originalBbox.getPoint(0).y);*/\n\t\t//g2d.drawRect(bbox.getPoint(0).x, bbox.getPoint(0).y, bbox.getPoint(2).x - bbox.getPoint(0).x,\n //\t\tbbox.getPoint(2).y - bbox.getPoint(0).y);\n\t\tg2d.setColor(new Color(0,255,0));\n\t\tg2d.drawPolygon(bbox.getXs(), bbox.getYs(), bbox.getNumPoints());\n\t}", "public String toString(){\n\t\treturn \"(\" + width + \" , \" + height + \")\" ;\n\t}", "public String toString(){\n return \"Neo[\"+getName()+\"]: CRS:\"+getCRS()+\" Bounds:\"+getBounds();\n }", "private Box(String[] arr) {\r\n name = arr[0];\r\n height = Integer.parseInt(arr[1]);\r\n width = Integer.parseInt(arr[2]);\r\n depth = Integer.parseInt(arr[3]);\r\n weight = Integer.parseInt(arr[4]);\r\n }", "public void parseRectangleInfo( Node node, GraphObject go ) {\n parseRectangleInfo( node, go, getOffset() );\n }", "private Rectangle getBoundingBox(Cartoon cartoon) {\n\n int xmin = Integer.MAX_VALUE;\n int xmax = Integer.MIN_VALUE;\n int ymin = Integer.MAX_VALUE;\n int ymax = Integer.MIN_VALUE;\n int rmax = Integer.MIN_VALUE;\n\n Point pos;\n int rad;\n int x;\n int y;\n for (SecStrucElement s : cartoon.getSSEs()) {\n pos = s.getPosition();\n x = pos.x;\n y = pos.y;\n rad = s.getSymbolRadius();\n if (x > xmax) xmax = x;\n if (y > ymax) ymax = y;\n if (x < xmin) xmin = x;\n if (y < ymin) ymin = y;\n if (rad > rmax) rmax = rad;\n\n if (!(s.getConnectionTo().isEmpty())) {\n for (Point PointTo : s.getConnectionTo()) {\n x = PointTo.x;\n y = PointTo.y;\n if (x > xmax)\n xmax = x;\n if (y > ymax)\n ymax = y;\n if (x < xmin)\n xmin = x;\n if (y < ymin)\n ymin = y;\n }\n }\n }\n xmax += rmax;\n ymax += rmax;\n xmin -= rmax;\n ymin -= rmax;\n\n return new Rectangle(xmin, ymin, xmax - xmin, ymax - ymin);\n }", "public final BoundingBox getBounds() {\n\t\tif (bounds==null) {\n\t\t\tint srsID =( (Geometry)this.get(0).getDefaultGeometry()).getSRID();\n\t\t\tBoundingBox re = new BoundingBoxImpl(\"\"+srsID);\n\t\t\tfor (SimpleFeature f : this) {\n\t\t\t\tre.include(f.getBounds());\n\t\t\t}\n\t\t\tbounds = re;\n\t\t}\n\t\treturn bounds;\n\t}", "public GeometryBoundingBox(double west, double south, double east, double north, Double minAltitude,\n Double maxAltitude) {\n this.west = west;\n this.south = south;\n this.east = east;\n this.north = north;\n this.minAltitude = minAltitude;\n this.maxAltitude = maxAltitude;\n }", "RectangleLatLng getBounds();" ]
[ "0.6607321", "0.654368", "0.5844298", "0.57970613", "0.57480323", "0.5745842", "0.570894", "0.56902856", "0.5656096", "0.55557305", "0.54483235", "0.54248315", "0.54196876", "0.5366177", "0.53474677", "0.53438973", "0.53289443", "0.5291094", "0.5278001", "0.52759135", "0.5258229", "0.52540654", "0.52340037", "0.52284896", "0.5179584", "0.51732147", "0.51556325", "0.515409", "0.51309764", "0.5105641", "0.50702316", "0.5065986", "0.5063177", "0.5050135", "0.5049521", "0.50483406", "0.5044679", "0.5040183", "0.5032158", "0.5025751", "0.50222504", "0.50164074", "0.5013932", "0.4986839", "0.4981466", "0.49739334", "0.49479014", "0.49457997", "0.49381894", "0.49306944", "0.49051765", "0.49027213", "0.48995033", "0.48942843", "0.4894231", "0.48847878", "0.48790336", "0.48781088", "0.4875784", "0.48575354", "0.48542666", "0.48534906", "0.48422554", "0.4817569", "0.48141006", "0.481235", "0.4805059", "0.47884592", "0.47839153", "0.47755337", "0.47729748", "0.4766312", "0.47527108", "0.4748977", "0.47487995", "0.47459823", "0.47187313", "0.4716876", "0.47105983", "0.47094932", "0.4699539", "0.4697507", "0.46882272", "0.46798787", "0.46760455", "0.46676344", "0.46556902", "0.4645052", "0.4640736", "0.4638819", "0.4634124", "0.46238685", "0.46163532", "0.46129617", "0.46121013", "0.46092892", "0.4604", "0.4603628", "0.46024668", "0.4594566", "0.45928663" ]
0.0
-1
erstellen eines neuen Hotels durch einen Hotelier
public void createHotel(String name, int numberSingleRooms,int numberDoubleRooms, double priceSingleRooms, double priceDoubleRooms, int category, UUID userID, int postalCode, String adress) { if(session instanceof Hotelier) { // nur erlaubt für Hoteliers Hotel hotel=new Hotel(name, numberSingleRooms, numberDoubleRooms, priceSingleRooms, priceDoubleRooms, category, userID, postalCode, adress); for (int i=0;i<numberDoubleRooms;i++) { // erstelllt und speichert die Zimmer des Hotels (param: HotelID, RoomType, bookedDates) createRoom(hotel.getHotelID(),0, new ArrayList <DateTime>()); } for (int i=0;i<numberSingleRooms;i++) { createRoom(hotel.getHotelID(),1, new ArrayList <DateTime>()); } hotelDAO.saveHotel(hotel); } else { new IllegalArgumentException("Die Aktion 'createHotel' kann nur von einem Hotelier durchgeführt werden."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Bebawy_Hotels() \n\t{\n\t\tinitComponent();\n\t\tcreateEvent();\t\n\t}", "public void loadHotels();", "private void MembentukListHuruf(){\n for(int i = 0; i < Panjang; i ++){\n Huruf Hrf = new Huruf();\n Hrf.CurrHrf = Kata.charAt(i);\n if(!IsVertikal){\n //horizontal\n Hrf.IdX = StartIdxX;\n Hrf.IdY = StartIdxY+i;\n }else{\n Hrf.IdX = StartIdxX+i;\n Hrf.IdY = StartIdxY;\n }\n // System.out.println(\"iniii \"+Hrf.IdX+\" \"+Hrf.IdY+\" \"+Hrf.CurrHrf+\" \"+NoSoal);\n TTS.Kolom[Hrf.IdX][Hrf.IdY].AddNoSoal(NoSoal);\n TTS.Kolom[Hrf.IdX][Hrf.IdY].Huruf=Hrf.CurrHrf;\n \n }\n }", "@Override\r\n\tpublic void autoSeatHeat() {\n\t\t\r\n\t}", "public void showHotels() {\n System.out.println(\"-----Hotels: ------\");\n hotelsService.getHotels().forEach(System.out::println);\n }", "public Feld erzeugeFeld() {\n\t\tArrayList<Schiff> schiffe = new ArrayList<Schiff>();\n\t\t\n\t\t// 1 Schlachtschiff = 5\n\t\tschiffe.add(new Schiff(5));\n\t\t// 2 Kreuzer = 4\n\t\tschiffe.add(new Schiff(4));\n\t\tschiffe.add(new Schiff(4));\n\t\t// 3 Zerstoerer = 3\n\t\tschiffe.add(new Schiff(3));\n\t\tschiffe.add(new Schiff(3));\n\t\tschiffe.add(new Schiff(3));\n\t\t// 4 Uboote = 2\n\t\tschiffe.add(new Schiff(2));\n\t\tschiffe.add(new Schiff(2));\n\t\tschiffe.add(new Schiff(2));\n\t\tschiffe.add(new Schiff(2));\n\t\t\n\t\tFeld neuesFeld = new Feld(getSpiel().getFeldGroesse());\n\t\t\n\t\tfor(int s = 0; s<schiffe.size(); s++) {\n\t\t\tSchiff schiff = schiffe.get(s);\n\t\t\t// Jeweils maximal 2*n^2 Versuche das Schiff zu positionieren\n\t\t\tfor(int i = 0; i < getSpiel().getFeldGroesse() * getSpiel().getFeldGroesse() * 2; i++) {\n\t\t\t\t// Zufallsorientierung\n\t\t\t\tOrientierung orientierung = Orientierung.HORIZONTAL;\n\t\t\t\tif(Math.random() * 2 > 1) {\n\t\t\t\t\torientierung = Orientierung.VERTIKAL;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Zufallskoordinate\n\t\t\t\tKoordinate koordinate = new Koordinate(\n\t\t\t\t\t(int) (Helfer.zufallszahl(0, getSpiel().getFeldGroesse() - 1)), \n\t\t\t\t\t(int) (Helfer.zufallszahl(0, getSpiel().getFeldGroesse() - 1)));\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tneuesFeld.setzeSchiff(schiff, koordinate, orientierung);\n\t\t\t\t\tbreak;\n\t\t\t\t} catch(Exception e) { }\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(neuesFeld.getSchiffe().size() != 10) throw new RuntimeException(\"Schiffe konnten nicht gesetzt werden!\");\n\t\t\t\n\t\treturn neuesFeld;\n\t}", "@Override\n public void aktion(Hauptobjekt h) {\n System.out.println(\"Hin\");\n h.setAktuellerZustand(new ZweiterZustand());\n }", "public HotelsController() {\n try {\n hotels = dhi.get();\n } catch (Exception e) {\n e.getMessage();\n }\n }", "public void setHot(Integer hot) {\n this.hot = hot;\n }", "private void hienThiMaKHSuDungDV(){\n SuDungService suDungService = new SuDungService();\n suDungModels = suDungService.layMaKHSuDungDVLoaiBoTrungLap();\n \n cbbThanhToanMaKH.removeAllItems();\n for (SuDungModel suDungModel : suDungModels) {\n cbbThanhToanMaKH.addItem(suDungModel.getMaKH());\n }\n }", "public Hamburg(){\n trackDepartureHolder = TrackHolder.getTrackHolder(8);\n trackArrivalHolder = TrackHolder.getTrackHolder(10);\n scratchTrack = new TrackList<>();\n }", "private void hienThiSuDung(){\n SuDungService suDungService = new SuDungService();\n suDungModels = suDungService.layToanBoSuDung();\n \n modelSuDung.setRowCount(0);\n for (SuDungModel suDungModel : suDungModels) {\n Vector vtRow = new Vector();\n vtRow.add(suDungModel.getMaDV());\n vtRow.add(suDungModel.getMaKH());\n vtRow.add(suDungModel.getNgaySD());\n vtRow.add(suDungModel.getGiaDV());\n modelSuDung.addRow(vtRow);\n }\n }", "public Hotel getHotel() {\n return hotel;\n }", "public Hotel getHotel() {\n return hotel;\n }", "public Integer getHot() {\n return hot;\n }", "@Override\n public void onHeatWaterRaised() {\n heaterState = true;\n addCupButton.setVisible(false);\n takeCupButton.setVisible(false);\n }", "public Lechuga(Hamburguesa h){\n this.hamburguesa = h;\n }", "void TaktImpulsAusfuehren ()\n {\n \n wolkebew();\n \n }", "private static void kapazitaetPruefen(){\n\t\tList<OeffentlichesVerkehrsmittel> loev = new ArrayList<OeffentlichesVerkehrsmittel>();\n\t\t\n\t\tLinienBus b1 = new LinienBus();\n\t\tFaehrschiff f1 = new Faehrschiff();\n\t\tLinienBus b2 = new LinienBus();\t\n\t\t\n\t\tloev.add(b1);\n\t\tloev.add(b2);\n\t\tloev.add(f1);\n\t\t\n\t\tint zaehlung = 500;\n\t\tboolean ausreichend = kapazitaetPruefen(loev,500);\n\t\tp(\"Kapazitaet ausreichend? \" + ausreichend);\n\t\t\n\t}", "public void teken(){\n removeAll();\n \n //eerste tekening\n if(tekenEerste != false){\n tekenMuur();\n tekenSleutel();\n veld[9][9] = 6;\n tekenEerste = false;\n tekenBarricade();\n }\n \n //methode die de speler de waarde van de sleutel geeft aanroepen\n sleutelWaarde();\n \n //de methode van het spel einde aanroepen\n einde();\n \n //vernieuwd veld aanroepen\n veld = speler.nieuwVeld(veld);\n \n //het veld tekenen\n for(int i = 0; i < coordinaten.length; i++) {\n for(int j = 0; j < coordinaten[1].length; j++){\n switch (veld[i][j]) {\n case 1: //de sleutels\n if(i == sleutel100.getY() && j == sleutel100.getX()){\n coordinaten[i][j] = new SleutelVakje(100);\n }\n else if (i == sleutel1002.getY() && j == sleutel1002.getX()){\n coordinaten[i][j] = new SleutelVakje(100);\n }\n else if (i == sleutel200.getY() && j == sleutel200.getX()){\n coordinaten[i][j] = new SleutelVakje(200);\n }\n else if (i == sleutel300.getY() && j == sleutel300.getX()){\n coordinaten[i][j] = new SleutelVakje(300);\n } break;\n case 2: //de muren\n coordinaten[i][j] = new MuurVakje();\n break;\n // de barricades\n case 3:\n coordinaten[i][j] = new BarricadeVakje(100);\n break;\n case 4:\n coordinaten[i][j] = new BarricadeVakje(200);\n break;\n case 5:\n coordinaten[i][j] = new BarricadeVakje(300);\n break;\n case 6: // het eindveld vakje\n coordinaten[i][j] = new EindveldVakje();\n break;\n default: // het normale vakje\n coordinaten[i][j] = new CoordinaatVakje();\n break;\n }\n //de speler\n coordinaten[speler.getY()][speler.getX()] = new SpelerVakje();\n \n //het veld aan de JPanel toevoegen\n add(coordinaten[i][j]);\n }\n }\n System.out.println(\"Speler waarde = \" + speler.getSleutelWaarde());\n revalidate();\n repaint();\n }", "public void placerEauSurVue() {\n\t\tif (partie.getJoueur().getIndiceBateauEnCours() != -1) {\n\t\t\tfor (int i : partie.getJoueur().getBateau()[partie.getJoueur().getIndiceBateauEnCours()].getCaseOnId()) {\n\t\t\t\tif (i != -1)\n\t\t\t\t\tvue.setWater(i);\n\t\t\t}\n\t\t}\n\t}", "public void maakNieuweDoolhof()\n {\n /*hzs: hoek zonder schat\n hms: hoek met schat\n r: recht stuk\n t: T-kruispunt met schat*/\n //vaste aantallen vakjes\n int hzs = 10, hms = 6, r = 11, t = 6;\n List<String> schatten = sch.getSchatten();\n List<String> tSchatten = schatten.subList(12, 18);\n Collections.shuffle(tSchatten);\n List<String> hSchatten = schatten.subList(18, 24);\n Collections.shuffle(hSchatten);\n\n int hKaartTeller = 0, tKaartTeller = 0;\n\n //losse vakken random invullen\n //oneven rijen\n for (int h = 0; h <= 6; h += 2)\n {\n for (int i = 1; i <= 5; i += 2)\n {\n int kaart = (int) (1 + (Math.random() * 4));\n switch (kaart)\n {\n case 1:\n if (hzs > 0)\n {\n this.gangkaarten[h][i] = new HoekKaart((int) Math.floor(Math.random() * 4) + 1, false);\n hzs--;\n } else\n {\n i--;\n }\n break;\n case 2:\n if (hms > 0)\n {\n this.gangkaarten[h][i] = new HoekKaart((int) Math.floor(Math.random() * 4) + 1, hSchatten.get(hKaartTeller), false);\n hms--;\n hKaartTeller++;\n } else\n {\n i--;\n }\n break;\n case 3:\n if (r > 0)\n {\n this.gangkaarten[h][i] = new RechtKaart((int) Math.floor(Math.random() * 4) + 1, false);\n r--;\n } else\n {\n i--;\n }\n break;\n case 4:\n if (t > 0)\n {\n this.gangkaarten[h][i] = new TKaart((int) Math.floor(Math.random() * 4) + 1, tSchatten.get(tKaartTeller), false);\n t--;\n tKaartTeller++;\n } else\n {\n i--;\n }\n break;\n\n }\n }\n }\n\n //even rijen\n for (int j = 1; j <= 5; j += 2)\n {\n for (int i = 0; i <= 6; i++)\n {\n int kaart = (int) (1 + (Math.random() * 4));\n switch (kaart)\n {\n case 1:\n if (hzs > 0)\n {\n this.gangkaarten[j][i] = new HoekKaart((int) Math.floor(Math.random() * 4) + 1, false);\n hzs--;\n } else\n {\n i--;\n }\n break;\n case 2:\n if (hms > 0)\n {\n this.gangkaarten[j][i] = new HoekKaart((int) Math.floor(Math.random() * 4) + 1, hSchatten.get(hKaartTeller), false);\n hms--;\n hKaartTeller++;\n } else\n {\n i--;\n }\n break;\n case 3:\n if (r > 0)\n {\n this.gangkaarten[j][i] = new RechtKaart((int) Math.floor(Math.random() * 4) + 1, false);\n r--;\n } else\n {\n i--;\n }\n break;\n case 4:\n if (t > 0)\n {\n this.gangkaarten[j][i] = new TKaart((int) Math.floor(Math.random() * 4) + 1, tSchatten.get(tKaartTeller), false);\n t--;\n tKaartTeller++;\n } else\n {\n i--;\n }\n break;\n\n }\n }\n }\n }", "@Override\n public int getSprintHeat() {\n return engine.getSprintHeat();\n }", "public void wuerfeln() {\n if (istGefängnis) {\n setIstGefängnis(false);\n if (aktuellesFeldName instanceof GefängnisFeld && !(aktuellesFeldName instanceof NurZuBesuchFeld)) {\n GefängnisFeld g = (GefängnisFeld) aktuellesFeldName;\n g.gefaengnisAktion(this);\n \n return;\n }\n\n } else {\n String[] worte = {\"Eins\", \"Zwei\", \"Drei\", \"Vier\", \"Fünf\", \"Sechs\", \"Sieben\", \"Acht\", \"Neun\", \"Zehn\", \"Elf\", \"Zwölf\"};\n\n wuerfelZahl = getRandomInteger(12, 1);\n\n this.aktuellesFeld = this.aktuellesFeld + wuerfelZahl + 1;\n if (this.aktuellesFeld >= 40) {\n setAktuellesFeld(0);\n\n }\n\n System.out.println(worte[wuerfelZahl] + \" gewürfelt\");\n\n aktuellesFeldName = spielfigurSetzen(this.aktuellesFeld);\n System.out.println(\"Du befindest dich auf Feld-Nr: \" + (this.aktuellesFeld));\n boolean check = false;\n for (Spielfelder s : felderInBesitz) {\n if (aktuellesFeldName.equals(s)) {\n check = true;\n }\n }\n\n if (!check) {\n aktuellesFeldName.spielfeldAktion(this, aktuellesFeldName);\n } else {\n System.out.println(\"Das Feld: \" + aktuellesFeldName.getFeldname() + \"(Nr: \" + aktuellesFeldName.getFeldnummer() + \")gehört dir!\");\n if (aktuellesFeldName instanceof Straße) {\n Straße strasse = (Straße) aktuellesFeldName;\n System.out.println(\"Farbe: \" + strasse.getFarbe());\n try {\n strasse.hausBauen(this, strasse);\n } catch (IOException ex) {\n Logger.getLogger(Spieler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n }\n }\n }", "private void stadtteileNeuZuordnen() {\n Bahnhof[] b = getBahnhofListe();\n for (int i = 0; i < bhfs; i++) {\n if (b[i] != null) {\n int minX = b[i].getX() - 4;\n int minY = b[i].getY() - 4;\n int maxX = b[i].getX() + 3;\n int maxY = b[i].getY() + 3;\n for (int h_y = minY; h_y <= maxY; h_y++) {\n for (int h_x = minX; h_x <= maxX; h_x++) {\n if (!(h_y < 0) && !(h_x < 0) && !(h_y > teile.length - 1) && !(h_x > teile[h_y].length - 1)) {\n if (!(h_x == minX && h_y == minY) && !(h_x == maxX && h_y == minY) && !(h_x == minX && h_y == maxY) && !(h_x == maxX && h_y == maxY)) {\n if (!hatBahnhof[h_y][h_x] && teile[h_y][h_x] != null) {\n hatBahnhof[h_y][h_x] = true;\n b[i].stadtteilHinzufuegen(teile[h_y][h_x]);\n }\n }\n }\n }\n }\n }\n }\n }", "public Husdjurshotell(){}", "public void createAppareil(Home h) {\n\t\tint numOfChauffages = manager.createQuery(\"Select p From Heater p\", Heater.class).getResultList().size();\n\n if (numOfChauffages == 0) {\n \tHeater e1 =new Heater(100);\n \th.getChauffages().add(e1);\n \te1.setHome(h);\n manager.persist(e1);\n \n Heater e2 =new Heater(120);\n \th.getChauffages().add(e2);\n \te2.setHome(h);\n manager.persist(e2);\n \n \tElectronicDevice e3 =new ElectronicDevice(80);\n \th.getEquipements().add(e3);\n \te3.setHome(h);\n manager.persist(e3);\n \n ElectronicDevice e4 =new ElectronicDevice(70);\n \th.getEquipements().add(e4);\n \te4.setHome(h);\n manager.persist(e4);\n }\n\t}", "@Override\n public void drawHeatFlux() {\n }", "private void initMenu() {\n\t\tthis.dishes = new ArrayList<DishVO>();\n\n\t\tdishes.add( new PizzaVO(30, \"Popeye\", new String[] { \"Schinken\",\n\t\t\t\t\"Spinat\", \"Champignon\", \"Ei\" }, 7.00f, 1));\n\t\tdishes.add( new PizzaVO(30, \"Popeye\", new String[] { \"Schinken\",\n\t\t\t\t\"Spinat\", \"Champignon\", \"Ei\" }, 8.90f, 2));\n\t\tdishes.add( new PizzaVO(31, \"Hawaii\", new String[] { \"Schinken\",\n\t\t\t\t\"Ananas\", \"Curry\" }, 5.80f, 1));\n\t\tdishes.add( new PizzaVO(31, \"Hawaii\", new String[] { \"Schinken\",\n\t\t\t\t\"Ananas\", \"Curry\" }, 7.40f, 2));\n\n\t\t\n\t\tdishes.add( new PizzaVO(32, \"Prima\", new String[] { \"Schinken\",\n\t\t\t\t\"Salami\", \"Zwiebeln\", \"Ei\" }, 7.00f, 1));\n\t\tdishes.add( new PizzaVO(32, \"Prima\", new String[] { \"Schinken\",\n\t\t\t\t\"Salami\", \"Zwiebeln\", \"Ei\" }, 8.90f, 2));\n\n\t\tdishes.add( new PastaVO(11, \"Napoli\", new String[] { \"Tomatensauce\" },\n\t\t\t\t5.60f, 4));\n\t\tdishes.add( new PastaVO(11, \"Napoli\", new String[] { \"Tomatensauce\" },\n\t\t\t\t5.60f, 5));\n\t\tdishes.add( new PastaVO(11, \"Napoli\", new String[] { \"Tomatensauce\" },\n\t\t\t\t5.60f, 6));\n\t\tdishes.add( new PastaVO(12, \"Bolognese\",\n\t\t\t\tnew String[] { \"Hackfleischsauce\" }, 6.40f, 4));\n\t\tdishes.add( new PastaVO(12, \"Bolognese\",\n\t\t\t\tnew String[] { \"Hackfleischsauce\" }, 6.40f, 5));\n\t\tdishes.add( new PastaVO(12, \"Bolognese\",\n\t\t\t\tnew String[] { \"Hackfleischsauce\" }, 6.40f, 6));\n\t\tdishes.add( new PastaVO(13, \"alla Panna\", new String[] { \"Schinken\",\n\t\t\t\t\"Sahne\" }, 6.40f, 4));\n\t\tdishes.add(new PastaVO(13, \"alla Panna\", new String[] { \"Schinken\",\n\t\t\t\t\"Sahne\" }, 6.40f, 5));\n\t\tdishes.add( new PastaVO(13, \"alla Panna\", new String[] { \"Schinken\",\n\t\t\t\t\"Sahne\" }, 6.40f, 6));\n\n\t\tdishes.add( new DessertVO(21, \"Hausgemachter Obstsalat\", 2.30f));\n\t\tdishes.add( new DessertVO(22, \"Hausgemachte Pannacotta\", 2.60f));\n\t\tdishes.add( new DessertVO(23, \"Hausgemachtes Tiramisu\", 2.80f));\n\t}", "@Override\n public void loadHotsData() {\n if (mHotsPresenter != null) {\n mHotsPresenter.loadHotsData();\n }\n }", "public void loescheEintrag() {\n\t\tzahl = 0;\n\t\tistEbenenStart = false;\n\t}", "public void solucioInicial2() {\n int grupsRecollits = 0;\n for (int i=0; i<numCentres*helisPerCentre; ++i) {\n Helicopter hel = new Helicopter();\n helicopters.add(hel);\n }\n int indexHelic = 0;\n int indexGrup = 0;\n int places = 15;\n while (indexGrup < numGrups) {\n int trajecte[] = {-1,-1,-1};\n for (int i=0; i < 3 && indexGrup<numGrups; ++i) {\n Grupo grup = grups.get( indexGrup );\n if (places - grup.getNPersonas() >= 0) {\n places -= grup.getNPersonas();\n trajecte[i] = indexGrup;\n indexGrup++;\n\n }\n else i = 3;\n }\n Helicopter helicopter = helicopters.get( indexHelic );\n helicopter.addTrajecte( trajecte, indexHelic/helisPerCentre );\n places = 15;\n indexHelic++;\n if (indexHelic == numCentres*helisPerCentre) indexHelic = 0;\n }\n }", "public void flush() {\n try {\n dhi.set(hotels);\n } catch (Exception e) {\n e.getMessage();\n }\n }", "public void setHotel(Hotel hotel) {\n this.hotel = hotel;\n }", "public void setHotel(Hotel hotel) {\n this.hotel = hotel;\n }", "private float horisontalTicker() {\n\t\t\t\treturn (ticker_horisontal += 0.8f);\n\t\t\t}", "private void heilenTrankBenutzen() {\n LinkedList<Gegenstand> gegenstaende = spieler.getAlleGegenstaende();\n for (Gegenstand g : gegenstaende) {\n if (g.getName().equalsIgnoreCase(\"heiltrank\")) {\n spieler.heilen();\n gegenstaende.remove(g);\n System.out.print(\"Heiltrank wird benutzt\");\n makePause();\n System.out.println(\"Du hast noch \" + zaehltGegenstand(\"heiltrank\") + \" Heiltranke!\");\n return;\n }\n }\n System.out.println(\"Du hast gerade keinen Heiltrank\");\n }", "@Override\r\n\tpublic void horario() {\n\t\t\r\n\t}", "public CapteurEffetHall() {\n\t\t\n\t}", "public List<Tour> getHotTours() {\n return tourRepository.findHotTours();\n }", "public void eat() {\n int index;\n Cell selectedCell;\n if (getFoodArray() != null) {\n \n if (getFoodCount() > 0) {\n dayCountDown = getMaxHunger();\n index = RandomGenerator.nextNumber(getFoodCount());\n selectedCell = getFoodArray().get(index);\n \n if (getLocation().hasNotMove()) {\n new Holdable(getLocation()).init();\n this.setCell(selectedCell);\n \n getLocation().setMoved(false);\n }\n } else if (getLocation().getEmptyCount() != 0) {\n index = RandomGenerator.nextNumber(getLocation()\n .getEmptyCount());\n selectedCell = getLocation().getEmptyArray().get(index);\n \n if (getLocation().hasNotMove()) {\n dayCountDown--;\n new Holdable(getLocation()).init();\n this.setCell(selectedCell);\n \n \n getLocation().setMoved(false);\n }\n } else {\n dayCountDown--;\n getLocation().setMoved(false);\n }\n }\n \n }", "public void mieteZahlen(BesitzrechtFeld feld) {\n System.out.println(\"Dein aktueller Kontostand beträgt: \" + getKontostand());\n Spieler spieler = feld.getSpieler();\n boolean einzahlen = einzahlen(feld.getMiete());\n if (!einzahlen) {\n MonopolyMap.spielerVerloren(spielfigur);\n } else {\n System.out.println(\"Du musst an \" + feld.getSpieler().getSpielfigur() + \" Miete in Höhe von \" + feld.getMiete() + \" zahlen (\" + feld.getFeldname() + \")\");\n spieler.auszahlen(feld.getMiete());\n System.out.println(\"Dein neuer Kontostand beträgt: \" + getKontostand());\n }\n\n }", "public jpHebergement() {\n initComponents();\n ChargerListeEtablissement();\n ChargerListeTypeChambre();\n }", "public interface Heater {\n void on();\n void off();\n boolean isHot();\n}", "public void test6(){\r\n\t\tZug zug1 = st.zugErstellen(2, 0, \"Zug 1\");\r\n\t\tZug zug2 = st.zugErstellen(2, 0, \"Zug 2\");\r\n\t\tst.fahren();\r\n\t}", "private static void initialise(Room[] hotel) {\n for (int x = 0; x < hotel.length; x++) {\n hotel[x].setName(\"Empty\");\n }\n }", "private HelicalTrackStrip makeDigiStrip(SiTrackerHitStrip1D h) {\n\n SiTrackerHitStrip1D local = h.getTransformedHit(TrackerHitType.CoordinateSystem.SENSOR);\n SiTrackerHitStrip1D global = h.getTransformedHit(TrackerHitType.CoordinateSystem.GLOBAL);\n\n ITransform3D trans = local.getLocalToGlobal();\n Hep3Vector org = trans.transformed(_orgloc);\n Hep3Vector u = global.getMeasuredCoordinate();\n Hep3Vector v = global.getUnmeasuredCoordinate();\n\n double umeas = local.getPosition()[0];\n double vmin = VecOp.dot(local.getUnmeasuredCoordinate(), local.getHitSegment().getStartPoint());\n double vmax = VecOp.dot(local.getUnmeasuredCoordinate(), local.getHitSegment().getEndPoint());\n double du = Math.sqrt(local.getCovarianceAsMatrix().diagonal(0));\n\n IDetectorElement de = h.getSensor();\n String det = _ID.getName(de);\n int lyr = _ID.getLayer(de);\n BarrelEndcapFlag be = _ID.getBarrelEndcapFlag(de);\n\n double dEdx = h.getdEdx();\n double time = h.getTime();\n List<RawTrackerHit> rawhits = h.getRawHits();\n HelicalTrackStrip strip = new HelicalTrackStrip(org, u, v, umeas, du, vmin, vmax, dEdx, time, rawhits, det, lyr, be);\n\n return strip;\n }", "public void applyHorn() {\n\t\t\r\n\t}", "@Override\n public void interagit() {\n super.interagit();\n ArrayList<EtreVivant> cibles = this.ciblesPotentiellesAdjacentes(this.getPosition(),this.nombreVoisins);\n cibles.stream().filter((vivants) -> (vivants.getEtat().equals(EtatEtreVivant.MALADE))).forEach((vivants) -> {\n this.soigne(vivants);\n });\n }", "private void populateAltitudes()\r\n {\r\n for(int i=0; i<9; i++)\r\n {\r\n cboAltitude.addItem(aryAltitudes[i]);\r\n }\r\n }", "public void angreifen(Lebewesen lebewesen) {\n\t\tdouble zahl = Math.random(); //generiert eine Zahl (double) zwischen 0 und 1\r\n\t\tif(zahl < 0.9d){ //leichtverletzen\r\n\t\t\tlebewesen.leichtVerletzen();\r\n\t\t\t//System.out.println(\"Monster: \"+ this.aktuellerZustand);\r\n\t\t}else if(zahl < 0.98d){ //schwer verletzen\r\n\t\t\tlebewesen.starkVerletzen();\r\n\t\t\t//System.out.println(\"Monster: \"+ this.aktuellerZustand);\r\n\t\t}else{ //direkt töten\r\n\t\t\tlebewesen.toetlichVerletzen();\r\n\t\t\t//System.out.println(\"Monster: \"+ this.aktuellerZustand);\r\n\t\t}\r\n\t}", "@Override\n public float getHeating() {\n\n int wart = 0;\n if (!roomList.isEmpty()){\n for (Room room : roomList){\n if (room instanceof Localization){\n wart += room.getHeating();\n }\n }\n }\n return wart;\n }", "public interface HotelReservations {\n\n void lookupHotels();\n Hotel getSelectedHotel();\n \n void destroy();\n}", "@Override\n\tpublic HashMap<Integer, HashMap<Integer,VueElement>> chercherElementProche(VueElement ve, Hashtable<Integer,VueElement> voisins){\n\t\tHashMap<Integer, HashMap<Integer,VueElement>> resultat = new HashMap<>();\n\n\t\tint distPlusProche = 100;\n\t\tint refPlusProche = 0;\n\t\t/* Strategie du random */\t\t\t\n\t\tSet<Integer> tabref = voisins.keySet();\n\t\tInteger[] t = new Integer[tabref.size()];\n\t\tRandom r = new Random();\n\t\tint s = tabref.size();\n\t\ttabref.toArray(t);\n\t\tif(tabref.size() >= 1 && t[0]!=null)\n\t\t{\n\t\t\t/* On trouve un ele aleatoire dans la liste de voisins */\n\t\t\tint l = r.nextInt(s);\n\t\t\trefPlusProche=t[l];\n\t\t}\n\t\telse refPlusProche=0;\n\n\t\tHashMap<Integer,VueElement> cible = new HashMap<>();\n\t\tcible.put((Integer)refPlusProche, voisins.get(refPlusProche));\n\t\tresultat.put((Integer)distPlusProche, cible);\n\n\t\treturn resultat;\n\t}", "@Test\n\tpublic void testAjouteHeures() {\n\t\tuntel.ajouteEnseignement(uml, 0, 10, 0);\n\n\t\tassertEquals(10, untel.heuresPrevuesPourUE(uml),\n \"L'enseignant doit maintenant avoir 10 heures prévues pour l'UE 'uml'\");\n\n // 20h TD pour UML\n untel.ajouteEnseignement(uml, 0, 20, 0);\n \n\t\tassertEquals(10 + 20, untel.heuresPrevuesPourUE(uml),\n \"L'enseignant doit maintenant avoir 30 heures prévues pour l'UE 'uml'\");\t\t\n\t\t\n\t}", "private RecipeIngredient getBitteringHops() {\n\t\t//TODO verify the boil time is the longest, not just return first hops\n\t\tfor (RecipeIngredient ri : m_ingredientList) {\n\t\t\tif (ri.getIngredient().getType() == Ingredient.Type.HOPS) {\n\t\t\t\treturn ri;\n\t\t\t}\n\t\t}\n\t\treturn null;\t\t\t\t\n\t}", "public void eat(){\n if (threshold<=0 && !lapar) revLapar();\n if (lapar && Common.gamemap.get(getX()).get(getY()).showSymbol()=='@'){\n Common.gamemap.get(getX()).get(getY()).ungrowGrass();\n revLapar();\n threshold = 12;\n }\n }", "public void setHips(double hips) {\n this.hips = hips;\n }", "public HotelOffers() throws Exception{\r\n this.filter = new Filter();\r\n this.getData();\r\n }", "public TowersOfHanoi(int noDisks){\n\n this.noDisks = noDisks;\n\n\n }", "private static void eligeJuego() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Elige el tipo de juego\\n1-\"\r\n\t\t\t\t\t+ optionsTiposJuegos[0]/*\r\n\t\t\t\t\t\t\t\t\t\t\t * + \"\\n2-\" + optionsTiposJuegos[1]\r\n\t\t\t\t\t\t\t\t\t\t\t */);\r\n\t\t\tSystem.out.print(\"Opcion: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion != 1 /* && eleccion != 2 */);\r\n\t\tif (eleccion == 1)\r\n\t\t\tjuego = new PPT(jugadores, jugadores.length);\r\n\t\telse\r\n\t\t\tjuego = new Chinos(jugadores, jugadores.length);\r\n\t}", "public void ingresaVehiculo (){\r\n \r\n Vehicle skate = new Skateboard(\"vanz\", \"2009\", \"1 metro\");\r\n Vehicle carro = new Car(\"renault\", \"2009\", \"disel\",\"corriente\" );\r\n Vehicle jet = new Jet(\"jet\", \"2019\", \"premiun\", \"ocho motores\");\r\n Vehicle cicla = new Bicycle(\"shimano\", \"2010\",\"4 tiempos\" ) ; \r\n Vehuculo.add(skate);\r\n Vehuculo.add(carro);\r\n Vehuculo.add(jet);\r\n Vehuculo.add(cicla); \r\n \r\n /*\r\n for en el cual se hace el parceo y se instancia la clase Skateboard\r\n \r\n */\r\n for (Vehicle Vehuculo1 : Vehuculo) {\r\n if(Vehuculo1 instanceof Skateboard){\r\n Skateboard skatevehiculo = (Skateboard)Vehuculo1;\r\n skatevehiculo.imprimirPadre();\r\n skatevehiculo.imprimirSkate();\r\n skatevehiculo.imprimirInterfaz();\r\n }\r\n /*\r\n se intancia y se hace el parceo de la clase car\r\n \r\n */\r\n else if(Vehuculo1 instanceof Car){\r\n \r\n Car carvhiculo = (Car)Vehuculo1;\r\n carvhiculo.imprimirPadre();\r\n carvhiculo.imprimirCarro();\r\n carvhiculo.imprimirVehiculopotenciado();\r\n \r\n \r\n \r\n }\r\n /*se intancia y se hace el parceo de la clase\r\n \r\n */\r\n else if(Vehuculo1 instanceof Jet){\r\n \r\n Jet jethiculo = (Jet)Vehuculo1;\r\n jethiculo.imprimirPadre();\r\n jethiculo.imprimirJet();\r\n jethiculo.imprimirVehiculopotenciado();\r\n jethiculo.imprimirInterfaz();\r\n }\r\n else if(Vehuculo1 instanceof Bicycle){\r\n \r\n Bicycle ciclavehiculo = (Bicycle)Vehuculo1;\r\n ciclavehiculo.imprimirPadre();\r\n ciclavehiculo.imprimirBici();\r\n }\r\n }\r\n \r\n \r\n }", "private void setHotel(Hotel myHotel) {\n\t\tthis.myHotel = myHotel;\n\t}", "private Vertice<T> getHermano(Vertice<T> v){\n\tif(v.padre == null)\n\t return null;\n\tif(v.padre.derecho == v){\n\t if(v.padre.izquierdo == null)\n\t\treturn null;\n\t else\n\t\treturn v.padre.izquierdo;\n\t}else{\n\t if(v.padre.derecho == null)\n\t\treturn null;\n\t else\n\t\treturn v.padre.derecho;\n\t}\n }", "public void tickerStoppen() \n {\n anzeige.tickerAbmelden( this );\n }", "private void tallennaTiedostoon() {\n viitearkisto.tallenna();\n }", "@Override\r\n\tpublic List<Hotel> getAllHotels() {\n\t\treturn showHotelList();\r\n\t}", "public FridgeTruck(){\n\t\tsuper();\n\t\tthis.maxTemp = 10; // degrees Celsius\n\t\tsetCost(maxTemp);\n\t\tthis.maxCapacity = 800;\n\t}", "void berechneUmfang() {\r\n\t\tfor (int i = 1; i < m_ANZAHL_POINTS; i++) {\r\n\t\t\tm_umfang += m_pointArray[i].distance(m_pointArray[i-1]);\t\t\r\n\t\t}\r\n\t}", "@Override\n public int getRunHeat() {\n return engine.getRunHeat();\n }", "public Fahrzeug erzeuge() {\n\t\t\n\t\treturn new DieselAuto();\n\t\t\n\t}", "private Set<BoardObject> createWeapons(){\r\n\t\tSet<BoardObject> weaps = new HashSet<BoardObject>();\r\n\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/revolver1.png\"), new Coordinate(3,12), \"Revolver\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/candlestick3.png\"), new Coordinate(2,3), \"Candlestick\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/knife1.png\"), new Coordinate(12,3), \"Knife\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/leadpipe1.png\"), new Coordinate(20,3), \"LeadPipe\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/rope1.png\"), new Coordinate(20,10), \"Rope\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/spanner1.png\"), new Coordinate(20,16), \"Wrench\"));\r\n\t\treturn weaps;\r\n\t}", "public Holidays (){\n name= \"Exotic Beach Holiday of a Lifetime\";\n cost = 5000;\n location = \"Fesdu Island, Maldives\";\n type = \"beach\";\n }", "private void findHumidities(ForecastIO FIO, WeatherlyDayForecast day){\n FIOHourly hourlyForecast = new FIOHourly(FIO);\n int numHours = hourlyForecast.hours();\n\n //Determine the number of hours left in the day\n Calendar rightNow = Calendar.getInstance();\n int dayHoursLeft = 24 - rightNow.get(Calendar.HOUR_OF_DAY);\n\n //Find the lowest and highest chances for precipitation for the rest of the day\n double minHum = hourlyForecast.getHour(0).humidity();\n double maxHum = minHum;\n int maxHour = rightNow.get(Calendar.HOUR_OF_DAY);\n for (int i = 1; i < dayHoursLeft; i++){\n double hum = hourlyForecast.getHour(i).humidity();\n if (minHum > hum)\n minHum = hum;\n if (maxHum < hum) {\n maxHum = hum;\n maxHour = i + rightNow.get(Calendar.HOUR_OF_DAY);\n }\n\n }\n\n day.setHumMin((int) (minHum * 100));\n day.setHumMax((int) (maxHum * 100));\n day.setHumMaxTime(maxHour);\n }", "protected void narisi(Graphics2D g, double wp, double hp) {\n\n FontMetrics fm = g.getFontMetrics();\n\n int hPisava = fm.getAscent();\n\n double xColumn = 0.0;\n double yColumn = sirinaStolpca(wp, hp);\n\n for(int i = 0; i < podatki.length; i++){\n\n g.setColor(Color.ORANGE);\n g.fillRect((int)xColumn,(int)(hp - visinaStolpca(i, wp, hp)), (int) sirinaStolpca(wp, hp), (int) visinaStolpca(i, wp, hp));\n\n g.setColor(Color.RED);\n g.drawRect((int)((i)*sirinaStolpca(wp, hp)),(int) (hp-visinaStolpca(i, wp, hp)), (int)sirinaStolpca(wp, hp), (int)visinaStolpca(i, wp, hp));\n\n g.setColor(Color.BLUE);\n if(i < podatki.length - 1){\n double startCrtaX = sredinaVrha(i, wp, hp)[0];\n double startCrtaY = sredinaVrha(i, wp, hp)[1];\n\n double endCrtaX = sredinaVrha(i + 1, wp, hp)[0];\n double endCrtaY = sredinaVrha(i+1, wp, hp)[1];\n\n g.drawLine((int)startCrtaX,(int) startCrtaY,(int) endCrtaX,(int) endCrtaY);\n\n }\n\n g.setColor(Color.BLACK);\n\n String toWrite = Integer.toString(i+1);\n double wNapis=fm.stringWidth(toWrite);\n double xNapis=xColumn+(xColumn-wNapis)/2;\n double yNapisLowerLine=hp-hPisava;\n xColumn+=sirinaStolpca(wp, hp);\n g.drawString(toWrite,ri (xNapis),ri(yNapisLowerLine));\n\n }\n\n }", "private void hienThiDichVu() {\n DichVuService dichVuService = new DichVuService();\n dichVuModels = dichVuService.layToanBoDichVu();\n \n modelDichVu.setRowCount(0);\n if (dichVuModels != null){\n for (DichVuModel dichVuModel : dichVuModels) {\n Vector vtRow = new Vector();\n vtRow.add(dichVuModel.getMaDV());\n vtRow.add(dichVuModel.getTenDV());\n modelDichVu.addRow(vtRow);\n }\n }else{\n return;\n }\n }", "private void vuoronKolmasHeitto() {\n while (heittojaJaljella == 1) {\n if (tulosLaitettu) {\n break;\n }\n try {\n Thread.sleep(100);\n } catch (InterruptedException ex) {\n System.out.println(\"Ei ole heitetty tai laitettu tulosta\");\n }\n }\n }", "public void acheter(){\n\t\t\n\t\t// Achete un billet si il reste des place\n\t\ttry {\n\t\t\tthis.maBilleterie.vendre();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tthis.status.put('B', System.currentTimeMillis());\n\t\tSystem.out.println(\"STATE B - Le festivalier \" + this.numFestivalier + \" a acheté sa place\");\n\t}", "public void refreshKoltuk(String hamData) {\n String devName = hamData.split(\" \")[0];\n int devNumber = Integer.parseInt(String.valueOf(devName.charAt(3)));\n int startPoint = (devNumber - 1) * 6;\n int endPoint = devNumber * 6;\n String byteData = hamData.split(\" \")[3];\n byteData = byteData.replaceAll(\"\\\\.\", \"\");\n\n ArrayList<Koltuk> koltukListActiveOnly = new ArrayList<>();\n for (int i = 0; i < koltukList.size(); i++) {\n if (koltukList.get(i).getStatus())\n koltukListActiveOnly.add(koltukList.get(i));\n }\n\n int j = startPoint;\n for (int i = 0; i < byteData.length(); i++) {\n String oneDigit = byteData.substring(i, i + 1);\n if (j == koltukListActiveOnly.size())\n break;\n if (oneDigit.equals(\"1\")) {\n changeKoltukRenk(koltukListActiveOnly.get(j), getResources().getColor(R.color.colorGreen));\n } else {\n changeKoltukRenk(koltukListActiveOnly.get(j), getResources().getColor(R.color.colorRed));\n }\n j++;\n }\n\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n // dessiner les Objets que contient le dessin\n for (Chenille c : listeDesChenilles) {\n c.dessiner(g);\n }\n }", "@Override\n public String toString() {\n return \"Cheval De Frise\";\n }", "public QwirkleSpiel()\n {\n beutel=new Beutel(3); //erzeuge Beutel mit 3 Steinfamilien\n spielfeld=new List<Stein>();\n\n rote=new ArrayList<Stein>(); //Unterlisten, die zum leichteren Durchsuchen des Spielfelds angelegt werden\n blaue=new ArrayList<Stein>();\n gruene=new ArrayList<Stein>();\n gelbe=new ArrayList<Stein>();\n violette=new ArrayList<Stein>();\n orangene=new ArrayList<Stein>();\n kreise=new ArrayList<Stein>();\n kleeblaetter=new ArrayList<Stein>();\n quadrate=new ArrayList<Stein>();\n karos=new ArrayList<Stein>();\n kreuze=new ArrayList<Stein>();\n sterne=new ArrayList<Stein>();\n\n erstelleListenMap();\n }", "private void calculerChemin() {\n suiteDeDeplacement.clear();\n int[][] empreinte = lab.getEmpreinte();\n lee(empreinte, x / Case.TAILLE, y / Case.TAILLE, cibleX, cibleY);\n }", "private void hienThiDichVuKhachHangSuDung(String maKH){\n SuDungService suDungService = new SuDungService();\n suDungModels = suDungService.layDichVuKhachHangSuDung(maKH);\n for (SuDungModel suDungModel : suDungModels) {\n cbbThanhToanMaDV.addItem(suDungModel.getMaDV());\n }\n }", "public void deplacements () {\n\t\t//Efface de la fenetre le mineur\n\t\t((JLabel)grille.getComponents()[this.laby.getMineur().getY()*this.laby.getLargeur()+this.laby.getMineur().getX()]).setIcon(this.laby.getLabyrinthe()[this.laby.getMineur().getY()][this.laby.getMineur().getX()].imageCase(themeJeu));\n\t\t//Deplace et affiche le mineur suivant la touche pressee\n\t\tpartie.laby.deplacerMineur(Partie.touche);\n\t\tPartie.touche = ' ';\n\n\t\t//Operations effectuees si la case ou se trouve le mineur est une sortie\n\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Sortie) {\n\t\t\t//On verifie en premier lieu que tous les filons ont ete extraits\n\t\t\tboolean tousExtraits = true;\t\t\t\t\t\t\t\n\t\t\tfor (int i = 0 ; i < partie.laby.getHauteur() && tousExtraits == true ; i++) {\n\t\t\t\tfor (int j = 0 ; j < partie.laby.getLargeur() && tousExtraits == true ; j++) {\n\t\t\t\t\tif (partie.laby.getLabyrinthe()[i][j] instanceof Filon) {\n\t\t\t\t\t\ttousExtraits = ((Filon)partie.laby.getLabyrinthe()[i][j]).getExtrait();\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Si c'est le cas alors la partie est terminee et le joueur peut recommencer ou quitter, sinon le joueur est averti qu'il n'a pas recupere tous les filons\n\t\t\tif (tousExtraits == true) {\n\t\t\t\tpartie.affichageLabyrinthe ();\n\t\t\t\tSystem.out.println(\"\\nFelicitations, vous avez trouvé la sortie, ainsi que tous les filons en \" + partie.laby.getNbCoups() + \" coups !\\n\\nQue voulez-vous faire à present : [r]ecommencer ou [q]uitter ?\");\n\t\t\t\tString[] choixPossiblesFin = {\"Quitter\", \"Recommencer\"};\n\t\t\t\tint choixFin = JOptionPane.showOptionDialog(null, \"Felicitations, vous avez trouve la sortie, ainsi que tous les filons en \" + partie.laby.getNbCoups() + \" coups !\\n\\nQue voulez-vous faire a present :\", \"Fin de la partie\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, choixPossiblesFin, choixPossiblesFin[0]);\n\t\t\t\tif ( choixFin == 1) {\n\t\t\t\t\tPartie.touche = 'r';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tPartie.touche = 'q';\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpartie.enTete.setText(\"Tous les filons n'ont pas ete extraits !\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t//Si la case ou se trouve le mineur est un filon qui n'est pas extrait, alors ce dernier est extrait.\n\t\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Filon && ((Filon)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).getExtrait() == false) {\n\t\t\t\t((Filon)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).setExtrait();\n\t\t\t\tSystem.out.println(\"\\nFilon extrait !\");\n\t\t\t}\n\t\t\t//Sinon si la case ou se trouve le mineur est une clef, alors on indique que la clef est ramassee, puis on cherche la porte et on l'efface de la fenetre, avant de rendre la case quelle occupe vide\n\t\t\telse {\n\t\t\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Clef && ((Clef)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).getRamassee() == false) {\n\t\t\t\t\t((Clef)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).setRamassee();\n\t\t\t\t\tint[] coordsPorte = {-1,-1};\n\t\t\t\t\tfor (int i = 0 ; i < this.laby.getHauteur() && coordsPorte[1] == -1 ; i++) {\n\t\t\t\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() && coordsPorte[1] == -1 ; j++) {\n\t\t\t\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Porte) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcoordsPorte[0] = j;\n\t\t\t\t\t\t\t\tcoordsPorte[1] = 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\t\tpartie.laby.getLabyrinthe()[coordsPorte[1]][coordsPorte[0]].setEtat(true);\n\t\t\t\t\t((JLabel)grille.getComponents()[coordsPorte[1]*this.laby.getLargeur()+coordsPorte[0]]).setIcon(this.laby.getLabyrinthe()[coordsPorte[1]][coordsPorte[0]].imageCase(themeJeu));\n\t\t\t\t\tSystem.out.println(\"\\nClef ramassee !\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void eggHatches() {\n\t\t\n\t}", "public void affichageSolution() {\n\t\t//On commence par retirer toutes les traces pré-existantes du labyrinthe\n\t\tfor (int i = 0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Trace) {\n\t\t\t\t\tthis.laby.getLabyrinthe()[i][j] = new Case();\n\t\t\t\t\t((JLabel)grille.getComponents()[i*this.laby.getLargeur()+j]).setIcon(this.laby.getLabyrinthe()[i][j].imageCase(themeJeu));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//On parcourt toutes les cases du labyrinthe. Si on trouve un filon non extrait dont le chemin qui le sépare au mineur est plus petit que shortestPath, on enregistre la longueur du chemin ainsi que les coordonnees de ledit filon\n\t\tint shortestPath = Integer.MAX_VALUE;\n\t\tint[] coordsNearestFilon = {-1,-1};\n\t\tfor (int i=0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tfor (int j=0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Filon && ((Filon)this.laby.getLabyrinthe()[i][j]).getExtrait() == false) {\n\t\t\t\t\tif (this.laby.solve(j,i) != null) {\n\t\t\t\t\t\tint pathSize = this.laby.solve(j,i).size();\n\t\t\t\t\t\tif (pathSize < shortestPath) {\n\t\t\t\t\t\t\tshortestPath = pathSize;\n\t\t\t\t\t\t\tcoordsNearestFilon[0] = j;\n\t\t\t\t\t\t\tcoordsNearestFilon[1] = i;\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\t//Si il n'y a plus de filon non extrait atteignable, on cherche les coordonnes de la clef\n\t\tif (coordsNearestFilon[0] == -1) {\n\t\t\tcoordsNearestFilon = this.laby.getCoordsClef();\n\t\t\t//Si il n'y a plus de filon non extrait atteignable et que la clef a deja ouvert la porte, on cherche les coordonnes de la sortie\n\t\t\tif (coordsNearestFilon == null)\tcoordsNearestFilon = this.laby.getCoordsSortie();\n\t\t}\n\n\t\t//On cree une pile qui contient des couples de coordonnees qui correspondent a la solution, puis on depile car le dernier element est l'objectif vise\n\t\tStack<Integer[]> solution = this.laby.solve(coordsNearestFilon[0], coordsNearestFilon[1]);\n\t\tsolution.pop();\n\n\t\t//Tant que l'on n'arrive pas au premier element de la pile (cad la case ou se trouve le mineur), on depile tout en gardant l'element depile, qui contient les coordonnees d'une trace que l'on dessine en suivant dans la fenetre\n\t\twhile (solution.size() != 1) {\n\t\t\tInteger[] coordsTmp = solution.pop();\n\t\t\tTrace traceTmp = new Trace();\n\t\t\tthis.laby.getLabyrinthe()[coordsTmp[1]][coordsTmp[0]] = new Trace();\n\t\t\t((JLabel)grille.getComponents()[coordsTmp[1]*this.laby.getLargeur()+coordsTmp[0]]).setIcon(traceTmp.imageCase());\n\t\t}\n\t\tSystem.out.println(\"\\n========================================== SOLUTION =====================================\\n\");\n\t\tthis.affichageLabyrinthe();\n\t}", "public void hora()\n {\n horaTotal = HoraSalida - HoraLlegada;\n\n }", "public HotelPanel() {\n initComponents();\n showAllHotelToTable();\n }", "public void balayer()\r\n {\r\n int tot=0;\r\n for (int i=0;i<LONGUEUR;i++ )\r\n {\r\n for (int j=0; j<LARGEUR; j++ )\r\n {\r\n tot=0;\r\n Haut = lignesHor[i][j];\r\n Droite = lignesVert[i+1][j];\r\n Bas = lignesHor[i][j+1];\r\n Gauche = lignesVert[i][j];\r\n\r\n if (Haut)\r\n {\r\n tot++;\r\n Vision[i][j][1]=1;\r\n }\r\n\r\n if (Droite)\r\n {\r\n tot++;\r\n Vision[i][j][2]=1;\r\n }\r\n\r\n if (Bas)\r\n {\r\n tot++;\r\n Vision[i][j][3]=1;\r\n }\r\n\r\n\r\n if (Gauche)\r\n {\r\n tot++;\r\n Vision[i][j][4]=1;\r\n }\r\n\r\n Vision[i][j][0]=Vision[i][j][1]+Vision[i][j][2]+Vision[i][j][3]+Vision[i][j][4];\r\n }\r\n }\r\n }", "public int numberOfHotels() {\r\n \tint anzahlHotel=hotelDAO.getHotelList().size();\r\n \treturn anzahlHotel;\r\n }", "private void vuoronKaikkiHeitotHeitetty() {\n while (heittojaJaljella < 1) {\n if (tulosLaitettu) {\n break;\n }\n try {\n Thread.sleep(100);\n } catch (InterruptedException ex) {\n System.out.println(\"Ei ole laitettu tulosta\");\n }\n }\n }", "public void harvestRow()\n {\n this.hopAndPick();\n this.hop();\n this.plant();\n this.hopAndPick();\n this.hop();\n this.plant();\n this.hopAndPick();\n this.hop();\n this.plant();\n }", "private void initVariables() {\n neueLinien = 0;\n feldVoll = false;\n pause = false;\n nextAction = \"\";\n verloren = false;\n zoom = 0;\n bhfs = 0;\n\n timer = new Timer();\n timerS = new Timer();\n tageszeit = Stadtteil.NICHTS;\n strgPause = 500; // Timer-Rate\n\n hatBahnhof = new boolean[hoehe][breite];\n teile = new Stadtteil[hoehe][breite];\n bahnhoefe = new Bahnhof[hoehe][breite];\n linien = new Linie[20];\n\n for (int y = 0; y < hoehe; y++) {\n for (int x = 0; x < breite; x++) {\n hatBahnhof[y][x] = false;\n teile[y][x] = null;\n bahnhoefe[y][x] = null;\n }\n }\n\n for (int i = 0; i < linien.length; i++) {\n linien[i] = null;\n }\n\n String[] bhfNamenTmp = {\"Marienplatz\", \"Blumenstraße\", \"Graf Maxi von Krause Allee\",\n \"Nicolaiplatz\", \"Großer Imperator Felix Maurer Platz\", \"Christine Kaps Allee\",\n \"Felix der Hecker Platz\", \"Hofstraße\", \"Sonnenstraße\", \"Kirchplatz\",\n \"Javagasse\", \"Berglerweg\", \"Stiftstraße\", \"Unterberg\", \"Hauptstraße\",\n \"Feldweg\", \"Serviettenmarkt\", \"Kalterbach\", \"Bürgermeister Horst Bichler Straße\",\n \"Laaange Straße\", \"Weit-Weit-Weg\", \"Waschstraße\", \"Schnitzelstraße\",\n \"Platz des Bieres\", \"Alte Heide\", \"Baumhausen\", \"Geldweg\", \"Berg\", \"Hausen\",\n \"Schneiderei\", \"Alte Weberei\", \"Brauereigasse\", \"Färbergraben\", \"H-Brücke\",\n \"Sickergraben\", \"Turmstraße\", \"Schneckenbahn\", \"Rosengarten\", \"Humboldt-Platz\",\n \"Wurzelplatz\", \"Adlerstraße\", \"Flamingostraße\", \"Taubenweg\", \"Spechtweg\",\n \"Sperberstraße\", \"Schlosstraße\", \"Friedensstraße\", \"Sackgasse\", \"Platz der Partei\",\n \"Keksweg\", \"Börsenplatz\", \"Gleisweg\", \"Dateipfad\", \"Milchstraße\", \"Qwertzweg\",\n \"Holzweg\", \"Heringsberger Straße\", \"Ausfallstraße\", \"Bahnhofstraße\", \"Finkenweg\",\n \"Steinstraße\", \"Pfauenstraße\", \"Bergstraße\", \"Bürgersteig\", \"Schorlenplatz\",\n \"Saftladen\", \"Gullygasse\", \"Kassettenweg\", \"Egelstraße\", \"Wurmstraße\", \"Wasserweg\",\n \"{return null;}-Platz\", \"Rinderstraße\", \"Maulwurfstraße\", \"Eckpunkt\",\n \"Kleiberstraße\", \"Paragraphenweg\", \"Kabelbrücke\", \"Roter Weg\", \"Geisterbahn\",\n \"Gartenstraße\", \"Lilienstraße\", \"Pöppelstraße\", \"Stadtstraße\", \"Jägerweg\",\n \"Parrweg\", \"Bayerstraße\", \"Baderstraße\", \"Fichtenweg\", \"Birkenstraße\",\n \"Buchenweg\", \"Kastanienweg\", \"Kellergasse\", \"Himmelspforte\", \"Auberginenweg\",\n \"Jedermannsweg\", \"Ladenstraße\", \"Exilstraße\", \"Wegstraße\", \"Kepplerstraße\",\n \"Hammerweg\", \"Spitzweg\", \"Lötstraße\", \"Weinstraße\", \"Waldmeisterstraße\",\n \"Primelstraße\", \"Kamillenweg\", \"Balkenweg\", \"Farnweg\", \"Konfettiwerk\",\n \"Weckerwerk\", \"Kürbisstraße\", \"Pralinenallee\", \"Lindenstraße\", \"Autobahn\",\n \"Straße der Liebe\", \"Straße des Hass\", \"Zunftplatz\", \"Glaserviertel\", \"Gerberviertel\",\n \"Rotlichtviertel\", \"Platz der Arbeiter\", \"Fluchtweg\", \"Papierstraße\", \"Rennbahn\",\n \"Prangerviertel\", \"Henkerweg\", \"Peterplatz\", \"Staufenallee\", \"Besenallee\", \"Schaufelstraße\",\n \"Kugelbahn\", \"Genitivgasse\", \"Scharfe Kurve\", \"Ausweg\", \"Schulstraße\",\n \"Universität\", \"Bibliothek\", \"Rettungsweg\", \"Melinaplatz\", \"Zeigerkurve\",\n \"Südkurve\", \"Kurvenstraße\", \"Federweg\", \"Kreidebahn\", \"Dunkle Gasse\", \"Letzter Weg\",\n \"Zustellweg\", \"Unterer Marktplatz\", \"Oberer Marktplatz\", \"Sitzplatz\", \"Am Feld\",\n \"Oberweg\", \"Meyerstraße\", \"Frühlingsstraße\", \"Herbststraße\", \"Winterstraße\",\n \"Löwengrube\", \"Am Galgenberg\", \"Maistraße\", \"Februarstraße\", \"Augustusweg\",\n \"Kartoffelring\", \"Lederring\", \"Kohlstraße\", \"Museumstraße\", \"Zeppelinstraße\",\n \"Röhrenstraße\", \"Pixelstraße\", \"Herzogstraße\", \"Königsplatz\", \"Wallstraße\",\n \"Ohmstraße\", \"Schnorrerstraße\", \"Ackerstraße\", \"Winzergasse\", \"Panzerstraße\",\n \"Abtstraße\", \"Albrechtstraße\", \"Alte Allee\", \"Messeplatz\", \"Blütenanger\",\n \"Anhalterstraße\", \"Barabarenstraße\", \"Benediktinerstraße\", \"Bernsteinweg\",\n \"Poststraße\", \"Clemensstraße\", \"Delphinstraße\", \"Drosselweg\", \"Münchner Straße\",\n \"Berliner Straße\", \"Stuttgarter Straße\", \"Hamburger Straße\", \"Dresdner Straße\",\n \"Frankfurter Straße\", \"Bremer Straße\", \"Promenade\", \"Wiener Straße\", \"Berner Straße\",\n \"Bozen Ring\", \"Ehe Ring\", \"Kryptographenheim\", \"Blutweg\", \"Rosinenstraße\",\n \"Fassring\", \"Grüngarten\", \"Gärtnerstraße\", \"Kanzlerstraße\", \"Streicherholz\",\n \"Katzenweg\", \"Hundeweg\", \"Luxweg\", \"Gänsemarsch\", \"Marderweg\", \"Giraffenplatz\",\n \"Elephantenstraße\", \"Beuteltierstraße\", \"Schnabeltierstraße\", \"Mäuseweg\",\n \"Nashornstraße\", \"Schmetterlingsweg\", \"Wanzenweg\", \"Krokodilstraße\", \"Licht\",\n \"Hemdstraße\", \"Jeansstraße\", \"Hutstraße\", \"Regengasse\", \"Donnerweg\",\n \"Blitzstraße\", \"Schuhstraße\", \"Glücksleiter\", \"Kleestraße\", \"Anemonenstraße\",\n \"Rehweg\", \"Ameisenbärstraße\", \"Pandastraße\", \"Antilopenweg\", \"Analphabetenstraße\",\n \"Platz der Geometrie\", \"Volksstraße\", \"Bajuwarenstraße\", \"Ameisenstraße\",\n \"Apfelstraße\", \"Birnenstraße\", \"Pampelmusenstraße\", \"Melonenstraße\", \"Himbeerweg\",\n \"Brombeerweg\", \"Erdbeerweg\", \"Stinktierstraße\", \"Mangostraße\", \"Walnussstraße\",\n \"Sehr Seriöse Straße\", \"Wegweiser\", \"Balkonien\", \"Kolonie\", \"Busbahnhof\", \"Ungern\",\n \"Granatapfelweg\", \"Mühlenallee\", \"Platz des 30. Juni\", \"Sparschweinweg\", \"Sankt-Paul-Straße\",\n \"Silvesterstraße\", \"Taschenrechnerstraße\"};\n bhfNamen = new ArrayList<String>();\n for (int i = 0; i < bhfNamenTmp.length; i++) {\n bhfNamen.add(bhfNamenTmp[i]);\n }\n }", "public static void hotel(Graphics g, int x, int y, int orientation){\n\t\tif(orientation == 0){\r\n\t\t\tg.setColor(hotel1);\r\n\t\t\tg.fillRect(x + 8, y - 1, 60, 20);\r\n\t\t\tg.setColor(hotel2);\r\n\t\t\tg.fillRect(x + 8, y + 7, 60, 4);\r\n\t\t}else if(orientation == 1){\r\n\t\t\tg.setColor(hotel1);\r\n\t\t\tg.fillRect(x + 1, y + 8, 20, 60);\r\n\t\t\tg.setColor(hotel2);\r\n\t\t\tg.fillRect(x + 9, y + 8, 4, 60);\r\n\t\t}\r\n\t}", "public void displayPhieuXuatKho() {\n\t\tlog.info(\"-----displayPhieuXuatKho()-----\");\n\t\tif (!maPhieu.equals(\"\")) {\n\t\t\ttry {\n\t\t\t\tDieuTriUtilDelegate dieuTriUtilDelegate = DieuTriUtilDelegate.getInstance();\n\t\t\t\tPhieuTraKhoDelegate pxkWS = PhieuTraKhoDelegate.getInstance();\n\t\t\t\tCtTraKhoDelegate ctxWS = CtTraKhoDelegate.getInstance();\n\t\t\t\tDmKhoa dmKhoaNhan = new DmKhoa();\n\t\t\t\tdmKhoaNhan = (DmKhoa)dieuTriUtilDelegate.findByMa(IConstantsRes.KHOA_KC_MA, \"DmKhoa\", \"dmkhoaMa\");\n\t\t\t\tphieuTra = pxkWS.findByPhieutrakhoByKhoNhan(maPhieu, dmKhoaNhan.getDmkhoaMaso());\n\t\t\t\tif (phieuTra != null) {\n\t\t\t\t\tmaPhieu = phieuTra.getPhieutrakhoMa();\n\t\t\t\t\tresetInfo();\n\t\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\t\t\tngayXuat = df.format(phieuTra.getPhieutrakhoNgay());\n\t\t\t\t\tfor (CtTraKho ct : ctxWS.findByphieutrakhoMa(phieuTra.getPhieutrakhoMa())) {\n\t\t\t\t\t\tCtTraKhoExt ctxEx = new CtTraKhoExt();\n\t\t\t\t\t\tctxEx.setCtTraKho(ct);\n\t\t\t\t\t\tlistCtKhoLeTraEx.add(ctxEx);\n\t\t\t\t\t}\n\t\t\t\t\tcount = listCtKhoLeTraEx.size();\n\t\t\t\t\tisFound=\"true\";\n\t\t\t\t\t// = null la chua luu ton kho -> cho ghi nhan\n\t\t\t\t\t// = 1 da luu to kho -> khong cho ghi nhan\n\t\t\t\t\tif(phieuTra.getPhieutrakhoNgaygiophat()==null)\n\t\t\t\t\tisUpdate = \"1\";\n\t\t\t\t\telse\n\t\t\t\t\t\tisUpdate = \"0\";\n\t\t\t\t} else {\n\t\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_NULL, maPhieu);\n\t\t\t\t\treset();\n\t\t\t\t}\n\t\t\t\ttinhTien();\n\t\t\t} catch (Exception e) {\n\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_NULL, maPhieu);\n\t\t\t\treset();\n\t\t\t\tlog.error(String.format(\"-----Error: %s\", e));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void initPlateau() {\r\n\t\t// On place les obstacles\r\n\t\tint epaisseur = 20;\r\n\t\tint delta = 50;\r\n\t\tint espace = 150;\r\n\t\tobstacles.add(new Obstacle(0,0,width,epaisseur));\r\n\t\tobstacles.add(new Obstacle(0,height - epaisseur,width,epaisseur));\r\n\t\tobstacles.add(new Obstacle(0,0,epaisseur,height));\r\n\t\tobstacles.add(new Obstacle(width - epaisseur,0,epaisseur,height));\r\n\t\t\r\n\t\tobstacles.add(new Obstacle(0,100,width-espace,epaisseur));\r\n\t\tobstacles.add(new Obstacle(espace,200,width-espace,epaisseur));\r\n\t\tobstacles.add(new Obstacle(0,300,width-espace,epaisseur));\r\n\t\tobstacles.add(new Obstacle(espace,400,width-espace,epaisseur));\r\n\t\t\r\n\t\t// On place les objectifs\r\n\t\t\r\n\t\tobjectifs.add(new Objectif(400,50));\r\n\t\tobjectifs.add(new Objectif(150,50));\r\n\t\tobjectifs.add(new Objectif(300,50));\r\n\t\tobjectifs.add(new Objectif(50,50));\r\n\t\tobjectifs.add(new Objectif(400,50));\r\n\t\tobjectifs.add(new Objectif(600,50));\r\n\t\tobjectifs.add(new Objectif(700,70));\r\n\t\tobjectifs.add(new Objectif(730,100));\r\n\t\tobjectifs.add(new Objectif(730,130));\r\n\t\tobjectifs.add(new Objectif(100,150));\r\n\t\tobjectifs.add(new Objectif(200,150));\r\n\t\tobjectifs.add(new Objectif(400,150));\r\n\t\tobjectifs.add(new Objectif(500,150));\r\n\t\tobjectifs.add(new Objectif(600,150));\r\n\t\tobjectifs.add(new Objectif(700,150));\r\n\t\tobjectifs.add(new Objectif(70,200));\r\n\t\tobjectifs.add(new Objectif(100,250));\r\n\t\tobjectifs.add(new Objectif(500,250));\r\n\t\tobjectifs.add(new Objectif(300,250));\r\n\t\tobjectifs.add(new Objectif(600,250));\r\n\t\tobjectifs.add(new Objectif(700,270));\r\n\t\tobjectifs.add(new Objectif(730,300));\r\n\t\tobjectifs.add(new Objectif(730,330));\r\n\t\tobjectifs.add(new Objectif(100,350));\r\n\t\tobjectifs.add(new Objectif(200,350));\r\n\t\tobjectifs.add(new Objectif(700,350));\r\n\t\tobjectifs.add(new Objectif(500,350));\r\n\t\tobjectifs.add(new Objectif(300,350));\r\n\t\tobjectifs.add(new Objectif(100,350));\r\n\t\tobjectifs.add(new Objectif(70,400));\r\n\t\tobjectifs.add(new Objectif(100,450));\r\n\t\tobjectifs.add(new Objectif(500,450));\r\n\t\tobjectifs.add(new Objectif(300,450));\r\n\t\tobjectifs.add(new Objectif(600,450));\r\n\t\t\r\n\t}", "private void verarbeiteInWarenkorbKlick() {\n\n\t\tString titel = text2.getText();\n\t\tString anzahlString = text1.getText();\n\t\tint menge = Integer.parseInt(anzahlString);\n\n\t\tList<Artikel> liste1 = shop.sucheArtikelBezeichnung(titel);\n\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tshop.warenHinzufügen(liste1.get(0), kunde, menge);\n\t\t\t} catch (ArtikelBestandReichtNichtAusException e) {\n\t\t\t\t// TODO Automatisch generierter Erfassungsblock\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage());\n\t\t\t}\n\t\t} catch (MassengutartikelException e1) {\n\n\t\t\tJOptionPane.showMessageDialog(null, e1.getMessage());\n\t\t}\n\t\ttry {\n\t\t\tshop.schreibeArtikel();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Automatisch generierter Erfassungsblock\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void sleutelWaarde(){\n if(sleutel100.getX() == speler.getX() && sleutel100.getY() == speler.getY() && veld[speler.getY()][speler.getX()] == 1){\n speler.setSleutelWaarde(sleutel100.getWaarde());\n }\n else if(sleutel1002.getX() == speler.getX() && sleutel1002.getY() == speler.getY() && veld[speler.getY()][speler.getX()] == 1){\n speler.setSleutelWaarde(sleutel1002.getWaarde());\n }\n else if(sleutel200.getX() == speler.getX() && sleutel200.getY() == speler.getY() && veld[speler.getY()][speler.getX()] == 1){\n speler.setSleutelWaarde(sleutel200.getWaarde());\n }\n else if(sleutel300.getX() == speler.getX() && sleutel300.getY() == speler.getY() && veld[speler.getY()][speler.getX()] == 1){\n speler.setSleutelWaarde(sleutel300.getWaarde());\n }\n }", "public final void mo66559hj() {\n int hl = m72695hl() | m72696hm();\n m72697hn();\n if (hl != 0) {\n m72694hk();\n notifyChanged();\n }\n }", "public boolean editionElementFacture(Habitation hab){\r\n\t\t\r\n\t\tboolean res = false;\r\n\t\tdouble totalGeneralHT = 0;\r\n\t\tfinal double tva = 0.62;\r\n\t\t\r\n\t\tCalendar cal = null;\r\n\t\tcal = Calendar.getInstance();\r\n\t\t\r\n\t\tDate actuelle = new Date();\r\n\t\t\r\n\t\t//SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\t//String dat = dateFormat.format(actuelle);\r\n\t\t\r\n\t\tcal.setTime(actuelle);\r\n\t\t\r\n\t\tint year = cal.get(Calendar.YEAR);\r\n\t\t// extraction du mois mettre + 1 car d�marre � 0 et non pas 1\r\n\t\tint month = cal.get(Calendar.MONTH) + 1;\r\n\t\tint day = cal.get(Calendar.DAY_OF_MONTH);\r\n\t\t\r\n\t\tString mois=tabMois[month];\r\n\t\t\r\n\t\tSystem.out.println(\"**************\");\r\n\t\tSystem.out.println(\"Société Trisel\");\r\n\t\tSystem.out.println(\"**************\");\r\n\t\t\r\n\t\tSystem.out.println(\"Facture du mois de \"+mois);\r\n\t\tSystem.out.println(\"Editée le lundi \"+day+\" \"+mois+\" \"+year);\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(hab.getUsager().getNomUsager()+\" \"+hab.getUsager().getPrenomUsager());\r\n\t\tSystem.out.println(hab.getAdresseRue());\r\n\t\tSystem.out.println(hab.getCp()+\" \"+hab.getAdresseVille());\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"Code usager : \"+hab.getUsager().getIdUsager());\r\n\t\tSystem.out.println(\"Récapitulatif des pesées des poubelles au mois de : \"+mois);\r\n\t\t\r\n\t\tArrayList<Poubelle> lespoubelles = hab.getLesPoubelles();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\tfor(Poubelle p : lespoubelles)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tdouble totalPoubelleHT = 0;\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tSystem.out.println(\"Poubelle : \"+p.getIdPoubelle()+\" Nature des déchets : \"+p.getNature().getLibelle());\r\n\t\t\t\t\r\n\t\t\t\tArrayList<Levee> leslevees = p.getLesLevees(year,month);\r\n\t\t\t\t\r\n\t\t\t\tif(leslevees.size()==0)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Pas de levees pour cette poubelle\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse{\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(Levee l : leslevees)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\t\t\tSystem.out.println(\"Date de pesée : \"+l.getDate());\r\n\t\t\t\t\t\tSystem.out.println(\"Nombre de kg : \"+l.getPoids());\r\n\t\t\t\t\t\tSystem.out.println(\"Prix HT au kg : \"+p.getNature().getTarif());\r\n\t\t\t\t\t\tSystem.out.println(\"Total HT - levee \"+l.getIdLevee()+\" : \"+(p.getNature().getTarif())*(l.getPoids()));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\ttotalPoubelleHT = p.getCout(year, month);\r\n\t\t\t\t\ttotalGeneralHT = totalPoubelleHT + totalPoubelleHT ;\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"Total HT - poubelle \"+p.getIdPoubelle()+\" : \"+totalPoubelleHT);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"------------------\");\r\n\t\t\tSystem.out.println(\"Total général HT : \"+totalGeneralHT);\r\n\t\t\tSystem.out.println(\"Montant TVA : \"+tva);\r\n\t\t\tSystem.out.println(\"Montant Total : \"+(totalGeneralHT+tva)+\" \"+hab.getCout(year, month));\r\n\t\t\tSystem.out.println(\"------------------\");\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\t\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn res;\r\n\t\r\n\t}" ]
[ "0.6444392", "0.6228473", "0.6135727", "0.6123296", "0.5942239", "0.586353", "0.5845616", "0.5825098", "0.57534486", "0.57255507", "0.5671318", "0.5629062", "0.5606774", "0.5606774", "0.55877674", "0.55869246", "0.55864626", "0.5581327", "0.55484784", "0.55124897", "0.54951245", "0.54931426", "0.54719955", "0.54625356", "0.5444407", "0.54282403", "0.5422564", "0.54208344", "0.54177666", "0.5412711", "0.54032385", "0.5380297", "0.5369008", "0.53446805", "0.53446805", "0.53419834", "0.53346634", "0.5333178", "0.53297764", "0.5329342", "0.53291136", "0.532104", "0.5313041", "0.53054047", "0.53002924", "0.52993137", "0.5299132", "0.52918285", "0.5290219", "0.5287348", "0.5275198", "0.526735", "0.5266161", "0.5256862", "0.52567303", "0.52434146", "0.52381927", "0.52165014", "0.5208398", "0.5202317", "0.5190441", "0.51901966", "0.5187026", "0.51848644", "0.51805544", "0.5178403", "0.51753986", "0.5174388", "0.5171732", "0.51646173", "0.51614904", "0.51612186", "0.5147199", "0.5145772", "0.51380116", "0.51353717", "0.5133197", "0.5129671", "0.51268494", "0.5111741", "0.51051533", "0.50971967", "0.5096056", "0.5095011", "0.5094005", "0.5093728", "0.5091187", "0.50883603", "0.50878894", "0.508696", "0.50848055", "0.5082588", "0.50819874", "0.5081353", "0.507996", "0.50797874", "0.507954", "0.50763655", "0.5075438", "0.5069096", "0.50677437" ]
0.0
-1
Anzahl aller erfassten Benutzer ausgeben
public int numberOfUsers() { int anzahlUser=userDAO.getUserList().size(); return anzahlUser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getUserCount() {\n\t\t\treturn 7;\n\t\t}", "public int countUsers()\n {\n int nbUser = 0;\n pw.println(12);\n try\n {\n nbUser = Integer.parseInt(bis.readLine()) ;\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return nbUser ;\n }", "int getUsersCount();", "int getUsersCount();", "int getUsersCount();", "public int numberUsers() \n\t{\n\t\treturn this.userList.size();\n\t}", "public int getUserCount() {\n return instance.getUserCount();\n }", "public int getUserCount() {\n return user_.size();\n }", "int getUserCount();", "int getUserCount();", "Integer loadUserCount();", "public int getUsersCount() {\n return users_.size();\n }", "public int getUsersCount() {\n return users_.size();\n }", "@Override\n\tpublic int numerOfItems() {\n\t\treturn usersDAO.numerOfItems();\n\t}", "@Override\r\n\tpublic int selectUserCount() {\n\t\treturn userMapper.selectUserCount();\r\n\t}", "public int getNumberOfUsers() {\n \t\treturn interactionHistorySizes.size();\n \t}", "public int getNrOfAccounts() {\n return getPublicKeys().size();\n }", "public long getUsersCount() {\r\n return usersCount;\r\n }", "public int getSize(){\n\t\t\n\t\tint counter = 0;\t\t\t\t\t\t\t\t\t\t\t/* ====> Size counter */\n\t\t\n\t\tUser marker = new User();\t\t\t\t\t\t\t\t\t/* ====> Create a marker */\n\t\tmarker = this.getHead();\t\t\t\t\t\t\t\t\t/* ====> Set the marker at the beginning of the list */\n\t\t\n\t\twhile(marker.getNext()!= null){\t\t\t\t\t\t\t\t/* ====> Move marker to next element until it reaches the end. */ \n\t\t\tmarker = marker.getNext();\n\t\t\tcounter++;\t\t\t\t\t\t\t\t\t\t\t\t/* ====> Increment counter everytime the loop goes through */\n\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\treturn counter;\t\t\t\t\t\t\t\t\t\t\t\t/* ====> Return number of Users in UserList */\n\t\t\n\t}", "public long getUserCount() throws UserManagementException;", "@Override\n\tpublic int nbMembers() {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic int memberCount() {\n\t\treturn sqlSession.selectOne(NAMESPACE + \".member_count_user\");\r\n\t}", "@Override\n\tpublic int numberOfAccounts() {\n\t\treturn counter;\n\t}", "private int getNumberOfAccounts()\n {\n ProtocolProviderFactory factory =\n DictAccRegWizzActivator.getDictProtocolProviderFactory();\n\n return factory.getRegisteredAccounts().size();\n }", "public int getUsersCount()\n\t{\n\t\tint usersCount=(int) userDao.count();\n\t\treturn usersCount;\n\t}", "public int numberOfAdmin(){\n return administratorMyArray.size();\n }", "@Override\n\tpublic int chungchungcount() throws Exception {\n\t\treturn dao.chungchungcount();\n\t}", "protected int countUsers() \n\t{\n\t\tint result = -1;\n\t\ttry {\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tResultSet rs = stat.executeQuery(\"SELECT COUNT(lfm_username) FROM Persons;\");\n\t\t\tSystem.out.println(rs.toString());\n\t\t\tresult = rs.getInt(1);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\t\t\tSystem.out.println(\"Something went wrong counting users from Persons\");\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\tpublic int kyungsangcount() throws Exception {\n\t\treturn dao.kyungsangcount();\n\t}", "@Transactional\r\n\tpublic Integer countUserss() {\r\n\t\treturn ((Long) usersDAO.createQuerySingleResult(\"select count(o) from Users o\").getSingleResult()).intValue();\r\n\t}", "public int getUserCount(UserParams params) throws Exception {\n\t\treturn 0;\n\t}", "private int numeroCuentas() {\r\n\t\tint cuentasCreadas = 0;\r\n\t\tfor (Cuenta cuenta : this.cuentas) {\r\n\t\t\tif (cuenta != null) {\r\n\t\t\t\tcuentasCreadas++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cuentasCreadas;\r\n\t}", "@Pure\n\tpublic int getUserDataCount() {\n\t\treturn (this.userData == null) ? 0 : this.userData.size();\n\t}", "public int computeNbEtudiant() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int countAdmins() {\n\t\treturn 0;\n\t}", "public int anzahlRundenziel() {\n // TODO: eine Seite aufsetzen mit Informationen zur Datenbank\n // TODO: Anzahl der Einträge pro Tabelle\n int nReturn = 0;\n final Cursor c = mDb.getReadableDatabase().rawQuery(\n \"select count(*) from \" + RundenZielTbl.TABLE_NAME,\n null);\n if (!c.moveToFirst()) {\n Log.d(TAG, \"anzahlRundenziel(): Kein Rundenziel gespeichert\");\n nReturn = 0;\n } else {\n nReturn = c.getInt(0);\n }\n c.close();\n return nReturn;\n }", "public int count () {\n return member_id_list.length;\r\n }", "public static int getUserInfosCount()\n throws com.liferay.portal.kernel.exception.SystemException {\n return getService().getUserInfosCount();\n }", "public int getUserCount()\n\t{\n\t\tint ret = -1;\n\t\ttry {\n\t\t\tret = Integer.parseInt(userCount.getTextContent());\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tlogger.warn(\"Could not parse user-count field\");\n\t\t}\n\t\treturn ret;\n\t}", "public int getCount() {\n return usersArrayList.size();\n }", "public int AnzahlWerkstoffe()\n {\n if (liste.size() == 1)\n {\n System.out.println(\"Die Datenbank enthält \" + liste.size() + \" Werkstoff.\"); \n }\n else \n {\n System.out.println(\"Die Datenbank enthält \" + liste.size() + \" Werkstoffe.\");\n }\n return (int)liste.size();\n }", "@Override\r\n\tpublic int getGeunTaeAdminCnt(HashMap<String, String> params) {\n\t\treturn sqlsession.selectOne(\"GeuntaeMgnt.getGeunTaeAdminCnt\",params);\r\n\t}", "public int getNickels()\n {\n\treturn nickels;\n }", "@Override\n\tpublic Integer findRoleUserCount(XtParmas parmas) {\n\t\treturn roleMapper.findRoleUserCount(parmas);\n\t}", "int getPersonInfoCount();", "int getFriendCount();", "int getFriendCount();", "int getNumberOfGuests();", "public int getCount(String username);", "int getReaultCount();", "public int getRecSize(){\n\t\t\n\t\tint counter = 0;\t\t\t\t\t\t\t\t\t\t\t/* ====> Size counter */\n\t\t\n\t\tUser marker = new User();\t\t\t\t\t\t\t\t\t/* ====> Create a marker */\n\t\tmarker = this.getHead();\t\t\t\t\t\t\t\t\t/* ====> Set the marker at the beginning of the list */\n\t\t\n\t\twhile(marker.getNext()!= null){\t\t\t\t\t\t\t\t/* ====> Move marker to next element until it reaches the end. */\n\t\t\tmarker = marker.getNext();\n\t\t\tif(marker.getAccType().equals(\"Receptionist\")){\t\t\t\t/* ====> If marker is an Admin then increment counter */\n\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn counter;\t\t\t\t\t\t\t\t\t\t\t\t/* ====> Return number of Admins in UserList */\n\t\t\n\t}", "public int getUsers() {\n\t\treturn this.users;\n\t}", "int getAuthenticationCount();", "@Override\r\n\tpublic int selectCount() {\n\t\treturn userdao.selectCount();\r\n\t}", "@Override\n public final long countAll() {\n\treturn (long) getEntityManager()\n\t\t.createQuery(\"select count(*) from \"\n\t\t\t+ CustomerUser.class.getName())\n\t\t.getSingleResult();\n }", "public int numPlayers(){\n return this.members.size();\n }", "public static int anonymousSize() {\n\t\tInteger count = new Integer(0);\n\t\tObject object = cache.get(FQN_COUNT, ANONYMOUS_COUNT);\n\t\tif (object != null) {\n\t\t\tcount = (Integer) object;\n\t\t}\n\n\t\treturn (count == null ? 0 : count.intValue());\n\t}", "public int getActiveUserCount() {\n return activeUserCount;\n }", "public Integer findNumOfUsers(String username);", "public int getLoggedInUsers();", "public int getNumberOfRolls()\n {\n return this.numberOfRolls;\n }", "public int getUsersCount() {\n if (usersBuilder_ == null) {\n return users_.size();\n } else {\n return usersBuilder_.getCount();\n }\n }", "public int getUsersCount() {\n if (usersBuilder_ == null) {\n return users_.size();\n } else {\n return usersBuilder_.getCount();\n }\n }", "public int getAnzahl() {\r\n\t\treturn anzahl;\r\n\t}", "@Override\n\tpublic int countUsers(String partialName) {\n\t\tlong lcount = uDao.countUsers(partialName);\n\t\tif (lcount > Integer.MAX_VALUE) {\n\t\t\t// I know this won't ever happen, but I want to make the static code\n\t\t\t// checkers happy.\n\t\t\tlogger.error(\"Too many workspaces\");\n\t\t\treturn Integer.MAX_VALUE;\n\t\t} else {\n\t\t\treturn (int) lcount;\n\t\t}\n\t}", "int getRolesCount();", "int getRolesCount();", "public int getUsers()\n\t{\n\t\tint users=0;\n\t\tString query=\"select count(*) from login where usertype=?\";\n\t\ttry\n\t\t{\n\t\t\tConnection con=DBInfo.getConn();\t\n\t\t\tPreparedStatement ps=con.prepareStatement(query);\n\t\t\tps.setString(1, \"user\");\n\t\t\tResultSet res=ps.executeQuery();\n\t\t\twhile(res.next())\n\t\t\t{\n\t\t\t\tusers=res.getInt(1);\n\t\t\t}\n\t\t\tcon.close();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn users;\n\t}", "public int obtenerNumeroFuentes() {\n\t\tint n = 0;\n\n\t\ttry {\n\n\t\t\trs = stmt\n\t\t\t\t\t.executeQuery(\"SELECT COUNT(IDFUENTE) AS FUENTES FROM FUENTE\");\n\t\t\trs.next();\n\n\t\t\tn = rs.getInt(\"FUENTES\");\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"No es posible recuperar el numero de fuentes\");\n\n\t\t}\n\n\t\treturn n;\n\t}", "public int getNrSubscribers()\r\n {\r\n return subscriberInfos.size();\r\n }", "@Transactional\n\tpublic Integer countLabConstructUsers() {\n\t\treturn ((Long) labConstructUserDAO.createQuerySingleResult(\"select count(o) from LabConstructUser o\").getSingleResult()).intValue();\n\t}", "static public int numberOfPersons() {\n return personMap.size();\n }", "int getAoisCount();", "int getUserFunctionsCount();", "int getFriendListCount();", "int getFriendListCount();", "public int numberOfHotels() {\r\n \tint anzahlHotel=hotelDAO.getHotelList().size();\r\n \treturn anzahlHotel;\r\n }", "public static int numNickels(double money) {\n // REPLACE THIS WITH YOUR CODE\n return 0;\n }", "@Override\r\n\tpublic Integer getActivity_logins_cnt() {\n\t\treturn super.getActivity_logins_cnt();\r\n\t}", "@Override\r\n\tpublic int getGeunTaeCnt(HashMap<String, String> params) {\n\t\treturn sqlsession.selectOne(\"GeuntaeMgnt.getGeunTaeCnt\",params);\r\n\t}", "public int listAmount() {\n return count;\n }", "public static int getNotificationsUsersCount()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getService().getNotificationsUsersCount();\n\t}", "public int getUserNumber() throws AdminPersistenceException {\n return getCount(\"ST_User\", \"id\", \"accessLevel <> ?\", \"R\");\n }", "@Override\n\tpublic int jejucount() throws Exception {\n\t\treturn dao.jejucount();\n\t}", "public int getNrDuengerVorhanden(){\r\n\t\treturn this.modelData.getPresentFertiliser().size();\r\n\t}", "@Override\n\tpublic int hyundaecount() throws Exception {\n\t\treturn dao.hyundaecount();\n\t}", "int getProfilesCount();", "public int length() {\n\t\treturn CarerAccounts.size();\n\t}", "@Override\n\tpublic int junlacount() throws Exception {\n\t\treturn dao.junlacount();\n\t}", "@Override\n public int getUserTypesCount() {\n return userTypes_.size();\n }", "int getCazuriCount();", "int getNumberOfLoginAttempts()\r\n\t{\r\n\t\treturn 0;\r\n\t}", "public int numeroHojas(){\n\t int N=0, ni=0, nd=0;\n\t Arbol <T> aux=null;\n\t if (!vacio()) {\n\t if ((aux=getHijoIzq())!=null) ni = aux.numeroHojas();\n\t if ((aux=getHijoDer())!=null) nd = aux.numeroHojas();\n\t if ((aux=getHijoDer())==null && (aux=getHijoIzq())==null)N = 1;\n\t else N = ni + nd;\n\t }\n\t\treturn N;\n\t}", "int getEntryCount();", "int getNumberOfRegsUser(long idUser);", "@SuppressWarnings(\"deprecation\")\r\n\tprivate int countEntities(){\r\n\t\tQuery query = new Query(\"UserProfile\");\r\n\t\treturn datastore.prepare(query).countEntities();\r\n\t}", "@Override\r\n\t\tpublic int count() {\n\t\t\treturn 0;\r\n\t\t}", "public int getWallItemsCount(String userUuid);", "@Override\n\tpublic long countMemberExcep() {\n\t\treturn 0;\n\t}", "public int getMetaUsers();" ]
[ "0.71990144", "0.7197597", "0.70949113", "0.70949113", "0.70949113", "0.7034517", "0.6954908", "0.6831739", "0.68306243", "0.68306243", "0.6722964", "0.67213243", "0.67209697", "0.66760546", "0.6668104", "0.6638412", "0.66107684", "0.65871525", "0.6558827", "0.65526724", "0.65272015", "0.65131164", "0.64933103", "0.6485656", "0.64346933", "0.643263", "0.64109737", "0.6406728", "0.6356233", "0.63510513", "0.63494486", "0.6334132", "0.63159174", "0.6315543", "0.6299826", "0.62989324", "0.6270786", "0.62541527", "0.6239294", "0.62357134", "0.6228619", "0.6213363", "0.62024474", "0.61742604", "0.6170655", "0.6126114", "0.6126114", "0.6123685", "0.611773", "0.61159843", "0.6111995", "0.61057884", "0.61006725", "0.6098282", "0.6096209", "0.6092934", "0.60872614", "0.60858315", "0.608107", "0.6059545", "0.60581136", "0.6056967", "0.60566163", "0.60550237", "0.6051493", "0.60453767", "0.60453767", "0.603626", "0.60088015", "0.6004551", "0.59946084", "0.59916085", "0.599106", "0.5988222", "0.59825486", "0.59825486", "0.5975376", "0.5969344", "0.5965345", "0.59590226", "0.59584033", "0.5949354", "0.5944658", "0.59331197", "0.5932218", "0.59313005", "0.592304", "0.59229004", "0.59203935", "0.5913751", "0.5908917", "0.5902694", "0.58976537", "0.5890249", "0.58880967", "0.5887", "0.5882534", "0.58761877", "0.5872028", "0.58700156" ]
0.7237777
0
Anzahl aller auf der Seite registrierten Hotels
public int numberOfHotels() { int anzahlHotel=hotelDAO.getHotelList().size(); return anzahlHotel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getHotelImageURLsCount() {\n return hotelImageURLs_.size();\n }", "public int getHotelImageURLsCount() {\n return hotelImageURLs_.size();\n }", "private int getNumberOfBoxesOfAllShips() {\r\n int count = 30;\r\n return count;\r\n }", "public int size()\n\t{\n\t\tint size = 0;\n\t\tfor(List<Registry.Entry> li : this.reg.values())\n\t\t\tsize += li.size();\n\t\treturn size;\n\t}", "int getWifisCount();", "int getWayCount();", "int getTrucksCount();", "public int getNickels()\n {\n\treturn nickels;\n }", "public void loadHotels();", "int getHotelImageURLsCount();", "public int getHandKarteCount(){\n return getHandKarte().size();\n }", "int getLocationsCount();", "int getSnInfoCount();", "int getSnInfoCount();", "int getSnInfoCount();", "@Override\r\n\tpublic Integer getBind_house_cnt() {\n\t\treturn super.getBind_house_cnt();\r\n\t}", "@Override\n\tpublic int getCount() {\n\t\tif (docketMachineArray.size() <= 0)\n\t\t\treturn 1;\n\t\treturn docketMachineArray.size();\n\t}", "public int getPinCount();", "int getNumberOfStonesOnBoard();", "int getMonstersCount();", "int getMonstersCount();", "int getNumberOfGuests();", "int getBlockLocationsCount();", "public int getNumberShips();", "int getGuestAcceleratorsCount();", "public void showHotels() {\n System.out.println(\"-----Hotels: ------\");\n hotelsService.getHotels().forEach(System.out::println);\n }", "int getReservePokemonCount();", "public int getNbVehicles() {\n\t\t\treturn K;\r\n\t\t}", "int count() {\n return index.capacity() / 24;\n }", "@Override\r\n\tpublic Integer getBind_car_cnt() {\n\t\treturn super.getBind_car_cnt();\r\n\t}", "void raiseNumberOfStonesOnBoard();", "public int getWifisCount() {\n return wifis_.size();\n }", "public int getInstanceCount() {\n return instanceCount;\n }", "public int getInstanceCount() {\n return instanceCount;\n }", "public int numEdges()\r\n {\r\n\tint s = 0;\r\n\tfor (final EdgeTypeHolder eth : ethMap.values())\r\n\t s += eth.numEdges();\r\n\treturn s;\r\n }", "private int getNumberOfAccounts()\n {\n ProtocolProviderFactory factory =\n DictAccRegWizzActivator.getDictProtocolProviderFactory();\n\n return factory.getRegisteredAccounts().size();\n }", "public Bebawy_Hotels() \n\t{\n\t\tinitComponent();\n\t\tcreateEvent();\t\n\t}", "public int numeroOcupado() {\n int i = 0;\n for (Map.Entry e : lista.entrySet()) {\n Equipamento eq = (Equipamento) e.getValue();\n if (eq.getEstado().equals(\"Ocupado\"))\n i++;\n }\n return i;\n }", "@Override\n\tpublic int getWeathersCount() {\n\t\treturn _weatherLocalService.getWeathersCount();\n\t}", "public int getCount(){\r\n\t\tif(_serverinfo != null){\r\n\t\t\treturn _serverinfo.length / 6;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "public int getGuestCount() { return _scroller.getGuestCount(); }", "private int numNodes()\r\n\t{\r\n\t return nodeMap.size();\r\n\t}", "public int getActiveRunwaysCount();", "int getNetworkInterfacesCount();", "public int size() {\r\n\t\treturn geheim.length;\r\n\t}", "int getPickupsCount();", "public int getCount() {\n\t\t\treturn foods.size();\n\t\t}", "int getServicesCount();", "int getServicesCount();", "@Override\n\tpublic int countIndex() {\n\t\treturn logoMapper.selectCountLogo()+headbannerMapper.selecCountHB()+succefulMapper.selecCountSucc()+solutionMapper.selecCountSolu();\n\t}", "int getRegisterParametersCount();", "public int getNumLanes() {\n\t\treturn numLanes;\n\t}", "int getSlotsCount();", "public static int getNrReservas() {\r\n\t\tint reservas = 0;\r\n\t\tString sql=\"select count(*) as reservas from reserva;\";\r\n\r\n\t\ttry {\r\n\t\t\tConnection conn=singleton.getConnector().getConnection();\r\n\t\t\tPreparedStatement stat=conn.prepareStatement(sql);\r\n\t\t\tResultSet utils=stat.executeQuery();\r\n\t\t\twhile(utils.next()) {\r\n\t\t\t\treservas = utils.getInt(\"reservas\");\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn reservas;\r\n\t}", "Integer getPortMappingCount() throws NotDiscoverUpnpGatewayException, UpnpException;", "@Override\n\tpublic int getNbClients() {\n\t\t// TODO Auto-generated method stub\n\t\tint nbClients=0;\n\t\tfor (ArrayList<TC> quantite : salle.values()) {\t\t//On parcours l'ensemble de la liste pour connaître à chaque tour de\n\t\t\tnbClients += quantite.size();\t\t\t\t\t//boucle le nombre de personne prioritaire.\n\t\t}\n\t\treturn nbClients;\n\t\t\n\t\t// on cherche a donner le nombre de clients dans la salle à l'instant T, pour ce faire on fait la somme de la taille de chaque file d'attente \n// int res=0;\n// for(int i=0;i<maxPrio;i++) {\n// res += salle.get(i).size(); // on fait un get sur la salle d'indice i (correspondant a 1 niveau de priorité) ce qui rend l'ArrayList puis on prend la size de ce get. \n// }\n\t}", "int getFeaturesCount();", "public int getSlotCount() { \n return getSlotCount0();\n }", "int getFaintedPokemonCount();", "public abstract int getComponentCount();", "public int numNodes()\r\n {\r\n\tint s = 0;\r\n\tfor (final NodeTypeHolder nt : ntMap.values())\r\n\t s += nt.numNodes();\r\n\treturn s;\r\n }", "int countInstances();", "int sizeOfLanesArray();", "public int totalNum(){\n return wp.size();\n }", "public int getCount() {\n return cp.getmImageIds(gridType).length;\n\n }", "public static int numberOfStops() {\n return getAllStops().size();\n }", "public int numHouses() {\n\t\treturn buildings;\n\t}", "public int getTrucksCount() {\n return trucks_.size();\n }", "public int getNumberOfItems() {\n \t\treturn regions.size();\n \t}", "protected int getWoodCount() {\n\t\treturn ent.getItemCount(Block.wood.blockID);\n\t}", "private void initCountMap() {\n\t\tcountMap.put(\"cells.BlueSchellingCell\", 0);\n\t\tcountMap.put(\"cells.OrangeSchellingCell\", 0);\n\t\tcountMap.put(\"cells.LiveCell\", 0);\n\t\tcountMap.put(\"cells.DeadCell\", 0);\n\t\tcountMap.put(\"cells.TreeCell\", 0);\n\t\tcountMap.put(\"cells.BurningTreeCell\", 0);\n\t\tcountMap.put(\"cells.EmptyLandCell\", 0);\n\t\tcountMap.put(\"cells.EmptyCell\", 0);\n\t\tcountMap.put(\"cells.SharkCell\", 0);\n\t\tcountMap.put(\"cells.FishCell\", 0);\n\t\tcountMap.put(\"cells.AntGroupCell\", 0);\n\t\tcountMap.put(\"cells.BlueRPSCell\", 0);\n\t\tcountMap.put(\"cells.GreenRPSCell\", 0);\n\t\tcountMap.put(\"cells.RedRPSCell\", 0);\n\t\tcountMap.put(\"cells.WhiteRPSCell\", 0);\n\t}", "int getNodesCount();", "int getNodesCount();", "public int entries(){\n\t\treturn routeTable.size();\n\t}", "int numberofhc()\n{\n\treturn hc.size();}", "long countPostings() {\n \tlong result = 0;\n \tfor (Layer layer : layers.values())\n \t\tresult += layer.size();\n \treturn result;\n }", "public int getMonstersCount() {\n return monsters_.size();\n }", "public int getMonstersCount() {\n return monsters_.size();\n }", "int getInstanceCount();", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn App.getInstance().getSettlements().size();\n\t\t}", "public int getNumEquips() {\n\t\treturn (n_equips);\n\t}", "int getTruckstatusCount();", "int getPeersCount();", "public int getAvailableCount();", "public static void incrementGuestRoomCount() {numGuestRooms++;}", "public int getCount() {\n\t\t\treturn maplist2.size();\n\t\t}", "public int getPortletCount()\r\n {\r\n return _portletList.size();\r\n }", "@Override\r\n\tpublic int getPegCount() {\r\n\t\tint shipSize = 3;\r\n\t\treturn shipSize;\r\n\t}", "public int numberOfFeatures(){\n\t\treturn indexByFeature.keySet().size();\n\t}", "public int AnzahlWerkstoffe()\n {\n if (liste.size() == 1)\n {\n System.out.println(\"Die Datenbank enthält \" + liste.size() + \" Werkstoff.\"); \n }\n else \n {\n System.out.println(\"Die Datenbank enthält \" + liste.size() + \" Werkstoffe.\");\n }\n return (int)liste.size();\n }", "public int countryCount(){\n\t\treturn this.countries.size();\n\t}", "protected int numGenes() {\n\t\treturn genes.size();\n\t}", "public abstract int numOfFoodCellToReproduce();", "int getFeatureCount();", "public int getSpineInstanceCount() {\n if (spineInstanceList == null) {\n return 0;\n }\n return spineInstanceList.size();\n }", "int getReaultCount();", "@java.lang.Override\n public int getReservePokemonCount() {\n return reservePokemon_.size();\n }", "public int size() {\r\n return listeners.size() + weak.size();\r\n }", "public int getNeighBorCount(){\n\t\treturn serventList.size(); \n\t}", "int getPurchasableOffersCount();" ]
[ "0.64480346", "0.6417992", "0.639704", "0.6322539", "0.63069475", "0.6194978", "0.61772877", "0.61701715", "0.61270285", "0.6126976", "0.6124516", "0.6114185", "0.6102628", "0.6102628", "0.6102628", "0.6102143", "0.60935307", "0.6060811", "0.6055681", "0.6022996", "0.6022996", "0.59958583", "0.59910464", "0.5984404", "0.5973919", "0.5961704", "0.5960317", "0.59527653", "0.59038866", "0.58991176", "0.589678", "0.5878297", "0.5877153", "0.5877153", "0.58676815", "0.5846696", "0.58337766", "0.58330387", "0.5821781", "0.5821396", "0.5811495", "0.58056164", "0.579842", "0.57968503", "0.5792827", "0.57894", "0.57867974", "0.5783849", "0.5783849", "0.5781753", "0.5780482", "0.57798785", "0.57778054", "0.5773953", "0.5770545", "0.57673097", "0.57651573", "0.57518595", "0.5737382", "0.57308626", "0.572952", "0.5714292", "0.5710584", "0.5707218", "0.56979924", "0.5697507", "0.5682749", "0.56744033", "0.5671832", "0.566331", "0.5658946", "0.56569105", "0.56569105", "0.5656348", "0.5656227", "0.56555116", "0.56537306", "0.5653241", "0.5652606", "0.565255", "0.565072", "0.5649072", "0.5648584", "0.56445014", "0.56406784", "0.56403065", "0.5637898", "0.5633159", "0.56327784", "0.56282413", "0.56266105", "0.5624687", "0.5624241", "0.5621529", "0.5619891", "0.5617031", "0.5616566", "0.5614021", "0.56132823", "0.56124085" ]
0.76174873
0
durchschnittliche Bewertung eines Hotels berechnen
public double averageBewertungHotel(Hotel hotel) { ArrayList<Integer> bewertung = hotel.getBewertung(); double wert=0; for (int i=0;i<bewertung.size();i++) { wert+=bewertung.get(i); } wert=wert/bewertung.size(); return wert; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Bebawy_Hotels() \n\t{\n\t\tinitComponent();\n\t\tcreateEvent();\t\n\t}", "public void acheter(){\n\t\t\n\t\t// Achete un billet si il reste des place\n\t\ttry {\n\t\t\tthis.maBilleterie.vendre();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tthis.status.put('B', System.currentTimeMillis());\n\t\tSystem.out.println(\"STATE B - Le festivalier \" + this.numFestivalier + \" a acheté sa place\");\n\t}", "void TaktImpulsAusfuehren ()\n {\n \n wolkebew();\n \n }", "@Override\r\n\tpublic void benachrichtigeBeobachter() {\n\t\tfor (int i = 0; i < beobachter.size(); i++) {\r\n\t\t\tBeobachter b = (Beobachter)beobachter.get(i);\r\n\t\t\tb.aktualisieren(temperatur, feuchtigkeit, luftdruck);\r\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}", "private void pump_water() {\n\t\t\r\n\t}", "public void uruchomGre()\n\t{\n\t\tustawPojazdNaPoczatek();\n\t\tplanszaWidokHND.repaint();\n\t\twToku = true;\n\t\tzegar.start();\n\t\tpauza = false;\n\t}", "public void borra() {\n dib.borra();\n dib.dibujaImagen(limiteX-60,limiteY-60,\"tierra.png\");\n dib.pinta(); \n }", "private void hienThiMaKHSuDungDV(){\n SuDungService suDungService = new SuDungService();\n suDungModels = suDungService.layMaKHSuDungDVLoaiBoTrungLap();\n \n cbbThanhToanMaKH.removeAllItems();\n for (SuDungModel suDungModel : suDungModels) {\n cbbThanhToanMaKH.addItem(suDungModel.getMaKH());\n }\n }", "public final void bHT() {\n AppMethodBeat.m2504i(21893);\n C7060h.pYm.mo8381e(12931, Long.valueOf(this.nyK), Long.valueOf(this.nyL), Long.valueOf(this.nzg), Long.valueOf(this.nzh), Long.valueOf(this.nzi), Long.valueOf(this.nzj));\n AppMethodBeat.m2505o(21893);\n }", "public void loadHotels();", "@Override\r\n\tpublic void autoSeatHeat() {\n\t\t\r\n\t}", "public final void dyE() {\n AppMethodBeat.i(29674);\n com.tencent.mm.blink.b.HQ().o(new Runnable() {\n public final void run() {\n AppMethodBeat.i(29666);\n w.this.ynU = true;\n al.af(w.this.ynV);\n al.n(w.this.ynV, 300);\n AppMethodBeat.o(29666);\n }\n });\n AppMethodBeat.o(29674);\n }", "public void updateBord() {\r\n\tmaakDambord();\r\n\tfor (int i = 0; i < dambord.getKolommen(); i++) {\r\n\t for (int j = 0; j < dambord.getRijen(); j++) {\r\n\t\tif ( (dambord.getNodeAt(i, j).hasDamsteen() && dambord.getNodeAt(i, j).getDamsteen().hasMoves() ) &&\r\n\t\t\tdambord.getNodeAt(i, j).getDamsteen().isOwnedByPlayer() ) {\r\n\t\t bord.getNodeComponent(i, j).addMouseListener(this);\r\n\t\t bord.getNodeComponent(i, j).addMouseMotionListener(this);\r\n\t\t} else if (dambord.getNodeAt(i, j).isHighLight()) {\r\n\t\t bord.getNodeComponent(i, j).addMouseListener(this);\r\n\t\t bord.getNodeComponent(i, j).addMouseMotionListener(this);\r\n\t\t}\r\n\t }\r\n\t}\r\n }", "public void tickerStoppen() \n {\n anzeige.tickerAbmelden( this );\n }", "@Override\n public void onTakeOffTeaBagRaised() {\n }", "public void maakDambord() {\t\r\n\tbord.addSpeelBord(dambord.getSpeelbord());\r\n\tframe.pack();\r\n }", "private void wentOffWall() {\n //random location\n b.numX = r.nextInt(2400) + 100;\n b.numY = r.nextInt(1400) + 100;\n //random speed\n b.xSpeed = this.newSpeed();\n b.ySpeed = this.newSpeed();\n }", "public void run() {\n\t\t\ttry {\n\t\t\t\tfinal List<BusItem> items;\n\t\t\t\titems = LocationParser.parse(BlueBus.this);\n\t\t\t\tmapItemOverlay.updateBuses(items);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\t\n\t\t\t}\n\t\t}", "public void geraeuschMachen() {\n System.out.println(\"BRUELL\");\n }", "public void applyBrake() {\n\t\t\r\n\t}", "private void m7635b() {\n if (!this.f6418o) {\n this.f6417n = false;\n this.f6405b.clearAnimation();\n this.f6406c.removeAnnotations();\n List arrayList = new ArrayList();\n for (GridDTO polygons : this.f6414k) {\n arrayList.add(new PolygonOptions().addAll(polygons.getPolygons()).fillColor(Color.parseColor(\"#00bcd4\")).strokeColor(-16728876).alpha(0.5f));\n }\n this.f6406c.addPolygons(arrayList);\n this.f6417n = false;\n }\n }", "@Override\r\n\tpublic void carBreak() {\n\t\t\r\n\t}", "public void prendreBus(){\n\t\t\n\t\t// On vérifie qu'il possède bien un ticket\n\t\tif (this.status.containsKey('B')) {\n\t\t\t\n\t\t\tthis.siteDepart.monterBus(this);\n\t\t\tthis.status.put('C', System.currentTimeMillis());\n\t\t\tSystem.out.println(\"STATE C - Le festivalier \" + this.numFestivalier + \" monte dans le bus n°\" + this.monBus.getIdBus() + \" (\" + this.monBus.getPlacesDispo() + \" / \" + this.monBus.getPlacesMaxi() + \").\");\n\t\t}\n\t}", "private void hienThiMaPDK(){\n ThuePhongService thuePhongService = new ThuePhongService();\n thuePhongModels = thuePhongService.layToanBoPhieuDangKyThuePhong();\n cbbMaPDK.removeAllItems();\n for (ThuePhongModel thuePhongModel : thuePhongModels) {\n cbbMaPDK.addItem(thuePhongModel.getMaPDK());\n }\n }", "private static void kapazitaetPruefen(){\n\t\tList<OeffentlichesVerkehrsmittel> loev = new ArrayList<OeffentlichesVerkehrsmittel>();\n\t\t\n\t\tLinienBus b1 = new LinienBus();\n\t\tFaehrschiff f1 = new Faehrschiff();\n\t\tLinienBus b2 = new LinienBus();\t\n\t\t\n\t\tloev.add(b1);\n\t\tloev.add(b2);\n\t\tloev.add(f1);\n\t\t\n\t\tint zaehlung = 500;\n\t\tboolean ausreichend = kapazitaetPruefen(loev,500);\n\t\tp(\"Kapazitaet ausreichend? \" + ausreichend);\n\t\t\n\t}", "public void ausgabe() {\n\t\tthis.streamKoordinierung.koordiniereAnhandDerEingabedaten();\n\t\tthis.streamKoordinierung.schreibeEndtextInDatei();\n\t\tSystem.out.println(\"\\n\\nAlles erfolgreich abgelaufen, herzlichen Glueckwunsch!\");\n\t}", "public void CobaHitung()\n {\n\n\n PrayTimeCounter prayers = new PrayTimeCounter();\n\n prayers.setTimeFormat(prayers.getTime24());\n prayers.setCalcMethod(prayers.getMWL());\n prayers.setAsrJuristic(prayers.getShafii());\n prayers.setAdjustHighLats(prayers.getAngleBased());\n int[] offsets = {0, 0, 0, 0, 0, 0, 0}; // {Fajr,Sunrise,Dhuhr,Asr,Sunset,Maghrib,Isha}\n prayers.tune(offsets);\n\n Date now = new Date();\n Calendar cal = Calendar.getInstance();\n cal.setTime(now);\n\n ArrayList<String> prayerTimes = prayers.getPrayerTimes(cal,\n Anshitu.getApp().getLatitude(), Anshitu.getApp().getLongitude(), Anshitu.getApp().getTimezone());\n subuh.setText(prayerTimes.get(0));\n terbit.setText(prayerTimes.get(1));\n duhur.setText(prayerTimes.get(2));\n ashar.setText(prayerTimes.get(3));\n maghrib.setText(prayerTimes.get(4));\n isya.setText(prayerTimes.get(prayerTimes.size()-1));\n /*ArrayList<String> prayerNames = prayers.getTimeNames();\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,prayerNames);\n jeda.setAdapter(adapter);\n ArrayAdapter<String> adapter1 = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,prayerTimes);\n durasi.setAdapter(adapter1);*/\n }", "public void wuerfeln() {\n if (istGefängnis) {\n setIstGefängnis(false);\n if (aktuellesFeldName instanceof GefängnisFeld && !(aktuellesFeldName instanceof NurZuBesuchFeld)) {\n GefängnisFeld g = (GefängnisFeld) aktuellesFeldName;\n g.gefaengnisAktion(this);\n \n return;\n }\n\n } else {\n String[] worte = {\"Eins\", \"Zwei\", \"Drei\", \"Vier\", \"Fünf\", \"Sechs\", \"Sieben\", \"Acht\", \"Neun\", \"Zehn\", \"Elf\", \"Zwölf\"};\n\n wuerfelZahl = getRandomInteger(12, 1);\n\n this.aktuellesFeld = this.aktuellesFeld + wuerfelZahl + 1;\n if (this.aktuellesFeld >= 40) {\n setAktuellesFeld(0);\n\n }\n\n System.out.println(worte[wuerfelZahl] + \" gewürfelt\");\n\n aktuellesFeldName = spielfigurSetzen(this.aktuellesFeld);\n System.out.println(\"Du befindest dich auf Feld-Nr: \" + (this.aktuellesFeld));\n boolean check = false;\n for (Spielfelder s : felderInBesitz) {\n if (aktuellesFeldName.equals(s)) {\n check = true;\n }\n }\n\n if (!check) {\n aktuellesFeldName.spielfeldAktion(this, aktuellesFeldName);\n } else {\n System.out.println(\"Das Feld: \" + aktuellesFeldName.getFeldname() + \"(Nr: \" + aktuellesFeldName.getFeldnummer() + \")gehört dir!\");\n if (aktuellesFeldName instanceof Straße) {\n Straße strasse = (Straße) aktuellesFeldName;\n System.out.println(\"Farbe: \" + strasse.getFarbe());\n try {\n strasse.hausBauen(this, strasse);\n } catch (IOException ex) {\n Logger.getLogger(Spieler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n }\n }\n }", "@Override\n public void onTakeTeaBagRaised() {\n }", "public void tick(){\n oilLevel --;\n maintenance --;\n happiness --;\n health --;\n boredom ++;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void refreshBoatInformation() {\n\t\tABoat selected=null;\n\t\tfor(ABoat b : ABmap.instance().boats) {\n\t\t\tif(((JComboBox<String>)components.get(\"nameComboBox\")).getSelectedItem()==b.name) {\n\t\t\t\tb.select();\n\t\t\t\tselected=b;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t((JLabel)components.get(\"boatPositionLabel\")).setText(\"[\"+selected.posX+\",\"+selected.posY+\"]\");\n\t\t((JLabel)components.get(\"boatStateLabel\")).setText(selected.state.name());\n\t\tint f,mf,l,ml;\n\t\tf = selected.fuel;\n\t\tmf = selected.maxFuel;\n\t\tif(selected instanceof ACleaningBoat) {\n\t\t\t((JLabel)components.get(\"boatTypeLabel\")).setText(\"Cleaning Boat\");\n\t\t\tl = selected.load;\n\t\t\tml = ((ACleaningBoat) selected).maxLoad;\n\t\t\t((JLabel)components.get(\"boatLoadLabel\")).setText(l+\"/\"+ml);\n\t\t\t((JProgressBar)components.get(\"boatLoadProgressBar\")).setValue((l*100)/ml);\n\t\t}\n\t\telse if(selected instanceof ACollectorBoat) {\n\t\t\t((JLabel)components.get(\"boatTypeLabel\")).setText(\"Collector Boat\");\n\t\t\tl = selected.load;\n\t\t\tml = ((ACollectorBoat) selected).maxLoad;\n\t\t\t((JLabel)components.get(\"boatLoadLabel\")).setText(l+\"/\"+ml);\n\t\t\t((JProgressBar)components.get(\"boatLoadProgressBar\")).setValue((l*100)/ml);\n\t\t}\n\t\telse{\n\t\t\t((JLabel)components.get(\"boatTypeLabel\")).setText(\"Refuel Boat\");\n\t\t\t((JLabel)components.get(\"boatLoadLabel\")).setText(\"NA\");\n\t\t\t((JProgressBar)components.get(\"boatLoadProgressBar\")).setValue(0);\n\t\t}\n\t\t((JLabel)components.get(\"boatFuelLabel\")).setText(f+\"/\"+mf);\n\t\t((JProgressBar)components.get(\"boatFuelProgressBar\")).setValue((f*100)/mf);\n\t}", "public final void dyI() {\n AppMethodBeat.i(29673);\n com.tencent.mm.blink.b.HQ().o(new Runnable() {\n public final void run() {\n AppMethodBeat.i(29665);\n w.this.ynU = true;\n al.af(w.this.ynV);\n al.d(w.this.ynV);\n AppMethodBeat.o(29665);\n }\n });\n AppMethodBeat.o(29673);\n }", "@Override\n\tprotected void on_boss_death() {\n\n\t}", "public void bajarBloque() {\n\t\tif (piezaActual != null) {\n\t\t\tif (Mapa.getInstance().estaLibre(piezaActual.getBloque3().getX(),\n\t\t\t\t\tpiezaActual.getBloque3().getY() + 1)) {\n\t\t\t\tpiezaActual.getBloque3().bajar(); // Dejar en ese orden\n\t\t\t\tpiezaActual.getBloque2().bajar();\n\t\t\t\tpiezaActual.getBloque1().bajar();\n\t\t\t} else {\n\t\t\t\tthis.piezaNueva();\n\t\t\t}\n\t\t}\n\t}", "public GameBis() { \t\n\t\t\n\t\t// initialization of the size of the game\n\t\tthis.width = 12; // ATTENTION : dimensions of the map (can be changed)\n\t\tthis.height = 12;\n\t\tthis.widthRoad = width * 2 + 1;\n\t\tthis.heightRoad = height * 2 + 1;\n\t\tthis.pxWidth = (width * 50) + ((width + 1) * 20); // ATTENTION TAILLE DES IMAGES : 50*50px (constructions), 20px (roads) (can be changed)\n\t\tthis.pxHeight = (width * 50) + ((width + 1) * 20);\n this.onTheRoadAgain= new LinkedList<Inhabitant>();\n\t\t\n\t\t// initialization of the boards of roads and constructions\n\t\tboardRoad = new BoardRoad(widthRoad, heightRoad); \n\t\tboardBuilding = new BoardBuilding(width, height);\n\t\t\n\t\t/*\n\t\t// initialization of 50 inhabitants ready to moving in at the beginning of the game\n\t\tfor (int i=0 ; i<50 ; i++) {\n\t\t\tpopulation.add(new Inhabitant(\"Inhabitant\"+i));\n\t\t}\n\t\t*/\n //initialistation du timer\n\t\ttimer = new Timer (100, new TimerClass());\n\t\ttimer.start();\n\t\t\n\t\t// display of the game\n\t\twindow = new Window(pxWidth, pxHeight, boardBuilding, boardRoad);\n\t\t\n\t}", "public void balayer()\r\n {\r\n int tot=0;\r\n for (int i=0;i<LONGUEUR;i++ )\r\n {\r\n for (int j=0; j<LARGEUR; j++ )\r\n {\r\n tot=0;\r\n Haut = lignesHor[i][j];\r\n Droite = lignesVert[i+1][j];\r\n Bas = lignesHor[i][j+1];\r\n Gauche = lignesVert[i][j];\r\n\r\n if (Haut)\r\n {\r\n tot++;\r\n Vision[i][j][1]=1;\r\n }\r\n\r\n if (Droite)\r\n {\r\n tot++;\r\n Vision[i][j][2]=1;\r\n }\r\n\r\n if (Bas)\r\n {\r\n tot++;\r\n Vision[i][j][3]=1;\r\n }\r\n\r\n\r\n if (Gauche)\r\n {\r\n tot++;\r\n Vision[i][j][4]=1;\r\n }\r\n\r\n Vision[i][j][0]=Vision[i][j][1]+Vision[i][j][2]+Vision[i][j][3]+Vision[i][j][4];\r\n }\r\n }\r\n }", "private void generateBreaks() {\n cexService.checkOrCreateBreakPoint();\n //Todos los dias menos el miercoles que es con el que va a compartir semana.\n List<DayOfWeek> dayRandomList = Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.THURSDAY,\n DayOfWeek.FRIDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY);\n TouristPointDTO randomBreakShift = new TouristPointDTO(touristPointRepository.findAll().stream()\n .filter(touristPoint -> touristPoint.getName().equals(\"Descanso Aleatorio\")).findFirst().get());\n //No deberiamos dar mas de x dias de bonus, porque podemos crear tantos descansos que no haya nadie para\n // trabajar en algun momento dado.\n if (lastWeekDatabase != null) {\n for (Day dayLastWeek : lastWeekDatabase.getDays()) {\n for (ShiftDTO shiftLastWeek : dayLastWeek.getShifts()\n .stream()\n .filter(shift -> shift.getPoint().getName().equals(\"Descanso\"))\n .map(ShiftDTO::new)\n .collect(Collectors.toList())) {\n ShiftDTO breakShift = new ShiftDTO();\n breakShift.setWorker(shiftLastWeek.getWorker());\n breakShift.setPoint(shiftLastWeek.getPoint());\n ShiftDTO breakShift2 = new ShiftDTO();\n breakShift2.setWorker(shiftLastWeek.getWorker());\n breakShift2.setPoint(shiftLastWeek.getPoint());\n ShiftDTO breakShift3 = new ShiftDTO();\n breakShift3.setWorker(shiftLastWeek.getWorker());\n breakShift3.setPoint(shiftLastWeek.getPoint());\n switch (dayLastWeek.getDayOfWeek()) {\n case MONDAY:\n addBreakDay(breakShift, DayOfWeek.WEDNESDAY);\n break;\n case TUESDAY:\n breakShift.setPoint(randomBreakShift);\n addBreakDay(breakShift, dayRandomList.stream()\n .skip((int) (dayRandomList.size() * Math.random()))\n .findFirst().get());\n break;\n case WEDNESDAY:\n addBreakDay(breakShift, DayOfWeek.THURSDAY);\n addBreakDay(breakShift3, DayOfWeek.FRIDAY);\n break;\n case THURSDAY:\n addBreakDay(breakShift, DayOfWeek.SATURDAY);\n break;\n case FRIDAY:\n addBreakDay(breakShift, DayOfWeek.SUNDAY);\n break;\n case SATURDAY:\n addBreakDay(breakShift, DayOfWeek.MONDAY);\n break;\n case SUNDAY:\n addBreakDay(breakShift, DayOfWeek.TUESDAY);\n break;\n }\n }\n }\n } else {\n List<TouristInformer> touristInformers = touristInformerRepository.findAll().stream()\n .filter(touristInformer -> touristInformer.getDismissDate() == null).collect(Collectors.toList());\n List<Team> teams = teamRepository.findAll();\n TouristPointDTO breakPoint = new TouristPointDTO(touristPointRepository.findAll().stream()\n .filter(touristPoint -> touristPoint.getName().equals(\"Descanso\")).findFirst().get());\n for (Team team : teams) {\n DayOfWeek lastStartBreak = DayOfWeek.MONDAY;\n for (TouristInformerDTO touristInformer : touristInformers.stream()\n .filter(touristInformer -> touristInformer.getTeam().equals(team))\n .map(TouristInformerDTO::new)\n .collect(Collectors.toList())) {\n ShiftDTO shift1 = new ShiftDTO();\n shift1.setWorker(touristInformer);\n shift1.setPoint(breakPoint);\n ShiftDTO shift2 = new ShiftDTO();\n shift2.setWorker(touristInformer);\n shift2.setPoint(breakPoint);\n switch (lastStartBreak) {\n case MONDAY:\n addBreakDay(shift1, DayOfWeek.WEDNESDAY);\n shift2.setPoint(randomBreakShift);\n addBreakDay(shift2, dayRandomList.stream()\n .skip((int) (dayRandomList.size() * Math.random()))\n .findFirst().get());\n lastStartBreak = DayOfWeek.WEDNESDAY;\n break;\n case WEDNESDAY:\n addBreakDay(shift1, DayOfWeek.THURSDAY);\n addBreakDay(shift2, DayOfWeek.FRIDAY);\n lastStartBreak = DayOfWeek.THURSDAY;\n break;\n case THURSDAY:\n addBreakDay(shift1, DayOfWeek.SATURDAY);\n addBreakDay(shift2, DayOfWeek.SUNDAY);\n lastStartBreak = DayOfWeek.SATURDAY;\n break;\n case SATURDAY:\n addBreakDay(shift1, DayOfWeek.MONDAY);\n addBreakDay(shift2, DayOfWeek.TUESDAY);\n lastStartBreak = DayOfWeek.MONDAY;\n break;\n }\n }\n }\n }\n }", "private void deplacerBall() {\n\t\tassert(f.getLevel() != null);\n\t\t\n\t\tLevel l = f.getLevel();\n\t\t\n\t\tif(l.getBall() == null ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(l.getType() == Type.AUTOMATIQUE) {\n\t\t\tif( l.getBall().getPosY()<f.getHauteurFenetre()*1/5) {//defilement vers le haut\n\t\t\t\tf.defilerEcranY(false);\n\t\t\t}\n\t\t\tif( l.getBall().getPosY()>f.getHauteurFenetre()*4/5) {//defilement vers le bas\n\t\t\t\tf.defilerEcranY(true);\n\t\t\t}\n\t\t\tif( l.getBall().getPosX()<f.getLargeurFenetre()*1/5) {//defilement vers la gauche\n\t\t\t\tf.defilerEcranX(true);\n\t\t\t}\n\t\t\tif( l.getBall().getPosX()>f.getLargeurFenetre()*4/5) {//defilement vers la droite\n\t\t\t\tf.defilerEcranX(false);\n\t\t\t}\n\t\t}else if(l.getType() == Type.INVERSE){\n\t\t\tif( l.getBall().getPosY()>f.getHauteurFenetre()*3/5) {//defilement vers le haut\n\t\t\t\tf.defilerEcranY(true);\n\t\t\t}\n\t\t}else {\n\t\t\tif( l.getBall().getPosY()<f.getHauteurFenetre()*2/5) {//defilement vers le haut\n\t\t\t\tf.defilerEcranY(false);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(l.getType() == Type.AUTOMATIQUE) {//mode automatique -> deplacement automatique\n\t\t\tl.getBall().deplacer();\n\t\t}else {\n\t\t\tl.getBall().deplacer();\n\t\t\tl.getBall().gravityY(l.gravityY());//la balle tombe selon la gravite\n\t\t}\n\t}", "private void initVariables() {\n neueLinien = 0;\n feldVoll = false;\n pause = false;\n nextAction = \"\";\n verloren = false;\n zoom = 0;\n bhfs = 0;\n\n timer = new Timer();\n timerS = new Timer();\n tageszeit = Stadtteil.NICHTS;\n strgPause = 500; // Timer-Rate\n\n hatBahnhof = new boolean[hoehe][breite];\n teile = new Stadtteil[hoehe][breite];\n bahnhoefe = new Bahnhof[hoehe][breite];\n linien = new Linie[20];\n\n for (int y = 0; y < hoehe; y++) {\n for (int x = 0; x < breite; x++) {\n hatBahnhof[y][x] = false;\n teile[y][x] = null;\n bahnhoefe[y][x] = null;\n }\n }\n\n for (int i = 0; i < linien.length; i++) {\n linien[i] = null;\n }\n\n String[] bhfNamenTmp = {\"Marienplatz\", \"Blumenstraße\", \"Graf Maxi von Krause Allee\",\n \"Nicolaiplatz\", \"Großer Imperator Felix Maurer Platz\", \"Christine Kaps Allee\",\n \"Felix der Hecker Platz\", \"Hofstraße\", \"Sonnenstraße\", \"Kirchplatz\",\n \"Javagasse\", \"Berglerweg\", \"Stiftstraße\", \"Unterberg\", \"Hauptstraße\",\n \"Feldweg\", \"Serviettenmarkt\", \"Kalterbach\", \"Bürgermeister Horst Bichler Straße\",\n \"Laaange Straße\", \"Weit-Weit-Weg\", \"Waschstraße\", \"Schnitzelstraße\",\n \"Platz des Bieres\", \"Alte Heide\", \"Baumhausen\", \"Geldweg\", \"Berg\", \"Hausen\",\n \"Schneiderei\", \"Alte Weberei\", \"Brauereigasse\", \"Färbergraben\", \"H-Brücke\",\n \"Sickergraben\", \"Turmstraße\", \"Schneckenbahn\", \"Rosengarten\", \"Humboldt-Platz\",\n \"Wurzelplatz\", \"Adlerstraße\", \"Flamingostraße\", \"Taubenweg\", \"Spechtweg\",\n \"Sperberstraße\", \"Schlosstraße\", \"Friedensstraße\", \"Sackgasse\", \"Platz der Partei\",\n \"Keksweg\", \"Börsenplatz\", \"Gleisweg\", \"Dateipfad\", \"Milchstraße\", \"Qwertzweg\",\n \"Holzweg\", \"Heringsberger Straße\", \"Ausfallstraße\", \"Bahnhofstraße\", \"Finkenweg\",\n \"Steinstraße\", \"Pfauenstraße\", \"Bergstraße\", \"Bürgersteig\", \"Schorlenplatz\",\n \"Saftladen\", \"Gullygasse\", \"Kassettenweg\", \"Egelstraße\", \"Wurmstraße\", \"Wasserweg\",\n \"{return null;}-Platz\", \"Rinderstraße\", \"Maulwurfstraße\", \"Eckpunkt\",\n \"Kleiberstraße\", \"Paragraphenweg\", \"Kabelbrücke\", \"Roter Weg\", \"Geisterbahn\",\n \"Gartenstraße\", \"Lilienstraße\", \"Pöppelstraße\", \"Stadtstraße\", \"Jägerweg\",\n \"Parrweg\", \"Bayerstraße\", \"Baderstraße\", \"Fichtenweg\", \"Birkenstraße\",\n \"Buchenweg\", \"Kastanienweg\", \"Kellergasse\", \"Himmelspforte\", \"Auberginenweg\",\n \"Jedermannsweg\", \"Ladenstraße\", \"Exilstraße\", \"Wegstraße\", \"Kepplerstraße\",\n \"Hammerweg\", \"Spitzweg\", \"Lötstraße\", \"Weinstraße\", \"Waldmeisterstraße\",\n \"Primelstraße\", \"Kamillenweg\", \"Balkenweg\", \"Farnweg\", \"Konfettiwerk\",\n \"Weckerwerk\", \"Kürbisstraße\", \"Pralinenallee\", \"Lindenstraße\", \"Autobahn\",\n \"Straße der Liebe\", \"Straße des Hass\", \"Zunftplatz\", \"Glaserviertel\", \"Gerberviertel\",\n \"Rotlichtviertel\", \"Platz der Arbeiter\", \"Fluchtweg\", \"Papierstraße\", \"Rennbahn\",\n \"Prangerviertel\", \"Henkerweg\", \"Peterplatz\", \"Staufenallee\", \"Besenallee\", \"Schaufelstraße\",\n \"Kugelbahn\", \"Genitivgasse\", \"Scharfe Kurve\", \"Ausweg\", \"Schulstraße\",\n \"Universität\", \"Bibliothek\", \"Rettungsweg\", \"Melinaplatz\", \"Zeigerkurve\",\n \"Südkurve\", \"Kurvenstraße\", \"Federweg\", \"Kreidebahn\", \"Dunkle Gasse\", \"Letzter Weg\",\n \"Zustellweg\", \"Unterer Marktplatz\", \"Oberer Marktplatz\", \"Sitzplatz\", \"Am Feld\",\n \"Oberweg\", \"Meyerstraße\", \"Frühlingsstraße\", \"Herbststraße\", \"Winterstraße\",\n \"Löwengrube\", \"Am Galgenberg\", \"Maistraße\", \"Februarstraße\", \"Augustusweg\",\n \"Kartoffelring\", \"Lederring\", \"Kohlstraße\", \"Museumstraße\", \"Zeppelinstraße\",\n \"Röhrenstraße\", \"Pixelstraße\", \"Herzogstraße\", \"Königsplatz\", \"Wallstraße\",\n \"Ohmstraße\", \"Schnorrerstraße\", \"Ackerstraße\", \"Winzergasse\", \"Panzerstraße\",\n \"Abtstraße\", \"Albrechtstraße\", \"Alte Allee\", \"Messeplatz\", \"Blütenanger\",\n \"Anhalterstraße\", \"Barabarenstraße\", \"Benediktinerstraße\", \"Bernsteinweg\",\n \"Poststraße\", \"Clemensstraße\", \"Delphinstraße\", \"Drosselweg\", \"Münchner Straße\",\n \"Berliner Straße\", \"Stuttgarter Straße\", \"Hamburger Straße\", \"Dresdner Straße\",\n \"Frankfurter Straße\", \"Bremer Straße\", \"Promenade\", \"Wiener Straße\", \"Berner Straße\",\n \"Bozen Ring\", \"Ehe Ring\", \"Kryptographenheim\", \"Blutweg\", \"Rosinenstraße\",\n \"Fassring\", \"Grüngarten\", \"Gärtnerstraße\", \"Kanzlerstraße\", \"Streicherholz\",\n \"Katzenweg\", \"Hundeweg\", \"Luxweg\", \"Gänsemarsch\", \"Marderweg\", \"Giraffenplatz\",\n \"Elephantenstraße\", \"Beuteltierstraße\", \"Schnabeltierstraße\", \"Mäuseweg\",\n \"Nashornstraße\", \"Schmetterlingsweg\", \"Wanzenweg\", \"Krokodilstraße\", \"Licht\",\n \"Hemdstraße\", \"Jeansstraße\", \"Hutstraße\", \"Regengasse\", \"Donnerweg\",\n \"Blitzstraße\", \"Schuhstraße\", \"Glücksleiter\", \"Kleestraße\", \"Anemonenstraße\",\n \"Rehweg\", \"Ameisenbärstraße\", \"Pandastraße\", \"Antilopenweg\", \"Analphabetenstraße\",\n \"Platz der Geometrie\", \"Volksstraße\", \"Bajuwarenstraße\", \"Ameisenstraße\",\n \"Apfelstraße\", \"Birnenstraße\", \"Pampelmusenstraße\", \"Melonenstraße\", \"Himbeerweg\",\n \"Brombeerweg\", \"Erdbeerweg\", \"Stinktierstraße\", \"Mangostraße\", \"Walnussstraße\",\n \"Sehr Seriöse Straße\", \"Wegweiser\", \"Balkonien\", \"Kolonie\", \"Busbahnhof\", \"Ungern\",\n \"Granatapfelweg\", \"Mühlenallee\", \"Platz des 30. Juni\", \"Sparschweinweg\", \"Sankt-Paul-Straße\",\n \"Silvesterstraße\", \"Taschenrechnerstraße\"};\n bhfNamen = new ArrayList<String>();\n for (int i = 0; i < bhfNamenTmp.length; i++) {\n bhfNamen.add(bhfNamenTmp[i]);\n }\n }", "public void teken(){\n removeAll();\n \n //eerste tekening\n if(tekenEerste != false){\n tekenMuur();\n tekenSleutel();\n veld[9][9] = 6;\n tekenEerste = false;\n tekenBarricade();\n }\n \n //methode die de speler de waarde van de sleutel geeft aanroepen\n sleutelWaarde();\n \n //de methode van het spel einde aanroepen\n einde();\n \n //vernieuwd veld aanroepen\n veld = speler.nieuwVeld(veld);\n \n //het veld tekenen\n for(int i = 0; i < coordinaten.length; i++) {\n for(int j = 0; j < coordinaten[1].length; j++){\n switch (veld[i][j]) {\n case 1: //de sleutels\n if(i == sleutel100.getY() && j == sleutel100.getX()){\n coordinaten[i][j] = new SleutelVakje(100);\n }\n else if (i == sleutel1002.getY() && j == sleutel1002.getX()){\n coordinaten[i][j] = new SleutelVakje(100);\n }\n else if (i == sleutel200.getY() && j == sleutel200.getX()){\n coordinaten[i][j] = new SleutelVakje(200);\n }\n else if (i == sleutel300.getY() && j == sleutel300.getX()){\n coordinaten[i][j] = new SleutelVakje(300);\n } break;\n case 2: //de muren\n coordinaten[i][j] = new MuurVakje();\n break;\n // de barricades\n case 3:\n coordinaten[i][j] = new BarricadeVakje(100);\n break;\n case 4:\n coordinaten[i][j] = new BarricadeVakje(200);\n break;\n case 5:\n coordinaten[i][j] = new BarricadeVakje(300);\n break;\n case 6: // het eindveld vakje\n coordinaten[i][j] = new EindveldVakje();\n break;\n default: // het normale vakje\n coordinaten[i][j] = new CoordinaatVakje();\n break;\n }\n //de speler\n coordinaten[speler.getY()][speler.getX()] = new SpelerVakje();\n \n //het veld aan de JPanel toevoegen\n add(coordinaten[i][j]);\n }\n }\n System.out.println(\"Speler waarde = \" + speler.getSleutelWaarde());\n revalidate();\n repaint();\n }", "public void angreifen(Lebewesen lebewesen) {\n\t\tdouble zahl = Math.random(); //generiert eine Zahl (double) zwischen 0 und 1\r\n\t\tif(zahl < 0.9d){ //leichtverletzen\r\n\t\t\tlebewesen.leichtVerletzen();\r\n\t\t\t//System.out.println(\"Monster: \"+ this.aktuellerZustand);\r\n\t\t}else if(zahl < 0.98d){ //schwer verletzen\r\n\t\t\tlebewesen.starkVerletzen();\r\n\t\t\t//System.out.println(\"Monster: \"+ this.aktuellerZustand);\r\n\t\t}else{ //direkt töten\r\n\t\t\tlebewesen.toetlichVerletzen();\r\n\t\t\t//System.out.println(\"Monster: \"+ this.aktuellerZustand);\r\n\t\t}\r\n\t}", "public void onTick() {\n this.count = count + 1;\n if (this.count % 10 == 0) {\n this.waterHeight = waterHeight + 1;\n }\n floodCells();\n worldEnds();\n\n }", "public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }", "public void mo1509b() {\n if (!mo1515d()) {\n for (C0370g d : this.f1281S) {\n m2011d(d);\n }\n this.f1281S.clear();\n this.f1289a0 = this.f1288Z;\n if (this.f1289a0 != null) {\n boolean z = this.f1299j0 == null;\n this.f1299j0 = this.f1289a0.getViewTreeObserver();\n if (z) {\n this.f1299j0.addOnGlobalLayoutListener(this.f1283U);\n }\n this.f1289a0.addOnAttachStateChangeListener(this.f1284V);\n }\n }\n }", "public Hamburg(){\n trackDepartureHolder = TrackHolder.getTrackHolder(8);\n trackArrivalHolder = TrackHolder.getTrackHolder(10);\n scratchTrack = new TrackList<>();\n }", "@Override\r\n\tpublic void death() {\n\t\tthis.dead = true;\r\n\t\tGamePanel.zigzag=true;\r\n\t\tGamePanel.messages.add(new Messages((int)(this.x),(int)(this.y),\"zigzag\",color2));\r\n\t\tfor(int i = 0; i<GamePanel.blueCircles.size();i++){\r\n\t\tGamePanel.blueCircles.get(i).zigzag=true;\r\n\t\tGamePanel.blueCircles.get(i).color = new Color(236,214,19);\r\n\t\tGamePanel.blueCircles.get(i).color2 = new Color(243,230,112);\r\n\t\tGamePanel.blueCircles.get(i).points = 16;\r\n\t\tGamePanel.blueCircles.get(i).zigzag();\r\n\t\t}\r\n\t\t\r\n\t}", "public void loescheEintrag() {\n\t\tzahl = 0;\n\t\tistEbenenStart = false;\n\t}", "private void vulKeuzeBordIn()\n {\n String[] lijstItems = dc.geefLijstItems();\n for (int i = 0; i < canvasKeuzeveld.length; i++)\n {\n for (int j = 0; j < canvasKeuzeveld[i].length; j++)\n {\n GraphicsContext gc = canvasKeuzeveld[i][j].getGraphicsContext2D();\n //checkImage(j + 1, gc);\n vulIn(lijstItems[j], gc);\n }\n }\n //dc.geefLijstItems();\n }", "public void breaker() \r\n\t{\n\t\t\r\n\t}", "private void heilenTrankBenutzen() {\n LinkedList<Gegenstand> gegenstaende = spieler.getAlleGegenstaende();\n for (Gegenstand g : gegenstaende) {\n if (g.getName().equalsIgnoreCase(\"heiltrank\")) {\n spieler.heilen();\n gegenstaende.remove(g);\n System.out.print(\"Heiltrank wird benutzt\");\n makePause();\n System.out.println(\"Du hast noch \" + zaehltGegenstand(\"heiltrank\") + \" Heiltranke!\");\n return;\n }\n }\n System.out.println(\"Du hast gerade keinen Heiltrank\");\n }", "private void prepare()\n {\n BrickPowerUp powerUp = new BrickPowerUp();\n addObject(powerUp,554,237);\n powerUp.setLocation(542,236);\n powerUp.setLocation(542,236);\n removeObject(powerUp);\n Timer timer = new Timer();\n addObject(timer,943,30);\n Player1 player1 = new Player1();\n addObject(player1,23,312);\n Player2 player2 = new Player2();\n addObject(player2,976,308);\n BrickPowerUp powerUp2 = new BrickPowerUp();\n addObject(powerUp2,512,78);\n BrickPowerUp powerUp3 = new BrickPowerUp();\n addObject(powerUp3,512,132);\n BrickPowerUp powerUp4 = new BrickPowerUp();\n addObject(powerUp4,511,184);\n powerUp4.setLocation(511,188);\n BrickPowerUp powerUp5 = new BrickPowerUp();\n addObject(powerUp5,512,237);\n BrickPowerUp powerUp6 = new BrickPowerUp();\n addObject(powerUp6,514,356);\n BrickPowerUp powerUp7 = new BrickPowerUp();\n addObject(powerUp7,515,412);\n BrickPowerUp powerUp8 = new BrickPowerUp();\n addObject(powerUp8,516,468);\n BrickPowerUp powerUp9 = new BrickPowerUp();\n addObject(powerUp9,516,524);\n BrickPowerUp powerUp10 = new BrickPowerUp();\n addObject(powerUp10,548,27);\n BrickPowerUp powerUp11 = new BrickPowerUp();\n addObject(powerUp11,548,78);\n BrickPowerUp powerUp12 = new BrickPowerUp();\n addObject(powerUp12,548,132);\n BrickPowerUp powerUp13 = new BrickPowerUp();\n addObject(powerUp13,548,185);\n BrickPowerUp powerUp14 = new BrickPowerUp();\n addObject(powerUp14,548,240);\n BrickPowerUp powerUp15 = new BrickPowerUp();\n addObject(powerUp15,550,356);\n BrickPowerUp powerUp16 = new BrickPowerUp();\n addObject(powerUp16,548,298);\n BrickPowerUp powerUp17 = new BrickPowerUp();\n addObject(powerUp17,550,413);\n BrickPowerUp powerUp18 = new BrickPowerUp();\n addObject(powerUp18,549,469);\n BrickPowerUp powerUp19 = new BrickPowerUp();\n addObject(powerUp19,548,524);\n BrickPowerUp powerUp20 = new BrickPowerUp();\n addObject(powerUp20,548,586);\n BrickPowerUp powerUp21 = new BrickPowerUp();\n addObject(powerUp21,476,27);\n BrickPowerUp powerUp22 = new BrickPowerUp();\n addObject(powerUp22,476,80);\n BrickPowerUp powerUp23 = new BrickPowerUp();\n addObject(powerUp23,476,133);\n BrickPowerUp powerUp24 = new BrickPowerUp();\n addObject(powerUp24,476,188);\n BrickPowerUp powerUp25 = new BrickPowerUp();\n addObject(powerUp25,476,242);\n BrickPowerUp powerUp26 = new BrickPowerUp();\n addObject(powerUp26,476,298);\n BrickPowerUp powerUp27 = new BrickPowerUp();\n addObject(powerUp27,476,355);\n BrickPowerUp powerUp28 = new BrickPowerUp();\n addObject(powerUp28,476,411);\n BrickPowerUp powerUp29 = new BrickPowerUp();\n addObject(powerUp29,476,468);\n BrickPowerUp powerUp30 = new BrickPowerUp();\n addObject(powerUp30,476,523);\n BrickPowerUp powerUp31 = new BrickPowerUp();\n addObject(powerUp31,476,584);\n Brick brick = new Brick();\n addObject(brick,442,28);\n Brick brick2 = new Brick();\n addObject(brick2,443,76);\n Brick brick3 = new Brick();\n addObject(brick3,444,125);\n Brick brick4 = new Brick();\n addObject(brick4,444,174);\n Brick brick5 = new Brick();\n addObject(brick5,444,223);\n Brick brick6 = new Brick();\n addObject(brick6,444,274);\n Brick brick7 = new Brick();\n addObject(brick7,444,324);\n Brick brick8 = new Brick();\n addObject(brick8,444,373);\n Brick brick9 = new Brick();\n addObject(brick9,444,422);\n Brick brick10 = new Brick();\n addObject(brick10,444,472);\n Brick brick11 = new Brick();\n addObject(brick11,444,523);\n Brick brick12 = new Brick();\n addObject(brick12,444,574);\n Brick brick22 = new Brick();\n addObject(brick22,583,28);\n Brick brick23 = new Brick();\n addObject(brick23,583,80);\n Brick brick24 = new Brick();\n addObject(brick24,582,133);\n Brick brick25 = new Brick();\n addObject(brick25,583,186);\n Brick brick26 = new Brick();\n addObject(brick26,583,241);\n Brick brick27 = new Brick();\n addObject(brick27,584,298);\n brick27.setLocation(583,290);\n Brick brick28 = new Brick();\n addObject(brick28,584,345);\n Brick brick29 = new Brick();\n addObject(brick29,584,398);\n Brick brick210 = new Brick();\n addObject(brick210,584,451);\n Brick brick211 = new Brick();\n addObject(brick211,584,504);\n Brick brick212 = new Brick();\n addObject(brick212,584,556);\n Brick brick213 = new Brick();\n addObject(brick213,585,604);\n brick213.setLocation(588,604);\n Brick brick13 = new Brick();\n addObject(brick13,444,623);\n Ball ball = new Ball(false);\n addObject(ball,812,308);\n Ball ball2 = new Ball(true);\n addObject(ball2,140,306);\n brick213.setLocation(580,604);\n brick213.setLocation(591,595);\n brick.setLocation(450,32);\n brick2.setLocation(443,65);\n brick3.setLocation(442,96);\n brick4.setLocation(445,152);\n brick5.setLocation(442,218);\n brick6.setLocation(445,248);\n brick7.setLocation(442,301);\n brick8.setLocation(439,360);\n brick9.setLocation(438,402);\n brick10.setLocation(446,448);\n brick11.setLocation(440,509);\n brick12.setLocation(444,543);\n brick13.setLocation(442,602);\n brick213.setLocation(586,598);\n removeObject(brick213);\n brick.setLocation(444,21);\n brick2.setLocation(440,87);\n brick2.setLocation(440,130);\n brick2.setLocation(441,86);\n brick3.setLocation(428,226);\n brick3.setLocation(443,136);\n brick5.setLocation(444,181);\n brick4.setLocation(439,375);\n brick4.setLocation(444,244);\n brick7.setLocation(436,293);\n brick8.setLocation(441,339);\n brick6.setLocation(427,477);\n brick6.setLocation(442,400);\n brick10.setLocation(440,435);\n brick9.setLocation(437,497);\n removeObject(brick9);\n brick12.setLocation(437,565);\n removeObject(brick13);\n brick7.setLocation(437,283);\n removeObject(brick10);\n removeObject(brick12);\n removeObject(brick11);\n removeObject(brick6);\n removeObject(brick8);\n removeObject(brick7);\n brick2.setLocation(447,84);\n brick.setLocation(442,21);\n brick2.setLocation(440,68);\n brick5.setLocation(438,177);\n brick4.setLocation(436,228);\n brick4.setLocation(428,297);\n removeObject(brick4);\n removeObject(brick5);\n removeObject(brick3);\n brick2.setLocation(444,84);\n brick.setLocation(447,34);\n brick2.setLocation(439,73);\n removeObject(brick2);\n brick.setLocation(443,27);\n Brick brick14 = new Brick();\n addObject(brick14,443,81);\n Brick brick15 = new Brick();\n addObject(brick15,444,135);\n Brick brick16 = new Brick();\n addObject(brick16,444,188);\n Brick brick17 = new Brick();\n addObject(brick17,444,243);\n Brick brick18 = new Brick();\n addObject(brick18,444,296);\n Brick brick19 = new Brick();\n addObject(brick19,445,350);\n Brick brick20 = new Brick();\n addObject(brick20,445,403);\n Brick brick21 = new Brick();\n addObject(brick21,445,455);\n Brick brick30 = new Brick();\n addObject(brick30,445,504);\n Brick brick31 = new Brick();\n addObject(brick31,445,556);\n Brick brick32 = new Brick();\n addObject(brick32,444,609);\n brick32.setLocation(448,611);\n Brick brick214 = new Brick();\n addObject(brick214,584,610);\n brick32.setLocation(444,606);\n brick32.setLocation(439,605);\n brick32.setLocation(437,604);\n brick32.setLocation(449,608);\n brick32.setLocation(444,606);\n timer.setLocation(958,21);\n Portal portal = new Portal();\n addObject(portal,512,298);\n Portal2 portal2 = new Portal2();\n addObject(portal2,513,30);\n Portal3 portal3 = new Portal3();\n addObject(portal3,516,588);\n Brick brick38 = new Brick();\n addObject(brick38,415,25);\n brick38.setLocation(415,21);\n Brick brick39 = new Brick();\n addObject(brick39,415,81);\n Brick brick40 = new Brick();\n addObject(brick40,416,135);\n Brick brick41 = new Brick();\n addObject(brick41,416,188);\n Brick brick42 = new Brick();\n addObject(brick42,416,245);\n brick42.setLocation(419,243);\n Brick brick43 = new Brick();\n addObject(brick43,416,300);\n Brick brick44 = new Brick();\n addObject(brick44,416,350);\n Brick brick45 = new Brick();\n addObject(brick45,416,403);\n Brick brick46 = new Brick();\n addObject(brick46,415,456);\n Brick brick47 = new Brick();\n addObject(brick47,416,504);\n brick46.setLocation(416,459);\n Brick brick48 = new Brick();\n addObject(brick48,416,556);\n Brick brick49 = new Brick();\n addObject(brick49,415,602);\n brick49.setLocation(411,602);\n brick43.setLocation(411,302);\n brick49.setLocation(411,603);\n brick43.setLocation(411,303);\n brick46.setLocation(411,455);\n brick42.setLocation(411,247);\n brick46.setLocation(422,458);\n brick49.setLocation(417,596);\n brick43.setLocation(413,303);\n brick42.setLocation(418,236);\n brick38.setLocation(417,30);\n brick38.setLocation(419,14);\n brick38.setLocation(413,30);\n brick38.setLocation(419,24);\n brick38.setLocation(408,30);\n brick43.setLocation(410,294);\n brick42.setLocation(409,237);\n powerUp7.setLocation(505,415);\n powerUp8.setLocation(510,465);\n powerUp9.setLocation(507,523);\n portal3.setLocation(508,582);\n removeObject(brick38);\n removeObject(brick42);\n removeObject(brick43);\n removeObject(brick46);\n removeObject(brick49);\n Brick brick50 = new Brick();\n addObject(brick50,415,26);\n brick50.setLocation(414,27);\n Brick brick51 = new Brick();\n addObject(brick51,416,243);\n Brick brick52 = new Brick();\n addObject(brick52,415,296);\n Brick brick53 = new Brick();\n addObject(brick53,415,454);\n Brick brick54 = new Brick();\n addObject(brick54,414,605);\n brick54.setLocation(416,606);\n Brick brick55 = new Brick();\n addObject(brick55,384,27);\n Brick brick56 = new Brick();\n addObject(brick56,386,81);\n brick56.setLocation(384,81);\n Brick brick57 = new Brick();\n addObject(brick57,385,135);\n Brick brick58 = new Brick();\n addObject(brick58,385,189);\n brick58.setLocation(385,188);\n Brick brick59 = new Brick();\n addObject(brick59,385,244);\n brick59.setLocation(385,243);\n Brick brick60 = new Brick();\n addObject(brick60,384,295);\n brick60.setLocation(385,296);\n Brick brick61 = new Brick();\n addObject(brick61,386,350);\n brick61.setLocation(385,350);\n Brick brick62 = new Brick();\n addObject(brick62,386,404);\n brick62.setLocation(385,403);\n Brick brick63 = new Brick();\n addObject(brick63,386,456);\n brick63.setLocation(385,455);\n Brick brick64 = new Brick();\n addObject(brick64,385,505);\n Brick brick65 = new Brick();\n addObject(brick65,386,556);\n brick65.setLocation(385,555);\n Brick brick66 = new Brick();\n addObject(brick66,385,606);\n Brick brick67 = new Brick();\n addObject(brick67,355,27);\n Brick brick68 = new Brick();\n addObject(brick68,355,80);\n brick68.setLocation(355,81);\n Brick brick69 = new Brick();\n addObject(brick69,356,135);\n brick69.setLocation(355,135);\n Brick brick70 = new Brick();\n addObject(brick70,355,188);\n Brick brick71 = new Brick();\n addObject(brick71,354,244);\n brick71.setLocation(345,252);\n brick71.setLocation(355,242);\n Brick brick72 = new Brick();\n addObject(brick72,355,296);\n Brick brick73 = new Brick();\n addObject(brick73,355,351);\n brick73.setLocation(355,350);\n Brick brick74 = new Brick();\n addObject(brick74,355,404);\n brick74.setLocation(355,404);\n Brick brick75 = new Brick();\n addObject(brick75,356,455);\n brick75.setLocation(355,455);\n Brick brick76 = new Brick();\n addObject(brick76,355,506);\n brick76.setLocation(355,506);\n Brick brick77 = new Brick();\n addObject(brick77,355,557);\n brick77.setLocation(355,555);\n Brick brick78 = new Brick();\n addObject(brick78,355,609);\n brick78.setLocation(355,607);\n portal3.setLocation(510,585);\n powerUp31.setLocation(476,580);\n powerUp31.setLocation(473,590);\n powerUp9.setLocation(510,530);\n powerUp8.setLocation(510,457);\n powerUp7.setLocation(510,417);\n powerUp6.setLocation(510,354);\n powerUp8.setLocation(510,466);\n powerUp9.setLocation(510,529);\n powerUp31.setLocation(480,573);\n powerUp20.setLocation(550,573);\n powerUp31.setLocation(476,582);\n powerUp20.setLocation(548,580);\n Brick brick79 = new Brick();\n addObject(brick79,614,28);\n Brick brick80 = new Brick();\n addObject(brick80,644,28);\n Brick brick81 = new Brick();\n addObject(brick81,674,28);\n Brick brick82 = new Brick();\n addObject(brick82,615,80);\n Brick brick83 = new Brick();\n addObject(brick83,646,80);\n Brick brick84 = new Brick();\n addObject(brick84,675,80);\n Brick brick85 = new Brick();\n addObject(brick85,615,133);\n Brick brick86 = new Brick();\n addObject(brick86,647,133);\n Brick brick87 = new Brick();\n addObject(brick87,675,133);\n Brick brick88 = new Brick();\n addObject(brick88,615,185);\n brick88.setLocation(615,185);\n Brick brick89 = new Brick();\n addObject(brick89,647,185);\n Brick brick90 = new Brick();\n addObject(brick90,677,185);\n Brick brick91 = new Brick();\n addObject(brick91,615,241);\n Brick brick92 = new Brick();\n addObject(brick92,648,240);\n Brick brick93 = new Brick();\n addObject(brick93,677,239);\n brick93.setLocation(678,241);\n brick93.setLocation(679,243);\n brick93.setLocation(678,241);\n Brick brick94 = new Brick();\n addObject(brick94,614,291);\n Brick brick95 = new Brick();\n addObject(brick95,648,291);\n Brick brick96 = new Brick();\n addObject(brick96,678,291);\n Brick brick97 = new Brick();\n addObject(brick97,614,345);\n Brick brick98 = new Brick();\n addObject(brick98,647,345);\n Brick brick99 = new Brick();\n addObject(brick99,678,345);\n Brick brick100 = new Brick();\n addObject(brick100,615,398);\n Brick brick101 = new Brick();\n addObject(brick101,648,398);\n Brick brick102 = new Brick();\n addObject(brick102,679,398);\n Brick brick103 = new Brick();\n addObject(brick103,618,452);\n brick103.setLocation(618,458);\n Brick brick104 = new Brick();\n addObject(brick104,648,450);\n brick103.setLocation(610,446);\n Brick brick105 = new Brick();\n addObject(brick105,680,451);\n removeObject(brick103);\n Brick brick106 = new Brick();\n addObject(brick106,616,450);\n Brick brick107 = new Brick();\n addObject(brick107,617,504);\n Brick brick108 = new Brick();\n addObject(brick108,648,504);\n Brick brick109 = new Brick();\n addObject(brick109,680,504);\n Brick brick110 = new Brick();\n addObject(brick110,616,556);\n Brick brick111 = new Brick();\n addObject(brick111,649,556);\n Brick brick112 = new Brick();\n addObject(brick112,681,556);\n Brick brick113 = new Brick();\n addObject(brick113,616,610);\n Brick brick114 = new Brick();\n addObject(brick114,649,609);\n Brick brick115 = new Brick();\n addObject(brick115,680,610);\n brick115.setLocation(682,605);\n brick115.setLocation(680,608);\n portal3.setLocation(514,586);\n powerUp9.setLocation(513,525);\n powerUp8.setLocation(511,470);\n powerUp8.setLocation(512,470);\n powerUp7.setLocation(512,412);\n powerUp6.setLocation(512,356);\n powerUp5.setLocation(513,243);\n powerUp4.setLocation(513,187);\n powerUp31.setLocation(477,580);\n portal3.setLocation(512,584);\n brick57.setLocation(255,225);\n brick64.setLocation(305,476);\n portal.setLocation(509,301);\n removeObject(brick57);\n removeObject(brick64);\n removeObject(brick108);\n removeObject(brick86);\n Portal portal4 = new Portal();\n addObject(portal4,645,134);\n Portal portal5 = new Portal();\n addObject(portal5,649,501);\n Portal portal6 = new Portal();\n addObject(portal6,384,135);\n Portal portal7 = new Portal();\n addObject(portal7,384,504);\n portal3.setLocation(792,434);\n Portal2 portal22 = new Portal2();\n addObject(portal22,513,579);\n portal3.setLocation(514,411);\n Portal3 portal32 = new Portal3();\n addObject(portal32,509,190);\n portal3.setLocation(517,412);\n portal32.setLocation(519,192);\n portal.setLocation(518,297);\n portal5.setLocation(650,511);\n portal32.setLocation(510,198);\n portal.setLocation(511,300);\n portal3.setLocation(509,405);\n brick51.setLocation(283,220);\n brick100.setLocation(767,379);\n removeObject(brick51);\n removeObject(brick100);\n\n removeObject(portal32);\n removeObject(portal3);\n Portal3 portal33 = new Portal3();\n addObject(portal33,616,397);\n Portal3 portal34 = new Portal3();\n addObject(portal34,414,241);\n portal5.setLocation(644,503);\n portal7.setLocation(382,506);\n portal34.setLocation(417,245);\n portal6.setLocation(381,132);\n portal2.setLocation(511,34);\n portal.setLocation(516,300);\n }", "private void stop() {\n System.out.println(\"Stopping on \"+ _currentFloor.floorName() +\" floor \" );\n _currentFloor.clearDestinationRequest();\n _passengersOnboard = _passengersOnboard - _currentFloor.queuedPassengers();\n _currentFloor.clearQueuedPassengers();\n System.out.println(this);\n\n }", "private FlyWithWings(){\n\t\t\n\t}", "public void reestablecerFullStock() { \n bodega Bodega = new bodega();\n Bodega.setProductosList(this.bodegaDefault());\n }", "public void bulleBlanche() {\r\n\t\tIcon icon = null;\r\n\t\ticon = new ImageIcon(\"../_Images/Bouton/bulle_blanche.png\");\r\n\t\tif (icon != null)\r\n\t\t\tbulleAide.setIcon(icon);\r\n\t}", "@Override\n\tpublic void breath() {\n\n\t}", "@Override\r\n\tpublic void emettreOffre() {\n\t\t\r\n\t}", "public void onderbreek(){\n \n }", "public void brake() {\n\t\tsetPower(Motor.STOP);\r\n\t}", "private void hienThiCBBmaDV(){\n DichVuService dichVuService = new DichVuService();\n dichVuModels = dichVuService.layToanBoDichVu();\n \n cbbMaDV.removeAllItems();\n if (dichVuModels != null){\n for (DichVuModel dichVuModel : dichVuModels) {\n cbbMaDV.addItem(dichVuModel.getMaDV());\n }\n }else{\n return;\n }\n }", "@Override\n public void keyPressed(KeyEvent e) {\n if (gra.getWatekStatus() != null && gra.getPlansza().getBloczek() != null) {\n switch (e.getKeyCode()) {\n case KeyEvent.VK_LEFT:\n if (gra.getPlansza().czyMoznaPrzesunacBloczek(-1)) {\n gra.getPlansza().getBloczek().setJ(gra.getPlansza().getBloczek().getJ() - 1);\n }\n break;\n case KeyEvent.VK_RIGHT:\n if (gra.getPlansza().czyMoznaPrzesunacBloczek(1)) {\n gra.getPlansza().getBloczek().setJ(gra.getPlansza().getBloczek().getJ() + 1);\n }\n break;\n case KeyEvent.VK_DOWN:\n gra.getTimerGry().stop();\n if (gra.getPlansza().czyMoznaOpuscicBloczek()) {\n Bloczek bloczek = gra.getPlansza().getBloczek();\n bloczek.setI(bloczek.getI() + 1);\n }\n else {\n gra.getPlansza().przeniesBloczekDoPlanszy();\n gra.getPlansza().losujBloczek();\n }\n gra.getTimerGry().start();\n break;\n case KeyEvent.VK_SPACE:\n gra.getTimerGry().stop();\n while (gra.getPlansza().czyMoznaOpuscicBloczek()) {\n Bloczek bloczek = gra.getPlansza().getBloczek();\n bloczek.setI(bloczek.getI() + 1);\n }\n gra.getPlansza().przeniesBloczekDoPlanszy();\n gra.getPlansza().losujBloczek();\n gra.getTimerGry().restart();\n break;\n case KeyEvent.VK_UP:\n if (gra.getPlansza().czyMoznaObrocicKlocek()) {\n gra.getPlansza().obrocKlocek();\n }\n break;\n }\n }\n }", "void berechneUmfang() {\r\n\t\tfor (int i = 1; i < m_ANZAHL_POINTS; i++) {\r\n\t\t\tm_umfang += m_pointArray[i].distance(m_pointArray[i-1]);\t\t\r\n\t\t}\r\n\t}", "private void digcollect() {\r\n\t\tfor(int i=0; i<25;i++) {\r\n\t\t\tfor(int j=0; j<51; j++) {\r\n\t\t\t\tif(objects[i][j]!=null) {\r\n\t\t\t\tif(objects[i][j].getClass().toString().equals(new Ground().getClass().toString())) {\r\n\t\t\t\t\tif(objects[i][j].getX()==this.viewFrame.getRockford().getX() && objects[i][j].getY()==this.viewFrame.getRockford().getY()) {\r\n\t\t\t\t\t\tthis.tabGrounds.remove(objects[i][j]);\r\n\t\t\t\t\t\tobjects[i][j]= new DarkGround(j*32, i*32);\r\n\t\t\t \tthis.tabDarkGrounds.add((DarkGround) objects[i][j]);}\r\n\t\t\t\t}else if((objects[i][j].getClass().toString().equals(new Diamond().getClass().toString()))) {\r\n\t\t\t\t\tif(objects[i][j].getX()==this.viewFrame.getRockford().getX() && objects[i][j].getY()==this.viewFrame.getRockford().getY()) {\r\n\t\t\t\t\t\tthis.tabDiamonds.remove(objects[i][j]);\r\n\t\t\t\t\t\tobjects[i][j]= new DarkGround(j*32, i*32);\r\n\t\t\t\t\t\tthis.tabDarkGrounds.add((DarkGround) objects[i][j]);\r\n\t\t\t\t\t}}}}}}", "@Override\n\tpublic void onBlue() {\n\t\taddSequential(new DriveStraightByDistance(PEG_STRAIGHT - ROBOT_LENGTH / 2), 3.5);\n\t\t//TODO: might need to change to a little less\n\t\taddSequential(new TurnDegrees(90), 2.5);\n\t\taddSequential(new DriveStraightByDistance(EXTRA_DIS), 4);\n\t\taddSequential(new OpenPlacer2());\n\t\taddSequential(new ArcadeDriveByValues(-0.5, -0.5), 1);// TODO change commad\n\t\taddSequential(new ClosePlacer());\n\t\t\n\t}", "public void baocun() {\n\t\t\n\t}", "private void initBoutons() {\n bMonterDomaine.setText(null);\n bMonterCompte.setText(null);\n bDescendreDomaine.setText(null);\n bDescendreCompte.setText(null);\n bMonterDomaineMax.setText(null);\n bMonterCompteMax.setText(null);\n bDescendreDomaineMax.setText(null);\n bDescendreCompteMax.setText(null);\n bAjoutDomaine.setText(null);\n bAjoutCompte.setText(null);\n bModificationDomaine.setText(null);\n bModificationCompte.setText(null);\n bSuppressionDomaine.setText(null);\n bSuppressionCompte.setText(null);\n\n // Tootips\n bMonterDomaine.setTooltip(new Tooltip(\"Monter le domaine sélectionné d'une place\"));\n bMonterCompte.setTooltip(new Tooltip(\"Monter le compte sélectionné d'une place\"));\n bDescendreDomaine.setTooltip(new Tooltip(\"Descendre le domaine sélectionné d'une place\"));\n bDescendreCompte.setTooltip(new Tooltip(\"Descendre le compte sélectionné d'une place\"));\n bMonterDomaineMax.setTooltip(new Tooltip(\"Monter le domaine sélectionné jusqu'en première place\"));\n bMonterCompteMax.setTooltip(new Tooltip(\"Monter le compte sélectionné jusqu'en première place\"));\n bDescendreDomaineMax.setTooltip(new Tooltip(\"Descendre le domaine sélectionné jusqu'en dernière place\"));\n bDescendreCompteMax.setTooltip(new Tooltip(\"Descendre le compte sélectionné jusqu'en dernière place\"));\n bAjoutDomaine.setTooltip(new Tooltip(\"Ajouter un nouveau domaine\"));\n bAjoutCompte.setTooltip(new Tooltip(\"Ajouter un nouveau compte\"));\n bModificationDomaine.setTooltip(new Tooltip(\"Modifier le domaine sélectionné\"));\n bModificationCompte.setTooltip(new Tooltip(\"Modifier le compte sélectionné\"));\n bSuppressionDomaine.setTooltip(new Tooltip(\"Supprimer le domaine sélectionné\"));\n bSuppressionCompte.setTooltip(new Tooltip(\"Supprimer le compte sélectionné\"));\n\n // Gestion des activations de boutons\n bMonterDomaine.setDisable(true);\n bMonterCompte.setDisable(true);\n bDescendreDomaine.setDisable(true);\n bDescendreCompte.setDisable(true);\n bMonterDomaineMax.setDisable(true);\n bMonterCompteMax.setDisable(true);\n bDescendreDomaineMax.setDisable(true);\n bDescendreCompteMax.setDisable(true);\n bAjoutCompte.setDisable(true);\n bModificationDomaine.setDisable(true);\n bModificationCompte.setDisable(true);\n bSuppressionDomaine.setDisable(true);\n bSuppressionCompte.setDisable(true);\n\n // Setup les images\n bMonterDomaine.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_UP, 16, 16, true));\n bMonterCompte.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_UP, 16, 16, true));\n bDescendreDomaine.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOWN, 16, 16, true));\n bDescendreCompte.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOWN, 16, 16, true));\n bMonterDomaineMax.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOUBLE_UP, 16, 16, true));\n bMonterCompteMax.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOUBLE_UP, 16, 16, true));\n bDescendreDomaineMax.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOUBLE_DOWN, 16, 16, true));\n bDescendreCompteMax.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOUBLE_DOWN, 16, 16, true));\n bAjoutDomaine.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_ADD, 16, 16, true));\n bAjoutCompte.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_ADD, 16, 16, true));\n bModificationDomaine.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_INFO, 16, 16, true));\n bModificationCompte.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_INFO, 16, 16, true));\n bSuppressionDomaine.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_REMOVE, 16, 16, true));\n bSuppressionCompte.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_REMOVE, 16, 16, true));\n\n // Cas particulier: ecraserFiltre\n bEcraserFiltre.setText(null);\n bEcraserFiltre.setTooltip(new Tooltip(\"Retirer le filtre\"));\n bEcraserFiltre.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_REMOVE, 16, 16, true));\n }", "protected void timeIsOver(){\n //Gets all the boats that are not placed\n for(BoatDrawing myBoat : boatMap.values()){\n while(!myBoat.isPlaced()){\n //Sets a non placed boat with a random position with a random rotation\n activeBoat=myBoat;\n Random rn = new Random(); \n draw(activeBoat, rn.nextInt(NB_CASES_GRID), rn.nextInt(NB_CASES_GRID));\n if(rn.nextInt(RANDOM_ROTATION)==1){\n drawRotation(activeBoat);\n } \n if(positionCorrect(myBoat)){\n //If the position is corrrect, draws the boat\n this.placeBoat(myBoat);\n }\n }\n }\n onValidate();\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void billeObstacles() {\n\t\t// Décomposition de la bille\n\t\t// 2 3 4\n\t\t// 1 5\n\t\t// 8 7 6 \n\n\t\t// Parcours des briques pour vérifier les contacts\n\t\tListIterator <Obstacle> iter = niveauEnCours.grilleObstacles.listIterator(0);\n\t\tint contact = 0;\n\n\t\twhile (iter.hasNext() && contact == 0) {\n\t\t\tObstacle b = iter.next();\n\n\t\t\t// Étude des contacts avec les 8 points de la bille\n\t\t\t// Contact GaucheHaut de la bille\n\t\t\tdouble[] q = billeEnCours.GH();\n\t\t\tif (((q[1] <= b.bas) && (q[1] >= b.haut)) && ((q[0] <= b.droite) && (q[0] >= b.gauche))) {\n\t\t\t\tcontact = 2;\n\t\t\t}\n\n\t\t\t// Contact DroiteHaut de la bille\n\t\t\tif (contact == 0) {\n\t\t\t\tq = billeEnCours.DH();\n\t\t\t\tif (((q[1] <= b.bas) && (q[1] >= b.haut)) && ((q[0] <= b.droite) && (q[0] >= b.gauche))) {\n\t\t\t\t\tcontact = 4;\n\t\t\t\t}\n\t\t\t}\n\n\t\t // Contact GaucheBas de la bille\n\t\t\tif (contact == 0) {\n\t\t\t\tq = billeEnCours.GB();\n\t\t\t\tif (((q[1] <= b.bas) && (q[1] >= b.haut)) && ((q[0] <= b.droite) && (q[0] >= b.gauche))) {\n\t\t\t\t\tcontact = 8;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Contact DroiteBas de la bille\n\t\t\tif (contact == 0) {\n\t\t\t\tq = billeEnCours.DB();\n\t\t\t\tif (((q[1] <= b.bas) && (q[1] >= b.haut)) && ((q[0] <= b.droite) && (q[0] >= b.gauche))) {\n\t\t\t\t\tcontact = 6;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Contact haut de la bille\n\t\t\tint[] p = billeEnCours.MH();\n\t\t\tif (contact == 0) {\n\t\t\t\tif (p[1] <= b.bas && p[1] >= b.haut && p[0] <= b.droite && p[0] >= b.gauche) {\n\t\t\t\t\tcontact = 3;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Contact bas de la bille\n\t\t\tif (contact == 0) {\n\t\t\t\tp = billeEnCours.MB();\n\t\t\t\tif (((p[1] <= b.bas) && (p[1] >= b.haut)) && ((p[0] <= b.droite) && (p[0] >= b.gauche))) {\n\t\t\t\t\tcontact = 7;\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Contact droite de la bille\n\t\t\tif (contact == 0) {\n\t\t\t\tp = billeEnCours.DM();\n\t\t\t\tif (((p[1] <= b.bas) && (p[1] >= b.haut)) && ((p[0] <= b.droite) && (p[0] >= b.gauche))) {\n\t\t\t\t\tcontact = 5;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Contact gauche de la bille\n\t\t\tif (contact == 0) {\n\t\t\t\tp = billeEnCours.GM();\n\t\t\t\tif (((p[1] <= b.bas) && (p[1] >= b.haut)) && ((p[0] <= b.droite) && (p[0] >= b.gauche))) {\n\t\t\t\t\tcontact = 1;\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\t// Mise à jour de la vitesse \n\n\t\t\t// Rencontre d'un coin\n\t\t\tif ((((contact == 2) || (contact == 4))) || ((contact == 8) || (contact == 6))) {\n\t\t\t\tbilleEnCours.demiTour();\n\t\t\t}\n\n\t\t\t// Contact Classique\n\t\t\t// Gauche - Droite\n\t\t\tif ((contact == 1) || (contact == 5)) {\n\t\t\t\tint[] nv = {- billeEnCours.renvoyerVitesse()[0], billeEnCours.renvoyerVitesse()[1]};\n\t\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t\t}\n\n\t\t\t// Haut - Bas\n\t\t\tif ((contact == 3) || (contact == 7)) {\n\t\t\t\tint[] nv = {billeEnCours.renvoyerVitesse()[0], - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t\t}\t\t\t\n\t}", "@SuppressWarnings(\"deprecation\")\n\tpublic void gameTick() {\n\t\tBukkit.getScheduler().runTask(Plugin_MineTime.Plugin, new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t\tfor (Block b: beacons) {\n\t\t\t\t\tw.playEffect(b.getLocation(), Effect.ENDER_SIGNAL, 0);\n\t\t\t\t}\n\t\t\t\tfor (Block b: gold_blocks) {\n\t\t\t\t\tw.playEffect(b.getLocation().add(0, 2, 0), Effect.FLYING_GLYPH, 100);\n\t\t\t\t\tw.playEffect(b.getLocation().add(0, 2, 0), Effect.FLYING_GLYPH, 100);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsynchronized (timers) {\n\t\t\t\t\tfor (final byte data: timers.keySet()) {\n\t\t\t\t\t\tif (timers.get(data) > 0) {\n\t\t\t\t\t\t\ttimers.put(data, timers.get(data)-1);\n\t\t\t\t\t\t\tif (!extended.get(data)) {\n\t\t\t\t\t\t\t\textended.put(data, true);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tBukkit.getScheduler().runTaskAsynchronously(Plugin_MineTime.Plugin, new Runnable() {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\tDirection d = getDirection(glass_blocks.get(data));\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tboolean wand = false;\n\t\t\t\t\t\t\t\t\t\tLocation l = glass_blocks.get(data).getLocation().add(d.getVector());\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\twhile (!wand) {\n\t\t\t\t\t\t\t\t\t\t\tfinal Block change = w.getBlockAt(l);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tBukkit.getScheduler().runTask(Plugin_MineTime.Plugin, new Runnable() {\n\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\t\tchange.setType(Material.STAINED_GLASS);\n\t\t\t\t\t\t\t\t\t\t\t\t\tchange.setData(data);\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});\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tl = l.add(d.getVector());\n\t\t\t\t\t\t\t\t\t\t\tif (!(w.getBlockAt(l).getType() == Material.AIR || w.getBlockAt(l).getType() == Material.STAINED_GLASS)) {\n\t\t\t\t\t\t\t\t\t\t\t\twand = true;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tThread.sleep(50);\n\t\t\t\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\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}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\t\t\n\t\t\t\t\t\t\tif (extended.get(data)) {\n\t\t\t\t\t\t\t\textended.put(data, false);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tBukkit.getScheduler().runTaskAsynchronously(Plugin_MineTime.Plugin, new Runnable() {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\tDirection d = getDirection(glass_blocks.get(data));\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tboolean wand = false;\n\t\t\t\t\t\t\t\t\t\tLocation l = glass_blocks.get(data).getLocation().add(d.getVector());\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\twhile (!wand) {\n\t\t\t\t\t\t\t\t\t\t\tfinal Block change = w.getBlockAt(l);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tBukkit.getScheduler().runTask(Plugin_MineTime.Plugin, new Runnable() {\n\t\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\t\tchange.setType(Material.AIR);\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});\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tl = l.add(d.getVector());\n\t\t\t\t\t\t\t\t\t\t\tif (!(w.getBlockAt(l).getType() == Material.AIR || w.getBlockAt(l).getType() == Material.STAINED_GLASS)) {\n\t\t\t\t\t\t\t\t\t\t\t\twand = true;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\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}\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}\n\t\t});\n\t}", "public void test4(){\r\n\t\tZug zug0 = st.zugErstellen(0, 3, \"Zug 0\");\r\n\t\tst.blockFahren();\r\n\t\td.getSignal(21).setStellung(true);\r\n\t\td.getWeiche(17).setStellung(false);\r\n\t\tst.blockFahren();\r\n\t\td.getSignal(18).setStellung(true);\r\n\t\td.getWeiche(39).setStellung(false);\r\n\t\tst.blockFahren();\r\n\t\tst.fahren();\r\n\t}", "public void mo68530k() {\n super.mo68530k();\n SearchAdBottomBar searchAdBottomBar = this.f89222bp;\n if (searchAdBottomBar != null) {\n searchAdBottomBar.setVisibility(8);\n }\n Aweme aweme = this.f77546j;\n boolean d = C25352e.m83221d(aweme);\n C7573i.m23582a((Object) aweme, \"aweme\");\n m110451a(aweme, d);\n if (d) {\n m110459at();\n mo86986ar();\n }\n }", "public void billeMurs() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t// Décomposition de la bille\n\t\t// 2 3 4\n\t\t// 1 5\n\t\t// 8 7 6 \n\n\t\tint mur = 0;\n\n\t\t// Contact Gauche de la bille\n\t\tif (billeEnCours.GM()[0] <= 0) {\n\t\t\tmur = 1;\n\t\t}\n\n\t\t// Contact Droite de la bille\n\t\tif (mur == 0) {\n\t\t\tif (billeEnCours.DM()[0] >= limiteDroite) {\n\t\t\t\tmur = 5;\n\t\t\t}\n\t\t}\n\n\t\t// Contact Haut de la bille\n\t\tif (mur == 0) {\n\t\t\tif (billeEnCours.MH()[1] <= 0) {\n\t\t\t\tmur = 3;\n\t\t\t}\n\t\t}\n\n\t\t// Contact Bas de la bille\n\t\tif (mur == 0) {\n\t\t\tif (billeEnCours.MB()[1] >= limiteHaut) {\n\t\t\t\tmur = 7;\n\t\t\t\tperteDeVie();\n\t\t\t\tbilleEnCours.changeVitesse(vitBilleInitiale);\n\t\t\t\tbilleEnCours.changePosition(posBilleInitiale);\n\t\t\t\tbarreEnCours.changePosition(posBarreInitiale);\n\t\t\t}\n\t\t}\n\n\t\t// Mise à jour de la vitesse\n\n\t\tif ((mur == 1)||(mur == 5)) {\n\t\t\tint[] nv = {- billeEnCours.renvoyerVitesse()[0], billeEnCours.renvoyerVitesse()[1]};\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\n\n\t\tif (mur == 3) {\n\t\t\tint[] nv = {billeEnCours.renvoyerVitesse()[0], - billeEnCours.renvoyerVitesse()[1]};\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\n\n\t}", "double seBlesser();", "private void sterben()\n {\n lebendig = false;\n if(position != null) {\n feld.raeumen(position);\n position = null;\n feld = null;\n }\n }", "@Override\n public void hero_dies() {\n SoundPlayer.playHeroDies();\n this.stop();\n\n get_hero().setPosition(PLAYER_START_POSITION);\n start();\n\n // setting every flower to its original position\n //reason: hero can knock the flower out of the pipe when it hits it\n for (int i = 0; i < get_pipes().size(); i++) {\n if (get_pipes().get(i).with_flower()) {\n get_pipes().get(i).get_flower().setLinearVelocity(new Vec2(0f, 0f));\n get_pipes().get(i).get_flower().setPosition(get_pipes().get(i).get_flower().get_original_position());\n }\n }\n \n for (int i = 0; i < get_fire_rods().size(); i++) {\n get_fire_rods().get(i).reset_position();\n }\n get_hero().addLife(-1);\n if (get_hero().get_life() < 1){\n getGameController().gameOver();\n //get_sound_player().stop_level_two_music();\n }\n }", "public void B_Button(){\n\t\tif(_martMenuVisible && !buyMenu && !sellMenu){\n\t\t\tthis.Down();\n\t\t\tthis.Down();\n\t\t\tthis.A_Button();\n\t\t}\n\t\t\n\t\tif(this.facingNPC() && this._movingTrainers.get(this._interruptedTrainer).isInterrupted() && !_menuVisible && !_pcVisible && !_martMenuVisible && !textTimer.isRunning() && !_approachTimer.isRunning() && !escapeTimerEnter.isRunning() && !escapeTimerLeave.isRunning()){\n\t\t\tif((this.facingWater() && _gbs.getSurf()) || (!this.facingWater()) && !_gbs.getSurf()){\n\t\t\t\t//Interrupt them, hear what they have to say.\n\t\t\t\tTrainer moving = this._movingTrainers.get(this._interruptedTrainer);\n\t\t\t\t//SysOut.print(\"Trainer name: \" + moving.getName());\n\t\t\t\t\n\t\t\t\t//Specifically for Cut and Strength\n\t\t\t\tif(moving.getName() == \"CutBush\"||moving.getName() == \"CutCan\" || moving.getName()==\"Swiper\"){\n\t\t\t\t\t//SysOut.print(\"Chose not to use Cut!\");\n\t\t\t\t\t_NPCpage=0;\n\t\t\t\t\t_busy=false;\n\t\t\t\t\tcompletionCheck=false;\n\t\t\t\t\t_dialogueVisible=false;\n\t\t\t\t\tmoving.setInterrupted(false);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(moving.getName() == \"Strength\"){\n\t\t\t\t\t//SysOut.print(\"Chose not to use Strength!\");\n\t\t\t\t\t_NPCpage=0;\n\t\t\t\t\t_busy=false;\n\t\t\t\t\tcompletionCheck=false;\n\t\t\t\t\t_dialogueVisible=false;\n\t\t\t\t\tmoving.setInterrupted(false);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif(hmTextVisible && _canSurf==1 && !textTimer.isRunning() && !_menuVisible && !_pcVisible && !_martMenuVisible){\n\t\t\t_busy=false;\n\t\t\tcompletionCheck=false;\n\t\t\thmTextVisible=false;\n\t\t\t_canSurf=0;\n\t\t\tthis.repaint();\n\t\t}\n\t\t\n\t\tif(_menuVisible && !getCurrentMenu().isVisible())\n\t\t\tthis.Start();\n\t\t\n\t\tif(_gbs.map.isVisible()){\n\t\t\t_gbs.map.B_Button();\n\t\t\t_busy=false;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(getCurrentMenu().isVisible()){\n\t\t\tif(_gbs.pbs.isVisible() || _gbs.ii.isVisible() || _gbs.ev.isVisible() || _gbs.map.isVisible() || _martMenuVisible){\n\t\t\t\tif(_gbs.pbs.isVisible())\n\t\t\t\t\t_gbs.pbs.B_Button();\n\t\t\t\tif(_gbs.ii.isVisible())\n\t\t\t\t\t_gbs.ii.B_Button();\n\t\t\t\tif(_gbs.ev.isVisible())\n\t\t\t\t\t_gbs.ev.B_Button();\n\t\t\t\tif(_martMenuVisible){\n\t\t\t\t\tif(buyMenu || sellMenu){\n\t\t\t\t\t\t_gbs.mart.B_Button();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tgetCurrentMenu().setVisible(false);\n\t\t\t}\n\t\t\tthis.repaint();\n\t\t}\n\t\t\n\t\tif(_pcVisible && !_menuTextVisible[0] && !_menuTextVisible[1]){\n\t\t\t//SysOut.print(\"PC IS VISIBLE\");\n\t\t\tif(!_bannerVisible && !_myCoursesVisible){\n\t\t\t\t_busy = false;\n\t\t\t\tcompletionCheck = false;\n\t\t\t\t_pcCursor.y = 173;\n\t\t\t\tthis.A_Button(); //Effectively moves the cursor to Quit and hits A button. Do this method.\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//if(_bannerVisible){\n\t\t\t\t\t_bannerVisible = false;\n\t\t\t\t\t_gbs.bannerScreen._depTextVisible = false;\n\t\t\t\t\t_gbs.bannerScreen._oneLeft = false;\n\t\t\t\t\t_gbs.bannerScreen._cursor.y = _gbs.bannerScreen._1st;\n\t\t\t\t\t_menuTextVisible[0] = false;\n\t\t\t\t//}\n\t\t\t\t//if(_myCoursesVisible){\n\t\t\t\t\t_myCoursesVisible = false;\n\t\t\t\t\t_gbs.pcBoxScreen._cursor.y = 8;\n\t\t\t\t\t_menuTextVisible[1] = false;\n\t\t\t\t\t_gbs.pcBoxScreen.warningDisplayed = false;\n\t\t\t\t//}\n\t\t\t}\n\t\t\tthis.repaint();\n\t\t}\n\t\t\n\t}", "private void fahre(int aufzugNummer, int stockwerkAenderung){\n\t\tSystem.out.println();\r\n\t\t//Animation der Aufzüge\r\n\t\tTranslateTransition anpassung = new TranslateTransition(Duration.seconds(Aufzug.DAUER_PRO_STOCK*Math.abs(stockwerkAenderung)), aufzuge[aufzugNummer]);\r\n\t\tanpassung.setByY(stockwerkAenderung*stockwerkHohe);\r\n\t\tanpassung.play();\r\n\t}", "public void flightDisappear();", "public void drawBomber(Graphics g){\n\t\t\tif (exists){\n\t\t\t\tif (!startredtimer){ //if everything is normal\n\t\t\t\t\t\n\t\t\t\t\tg.setColor(Color.white);\n\t\t\t\t\tg.fillOval(x,y+10,100,30);\n\t\t\t\t\tg.fillOval(x+25,y,50,20);\n\t\t\t\t}\n\t\t\t\telse{ //if it needs to be in red because it has recently been hit by something\n\t\t\t\t\t\n\t\t\t\t\tg.setColor(Color.red);\n\t\t\t\t\tg.fillOval(x,y +10,100,30);\n\t\t\t\t\tg.fillOval(x+25,y,50,20);\n\t\t\t\t}\n\t\t\t\tg.setColor(Color.RED);\n\t\t\t\tg.drawRect(x,y-15,100,4);\n\t\t\t//\tg.drawRect(x,y-15,100,2);\n\t\t\t\tg.fillRect(x, y-15, health*25, 4); \n\t\t\t\t\n\t\t\t}\n\t\t\telse if(startboomtimer) { //if the plane has been destroyed and you want to draw it in red\n\t\t\t\tif (boomtimer<5) { g.drawImage(boom, x,y, 100, 100, null);}\n\t\t\t\telse if (boomtimer < 10) g.drawImage(boom, x + 38, y + 12, 50, 50, null);\n\t\t\t\telse if (boomtimer == 15) startboomtimer = false;\n\t\t\t\tboomtimer++;\n\t\t\t\t\n\t\t\t}\t\n\t\t\tif (dropping)b.drawBomb(g); //draws the bomb if the bomb is dropping only\n\n\t\t}", "public void kaufen(BesitzrechtFeld feld) {\n try {\n System.out.println(\"Dein aktueller Kontostand beträgt: \" + getKontostand());\n System.out.println(\"Die kosten für: \" + feld.getFeldname() + \" (\" + feld.getFarbe() + \") betragen :\" + feld.getGrundstueckswert());\n System.out.println(\"Möchtest du kaufen? (ja/nein)\");\n String eingabe = br.readLine();\n if (eingabe.trim().toLowerCase().equals(\"status\")) {\n eingabe = meinStatus();\n\n }\n if (eingabe.trim().toLowerCase().equals(\"ja\")) {\n if (einzahlen(feld.getGrundstueckswert())) {\n feld.setGekauft(true);\n feld.setSpieler(this);\n felderInBesitz.add(feld);\n switch (feld.getFarbe()) {\n case \"braun\":\n braun.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + braun.size() + \" von 2 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (braun.size() == 2) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(braun);\n break;\n }\n break;\n case \"hellblau\":\n hellblau.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + hellblau.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (hellblau.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(hellblau);\n break;\n }\n break;\n case \"pink\":\n pink.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + pink.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (pink.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(pink);\n break;\n }\n break;\n case \"orange\":\n orange.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + orange.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (orange.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(orange);\n break;\n }\n break;\n case \"rot\":\n rot.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + rot.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (rot.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(rot);\n break;\n }\n break;\n case \"gelb\":\n gelb.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + gelb.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (gelb.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(gelb);\n break;\n }\n break;\n case \"grün\":\n grün.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + grün.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (grün.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(grün);\n break;\n }\n break;\n case \"dunkelblau\":\n dunkelblau.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + dunkelblau.size() + \" von 2 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (dunkelblau.size() == 2) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(dunkelblau);\n break;\n }\n break;\n case \"bahnhof\":\n bahnhoefe.add((Bahnhof) feld);\n System.out.println(\"Du hast den Bahnhof: \" + feld.getFeldname() + \" gekauft!\");\n System.out.println(\"Du hast \" + bahnhoefe.size() + \" von 4 Bahnhöfen in deinem Besitz\");\n Bahnhof b = (Bahnhof) feld;\n b.mieteÄndernBahnhof(bahnhoefe);\n\n break;\n case \"werk\":\n werke.add(feld);\n System.out.println(\"Du hast das Werk: \" + feld.getFeldname() + \" gekauft!\");\n System.out.println(\"Du hast \" + werke.size() + \" von 2 Werken in deinem Besitz\");\n break;\n default:\n System.out.println(\"Feld konnte keiner Farbe/Kategorie zugeordnet werden\");\n\n }\n\n }\n System.out.println(\"Dein neuer Kontostand beträgt: \" + getKontostand());\n }\n } catch (IOException ex) {\n Logger.getLogger(Spieler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@SuppressWarnings(\"deprecation\")\n\t\t@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t\tlogger.info( \"BeaconOn\");\n\t\t\t\n\t\t\tbyte rollingProxyID[] = null;\n\t\t\t\n\t\t\tif ( Crypto.VERSION == 1) {\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tfinal long dayNbr = Crypto.getDayNumber( System.currentTimeMillis());\n\t\t\t\t\tfinal char timeInterval = Crypto.getTimeIntervalNumber( dayNbr);\n\t\t\t\t\t\n\t\t\t\t\tlogger.info( \"BeaconOn: dayNbr: \" + String.valueOf( dayNbr) + \", timeInterval: \" + String.valueOf( (int) timeInterval));\n\t\t\t\t\t\n\t\t\t\t\tfinal String tracingKey = Crypto.getTracingKeyProperty();\n\t\t\t\t\tbyte dailyTracingKey[] = Crypto.getDailyTracingKey( tracingKey, dayNbr);\n\t\t\t\t\trollingProxyID = Crypto.getRollingProxyID( dailyTracingKey, timeInterval);\t\t\n\t\t\t\t\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\trollingProxyID = Crypto.getRollingProximityID();\n\t\t\t\t} catch (InvalidKeyException | NoSuchAlgorithmException\n\t\t\t\t\t\t| NoSuchPaddingException | IllegalBlockSizeException\n\t\t\t\t\t\t| BadPaddingException | IOException e) {\n\t\t\t\t\tlogger.severe( e.getMessage());\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.beacon.setStartTime( System.currentTimeMillis());\n\t\t\t\n\t\t\tthis.turnBeaconOn( rollingProxyID);\t\t\n\t\t\tthis.beacon.setState( State.ADVERTISING);\n\t\t\t\n\t\t\t\n\t\t\t// schedule the task to turn beacon off\t\t\t\n\t\t\tBeaconOff beaconOffTask = new BeaconOff( this.beacon);\t\n\t\t\tthis.beacon.beaconTimer.schedule( beaconOffTask, Beacon.getBeaconAdvertisingDuration());\n\t\t\t\n\t\t}", "private void zeitGeber() {\n GregorianCalendar datum = new GregorianCalendar();\n stunden = datum.get(Calendar.HOUR_OF_DAY);\n minuten = datum.get(Calendar.MINUTE);\n sekunden = datum.get(Calendar.SECOND);\n inform();\n }", "public static void boarDay (Grid grid) {\n grid.weekday = dateArray[(int) (Math.random() * 7)];\n }", "@Override\n public void onPourMilkRaised() {\n }", "public void prepareBloque(){\n\t\tBloque b= game.getBloque();\n\t\timage = b.getImage();\n\t\ttemporal = image.getImage().getScaledInstance(b.getAncho(), b.getAlto(), Image.SCALE_SMOOTH);\n\t\tb.setImage(new ImageIcon(temporal));\n\t}", "public void billeBarre() { \t\t\t\t\t\t\t\t\t\t\t\n\t\tint contact = 0;\n\n\t\t// Décomposition de la bille\n\t\t// 2 3 4\n\t\t// 1 5\n\t\t// 8 7 6 \n\n\t\t// Étude des contacts avec les 8 points de la bille\n\t\t// Contact GaucheHaut de la bille\n\n\t\t// Contact haut de la bille\n\t\tint[] p = billeEnCours.MH();\n\t\tif (p[1] <= barreEnCours.bas() && p[1] >= barreEnCours.haut() && p[0] <= barreEnCours.droite() && p[0] >= barreEnCours.gauche()) {\n\t\t\tcontact = 3;\n\t\t}\n\n\t\t// Contact bas de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.MB();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 7;\n\t\t\t}\n\t\t}\n\n\t\t// Contact droite de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.DM();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 5;\n\t\t\t}\n\t\t}\n\n\t\t// Contact gauche de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.GM();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 1;\n\t\t\t}\n\t\t}\n\n\t\t// Contact GaucheHaut de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.GH();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 2;\n\t\t\t}\n\t\t}\n\n\t\t// Contact DroiteHaut de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.DH();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 4;\n\t\t\t}\n\t\t}\n\n\t\t// Contact GaucheBas de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.GB();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 8;\n\t\t\t}\n\t\t}\n\n\t\t// Contact DroiteBas de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.DB();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 6;\n\t\t\t}\n\t\t}\n\n\t\t// Mise à jour de la vitesse \n\n\t\t// Rencontre d'un coin\n\t\tif ((((contact == 2) || (contact == 4))) || ((contact == 8) || (contact == 6))) {\n\t\t\tbilleEnCours.demiTour();\n\t\t}\n\n\t\t// Contact Classique\n\t\t// Gauche - Droite\n\t\tif ((contact == 1) || (contact == 5)) {\n\t\t\tint[] nv = {- billeEnCours.renvoyerVitesse()[0], billeEnCours.renvoyerVitesse()[1]};\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\n\n\t\t// Haut - Bas : Déviation de la balle\n\t\tif ((contact == 3) || (contact == 7)) {\n\t\t\tint[] nv = new int[] {1,1};\n\t\t\tif (billeEnCours.renvoyerPosition()[0] >= barreEnCours.renvoyerPosition()[0] - barreEnCours.renvoyerLargeur()/4 && billeEnCours.renvoyerPosition()[0] <= barreEnCours.renvoyerPosition()[0] + barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0], - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tif (billeEnCours.renvoyerPosition()[0] <= barreEnCours.renvoyerPosition()[0] - barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0] - 1, - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tif (billeEnCours.renvoyerPosition()[0] >= barreEnCours.renvoyerPosition()[0] + barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0] + 1, - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\t\t\t\n\n\n\t}", "public void aapneBomberOgFlagg() {\n brettTapt = true;\n if (trykketPaa) {\n return;\n }\n // Viser alle bomber som ikke er flagget\n if (bombe && !flagget) {\n setText(\"x\");\n setBackground(new Background(new BackgroundFill(Color.GREY, CornerRadii.EMPTY, Insets.EMPTY)));\n }\n // Fargekoder om flaggingen var korrekt eller ikke\n if (flagget) {\n if (!bombe) {\n setBackground(new Background(new BackgroundFill(Color.PINK, CornerRadii.EMPTY, Insets.EMPTY)));\n } else {\n Color lysegroenn = Color.rgb(86, 130, 3, 0.3);\n setBackground(new Background(new BackgroundFill(lysegroenn, CornerRadii.EMPTY, Insets.EMPTY)));\n }\n }\n }", "void beat();", "private void reserveChambre() {\n\t\tfor(Chambre chambre : this.getChambres()) {\n\t\t\tif(chambre.equals(this.chambresVides().get(0))) {\n\t\t\t\tchambre.setReserve(true);\n\t\t\t\tSystem.out.println(\"\\n---------------------------------------\\nVous avez bien réservé cette chambre: |\");\n\t\t\t\tSystem.out.println(chambre.toString());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private void populateAltitudes()\r\n {\r\n for(int i=0; i<9; i++)\r\n {\r\n cboAltitude.addItem(aryAltitudes[i]);\r\n }\r\n }", "@Override\n public void onHeatWaterRaised() {\n heaterState = true;\n addCupButton.setVisible(false);\n takeCupButton.setVisible(false);\n }", "private void mo71772t() {\n this.f74253i.mo60157b(R.id.ebb, new VideoPostTimeWidget());\n }", "private static void processGroundCal()\n\t{\n\t\tif (testMotor != null) {\n\t\t\tSystem.out.println(\"Calibrating arm to floor position\");\n\t\t\ttestMotor.setPosition(SOFT_ENCODER_LIMIT_FLOOR);\n\t\t}\n\t}", "void Death(){\r\n if (vie==0){\r\n this.plateau[this.x][this.y]='0';\r\n }\r\n }", "public void dibujar() {\n if(fondoJuego1 != null) {\n fondoJuego1.dibujar(g);\n fondoJuego2.dibujar(g);\n if(fondoJuego2.getX()<=5) {\n juegoNuevo.dibujar(g);\n if(highLight.getPrioridad() == juegoNuevo.getPrioridad()) {\n tituloJuegoNuevo.dibujar(g);\n }\n continuar.dibujar(g);\n if(highLight.getPrioridad() == continuar.getPrioridad()) {\n tituloContinuar.dibujar(g);\n }\n regresar.dibujar(g);\n if(continuar.getY() <= 20) {\n if(highLight.getPrioridad() == regresar.getPrioridad()) {\n tituloRegresar.dibujar(g);\n }\n }\n highLight.dibujar(g);\n }\n }\n if(seleccion != null) {\n seleccion.g = this.g;\n seleccion.dibujar();\n }\n\tflushGraphics();\n }", "public void geldCheat() {\n if (geld + 1000000 < Long.MAX_VALUE) {\n geld = geld + 1000000;\n ticker.neueNachricht(\"Korruptionsverdacht bei Stadtwerken!\");\n }\n }", "public void Zabojstwa() {\n\t\tSystem.out.println(\"Zabojstwa\");\n\t\tfor(int i=0;i<Plansza.getNiebezpieczenstwoNaPlanszy().size();i++) {\n\t\t\tfor(GenerujNiebezpieczenstwo niebez : Plansza.getNiebezpieczenstwoNaPlanszy()) {\n\n\t\t\t\tif(niebez.getZabojca() instanceof DzikieZwierzeta) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getNiewolnikNaPLanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getNiewolnikNaPLanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getNiewolnikNaPLanszy().getUbrania() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getNiewolnikNaPLanszy().getJedzenie() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setUbrania(Plansza.getNiewolnikNaPLanszy().getUbrania() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setJedzenie(Plansza.getNiewolnikNaPLanszy().getJedzenie() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getNiewolnikNaPLanszy().setLicznikNiebezpieczenstw(Plansza.getNiewolnikNaPLanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\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}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Bandyci) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getRzemieslnikNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getRzemieslnikNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getRzemieslnikNaPlanszy().getMaterialy() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getRzemieslnikNaPlanszy().getNarzedzia() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tif(GeneratorRandom.RandomOd0(101) <= ZapisOdczyt.getRzemieslnicySzansa()) {\n\t\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setMaterialy(Plansza.getRzemieslnikNaPlanszy().getMaterialy() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setNarzedzia(Plansza.getRzemieslnikNaPlanszy().getNarzedzia() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getRzemieslnikNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getRzemieslnikNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\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}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(niebez.getZabojca() instanceof Zlodzieje) {\n\t\t\t\t\tif(niebez.getXniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getXpolozenie() && niebez.getXniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getXpolozenie()) {\n\t\t\t\t\t\tif(niebez.getYniebezpieczenstwo()-1 <= Plansza.getArystokrataNaPlanszy().getYpolozenie() && niebez.getYniebezpieczenstwo()+1 >= Plansza.getArystokrataNaPlanszy().getYpolozenie()) {\n\t\t\t\t\t\t\tif(Plansza.getArystokrataNaPlanszy().getTowary() >= niebez.getZabojca().ZmniejszIloscPopulacja() && Plansza.getArystokrataNaPlanszy().getZloto() >= niebez.getZabojca().ZmniejszIloscPopulacja()) {\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setTowary(Plansza.getArystokrataNaPlanszy().getTowary() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setZloto(Plansza.getArystokrataNaPlanszy().getZloto() - niebez.getZabojca().ZmniejszIloscPopulacja());\n\t\t\t\t\t\t\t\tPlansza.getArystokrataNaPlanszy().setLicznikNiebezpieczenstw(Plansza.getArystokrataNaPlanszy().getLicznikNiebezpieczenstw()+1);\n\t\t\t\t\t\t\t\tPlansza.getNiebezpieczenstwoNaPlanszy().remove(niebez);\n\t\t\t\t\t\t\t\ti--;\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}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tRobot.intakeSubsystem._getSpeed();\n\n\t\tRobot.driveSubsystem.operatorOverride();\n\t\tScheduler.getInstance().run();\n\n\t\tTargetRegion boilerTarget = Robot.navigator.getBoilerTarget();\n\t\tif (boilerTarget != null) {\n\t\t\tSmartDashboard.putNumber(\"Target Center X\", boilerTarget.m_centerTop);\n\t\t\tSmartDashboard.putNumber(\"Target Center Y\", boilerTarget.m_bounds.m_top);\n\t\t} else {\n\t\t\tSmartDashboard.putNumber(\"Target Center X\", -1);\n\t\t\tSmartDashboard.putNumber(\"Target Center Y\", -1);\n\t\t}\n\t}" ]
[ "0.6545447", "0.65380234", "0.6428275", "0.60749996", "0.5900806", "0.5900806", "0.5900429", "0.58999264", "0.58273774", "0.5814203", "0.5806509", "0.5784426", "0.57354236", "0.57300276", "0.56949687", "0.5671456", "0.5618838", "0.55585843", "0.55402446", "0.55300266", "0.5527917", "0.5524416", "0.5514782", "0.55114037", "0.5504031", "0.5503368", "0.5476789", "0.54658145", "0.5423753", "0.54221743", "0.5421061", "0.5411958", "0.54097074", "0.54084903", "0.5407549", "0.54024106", "0.53977704", "0.5393666", "0.5380253", "0.53774047", "0.5362551", "0.535941", "0.5354904", "0.5352511", "0.5348863", "0.533949", "0.533736", "0.53314257", "0.5329343", "0.53279436", "0.5327904", "0.5327366", "0.53238624", "0.5320759", "0.5320487", "0.53123397", "0.5301596", "0.5297469", "0.529388", "0.5290825", "0.5287722", "0.5286555", "0.5272856", "0.5270734", "0.5268115", "0.5264395", "0.5264193", "0.5262834", "0.5262504", "0.52586085", "0.52545536", "0.52487576", "0.52377", "0.5237493", "0.5230565", "0.5228278", "0.52271086", "0.5226927", "0.5226422", "0.5225587", "0.5224234", "0.5223978", "0.52229226", "0.52168614", "0.5216711", "0.5213936", "0.5208206", "0.52058965", "0.52056307", "0.5205161", "0.52049404", "0.51976067", "0.5197374", "0.5196579", "0.5190662", "0.5189988", "0.518273", "0.51823056", "0.51814127", "0.5179906", "0.51783687" ]
0.0
-1
Hotel mit der besten durchschnittlichen Bewertung finden
public Hotel bestHotel() { ArrayList<Hotel> hotels = hotelDAO.getHotelList(); Hotel bestHotel=hotels.get(0); for (int i=0; i<hotels.size();i++) { if(averageBewertungHotel(bestHotel)<averageBewertungHotel(hotels.get(i))) { bestHotel=hotels.get(i); } } return bestHotel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Hotel getHotel() {\n return hotel;\n }", "public Hotel getHotel() {\n return hotel;\n }", "@Override\n\tpublic HotelDetails findHotel(int id) {\n\t\treturn bookingDao.findHotel(id);\n\t}", "public Hotel getHotel(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.hotel.v1.Hotel res ){\n\t\tHotel hotel = new Hotel();\n\t\t\n\t\t//set the gdsHotelCode\n\t\thotel.setGdsHotelCode(res.getGdsHotelCode());\n\t\thotel.setVendorHotelCode(res.getVendorHotelCode());\n\t\thotel.setHotelCode( res.getHotelCode() );\n\t\thotel.setHotelChain( res.getHotelChain() );\n\t\thotel.setHotelName( res.getHotelName() );\n\t\thotel.setAppleRating( res.getAppleRating() );\n\t\thotel.setCurrency( res.getCurrency() );\n\t\thotel.setHotelCityCode( res.getHotelCityCode() );\n\t\thotel.setOriginLocation( res.getOriginLocation() );\n\t\thotel.setNoOfNights( res.getNoOfNights() ); \n\t\thotel.setHbsiPNR(res.getHbsiPNRNo());\n\t\thotel.setHBSI(res.isIsHBSi()!=null?res.isIsHBSi():false);\n\n\t\tif( res.getHotelId() != null ){\n\t\t\thotel.setHotelId( res.getHotelId().intValue() );\n\t\t}\n\t\tif( res.getNoOfRequestedRooms() != null ){\n\t\t\thotel.setNoOfRequestedRooms( res.getNoOfRequestedRooms().intValue() );\n\t\t}\n\t\tif( res.getNoOfRooms() != null ){\n\t\t\thotel.setNoOfRooms( res.getNoOfRooms().intValue() );\n\t\t}\n\t\tif( res.getMinRate() != null ){\n\t\t\thotel.setMinRate( res.getMinRate().doubleValue() );\n\t\t}\n\t\tif( res.isAppleSpecialsAndSavers() != null ){\n\t\t\thotel.setAppleSpecialsAndSavers( res.isAppleSpecialsAndSavers().booleanValue() );\n\t\t}\n\t\tif( res.isRiskHotel() != null ){\n\t\t\thotel.setRiskHotel( res.isRiskHotel().booleanValue() );\n\t\t}\n\t\tif( res.getCheckInDate() != null ){\n\t\t\thotel.setCheckInDate( this.getDate( res.getCheckInDate() ) );\n\t\t}\n\t\tif( res.getCheckOutDate() != null ){\n\t\t\thotel.setCheckOutDate( this.getDate( res.getCheckOutDate() ) );\n\t\t}\n\t\tif( res.getVendor() != null ){\n\t\t\thotel.setVendor( this.getVendor( res.getVendor()) );\n\t\t}\n\t\tif( res.getOccupancy() != null ){\n\t\t\thotel.setOccupancy( this.getOccupancy( res.getOccupancy() ) );\n\t\t}\n\t\tif( res.getResortArea() != null ){\n\t\t\thotel.setResortArea( this.getResortArea( res.getResortArea() ) );\n\t\t}\n\t\tif( res.getDisplayRoomCategory() != null ){\n\t\t\thotel.setDisplayRoomCategory( this.getRoomCategory( res.getDisplayRoomCategory() ) );\n\t\t}\n\t\tif( (res.getPreselectedRooms() != null) && (res.getPreselectedRooms().size() > 0) ){\n\t\t\tList<RoomPrice> preselectedRooms = new ArrayList<RoomPrice>();\n\t\t\tfor(int i=0; i < res.getPreselectedRooms().size(); i++){\n\t\t\t\tif( res.getPreselectedRooms().get(i) != null ){\n\t\t\t\t\tpreselectedRooms.add( this.getRoomPrice( res.getPreselectedRooms().get(i) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\thotel.setPreselectedRooms(preselectedRooms);\n\t\t}\n\t\tif( (res.getSelectedRooms() != null) && (res.getSelectedRooms().size() > 0) ){\n\t\t\tList<RoomPrice> selectedRooms = new ArrayList<RoomPrice>();\n\t\t\tfor(int i=0; i < res.getSelectedRooms().size(); i++){\n\t\t\t\tif( res.getSelectedRooms().get(i) != null ){\n\t\t\t\t\tselectedRooms.add( this.getRoomPrice( res.getSelectedRooms().get(i) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\thotel.setSelectedRooms(selectedRooms);\n\t\t}\n\t\tif( (res.getRequestedDatesForAvailabilities() != null) && (res.getRequestedDatesForAvailabilities().size() > 0) ){\n\t\t\tList<RequestedDatesForAvailability> requestedDatesForAvailabilities = \n\t\t\t\t\t\t\tnew ArrayList<RequestedDatesForAvailability>();\n\t\t\tfor(int i=0; i < res.getRequestedDatesForAvailabilities().size(); i++){\n\t\t\t\tif( res.getRequestedDatesForAvailabilities().get(i) != null ){\n\t\t\t\t\trequestedDatesForAvailabilities.add( this.getRequestedDatesForAvailability( res.getRequestedDatesForAvailabilities().get(i) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\thotel.setRequestedDatesForAvailabilities(requestedDatesForAvailabilities);\n\t\t}\n\t\tif( (res.getRoomCategories() != null) && (res.getRoomCategories().size() > 0) ){\n\t\t\tList<RoomCategory> roomCategories = new ArrayList<RoomCategory>();\n\t\t\tfor(int i=0; i < res.getRoomCategories().size(); i++){\n\t\t\t\tif( res.getRoomCategories().get(i) != null ){\n\t\t\t\t\troomCategories.add( this.getRoomCategory( res.getRoomCategories().get(i) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\thotel.setRoomCategories(roomCategories);\n\t\t}\n\t\tif( (res.getVendorServices() != null) && (res.getVendorServices().size() > 0) ){\n\t\t\tList<VendorService> vendorServices = new ArrayList<VendorService>();\n\t\t\tfor(int i=0; i < res.getVendorServices().size(); i++){\n\t\t\t\tif( res.getVendorServices().get(i) != null ){\n\t\t\t\t\tvendorServices.add( this.getVendorService( res.getVendorServices().get(i) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\thotel.setVendorServices(vendorServices);\n\t\t}\n\t\t\n\t\t//set cancellation policy\n\t\t\n\t\tif(res.getCancellationPolicy()!=null && res.getCancellationPolicy().size()>0)\n\t\t//if(res.getCancellationPolicy()==null)\n\t\t{\n\t\t\t\n\t\t\thotel.setCancellationPolicy(res.getCancellationPolicy());\n\t\t\n\t\t}\n\t\t\n\t\treturn hotel;\n\t}", "public List<Hotel> getAvailableHotels(){\n return databaseManager.findAvailableHotels();\n }", "public void setHotel(Hotel hotel) {\n this.hotel = hotel;\n }", "public void setHotel(Hotel hotel) {\n this.hotel = hotel;\n }", "public void acheter(){\n\t\t\n\t\t// Achete un billet si il reste des place\n\t\ttry {\n\t\t\tthis.maBilleterie.vendre();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tthis.status.put('B', System.currentTimeMillis());\n\t\tSystem.out.println(\"STATE B - Le festivalier \" + this.numFestivalier + \" a acheté sa place\");\n\t}", "@Override\n\tpublic List<Hotel> listar() {\n\t\treturn null;\n\t}", "public Bebawy_Hotels() \n\t{\n\t\tinitComponent();\n\t\tcreateEvent();\t\n\t}", "public void loadHotels();", "public int getHotelId() {\n return hotelId;\n }", "@Override\r\n\tpublic List<Hotel> getByHotelName(String Name) {\n\t\tList<Hotel> newHotelList = new ArrayList<>();\r\n\t\tfor(Hotel Hotel : showHotelList())\r\n\t\t{\r\n\t\t\tif(Hotel.getHotelName().equals(Name))\r\n\t\t\t\tnewHotelList.add(Hotel);\r\n\t\t}\r\n\t\treturn newHotelList;\r\n\t}", "public String getHotelName() {\n\t\treturn this.name;\n\t}", "public com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.hotel.v1.Hotel getHotelReq(Hotel hotel){com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.hotel.v1.Hotel hotelReq =\n\t\t\tnew com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.hotel.v1.Hotel();\n\t\t\n\t\t//set the hotelGdsCode\n\t\thotelReq.setGdsHotelCode(hotel.getGdsHotelCode());\n\t\thotelReq.setVendorHotelCode(hotel.getVendorHotelCode());\n\t\thotelReq.setHotelId( new Integer( hotel.getHotelId() ) );\n\t\thotelReq.setHotelCode( hotel.getHotelCode() );\n\t\thotelReq.setHotelChain( hotel.getHotelChain() );\n\t\thotelReq.setHotelName( hotel.getHotelName() );\n\t\thotelReq.setNoOfRooms( new Integer( hotel.getNoOfRooms() ) );\n\t\thotelReq.setAppleRating( hotel.getAppleRating() );\n\t\thotelReq.setHbsiPNRNo(hotel.getHbsiPNR());\n\t\thotelReq.setIsHBSi(hotel.isHBSI());\n\t\tif( hotel.getCheckInDate() != null ){\n\t\t\thotelReq.setCheckInDate( this.getDate( hotel.getCheckInDate() ) );\n\t\t}\n\t\tif( hotel.getCheckOutDate() != null ){\n\t\t\thotelReq.setCheckOutDate( this.getDate( hotel.getCheckOutDate() ) );\n\t\t}\n\t\thotelReq.setMinRate( new Double(hotel.getMinRate()) );\n\t\thotelReq.setCurrency( hotel.getCurrency() );\n\t\thotelReq.setHotelCityCode( hotel.getHotelCityCode() );\n\t\thotelReq.setOriginLocation( hotel.getOriginLocation() );\n\t\thotelReq.setRiskHotel( new Boolean( hotel.isRiskHotel() ) );\n\t\thotelReq.setNoOfNights( hotel.getNoOfNights() );\n\t\thotelReq.setAppleSpecialsAndSavers( new Boolean( hotel.isAppleSpecialsAndSavers() ) ); \n\t\thotelReq.setNoOfRequestedRooms( new Integer( hotel.getNoOfRequestedRooms() ) );\n\t\tif( hotel.getOccupancy() != null ){\n\t\t\thotelReq.setOccupancy( this.getOccupancyReq( hotel.getOccupancy() ) );\n\t\t}\n\t\tif( hotel.getResortArea() != null ){\n\t\t\thotelReq.setResortArea( this.getResortAreaReq( hotel.getResortArea() ) );\n\t\t}\n\t\tif( hotel.getDisplayRoomCategory() != null ){\n\t\t\thotelReq.setDisplayRoomCategory( this.getRoomCategoryReq( hotel.getDisplayRoomCategory() ));\n\t\t}\n\t\tif( (hotel.getSelectedRooms() != null) && (hotel.getSelectedRooms().size() > 0) ){\n\t\t\tfor(int i=0; i < hotel.getSelectedRooms().size(); i++){\n\t\t\t\thotelReq.getSelectedRooms().add( this.getRoomPriceReq( hotel.getSelectedRooms().get(i) ) );\n\t\t\t}\n\t\t}\n\t\tif( (hotel.getPreselectedRooms() != null) && (hotel.getPreselectedRooms().size() > 0) ){\n\t\t\tfor(int i=0; i < hotel.getPreselectedRooms().size(); i++){\n\t\t\t\thotelReq.getPreselectedRooms().add( this.getRoomPriceReq( hotel.getPreselectedRooms().get(i) ) );\n\t\t\t}\n\t\t}\n\t\tif( (hotel.getRoomCategories() != null) && (hotel.getRoomCategories().size() > 0) ){\n\t\t\tfor(int i=0; i < hotel.getRoomCategories().size(); i++){\n\t\t\t\thotelReq.getRoomCategories().add( this.getRoomCategoryReq( hotel.getRoomCategories().get(i) ) );\n\t\t\t}\n\t\t}\n\t\tif( (hotel.getVendorServices() != null) && (hotel.getVendorServices().size() > 0) ){\n\t\t\tfor(int i=0; i < hotel.getVendorServices().size(); i++){\n\t\t\t\thotelReq.getVendorServices().add( this.getVendorServiceReq( hotel.getVendorServices().get(i) ) );\n\t\t\t}\n\t\t}\n\t\tif( (hotel.getRequestedDatesForAvailabilities() != null) && (hotel.getRequestedDatesForAvailabilities().size() > 0) ){\n\t\t\tfor(int i=0; i < hotel.getRequestedDatesForAvailabilities().size(); i++){\n\t\t\t\thotelReq.getRequestedDatesForAvailabilities().add( \n\t\t\t\t\t\tthis.getRequestedDatesForAvailabilityReq( hotel.getRequestedDatesForAvailabilities().get(i) ) );\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (hotel.getVendor() != null) {\n//\t\t\thotelReq.getVendor().setCity(hotel.getVendor().getCity()); \n\t\t\thotelReq.setVendor(this.getVendorReq(hotel.getVendor()));\n\t\t}\n\t\t\n\t\t//setting search criteria\n\t\t\n\t\tif(hotel.getSearchCriteria()!=null)\n\t\t{\n\t\t\thotelReq.setSearchCriteria(this.getSearchCriteriaReq(hotel.getSearchCriteria()));\n\t\t}\n\t\t\n\t\t//Set the Cancellation Policy\n\t\t\n\t\tif(hotel.getCancellationPolicy()!=null)\n\t\t{\n\t\t\thotelReq.getCancellationPolicy().addAll(hotel.getCancellationPolicy());\n\t\t}\n\t\t\n\t\treturn hotelReq;\n\t}", "public Integer getIdHotel() {\r\n return idHotel;\r\n }", "private void setHotel(Hotel myHotel) {\n\t\tthis.myHotel = myHotel;\n\t}", "public interface HotelReservations {\n\n void lookupHotels();\n Hotel getSelectedHotel();\n \n void destroy();\n}", "public Integer getHotelId() {\r\n return hotelId;\r\n }", "private void getCityHotels(String tag) {\n\n HotelListingRequest hotelListingRequest = HotelListingRequest.getHotelListRequest();\n hotelListingRequest.setCurrencyCode(userDTO.getCurrency());\n hotelListingRequest.setLanguageCode(userDTO.getLanguage());\n hotelListingRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelListingRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelListingRequest.setPageNumber(1);\n hotelListingRequest.setPageSize(10);\n\n\n if (tag.equals(\"noRooms\")) {\n\n hotelListingRequest.setCityId(cityId); // for sold out hotels.. set popularity and descending order.\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n } else {\n\n hotelListingRequest.setCityId(Long.parseLong(destination.getKey())); // regular flow.. getting cityId and areaId from destination.\n\n UserDTO.getUserDTO().setCityName(destination.getDestinationName());\n // here check whether category is city search otherwise areaWise search\n if (destination.getCategory().equals(\"City\")) {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n\n } else {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"area\");\n hotelListingRequest.setSortByArea(0);\n }\n\n\n }\n\n\n ArrayList<OccupancyDto> occupancyDtoArrayList = new ArrayList<>();\n for (int i = 0; i < hotelAccommodationsArrayList.size(); i++) {\n kidsAgeArrayList = new ArrayList<>();\n if (hotelAccommodationsArrayList.get(i).getKids() > 0) {\n if (hotelAccommodationsArrayList.get(i).getKids() == 1) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n } else if (hotelAccommodationsArrayList.get(i).getKids() == 2) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid2Age());\n }\n }\n\n occupancyDtoArrayList.add(new OccupancyDto(hotelAccommodationsArrayList.get(i).getAdultsCount(), kidsAgeArrayList));\n hotelListingRequest.setOccupancy(occupancyDtoArrayList);\n }\n FiltersRequestDto filtersRequestDto = new FiltersRequestDto();\n filtersRequestDto.setAmenityIds(null);\n filtersRequestDto.setAreaIds(null);\n filtersRequestDto.setHotelId(null);\n filtersRequestDto.setCategoryIds(null);\n filtersRequestDto.setChainIds(null);\n filtersRequestDto.setMaxPrice(0.00);\n filtersRequestDto.setMinPrice(0.00);\n filtersRequestDto.setTripAdvisorRatings(null);\n filtersRequestDto.setStarRatings(null);\n hotelListingRequest.setFilters(filtersRequestDto);\n\n request = new Gson().toJson(hotelListingRequest);\n\n if (NetworkUtilities.isInternet(getActivity())) {\n\n showDialog();\n\n hotelSearchPresenter.getHotelListInfo(Constant.API_URL + Constant.HOTELLISTING, request, context);\n\n\n } else {\n\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }\n\n }", "@Override\r\n\tpublic Hotel getById(int Id) {\n\t\tfor(Hotel Hotel : showHotelList() ) {\r\n\t\t\tif(Hotel.getHotelId()==Id)\r\n\t\t\t\t\treturn Hotel;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Integer getHotelId() {\n return hotelId;\n }", "public Integer getHotelId() {\n return hotelId;\n }", "@Override\r\n\tpublic List<Hotel> getAllHotels() {\n\t\treturn showHotelList();\r\n\t}", "public String getHotelName() {\n\t\t\treturn Name;\r\n\t\t}", "public void setIdHotel(Integer idHotel) {\r\n this.idHotel = idHotel;\r\n }", "public void cacheResult(com.Hotel.model.Hotel hotel);", "public HotelReport(Hotel myHotel) {\n\t\t/*\n\t\t * Constructor method which sets the hotel to be reported\n\t\t */\n\t\tsetHotel(myHotel);\n\t}", "public int getHotelID() {\n return hotelID;\n }", "public HotelOffers() throws Exception{\r\n this.filter = new Filter();\r\n this.getData();\r\n }", "public HotelCard searchAdjacentHotels(Board board, Tuple res) {\n ArrayList<HotelCard> hotels = board.getHotels();\n ArrayList<HotelCard> adjacent_hotels = new ArrayList<>();\n ArrayList<Integer> ids = new ArrayList<>();\n int x1, x2, y1, y2, x3, y3, x4, y4;\n\n // Presentation of player's adjacent hotels\n System.out.println(ANSI() + \"Here are the available adjacent hotels:\" + ANSI_RESET);\n // right\n x1 = res.a;\n y1 = res.b + 1;\n // up \n x2 = res.a - 1;\n y2 = res.b;\n // left\n x3 = res.a;\n y3 = res.b - 1; \n // down\n x4 = res.a + 1;\n y4 = res.b;\n \n if (isNum(board.board[x1][y1]) != -1) {\n ids.add(isNum(board.board[x1][y1]));\n }\n if (isNum(board.board[x2][y2]) != -1) {\n ids.add(isNum(board.board[x2][y2]));\n }\n if (isNum(board.board[x3][y3]) != -1) {\n ids.add(isNum(board.board[x3][y3]));\n }\n if (isNum(board.board[x4][y4]) != -1) {\n ids.add(isNum(board.board[x4][y4]));\n }\n for (int id : ids) {\n for (HotelCard hc : hotels) {\n if (hc.getID() == id) {\n System.out.print(ANSI() + \"Hotel Name: \" + hc.getName() + ANSI_RESET);\n System.out.print(ANSI() + \", Hotel ID: \" + hc.getID() + ANSI_RESET); \n System.out.println(ANSI() + \", Hotel Ranking: \" + hc.getRank() + ANSI_RESET); \n adjacent_hotels.add(hc); \n }\n }\n }\n\n // Choose one adjacent hotel\n System.out.println(\"Please type the id of the hotel you want to buy\");\n boolean answer = false;\n while (answer == false) {\n Scanner s = new Scanner(System.in);\n String str = s.nextLine();\n int ID;\n try { \n ID = Integer.parseInt(str);\n // Search for the hotel card with user's given ID \n for (HotelCard hc : adjacent_hotels) \n if (hc.getID() == ID) return hc; \n System.out.println(ANSI() + \"Please type a valid Hotel ID from the above Hotels shown\" + ANSI_RESET);\n } catch (Exception e) {\n System.out.println(ANSI() + \"Please type a valid Hotel ID from the above Hotels shown\" + ANSI_RESET);\n }\n }\n return null;\n }", "public List<HotelBean> getHotelsDeals(HotelDealsFilter filter) throws BusinessException {\n\n\t\tOkHttpClient client = new OkHttpClient();\n\t\tHttpUrl.Builder urlBuilder = HttpUrl.parse(BASE_URL).newBuilder();\n\n\t\tfor (SearchableField field : filter.getSearchableFields()) {\n\t\t\tif (field==null || field.getValue()==null || StringUtils.isEmpty(field.getValue().trim())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\turlBuilder.addQueryParameter(field.getName(), field.getValue());\n\t\t}\n\n\t\tRequest request = new Request.Builder().url(urlBuilder.build().toString()).build();\n\t\tDeals deals = null;\n\t\ttry {\n\t\t\tResponse response = client.newCall(request).execute();\n\t\t\tString json = response.body().string();\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\tdeals = mapper.readValue(json, Deals.class);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new BusinessException(BusinessException.GENERAL_ERROR);\n\t\t}\n\t\tList<HotelBean> hotels = new ArrayList<>();\n\n\t\tfor (Hotel hotel : deals.getOffers().getHotel()) {\n\n\t\t\tHotelBean bean = new HotelBean();\n\t\t\tbean.setHotelName(hotel.getHotelInfo().getHotelName());\n\t\t\tbean.setHotelImageUrl(hotel.getHotelInfo().getHotelImageUrl());\n\t\t\tbean.setIndex(hotels.size());\n\t\t\tbean.setCity(hotel.getDestination().getCity());\n\t\t\tbean.setContry(hotel.getDestination().getLongName());\n\t\t\tbean.setRate(hotel.getHotelInfo().getHotelStarRating());\n\t\t\tbean.setStreetAddress(hotel.getHotelInfo().getHotelStreetAddress());\n\t\t\thotels.add(bean);\n\t\t}\n\t\treturn hotels;\n\t}", "java.lang.String getHotelName();", "public void setHotelId(Integer hotelId) {\r\n this.hotelId = hotelId;\r\n }", "public void setHotelId(Integer hotelId) {\n this.hotelId = hotelId;\n }", "public void setHotelId(Integer hotelId) {\n this.hotelId = hotelId;\n }", "@Override\n public HotelResponseDTO getHotelDetails(String hotelId) {\n Optional<Hotel> optionalHotel = hotelRepository.findByHotelId(hotelId);\n Hotel hotel = optionalHotel.orElseThrow(() -> {\n logger.error(\"Hotel information not found | hotelId:{}\", hotelId);\n return new BookingServiceException(\"Hotel information not found | hotelId:\" + hotelId);\n });\n if (hotel.isDeleted()) {\n logger.info(\"Hotel is inactive | hotelId:{}\", hotelId);\n throw new BookingServiceException(\"Hotel is inactive | hotelId:\" + hotelId);\n }\n logger.info(\"Fetched hotel information successfully | hotelId:{}\", hotelId);\n return makeHotelResponseDTO(hotel);\n }", "public void bookHotelScenarioTest() throws BookHotelFault, DatatypeConfigurationException, CancelHotelFault{\n // Booking of an hotel in Paris\n BookHotelInputType input = CreateBookHotelInputType(\"booking_Hotel_4\", \"Tick Joachim\", \"50408824\", 2, 11);\n boolean result = bookHotel(input);\n assertEquals(true, result);\n System.out.println(\"first test result: \" + result); \n \n if(result == true){\n // Trying to get the list of hotel from Paris and we should have only one hotel because the NY hotel is already booked\n GetHotelInputType getInput = CreateGetHotelInputType(\"Paris\");\n GetHotelsOutputType getOutput = getHotels(getInput);\n int expectedNbHotels = 1;\n int resultNbHotels = 0;\n if (getOutput.getHotelInformations().isEmpty() == false){\n resultNbHotels = getOutput.getHotelInformations().size();\n } \n cancelHotel(\"booking_Hotel_4\");\n assertEquals(expectedNbHotels, resultNbHotels); \n } \n else {\n assertEquals(true, false);\n }\n }", "@Override\n\tpublic List<AvailableHotelsResponse> getAvailableHotels(AvailableHotelRequest request)\n\t\t\tthrows CommunationFailedException, BusinessException {\n\n\t\tList<AvailableHotelsResponse> hotelResponses = new ArrayList<AvailableHotelsResponse>();\n\t\tif (request == null) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid request data\");\n\t\t}\n\t\ttry {\n\n\t\t\tGson gson = new Gson();\n\t\t\tString jsonRequestString = gson.toJson(request);\n\n\t\t\tlogger.info(\"AvailableHotelRequest Json String \" + jsonRequestString);\n\n\t\t\tApplicationUrlsHolder applicationUrlsHolder = new ApplicationUrlsHolder();\n\t\t\tMap<HotelProviders, String> providersUrls = applicationUrlsHolder.getHotelProvidersUrls();\n\n\t\t\tfor (Entry<HotelProviders, String> entry : providersUrls.entrySet()) {\n\t\t\t\tHotelProviders hotelProvider = entry.getKey();\n\t\t\t\tString providerUrl = entry.getValue();\n\n\t\t\t\tString jsonResponse = httpCaller.performHttpRequest(jsonRequestString, providerUrl);\n\n\t\t\t\thotelResponses.addAll(ProvidersHotelResponseMapper.mappingHotelResponse(hotelProvider, jsonResponse));\n\t\t\t}\n\n\t\t\tCollections.sort(hotelResponses);\n\n\t\t} catch (BusinessException e) {\n\n\t\t} catch (CommunationFailedException e) {\n\t\t\tthrow e;\n\t\t} catch (Exception e) {\n\n\t\t\tErrorObj errorObj = new ErrorObj();\n\t\t\terrorObj.setErrorCode(ApplicationConstants.UNKNOWN_EXCEPTION);\n\t\t\terrorObj.setErrorMessage(\"Sorry, Service currently unavailable\");\n\n\t\t\tthrow new BusinessException(errorObj);\n\t\t}\n\n\t\treturn hotelResponses;\n\t}", "public String getHotelcode() {\n return hotelcode;\n }", "public HotelCard searchHotel() {\n System.out.println(ANSI() + \"Here is your hotel card list:\" + ANSI_RESET);\n // Presentation of player's hotel card list\n for (HotelCard hc : hotel_list) {\n System.out.print(ANSI() + \"Hotel Name: \" + hc.getName() + ANSI_RESET);\n System.out.print(ANSI() + \", Hotel ID: \" + hc.getID() + ANSI_RESET);\n System.out.println(ANSI() + \", Hotel Ranking: \" + hc.getRank() + ANSI_RESET);\n }\n System.out.println(ANSI() + \"Please type the id of the hotel you choose\" + ANSI_RESET);\n boolean answer = false;\n while (answer == false) {\n Scanner s = new Scanner(System.in);\n String str = s.nextLine();\n int ID;\n try { \n ID = Integer.parseInt(str);\n // Search for the hotel card with user's given ID \n for (HotelCard hc : hotel_list) \n if (hc.getID() == ID) return hc; \n System.out.println(ANSI() + \"Please type a valid Hotel ID from the above Hotels shown\" + ANSI_RESET); \n } catch (Exception e) {\n System.out.println(ANSI() + \"Please type a valid ID\" + ANSI_RESET);\n }\n }\n // Junk \n return null;\n }", "public Hotel() throws FileNotFoundException\n {\n data_set = new ArrayList<Room>();\n get_rooms();\n }", "java.lang.String getHotelId();", "public Vector<HotelInfo> getAllHotels(){\n Session session=null;\n List result=null;\n Vector<HotelInfo> hotelInfos = null;\n try\n {\n session= HibernateUtil.getSessionFactory().getCurrentSession();\n session.beginTransaction();\n result=session.createQuery(\"from Hotel\").list();\n System.out.println(\"Successfully return hotels from database\");\n session.getTransaction().commit();\n hotelInfos= new Vector<HotelInfo>();\n for (int i = 0; i < result.size(); i++)\n {\n HotelInfo myHotel=new HotelInfo();\n myHotel.setHotelId(((Hotel)result.get(i)).getHotelId());\n myHotel.setName(((Hotel)result.get(i)).getName());\n myHotel.setUsername((((Hotel)result.get(i)).getUsername()));\n myHotel.setPassword((((Hotel)result.get(i)).getPassword()));\n myHotel.setIpaddress((((Hotel)result.get(i)).getIpaddress()));\n myHotel.setPort((((Hotel)result.get(i)).getPort()));\n myHotel.setContextpath((((Hotel)result.get(i)).getContextPath()));\n hotelInfos.add(myHotel);\n }\n }\n catch(Exception e)\n {\n System.out.println(e.getMessage());\n }\n return hotelInfos;\n }", "public int addToBasket (Hotel h, String n, int i, boolean b) {\n\t\tif(b==true) {\n\t\tBnBReservation r2b = new BnBReservation(name,h,n,i);\n\t\tcustomerResos.add(r2b);\n\t\t}else {\n\t\tHotelReservation r2 = new HotelReservation(name,h, n, i);\n\t\tcustomerResos.add(r2);\n\t\t}\n\t\treturn customerResos.getNumOfReservations();\n\t}", "public HotelDatabase() {\n\n this.HOTEL = new ArrayList<String>(Arrays.asList(\"HOTEL\", \"HOTEL_NAME\", \"BRANCH_ID\", \"PHONE\"));\n this.ROOM = new ArrayList<String>(Arrays.asList(\"ROOM\", \"HOTEL_NAME\", \"BRANCH_ID\", \"TYPE\", \"CAPACITY\"));\n this.CUSTOMER = new ArrayList<String>(Arrays.asList(\"CUSTOMER\", \"C_ID\", \"FIRST_NAME\", \"LAST_NAME\", \"AGE\", \"GENDER\"));\n this.RESERVATION = new ArrayList<String>(Arrays.asList(\"RESERVATION\", \"C_ID\", \"RES_NUM\", \"PARTY_SIZE\", \"COST\"));\n this.HOTEL_ADDRESS = new ArrayList<String>(Arrays.asList(\"HOTEL_ADDRESS\", \"HOTEL_NAME\", \"BRANCH_ID\", \"CITY\", \"STATE\", \"ZIP\"));\n this.HOTEL_ROOMS = new ArrayList<String>(Arrays.asList(\"HOTEL_ROOMS\", \"HOTEL_NAME\", \"BRANCH_ID\", \"TYPE\", \"QUANTITY\"));\n this.BOOKING = new ArrayList<String>(Arrays.asList(\"BOOKING\", \"C_ID\", \"RES_NUM\", \"CHECK_IN\", \"CHECK_OUT\", \"HOTEL_NAME\", \"BRANCH_ID\", \"TYPE\"));\n this.INFORMATION = new ArrayList<String>(Arrays.asList(\"INFORMATION\", \"HOTEL_NAME\", \"BRANCH_ID\", \"TYPE\", \"DATE_FROM\", \"DATE_TO\", \"NUM_AVAIL\", \"PRICE\"));\n this.NUMBERS = new ArrayList<String>(Arrays.asList(\"BRANCH_ID\", \"CAPACITY\", \"C_ID\", \"AGE\", \"RES_NUM\", \"PARTY_SIZE\", \"COST\", \"ZIP\", \"QUANTITY\", \"NUM_AVAILABLE\", \"PRICE\"));\n this.DATES = new ArrayList<String>(Arrays.asList(\"CHECK_IN\", \"CHECK_OUT\", \"DATE_FROM\", \"DATE_TO\"));\n\n // INDEXING: 0 1 2 3 4 5 6 7\n this.ALL = new ArrayList<ArrayList<String>>(Arrays.asList(HOTEL, ROOM, CUSTOMER, RESERVATION, HOTEL_ADDRESS, HOTEL_ROOMS, BOOKING, INFORMATION));\n }", "@Override\n public void like(int hotelId) {\n }", "public String getHotelAddress() {\n\t\treturn this.address;\n\t}", "@Override\r\n\tpublic List<Reservation> rechercherReservation(Voyage v, Client c) {\n\t\treturn null;\r\n\t}", "@Override\n public void deleteHotel(String hotelId) {\n Optional<Hotel> optionalHotel = hotelRepository.findByHotelId(hotelId);\n Hotel hotel = optionalHotel.orElseThrow(() -> {\n logger.error(\"Hotel information not found | hotelId:{}\", hotelId);\n return new BookingServiceException(\"Hotel information not found | hotelId:\" + hotelId);\n });\n if (hotel.isDeleted()) {\n logger.info(\"Hotel is inactive | hotelId:{}\", hotelId);\n throw new BookingServiceException(\"Hotel is inactive | hotelId:\" + hotelId);\n }\n hotel.setDeleted(true);\n Date lastModifiedDate = new Date();\n hotel.setLastModifiedDate(lastModifiedDate);\n hotelRepository.save(hotel);\n\n List<Room> rooms = hotel.getRooms();\n if (rooms != null && rooms.size() > 0) {\n List<Room> roomList = rooms.stream()\n .filter(room -> !room.isDeleted())\n .peek(room -> {\n room.setDeleted(true);\n room.setLastModifiedDate(lastModifiedDate);\n })\n .collect(Collectors.toList());\n roomRepository.saveAll(roomList);\n }\n logger.info(\"Deleted hotel information successfully | hotelId:{}\", hotelId);\n }", "Hotel saveHotel(Hotel hotel);", "public void cacheResult(java.util.List<com.Hotel.model.Hotel> hotels);", "public static ArrayList<BHP> getBHPsOnDemand(Resident resident, Date date) {\n\n List<Prescription> listPrescriptions = PrescriptionTools.getOnDemandPrescriptions(resident, date);\n LocalDate lDate = new LocalDate(date);\n long begin = System.currentTimeMillis();\n EntityManager em = OPDE.createEM();\n ArrayList<BHP> listBHP = new ArrayList<BHP>();\n\n try {\n Date now = new Date();\n\n String jpql = \" SELECT bhp \" +\n \" FROM BHP bhp \" +\n \" WHERE bhp.prescription = :prescription \" +\n \" AND bhp.soll >= :from AND bhp.soll <= :to AND bhp.dosis > 0 \";\n Query queryOnDemand = em.createQuery(jpql);\n\n for (Prescription prescription : listPrescriptions) {\n queryOnDemand.setParameter(\"prescription\", prescription);\n queryOnDemand.setParameter(\"from\", lDate.toDateTimeAtStartOfDay().toDate());\n queryOnDemand.setParameter(\"to\", SYSCalendar.eod(lDate).toDate());\n\n ArrayList<BHP> listBHP4ThisPrescription = new ArrayList<BHP>(queryOnDemand.getResultList());\n\n PrescriptionSchedule schedule = prescription.getPrescriptionSchedule().get(0);\n // On Demand prescriptions have exactly one schedule, hence the .get(0).\n // There may not be more than MaxAnzahl BHPs resulting from this prescription.\n if (listBHP4ThisPrescription.size() < schedule.getMaxAnzahl()) {\n // Still some BHPs to go ?\n for (int i = listBHP4ThisPrescription.size(); i < schedule.getMaxAnzahl(); i++) {\n BHP bhp = new BHP(schedule);\n bhp.setIst(now);\n bhp.setSoll(date);\n bhp.setSollZeit(SYSCalendar.BYTE_TIMEOFDAY);\n bhp.setDosis(schedule.getMaxEDosis());\n bhp.setState(BHPTools.STATE_OPEN);\n listBHP4ThisPrescription.add(bhp);\n }\n }\n listBHP.addAll(listBHP4ThisPrescription);\n // outcome BHPs\n// listBHP.addAll(new ArrayList<BHP>(queryOutcome.getResultList()));\n }\n\n Collections.sort(listBHP, getOnDemandComparator());\n } catch (Exception se) {\n OPDE.fatal(se);\n } finally {\n em.close();\n }\n SYSTools.showTimeDifference(begin);\n return listBHP;\n }", "@GetMapping(\"/{hotelId}\")\n public ResponseEntity<HotelResource> findHotelById(@PathVariable Long hotelId){\n //TODO Add HATEOAS links\n return new ResponseEntity<>(\n hotelService.findHotelById(hotelId), HttpStatus.OK\n );\n }", "public boolean checkHotelPresent(int hotelId);", "public void showHotels() {\n System.out.println(\"-----Hotels: ------\");\n hotelsService.getHotels().forEach(System.out::println);\n }", "public void addHotelName(String name) {\n\t\t\tName = name;\r\n\t\t}", "public void test2() {\n\t\t\n\t\tArrayList<Hotel> h = Test();\n\t\t\n\t\tDirector dir = new Director();\n\t\tDate dateIn = new Date(29,1,10);\n\t\tDate dateOut = new Date(30,1,10);\n\t\t\n\t\tArrayList<TypeOfRoom> t = h.get(0).getRoomTypes();\n\t\t\n\t\tdir.bookRoom(h.get(0), t.get(0), dateIn, dateOut);\n\t}", "public Holidays (){\n name= \"Exotic Beach Holiday of a Lifetime\";\n cost = 5000;\n location = \"Fesdu Island, Maldives\";\n type = \"beach\";\n }", "public HashMap<Integer, Hotel> addHotel(Hotel hotel) {\n hotels.put(hotel.getId(), hotel);\n return hotels;\n }", "public void gethotelinfo(){\n String query = \"SELECT Name , HID , Income \"\n + \"FROM Hotel \" ;\n \n String query2 = \"SELECT COUNT(*) AS rowcount\"\n + \" FROM Rooms \" ;\n try {\n PreparedStatement Query = conn.prepareStatement(query);\n PreparedStatement Query2 = conn.prepareStatement(query2);\n ResultSet rs = Query.executeQuery(query);\n ResultSet rs2 = Query2.executeQuery(query2);\n String name =\"\" ;\n int HotelID = 0 , NoOfrooms=0;\n double income = 0.0 ;\n while(rs.next() && rs2.next()){\n name = rs.getString(\"Name\");\n HotelID = rs.getInt(\"HID\");\n NoOfrooms = rs2.getInt(\"rowcount\");\n income = rs.getDouble(\"Income\");\n \n }\n hotel h = new hotel(name , HotelID , income , NoOfrooms);\n \n }\n catch (SQLException ex) {\n \n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n \n }", "java.lang.String getHotelAddress();", "public ArrayList<Hotel> getCustomerHotels(Integer customerId);", "public SingleRoom(Hotel hotel, String nomor_kamar)\n {\n // initialise instance variables\n super(hotel,nomor_kamar);\n\n }", "public void persistHotel(Hotel hotel) throws SQLException{\n\t\tPlace place = new Place(hotel.getName(), hotel.getCoord(), hotel.getDescriptionFile());\n\t\tpersistPlace(place);\n\t\tpersistPlace(hotel.getBeach());\n\t\t\n\t\tString readPlacePKQuery = \"SELECT id FROM Place WHERE name = ? AND descriptionFile = ?\";\n\t\tString readBeachPKQuery = \"SELECT id FROM Place WHERE name = ? AND descriptionFile = ?\";\n\t\tString insertHotelQuery = \"INSERT INTO Hotel (id_place, pricePerDay, id_beach) VALUES (?,?,?)\";\n\n\t\t//Then, get the primary key of the Place part and the beach\n\t\tPreparedStatement preparedStatement = conn.prepareStatement(readPlacePKQuery);\n\t\t\n\t\tpreparedStatement.setString(1, place.getName());\n\t\tpreparedStatement.setString(2, place.getDescriptionFile());\n\t\t\n\t\tResultSet result = preparedStatement.executeQuery();\n\t\tresult.next();\n\t\t\n\t\tint placePK = result.getInt(\"id\");\n\t\t\n\t\tpreparedStatement.close();\n\t\t\n\t\tpreparedStatement = conn.prepareStatement(readBeachPKQuery);\n\t\t\n\t\tpreparedStatement.setString(1, hotel.getBeach().getName());\n\t\tpreparedStatement.setString(2, hotel.getBeach().getDescriptionFile());\n\t\t\n\t\tresult = preparedStatement.executeQuery();\n\t\tresult.next();\n\t\t\n\t\tint beachPK = result.getInt(\"id\");\n\n\t\t//Set place in the database\n\t\tpreparedStatement = conn.prepareStatement(insertHotelQuery);\n\t\t\n\t\tpreparedStatement.setInt(1, placePK);\n\t\tpreparedStatement.setFloat(2, hotel.getPricePerDay());\n\t\tpreparedStatement.setInt(3, beachPK);\n\n\t\tpreparedStatement.executeUpdate();\n\n\t\tpreparedStatement.close();\n\t\t\n\t}", "private void initHotelsAndReservations() \n\t{\n\t\ttry\n\t\t{\n\t\t\tFileInputStream fis = new FileInputStream(\"Hotels.txt\");\n\t\t\tScanner fs = new Scanner(fis);\n\t\t\twhile(fs.hasNextLine())\n\t\t\t{\n\t\t\t\tScanner is = new Scanner(fs.nextLine());\n\t\t\t\tis.useDelimiter(\",\");\n\t\t\t\tint id = Integer.parseInt(is.next().trim());\n\t\t\t\tString name = is.next().trim();\n\t\t\t\tString address = is.next().trim();\n\t\t\t\tString city = is.next().trim();\n\t\t\t\tString state = is.next().trim();\n\t\t\t\tint pricePerNight = Integer.parseInt(is.next().trim());\n\t\t\t\th = new Hotel (id, name, address, city, state, pricePerNight);\n\t\t\t\thotels.add(h);\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t * The catch block checks to make sure that the file is found\n\t\t */\n\t\tcatch( FileNotFoundException fnfe)\n\t\t{\n\t\t\tSystem.err.println(\"File not found!\");\n\t\t}\n\n\t\t/**\n\t\t * Binding hotel reservations to model/JComboBox\n\t\t */\n\t\tfor(Hotel h1: hotels)\n\t\t\thotelsModel.addElement(h1);\n\t\t/**\n\t\t * Binding hotel reservations to model/JList\n\t\t */\n\t\tHotel selectedHotel = (Hotel)cbHotelsOptions.getSelectedItem();\n\t\tfor(Reservation r1 : selectedHotel.getReservations())\n\t\t\treservationsModel.addElement(r1);\n\t}", "public interface HotelPersistence extends BasePersistence<Hotel> {\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. Always use {@link HotelUtil} to access the hotel persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.\n\t */\n\n\t/**\n\t* Returns all the hotels where uuid = &#63;.\n\t*\n\t* @param uuid the uuid\n\t* @return the matching hotels\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic java.util.List<com.Hotel.model.Hotel> findByUuid(\n\t\tjava.lang.String uuid)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns a range of all the hotels where uuid = &#63;.\n\t*\n\t* <p>\n\t* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.Hotel.model.impl.HotelModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.\n\t* </p>\n\t*\n\t* @param uuid the uuid\n\t* @param start the lower bound of the range of hotels\n\t* @param end the upper bound of the range of hotels (not inclusive)\n\t* @return the range of matching hotels\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic java.util.List<com.Hotel.model.Hotel> findByUuid(\n\t\tjava.lang.String uuid, int start, int end)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns an ordered range of all the hotels where uuid = &#63;.\n\t*\n\t* <p>\n\t* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.Hotel.model.impl.HotelModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.\n\t* </p>\n\t*\n\t* @param uuid the uuid\n\t* @param start the lower bound of the range of hotels\n\t* @param end the upper bound of the range of hotels (not inclusive)\n\t* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)\n\t* @return the ordered range of matching hotels\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic java.util.List<com.Hotel.model.Hotel> findByUuid(\n\t\tjava.lang.String uuid, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the first hotel in the ordered set where uuid = &#63;.\n\t*\n\t* @param uuid the uuid\n\t* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n\t* @return the first matching hotel\n\t* @throws com.Hotel.NoSuchHotelException if a matching hotel could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic com.Hotel.model.Hotel findByUuid_First(java.lang.String uuid,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.Hotel.NoSuchHotelException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the first hotel in the ordered set where uuid = &#63;.\n\t*\n\t* @param uuid the uuid\n\t* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n\t* @return the first matching hotel, or <code>null</code> if a matching hotel could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic com.Hotel.model.Hotel fetchByUuid_First(java.lang.String uuid,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the last hotel in the ordered set where uuid = &#63;.\n\t*\n\t* @param uuid the uuid\n\t* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n\t* @return the last matching hotel\n\t* @throws com.Hotel.NoSuchHotelException if a matching hotel could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic com.Hotel.model.Hotel findByUuid_Last(java.lang.String uuid,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.Hotel.NoSuchHotelException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the last hotel in the ordered set where uuid = &#63;.\n\t*\n\t* @param uuid the uuid\n\t* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n\t* @return the last matching hotel, or <code>null</code> if a matching hotel could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic com.Hotel.model.Hotel fetchByUuid_Last(java.lang.String uuid,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the hotels before and after the current hotel in the ordered set where uuid = &#63;.\n\t*\n\t* @param hotelId the primary key of the current hotel\n\t* @param uuid the uuid\n\t* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n\t* @return the previous, current, and next hotel\n\t* @throws com.Hotel.NoSuchHotelException if a hotel with the primary key could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic com.Hotel.model.Hotel[] findByUuid_PrevAndNext(long hotelId,\n\t\tjava.lang.String uuid,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.Hotel.NoSuchHotelException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Removes all the hotels where uuid = &#63; from the database.\n\t*\n\t* @param uuid the uuid\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic void removeByUuid(java.lang.String uuid)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the number of hotels where uuid = &#63;.\n\t*\n\t* @param uuid the uuid\n\t* @return the number of matching hotels\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic int countByUuid(java.lang.String uuid)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns all the hotels where name = &#63;.\n\t*\n\t* @param name the name\n\t* @return the matching hotels\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic java.util.List<com.Hotel.model.Hotel> findByname(\n\t\tjava.lang.String name)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns a range of all the hotels where name = &#63;.\n\t*\n\t* <p>\n\t* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.Hotel.model.impl.HotelModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.\n\t* </p>\n\t*\n\t* @param name the name\n\t* @param start the lower bound of the range of hotels\n\t* @param end the upper bound of the range of hotels (not inclusive)\n\t* @return the range of matching hotels\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic java.util.List<com.Hotel.model.Hotel> findByname(\n\t\tjava.lang.String name, int start, int end)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns an ordered range of all the hotels where name = &#63;.\n\t*\n\t* <p>\n\t* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.Hotel.model.impl.HotelModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.\n\t* </p>\n\t*\n\t* @param name the name\n\t* @param start the lower bound of the range of hotels\n\t* @param end the upper bound of the range of hotels (not inclusive)\n\t* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)\n\t* @return the ordered range of matching hotels\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic java.util.List<com.Hotel.model.Hotel> findByname(\n\t\tjava.lang.String name, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the first hotel in the ordered set where name = &#63;.\n\t*\n\t* @param name the name\n\t* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n\t* @return the first matching hotel\n\t* @throws com.Hotel.NoSuchHotelException if a matching hotel could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic com.Hotel.model.Hotel findByname_First(java.lang.String name,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.Hotel.NoSuchHotelException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the first hotel in the ordered set where name = &#63;.\n\t*\n\t* @param name the name\n\t* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n\t* @return the first matching hotel, or <code>null</code> if a matching hotel could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic com.Hotel.model.Hotel fetchByname_First(java.lang.String name,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the last hotel in the ordered set where name = &#63;.\n\t*\n\t* @param name the name\n\t* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n\t* @return the last matching hotel\n\t* @throws com.Hotel.NoSuchHotelException if a matching hotel could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic com.Hotel.model.Hotel findByname_Last(java.lang.String name,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.Hotel.NoSuchHotelException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the last hotel in the ordered set where name = &#63;.\n\t*\n\t* @param name the name\n\t* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n\t* @return the last matching hotel, or <code>null</code> if a matching hotel could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic com.Hotel.model.Hotel fetchByname_Last(java.lang.String name,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the hotels before and after the current hotel in the ordered set where name = &#63;.\n\t*\n\t* @param hotelId the primary key of the current hotel\n\t* @param name the name\n\t* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)\n\t* @return the previous, current, and next hotel\n\t* @throws com.Hotel.NoSuchHotelException if a hotel with the primary key could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic com.Hotel.model.Hotel[] findByname_PrevAndNext(long hotelId,\n\t\tjava.lang.String name,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.Hotel.NoSuchHotelException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Removes all the hotels where name = &#63; from the database.\n\t*\n\t* @param name the name\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic void removeByname(java.lang.String name)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the number of hotels where name = &#63;.\n\t*\n\t* @param name the name\n\t* @return the number of matching hotels\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic int countByname(java.lang.String name)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Caches the hotel in the entity cache if it is enabled.\n\t*\n\t* @param hotel the hotel\n\t*/\n\tpublic void cacheResult(com.Hotel.model.Hotel hotel);\n\n\t/**\n\t* Caches the hotels in the entity cache if it is enabled.\n\t*\n\t* @param hotels the hotels\n\t*/\n\tpublic void cacheResult(java.util.List<com.Hotel.model.Hotel> hotels);\n\n\t/**\n\t* Creates a new hotel with the primary key. Does not add the hotel to the database.\n\t*\n\t* @param hotelId the primary key for the new hotel\n\t* @return the new hotel\n\t*/\n\tpublic com.Hotel.model.Hotel create(long hotelId);\n\n\t/**\n\t* Removes the hotel with the primary key from the database. Also notifies the appropriate model listeners.\n\t*\n\t* @param hotelId the primary key of the hotel\n\t* @return the hotel that was removed\n\t* @throws com.Hotel.NoSuchHotelException if a hotel with the primary key could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic com.Hotel.model.Hotel remove(long hotelId)\n\t\tthrows com.Hotel.NoSuchHotelException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException;\n\n\tpublic com.Hotel.model.Hotel updateImpl(com.Hotel.model.Hotel hotel)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the hotel with the primary key or throws a {@link com.Hotel.NoSuchHotelException} if it could not be found.\n\t*\n\t* @param hotelId the primary key of the hotel\n\t* @return the hotel\n\t* @throws com.Hotel.NoSuchHotelException if a hotel with the primary key could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic com.Hotel.model.Hotel findByPrimaryKey(long hotelId)\n\t\tthrows com.Hotel.NoSuchHotelException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the hotel with the primary key or returns <code>null</code> if it could not be found.\n\t*\n\t* @param hotelId the primary key of the hotel\n\t* @return the hotel, or <code>null</code> if a hotel with the primary key could not be found\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic com.Hotel.model.Hotel fetchByPrimaryKey(long hotelId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns all the hotels.\n\t*\n\t* @return the hotels\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic java.util.List<com.Hotel.model.Hotel> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns a range of all the hotels.\n\t*\n\t* <p>\n\t* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.Hotel.model.impl.HotelModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.\n\t* </p>\n\t*\n\t* @param start the lower bound of the range of hotels\n\t* @param end the upper bound of the range of hotels (not inclusive)\n\t* @return the range of hotels\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic java.util.List<com.Hotel.model.Hotel> findAll(int start, int end)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns an ordered range of all the hotels.\n\t*\n\t* <p>\n\t* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.Hotel.model.impl.HotelModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.\n\t* </p>\n\t*\n\t* @param start the lower bound of the range of hotels\n\t* @param end the upper bound of the range of hotels (not inclusive)\n\t* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)\n\t* @return the ordered range of hotels\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic java.util.List<com.Hotel.model.Hotel> findAll(int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Removes all the hotels from the database.\n\t*\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n\n\t/**\n\t* Returns the number of hotels.\n\t*\n\t* @return the number of hotels\n\t* @throws SystemException if a system exception occurred\n\t*/\n\tpublic int countAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;\n}", "public Hotel(ArrayList<Room> rooms) {\n this.rooms = rooms;\n }", "public void ReservaEfetivadas () {\n Date hoje = new Date ();\n for (int z = 0; z < vecReserva.size(); z++) {\n if (((int) ((((entReserva)vecReserva.elementAt(z)).getDatain().getTime() - (hoje.getTime())) / 86400000L)) == 0){// Reserva será relaizada hj\n if (((entReserva)vecReserva.elementAt(z)).getPagamento().getSituacao() == 0){//Cliente fez todo o pagamento e o quarto será\n vecReservaEfetivadas.add(vecReserva.elementAt(z));\n }\n \n }\n }\n }", "public List<Boek> alleBoekenLijst () {\n return em.createNamedQuery(\"BoekEntity.zoekAllen\", Boek.class).getResultList();\n //return em.createQuery(\"SELECT b FROM Book b\", Book.class).getResultList();\n }", "@Test\r\n\tpublic void makeBooking2() {\r\n\t\tnewFlightSearch.setDepartureTime(new Date(2016-1900,7+1,15));\r\n\t\tnewFlightSearch.setDepartureLoc(\"Akureyri\");\r\n\t\tnewFlightSearch.setArrivalLoc(\"Reykjavík\");\r\n\t\tnewFlightSearch.setPriceRange(new int[]{10000,20000});\r\n\t\tnewFlightSearch.setReturnTrip(false);\r\n\t\tnewFlightSearch.setNumSeats(1);\r\n\t\tnewFlightSearch.setSeatClass(\"Economy\");\r\n\t\tList<FlightAbstract> flightResults = SearchEngine.flightSearch(newFlightSearch);\r\n\r\n\t\tFlightBooking testBooking = new FlightBooking(flightResults.get(0),1,\"Gunnar\");\r\n\t\tmockFlightBook bookedFlight = testBooking.bookFlight();\r\n\t\t\r\n\t\tassertEquals(bookedFlight.flight.getCustomer(), \"Gunnar\");\r\n\t}", "public static void main(String[] args) {\n\t\tHotel h = new Hotel();\r\n\t\tRoom r = new Room();\r\n\t\tBed b = new Bed();\r\n\t\tint totalbeds = 0;\r\n\t\tList<Room> rooms = new ArrayList<Room>();\r\n\t\tList<Bed> beds = new ArrayList<Bed>();\r\n\t\tList<Integer> bedsperroom = new ArrayList<Integer>();\r\n\t\tHotelReport report = new HotelReport();\r\n\t\t//these are the values that can change, here they are hard coded in\r\n\t\tString hotelname=\"test\";\r\n\t\tint noofrooms=5;\r\n\t\t\r\n\t\th.setName(hotelname);\r\n\t\t//iterates through the number of rooms\r\n\t\tfor (int i = 1; i <= noofrooms; i++) {\r\n\t\t\t// here if the room is vacent or not has to be set for all rooms simultaneously,\r\n\t\t\t//in reality the user would be able to input different values for each room\r\n\t\t\tint roomfree=0;\r\n\t\t\th.gotVacencies(roomfree);\r\n\t\t\t// a new room object is created and added to the array list of rooms\r\n\t\t\tRoom e = new Room();\r\n\t\t\trooms.add(e);\r\n\t\t\t//again the number of beds in each room has to be the same for each room, \r\n\t\t\t//but in the proper system the user can input different numbers\r\n\t\t\tint bedsinroom=5;\r\n\t\t\t//checks to make sure the beds in room is a vaid number\r\n\t\t\tr.checkBeds(bedsinroom);\r\n\t\t\t//adds the beds in one room to an array list\r\n\t\t\tbedsperroom.add(bedsinroom);\r\n\t\t\t//iterates through the number of beds\r\n\t\t\tfor (int i2 = 1; i2 <= bedsinroom; i2++) {\r\n\t\t\t\t//a new bed object is created and added to the list of beds\r\n\t\t\t\tBed c = new Bed();\r\n\t\t\t\tbeds.add(c);\r\n\t\t\t\t//a bed type is set. as before, in the real system a different type \r\n\t\t\t\t//can be set for each bed\r\n\t\t\t\tint x = 1;\r\n\t\t\t\tc.setBedtype(x);\r\n\t\t\t\t//a running total of the max occupency is taken\r\n\t\t\t\ttotalbeds = totalbeds + x;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//the two arrays are set\r\n\t\th.setRooms(rooms);\r\n\t\tr.setBeds(beds);\r\n\t\t//all values are fed into the report class, which outputs a formatted report\r\n\t\treport.Report(h, bedsperroom, r, totalbeds);\t\r\n\t\t\t\t\r\n\t\t\r\n\r\n}", "public Reservering zoekReservering(int id){\r\n\t\tReservering terug = null;\r\n\t\ttry{\r\n\t\t\tString sql = \"SELECT * FROM Reservering WHERE reserveringid=\" + id;\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(sql);\r\n\t\t\twhile (rs.next()) { // rs.next() geeft false als er niets meer is\u000b \r\n\t\t\t\tint dP = rs.getInt(\"deParkeerplek\");\r\n\t\t\t\tjava.sql.Date bdat = rs.getDate(\"beginDat\");\r\n\t\t\t\tjava.util.Date bD = new Date(bdat.getTime());\r\n\t\t\t\tjava.sql.Date edat = rs.getDate(\"eindDat\");\r\n\t\t\t\tjava.util.Date eD = new Date(edat.getTime());\r\n\t\t\t\tint autoid = rs.getInt(\"autoid\");\r\n\t\t\t\tString isGeweest = rs.getString(\"isGeweest\");\r\n\t\t\t\tConnectDBAuto autoconn = new ConnectDBAuto(con);\r\n\t\t\t\tAuto a = autoconn.zoekAuto(autoid);\r\n\t\t\t\tterug = new Reservering(a, id, bD, eD, dP);\r\n\t\t\t\tif(isGeweest.equals(\"t\")){\r\n\t\t\t\t\tterug.setGeweest(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t}\r\n\t\tcatch(Exception ex){\r\n\t\t\tSystem.out.println(\"Probleem bij reservering zoeken \" + ex);\r\n\t\t}\r\n\t\treturn terug;\t\t\r\n\t}", "public Hotel(String name, String address) {\n\t\tthis.name = name;\n\t\tthis.address = address;\n\t}", "public List<MLocoBoggie> getboogie() {\n\t\t\t\tList<MLocoBoggie> getboogies = new ArrayList<>();\n\t\t\t\tobj_boogierepo.findAll()\n\t\t\t\t.forEach(getboogies::add);\n\n\t\t\t\treturn getboogies;\t\t\t\t\n\t\t\t\t\t\t}", "private void getHotelRoomRateCall(long cityId) {\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-DD\", Locale.ENGLISH);\n engCheckInDate = dateFormat.format(checkInDate);\n engCheckOutDate = dateFormat.format(checkOutDate);\n\n ArrayList<OccupancyDto> occupancyDtoArrayList = new ArrayList<>();\n HotelRoomRateRequest hotelRoomRateRequest = new HotelRoomRateRequest();\n hotelRoomRateRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelRoomRateRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelRoomRateRequest.setLanguageCode(UserDTO.getUserDTO().getLanguage());\n hotelRoomRateRequest.setCityId(cityId);\n hotelRoomRateRequest.setHotelId(Long.parseLong(destination.getKey()));\n hotelRoomRateRequest.setCurrencyCode(UserDTO.getUserDTO().getCurrency());\n\n for (int i = 0; i < hotelAccommodationsArrayList.size(); i++) {\n\n if (kidsAgeArrayList == null)\n kidsAgeArrayList = new ArrayList<>();\n kidsAgeArrayList.clear();\n\n if (hotelAccommodationsArrayList.get(i).getKids() > 0) {\n if (hotelAccommodationsArrayList.get(i).getKids() == 1) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n } else if (hotelAccommodationsArrayList.get(i).getKids() == 2) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid2Age());\n }\n }\n\n occupancyDtoArrayList.add(new OccupancyDto(hotelAccommodationsArrayList.get(i).getAdultsCount(), kidsAgeArrayList));\n hotelRoomRateRequest.setOccupancy(occupancyDtoArrayList);\n }\n\n HotelListingRequest hotelListingRequest = HotelListingRequest.getHotelListRequest();\n hotelListingRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelListingRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelListingRequest.setLanguageCode(UserDTO.getUserDTO().getLanguage());\n hotelListingRequest.setCityId(cityId);\n hotelListingRequest.setCurrencyCode(UserDTO.getUserDTO().getCurrency());\n hotelListingRequest.setOccupancy(hotelRoomRateRequest.getOccupancy());\n\n String request = new Gson().toJson(hotelRoomRateRequest);\n\n if (NetworkUtilities.isInternet(getActivity())) {\n hotelSearchPresenter.getHotelRoomRate(Constant.API_URL + Constant.HOTELSRATES, request, getActivity());\n\n } else\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }", "public void gestionDeHotel() {\n\t\t\n\t\t/**\n\t\t * A method for the gestion of the hotel\n\t\t */\n\t\t\t\tthis.afficheMenu();\n\t\t\t\tScanner scan = new Scanner(System.in);\n\t\t\t\tString choix = \"\";\n\t\t\t\t\n\t\t\t\twhile( this.isOuvert() ) {\n\t\t\t\t\tString rep = this.optionsManager();\n\t\t\t\t\t\n\t\t\t\t\tif(rep.equals(\"o\")) {\n\t\t\t\t\t\tthis.afficheMenu();\n\t\t\t\t\t}else if(rep.equals(\"q\")) {\n\t\t\t\t\t\tSystem.out.println(\"Au revoire !\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if (rep.equals(\"x\")) {\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tSystem.err.print(\"----------------------------\\nVotre sasie est incorrect! |\\n----------------------------\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse if (rep.equals(\"f\")){\n\t\t\t\t\t\tString verif = this.reserver();\n\t\t\t\t\t\tif(verif.equals(\"q\")) {\n\t\t\t\t\t\t\tSystem.out.println(\"Au revoire !\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tSystem.err.print(verif);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}else if (rep.equals(\"g\")){\n\t\t\t\t\t\tthis.liberateAroom();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.print(rep);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\twhile(!this.isOuvert()) {\n\t\t\t\t\tString etatDeHotel = this.isOuvert()? \"L'Hôtel est ouvert ! \" : \"L'Hôtel n'est pas ouvert ! \";\t\t\n\t\t\t\t\tString rep = this.optionsManager();\n\t\t\t\t\tif(rep.equals(\"o\")) {\n\t\t\t\t\t\tthis.afficheMenu();\n\t\t\t\t\t}else if(rep.equals(\"\\n\"+etatDeHotel+\"\\n\")){\n\t\t\t\t\t\tSystem.out.print(rep);\n\t\t\t\t\t}\n\t\t\t\t\telse if(rep.equals(\"q\")) {\n\t\t\t\t\t\tSystem.out.println(\"Au revoire !\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else if (rep.equals(\"\\n-La commande Q ou Quit sont pour arrêtrer le programe.\\n-Il faut choisir un letter pour les options.\\n-La commande O pour afficher toutes les options possibles! \")) {\n\t\t\t\t\t\tSystem.out.println(rep);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.err.print(\"\\n-------------------------------------------------------------------------\\nDésolé, l'hôtel est fermé!\\nVous pouvez utiliser que l'option |o| et |Q ou Quit|\\n-------------------------------------------------------------------------\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\t}", "public java.lang.String getHotelName() {\n java.lang.Object ref = hotelName_;\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 hotelName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public Booking getBooking(String name) {\n\t\t\tint i = 0;\r\n\t\t\tBooking buffer;\r\n\t\t\t\r\n\t\t\twhile(i < Bookings.size()) {\r\n\t\t\t\tbuffer = Bookings.get(i);\r\n\t\t\t\tString Name = buffer.getBooker();\r\n\t\t\t\tif (name.contentEquals(Name)) {\r\n\t\t\t\t\treturn buffer;\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}", "public com.google.protobuf.ByteString\n getHotelIdBytes() {\n java.lang.Object ref = hotelId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n hotelId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@POST\r\n\t\t@Path(\"/hotel\")\r\n\t\t@Consumes({ MediaType.APPLICATION_JSON })\r\n\t\t@Produces({ MediaType.APPLICATION_JSON })\r\n\t\tpublic Response postHotel(Hotel hotel) {\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tAlohaTransactionManager tm = new AlohaTransactionManager(getPath());\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\ttm.addHotel(hotel);\r\n\t\t\t\t\r\n\t\t\t\treturn Response.status(200).entity(hotel).build();\r\n\t\t\t} \r\n\t\t\tcatch (Exception e) {\r\n\t\t\t\treturn Response.status(500).entity(doErrorMessage(e)).build();\r\n\t\t\t}\r\n\t\t}", "public com.google.protobuf.ByteString\n getHotelAddressBytes() {\n java.lang.Object ref = hotelAddress_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n hotelAddress_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void searchAvailability(Connection connection, String hotel_name, int branchID, java.sql.Date from, java.sql.Date to) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT type, num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND date_from >= Convert(datetime, ?) AND date_to <= Convert(datetime, ?)\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n pStmt.setDate(3, from);\n pStmt.setDate(4, to);\n\n try {\n\n System.out.printf(\" Availiabilities at %S, branch ID (%d): \\n\", getHotelName(), getBranchID());\n System.out.printf(\" Date Listing: \" + String.valueOf(from) + \" TO \" + String.valueOf(to) + \"\\n\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2) + \" \" + rs.getInt(3));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "@Override\r\n\tpublic void benachrichtigeBeobachter() {\n\t\tfor (int i = 0; i < beobachter.size(); i++) {\r\n\t\t\tBeobachter b = (Beobachter)beobachter.get(i);\r\n\t\t\tb.aktualisieren(temperatur, feuchtigkeit, luftdruck);\r\n\t\t}\r\n\t}", "public void setClHotelId(String clHotelId) {\r\n this.clHotelId = clHotelId;\r\n }", "public com.google.protobuf.ByteString\n getHotelNameBytes() {\n java.lang.Object ref = hotelName_;\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 hotelName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "java.lang.String getHotelText();", "public com.google.protobuf.ByteString\n getHotelNameBytes() {\n java.lang.Object ref = hotelName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n hotelName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getHotelAddressBytes() {\n java.lang.Object ref = hotelAddress_;\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 hotelAddress_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getHotelName() {\n java.lang.Object ref = hotelName_;\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 hotelName_ = s;\n return s;\n }\n }", "public void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tObject HotelID = cbHotelsOptions.getSelectedItem();\n\t\t\t\t\tHotel hotel;\n\t\t\t\t\thotel = (Hotel) HotelID;\n\t\t\t\t\tlong id = hotel.getUniqueId();\n\t\t\t\t\t//\tSystem.out.println(id);\n\t\t\t\t\tString inmonth = txtInMonth.getText();\n\t\t\t\t\tint inMonth = Integer.valueOf(inmonth);\n\t\t\t\t\tString inday = txtInDay.getText();\n\t\t\t\t\tint inDay = Integer.parseInt(inday);\n\t\t\t\t\tString outmonth = txtOutMonth.getText();\n\t\t\t\t\tint outMonth = Integer.valueOf(outmonth);\n\t\t\t\t\tString outday = txtOutDay.getText();\n\t\t\t\t\tint OutDay = Integer.parseInt(outday);\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(\"Reservation.txt\", true);\n\t\t\t\t\tPrintWriter pw = new PrintWriter(fos);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * i then check the canBook method and according to the canBook method \n\t\t\t\t\t * i check if they can book, and if yes i add the reservation\n\t\t\t\t\t * otherwise it prints so the user may enter different values\n\t\t\t\t\t */\n\t\t\t\t\t{\n\t\t\t\t\t\tif(h.canBook(new Reservation(id,inMonth, inDay, OutDay)) == true) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treservation.add(new Reservation (id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\tr = new Reservation (id,inMonth, inDay, OutDay);\n\t\t\t\t\t\t\th.addResIfCanBook(new Reservation(id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\treservationsModel.addElement(r);\n\t\t\t\t\t\t\tpw.println( id + \" - \" + inMonth + \"-\"+ inDay+ \" - \" + outMonth + \"-\" + OutDay);\n\t\t\t\t\t\t\tpw.close();\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\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\tJOptionPane.showMessageDialog(null, \"These dates are already reserved\"\n\t\t\t\t\t\t\t\t\t+ \"\\nPlease try again!\");\t\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\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 * Then the catch Block checks for file not found exception\n\t\t\t\t */\n\t\t\t\tcatch (FileNotFoundException fnfe) \n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"File not found.\");\n\t\t\t\t}\n\t\t\t}", "public com.google.protobuf.ByteString\n getHotelIdBytes() {\n java.lang.Object ref = hotelId_;\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 hotelId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private void hotelDetailCall(long cityId) {\n\n if (NetworkUtilities.isInternet(getActivity())) {\n String request = new Gson().toJson(new HotelDetailRequest(cityId, Long.parseLong(destination.getKey()), UserDTO.getUserDTO().getLanguage()));\n hotelSearchPresenter.getHotelDetails(Constant.API_URL + Constant.HOTELDETAIL, request, getActivity());\n\n } else {\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }\n }", "public void prendreBus(){\n\t\t\n\t\t// On vérifie qu'il possède bien un ticket\n\t\tif (this.status.containsKey('B')) {\n\t\t\t\n\t\t\tthis.siteDepart.monterBus(this);\n\t\t\tthis.status.put('C', System.currentTimeMillis());\n\t\t\tSystem.out.println(\"STATE C - Le festivalier \" + this.numFestivalier + \" monte dans le bus n°\" + this.monBus.getIdBus() + \" (\" + this.monBus.getPlacesDispo() + \" / \" + this.monBus.getPlacesMaxi() + \").\");\n\t\t}\n\t}", "public java.util.List<com.Hotel.model.Hotel> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public HashMap<Integer, Hotel> updateHotel(Hotel oldHotel, Hotel newHotel) {\n deleteHotel(oldHotel);\n addHotel(newHotel);\n return hotels;\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_search_hotel);\n\n loadDaftarHotel();\n\n /* binding = DataBindingUtil.setContentView(this,R.layout.activity_search_hotel);\n listHotel = new DaftarHotel().HOTEL;\n adapter = new RvHotelAdapter(this,listHotel);\n binding.setHotelAdapter(adapter);\n gantiPencarian = findViewById(R.id.gntPencarian);\n gantiPencarian.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n startActivity(new Intent(SearchHotel.this, Navbar.class));\n }\n });*/\n\n//\n// ArrayList<Hotel> hotel = new ArrayList<>();\n// hotel.add(new Hotel(R.drawable.horison, \"Horison\", \"Jogja\", \"Rp450.000\"));\n//\n// recyclerView = findViewById(R.id.rvHotel);\n// recyclerView.setHasFixedSize(true);\n// manager = new LinearLayoutManager(this);\n// adapter = new RvHotelAdapter(hotel);\n//\n// recyclerView.setLayoutManager(manager);\n// recyclerView.setAdapter(adapter);\n }", "@Test\r\n\tpublic void makeBooking1() {\r\n\t\tnewFlightSearch.setDepartureTime(new Date(2016-1900,7+1,15));\r\n\t\tnewFlightSearch.setDepartureLoc(\"Akureyri\");\r\n\t\tnewFlightSearch.setArrivalLoc(\"Reykjavík\");\r\n\t\tnewFlightSearch.setPriceRange(new int[]{10000,20000});\r\n\t\tnewFlightSearch.setReturnTrip(false);\r\n\t\tnewFlightSearch.setNumSeats(1);\r\n\t\tnewFlightSearch.setSeatClass(\"Economy\");\r\n\t\tList<FlightAbstract> flightResults = SearchEngine.flightSearch(newFlightSearch);\r\n\r\n\t\tFlightBooking testBooking = new FlightBooking(flightResults.get(0),1,\"Gunnar\");\r\n\t\tmockFlightBook bookedFlight = testBooking.bookFlight();\r\n\t\t\r\n\t\tassertThat(bookedFlight.flight, instanceOf(FlightBooking.class));\r\n\t}", "List<Reservation> trouverlisteDeReservationAyantUneDateDenvoieDeMail();", "public void kaufen(BesitzrechtFeld feld) {\n try {\n System.out.println(\"Dein aktueller Kontostand beträgt: \" + getKontostand());\n System.out.println(\"Die kosten für: \" + feld.getFeldname() + \" (\" + feld.getFarbe() + \") betragen :\" + feld.getGrundstueckswert());\n System.out.println(\"Möchtest du kaufen? (ja/nein)\");\n String eingabe = br.readLine();\n if (eingabe.trim().toLowerCase().equals(\"status\")) {\n eingabe = meinStatus();\n\n }\n if (eingabe.trim().toLowerCase().equals(\"ja\")) {\n if (einzahlen(feld.getGrundstueckswert())) {\n feld.setGekauft(true);\n feld.setSpieler(this);\n felderInBesitz.add(feld);\n switch (feld.getFarbe()) {\n case \"braun\":\n braun.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + braun.size() + \" von 2 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (braun.size() == 2) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(braun);\n break;\n }\n break;\n case \"hellblau\":\n hellblau.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + hellblau.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (hellblau.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(hellblau);\n break;\n }\n break;\n case \"pink\":\n pink.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + pink.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (pink.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(pink);\n break;\n }\n break;\n case \"orange\":\n orange.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + orange.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (orange.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(orange);\n break;\n }\n break;\n case \"rot\":\n rot.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + rot.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (rot.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(rot);\n break;\n }\n break;\n case \"gelb\":\n gelb.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + gelb.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (gelb.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(gelb);\n break;\n }\n break;\n case \"grün\":\n grün.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + grün.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (grün.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(grün);\n break;\n }\n break;\n case \"dunkelblau\":\n dunkelblau.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + dunkelblau.size() + \" von 2 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (dunkelblau.size() == 2) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(dunkelblau);\n break;\n }\n break;\n case \"bahnhof\":\n bahnhoefe.add((Bahnhof) feld);\n System.out.println(\"Du hast den Bahnhof: \" + feld.getFeldname() + \" gekauft!\");\n System.out.println(\"Du hast \" + bahnhoefe.size() + \" von 4 Bahnhöfen in deinem Besitz\");\n Bahnhof b = (Bahnhof) feld;\n b.mieteÄndernBahnhof(bahnhoefe);\n\n break;\n case \"werk\":\n werke.add(feld);\n System.out.println(\"Du hast das Werk: \" + feld.getFeldname() + \" gekauft!\");\n System.out.println(\"Du hast \" + werke.size() + \" von 2 Werken in deinem Besitz\");\n break;\n default:\n System.out.println(\"Feld konnte keiner Farbe/Kategorie zugeordnet werden\");\n\n }\n\n }\n System.out.println(\"Dein neuer Kontostand beträgt: \" + getKontostand());\n }\n } catch (IOException ex) {\n Logger.getLogger(Spieler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }" ]
[ "0.63926834", "0.63926834", "0.63028157", "0.6289006", "0.6180554", "0.6032226", "0.6032226", "0.5962237", "0.58173317", "0.5806779", "0.5729579", "0.5715514", "0.5706726", "0.56878775", "0.56503963", "0.56424254", "0.5621383", "0.5604878", "0.557697", "0.55684245", "0.5564047", "0.55154705", "0.55154705", "0.5491903", "0.54916", "0.54876137", "0.5483819", "0.54712254", "0.54562306", "0.5439488", "0.5409205", "0.53776264", "0.5368855", "0.5368439", "0.5353134", "0.5353134", "0.5346736", "0.5344198", "0.53441775", "0.5341923", "0.5336309", "0.5320548", "0.5289983", "0.52764875", "0.5275756", "0.52655405", "0.52550805", "0.52454036", "0.52437824", "0.52425367", "0.5224453", "0.5222735", "0.52199495", "0.5218925", "0.52164227", "0.52104574", "0.5201123", "0.5199119", "0.5192824", "0.5192291", "0.5191571", "0.5188719", "0.5184098", "0.5172392", "0.5167352", "0.516171", "0.51570225", "0.5156544", "0.5154985", "0.51477253", "0.51389426", "0.51348543", "0.5127333", "0.51138437", "0.51075643", "0.5099692", "0.50992364", "0.5098904", "0.50984555", "0.5096402", "0.50920916", "0.5091203", "0.5085253", "0.5082687", "0.5076615", "0.5075527", "0.5072748", "0.5071668", "0.5064507", "0.50626856", "0.50617826", "0.50582975", "0.50567317", "0.50565076", "0.5053885", "0.50536853", "0.5045803", "0.5044179", "0.50401384", "0.5039516" ]
0.60902864
5
Statistiken ausgeben zu Anzahl User, Anzahl Hotels, bestbewertetes Hotel, ...
public String getStatistics() { String statistics; statistics="Anzahl aller User: "+ numberOfUsers() + "\n" + "Anzahl aller Hotels: " + numberOfHotels() + "\n" + "Hotel mit der besten durchschnittlichen Bewertung: " + bestHotel().getName() + "\n"; return statistics; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int numberOfHotels() {\r\n \tint anzahlHotel=hotelDAO.getHotelList().size();\r\n \treturn anzahlHotel;\r\n }", "int getUsersCount();", "int getUsersCount();", "int getUsersCount();", "Integer loadUserCount();", "public int getUserCount() {\n\t\t\treturn 7;\n\t\t}", "int getNumberOfGuests();", "public int getMetaUsers();", "int getVirtualUsers();", "int getUserCount();", "int getUserCount();", "public int getLoggedInUsers();", "public int numberOfUsers() {\r\n \tint anzahlUser=userDAO.getUserList().size();\r\n \treturn anzahlUser;\r\n }", "int getCountOfFemaleUsers(List<User> users);", "public String fetchCountMyData(User loginUser);", "public int getUserCount() {\n return instance.getUserCount();\n }", "public void displayUserInformations() {\n println(\"getLocation(): \"+user.getLocation());\n println(\"getFriendsCount(): \"+user.getFriendsCount());\n println(\"getFollowersCount(): \"+user.getFollowersCount());\n println(\"getDescription(): \"+user.getDescription());\n println(\"getCreatedAt() : \"+user.getCreatedAt() );\n println(\"getDescriptionURLEntities(): \"+user.getDescriptionURLEntities());\n println(\"getFavouritesCount() : \"+user.getFavouritesCount() );\n }", "int getAchieveInfoCount();", "public ArrayList<Hotel> getUserHotels(Integer userId, Integer customerId);", "public void userWithMostLikes(){\n Map<Integer,Integer> userLikesCount = new HashMap<>();\n Map<Integer,User> users = DataStore.getInstance().getUsers();\n \n for(User user : users.values()){\n for(Comment c : user.getComments()){\n int likes=0;\n if(userLikesCount.containsKey(user.getId())){\n\n likes = userLikesCount.get(user.getId());\n }\n likes += c.getLikes();\n userLikesCount.put(user.getId(), likes);\n }\n }\n System.out.println(userLikesCount);\n int max=0;\n int maxId=0;\n for(int id: userLikesCount.keySet()){\n if(userLikesCount.get(id)>max){\n max= userLikesCount.get(id);\n maxId=id;\n }\n }\n System.out.println(\"\\nUser with most likes : \"+ max+ \"\\n\"+ users.get(maxId));\n }", "public int getWallItemsCount(String userUuid);", "public void userWithMostLikes() {\n Map<Integer, Integer> userLikesCount = new HashMap<>();\n Map<Integer, User> users = DataStore.getInstance().getUsers();\n \n for (User user : users.values()) {\n for (Comment c : user.getComments()) {\n int likes = 0;\n if (userLikesCount.containsKey(user.getId())) {\n likes = userLikesCount.get(user.getId());\n }\n likes += c.getLikes();\n userLikesCount.put(user.getId(), likes);\n }\n }\n int max = 0;\n int maxId = 0;\n for (int id : userLikesCount.keySet()) {\n if (userLikesCount.get(id) > max) {\n max = userLikesCount.get(id);\n maxId = id;\n }\n }\n System.out.println(\"User with most likes: \" + max + \"\\n\" \n + users.get(maxId));\n }", "public void userWithMostLikes() {\n Map<Integer, Integer> userLikesCount = new HashMap<>();\n Map<Integer, User> users = DataStore.getInstance().getUsers();\n \n for (User user : users.values()) {\n for (Comment c : user.getComments()) {\n int likes = 0;\n if (userLikesCount.containsKey(user.getId())) {\n likes = userLikesCount.get(user.getId());\n }\n likes += c.getLikes();\n userLikesCount.put(user.getId(), likes);\n }\n }\n int max = 0;\n int maxId = 0;\n for (int id : userLikesCount.keySet()) {\n if (userLikesCount.get(id) > max) {\n max = userLikesCount.get(id);\n maxId = id;\n }\n }\n System.out.println(\"User with most likes: \" + max + \"\\n\" \n + users.get(maxId));\n }", "public void initUsers() {\n User user1 = new User(\"Alicja\", \"Grzyb\", \"111111\", \"grzyb\");\n User user2 = new User(\"Krzysztof\", \"Kowalski\", \"222222\", \"kowalski\");\n User user3 = new User(\"Karolina\", \"Nowak\", \"333333\", \"nowak\");\n User user4 = new User(\"Zbigniew\", \"Stonoga \", \"444444\", \"stonoga\");\n User user5 = new User(\"Olek\", \"Michnik\", \"555555\", \"michnik\");\n users.add(user1);\n users.add(user2);\n users.add(user3);\n users.add(user4);\n users.add(user5);\n }", "public void showHotels() {\n System.out.println(\"-----Hotels: ------\");\n hotelsService.getHotels().forEach(System.out::println);\n }", "private UserData[] getEnvoyUsers(){\n UserData sofort = setUserData(\"DE\", \"EUR\");\n //Set custom regexp validation rule, set more short random valid email\n emailValidationRule.setRegexp(\"[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-]{1,6}[.]{0,1}[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]{0,6}[.]{0,1}[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]{1,8}[@]{1,1}[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]{1,21}[.]{0,1}[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]{0,30}[.]{1,1}[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]{2,4}\");\n sofort.setEmail(emailValidationRule.generateValidString());\n// UserData ibanq = setUserData(\"JP\", \"USD\");\n// UserData moneta = setUserData(\"RU\", \"USD\");\n// UserData poli = setUserData(\"AU\", \"AUD\");\n return new UserData[]{\n// ideal, //0\n// prezelwy, //1\n// eKonto, //2\n// euteller, //3\n// ewire, //4\n sofort, //5\n// ibanq, //6\n// moneta, //7\n// poli //8\n };\n }", "public HashMap<User, Integer> userWeekRanking(User user, LinkedList<User> friends, int method){\n LinkedList<User> allUsers = new LinkedList<>();\n HashMap<User, Integer> result = new HashMap<>();\n\n allUsers.add(user);\n allUsers.addAll(friends);\n\n int rank = 0;\n long lastTime = -1;\n int lastSteps = -1;\n double lastDistance = -1;\n int lastAchievementCount = -1;\n\n switch (method){\n case METHODS.TIME:\n //sort the data\n Collections.sort(allUsers, new SortWeekTime());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getActiveTimeForWeek() != lastTime) {\n rank++;\n lastTime = next.getMyTimeline().getActiveTimeForWeek();\n }\n result.put(next, rank);\n }\n\n break;\n\n case METHODS.DISTANCE:\n //sort the data\n Collections.sort(allUsers, new SortWeekDistance());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getActiveDistanceForWeek() != lastDistance) {\n rank++;\n lastDistance = next.getMyTimeline().getActiveDistanceForWeek();\n }\n result.put(next, rank);\n }\n\n break;\n\n case METHODS.STEPS:\n //sort the data\n Collections.sort(allUsers, new SortWeekSteps());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getStepsForWeek() != lastSteps) {\n rank++;\n lastSteps = next.getMyTimeline().getStepsForWeek();\n }\n result.put(next, rank);\n }\n\n break;\n\n case METHODS.ACHIEVEMENTS:\n //sort the data\n Collections.sort(allUsers, new SortWeekAchievements());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getAchievementsForWeek() != lastAchievementCount) {\n rank++;\n lastAchievementCount = next.getMyTimeline().getAchievementsForWeek();\n }\n result.put(next, rank);\n }\n\n break;\n }\n\n return result;\n }", "public long getUserCount() throws UserManagementException;", "public int getUserCount() {\n return user_.size();\n }", "int getNumberOfRegsUser(long idUser);", "public int numberUsers() \n\t{\n\t\treturn this.userList.size();\n\t}", "public void displayStats() {\n VisitorDAO visitorDAO = new VisitorDAO();\n Object countAllVisitors = visitorDAO.getCountAllVisitors();\n Object countNewSubscribers = visitorDAO.getCountNewSubscribersForMonth(this.simpleDateFormat.format(new Date()));\n\n this.totalSubscribersText.setText(this.totalSubscribersText.getText() + countAllVisitors.toString());\n this.newSubscribersText.setText(this.newSubscribersText.getText() + countNewSubscribers.toString());\n }", "@Override\n\tpublic void output() {\n\t\tfor(User u :list) {\n\t\t\tif(list.size() > MIN_USER) {\n\t\t\t\tSystem.out.println(\"이름 : \"+u.getName());\n\t\t\t\tSystem.out.println(\"나이 : \"+u.getAge());\n\t\t\t\tSystem.out.println(\"주소 : \"+u.getAddr());\n\t\t\t\tSystem.out.println(\"=======================\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"입력된 정보가 없습니다.\");\n\t\t}", "public int getCount(String username);", "public int getVeggieToppings() {\n return veggieToppings;\n }", "public int getGuestCount() { return _scroller.getGuestCount(); }", "@Override\n public int getBalloonUserTrackingsCount()\n throws com.liferay.portal.kernel.exception.SystemException {\n return _balloonUserTrackingLocalService.getBalloonUserTrackingsCount();\n }", "int getPurchasableOffersCount();", "@RequestMapping(path = \"/topUsersYadas\", method = RequestMethod.GET)\n public LinkedHashMap<User, Iterable<Yada>> getTopUsersYadas() {\n LinkedHashMap<User, Iterable<Yada>> topUsersYadasMap = new LinkedHashMap<>();\n\n ArrayList<User> topUsers = users.findTop10ByOrderByKarmaDesc();\n\n for (User user : topUsers) {\n Iterable<Yada> topUsersYadas = yadas.findAllByUserIdOrderByKarmaDesc(user.getId());\n topUsersYadasMap.put(user, topUsersYadas);\n }\n return topUsersYadasMap;\n }", "private List<MeldingInfo> getMeldingenGebruiker(List<String> uidGebruikers, Rol rol, List<Status> statussen) {\n\n List<MeldingInfo> meldingenInfo = new ArrayList<>();\n\n // Doorloop alle meldingen en verzamel hieruit de meldingen met de juiste gebruiker en status.\n for(Melding melding: meldingen) {\n\n for(String uidGebruiker: uidGebruikers) {\n\n String uidGebruikerMelding;\n\n switch (rol) {\n case MELDER:\n uidGebruikerMelding = melding.getUidGebruikerMelder();\n if (uidGebruikerMelding != null && uidGebruikerMelding.equals(uidGebruiker)) {\n geldigeStatusMelding(meldingenInfo, melding, statussen);\n }\n break;\n case BEHANDELAAR:\n uidGebruikerMelding = melding.getUidGebruikerBehandelaar();\n if (uidGebruikerMelding != null && uidGebruikerMelding.equals(uidGebruiker)) {\n geldigeStatusMelding(meldingenInfo, melding, statussen);\n }\n break;\n }\n\n }\n\n }\n return meldingenInfo;\n }", "public static void processNoOfNightsHotels(PrintItinerary itinerary) {\n\n\t\tif (itinerary.getPackages() != null\n\t\t\t\t&& itinerary.getPackages().size() > 0) {\n\t\t\tList<Package> packages = itinerary.getPackages();\n\t\t\tIterator<Package> iterator = packages.iterator();\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tPackage package1 = (Package) iterator.next();\n\t\t\t\tHotel selectedHotel = package1.getSelectedHotel();\n\t\t\t\tselectedHotel.setNoOfNights(String.valueOf(DateUtils\n\t\t\t\t\t\t.dateDifferenceInDays(selectedHotel.getCheckInDate(),\n\t\t\t\t\t\t\t\tselectedHotel.getCheckOutDate())));\n\t\t\t}\n\t\t} else if (itinerary.getHotels() != null\n\t\t\t\t&& itinerary.getHotels().size() > 0) {\n\t\t\tList<Hotel> hotels = itinerary.getHotels();\n\t\t\tIterator<Hotel> iterator = hotels.iterator();\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tHotel hotel = iterator.next();\n\t\t\t\thotel.setNoOfNights(String.valueOf(DateUtils\n\t\t\t\t\t\t.dateDifferenceInDays(hotel.getCheckInDate(),\n\t\t\t\t\t\t\t\thotel.getCheckOutDate())));\n\t\t\t}\n\t\t}\n\n\t}", "public List<Hotel> getAvailableHotels(){\n return databaseManager.findAvailableHotels();\n }", "private void popularTela() {\n ClearMsgsEvent.fire(this);\n CadastroContatoView v = getView();\n v.nome().setValue(contato.getNome());\n v.sobrenome().setValue(contato.getSobrenome());\n v.email().setValue(contato.getEmail());\n v.numero().setValue(contato.getNumero());\n v.dataNascimento()\n .setValue(contato.getDataNascimento() == null ? new Date() : contato.getDataNascimento());\n }", "@Override\r\n\tpublic int selectUserCount() {\n\t\treturn userMapper.selectUserCount();\r\n\t}", "public int countUsers()\n {\n int nbUser = 0;\n pw.println(12);\n try\n {\n nbUser = Integer.parseInt(bis.readLine()) ;\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return nbUser ;\n }", "public int getUsersCount() {\n return users_.size();\n }", "public int getUsersCount() {\n return users_.size();\n }", "public int getNumberOfUsers() {\n \t\treturn interactionHistorySizes.size();\n \t}", "@Override\n public int getTotalHumanPlayers() {\n return totalHumanPlayers;\n }", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_USERSTATISTICS);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public Integer getAllShelfCount(String filter, String username);", "public Integer getAllWishlistCount(String filter, String username);", "public long getUsersCount() {\r\n return usersCount;\r\n }", "int getAchievementsCount();", "int getPersonInfoCount();", "@Query(\"select count(a) from Reservation a right join a.rendezvous r group by r.id\")\n\tCollection<Double> dashboardUsersPerRendezvous();", "@Override\r\n\tpublic int getGeunTaeAdminCnt(HashMap<String, String> params) {\n\t\treturn sqlsession.selectOne(\"GeuntaeMgnt.getGeunTaeAdminCnt\",params);\r\n\t}", "public Vector<HotelInfo> getAllHotels(){\n Session session=null;\n List result=null;\n Vector<HotelInfo> hotelInfos = null;\n try\n {\n session= HibernateUtil.getSessionFactory().getCurrentSession();\n session.beginTransaction();\n result=session.createQuery(\"from Hotel\").list();\n System.out.println(\"Successfully return hotels from database\");\n session.getTransaction().commit();\n hotelInfos= new Vector<HotelInfo>();\n for (int i = 0; i < result.size(); i++)\n {\n HotelInfo myHotel=new HotelInfo();\n myHotel.setHotelId(((Hotel)result.get(i)).getHotelId());\n myHotel.setName(((Hotel)result.get(i)).getName());\n myHotel.setUsername((((Hotel)result.get(i)).getUsername()));\n myHotel.setPassword((((Hotel)result.get(i)).getPassword()));\n myHotel.setIpaddress((((Hotel)result.get(i)).getIpaddress()));\n myHotel.setPort((((Hotel)result.get(i)).getPort()));\n myHotel.setContextpath((((Hotel)result.get(i)).getContextPath()));\n hotelInfos.add(myHotel);\n }\n }\n catch(Exception e)\n {\n System.out.println(e.getMessage());\n }\n return hotelInfos;\n }", "public void fetchGuestList() {\n mRowDataList.clear();\n int temp = 0;\n todayIncome = 0;\n guestCount = 0;\n for (int i = 0; i < 10; i++) {\n temp = 800 + i;\n String name = \"Guest No.\" + i;\n String timeSpanPlaceHolder = \"PlaceHolder\";\n todayIncome += temp;\n mRowDataList.add(new RecyclerListAdapter.rowData(\"\" + temp, name, \"\" + temp, timeSpanPlaceHolder));\n }\n guestCount = mRowDataList.size();\n\n }", "public void printUsers() {\n userAnya.printInfo();\n userRoma.printInfo();\n }", "public static void createStatistics() {\n\t\t\n\t\tBookingVisitor visitor = new BookingVisitor();\n\t\tPaymentType paymentType = PaymentType.MONEYWALLET;\n\t\t\n\t\tBooking booking = new Booking();\n\t\t\n\t\tvisitor.visit(booking, paymentType);\n\t\t\n\t\tint countPayPal = visitor.getCountPayPal();\n\t\tint countGoogleWallet = visitor.getCountGoogleWallet();\n\t\tint countMoneyWallet = visitor.getCountMoneyWallet();\n\t\t\n\t\tSystem.out.println(\"Payment GermanBooking by PayPal: \" + countPayPal );\n\t\tSystem.out.println(\"Payment GermanBooking by GoogleWallet: \" + countGoogleWallet);\n\t\tSystem.out.println(\"Payment GermanBooking by MoneyWallet: \" + countMoneyWallet);\n\t}", "public int get_uWins()\r\n {\r\n return uWins;\r\n }", "int getWifisCount();", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "int getAoisCount();", "public int getActiveUserCount() {\n return activeUserCount;\n }", "protected int countUsers() \n\t{\n\t\tint result = -1;\n\t\ttry {\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tResultSet rs = stat.executeQuery(\"SELECT COUNT(lfm_username) FROM Persons;\");\n\t\t\tSystem.out.println(rs.toString());\n\t\t\tresult = rs.getInt(1);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\t\t\tSystem.out.println(\"Something went wrong counting users from Persons\");\n\t\t}\n\t\treturn result;\n\t}", "int getUserFunctionsCount();", "@Override\r\n\tpublic void OnRoomUsersEnter(List<stRoomUserInfo> roomUsersList,boolean isAll) {\n\t\tString tempIDs[] = new String[roomUsersList.size()];\r\n\t\tString uniqueIDS[] = new String[roomUsersList.size()];\r\n\t\tint power[] = new int[roomUsersList.size()];\r\n\t\tint j = 0;\r\n\t\tfor (Iterator<stRoomUserInfo> i = roomUsersList.iterator(); i.hasNext();)\r\n\t\t{ \r\n\t\t\tstRoomUserInfo userinfoRef = i.next(); \r\n\t\t\ttempIDs[j] = String.valueOf(userinfoRef.getTempid());\r\n\t\t\tuniqueIDS[j] = userinfoRef.getUniqueid();\r\n\t\t\tpower[j] = userinfoRef.getPower().ordinal();\r\n\t\t\tj++;\r\n\t\t} \r\n\t\tSomeEnterRoom(tempIDs,uniqueIDS,power,isAll);\r\n\t}", "@Override\r\n\tpublic void viewAllUsers() {\n\t\tList<User> allUsers = new ArrayList<User>();\r\n\t\tallUsers = udao.getAllUsers();\r\n\t\t\r\n\t\tSystem.out.println(\"ALL USERS:\");\r\n\t\tSystem.out.println(\"ID\\tUsername\\tName\");\r\n\t\t\r\n\t\tfor(int i = 0; i < allUsers.size(); i++) {\r\n\t\t\tUser tempUser = allUsers.get(i);\r\n\t\t\tSystem.out.println(tempUser.getUserID() + \"\\t\" + tempUser.getUsername() + \"\\t\"\r\n\t\t\t\t\t+ tempUser.getFirstName() + \" \" + tempUser.getLastName());\r\n\t\t}\r\n\r\n\t}", "private void addDefaultUsersAndPlayers(Game game) {\n String[] users = { \"User1\", \"User2\", \"User3\", \"User4\" };\n for (int i = 0; i < users.length; i++) {\n game.getKingdomino().addUser(users[i]);\n Player player = new Player(game);\n player.setColor(Player.PlayerColor.values()[i]);\n Kingdom kingdom = new Kingdom(player);\n new Castle(0, 0, kingdom, player);\n }\n }", "int getCustomersCount();", "int getReservePokemonCount();", "public ArrayList<User> showAllGuests() throws Exception {\n // String sql = \"SELECT * FROM event_guest_list WHERE customer_id = '\" + showLoggedInCustomer(AppData.getInstance().getLoggedInUserId()) + \"'\" ;\n // String sql = \"SELECT * FROM event_guest_list WHERE event_name = \"\n ArrayList<User> users = new ArrayList<>();\n PreparedStatement pr = connection.prepareStatement(Queries.showAllGuests);\n // PreparedStatement pr = connection.prepareStatement(sql);\n ResultSet result = pr.executeQuery();\n while (result.next()) {\n users.add(new User(\n result.getInt(\"guest_id\"),\n result.getString(\"guest_name\")));\n // result.getBoolean(\"participation\")));\n }\n pr.close();\n return users;\n }", "@Override\n\tpublic int getWeathersCount() {\n\t\treturn _weatherLocalService.getWeathersCount();\n\t}", "private void createAllUsersList(){\n\t\tunassignedUsersList.clear();\n\t\tlistedUsersAvailList.clear();\n\t\tArrayList<User> users = jdbc.get_users();\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tunassignedUsersList.addElement(String.format(\"%s, %s\", users.get(i).get_lastname(), users.get(i).get_firstname()));\n\t\t\tlistedUsersAvailList.addElement(String.format(\"%s, %s\", users.get(i).get_lastname(), users.get(i).get_firstname()));\n\t\t}\n\t}", "public int getUsers() {\n\t\treturn this.users;\n\t}", "public int getCantidadRobots();", "public void gethotelinfo(){\n String query = \"SELECT Name , HID , Income \"\n + \"FROM Hotel \" ;\n \n String query2 = \"SELECT COUNT(*) AS rowcount\"\n + \" FROM Rooms \" ;\n try {\n PreparedStatement Query = conn.prepareStatement(query);\n PreparedStatement Query2 = conn.prepareStatement(query2);\n ResultSet rs = Query.executeQuery(query);\n ResultSet rs2 = Query2.executeQuery(query2);\n String name =\"\" ;\n int HotelID = 0 , NoOfrooms=0;\n double income = 0.0 ;\n while(rs.next() && rs2.next()){\n name = rs.getString(\"Name\");\n HotelID = rs.getInt(\"HID\");\n NoOfrooms = rs2.getInt(\"rowcount\");\n income = rs.getDouble(\"Income\");\n \n }\n hotel h = new hotel(name , HotelID , income , NoOfrooms);\n \n }\n catch (SQLException ex) {\n \n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n \n }", "@Override\r\n\tpublic int getMonitoredSupermarketsNumber(int userId) throws SQLException {\r\n\t\tcon = ConnectionPoolManager.getPoolManagerInstance().getConnectionFromPool();\r\n\t\tPreparedStatement ps = null;\r\n\r\n\t\tString query = \"select count(*) \"\r\n\t\t\t\t+ \"from monitored_supermarket \"\r\n\t\t\t\t+ \"where id_user = ?\";\r\n\t\ttry {\r\n\t\t\tps = con.prepareStatement(query);\r\n\t\t\tps.setInt(1, userId);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\trs.next();\r\n\t\t\treturn rs.getInt(1);\r\n\t\t}finally{\r\n\t\t\tConnectionPoolManager.getPoolManagerInstance().returnConnectionToPool(con);\r\n\t\t}\r\n\t}", "public void popularDoctores(){\n doctores = new ArrayList<>();\r\n doctores.add(new Doctor(22, \"Victor\", \"Gonzalez\", \"Romero\"));\r\n doctores.add(new Doctor(38, \"Jose\", \"Ramirez\", \"Bagarin\"));\r\n doctores.add(new Doctor(15, \"Patricio\", \"Arellano\", \"Vega\"));\r\n }", "@Query(\"select count(a) from Rendezvous a right join a.user r group by r.id\")\n\tCollection<Double> dashboardRendezvousesByUser();", "public int getUserCount(UserParams params) throws Exception {\n\t\treturn 0;\n\t}", "public static void incrementGuestRoomCount() {numGuestRooms++;}", "int getDonatoriCount();", "public void AumentarVictorias() {\r\n\t\tthis.victorias_actuales++;\r\n\t\tif (this.victorias_actuales >= 9) {\r\n\t\t\tthis.TituloNobiliario = 3;\r\n\t\t} else if (this.victorias_actuales >= 6) {\r\n\t\t\tthis.TituloNobiliario = 2;\r\n\t\t} else if (this.victorias_actuales >= 3) {\r\n\t\t\tthis.TituloNobiliario = 1;\r\n\t\t} else {\r\n\t\t\tthis.TituloNobiliario = 0;\r\n\t\t}\r\n\t}", "public void setUsersCount(long usersCount) {\r\n this.usersCount = usersCount;\r\n }", "public MonatsabschlussVerwaltungsBean() {\n userHistoryEntrys = UserHistoryService.getUserHistoryEntries();\n users = BenutzerverwaltungService.getUserList();\n\n Month[] months = Month.values();\n availableMonths = new LinkedList<>();\n for (Month m : months) {\n availableMonths.add(new SelectItem(m, this.getDisplayName(m)));\n }\n\n selectedMonth = Month.JANUARY;\n selectedYear = LocalDateTime.now().getYear();\n selectedUserHistoryEntry = new UserHistoryEntry(LocalDateTime.now(), null, 0, 0);\n }", "public HashMap<String, Integer> getUsers() {\n HashMap<String, Integer> users = new HashMap<>();\n getData(users, \"getUsers\");\n return users;\n }", "@Override\n\tpublic void onGetOnlineUsersDone(AllUsersEvent arg0) {\n\t\t\n\t}", "int getFaintedPokemonCount();", "public int getHabitantes(){\n return habitantes;\n }", "int getUserTypesCount();", "public int getNickels()\n {\n\treturn nickels;\n }", "@Override\n public int getProductFavouritesCount(Map<String, Object> params) {\n return yourFavouritesDetaildao.getProductFavouritesCount(params);\n }", "int getTrucksCount();", "public void loadHotels();", "public int getCount() {\n return usersArrayList.size();\n }", "public Integer findNumOfUsers(String username);", "public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }" ]
[ "0.6285131", "0.6104648", "0.6104648", "0.6104648", "0.5982773", "0.58969945", "0.5789018", "0.57796645", "0.5745862", "0.57271975", "0.57271975", "0.5708882", "0.56906706", "0.5673699", "0.5658863", "0.5618279", "0.55857605", "0.55856365", "0.55720836", "0.55638367", "0.55345935", "0.5497735", "0.5497735", "0.54748386", "0.54613745", "0.5444206", "0.5432234", "0.5430495", "0.5427793", "0.5426515", "0.54212224", "0.54079926", "0.5407246", "0.5398538", "0.5390719", "0.5378017", "0.5367524", "0.53588367", "0.5357789", "0.5343159", "0.5339276", "0.5333279", "0.5323069", "0.5321906", "0.5312254", "0.53100085", "0.5308995", "0.5291587", "0.5291174", "0.5275893", "0.5256921", "0.52520883", "0.52252734", "0.5221325", "0.5220159", "0.52172434", "0.5211601", "0.52080625", "0.52080446", "0.5202418", "0.51960653", "0.51951176", "0.51799035", "0.51783663", "0.51732635", "0.5170861", "0.517064", "0.51649284", "0.51647085", "0.5158016", "0.5157926", "0.51528275", "0.51518446", "0.5144871", "0.5143893", "0.514254", "0.51373297", "0.5135341", "0.51310223", "0.51306677", "0.51305497", "0.51275325", "0.5127078", "0.51250327", "0.5124428", "0.51209813", "0.5117864", "0.51178354", "0.51163226", "0.5114883", "0.51134086", "0.5110595", "0.51072043", "0.5102941", "0.5101886", "0.51004386", "0.5098884", "0.5098556", "0.5096989", "0.5093312" ]
0.6124342
1
Created by wutingting on 2017/4/4.
public interface ProductService { // List<Product> getAllProduct(); List<Product> getProduct(Product product); Product getProductById(Integer id); int insertProduct(Product product); int insertSelectiveProduct(Product product); int deleteProduct(Integer id ); int updateProduct(Product product ); }
{ "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\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 comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo38117a() {\n }", "public void mo4359a() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void gravarBd() {\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\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n void init() {\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 anularFact() {\n\t\t\r\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "private 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 init() {\n\n\t}", "private void m50366E() {\n }", "@Override\n public void init() {}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private void kk12() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void memoria() {\n \n }", "protected boolean func_70814_o() { return true; }", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void ligar() {\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}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n public int getSize() {\n return 1;\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\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 inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "private void strin() {\n\n\t}", "public void mo6081a() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public void initialize() { \n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "Petunia() {\r\n\t\t}", "Constructor() {\r\n\t\t \r\n\t }", "public Pitonyak_09_02() {\r\n }", "@Override\n public void initialize() {\n \n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}" ]
[ "0.6099414", "0.58636105", "0.57852554", "0.57498264", "0.57498264", "0.57197064", "0.5715283", "0.5645618", "0.5632104", "0.5618147", "0.558108", "0.55786806", "0.55507743", "0.5544278", "0.55441034", "0.5530521", "0.5529206", "0.5528195", "0.55149126", "0.55105907", "0.5488161", "0.5467089", "0.54667175", "0.5458409", "0.54513305", "0.5446988", "0.54467344", "0.54467344", "0.54467344", "0.54467344", "0.54467344", "0.54409426", "0.5423692", "0.5423323", "0.5417469", "0.54092133", "0.5406122", "0.540483", "0.540483", "0.540483", "0.540483", "0.540483", "0.540483", "0.54039276", "0.5391825", "0.5380681", "0.53804266", "0.53713346", "0.53713346", "0.5348702", "0.5339959", "0.53395957", "0.53395957", "0.53395957", "0.53376156", "0.5332638", "0.53254026", "0.53254026", "0.53241545", "0.5321359", "0.53213304", "0.5320268", "0.53155535", "0.53148484", "0.53111035", "0.53111035", "0.53111035", "0.53101486", "0.530895", "0.5306561", "0.53045326", "0.52966917", "0.52966917", "0.52956027", "0.52956027", "0.52956027", "0.52956027", "0.52956027", "0.52956027", "0.52956027", "0.5288105", "0.5278954", "0.5278674", "0.5278674", "0.5278674", "0.525289", "0.52509594", "0.5250427", "0.5247166", "0.5246999", "0.52467364", "0.524473", "0.52353466", "0.52341044", "0.52316034", "0.5229825", "0.52276397", "0.5222321", "0.52001864", "0.51974916", "0.51956016" ]
0.0
-1
Runtime: 14.22% Memory Usage: 5.10%
public int fourSumCount(int[] nums1, int[] nums2, int[] nums3, int[] nums4) { int sum = 0; HashMap<Integer, Integer> complementsSum34Count = new HashMap<>(); for (int num3 : nums3) { for (int num4 : nums4) { int sum34 = num3 + num4; if (!complementsSum34Count.containsKey(-sum34)) complementsSum34Count.put(-sum34, 0); complementsSum34Count.put(-sum34, complementsSum34Count.get(-sum34) + 1); } } for (int num1 : nums1) { for (int num2 : nums2) { int sum12 = num1 + num2; if (complementsSum34Count.containsKey(sum12)) sum += complementsSum34Count.get(sum12); } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testPerformance() {\n \t}", "long memoryUnused();", "long memoryUsed();", "@Override\n public int getCacheSize() {\n return 4 + 20 * 88;\n }", "int memSize() {\n return super.memSize() + 4 * 4; }", "@Override\n public long cost() {\n return 100;\n }", "public int memUsage(){\n\t\tint usage = 36;\n\t\tusage += 12 * point.length;\n\t\tusage += 4 * glComannd.length;\n\t\tusage += 12 * glVertex.length;\n\t\tusage += 24 * state.length;\n\t\treturn usage;\n\t}", "private void optimiseEVProfile()\n\t{\n\t}", "@Override\n\tpublic int isFast() {\n\t\treturn 2;\n\t}", "int checkElapsedTime(){\r\n\t\treturn gc.getElapsedTime();\r\n\t}", "public static void initializeMetrics()\n {\n // Get the Java runtime\n Runtime runtime = Runtime.getRuntime();\n // Run the garbage collector\n runtime.gc();\n \tstartingMemory = runtime.totalMemory() - runtime.freeMemory();\n }", "private static byte[] m2539e(Context context) {\n Throwable th;\n int i = 0;\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[0];\n String a = Log.m2547a(context, Log.f1857e);\n DiskLruCache diskLruCache = null;\n try {\n diskLruCache = DiskLruCache.m2767a(new File(a), 1, 1, 10240);\n File file = new File(a);\n if (file != null && file.exists()) {\n String[] list = file.list();\n int length = list.length;\n while (i < length) {\n String str = list[i];\n if (str.contains(\".0\")) {\n byteArrayOutputStream.write(StatisticsManager.m2535a(diskLruCache, str.split(\"\\\\.\")[0]));\n }\n i++;\n }\n }\n bArr = byteArrayOutputStream.toByteArray();\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n try {\n diskLruCache.close();\n } catch (Throwable th2) {\n th = th2;\n }\n }\n } catch (IOException th3) {\n BasicLogHandler.m2542a(th3, \"StatisticsManager\", \"getContent\");\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e2) {\n e2.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n diskLruCache.close();\n }\n } catch (Throwable th4) {\n th3 = th4;\n }\n return bArr;\n th3.printStackTrace();\n return bArr;\n }", "@Override\n public int getCacheSize() {\n return 4 + 20 * (4 + 4 + 8);\n }", "public abstract long estimateMemorySize();", "long getMemory();", "long getMemory();", "private void c() {\n /*\n r14 = this;\n r12 = android.os.SystemClock.elapsedRealtime();\n r8 = r14.d();\n r0 = r14.t;\n if (r0 == 0) goto L_0x007a;\n L_0x000c:\n r0 = 1;\n r7 = r0;\n L_0x000e:\n r0 = r14.r;\n r0 = r0.a();\n if (r0 != 0) goto L_0x0018;\n L_0x0016:\n if (r7 == 0) goto L_0x007d;\n L_0x0018:\n r0 = 1;\n r10 = r0;\n L_0x001a:\n if (r10 != 0) goto L_0x0095;\n L_0x001c:\n r0 = r14.d;\n r0 = r0.b;\n if (r0 != 0) goto L_0x0028;\n L_0x0022:\n r0 = -1;\n r0 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1));\n if (r0 != 0) goto L_0x0032;\n L_0x0028:\n r0 = r14.p;\n r0 = r12 - r0;\n r2 = 2000; // 0x7d0 float:2.803E-42 double:9.88E-321;\n r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1));\n if (r0 <= 0) goto L_0x0095;\n L_0x0032:\n r14.p = r12;\n r0 = r14.d;\n r1 = r14.f;\n r1 = r1.size();\n r0.a = r1;\n r0 = r14.c;\n r1 = r14.f;\n r2 = r14.o;\n r4 = r14.m;\n r6 = r14.d;\n r0.getChunkOperation(r1, r2, r4, r6);\n r0 = r14.d;\n r0 = r0.a;\n r0 = r14.a(r0);\n r1 = r14.d;\n r1 = r1.b;\n if (r1 != 0) goto L_0x0080;\n L_0x0059:\n r4 = -1;\n L_0x005b:\n r0 = r14.b;\n r2 = r14.m;\n r1 = r14;\n r6 = r10;\n r0 = r0.update(r1, r2, r4, r6);\n if (r7 == 0) goto L_0x0087;\n L_0x0067:\n r0 = r14.v;\n r0 = r12 - r0;\n r2 = r14.u;\n r2 = (long) r2;\n r2 = r14.c(r2);\n r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1));\n if (r0 < 0) goto L_0x0079;\n L_0x0076:\n r14.e();\n L_0x0079:\n return;\n L_0x007a:\n r0 = 0;\n r7 = r0;\n goto L_0x000e;\n L_0x007d:\n r0 = 0;\n r10 = r0;\n goto L_0x001a;\n L_0x0080:\n if (r0 == 0) goto L_0x0095;\n L_0x0082:\n r4 = r14.d();\n goto L_0x005b;\n L_0x0087:\n r1 = r14.r;\n r1 = r1.a();\n if (r1 != 0) goto L_0x0079;\n L_0x008f:\n if (r0 == 0) goto L_0x0079;\n L_0x0091:\n r14.f();\n goto L_0x0079;\n L_0x0095:\n r4 = r8;\n goto L_0x005b;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.exoplayer.chunk.ChunkSampleSource.c():void\");\n }", "public void measureRuntime() throws IOException {\n int[] ns = new int[]{10, 100, 1000};\n for (int i : ns) {\n System.out.println(String.format(\"%d times input read took %fms\", i, (float) measureReadInput(i)));\n }\n for (int i : ns) {\n System.out.println(String.format(\"%d times pca took %fms\", i, (float) measurePCA(i)));\n }\n for (int i : ns) { // all cubes\n System.out.println(String.format(\"%d skeleton generations all cubes took %fms\", i, (float) measureAlgorithmWithoutPCA(i, true, true)));\n }\n for (int i : ns) { // low res\n System.out.println(String.format(\"%d skeleton generations low res took %fms\", i, (float) measureAlgorithmWithoutPCA(i, false, true)));\n }\n for (int i : ns) { // high res\n System.out.println(String.format(\"%d skeleton generations high res took %fms\", i, (float) measureAlgorithmWithoutPCA(i, false, false)));\n }\n }", "@Override\r\n public long problem2() {\r\n ArrayList<String> arrList = new ArrayList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n arrList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis(); \r\n return end - start; \r\n }", "public long memory() {\n\treturn 0;\n }", "private static void testStringPoolGarbageCollection() {\n //first method call - use it as a reference\n test(1000 * 1000);\n //we are going to clean the cache here.\n System.gc();\n //check the memory consumption and how long does it take to intern strings\n //in the second method call.\n test(1000 * 1000);\n }", "private static void testStringPoolGarbageCollection() {\n //first method call - use it as a reference\n test(1000 * 1000);\n //we are going to clean the cache here.\n System.gc();\n //check the memory consumption and how long does it take to intern strings\n //in the second method call.\n test(1000 * 1000);\n }", "@Override\r\n\tpublic double getSlowness() {\n\t\treturn 10;\r\n\t}", "public abstract long mo9746k();", "@Override\n\tpublic int cost() {\n\t\treturn 5000;\n\t}", "@Override\n\t\tpublic long usage() {\n\t\t\t\n\t\t\treturn super.usage();\n\t\t}", "@Override\r\n\tprotected void processCost() {\n\r\n\t}", "private static void testLongLoop() {\n test(1000 * 1000 * 1000);\n //uncomment the following line to see the hand-written cache performance\n //testManual( 1000 * 1000 * 1000 );\n }", "private static void testLongLoop() {\n test(1000 * 1000 * 1000);\n //uncomment the following line to see the hand-written cache performance\n //testManual( 1000 * 1000 * 1000 );\n }", "private float getMemoryUsage() {\n\t\tRuntime runtime = Runtime.getRuntime();\n\t\tlong allocatedMemory = runtime.totalMemory();\n\t\tlong freeMemory = runtime.freeMemory();\n\t\treturn (allocatedMemory - freeMemory);\n\t}", "public static void main(String[] args) {\n long startTime, endTime;\n Scanner in = new Scanner(System.in);\n long ScannerAVG[] = new long[timesToRun];\n long BWAVG[] = new long[timesToRun];\n long ScannerTotal = 0, BWTotal = 0, BWAVGI = 0, ScannerAVGI = 0;\n\n System.out.println(\"Benchmark Progress:\\n0% [Scanner] || [BufferedReader] 100%\");\n System.out.print(\"[\");\n for (int i = 0; i < timesToRun; i++) {\n startTime = System.nanoTime();\n ScannerRead();\n endTime = System.nanoTime();\n ScannerAVG[i] = (endTime-startTime)/1000;\n ScannerTotal = ScannerTotal + ScannerAVG[i];\n if (i % (timesToRun/25) == 0)\n System.out.print(\"=\");\n System.gc(); // FINALLY DOESN'T USE 6.5GB OF MEMORY\n }\n for (int i = 0; i < timesToRun; i++) {\n startTime = System.nanoTime();\n BufferedRead();\n endTime = System.nanoTime();\n BWAVG[i] = (endTime-startTime)/1000;\n BWTotal = BWTotal + BWAVG[i];\n if (i % (timesToRun/25) == 0)\n System.out.print(\"=\");\n System.gc();\n }\n System.out.println(\"]\\n\\n\");\n\n BWAVGI = BWTotal / timesToRun;\n ScannerAVGI = ScannerTotal / timesToRun;\n\n System.out.println(\"Scanner average time to run with \" + timesToRun + \" iterations (µs):\" + ScannerAVGI);\n System.out.println(\"BufferedReader average time to run with \" + timesToRun + \" iterations (µs):\" + BWAVGI);\n long score = 10000 - (ScannerAVGI+BWAVGI)/2;\n System.out.println(\"Score (higher is better): \" + score);\n }", "private final com.google.android.gms.internal.p000firebaseperf.zzbu zzw() {\n /*\n r15 = this;\n java.lang.String r0 = \"FirebasePerformance\"\n r1 = 0\n java.io.BufferedReader r2 = new java.io.BufferedReader // Catch:{ IOException -> 0x00a4, ArrayIndexOutOfBoundsException -> 0x0085, NumberFormatException -> 0x0083, NullPointerException -> 0x0081 }\n java.io.FileReader r3 = new java.io.FileReader // Catch:{ IOException -> 0x00a4, ArrayIndexOutOfBoundsException -> 0x0085, NumberFormatException -> 0x0083, NullPointerException -> 0x0081 }\n java.lang.String r4 = r15.zzba // Catch:{ IOException -> 0x00a4, ArrayIndexOutOfBoundsException -> 0x0085, NumberFormatException -> 0x0083, NullPointerException -> 0x0081 }\n r3.<init>(r4) // Catch:{ IOException -> 0x00a4, ArrayIndexOutOfBoundsException -> 0x0085, NumberFormatException -> 0x0083, NullPointerException -> 0x0081 }\n r2.<init>(r3) // Catch:{ IOException -> 0x00a4, ArrayIndexOutOfBoundsException -> 0x0085, NumberFormatException -> 0x0083, NullPointerException -> 0x0081 }\n java.util.concurrent.TimeUnit r3 = java.util.concurrent.TimeUnit.MILLISECONDS // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n long r4 = java.lang.System.currentTimeMillis() // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n long r3 = r3.toMicros(r4) // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n java.lang.String r5 = r2.readLine() // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n java.lang.String r6 = \" \"\n java.lang.String[] r5 = r5.split(r6) // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n r6 = 13\n r6 = r5[r6] // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n long r6 = java.lang.Long.parseLong(r6) // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n r8 = 15\n r8 = r5[r8] // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n long r8 = java.lang.Long.parseLong(r8) // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n r10 = 14\n r10 = r5[r10] // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n long r10 = java.lang.Long.parseLong(r10) // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n r12 = 16\n r5 = r5[r12] // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n long r12 = java.lang.Long.parseLong(r5) // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n com.google.android.gms.internal.firebase-perf.zzbu$zza r5 = com.google.android.gms.internal.p000firebaseperf.zzbu.zzdl() // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n com.google.android.gms.internal.firebase-perf.zzbu$zza r3 = r5.zzu(r3) // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n long r10 = r10 + r12\n long r4 = r15.zzd(r10) // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n com.google.android.gms.internal.firebase-perf.zzbu$zza r3 = r3.zzw(r4) // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n long r6 = r6 + r8\n long r4 = r15.zzd(r6) // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n com.google.android.gms.internal.firebase-perf.zzbu$zza r3 = r3.zzv(r4) // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n com.google.android.gms.internal.firebase-perf.zzga r3 = r3.zzhr() // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n com.google.android.gms.internal.firebase-perf.zzep r3 = (com.google.android.gms.internal.p000firebaseperf.zzep) r3 // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n com.google.android.gms.internal.firebase-perf.zzbu r3 = (com.google.android.gms.internal.p000firebaseperf.zzbu) r3 // Catch:{ Throwable -> 0x006c, all -> 0x0069 }\n r2.close() // Catch:{ IOException -> 0x00a4, ArrayIndexOutOfBoundsException -> 0x0085, NumberFormatException -> 0x0083, NullPointerException -> 0x0081 }\n return r3\n L_0x0069:\n r3 = move-exception\n r4 = r1\n goto L_0x0072\n L_0x006c:\n r3 = move-exception\n throw r3 // Catch:{ all -> 0x006e }\n L_0x006e:\n r4 = move-exception\n r14 = r4\n r4 = r3\n r3 = r14\n L_0x0072:\n if (r4 == 0) goto L_0x007d\n r2.close() // Catch:{ Throwable -> 0x0078 }\n goto L_0x0080\n L_0x0078:\n r2 = move-exception\n com.google.android.gms.internal.p000firebaseperf.zzak.zza(r4, r2) // Catch:{ IOException -> 0x00a4, ArrayIndexOutOfBoundsException -> 0x0085, NumberFormatException -> 0x0083, NullPointerException -> 0x0081 }\n goto L_0x0080\n L_0x007d:\n r2.close() // Catch:{ IOException -> 0x00a4, ArrayIndexOutOfBoundsException -> 0x0085, NumberFormatException -> 0x0083, NullPointerException -> 0x0081 }\n L_0x0080:\n throw r3 // Catch:{ IOException -> 0x00a4, ArrayIndexOutOfBoundsException -> 0x0085, NumberFormatException -> 0x0083, NullPointerException -> 0x0081 }\n L_0x0081:\n r2 = move-exception\n goto L_0x0086\n L_0x0083:\n r2 = move-exception\n goto L_0x0086\n L_0x0085:\n r2 = move-exception\n L_0x0086:\n java.lang.String r3 = \"Unexpected '/proc/[pid]/stat' file format encountered: \"\n java.lang.String r2 = r2.getMessage()\n java.lang.String r2 = java.lang.String.valueOf(r2)\n int r4 = r2.length()\n if (r4 == 0) goto L_0x009b\n java.lang.String r2 = r3.concat(r2)\n goto L_0x00a0\n L_0x009b:\n java.lang.String r2 = new java.lang.String\n r2.<init>(r3)\n L_0x00a0:\n android.util.Log.w(r0, r2)\n goto L_0x00c2\n L_0x00a4:\n r2 = move-exception\n java.lang.String r3 = \"Unable to read 'proc/[pid]/stat' file: \"\n java.lang.String r2 = r2.getMessage()\n java.lang.String r2 = java.lang.String.valueOf(r2)\n int r4 = r2.length()\n if (r4 == 0) goto L_0x00ba\n java.lang.String r2 = r3.concat(r2)\n goto L_0x00bf\n L_0x00ba:\n java.lang.String r2 = new java.lang.String\n r2.<init>(r3)\n L_0x00bf:\n android.util.Log.w(r0, r2)\n L_0x00c2:\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.p000firebaseperf.zzap.zzw():com.google.android.gms.internal.firebase-perf.zzbu\");\n }", "private static int benchmarkedMethod() {\n return 3;\n }", "private double getOEEPerformance(Batch batch) {\n return 1;\n }", "public static void main(String[] args) {\n\n Set<Long> ids = LongStream.range(0, 1_000_000).boxed().collect(Collectors.toSet());\n // HashSet\n // ArrayList\n // Long[]\n // long[]\n // int[]\n // LinkedList\n System.out.println(\"Allocated!\");\n\n System.out.println(PerformanceUtil.getUsedHeap());\n }", "private void baseAlgorithm() {\n\t\tlong start = System.nanoTime();\n\t\tinitCentroids();\n\t\tint counter = 0;\n\t\twhile (counter < 1000\n\t\t\t\t&& (lastCentroids == null || !SeriesComparator.equalClustering(lastCentroids, centroids))) {\n\t\t\tresetClusters();\n\t\t\tassignPoints();\n\t\t\tlastCentroids = new ArrayList<Point2D>(centroids);\n\t\t\tcalculateNewMean();\n\t\t\tbasicIterations++;\n\t\t\tcounter++;\n\t\t}\n\t\tconvertToClustering();\n\t\tbasicRuntime = System.nanoTime() - start;\n\t}", "public long estimateSize() {\n/* 1448 */ return this.est;\n/* */ }", "public void summarizeSpaceEfficient() {\n int maxLevel = Collections.max(CALattice.levelMap.keySet());\n for (int i = maxLevel; i >= 0; i--) {\n summarizeSpaceEfficientHelper(CALattice.levelMap.get(i));\n //freeing memory\n if (i < maxLevel)\n freeMemory(CALattice.levelMap.get(i + 1));\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tint A[]= new int[100000000];\n\t\tfor(int i = 0; i < 100000000; i++) {\n\t\t A[i] = (int)(Math.random() * 100) + 1;\n }\n double duration = 0;\n long end = 0;\n long start = 0;\n start = System.currentTimeMillis();\n System.out.println(start);\n MinValueIndex(A, 6);\n end = System.currentTimeMillis();\n\t\tduration = end-start;\n\t\tSystem.out.println(end); \n\t\tduration = duration / 5;\n\t\tSystem.out.println(duration);\n\t}", "public static void main(String[] args) throws Exception {\n \r\n long beginTime = System.nanoTime();\r\n for (int i = 0; i < 50000000; i++) {\r\n// System.out.println(getFlowNo());\r\n getFlowNo();\r\n \r\n }\r\n long endTime = System.nanoTime();\r\n System.out.println(\"onLineWithTransaction cost:\"+((endTime-beginTime)/1000000000) + \"s \" + ((endTime-beginTime)%1000000000) + \"us\");\r\n// \r\n// System.out.println(System.currentTimeMillis());\r\n// TimeUnit.SECONDS.sleep(3);\r\n// System.out.println(System.currentTimeMillis());\r\n }", "private long getMemoryFootprint() {\n Runtime runtime = Runtime.getRuntime();\n long memAfter = runtime.totalMemory() - runtime.freeMemory();\n long memBefore = memAfter + 1;\n while (memBefore != memAfter) {\n memBefore = memAfter;\n System.gc();\n memAfter = runtime.totalMemory() - runtime.freeMemory();\n }\n return memAfter;\n }", "public static void main(String[] args) { int n = 100000000;\n// Integer[] array = ArrayGenerator.randomGenerator(n, n);\n// Integer[] arr = Arrays.copyOf(array, array.length);\n// PerformanceSort.test(\"QuickSort\", array);\n// PerformanceSort.test(\"MergeSort\", arr);\n// Integer[] array1 = ArrayGenerator.orderGenerator(n);\n// Integer[] arr1 = Arrays.copyOf(array1, array1.length);\n// PerformanceSort.test(\"QuickSort\", array1);\n// PerformanceSort.test(\"MergeSort\", arr1);\n//\n int n = 5000000;\n Integer[] array = ArrayGenerator.randomGenerator(n, 3);\n Integer[] arr = Arrays.copyOf(array, array.length);\n\n PerformanceSort.test(\"QuickSort3\", array);\n PerformanceSort.test(\"QuickSort2\", arr);\n// Integer[] array = new Integer[]{1, 8, 7, 6, 4};\n// PerformanceSort.test(\"QuickSort2\", array);\n\n }", "public static void concurrency() {\n List<String> words = new ArrayList<>();\n for (int i = 0; i < 500000; i++)\n words.add(UUID.randomUUID().toString());\n\n //Groups the list into a map of strings by length in serial\n long t2s = System.nanoTime();\n Map<Integer, List<String>> a = words.stream()\n .collect(Collectors.groupingBy(String::length));\n long t2d = System.nanoTime() - t2s;\n\n //Groups the list into a map of strings by length in parallel\n long t1s = System.nanoTime();\n ConcurrentMap<Integer, List<String>> b = words.parallelStream()\n .collect(Collectors.groupingByConcurrent(String::length));\n long t1d = System.nanoTime() - t1s;\n\n System.out.println(\"Collect Serial time : \" + t2d);\n System.out.println(\"Collect Parallel time : \" + t1d);\n }", "private double loadFactor()\n {\n double bucketsLength = buckets.length;\n return currentSize / bucketsLength;\n }", "public static void main(String[] args) {\r\n System.out.println(\"Digite el numero de abejas\");\r\n Scanner scan = new Scanner(System.in);\r\n int numberOfBees = scan.nextInt();\r\n long mb = 1024 * 1024;\r\n Runtime runtime = Runtime.getRuntime();\r\n if (numberOfBees > 5000) {\r\n CollisionPrevention3D test = new CollisionPrevention3D(numberOfBees);\r\n test.readFile();\r\n long startMemory = (runtime.totalMemory() - runtime.freeMemory()) / mb;\r\n long startTime = System.currentTimeMillis();\r\n test.addBeesToMatrix();\r\n test.detectCollisions();\r\n long estimatedTime = System.currentTimeMillis() - startTime;\r\n long finalMemory = (runtime.totalMemory() - runtime.freeMemory()) / mb;\r\n long estimatedMemory = (finalMemory - startMemory);\r\n test.saveFile();\r\n System.out.println(\"El algoritmo tomo un tiempo de: \" + estimatedTime + \" ms\");\r\n System.out.println(\"El algoritmo El algoritmo usó : \" + estimatedMemory + \" mb\");\r\n } else {\r\n CollisionPrevention test2 = new CollisionPrevention(numberOfBees);\r\n test2.leerArchivo();\r\n long startMemory2 = (runtime.totalMemory() - runtime.freeMemory()) / mb;\r\n long startTime2 = System.currentTimeMillis();\r\n test2.detectarColisiones();\r\n long estimatedTime2 = System.currentTimeMillis() - startTime2;\r\n test2.guardarArchivo();\r\n long finalMemory2 = (runtime.totalMemory() - runtime.freeMemory()) / mb;\r\n long estimatedMemory2 = (finalMemory2 - startMemory2);\r\n System.out.println(\"El algoritmo tomo un tiempo de: \" + estimatedTime2 + \" ms\");\r\n System.out.println(\"El algoritmo usó : \" + estimatedMemory2 + \" mb\");\r\n }\r\n }", "@Override public short getComplexity() {\n return 0;\n }", "@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}", "@Override\n\tpublic double cost() {\n\t\treturn 10000;\n\t}", "private void collectCpuMemoryUsage(){\r\n\t\tHmDomain hmDomain = CacheMgmt.getInstance().getCacheDomainByName(\"home\");\r\n\t\tfloat cpuUsage = LinuxSystemInfoCollector.getInstance().getCpuInfo() * 100;\r\n\t\tfloat memoryUsage = 0;\r\n\t\ttry {\r\n\t\t\tlong count[] = LinuxSystemInfoCollector.getInstance().getMemInfo();\r\n\t\t\tif(count[0] != 0){\r\n\t\t\t\tmemoryUsage = ((float)(count[0] - count[1] - count[2] - count[3]) * 100 / count[0]);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tBeLogTools.error(HmLogConst.M_PERFORMANCE,\"calculate memory usage failure.\", e);\r\n\t\t}\r\n\t\tCpuMemoryUsage cmu = new CpuMemoryUsage();\r\n\t\tcmu.setCpuUsage(cpuUsage);\r\n\t\tcmu.setMemUsage(memoryUsage);\r\n\t\tcmu.setOwner(hmDomain);\r\n\t\tcmu.setTimeStamp((new Date()).getTime());\r\n\t\ttry {\r\n\t\t\tQueryUtil.createBo(cmu);\r\n\t\t} catch (Exception e) {\r\n\t\t\tBeLogTools.error(HmLogConst.M_PERFORMANCE,\"create CpuMemoryUsage failure.\", e);\r\n\t\t}\r\n\t}", "@Override\n public void onLowMemory() {\n \tsuper.onLowMemory();\n }", "protected int getTimesOptimized()\r\n {\r\n return timesOptimized;\r\n }", "public static void main(String[] args) {\n\n printMemory();\n\n byte[] buf1 = new byte[1*1024*1024];\n printMemory(\"分配1M内存\");\n\n byte[] buf2 = new byte[4*1024*1024];\n printMemory(\"分配4M内存\");\n }", "public static void main(String[] args){\n\t\tint increment=1;\n\t\tfor(int m=0;m<=5000;m+=increment){\n\t\t\tif(m==10)\n\t\t\t\tincrement=5;\n\t\t\tif(m==100)\n\t\t\t\tincrement=100;\n\t\t\tif(m==500)\n\t\t\t\tincrement=500;\n\n\t\t\tfor(int l=0;l<30;++l){\n\t\t\t\tdouble[][][] AFFINITY3=new double[Task.TYPES_OF_TASK_NUMBER][Task.TYPES_OF_TASK_NUMBER][Task.TYPES_OF_TASK_NUMBER];\n\t\t\t\tRandom r=new Random(l);\n\t\t\t\tdouble affinity;\n\t\t\t\tfor(int i=0;i<Task.TYPES_OF_TASK_NUMBER;++i){\n\t\t\t\t\tfor(int j=0;j<Task.TYPES_OF_TASK_NUMBER;++j){\n\t\t\t\t\t\tfor(int k=0;k<Task.TYPES_OF_TASK_NUMBER;++k){\n\t\t\t\t\t\t\tdo{\n\t\t\t\t\t\t\t\taffinity=r.nextDouble();\n\t\t\t\t\t\t\t}while(affinity==0);\n\t\t\t\t\t\t\tAFFINITY3[i][j][k]=AFFINITY3[i][k][j]=AFFINITY3[k][i][j]=AFFINITY3[j][i][k]=AFFINITY3[k][j][i]=AFFINITY3[j][k][i]=affinity;\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tList<Node> infrastructure=new ArrayList<>();\n\t\t\t\tfor(int i=0; i<TEST_NUMBER_OF_NODES;++i)\n\t\t\t\t\tinfrastructure.add(new Node(TEST_NUMBER_OF_CORES, TEST_RAM_SIZE));\n\t\t\t\tList<Task> tasks=new ArrayList<>();\n\t\t\t\tTaskType[] types=TaskType.values();\n\t\t\t\tfor(int i=0;i<TEST_NUMBER_OF_PROCESS;++i){\n\t\t\t\t\tTaskType type=types[r.nextInt(Task.TYPES_OF_TASK_NUMBER)];\n\t\t\t\t\tint instanceNumber=r.nextInt(101)+10;//from 10 to 100 instances\n\t\t\t\t\tint coresPerInstance=r.nextInt(12)+1;//from 1 to 12\n\t\t\t\t\tint ramPerinstance=r.nextInt(12*1024+101)+100;//from 100MB to 12GB\n\t\t\t\t\tdouble baseTime=r.nextInt(10001)+1000;//from 100 cycles to 1000\n\t\t\t\t\ttasks.add(new Task(type,instanceNumber,coresPerInstance,ramPerinstance,baseTime));\n\t\t\t\t}\n\t\t\t\tList<Integer> arrivalOrder=new ArrayList<>();\n\t\t\t\tint tasksSoFar=0;\n\t\t\t\tdo{\n\t\t\t\t\ttasksSoFar+=r.nextInt(11);\n\t\t\t\t\tarrivalOrder.add((tasksSoFar<tasks.size())?tasksSoFar:tasks.size());\n\t\t\t\t}while(tasksSoFar<tasks.size());\n\t\t\t\tfinal Scheduler scheduler=new AffinityAwareFifoScheduler(tasks, arrivalOrder, infrastructure,AFFINITY3,AffinityType.NORMAL,m);\n\t\t\t\tThread t=new Thread(new Runnable() {\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tscheduler.runScheduler();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tt.start();\n\t\t\t\ttry {\n\t\t\t\t\tt.join();\n\t\t\t\t} catch (InterruptedException 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\tSystem.out.println(\"Finished running.\");\n\t\t\t}\n\t\t}\n\t}", "public static void startTimeMeasure() {\n \tstartTime = System.nanoTime();\n }", "public static int performanceCountGet() { return 0; }", "@Override\n public int estimateSize() {\n return 8 + 8 + 1 + 32 + 64;\n }", "private CostHelper() {}", "@Test\n\tpublic void testPerformance()\n\t{\n\t\tString\t\ttestName\t= logTestName();\n\n\t\tint\t\tcPass\t\t\t= 5;\n\t\tint\t\tiMax\t\t\t= 1000 * 1000;\n//\t\tint[]\tcThreadList\t\t= { 1, 2, 4, 6, 8 };\n\t\tint[]\tcThreadList\t\t= { 1, 2, 4 };\n\n\t\tStringGroup\t\t\t\tnameList\t\t\t= new StringGroup(testName);\n\t\tLockCounterFamily\t\tcounterFamily\t\t= new LockCounterFamily(nameList);\n\t\tMagicNamedCounter\t\tnamedCounter\t\t= new MagicNamedCounter(counterFamily);\n\t\tfor (int cThread : cThreadList)\n\t\t{\n\t\t\tmeasurePerformance(new SynchronizedCounter(),\tcPass, iMax, cThread);\n\t\t\tmeasurePerformance(new AtomicCounter(),\t\t\tcPass, iMax, cThread);\n\t\t\tmeasurePerformance(new MagicReadCounter(),\t\tcPass, iMax, cThread);\n\t\t\tmeasurePerformance(new PlainWriteCounter(),\t\tcPass, iMax / 20, cThread);\n\t\t\tmeasurePerformance(new MagicWriteCounter(),\tcPass, iMax, cThread);\n\n\t\t\tmeasurePerformance(namedCounter,\t\t\tcPass, iMax, cThread);\n\t\t}\n\t}", "public interface MemoryInstrumentation {\n\n\n /**\n * Returns an <i>estimate</i> of the total bytes of memory that has been allocated by this instance. The return value is equal to the sum\n * of the values returned by {@link #memoryUsed()} and {@link #memoryUnused()}.\n * <p>\n * This value must be estimated because actual memory consumed is different for different CPU architectures and Java runtime implementations,\n * and possibly even on flags used to invoke the runtime.\n *\n * @return the estimated bytes of memory allocated by this instance\n */\n long memoryAllocated();\n\n\n /**\n * Returns an <i>estimate</i> of the total bytes of memory actually in use by this instance.\n * <p>\n * This value must be estimated because actual memory consumed is different for different CPU architectures and Java runtime implementations,\n * and possibly even on flags used to invoke the runtime.\n *\n * @return the estimated bytes of memory actually in use by this instance\n */\n long memoryUsed();\n\n\n /**\n * Returns an <i>estimate</i> of the total bytes of memory allocated, but not actually in use by this instance.\n * <p>\n * This value must be estimated because actual memory consumed is different for different CPU architectures and Java runtime implementations,\n * and possibly even on flags used to invoke the runtime.\n *\n * @return the estimated bytes of memory allocated but not in use by this instance\n */\n long memoryUnused();\n}", "@Test\n public void testMemoryMetric() {\n MetricValue mv = new MetricValue.Builder().load(40).add();\n\n MEMORY_METRICS.forEach(cmt -> testUpdateMetricWithoutId(cmt, mv));\n MEMORY_METRICS.forEach(cmt -> testLoadMetric(nodeId, cmt, mv));\n }", "private void setMemorySize() { }", "public static void main(String[] args) {\n Car car1 = new Car(\"mersedes\");\n Car car2 = new Car(\"bmw\");\n Car car3 = new Car(\"\");\n\n car1.setColor(\"black\");\n car2.setColor(\"red\");\n while (car2.speed<100) {\n car2.accelerate(10);\n }\n car2.accelerate(200);\n System.out.println(car2.speed);\n\n while (car1.speed>0) {\n car1.slowDown(1);\n }\n System.out.println(car1.speed);\n printMemory();\n\n Car[][] Cars = new Car[10000][10000];\n for(int i=0;i<1010;i++){\n Cars[1][i] = new Car(\"nnn\");\n }\n printMemory();\n Runtime.getRuntime().gc();\n printMemory();\n }", "@Override\n public int getCacheSize() {\n return 4 * 1024 * 1024;\n }", "@Ignore(\"Google's LRU map max size is not predictable\")\n\t@Override\n\tpublic void statsTest()\n\t{\n\t}", "public void test_performance_cost_Tx() throws Exception {\n // ## Arrange ##\n final String prefix = \"S\";\n\n // ## Act & Assert ##\n {\n long before = System.currentTimeMillis();\n List<Member> memberList = jdbcManager.from(Member.class).where(\"memberName like ?\", prefix + \"%\").orderBy(\n \"birthdate desc, memberId asc\").getResultList();\n long after = System.currentTimeMillis();\n log(\"1-[Performance Cost]: \" + convertToPerformanceView(before, after) + \" size=\" + memberList.size());\n }\n {\n long before = System.currentTimeMillis();\n List<Member> memberList = jdbcManager.from(Member.class).where(\"memberName like ?\", prefix + \"%\").orderBy(\n \"birthdate desc, memberId asc\").getResultList();\n long after = System.currentTimeMillis();\n log(\"2-[Performance Cost]: \" + convertToPerformanceView(before, after) + \" size=\" + memberList.size());\n }\n {\n long before = System.currentTimeMillis();\n List<Purchase> purchaseList = jdbcManager.from(Purchase.class).where(\"purchaseDatetime < ?\", new Date())\n .orderBy(\"purchaseId asc\").getResultList();\n long after = System.currentTimeMillis();\n log(\"3-[Performance Cost]: \" + convertToPerformanceView(before, after) + \" size=\" + purchaseList.size());\n }\n }", "public void a()\r\n/* 49: */ {\r\n/* 50: 64 */ HashSet<BlockPosition> localHashSet = Sets.newHashSet();\r\n/* 51: */ \r\n/* 52: 66 */ int m = 16;\r\n/* 53: 67 */ for (int n = 0; n < 16; n++) {\r\n/* 54: 68 */ for (int i1 = 0; i1 < 16; i1++) {\r\n/* 55: 69 */ for (int i2 = 0; i2 < 16; i2++) {\r\n/* 56: 70 */ if ((n == 0) || (n == 15) || (i1 == 0) || (i1 == 15) || (i2 == 0) || (i2 == 15))\r\n/* 57: */ {\r\n/* 58: 74 */ double d1 = n / 15.0F * 2.0F - 1.0F;\r\n/* 59: 75 */ double d2 = i1 / 15.0F * 2.0F - 1.0F;\r\n/* 60: 76 */ double d3 = i2 / 15.0F * 2.0F - 1.0F;\r\n/* 61: 77 */ double d4 = Math.sqrt(d1 * d1 + d2 * d2 + d3 * d3);\r\n/* 62: */ \r\n/* 63: 79 */ d1 /= d4;\r\n/* 64: 80 */ d2 /= d4;\r\n/* 65: 81 */ d3 /= d4;\r\n/* 66: */ \r\n/* 67: 83 */ float f2 = this.i * (0.7F + this.d.rng.nextFloat() * 0.6F);\r\n/* 68: 84 */ double d6 = this.e;\r\n/* 69: 85 */ double d8 = this.f;\r\n/* 70: 86 */ double d10 = this.g;\r\n/* 71: */ \r\n/* 72: 88 */ float f3 = 0.3F;\r\n/* 73: 89 */ while (f2 > 0.0F)\r\n/* 74: */ {\r\n/* 75: 90 */ BlockPosition localdt = new BlockPosition(d6, d8, d10);\r\n/* 76: 91 */ Block localbec = this.d.getBlock(localdt);\r\n/* 77: 93 */ if (localbec.getType().getMaterial() != Material.air)\r\n/* 78: */ {\r\n/* 79: 94 */ float f4 = this.h != null ? this.h.a(this, this.d, localdt, localbec) : localbec.getType().a((Entity)null);\r\n/* 80: 95 */ f2 -= (f4 + 0.3F) * 0.3F;\r\n/* 81: */ }\r\n/* 82: 98 */ if ((f2 > 0.0F) && ((this.h == null) || (this.h.a(this, this.d, localdt, localbec, f2)))) {\r\n/* 83: 99 */ localHashSet.add(localdt);\r\n/* 84: */ }\r\n/* 85:102 */ d6 += d1 * 0.300000011920929D;\r\n/* 86:103 */ d8 += d2 * 0.300000011920929D;\r\n/* 87:104 */ d10 += d3 * 0.300000011920929D;\r\n/* 88:105 */ f2 -= 0.225F;\r\n/* 89: */ }\r\n/* 90: */ }\r\n/* 91: */ }\r\n/* 92: */ }\r\n/* 93: */ }\r\n/* 94:111 */ this.j.addAll(localHashSet);\r\n/* 95: */ \r\n/* 96:113 */ float f1 = this.i * 2.0F;\r\n/* 97: */ \r\n/* 98:115 */ int i1 = MathUtils.floor(this.e - f1 - 1.0D);\r\n/* 99:116 */ int i2 = MathUtils.floor(this.e + f1 + 1.0D);\r\n/* 100:117 */ int i3 = MathUtils.floor(this.f - f1 - 1.0D);\r\n/* 101:118 */ int i4 = MathUtils.floor(this.f + f1 + 1.0D);\r\n/* 102:119 */ int i5 = MathUtils.floor(this.g - f1 - 1.0D);\r\n/* 103:120 */ int i6 = MathUtils.floor(this.g + f1 + 1.0D);\r\n/* 104:121 */ List<Entity> localList = this.d.b(this.h, new AABB(i1, i3, i5, i2, i4, i6));\r\n/* 105:122 */ Vec3 localbrw = new Vec3(this.e, this.f, this.g);\r\n/* 106:124 */ for (int i7 = 0; i7 < localList.size(); i7++)\r\n/* 107: */ {\r\n/* 108:125 */ Entity localwv = (Entity)localList.get(i7);\r\n/* 109:126 */ if (!localwv.aV())\r\n/* 110: */ {\r\n/* 111:129 */ double d5 = localwv.f(this.e, this.f, this.g) / f1;\r\n/* 112:131 */ if (d5 <= 1.0D)\r\n/* 113: */ {\r\n/* 114:132 */ double d7 = localwv.xPos - this.e;\r\n/* 115:133 */ double d9 = localwv.yPos + localwv.getEyeHeight() - this.f;\r\n/* 116:134 */ double d11 = localwv.zPos - this.g;\r\n/* 117: */ \r\n/* 118:136 */ double d12 = MathUtils.sqrt(d7 * d7 + d9 * d9 + d11 * d11);\r\n/* 119:137 */ if (d12 != 0.0D)\r\n/* 120: */ {\r\n/* 121:141 */ d7 /= d12;\r\n/* 122:142 */ d9 /= d12;\r\n/* 123:143 */ d11 /= d12;\r\n/* 124: */ \r\n/* 125:145 */ double d13 = this.d.a(localbrw, localwv.getAABB());\r\n/* 126:146 */ double d14 = (1.0D - d5) * d13;\r\n/* 127:147 */ localwv.receiveDamage(DamageSource.a(this), (int)((d14 * d14 + d14) / 2.0D * 8.0D * f1 + 1.0D));\r\n/* 128: */ \r\n/* 129:149 */ double d15 = EnchantmentProtection.a(localwv, d14);\r\n/* 130:150 */ localwv.xVelocity += d7 * d15;\r\n/* 131:151 */ localwv.yVelocity += d9 * d15;\r\n/* 132:152 */ localwv.zVelocity += d11 * d15;\r\n/* 133:154 */ if ((localwv instanceof EntityPlayer)) {\r\n/* 134:155 */ this.k.put((EntityPlayer)localwv, new Vec3(d7 * d14, d9 * d14, d11 * d14));\r\n/* 135: */ }\r\n/* 136: */ }\r\n/* 137: */ }\r\n/* 138: */ }\r\n/* 139: */ }\r\n/* 140: */ }", "int memSize() {\n // treat Code as free\n return BASE_NODE_SIZE + 3 * 4;\n }", "public final long mo20953WW() {\n AppMethodBeat.m2504i(60318);\n if (fXT <= 0) {\n fXT = ((ActivityManager) C4996ah.getContext().getSystemService(\"activity\")).getLargeMemoryClass();\n }\n if (fXT >= 512) {\n AppMethodBeat.m2505o(60318);\n return 41943040;\n }\n AppMethodBeat.m2505o(60318);\n return 20971520;\n }", "private static void testAlgorithmOptimality() {\n AlgoFunction testAlgo = SG16Algorithm::new;\n\n //printSeed = false; // keep this commented out.\n Random seedRand = new Random(1241);\n int initial = seedRand.nextInt();\n for (int i=0; i<50000000; i++) {\n int sizeX = seedRand.nextInt(150) + 5;\n int sizeY = seedRand.nextInt(150) + 5;\n int seed = i+initial;\n int ratio = seedRand.nextInt(50) + 5;\n \n int max = (sizeX+1)*(sizeY+1);\n int p1 = seedRand.nextInt(max);\n int p2 = seedRand.nextInt(max-1);\n if (p2 == p1) {\n p2 = max-1;\n }\n \n int sx = p1%(sizeX+1);\n int sy = p1/(sizeX+1);\n int ex = p2%(sizeX+1);\n int ey = p2/(sizeX+1);\n\n double restPathLength = 0, normalPathLength = 0;\n try {\n GridGraph gridGraph = DefaultGenerator.generateSeededGraphOnly(seed, sizeX, sizeY, ratio);\n for (int iii=0;iii<300;++iii) Utility.generatePath(testAlgo, gridGraph, seedRand.nextInt(sizeX+1),seedRand.nextInt(sizeY+1),seedRand.nextInt(sizeX+1),seedRand.nextInt(sizeY+1));\n int[][] path = Utility.generatePath(testAlgo, gridGraph, sx, sy, ex, ey);\n path = Utility.removeDuplicatesInPath(path);\n restPathLength = Utility.computePathLength(gridGraph, path);\n \n path = Utility.computeOptimalPathOnline(gridGraph, sx, sy, ex, ey);\n path = Utility.removeDuplicatesInPath(path);\n normalPathLength = Utility.computePathLength(gridGraph, path);\n }catch (Exception e) {\n e.printStackTrace();\n System.out.println(\"EXCEPTION OCCURRED!\");\n System.out.println(\"Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Start = \" + sx + \",\" + sy + \" End = \" + ex + \",\" + ey);\n throw new UnsupportedOperationException(\"DISCREPANCY!!\");\n }\n \n if (Math.abs(restPathLength - normalPathLength) > 0.000001f) {\n //if ((restPathLength == 0.f) != (normalPathLength == 0.f)) {\n System.out.println(\"============\");\n System.out.println(\"Discrepancy Discovered!\");\n System.out.println(\"Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Start = \" + sx + \",\" + sy + \" End = \" + ex + \",\" + ey);\n System.out.println(\"Actual: \" + restPathLength + \" , Expected: \" + normalPathLength);\n System.out.println(restPathLength / normalPathLength);\n System.out.println(\"============\");\n throw new UnsupportedOperationException(\"DISCREPANCY!!\");\n } else {\n if (i%1000 == 999) {\n System.out.println(\"Count: \" + (i+1));\n System.out.println(\"OK: Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Actual: \" + restPathLength + \" , Expected: \" + normalPathLength);\n }\n }\n }\n }", "public static void main(String[] var0) {\n\n// for(int i =0;i<10;i++){\n// Object object = new byte[2*1024*1024];\n// map.put(i+\"\",object);\n// }\n // map =null;\n System.gc();\n// System.out.println(\"打印出了最大可用堆内存\");\n// System.out.println(\"-Xmx\" + Runtime.getRuntime().maxMemory() / 1024L / 1024L + \"M\");\n }", "private static void demoPerformance(int aNumIterations){\n\t\tStopWatch stopwatch = new StopWatch();\n\t\tint[] numbers = {1,2,3,4,5,6,7,8,9,10};\n\n\t\tstopwatch.start();\n\t\tcopyUsingClone(numbers, aNumIterations);\n\t\tstopwatch.stop();\n\t\tlog(\"Using clone: \" + stopwatch);\n\n\t\tstopwatch.reset();\n\t\tstopwatch.start();\n\t\tcopyUsingArraycopy(numbers, aNumIterations);\n\t\tstopwatch.stop();\n\t\tlog(\"Using System.arraycopy: \" + stopwatch);\n\n\t\tstopwatch.reset();\n\t\tstopwatch.start();\n\t\tcopyUsingArraysCopyOf(numbers, aNumIterations);\n\t\tstopwatch.stop();\n\t\tlog(\"Using Arrays.copyOf: \" + stopwatch);\n\n\t\tstopwatch.reset();\n\t\tstopwatch.start();\n\t\tcopyUsingForLoop(numbers, aNumIterations);\n\t\tstopwatch.stop();\n\t\tlog(\"Using for loop: \" + stopwatch);\n\t}", "private void m50366E() {\n }", "public final void mo14764a() {\n /*\n r9 = this;\n com.google.android.gms.common.util.Clock r0 = com.google.android.gms.ads.internal.zzp.zzkx()\n long r0 = r0.currentTimeMillis()\n java.lang.Object r2 = r9.f10846a\n monitor-enter(r2)\n int r3 = r9.f10847b // Catch:{ all -> 0x004d }\n int r4 = com.google.android.gms.internal.ads.C2349r5.f10765b // Catch:{ all -> 0x004d }\n if (r3 != r4) goto L_0x002c\n long r5 = r9.f10848c // Catch:{ all -> 0x004d }\n com.google.android.gms.internal.ads.zzaaq<java.lang.Long> r3 = com.google.android.gms.internal.ads.zzabf.zzcwh // Catch:{ all -> 0x004d }\n com.google.android.gms.internal.ads.zzabb r7 = com.google.android.gms.internal.ads.zzwq.zzqe() // Catch:{ all -> 0x004d }\n java.lang.Object r3 = r7.zzd(r3) // Catch:{ all -> 0x004d }\n java.lang.Long r3 = (java.lang.Long) r3 // Catch:{ all -> 0x004d }\n long r7 = r3.longValue() // Catch:{ all -> 0x004d }\n long r5 = r5 + r7\n int r3 = (r5 > r0 ? 1 : (r5 == r0 ? 0 : -1))\n if (r3 > 0) goto L_0x002c\n int r0 = com.google.android.gms.internal.ads.C2349r5.f10764a // Catch:{ all -> 0x004d }\n r9.f10847b = r0 // Catch:{ all -> 0x004d }\n L_0x002c:\n monitor-exit(r2) // Catch:{ all -> 0x004d }\n com.google.android.gms.common.util.Clock r0 = com.google.android.gms.ads.internal.zzp.zzkx()\n long r0 = r0.currentTimeMillis()\n java.lang.Object r3 = r9.f10846a\n monitor-enter(r3)\n int r2 = r9.f10847b // Catch:{ all -> 0x004a }\n r5 = 2\n if (r2 == r5) goto L_0x003f\n monitor-exit(r3) // Catch:{ all -> 0x004a }\n return\n L_0x003f:\n r2 = 3\n r9.f10847b = r2 // Catch:{ all -> 0x004a }\n int r2 = r9.f10847b // Catch:{ all -> 0x004a }\n if (r2 != r4) goto L_0x0048\n r9.f10848c = r0 // Catch:{ all -> 0x004a }\n L_0x0048:\n monitor-exit(r3) // Catch:{ all -> 0x004a }\n return\n L_0x004a:\n r0 = move-exception\n monitor-exit(r3) // Catch:{ all -> 0x004a }\n throw r0\n L_0x004d:\n r0 = move-exception\n monitor-exit(r2) // Catch:{ all -> 0x004d }\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.C2386s5.mo14764a():void\");\n }", "private static void doParallelStream() {\n ArrayList<Person> personCopy = new ArrayList<>(person);\n long l = System.currentTimeMillis();\n long ans = personCopy.parallelStream().filter(p -> p.getHeight() > 180).count();\n System.out.println(\"doParallelStream(): \" + ans);\n long e = System.currentTimeMillis();\n System.out.println(\"Cost time: \" + (e - l) + \"ms\");\n System.out.println(\"----------------------------\");\n }", "public long estimateSize() {\n/* 1338 */ return this.est;\n/* */ }", "public static void speedup(){\n\t\tif(bossair.periodairinit > Framework.nanosecond){\n\t\t\t\tbossair.periodair-=Framework.nanosecond/18; \n\t\t\t\tbossair.xmoving-=0.03; \n\t\t}\n\t\t\t\n\t}", "private static void doMemoryReleases() {\n\r\n OptimizedJavaRecognizer.releaseMemory();\r\n FastJavaLexer.clear();\r\n }", "@Test\n @Tag(\"slow\")\n public void testOSA_07() {\n CuteNetlibCase.doTest(\"OSA-07.SIF\", \"535722.517299352\", \"4332086.205299969\", NumberContext.of(7, 4));\n }", "public long estimateSize() {\n/* 1668 */ return this.est;\n/* */ }", "@Test\n @Tag(\"slow\")\n public void testOSA_14() {\n CuteNetlibCase.doTest(\"OSA-14.SIF\", \"1106462.8447362552\", \"9377699.405100001\", NumberContext.of(7, 4));\n }", "public interface MemoryEstimator {\n\n /**\n * Returns an estimate of how much memory an object consumes.\n * @param instance the object instance\n * @return the estimated memory in bytes\n */\n long getObjectSize(Object instance);\n\n\n /**\n * A MemoryEstimator implementation that leverages org.github.jamm.MemoryMeter\n */\n class DefaultMemoryEstimator implements MemoryEstimator {\n\n private Object meter;\n private Method measureDeep;\n\n /**\n * Constructor\n */\n public DefaultMemoryEstimator() {\n try {\n final Class<?> clazz = Class.forName(\"org.github.jamm.MemoryMeter\");\n final Method method = clazz.getDeclaredMethod(\"hasInstrumentation\");\n final boolean instrumentation = (Boolean) method.invoke(clazz);\n if (instrumentation) {\n this.meter = clazz.newInstance();\n this.measureDeep = clazz.getDeclaredMethod(\"measureDeep\", Object.class);\n }\n } catch (ClassNotFoundException ex) {\n System.err.println(\"Unable to initialize MemoryMeter, class not found\");\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }\n\n @Override\n public long getObjectSize(Object instance) {\n try {\n final Object result = measureDeep != null ? measureDeep.invoke(meter, instance) : -1;\n return result instanceof Number ? ((Number)result).longValue() : -1;\n } catch (Exception ex) {\n throw new RuntimeException(\"Failed to measure memory for instance: \" + instance, ex);\n }\n }\n }\n\n}", "public void mo4058a() {\n imageCacheStatsTracker.mo4071e();\n }", "public long estimateSize() {\n/* 1558 */ return this.est;\n/* */ }", "public static void main(String[] args) {\n for (int N = 100; N <= 100000; N *= 10) {\n int[] nums = new int[N];\n Random random = new Random();\n for (int i = 0; i < N; i++) {\n nums[i] = random.nextInt(N * 10);\n }\n Long start = 0L, end = 0L;\n int[] quickSortArray = Arrays.copyOf(nums, nums.length);\n int[] InsertSortArray = Arrays.copyOf(nums, nums.length);\n int[] shellSortArray = Arrays.copyOf(nums, nums.length);\n int[] bubbleSortArray = Arrays.copyOf(nums, nums.length);\n int[] selectionSortArray = Arrays.copyOf(nums, nums.length);\n int[] mergeSortArray = Arrays.copyOf(nums, nums.length);\n System.out.println(\"数据量为:\" + N);\n start = System.currentTimeMillis();\n QuickSort.quickSort(quickSortArray, 0, N - 1);\n end = System.currentTimeMillis();\n System.out.println(\"快速排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n InsertSort.insertSort(InsertSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"插入排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n ShellSort.shellSort(shellSortArray, 8);\n end = System.currentTimeMillis();\n System.out.println(\"希尔排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n BubbleSort.bubbleSort(bubbleSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"冒泡排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n SelectionSort.selectionSort(selectionSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"选择排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n MergeSort.mergeSort(mergeSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"归并排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n }\n }", "public void mo4059b() {\n imageCacheStatsTracker.mo4072f();\n }", "private int m23822a() {\n int min = Math.min(this.f25314a.getMemoryClass() * 1048576, Integer.MAX_VALUE);\n if (min < 33554432) {\n return 4194304;\n }\n if (min < 67108864) {\n return 6291456;\n }\n if (VERSION.SDK_INT < 11) {\n return 8388608;\n }\n return min / 4;\n }", "public static void main(String[] args)\n {\n\tScanner sc = new Scanner(System.in);\n\tSystem.out.println(\"enter cache size in KB among (1, 2, 4, 8, 16, 32)\");\n\tint cacheSize = sc.nextInt();\n\tSystem.out.println(\"enter way associative value among(1,2,4,8)\");\n\tint wayAssociative = sc.nextInt();\n\tSystem.out.println(\"enter cache line size in bytes among(2,4,8,16,32,64)\");\n\tint cacheLineSize = sc.nextInt();\n\tsc.close();\n\n\tlong count_hit = 0, count_miss = 0;\n\tlong count_hit_2 = 0, count_miss_2 = 0, clockCycle_2 = 0;\n\tlong count_hit_4 = 0, count_miss_4 = 0, clockCycle_4 = 0;\n\tlong count_hit_8 = 0, count_miss_8 = 0, clockCycle_8 = 0;\n\n\tint numberOfCacheLines = (int) ((cacheSize * 1024) / cacheLineSize);\n\n\tArrayList<String> cacheKeys = new ArrayList<String>(numberOfCacheLines);\n\tArrayList<String> cacheValues = new ArrayList<String>(numberOfCacheLines);\n\tArrayList<String> cacheKeys_0 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_0 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_1 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_1 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_2 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_2 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_3 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_3 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_4 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_4 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_5 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_5 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_6 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_6 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_7 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_7 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\n\tlong clockCycle = 0;\n\n\tStringBuilder y = new StringBuilder(\"\");\n\n\t// creating main memory array to store all addresses in a 2d\n\t// array..mapping one\n\t// letter into one width length only..1 to 1 mapping.\n\t// so 2 width is one byte..to get value do block offset*2\n\tString[][] mainMemory = new String[1743][32];\n\tfor (int i = 0; i < 1743; i++)\n\t{\n\t for (int j = 0; j < 32; j++)\n\t {\n\t\tmainMemory[i][j] = \"\";\n\t }\n\t}\n\ttry\n\t{\n\t // read all input files\n\t\tString instructionAddresses = new String(\n\t\t\t\tFiles.readAllBytes(Paths\n\t\t\t\t\t\t.get(\"/Users/akashmalla/Documents/COEN210_Computer_Architecture/project1/inst_addr_trace_hex_project_1.txt\")));\n\t\tString dataSizes = new String(\n\t\t\t\tFiles.readAllBytes(Paths\n\t\t\t\t\t\t.get(\"/Users/akashmalla/Documents/COEN210_Computer_Architecture/project1/inst_data_size_project_1.txt\")));\n\t\tString memoryAddresses = new String(\n\t\t\t\tFiles.readAllBytes(Paths\n\t\t\t\t\t\t.get(\"/Users/akashmalla/Documents/COEN210_Computer_Architecture/project1/inst_mem_hex_16byte_wide.txt\")));\n\t\t// copy all memory addresses into the 2d mainMemory array\n\t\t// split into each line of address\n\n\t String[] memoryAddress = memoryAddresses.split(\"\\\\s+\");\n\t for (int i = 0; i < 1743; i++)\n\t {\n\t\t// split address into each letter\n\t\tString[] oneBit = memoryAddress[i].split(\"\");\n\n\t\tint z = -1;\n\n\t\tfor (int q = oneBit.length - 1; q >= 0; q--)\n\t\t{\n\t\t z++;\n\t\t // store each letter into the array as hex\n\t\t mainMemory[i][q] = oneBit[z];\n\t\t}\n\t }\n\n\t // splitting the instruction addresses into lines\n\t String[] instructionAddress = instructionAddresses.split(\"\\\\s+\");\n\n\t // splitting dataSizes to get length of each data\n\t String[] dataSize = dataSizes.split(\"\\\\s+\");\n\t for (int i = 0; i < instructionAddress.length; i++)\n\t {\n\t\ttry\n\t\t{\n\t\t String binaryIs = \"\";\n\t\t String binaryOffset = \"\";\n\t\t String blockNumber = \"\";\n\t\t if (Integer.parseInt(instructionAddress[i], 16) > 15)\n\t\t {\n\t\t\tbinaryIs = Integer.toBinaryString(Integer.parseInt(instructionAddress[i], 16));\n\t\t\tbinaryOffset = binaryIs.substring(binaryIs.length() - 4);\n\t\t\tblockNumber = binaryIs.substring(0, binaryIs.length() - 4);\n\t\t } else\n\t\t {\n\n\t\t\tblockNumber = \"0\";\n\t\t\tbinaryOffset = Integer.toBinaryString(Integer.parseInt(instructionAddress[i], 16));\n\t\t }\n\n\t\t // check if hit or miss for 1 way\n\t\t if (wayAssociative == 1)\n\t\t {\n\n\t\t\tif (cacheKeys.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t{\n\t\t\t // cache hit situation\n\t\t\t count_hit++;\n\t\t\t clockCycle++;\n\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t // cache miss\n\t\t\t count_miss++;\n\t\t\t clockCycle += 15;\n\n\t\t\t // replacement for direct mapping.\n\n\t\t\t int newBlockNumber_Value = Integer.parseInt(blockNumber, 2);\n\t\t\t int newOffset_StartingPosition = (Integer.parseInt(binaryOffset, 2) * 2);\n\t\t\t int length = Integer.parseInt(dataSize[i]);\n\n\t\t\t y.append(mainMemory[newBlockNumber_Value][newOffset_StartingPosition]);\n\n\t\t\t int p = -1, beta = 0;\n\t\t\t for (int alpha = 1; alpha < length; alpha++)\n\t\t\t {\n\n\t\t\t\tif ((alpha + newOffset_StartingPosition) % 31 == 0)\n\t\t\t\t{\n\n\t\t\t\t newBlockNumber_Value++;\n\t\t\t\t newOffset_StartingPosition = 0;\n\t\t\t\t beta = length - alpha;\n\n\t\t\t\t if (p < beta)\n\t\t\t\t {\n\t\t\t\t\tp++;\n\t\t\t\t\ty.append(mainMemory[newBlockNumber_Value][p + newOffset_StartingPosition]);\n\t\t\t\t }\n\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t y.append(mainMemory[newBlockNumber_Value][alpha + newOffset_StartingPosition]);\n\t\t\t\t}\n\t\t\t }\n\n\t\t\t y = y.reverse();\n\n\t\t\t // if y is more than one byte then put it in next cache line\n\t\t\t if (y.length() > 4)\n\t\t\t {\n\n\t\t\t\tfor (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t{\n\t\t\t\t String yy = y.substring(o, o + 4);\n\n\t\t\t\t cacheKeys.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t cacheValues.add(yy);\n\n\t\t\t\t}\n\t\t\t } else\n\t\t\t {\n\n\t\t\t\tif (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t{\n\t\t\t\t cacheKeys.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t cacheValues.add(y.toString());\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t // System.out.println(\"cache is full...\");\n\n\t\t\t\t}\n\n\t\t\t }\n\n\t\t\t}\n\n\t\t\ty.delete(0, y.length());\n\n\t\t }\n\n\t\t else if (wayAssociative > 1)\n\t\t {\n\n\t\t\tif (wayAssociative == 2)\n\t\t\t{\n\n\t\t\t if (cacheKeys_0.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || (cacheKeys_1.contains(blockNumber + \",\" + binaryOffset)))\n\t\t\t {\n\t\t\t\t// cache hit situation\n\t\t\t\tcount_hit_2++;\n\t\t\t\tclockCycle_2++;\n\n\t\t\t }\n\n\t\t\t else\n\t\t\t {\n\t\t\t\t// cache miss\n\t\t\t\tcount_miss_2++;\n\t\t\t\tclockCycle_2 += 15;\n\n\t\t\t\t// replacement\n\t\t\t\tint newBlockNumber_Value = Integer.parseInt(blockNumber, 2);\n\t\t\t\tint newOffset_StartingPosition = (Integer.parseInt(binaryOffset, 2) * 2);\n\t\t\t\tint length = Integer.parseInt(dataSize[i]);\n\n\t\t\t\ty.append(mainMemory[newBlockNumber_Value][newOffset_StartingPosition]);\n\n\t\t\t\tint p = -1, beta = 0;\n\t\t\t\tfor (int alpha = 1; alpha < length; alpha++)\n\t\t\t\t{\n\n\t\t\t\t if ((alpha + newOffset_StartingPosition) % 31 == 0)\n\t\t\t\t {\n\n\t\t\t\t\tnewBlockNumber_Value++;\n\t\t\t\t\tnewOffset_StartingPosition = 0;\n\t\t\t\t\tbeta = length - alpha;\n\n\t\t\t\t\tif (p < beta)\n\t\t\t\t\t{\n\t\t\t\t\t p++;\n\t\t\t\t\t y.append(mainMemory[newBlockNumber_Value][p + newOffset_StartingPosition]);\n\t\t\t\t\t}\n\n\t\t\t\t } else\n\t\t\t\t {\n\t\t\t\t\ty.append(mainMemory[newBlockNumber_Value][alpha + newOffset_StartingPosition]);\n\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\ty = y.reverse();\n\n\t\t\t\tif (i % wayAssociative == 0)\n\t\t\t\t{\n\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tif (cacheKeys.size() <= numberOfCacheLines)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t cacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\t cacheValues_0.add(yy);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_0.add(y.toString());\n\t\t\t\t\t}\n\t\t\t\t } else\n\t\t\t\t {\n\t\t\t\t\t// System.out.println(\"cache is full...\");\n\n\t\t\t\t }\n\n\t\t\t\t}\n\n\t\t\t\telse if (i % wayAssociative == 1)\n\t\t\t\t{\n\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_1.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_1.add(y.toString());\n\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t// System.out.println(\"cache is full...\");\n\n\t\t\t\t }\n\n\t\t\t\t}\n\n\t\t\t }\n\n\t\t\t y.delete(0, y.length());\n\n\t\t\t}\n\n\t\t\t// way =4\n\t\t\tif (wayAssociative == 4)\n\t\t\t{\n\n\t\t\t if (cacheKeys_0.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || cacheKeys_1.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || cacheKeys_2.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || cacheKeys_3.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t {\n\t\t\t\t// cache hit situation\n\t\t\t\tcount_hit_4++;\n\t\t\t\tclockCycle_4++;\n\n\t\t\t }\n\n\t\t\t else\n\t\t\t {\n\t\t\t\t// cache miss\n\t\t\t\tcount_miss_4++;\n\t\t\t\tclockCycle_4 += 15;\n\n\t\t\t\t// replacement\n\t\t\t\tint newBlockNumber_Value = Integer.parseInt(blockNumber, 2);\n\t\t\t\tint newOffset_StartingPosition = (Integer.parseInt(binaryOffset, 2) * 2);\n\t\t\t\tint length = Integer.parseInt(dataSize[i]);\n\n\t\t\t\ty.append(mainMemory[newBlockNumber_Value][newOffset_StartingPosition]);\n\n\t\t\t\tint p = -1, beta = 0;\n\t\t\t\tfor (int alpha = 1; alpha < length; alpha++)\n\t\t\t\t{\n\n\t\t\t\t if ((alpha + newOffset_StartingPosition) % 31 == 0)\n\t\t\t\t {\n\n\t\t\t\t\tnewBlockNumber_Value++;\n\t\t\t\t\tnewOffset_StartingPosition = 0;\n\t\t\t\t\tbeta = length - alpha;\n\n\t\t\t\t\tif (p < beta)\n\t\t\t\t\t{\n\t\t\t\t\t p++;\n\t\t\t\t\t y.append(mainMemory[newBlockNumber_Value][p + newOffset_StartingPosition]);\n\t\t\t\t\t}\n\n\t\t\t\t } else\n\t\t\t\t {\n\t\t\t\t\ty.append(mainMemory[newBlockNumber_Value][alpha + newOffset_StartingPosition]);\n\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\ty = y.reverse();\n\n\t\t\t\tif (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t{\n\n\t\t\t\t if (i % wayAssociative == 0)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_0.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_0.add(y.toString());\n\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t // mod 1\n\t\t\t\t else if (i % wayAssociative == 1)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_1.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_1.add(y.toString());\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t // mod 2\n\t\t\t\t else if (i % wayAssociative == 2)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_2.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_2.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_2.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_2.add(y.toString());\n\t\t\t\t\t } else\n\t\t\t\t\t {\n\t\t\t\t\t\t// System.out.println(\"cache is full...\");\n\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // mmod 3\n\t\t\t\t else if (i % wayAssociative == 3)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_3.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_3.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_3.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_3.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t}\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t // System.out.println(\"cache is full...\");\n\n\t\t\t\t}\n\n\t\t\t }\n\n\t\t\t y.delete(0, y.length());\n\n\t\t\t}\n\n\t\t\telse if (wayAssociative == 8)\n\t\t\t{\n\n\t\t\t if (cacheKeys_0.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || (cacheKeys_1.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || (cacheKeys_3.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || (cacheKeys_3.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || cacheKeys_4.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || (cacheKeys_5.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || (cacheKeys_7.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || (cacheKeys_6.contains(blockNumber + \",\" + binaryOffset)))\n\t\t\t {\n\t\t\t\t// cache hit situation\n\t\t\t\tcount_hit_8++;\n\t\t\t\tclockCycle_8++;\n\n\t\t\t }\n\n\t\t\t else\n\t\t\t {\n\t\t\t\t// cache miss\n\t\t\t\tcount_miss_8++;\n\t\t\t\tclockCycle_8 += 15;\n\n\t\t\t\t// replacement\n\n\t\t\t\tint newBlockNumber_Value = Integer.parseInt(blockNumber, 2);\n\t\t\t\tint newOffset_StartingPosition = (Integer.parseInt(binaryOffset, 2) * 2);\n\t\t\t\tint length = Integer.parseInt(dataSize[i]);\n\n\t\t\t\ty.append(mainMemory[newBlockNumber_Value][newOffset_StartingPosition]);\n\n\t\t\t\tint p = -1, beta = 0;\n\t\t\t\tfor (int alpha = 1; alpha < length; alpha++)\n\t\t\t\t{\n\n\t\t\t\t if ((alpha + newOffset_StartingPosition) % 31 == 0)\n\t\t\t\t {\n\n\t\t\t\t\tnewBlockNumber_Value++;\n\t\t\t\t\tnewOffset_StartingPosition = 0;\n\t\t\t\t\tbeta = length - alpha;\n\n\t\t\t\t\tif (p < beta)\n\t\t\t\t\t{\n\t\t\t\t\t p++;\n\t\t\t\t\t y.append(mainMemory[newBlockNumber_Value][p + newOffset_StartingPosition]);\n\t\t\t\t\t}\n\n\t\t\t\t } else\n\t\t\t\t {\n\t\t\t\t\ty.append(mainMemory[newBlockNumber_Value][alpha + newOffset_StartingPosition]);\n\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\ty = y.reverse();\n\n\t\t\t\tif (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t{\n\n\t\t\t\t if (i % wayAssociative == 0)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_0.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_0.add(y.toString());\n\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t // mod 1\n\t\t\t\t else if (i % wayAssociative == 1)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_1.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_1.add(y.toString());\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t // mod 2\n\t\t\t\t else if (i % wayAssociative == 2)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_2.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_2.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_2.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_2.add(y.toString());\n\t\t\t\t\t } else\n\t\t\t\t\t {\n\t\t\t\t\t\t// System.out.println(\"cache is full...\");\n\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // mmod 3\n\t\t\t\t else if (i % wayAssociative == 3)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_3.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_3.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_3.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_3.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // 4\n\t\t\t\t else if (i % wayAssociative == 4)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_4.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_4.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_4.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_4.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // 5\n\t\t\t\t else if (i % wayAssociative == 5)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_5.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_5.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_5.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_5.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // 6\n\t\t\t\t else if (i % wayAssociative == 6)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_6.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_6.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_6.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_6.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // 7\n\n\t\t\t\t else if (i % wayAssociative == 7)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_7.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_7.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_7.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_7.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t //\n\t\t\t\t}\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t // System.out.println(\"cache is full...\");\n\n\t\t\t\t}\n\n\t\t\t }\n\n\t\t\t y.delete(0, y.length());\n\n\t\t\t}\n\n\t\t }\n\n\t\t // 3\n\n\t\t} catch (Exception e)\n\t\t{\n\t\t e.printStackTrace();\n\t\t}\n\n\t }\n\n\t // to print outputs\n\n\t if (wayAssociative == 1)\n\t {\n\t\tlong cache_access = count_hit + count_miss;\n\n\t\tSystem.out.println(\"Total number of cache accesses is \" + cache_access);\n\t\tSystem.out.println(\"Total number of clock cycles is \" + clockCycle);\n\t\tSystem.out.println(\"Total number of hits \" + count_hit);\n\n\t\tdouble hit_ratio = ((double) count_hit) / (count_hit + count_miss) * 100;\n\n\t\tSystem.out.println(\"cache hit ratio is \" + hit_ratio + \"%\");\n\n\t\tdouble ipc = ((double) instructionAddress.length) / clockCycle;\n\t\tSystem.out.println(\"IPC is \" + ipc);\n\t }\n\n\t else if (wayAssociative == 2)\n\t {\n\t\tlong cache_access = count_hit_2 + count_miss_2;\n\n\t\tSystem.out.println(\"Total number of cache accesses is \" + cache_access);\n\t\tSystem.out.println(\"Total number of clock cycles is \" + clockCycle_2);\n\t\tSystem.out.println(\"Total number of hits \" + count_hit_2);\n\n\t\tdouble hit_ratio = ((double) count_hit_2) / (count_hit_2 + count_miss_2) * 100;\n\n\t\tSystem.out.println(\"cache hit ratio is \" + hit_ratio + \"%\");\n\n\t\tdouble ipc = ((double) instructionAddress.length) / clockCycle_2;\n\t\tSystem.out.println(\"IPC is \" + ipc);\n\t }\n\n\t else if (wayAssociative == 4)\n\t {\n\t\tlong cache_access = count_hit_4 + count_miss_4;\n\n\t\tSystem.out.println(\"Total number of cache accesses is \" + cache_access);\n\t\tSystem.out.println(\"Total number of clock cycles is \" + clockCycle_4);\n\t\tSystem.out.println(\"Total number of hits \" + count_hit_4);\n\n\t\tdouble hit_ratio = ((double) count_hit_4) / (count_hit_4 + count_miss_4) * 100;\n\n\t\tSystem.out.println(\"cache hit ratio is \" + hit_ratio + \"%\");\n\n\t\tdouble ipc = ((double) instructionAddress.length) / clockCycle_4;\n\t\tSystem.out.println(\"IPC is \" + ipc);\n\n\t } else if (wayAssociative == 8)\n\t {\n\t\tlong cache_access = count_hit_8 + count_miss_8;\n\n\t\tSystem.out.println(\"Total number of cache accesses is \" + cache_access);\n\t\tSystem.out.println(\"Total number of clock cycles is \" + clockCycle_8);\n\t\tSystem.out.println(\"Total number of hits \" + count_hit_8);\n\n\t\tdouble hit_ratio = ((double) count_hit_8) / (count_hit_8 + count_miss_8) * 100;\n\n\t\tSystem.out.println(\"cache hit ratio is \" + hit_ratio + \"%\");\n\n\t\tdouble ipc = ((double) instructionAddress.length) / clockCycle_8;\n\t\tSystem.out.println(\"IPC is \" + ipc);\n\t }\n\n\t} catch (Exception e)\n\t{\n\t e.printStackTrace();\n\t}\n\n }", "public void testPhysicalMemoryEqualJvmAllocation() {\n String jvmOptions = \"-Xmx1024M -XX:MaxPermSize=128M\";\n GcManager gcManager = new GcManager();\n Jvm jvm = new Jvm(jvmOptions, null);\n JvmRun jvmRun = gcManager.getJvmRun(jvm, Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n jvmRun.getJvm().setPhysicalMemory(1207959552);\n jvmRun.doAnalysis();\n Assert.assertFalse(Analysis.ERROR_PHYSICAL_MEMORY + \" analysis incorrectly identified.\",\n jvmRun.getAnalysis().contains(Analysis.ERROR_PHYSICAL_MEMORY));\n }", "@Test\n\tpublic void test() {\n\t\tlong l = System.currentTimeMillis();\n\t\tForkJoinPool forkJoinPool = new ForkJoinPool();// 实现ForkJoin\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 就必须有ForkJoinPool的支持\n\t\tForkJoinTask<Long> task = new ForkJoinWork(0L, 10000000000L);// 参数为起始值与结束值\n\t\tLong invoke = forkJoinPool.invoke(task);\n\t\tlong l1 = System.currentTimeMillis();\n\t\tSystem.out.println(\"test invoke = \" + invoke + \" time: \" + (l1 - l));\n\t\t// invoke = -5340232216128654848 time: 76474\n\t}", "private double getLoadFactor() {\r\n\t\t\treturn numberOfElements / (double) currentCapacity;\r\n\t\t}", "@Override\r\n\tpublic void compute() {\n\t\t\r\n\t}", "@Override\n public void onLowMemory() {\n super.onLowMemory();\n }", "@Override\n public void onLowMemory() {\n super.onLowMemory();\n }", "BigDecimal getCacheSpaceAvailable();", "private final Map<String, String> memoryStats() {\n HashMap<String, String> map = new HashMap<String, String>();\r\n map.put(\"tableIndexChunkSize\", (!RAMIndex) ? \"0\" : Integer.toString(index.row().objectsize));\r\n map.put(\"tableIndexCount\", (!RAMIndex) ? \"0\" : Integer.toString(index.size()));\r\n map.put(\"tableIndexMem\", (!RAMIndex) ? \"0\" : Integer.toString((int) (index.row().objectsize * index.size() * kelondroRowCollection.growfactor)));\r\n return map;\r\n }", "public static void main(String s[]) throws Exception {\n Runtime rs = Runtime.getRuntime();\n System.out.println(\"Free memory in JVM before Garbage Collection = \"+rs.freeMemory());\n // gc method of RunTime class\n rs.gc();\n System.out.println(\"Free memory in JVM after Garbage Collection = \"+rs.freeMemory());\n\n }", "@Test\n public void timeAppendObject() {\n Object o =\n new Object() {\n @Override\n public String toString() {\n return \"constant\";\n }\n };\n BenchmarkState state = mPerfStatusReporter.getBenchmarkState();\n while (state.keepRunning()) {\n StringBuilder sb = new StringBuilder();\n for (int j = 0; j < mLength; ++j) {\n sb.append(o);\n }\n }\n }", "public void faster()\n {\n if(speed < 9){\n speed += 1;\n }\n }", "private void test() {\n\t\tlong startTime = System.currentTimeMillis();\n\t\tBpmnModelInstance modelInstance = Bpmn.readModelFromFile(loadedFile);\n\t\tJsonEncoder jsonEncoder = new JsonEncoder(loadedFile.getName());\n\t\tBpmnBasicMetricsExtractor basicExtractor = new BpmnBasicMetricsExtractor(modelInstance, jsonEncoder);\n\t\tBpmnAdvancedMetricsExtractor advExtractor = new BpmnAdvancedMetricsExtractor(basicExtractor, jsonEncoder);\n\t\tlong loadTime = System.currentTimeMillis() - startTime;\n//\t\tSystem.out.println(\"Tempo load del file: \" + loadTime + \"ms\");\n\t\tbasicExtractor.runMetrics();\n\t\tlong basicTime = System.currentTimeMillis() - loadTime - startTime;\n//\t\tSystem.out.println(\"Tempo calcolo metriche di base: \" + basicTime + \"ms\");\n\t\tadvExtractor.runMetrics();\n\t\tlong advTime = System.currentTimeMillis() - basicTime - startTime - loadTime;\n//\t\tSystem.out.println(\"Tempo calcolo metriche avanzate: \" + advTime + \"ms\");\n\t\tjsonEncoder.exportJson();\n\t\tMySqlInterface db = new MySqlInterface();\n\t\tdb.connect();\n//\t\tdb.createTables(jsonEncoder);\n//\t\tdb.createAndInsertMetricsInfosTable();\n//\t\tdb.saveMetrics(jsonEncoder);\n//\t\tdb.closeConnection();\n\t}", "public int getMemoryLoad() { return memoryLoad; }", "int measure();" ]
[ "0.6648994", "0.6194218", "0.6186658", "0.57810473", "0.57767236", "0.57353646", "0.57106966", "0.5700459", "0.5685124", "0.56333095", "0.5621805", "0.56211144", "0.56199837", "0.56033826", "0.55849653", "0.55849653", "0.55593073", "0.5555074", "0.5552759", "0.55501133", "0.5547486", "0.5547486", "0.55440366", "0.5534746", "0.552926", "0.55265206", "0.551957", "0.55192035", "0.55192035", "0.5512999", "0.551149", "0.5509581", "0.5509387", "0.55034316", "0.55007946", "0.54904866", "0.5477536", "0.54670566", "0.54555815", "0.5434515", "0.5427694", "0.54238105", "0.5421007", "0.5416615", "0.540882", "0.54050434", "0.53989553", "0.53962696", "0.5388114", "0.5381493", "0.5352912", "0.53516334", "0.5346166", "0.5345881", "0.5344716", "0.5343372", "0.53359914", "0.5331268", "0.5326247", "0.5324568", "0.5323431", "0.5318473", "0.5316786", "0.53146", "0.52991205", "0.52959913", "0.5294653", "0.5288694", "0.5284994", "0.5284241", "0.52797365", "0.5273967", "0.5273726", "0.52725255", "0.5271905", "0.5268303", "0.5265494", "0.5264045", "0.5262491", "0.52600527", "0.525376", "0.52508354", "0.5248665", "0.5243144", "0.5242928", "0.5231543", "0.5231271", "0.5219687", "0.52196866", "0.52195436", "0.5213707", "0.52108765", "0.52108765", "0.5209798", "0.52032804", "0.52022743", "0.5200571", "0.5197312", "0.51968265", "0.5187185", "0.51825607" ]
0.0
-1
Look through a message and if it is a command, execute the corresponding command,
void interpretMessage(final Message message);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void processMessage()\n {\n \tif(messageContents.getMessage().containsCommand())\n {\n \tCommand command = new Command(messageContents);\n CommandProcessor commandProcessor = new CommandProcessor(joeBot, command);\n commandProcessor.processCommand();\n }\n else\n {\n Speech speech = new Speech(messageContents);\n SpeechProcessor speechProcessor = new SpeechProcessor(joeBot, speech);\n speechProcessor.processSpeech();\n }\n }", "void processCommand (String command, ZMsg msg);", "private void handleCommand(Message msg, String commands) {\n String[] tokens = commands.split(\" \");\n String command = tokens[0];\n\n switch(command) {\n case \"query\":\n queryProblems(msg, tokens);\n break;\n case \"help\":\n printHelpMessage(msg, tokens);\n break;\n default:\n // Implement more commands later\n break;\n }\n }", "@Override\r\n public void onMessage(MessageEvent message) {\r\n String newMessage = message.getMessage();\r\n String response;\r\n\r\n //split the message on spaces to identify the command\r\n String[] messageArray = newMessage.split(\" \");\r\n \r\n switch (messageArray[0]) {\r\n case \"!command\":\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n if (messageArray.length == 2) {\r\n if (messageArray[1].equals(\"off\")) {\r\n commandsActive = false;\r\n } \r\n if (messageArray[1].equals(\"on\")) {\r\n commandsActive = true;\r\n }\r\n }\r\n }\r\n break;\r\n //command to make a custom command for the bot\r\n case \"!addcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = addCom(messageArray, message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to add commands.\");\r\n }\r\n }\r\n break;\r\n case \"!commands\":\r\n if (commandsActive) {\r\n if (messageArray.length ==1) {\r\n ArrayList<String> commands = manager.getCommands(message.getChannel().getName());\r\n String commandList = \"The custom commands available to everyone for this channel are: \";\r\n while (!commands.isEmpty()) {\r\n commandList += commands.remove(0) + \", \";\r\n }\r\n message.getChannel().send().message(commandList);\r\n }\r\n }\r\n break;\r\n //command to delete a custom command from the bot\r\n case \"!delcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = delCom(messageArray[1], message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to remove commands.\");\r\n }\r\n }\r\n break;\r\n //command to edit a custom command the bot has\r\n case \"!editcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = editCom(messageArray, message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to edit commands.\");\r\n }\r\n }\r\n break;\r\n\r\n //default message handling for custom commands\r\n default:\r\n if (commandsActive) {\r\n if (message.getMessage().startsWith(\"!\") && !messageArray[0].equals(\"!permit\")&& !messageArray[0].equals(\"!spam\")) {\r\n customCommands(message);\r\n }\r\n }\r\n break;\r\n }\r\n }", "@Override\n public void process(Serializable msg) {\n ((Command) msg).execute(arg);\n }", "@Override\n public void execute() {\n if(state.getState()!=1) {\n client.printParseMessage();\n return;\n } else if(inputArgs.length < 1) {\n System.out.println(client.strings.getString(\"manage_command_message\"));\n return;\n }\n try {\n client.setDraftTag(inputArgs[0]);\n channel.send(new ReadRequest(client.getDraftTag()));\n ReadReply reply = (ReadReply) channel.receive();\n if(!reply.lines.isEmpty()) {\n String replyLine = reply.lines.get(reply.lines.size() - 1);\n if(Push.CLOSE_LINE.equals(replyLine)) {\n System.out.println(client.strings.getString(\"manage_close_command_message\"));\n return;\n }\n }\n } catch (IOException | ClassNotFoundException ex) {\n Logger.getLogger(ReadCommand.class.getName())\n .log(Level.SEVERE, null, ex);\n }\n state.setState(2);\n }", "@Override\r\n\tpublic void onMessageCreate(MessageCreateEvent event) {\n\t\tif (event.getMessageContent().startsWith(\"!\") && event.getChannel().getId() == 310560101352210432L) {\r\n\t\t\t// remove prefix from string and anything after\r\n\t\t\tString command = event.getMessageContent().substring(1).split(\" \")[0].toLowerCase();\r\n\t\t\t// check if original command name\r\n\t\t\tif (commands.containsKey(command))\r\n\t\t\t\tcommands.get(command).process(event);\r\n\t\t\t// check if alternative name for command\r\n\t\t\telse if (commandAlternative.containsKey(command))\r\n\t\t\t\tcommands.get(commandAlternative.get(command)).process(event);\r\n\r\n\t\t\tlogger.info(event.getMessageAuthor().getDiscriminatedName() + \" invoked: \" + command);\r\n\t\t}\r\n\r\n\t}", "public void handleCommand(String command);", "private void customCommands(MessageEvent message) {\r\n String command = message.getMessage();\r\n \r\n if (!reservedCommands.contains(command)) {\r\n String[]info;\r\n info = manager.getCommandFromDatabase(command, message.getChannel().getName());\r\n\r\n //checks if the command is in custom mod commands\r\n if (info[1].matches(\"-m\")) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n message.getChannel().send().message(info[0]);\r\n } \r\n else {\r\n message.respond(\"You're not allowed to use this command.\");\r\n }\r\n }\r\n //checks if the command is in the custom commands available to everyone\r\n else if (info[1].matches(\"-e\")) {\r\n message.getChannel().send().message(info[0]);\r\n } \r\n else {\r\n message.respond(\"No such command exists\");\r\n }\r\n }\r\n }", "@Override\n public void onMessageReceived(@NotNull MessageReceivedEvent event) {\n String message = event.getMessage().getContentRaw().toLowerCase();\n Commands commands = Main.getBOT().getCommands();\n\n // When message is intended for bob, check it\n if (message.startsWith(\"!bob\")) {\n commands.evaluateCommand(message.replace(\"!bob \", \"\"), event);\n } else if (message.contains(\"#blamekall\")) {\n event.getChannel().sendMessage(\"NO! BE NICE! GO TO NAUGHTY JAIL!\").queue();\n event.getChannel().sendMessage(\"https://tenor.com/view/bonk-gif-18805247\").queue();\n }\n\n }", "@Override\n public void onGuildMessageReceived(@NotNull GuildMessageReceivedEvent event) {\n if (event.getAuthor().isBot()) { // ignore other bots and ourselves too\n return;\n }\n\n String[] args = event.getMessage().getContentRaw().split(\"\\\\s+\");\n\n if (args[0].startsWith(CommandHandler.prefix)) { // Check if prefix is correct\n Molly.logger.info(\"User \" + event.getAuthor().getName() + \" tried to invoke \" + args[0].substring(1).toLowerCase());\n switch (args[0].substring(1).toLowerCase()) {\n case \"info\":\n new Info(args, event).run();\n break;\n case \"summon\":\n new Summon(args, event).run();\n break;\n case \"ping\":\n new Pong(args, event).run();\n break;\n case \"sad\":\n new Sad(args, event).run();\n break;\n case \"annoy\":\n new Annoy(args, event).run();\n break;\n case \"say\":\n new Say(args, event).run();\n break;\n default:\n event.getChannel().sendMessage(\"I don't know this command. Type ** \" + CommandHandler.prefix + \"info** for a list of all commands.\").queue();\n }\n }\n }", "@Override\n public void sendMessage(String message) {\n if(\"YOURMOVE\".equals(message)) {\n makeMove();\n }\n }", "public abstract void doCommand(String command);", "public void processMessage(String message);", "@Override\n public void onMessageReceived(MessageReceivedEvent event) {\n if(event.getAuthor().isBot())\n return;\n\n Message msg = event.getMessage();\n String content = msg.getContentRaw();\n\n if(content.charAt(0) == PREFIX) {\n handleCommand(msg, content.substring(1));\n }\n }", "public void parseCommand(CommandType command) throws ExecutionException, InterruptedException {\n try {\r\n if (lock.isLocked(new UserSingleType(command.event().getMessageAuthor().asUser().get(), command.event().getServer().get()))) {\r\n command.event().getMessage().delete();\r\n return;\r\n } else if(lock.isChLocked(new UserChannelLockType(new UserSingleType(command.event().getMessageAuthor().asUser().get(), command.event().getServer().get()), command.event().getChannel()))){\r\n command.event().getMessage().delete();\r\n return;\r\n }\r\n }catch (Exception ignored){}\r\n if(command.command().startsWith(prefix)) { // to prevent expressions for unrelated messages\r\n command.api().getServerById(command.event().getServer().get().getId()).get();\r\n if (!command.event().getServer().get().hasPermission(command.api().getYourself(), PermissionType.ADMINISTRATOR)) {// Bot permissions check, without administrator access our bot should be not work\r\n command.event().getMessage().reply(\"This bot cannot be work without Administrator permission.\");\r\n return;\r\n }\r\n if (command.command().equals(prefix + commands[0])) commandAction.commandPing(command);\r\n else if (command.command().equals(prefix + commands[1])) commandAction.commandServer(command);\r\n else if (command.command().equals(prefix + commands[2])) commandAction.commandInf(command);\r\n else if (command.command().equals(prefix + commands[3])) commandAction.commandInvite(command);\r\n else if (command.command().equals(prefix + commands[4])) commandAction.commandKick(command);\r\n else if (command.command().equals(prefix + commands[5])) commandAction.commandBan(command);\r\n else if (command.command().equals(prefix + commands[6])) commandAction.commandMute(command);\r\n else if (command.command().equals(prefix + commands[7])) commandAction.commandUnMute(command);\r\n else if (command.command().equals(prefix + commands[8])) commandAction.commandDef(command);\r\n else if (command.command().equals(prefix + commands[9])) commandAction.commandUnDef(command);\r\n else if (command.command().equals(prefix + commands[10])) commandAction.commandWarn(command);\r\n else if (command.command().equals(prefix + commands[11])) commandAction.commandUnWarn(command);\r\n else if (command.command().equals(prefix + commands[12])) commandAction.commandClear(command);\r\n else if (command.command().equals(prefix + commands[13])) commandAction.commandLock(command, lock);\r\n else if (command.command().equals(prefix + commands[14])) commandAction.commandUnlock(command, lock);\r\n else if (command.command().equals(prefix + commands[15])) commandAction.commandDelete(command);\r\n else if (command.command().equals(prefix + commands[16])) commandAction.commandChLock(command, lock);\r\n else if (command.command().equals(prefix + commands[17])) commandAction.commandChUnlock(command, lock);\r\n else if (command.command().equals(prefix + commands[18])) commandAction.commandUnBanAll(command);\r\n else if (command.command().equals(prefix + commands[19])) commandAction.commandUnlockAll(command, lock);\r\n else if (command.command().equals(prefix + commands[20])) commandAction.commandSet(command);\r\n else if (command.command().equals(prefix + commands[21])) commandAction.commandHelp(command);\r\n }\r\n }", "@Override\n protected void processTileEntityMessage(LogicalSide sourceSide, TileEntity tileEntity) {\n\n if (tileEntity instanceof AbstractModBlockEntity) {\n ((AbstractModBlockEntity)tileEntity).handleCommand(sourceSide, this._name, this._parameters);\n } else {\n Log.LOGGER.error(Log.NETWORK, \"No command-aware Tile Entity found while processing a command message: skipping\");\n }\n }", "@Override\n\tpublic void onMessage(CommandMessage msg) {\n\t}", "public void command(byte[] cmdMessage) throws SAPIException{\r\n\t\t\t\t//sends command to RBNB\r\n\t\t\t\t\r\n\t\t\t\tsrcMap.PutDataAsByteArray(srcMap.GetIndex(getParameterToStringById(\"sourceChannelCommandName\")), cmdMessage); //cmds channel\t \t\r\n\t \tsrc.Flush(srcMap); \t\r\n\t\t}", "public void MessageInvitCommand(String msg)\n {\n System.out.println(\"> \"+msg);\n }", "protected abstract DispatchOutcome dispatchCommand(CommandEnvelope cmd);", "public abstract void onCommand(MessageEvent context) throws Exception;", "public static void message(Command command, String message) {\n\t\tif (command == null) return;\n\t\tcommand.getChannel().sendMessage(message).complete();\n\t}", "public void processCommand(String command, MessageReceivedEvent event){\n command = command.toLowerCase();\n String[] parsing = command.split(\" \");\n switch(parsing[1]){\n case \"new\":\n validateNewCraftEntry(parsing, event);\n break;\n case \"list\":\n generateCraftingList(event);\n break;\n case \"help\":\n showHelp(event);\n break;\n case \"listall\":\n listall(event);\n break;\n case \"cancel\":\n cancelCraft(event);\n break;\n }\n }", "public String getSniperCommandFromMessage(String message) {\n\t\t// example message-->SQLVersion: 1.1; Command: JOIN;<--\n\t\t\n\t\tfinal String ON_SEMICOLON_DELIMITER = \";\";\n\t\tString[] fields = message.split(ON_SEMICOLON_DELIMITER);\n\n\t\t/* REGEX means: the text \"Command: \", start remembering, followed by\n\t\t one of \"JOIN\" or \"BID\", stop remembering\n\t\t */\n\t\tfinal String REGEX = \"Command: (JOIN|BID)\";\n\t\tPattern pattern =\n\t\tPattern.compile(REGEX);\n\n\t\tString returnValue = null;\n\t\tfor(String field : fields) {\n\t\t\tMatcher matcher =\n\t\t\tpattern.matcher(field);\n\t\t\t\n\t\t\tif (field.contains(\"Command:\")) {\n\t\t\t \tmatcher.find();\n\t\t\t \treturnValue = matcher.group(1);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn returnValue;\n\t\t///return \"Just a plain Jane string, dear.\";\n\t}", "Command handleExecute(CommandExecute commandExecute);", "protected String processCommand(String command)\n {\n switch (command)\n {\n case \"HELLO\":\n return \"h\";\n case \"MOVE N\":\n return \"mn\";\n case \"MOVE S\":\n return \"ms\";\n case \"MOVE E\":\n return \"me\";\n case \"MOVE W\":\n return \"mw\";\n case \"PICKUP\":\n return \"p\";\n case \"LOOK\":\n return \"l\";\n case \"QUIT\":\n return \"q\";\n default:\n return \"i\";\n }\n }", "public void\n\t\t\thandleCommand(/*@ non_null */ String command);", "private void handleCommand(String command, Update update){\r\n\t\tSendMessage message= new SendMessage();\t\t\r\n\t\tLong chatId = update.getMessage().getChatId();\r\n\t\tswitch (command){\r\n\t\tcase BotConfig.START_COMMAND:\t\t\t\t\r\n\t\t\tmessage.setText(BotConfig.WELCOME_STRING);\r\n\t\t\tbreak;\r\n\t\tcase BotConfig.HELP_COMMAND:\t\t\t\r\n\t\t\tmessage.setText(BotConfig.HELP_STRING);\r\n\t\t\tbreak;\r\n\t\tcase BotConfig.POLL_COMMAND:\t\t\t\r\n\t\t\tmessage.setText(BotConfig.POLL_STRING);\r\n\t\t\tpoll = new Poll();//Iniciamos la clase...\r\n\t\t\tisPolling = true;//\"Encendemos\" el modo encuesta.\t\t\t\r\n\t\t\tbreak;\r\n\t\tcase BotConfig.POLL_COMMAND_DONE:\r\n\t\t\tisPolling = false;//Reiniciamos la variable al finalizar el comando.\r\n\t\t\thaveQuestion = false;//Reiniciamos la variable para la pregunta.\r\n\t\t\tsendSurvey = true;//Marcamos para enviar la encuesta.\t\t\t\t\r\n\t\t\tmessage.setText(BotConfig.POLL_DONE_STRING);\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}\t\t\r\n\t\ttry {\r\n\t\t\tmessage.setChatId(chatId);\r\n\t\t\texecute(message);//Enviamos el mensaje... \r\n if (sendSurvey == true){ \t\r\n \t\r\n \texecute(poll.sendFinishedSurvey(chatId, poll.createSurveyString(poll.createSurvey())));//Enviamos encuesta antes de compartir.\r\n \tsendSurvey = false;//Marcamos como no enviada despues de haberlo hecho.\r\n }\r\n } catch (TelegramApiException e) {\r\n \tBotLogger.error(LOGTAG, e);//Guardamos mensaje y lo mostramos en pantalla de la consola.\r\n e.printStackTrace();\r\n }\r\n\t}", "CommandResult execute(String commandText) throws CommandException, ParseException, UnmappedPanelException;", "public interface Command extends Message {\n\n}", "private void handleCommand(String input) throws ClientOfflineException, ServerException {\n String[] params = input.split(\" \");\n Command command = this.availableCommandMap.get(params[0]);\n String argument = (params.length <= 1) ? null : params[1];\n command.execute(this, argument);\n }", "@Override\r\n public void handleMessage(Message message, int origin) {\r\n\r\n\tString text = message.messageText;\r\n\tString remText = \"\";\r\n\tString command = \"\";\r\n\r\n\tif (text.indexOf(' ') < 0) {\r\n\t remText = \"\";\r\n\t command = message.messageText;\r\n\t} else {\r\n\t command = message.messageText.substring(0, text.indexOf(' '));\r\n\t remText = text.substring(text.indexOf(' ') + 1);\r\n\t}\r\n\r\n\tif (!gameInProgress) {\r\n\r\n\t if (command.equals(\"/ready\")) { // no trailing text after /ready\r\n\t\tif (!remText.isEmpty()) {\r\n\t\t server.privateMessage(\"The command \\\"/ready\\\" cannnot have characters after it\", origin);\r\n\t\t} else {\r\n\t\t ready(origin);\r\n\t\t}\r\n\r\n\t } else if (command.equals(\"/unready\")) {\r\n\t\tif (!remText.isEmpty()) {\r\n\t\t server.privateMessage(\"The command \\\"/unready\\\" cannnot have characters after it\", origin);\r\n\t\t} else {\r\n\t\t unready(origin);\r\n\t\t}\r\n\r\n\t } else if (command.equals(\"/start\")) {// no trailing text after\r\n\t\t\t\t\t\t // /start\r\n\r\n\t\tif (!remText.isEmpty()) {\r\n\t\t server.privateMessage(\"The command \\\"/start\\\" cannnot have characters after it\", origin);\r\n\t\t} else {\r\n\t\t voteStart(origin);\r\n\t\t}\r\n\t } else {\r\n\t\tserver.privateMessage(message.messageText + \" does not contain a valid command\", origin);\r\n\t }\r\n\r\n\t} else {\r\n\t if (day == true) {\r\n\r\n\t\tif (command.equals(\"/elim\")) { // space between /elim and player\r\n\t\t // name, no trailing text after\r\n\t\t // player name\r\n\t\t if (remText.isEmpty() || remText.contains(\" \")) {\r\n\t\t\tserver.privateMessage(\r\n\t\t\t\t\"The command \\\"/elim\\\" needs to be followed by a player's name with no spaces/characters thereafter\",\r\n\t\t\t\torigin);\r\n\t\t } else {\r\n\t\t\telimDayVote(remText, origin);\r\n\t\t }\r\n\r\n\t\t} else if (command.equals(\"/save\")) {\r\n\t\t if (remText.isEmpty() || remText.contains(\" \")) {\r\n\t\t\tserver.privateMessage(\r\n\t\t\t\t\"The command \\\"/save\\\" needs to be followed by a player's name with no spaces/characters thereafter\",\r\n\t\t\t\torigin);\r\n\t\t } else {\r\n\t\t\tsaveVote(remText, origin);\r\n\t\t }\r\n\r\n\t\t} else if (command.equals(\"/night\")) {\r\n\t\t if (!remText.isEmpty()) {\r\n\t\t\tserver.privateMessage(\"The command \\\"/night\\\" cannnot have characters after it\", origin);\r\n\t\t } else {\r\n\t\t\tvoteNight(origin);\r\n\t\t }\r\n\r\n\t\t} else if (command.equals(\"/day\")) {\r\n\t\t if (!remText.isEmpty()) {\r\n\t\t\tserver.privateMessage(\"The command \\\"/day\\\" cannnot have characters after it\", origin);\r\n\t\t } else {\r\n\t\t\tvoteDay(origin);\r\n\t\t }\r\n\r\n\t\t} else {\r\n\t\t server.privateMessage(message.messageText + \" does not contain a valid command\", origin);\r\n\t\t}\r\n\r\n\t } else {\r\n\r\n\t\tif (command.equals(\"/elim\")) {\r\n\t\t if (remText.isEmpty() || remText.contains(\" \")) {\r\n\t\t\tserver.privateMessage(\r\n\t\t\t\t\"The command \\\"/elim\\\" needs to be followed by a player's name with no spaces/characters thereafter\",\r\n\t\t\t\torigin);\r\n\t\t } else {\r\n\t\t\telimNightVote(remText, origin);\r\n\t\t }\r\n\t\t} else {\r\n\t\t server.privateMessage(\r\n\t\t\t \"The only valid command during the night is \\\"/elim\\\" followed a player's name (separated by a space)\",\r\n\t\t\t origin);\r\n\t\t}\r\n\t }\r\n\t}\r\n\r\n }", "private void processCommand(Command command) {\n if (command.commandIsUnknown()) {\n System.out.println(\"I don't know what you mean...\");\n } else {\n String commandWord = command.getCommandWord();\n // process all possible commands\n if (commandWord.equals(\"help\")) {\n printHelp();\n } else if (commandWord.equals(\"go\")) {\n if (!command.hasSecondWord()) {\n System.out.println(\"Go where?\");\n } else {\n goDirection(command);\n }\n } else if (commandWord.equals(\"quit\")) {\n if (command.hasSecondWord()) {\n System.out.println(\"Quit what?\");\n } else {\n finished = true;\n }\n }\n }\n }", "@OnMessage\n\tpublic void handleMessage(String message, Session session) {\n\t\tSystem.out.println(\"Received: \" + message);\n\n\t\ttry{\n\t\t\t// We always expect a single json object - all our commands are routed in via this mechanism, with each command having a different root json object name\n\t\t\tJsonReader jsonReader = Json.createReader(new StringReader(message));\n\t\t\tJsonObject o = jsonReader.readObject();\n\t\t\t\n\t\t\t// Every command should have an auth value on it...\n\t\t\tString auth = o.getString(\"auth\");\n\t\t\t//System.out.println(\"Auth is \" + auth);\n\t\t\tif (!sessionHandler.validAccounts.contains(auth))\n\t\t\t{\n\t\t\t\tsession.getBasicRemote().sendText(\"{\\\"noauth\\\":true}\");\n\t\t\t\tthrow new Exception(\"Invalid auth\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// See what command the client has sent me - the name of the object denotes the command\n\t\t\tJsonObject console = o.getJsonObject(\"console\");\n\t\t\tif (null != console)\n\t\t\t{\n\t\t\t\tConsoleInfo ci = new ConsoleInfo();\n\t\t\t\tci.name = console.getString(\"name\");\n\t\t\t\tsessionHandler.addConsoleInfo(session, ci);\n\t\t\t}\t\t\t\n\t\t\tJsonObject reset = o.getJsonObject(\"reset\");\n\t\t\tif (null != reset)\n\t\t\t{\n\t\t\t\tif (reset.getString(\"type\").equals(\"full\"))\n\t\t\t\t{\n\t\t\t\t\t// Clear out the registered devices\n\t\t\t\t\tDevices.d.removeAll();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tDevices.d.remove(reset.getString(\"number\"));\n\t\t\t\t}\n\t\t\t}\n\t\t\tJsonObject deleteaudio = o.getJsonObject(\"deleteaudio\");\n\t\t\tif (null != deleteaudio)\n\t\t\t{\n\t\t\t\t// remove this audio\n\t\t\t\tAudios.a.remove(deleteaudio.getString(\"name\"));\n\t\t\t}\n\t\t\tJsonObject addaudiofolder = o.getJsonObject(\"addfolder\");\n\t\t\tif (null != addaudiofolder)\n\t\t\t{\n\t\t\t\t// Create a folder on disk\n\t\t String folder = addaudiofolder.getString(\"folder\");\n\t\t String newName = addaudiofolder.getString(\"name\");\n\t\t File uploads = new File(Settings.s.uploadDiskPath + \"/\" + (folder.length()==0?\"\" : folder + \"/\") + newName);\n\t\t // Prevent traversals\n\t\t if (!uploads.getParentFile().toPath().startsWith(new File(Settings.s.uploadDiskPath).toPath()))\n\t\t {\n\t\t \t// Naughty!\n\t\t \tthrow new ServletException(\"Cannot save to \" + uploads.getParentFile().toPath()); \t\n\t\t }\n\t\t // Create the folder if necessary\n\t\t if (!uploads.exists())\n\t\t {\n\t\t \tuploads.mkdirs();\n\t\t }\n\t\t // And tell everyone about it...\n\t\t\t\tAudios.a.add(uploads.toString(), newName, folder, true);\n\t\t\t}\n\t\t\tJsonObject playaudio = o.getJsonObject(\"playaudio\");\n\t\t\tif (null != playaudio)\n\t\t\t{\n\t\t\t\t// Play this audio to the listed devices\n\t\t\t\tString audio = playaudio.getString(\"audio\");\n\t\t\t\tJsonArray devices = playaudio.getJsonArray(\"devices\");\n\t\t\t\tAudio a = Audios.a.get(audio);\n\t\t\t\tif (null != a)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t// TODO - pass the array to Plivo instead of looping here, as I think the play API can take an array...\n\t\t\t\t\tfor (JsonValue device : devices)\n\t\t\t\t\t{\n\t\t\t\t\t\tDevice d = Devices.d.get(device.toString());\n\t\t\t\t\t\t// Is this a folder? If so, pick a random child audio, preferring one that this device has not had\n\t\t\t\t\t\tif (a.isFolder)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ta = Audios.a.getRandomChild(a, d);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// We should be able to handle ringing calls here\n\t\t\t\t\t\tif (null != d)\n\t\t\t\t\t\t\td.MakeCall(a);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tJsonObject patch = o.getJsonObject(\"patch\");\n\t\t\tif (null != patch)\n\t\t\t{\n\t\t\t\t// Connect this active device to an idle device, or connect 2 idle devices together\n\t\t\t\tJsonArray devices = patch.getJsonArray(\"devices\");\n\t\t\t\tDevices.patch(devices.get(0).toString(), devices.get(1).toString());\n\t\t\t}\n\t\t\t\n\t\t\tJsonObject playtext = o.getJsonObject(\"playtext\");\n\t\t\tif (null != playtext)\n\t\t\t{\n\t\t\t\t// As playAudio, but for sms - and the text can be edited in the console and not saved...\n\t\t\t\tString text = playtext.getString(\"text\");\n\t\t\t\tString activetext = playtext.getString(\"activetext\");\n\t\t\t\tText atext = Texts.t.get(activetext);\n\t\t\t\tJsonArray devices = playtext.getJsonArray(\"devices\");\n\t\t\t\tif (!text.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfor (JsonValue device : devices)\n\t\t\t\t\t{\n\t\t\t\t\t\tDevice d = Devices.d.get(device.toString());\n\t\t\t\t\t\tif (null != d)\n\t\t\t\t\t\t\td.Sms(text, atext);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tJsonObject ignore = o.getJsonObject(\"ignore\");\n\t\t\tif (null != ignore)\n\t\t\t{\n\t\t\t\tJsonArray devices = ignore.getJsonArray(\"devices\");\n\t\t\t\tfor (JsonValue device : devices)\n\t\t\t\t{\n\t\t\t\t\tDevices.hangup(device.toString(),\"failed\",\"Request from console\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tJsonObject deletetext = o.getJsonObject(\"deletetext\");\n\t\t\tif (null != deletetext)\n\t\t\t{\n\t\t\t\tTexts.t.remove(deletetext.getString(\"name\"));\n\t\t\t}\n\t\t\t\n\t\t\tJsonObject savetext = o.getJsonObject(\"savetext\");\n\t\t\tif (null != savetext)\n\t\t\t{\n\t\t\t\tTexts.t.add(savetext.getString(\"label\"),savetext.getString(\"name\"));\n\t\t\t}\n\t\t\t\n\t\t\tJsonObject updatestatus = o.getJsonObject(\"updatestatus\");\n\t\t\tif (null != updatestatus)\n\t\t\t{\n\t\t\t\tDevices.updateStatus();\n\t\t\t}\n\t\t\tJsonObject savedevice = o.getJsonObject(\"savedevice\");\n\t\t\tif (null != savedevice)\n\t\t\t{\n\t\t\t\tDevices.updateName(savedevice.getString(\"number\"), savedevice.getString(\"name\"));\n\t\t\t}\n\t\t\tJsonObject saveprogress = o.getJsonObject(\"saveprogress\");\n\t\t\tif (null != saveprogress)\n\t\t\t{\n\t\t\t\tDevices.updateProgress(saveprogress.getString(\"number\"), saveprogress.getString(\"progress\"));\n\t\t\t}\n\n\t\t\t\n\t\t\tJsonObject setmessagesread = o.getJsonObject(\"setmessagesread\");\n\t\t\tif (null != setmessagesread)\n\t\t\t{\n\t\t\t\tDevices.setMessagesRead(setmessagesread.getString(\"number\"));\n\t\t\t}\n\t\t\tJsonObject savegoal = o.getJsonObject(\"savegoal\");\n\t\t\tif (null != savegoal)\n\t\t\t{\n\t\t\t\tGoals.add(savegoal);\n\t\t\t}\n\t\t\tJsonObject deletegoal = o.getJsonObject(\"deletegoal\");\n\t\t\tif (null != deletegoal)\n\t\t\t{\n\t\t\t\tGoals.remove(deletegoal.getString(\"name\"));\n\t\t\t}\n\t\t\tJsonObject uncue = o.getJsonObject(\"uncue\");\n\t\t\tif (null != uncue)\n\t\t\t{\n\t\t\t\tDevices.uncue(uncue.getString(\"number\"));\n\t\t\t}\n\t\t\tJsonObject register = o.getJsonObject(\"register\");\n\t\t\tif (null != register)\n\t\t\t{\n\t\t\t\tDevices.d.add(register.getString(\"number\"),\"console\");\n\t\t\t}\n\t\t\t\n\t\t\t// IVR commands from the console\t\t\t\n\t\t\tJsonObject saveivrstep = o.getJsonObject(\"saveivrstep\");\n\t\t\tif (null != saveivrstep)\n\t\t\t{\n\t\t\t\tIvrSteps.i.add(saveivrstep).saveToDisk();\n\t\t\t}\n\t\t\tJsonObject deleteivrstep = o.getJsonObject(\"deleteivrstep\");\n\t\t\tif (null != deleteivrstep)\n\t\t\t{\n\t\t\t\tIvrSteps.i.remove(deleteivrstep.getString(\"name\"));\n\t\t\t}\n\t\t\t// System-wide settings\n\t\t\tJsonObject setting = o.getJsonObject(\"setting\");\n\t\t\tif (null != setting)\n\t\t\t{\n\t\t\t\tSwitchboard.s.parseJson(setting);\n\t\t\t\tSwitchboard.s.persist();\n\t\t\t\t\n\t\t\t\t// Tell everyone about this...\n\t\t\t\tsessionHandler.Broadcast(o);\n\t\t\t\t\n\t\t\t\t// And do any heartbeat changes that I need\n\t\t\t\tSwitchboard.s.setupHeartbeat(true);\n\t\t\t}\n\t\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed to parse \" + message + \" with error \" + e.getMessage());\n\t\t}\n\t}", "public void processMessage(Chat chat, Message message)\n {\n }", "public String processCommand(Command command) //refactored\n {\n boolean wantToQuit = false;\n //System.out.println(\"hitter boolean\");\n commandWord = command.getAction();//fehler\n //System.out.println(command);\n //System.out.println(\"enum == null\" + (commandWord == null));\n String result = \"\";\n //System.out.println(\"heyho\");\n //System.out.println(result);\n switch(commandWord){\n //case UNKNOWN: return \"I don't know what you mean...\"; break;\n \n case HELP: result += printHelp(); break;\n case GO: result += goRoom(command); break;\n case QUIT: return quit(command);//refactored from refactoring\n default: result += \"I don't know what you mean...\";\n }\n return result;\n }", "public MidiCommand parse(javax.sound.midi.MidiMessage mm) {\n boolean done = false;\n Iterator<Parser> it = parsers.iterator();\n MidiCommand pmm = null;\n \n while(it.hasNext() && !done){\n pmm = it.next().parse(mm);\n if(pmm != null){\n done = true;\n }\n }\n \n return pmm;\n }", "@Override\n\tpublic void execute(String[] command) throws SLogoException {\n\t\tString filteredString = filterComments(command);\n\t\tcodeReader = new Scanner(filteredString);\n\t\twhile (codeReader.hasNext()) {\n\t\t\tCommand c = parseCommand(codeReader.next());\n\t\t\tc.run();\n\t\t}\n\n\t}", "public void handleMessage(Message message);", "<C, R> void dispatch( CommandMessage<C> command, CommandCallback<? super C, ? super R> callback );", "@Override\n\tpublic void onReceive(Object message) throws Exception {\n\t\tif(message instanceof String){\n\t\t\tSystem.out.println(\"Worker receive: \"+message);\n\n\t\t\tString cmd = (String)message;\n\t\t\t\n\t\t\tString result = Executor.exec(cmd);\n\t\t\tSystem.out.println(\"exec result:\"+result);\n\t\t\t\n\t\t\tActorRef tellActor = getContext().actorOf(Props.create(WorkerTell.class));\n\t\t\ttellActor.tell(cmd, getSelf());\n\t\t\t\n\t\t//\tActorRef sender = getSender();\n\t\t//\tsender.tell(\"result:\"+result, ActorRef.noSender());\n\t\t\t\n\t\t}\n\t}", "@Override\n public CommandResult execute(String userInput) throws DukeException {\n Command c;\n if (EditorManager.isActive()) {\n logger.log(Level.INFO, \"editing...\");\n c = EditorManager.edit(userInput);\n } else {\n try {\n c = Parser.parseComplexCommand(userInput);\n conversationManager.clearContext();\n } catch (ChronologyAfterPresentException | ChronologyBeforePresentException\n | ChronologyInconsistentException | ApiException e) {\n throw e;\n } catch (ParseException e) {\n c = getCommandFromConversationManager(userInput);\n }\n }\n return (CommandResult) c.execute(model);\n }", "@Override\n\tpublic String processCommand(String command) {\n\t\tif (this.isValid(\"c\", command)) {\n\t\t\t// structure matches the quit command, check to see if\n\t\t\t// the first\n\t\t\t// char is right\n\t\t\tif (command.charAt(0) == 'Q') {\n\t\t\t\trunning = false;\n\t\t\t} else {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.print((testing) ? \"\" : \"Invalid command!\");\n\t\t\t}\n\t\t} else if (this.isValid(\"c| |c| |n\", command)) {\n\t\t\t// structure matches the insert command, check to see if\n\t\t\t// the first\n\t\t\t// char is right\n\t\t\tif (command.charAt(0) == 'a') {\n\t\t\t\tchar insertChar = command.charAt(2);\n\t\t\t\tint index = Integer.parseInt(command.substring(4));\n\t\t\t\tif (linkedList.insert(insertChar, index)) {\n\t\t\t\t\tunMixCode = \"r\" + (index + 1) + unMixCode;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Invalid index!\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.print((testing) ? \"\" : \"Invalid command!\");\n\t\t\t}\n\t\t} else if (this.isValid(\"c| |c\", command)) {\n\t\t\t// structure matches the remove command, check to see if\n\t\t\t// the first\n\t\t\t// char is right\n\t\t\tif (command.charAt(0) == 'r') {\n\t\t\t\tchar removeChar = command.charAt(2);\n\t\t\t\tlinkedList.remove(removeChar);\n\t\t\t\tfor (int i = curMessage.length() - 1; i >= 0; i--) {\n\t\t\t\t\tif (removeChar == curMessage.charAt(i)) {\n\t\t\t\t\t\tunMixCode = \"a\" + removeChar + (i - 1)\n\t\t\t\t\t\t\t\t+ unMixCode;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.print((testing) ? \"\" : \"Invalid command!\");\n\t\t\t}\n\t\t} else if (this.isValid(\"c| |n| |n| |n\", command)) {\n\t\t\t// structure matches the cut command, check to see if\n\t\t\t// the first char\n\t\t\t// is right\n\t\t\tif (command.charAt(0) == 'c') {\n\t\t\t\tcommand = command.substring(2);\n\t\t\t\tint space1 = command.indexOf(\" \");\n\t\t\t\tint space2 = command.indexOf(\" \", space1 + 1);\n\t\t\t\tint startIndex = Integer\n\t\t\t\t\t\t.parseInt(command.substring(0, space1));\n\t\t\t\tint endIndex = Integer.parseInt(\n\t\t\t\t\t\tcommand.substring(space1 + 1, space2));\n\t\t\t\tint clipboardIndex = Integer\n\t\t\t\t\t\t.parseInt(command.substring(space2 + 1));\n\t\t\t\tboolean ok = true;\n\t\t\t\tif (startIndex < 0\n\t\t\t\t\t\t|| startIndex >= curMessage.length()) {\n\t\t\t\t\tok = false;\n\t\t\t\t}\n\t\t\t\tif (endIndex < startIndex || endIndex < 0\n\t\t\t\t\t\t|| endIndex >= curMessage.length()) {\n\t\t\t\t\tok = false;\n\t\t\t\t}\n\t\t\t\tif (clipboardIndex < 0 || clipboardIndex >= 1000) {\n\t\t\t\t\tok = false;\n\t\t\t\t}\n\t\t\t\tif (ok) {\n\t\t\t\t\tLinkedList temp = new LinkedList();\n\t\t\t\t\ttemp.setToString(linkedList.toString()\n\t\t\t\t\t\t\t.substring(startIndex, endIndex + 1));\n\t\t\t\t\tclipboards.add(clipboardIndex, temp.getTop());\n\t\t\t\t\tfor (int i = endIndex; i >= startIndex; i--) {\n\t\t\t\t\t\tunMixCode = \"a\"\n\t\t\t\t\t\t\t\t+ curMessage.toString().charAt(i)\n\t\t\t\t\t\t\t\t+ (i - 1) + unMixCode;\n\t\t\t\t\t\tlinkedList.removeAt(i);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t\t(testing) ? \"\" : \"Invalid command!\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.print((testing) ? \"\" : \"Invalid command!\");\n\t\t\t}\n\t\t} else if (this.isValid(\"c| |n| |n\", command)) {\n\t\t\t// structure matches the paste command, check to see if\n\t\t\t// the first\n\t\t\t// char is right\n\t\t\tif (command.charAt(0) == 'p') {\n\t\t\t\tcommand = command.substring(2);\n\t\t\t\tint spc1 = command.indexOf(' ');\n\t\t\t\tint startIndex = Integer\n\t\t\t\t\t\t.parseInt(command.substring(0, spc1));\n\t\t\t\tint clipboardIndex = Integer\n\t\t\t\t\t\t.parseInt(command.substring(spc1 + 1));\n\t\t\t\tboolean ok = true;\n\t\t\t\tif (startIndex < 0\n\t\t\t\t\t\t|| startIndex >= curMessage.length()) {\n\t\t\t\t\tif (startIndex != -1) {\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (clipboardIndex < 0 || clipboardIndex >= 1000) {\n\t\t\t\t\tok = false;\n\t\t\t\t}\n\t\t\t\tLinkedList temp = new LinkedList();\n\t\t\t\ttemp.setTop(clipboards.get(clipboardIndex));\n\t\t\t\tif (temp.getTop() == null) {\n\t\t\t\t\tok = false;\n\t\t\t\t}\n\t\t\t\tif (ok) {\n\t\t\t\t\tfor (char c : temp.toString().toCharArray()) {\n\t\t\t\t\t\tif (linkedList.insert(c, startIndex)) {\n\t\t\t\t\t\t\tunMixCode = \"r\" + (startIndex + 1)\n\t\t\t\t\t\t\t\t\t+ unMixCode;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstartIndex++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t\t(testing) ? \"\" : \"Invalid command!\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.print((testing) ? \"\" : \"Invalid command!\");\n\t\t\t}\n\t\t} else if (this.isValid(\"c| |s\", command)) {\n\t\t\t// structure matches the save command, check to see if\n\t\t\t// the first\n\t\t\t// char is right\n\t\t\tif (command.charAt(0) == 's') {\n\t\t\t\tString fileName = command.substring(2,\n\t\t\t\t\t\tcommand.length());\n\t\t\t\ttry {\n\t\t\t\t\tPrintWriter saver = new PrintWriter(\n\t\t\t\t\t\t\tnew BufferedWriter(\n\t\t\t\t\t\t\t\t\tnew FileWriter(fileName)));\n\t\t\t\t\tsaver.print(unMixCode);\n\t\t\t\t\tsaver.close();\n\t\t\t\t\tif (!testing) {\n\t\t\t\t\t\tSystem.out.println(\"Saved successfully\");\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.print((testing) ? \"\" : \"Invalid command!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.print((testing) ? \"\" : \"Invalid command!\");\n\t\t}\n\t\tcurMessage = linkedList.toString();\n\t\treturn curMessage;\n\t}", "private void handleCommand(String commands) throws IOException {\n String[] command = commands.split(String.valueOf(Command.DELIMITER));\n String cmdResult;\n if (command[0].equalsIgnoreCase(String.valueOf(Command.PLAYER_JOINED))) {\n // handlePlayerJoined\n handlePlayerJoined(command[1]);\n } else if (command[0].equalsIgnoreCase(String.valueOf(Command.UPDATE_COLOR))) {\n // handleUpdateColor\n handleColorUpdate(Color.fromString(command[1]));\n } else if (command[0].equalsIgnoreCase(String.valueOf(Command.SYNC_BOARD))) {\n // handleSyncBoard\n updateBoard(command);\n } else if (command[0].equalsIgnoreCase(String.valueOf(Command.MAKE_MOVE))) {\n // handleMakeMove\n handleMove();\n\n\n// } else if (command.equals(Character.toString(ProtocolMessages.EXIT))) {\n// in.close();\n// out.close();\n// sock.close();\n } else {\n clientTUI.showMessage(\"Check your parameters\");\n try {\n sendMessage(\"Unknown Command\");\n } catch (ServerUnavailableException e) {\n e.printStackTrace();\n }\n }\n }", "public synchronized boolean process(Connection con, String msg) {\n\t\tJsonObject receivedMSG;\n\n\t\ttry {\n\t\t\treceivedMSG = parser.parse(msg).getAsJsonObject();\n\t\t\t// System.out.println(\"string to json \" + receivedMSG);\n\t\t} catch (JsonSyntaxException e) {\n\t\t\treturn true;\n\t\t}\n\t\ttry {\n\t\t\t// Check the integrity of the message\n\t\t\tif (!checkMsgIntegrity(con, receivedMSG)) {\n\t\t\t\tcon.closeCon();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tString message = receivedMSG.get(\"command\").getAsString();\n\t\t\tswitch (message) {\n\t\t\tcase REGISTER:\n\t\t\t\treturn !register(con, receivedMSG);\n\t\t\tcase LOGIN:\n\t\t\t\treturn !login(con, receivedMSG);\n\t\t\tcase AUTHENTICATE:\n\t\t\t\treturn !auth(con, receivedMSG);\n\t\t\tcase INVALID_MESSAGE:\n\t\t\t\tcon.closeCon();\n\t\t\t\treturn false;\n\t\t\tcase SERVER_ANNOUNCE:\n\t\t\t\treturn !announce(con, receivedMSG);\n\t\t\tcase LOGOUT:\n\t\t\t\tcon.closeCon();\n\t\t\t\treturn false;\n\t\t\tcase LOCK_REQUEST:\n\t\t\t\treturn !lockRequest(con, receivedMSG);\n\t\t\tcase LOCK_DENIED:\n\t\t\t\treturn !lockProcess(con, receivedMSG);\n\t\t\tcase LOCK_ALLOWED:\n\t\t\t\treturn !lockProcess(con, receivedMSG);\n\t\t\tcase ACTIVITY_BROADCAST:\n\t\t\t\treturn !broadcast(con, receivedMSG);\n\t\t\tcase ACTIVITY_MESSAGE:\n\t\t\t\treturn !broadcast(con, receivedMSG);\n\t\t\tcase AUTHENTICATION_FAIL:\n\t\t\t\tcon.closeCon();\n\t\t\t\treturn false;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (NullPointerException e) {\n\t\t\te.printStackTrace();\n\t\t\tInvalidMessage invalid = new InvalidMessage();\n\t\t\tinvalid.setInfo(\"Not enough info in message,\" + \" possibly no authenticated user in ACTIVITY_BROADCAST ?\");\n\t\t\tcon.writeMsg(invalid.toJsonString());\n\t\t}\n\t\treturn false;\n\t}", "public static void processCommand(String command) {\n\n\t\tString commandType = command.substring(0, command.indexOf(\" \"));\n\n\t\tswitch (commandType) {\n\t\t\n\t\tcase COMMAND_ADD:\n\t\t\tFileStorage.addEvent(command);\n\t\t\tbreak;\n\n\t\tcase COMMAND_DELETE:\n\t\t\tFileStorage.deleteEvent(command);\n\t\t\tbreak;\n\n\t\tcase COMMAND_EDIT:\n\t\t\tFileStorage.editEvent(command);\n\t\t\tbreak;\n\t\t\n\t\tcase COMMAND_RECUR:\n\t\t\tFileStorage.recurEvent(command);\n\t\t\tbreak;\n\t\t\t\n\t\tcase COMMAND_NAVIGATE:\n\t\t\tFileStorage.navigateDay(command);\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tSystem.out.println(MESSAGE_INVALID);\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t}", "@Override\n public void executeCommand(MessageChannel channel, Message msg) {\n\n UserManagement userManager = UserManagement.getINSTANCE();\n\n // Checks if the author is a registered user and exists in the database.\n if (!userManager.userIsRegistered(msg.getAuthor().getId())) {\n channel.sendMessage(\"You are not even registered.\\nPlease use `!register` first to execute this command.\").queue();\n msg.addReaction(\"U+274C\").queue();\n return;\n }\n\n // Checks if the user is erasable. If not, replies with feedback message.\n if (!userManager.delete(msg.getAuthor().getId())) {\n channel.sendMessage(\"Unfortunately we could not unregister you.\").queue();\n return;\n }\n\n // If the unregister was successful, replies with feedback message.\n channel.sendMessage(\"The unregister was successful!\").queue();\n msg.addReaction(\"U+1F44B\").queue();\n }", "public MidiCommand parse(javax.sound.midi.MidiMessage mm);", "private ExecuteMessage() {\n initFields();\n }", "private void processCommands() {\n while (!commandQueue.isEmpty()) {\n var msg = commandQueue.remove();\n treatCommand.parseCommand(msg);\n }\n }", "public void execute(Command command){\n command.run(field);\n }", "public void execute() {\n\t\ttry {\n\t\t\tMethod method = this.getClass().getMethod(parseMethod(), new Class[0]);\n\t\t\tmethod.invoke(this, new Object[0]);\n\t\t} catch (NoSuchMethodException | SecurityException e) {\n\t\t\tSystem.out.println(\"Unknown option: \" + command);\n\t\t} catch (IllegalAccessException | IllegalArgumentException e) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"Invalid usage of: \" + command + \", the following error \" + \"was given: \" + e.getMessage());\n\t\t} catch (InvocationTargetException e) {\n\t\t\tSystem.out.println(\"An error occurred while executing '\" + command + \"'. The \"\n\t\t\t\t\t+ \"following error was given: \" + e.getCause());\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void executeCommand(String c) {\n // split command and arguments\n int index = c.indexOf(' ');\n String command = ((index == -1) ? c.toUpperCase() : (c.substring(0, index)).toUpperCase());\n String args = ((index == -1) ? null : c.substring(index + 1));\n\n debugOutput(\"Command: \" + command + \" Args: \" + args);\n\n // dispatcher mechanism for different commands\n switch (command) {\n case \"USER\":\n handleUser(args);\n break;\n\n case \"PASS\":\n handlePass(args);\n break;\n\n case \"CWD\":\n handleCwd(args);\n break;\n\n case \"LIST\":\n handleNlst(args);\n break;\n\n case \"NLST\":\n handleNlst(args);\n break;\n\n case \"PWD\":\n case \"XPWD\":\n handlePwd();\n break;\n\n case \"QUIT\":\n handleQuit();\n break;\n\n case \"PASV\":\n handlePasv();\n break;\n\n case \"EPSV\":\n handleEpsv();\n break;\n\n case \"SYST\":\n handleSyst();\n break;\n\n case \"FEAT\":\n handleFeat();\n break;\n\n case \"PORT\":\n handlePort(args);\n break;\n\n case \"EPRT\":\n handleEPort(args);\n break;\n\n case \"RETR\":\n handleRetr(args);\n break;\n\n case \"MKD\":\n case \"XMKD\":\n handleMkd(args);\n break;\n\n case \"RMD\":\n case \"XRMD\":\n handleRmd(args);\n break;\n\n case \"TYPE\":\n handleType(args);\n break;\n\n case \"STOR\":\n handleStor(args);\n break;\n\n default:\n sendMsgToClient(\"501 Unknown command\");\n break;\n\n }\n\n }", "public boolean apply(Message<?> msg);", "void onCommandMessage(AbstractTelegramBot bot, Update update, Message message, List<String> args) throws TelegramApiException;", "@Override\n public void dealWithCommand(MessageReceivedEvent event) {\n List<String> contentSplit = new ArrayList<>(Arrays.asList(event.getMessage().getContentStripped().split(\" \")));\n\n // remove the command part of the message\n contentSplit.remove(0);\n boolean isXpDesired = DetermineArguments.determineIsXpDesired(contentSplit);\n boolean isCollection = DetermineArguments.determineIsCollection(contentSplit);\n long timeToSpend = DetermineArguments.determineTimeToSpend(contentSplit, event.getTextChannel());\n int classLevel = DetermineArguments.determineClassLevel(contentSplit, event.getTextChannel());\n long amountDesired = DetermineArguments.determineAmountDesired(contentSplit, event.getTextChannel());\n\n // be done if something bad was found\n if (timeToSpend == -2 || classLevel == -2 || amountDesired == -2)\n return;\n\n if (contentSplit.isEmpty()) {\n // user did not specify what player they want\n event.getChannel().sendMessage(\"Specify what player you want to analyze.\").queue();\n return;\n }\n String username = contentSplit.get(0);\n WynncraftPlayer player = GetPlayerStats.get(username);\n if (player == null) {\n event.getChannel().sendMessage(\"Either the api is down, or '\" + username + \"' is not a player.\").queue();\n return;\n }\n\n // tell the user we're working on the answer\n event.getMessage().addReaction(\"\\uD83D\\uDEE0\").queue();\n\n List<String> classNames = new ArrayList<>();\n for (WynncraftClass playerClass : player.classes) {\n classNames.add(playerClass.name);\n }\n ChoiceArguments choiceArguments = new ChoiceArguments(\n isXpDesired, isCollection, timeToSpend, amountDesired, classLevel, classNames, player, true);\n\n\n long xpDesiredGivenPerc = 0;\n long emeraldDesiredGivenPerc = 0;\n for (WynncraftClass wynncraftClass : player.classes)\n for (Quest quest : wynncraftClass.questsNotCompleted) {\n if (quest.levelMinimum <= (classLevel == -1 ? wynncraftClass.combatLevel : classLevel)) {\n xpDesiredGivenPerc += quest.xp;\n emeraldDesiredGivenPerc += quest.emerald;\n }\n }\n xpDesiredGivenPerc *= GetAnswers.DEFAULT_PERCENTAGE_AMOUNT;\n emeraldDesiredGivenPerc *= GetAnswers.DEFAULT_PERCENTAGE_AMOUNT;\n\n FinalQuestOptionsAll finalQuestOptionsAll = GetAnswers.getAllFullAnswers(player, choiceArguments);\n String spreadsheetId = SheetsWrite.writeSheet(finalQuestOptionsAll, event.getAuthor().getIdLong(), player.name, true);\n if (spreadsheetId == null) return;\n new QuestRecommendationMessagePlayer(spreadsheetId, finalQuestOptionsAll, event.getChannel(), choiceArguments, xpDesiredGivenPerc, emeraldDesiredGivenPerc);\n\n event.getMessage().removeReaction(\"\\uD83D\\uDEE0\", DiscordBot.client.getSelfUser()).queue();\n }", "private String getMsgCmd/* */(String msg) {\n return msg.substring(0); // NO SUB... for now :)\n }", "private void processCommand(String command) {\n switch (command) {\n case \"reserve\":\n doReserve();\n break;\n case \"view\":\n doView();\n break;\n case \"deposit\":\n doDeposit();\n break;\n }\n }", "@Override\n public void onMessage(String channel, String message) {\n if (redisHandler.isAuth()) redisHandler.getJedisPool().getResource().auth(redisHandler.getPassword());\n if (!channel.equalsIgnoreCase(redisHandler.getChannel())) return;\n\n executor.execute(() -> {\n String[] strings = message.split(\"///\");\n\n System.out.println(strings[1]);\n System.out.println(strings[0]);\n\n Object jsonObject = null;\n try {\n jsonObject = redisHandler.getGson().fromJson(strings[0], Class.forName(strings[1]));\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n RedisPacket redisPacket = (RedisPacket) jsonObject;\n\n if (redisPacket == null) {\n System.out.println(\"The redis packet received seems to be null!\");\n return;\n }\n\n redisPacket.onReceived();\n });\n }", "@Override\n public void processMessage(MessageForm message) {\n switch (message.code()) {\n case Mc.start:\n processStart(message);\n break;\n\n default:\n processDefault(message);\n break;\n }\n }", "abstract public Object handleMessage(Object message) throws Exception;", "public void action(BotInstance bot, Message message);", "public void processMessage(DeviceMateMessage m);", "public MessageFromServerCommand(String message) {\n this.message=message;\n }", "@Override\n\tpublic void processCommand(String s)\n\t{\n\t\tif (s.contentEquals(\"atStart\"))\n\t\t{\n\t\t\tprinttest(s);\n\t\t\tSystem.out.println(isAtStart());\n\t\t}\n\t\telse if (s.contentEquals(\"atEnd\"))\n\t\t{\n\t\t\tprinttest(s);\n\t\t\tSystem.out.println(isAtEnd());\n\t\t}\n\t\telse if (s.contentEquals(\"moveToStart\"))\n\t\t{\n\t\t\tmoveToStart();\n\t\t\tprinttest(s);\n\t\t}\n\t\telse if (s.contentEquals(\"moveToEnd\"))\n\t\t{\n\t\t\tmoveToEnd();\n\t\t\tprinttest(s);\n\t\t}\n\t\telse if (s.contentEquals(\"toString\"))\n\t\t{\n\t\t\tprinttest(s);\n\t\t}\n\t\telse if (s.startsWith(\"toStringCursor\"))\n\t\t{\n\t\t\tprinttest(s);\n\t\t}\n\t\telse if (s.contentEquals(\"moveLeft\"))\n\t\t{\n\t\t\tmoveLeft();\n\t\t\tprinttest(s);\n\t\t}\n\t\telse if (s.contentEquals(\"moveRight\"))\n\t\t{\n\t\t\tmoveRight();\n\t\t\tprinttest(s);\n\t\t}\n\t\t\n\t\t//ERROR CHECKING\n\t\telse if(left.isEmpty() && right.isEmpty())\n\t\t{\n\t\t\t//we have no inputted characters\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"Now executing the command \" + s + \"...\");\n\t\t\tSystem.out.println(\"The Results of this command are:\");\n\t\t\tSystem.out.println(\"Sorry but you need to input something before using that command...\");\n\t\t}\n\t\telse if (s.startsWith(\"insertChar\"))\n\t\t{\n\t\t\tinsertChar(s.charAt(s.length() - 1));\n\t\t\tprinttest(s);\n\t\t}\n\t\telse if (s.contentEquals(\"backspace\"))\n\t\t{\n\t\t\tbackspace();\n\t\t\tprinttest(s);\n\t\t}\n\t\telse if (s.contentEquals(\"delete\"))\n\t\t{\n\t\t\tdelete();\n\t\t\tprinttest(s);\n\t\t}\n\t\telse if (s.startsWith(\"search\"))\n\t\t{\n\t\t\tsearch(s.charAt(s.length() - 1));\n\t\t\tprinttest(s);\n\t\t}\n\t\t\n\t\t//ERORR CHECKING\n\t\telse\n\t\t{\n\t\t\t//it is an unaccepted command, doing it this way since we cant pass two strings to printtest\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"Now executing the command \" + s + \"...\");\n\t\t\tSystem.out.println(\"The Results of this command are:\");\n\t\t\tSystem.out.println(\"Sorry but this is not valid command...\");\n\t\t}\n\n\t}", "java.lang.String getCommand();", "void handleMessage(byte messageType, Object message);", "@Override\n\tpublic void execute(String prefix, String[] args) {\n\t\tif (prefix.equals(\"COMMAND\")) {\n\t\t\tif (args.length >= 2) {\n\t\t\t\tString message = args[1].replace(\"%40\", \"@\");\n\t\t\t\tprintToTab(\"chat\", \"≫ \" + message); //TODO: Replace with the >> character.\n\t\t\t}\n\t\t}\n\t}", "private void processCommand(String command) {\n if (command.equals(\"1\")) {\n insertItem();\n } else if (command.equals(\"2\")) {\n removeItem();\n } else if (command.equals(\"3\")) {\n viewList();\n } else if (command.equals(\"4\")) {\n saveToDoList();\n } else if (command.equals(\"5\")) {\n loadToDoList();\n } else {\n System.out.println(\"Selection not valid...\");\n }\n }", "int commandFor(String s) throws AmbiguousException\t\t\t{ return determineCommand(g_commandArray, s, CMD_UNKNOWN);\t}", "@Override\n\tpublic void processMessage(MessageForm message)\n\t{\n\t\tswitch (message.code())\n\t\t{\n\t\tcase Mc.start:\n\t\t\tprocessStart(message);\n\t\tbreak;\n\n\t\tcase Mc.nastupTerm2Hotovy:\n\t\t\tprocessNastupTerm2Hotovy(message);\n\t\tbreak;\n\n\t\tdefault:\n\t\t\tprocessDefault(message);\n\t\tbreak;\n\t\t}\n\t}", "private boolean processCommand(Command command) \n {\n boolean wantToQuit = false;\n\n CommandWord commandWord = command.getCommandWord();\n\n switch (commandWord) \n {\n case UNKNOWN:\n System.out.println(\"I don't know what you mean...\");\n break;\n\n case HELP:\n printHelp();\n break;\n\n case GO:\n goRoom(command);\n break;\n\n //my command expect when i Quit\n case PICK:\n pickItem();\n break;\n \n //drink the redbull\n case DRINK:\n drink();\n break;\n \n //show inventory\n case SHOW:\n showInventory();\n break;\n \n //show objective\n case GOAL:\n remindGoal();\n break;\n\n case QUIT:\n wantToQuit = quit(command);\n break;\n }\n return wantToQuit;\n }", "abstract public boolean handleMessage(int what, int result, Object data, String message, boolean option);", "public abstract byte[] appExecuteUnordered(byte[] command, MessageContext msgCtx);", "public Object execute(String cmd) {\n\t\tObject retval = null;\n\t\tClass[] parameterTypes = new Class[] { CommandInterpreter.class };\n\t\tObject[] parameters = new Object[] { this };\n\t\tboolean executed = false;\n\t\tint size = commandProviders.length;\n\t\tfor (int i = 0; !executed && (i < size); i++) {\n\t\t\ttry {\n\t\t\t\tObject target = commandProviders[i];\n\t\t\t\tMethod method = target.getClass().getMethod(\"_\" + cmd, parameterTypes); //$NON-NLS-1$\n\t\t\t\tretval = method.invoke(target, parameters);\n\t\t\t\texecuted = true; // stop after the command has been found\n\t\t\t}\n\t\t\tcatch (NoSuchMethodException ite) {\n\t\t\t\t// keep going - maybe another command provider will be able to\n\t\t\t\t// execute this command\n\t\t\t}\n\t\t\tcatch (InvocationTargetException ite) {\n\t\t\t\texecuted = true; // don't want to keep trying - we found the\n\t\t\t\t// method but got an error\n\t\t\t\tprintStackTrace(ite.getTargetException());\n\t\t\t}\n\t\t\tcatch (Exception ee) {\n\t\t\t\texecuted = true; // don't want to keep trying - we got an error\n\t\t\t\t// we don't understand\n\t\t\t\tprintStackTrace(ee);\n\t\t\t}\n\t\t}\n\t\t// if no command was found to execute, display help for all registered\n\t\t// command providers\n\t\tif (!executed) {\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tCommandProvider commandProvider = (CommandProvider) commandProviders[i];\n\t\t\t\t\tout.print(commandProvider.getHelp());\n\t\t\t\t\tout.flush();\n\t\t\t\t}\n\t\t\t\tcatch (Exception ee) {\n\t\t\t\t\tprintStackTrace(ee);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// call help for the more command provided by this class\n\t\t\tout.print(getHelp());\n\t\t\tout.flush();\n\t\t}\n\t\treturn retval;\n\t}", "public void process(PlainMessage msg) throws IOException {\n relay(msg);\n }", "private boolean processCommand(Command command)//Method was given\n {\n if(command.isUnknown())\n {\n System.out.println(\"I don't know what you mean...\");\n return false;\n }\n\n String commandWord = command.getCommandWord();\n if (commandWord.equals(\"help\"))\n printHelp();\n else if (commandWord.equals(\"go\"))\n goRoom(command);\n else if (commandWord.equals(\"talk\"))\n talkToCharacter(currentRoom);\n else if (commandWord.equals(\"grab\"))\n {\n secondWord = command.getSecondWord();\n if (secondWord == null)\n {\n System.out.println(\"Grab what?\");\n }\n else\n {\n grabItem(secondWord);\n }\n }\n else if (commandWord.equals(\"eat\"))\n {\n secondWord = command.getSecondWord();\n if (secondWord == null)\n {\n System.out.println(\"Eat what?\");\n }\n else\n {\n eatItem(secondWord);\n }\n }\n else if (commandWord.equals(\"inventory\")) \n player.getInventory();\n else if (commandWord.equals(\"drop\"))\n {\n secondWord = command.getSecondWord();\n if (secondWord == null)\n {\n System.out.println(\"Drop what?\");\n }\n else\n {\n dropItem(secondWord);\n }\n }\n else if (commandWord.equals(\"inspect\"))\n {\n secondWord = command.getSecondWord();\n if (secondWord == null)\n {\n System.out.println(\"Inspect what?\");\n }\n else\n {\n inspectItem(secondWord);\n }\n }\n else if (commandWord.equals(\"quit\"))\n {\n if(command.hasSecondWord())\n System.out.println(\"Quit what?\");\n else\n return true; // signal that we want to quit\n }\n else if (commandWord.equals(\"look\"))\n {\n System.out.println(currentRoom.longDescription());\n }\n return false;\n }", "public void sendCommand(Command cmd);", "CommandResult execute(String commandText) throws CommandException, ParseException;", "CommandResult execute(String commandText) throws CommandException, ParseException;", "CommandResult execute(String commandText) throws CommandException, ParseException;", "public void runCommand(List<String> tokens) {\n\t\tUserCommand usrCommand;\n\t\tapp.setTwitteruser(TwitterUserFactory.getTwitterUser(tokens.get(0).toString(), userCollection));\n\t\tif (tokens.contains(\"->\")) {\n\t\t\tusrCommand = new PostMessage(TwitterAssignmentHelper.getCombinedString(tokens, 2), app);\n\t\t} else if (tokens.contains(\"follows\")) {\n\t\t\tusrCommand = new FollowUser(tokens.get(2).toString() ,app);\n\t\t} else if (tokens.contains(\"wall\")) {\n\t\t\tusrCommand = new Wall(app);\n\t\t} else if (tokens.size() == 1) {\n\t\t\tusrCommand = new ReadMessage(app);\n\t\t} else {\n\t\t\tusrCommand = new InvalidCommand(tokens.get(0).toString(),\n\t\t\t\t\tuserCollection);\n\t\t}\n\t\tusrCommand.execute();\n\t\tSystem.out.print(\">\");\n\t}", "private void standByForMessages() throws IOException {\n if (reader.readLine() != null) {\n try {\n JSONObject j = (JSONObject) jps.parse(reader.readLine());\n sequence = Integer.valueOf(j.get(\"sequence\").toString());\n String cmd = (String) j.get(\"command\");\n JSONArray parameter = (JSONArray) j.get(\"parameter\");\n cmdHandler(parameter, cmd);\n } catch (ParseException ex) {\n }\n }\n }", "private void execute(String command) {\n if (command.equals(\"lf\")) {\n listFrames();\n } else if (command.equals(\"le\")) {\n listEvents();\n } else if (command.equals(\"af\")) {\n addFrame();\n } else if (command.equals(\"ae\")) {\n addEvent();\n } else if (command.equals(\"rf\")) {\n removeFrame();\n } else if (command.equals(\"re\")) {\n removeEvent();\n } else if (command.equals(\"ve\")) {\n viewEvents();\n } else if (command.equals(\"li\")) {\n lorentzInvariant();\n } else if (command.equals(\"s\")) {\n saveWorld();\n } else if (command.equals(\"l\")) {\n loadWorld();\n } else {\n System.out.println(\"Command not recognized.\");\n }\n }", "void handleMessage(String message){\n\t\tString[] parts = message.split(\" \");\n\t\tboolean prevFor = false;\n//\t\tSystem.out.println(\"parts0 = \" + parts[0]);\n\t\tswitch(parts[0]){\n\t\t\tcase \"#quit\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#quit\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#stop\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#stop\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#close\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#close\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#setport\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#setport\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + parts[1]);\n\t\t\t\tbreak;\n\t\t\tcase \"#getport\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#getport\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#start\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#start\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#block\":\n\t\t\t\tif(parts.length>1){\n\t\t\t\t\tclient.handleMessageFromClientUI(\"#block\" + \"---\" + client.getUID() + \"---\" + parts[1] + \"---\" + \" \");\t//this sends the info to the server to check if it's a valid user_id\n\t\t\t\t}\n\t\t\t\telse System.out.println(\"You haven't specified a user to block!\");\n\t\t\t\tbreak;\n\t\t\tcase \"#unblock\":\n\t\t\t\tif(parts.length>0){\n\t\t\t\t\tclient.handleMessageFromClientUI(\"#unblock\" + \"---\" + client.getUID() + \"---\" + parts[1] + \"---\" + \" \");\t//this sends the info to the server to check if it's a valid user_id\n\t\t\t\t\t\t\t//this also needs to be sent to server to send to all consoles to update block lists\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"#whoiblock\":\t\t//simply prints out the arraylist of users that i block\n\t\t\t\tif(blockedList.size()>0){\n\t\t\t\t\tSystem.out.print(\"The list of people you block is: \");\n\t\t\t\t\tfor(int i=0;i<blockedList.size();i++){\n\t\t\t\t\t\tSystem.out.print(blockedList.get(i)+\", \");\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\telse System.out.println(\"You are not blocking any users\");\n\t\t\t\tbreak;\n\t\t\tcase \"#whoblocksme\":\t//simply prints out the arraylist of users that block me\n\t\t\t\tif(whoBlocksMe.size()>0){\n\t\t\t\t\tSystem.out.print(\"The list of people who block me is: \");\n\t\t\t\t\tfor(int i=0;i<whoBlocksMe.size();i++){\n\t\t\t\t\t\tSystem.out.print(whoBlocksMe.get(i)+\", \");\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\telse System.out.println(\"There are no users that are blocking you\");\n\t\t\t\tbreak;\n\t\t\tcase \"#startforwarding\":\n\t\t\t\tprevFor = false;\n\t\t\t\ttry {\n\t\t\t\t\tif(whoIForward.size()>0) {\n\t\t\t\t\t\tfor(int i=0; i<whoIForward.size(); i++){\n\t\t\t\t\t\t\tif(parts[1].equals(whoIForward.get(i))) prevFor = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!prevFor) {\n\t\t\t\t\t\t\twhoIForward.add(parts[1]);\n\t\t\t\t\t\t\tSystem.out.println(\"You are now forwarding to user: \"+parts[1]);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse System.out.println(\"You are already forwarding to that user!\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twhoIForward.add(parts[1]);\n\t\t\t\t\t\tSystem.out.println(\"You are now forwarding all messages to user: \"+parts[1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(ArrayIndexOutOfBoundsException e){\n\t\t\t\t\tSystem.out.println(\"You need to specify a user to forward to!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"cancelforwarding\":\n\t\t\t\tprevFor = false;\n\t\t\t\ttry {\n\t\t\t\t\tif(whoIForward.size()>0){\n\t\t\t\t\t\tfor(int i=0; i<whoIForward.size(); i++){\n\t\t\t\t\t\t\tif(parts[1].equals(whoIForward.get(i))){\n\t\t\t\t\t\t\t\tprevFor = true;\n\t\t\t\t\t\t\t\twhoIForward.remove(i);\n\t\t\t\t\t\t\t\tSystem.out.println(\"You are no longer forwarding to user: \"+parts[1]);\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\tif(!prevFor){\n\t\t\t\t\t\t\tSystem.out.println(\"You were not forwarding to that user!\");\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\telse System.out.println(\"You are not currently forwarding to anyone and connot stop forwarding to this user\");\n\t\t\t\t}\n\t\t\t\tcatch(ArrayIndexOutOfBoundsException e){\n\t\t\t\t\tSystem.out.println(\"You need to specify a user to stop forwarding to!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"#private\":\n\t\t\t\tString[] messageArray = Arrays.copyOfRange(parts, 2, parts.length);\n\t\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\t\tfor (String value : messageArray) {\n\t\t\t\t builder.append(value + \" \");\n\t\t\t\t}\n\t\t\t\tString messageToSend = builder.toString();\n\t\t\t\tclient.handleMessageFromClientUI(\"#private\" + \"---\" + client.getUID() + \"---\" + parts[1] + \"---\" + messageToSend);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault: client.handleMessageFromClientUI(\" \" + \"---\" + client.getUID() + \"---\" + \"*\" + \"---\" + message);\n\t\t}\n\t}", "public boolean run(Blackjack game, long memberId, String message, String prefix) {\n if (!message.toLowerCase().startsWith(prefix))\n return false;\n\n message = message.substring(prefix.length());\n int spaceIndex = message.indexOf(' ');\n int endIndex = spaceIndex == -1 ? message.length() : spaceIndex;\n String commandName = message.substring(0, endIndex);\n\n if (has(commandName)) {\n BlackjackCommand command = get(commandName);\n CommandResult result = command.handle(game, memberId, message);\n\n switch (result) {\n case SUCCESS:\n break;\n case SYNTAX:\n System.out.println(\"Invalid syntax for `\" + commandName + \"` command.\\nCommand usage: \" + prefix + commandName + \" \" + command.getSyntax());\n break;\n case FAILURE:\n break;\n default:\n Log.getInstance().warn(\"New command result found: \" + (result == null ? \"null\" : result.name()) + \".\", \"BlackjackCommandManager\");\n return false;\n }\n return true;\n }\n return false;\n }", "ACommand CheckCommand(String NameCommand);", "private void runCmd(String input) {\n CommandDetails cmd = cmdParser.parse(input);\n if (cmd != null) {\n switch (cmd.getAction()) {\n case LIST:\n listAll(cmd.getType());\n break;\n case SEARCH:\n search(cmd);\n break;\n case SEND_HELP:\n sendHelp(cmd);\n break;\n case SEND_USAGE:\n sendUsage(cmd.getType());\n break;\n case EXIT:\n closeStreams();\n break;\n }\n }\n sendMsgToClient(END_TRANSMISSION);\n }", "private void buildMONMSGStatement(CLBlock block, CLCommand clCmd) {\n\t\tString msgIDValue = null;\n\t\tif (clCmd.getPositionalParms().size() >= 1)\n\t\t\tmsgIDValue = clCmd.getPositionalParm(0).getValue().getText();\n\t\telse if (clCmd.getParm(\"MSGID\") != null)\n\t\t\tmsgIDValue = clCmd.getParm(\"MSGID\").getValue().getText();\n\n\t\t// Get CMPDTA value (positional or not)\n\t\tString cmpdtaValue = null;\n\t\tif (clCmd.getPositionalParms().size() >= 2) {\n\t\t\tcmpdtaValue = clCmd.getPositionalParm(1).getValue().getText();\n\n\t\t\tif (cmpdtaValue.startsWith(\"(\") && cmpdtaValue.endsWith(\"\"))\n\t\t\t\tcmpdtaValue = cmpdtaValue.substring(1, cmpdtaValue.length() - 1);\n\t\t} else if (clCmd.getParm(\"CMPDTA\") != null)\n\t\t\tcmpdtaValue = clCmd.getParm(\"CMPDTA\").getValue().getText();\n\n\t\t// Get EXEC value (positional or not)\n\t\tString execValue = null;\n\t\tif (clCmd.getPositionalParms().size() >= 2) {\n\t\t\texecValue = clCmd.getPositionalParm(1).getValue().getText();\n\n\t\t\tif (execValue.startsWith(\"(\") && execValue.endsWith(\"\"))\n\t\t\t\texecValue = execValue.substring(1, execValue.length() - 1);\n\t\t} else if (clCmd.getParm(\"EXEC\") != null)\n\t\t\texecValue = clCmd.getParm(\"EXEC\").getValue().getText();\n\n\t\t// Link MONMSG to relative command\n\t\tList<QStatement> statementsList = block.getBlock().getStatements();\n\n\t\tif (statementsList.size() > 0) {\n\n\t\t\t// Case 1: MONMSG in CL source body (command MONMSG)\n\n\t\t\tQBlock execBlock = null;\n\t\t\t\n\t\t\tif (\"DO\".equalsIgnoreCase(execValue) || \"(DO)\".equalsIgnoreCase(msgIDValue)) {\n\n\t\t\t\tCLBlock execCLBlock = new CLBlock();\n\t\t\t\tbuildBlock(execCLBlock);\n\t\t\t\texecBlock = execCLBlock.getBlock();\n\n\t\t\t} else {\n\t\t\t\texecBlock = QIntegratedLanguageFlowFactory.eINSTANCE.createBlock();\n\t\t\t\tif (execValue != null) {\n\t\t\t\t\tCLCommand thenCmd = (CLCommand) commandParser.parse(execValue + \"\\n\");\n\t\t\t\t\tQStatement execCommand = analizeCommand(block, thenCmd, false);\n\t\t\t\t\texecBlock.getStatements().add(execCommand);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Control is the MONMSG command is related to an allowed command\n\t\t\tQStatement lastCommand = statementsList.get(statementsList.size() - 1);\n\n\t\t\tif (lastCommand instanceof QWhile || lastCommand instanceof QUntil || lastCommand instanceof QFor || lastCommand instanceof QJump || lastCommand instanceof QBreak\n\t\t\t\t\t|| lastCommand instanceof QContinue || lastCommand instanceof QReturn)\n\t\t\t\tSystem.err.println(\"MONMSG after a forbidden command\");\n\t\t\t\n\t\t\tif (lastCommand instanceof QMonitor) {\n\n\t\t\t\t// Add a new onError node at existing monitor\n\n\t\t\t\tQMonitor lastMonitor = (QMonitor) lastCommand;\n\n\t\t\t\tQOnError onError = QIntegratedLanguageFlowFactory.eINSTANCE.createOnError();\n\t\t\t\tif (execBlock != null)\n\t\t\t\t\tonError.setBody(execBlock);\n\n\t\t\t\tif (msgIDValue != null && !msgIDValue.isEmpty()) {\n\t\t\t\t\tString[] errors = msgIDValue.split(\" \");\n\t\t\t\t\tfor(String error: errors)\n\t\t\t\t\t\tonError.getErrors().add(error);\n\t\t\t\t}\n\n\n\t\t\t\tlastMonitor.getOnErrors().add(onError);\n\n\t\t\t} else {\n\n\t\t\t\t// Create a new monitor statement with last command as boby\n\n\t\t\t\tQMonitor monitorStatement = QIntegratedLanguageFlowFactory.eINSTANCE.createMonitor();\n\n\t\t\t\t// Create monitor body\n\t\t\t\tQBlock monitorBody = QIntegratedLanguageFlowFactory.eINSTANCE.createBlock();\n\t\t\t\tmonitorBody.getStatements().add(lastCommand);\n\t\t\t\tmonitorStatement.setBody(monitorBody);\n\n\t\t\t\t// Create monitor onError\n\t\t\t\tQOnError onError = QIntegratedLanguageFlowFactory.eINSTANCE.createOnError();\n\t\t\t\tif (execBlock != null)\n\t\t\t\t\tonError.setBody(execBlock);\n\n\t\t\t\tif (msgIDValue != null && !msgIDValue.isEmpty()) {\n\t\t\t\t\tString[] errors = msgIDValue.split(\" \");\n\t\t\t\t\tfor(String error: errors)\n\t\t\t\t\t\tonError.getErrors().add(error);\n\t\t\t\t}\n\n\t\t\t\tmonitorStatement.getOnErrors().add(onError);\n\n\t\t\t\t// Erase last command il block command list and add new\n\t\t\t\t// monitorStatement as last command\n\t\t\t\t// statementsList.remove(statementsList.size()-1);\n\t\t\t\tstatementsList.add(monitorStatement);\n\t\t\t}\n\t\t} else {\n\t\t\t/*\n\t\t\t * Case 2: MONMSG after first PGM statement (program MONMSG).\n\t\t\t * \n\t\t\t * Manage MONMSG only if:\n\t\t\t * \n\t\t\t * - An EXEC action is defined - and action is a GOTO statement.\n\t\t\t */\n\n\t\t\tQBlock execBlock = null;\n\n\t\t\tif (execValue != null) {\n\n\t\t\t\texecBlock = QIntegratedLanguageFlowFactory.eINSTANCE.createBlock();\n\t\t\t\tCLCommand thenCmd = (CLCommand) commandParser.parse(execValue + \"\\n\");\n\t\t\t\tQStatement execCommand = analizeCommand(block, thenCmd, false);\n\n\t\t\t\tif (execCommand instanceof QJump)\n\t\t\t\t\texecBlock.getStatements().add(execCommand);\n\t\t\t\telse\n\t\t\t\t\tSystem.err.println(\"Program level MONMSG can execute only GOTO statements\");\n\n\t\t\t\tQMonitor monitorStatement = QIntegratedLanguageFlowFactory.eINSTANCE.createMonitor();\n\n\t\t\t\t// Create monitor body\n\t\t\t\tCLBlock monitorCLBlock = new CLBlock();\n\t\t\t\tbuildBlock(monitorCLBlock);\n\t\t\t\tmonitorStatement.setBody(monitorCLBlock.getBlock());\n\n\t\t\t\t// Create monitor onError\n\t\t\t\tQOnError onError = QIntegratedLanguageFlowFactory.eINSTANCE.createOnError();\n\t\t\t\tif (execBlock != null)\n\t\t\t\t\tonError.setBody(execBlock);\n\t\t\t\t\n\t\t\t\tif (msgIDValue != null && !msgIDValue.isEmpty()) {\n\t\t\t\t\tString[] errors = msgIDValue.split(\" \");\n\t\t\t\t\tfor(String error: errors)\n\t\t\t\t\t\tonError.getErrors().add(error);\n\t\t\t\t}\n\n\t\t\t\tmonitorStatement.getOnErrors().add(onError);\n\t\t\t\tstatementsList.add(monitorStatement);\n\t\t\t}\n\t\t}\n\t}", "abstract public boolean doCommand(String[] line, Inventory inv);", "public void getCommand() {\n\t\t\n\t\tSystem.out.println(\"Enter a command:\");\n\t\tString Input = reader.nextLine(); //takes the user's input and places it in String Input\n\t\t\n\t\t//in the collection of commands, will run loop once for each item in that collection and \n\t\t//stores the item it is looking in the variable created\n\t\tfor (Commandable command : Commands) { \n\t\t\t\n\t\t\tif (command.matchCommand(Input)) {\n\t\t\t\t\n\t\t\t\tcommand.doCommand();\n\t\t\t\treturn;\t//this ends the method to break out of the loop\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Command not recognized\");\n\t}", "private Command parseCommand(String input) {\r\n\r\n String[] splittedInput = input.toUpperCase().split(\" \");\r\n String command = splittedInput[0];\r\n\r\n switch (command) {\r\n case \"PLACE\":\r\n return new PlaceCommand(input);\r\n case \"MOVE\":\r\n return new MoveCommand();\r\n case \"LEFT\":\r\n return new RotateLeftCommand();\r\n case \"RIGHT\":\r\n return new RotateRightCommand();\r\n case \"REPORT\":\r\n return new ReportCommand();\r\n default:\r\n return new IgnoreCommand();\r\n }\r\n }", "public void onCmd(String cmd) \n {\n \tString split[] = cmd.split(\" \");\n \tif (split.length <= 1)\n \t{\n \t\tacm(\"No command was typed. Use \\\"help\\\" for a list of commands\");\n \t\treturn;\n \t}\n \telse\n \t{\n \t\tfor (ICommand command : commands)\n \t\t{\n \t\t\tif (command.getCommand().equalsIgnoreCase(split[1]))\n \t\t\t{\n \t\t\t\tcommand.onCmd(split);\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t\tacm(\"\\\"\" + split[1] + \"\\\" Unknown command. Use \\\"help\\\" for a list of commands\");\n \t}\n }", "public interface CommandExecutor {\n /**\n * This method parse a commands from string and call it\n *\n * @param sender ource of the commands\n * @param connectionCommand commands\n * @return true if a valid commands, otherwise false\n */\n default boolean onCommand(CommandSender sender, ConnectionCommand connectionCommand) {\n String[] split = connectionCommand.getCommand().split(\" \");\n\n return onCommand(sender, split[0], Arrays.copyOfRange(split, 1, split.length), connectionCommand.getArgs());\n }\n\n /**\n * Executes the given commands, returning its success\n *\n * @param sender ource of the commands\n * @param command Command which was executed\n * @param args Passed commands arguments\n * @param objects Objects\n * @return true if a valid commands, otherwise false\n */\n boolean onCommand(CommandSender sender, String command, String[] args, Object... objects);\n\n}", "network.message.PlayerResponses.Command getCommand();", "boolean processCommand() throws IOException\n\t{\n\t\tString[] commands = in.readLine().split(\" \");\n\t\tif (commands[0].equalsIgnoreCase(\"F\") && isNum(commands[1]) && isNum(commands[2])) {\n\t\t\tprocessFireCmd(new String[] {commands[1], commands[2]});\n\t\t} else if (commands[0].equalsIgnoreCase(\"C\")) {\n\t\t\tprocessChatCmd (Arrays.copyOfRange(commands, 1, commands.length).toString());\n\t\t} else if (commands[0].equalsIgnoreCase(\"D\")) {\n\t\t\tout.println(\"My board: \\n\");\n\t\t\tboard.draw();\n\t\t\tout.println(\"Target's board: \\n\");\n\t\t\ttargets.draw();\n\t\t\tout.flush();\n\t\t} else {\n\t\t\tout.println(\"Unknown command.\");\n\t\t\tout.flush();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public static final void parseMessage(String message) {\r\n if (message == null) return;\r\n String[] msg = message.split(\" \");\r\n user = getUser(msg[0]);\r\n \r\n if (msg[1].equals(\"PRIVMSG\")) {\r\n addUserToViewerList(user);\r\n msg[3] = msg[3].substring(1);\r\n \r\n /**\r\n * Write the input to console.\r\n */\r\n String s = \"\";\r\n for (int i = 3; i < msg.length - 1; i++) {\r\n s += msg[i] + \" \";\r\n }\r\n s += msg[msg.length - 1];\r\n Console.writeLine(user + \": \" + s);\r\n \r\n if (msg[3].equals(\"\") || msg[3].charAt(0) != cmd.getFlag()) {\r\n //Do some moderator functions if possible\r\n if (db.getUserLevel(user).getLevel() <= UserLevel.SUBSCRIBER.getLevel() && (canMod || db.getUserLevel(nick).getLevel() == UserLevel.OWNER.getLevel())) {\r\n String[] split = s.split(\" \");\r\n if (capsFilter && TwitchFilters.capsFilter(s, capsMinLength, capsTolerance) ) {\r\n purge(user, user + \", http://i.imgur.com/QApFb.jpg\");\r\n }\r\n else if (linksFilter && TwitchFilters.urlFilter(split)) {\r\n purge(user, user + \", links are disabled in this chat.\");\r\n }\r\n else if (bannedWordsFilter && TwitchFilters.bannedWordsFilter(split, TEST_WORDS)) {\r\n purge(user, user + \", HEEEEEEEY YOU SAID THE SECRET WORD!\");\r\n }\r\n else if (!emotes.isEmpty() && TwitchFilters.emotesFilter(split, emotes, emoteTolerance)) {\r\n purge(user, user + \", I have nothing witty to say here.\");\r\n }\r\n else if (symbolFilter && TwitchFilters.symbolFilter(s, symbolTolerance)) {\r\n purge(user, user + \" the spam is real.\");\r\n }\r\n }\r\n else if (user.equals(\"Jtv\") && message.contains(\"moderators of this room\")) {\r\n String mods = \"\";\r\n for (int i = 9; i < msg.length; i++) {\r\n mods += capName(msg[i]).replace(\",\", \"\") + \" \";\r\n }\r\n db.initMod(mods.trim().split(\" \"));\r\n canMod = db.getUserLevel(capName(nick)).getLevel() >= UserLevel.MODERATOR.getLevel();\r\n }\r\n return;\r\n }\r\n \r\n msg[3] = msg[3].substring(1);\r\n if (msg[3].equals(Commands.ADD_COMMAND)) {\r\n if (db.getUserLevel(user).getLevel() < UserLevel.MODERATOR.getLevel()) {\r\n sendMessage(user + \" does not have permission to add commands.\");\r\n return;\r\n }\r\n String com = \"\";\r\n try {\r\n if (msg.length >= 5 && msg[4].charAt(0) == cmd.getFlag()) {\r\n\t\t\tint i;\r\n\t\t\tfor (i = 5; i < msg.length; i++) {\r\n com += msg[i] + \" \";\r\n\t\t\t}\r\n sendMessage(cmd.addCommand(msg[4].replace(\"\" + cmd.getFlag(), \"\"), com.trim()));\r\n }\r\n else {\r\n sendMessage(\"Invalid parameters for !addcommand. Syntax is !addcommand ![Command Name] [Message]\");\r\n }\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n sendMessage(\"Invalid parameters for !addcommand. Syntax is !addcommand ![Command Name] [Message]\");\r\n }\r\n }\r\n else if (msg[3].equals(Commands.ADD_TIMER)) {\r\n if (db.getUserLevel(user).getLevel() < UserLevel.MODERATOR.getLevel()) {\r\n sendMessage(user + \" does not have permission to add timers.\");\r\n return;\r\n }\r\n try {\r\n String name = msg[4];\r\n int delay = Integer.parseInt(msg[5]);\r\n String output = \"\";\r\n for (int i = 6; i < msg.length; i++) {\r\n output += msg[i] + \" \";\r\n }\r\n sendMessage(tc.addCommand(name, output, delay));\r\n }\r\n catch (ArrayIndexOutOfBoundsException | NumberFormatException e) {\r\n sendMessage(\"Invalid parameters for !addtimer. Syntax is !addtimer [Name of timer] [Delay in minutes] [Message]\");\r\n }\r\n }\r\n else if (msg[3].equals(Commands.EDIT_COMMAND)) {\r\n\r\n }\r\n else if (msg[3].equals(Commands.EDIT_TIMER)) {\r\n\r\n }\r\n else if (msg[3].equals(Commands.REMOVE_COMMAND)) {\r\n try {\r\n s = cmd.removeCommand(msg[4], db.getUserLevel(user)).replace(Commands.USER_FLAG, user);\r\n sendMessage(s);\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n sendMessage(\"Invalid parameters for !removecommand. Syntax is !rmcmd ![Command Name]\");\r\n }\r\n }\r\n else if (msg[3].equals(Commands.REMOVE_TIMER)) {\r\n try {\r\n sendMessage(tc.removeCommand(msg[4]));\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n sendMessage(\"Invalid parameters for !removetimer. Syntax is !rmcmd [Name of timer]\");\r\n }\r\n }\r\n else if (msg[3].equals(Commands.DISABLE_TIMERS)) {\r\n tc.stopCommands();\r\n sendMessage(\"Timers have been disabled\");\r\n }\r\n else if (msg[3].equals(Commands.START_TIMERS)) {\r\n if (tc.isRunning()) {\r\n sendMessage(\"Timers are already running.\");\r\n }\r\n else {\r\n tc.startCommands();\r\n sendMessage(\"Timers have been started.\");\r\n }\t\r\n }\r\n else if (msg[3].equals(Commands.GREETING)) {\r\n try {\r\n switch (msg[4]) {\r\n case \"on\":\r\n case \"true\":\r\n case \"enable\":\r\n case \"enabled\":\r\n greetingOn = true;\r\n sendMessage(String.format(\"Greeting is set to %b\", greetingOn));\r\n break;\r\n case \"off\":\r\n case \"false\":\r\n case \"disable\":\r\n case \"disabled\":\r\n greetingOn = false;\r\n sendMessage(String.format(\"Greeting is set to %b\", greetingOn));\r\n break;\r\n case \"status\":\r\n sendMessage(String.format(\"Greeting is set to %b\", greetingOn));\r\n break;\r\n case \"message\":\r\n sendMessage(greeting);\r\n break;\r\n case \"test\":\r\n sendMessage(String.format(greeting, user));\r\n break;\r\n }\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n sendMessage(\"Invalid parameters for !greeting. Syntax is !greeting [on,true,enabled,off,false,disabled,status,message]\");\r\n }\r\n }\r\n else if (msg[3].equals(Commands.LINKS)) {\r\n if (db.getUserLevel(user).getLevel() < UserLevel.MODERATOR.getLevel()) return;\r\n try {\r\n switch(msg[4]) {\r\n case \"on\":\r\n case \"true\":\r\n case \"enable\":\r\n case \"enabled\":\r\n sendMessage(\"Links are enabled in this channel.\");\r\n linksFilter = false;\r\n break;\r\n case \"off\":\r\n case \"false\":\r\n case \"disable\":\r\n case \"disabled\":\r\n sendMessage(\"Links are disabled in this channel.\");\r\n linksFilter = true;\r\n break;\r\n case \"status\":\r\n sendMessage(String.format(\"Links are set to %b\", linksFilter));\r\n break;\r\n default:\r\n sendMessage(\"Invalid parameters for !links.\");\r\n break;\r\n }\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n sendMessage(\"Invalid parameters for !links.\");\r\n }\r\n }\r\n /* Figure out how to implement this cleaner */\r\n else if (msg[3].equals(\"lookup\")) {\r\n String lookup = capName(msg[5]);\r\n sendMessage(String.format(\"User: %s %s: %d User Level: %s Is a regular: %b\",\r\n lookup, currency, db.getPoints(lookup), db.getUserLevel(lookup).toString().toLowerCase(), db.isRegular(lookup)));\r\n }\r\n else if (msg[3].equals(\"set\")) {\r\n if (db.getUserLevel(user).getLevel() <= UserLevel.MODERATOR.getLevel() && !user.equals(\"Genodragon_sc\")) return;\r\n try {\r\n switch (msg[4]) {\r\n case \"level\":\r\n db.setUserLevel(capName(msg[6]), UserLevel.valueOf(msg[7].toUpperCase()));\r\n ObjectIO.writeObjectToFile(dbPath, db);\r\n break;\r\n case \"points\":\r\n db.changePoints(capName(msg[6]), Integer.parseInt(msg[7]));\r\n break;\r\n case \"regular\":\r\n db.setRegular(msg[6], Boolean.parseBoolean(capName(msg[7]))); //Boolean parse doesn't work\r\n break;\r\n default:\r\n throw new Exception(\"WHOS THAT POKEMON\");\r\n }\r\n }\r\n catch (Exception e) {\r\n sendMessage(\"Invalid parameters for set.\");\r\n }\r\n }\r\n else if (msg[3].equals(\"die\")) {\r\n sendMessage(\"T_T Goodbye.\");\r\n disconnect();\r\n }\r\n else if (msg[3].equals(Commands.IS_FOLLOWER)) {\r\n if (db.getUserLevel(user).getLevel() < UserLevel.ADMIN.getLevel()) return;\r\n try {\r\n if (TwitchAPI.isFollower(msg[4], admin)) {\r\n sendMessage(capName(msg[4]) + \" is a follower of \" + admin + \".\");\r\n }\r\n else {\r\n sendMessage(capName(msg[4]) + \" is not a follower of \" + admin + \".\");\r\n }\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n sendMessage(\"You goofed didn't you?\");\r\n }\r\n }\r\n else if (msg[3].equals(Commands.IS_SUBSCRIBER)) {\r\n if (db.getUserLevel(user).getLevel() < UserLevel.ADMIN.getLevel()) return;\r\n try {\r\n if (TwitchAPI.isSubscriber(msg[4], admin)) {\r\n sendMessage(capName(msg[4]) + \" is a subscriber of \" + admin + \".\");\r\n }\r\n else {\r\n sendMessage(capName(msg[4]) + \" is not a subscriber of \" + admin + \".\");\r\n }\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n sendMessage(\"You goofed didn't you?\");\r\n }\r\n }\r\n else if (msg[3].equals(\"sudo\")) {\r\n if (db.getUserLevel(user).getLevel() <= UserLevel.MODERATOR.getLevel() || !user.equals(\"Genodragon_sc\")) return;\r\n String com = \"\";\r\n for (int i = 4; i < msg.length; i++) {\r\n com += msg[i] + \" \";\r\n }\r\n sendMessage(com.trim());\r\n }\r\n else if (cmd.contains(msg[3])) {\r\n String output = cmd.getCommand(msg[3]);\r\n output = output.replace(Commands.USER_FLAG, user);\r\n sendMessage(output);\t\r\n }\r\n }\r\n else if (msg[1].equals(\"JOIN\")) {\r\n addUserToViewerList(user);\r\n if (greetingOn) {\r\n String greet = greeting.replace(Commands.USER_FLAG, user);\r\n sendMessage(greet);\r\n }\r\n Console.writeLine(msg[1] + \" \" + user);\r\n }\r\n else if (msg[1].equals(\"PART\")) {\r\n removeUserFromViewerList(user);\r\n Console.writeLine(msg[1] + \" \" + user);\r\n }\r\n else if (msg[0].equals(\"PING\")) {\r\n sendRaw(\"PONG \" + msg[1]);\r\n }\r\n }", "public static void processCommand(String command) {\n instance.doCommand(command);\n }", "protected void handleMessage(Message msg) {}" ]
[ "0.72163826", "0.7076763", "0.68737626", "0.6861137", "0.68502486", "0.66788775", "0.6589672", "0.6550225", "0.6504789", "0.64251447", "0.6201296", "0.6195608", "0.6189396", "0.61429894", "0.612816", "0.61139", "0.6092084", "0.6088957", "0.6058201", "0.6036876", "0.60266966", "0.6015717", "0.60117376", "0.5974646", "0.5973218", "0.5968868", "0.59674484", "0.5937617", "0.59330153", "0.5911057", "0.58982915", "0.58677644", "0.58616257", "0.585674", "0.58525336", "0.5833498", "0.58060545", "0.5799282", "0.5795375", "0.5784532", "0.5781479", "0.57773054", "0.5764174", "0.5763461", "0.5759998", "0.57582885", "0.575276", "0.5751996", "0.57487947", "0.57342833", "0.5717988", "0.5711347", "0.5711203", "0.56938845", "0.5687237", "0.56822956", "0.56771404", "0.5669866", "0.5668023", "0.566209", "0.56562704", "0.56531847", "0.56503475", "0.5646427", "0.56368643", "0.5635035", "0.56242007", "0.5623346", "0.5617868", "0.5615158", "0.56061554", "0.5605414", "0.56028193", "0.5589697", "0.558961", "0.5586379", "0.55858207", "0.5584001", "0.55721617", "0.5558464", "0.5558464", "0.5558464", "0.5556859", "0.55562574", "0.5549451", "0.5549184", "0.5546317", "0.55394506", "0.55334723", "0.5529982", "0.55287343", "0.5528046", "0.55186075", "0.5515061", "0.5514765", "0.5513989", "0.551319", "0.551156", "0.55009365", "0.54987717" ]
0.57771873
42
TODO Autogenerated method stub Write a program that asks user to input int values: areaCode and localNumber. Using concatenation put together in this format and assign to String phoneNumber variable: (222)3334444 Write a print statement that displays (use phoneNumber variable ): Calling number (222)3334444
public static void main(String[] args) { Scanner scan = new Scanner (System.in); System.out.println("Enter your area code: "); int areaCode = scan.nextInt(); System.out.println("Enter local number: "); int localNumber = scan.nextInt(); //(617)-8202117 String phoneNumber = "(" + areaCode + ")-" + localNumber; System.out.println("Calling number " + phoneNumber); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Phone(String countryCode, String areaCode, String number) {\n this.countryCode = countryCode;\n this.areaCode = areaCode;\n this.number = number;\n }", "private String generatePhone() {\n\t\tString ret = \"\";\n\t\tString[] areaCode = { \"051\", \"055\", \"045\", \"043\", \"053\" };\n\n\t\t// Gets an area code\n\t\tret = areaCode[(new Random()).nextInt(5)];\n\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tint n = (new Random()).nextInt(9);\n\n\t\t\t// Checks if the first number is 0\n\t\t\tif (i == 0 && n == 0) {\n\t\t\t\ti -= 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tret += n;\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t}", "String formatPhoneNumber(String phoneNumber);", "private void formatPhoneNum() {\n\t\tthis.phoneNum = \"(\" + this.phoneNum.substring(0, 3) + \") \" + this.phoneNum.substring(3, 6) + \" \"\n\t\t\t\t+ this.phoneNum.substring(6);\n\t}", "java.lang.String getPhoneNumber();", "java.lang.String getPhoneNumber();", "java.lang.String getPhoneNumber();", "public String getArea(String phoneNumber, Context context) {\n if (phoneNumber.charAt(0) == '0' || phoneNumber.charAt(0) == '1'\n || phoneNumber.startsWith(\"+86\")) {\n Uri queryUri = NumberServiceHelper.getSingleLocationQueryUriForNumber(phoneNumber);\n Cursor cursor = null;\n try {\n Log.d(TAG, \"getArea() : uniform query up. phoneNumber = \" + AliTextUtils.desensitizeNumber(phoneNumber));\n cursor = context.getContentResolver().query(queryUri, null, null, null, null);\n Log.d(TAG, \"getArea() : uniform query down. cursor = \" + cursor);\n if (cursor != null && cursor.moveToFirst()) {\n String province = cursor.getString(NumberServiceHelper.LOCATION_SINGLE_COLUMN_PROVINCE);\n String area = cursor.getString(NumberServiceHelper.LOCATION_SINGLE_COLUMN_AREA);\n String location = AliTextUtils.makeLocation(province, area);\n return location;\n }\n } catch (SQLiteException sqle) {\n Log.e(TAG, \"getArea: failed to query location.\", sqle);\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n }\n return \"\";\n }", "public void enterPhoneAreaCode() throws IOException {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying the Phone Area Code is available or not\");\n\t\tWaitClass.WaitForElementisDisplay(driver, 5, enterPhoneAreaCode);\n\t\tAssert.assertTrue(enterPhoneAreaCode.isDisplayed());\n\t\tenterPhoneAreaCode.sendKeys(BasePage.getCellData(xlsxName, sheetName, 8, 0));\n\n\t}", "public String getAreaCode() \n\t{\n\t\treturn getNumber().substring(1,4);\n\t}", "java.lang.String getPhonenumber();", "void formatPhoneNumber(String phoneNumber) throws PhoneNumberFormatException;", "public String inputPhoneNumber() {\n String phoneNumber = editTextPhoneNumber.getText().toString();\n return phoneNumber;\n }", "java.lang.String getUserPhone();", "@Override\n\tpublic Phone parse(String completePhonenumber, Locale locale) throws ParseException {\n\t\t\n\t\tSystem.out.println(\"inside parse method of phonenumber formatter\");\n\t\t\n\t\t\n\t\tPhone phone=new Phone();\n\t\t//split the string received from the user\n\t\t\t\tString[] phoneNumberArray = completePhonenumber.split(\"-\");\n\t\t//wheather number consist of \"-\"\n\t\tint index = completePhonenumber.indexOf('-');\n\t\t\n\t\tif(index == -1) {\n\t\t\t\n\t\t}\n\t\t\n\t\t//if the \"-\" is not found add 91 as a default country code\n\t\t\n\t\t//exract the country code and set it to phone class coun try code property\n\t\tphone.setCountrycode(\"91\");\n\t\tphone.setUsernumber(phoneNumberArray[1]);\n\t\t\n\t\t\n\t\t\t//extract the country code and set it to phone class country code property\n\t\t\n\t\treturn phone;\n\t\t\n\t}", "public String getPhoneNumber(){\n\t\t \n\t\t TelephonyManager mTelephonyMgr;\n\t\t mTelephonyMgr = (TelephonyManager)\n\t\t activity.getSystemService(Context.TELEPHONY_SERVICE); \n\t\t return mTelephonyMgr.getLine1Number();\n\t\t \n\t\t}", "public void setAreaCode(int value) {\r\n this.areaCode = value;\r\n }", "java.lang.String getPhone();", "private String getPhone()\n {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"\");\n System.out.print(\"Indtast telefonnummer: \");\n return scanner.nextLine();\n }", "public long getPhoneNumber() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t// getter method initialized\t\t\t\t \r\n Scanner scanner = new Scanner(System.in);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t// Initialize the scanner to get input from User\r\n System.out.print(\"Enter Phone Number : \");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // This will print the argument at the end of the line\r\n phoneNumber = scanner.nextLong();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Read long input from the User\r\n String inputPhoneNumber = Long.toString(phoneNumber);\t\t\t\t\t\t\t\t\t\t // convert Long to string.\r\n Pattern pattern = Pattern.compile(\"\\\\d{10}\");\t\t\t\t\t\t\t\t\t\t\t // The Pattern class represents a compiled regular expression.\r\n Matcher matcher = pattern.matcher(inputPhoneNumber );\t\t\t\t\t\t\t\t\t\t\t\t\t // The resulting Pattern object is used to obtain a Matcher instance.\r\n if (matcher.matches());\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // if loop ..to check input from the User\r\n else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// else loop started\r\n System.out.println(\"Invalid Phone Number - Please enter the Phone number again\");}\t\t \t// This will print the argument at the end of the line\t\r\n return phoneNumber;}", "public String formatPhoneNumber(String number) {\n return \"+44\" + number.substring(1, 11);\n }", "public void setAreaCode(String areaCode) {\n this.areaCode = areaCode;\n }", "public String areaCode() {\n return areaCode;\n }", "static boolean inAreaHuh ( PhoneNumber pn, int someArea ) {\n\t// return ... pn.areaCode ... pn.prefix ... pn.line ... someArea ;\n\treturn pn.areaCode == someArea ;\n }", "private void formatPhoneNumber(final String rawPhoneNumber) {\n if (!TextUtils.isEmpty(mCountryCode)) {\n try {\n mCurrentPhoneNumber = PhoneNumberUtil.getInstance().parse(rawPhoneNumber.trim(), mCountryCode);\n final String formattedNumber = PhoneNumberUtil.getInstance().format(mCurrentPhoneNumber, PhoneNumberUtil.PhoneNumberFormat.INTERNATIONAL);\n if (!TextUtils.equals(formattedNumber, mPhoneNumberInput.getText())) {\n // Update field with the formatted number\n mPhoneNumberInput.setText(formattedNumber);\n mPhoneNumberInput.setSelection(mPhoneNumberInput.getText().length());\n }\n } catch (NumberParseException e) {\n mCurrentPhoneNumber = null;\n }\n }\n }", "String getPhone(int type);", "public void setPhoneNumber() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setter method initialized\r\n System.out.println(\"Phone Number : \"+phoneNumber);}", "public static String formatPhoneNumber(String phoneNo) {\n if (!TextUtils.isEmpty(phoneNo) && phoneNo.length() == 10) {\n StringBuilder sb = new StringBuilder(14);\n sb.append(\"(\").append(phoneNo.substring(0, 3)).append(\") \")\n .append(phoneNo.substring(3, 6)).append(\"-\").append(phoneNo.substring(6, 10));\n return sb.toString();\n }\n\n return phoneNo;\n }", "public void setAreaCode(String areaCode) {\n this.areaCode = areaCode == null ? null : areaCode.trim();\n }", "public PhoneNumberSearchOptions setAreaCode(String areaCode) {\n this.areaCode = areaCode;\n return this;\n }", "public static String getUserPhone(String accountNumber){\n return \"select ui_phone from user_information where ui_account = '\"+accountNumber+\"'\";\n }", "public void setAreacode(Integer areacode) {\n this.areacode = areacode;\n }", "@AutoEscape\n\tpublic String getPhone();", "public static final String number2show(String phoneNumber) throws Exception {\n\t\tif (phoneNumber == null || phoneNumber.length() == 0) {\n\t\t\treturn phoneNumber;\n\t\t}\n\n\t\tboolean isIpCall = false;\n\n\t\tint lth = phoneNumber.length();\n\t\tif(lth >= CHINA_MOBILE_LDC.length()){\n\t\t\tif (phoneNumber.substring(0, 5).equals(CHINA_MOBILE_LDC)) {\n\t\t\t\tisIpCall = true;\n\n\t\t\t\tphoneNumber = phoneNumber.substring(5);\n\t\t\t}\n\t\t}\n\t\t//phone not encrypt yet, like 10086/955555 etc, it is not a cipher text\n\t\tif (phoneNumber.length() != CIPHER_FIXED_LENGTH) {\n\t\t\t//with '+'\n\t\t\tif (phoneNumber.length() != 22) {\n\t\t\t\tif (isIpCall) {\n\t\t\t\t\treturn CHINA_MOBILE_LDC + phoneNumber;\n\t\t\t\t}\n\t\t\t\treturn phoneNumber;\n\t\t\t} else {\n\t\t\t\t// with '+' maybe\n\t\t\t\t//TODO: strange here\n\t\t\t\tchar first = phoneNumber.charAt(0);\n\t\t\t\tif (first != '+') {\n\t\t\t\t\tif (isIpCall) {\n\t\t\t\t\t\treturn CHINA_MOBILE_LDC + phoneNumber;\n\t\t\t\t\t}\n\t\t\t\t\treturn phoneNumber;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn phoneNumber;\n\t\t}\n\t\tif (phoneNumber.charAt(0) == '+') {\n\t\t\tphoneNumber = phoneNumber.substring(1);\n\t\t}\n\t\t\n\t\t//TODO when input length is 21, can not know it is a \n\t\t//plain text or encrypt text\n\t\t//check the last two bit, if more than 19, return \n\t\tint length = phoneNumber.length();\n\t\tString twobitString = phoneNumber.substring(length - 2);\n\t\tint twobitInt = 0;\n\t\ttry{\n\t\t\ttwobitInt = Integer.parseInt(twobitString);\n\t\t}catch(Exception e){\n\t\t\treturn phoneNumber;\n\t\t}\n\t\t\n\t\tif(twobitInt > CIPHER_FIXED_LENGTH - LAST_TWO_BITS_INDICATOR){\n\t\t\treturn phoneNumber;\n\t\t}\n\t\t//do the real work, it is must the valid encrypt phone\n\t\tString body = unpadding(phoneNumber);\n\n\t\tString realPhone = show(body, TIMES);\n\t\tif (!isEmpty(realPhone) || realPhone.length() >= 2) {\n\t\t\tString with86 = realPhone.substring(0, 2);\n\n\t\t\tif (with86.equals(\"86\")) {\n\t\t\t\trealPhone = realPhone.substring(2);\n\t\t\t}\n\t\t}\n\n\t\tif (isIpCall) {\n\t\t\treturn CHINA_MOBILE_LDC + realPhone;\n\t\t}\n\t\treturn realPhone;\n\t}", "private static String getSubcriptionAreaId(String subscriptionNumber){\n\t\tString pincode = \"\";\n\t\ttry {\n\t\t\tSQL:{\n\t\t\tConnection connection = DBConnection.createConnection();\n\t\t\tPreparedStatement preparedStatement = null;\n\t\t\tResultSet resultSet = null;\n\t\t\t/*String sql =\"SELECT area_id from fapp_subscription where subscription_no = ?\";*/\n\t\t\tString sql =\"SELECT pincode from fapp_subscription where subscription_no = ?\";\n\t\t\ttry {\n\t\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\tpreparedStatement.setString(1, subscriptionNumber);\n\t\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\tif (resultSet.next()) {\n\t\t\t\t\t/*areaId = resultSet.getInt(\"area_id\");\t*/\n\t\t\t\t\tpincode = resultSet.getString(\"pincode\");\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally{\n\t\t\t\tif(connection!=null){\n\t\t\t\t\tconnection.close();\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t/*System.out.println(\"area id-\"+areaId);\n \treturn areaId;*/\n\t\tSystem.out.println(\"pincode-\"+pincode);\n\t\treturn pincode;\n\t}", "public static PhoneNumber buildRandomFrPhoneNumber() {\n\t\treturn PhoneNumber.builder().countryCode(\"+33\").nationalNumber(\"590\" + RandomStringUtils.random(6, false, true))\n\t\t\t\t.phoneNumberName(PersonalInfoGenerator.generateName(5)).build();\n\t}", "public String standardizePhoneNumber() {\r\n StringBuilder phoneNumber = new StringBuilder();\r\n\r\n //retrieves all the digits from the string\r\n for (int i = 0; i < string.length(); i++) {\r\n char temp = string.charAt(i);\r\n if (Character.isDigit(temp)) {\r\n phoneNumber.append(temp);\r\n }\r\n }\r\n if (phoneNumber.length() != 10) {\r\n return \"This WackyString is not a phone number.\";\r\n }\r\n else {\r\n return \"(\" + phoneNumber.substring(0,3) + \") \" + phoneNumber.substring(3,6) + \"-\" + phoneNumber.substring(6);\r\n }\r\n }", "public static String formatPhoneNumber(String phoneNumber) {\n\t\tString formattedPhoneNumber = phoneNumber.replaceAll(\"[\\\\+\\\\s-]\", \"\");\r\n\t\t\r\n\t\t// If the original phone number started with double zero, remove these zeroes.\r\n\t\tif (formattedPhoneNumber.startsWith(\"00\"))\r\n\t\t\tformattedPhoneNumber = formattedPhoneNumber.substring(2);\r\n\t\t\r\n\t\t// If the remaining number contains only 9 numbers, prefix a zero.\r\n\t\tif (formattedPhoneNumber.length() == 9)\r\n\t\t\tformattedPhoneNumber = \"0\" + formattedPhoneNumber;\r\n\t\t\r\n\t\tif (formattedPhoneNumber.charAt(2) == '6') {\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn formattedPhoneNumber;\r\n\t}", "public String getPhone() {\r\n // Bouml preserved body begin 00040C82\r\n\t return phoneNumber;\r\n // Bouml preserved body end 00040C82\r\n }", "public String getPhoneNumber(){\r\n\t\treturn phoneNumber;\r\n\t}", "@Override\r\n\tpublic void formatPhoneNumber(String phoneNumber) throws PhoneNumberFormatException {\r\n\t\tboolean print = true;\r\n\r\n\t\tif (phoneNumber.charAt(0) != '(') {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(1))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(2))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(3))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (phoneNumber.charAt(4) != ')') {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (phoneNumber.charAt(5) != '-') {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(6))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(7))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(8))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (phoneNumber.charAt(9) != '-') {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(10))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(11))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(12))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\t\tif (!Character.isDigit(phoneNumber.charAt(13))) {\r\n\t\t\tprint = false;\r\n\t\t\tthrow new PhoneNumberFormatException(phoneNumber);\r\n\t\t}\r\n\r\n\t\tif (print == true) {\r\n\t\t\tSystem.out.println(phoneNumber);\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\nString filename= \"C:\\\\Users\\\\aadm199\\\\Documents\\\\Personal\\\\javatraining\\\\phonebook.txt\";\nFile file = new File(filename);\nString phoneNumber=null;\ntry {\n\tBufferedReader br = new BufferedReader(new FileReader(file));\n phoneNumber = br.readLine();\nSystem.out.println(phoneNumber);\nbr.close();\n} catch (FileNotFoundException e) {\n\t// TODO Auto-generated catch block\n\te.printStackTrace();\n} catch (IOException e) {\n\t// TODO Auto-generated catch block\n\te.printStackTrace();\n}\ntry {\n\n\tif (phoneNumber.length()!=9) {\n\t\tthrow new NineDigitsException(phoneNumber);\n\t}\n\tif (phoneNumber.substring(0, 1).equals(\"4\")) {\n\t\tthrow new AreacodeException(phoneNumber);\n\t\t}\n\tif(phoneNumber.substring(0,2).equals(\"0\")){\n\t\tthrow new NumberzeroException(phoneNumber);\n\t\t}\n//\tSystem.out.println(phoneNumber.substring(2));\n//\tSystem.out.println(phoneNumber.substring(0, 1));\n//\tSystem.out.println(phoneNumber.subSequence(0, 3));\n//\tSystem.out.println(phoneNumber.length());\n//\tfor (int i=0;i<phoneNumber.length();i++) {\n//\t\tSystem.out.println(\"Printing Phonenumber loop\");\n//\t\tSystem.out.print(\"Phone number at position\"+ i + \"is \"+(phoneNumber.substring(i,i+1)));\n//\t}\n\tfor (int n=0;n<=phoneNumber.length()-2;n++) {\n\t\tif (phoneNumber.substring(n,n+1).equals(\"0\")){\n\t\t\tif ((phoneNumber.substring(n+1,n+2).equals(\"0\"))&&(phoneNumber.substring(n+2,n+3).equals(\"0\"))) {\n\t\t\t\tthrow new EmergencyNumberException(phoneNumber);\n\t\t\t}\n\t\t}\n\n\n\t}\n\n\n}catch (NineDigitsException e) {\n\tSystem.out.println(\"Error:Phone number is not 9 digits\");\n\tSystem.out.println(e.toString());\n}catch (AreacodeException e) {\n\tSystem.out.println(\"Error:Phone number is not having correct area code\");\n\tSystem.out.println(e.toString());\n}catch (EmergencyNumberException e) {\n\tSystem.out.println(\"Error:Phone number is 000 in it\");\n\tSystem.out.println(e.toString());\n}catch (NumberzeroException e){\n\tSystem.out.println(\"Second digit should not be 0\");\n\tSystem.out.println(e.toString());\n}\n\n\n\n\n\n\t}", "public String getLocationNumber()\n\t{\n\t\tString locationNo = getContent().substring(OFF_ID27_LOCATION, OFF_ID27_LOCATION + LEN_ID27_LOCATION) ;\n\t\treturn (locationNo);\n\t}", "private String getMyPhoneNO() {\n String mPhoneNumber;\n TelephonyManager tMgr = (TelephonyManager) this.getActivity().getSystemService(Context\n .TELEPHONY_SERVICE);\n mPhoneNumber = tMgr.getLine1Number();\n if(mPhoneNumber == null)\n mPhoneNumber = \"+NoNotFound\";\n return mPhoneNumber;\n }", "public void setPhoneNumber(java.lang.CharSequence value) {\n this.phone_number = value;\n }", "public static void main(String[] args) {\n\t Scanner in = new Scanner(System.in);\n\t int N = in.nextInt();\n\t in.nextLine();\n\t Pattern p = Pattern.compile(\"([0-9]+)[\\\\s,-]([0-9]+)[\\\\s,-]([0-9]+)\");\n\t for (int i = 0; i < N; i++)\n\t {\n\t String num = in.nextLine();\n\t Matcher m = p.matcher(num);\n\t if(m.find())\n\t {\n\t System.out.println(String.format(\"CountryCode=%s,LocalAreaCode=%s,Number=%s\",\n\t \t\t m.group(1),m.group(2),m.group(3)));\n\t }\n\t \n\t }\n\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:06.418 -0500\", hash_original_method = \"0C41F4A14E4338A7839D0DC3A0BBE9E6\", hash_generated_method = \"A79E2872AFA3AB9F4CF42F8387DE692F\")\n \nprivate String getAreaDescriptionForNumber(\n PhoneNumber number, String lang, String script, String region) {\n int countryCallingCode = number.getCountryCode();\n // As the NANPA data is split into multiple files covering 3-digit areas, use a phone number\n // prefix of 4 digits for NANPA instead, e.g. 1650.\n int phonePrefix = (countryCallingCode != 1) ?\n countryCallingCode : (1000 + (int) (number.getNationalNumber() / 10000000));\n AreaCodeMap phonePrefixDescriptions =\n getPhonePrefixDescriptions(phonePrefix, lang, script, region);\n return (phonePrefixDescriptions != null) ? phonePrefixDescriptions.lookup(number) : \"\";\n }", "@Step\r\n\tpublic void enterPhone(String phone) {\r\n\t\tLOGGER.info(\"Entering phone: \" + phone);\r\n\t\tphoneInput.type(phone);\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tSystem.out.println(\"Plate number exercise\");\r\n\t\tSystem.out.println(\"------------------------------------------------------\");\r\n\t\tString ABC1234aaa = \"ABC1234aaa\";\r\n\t\tSystem.out.println(\"Is ABC1234aaa valid? -- \" + ABC1234aaa.matches(PLATE_NUMBER_FORMAT));\r\n\t\t\r\n\t\tString AB1234DF= \"AB1234DF\";\r\n\t\tSystem.out.println(\"Is AB1234DF valid? -- \" + AB1234DF.matches(PLATE_NUMBER_FORMAT));\r\n\t\t\r\n\t\t\r\n\t\tString AB1234DFG = \"AB1234DFG\";\r\n\t\tSystem.out.println(\"Is AB1234DFG valid? -- \" + AB1234DFG.matches(PLATE_NUMBER_FORMAT));\r\n\r\n\t\tSystem.out.println(\"------------------------------------------------------\");\r\n\t\t\r\n\t\tSystem.out.println(\"Replace All exercise\");\r\n\t\tSystem.out.println(\"------------------------------------------------------\");\r\n\t\t\r\n\t\tString str1 = \"123458\";\r\n\t\t\r\n\t\tSystem.out.println(str1 + \" replace 8 with 'eight' \\t\" +str1.replaceAll(\"8\", EIGHT));\r\n\t\t\r\n\t\tString str2 = \"ABC82348GHIJ8\";\r\n\t\tSystem.out.println(str2 + \" replace 8 with 'eight' \\t\" +str2.replaceAll(\"8\", EIGHT));\r\n\t\t\r\n\t\tSystem.out.println(\"Regular Expression exercise\");\r\n\t\t\r\n\t\tSystem.out.println(\"Count words exercise\");\r\n\t\tSystem.out.println(\"------------------------------------------------------\");\r\n\t\t\r\n\t\tString myString = \"I am currently very hungry.\";\r\n\t\t\r\n\t\tSystem.out.println(\"Word count: \" + myString.split(WORD).length);\r\n\t\t\r\n\t\tSystem.out.println(\"Check area code exercise\");\r\n\t\tSystem.out.println(\"------------------------------------------------------\");\r\n\t\t\r\n\t\tString phone1 = \"651-345-6789\";\r\n\t\tString phone2 = \"641-451-3222\";\r\n\t\tString phone3 = \"231-651-3442\";\r\n\t\t\r\n\t\tSystem.out.println(\"Is phone number: \" + phone1 + \" from IA?\\t\" + phone1.matches(IA_AREA_CODE) );\r\n\t\tSystem.out.println(\"Is phone number: \" + phone2 + \" from IA?\\t\" + phone2.matches(IA_AREA_CODE) );\r\n\t\tSystem.out.println(\"Is phone number: \" + phone3 + \" from IA?\\t\" + phone3.matches(IA_AREA_CODE) );\r\n\t\t\r\n\t\tSystem.out.println(\"Email address format checker\");\r\n\t\tSystem.out.println(\"------------------------------------------------------\");\r\n\t\t\r\n\t\tString email1 = \"abc@foo.com.abc\";\r\n\t\tString email2 = \"123abc@hotmail.com\";\r\n\t\tString email3 = \"abc.def*gmail.com\";\r\n\t\t\r\n\t\tSystem.out.println(\"Is email address: \" + email1 + \" valid?\\t\" + email1.matches(EMAIL_ADDRESS_FORMAT));\r\n\t\tSystem.out.println(\"Is email address: \" + email2 + \" valid?\\t\" + email2.matches(EMAIL_ADDRESS_FORMAT));\r\n\t\tSystem.out.println(\"Is email address: \" + email3 + \" valid?\\t\" + email3.matches(EMAIL_ADDRESS_FORMAT));\r\n\t\t\r\n\t\tSystem.out.println(\"======================================================\\n\");\r\n\t\tSystem.out.println(\"Using Pattern and Matcher Classes\");\r\n\t\t\r\n\t\tMatcher matcher;\r\n\t\tPattern pattern = Pattern.compile(PLATE_NUMBER_FORMAT);\r\n\t\t\r\n\t\tmatcher = pattern.matcher(ABC1234aaa);\r\n\t\tSystem.out.println(\"Is ABC1234aaa valid? -- \" + matcher.matches());\r\n\t\t\r\n\t\tmatcher = pattern.matcher(AB1234DF);\r\n\t\tSystem.out.println(\"Is AB1234DF valid? -- \" + matcher.matches());\r\n\t\t\r\n\t\tmatcher = pattern.matcher(AB1234DFG);\r\n\t\tSystem.out.println(\"Is AB1234DFG valid? -- \" + matcher.matches());\r\n\t\t\r\n\t\tSystem.out.println(\"======================================================\");\r\n\t\tpattern = Pattern.compile(\"8\");\r\n\t\tmatcher = pattern.matcher(str1);\r\n\t\t\r\n\t\tSystem.out.println(str1 + \" replace 8 with 'eight' \\t\" +matcher.replaceAll(EIGHT));\r\n\t\t\r\n\t\tmatcher = pattern.matcher(str2);\r\n\t\tSystem.out.println(str2 + \" replace 8 with 'eight' \\t\" +matcher.replaceAll(EIGHT));\r\n\t\t\r\n\t\t\r\n\t}", "public void setTelephoneNumber(String newNumber)\r\n\t{\r\n\t\ttelephoneNumber = newNumber;\r\n\t}", "@And(\"^I enter the plenti phone number using mobile website$\")\n public void I_enter_the_plenti_phone_number_using_mobile_website() throws Throwable {\n TextBoxes.typeTextbox(Elements.element(\"plenti_enroll.phone_number\"), TestUsers.getuslCustomer(null).getUser().getProfileAddress().getBestPhone());\n }", "@Override\n public String getphoneNumber() {\n return ((EditText)findViewById(R.id.phoneNumberUserPage)).getText().toString().trim();\n }", "public String returnPhoneNumber() {\n\t\treturn this.registration_phone.getAttribute(\"value\");\r\n\t}", "@Override public String toString() {\n return String.format(\"(%03d) %03d-%04d\",\n areaCode, prefix, lineNumber);\n }", "public static String beautifyPhone(String phone) {\r\n\t\tif (isNullOrEmpty(phone)) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tif (phone.startsWith(\"84\")) {\r\n\t\t\treturn \"0\" + phone.substring(2);\r\n\t\t}\r\n\t\tif (phone.startsWith(\"+84\")) {\r\n\t\t\treturn \"0\" + phone.substring(3);\r\n\t\t}\r\n\t\treturn phone;\r\n\t}", "public services enterAccountPhoneNumber() throws IOException {\n \tCommonUtils.insertText(\"css\", pageobj.getpageObjects().getProperty(\"crm_phone_textbox\"), \"7799095959\", wd);\n \treturn this;\n \t\n }", "public void SetCheckoutRegistrationPhonecode_number(String code, String phoneno){\r\n\t\tString Code = getValue(code);\r\n\t\tString Phoneno = getValue(phoneno);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:- \"+Code+\" , \"+Phoneno);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Registration Phone code and Phone number should be entered as '\"+Code+\"' , '\"+Phoneno+\"' \");\r\n\t\ttry{\r\n\t\t\tif((countrygroup_phoneNo).contains(countries.get(countrycount))){\r\n\t\t\t\tsendKeys(locator_split(\"txtcheckoutregistrationPhonenumber\"),Phoneno);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tsendKeys(locator_split(\"txtcheckoutregistrationPhonecode\"),Code);\r\n\t\t\t\tsendKeys(locator_split(\"txtcheckoutregistrationPhonenumber\"),Phoneno);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tSystem.out.println(\"Registration Phone code and number is entered as '\"+Code+\"' , '\"+Phoneno+\"' \");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Registration Phone code and number is entered as '\"+Code+\"' , '\"+Phoneno+\"' \");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Registration Phone code and number is not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtcheckoutregistrationPhonecode\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" / \"+elementProperties.getProperty(\"txtcheckoutregistrationPhonenumber\").toString().replace(\"By.\", \" \")+\r\n\t\t\t\t\t\" not found\");\r\n\t\t}\r\n\r\n\t}", "public DeveloperRegistrationPage enterPhone(String data){\n\t \tString phone = prop.getProperty(\"DeveloperRegistration.Phone.Name\");\t \n\t \tenterByName(phone, data);\n\t\treturn this;\n\t}", "public String getPhoneNumber() {\r\n return number;\r\n }", "public String getPhoneNumberString() {\n return mPhoneNumberString;\n }", "public void LandID(){\n int x = Integer.parseInt(AssetLandCount_txt.getText());\n \n String LandIDwillBe = String.valueOf(x+1);\n \n LandNumber_txt.setText(LandIDwillBe);\n }", "public void setPhoneNumbr(String phoneNumber) {\n\t\tthis.phoneNumber = phoneNumber;\n\t}", "public String getAreaCode() {\n return areaCode;\n }", "public String getAreaCode() {\n return areaCode;\n }", "public void updatePhoneNumber(String newPhoneNum)\r\n {\r\n phoneNum = newPhoneNum;\r\n }", "public void numberLookup() {\n\t\tSystem.out.print(\"Number: \");\n\t\tint entryNumber = getInputForNumber();\n\t\tphoneList\n\t\t\t.stream()\n\t\t\t.filter(n -> n.getNumber() == entryNumber)\n\t\t\t.forEach(n -> System.out.println(\"This is the number of \" + n.getName()));\n\t}", "public void setphoneNum(String phoneNum) {\n\t\t_phoneNum = phoneNum;\n\t}", "public void getPhoneNumber(ArrayList<String> document) {\r\n String line = \"\";\r\n for(int i = 0; i < document.size(); i++)\r\n {\r\n if(document.get(i).contains(\"Fax:\"))\r\n {\r\n continue;\r\n }\r\n if(document.get(i).contains(\"(\") || document.get(i).contains(\"-\"))\r\n {\r\n line = document.get(i);\r\n break;\r\n }\r\n }\r\n number = line.replaceAll(\"[^\\\\d]\", \"\");\r\n }", "@Override\n public String toString(){\n return '+' + code + number.substring(0, 3) + '-' + number.substring(3, 6) + '-' +number.substring(6);\n }", "@RequestMapping(value = \"/addBillingAddress\", method = RequestMethod.POST)\r\n @ResponseBody\r\n public String addBillingAddress(\r\n \t\t@RequestParam(\"fullName\") String fullName, \r\n \t\t@RequestParam(\"landMark\") String landMark, \r\n \t\t@RequestParam(\"mobileNumber\") String mobileNumber,\r\n \t\t@RequestParam(\"city\") String city,\r\n \t\t@RequestParam(\"type\") String type)\r\n {\r\n OrderItem orderItem = simpleWorksDashboardManager.addBillingAddress(fullName, landMark, mobileNumber, city, type);\r\n return \"{\\\"status\\\": true}\";\r\n }", "public void setPhoneNumber(String phone_number){\n this.phone_number = phone_number;\n }", "public String getPhoneNumber()\n\t{\n\t\treturn this._phoneNumber;\n\t}", "public int getAreaCode() {\r\n return areaCode;\r\n }", "public String getPhoneNumber() throws NullPointerException {\n\n\t\tString phoneNumber = user.getPhoneNumber();\n\t\tif (phoneNumber == null || phoneNumber.isEmpty()) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\n\t\treturn Utils.formatPhoneNumber(phoneNumber);\n\t}", "public void setPhoneNumber(String phoneNumber) {\n\t\tthis.phoneNumber=phoneNumber;\r\n\t}", "public String getPhoneNum()\r\n {\r\n\treturn phoneNum;\r\n }", "private boolean validatePhone(String phone) {\n if (phone.matches(\"\\\\d{10}\")) {\n return true;\n } //validating phone number with -, . or spaces\n else if (phone.matches(\"\\\\d{3}[-\\\\.\\\\s]\\\\d{3}[-\\\\.\\\\s]\\\\d{4}\")) {\n return true;\n } //validating phone number where area code is in braces ()\n else if (phone.matches(\"\\\\(\\\\d{3}\\\\)-\\\\d{3}-\\\\d{4}\")) {\n return true;\n } //return false if nothing matches the input\n else {\n return false;\n }\n }", "public PaymentRequest setSenderPhone(String areaCode, String number) {\r\n if (sender == null) {\r\n sender = new Sender();\r\n }\r\n sender.setPhone(new Phone(areaCode, number));\r\n return this;\r\n }", "public String getAreaCode() {\n return this.areaCode;\n }", "public void setPhoneNum(String phoneNum) {\n this.phoneNum = phoneNum;\n }", "public static void main(String[] args) {\n String firstInitial, lastName, streetName, streetType, cityName;\n int houseNumber;\n Scanner keyboard=new Scanner(System.in);\n\n System.out.print(\"Enter your first initial, last name, street name,street type and your house number: \");\n firstInitial=keyboard.next();\n lastName=keyboard.next();\n streetName=keyboard.next();\n streetType=keyboard.next();\n cityName=keyboard.next();\n houseNumber=keyboard.nextInt();\n System.out.print(firstInitial+ \" \" +lastName+ \" \" + houseNumber +\" \");\n System.out.println(streetName + \" \" + streetType + \" \" +cityName);\n\n }", "public String getMyPhoneNumber() {\n return ((TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE))\n .getLine1Number();\n }", "private void dialPhoneNumber(String phoneNumber) {\n Intent intent = new Intent(Intent.ACTION_DIAL);\n intent.setData(Uri.parse(\"tel:\" + phoneNumber));\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "int getPhone();", "public Builder setAreaNo(int value) {\n \n areaNo_ = value;\n onChanged();\n return this;\n }", "@Test\n public void testProcessPhoneNumbers() {\n StdInputPhoneNumberProcessor processor = new StdInputPhoneNumberProcessor(scanner, matcher);\n processor.processPhoneNumbers();\n }", "public java.lang.CharSequence getPhoneNumber() {\n return phone_number;\n }", "public String getPhonenumber() {\n return phonenumber;\n }", "@Step\n public void enterPhoneNumberForPurchase(String number){\n actionWithWebElements.enterTextIntoInput(phoneNumberInput, number);\n }", "public String toString() {\n\t\tString result=\"\";\n\t\tString a = street;\n\t\tString b = Integer.toString(number);\n\t\tString c = zipCode;\n\t\tString d = city;\n\t\tresult = a + \" \"+ b+\" \"+ c + \" \"+d;\n\t\t\n\t\treturn result;\n\t}", "static void result(String nameSurname, int number, String address) { \r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"Name: \" + nameSurname);\r\n\t\tSystem.out.println(\"Phone number: \" + number);\r\n\t\tSystem.out.println(\"Address: \" + address);\r\n\t}", "public void setSpPhoneNumber(String _PhoneNumber) {\r\n this.spPhoneNumber = _PhoneNumber;\r\n }", "public String formatPhoneNumber(String str) {\n if (TextUtils.isEmpty(str)) {\n return \"\";\n }\n if (sFormattingType == -1) {\n sFormattingType = PhoneNumberUtils.getFormatTypeForLocale(Locale.getDefault());\n }\n String extractNetworkPortion = PhoneNumberUtils.extractNetworkPortion(PhoneNumberUtils.convertKeypadLettersToDigits(str));\n sEditable.clear();\n sEditable.append(extractNetworkPortion);\n PhoneNumberUtils.formatNumber(sEditable, sFormattingType);\n return sEditable.toString();\n }", "public String getPhoneNumber() {\n\t\treturn this.phoneNumber;\n\t}", "public String getPhoneNumber() {\n\t\treturn phoneNumber;\n\t}", "public String getPhoneNumber() {\r\n return phoneNumber;\r\n }", "public java.lang.CharSequence getPhoneNumber() {\n return phone_number;\n }", "public void SetCheckoutRegistrationPhonecode_number(String phoneno){\r\n\r\n\t\tString Phoneno = getValue(phoneno);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Registration Phone code and number should be entered as , \"+Phoneno);\r\n\t\ttry{\r\n\r\n\r\n\t\t\tsendKeys(locator_split(\"txtcheckoutregistrationPhonenumber\"),Phoneno);\r\n\t\t\tSystem.out.println(\"Registration Phone code and number is entered as , \"+Phoneno);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Registration Phone code and number is entered as , \"+Phoneno);\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Registration Phone number is not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"checkoutregistrationPhonenumber\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" / \"+elementProperties.getProperty(\"checkoutregistrationPhonenumber\").toString().replace(\"By.\", \" \")+\r\n\t\t\t\t\t\" not found\");\r\n\t\t}\r\n\r\n\t}", "public String getPhone_number() {\n return phone_number;\n }", "public int getAreaNo() {\n return areaNo_;\n }" ]
[ "0.655372", "0.6409532", "0.6089792", "0.59563893", "0.5938475", "0.5938475", "0.5938475", "0.5872449", "0.57603526", "0.57277405", "0.5712689", "0.564642", "0.5595578", "0.55476606", "0.55053073", "0.54992014", "0.5454945", "0.54464096", "0.539716", "0.53955436", "0.53594375", "0.53522855", "0.53395927", "0.527496", "0.5267961", "0.5266265", "0.5246829", "0.5246539", "0.52408624", "0.52297854", "0.5219533", "0.51981795", "0.517403", "0.5168315", "0.5125229", "0.5110437", "0.51080865", "0.5100228", "0.51001775", "0.50878227", "0.507403", "0.5072245", "0.505446", "0.5049514", "0.50494057", "0.5048988", "0.50483924", "0.5045725", "0.50433457", "0.5035985", "0.5025938", "0.5011458", "0.5008276", "0.50005454", "0.49956292", "0.49920285", "0.49911702", "0.49878263", "0.49869436", "0.4983257", "0.4979449", "0.49768344", "0.4972947", "0.4972947", "0.49599293", "0.49546424", "0.49436817", "0.49344674", "0.49172518", "0.4916796", "0.49122602", "0.49114144", "0.49072313", "0.4900197", "0.48967004", "0.48930117", "0.48842368", "0.4881328", "0.4881315", "0.48793647", "0.48749164", "0.48724538", "0.4872043", "0.48607442", "0.48566133", "0.4855252", "0.48468888", "0.48450264", "0.48422956", "0.48422077", "0.48407632", "0.48387358", "0.4834524", "0.48341224", "0.4827901", "0.4827461", "0.48238868", "0.4823422", "0.4816407", "0.4816124" ]
0.7224175
0
for temporary assign use /methods begin must pass connectednode,tf will be initialized from the caller, see rosjava_tf TfViz
public LocalPlanner(final ConnectedNode node, TransformListener tf, VoxelGrid costmap_ros){ costmap_ros_=null; tf_=null; initialized_=false; this.node=node; //initialize the planner initialize(tf, costmap_ros); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TermNode() {\n this.fac = new FacNode();\n this.term = null;\n this.selection = 1;\n }", "Graph(){\n\t\taddNode();\n\t\tcurrNode=myNodes.get(0);\n\t}", "ControllerNode localNode();", "public abstract void setNodes();", "private int Funcionar_salida_Ant_umbral_Color(float location, float email, float imei, float device, float serialnumber, float macaddress, float advertiser) {\n float n_epochs = 1;\n\n float output = 0; //y\n String op_string;\n\n\n //First, create an input tensor:\n /*\n\n */\n\n\n //**** TEORIA *******\n //First, create an input tensor:\n //Tensor input = Tensor.create(features);\n // float[][] output = new float[1][1];\n //Then perform inference by:\n //Tensor op_tensor = sess.runner().feed(\"input\", input).fetch(\"output\").run().get(0).expect(Float.class);\n //Copy this output to a float array using:\n //op_tensor.copyTo(output);\n // values.copyTo(output);\n Tensor input_location = Tensor.create(location);\n Tensor input_email = Tensor.create(email);\n Tensor input_imei = Tensor.create(imei);\n Tensor input_device = Tensor.create(device);\n Tensor input_serialnumber = Tensor.create(serialnumber);\n Tensor input_macaddress = Tensor.create(macaddress);\n Tensor input_advertiser = Tensor.create(advertiser);\n\n Tensor input_umbral_verde = Tensor.create(umbral_verde);\n Tensor input_umbral_naranja = Tensor.create(umbral_naranja);\n Tensor input_umbral_rojo = Tensor.create(umbral_rojo);\n\n Tensor input_Plocation = Tensor.create(Plocation);\n Tensor input_Pemail = Tensor.create(Pemail);\n Tensor input_Pdevice = Tensor.create(Pdevice);\n Tensor input_Pimei = Tensor.create(Pimei);\n Tensor input_Pserialnumber = Tensor.create(Pserialnumber);\n Tensor input_Pmacaddress = Tensor.create(Pmacaddress);\n Tensor input_Padvertiser = Tensor.create(Padvertiser);\n\n\n\n ArrayList<Tensor<?>> list_op_tensor = new ArrayList<Tensor<?>>();\n\n String location_filtrado = \"NO\";\n String email_filtrado = \"NO\";\n String imei_filtrado = \"NO\";\n String device_filtrado = \"NO\";\n String serialnumber_filtrado = \"NO\";\n String macaddress_filtrado = \"NO\";\n String advertiser_filtrado = \"NO\";\n String filtraciones_aplicacion = \"\";\n\n if (location == 1){\n location_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Location\" + \"\\n\";\n }\n if (email == 1){\n email_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Email\" + \"\\n\";\n }\n if (device == 1){\n device_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -DeviceID\" + \"\\n\";\n }\n if (imei == 1){\n imei_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Imei\" + \"\\n\";\n\n }\n if (serialnumber == 1){\n serialnumber_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -SerialNumber\" + \"\\n\";\n\n }\n if (macaddress == 1){\n macaddress_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -MacAddress\" + \"\\n\";\n\n }\n if (advertiser == 1){\n advertiser_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -AdvertiserID\" + \"\\n\";\n\n }\n\n\n //Tensor op_tensor = sess.runner().feed(\"input\",input).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral_green\n //umbral_green\n Tensor op_tensor_verde = sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"serialnumber_input\",input_serialnumber).feed(\"macaddress_input\",input_macaddress).feed(\"advertiser_input\",input_advertiser).feed(\"umbral\",input_umbral_verde).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral Naranja\n Tensor op_tensor_naranja = sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"serialnumber_input\",input_serialnumber).feed(\"macaddress_input\",input_macaddress).feed(\"advertiser_input\",input_advertiser).feed(\"umbral\",input_umbral_naranja).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral rojo\n Tensor op_tensor_rojo =sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"serialnumber_input\",input_serialnumber).feed(\"macaddress_input\",input_macaddress).feed(\"advertiser_input\",input_advertiser).feed(\"umbral\",input_umbral_rojo).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n\n list_op_tensor.add(op_tensor_verde);\n list_op_tensor.add(op_tensor_naranja);\n list_op_tensor.add(op_tensor_rojo);\n\n //para escribir en la app en W y B test\n // LO COMENTO 12/02/2021\n // ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").run();\n // NO VA ESTA PRUEBA ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").fetch(\"y/output\").run();\n\n //CREAR UN TEXTO PARA ESCRIBIR EL OUTPUT PREDECIDO: Out\n\n // Y.setText(\"Salida: Y= \"+ Float.toString(op_tensor.floatValue()) +\", si entrada X=1\");\n // Y.setText(\"Salida: Y= \"+ Float.toString(op_tensor.floatValue()) +\", si entrada email,...\");\n\n String recomendacion = \"No hacer nada\";\n String Nivel = \" Bajo\";\n int Nivel_color = 0; //0 es verde, 1 naranja, 2 rojo\n if (op_tensor_verde.floatValue() == 1) {\n if(op_tensor_naranja.floatValue() == 1 ){\n if(op_tensor_rojo.floatValue() == 1 ){\n Nivel = \" Alto\";\n Nivel_color = 2;\n }\n else {\n Nivel = \" Medio\";\n Nivel_color = 1;\n }\n }\n else {\n Nivel = \" Bajo\";\n Nivel_color = 0;\n }\n }\n\n /// test.setBackgroundResource(R.color.holo_green_light);\n\n\n // resumen_app.setText(\"Resumen App analizada: \"+ \"\\n\" + \"Nota: Si una app tiene una filtración, se marcará dicho valor con un 'SI'\"+ \"\\n\" + \"Location: \" + location_filtrado + \"\\n\" + \"Email: \" + email_filtrado + \"\\n\" + \"DeviceID: \" + device_filtrado + \"\\n\" + \"Imei: \" + imei_filtrado + \"\\n\" +\n // \"Recomendación: \" + recomendacion);\n // subtitulo.setText(\"Nivel: \" );\n // titulo.setText(Nivel );\n // titulo.setTextColor(android.R.color.background_dark);\n\n // resumen_app.setText(\"Filtraciones Spotify: \"+ \"\\n\" + \"\\n\" + \"Location: \" + location_filtrado + \"\\n\" + \"Email: \" + email_filtrado + \"\\n\" + \"DeviceID: \" + device_filtrado + \"\\n\" + \"Imei: \" + imei_filtrado );\n // resumen_app.setText(\"Filtraciones: \"+ \"\\n\" + \"\\n\" + filtraciones_aplicacion );\n op_string = \"Filtraciones: \"+ \"\\n\" + \"\\n\" + filtraciones_aplicacion;\n\n //mirar bien codigo:\n if ( Nivel_color == 0) {\n // resumen_app.setBackgroundResource(R.color.verde);\n nivel_color = 0;\n // resumen_app.setBackgroundResource(R.drawable.stilo_borde_textview);\n }\n if ( Nivel_color == 1) {\n // resumen_app.setBackgroundResource(R.color.naranja);\n nivel_color = 1;\n // resumen_app.setBackgroundResource(R.drawable.stilo_borde_naranja);\n }\n if ( Nivel_color == 2) {\n // resumen_app.setBackgroundResource(R.color.rojo);\n nivel_color = 2;\n // resumen_app.setBackgroundResource(R.drawable.stilo_borde_rojo);\n }\n\n\n\n return nivel_color;\n }", "public TraceGraph(Event initEvent, Event termEvent) {\n dummyInitialNode = new EventNode(initEvent);\n dummyTerminalNode = new EventNode(termEvent);\n nodes.add(dummyInitialNode);\n nodes.add(dummyTerminalNode);\n cachedRelations = null;\n }", "public DepthFirst(Graph g,JTextArea output) {\n\t\tsuper();\n\t\tthis.g=g;\n\t\tthis.output=output;\n\t\tthis.output.setText(\"\");\n\n\t}", "private void initTfod() {\n\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\",\n \"id\",\n hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minimumConfidence = TFOD_CONFIDENCE; //Added by J.Tu on 2019-04-24 00:23\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n //tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_GOLD_MINERAL, LABEL_SILVER_MINERAL);\n\n }", "private void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minimumConfidence = 0.67;\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_FIRST_ELEMENT, LABEL_SECOND_ELEMENT);\n }", "private String Funcionar_salida_Ant_umbral_lista_Dentro(float location, float email, float imei, float device, float serialnumber, float macaddress, float advertiser) {\n float n_epochs = 1;\n\n float output = 0; //y\n String op_string;\n\n\n //First, create an input tensor:\n /*\n\n */\n\n\n //**** TEORIA *******\n //First, create an input tensor:\n //Tensor input = Tensor.create(features);\n // float[][] output = new float[1][1];\n //Then perform inference by:\n //Tensor op_tensor = sess.runner().feed(\"input\", input).fetch(\"output\").run().get(0).expect(Float.class);\n //Copy this output to a float array using:\n //op_tensor.copyTo(output);\n // values.copyTo(output);\n Tensor input_location = Tensor.create(location);\n Tensor input_email = Tensor.create(email);\n Tensor input_imei = Tensor.create(imei);\n Tensor input_device = Tensor.create(device);\n Tensor input_serialnumber = Tensor.create(serialnumber);\n Tensor input_macaddress = Tensor.create(macaddress);\n Tensor input_advertiser = Tensor.create(advertiser);\n\n Tensor input_umbral_verde = Tensor.create(umbral_verde);\n Tensor input_umbral_naranja = Tensor.create(umbral_naranja);\n Tensor input_umbral_rojo = Tensor.create(umbral_rojo);\n\n Tensor input_Plocation = Tensor.create(Plocation);\n Tensor input_Pemail = Tensor.create(Pemail);\n Tensor input_Pdevice = Tensor.create(Pdevice);\n Tensor input_Pimei = Tensor.create(Pimei);\n Tensor input_Pserialnumber = Tensor.create(Pserialnumber);\n Tensor input_Pmacaddress = Tensor.create(Pmacaddress);\n Tensor input_Padvertiser = Tensor.create(Padvertiser);\n\n\n\n ArrayList<Tensor<?>> list_op_tensor = new ArrayList<Tensor<?>>();\n\n String location_filtrado = \"NO\";\n String email_filtrado = \"NO\";\n String imei_filtrado = \"NO\";\n String device_filtrado = \"NO\";\n String serialnumber_filtrado = \"NO\";\n String macaddress_filtrado = \"NO\";\n String advertiser_filtrado = \"NO\";\n\n String filtraciones_aplicacion = \"\";\n\n if (location == 1){\n location_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Location\" + \"\\n\";\n }\n if (email == 1){\n email_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Email\" + \"\\n\";\n }\n if (device == 1){\n device_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -DeviceID\" + \"\\n\";\n }\n if (imei == 1){\n imei_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Imei\" + \"\\n\";\n\n }\n if (serialnumber == 1){\n serialnumber_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -SerialNumber\" + \"\\n\";\n\n }\n if (macaddress == 1){\n macaddress_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -MacAddress\" + \"\\n\";\n\n }\n if (advertiser == 1){\n advertiser_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -AdvertiserID\" + \"\\n\";\n\n }\n\n\n //Tensor op_tensor = sess.runner().feed(\"input\",input).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral_green\n Tensor op_tensor_verde = sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"serialnumber_input\",input_serialnumber).feed(\"macaddress_input\",input_macaddress).feed(\"advertiser_input\",input_advertiser).feed(\"umbral\",input_umbral_verde).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral Naranja\n Tensor op_tensor_naranja = sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"serialnumber_input\",input_serialnumber).feed(\"macaddress_input\",input_macaddress).feed(\"advertiser_input\",input_advertiser).feed(\"umbral\",input_umbral_naranja).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral rojo\n Tensor op_tensor_rojo =sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"serialnumber_input\",input_serialnumber).feed(\"macaddress_input\",input_macaddress).feed(\"advertiser_input\",input_advertiser).feed(\"umbral\",input_umbral_rojo).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n\n list_op_tensor.add(op_tensor_verde);\n list_op_tensor.add(op_tensor_naranja);\n list_op_tensor.add(op_tensor_rojo);\n\n //para escribir en la app en W y B test\n // LO COMENTO 12/02/2021\n // ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").run();\n // NO VA ESTA PRUEBA ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").fetch(\"y/output\").run();\n\n //CREAR UN TEXTO PARA ESCRIBIR EL OUTPUT PREDECIDO: Out\n\n // Y.setText(\"Salida: Y= \"+ Float.toString(op_tensor.floatValue()) +\", si entrada X=1\");\n // Y.setText(\"Salida: Y= \"+ Float.toString(op_tensor.floatValue()) +\", si entrada email,...\");\n\n String recomendacion = \"No hacer nada\";\n String Nivel = \" Bajo\";\n int Nivel_color = 0; //0 es verde, 1 naranja, 2 rojo\n if (op_tensor_verde.floatValue() == 1) {\n if(op_tensor_naranja.floatValue() == 1 ){\n if(op_tensor_rojo.floatValue() == 1 ){\n Nivel = \" Alto\";\n Nivel_color = 2;\n }\n else {\n Nivel = \" Medio\";\n Nivel_color = 1;\n }\n }\n else {\n Nivel = \" Bajo\";\n Nivel_color = 0;\n }\n }\n\n /// test.setBackgroundResource(R.color.holo_green_light);\n\n\n // resumen_app.setText(\"Resumen App analizada: \"+ \"\\n\" + \"Nota: Si una app tiene una filtración, se marcará dicho valor con un 'SI'\"+ \"\\n\" + \"Location: \" + location_filtrado + \"\\n\" + \"Email: \" + email_filtrado + \"\\n\" + \"DeviceID: \" + device_filtrado + \"\\n\" + \"Imei: \" + imei_filtrado + \"\\n\" +\n // \"Recomendación: \" + recomendacion);\n\n // ************************* COMENTADO*********18/02\n\n // subtitulo.setText(\"Nivel: \" );\n // titulo.setText(Nivel );\n // titulo.setTextColor(android.R.color.background_dark);\n\n // resumen_app.setText(\"Filtraciones Spotify: \"+ \"\\n\" + \"\\n\" + \"Location: \" + location_filtrado + \"\\n\" + \"Email: \" + email_filtrado + \"\\n\" + \"DeviceID: \" + device_filtrado + \"\\n\" + \"Imei: \" + imei_filtrado );\n // **********************\n // resumen_app.setText(\"Filtraciones: \"+ \"\\n\" + \"\\n\" + filtraciones_aplicacion );\n op_string = \"Filtraciones: \"+ \"\\n\" + \"\\n\" + filtraciones_aplicacion;\n\n //mirar bien codigo:\n if ( Nivel_color == 0) {\n // resumen_app.setBackgroundResource(R.color.verde);\n nivel_color = 0;\n // resumen_app.setBackgroundResource(R.drawable.stilo_borde_textview);\n }\n if ( Nivel_color == 1) {\n // resumen_app.setBackgroundResource(R.color.naranja);\n nivel_color = 1;\n // resumen_app.setBackgroundResource(R.drawable.stilo_borde_naranja);\n }\n if ( Nivel_color == 2) {\n // resumen_app.setBackgroundResource(R.color.rojo);\n nivel_color = 2;\n // resumen_app.setBackgroundResource(R.drawable.stilo_borde_rojo);\n }\n\n\n\n\n return op_string;\n }", "private void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minimumConfidence = 0.8;\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_FIRST_ELEMENT, LABEL_SECOND_ELEMENT);\n }", "public void setNodeColorizer(NodeColorizer value) {\n nodeColorizer = value;\n colorNodes();\n }", "public SetSuccessorsGraphView(String name, E graphVar, int node) {\n super(name, graphVar);\n this.node = node;\n this.gdm = graphVar.monitorDelta(this);\n this.gdm.startMonitoring();\n if (!graphVar.isDirected()) {\n this.arcRemoved = (from, to) -> {\n if (from == node || to == node) {\n notifyPropagators(SetEventType.REMOVE_FROM_ENVELOPE, this);\n }\n };\n this.arcEnforced = (from, to) -> {\n if (from == node || to == node) {\n notifyPropagators(SetEventType.ADD_TO_KER, this);\n }\n };\n } else {\n this.arcRemoved = (from, to) -> {\n if (from == node) {\n notifyPropagators(SetEventType.REMOVE_FROM_ENVELOPE, this);\n }\n };\n this.arcEnforced = (from, to) -> {\n if (from == node) {\n notifyPropagators(SetEventType.ADD_TO_KER, this);\n }\n };\n }\n }", "public void apply() {\n this.vgcomponent.setFont( this.fontchooser.getSelectedFont() );\n this.vgcomponent.setFontcolor( this.fontcolor.getColor() );\n\n if( this.vgcomponent instanceof VisualEdge ) {\n VisualEdge vEdge = (VisualEdge) this.vgcomponent;\n vEdge.getEdge().setFollowVertexLabel( this.followLabel.isSelected() );\n if( !this.followLabel.isSelected() ) {\n vEdge.getEdge().setLabel( this.textarea.getText() );\n }\n }\n else {\n this.vgcomponent.setLabel( this.textarea.getText() );\n }\n }", "public interface IConnectable extends IFeatureEditPart\n{\n\t/** @return List of connection sources. */\n\tpublic List<ConnectionPoint> getConnectionSources();\n\n\t/** @return List of connection sinks. */\n\tpublic List<ConnectionPoint> getConnectionSinks();\n\n\t/** feature class for EditParts with connection sources. */\n\tpublic class Feature extends TensorConnectAction.IFeature<IConnectable>\n\t{\n\t\t/** Constructor. */\n\t\tpublic Feature(IConnectable editPart)\n\t\t{\n\t\t\tsuper(editPart);\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean doOnMouseMoved(ICanvasAction action, MouseEvent e)\n\t\t{\n\t\t\tTensorConnectAction connectAction = (TensorConnectAction) action;\n\n\t\t\tList<ConnectionPoint> connections;\n\t\t\tConnectionPoint startPoint = connectAction.getStartPoint();\n\t\t\tif (startPoint != null)\n\t\t\t{\n\t\t\t\tif (startPoint.getAnchor().getDirection() == EDirection.SOURCE)\n\t\t\t\t\tconnections = this.editPart.getConnectionSinks();\n\t\t\t\telse\n\t\t\t\t\tconnections = this.editPart.getConnectionSources();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tconnections = this.editPart.getConnectionSources();\n\t\t\t\tconnections.addAll(this.editPart.getConnectionSinks());\n\t\t\t}\n\n\t\t\tif (connections == null)\n\t\t\t\treturn false;\n\n\t\t\tremoveOccupiedConnections(connections);\n\n\t\t\tfor (ConnectionPoint connection : connections)\n\t\t\t{\n\t\t\t\tif (e.getPoint().distance(connection.getPoint()) > 5)\n\t\t\t\t\tcontinue;\n\t\t\t\taction.getCanvas().setCursor(\n\t\t\t\t\t\tnew Cursor(Cursor.CROSSHAIR_CURSOR));\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean doOnMousePressed(ICanvasAction action, MouseEvent e)\n\t\t{\n\t\t\tTensorConnectAction connectAction = (TensorConnectAction) action;\n\n\t\t\tList<ConnectionPoint> connections;\n\t\t\tConnectionPoint startPoint = connectAction.getStartPoint();\n\t\t\tif (startPoint != null)\n\t\t\t{\n\t\t\t\tif (startPoint.getAnchor().getDirection() == EDirection.SOURCE)\n\t\t\t\t\tconnections = this.editPart.getConnectionSinks();\n\t\t\t\telse\n\t\t\t\t\tconnections = this.editPart.getConnectionSources();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tconnections = this.editPart.getConnectionSources();\n\t\t\t\tconnections.addAll(this.editPart.getConnectionSinks());\n\t\t\t}\n\n\t\t\tif (connections == null)\n\t\t\t\treturn false;\n\n\t\t\tremoveOccupiedConnections(connections);\n\n\t\t\tfor (ConnectionPoint connection : connections)\n\t\t\t{\n\t\t\t\tif (e.getPoint().distance(connection.getPoint()) > 5)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tconnectAction.setStartPoint(connection);\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean doOnMouseDragged(ICanvasAction action, MouseEvent e)\n\t\t{\n\t\t\tTensorConnectAction connectAction = (TensorConnectAction) action;\n\n\t\t\tConnectionPoint startPoint = connectAction.getStartPoint();\n\t\t\tif (startPoint == null)\n\t\t\t\treturn false;\n\n\t\t\tList<ConnectionPoint> connections;\n\t\t\tif (startPoint.getAnchor().getDirection() == EDirection.SOURCE)\n\t\t\t\tconnections = this.editPart.getConnectionSinks();\n\t\t\telse\n\t\t\t\tconnections = this.editPart.getConnectionSources();\n\n\t\t\tif (connections == null)\n\t\t\t\treturn false;\n\n\t\t\tremoveOccupiedConnections(connections);\n\n\t\t\tfor (ConnectionPoint connection : connections)\n\t\t\t{\n\t\t\t\tif (e.getPoint().distance(connection.getPoint()) > 5)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tconnectAction.setEndPoint(connection);\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean doOnMouseReleased(ICanvasAction action, MouseEvent e)\n\t\t{\n\t\t\treturn doOnMouseDragged(action, e);\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean drawOverlay(ICanvasAction action, Graphics2D gfx)\n\t\t{\n\t\t\tTensorConnectAction connectAction = (TensorConnectAction) action;\n\n\t\t\tList<ConnectionPoint> connections;\n\t\t\tConnectionPoint startPoint = connectAction.getStartPoint();\n\t\t\tif (startPoint != null)\n\t\t\t{\n\t\t\t\tif (startPoint.getAnchor().getDirection() == EDirection.SOURCE)\n\t\t\t\t\tconnections = this.editPart.getConnectionSinks();\n\t\t\t\telse\n\t\t\t\t\tconnections = this.editPart.getConnectionSources();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tconnections = this.editPart.getConnectionSources();\n\t\t\t\tconnections.addAll(this.editPart.getConnectionSinks());\n\t\t\t}\n\n\t\t\tif (connections == null)\n\t\t\t\treturn false;\n\n\t\t\tremoveOccupiedConnections(connections);\n\n\t\t\tEllipse2D anchor = null;\n\t\t\tfor (ConnectionPoint connection : connections)\n\t\t\t{\n\t\t\t\tanchor = new Ellipse2D.Double(\n\t\t\t\t\t\tconnection.getPoint().getX() - 4,\n\t\t\t\t\t\tconnection.getPoint().getY() - 4,\n\t\t\t\t\t\t8,\n\t\t\t\t\t\t8);\n\n\t\t\t\tgfx.fill(anchor);\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\t/** removes occupied connections from a given set of connections. */\n\t\tpublic void removeOccupiedConnections(List<ConnectionPoint> connections)\n\t\t{\n\t\t\tList<ConnectionPoint> toBeRemoved = new LinkedList<ConnectionPoint>();\n\n\t\t\tfor (ConnectionPoint conn : connections)\n\t\t\t{\n\t\t\t\tif (conn.getAnchor().isOccopied())\n\t\t\t\t\ttoBeRemoved.add(conn);\n\t\t\t}\n\n\t\t\tconnections.removeAll(toBeRemoved);\n\t\t}\n\t}\n\n\t/** Connection source helper class */\n\tpublic class ConnectionPoint\n\t{\n\t\t/** The connection anchor. */\n\t\tprivate final TensorConnectionAnchor anchor;\n\n\t\t/** The 2D point coordinates for the connection source. */\n\t\tprivate final Point2D point;\n\n\t\t/** Constructor. */\n\t\tpublic ConnectionPoint(TensorConnectionAnchor anchor, Point2D pt)\n\t\t{\n\t\t\tthis.anchor = anchor;\n\t\t\tthis.point = pt;\n\t\t}\n\n\t\t/** @return the anchor of this connection. */\n\t\tpublic TensorConnectionAnchor getAnchor()\n\t\t{\n\t\t\treturn this.anchor;\n\t\t}\n\n\t\t/** @return the point for this connection source. */\n\t\tpublic Point2D getPoint()\n\t\t{\n\t\t\treturn this.point;\n\t\t}\n\t}\n}", "public void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minResultConfidence = 0.8f;\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_QUAD_ELEMENT, LABEL_SINGLE_ELEMENT);\n }", "private void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minResultConfidence = 0.8f;\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_FIRST_ELEMENT, LABEL_SECOND_ELEMENT);\n }", "void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_GOLD_MINERAL, LABEL_SILVER_MINERAL);\n }", "private void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_GOLD_MINERAL, LABEL_SILVER_MINERAL);\n }", "public VISNode() {\n this.model = new VISNodeModel();\n }", "public void nodeColor(String str) { setSelected(node_colors, str); }", "TriNode() {\r\n children = new HashMap<>();\r\n isValidWord = false;\r\n }", "public static void Set_TF(Basic b) {\n\t\tSet<ThoughtFrame> tfSet = new HashSet<ThoughtFrame>();\n\t\tIterator<ThoughtFrame> tfItr = b.getThoughtFrames().iterator();\n\t\twhile (tfItr.hasNext()) {\n\t\t\ttfSet.add(tfItr.next());\n\t\t}\n\t\t//add tfs in running composite activities\n\t\tStack<Object> stack = b.getCurrentWorkFrame();\n\t\tif (stack.size() > 1) {\n\t\t\tfor (int i = stack.size() - 1; i > 0; i--) {\n\t\t\t\tif (stack.get(i) instanceof ActivityInstance) {\n\t\t\t\t\tActivityInstance ai = (ActivityInstance) stack.get(i);\n\t\t\t\t\tif (ai.getActivity() instanceof CompositeActivity) {\n\t\t\t\t\t\tCompositeActivity comp = (CompositeActivity) ai.getActivity();\n\t\t\t\t\t\tIterator<ThoughtFrame> tmpItr = comp.getThoughtFrames().iterator();\n\t\t\t\t\t\twhile (tmpItr.hasNext()) {\n\t\t\t\t\t\t\tThoughtFrame tmp = tmpItr.next();\n\t\t\t\t\t\t\ttfSet.add(tmp);\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\tactiveThoughtFrames = ThoughtFrame_Sim.findActiveThoughtframes(b, tfSet);\n\t\twhile(!activeThoughtFrames.isEmpty()){\n\t\t\t\tTf_Star(b, tfSet, activeThoughtFrames);\n\t\t}\n\t}", "public void plotTsne() {\n cache.plotVocab();\n }", "public void buildGraph() {\n //System.err.println(\"Build Graph \"+this);\n if (node instanceof eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)\n ((eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)node).restoreSceneGraphObjectReferences( control.getSymbolTable() );\n }", "private void colorNode(NodeImpl node) {\n nodeColorizer.color(node);\n }", "public Node() {\r\n\t\tthis.input = null;\r\n\t\tthis.inputWeights = null;\r\n\t}", "public interface CorrFeature2Feature extends TGGNode {\n}", "public void addNode(NodeImpl node) {\n supervisedNodes.add(node);\n \n colorNodes();\n shortenNodeLabels();\n colorNodeLabels();\n colorNodeLabelBorders();\n }", "public void initTfod() {\n\t\tint tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n\t\t\t\t\"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n\t\tTFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters((tfodMonitorViewId));\n\t\ttfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n\t\ttfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_GOLD_MINERAL, LABEL_SILVER_MINERAL);\n\t}", "void setTf(TrabajadorFormulario tf) {\n this.tf=tf;\n }", "public TtreeNode() {\n\t numberOfNodes++;\n\t }", "public Node (String newW ) {\n word = newW;\n left = null;\n right = null;\n freq = 0;\n }", "@Override\r\n\tpublic void getExternal(){\r\n\t\tnng = new TNZNetworkNodeGraph_IuR();\r\n\t\tnng.setImgName(IMG_FNAME);\r\n\t\tnng.populate();\r\n\t\tnng.display();\r\n\t}", "@Override\r\n public void visit(Temp n, Graph argu) {\r\n /* Can only be Call() -> Temp(), so Temp is to be used */\r\n cur.addUse(Integer.parseInt(n.f1.f0.tokenImage)); // Temp is used\r\n }", "public SetSuccessorsGraphView(E graphVar, int node) {\n this(\"SUCCESSORS_OF(\" + graphVar.getName() + \", \" + node + \")\", graphVar, node);\n }", "private void colorNodes() {\n for (NodeImpl n : supervisedNodes) {\n colorNode(n);\n }\n }", "public static void graphTree(CommonTree tree){\n\t\tDOTTreeGenerator gen = new DOTTreeGenerator(); \n\t\tStringTemplate st = gen.toDOT(tree); \n\n\t\tString type = \"jpg\";\n\t\tGraphViz gv = new GraphViz();\n\t\tgv.addln(st.toString());\n\n\t\tSystem.out.println(\"Before\");\n\n\t\tImageIcon img = new ImageIcon(gv.getGraph(gv.getDotSource(), type));\n\n\t\tSystem.out.println(\"After\");\n\n\t\tint newHeight = 775, newWidth = 1255; \n\t\t/* This is for writing the image to disk*/\n\t\tFile out = new File(\"graph.\" + type); // Linux\n\t\tgv.writeGraphToFile( gv.getGraph( gv.getDotSource(), type ), out );\n\t\t//\t\tif (iw > newWidth){\n\t\t//\t\t\tnewHeight = newWidth * ih/iw ;\n\t\t//\t\t\tBufferedImage resizedImg = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_INT_RGB);\n\t\t//\t\t\tGraphics2D g2 = resizedImg.createGraphics();\n\t\t//\t\t\t\n\t\t//\t\t\tg2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\t\t//\t\t\tg2.drawImage(img.getImage(), 0, 0, newWidth, newHeight, null);\n\t\t//\t\t\tg2.dispose();\n\t\t//\t\t\timg = new ImageIcon(resizedImg);\n\t\t//\t\t}\n\n\t\tJFrame jf = new JFrame(\"Abstract Syntax Tree\");\n\t\tjf.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n\t\tJLabel photographLabel = new JLabel();\n\t\tphotographLabel.setHorizontalAlignment(JLabel.CENTER);\n\t\t//private Image getScaledImage(Image srcImg, int w, int h){\n\n\n\t\tphotographLabel.setIcon(img);\n\t\tJScrollPane scrollPane = new JScrollPane(photographLabel);\n\t\tjf.add(scrollPane, BorderLayout.CENTER);\n\t\tjf.pack();\n\t\tjf.setSize(newWidth+50, newHeight+50);\n\t\tjf.setResizable(true);\n\t\tjf.setVisible(true);\n\t\t/*end graphical display*/\n\t}", "public Stabel(){\n elementer = 0;\n hode = new Node(null);\n hale = hode;\n hode.neste = hale;\n hale.forrige = hode;\n }", "@Override\r\n public void nodeActivity() {\n }", "public void setNodeCoherent(boolean b) {\n }", "@Override\n public void inicio() {\n // inicializa el objetivo\n miObjetivo = \"\";\n // inicializa variables para explorar sucesores\n j = 0;\n m = 0;\n nodo = null;\n suc = null;\n succ = null;\n // inicializa objetos\n actual = \"\";\n g = graph.getGraphics();\n // comienza por el primer nodo\n nodo = graph.getNodes().get(0);\n actual = nodo.toString();\n // siguiente paso\n Step = 0;\n }", "@Override\r\n\tpublic void init() {\n\r\n\t PetriNet _net = new PetriNet(this, \"PhilosopherNet\", true, true);\r\n\t ContDistExponential dist1 = new ContDistExponential(this, \"waitdist1\", 2, true, true);\r\n\t ContDistExponential dist2 = new ContDistExponential(this, \"waitdist1\", 3, true, true);\r\n\t ContDistExponential dist3 = new ContDistExponential(this, \"durdist1\", 3, true, true);\r\n\r\n\t\t// Declaration of the used types of Tokens. These have to be objects\r\n\t\t// implementing the TokenType interface. Note that there is only one\r\n\t\t// object for each type, no matter how many Tokens of that type may\r\n\t\t// exist. A different object (even of the same class) always declares a\r\n\t\t// new, different type of token.\r\n\t\t\r\n\t\tTokenType type1 = new Fork();\r\n\t\tTokenType type2 = new Fork();\r\n\t\tTokenType type3 = new Fork();\r\n\t\tTokenType type4 = new Fork();\r\n\t\tTokenType type5 = new Fork();\r\n\t\tMap<TokenType, Integer> tokens = TokenMultiSetTools.arrayToMap(\r\n\t\t\t\tnew TokenType[] { type1, type2, type3, type4, type5 },\r\n\t\t\t\tnew int[] { 1, 1, 1, 1, 1 });\r\n\r\n\t\tPlace p1 = new Place(this, _net, \"p1\", tokens, true, true, true);\r\n\r\n\t\tTransitionMode t1 = new TransitionMode(this, _net, \"t1\", dist1, dist3, true, true);\r\n\t\tTransitionMode t2 = new TransitionMode(this, _net, \"t2\", dist2, dist3, true, true);\r\n\t\tTransitionMode t3 = new TransitionMode(this, _net, \"t3\", dist1, dist3, true, true);\r\n\t\tTransitionMode t4 = new TransitionMode(this, _net, \"t4\", dist2, dist3, true, true);\r\n\t\tTransitionMode t5 = new TransitionMode(this, _net, \"t5\", dist1, dist3, true, true);\r\n\r\n\t\tTransition trans = new Transition(this, _net, \"Mahlzeit\", true, true);\r\n\t\ttrans.addTransitionMode(t1);\r\n\t\ttrans.addTransitionMode(t2);\r\n\t\ttrans.addTransitionMode(t3);\r\n\t\ttrans.addTransitionMode(t4);\r\n\t\ttrans.addTransitionMode(t5);\r\n\r\n\t\tt1.addInputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type1,\r\n\t\t\t\ttype2 }, new int[] { 1, 1 }));\r\n\t\tt1.addOutputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type1,\r\n\t\t\t\ttype2 }, new int[] { 1, 1 }));\r\n\r\n\t\tt2.addInputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type2,\r\n\t\t\t\ttype3 }, new int[] { 1, 1 }));\r\n\t\tt2.addOutputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type2,\r\n\t\t\t\ttype3 }, new int[] { 1, 1 }));\r\n\r\n\t\tt3.addInputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type3,\r\n\t\t\t\ttype4 }, new int[] { 1, 1 }));\r\n\t\tt3.addOutputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type3,\r\n\t\t\t\ttype4 }, new int[] { 1, 1 }));\r\n\r\n\t\tt4.addInputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type4,\r\n\t\t\t\ttype5 }, new int[] { 1, 1 }));\r\n\t\tt4.addOutputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type4,\r\n\t\t\t\ttype5 }, new int[] { 1, 1 }));\r\n\r\n\t\tt5.addInputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type5,\r\n\t\t\t\ttype1 }, new int[] { 1, 1 }));\r\n\t\tt5.addOutputPlace(p1, TokenMultiSetTools.arrayToMap(new TokenType[] { type5,\r\n\t\t\t\ttype1 }, new int[] { 1, 1 }));\r\n\r\n\t}", "public void setNodeLabelColorizer(NodeChildColorizer value) {\n nodeLabelColorizer = value;\n colorNodeLabels();\n }", "@Override\n public void visitTerminal(TerminalNode node) {\n\n }", "private ArrayList<Tensor<?>> Funcionar_salida_Ant_umbral(float location, float email, float imei, float device, float serialnumber, float macaddress, float advertiser) {\n float n_epochs = 1;\n\n float output = 0; //y\n\n //First, create an input tensor:\n /*\n\n */\n\n\n //**** TEORIA *******\n //First, create an input tensor:\n //Tensor input = Tensor.create(features);\n // float[][] output = new float[1][1];\n //Then perform inference by:\n //Tensor op_tensor = sess.runner().feed(\"input\", input).fetch(\"output\").run().get(0).expect(Float.class);\n //Copy this output to a float array using:\n //op_tensor.copyTo(output);\n // values.copyTo(output);\n Tensor input_location = Tensor.create(location);\n Tensor input_email = Tensor.create(email);\n Tensor input_imei = Tensor.create(imei);\n Tensor input_device = Tensor.create(device);\n Tensor input_serialnumber = Tensor.create(serialnumber);\n Tensor input_macaddress = Tensor.create(macaddress);\n Tensor input_advertiser = Tensor.create(advertiser);\n\n Tensor input_umbral_verde = Tensor.create(umbral_verde);\n Tensor input_umbral_naranja = Tensor.create(umbral_naranja);\n Tensor input_umbral_rojo = Tensor.create(umbral_rojo);\n\n Tensor input_Plocation = Tensor.create(Plocation);\n Tensor input_Pemail = Tensor.create(Pemail);\n Tensor input_Pdevice = Tensor.create(Pdevice);\n Tensor input_Pimei = Tensor.create(Pimei);\n Tensor input_Pserialnumber = Tensor.create(Pserialnumber);\n Tensor input_Pmacaddress = Tensor.create(Pmacaddress);\n Tensor input_Padvertiser = Tensor.create(Padvertiser);\n\n\n\n ArrayList<Tensor<?>> list_op_tensor = new ArrayList<Tensor<?>>();\n\n String location_filtrado = \"NO\";\n String email_filtrado = \"NO\";\n String imei_filtrado = \"NO\";\n String device_filtrado = \"NO\";\n String serialnumber_filtrado = \"NO\";\n String macaddress_filtrado = \"NO\";\n String advertiser_filtrado = \"NO\";\n\n String filtraciones_aplicacion = \"\";\n\n if (location == 1){\n location_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Location\" + \"\\n\";\n }\n if (email == 1){\n email_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Email\" + \"\\n\";\n }\n if (device == 1){\n device_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -DeviceID\" + \"\\n\";\n }\n if (imei == 1){\n imei_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Imei\" + \"\\n\";\n\n }\n if (serialnumber == 1){\n serialnumber_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -SerialNumber\" + \"\\n\";\n\n }\n if (macaddress == 1){\n macaddress_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -MacAddress\" + \"\\n\";\n\n }\n if (advertiser == 1){\n advertiser_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -AdvertiserID\" + \"\\n\";\n\n }\n\n //Tensor op_tensor = sess.runner().feed(\"input\",input).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral_green\n Tensor op_tensor_verde = sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"umbral\",input_umbral_verde).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral Naranja\n Tensor op_tensor_naranja = sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"umbral\",input_umbral_naranja).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral rojo\n Tensor op_tensor_rojo =sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"umbral\",input_umbral_rojo).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n\n list_op_tensor.add(op_tensor_verde);\n list_op_tensor.add(op_tensor_naranja);\n list_op_tensor.add(op_tensor_rojo);\n\n //para escribir en la app en W y B test\n // LO COMENTO 12/02/2021\n // ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").run();\n // NO VA ESTA PRUEBA ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").fetch(\"y/output\").run();\n\n //CREAR UN TEXTO PARA ESCRIBIR EL OUTPUT PREDECIDO: Out\n\n // Y.setText(\"Salida: Y= \"+ Float.toString(op_tensor.floatValue()) +\", si entrada X=1\");\n // Y.setText(\"Salida: Y= \"+ Float.toString(op_tensor.floatValue()) +\", si entrada email,...\");\n\n String recomendacion = \"No hacer nada\";\n String Nivel = \" Bajo\";\n int Nivel_color = 0; //0 es verde, 1 naranja, 2 rojo\n if (op_tensor_verde.floatValue() == 1) {\n if(op_tensor_naranja.floatValue() == 1 ){\n if(op_tensor_rojo.floatValue() == 1 ){\n Nivel = \" Alto\";\n Nivel_color = 2;\n }\n else {\n Nivel = \" Medio\";\n Nivel_color = 1;\n }\n }\n else {\n Nivel = \" Bajo\";\n Nivel_color = 0;\n }\n }\n\n /// test.setBackgroundResource(R.color.holo_green_light);\n\n\n // resumen_app.setText(\"Resumen App analizada: \"+ \"\\n\" + \"Nota: Si una app tiene una filtración, se marcará dicho valor con un 'SI'\"+ \"\\n\" + \"Location: \" + location_filtrado + \"\\n\" + \"Email: \" + email_filtrado + \"\\n\" + \"DeviceID: \" + device_filtrado + \"\\n\" + \"Imei: \" + imei_filtrado + \"\\n\" +\n // \"Recomendación: \" + recomendacion);\n subtitulo.setText(\"Nivel: \" );\n titulo.setText(Nivel );\n // titulo.setTextColor(android.R.color.background_dark);\n\n // resumen_app.setText(\"Filtraciones Spotify: \"+ \"\\n\" + \"\\n\" + \"Location: \" + location_filtrado + \"\\n\" + \"Email: \" + email_filtrado + \"\\n\" + \"DeviceID: \" + device_filtrado + \"\\n\" + \"Imei: \" + imei_filtrado );\n resumen_app.setText(\"Filtraciones Spotify: \"+ \"\\n\" + \"\\n\" + filtraciones_aplicacion );\n\n //mirar bien codigo:\n if ( Nivel_color == 0) {\n // resumen_app.setBackgroundResource(R.color.verde);\n nivel_color = 0;\n resumen_app.setBackgroundResource(R.drawable.stilo_borde_textview);\n }\n if ( Nivel_color == 1) {\n // resumen_app.setBackgroundResource(R.color.naranja);\n nivel_color = 1;\n resumen_app.setBackgroundResource(R.drawable.stilo_borde_naranja);\n }\n if ( Nivel_color == 2) {\n // resumen_app.setBackgroundResource(R.color.rojo);\n nivel_color = 2;\n resumen_app.setBackgroundResource(R.drawable.stilo_borde_rojo);\n }\n\n /* ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"Plocation/read\").fetch(\"Pemail/read\").fetch(\"Pdevice/read\").fetch(\"Pimei/read\").run();\n\n // y_mejoras_location.add(((values.get(0).floatValue())));\n y_mejoras_location.add(Plocation);\n x_mejoras_location.add(\"\" + (0 + num_epoch*num));\n\n // y_mejoras_email.add(((values.get(1).floatValue())));\n y_mejoras_email.add(Pemail);\n x_mejoras_email.add(\"\" + (0 + num_epoch*num));\n\n // y_mejoras_device.add(((values.get(2).floatValue())));\n y_mejoras_device.add(Pdevice);\n x_mejoras_device.add(\"\" + (0 + num_epoch*num));\n\n //y_mejoras_imei.add(((values.get(3).floatValue())));\n y_mejoras_imei.add(Pimei);\n x_mejoras_imei.add(\"\" + (0 + num_epoch*num));\n\n\n */\n\n ///\n\n // Y.setText(Float.toString(values.get(1).floatValue()));\n\n return list_op_tensor;\n }", "public void addEntityTf(int docID , int termID , int tf){\n this.docToEntities.get(docID).add(new Pair(termID,tf));\n }", "private void colorNodeLabels() {\n for (NodeImpl n : supervisedNodes) {\n if (n.hasLabel()) {\n colorNodeLabel(n.getLabel());\n }\n }\n }", "private void createNodeLabel(NodeAppearanceCalculator nac) {\r\n\t PassThroughMapping passThroughMapping = new PassThroughMapping(\"\",\r\n\t ObjectMapping.NODE_MAPPING);\r\n\t \r\n\t // change canonicalName to Label\r\n//\t passThroughMapping.setControllingAttributeName\r\n//\t (\"canonicalName\", null, false);\r\n\t passThroughMapping.setControllingAttributeName\r\n// (Semantics.LABEL, null, false);\r\n\t (Semantics.CANONICAL_NAME, null, false);\r\n\t\r\n\t GenericNodeLabelCalculator nodeLabelCalculator =\r\n\t new GenericNodeLabelCalculator(\"SimpleBioMoleculeEditor ID Label\"\r\n\t , passThroughMapping);\r\n\t nac.setNodeLabelCalculator(nodeLabelCalculator);\r\n\t }", "public Graph(){\r\n this.listEdges = new ArrayList<>();\r\n this.listNodes = new ArrayList<>();\r\n this.shown = true;\r\n }", "public void initializeGraphPrueba() {\n //path to checkpoit.ckpt HACER\n //To load the checkpoint, place the checkpoint files in the device and create a Tensor\n //to the path of the checkpoint prefix\n //FALTA ******\n\n // si modelo updated se usa el checkpoints que he descargado del servidor. Si no, el del movil.\n if (isModelUpdated){\n /* //NO VA BIEN:\n checkpointPrefix = Tensors.create((file_descargado).toString());\n Toast.makeText(MainActivity.this, \"Usando el modelo actualizado\", Toast.LENGTH_SHORT).show();\n\n */\n\n //A VER SI VA\n try {\n //Place the .pb file generated before in the assets folder and import it as a byte[] array\n // hay que poner el .meta\n inputCheck = getAssets().open(\"+checkpoints_name_1002-.ckpt.meta\");\n // inputCheck = getAssets().open(\"+checkpoints_name_1002-.ckpt\"); NOT FOUND\n byte[] buffer = new byte[inputCheck.available()];\n int bytesRead;\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n while ((bytesRead = inputCheck.read(buffer)) != -1) {\n output.write(buffer, 0, bytesRead);\n }\n variableAuxCheck = output.toByteArray(); // array con el checkpoint\n } catch (IOException e) {\n e.printStackTrace();\n }\n checkpointPrefix = Tensors.create((variableAuxCheck).toString());\n }\n\n else {\n try {\n //Place the .pb file generated before in the assets folder and import it as a byte[] array\n // hay que poner el .meta\n inputCheck = getAssets().open(\"checkpoint_name1.ckpt.meta\");\n byte[] buffer = new byte[inputCheck.available()];\n int bytesRead;\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n while ((bytesRead = inputCheck.read(buffer)) != -1) {\n output.write(buffer, 0, bytesRead);\n }\n variableAuxCheck = output.toByteArray(); // array con el checkpoint\n } catch (IOException e) {\n e.printStackTrace();\n }\n checkpointPrefix = Tensors.create((variableAuxCheck).toString());\n }\n\n //checkpointPrefix = Tensors.create((getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath() + \"final_model.ckpt\").toString()); //PARA USAR EL CHECKPOINT DESCARGADO\n // checkpointDir = getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath();\n //Create a variable of class org.tensorflow.Graph:\n graph = new Graph();\n sess = new Session(graph);\n InputStream inputStream;\n try {\n // inputStream = getAssets().open(\"graph.pb\"); //MODELO SENCILLO //PROBAR CON GRAPH_PRUEBA QUE ES MI GRAPH DE O BYTES\n // inputStream = getAssets().open(\"graph5.pb\"); //MODELO SENCILLO\n if (isModelUpdated) { // ESTO ES ALGO TEMPORAL. NO ES BUENO\n inputStream = getAssets().open(\"graph_pesos.pb\");\n }\n else {\n inputStream = getAssets().open(\"graph5.pb\");\n }\n byte[] buffer = new byte[inputStream.available()];\n int bytesRead;\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n output.write(buffer, 0, bytesRead);\n }\n graphDef = output.toByteArray();\n } catch (IOException e) {\n e.printStackTrace();\n }\n //Place the .pb file generated before in the assets folder and import it as a byte[] array.\n // Let the array's name be graphdef.\n //Now, load the graph from the graphdef:\n graph.importGraphDef(graphDef);\n try {\n //Now, load the checkpoint by running the restore checkpoint op in the graph:\n sess.runner().feed(\"save/Const\", checkpointPrefix).addTarget(\"save/restore_all\").run();\n Toast.makeText(this, \"Checkpoint Found and Loaded!\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e) {\n //Alternatively, initialize the graph by calling the init op:\n sess.runner().addTarget(\"init\").run();\n Log.i(\"Checkpoint: \", \"Graph Initialized\");\n }\n }", "public void train ()\t{\t}", "@Override\r\n public void handleEvent(NetworkAddedEvent arg0) {\n \tCyNetwork network = arg0.getNetwork();\r\n \t\r\n \t// check if it is a TRONCO network by its information field\r\n \tif (!isTroncoNetwork(network)) {\r\n \t\treturn;\r\n \t}\r\n \t\r\n \t// add the TRONCO view\r\n \tCyNetworkView view = networkViewFactory.createNetworkView(network);\r\n networkViewManager.addNetworkView(view, true);\r\n\r\n // get the visual style\r\n VisualStyle visualStyle = null;\r\n for (VisualStyle tempVisualStyle : visualMappingManager.getAllVisualStyles()) {\r\n\t\t\tif (tempVisualStyle.getTitle().equals(\"TRONCO\")) {\r\n\t\t\t\tvisualStyle = tempVisualStyle;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n \r\n // create the visual style if it is the first added network\r\n if (visualStyle == null) {\r\n \tvisualStyle = visualStyleFactory.createVisualStyle(\"TRONCO\");\r\n\t\t\r\n\t // remove the lock of nodes' height-width and set the arrow color\r\n\t for (VisualPropertyDependency visualPropertyDependency : visualStyle.getAllVisualPropertyDependencies()) {\r\n\t\t\t\tif (visualPropertyDependency.getIdString().equals(\"nodeSizeLocked\")) {\r\n\t\t\t\t\tvisualPropertyDependency.setDependency(false);\r\n\t\t\t\t} else if (visualPropertyDependency.getIdString().equals(\"arrowColorMatchesEdge\")) {\r\n\t\t\t\t\tvisualPropertyDependency.setDependency(true);\r\n\t\t\t\t}\r\n\t }\r\n\t \r\n\t // set node width\r\n\t PassthroughMapping widthMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"width\", Color.class, BasicVisualLexicon.NODE_WIDTH);\r\n\t visualStyle.addVisualMappingFunction(widthMapping);\r\n\t \r\n\t // set node height\r\n\t PassthroughMapping heightMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"height\", Color.class, BasicVisualLexicon.NODE_HEIGHT);\r\n\t visualStyle.addVisualMappingFunction(heightMapping);\r\n\t \r\n\t // set node shape\r\n\t DiscreteMapping<String, NodeShape> shapeMapping = (DiscreteMapping<String, NodeShape>) visualMappingFunctionFactoryDiscrete.createVisualMappingFunction(\"shape\", String.class, BasicVisualLexicon.NODE_SHAPE);\r\n\t shapeMapping.putMapValue(\"ellipse\", NodeShapeVisualProperty.ELLIPSE);\r\n\t shapeMapping.putMapValue(\"diamond\", NodeShapeVisualProperty.DIAMOND);\r\n\t shapeMapping.putMapValue(\"hexagon\", NodeShapeVisualProperty.HEXAGON);\r\n\t shapeMapping.putMapValue(\"octagon\", NodeShapeVisualProperty.OCTAGON);\r\n\t shapeMapping.putMapValue(\"parallelogram\", NodeShapeVisualProperty.PARALLELOGRAM);\r\n\t shapeMapping.putMapValue(\"rectangle\", NodeShapeVisualProperty.RECTANGLE);\r\n\t shapeMapping.putMapValue(\"round rectangle\", NodeShapeVisualProperty.ROUND_RECTANGLE);\r\n\t shapeMapping.putMapValue(\"triangle\", NodeShapeVisualProperty.TRIANGLE);\r\n\t visualStyle.addVisualMappingFunction(shapeMapping);\r\n\t \r\n\t // set nodes color\r\n\t PassthroughMapping colorMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"fillcolor\", Color.class, BasicVisualLexicon.NODE_FILL_COLOR);\r\n\t visualStyle.addVisualMappingFunction(colorMapping);\r\n\t\r\n\t // set nodes label\r\n\t PassthroughMapping labelMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"label\", String.class, BasicVisualLexicon.NODE_LABEL);\r\n\t visualStyle.addVisualMappingFunction(labelMapping);\r\n\t \r\n\t // set nodes label color\r\n\t PassthroughMapping fontColorMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"fontcolor\", Color.class, BasicVisualLexicon.NODE_LABEL_COLOR);\r\n\t visualStyle.addVisualMappingFunction(fontColorMapping);\r\n\t\r\n\t // set nodes border color\r\n\t PassthroughMapping borderColorMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"bordercolor\", Paint.class, BasicVisualLexicon.NODE_BORDER_PAINT);\r\n\t visualStyle.addVisualMappingFunction(borderColorMapping);\r\n\t \r\n\t // set node border width\r\n\t PassthroughMapping borderWidthMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"borderwidth\", Double.class, BasicVisualLexicon.NODE_BORDER_WIDTH);\r\n\t visualStyle.addVisualMappingFunction(borderWidthMapping);\r\n\t\r\n\t // set edges arrow\r\n\t DiscreteMapping<String, ArrowShape> arrowMapping = (DiscreteMapping<String, ArrowShape>) visualMappingFunctionFactoryDiscrete.createVisualMappingFunction(\"arrow\", String.class, BasicVisualLexicon.EDGE_TARGET_ARROW_SHAPE);\r\n\t arrowMapping.putMapValue(\"True\", ArrowShapeVisualProperty.ARROW);\r\n\t arrowMapping.putMapValue(\"False\", ArrowShapeVisualProperty.NONE);\r\n\t visualStyle.addVisualMappingFunction(arrowMapping);\r\n\t\r\n\t // set edges color\r\n\t PassthroughMapping edgeColorMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"color\", Color.class, BasicVisualLexicon.EDGE_UNSELECTED_PAINT);\r\n\t visualStyle.addVisualMappingFunction(edgeColorMapping);\r\n\t \r\n\t // set edges label\r\n\t PassthroughMapping edgeLabelMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"edgelabel\", String.class, BasicVisualLexicon.EDGE_LABEL);\r\n\t visualStyle.addVisualMappingFunction(edgeLabelMapping);\r\n\t\r\n\t // set edges label color\r\n\t PassthroughMapping edgeFontColorMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"labelcolor\", Color.class, BasicVisualLexicon.EDGE_LABEL_COLOR);\r\n\t visualStyle.addVisualMappingFunction(edgeFontColorMapping);\r\n\t\r\n\t // set edges thickness\r\n\t PassthroughMapping edgeThicknessMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"width\", Double.class, BasicVisualLexicon.EDGE_WIDTH);\r\n\t visualStyle.addVisualMappingFunction(edgeThicknessMapping);\r\n\t\r\n\t // set edges line type\r\n\t DiscreteMapping<String, LineType> edgeLineTypeMapping = (DiscreteMapping<String, LineType>) visualMappingFunctionFactoryDiscrete.createVisualMappingFunction(\"line\", String.class, BasicVisualLexicon.EDGE_LINE_TYPE);\r\n\t edgeLineTypeMapping.putMapValue(\"dash\", LineTypeVisualProperty.EQUAL_DASH);\r\n\t edgeLineTypeMapping.putMapValue(\"solid\", LineTypeVisualProperty.SOLID);\r\n\t visualStyle.addVisualMappingFunction(edgeLineTypeMapping);\r\n \r\n }\r\n \r\n // get the rescaling factor\r\n Double currentScaleMaximum = 50d;\r\n Double maximumSize = 0d;\r\n CyTable table = network.getDefaultNodeTable();\r\n for (View<CyNode> nodeView : view.getNodeViews()) {\r\n \tMap<String, Object> rowValues = table.getRow(nodeView.getModel().getSUID()).getAllValues();\r\n \t\r\n \tDouble width = (Double) rowValues.get(\"width\");\r\n \tif (width != null && width > maximumSize) {\r\n\t\t\t\tmaximumSize = width;\r\n\t\t\t}\r\n \t\r\n \tDouble height = (Double) rowValues.get(\"height\");\r\n \tif (height != null && height > maximumSize) {\r\n\t\t\t\tmaximumSize = height;\r\n\t\t\t}\r\n }\r\n final Double rescalingFactor = maximumSize/currentScaleMaximum;\r\n \r\n // set the new size\r\n for (View<CyNode> nodeView : view.getNodeViews()) {\r\n \tCyRow row = table.getRow(nodeView.getModel().getSUID());\r\n \tMap<String, Object> rowValues = row.getAllValues();\r\n \t\r\n \tDouble width = (Double) rowValues.get(\"width\");\r\n \trow.set(\"width\", width/rescalingFactor);\r\n \t\r\n \tDouble height = (Double) rowValues.get(\"height\");\r\n \trow.set(\"height\", height/rescalingFactor);\r\n }\r\n \r\n // correct the triple / in the label\r\n CyTable edgeTable = network.getDefaultEdgeTable();\r\n for (View<CyEdge> edgeView : view.getEdgeViews()) {\r\n \tCyRow row = edgeTable.getRow(edgeView.getModel().getSUID());\r\n \tMap<String, Object> rowValues = row.getAllValues();\r\n \t\r\n \tString label = (String) rowValues.get(\"edgelabel\");\r\n \tif (label != null) {\r\n \t\trow.set(\"edgelabel\", label.replace(\"\\\\\", \"\"));\r\n\t\t\t} \t\r\n }\r\n \r\n // apply the visual style\r\n visualMappingManager.setVisualStyle(visualStyle, view);\r\n }", "private void colorNodeLabel(NodeLabelImpl nodeLabel) {\n nodeLabelColorizer.color(nodeLabel);\n }", "public void setNode_1(String node_1);", "public void printTerm(){\n\n // print fac node\n this.fac.printFac();\n\n // check selection\n if (this.selection == 2) {\n\n // print \"*\"\n System.out.print(\" * \");\n\n // print term node\n this.term.printTerm();\n\n }\n\n }", "public void nodeLabels(boolean b) { node_labels_cb.setSelected(b); }", "public FlowNodeInstance() {\n\t}", "public abstract String beginGraphString();", "public Ops getTF() {\n return tf;\n }", "void nodeStarted();", "private void initGraph() {\n nodeMap = Maps.newIdentityHashMap();\n stream.forEach(t -> {\n Object sourceKey = sourceId.extractValue(t.get(sourceId.getTableId()));\n Object targetKey = targetId.extractValue(t.get(targetId.getTableId()));\n ClosureNode sourceNode = nodeMap.get(sourceKey);\n ClosureNode targetNode = nodeMap.get(targetKey);\n if (sourceNode == null) {\n sourceNode = new ClosureNode(sourceKey);\n nodeMap.put(sourceKey, sourceNode);\n }\n if (targetNode == null) {\n targetNode = new ClosureNode(targetKey);\n nodeMap.put(targetKey, targetNode);\n }\n sourceNode.next.add(targetNode);\n });\n\n }", "@Override\r\n // WEI XU METHOD 2\r\n \r\n public void train(String sourceText) {\r\n String[] words1 = sourceText.split(\"[\\\\s]+\");\r\n // add starter to be a next word for the last word in the source text.\r\n List<String> words = new ArrayList<String>(Arrays.asList(words1));\r\n words.add(words1[0]);\r\n starter = words1[0];\r\n String prevWord = starter;\r\n for (int i = 1; i < words.size(); i++) {\r\n ListNode node = findNode(prevWord);//todo:it's a reference? but not a new Listnode? so no need set back?\r\n if (node == null) {\r\n node = new ListNode(prevWord);\r\n wordList.add(node);\r\n }\r\n node.addNextWord(words.get(i));//todo: why hashmap need set back value, linkedlist don't need?\r\n prevWord = words.get(i);\r\n }\r\n }", "public Node(ActivationFunction f) {\n\t\tnodeActivationFunction = f;\n\t}", "private void setConceptNodeField(EditConfigurationVTwo editConfiguration,\n\t\t\tVitroRequest vreq) {\n\t\teditConfiguration.addField(new FieldVTwo().\n\t\t\t\tsetName(\"conceptNode\"));\n\t}", "public Node()\r\n {\r\n initialize(null);\r\n lbl = id;\r\n }", "public SceneGraphObjectState( SymbolTableData symbol, Controller control ) {\n this.symbol = symbol;\n this.control = control;\n\n if (symbol!=null) {\n this.node = symbol.j3dNode;\n\n // This consistancy check is for debugging purposes\n //if (symbol.j3dNode==null || symbol.nodeID==0)\n // throw new RuntimeException( \"Bad Symbol in State creation\");\n }\n\n\n if (node!=null) {\n nodeClassName = node.getClass().getName();\n\n\t try {\n if (node instanceof eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)\n ((eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)node).createSceneGraphObjectReferences( control.getSymbolTable() );\n } catch(Exception e) {\n System.err.println(\"Exception in createSceneGraphObjectReferences\");\n e.printStackTrace();\n }\n\n }\n\n }", "@Override protected void onPreExecute() { g = new UndirectedGraph(10); }", "public TraceGraph(Collection<EventNode> nodes, Event initEvent,\n Event termEvent) {\n this(initEvent, termEvent);\n this.nodes.addAll(nodes);\n }", "private static void setGraph()\n\t\t{\n\t\t\tmap = new HashMap();\n\t\t\t\n\t\t\twordNum = 0;\n\t\t\twordList = new String[txtStr.length()];\n\t\t\tfor(int i = 0; i<strList.length; i++)\n\t\t\t{\n\t\t\t\tif(!map.containsKey(strList[i]))\n\t\t\t\t{\n\t\t\t\t\tmap.put(strList[i], wordNum);\n\t\t\t\t\twordList[wordNum] = strList[i];\n\t\t\t\t\twordNum++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tg = new MyGraph(wordNum);\n\t\t\tfor(int i=0; i<strList.length - 1; i++)\n\t\t\t{\n\t\t\t\tint v0 = (int)(map.get(strList[i]));\n\t\t\t\tint v1 = (int)(map.get(strList[i+1]));\n\t\t\t\tint cost = g.getEdge(v0, v1);\n\t\t\t\t\n\t\t\t\tg.setEdge(v0, v1, cost+1);\n\t\t\t}\n\t\t//\treturn g;\n\t\t\t\t\t\n\t\t}", "public void setNodeBorderColorizer(GenericColorizer value) {\n nodeBorderColorizer = value;\n }", "@Override\n\tpublic void init() {\n\t\tGraph<Number,Number> ig = Graphs.<Number,Number>synchronizedDirectedGraph(new DirectedSparseMultigraph<Number,Number>());\n\t\tObservableGraph<Number,Number> og = new ObservableGraph<Number,Number>(ig);\n\t\tog.addGraphEventListener(new GraphEventListener<Number,Number>() {\n\n\t\t\tpublic void handleGraphEvent(GraphEvent<Number, Number> evt) {\n\t\t\t\tSystem.err.println(\"got \"+evt);\n\n\t\t\t}});\n\t\tthis.g = og;\n\n\t\tthis.timer = new Timer();\n\t\tthis.layout = new FRLayout2<Number,Number>(g);\n\t\t// ((FRLayout)layout).setMaxIterations(200);\n\t\t// create a simple pickable layout\n\t\tthis.vv = new VisualizationViewer<Number,Number>(layout, new Dimension(600,600));\n\n\n\n\t}", "@Override\r\n\tpublic String getName() {\n\t\treturn \"TF\";\r\n\t}", "public interface Node extends TreeComponent {\n /**\n * The types of decision tree nodes available.\n */\n enum NodeType {\n Internal,\n Leaf\n }\n\n /**\n * Gets the type of this node.\n * @return The type of node.\n */\n NodeType getType();\n\n void print();\n\n String getClassLabel(DataTuple tuple);\n}", "public SceneLabelObjectState(SceneLabelObjectState state){\t\t\n\t\tsuper(state); //will create a SceneDivObjectState from the supplied state\n\t\tsuper.setObjectsPrimaryType(SceneObjectType.Label); //subtypes should also run this statement straight after the super command in order to override their parents type and set their own as the primary/\n\n\n\t\tthis.ObjectsCurrentText = state.ObjectsCurrentText;\n\t\tthis.CSSname = state.CSSname;\n\t\tthis.cursorVisible=state.cursorVisible;\n\t\tthis.TypedText=state.TypedText;\t\t\n\t\tthis.Custom_Key_Beep = state.Custom_Key_Beep;\n\t\tthis.Custom_Space_Beep = state.Custom_Space_Beep;\n\n\t}", "void setCurrentLineNode(Node<UnderlyingData> currentLineNode);", "public boolean drawNodeLabels() { return node_labels_cb.isSelected(); }", "public void setNode(String node)\n {\n this.node = node;\n }", "protected AddTranscriptNodeModel() {\r\n this(1,2);\r\n }", "public void actor_graph_setter(String[] cc) { // actors in each movies given by lines\n\t\tString movieName = cc[0];\n\t\tint key = 0;\n\t\twhile (key < cc.length) {\n\t\t\tif (actor_location.containsKey(cc[key])) { //there are already vertex. only add neighbors\n\t\t\t\tActormap exist_actor = actor_graph.get(actor_location.get(cc[key]));\n\t\t\t\texist_actor.movies.add(movieName);\n\t\t\t\tfor(int i=1 ; i<cc.length; i++){\n\t\t\t\t\texist_actor.put_neighbor(cc[i]);\n\t\t\t\t}\n\t\t\t} else { // new actor! add vertex and add neighbors.\n\t\t\t\tactor_location.put(cc[key], actor_graph.size());\n\t\t\t\tActormap new_actor = new Actormap(cc[key]);\n\t\t\t\tnew_actor.movies.add(movieName);\n\t\t\t\tfor(int i=1 ; i<cc.length; i++){\n\t\t\t\t\tnew_actor.put_neighbor(cc[i]);\n\t\t\t\t}\n\t\t\t\tactor_graph.add(new_actor);\n\t\t\t}\n\t\t\tkey++;\n\t\t}\n\t}", "public void setNode(String node) {\n this.node = node;\n }", "public Builder setOriginalGraphDef(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n originalGraphDef_ = value;\n onChanged();\n return this;\n }", "protected GraphNode() {\n }", "protected GraphNode() {\n }", "public SimpleNodeLabel() {\n super();\n }", "Node()\r\n { // constructor for head Node \r\n prev = this;\r\n next = this;\r\n trafficEntry = new TrafficEntry();\r\n }", "public Lister(Node<E> head)\r\n {\r\n /* note: this does not copy the underlying data.\r\n We are assuming that the iteratorPrototype() in StringLinkedBag\r\n copies the \"data\" */\r\n cursor = head;\r\n }", "Node() {\r\n this.k = null;\r\n this.v = null;\r\n this.c = null;\r\n kcount = 0;\r\n }", "private void setFileNameToReferenceNode(FMEditor fmEditor) {\n fmEditor.getDrawRectMap().values().stream().filter(drawNode -> drawNode.getFmNode().getRefuuid() != null)\n .forEach(drawNode -> editResourceService.getVMFile(drawNode.getFmNode().getRefuuid(), projectId, new AsyncCallback<VMFile>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(VMFile result) {\n if (result != null) {\n drawNode.getFmNode().setRefInfo(result.getName() + \".\" + result.getExtensionStr());\n\n editResourceService.getFileContent(drawNode.getFmNode().getRefuuid(), projectId, new AsyncCallback<byte[]>() {\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(byte[] result) {\n BinaryResourceImpl r = new BinaryResourceImpl();\n ByteArrayInputStream bi = new ByteArrayInputStream(result);\n\n EPackage.Registry.INSTANCE.put(FMPackage.eNS_URI, FMPackage.eINSTANCE);\n FMRoot root = null;\n try {\n r.load(bi, EditOptions.getDefaultLoadOptions());\n root = (FMRoot) r.getContents().get(0);\n } catch (IOException e) {\n SC.warn(e.getMessage());\n }\n if (root.getNode() != null) {\n drawNode.getFmNode().setRefName(root.getNode().getName());\n } else {\n drawNode.getFmNode().setRefName(\"\");\n }\n drawNode.getDrawRect()\n .setTitle(drawNode.getFmNode().getName() + \":\" + drawNode.getFmNode().getRefName() + \"\\n(\" + drawNode.getFmNode().getRefInfo() + \")\");\n }\n });\n } else {\n drawNode.getFmNode().setRef(0);\n drawNode.getFmNode().setRefInfo(null);\n drawNode.getFmNode().setRefName(null);\n drawNode.getFmNode().setRefuuid(null);\n drawNode.getDrawRect().setTitle(drawNode.getFmNode().getName());\n }\n }\n }));\n }", "public void setCnode(Node<T1> cNode) {\r\n\t\tthis.cnode = cNode;\r\n\t\tcheckRep();\r\n\t}", "private void addNode() {\n // Add GUI node\n int nodeCount = mGraph.getNodeCount();\n Node node = mGraph.addNode(String.valueOf(nodeCount));\n node.addAttribute(\"ui.label\", nodeCount);\n\n // Add Node_GUI node for algorithm to read from\n Node_GUI listNode = new Node_GUI();\n mNodeList.add(listNode);\n }", "public TreeImpl(T dato) {\r\n\t\traiz = new NodeImpl<T>(dato, null);// El null dice que es raiz\r\n\t}", "public Node(){\n\n\t\t}", "public void setNode_2(String node_2);", "private void addPoint(View view) {\n\n if( null == imgNode1 || null == imgNode2)\n {\n\n Toast.makeText(MainActivity.this, \"Scan the references\", Toast.LENGTH_SHORT).show();\n return;\n\n }\n\n Toast.makeText(MainActivity.this, \"Added point\", Toast.LENGTH_SHORT).show();\n\n\n\n Node n1 = new Node();\n n1.setRenderable(model);\n\n\n n1.setWorldPosition(new Vector3(0,0,0));\n arSceneView.getScene().addChild(n1);\n\n Description p = new Description();\n p.setNode(n1);\n //The position of the new point is the difference between point reference and marker position. This helps to update the position whether the origin marker is changed\n p.setPos(Vector3.subtract(mov2imgNode,imgNode1.getWorldPosition()));\n listElements.add(p);\n if(listElements.size()>1) {\n Description last = listElements.get(listElements.size()-1);\n Vector3 ori = imgNode1.getWorldPosition();\n Description penultimate = listElements.get(listElements.size()-2);\n last.setBefore_pos(penultimate.getPos());\n last.setDistance(distanceTwoPoints(Vector3.add(ori, last.getPos()), Vector3.add(ori, penultimate.getPos())));\n last.setDir(directionTwoPoints(Vector3.add(ori, penultimate.getPos()), Vector3.add(ori, last.getPos())));\n drawLine(Vector3.add(ori, penultimate.getPos()), Vector3.add(ori, last.getPos()), last.getNode());\n ViewRenderable.builder().setSizer(new DpToMetersViewSizer(this.labelsSize))\n .setView(arSceneView.getContext(), R.layout.controls)\n .build()\n .thenAccept(viewRenderable -> addNodeToScene( last.getNode(),viewRenderable,last.getDistance()))\n .exceptionally(throwable -> {\n Toast.makeText(arSceneView.getContext(), \"Error:\" + throwable.getMessage(), Toast.LENGTH_LONG).show();\n return null;\n }\n\n );\n }\n }", "public ClassNode(Ontology o) {\n\t\tname = o.getName();\n\t}", "Term getNodeTerm();", "public void buildGraph(){\n\t}", "public DriveTrain(int lf, int lr, int rf, int rr){\n this.left = new side(lf, lr);\n this.right = new side(rf, rr);\n }", "public int getNodeLabel ();" ]
[ "0.6076234", "0.5404497", "0.53489923", "0.53482884", "0.53161335", "0.5296546", "0.52792865", "0.52430654", "0.5232154", "0.5228563", "0.5222214", "0.5211406", "0.51980394", "0.51766026", "0.51743793", "0.5171904", "0.51526016", "0.5123901", "0.51153505", "0.5103179", "0.50898886", "0.5086993", "0.5081447", "0.50803334", "0.5051369", "0.5039263", "0.50375813", "0.5026185", "0.5024377", "0.502104", "0.5012897", "0.50116646", "0.49963027", "0.49649718", "0.49628317", "0.49364027", "0.49347153", "0.4933088", "0.4926994", "0.49234107", "0.49122345", "0.49120092", "0.49098796", "0.49077424", "0.49030918", "0.4900648", "0.49002525", "0.48948112", "0.48909727", "0.4880228", "0.48680174", "0.48538473", "0.48521718", "0.4850719", "0.48483175", "0.48414838", "0.48346555", "0.48327547", "0.48326916", "0.48274562", "0.482693", "0.48204052", "0.48188263", "0.4818727", "0.48138264", "0.4813578", "0.48102915", "0.4810126", "0.4805093", "0.480286", "0.4796192", "0.47917074", "0.47904134", "0.4784712", "0.47838864", "0.47779924", "0.4773846", "0.47738224", "0.47725275", "0.4771484", "0.47655636", "0.47625285", "0.47606817", "0.47606817", "0.47392714", "0.47390205", "0.47375944", "0.47295922", "0.47255722", "0.4723894", "0.47229847", "0.47188243", "0.47186416", "0.47082797", "0.4706323", "0.4704744", "0.47037667", "0.4700045", "0.46978238", "0.4697259" ]
0.5075072
24
implement the interface of nav_core::BaseLocalPlanner Class in original ROS
private void initialize(TransformListener tf, VoxelGrid costmap_ros){ if (!initialized_){ tf_ = tf; costmap_ros_ = costmap_ros; rot_stopped_velocity_ = 0.01; trans_stopped_velocity_ = 0.01; current_waypoint_ = 0; this.params=this.node.getParameterTree(); //base local planner params yaw_goal_tolerance_ = params.getDouble("yaw_goal_tolerance", 0.05); xy_goal_tolerance_ = params.getDouble("xy_goal_tolerance", 0.10); latch_xy_goal_tolerance_ = params.getBoolean("latch_xy_goal_tolerance", false); ignore_goal_yaw_ = params.getBoolean("ignore_goal_jaw", false); // ros::NodeHandle nh;//for stand alone?? String IP = null; String hostname = null; try { InetAddress ia = InetAddress.getLocalHost(); hostname = ia.getHostName();//获取计算机主机名 IP = ia.getHostAddress();//获取计算机IP } catch (UnknownHostException e) { e.printStackTrace(); } //if (standalone_) { // ConnectedNode selfNode; String my_id = node.getName().toString(); if (my_id.equals("/")) { my_id = hostname; } my_id = params.getString("name",my_id); node.getLog().info("My name is: " + my_id); /*----------init ros agent and set parameters---------*/ me=new Agent(); //acceleration limits load from params_turtle.yaml and private_nh //namespace maybe /CollvoidLocalPlanneri me.acc_lim_x_=params.getDouble("acc_lim_x"); me.acc_lim_y_=params.getDouble("acc_lim_y"); me.acc_lim_th_=params.getDouble("acc_lim_th"); //holo_robot me.holo_robot_=params.getBoolean("holo_robot"); if (!holo_robot_) me.wheel_base_=params.getDouble("wheel_base"); else me.wheel_base_ = 0.0; //min max speeds me.max_vel_with_obstacles_=params.getDouble("max_vel_with_obstacles"); me.max_vel_x_=params.getDouble("max_vel_x"); me.min_vel_x_=params.getDouble("min_vel_x"); me.max_vel_y_=params.getDouble("max_vel_y"); me.min_vel_y_=params.getDouble("min_vel_y"); me.max_vel_th_=params.getDouble("max_vel_th"); me.min_vel_th_=params.getDouble("min_vel_th"); me.min_vel_th_inplace_=params.getDouble("min_vel_th_inplace"); //set radius me.footprint_radius_=params.getDouble("footprint_radius"); me.radius=me.footprint_radius_+me.cur_loc_unc_radius_; radius_=me.footprint_radius_; //set frames //robot_base_frame_ = costmap_ros_->getBaseFrameID(); need to investigate me.base_frame_ = new String(costmap_ros_.getHeader().getFrameId());//may not be right me.global_frame_ = new String(params.getString("global_frame", "/map")); //sim period GraphName controller_frequency_param_name; controller_frequency_param_name=params.search("controller_frequency"); double sim_period_; if(controller_frequency_param_name==null){ sim_period_ = 0.05; } else { double controller_frequency = 0; controller_frequency=params.getDouble(controller_frequency_param_name,20.0); if(controller_frequency > 0){ sim_period_ = 1.0 / controller_frequency; }else{ this.node.getLog().warn("A controller_frequency less than 0 has been set. Ignoring the parameter, assuming a rate of 20Hz"); sim_period_ = 0.05; } } this.node.getLog().info("Sim period is set to "+ String.format("%1$.2f",sim_period_)); me.simPeriod=sim_period_; //other params agent //me.time_horizon_obst_ = getParamDef(private_nh,"time_horizon_obst",10.0); currently not used in agent me.time_to_holo_ = params.getDouble("time_to_holo", 0.4); me.minErrorHolo = params.getDouble("min_error_holo", 0.01); me.maxErrorHolo = params.getDouble( "max_error_holo", 0.15); //delete_observations_ = params.getBoolean("delete_observations", true); currently not used in agent //threshold_last_seen_ = params.getDouble("threshold_last_seen",1.0); currently not used in agent me.eps_= params.getDouble( "eps", 0.1); boolean orca, convex, clearpath, use_truncation; int num_samples, type_vo; me.orca=params.getBoolean( "orca"); me.convex=params.getBoolean( "convex"); //params.getBoolean( "clearpath", &clearpath); not used me.useTruancation=params.getBoolean( "use_truncation"); //num_samples = getParamDef(private_nh, "num_samples", 400); not used me.voType = params.getInteger("type_vo", 0); //HRVO me.truncTime = params.getDouble("trunc_time",5.0); //left_pref_ = getParamDef(private_nh,"left_pref",0.1); not used me.publishPositionsPeriod = 1.0/params.getDouble("publish_positions_frequency",10.0); me.publishMePeriod = 1.0/params.getDouble("publish_me_frequency",10.0); //set Footprint List<Point> footprint_points=new ArrayList<Point>(); //TODO:footprint_points = costmap_ros_->getRobotFootprint(); PolygonStamped footprint=messageFactory.newFromType(PolygonStamped._TYPE); Point32 p=messageFactory.newFromType(Point32._TYPE); List<Point32> points=new ArrayList<Point32>(); for (int i = 0; i<footprint_points.size(); i++) { p.setX((float)footprint_points.get(i).getX()); p.setY((float) footprint_points.get(i).getY()); points.add(p); } Polygon polygon=messageFactory.newFromType(Polygon._TYPE); polygon.setPoints(points); footprint.setPolygon(polygon); points.clear(); if (footprint.getPolygon().getPoints().size()>2) me.setFootprint(footprint); else { double angle = 0; double step = 2 * Math.PI / 72; while(angle < 2 * Math.PI){ Point32 pt=messageFactory.newFromType(Point32._TYPE); pt.setX((float)(radius_ * Math.cos(angle))); pt.setY((float) (radius_ * Math.sin(angle))); pt.setZ(0.0f); points.add(pt); angle += step; } polygon.setPoints(points); footprint.setPolygon(polygon); me.setFootprint(footprint); } me.initAsMe(this.node, tf_); me.id_=new String(my_id); skip_next_ = false; Publisher<Path> g_plan_pub_=this.node.newPublisher("global_plan", Path._TYPE); Publisher<Path> l_plan_pub_=this.node.newPublisher("l_plan_pub_", Path._TYPE); String move_base_name = this.node.getName().toString(); //ROS_ERROR("%s name of node", thisname.c_str()); Subscriber<GridCells> obstacles_sub_ = this.node.newSubscriber(move_base_name + "/local_costmap/obstacles", GridCells._TYPE); obstacles_sub_.addMessageListener(new MessageListener<GridCells>() { @Override public void onNewMessage(GridCells msg) { obstaclesCallback(msg); } }); setup_= false; //not implemented yet //dsrv_ = new dynamic_reconfigure::Server<collvoid_local_planner::CollvoidConfig>(private_nh); //dynamic_reconfigure::Server<collvoid_local_planner::CollvoidConfig>::CallbackType cb = boost::bind(&CollvoidLocalPlanner::reconfigureCB, this, _1, _2); //dsrv_->setCallback(cb); initialized_ = true; } else { node.getLog().info("This planner has already been initialized, you can't call it twice, doing nothing"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LocalPlanner(final ConnectedNode node, TransformListener tf, VoxelGrid costmap_ros){\n costmap_ros_=null;\n tf_=null;\n initialized_=false;\n this.node=node;\n //initialize the planner\n initialize(tf, costmap_ros);\n }", "public LocalPlanner(RobotSessionGlobals session,\n PointCloudSafetyController pointCloudSafetyController, VelocityGenerator velocityGenerator) {\n this(session, pointCloudSafetyController, velocityGenerator, DEFAULT_DISTANCE_CLOSE_TO_GOAL);\n }", "public interface TravelStrategy {\r\n\t/**\r\n\t * Returns the floor number of the passenger's current destination, so that other strategies can base their\r\n\t * decisions on where the passenger is trying to get to.\r\n\t */\r\n\tint getDestination();\r\n\t\r\n\t/**\r\n\t * Called when it is time to schedule a PassengerNextDestinationEvent according to the rules of this travel strategy.\r\n\t * Typically this occurs when the passenger departs the elevator on the correct floor, but that is not guaranteed.\r\n\t * @param currentFloor the floor that the passenger got off.\r\n\t */\r\n\tvoid scheduleNextDestination(Passenger passenger, Floor currentFloor);\r\n}", "public LocalPlannerState update(DriveAction action, Path path,\n CostMap costMap, Transform transform) {\n Log.v(TAG, \"Begin local planner\");\n if (path != null && !path.equals(mCurrentPath)) {\n //noinspection AssignmentToCollectionOrArrayFieldFromParameter\n mCurrentPath = path.copy(); // Copy this since path is an immutable list\n mIsBlocked = false;\n }\n\n Transform goal = action.getTransform();\n if (goal == null || transform == null) {\n setTeleop(new Teleop(0,0,0,0,0,0));\n // TODO (playerfive): We had an error, it should return ERROR to let RecoveryBehavior know\n // TODO: about this event. If this error persists, the robot will remain stopped until\n // TODO: the timeout is reached.\n Log.v(TAG, \"Goal or transform is null, stopping the robot\");\n return LocalPlannerState.RUNNING;\n }\n if (!isGoalReached(transform, goal) || mVelocityGenerator.isStopManager()) {\n Log.v(TAG, \"Computing velocities with velocity generator\");\n long delta = -1;\n long currentTime = System.currentTimeMillis();\n if (mLastUpdatedTime > 0) {\n delta = currentTime - mLastUpdatedTime;\n }\n if (delta > 120) {\n Log.w(TAG, \"Warning - local planner was slow to update, delta = \" + delta + \" ms\");\n }\n boolean isBlocked = mPointCloudSafetyController.isBlocked();\n mPath.clear();\n double[] velocities = mVelocityGenerator.computeVelocities(transform, goal, costMap,\n path, isBlocked, mPointCloudSafetyController.getBinData(),\n mDistanceCloseToGoal, delta, mPath);\n mLastUpdatedTime = currentTime;\n\n if (velocities == null) {\n Log.v(TAG, \"Velocities null\");\n setTeleop(new Teleop(0, 0, 0, 0, 0, 0));\n mPath.clear();\n return mVelocityGenerator.isStopManager() && isGoalReached(transform, goal)\n ? LocalPlannerState.COMPLETED : LocalPlannerState.ERROR;\n }\n if (isBlocked && !mVelocityGenerator.isStopManager()) {\n Log.v(TAG, \"Stopping for block\");\n velocities = velocities.clone();\n velocities[0] = 0;\n }\n if (mBumperSafetyController.updateBumper(mBumperState)) {\n Log.v(TAG, \"Safety controller is active\");\n velocities[0] = mBumperSafetyController.getSafeLinearSpeed();\n velocities[1] = mBumperSafetyController.getSafeAngularSpeed();\n mPath.clear();\n mLastUpdatedTime = -1;\n }\n\n Log.v(TAG, \"Sending linear \" + velocities[0] + \" angular \" + velocities[1]);\n setTeleop(new Teleop(velocities[0], 0, 0, 0, 0, velocities[1]));\n return LocalPlannerState.RUNNING;\n } else {\n mLastUpdatedTime = -1;\n Log.v(TAG, \"Completed\");\n mPath.clear();\n setTeleop(new Teleop(0, 0, 0, 0, 0, 0));\n return LocalPlannerState.COMPLETED;\n }\n }", "@Local\r\npublic interface EvaluationStageManagerLocal\r\n extends EvaluationStageManager\r\n{\r\n\r\n\r\n}", "private LocalPlanner(\n RobotSessionGlobals session, PointCloudSafetyController pointCloudSafetyController,\n VelocityGenerator velocityGenerator, double distanceCloseToGoal) {\n mSession = session;\n mVelocityGenerator = velocityGenerator;\n mDistanceCloseToGoal = distanceCloseToGoal;\n mDistanceCloseToGoalSquared = mDistanceCloseToGoal * mDistanceCloseToGoal;\n mPointCloudSafetyController = pointCloudSafetyController;\n mBumperSafetyController = new BumperSafetyController();\n }", "@Local\npublic interface RisultatiRicercaViaggiLocal {\n\n /**\n * Get the value of pacchetti\n *\n * @return the value of pacchetti\n */\n public java.util.List<viaggi.Pacchetto> getPacchetti();\n\n /**\n * Set the value of pacchetti\n *\n * @param pacchetti new value of pacchetti\n */\n public void setPacchetti(List<Pacchetto> pacchetti);\n\n /** Restituisce una lista di pacchetti di dimensione numGruppoPacchetti con i pacchetti non ancora restituiti.\n * Esempio, se numGruppoPacchetti = 3 alla prima chiamata il metodo restituirà i pacchetti dal primo al terzo, alla seconda chiamata\n * restituirà i pacchetti dal quarto al sesto e così via. Se i pacchetti ancora da visualizzare sono meno di quelli da restituire allora restituirà\n * solo gli ultimi.\n *\n * @return gruppo di pacchetti\n */\n public List<Pacchetto> getNextPacchetti();\n\n /** Restituisce una lista di pacchetti di dimensione numGruppoPacchetti con i pacchetti già restituiti con getNextPacchetti.\n * Esempio, se numGruppoPacchetti = 3 e il metodo getNextPacchetti ha già restituito i pacchetti fino al sesto allora la prima chiamata di questo metodo\n * restituirà i pacchetti dal primo al terzo. Se non ci sono pacchetti precedenti a quelli restituiti l'ultima volta il metodo ritornerà null.\n * @return gruppo di pacchetti\n */\n public java.util.List<viaggi.Pacchetto> getPredPacchetti();\n\n /**\n * Metodo che restituisce true se ci sono ancora pacchetti da restituire successivi agli ultimi restituiti\n * @return true se ci sono ancora pacchetti, false altrimenti\n */\n public boolean avanti();\n\n /**Metodo che restituisce true se ci sono ancora pacchetti da restituire precedenti agli ultimi restituiti\n *\n * @return true se ci sono ancora pacchetti, false altrimenti\n */\n public boolean indietro();\n\n /**\n * Get the value of numGruppoPacchetti\n *\n * @return the value of numGruppoPacchetti\n */\n public int getNumGruppoPacchetti();\n\n /**\n * Set the value of numGruppoPacchetti. Il numero dei pacchetti rappresenta il numero di pacchetti restituiti di volta in volta per la visualizzazione\n *\n * @param numGruppoPacchetti new value of numGruppoPacchetti\n */\n public void setNumGruppoPacchetti(int numGruppoPacchetti);\n}", "public interface IGoapUnit {\r\n\t/**\r\n\t * Gets called when a plan was found by the planner.\r\n\t * \r\n\t * @param actions\r\n\t * the actions the unit hat to take in order to archive the goal.\r\n\t */\r\n\tpublic void goapPlanFound(Queue<GoapAction> actions);\r\n\r\n\t/**\r\n\t * Gets called when a plan failed to execute.\r\n\t *\r\n\t * @param actions\r\n\t * the remaining actions in the action Queue that failed.\r\n\t */\r\n\tpublic void goapPlanFailed(Queue<GoapAction> actions);\r\n\r\n\t/**\r\n\t * Gets called when a plan was finished.\r\n\t */\r\n\tpublic void goapPlanFinished();\r\n\r\n\t/**\r\n\t * General update from the Agent. Called in a loop until the program ends.\r\n\t */\r\n\tpublic void update();\r\n\r\n\t/**\r\n\t * Function to move to a specific location. Gets called by the moveToState\r\n\t * when the unit has to move to a certain target.\r\n\t *\r\n\t * @param target\r\n\t * the target the unit has to move to.\r\n\t * @return true or false depending if the unit was able to move.\r\n\t */\r\n\tpublic boolean moveTo(Object target);\r\n\t\r\n\tpublic HashSet<GoapState> getWorldState();\r\n\tpublic List<GoapState> getGoalState();\r\n\tpublic HashSet<GoapAction> getAvailableActions();\r\n}", "public interface PathCalculationStrategy {\n\t\n\t/**\n\t * Returns the shortest path for a Journey.\n\t * \n\t * @param grid the traffic grid.\n\t * @param src the source location.\n\t * @param dest the destination location.\n\t * \n\t * @return a List containing the path for the Journey.\n\t */\n\tList<Point> getPath(int grid[][], Point src, Point dest);\n}", "public RoutingTable local_route_table(char area) {\n // Get local vec\n Entry[] lvec = neig.local_vec(true, area);\n if (lvec == null) { // No local information ??\n win.Log(\"Internal error in Routing.local_vec\\n\");\n return null;\n }\n RoutingTable auxtab= new RoutingTable();\n \n // Prepare an initial routing table with the elements of the vector\n Log(\"Routing.local_route_table(area) not implemented yet\\n\");\n \n // Place here the code to create and fill the routing table auxtab.\n // Look at the constructors of class RouteEntry and pick the best one to instantiate new objects from Entry objects\n // ...\n \n // This function is incomplete for a multi-area routing LS protocol\n // OSPF has a core area ('0') that may connect other peripheric areas\n // ('1'-'9') using a star topology. Therefore, the area '0' border\n // routers disseminate the routes received from other areas on \n // area '0' and build a complete routing table.\n // Then, they send the complete table to the other areas.\n // ...\n \n return null;\n }", "public interface Elevator {\n public static final int UP = 1, LEVEL = 0, DOWN = -1, ERROR = -2;\n /** Returns the minimal floor number to which this Elevator can reach(often a negative value).\n * This is the same value as the lowest floor in the building - this elevator belongs to. */\n public int getMinFloor();\n /** Returns the maximal floor number to which this Elevator can reach.\n * This is the same value as the highest floor in the building - this elevator belongs to. */\n public int getMaxFloor();\n /** Returns the time (in seconds it takes the Elevator to open its doors. */\n public double getTimeForOpen();\n /** Returns the time (in seconds it takes the Elevator to close its doors */\n public double getTimeForClose();\n /** Returns the Elavator's current state: {UP, DOWN, LEVEL, ERROR} the state \"LEVEL\" mark that the elevator has reached the floor -\n * and is now ready to load / unload and get new orders. */\n public int getState(); // UP, DOWN, LEVEL, ERROR\n /** Returns the Elevator's current position (floor) as an Integer. */\n public int getPos();\n /** Moves the elevator form the current position to the destination floor. */\n public boolean goTo(int floor);\n /** Allows the elevator to stop in an intermidiate floor between src and dest, assumeing the elevator has not yer pass the desired floor in which it needs to stop. */\n public boolean stop(int floor);\n /** Returns the speed (in floor per second), e.g. if the Elevator speed is 0.4 - it takes it 2.5 seconds to pass a single floor. */\n public double getSpeed();\n /** Return the time in seconds that it takes the elevator to start moving in full speed (assumed to be a fixed value). */\n public double getStartTime();\n /** Return the time in seconds that it takes the elevator to stop moving in full speed (assumed to be a fixed value).*/\n public double getStopTime();\n /**\n * @return the id of this elevator (simple index as in the building).\n * Note: this index should be the same as in the elevator allocation algorithm.\n */\n public int getID();\n}", "public interface StepperTransportSolution {\n public List<StepperTransportSegment> getTransportSegment();\n}", "@Local\r\npublic interface PrepaSalaireManagerLocal\r\n extends PrepaSalaireManager\r\n{\r\n\r\n\r\n}", "@Local\r\npublic interface MatiereDltManagerLocal\r\n extends MatiereDltManager\r\n{\r\n\r\n\r\n}", "public abstract TrajectoryInfo solve();", "protected void initReplanners() {\n\n\t\tTravelTime travelTime = this.lookupTravelTime;\n\t\t\n\t\tOnlyTimeDependentTravelDisutilityFactory travelCostFactory = new OnlyTimeDependentTravelDisutilityFactory();\n\t\t\n\t\tLinkReplanningMap linkReplanningMap = this.withinDayControlerListener.getLinkReplanningMap();\n\t\tMobsimDataProvider mobsimDataProvider = this.withinDayControlerListener.getMobsimDataProvider();\n\t\tthis.duringLegIdentifier = new LeaveLinkIdentifierFactory(linkReplanningMap, mobsimDataProvider).createIdentifier();\n\t\tthis.selector.addIdentifier(duringLegIdentifier, pDuringLegReplanning);\n\t\tthis.duringLegReplannerFactory = new CostNavigationRouteFactory(this.scenario, this.lookupNetwork, this.withinDayControlerListener.getWithinDayEngine(), \n\t\t\t\tcostNavigationTravelTimeLogger, travelCostFactory, travelTime, this.withinDayControlerListener.getLeastCostPathCalculatorFactory());\n\t\tthis.duringLegReplannerFactory.addIdentifier(this.duringLegIdentifier);\n\t\tthis.withinDayControlerListener.getWithinDayEngine().addDuringLegReplannerFactory(this.duringLegReplannerFactory);\n\t}", "public interface RoutingAlgorithm {\n public void initMapInfo(int[][] map);\n public int getShortestPath(int start,int end);\n}", "public interface FindDirectionListener {\n\n /**\n * Method initiates finding directions beetwen two points on the route (clean auxiliary variables)\n */\n void onStartFindDirection();\n\n /**\n * Method downloads url of polylines beetwen two points on the route\n */\n void onSucceedFindDirection(List<RouteBeetweenTwoPointsDTO> route);\n\n /**\n * Method is nesecery for selecting if the current position of user is on the route\n */\n void onStoreFindDirection();\n}", "public interface QComputablePlanner {\n\n public List<QValue> getQs(State s);\n\n public QValue getQ(State s, AbstractGroundedAction a);\n\n}", "public interface ElevatorControl {\n /**\n *Задать место назначения\n * @param destination этаж\n */\n void addNewDestination(Integer destination);\n}", "public interface loadBalanceRoutingService {\n Set<Path> getLoadPaths(Topology topo, ElementId src, ElementId dst);\n Set<Path> getLoadPaths(ElementId src, ElementId dst);\n}", "public interface IStrategy {\n\n\t\t\n\t\t\t\n\t/** \n\t * calculate the next position of the pacman. Gets the curent position and returns the new position.\n\t */\n\tpublic abstract Point move(Point position);\n\t\t\t\n\t\t\n\n}", "@Local\r\npublic interface BonLivraisonManagerLocal\r\n extends BonLivraisonManager\r\n{\r\n\r\n\r\n}", "public interface Targetable {\n\n public GPSCoordinate getTargetLocation ();\n\n}", "@Override\r\n public Class<? extends SdlRouterService> defineLocalSdlRouterClass() {\n return com.lz.proxytestdemo.sdlapp.SdlRouterService.class;\r\n }", "public interface JobPlan \n{\n\t/**\n\t * A method that sets a job identifier for the current job in a JobPlan\n\t * @param jobId - the job identifier for the current job\n\t */\n\tpublic void setJobId( int jobId ) ;\n\t\n\t/**\n\t * A method that returns the job identifier for the current job\n\t * @return the job identifier for the current job\n\t */\n\tpublic int getJobId() ;\n\t\n\t/**\n\t * A method that stores the association between a predicate and its TriplePattern\n\t * @param pred - the predicate of every triple pattern\n\t * @param tp - the associated TriplePattern object\n\t */\n\tpublic void setPredicateBasedTriplePattern( String pred, TriplePattern tp ) ;\n\t\n\t/**\n\t * A method that returns the TriplePattern associated with a predicate\n\t * @param pred - the predicate to be searched\n\t * @return the associated TriplePattern object\n\t */\n\tpublic TriplePattern getPredicateBasedTriplePattern( String pred ) ;\n\t\n\t/**\n\t * A method that sets the total number of variables expected in the result\n\t * @param totalVars - the total number of variables expected in the result of the SPARQL query\n\t */\n\tpublic void setTotalVariables( int totalVars ) ;\n\t\n\t/**\n\t * A method that returns the total number of variables that are expected in the result\n\t * @return the total number of variables in the SPARQL query\n\t */\n\tpublic int getTotalVariables() ;\n\t\n\t/**\n\t * A method that sets the Hadoop Job object to be used by the current job plan\n\t * @param currJob - the Hadoop Job object\n\t */\n\tpublic void setHadoopJob( Job currJob ) ;\n\t\n\t/**\n\t * A method that returns the Hadoop Job object used by the current job plan\n\t * @return - the Hadoop Job used by the current job plan\n\t */\n\tpublic Job getHadoopJob() ;\n\t\n\t/**\n\t * A method that sets whether there are any more jobs to follow after the current one\n\t * @param hasMoreJobs - true iff there are more Hadoop jobs to follow, false otherwise\n\t */\n\tpublic void setHasMoreJobs( boolean hasMoreJobs ) ;\n\t\n\t/**\n\t * A method that returns true if there are more jobs to follow, false otherwise\n\t * @return true iff there are more Hadoop jobs to follow, false otherwise\n\t */\n\tpublic boolean getHasMoreJobs() ;\n\t\n\t/**\n\t * A method that adds the association between a variable and the number of triple patterns that contain the variable\n\t * to a map\n\t * @param var - a variable from the SPARQL query\n\t * @param count - the number of triple patterns that contain the given variable\n\t */\n\tpublic void setVarTrPatternCount( String var, Integer count ) ;\n\t\n\t/**\n\t * A method that returns the number of triple patterns that contain the given variable\n\t * @param var - the variable for which the number of triple patterns is desired\n\t * @return the number of triple patterns that cotain the given variable\n\t */\n\tpublic Integer getVarTrPatternCount( String var ) ;\n\t\n\t/**\n\t * A method that adds the given variable to a list of joining variables\n\t * @param var - a given variable \n\t */\n\tpublic void addVarToJoiningVariables( String var ) ;\n\t\n\t/**\n\t * A method that returns the list of joining variables\n\t * @return the list that contains all joining variables for a job\n\t */\n\tpublic List<String> getJoiningVariablesList() ;\n\t\n\t/**\n\t * A method that sets the list of variables in the SELECT clause\n\t * @param listVars - a list of variables in the SELECT clause of the SPARQL query\n\t */\n\tpublic void setSelectClauseVarList( List<String> listVars ) ;\n\t\n\t/**\n\t * A method that returns the list of variables in the SELECT clause of the SPARQL query\n\t * @return a list containing variables in the SELECT clause\n\t */\n\tpublic List<String> getSelectClauseVarList() ;\n}", "@Override\n\tpublic Point estTraversePar(Rayon r) {\n\t\tassert r != null;\n\t\tint i, indice;\n\t\tdouble distanceMin = 0.0;\n\t\tPoint point;\n\t\tPoint pointReturn = null;\n\t\t\n\t\tfor (i = 0; i<6; i++) {\n\t\t\tpoint = this.plans.get(i).estTraversePar(r);\n\t\t\tindice = this.appartientCube(point);\n\t\t\t\n\t\t\tif (point != null & indice != -1) {\n\t\t\t\tif ((distanceMin > point.distance(r.getOrigine()) | distanceMin < Objet3D.EPSILON) ) {\n\t\t\t\t\tpointReturn = point.copie();\n\t\t\t\t\tdistanceMin = pointReturn.distance(r.getOrigine());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn pointReturn;\n\t}", "public interface ASTControlReparacionSTBLocal\n\textends\n\t\tco.com.telefonica.atiempo.actividades.IActividadEJB,\n\t\tjavax.ejb.EJBLocalObject {\n}", "@Local\r\npublic interface CalendarRecordManagerLocal\r\n extends CalendarRecordManager\r\n{\r\n\r\n\r\n}", "public interface SearchSolver {\n\n /**\n * initializes the algorithm. This method has to be called before calling any other method\n * @param graph the graph of the map where the search takes place\n * @param targetStart the start position for the target (in our case the thief)\n * @param searchStart the start position for the searcher (in our case the police)\n * @param counter the counter object that counts the expanded nodes\n */\n void initialize(Graph graph, Node targetStart, Node searchStart, ExpandCounter counter);\n\n /**\n * gets the shortest path from search start to target\n * @return list of edges that describe the path\n * @throws NoPathFoundException if there is no path to the target\n */\n List<Edge> getPath() throws NoPathFoundException;\n}", "public interface Locateable extends GeoElementND {\n\t/**\n\t * @param p\n\t * start point\n\t * @throws CircularDefinitionException\n\t * in case the start point depends on this object\n\t */\n\tpublic void setStartPoint(GeoPointND p) throws CircularDefinitionException;\n\n\t/**\n\t * Unregisters start point\n\t * \n\t * @param p\n\t * start point to remove\n\t */\n\tdefault void removeStartPoint(GeoPointND p) {\n\t\tif (p == getStartPoint()) {\n\t\t\tinitStartPoint(p.copy(), 0);\n\t\t}\n\t}\n\n\t/**\n\t * Returns (first) start point\n\t * \n\t * @return start point\n\t */\n\tpublic GeoPointND getStartPoint();\n\n\t/**\n\t * @param p\n\t * start point\n\t * @param number\n\t * index (GeoImage has three startPoints (i.e. corners))\n\t * @throws CircularDefinitionException\n\t * in case the start point depends on this object\n\t */\n\tpublic void setStartPoint(GeoPointND p, int number)\n\t\t\tthrows CircularDefinitionException;\n\n\tdefault int getStartPointCount() {\n\t\treturn 1;\n\t}\n\n\tdefault GeoElementND getStartPoint(int idx) {\n\t\treturn getStartPoint();\n\t}\n\n\t/**\n\t * Sets the startpoint without performing any checks. This is needed for\n\t * macros.\n\t * \n\t * @param p\n\t * start point\n\t * @param number\n\t * index\n\t */\n\tpublic void initStartPoint(GeoPointND p, int number);\n\n\t/**\n\t * @return true iff the location is absolute\n\t */\n\tpublic boolean hasStaticLocation();\n\n\t/**\n\t * @return true iff object is always fixed\n\t */\n\tpublic boolean isAlwaysFixed();\n\n\t/**\n\t * Use this method to tell the locateable that its startpoint will be set\n\t * soon. (This is needed during XML parsing, as startpoints are processed at\n\t * the end of a construction, @see geogebra.io.MyXMLHandler)\n\t */\n\tdefault void setWaitForStartPoint() {\n\t\t// only relevant for vectors\n\t}\n\n\t/**\n\t * Update that does not change value, but only location\n\t */\n\tpublic void updateLocation();\n\n}", "public interface IRealTimeSearchAlgorithm {\n\n /**\n * This function will calculate a prefix from the start node to the goal node path\n * @param start - The start node\n * @param goal - The goal node\n * @param numOfNodesToDevelop - The number of nodes to develop in the search\n * @param agent - The agent\n * @return - A prefix from the start node to the goal node path\n */\n public List<Node> calculatePrefix(Node start, Node goal, int numOfNodesToDevelop, Agent agent);\n}", "public interface Traveller {\n\n /**\n * Adds the given town to the town network map, connected to the given towns\n * @param town the town to add to the network\n * @param connectedTowns the towns that the new town is connected to\n */\n void add_to_network(Town town, List<Town> connectedTowns);\n\n /**\n * Places the given Character in a Town by changing a Town's occupancy state\n * @param character\n * @param town\n * @throws IllegalStateException\n */\n void place_character(Character character, Town town) throws IllegalStateException;\n\n /**\n * Determines whether a Character can travel to the given town without passing through\n * any other towns with Characters in them\n * @param character the Character attempting to travel\n * @param town the town that the Character is going to attempt to travel to\n * @return true if the character can travel to the town, false otherwise\n */\n Boolean can_travel_to(Character character, Town town);\n}", "public Local() {\n }", "public static void main(String[] args) throws CantAdd, CoronaWarn {\n\t\tTravelAgency TravelAgency = new TravelAgency();\r\n\r\n\t\tPlane p=new Plane(200,2,\"first plane max travelers\");\r\n\t\tPlane p1=new Plane(100,1,\"second plan min traelers\");\r\n\r\n\t\tTrip i=new Trip(p,Country.Australia,Country.Canada);\r\n\t\tTrip io=new Trip(p1,Country.Australia,Country.Canada);\r\n\t\t \r\n\t\tDate date=new Date(1,2,5);\r\n\t\tPassport passprt1=new Passport(\"anton\",44,date);\r\n\t\tPassport passprt2=new Passport(\"abdo\",44,date);\r\n\t\tPassport passprt3=new Passport(\"julie\",44,date);\r\n\t\tPassport passprt4=new Passport(\"juliana\",44,date);\r\n\t\tPassport passprt5=new Passport(\"bella\",44,date);\r\n\t\tPassport passprt6=new Passport(\"geris\",44,date);\r\n\t\tTraveler t1=new Traveler(passprt1,true,true);\r\n\t\tTraveler t2=new Traveler(passprt2,true,true);\r\n\t\tTraveler t3=new Traveler(passprt3,true,true);\r\n\t\tTraveler t4=new Traveler(passprt4,true,true);\r\n\t\tTraveler t5=new Traveler(passprt5,true,true);\r\n\t\tTraveler t6=new Traveler(passprt6,true,true);\r\n\t\t\r\n\t\t\r\n\t\tio.addTraveler(t1);\r\n\t\tio.addTraveler(t2);\r\n\t\tio.addTraveler(t3);\r\n\t\tio.addTraveler(t6);\r\n\t\tio.addTraveler(t5);\r\n\t\tio.addTraveler(t4);\r\n\t\tio.addTraveler(t6);\r\n \r\n\t\ti.addTraveler(t1);\r\n\t\ti.addTraveler(t2);\r\n\t\ti.addTraveler(t3);\r\n\t\ti.addTraveler(t4);\r\n\t\r\n\t\ti.addTraveler(t6);\r\n\t\t\r\n\t\tTravelAgency.addTrip(i);\t\r\n\t\tTravelAgency.addTrip(io);\r\n\t\tSystem.out.print(TravelAgency.findUnsafeTrips());\r\n\r\n\t\t\r\n\t\tTravelAgency.AddTraveler(t1);\r\n\t\tTravelAgency.AddTraveler(t2);\r\n\t\tTravelAgency.AddTraveler(t3);\r\n\t\tTravelAgency.AddTraveler(t4);\r\n\t\tTravelAgency.AddTraveler(t5);\r\n\t\tTravelAgency.AddTraveler(t6);\r\n\t\t\r\n\t}", "public interface Propagator extends PVCoordinatesProvider {\n\n /** Default mass. */\n double DEFAULT_MASS = 1000.0;\n\n /** Default attitude provider. */\n AttitudeProvider DEFAULT_LAW = InertialProvider.EME2000_ALIGNED;\n\n /** Indicator for slave mode. */\n int SLAVE_MODE = 0;\n\n /** Indicator for master mode. */\n int MASTER_MODE = 1;\n\n /** Indicator for ephemeris generation mode. */\n int EPHEMERIS_GENERATION_MODE = 2;\n\n /** Get the current operating mode of the propagator.\n * @return one of {@link #SLAVE_MODE}, {@link #MASTER_MODE},\n * {@link #EPHEMERIS_GENERATION_MODE}\n * @see #setSlaveMode()\n * @see #setMasterMode(double, OrekitFixedStepHandler)\n * @see #setMasterMode(OrekitStepHandler)\n * @see #setEphemerisMode()\n */\n int getMode();\n\n /** Set the propagator to slave mode.\n * <p>This mode is used when the user needs only the final orbit at the target time.\n * The (slave) propagator computes this result and return it to the calling\n * (master) application, without any intermediate feedback.\n * <p>This is the default mode.</p>\n * @see #setMasterMode(double, OrekitFixedStepHandler)\n * @see #setMasterMode(OrekitStepHandler)\n * @see #setEphemerisMode()\n * @see #getMode()\n * @see #SLAVE_MODE\n */\n void setSlaveMode();\n\n /** Set the propagator to master mode with fixed steps.\n * <p>This mode is used when the user needs to have some custom function called at the\n * end of each finalized step during integration. The (master) propagator integration\n * loop calls the (slave) application callback methods at each finalized step.</p>\n * @param h fixed stepsize (s)\n * @param handler handler called at the end of each finalized step\n * @see #setSlaveMode()\n * @see #setMasterMode(OrekitStepHandler)\n * @see #setEphemerisMode()\n * @see #getMode()\n * @see #MASTER_MODE\n */\n void setMasterMode(double h, OrekitFixedStepHandler handler);\n\n /** Set the propagator to master mode with variable steps.\n * <p>This mode is used when the user needs to have some custom function called at the\n * end of each finalized step during integration. The (master) propagator integration\n * loop calls the (slave) application callback methods at each finalized step.</p>\n * @param handler handler called at the end of each finalized step\n * @see #setSlaveMode()\n * @see #setMasterMode(double, OrekitFixedStepHandler)\n * @see #setEphemerisMode()\n * @see #getMode()\n * @see #MASTER_MODE\n */\n void setMasterMode(OrekitStepHandler handler);\n\n /** Set the propagator to ephemeris generation mode.\n * <p>This mode is used when the user needs random access to the orbit state at any time\n * between the initial and target times, and in no sequential order. A typical example is\n * the implementation of search and iterative algorithms that may navigate forward and\n * backward inside the propagation range before finding their result.</p>\n * <p>Beware that since this mode stores <strong>all</strong> intermediate results,\n * it may be memory intensive for long integration ranges and high precision/short\n * time steps.</p>\n * @see #getGeneratedEphemeris()\n * @see #setSlaveMode()\n * @see #setMasterMode(double, OrekitFixedStepHandler)\n * @see #setMasterMode(OrekitStepHandler)\n * @see #getMode()\n * @see #EPHEMERIS_GENERATION_MODE\n */\n void setEphemerisMode();\n\n /**\n * Set the propagator to ephemeris generation mode with the specified handler for each\n * integration step.\n *\n * <p>This mode is used when the user needs random access to the orbit state at any\n * time between the initial and target times, as well as access to the steps computed\n * by the integrator as in Master Mode. A typical example is the implementation of\n * search and iterative algorithms that may navigate forward and backward inside the\n * propagation range before finding their result.</p>\n *\n * <p>Beware that since this mode stores <strong>all</strong> intermediate results, it\n * may be memory intensive for long integration ranges and high precision/short time\n * steps.</p>\n *\n * @param handler handler called at the end of each finalized step\n * @see #setEphemerisMode()\n * @see #getGeneratedEphemeris()\n * @see #setSlaveMode()\n * @see #setMasterMode(double, OrekitFixedStepHandler)\n * @see #setMasterMode(OrekitStepHandler)\n * @see #getMode()\n * @see #EPHEMERIS_GENERATION_MODE\n */\n void setEphemerisMode(OrekitStepHandler handler);\n\n /** Get the ephemeris generated during propagation.\n * @return generated ephemeris\n * @exception IllegalStateException if the propagator was not set in ephemeris\n * generation mode before propagation\n * @see #setEphemerisMode()\n */\n BoundedPropagator getGeneratedEphemeris() throws IllegalStateException;\n\n /** Get the propagator initial state.\n * @return initial state\n * @exception OrekitException if state cannot be retrieved\n */\n SpacecraftState getInitialState() throws OrekitException;\n\n /** Reset the propagator initial state.\n * @param state new initial state to consider\n * @exception OrekitException if initial state cannot be reset\n */\n void resetInitialState(SpacecraftState state)\n throws OrekitException;\n\n /** Add a set of user-specified state parameters to be computed along with the orbit propagation.\n * @param additionalStateProvider provider for additional state\n * @exception OrekitException if an additional state with the same name is already present\n */\n void addAdditionalStateProvider(AdditionalStateProvider additionalStateProvider)\n throws OrekitException;\n\n /** Get an unmodifiable list of providers for additional state.\n * @return providers for the additional states\n */\n List<AdditionalStateProvider> getAdditionalStateProviders();\n\n /** Check if an additional state is managed.\n * <p>\n * Managed states are states for which the propagators know how to compute\n * its evolution. They correspond to additional states for which an\n * {@link AdditionalStateProvider additional state provider} has been registered\n * by calling the {@link #addAdditionalStateProvider(AdditionalStateProvider)\n * addAdditionalStateProvider} method. If the propagator is an {@link\n * org.orekit.propagation.integration.AbstractIntegratedPropagator integrator-based\n * propagator}, the states for which a set of {@link\n * org.orekit.propagation.integration.AdditionalEquations additional equations} has\n * been registered by calling the {@link\n * org.orekit.propagation.integration.AbstractIntegratedPropagator#addAdditionalEquations(\n * org.orekit.propagation.integration.AdditionalEquations) addAdditionalEquations}\n * method are also counted as managed additional states.\n * </p>\n * <p>\n * Additional states that are present in the {@link #getInitialState() initial state}\n * but have no evolution method registered are <em>not</em> considered as managed states.\n * These unmanaged additional states are not lost during propagation, though. Their\n * value will simply be copied unchanged throughout propagation.\n * </p>\n * @param name name of the additional state\n * @return true if the additional state is managed\n */\n boolean isAdditionalStateManaged(String name);\n\n /** Get all the names of all managed states.\n * @return names of all managed states\n */\n String[] getManagedAdditionalStates();\n\n /** Add an event detector.\n * @param detector event detector to add\n * @see #clearEventsDetectors()\n * @see #getEventsDetectors()\n * @param <T> class type for the generic version\n */\n <T extends EventDetector> void addEventDetector(T detector);\n\n /** Get all the events detectors that have been added.\n * @return an unmodifiable collection of the added detectors\n * @see #addEventDetector(EventDetector)\n * @see #clearEventsDetectors()\n */\n Collection<EventDetector> getEventsDetectors();\n\n /** Remove all events detectors.\n * @see #addEventDetector(EventDetector)\n * @see #getEventsDetectors()\n */\n void clearEventsDetectors();\n\n /** Get attitude provider.\n * @return attitude provider\n */\n AttitudeProvider getAttitudeProvider();\n\n /** Set attitude provider.\n * @param attitudeProvider attitude provider\n */\n void setAttitudeProvider(AttitudeProvider attitudeProvider);\n\n /** Get the frame in which the orbit is propagated.\n * <p>\n * The propagation frame is the definition frame of the initial\n * state, so this method should be called after this state has\n * been set, otherwise it may return null.\n * </p>\n * @return frame in which the orbit is propagated\n * @see #resetInitialState(SpacecraftState)\n */\n Frame getFrame();\n\n /** Propagate towards a target date.\n * <p>Simple propagators use only the target date as the specification for\n * computing the propagated state. More feature rich propagators can consider\n * other information and provide different operating modes or G-stop\n * facilities to stop at pinpointed events occurrences. In these cases, the\n * target date is only a hint, not a mandatory objective.</p>\n * @param target target date towards which orbit state should be propagated\n * @return propagated state\n * @exception OrekitException if state cannot be propagated\n */\n SpacecraftState propagate(AbsoluteDate target) throws OrekitException;\n\n /** Propagate from a start date towards a target date.\n * <p>Those propagators use a start date and a target date to\n * compute the propagated state. For propagators using event detection mechanism,\n * if the provided start date is different from the initial state date, a first,\n * simple propagation is performed, without processing any event computation.\n * Then complete propagation is performed from start date to target date.</p>\n * @param start start date from which orbit state should be propagated\n * @param target target date to which orbit state should be propagated\n * @return propagated state\n * @exception OrekitException if state cannot be propagated\n */\n SpacecraftState propagate(AbsoluteDate start, AbsoluteDate target) throws OrekitException;\n\n}", "public OBGPControlPlane(Config aConfig, SimulationAccounting aAccounting) {\r\n\t\t\r\n\t\r\n\r\n\t\tsuper(aConfig);\r\n\t\t// System.out.println(\"Carregando plano de controle\");\r\n\t\tthis.accounting = (Accounting) aAccounting;\r\n\t\t// Get the links of this network\r\n\t\tlinks = config.getLinks();\r\n\t\t// System.out.println(links.toString());\r\n\t\t// Create the nodes of this network\r\n\t\tnodes = new LinkedHashMap<String, OBGPLabelSwitchRouter>();\r\n\t\t// Create the storage of disrupted connections by failure\r\n\t\tdisruptedLSP = new Hashtable<String, LightpathRequest>();\r\n\t\trestoredLSP = new Hashtable<String, Connection>();\r\n\t\t// Get the simulation parameters\r\n\t\tHashtable<String, Vector<String>> parameters = config\r\n\t\t\t\t.getSimulationParameters();\r\n\t\t// see all the parameters\r\n\t\tif (verbose)\r\n\t\t\tSystem.out.println(parameters.toString());\r\n\r\n\t\t// get all the asbrs. It will be important to identify the node\r\n\t\tasbrs = parameters.get(\"/Domains/ASBR\");\r\n\r\n\t\t// policyFrom = parameters.get(\"/Domains/POLICY/@from\");\r\n\t\tsetPolicy = new LinkedHashMap<String, Vector<String>>();\r\n\r\n\t\thopLimit = Integer.parseInt(parameters.get(\"/OPS/Hop/@limit\")\r\n\t\t\t\t.firstElement());\r\n\t\t// Get details about the RWA algorithm used\r\n\t\trerouting = ReRouting.valueOf(parameters.get(\"/RWA/Routing/@rerouting\")\r\n\t\t\t\t.firstElement());\r\n\r\n\t\t// Get the number of rerounting attempts\r\n\t\treroutingAttempts = Integer.parseInt(parameters.get(\r\n\t\t\t\t\"/RWA/Routing/@attempts\").firstElement());\r\n\t\t// Get the number of interomdina rerouting attempts\r\n\t\tmaxInterReroutingAttempts = Integer.parseInt(parameters.get(\r\n\t\t\t\t\"/RWA/Routing/@interAttempts\").firstElement());\r\n\t\t// The max number of rerouting attempts\r\n\t\tmaxReroutingAttempts = Integer.parseInt(parameters.get(\r\n\t\t\t\t\"/RWA/Routing/@maxAttempts\").firstElement());\r\n\t\tthis.alternative = reroutingAttempts + 1; // Number of k-shortest paths\r\n\t\twa = WavelengthAssignment.valueOf(parameters.get(\"/RWA/WA/@type\")\r\n\t\t\t\t.firstElement());\r\n\r\n\t\tmaxInterRoutes = Integer.parseInt(parameters.get(\r\n\t\t\t\t\"/RWA/Routing/@interRoutes\").firstElement());\r\n\r\n\t\tboolean serRT = Boolean.parseBoolean(parameters.get(\r\n\t\t\t\t\"/RWA/Serialize/@rt\").firstElement());\r\n\r\n\t\t// Gets the size of the time slice\r\n\t\ttimeSlice = Double.parseDouble(parameters.get(\r\n\t\t\t\t\"/Outputs/Transient/@timeSlice\").firstElement());\r\n\t\tactualTimeSlice = timeSlice;\r\n\t\t// Gets the time necessary for fault localization.\r\n\t\tfaultLocalizationTime = Double.parseDouble(parameters.get(\r\n\t\t\t\t\"/Failure/Timing/@localization\").firstElement());\r\n\t\tidentificationLength = Integer.parseInt(parameters.get(\r\n\t\t\t\t\"/OPS/Hop/@bytes\").firstElement());\r\n\r\n\t\tLinkedHashMap<String, ExplicitRoutingTable> rTables = null;\r\n\r\n\t\t// create the collection of graphs\r\n\t\tdomainGraphs = new LinkedHashMap<String, Graph>();\r\n\t\treroutedLSP = new LinkedHashMap<String, Connection>();\r\n\r\n\t\t/** GENERATION OF PER DOMAIN GRAPH */\r\n\r\n\t\tsetPerDomainPaths(graph, domainGraphs);\r\n\r\n\t\tif (serRT) {\r\n\t\t\tString fileRT = parameters.get(\"/RWA/Serialize/@file\")\r\n\t\t\t\t\t.firstElement();\r\n\r\n\t\t\trTables = this.read(fileRT);\r\n\t\t} else {\r\n\r\n\t\t\t/** COMMAND BLOCK: GENERATION OF PER-DOMAIN ROUTES */\r\n\r\n\t\t\tdomainSetPaths = new LinkedHashMap<String, LinkedHashMap<String, Vector<Path>>>();\r\n\t\t\t// Populates the hash table domainSetPaths with path inside each\r\n\t\t\t// domain\r\n\t\t\tfor (String domain : domainGraphs.keySet()) {\r\n\t\t\t\tdomainSetPaths.put(domain,\r\n\t\t\t\t\t\tthis.getPaths(domainGraphs.get(domain), alternative));\r\n\t\t\t}\r\n\t\t\t// Now, each domain has all the best paths from one node to another\r\n\t\t\t// (inside the same domain)\r\n\t\t}\r\n\r\n\t\t// We need to create a routing table of the node inside its own domain.\r\n\t\tfor (String domain : domainGraphs.keySet()) {\r\n\t\t\t// the Graph representing the domain\r\n\t\t\tGraph gDomain = domainGraphs.get(domain);\r\n\t\t\t// for each node inside the domain\r\n\t\t\tfor (String node : gDomain.nodes()) {\r\n\t\t\t\t// creates the routing table of this node\r\n\t\t\t\tExplicitRoutingTable rtable;\r\n\r\n\t\t\t\t// if this table comes from a file, so we need to load it\r\n\t\t\t\tif (rTables != null) {\r\n\t\t\t\t\trtable = rTables.get(node);\r\n\r\n\t\t\t\t} else { // otherwise, we need to create a new one\r\n\t\t\t\t\trtable = new ExplicitRoutingTable(node, alternative);\r\n\r\n\t\t\t\t\t// and the new routing table will be updated from the\r\n\t\t\t\t\t// topology\r\n\t\t\t\t\trtable.updateFromTopology(gDomain,\r\n\t\t\t\t\t\t\tdomainSetPaths.get(domain));\r\n\r\n\t\t\t\t\tRoutingTableEntry[][] teste = rtable.getRoutingTable();\r\n\r\n\t\t\t\t}\r\n\t\t\t\t// the adjacents nodes from this node\r\n\t\t\t\tVector<String> adjacent = gDomain.adjacentNodes(node);\r\n\t\t\t\t// the linkstate hashmap\r\n\t\t\t\tLinkedHashMap<String, LinkState> linkStateSet = new LinkedHashMap<String, LinkState>();\r\n\r\n\t\t\t\tfor (String adjId : adjacent) {\r\n\t\t\t\t\t// get the link between node and adjacent\r\n\t\t\t\t\tLink link = links.get(node + \"-\" + adjId);\r\n\t\t\t\t\t// create a linkState\r\n\t\t\t\t\tLinkState linkState = new LinkState(link);\r\n\t\t\t\t\t// put this on a link state\r\n\t\t\t\t\tlinkStateSet.put(adjId.toString(), linkState);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// if the current node is an ASBR, so, we need to\r\n\t\t\t\t// generate all links to its neighbors\r\n\t\t\t\tif (asbrs.contains(node)) {\r\n\t\t\t\t\tif (verbose)\r\n\t\t\t\t\t\tSystem.out.println(\"OBGP Info: Este no eh um ASBR\");\r\n\r\n\t\t\t\t\tVector<String> adjancent = graph.adjacentNodes(node);\r\n\r\n\t\t\t\t\tfor (int i = 0; i < adjancent.size(); i++) {\r\n\t\t\t\t\t\tif (!getDomain(adjancent.get(i))\r\n\t\t\t\t\t\t\t\t.equals(getDomain(node))) {\r\n\t\t\t\t\t\t\tLink link = links\r\n\t\t\t\t\t\t\t\t\t.get(node + \"-\" + adjancent.get(i));\r\n\t\t\t\t\t\t\tLinkState lstate = new LinkState(link);\r\n\t\t\t\t\t\t\tlinkStateSet.put(adjancent.get(i).toString(),\r\n\t\t\t\t\t\t\t\t\tlstate);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Create the node and put it into the table.\r\n\t\t\t\tOBGPLabelSwitchRouter obgpLSR = new OBGPLabelSwitchRouter(node,\r\n\t\t\t\t\t\trtable, linkStateSet, gDomain, wa, rerouting,\r\n\t\t\t\t\t\tmaxReroutingAttempts, reroutingAttempts,\r\n\t\t\t\t\t\tasbrs.contains(node), getDomain(node),\r\n\t\t\t\t\t\tmaxInterReroutingAttempts);\r\n\r\n\t\t\t\tnodes.put(node, obgpLSR);\r\n\r\n\t\t\t\t// System.out.println(\"=== Routing Table ===\\n\"\r\n\t\t\t\t// + obgpLSR.getRoutingTable().toString());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * GUSTAVO [old] // Initialize the state of each node for (String id :\r\n\t\t * graph.nodes()) { // System.out.println(\"...: \"+id); // Create the\r\n\t\t * routing table for this node ExplicitRoutingTable ert; if (rTables !=\r\n\t\t * null) { ert = rTables.get(id); } else { ert = new\r\n\t\t * ExplicitRoutingTable(id, alternative); ert.updateFromTopology(graph,\r\n\t\t * setPaths); // System.out.println(ert.toString()); } // Create the\r\n\t\t * links adjacent to this node. Vector<String> adjacent =\r\n\t\t * graph.adjacentNodes(id); // System.out.println(adjacent.toString());\r\n\t\t * LinkedHashMap<String, LinkState> linkStateSet = new\r\n\t\t * LinkedHashMap<String, LinkState>(); // for each adjacent node do for\r\n\t\t * (String adjId : adjacent) { Link link = links.get(id + \"-\" + adjId);\r\n\t\t * LinkState linkState = new LinkState(link);\r\n\t\t * linkStateSet.put(adjId.toString(), linkState); } // Create the node\r\n\t\t * and put it into the table. // AQUI EU CRIO OS NODES\r\n\t\t * OBGPLabelSwitchRouter node = new OBGPLabelSwitchRouter(id, ert,\r\n\t\t * linkStateSet, graph, wa, rerouting, maxReroutingAttempts,\r\n\t\t * reroutingAttempts); nodes.put(id, node); }\r\n\t\t */\r\n\r\n\t\t/** INTER-DOMAIN ROUTING POLICY */\r\n\r\n\t\t// generates the inter-domain routing\r\n\t\t// required by the next steps\r\n\t\t// read policy from XML and generates the policy rules\r\n\t\tsetPolicy(setPolicy);\r\n\t\t// generateASPathv2(setPolicy);\r\n\t\t// simulates Path dissemation from BGP generating AS-PATH\r\n\t\tLinkedHashMap<String, ArrayList<Vector<String>>> ASPath = generateASPath(setPolicy);\r\n\t\tOBGPRoutingTable interdomainRoutes = new OBGPRoutingTable(ASPath);\r\n\t\t// System.out.println(domainGraphs.toString());\r\n\t\t// Fill the Interdomain Routing Table\r\n\t\t// All interdomain routes does not contain :\r\n\t\t// Example: 1:a-1:g is an intra-domain route\r\n\t\t// and 1-2 is an interdomain route\r\n\t\t// for (String key : setPolicy.keySet()) {\r\n\t\t// if (!key.contains(\":\")) {\r\n\t\t// interdomainRoutes.putEntry(key, ASPath.get(key));\r\n\t\t// interdomainRoutes.putEntry(key, setPolicy.get(key));\r\n\t\t// }\r\n\r\n\t\t// }\r\n\r\n\t\tSystem.out.println(\"Tabela de Rotas - Interdominio\");\r\n\t\tSystem.out.println(interdomainRoutes.toString());\r\n\t\t// System.out.println(\"Os links:\");\r\n\t\t// System.out.println(config.getLinks().toString());\r\n\r\n\t\tSystem.out.println(\"JA PASSEI PELO CONSTRUTOR\");\r\n\t}", "public interface PublicTransport {\n /**\n * Returns the target end station of the public transport vehicle.\n *\n * @return target station\n */\n String directsTo();\n\n /**\n * Inverts the direction of transport line (e.g.when the vehicle arrives\n * the end station).\n */\n void changeDirection();\n}", "@Local\npublic interface ReservationProvider {\n \n public List<Reservation> getAll();\n\n public List<Boardreservation> getAllBoardReservations();\n\n /**\n * Returns all reservations on certain Table\n * @param boardID\n * @return List of found Reservations\n */\n public List<Boardreservation> getBoardReservations(int boardID);\n\n public Reservation placeReservation(Reservation reservation);\n \n}", "public interface ElevatorSelectionStrategy {\n\tElevator getElevatorFor(Passenger passenger, Floor departureFloor, Environment env);\n}", "public interface RemoteRouteRepository {\n Observable<List<LatLng>> getRoute(LatLng currentLocation, LatLng toiletLocation);\n}", "@Override\r\n\tpublic void onReCalculateRouteForTrafficJam() {\n\r\n\t}", "public interface LocalSessionMapper extends BaseMapper<LocalSession> {\n}", "@Local\r\npublic interface ViewBulletinPaieHelperManagerLocal\r\n extends ViewBulletinPaieHelperManager\r\n{\r\n\r\n\r\n}", "RealizationModelLocation createRealizationModelLocation();", "public Routing(char local_name, NeighbourList neig, int period, \n int min_interval, String areas, String multi_addr, int multi_port,\n Router win, DatagramSocket ds, JTable tableObj) {\n this.local_name= local_name;\n this.areas= \"0\"; // this.areas= areas;\n if ((areas == null) || (areas.length()<1)) {\n Log2(\"Invalid areas in routing constructor\");\n this.rprocesses= null;\n } else {\n this.rprocesses= new HashMap<>();\n \n // Incomplete - This version ignores the areas introduced in the GUI \n // Plase modify to support multiple areas, if you have time !\n \n Log(\"routing class only supports one area for now!\\n\\tUsing only area 0\\n\");\n this.rprocesses.put('0', \n new RoutingProcess(this, win, neig, '0', period, min_interval)); \n }\n \n this.neig= neig;\n this.local_TTL= period+TTL_ADD;\n this.win= win;\n this.ds= ds;\n this.tableObj= tableObj;\n // Initialize everything\n this.mdaemon= new MulticastDaemon(ds, multi_addr, multi_port, win, this);\n this.main_rtab= null;\n Log2(\"new Routing(local='\"+local_name+\"', period=\"+period+\n \", min_interval=\"+min_interval+\")\");\n }", "public interface Solver {\n void solve(Grid grid);\n}", "public TimeTravel() {\r\n\t\t}", "public interface IVRPAlgorithm {\n VRPSolution solve(VRPInstance vrpInstance) throws Exception;\n}", "public static void main(String[] args) {\n\t\tint grid[][] = new int[][]\n\t\t\t { \n\t\t\t { 1, 1, 0, 0, 0, 0, 1, 0, 0, 0 }, \n\t\t\t { 0, 1, 0, 1, 0, 0, 0, 1, 0, 0 }, \n\t\t\t { 0, 0, 0, 1, 0, 0, 1, 0, 1, 0 }, \n\t\t\t { 1, 1, 1, 1, 0, 1, 1, 1, 1, 0 }, \n\t\t\t { 0, 0, 0, 1, 0, 0, 0, 1, 0, 1 }, \n\t\t\t { 0, 1, 0, 0, 0, 0, 1, 0, 1, 1 }, \n\t\t\t { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, \n\t\t\t { 0, 1, 0, 0, 0, 0, 1, 0, 0, 0 }, \n\t\t\t { 0, 0, 1, 1, 1, 1, 0, 1, 1, 0 } \n\t\t\t };\n\t\t\n // Step 1: Obtain an instance of GridBasedTrafficControl.\n Configurator cfg = new DefaultConfigurator();\n GridBasedTrafficControl gbtc = cfg.getGridBasedTrafficControl(grid);\n\t\t\n\t // Step 2: Obtain path for Journey-1.\n\t Point source1 = new Point(0, 0);\n\t Point dest1 = new Point(3,4);\t \n\t String vehicleId1 = formVehicleId(source1);\n\t List<Point> path1 = gbtc.allocateRoute(vehicleId1, source1, dest1);\n\t System.out.println(\"Route for Journey-1:\" + path1);\n\t \n\t // Step 3: Obtain path for Journey-2.\n\t // This call will not return a route as the available route conflicts with the route\n\t // allocated for Journey-1.\n\t Point source2 = new Point(3, 0);\n\t Point dest2 = new Point(2,4);\n\t String vehicleId2 = formVehicleId(source2);\n\t List<Point> path2 = gbtc.allocateRoute(vehicleId2, source2, dest2);\n\t System.out.println(\"Route for Journey-2:\" + path2);\n\t \n\t // Step 4: Start Journey-1 and mark Journey-1 as complete.\n\t GridConnectedVehicle vehicle1 = new GridConnectedVehicle(vehicleId1, gbtc);\n\t vehicle1.selfDrive(path1);\n\t gbtc.markJourneyComplete(vehicleId1, source1, dest1);\n\t \n\t // Step 5: Retry call to obtain path for Journey-2.\n\t // This call should return a valid path as Journey-1 was marked as complete.\n\t path2 = gbtc.allocateRoute(formVehicleId(source2), source2, dest2);\n\t System.out.println(\"Route for Journey-2:\" + path2);\n\t \n\t // Step 6: Start Journey-2 and mark Journey-2 as complete.\n\t GridConnectedVehicle vehicle2 = new GridConnectedVehicle(vehicleId2, gbtc);\n\t vehicle2.selfDrive(path2);\n\t gbtc.markJourneyComplete(vehicleId2, source2, dest2);\n\t}", "private interface BreakpointsWorkPlan {\n Stage ANALYZE = new Stage(null, 1f);\n Stage REMOTE_CHANGES = new Stage(null, 1f);\n\n boolean IS_LAYOUTED = ProgressUtil.layoutProgressPlan(ANALYZE, REMOTE_CHANGES);\n }", "public void selectRouteChoice()\n\t{\n\t\tRoutePlanner planner = new RoutePlanner();\n\t\tthis.sequence = ap.listSequences.get(numTrips);\n\t\t// only minimisation\n\t\tif (ap.routeChoice.equals(\"DS\")) newPath = planner.roadDistance(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"AC\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"TS\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\t// minimisation plus only global landmarks\n\t\telse if (ap.routeChoice.equals(\"DG\")) newPath = planner.roadDistance(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"AG\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\t// minimisation plus local and (optionally) global landmarks\n\t\telse if (ap.routeChoice.contains(\"D\") && ap.routeChoice.contains(\"L\")) newPath = planner.roadDistanceSequence(sequence, ap);\n\t\telse if (ap.routeChoice.contains(\"A\") && ap.routeChoice.contains(\"L\")) newPath = planner.angularChangeBasedSequence(sequence, ap);\n\t\t// anything with regions and/or barriers, or just barriers\n\t\telse if (ap.routeChoice.contains(\"R\")) newPath = planner.regionBarrierBasedPath(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.contains(\"B\")) newPath = planner.barrierBasedPath(originNode, destinationNode, ap);\n\t}", "public void travel();", "public interface RemoteCoordinator extends Remote, Identify {\n /**\n * a method to add a Peer to this RemoteCoordinator's list of available Peers\n * called by a MembershipManager\n *\n * @param peer the Uuid of the Peer to be added\n */\n void addPeer(Uuid peer) throws RemoteException;\n\n /**\n * a method to remove a Peer from this RemoteCoordinator's list of available Peers\n * called by a MembershipManager\n *\n * @param peer the Uuid of the Peer to be removed\n */\n void removePeer(Uuid peer) throws RemoteException;\n\n /**\n * a method to get the Uuid of a live Peer in this Coordinator's list of active Peers,\n * removing any dead Peers encountered along the way from the service\n *\n * @return the Uuid of a live Peer\n */\n Uuid getActivePeer() throws RemoteException, NotBoundException;\n\n /**\n * a method to get the list of active Peers from this RemoteCoordinator\n * called by the MembershipManager when bringing new RemoteCoordinators online\n *\n * @return the list of available Uuids from this RemoteCoordinator\n */\n List<Uuid> getActivePeers() throws RemoteException;\n\n /**\n * a method to set the map of active Peers for this RemoteCoordinator\n * called by the MembershipManager when bringing new RemoteCoordinators online\n */\n void setActivePeers(List<Uuid> activePeers) throws RemoteException;\n\n /**\n * a method to assign a JobId to a JobCoordinator\n * called by a User\n * delegates responsibility to its corresponding Coordinator method\n *\n * @param jobId the JobId of the Job being assigned\n * @return true if the job was successfully assigned, false otherwise\n * @throws RemoteException\n */\n boolean assignJob(JobId jobId) throws RemoteException;\n\n /**\n * a method to get an allocation of TaskManagers\n * called by a JobManager\n *\n * @param numRequested the number of TaskManagers being requested by the JobManager\n * @return a list of Uuids to be used by the calling JobManager as TaskManagers\n * @throws RemoteException\n */\n List<Uuid> getTaskManagers(int numRequested) throws RemoteException;\n}", "public abstract interface PathfindController extends Controller {\n // Public Abstract Methods\n \n /**\n * Block next coordinate in path.\n */\n public abstract void blockNext();\n \n /**\n * Calculate pathfinding and the states for visited and blocked of the\n * back, front, left, right respectively.\n *\n * @return the array of states\n */\n public abstract boolean[] calculate();\n \n /**\n * Go to next coordinate in path.\n */\n public abstract void goNext();\n \n /**\n * Checks if next coordinate in path is blocked.\n *\n * @return true, if next coordinate in path is blocked\n */\n public abstract boolean isNextBlocked();\n \n /**\n * Checks if next coordinate in path is visited.\n *\n * @return true, if next coordinate in path is visited\n */\n public abstract boolean isNextVisited();\n \n /**\n * String representation of the raw graph.\n *\n * @return the string\n */\n public abstract String rawGraphToString();\n \n /**\n * Reset pathfinding.\n */\n public abstract void reset();\n \n /**\n * Rotate to the left coordinate in path.\n */\n public abstract void rotateLeft();\n \n /**\n * Rotate to the right coordinate in path.\n */\n public abstract void rotateRight();\n \n /**\n * Unblock next coordinate in path.\n */\n public abstract void unblockNext();\n \n /**\n * Visit current coordinate in path.\n */\n public abstract void visit();\n}", "public ActingGoal() {\n\t\t// rosbridge compatibility issues\n\t}", "@Override\n\tpublic void onReCalculateRouteForTrafficJam() {\n\n\t}", "public interface IFlightEndPoints {\n \n Integer getFlightEndPointId();\n void setFlightEndPointId(Integer flightEndPointId);\n \n String getOriginAirportShortName();\n void setOriginAirportShortName(String shortName);\n \n double getDepartureDelay();\n void setDepartureDelay(double departureDelay);\n Date getDepartureTime();\n void setDepartureTime(Date date);\n \n String getDestAirportShortName();\n void setDestAirportShortName(String shortName);\n \n double getArrivalDelay();\n void setArrivalDelay(double arrivalDelay);\n Date getArrivalTime();\n void setArrivalTime(Date date); \n}", "public interface RouteConfigurator {\n\n PSConnector setLocalIpAddress(String cidr);\n\n PSConnector setStaticRoute(String destCidr, String nextHopeIpAddress);\n\n void setTunnelStaticRoute(String siteId, String destCidr);\n\n PSConnector setTunnel(String tunnelId, String localIpAddress, String remoteIpAddress);\n\n void setSiteToTunnel(String siteId, String tunnelId);\n\n PSConnector setDefaultGateway(String ipAddress);\n\n Set<RouteEntry>getRouteEntrySet();\n\n\n\n}", "public interface Algorithm {\r\n\r\n public static Point2D newPosition(Point2D currentXY, Point2D gp, Integer id){return null;};\r\n\r\n public static Point2D lineTrajectory(Point2D xy, Point2D goalPoint){return null;};\r\n\r\n public static Double getXforLine(Point2D xy, Point2D gp){return null;};\r\n}", "public interface IGeoPositionControl {\n\n /**\n * Registra v��rios dispositivos no controlador de georeferenciamento\n * \n * @param device\n * @return true registro feito com sucesso\n * @return false - falha na atualiza������o\n */\n public void addDevicesToTrack(List<Device> devices);\n \n /**\n * Registra um dispositivo no controlador de georeferenciamento\n * \n * @param device\n * @return true registro feito com sucesso\n * @return false - falha na atualiza������o\n */\n public void addDeviceToTrack(Device device);\n \n /**\n * Remove v��rios dispositivos do controlador de georeferenciamento\n * \n * @param device\n * @return true registro feito com sucesso\n * @return false - falha na atualiza������o\n */\n public void removeDevicesFromTracking();\n \n /**\n * Busca o dispositivo pelo identificador\n * \n * @param id\n * identificador\n * @return Ponteiro para a interface do dispositivo\n */\n public Device findDeviceById(int id);\n\n /**\n * Retorna a path do dispositivo\n * \n * @param device\n * dispositivo movel\n * @return Ponteiro para objeto gerenciador de path\n */\n public DevicePath getDevicePath(Device device);\n\n /**\n * Retorna os dispositivos em uma ���rea circular tendo o dispositivo m���vel no\n * centro do circulo\n * \n * @param device\n * Interface do dispositivo m���vel\n * @param ratio\n * raio do circulo em torno do dispositivo\n * @return Lista de dispositivos dentro do circulo\n */\n public List<DetectableDevice> getDevicesAround(Device device, int radius);\n}", "public abstract ModulePlans plans();", "@Test\n void calculateRoute() {\n GPSObject n2 = new GPSObject(\"Centenary 2\");\n Location n1 = new Location(\"Centenary 2\",\"0\",n2);\n GPSObject n3 = new GPSObject(\"Thuto 1-5\");\n Location n4 = new Location(\"Thuto 1-5\",\"1\",n3);\n Locations loc = new Locations();\n assertNotNull(roo.calculateRoute(loc));\n }", "public interface Solver {\n String MESSY_FOLIAGE_STRATEGY = \"find_messy_foliage\";\n\n /**\n * Play an association.\n */\n void playAssociation(LivingEntity ply, Association assos, State eventType);\n\n /**\n * Find an association for a player particular foot. This will fetch the player\n * angle and use it as a basis to find out what block is below their feet (or\n * which block is likely to be below their feet if the player is walking on the\n * edge of a block when walking over non-emitting blocks like air or water).<br>\n * <br>\n * Returns NOT_EMITTER if no blocks are valid emitting blocks.<br>\n * Returns a string that begins with \"_NO_ASSOCIATION\" if a matching block was\n * found, but has no association in the blockmap.\n */\n Association findAssociation(LivingEntity ply, double verticalOffsetAsMinus, boolean isRightFoot);\n\n /**\n * Find an association for a certain block assuming the player is standing on\n * it, using a custom strategy which strategies are defined by the solver.\n */\n Association findAssociation(World w, BlockPos pos, String strategy);\n}", "public interface Translator {\n\n LaunchConfiguration translateCreateRequest(CreateRequest request, Caller caller)\n throws CannotTranslateException;\n\n _VM translateVM(ReservationDescription.Instance instance,\n Caller caller,\n int launchIndex) throws CannotTranslateException;\n\n NIC[] createNics(ReservationDescription.Instance instance);\n\n State translateStateCode(int stateCode)\n throws CannotTranslateException;\n\n VM[] translateReservationInstances(ReservationDescription desc, Caller caller)\n throws CannotTranslateException;\n\n void updateVM(_VM vm, ReservationDescription.Instance instance)\n throws CannotTranslateException;\n}", "public interface IridiumFlaresPredictor {\n /**\n * Predict based on latitude and longitude. Altitude is automatically checked for given location.\n */\n public IridiumFlaresPredictorResult predict(double latitude, double longitude);\n public IridiumFlaresPredictorResult predict(double latitude, double longitude, double altitude);\n}", "public interface ILocalUpdater {\r\n\r\n\t/**\r\n\t * Extracts and applies any new local updates to {@code peer}.\r\n\t * \r\n\t * @param peer\r\n\t * @throws DBConnectionError\r\n\t * @throws LocalUpdatesException\r\n\t */\r\n\tpublic void extractAndApplyLocalUpdates(Peer peer)\r\n\t\t\tthrows DBConnectionError, LocalUpdatesException;\r\n\t\r\n\t/**\r\n\t * Called once during Migration so that any required setup can be done.\r\n\t * \r\n\t * @param db the database where the setup needs to be done.\r\n\t * @param relations the relations for which setup needs to be done.\r\n\t * \r\n\t */\r\n\tpublic void prepare(IDb db, List<? extends Relation> relations);\r\n\t\r\n\t/**\r\n\t * This method will be called after update exchange or reconciliation.\r\n\t * \r\n\t * @param db\r\n\t * @param relations\r\n\t */\r\n\tpublic void postReconcileHook(IDb db, List<? extends Relation> relations);\r\n}", "public interface LocalLoader {\n \n /**\n * Load a class which is locally defined by this loader.\n *\n * @param name the class name\n * @param resolve {@code true} to resolve the class\n * @return the class, or {@code null} if there is no local class with this name\n */\n Class<?> loadClassLocal(String name, boolean resolve);\n \n /**\n * Load a resource which is locally defined by this loader. The given name is a path separated\n * by \"{@code /}\" characters.\n *\n * @param name the resource path\n * @return the resource or resources, or an empty list if there is no local resource with this name\n */\n List<Resource> loadResourceLocal(String name);\n }", "abstract void move_elevator();", "public interface Heuristic\r\n{\r\n\r\n double calcStartToGoalCost(State currentState, State goalState);\r\n}", "@Override\n public Optional<ReadOnlyFinancialPlanner> readFinancialPlanner() throws DataConversionException, IOException {\n return readFinancialPlanner(recordListFilePath, summaryMapFilePath);\n }", "public Engine.LocalLock getLocalInterface(Engine.LocalLock pLocalInterface);", "@Override\n public void run() {\n\n // Define vehicle label if undefined\n if (this.label == null) {\n this.label = \"Vehicle_\" + this.getId();\n }\n\n // Ask roundabout object for path\n Deque<Vertex<AtomicReference>> path = this.getVehicleRoute(this.source, this.destination);\n Vertex<AtomicReference> last = null;\n\n // Get entry queue\n ConcurrentLinkedQueue<Vehicle> entry = this.roundabout.queueOnEntry(this, this.source);\n\n // Wait for first in queue\n while (entry.peek() != this) this.vehicleSleep(waitOnQueue());\n\n // Traverse Path\n for (Vertex<AtomicReference> v : path) {\n\n // Accelerate between path nodes\n if (this.speed < this.maxSpeed) this.speed = accelerate(this.speed);\n\n // Move to node\n while (!v.getValue().compareAndSet(null, this)) {\n\n // Decelerate to not crash into another vehicle\n while (this.speed > 0) this.speed = decelerate(this.speed);\n\n System.out.println(this.label + \": Waiting for next node \" + v.getKey());\n\n // Wait\n this.vehicleSleep(waitToTravel());\n }\n\n // Accelerate for next in case it has stopped\n while (this.speed <= 0) this.speed = accelerate(this.speed);\n\n System.out.println(this.label + \": Moving to node \" + v.getKey() + \" for \" + travel());\n\n // Moving from node to node\n this.vehicleSleep(travel());\n\n // Remove myself from queue only after locking the first node\n if (path.peekFirst() == v) entry.remove(this);\n\n // Release last node\n while (last != null && !last.getValue().compareAndSet(this, null)) ;\n\n // Assign v as the last node which it travelled to\n last = v;\n }\n\n // Release last node\n while (!last.getValue().compareAndSet(this, null)) ;\n }", "public R doGeneralTour( IPosition<E> p );", "public abstract int drive(int journeyDistance);", "public OptInfo createInitialRoutes() {\t\n\t\t//OptInfo has old and new attributes\n\t\tOptInfo info = new OptInfo();\n\t\tTSPDepot currDepot = null; //current depot\n\t\tTSPShipment currShip = null; //current shipment\n\t\t//int countLoop=0;\n\n\t\t//check if selection and insertion type methods have been selected\n\t\tif (ProblemInfo.selectShipType == null) {\n\t\t\tSettings.printDebug(Settings.ERROR,\n\t\t\t\t\t\"No selection shipment type has been assigned\");\n\n\t\t}\n\t\tif (ProblemInfo.insertShipType == null) {\n\t\t\tSettings.printDebug(Settings.ERROR,\n\t\t\t\t\t\"No insertion shipment type has been assigned\");\n\t\t}\n\n\t\t//capture the old attributes\n\t\tinfo.setOldAttributes(mainDepots.getAttributes());\n\t\twhile (!mainShipments.isAllShipsAssigned()) {\n\n\n\t\t\tcurrDepot = (TSPDepot) mainDepots.getTSPHead();\n\t\t\t//Send the entire mainDepots and mainShipments to get the next shipment\n\t\t\t//to be inserted including the current depot\n\t\t\tTSPShipment theShipment = mainShipments.getNextInsertShipment(mainDepots,\n\t\t\t\t\tcurrDepot, mainShipments, currShip);\n\t\t\tif (theShipment == null) { //shipment is null, print error message\n\t\t\t\tSettings.printDebug(Settings.COMMENT, \"No shipment was selected\");\n\t\t\t}\n\t\t\t//The selected shipment will be inserted into the route\n\t\t\tif (!mainDepots.insertShipment(theShipment)) {\n\t\t\t\tSettings.printDebug(Settings.COMMENT, \"The Shipment: <\" + theShipment.getIndex() +\n\t\t\t\t\t\t\"> cannot be routed\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//Settings.printDebug(Settings.COMMENT,\n\t\t\t\t//\t\t\"The Shipment: <\" + theShipment.getIndex() +// \" \" + theShipment +\n\t\t\t\t//\t\t\"> was routed\");\n\t\t\t\t//tag the shipment as being routed\n\t\t\t\ttheShipment.setIsAssigned(true);\n\t\t\t}\n\t\t}\n\t\tProblemInfo.depotLLLevelCostF.calculateTotalsStats(mainDepots);\n\t\tinfo.setNewAtributes(mainDepots.getAttributes());\n\t\treturn info;\n\t}", "LaneController getStraightLaneController();", "public interface Resolver extends AdaptrisComponent {\r\n\r\n /**\r\n * Create facts for insertion into the Rule Engine\r\n * \r\n * @param msg the AdaptrisMessage\r\n * @return a list object which will be passed in to the rule engine.\r\n * @throws RuleException wrapping any underlying exception.\r\n */\r\n Object[] create(AdaptrisMessage msg) throws RuleException;\r\n\r\n /**\r\n * Result result of the rule engine to the AdaptrisMessage\r\n * <p>\r\n * This simply provides the objects previously created with\r\n * {@link #create(AdaptrisMessage)}, so it may have no meaning if your\r\n * concrete implementation maintains its own state.\r\n * </p>\r\n * \r\n * @param result the AdaptrisMessage\r\n * @param src the objects that were inserted into the rule engine.\r\n * @throws RuleException wrapping any underlying exception.\r\n */\r\n void resolve(Object[] src, AdaptrisMessage result) throws RuleException;\r\n}", "public Journey(String destination, String origin, Priority priority,\r\n\t\t\tfloat weightPrice, float volumePrice, ArrayList<Path> usedPaths, DayOfWeek dow) {\r\n\t\tthis.destination = destination;\r\n\t\tthis.origin = origin;\r\n\t\tthis.priority = priority;\r\n\t\tthis.weightPrice = weightPrice;\r\n\t\tthis.volumePrice = volumePrice;\r\n\t\tthis.usedPaths = usedPaths;\r\n\t\tthis.dow = dow;\r\n\t\tthis.isActive = true;\r\n\t\tthis.timesUsed = 0;\r\n\t\tthis.totalCost = 0;\r\n\t\tthis.totalPrice = 0;\r\n//\t\tthis.averageDeliveryTime = averageDeliveryTime;\r\n//\t\tthis.averagePrice = averagePrice;\r\n\t}", "@Local\r\npublic interface RoleFacadeLocal extends GeneralFacadeLocal<Role> {\r\n}", "public TrainAbstract() {\n\t\tthis.id = \"\";\n\t\tthis.departure = new Departure();\n\t\tthis.arrivalTerminus = new ArrivalTerminus();\n\t\tthis.location = new Location(\"\", \"\");\n\t\tthis.stopPoints = new ArrayList<ArrivalStopPoint>();\n\t}", "public Resolution resolve(Constraint localConstraint, LocalNode localModel) throws QueryException {\n // globalize the model\n Node modelNode = globalizeNode(localModel);\n if (!(modelNode instanceof URIReference)) throw new QueryException(\"Unexpected model type in constraint: (\" + modelNode.getClass() + \")\" + modelNode.toString());\n // convert the node to a URIReferenceImpl, which includes the Value interface\n URIReferenceImpl model = makeRefImpl((URIReference)modelNode);\n \n // check if this model is really on a remote server\n URI modelUri = model.getURI();\n testForLocality(modelUri);\n \n Answer ans = getModelSession(modelUri).query(globalizedQuery(localConstraint, model));\n return new AnswerResolution(session, ans, localConstraint);\n }", "@Override\r\n\tpublic void buildRoad() {\n\t\t\r\n\t}", "public interface IAgentController {\n public int getMove(IConnect4 connectN);\n}", "@Local\npublic interface LocalPlayerService extends PlayerService {\n\n}", "public LocalResidenciaColaborador() {\n //ORM\n }", "public interface PlanEndRule {\r\n\tpublic abstract boolean continuePlan(Vector<Interupt> interupt, PlanHelperInterface planHelperInterface);\r\n\r\n\tpublic abstract String getHumanReadableDescription();\r\n}", "public interface OperationalViewTree extends LayeredViewTree {\n\n public static final String UPLOADED_PREFIX = \"(CURR) \";\n\n AbstractLayer switchCurrentLayer(AbstractLayer fromLayer, AbstractLayer toLayer);\n\n boolean hasPrivateSession();\n\n}", "public interface IPathFinderProvider {\n\t\n /**\n * Method for creating a new Maze Path Finder.\n * \n * @param mazeModel to solve\n * @return Used to solve maze\n */\n public IMazePathFinder createInstance(MazeModel mazeModel);\n}", "@Override\n public void onRoutePlanFailed() {\n\n }", "ToUseSolverLpFactory getToUseSolverLpFactory();", "@Override\n public void computeTour(int timeout){\n long startTime = System.currentTimeMillis();\n ArrayList<Address> listAddress = this.planningRequest.getListAddress();\n this.deliveryGraph = new DeliveryGraph(listAddress);\n for(int i=0; i<listAddress.size();i++){\n HashMap<Intersection,Segment> pi = dijkstra(listAddress.get(i));\n deliveryGraph.addVertice(i,pi);\n }\n LinkedList<Path> tourCalculated = deliveryGraph.solveTSP(timeout, true);\n this.timedOutError = deliveryGraph.getTimedOutError();\n tour = new Tour(tourCalculated);\n long totalTime = System.currentTimeMillis() - startTime;\n this.setChanged();\n this.notifyObservers();\n System.out.println(\"Tour computed in \" + totalTime+\" ms with a timeout of \" + timeout + \" ms\");\n }", "private void travelTo(Location destination) \n\t{\n\t\tSystem.out.println(destination.name());\n\t\tif (destination == Location.Home) {\n\t\t\t\n\t\t\tif (role == Role.Attacker) {\n\t\t\t\t\n\t\t\t\tswitch(startingCorner) { \n\t\t\t\t\t/*case 1: travelTo(Location.X4); travelTo(Location.AttackBase); break;\n\t\t\t\t\tcase 2: travelTo(Location.X3); travelTo(Location.AttackBase); break;\n\t\t\t\t\tcase 3: case 4: travelTo(Location.AttackBase);*/\n\t\t\t\tcase 1: travelTo(Location.AttackBase); break;\n\t\t\t\tcase 2: travelTo(Location.AttackBase); break;\n\t\t\t\tcase 3: //travelTo(Location.X2);\n\t\t\t\t\t\ttravelTo(Location.AttackBase); break;\n\t\t\t\tcase 4: //travelTo(Location.X1);\n\t\t\t\t\t\ttravelTo(Location.AttackBase); break;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if (role == Role.Defender) {\n\t\t\t\t\n\t\t\t\tswitch(startingCorner) {\n\t\t\t\t\tcase 1: //travelTo(Location.X4);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 2: //travelTo(Location.X3);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 3: travelTo(Location.DefWay3);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 4: travelTo(Location.DefWay4);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\telse if (destination == Location.BallPlatform)\n\t\t\tnavigator.travelTo(ballPlatform[0], ballPlatform[1]);\n\t\t\t\n\t\telse if (destination == Location.ShootingRegion)\n\t\t\tnavigator.travelTo(CENTER, 7 * 30.0); // we have to account for the case when there is an obstacle in the destination\n\t\t\t// also need to find a way of determining the y coordinate\n\n\t\telse if (destination == Location.AttackBase)\n\t\t\tnavigator.travelTo(ATTACK_BASE[0], ATTACK_BASE[1]); \n\t\t\n\t\telse if (destination == Location.DefenseBase)\n\t\t\tnavigator.travelTo(DEFENSE_BASE[0], DEFENSE_BASE[1]);\n\t\t\n\t\telse if (destination == Location.X1) \n\t\t\tnavigator.travelTo(X[0][0] * 30.0, X[0][1] * 30.0);\n\n\t\telse if (destination == Location.X2)\n\t\t\tnavigator.travelTo(X[1][0] * 30.0, X[1][1] * 30.0);\n\t\t\n\t\telse if (destination == Location.X3) \n\t\t\tnavigator.travelTo(X[2][0] * 30.0, X[2][1] * 30.0);\n\n\t\telse if (destination == Location.X4)\n\t\t\tnavigator.travelTo(X[3][0] * 30.0, X[3][1] * 30.0);\n\t\t\n\t\telse if (destination == Location.DefWay3)\n\t\t\tnavigator.travelTo(240, 240);\n\t\t\n\t\telse if (destination == Location.DefWay4)\n\t\t\tnavigator.travelTo(60, 240);\n\n\t\t\n\t\t// return from method only after navigation is complete\n\t\twhile (navigator.isNavigating())\n\t\t{\n\t\t\tSystem.out.println(\"destX: \" + navigator.destDistance[0] + \"destY: \" + navigator.destDistance[1]);\n\t\t\ttry {\n\t\t\t\tThread.sleep(100);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void notifyParallelRoad(int arg0) {\n\t\t\t\t\t\n\t\t\t\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 }", "@Local\r\npublic interface CiviliteManagerLocal\r\n extends CiviliteManager\r\n{\r\n\r\n\r\n}", "@Local\npublic interface CobranzaServiceLocal {\n\n ResumenInicialVO getCarteraPorTramos(List<Object[]> resultList);\n\n Response obtenerDocumentosSAP(Request request);\n\n Response getCargosSAP(Request request);\n}", "public void adjLocation(double l){this.PlayerLocation;}", "@Local\r\npublic interface ResourceRegistryDAOLocal\r\n extends ResourceRegistryDAO\r\n{\r\n\r\n\r\n}", "public interface LDMServesPlugin extends PrototypeRegistryService {\n\n /**\n * Equivalent to <code>((PlanningFactory) getFactory(\"planning\"))</code>.\n */\n PlanningFactory getFactory();\n\n /** @return the Requested Domain's LDM Factory.\n **/\n Factory getFactory(String domainName);\n\n /** @return the Requested Domain's LDM Factory.\n **/\n Factory getFactory(Class domainClass);\n\n /** @return the classloader to be used for loading classes for the LDM.\n * Domain Plugins should not use this, as they will have been themselves\n * loaded by this ClassLoader. Some infrastructure components which are\n * not loaded in the same way will require this for correct operation.\n **/\n ClassLoader getLDMClassLoader();\n\n /** The current agent's Address */\n MessageAddress getMessageAddress();\n \n UIDServer getUIDServer();\n\n /**\n * If the Delegator is used, this gets the real thing\n **/\n LDMServesPlugin getLDM();\n\n class Delegator implements LDMServesPlugin {\n private LDMServesPlugin ldm;\n Delegator() { }\n\n synchronized void setLDM(LDMServesPlugin ldm) {\n this.ldm = ldm;\n }\n\n public LDMServesPlugin getLDM() {\n return ldm != null ? ldm : this;\n }\n public void addPrototypeProvider(PrototypeProvider prov) {\n ldm.addPrototypeProvider(prov);\n }\n public void addPropertyProvider(PropertyProvider prov) {\n ldm.addPropertyProvider(prov);\n }\n public void addLatePropertyProvider(LatePropertyProvider lpp) {\n ldm.addLatePropertyProvider(lpp);\n }\n public void fillProperties(Asset anAsset) {\n ldm.fillProperties(anAsset);\n }\n public PropertyGroup lateFillPropertyGroup(Asset anAsset, Class pg, long time) {\n return ldm.lateFillPropertyGroup(anAsset, pg, time);\n }\n public int getPrototypeProviderCount() {\n return ldm.getPrototypeProviderCount();\n }\n public int getPropertyProviderCount() {\n return ldm.getPropertyProviderCount();\n }\n public PlanningFactory getFactory() {\n return ldm.getFactory();\n }\n public Factory getFactory(String domainName) {\n return ldm.getFactory(domainName);\n }\n public Factory getFactory(Class domainClass) {\n return ldm.getFactory(domainClass);\n }\n public ClassLoader getLDMClassLoader() {\n return ldm.getLDMClassLoader();\n }\n public MessageAddress getMessageAddress() {\n return ldm.getMessageAddress();\n }\n public UIDServer getUIDServer() {\n return ldm.getUIDServer();\n }\n\n //\n // set up a temporary prototype cache while bootstrapping\n //\n\n private HashMap _pcache;\n private HashMap pc() { /* must be called within synchronized */\n if (_pcache == null) {\n _pcache = new HashMap(13);\n }\n return _pcache;\n }\n\n // called by LDMContextTable to read out any cached prototypes into the real one\n synchronized HashMap flushTemporaryPrototypeCache() {\n HashMap c = _pcache;\n _pcache = null;\n return c;\n }\n\n public synchronized void cachePrototype(String aTypeName, Asset aPrototype) {\n if (ldm != null) {\n ldm.cachePrototype(aTypeName, aPrototype);\n } else {\n pc().put(aTypeName, aPrototype);\n }\n }\n public synchronized boolean isPrototypeCached(String aTypeName) {\n if (ldm != null) {\n return ldm.isPrototypeCached(aTypeName);\n } else {\n return (_pcache==null?false:_pcache.get(aTypeName)!=null);\n }\n }\n public synchronized Asset getPrototype(String aTypeName, Class anAssetClass) {\n if (ldm != null) {\n return ldm.getPrototype(aTypeName, anAssetClass);\n } else {\n return (Asset) (_pcache==null?null:_pcache.get(aTypeName)); /*no hint passed, since we've got no actual providers*/\n }\n }\n public synchronized Asset getPrototype(String aTypeName) {\n if (ldm != null) {\n return ldm.getPrototype(aTypeName);\n } else {\n return (Asset) (_pcache == null?null:_pcache.get(aTypeName));\n } \n }\n public synchronized int getCachedPrototypeCount() {\n if (ldm != null) {\n return ldm.getCachedPrototypeCount();\n } else {\n return (_pcache == null)?0:pc().size();\n }\n }\n }\n}" ]
[ "0.63355786", "0.6106111", "0.5841352", "0.5764596", "0.5684056", "0.5550394", "0.5530467", "0.54612374", "0.54241884", "0.5386421", "0.537393", "0.5362412", "0.5334008", "0.5314108", "0.531287", "0.529556", "0.52841854", "0.5252011", "0.5220166", "0.52182364", "0.52054787", "0.52047235", "0.5202168", "0.52016246", "0.51547277", "0.51508784", "0.5127611", "0.509134", "0.5084358", "0.5075085", "0.506371", "0.5059914", "0.5055671", "0.5050967", "0.50461435", "0.50240326", "0.5016093", "0.50096935", "0.4982744", "0.4982671", "0.49768507", "0.4975322", "0.4973066", "0.4968763", "0.4960675", "0.49465975", "0.49312305", "0.4928458", "0.49195197", "0.49174806", "0.49092838", "0.4909", "0.4908603", "0.4904006", "0.49033004", "0.4903184", "0.49021217", "0.48982823", "0.4896618", "0.48857242", "0.48850995", "0.48845592", "0.48783422", "0.48727852", "0.4871209", "0.48628613", "0.48562205", "0.48483127", "0.4845576", "0.48333952", "0.48285377", "0.48227948", "0.48201567", "0.4816992", "0.4816204", "0.4814048", "0.4813783", "0.48134837", "0.47906348", "0.47890598", "0.4786121", "0.47786638", "0.4777812", "0.47763568", "0.47760084", "0.477481", "0.4771707", "0.47708374", "0.47707307", "0.47698063", "0.47650808", "0.47490823", "0.47466326", "0.47379446", "0.47376913", "0.4737407", "0.47248027", "0.47244304", "0.4721842", "0.47216502" ]
0.587281
2
/Agent me init done
void obstaclesCallback(final GridCells msg){ int num_obst = msg.getCells().size(); me.obstacle_lock_.lock(); try{ me.obstacle_points_.clear(); for (int i = 0; i < num_obst; i++) { PointStamped in=messageFactory.newFromType(PointStamped._TYPE); PointStamped result=messageFactory.newFromType(PointStamped._TYPE); in.setHeader(msg.getHeader()); in.setPoint(msg.getCells().get(i)); //ROS_DEBUG("obstacle at %f %f",msg->cells[i].x,msg->cells[i].y); //TODO:Need Transform /* try { tf_->waitForTransform(global_frame_, robot_base_frame_, msg->header.stamp, ros::Duration(0.2)); tf_->transformPoint(global_frame_, in, result); } catch (tf::TransformException ex){ ROS_ERROR("%s",ex.what()); return; };*/ me.obstacle_points_.add(new Vector2(result.getPoint().getX(),result.getPoint().getY())); } }finally { me.obstacle_lock_.unlock(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initializeAgent() {\n if (Math.random() < PROBABILITY_START_WITH_AGENT) {\n agent = new SugarscapeAgent();\n }\n }", "void initAgents() {\n Runtime rt = Runtime.instance();\n\n //Create a container to host the Default Agent\n Profile p = new ProfileImpl();\n p.setParameter(Profile.MAIN_HOST, \"localhost\");\n //p.setParameter(Profile.MAIN_PORT, \"10098\");\n p.setParameter(Profile.GUI, \"false\");\n ContainerController cc = rt.createMainContainer(p);\n\n HashMap<Integer, String> neighbors = new HashMap <Integer, String>();\n neighbors.put(1, \"2, 4, 3\");\n neighbors.put(2, \"1, 3\");\n neighbors.put(3, \"1, 2, 4\");\n neighbors.put(4, \"1, 3, 5\");\n neighbors.put(5, \"4\");\n\n//Create a container to host the Default Agent\n try {\n for (int i = 1; i <= MainController.numberOfAgents; i++) {\n AgentController agent = cc.createNewAgent(Integer.toString(i), \"ru.spbu.mas.DefaultAgent\",\n new Object[]{neighbors.get(i)});\n agent.start();\n }\n } catch (StaleProxyException e) {\n e.printStackTrace();\n }\n }", "public void autonomousInit() {\n \n }", "public void initialize() {\n\n getStartUp();\n }", "public void autonomousInit() {\n\t\t\n\t}", "void initialize (ZyniAgent agent, Object ... args);", "protected void setup() {\n\t\tSystem.out.println(\"Messenger agent \"+getAID().getName()+\" is ready.\");\r\n\t\tagentList = new ArrayList();\r\n\t\trefreshActiveAgents();\r\n\r\n\t\tmessageGUI = new MessageAgentGui(this);\r\n\t\tmessageGUI.displayGUI();\r\n\r\n\t\tDFAgentDescription dfd = new DFAgentDescription();\r\n\t\tdfd.setName(getAID());\r\n\t\tServiceDescription sd = new ServiceDescription();\r\n\t\tsd.setType(\"messenger-agent\");\r\n\t\tsd.setName(getLocalName()+\"-Messenger agent\");\r\n\t\tdfd.addServices(sd);\r\n\t\ttry {\r\n\t\t\tDFService.register(this, dfd);\r\n\t\t}\r\n\t\tcatch (FIPAException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n\t\taddBehaviour(new ReceiveMessage());\r\n\t}", "public void autonomousInit() {\n }", "public void autonomousInit() {\n }", "protected void setup(){\n\n\t\tsuper.setup();\n\n\t\tfinal Object[] args = getArguments();\n\t\tif(args!=null && args[0]!=null && args[1]!=null){\n\t\t\tdeployAgent((Environment) args[0],(EntityType)args[1]);\n\t\t}else{\n\t\t\tSystem.err.println(\"Malfunction during parameter's loading of agent\"+ this.getClass().getName());\n System.exit(-1);\n }\n\t\t\n\t\t//############ PARAMS ##########\n\n\t\tthis.nbmodifsmin \t\t= 30;\t\t\t//nb modifs minimum pour renvoyer la carte\n\t\tthis.timeOut \t\t\t= 1000 * 4;\t\t//secondes pour timeout des messages (*1000 car il faut en ms)\n\t\tthis.sleepbetweenmove \t= 200;\t\t\t//in MS\n\t\tthis.nbmoverandom\t\t= 4;\t\t\t// nb random moves by default\n\t\t\n\t\t//#############################\n\t\t//setup graph\n\t\t//setupgraph();\n\t\tthis.graph = new SingleGraph(\"graphAgent\");\n\t\tinitMyGraph();\n\t\tthis.step = 0;\n\t\tthis.stepMap = new HashMap<String, Integer>();\n\t\tthis.path = new ArrayList<String>();\n\t\tthis.mailbox = new Messages(this);\n\t\tthis.lastMsg = null;\n\t\tthis.switchPath = true;\n\t\tthis.lastsender = null;\n\t\tthis.lastSentMap = new HashMap<String, Integer>(); //nbmodifs\n\t\tthis.remakepath = false; // changes to true if the map changed in a way that requires a new path\n\t\tthis.nbmoverandomoriginal = this.nbmoverandom;\n\t\t\n\t\tthis.toSendMap = new HashMap<String, Graph>(); //actual hashmap graph\n\t\t\n\t\tSystem.out.println(\"the agent \"+this.getLocalName()+ \" is started\");\n\t}", "@Override\n public void init() {\n runtime.reset();\n robot.init(hardwareMap);\n\n telemetry.addData(\"Status\", \"Initialized\");\n }", "protected void setup(){\n this.setEnabledO2ACommunication(true, 0);\n \n showMessage(\"Agent (\" + getLocalName() + \") .... [OK]\");\n \n // Register the agent to the DF\n ServiceDescription sd1 = new ServiceDescription();\n sd1.setType(UtilsAgents.BOAT_COORDINATOR);\n sd1.setName(getLocalName());\n sd1.setOwnership(UtilsAgents.OWNER);\n DFAgentDescription dfd = new DFAgentDescription();\n dfd.addServices(sd1);\n dfd.setName(getAID());\n try {\n DFService.register(this, dfd);\n showMessage(\"Registered to the DF\");\n }catch (FIPAException e) {\n System.err.println(getLocalName() + \" registration with DF \" + \"unsucceeded. Reason: \" + e.getMessage());\n doDelete();\n }\n \n //Search for the CentralAgent\n ServiceDescription searchBoatCoordCriteria = new ServiceDescription();\n searchBoatCoordCriteria.setType(UtilsAgents.COORDINATOR_AGENT);\n this.coordinatorAgent = UtilsAgents.searchAgent(this, searchBoatCoordCriteria);\n\n // Register response behaviours\n //TODO canviar i posar l'altra content\n MessageTemplate mt = MessageTemplate.MatchContent(\"Movement request\");\n this.addBehaviour(new RequestResponseBehaviour(this,mt ));\n }", "@Override\n public void runInit() {\n }", "private void initialize() {\n\t\t\n\t}", "protected void initialize() {\n \tSystem.out.println(\"HoldGear STARTING!!\");\n }", "private void init() {\n\n\t}", "private void setupAgents() {\r\n try {\r\n setupJade();\r\n //createAgent(Bank.class, \"Bank\");\r\n createAgent(ProductionAgent.class, \"Res1\");\r\n createAgent(ProductionAgent.class, \"Res2\");\r\n createAgent(SocialAgent.class, \"Soc\");\r\n createAgent(ClientAgent.class, \"Client\");\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace(System.err);\r\n }\r\n }", "@Override\n public void init() {\n robot.init(hardwareMap);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Status\", \"Initialized\"); //\n }", "private void initialize() {\n\t}", "public void init() {\r\n\r\n\t}", "public void init() {\n log.info(\"initialization\");\n }", "private void init() {\n\n\n\n }", "private void init() {\n }", "protected void initialize() {\n\t\tRobot.firstAutonomousCommandDone = true;\n\t}", "@Override\n protected void setup() {\n // exception handling for invoke the main2();\n try {\n main2();\n } catch (StaleProxyException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n // create central agent of the application\n try {\n AgentController Main = main1.createNewAgent(\"Main\",\"test.Main\",null);\n Main.start();\n } catch (StaleProxyException e) {\n e.printStackTrace();\n }\n try {\n showResualt();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "protected void initialize() {\n \tSystem.out.println(\"initialize ReturnToStart\");\n \tRobot.claw.goRetract();\n \tRobot.claw.goUp();\n \tRobot.claw.goOpen();\n \tRobot.claw.spinStop();\n }", "@Override\n public void init() {\n robot.init(hardwareMap);\n telemetry.addData(\"Status\", \"Initialized\");\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void initialize() {\n }", "@Override\n public void init() {\n swerveDebug(500, \"SwerveAutoTEST::init\", \"STARTing init for TETS\");\n\n // Run initialization of other parts of the class\n // Note that the class will connect to all of our motors and servos\n super.init();\n\n crater = Boolean.TRUE;\n\n\n // Robot and autonomous settings are read in from files in the core class init()\n // Report the autonomous settings\n showAutonomousGoals();\n\n swerveLog( \"X S6\", ourSwerve.getOrientLog());\n\n swerveDebug(500, \"SwerveAutoTEST::init\", \"DONE\");\n }", "public void init() {\n\t\t\n\t}", "@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}", "protected void setup() {\n /**\n * Content manager manages the content languages and ontologies \"known\" by a given agent.\n * We register new languages that is required that our agent knows.\n * SLCodec is the codec class for the FIPA-SLn languages.\n * MobilityOntology is the class that represents the ontology used for JADE mobility.\n */\n getContentManager().registerLanguage(new SLCodec());\n getContentManager().registerOntology(MobilityOntology.getInstance());\n\n /**\n * Create containers. ProfileImpl allows us to set boot-parameters for the new containers.\n */\n homeContainer = getContainerController(); //retrieve the containercontroller that this agent lives in\n createdContainers = new AgentContainer[3]; //we require 3 containers for this scenario\n ProfileImpl curatorContainer1 = new ProfileImpl();\n curatorContainer1.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-1\");\n ProfileImpl curatorContainer2 = new ProfileImpl();\n curatorContainer2.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-2\");\n ProfileImpl artistManagerContainer = new ProfileImpl();\n artistManagerContainer.setParameter(ProfileImpl.CONTAINER_NAME, \"Artistmanager-Container\");\n createdContainers[0] = runtime.createAgentContainer(curatorContainer1);\n createdContainers[1] = runtime.createAgentContainer(curatorContainer2);\n createdContainers[2] = runtime.createAgentContainer(artistManagerContainer);\n doWait(2000); //wait while containers initializes\n\n /**\n * Request a list of all containers on the platform from AMS\n */\n getAllContainers();\n\n /**\n * Initialize gui\n */\n\n myGui = new ControllerAgentGUI(this, (String[]) containersOnPlatform.keySet().toArray(new String[containersOnPlatform.keySet().size()]));\n myGui.setVisible(true);\n }", "public void init(){\n System.out.println(\"调用init\");\n }", "public void init() {}", "public void init() {}", "@Override\n public void autonomousInit() {\n \n }", "@Override\n public void autonomousInit() {\n }", "@Override\n public void autonomousInit() {\n }", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "private void init() {\n // see if a serialized FilterAgent exists\n try {\n FilterAgent tmpFilterAgent = FilterAgent.restoreFromFile(FilterAgent.fileName);\n if (tmpFilterAgent != null) filterAgent = tmpFilterAgent;\n } catch (Exception e) {\n // no error, just catch the exception and use default/new agent\n }\n filterAgent.infoFilter = this;\n filterAgent.addCIAgentEventListener(this); // for trace msgs\n\n newsReaderAgent.addCIAgentEventListener(this);\n newsReaderAgent.initialize(); // intialize it\n newsReaderAgent.startAgentProcessing(); // start it running\n uRLReaderAgent.addCIAgentEventListener(this);\n uRLReaderAgent.initialize(); // initialize it\n uRLReaderAgent.startAgentProcessing(); // start it running\n filterAgent.initialize(); // initialize it\n filterAgent.startAgentProcessing(); // start the Filter agent thread\n openFileDialog = new java.awt.FileDialog(this);\n openFileDialog.setMode(FileDialog.LOAD);\n openFileDialog.setTitle(\"Open\");\n saveFileDialog = new java.awt.FileDialog(this);\n saveFileDialog.setMode(FileDialog.SAVE);\n saveFileDialog.setTitle(\"Save\");\n }", "public void init() {\n\r\n\t}", "public void init() {\n\r\n\t}", "public void initialize() {\r\n }", "public void init() {\n\t\n\t}", "@Override\n\tpublic void autonomousInit() {\n\t}", "@Override\n\tpublic void onInit(RobotAPI arg0) {\n\n\t}", "public void initialize() {\n\t}", "public void initialize() {\n\t}", "@Override\n protected void initialize() {\n Robot.collector.open();\n }", "@Override\r\n\tprotected void setup() {\n\t\tlog=LogManager.getLogger();\r\n\t\tmyAgent.addGoal(new SendMsgGoal());\r\n//\t\tlog.info(\"Send message goal is added\");\r\n\t\t\r\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "protected void initialize() {\r\n\r\n Robot.pneumatics.pneuOpen();\r\n }", "@Override\r\n public void init() {\r\n /* Initialize the hardware variables.\r\n * The init() method of the hardware class does all the work here\r\n */\r\n robot.init(hardwareMap);\r\n\r\n // Send telemetry message to signify robot waiting;\r\n telemetry.addData(\"Status\", \"Initialized\");\r\n }", "public static void init() {\n\t\t\n\t}", "@Override\n public void robotInit() {\n }", "@Override\n public void robotInit() {\n }", "@Override\n public void robotInit() {\n }", "public void teleopInit() {\n // Initalize test command\n Jagbot.isAutonomous = false;\n MessageWindow.write(1, \"Robot init\");\n //testCommand = new TestCommand();\n //testCommand.start();\n }", "@Override\r\n\tprotected void processInit() {\n\r\n\t}", "protected void initialize() {\n\t\tRobot.conveyor.Forward();\n\n\t}", "public void init()\n {\n _appContext = SubAppContext.createOMM(System.out);\n _serviceName = CommandLine.variable(\"serviceName\");\n initGUI();\n }", "protected void init()\n {\n Timestamp now = new Timestamp(System.currentTimeMillis());\n timestampCreated = now;\n timestampModified = now;\n createdByAgent = AppContextMgr.getInstance() == null? null : (AppContextMgr.getInstance().hasContext() ? Agent.getUserAgent() : null);\n modifiedByAgent = null;\n }", "public void robotInit() {\n\n }", "public void robotInit() {\n\n }", "@Override public void init() {\n drive = MecanumDrive.standard(hardwareMap); // Comment this line if you, for some reason, don't need to use the drive motors\n\n // Uncomment the next three lines if you need to use the gyroscope\n // gyro = IMUGyro.standard(hardwareMap);\n // gyro.initialize();\n // gyro.calibrate();\n\n // Uncomment the next two lines if you need to use the vision system\n // vision = new Vision(hardwareMap);\n // vision.init();\n\n // Uncomment the next line if you have a servo\n // myServo = hardwareMap.get(Servo.class, \"myServo\");\n\n /** Place any code that should run when INIT is pressed here. **/\n }", "public void robotInit() {\n\t\toi = new OI();\n\t\t\n\t\tteleopCommand = new TeleopCommand();\n }", "public void init() {\n\t\t}", "public void robotInit() {\r\n CommandBase.init();\r\n OI.init();\r\n System.out.println(\"ROBOT READY!\");\r\n }", "protected void init() {\n try {\n updateDevice();\n } catch (Exception e) {\n RemoteHomeManager.log.error(42,e);\n }\n }", "public void robotInit()\n\t{\n\t\toi = new OI();\n\t\t// instantiate the command used for the autonomous period\n\t\t// autonomousCommand = new Driver();\n\t}", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void initialize() {\n }", "public void autonomousInit() {\n \tNetworkCommAssembly.start();\n }", "@Override\n\tpublic void init() {\n\t\t// Nothing to do in this example\n\t}", "public void init()\n {\n }", "public void init() { }", "public void init() { }", "public void robotInit() {\n\t\toi = new OI();\n // instantiate the command used for the autonomous period\n }", "@Override\n protected void startUp() {\n }", "public void teleopInit() {\n \n }", "protected void initialize() {\n\t\t\n\t}", "protected void initialize() {\n\t\t\n\t}", "public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }", "public void initialize() {\n }", "public void initialize () {\n }", "public void init()\n\t{\n\t\tsuper.init();\n\t\tM_log.info(\"init()\");\n\t}", "public void init()\n\t{\n\t\tsuper.init();\n\t\tM_log.info(\"init()\");\n\t}", "protected void initialize()\n\t{\n\t}", "public void initialize () {\n\n }", "public void init() {\n\n }" ]
[ "0.71205336", "0.7089769", "0.7074905", "0.70477265", "0.70402914", "0.70295167", "0.6983386", "0.69419914", "0.69419914", "0.6914221", "0.6880964", "0.6878168", "0.6862062", "0.6845311", "0.68235284", "0.6817102", "0.6807053", "0.6798561", "0.6790989", "0.678171", "0.6778045", "0.677207", "0.675273", "0.67482626", "0.67363286", "0.67328864", "0.6730544", "0.6729285", "0.6729285", "0.6729285", "0.6729285", "0.6727197", "0.6725127", "0.6713418", "0.67086846", "0.66840744", "0.66801274", "0.66782594", "0.66782594", "0.6672028", "0.6667856", "0.6667856", "0.665692", "0.665692", "0.665692", "0.66567135", "0.66558796", "0.66558796", "0.66543454", "0.6645169", "0.663281", "0.6622561", "0.6622142", "0.6622142", "0.6614082", "0.66077155", "0.66043085", "0.66043085", "0.66043085", "0.66040355", "0.65999544", "0.65932626", "0.65895283", "0.65895283", "0.65895283", "0.65819114", "0.6578838", "0.65781057", "0.65733534", "0.65710884", "0.656746", "0.656746", "0.6566688", "0.6560984", "0.65580004", "0.65575963", "0.65429974", "0.65366566", "0.65193003", "0.65193003", "0.65193003", "0.65193003", "0.65133107", "0.6508021", "0.6507747", "0.65024203", "0.64986694", "0.64986694", "0.6488232", "0.6484529", "0.6484042", "0.6482822", "0.6482822", "0.64821845", "0.64734465", "0.6471587", "0.6469106", "0.6469106", "0.6468079", "0.6463794", "0.6463157" ]
0.0
-1
implement interface for computeVelocityCommands
boolean computeVelocityCommands(Twist cmd_vel){ if(!initialized_){ this.node.getLog().error("This planner has not been initialized, please call initialize() before using this planner"); return false; } //TODO: Transform /* PoseStamped global_pose; Header hdr=messageFactory.newFromType(Header._TYPE); hdr.setStamp(this.node.getCurrentTime()); hdr.setFrameId(robot_base_frame_); global_pose.setHeader(hdr); Pose pose=messageFactory.newFromType(Pose._TYPE); Point p=messageFactory.newFromType(Point._TYPE); Quaternion q=messageFactory.newFromType(Quaternion._TYPE); p.setX(0.0);p.setY(0.0);p.setZ(0.0); pose.setPosition(p); q.setX(0.0);q.setY(0.0);q.setZ(0.0);q.setW(1); pose.setOrientation(q); global_pose.setPose(pose); tf_.getTree().lookupTransformBetween();*/ // Set current velocities from odometry Twist global_vel=messageFactory.newFromType(Twist._TYPE); me.me_lock_.lock(); try{ linear.setX(me.base_odom_.getTwist().getTwist().getLinear().getX()); linear.setY(me.base_odom_.getTwist().getTwist().getLinear().getY()); angular.setZ(me.base_odom_.getTwist().getTwist().getAngular().getY()); global_vel.setLinear(linear); global_vel.setAngular(angular); }finally { me.me_lock_.unlock(); } //TODO: Transform //WARNNING not transformed /* tf::Stamped<tf::Pose> robot_vel; robot_vel.setData(tf::Transform(tf::createQuaternionFromYaw(global_vel.angular.z), tf::Vector3(global_vel.linear.x, global_vel.linear.y, 0))); robot_vel.frame_id_ = robot_base_frame_; robot_vel.stamp_ = ros::Time();*/ PoseStamped robot_vel=messageFactory.newFromType(PoseStamped._TYPE); /* //WARNNING not transformed tf::Stamped<tf::Pose> goal_point; tf::poseStampedMsgToTF(global_plan_.back(), goal_point);*/ PoseStamped goal_point=messageFactory.newFromType(PoseStamped._TYPE); //we assume the global goal is the last point in the global plan //WARNNING not transformed goal_point=global_plan_.get(global_plan_.size()-1); double goal_x = goal_point.getPose().getPosition().getX(); double goal_y = goal_point.getPose().getPosition().getY(); double yaw = LPutils.getYaw(goal_point.getPose().getOrientation()); double goal_th = yaw; //TODO:get position in global frame of the robot //WARNNING not transformed /* tf::Stamped<tf::Pose> global_pose; //let's get the pose of the robot in the frame of the plan global_pose.setIdentity(); global_pose.frame_id_ = robot_base_frame_; global_pose.stamp_ = ros::Time(); tf_->transformPose(global_frame_, global_pose, global_pose);*/ PoseStamped global_pose=messageFactory.newFromType(PoseStamped._TYPE); //check to see if we've reached the goal position if (xy_tolerance_latch_ || (LPutils.getGoalPositionDistance(global_pose.getPose(), goal_x, goal_y) <= xy_goal_tolerance_)) { //if(base_local_planner::goalPositionReached(global_pose, goal_x, goal_y, xy_goal_tolerance_) || xy_tolerance_latch_){ //if the user wants to latch goal tolerance, if we ever reach the goal location, we'll //just rotate in place if(latch_xy_goal_tolerance_) xy_tolerance_latch_ = true; //check to see if the goal orientation has been reached double angle = LPutils.getGoalOrientationAngleDifference(global_pose.getPose(), goal_th); //check to see if the goal orientation has been reached if (Math.abs(angle) <= yaw_goal_tolerance_) { //set the velocity command to zero linear.setX(0.0); linear.setY(0.0); linear.setZ(0.0); cmd_vel.setLinear(linear); angular.setZ(0.0); cmd_vel.setAngular(angular); rotating_to_goal_ = false; xy_tolerance_latch_ = false; } else { //copy over the odometry information Odometry base_odom=messageFactory.newFromType(Odometry._TYPE); me.me_lock_.lock(); try{ base_odom=me.getBaseOdom(); }finally { me.me_lock_.unlock(); } //if we're not stopped yet... we want to stop... taking into account the acceleration limits of the robot if(!rotating_to_goal_ && !LPutils.stopped(base_odom, rot_stopped_velocity_, trans_stopped_velocity_)){ //ROS_DEBUG("Not stopped yet. base_odom: x=%6.4f,y=%6.4f,z=%6.4f", base_odom.twist.twist.linear.x,base_odom.twist.twist.linear.y,base_odom.twist.twist.angular.z); if(!stopWithAccLimits(global_pose, robot_vel, cmd_vel)) return false; } //if we're stopped... then we want to rotate to goal else{ //set this so that we know its OK to be moving rotating_to_goal_ = true; if(!rotateToGoal(global_pose, robot_vel, goal_th, cmd_vel)) return false; } } //publish an empty plan because we've reached our goal position transformed_plan_.clear(); LPutils.publishPlan(transformed_plan_, g_plan_pub_); LPutils.publishPlan(transformed_plan_, l_plan_pub_); //we don't actually want to run the controller when we're just rotating to goal return true; } //TODO:transform /* tf::Stamped<tf::Pose> target_pose; target_pose.setIdentity(); target_pose.frame_id_ = robot_base_frame_;*/ PoseStamped target_pose=messageFactory.newFromType(PoseStamped._TYPE); if (!skip_next_){ if(!transformGlobalPlan(tf_, global_plan_, costmap_ros_, global_frame_, transformed_plan_)){ this.node.getLog().warn("Could not transform the global plan to the frame of the controller"); return false; } PoseStamped target_pose_msg=messageFactory.newFromType(PoseStamped._TYPE); findBestWaypoint(target_pose_msg, global_pose); } //TODO /*tf::poseStampedMsgToTF(transformed_plan_[current_waypoint_], target_pose);*/ Twist res=messageFactory.newFromType(Twist._TYPE); linear.setX(target_pose.getPose().getPosition().getX() - global_pose.getPose().getPosition().getX()); linear.setY(target_pose.getPose().getPosition().getY() - global_pose.getPose().getPosition().getY()); res.setLinear(linear); angular.setZ(Angles.shortest_angular_distance(LPutils.getYaw(global_pose.getPose().getOrientation()), Math.atan2(res.getLinear().getY(), res.getLinear().getX()))); res.setAngular(angular); Vector2 goal_dir = new Vector2(res.getLinear().getX(),res.getLinear().getY()); if (Vector2.abs(goal_dir) > me.max_vel_x_) { goal_dir = Vector2.mul(Vector2.normalize(goal_dir),me.max_vel_x_); } else if (Vector2.abs(goal_dir) < me.min_vel_x_) { goal_dir =Vector2.mul(Vector2.normalize(goal_dir), me.min_vel_x_ * 1.2); } Vector2 pref_vel = new Vector2(goal_dir.getX(),goal_dir.getY()); //TODO collvoid added me.computeNewVelocity(pref_vel, cmd_vel); if(Math.abs(cmd_vel.getAngular().getZ())<me.min_vel_th_) angular.setZ(0.0); if(Math.abs(cmd_vel.getLinear().getX())<me.min_vel_x_) linear.setX(0.0); if(Math.abs(cmd_vel.getLinear().getY())<me.min_vel_y_) linear.setY(0.0); cmd_vel.setLinear(linear); cmd_vel.setAngular(angular); boolean valid_cmd = true; //collision_planner_.checkTrajectory(cmd_vel.linear.x, cmd_vel.linear.y, cmd_vel.angular.z,true); if (!valid_cmd){ angular.setZ(0.0); linear.setX(0.0); linear.setY(0.0); cmd_vel.setLinear(linear); cmd_vel.setAngular(angular); } if (cmd_vel.getLinear().getX() == 0.0 && cmd_vel.getAngular().getZ() == 0.0 && cmd_vel.getLinear().getY() == 0.0) { this.node.getLog().debug("Did not find a good vel, calculated best holonomic velocity was:" + me.velocity.getX()+", "+me.velocity.getY()+", cur wp "+current_waypoint_+" of "+transformed_plan_.size()+" trying next waypoint"); if (current_waypoint_ < transformed_plan_.size()-1){ current_waypoint_++; skip_next_= true; } else { transformed_plan_.clear(); LPutils.publishPlan(transformed_plan_, g_plan_pub_); LPutils.publishPlan(transformed_plan_, l_plan_pub_); return false; } } else { skip_next_ = false; } List<PoseStamped> local_plan=new ArrayList<PoseStamped>(); PoseStamped pos=messageFactory.newFromType(PoseStamped._TYPE); //TODO //tf::poseStampedTFToMsg(global_pose,pos); pos.setPose(global_pose.getPose()); pos.setHeader(global_pose.getHeader()); local_plan.add(pos); local_plan.add(transformed_plan_.get(current_waypoint_)); LPutils.publishPlan(transformed_plan_, g_plan_pub_); LPutils.publishPlan(local_plan, l_plan_pub_); //me_->publishOrcaLines(); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void calcVelocity()\n\t{}", "protected void computeTranslationVelocityCommand() { // (Solution)\n\t\tdouble translationError = targetRange - desiredFixationDistance; // (Solution)\n\t\tif (Math.abs(translationError) < translationErrorTolerance) // (Solution)\n\t\t\ttranslationVelocityCommand = 0.0; // (Solution)\n\t\telse\n\t\t\t// (Solution)\n\t\t\ttranslationVelocityCommand = // (Solution)\n\t\t\tMath.max(-translationVelocityMax, // (Solution)\n\t\t\t\t\tMath.min(translationVelocityMax, // (Solution)\n\t\t\t\t\t\t\ttranslationError * translationVelocityGain)); // (Solution)\n\t}", "@Override\n\tpublic double calculateVelocity() {\n\t\tdouble result = distance / time + velocitySame - velocityReverse;\n\t\treturn result;\n\t}", "public interface VelocityListener {\n\n /**\n * Called when a new velocity value (in mm/s) has been computed.\n *\n * @param velocityValue The new velocity value that has been computed.\n */\n void addVelocityValue(int velocityValue);\n}", "private void updateVelocity() {\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateX() > MAX_SPEED_X) {\n\t \t\tsetvX(MAX_SPEED_X);\n\t \t} else if (getNode().getTranslateX() < -MAX_SPEED_X) {\n\t \t\tsetvX(-MAX_SPEED_X);\n\t } else {\n\t \t\tsetvX(getNode().getTranslateX());\n\t \t}\n\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateY() > MAX_SPEED_Y) {\n\t \t\tsetvY(MAX_SPEED_Y);\n\t \t} else if (getNode().getTranslateY() < -MAX_SPEED_Y) {\n\t \t\tsetvY(-MAX_SPEED_Y);\n\t \t} else {\n\t \t\tsetvY(getNode().getTranslateY());\n\t \t}\n\t }", "@Override\n protected void execute() {\n \n //get velocity from SmartDashboard\n double m_sideVelocity = SmartDashboard.getNumber(\"Side Velocity\", 0);\n double m_beltVelocity = SmartDashboard.getNumber(\"Belt velocity\", 0);\n // if velocity coefficients on SmartDashboard have changed, write new values to controller\n \n Robot.CD7.setSideMotor(m_sideVelocity);\n Robot.CD7.setBeltMotor(m_beltVelocity);\n }", "public Vector2D getVelocity ();", "public Velocity getVelocity() {\n return this.v;\n\n }", "public VelocityEngine getVelocityEngine();", "public static void initVelocity() {\n }", "public org.bukkit.util.Vector getVelocity ( ) {\n\t\treturn invokeSafe ( \"getVelocity\" );\n\t}", "private void calculateVelocity() {\n\t\tthis.velocity = Math.sqrt((this.roughRange *this.roughRange * this.gravity_Math)\n\t\t\t\t/ ((this.roughRange * Math.sin(2 * angle)) + (2\n\t\t\t\t\t\t* Constant.heroBaseHeight * Math.cos(angle) * Math\n\t\t\t\t\t\t\t.cos(angle))));\n\t\t\n\t}", "private void doVels() {\n\t\tthis.launchPerVel = Math.sqrt((2d * body.getGm() * this.launchApoAlt) / (this.launchPerAlt * this.a));\n\t\tthis.launchApoVel = Math.sqrt((2d * body.getGm() * this.launchPerAlt) / (this.launchApoAlt * this.a));\n\t}", "public void configVelocityControl() {\n leftDrive.configTeleopVelocity();\n rightDrive.configTeleopVelocity();\n }", "@Basic @Raw\n public double[] getVelocity(){\n \t return this.velocity.getVelocity();\n }", "static int getVelocity(){return currentVelocity;}", "public Velocity getVelocity() {\n return this.velocity;\n }", "@Override\n public Point3D getValue() {\n return velocity;\n }", "List<Velocity> initialBallVelocities();", "public double getVelocity() {\n return mV;\n }", "@Override\n\tprotected void execute() {\n\t\t// Code for finding max velocity of a given motor\n\t\t// var currentVel = kDrive.getLeftVelocity();\n\t\t// if (currentVel > maxVelocity) {\n\t\t// maxVelocity = currentVel;\n\t\t// System.out.println(maxVelocity);\n\t\t// }\n\n\t\t// Joystick configuration\n\t\tvar throttle = -OI.joy.getY();\n\t\tvar curve = OI.joy.getX() * 0.85;\n\n\t\tdrivetrain.vbusArcade(throttle, curve);\n\n\t\tdrivetrain.sendDebugInfo();\n\t}", "public Velocity getVelocity() {\r\n return this.v.getVelocity();\r\n }", "public double getCommandSpeed();", "private double getVelocity() {\n \tif (currentState == DriveState.accelerating) {\n \t\treturn acceleration * timer.get();\n \t}\n \telse if (currentState == DriveState.cruisung) {\n \t\treturn maxVelocity;\n \t}\n \telse if (currentState == DriveState.decelerating) {\n \t\treturn maxVelocity - acceleration * (timer.get());\n \t}\n \t\t\n \treturn 0;\n }", "public Velocity getVelocity() {\r\n return this.vel;\r\n }", "private void UpdateVelocity()\n\t{\n\t\tVector2 currentPosition = new Vector2(parent.transform.position);\n\t\tVector2 newVelocity = Vector2.Add(currentPosition,previousPosition.negate());\n\t\tpreviousPosition = currentPosition;\n\t\t\n\t\tfloat currentRotation = parent.transform.rotation;\n\t\tangularVelocity = currentRotation - previousRotation;\n\t\tpreviousRotation = currentRotation;\n\t\t\n\t\tvelocity = newVelocity;\n\t}", "public void updateVelocity(){\r\n if (getPosition().x <= 0 || getPosition().x >= GameBoard.MAX_X) {\r\n setVelocity(getVelocity().add(getVelocity().mul(reverse)));\r\n }\r\n }", "public Vector2D getVelocity()\n\t{\n\t\treturn velocity;\n\t}", "@Override\n public double getVelocity()\n {\n final String funcName = \"getVelocity\";\n double velocity = encoder.getVelocity() * encoderSign / 60.0;\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", velocity);\n }\n\n return velocity;\n }", "public void addVelocity(double var1, double var3, double var5)\n {}", "public Point2D.Float getVelocity() {\r\n\t\treturn velocity;\r\n\t}", "private static void updateComponents(PhysicsGameObject obj, Vector3 position, Velocity velocity, Vector3 acceleration,double dt){\n float newX = (float) (position.x +(dt * velocity.Vx) + (dt*acceleration.x * dt / 2));\n float newY = (float) (position.y + (dt * velocity.Vy) + ( dt*acceleration.y * dt / 2));\n\n //v(t+h) = v(t) + h*a\n float newVelX = (float) (velocity.Vx + dt * acceleration.x );\n float newVelY = (float) (velocity.Vy + dt * acceleration.y );\n\n obj.setPositionX(newX);\n obj.setPositionY(newY);\n\n obj.setVelocityComponents(newVelX, newVelY);\n\n\n }", "@Override\n public void receivedVelocity(Twist velocity) {\n synchronized(_velocityListeners) {\n if (_velocityListeners.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_VELOCITY.str);\n UdpConstants.writeTwist(resp.stream, velocity);\n \n // Send to all listeners\n synchronized(_velocityListeners) {\n _udpServer.bcast(resp, _velocityListeners.keySet());\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to serialize camera\");\n }\n }", "org.auvua.utils.protobuffer.AUVprotocol.AUVCommand.Movement getSpeed();", "protected void execute() {\n \n \t\n \t \n \t\n \n System.out.println((Timer.getFPGATimestamp()- starttime ) + \",\" + (RobotMap.motorLeftTwo.getEncPosition()) + \",\"\n + (RobotMap.motorLeftTwo.getEncVelocity()*600)/-4096 + \",\" + RobotMap.motorRightTwo.getEncPosition() + \",\" + (RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n /*if(endpoint > 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft+ angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight - angleorientation.getResult());\n }\n if(endpoint <= 0){\n cruiseVelocityLeft = (float) (this.initCruiseVelocityLeft- angleorientation.getResult());\n cruiseVelocityRight = (float) (this.initCruiseVelocityRight + angleorientation.getResult());\n }*/\n System.out.println(this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition() + \"l\");\n System.out.println(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition() + \"r\");\n \n \n \t if(RobotMap.motorLeftTwo.getEncVelocity()!= velocityLeft)\n velocityLeft = RobotMap.motorLeftTwo.getEncVelocity(); \n velocityRight = RobotMap.motorRightTwo.getEncVelocity();\n SmartDashboard.putNumber(\"LeftWheelError\", (this.motionMagicEndPoint*4096 + RobotMap.motorLeftTwo.getEncPosition()));\n SmartDashboard.putNumber(\"RightWheelError\",(this.motionMagicEndPoint*4096 - RobotMap.motorRightTwo.getEncPosition()));\n SmartDashboard.putNumber(\"LeftWheelVelocity\", (RobotMap.motorLeftTwo.getEncVelocity())*600/4096);\n SmartDashboard.putNumber(\"RightWheelVelocity\",(RobotMap.motorRightTwo.getEncVelocity()*600)/4096);\n \n \n count++;\n \tangleorientation.updatePID(RobotMap.navx.getAngle());\n }", "public Vector2f getVelocity(){\n\t\treturn velocity.copy();\n\t}", "public void clearVelocity();", "private void configVelocityControl() {\n //config remote sensors\n //sets the sensor to be a quad encoder, sets our feedback device to be that sensor\n m_masterMotor.configSelectedFeedbackSensor(TalonSRXFeedbackDevice.CTRE_MagEncoder_Relative, RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //zero the encoders on every init\n zeroEncoder();\n\n //sets whether our motor is inverted\n //this is currently false but can be switched based on testing\n m_masterMotor.setInverted(RobotMap.LAUNCHER_MASTER_INVERTED);\n m_masterMotor.setSensorPhase(RobotMap.LAUNCHER_MASTER_INVERTED);\n\n //this sets how often we pull data from our sensor\n m_masterMotor.setStatusFramePeriod(StatusFrame.Status_2_Feedback0, RobotMap.LAUNCHER_FEEDBACK_PERIOD_MS, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //this configs the deadband for the PID output. Any output with an absolute value less than this will be treated as zero\n m_masterMotor.configNeutralDeadband(0, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //this sets the peak output for our motor controller.\n m_masterMotor.configPeakOutputForward(RobotMap.LAUNCHER_PID_PEAK_OUTPUT, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n //this does the same thing but for the reverse direction\n m_masterMotor.configPeakOutputReverse(0, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n \n //sets the period of the velocity sample\n //effectively this defines the amount of time used to calculate the velocity\n m_masterMotor.configVelocityMeasurementPeriod(RobotMap.VELOCITY_MEASUREMENT_PERIOD, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //Sets the number of samples used in the rolling average for calculating velocity\n m_masterMotor.configVelocityMeasurementWindow(RobotMap.LAUNCHER_VELOCITY_MEASUREMENT_WINDOW, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n \n //set p, i, d, f values\n //the zero is the PID slot, in this case it is zero for the primary PID\n //the launcher has no auxillary or turning PID control\n m_masterMotor.config_kP(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_P);\n m_masterMotor.config_kI(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_I);\n m_masterMotor.config_kD(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_D);\n m_masterMotor.config_kF(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_F);\n\n //this sets the acceptable amount of Integral error, where if the absolute accumulated error exceeds this ammount, it resets to zero\n //this is designed to prevent the PID from going crazy if we move too far from our target\n m_masterMotor.config_IntegralZone(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_I_ZONE, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //sets the max output of the motor specifically within closed loop control\n m_masterMotor.configClosedLoopPeakOutput(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_PID_PEAK_OUTPUT, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //this configures an allowable error in closed loop control\n //any error less than this is treated as zero.\n m_masterMotor.configAllowableClosedloopError(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_ACCEPTABLE_ERROR, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //configures the period for closed loop calculations in MS \n //should be increased if the can bus is haveing issues\n m_masterMotor.configClosedLoopPeriod(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_CLOSED_LOOP_PERIOD_MS, RobotMap.LAUNCHER_CONFIG_TIMEOUT_MS);\n\n //configures ramp speed\n m_masterMotor.configOpenloopRamp(RobotMap.LAUNCHER_OPEN_LOOP_RAMP_TIME_S);\n m_masterMotor.configClosedloopRamp(0);\n\n //sets our closed loop control to use our primary PID slot\n m_masterMotor.selectProfileSlot(RobotMap.PID_PRIMARY_SLOT, 0);\n }", "protected void execute() {\r\n timespan = date.getTime() - lastTime;\r\n allaxes = accelerometer.GetAcceleration();\r\n velocityX = velocityX + allaxes.XAxis * timespan;\r\n velocityY = velocityY + allaxes.YAxis * timespan;\r\n theDash.log(velocityX,\"X\");\r\n }", "public void applyVelocityChange(final Vector2f velocityChange);", "public double getVelocity() {\n \treturn this.currentSpeed;\n }", "@Override\n public void execute() {\n\n DifferentialDriveWheelPowers powers = mBasicDrive.drive(mThrottle.getAsDouble(), mTurn.getAsDouble(), mTrim.getAsDouble());\n\n DifferentialDriveWheelSpeeds speeds = new DifferentialDriveWheelSpeeds(\n powers.getLeft() * Constants.Drive.kFeedforward.maxAchievableVelocity(Constants.Robot.kMinBatteryVoltage, 0.0),\n powers.getRight() * Constants.Drive.kFeedforward.maxAchievableVelocity(Constants.Robot.kMinBatteryVoltage, 0.0));\n\n mDriveSubsystem.setVelocity(speeds, mDeadband);\n }", "public double getVelocity() {\n\t\treturn velocity.getlength();\n\t}", "public void update(Vehicle v, float dt) {\nPoint2D.Float p = v.getPosition();\r\nPoint2D.Float tp = target.getPosition();\r\nPoint2D.Float desired_velocity = new Point2D.Float(tp.x - p.x , tp.y - p.y);\r\nVehicle.scale(desired_velocity, v.getMaxSpeed());\r\nv.updateSteering(desired_velocity.x, desired_velocity.y);\r\n}", "public interface ChromosomeVelocityAdderIntf {\r\n /**\r\n * the operator that specifies how a velocity object is to be added to a\r\n * \"chromosome\" object representing a position in the solution space.\r\n * @param chromosome Object\r\n * @param velocity Object\r\n * @param params HashMap\r\n * @throws OptimizerException\r\n * @return Object\r\n */\r\n public Object addVelocity2Chromosome(Object chromosome, Object velocity, HashMap params) throws OptimizerException;\r\n}", "public void setVelocity(Velocity v) {\n this.velocity = v;\n }", "public void setVelocity(Velocity v) {\n this.velocity = v;\n }", "public void setVelocity(Velocity v) {\n this.velocity = v;\n }", "public float getCurrVelocity() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e3 in method: android.widget.OppoScroller.getCurrVelocity():float, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.widget.OppoScroller.getCurrVelocity():float\");\n }", "public VelocityComponent(Point3D velocity) {\n this.velocity = velocity;\n }", "public float getVerticalVelocity( )\r\n {\r\n return this.v_velocity;\r\n }", "private static double calculateVelocity(double velocity, double deltaT, double acceleration) {\n return velocity + (deltaT * acceleration);\n }", "@Override\n public void execute() {\n double forwardSpeed;\n double rotationSpeed;\n\n // Vision-alignment mode\n // Query the latest result from PhotonVision\n double target = RobotContainer.m_Drive.Get_tv();\n\n if (target != 0.0f) {\n // First calculate range\n double range =\n PhotonUtils.calculateDistanceToTargetMeters(\n CAMERA_HEIGHT_METERS,\n TARGET_HEIGHT_METERS,\n CAMERA_PITCH_RADIANS,\n Units.degreesToRadians(RobotContainer.m_Drive.Get_ty()));\n SmartDashboard.putNumber(\"range\", range);\n // Use this range as the measurement we give to the PID controller.\n // -1.0 required to ensure positive PID controller effort _increases_ range\n if(RobotContainer.m_Drive.Get_ty()<-1){\n forwardSpeed = 1.0 * forwardController.calculate(range, GOAL_RANGE_METERS);;\n }\n else if(RobotContainer.m_Drive.Get_ty() > 1){\n forwardSpeed = -1.0 * forwardController.calculate(range, GOAL_RANGE_METERS);\n }\n else{\n forwardSpeed = 0;\n }\n\n\n // Also calculate angular power\n // -1.0 required to ensure positive PID controller effort _increases_ yaw\n rotationSpeed = -1.0 * turnController.calculate(RobotContainer.m_Drive.Get_tx(), 0);\n } else {\n // If we have no targets, stay still.\n forwardSpeed = 0;\n rotationSpeed = 0;\n } \n // Use our forward/turn speeds to control the drivetrain\n Robot.hardware.m_diffDrive.arcadeDrive(forwardSpeed,rotationSpeed);\n }", "public final Vector2D getVelocity() {\n return velocity;\n }", "protected void execute() {\n \tint POV_value = Robot.m_oi.operator.getPOV();\n \tboolean input = true; \n \t//SmartDashboard.putNumber(\"POV Value\", POV_value);\n\t\tSmartDashboard.putNumber(\"Col Speed\", Robot.ss_Collector.getOutSpeed());\n \tswitch (POV_value){\n \tcase 0:\n \t\tthis.speed = .60;\n \t\tbreak;\n \tcase 45:\n \t\tthis.speed = .50;\n \t\tbreak;\n \tcase 90:\n \t\tthis.speed = .40; \n \t\tbreak;\n \tcase 135:\n \t\tthis.speed = .30;\n \t\tbreak;\n \tcase 180:\n \t\tthis.speed = .20;\n \t\tbreak;\n \tcase 270:\n \t\tthis.speed = .80;\n \t\tbreak;\n \tcase 315: \n \t\tthis.speed = .70;\n \t\tbreak;\n \tdefault:\n \t\tinput = false; \n \t\tbreak;\n \t}\n \t\n \tif (!running && input) {\n\t \trunning = true;\n \t\tthis.c_Drive = new C_CollectorDrive(false, -1, speed);\n \t\tc_Drive.start();\n \t}\n \t\n \telse if (running && !input) {\n \t\trunning = false;\n \t\tthis.c_Drive.cancel();\n \t}\n }", "@Override\n\tpublic double calculateVelocity(Parrot parrot) {\n\t\treturn (parrot.getisNailed()) ? 0 : parrot.getBaseSpeed(parrot.getVoltage());\n\t}", "@Override\r\n protected void execute() {\r\n // get deltaT in seconds for the controller\r\n double now = System.currentTimeMillis();\r\n double elapsed = (now - mPreviousTime) / 1000.0 ; \r\n mPreviousTime = now; \r\n \r\n // get inputs to the two PIDs\r\n double dist = Robot.visionSubSys.getDistFt() ;\r\n double bearing = Robot.visionSubSys.getBearingDegCW() ;\r\n double orient = Robot.drivetrain.getOrientDegCCW() ; \r\n \r\n // update and get control output from the two PIDs\r\n double distControl = mDistController.update(dist, bearing, elapsed) ;\r\n double bearingControl = mBearingController.update(dist, bearing, orient, elapsed);\r\n // combine them\r\n double left = (distControl+bearingControl) ; // / 2.0 ;\r\n double right = (distControl-bearingControl) ; // / 2.0 ;\r\n \r\n // command the drivetrain\r\n Robot.drivetrain.tankDrive(left, right);\r\n }", "org.auvua.utils.protobuffer.AUVprotocol.AUVCommand.MovementOrBuilder getSpeedOrBuilder();", "public double getCurrentVelocity( )\r\n {\r\n return Math.sqrt( this.h_velocity * this.h_velocity + this.v_velocity * this.v_velocity );\r\n }", "protected void execute() {\n \tdouble currentPulses;\n \tdouble currentHeading = Robot.pixy.getCubeCenter();\n \tdouble headingCorrection = pixyCorrection.calculateCorrection(140, currentHeading);\n \tdouble currentDistance = Robot.sonar.getDistance();\n \tdouble powerCorrection = sonarCorrection.calculateCorrection(distance, currentDistance);\n \tif (headingCorrection > .25) {\n \t\theadingCorrection = .25;\n \t}\n \tif(powerCorrection > .25) {\n \t\tpowerCorrection = .25;\n \t}\n \tdouble power = basePower + powerCorrection;\n \tif (Robot.pixy.getCubeCenter() < 150) {\n \t\tleftPower = (power - headingCorrection);\n \t\trightPower = (power + headingCorrection);\n \t}\n \telse if (Robot.pixy.getCubeCenter() > 130) {\n \t\tleftPower = (power + headingCorrection);\n \t\trightPower = (power - headingCorrection);\n \t}\n \telse {\n \t\tleftPower = power;\n \t\trightPower = power;\n \t}\n \tRobot.drive.tankMove(leftPower, rightPower);\n \t\n \tcurrentPulses = Robot.drive.getPulsesLeft();\n \tencoderValue = currentPulses - VectorValues.lastEncoderPulses;\n \tVectorValues.lastEncoderPulses = currentPulses;\n \tVectorValues.vectorComponentX += (Math.sin(Robot.drive.getCurrentHeading() * (Math.PI / 180 )) * encoderValue);\n \tVectorValues.vectorComponentY += (Math.cos(Robot.drive.getCurrentHeading() * (Math.PI / 180 )) * encoderValue);\n }", "static void resetVelocity(){currentVelocity = INITIAL_SPEED;}", "@Override\n\tpublic void update()\n\t{\n\t\tsuper.update();\n\n\t\tcalcAcceleration();\n\t\tsetVelocity(Vector2D.add(getVelocity(), getAcceleration()));\n\n\t\tcalcVelocity();\n\t\tsetPosition(Vector2D.add(getPosition(), getVelocity()));\n\n\t\tbm.update(getPosition(), getWidth(), getHeight());\n\t}", "protected void execute() {\r\n\t//double leftSpeed = oi.leftUpAndDown();\r\n\tdouble leftSpeed = motorScalerLeft.scale(oi.leftUpAndDown() * fullSpeed);\r\n\tSmartDashboard.putNumber(\"debug\\\\leftSpeed\", leftSpeed);\r\n\t\r\n\t//double rightSpeed = oi.rightUpAndDown();\r\n\tdouble rightSpeed = motorScalerRight.scale(oi.rightUpAndDown() * fullSpeed);\r\n\tSmartDashboard.putNumber(\"debug\\\\rightSpeed\", rightSpeed);\r\n\t\r\n\ttheDrive.goVariable(-leftSpeed,-rightSpeed);\r\n }", "public void setVelocity(Velocity velocity) {\n this.v = velocity;\n }", "public void setVelocity () {\n\t\t\tfb5.getCommunicationModule().setClientHandler(null);\n\t\t\tif(state == BotMove.SHARP_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)0);\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT){\n\t\t\t\tfb5.setVelocity((byte)100,(byte)200);\n\t\t\t}\n\t\t\telse if(state == BotMove.SOFT_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)100);\n\t\t\t}\n\t\t\telse if(state == BotMove.FORWARD){\n\t\t\t\twt.turning = false;\n\t\t\t\tLog.d(TAG,\"Setting forward velocity\");\n\t\t\t\tfb5.setVelocity((byte)150,(byte)150);\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(state == BotMove.STOP){\n\t\t\t\twt.turning = false;\n\t\t\t\tfb5.setVelocity((byte)0,(byte)0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfb5.moveForward();\n\t\t\tfb5.accModifiedStart();\n\t\t}", "private static void updateComponents(PhysicsGameObject obj, Vector3 position, Velocity velocity, Vector2 acceleration,double dt){\n\n integral(obj, dt);\n\n }", "void setVelocity(int vel) {\n\t\tthis.velocity = vel;\n\t}", "public Point2D.Float getVelocityPPT() {\n return velocityPPT;\n }", "@Override\n public void execute() {\n\n\n /* container.swerveControllerCommand =\n new SwerveControllerCommand(\n trajectory,\n drivetrain::getCurrentPose, \n DrivetrainConstants.DRIVE_KINEMATICS,\n\n // Position controllers\n new PIDController(DrivetrainConstants.P_X_Controller, 0, 0),\n new PIDController(DrivetrainConstants.P_Y_Controller, 0, 0),\n container.thetaController,\n drivetrain::setModuleStates, //Not sure about setModuleStates\n drivetrain);*/\n\n// Reset odometry to the starting pose of the trajectory.\ndrivetrain.resetOdometry(trajectory.getInitialPose());\n\n\n}", "double getVy() { return vel[1]; }", "public abstract double executeCommand(ArrayList<Unit> units);", "public void updateVelocity() {\n \t// Step 1: input power and convert the power to a force based on the starting velocity\n \tsetWeight();\n \tdouble trainMass = trainWeight*KG_PER_POUND;\n \t\n \t// this is ensuring that we never get a negative speed\n \tif (this.currentSpeed == 0) {\n \t\tthis.force = (this.powerIn)/1;\n \t} else {\n \t\tthis.force = (this.powerIn)/this.currentSpeed;\n \t}\n \tsetGrade();\n \t\n \t// Step 2: Calculate the slope of the train's current angle (Degrees = Tan-1 (Slope Percent/100))\n \tthis.slope = Math.atan2(this.grade,100);\n \tdouble angle = Math.toDegrees(this.slope);\n \t\n \t// Step 3: Calculate the forces acting on the train using the coefficient of friction\n \t// and the train's weight in lbs converted to kg divided over the wheels (where the force is technically\n \t// being applied times gravity (G)\n \tthis.normalForce = (trainMass/this.trainWheels) * G * Math.sin((angle*Math.PI)/180);\t// divide by 12 for the number of wheels\n \tthis.downwardForce = (trainMass/this.trainWheels) * G * Math.cos((angle*Math.PI)/180);\t// divide by 12 for the number of wheels\n\n \t// compute friction force\n \tthis.friction = (FRICTION_COEFFICIENT * this.downwardForce) + this.normalForce;\n \t\n \t// sum of the forces\n \tthis.totalForce = this.force - this.friction;\n \t \t\n \tthis.force = this.totalForce;\n \t\n \t// Step 4: Calculate acceleration using the F = ma equation, where m = the mass of the body moving\n \tthis.trainAcceleration = this.force/trainMass;\n \t\n \t// and have to check to make sure this acceleration does not exceed our max.\n \tif (this.trainAcceleration >= TRAIN_MAX_ACCELERATION * 1) {\t// time elapsed (one second)\n \t\t// set the acceleration as the max acceleration because we cannot exceed that\n \t\tthis.trainAcceleration = TRAIN_MAX_ACCELERATION * 1;\t// time elapsed (one second)\n \t}\n \t\n\t\temerBrake = this.getEBrake();\n \t// decelerates the train based on the values given in the spec sheet for the emergency brake\n \tif (emerBrake) {\n \t\tthis.trainAcceleration += (TRAIN_MAX_ACCELERATION_E_BRAKE*1);\n \t}\n \t\n \t// decelerates the train based onthe values given in the spec sheet for the service brake\n \tif(serviceBrake) {\n \t\tthis.trainAcceleration += (TRAIN_MAX_ACCELERATION_SERVICE_BRAKE*1);\n \t}\n \t\n \t// Step 5: Calculate the final speed by adding the old speed with the acceleration x the time elapsed (one second)\n \tthis.finalSpeed = this.currentSpeed + (this.trainAcceleration * 1);\n \t\n \t// NO NEGATIVE SPEEDS YINZ\n \tif(this.finalSpeed < 0) {\n this.finalSpeed = 0;\n }\n \t\n \t// resetting the current speed based on our calculations\n \tthis.currentSpeed = this.finalSpeed;\n \tthis.distTravelled = this.currentSpeed * 1; // speed times the time between clock ticks = distance travelled\n \t//System.out.println(finalSpeed);\n \t\n \tif(!(currentBlock == this.position.getCurrentBlock())) {\n \t\tmetersIn = 0;\n \t} else {\n \t\tmetersIn += this.distTravelled;\n \t}\n \tthis.position.moveTrain(this.distTravelled); // method call to tell the position class how far to move the train\n \t\n }", "@Override\n\tpublic double getSelectedSensorVelocity() {\n return encoder.getVelocity();\n\t}", "public TrackingParameterVelocityVector(TrackingParameterDistance distance,\n\t\t\tTrackingParameterTime time) {\n\t\tsuper(\"Velocity Vector\", distance.getUnit() + \"/\" + time.getUnit());\n\t\tscaleDistance = distance.getScale();\n\t\tscaleTime = time.getScale();\n\t}", "void addVelocityValue(int velocityValue);", "@Bean\n public VelocityEngine velocityEngine() {\n return VelocityFactory.getEngine();\n }", "public static void main(String[] args) {\r\n\r\n ArrayList<Point> points = new ArrayList<>();\r\n for (int i = 0; i<10; i++){\r\n points.add(new Point(Math.random()*i, i));\r\n }\r\n\r\n Spline spline = new BSpline(points);\r\n\r\n VelocitiesAdapter vs = new VelocitiesAdapter(spline, 15, 0.5);\r\n System.out.println(vs.getNumPoints());\r\n\r\n // Print velocities:\r\n for (int i : vs.iterate()){\r\n double[] ves = vs.velocity(i, 50);\r\n System.out.println(\"Right speed: \" + ves[0]);\r\n System.out.println(\"Left speed: \" + ves[1] + \"\\n\");\r\n }\r\n\r\n }", "public float getMotor_lin_target_velocity() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 128);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 120);\n\t\t}\n\t}", "@Override\n protected void execute() {\n m_currentTime = Timer.getFPGATimestamp();\n// used for more precise calculations\n m_currentError = m_desiredDistance - Robot.m_drive.Position();\n// ^^ tells how much further the Robot goes\n m_derivative = (m_currentError - m_oldError) / (m_currentTime - m_oldTime);\n// ^^ PID formula stuff. The change of error / change of time to be more precise\n m_output = m_currentError * constants.kP + constants.kD * m_derivative;\n// tells how much power the motor will change\n Robot.m_drive.SetPower(m_output);\n// changes motor power\n\n m_oldError = m_currentError;\n// how error distance updates so it won't repeat old mistake\n m_oldTime = m_currentTime;\n// same as line above\n }", "public double getVelocity()\n {\n return velocity * FPS;\n }", "@Override\n public void execute() {\n if(reversed) {\n driveSubsystem.setSpeed(-max_speed, -max_speed);\n }\n driveSubsystem.setSpeed(max_speed, max_speed);\n }", "public Commands(){\n this.power = 0;\n this.direction = 0;\n this.started = false;\n this.runTime = new ElapsedTime();\n this.timeGoal = 0;\n }", "protected void execute() {\n \t\n \tdouble angleDifference;\n \t\n \tif (useTargetAngle) {\n \t\tangleDifference = Math.abs(Gyroscope.simplifyAngle(Robot.gyroscope.getGlobalRotation()) - Gyroscope.simplifyAngle(targetAngle));\n \t}\n \telse {\n \t\tangleDifference = Math.abs(Robot.gyroscope.getRotation());\n \t}\n \t\n \tif (angleDifference > ROTATION_THRESHOLD) {\n \t\tif (Robot.gyroscope.getRotation() > 0) {\n \t\t\tadjustPercentRight = ROTATION_PERCENT;\n \t\t\tadjustPercentLeft = 1;\n \t\t}\n \t\telse {\n \t\t\tadjustPercentRight = 1;\n \t\t\tadjustPercentLeft = ROTATION_PERCENT;\n \t\t}\n \t}\n \t\n \trightEncoderPID.setSetpoint(getVelocity() * adjustPercentRight);\n \tleftEncoderPID.setSetpoint(getVelocity() * adjustPercentLeft);\n \t\n \t//print out debug data to smartdash\n \tSmartDashboard.putNumber(\"Left Encoder Vel:\", Robot.drive.leftEncoder.getRate());\n \tSmartDashboard.putNumber(\"Right Encoder Vel\", Robot.drive.rightEncoder.getRate());\n \t\n \tSmartDashboard.putNumber(\"Left Encoder Dist\", Robot.drive.leftEncoder.getDistance());\n \tSmartDashboard.putNumber(\"Right Encoder Dist\", Robot.drive.leftEncoder.getDistance());\n \t\n \tupdateState();\n \t\n \t//keep at low speed if decelerating period is up\n \tif (currentState == DriveState.decelerating && (timer.get() > tAccelerating)) {\n \trightEncoderPID.setSetpoint(FINAL_ADJUST_SPEED);\n \tleftEncoderPID.setSetpoint(FINAL_ADJUST_SPEED);\n \t}\n }", "protected void executeVmCommand() {\n }", "double getVx() { return vel[0]; }", "public void calculateVelocity(Planet3D other) {\n\t\tVec3d temp = new Vec3d(other);\n\t\ttemp.sub(this);\n\t\tSystem.out.println(\"\\n[other]-[this]=[new dir] == [\"+other.x+\",\"+other.y+\",\"+other.z+\"]-[\"+this.x+\",\"+this.y+\",\"+this.z+\"]=[\"+temp.x+\",\"+temp.y+\",\"+temp.z+\"]\");\n\t\tdouble force=forceCalc(other.getMass(), temp.length());\n\t\ttemp.normalize();\n//\t\tSystem.out.println(\", and direction between is this:(\"+temp.x+\",\"+temp.y+\",\"+temp.z+\"),\\nthe other planet has a mass of \"+other.getMass());\n//\t\tSystem.out.println(\"the force added to the vector is:\"+(Math.abs(force)));\n\t\ttemp.mul(force);\t\n\t\tvelocity.sub(temp);\n\t\t\t\n\t}", "public void update() {\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n position.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n }", "public void update() {\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n position.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n }", "public ModifyVirtualMachine(){\r\n\t\t super(COMMAND);\r\n\t}", "protected void execute() {\n double rightSpeed, leftSpeed, x, y;\n //Set x and y to their axis values\n x = driver.getRawAxis(InputConstants.rightXAxis);\n y = driver.getRawAxis(InputConstants.leftYAxis);\n //Drive Smoothing\n\n //Set the left and rightspeed using x and y\n leftSpeed = y - x;\n rightSpeed = y + x;\n \n\n //Set the left and right side of the drive\n driveTrain.setLeftVBus(-leftSpeed);\n driveTrain.setRightVBus(-rightSpeed);\n\n\n\n }", "double getVz() { return vel[2]; }", "@Override\n\tprotected void execute() {\n\t\tdouble speed = Robot.oi.getSpeed();\n\t\tdouble turn = Robot.oi.getTurn();\n\t\tdouble leftSpeed;\n\t\tdouble rightSpeed;\n\n\t\tif (Robot.oi.getGyroReset()) {\n\t\t\tRobot.chassisSubsystem.resetGyroHeading();\n\t\t}\n\n\t\tif (Robot.oi.getGyroCalibrate()) {\n\t\t\tRobot.chassisSubsystem.calibrateGyro();\n\t\t}\n\n\t\t/**\n\t\t * If the chassisSubsystem says that we should be in high gear, switch\n\t\t * to high gear, otherwise, switch to low gear.\n\t\t */\n\t\tif (Robot.oi.getGearShiftButton() >= 0.5) {\n\t\t\tRobot.chassisSubsystem.setGear(Gear.HIGH);\n\t\t} else {\n\t\t\tRobot.chassisSubsystem.setGear(Gear.LOW);\n\t\t}\n\n\t\t\n\n\t\t/**\n\t\t * If the user is not turning, then follow the gyro using the GoStraight\n\t\t * command.\n\t\t */\n\t\t/*\n\t\t * if (Math.abs(turn) < 0.03) { Scheduler.getInstance().add(new\n\t\t * GoStraightCommand(Robot.chassisSubsystem.getCurrentAngle())); return;\n\t\t * }\n\t\t */\n\n\t\t/*\n\t\t * double defaultValue = 0; Robot.chassisSubsystem.resetGyroHeading();\n\t\t * double angle = Robot.oi.table.getNumber(\"angle\", defaultValue);\n\t\t * System.out.println(angle);\n\t\t * \n\t\t * if(Robot.oi.getAlignShotButton()) { Scheduler.getInstance().add(new\n\t\t * PivotToAngleCommand(angle)); return; }\n\t\t */\n\n\n\t\tdouble targetCenterX = 0;\n\t\tif (Robot.oi.getAutoAlignShotButton() && targetCenterX != RobotMap.NO_VISION_TARGET) {\n\t\t\tScheduler.getInstance().add(new AlignAndShootHighShotCommand(MatchPeriod.TELEOP));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (Robot.oi.getManualAlignShotButton()) {\n\t\t\tScheduler.getInstance().add(new AlignAndShootHighShotCommand(MatchPeriod.TELEOP));\n\t\t\treturn;\n\t\t}\n\n\t\t// Use the driver input to set the speed and direction.\n\t\tif (Math.abs(speed) < 0.03) {\n\t\t\tleftSpeed = turn / 2.0;\n\t\t\trightSpeed = -turn / 2.0;\n\t\t} else {\n\t\t\tleftSpeed = (turn < 0.0) ? speed * (1.0 + turn) : speed;\n\t\t\trightSpeed = (turn < 0.0) ? speed : speed * (1.0 - turn);\n\t\t}\n\n\t\tRobot.chassisSubsystem.setSpeed(leftSpeed, rightSpeed);\n\t}", "static float calculateNewVelocity(float a, float deltaTime, float v0) {\n return v0 + (a * deltaTime);\n }", "protected void execute() {\n\n\t\tspeed = oi.getLeftY();\n\n\t\tleftTicks = drive.getLeftRotation();\n\t\trightTicks = drive.getRightRotation();\n\n\t\t/*\n\t\t * if (startAngle == drive.getAngle()) { drive.setBoth(oi.getLeftY()); }\n\t\t * else if (startAngle < drive.getAngle()) { if (oi.getLeftY() > 0)\n\t\t * drive.setBoth(oi.getLeftY(), .9 * oi.getLeftY()); else drive.setBoth(\n\t\t * .9 * oi.getLeftY(),oi.getLeftY()); } else if (startAngle >\n\t\t * drive.getAngle()) { if (oi.getLeftY() > 0)\n\t\t * drive.setBoth(oi.getLeftY(), .9 * oi.getLeftY()); else\n\t\t * drive.setBoth(.9 * oi.getLeftY(), oi.getLeftY()); }\n\t\t */\n\t\tif (leftTicks == 0 || rightTicks == 0)\n\t\t\tdrive.setBoth(speed);\n\t\telse\n\t\t\tdrive.setBoth(MathUtil.setLimits((rightTicks / leftTicks) * speed, -1.0, 1.0),\n\t\t\t\t\tMathUtil.setLimits((leftTicks / rightTicks) * speed, -1.0, 1.0));\n\n\t}", "@Bean\n\tpublic VelocityEngine velocityEngine() {\n\t\treturn VelocityFactory.getEngine();\n\t}", "private void move() {\n acceleration.accelerate(velocity, position);\r\n }", "double getMotorVelocity( MotorName m ) {\n double vol = 0.0;\n if( motor_read_mode_==MotorBulkReadMode.BULK_READ_MANUAL && loop_cnt_!=last_motor_read_loop_id_ ) {\n // Important Step 4: If you are using MANUAL mode, you must clear the BulkCache once per control cycle\n for( LynxModule module : all_hubs_ ) {\n module.clearBulkCache();\n }\n }\n switch ( m ) {\n case MOTOR_LF:\n vol = motorLF_.getVelocity();\n break;\n case MOTOR_LB:\n vol = motorLB_.getVelocity();\n break;\n case MOTOR_RF:\n vol = motorRF_.getVelocity();\n break;\n case MOTOR_RB:\n vol = motorRB_.getVelocity();\n break;\n case MOTOR_LEFT_INTAKE:\n vol = motor_left_intake_.getVelocity();\n break;\n case MOTOR_RIGHT_INTAKE:\n vol = motor_right_intake_.getVelocity();\n break;\n case MOTOR_LIFT:\n vol = motor_lift_.getVelocity();\n break;\n default:\n break;\n }\n last_motor_read_loop_id_ = loop_cnt_ ;\n return vol;\n }", "public void setVelocity(Velocity v) {\r\n this.vel = v;\r\n }", "@Override\n protected void execute() {\n System.out.println(\"Elevator PID Loop:\");\n System.out.println(\"\\t - Current Position: \" + Robot.m_elevator.getEncoder().getPosition());\n \n SmartDashboard.putNumber(\"elevator/pos\", Robot.m_elevator.getEncoder().getPosition());\n // SmartDashboard.putNumber(\"elevator/target\", pos);\n //SmartDashboard.putNumber(\"elevator/error\", Math.abs(Robot.m_elevator.getEncoder().getPosition() - pos));\n // System.out.println(\"\\t - Error: \" + Robot.m)\n }", "@Override\r\n protected void execute() {\n driveSubsystem.setSpeed(speed, speed);\r\n }" ]
[ "0.75742996", "0.7247601", "0.6780516", "0.6680402", "0.6672668", "0.66551787", "0.6571946", "0.6542546", "0.645724", "0.6426518", "0.6413007", "0.6401355", "0.6388059", "0.6316587", "0.6309413", "0.6307609", "0.6295838", "0.6294157", "0.6216603", "0.62059695", "0.6180942", "0.615825", "0.6145769", "0.61179185", "0.6078345", "0.6072334", "0.60548294", "0.6046437", "0.604193", "0.59873354", "0.59816766", "0.5971339", "0.594795", "0.5939615", "0.59395933", "0.59249455", "0.59228444", "0.5919196", "0.5906329", "0.5904296", "0.5897362", "0.5896485", "0.58864355", "0.58629274", "0.58555734", "0.58459145", "0.58459145", "0.58459145", "0.5830649", "0.5810143", "0.58010554", "0.57927233", "0.5782069", "0.57748693", "0.5772182", "0.5767056", "0.57610434", "0.5754609", "0.57383406", "0.573634", "0.5732547", "0.57170314", "0.5705455", "0.5698018", "0.56862915", "0.5680899", "0.5678443", "0.56778246", "0.5667533", "0.56594545", "0.56477755", "0.5646312", "0.56450164", "0.56448996", "0.5638763", "0.5629725", "0.56251097", "0.5624059", "0.5609448", "0.5608204", "0.5595522", "0.55880404", "0.5583172", "0.5576387", "0.5564985", "0.5558004", "0.55439913", "0.55439913", "0.552963", "0.5523833", "0.5523179", "0.5522877", "0.55207205", "0.5512345", "0.5511181", "0.55103165", "0.549513", "0.5490548", "0.5485167", "0.54814625" ]
0.7270333
1
slow down with the maximum possible acceleration... we should really use the frequency that we're running at to determine what is feasible but we'll use a tenth of a second to be consistent with the implementation of the local planner.
boolean stopWithAccLimits(PoseStamped global_pose, final PoseStamped robot_vel, Twist cmd_vel){ double vx = sign(robot_vel.getPose().getPosition().getX()) * Math.max(0.0, (Math.abs(robot_vel.getPose().getPosition().getX()) - me.acc_lim_x_ * me.simPeriod)); double vy = sign(robot_vel.getPose().getPosition().getY()) * Math.max(0.0, (Math.abs(robot_vel.getPose().getPosition().getY()) - me.acc_lim_y_ * me.simPeriod)); double vel_yaw = LPutils.getYaw(robot_vel.getPose().getOrientation()); double vth = sign(vel_yaw) * Math.max(0.0, (Math.abs(vel_yaw) - me.acc_lim_th_ * me.simPeriod)); //we do want to check whether or not the command is valid????????????? boolean valid_cmd = true; //collision_planner_.checkTrajectory(vx, vy, vth, true); //if we have a valid command, we'll pass it on, otherwise we'll command all zeros if(valid_cmd){ //ROS_DEBUG("Slowing down... using vx, vy, vth: %.2f, %.2f, %.2f", vx, vy, vth); linear.setX(vx); linear.setY(vy); cmd_vel.setLinear(linear); angular.setZ(vth); cmd_vel.setAngular(angular); return true; } linear.setX(0.0); linear.setY(0.0); linear.setZ(0.0); cmd_vel.setLinear(linear); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void speedup(){\n\t\tif(bossair.periodairinit > Framework.nanosecond){\n\t\t\t\tbossair.periodair-=Framework.nanosecond/18; \n\t\t\t\tbossair.xmoving-=0.03; \n\t\t}\n\t\t\t\n\t}", "public void faster() {\n myTimer.setDelay((int) (myTimer.getDelay() * SPEED_FACTOR));\n }", "public void faster()\n {\n if(speed < 9){\n speed += 1;\n }\n }", "@Override\n void slowDown() {\n if (this.speed>0){\n this.speed=this.speed-1;\n }\n }", "void speedUp(int a);", "@Override\n protected void accelerate() {\n System.out.println(\"Bike Specific Acceleration\");\n }", "void max_speed (double min_lift, double max_drag, boolean update_info) {\n velocity = kts_to_speed(20);\n find_aoa_of_min_drag();\n double pitch_of_min_drag = craft_pitch;\n trace(\"pitch_of_min_drag: \" + pitch_of_min_drag);\n\n // step 2. with current (lowest drag) pitch, iterate speed up\n // until drag exceeds max_drag.\n double speed = (total_drag() > max_drag) || foil_lift() > min_lift\n ? kts_to_speed(5) // pretty arbitrary...\n : velocity;\n\n for (; speed < v_max; speed += 1) { \n velocity = speed;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (total_drag() > max_drag) \n break;\n }\n\n trace(\"velocity after step2: \" + velocity);\n\n // // at min drag angle can not produce enough lift? unsolvable.\n // if (foil_lift() < min_lift) {\n // trace(\"can not solve 'fild max speed' task for given inputs.\\nincrease drag input or decrease lift input\");\n // return;\n // }\n\n // step 3. pitch_of_min_drag correction for too much lift...\n if (foil_lift() > min_lift) {\n // unsustainable, needs less pitch & speed...\n // reduce min_pitch until lift is OK\n while(pitch_of_min_drag > aoa_min) {\n pitch_of_min_drag -= 0.05;\n craft_pitch = pitch_of_min_drag;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (foil_lift() <= min_lift)\n break;\n }\n trace(\"corrected pitch_of_min_drag: \" + pitch_of_min_drag);\n }\n\n // step 4. from this speed, iterate speed down\n for (speed = velocity; speed >= 0; speed -= 1) {\n trace(\"speed: \" + speed);\n double lift = 0;\n double drag = 0;\n double pitch = pitch_of_min_drag;\n velocity = speed;\n set_mast_aoa_for_given_drag(max_drag);\n for (; pitch < aoa_max; pitch += 0.1) {\n craft_pitch = pitch;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n lift = foil_lift();\n drag = total_drag();\n if (drag >= max_drag) {\n // stop increasing pitch, won't work. \n //likely need less speed\n trace(\"too much drag, break. speed: \" + speed + \" pitch: \" + pitch);\n break;\n }\n if (lift >= min_lift) {\n trace(\"done \");\n if (update_info) {\n make_max_speed_info(min_lift, max_drag, velocity);\n System.out.println(\"\\nDone!\\n----------------\\n\" + max_speed_info);\n }\n return;\n } \n }\n // here pitch is at max. what about lift?\n if (pitch >= aoa_max && lift < min_lift) {\n trace(\"oops, can not be solved.\\nincrease drag limit or decrease lift threshold!\");\n return;\n }\n }\n }", "private void decelerate()\n {\n accelX -= accelerationRate;\n if(accelX < 0)\n {\n resetAccelX();\n }\n }", "public float maxSpeed();", "private void accelerate()\n {\n if(accelX < maxAccelRate)\n {\n accelX += accelerationRate;\n }\n }", "double find_min_takeoff_v_old_algorithm_aux (double min_lift, double max_drag, double speed, double speed_step, double pitch_init, double pitch_step) {\n double pitch = pitch_init;\n double pitch_limit = aoa_max*0.7;\n {\n trace(\"speed_step: \" + speed_step + \" pitch_step: \" + pitch_step);\n for (; speed < v_max; speed += speed_step) {\n velocity = speed;\n // if the startimg pitch guess when at this point was too high, \n // drag will be too big at this point; then reduce pitch\n while (pitch > aoa_min/2) {\n craft_pitch = pitch;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (total_drag() >= max_drag)\n pitch = Math.max(pitch_init, craft_pitch - Math.abs(craft_pitch/4));\n else \n break; // while (pitch > aoa_min/2)\n } \n \n trace(\"for() speed: \" + speed + \" pitch: \" + pitch);\n for (;pitch < pitch_limit; pitch += pitch_step) {\n craft_pitch = pitch;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (total_drag() >= max_drag) {\n // stop increasing pitch, won't work. need more speed\n trace(\"too much drag. speed: \" + speed + \" pitch: \" + pitch + \" lift \" + foil_lift());\n pitch = Math.max(pitch_init, craft_pitch - Math.abs(craft_pitch/4));\n break; // for (pitch...)\n }\n if (foil_lift() >= min_lift) {\n if (speed_step > 0.25) {\n trace(\"request reiterate. speed: \" + speed + \" pitch: \" + pitch + \" lift \" + foil_lift() + \" speed_step: \" + speed_step);\n return Math.max(0, velocity - speed_step); // request to reiterate\n } else {\n // done!\n make_min_takeoff_speed_info(min_lift, max_drag, velocity); \n System.out.println(\"\\nDone!\\n----------------\\n\" + min_takeoff_speed_info);\n return -1;\n }\n } \n }\n // need to start from lowest pitch?\n if (pitch >= pitch_limit) pitch = pitch_init;\n }\n }\n return -2; // can not find solution\n }", "public void decelerate() {\n\t\tif (this.hasOnlyOneCar())\n\t\t{\n\t\t\tif (this.getHead().getSpeed()==Speed.FAST)\n\t\t\t\tthis.getHead().setSpeed(Speed.NORMAL);\n\t\t\telse\n\t\t\t\tthis.getHead().setSpeed(Speed.SLOW);\n\t\t}\n\t}", "public void accelerateYU() {\n double temp;\n temp = this.getySpeed();\n if (temp >= -this.getMaxSpeed()) {\n temp += -this.getMaxSpeed() / 10;\n }\n this.setySpeed(temp);\n\n }", "public void accelerateYD() {\n double temp;\n temp = this.getySpeed();\n if (temp <= this.getMaxSpeed()) {\n temp += this.getMaxSpeed() / 10;\n }\n this.setySpeed(temp);\n\n }", "@Override\n protected double speedFactor() {\n return getEnginePower() * 0.003;\n }", "public long getBestSolutionTime();", "public void upSpeed()\n\t{\n\t\tmoveVec.setLocation(moveVec.getX() * 1.1, moveVec.getY() * 1.1);\n\n\t\t//this.speed *= 1.1;\n\t}", "private void reverseCompSpeed() {\n this.compSpeed = -this.compSpeed;\n }", "@Override\n final public void accelerate(double a) throws NegativeSpeedException {\n super.accelerate(a);\n if(a<0) return;\n double conspt = a*fuelType.getFuelConsumption();\n if(conspt <= fuel) {\n super.accelerate(a); //super.speed += a;\n fuel -= conspt;\n }\n else {\n super.accelerate(fuel/fuelType.getFuelConsumption());//this.speed += fuel/fuelType.getFuelConsumption();//How much I can accelerate given the fuel I have\n fuel = 0.0;\n }\n }", "public void accelerate() {\n\t\tif (this.hasOnlyOneCar())\n\t\t{\n\t\t\tif (this.getHead().getSpeed()==Speed.SLOW)\n\t\t\t\tthis.getHead().setSpeed(Speed.NORMAL);\n\t\t\telse\n\t\t\t\tthis.getHead().setSpeed(Speed.FAST);\n\t\t}\n\t}", "@Override\n\tpublic void drive() {\n\t\tif (gasoline > 0) {\n\t\t\tsetAccelerate(true);\n\t\t}\n\t}", "public void accelerate(){\n speed += 5;\n }", "@Override\n public void tuningPeriodic() {\n\n }", "double getSolverTimeLimitSeconds();", "public void tune() {\n\t\tSystem.out.println(\"ting.. ting...\");\n\t}", "public double DrivetrainLimiterWithTimeScale(){\n\t\tif (this.GetAverageTotalCurrent() > this.drivetrainCurrentLimit){\n\t\t\tpresentTime = Timer.getFPGATimestamp();\n\t\t\ttimeError = Math.abs(presentTime - startTime);\n\t\t\t\n\t\t\tcurrentError = Math.abs(this.GetAverageTotalCurrent() - this.drivetrainCurrentLimit);\n\t\t\tlimiter = 1 - (currentError * cKp) - (timeError * tKp);\n\t\t}\n\t\telse{\n\t\t\tstartTime = Timer.getFPGATimestamp();\n\t\t\tlimiter = 1;\n\t\t}\n\t\t\n\t\treturn limiter;\n\t\t\n\t}", "public void setSpeed() {\r\n\t\tthis.currSpeed = this.maxSpeed * this.myStrategy.setEffort(this.distRun);\r\n\t}", "private void updateNetworkSpeed() {\n Message obtain = Message.obtain();\n obtain.what = 200000;\n long j = 0;\n if (isDemoOrDrive() || this.mDisabled || !this.mIsNetworkConnected) {\n obtain.arg1 = 0;\n this.mHandler.removeMessages(200000);\n this.mHandler.sendMessage(obtain);\n this.mLastTime = 0;\n this.mTotalBytes = 0;\n return;\n }\n long currentTimeMillis = System.currentTimeMillis();\n long totalByte = getTotalByte();\n if (totalByte == 0) {\n this.mLastTime = 0;\n this.mTotalBytes = 0;\n totalByte = getTotalByte();\n }\n long j2 = this.mLastTime;\n if (j2 != 0 && currentTimeMillis > j2) {\n long j3 = this.mTotalBytes;\n if (!(j3 == 0 || totalByte == 0 || totalByte <= j3)) {\n j = ((totalByte - j3) * 1000) / (currentTimeMillis - j2);\n }\n }\n obtain.arg1 = 1;\n obtain.obj = Long.valueOf(j);\n this.mHandler.removeMessages(200000);\n this.mHandler.sendMessage(obtain);\n this.mLastTime = currentTimeMillis;\n this.mTotalBytes = totalByte;\n postUpdateNetworkSpeedDelay((long) this.mNetworkUpdateInterval);\n }", "void easy_ride_old (double min_lift, double start_speed) { \n double pitch = 0;\n double min_drag = 10000.0;\n double min_drag_speed = -1;\n for (double speed = start_speed; speed < v_max; speed += 0.5) {\n velocity = speed;\n trace(\"velocity: \" + velocity);\n for (pitch = 0; pitch <= aoa_max; pitch += 0.1) {\n craft_pitch = pitch;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n // if (total_drag() >= max_drag) {\n // trace(\"warning speed: \" + speed + \" pitch: \" + pitch + \" lift \" + foil_lift());\n // return;\n // }\n if (foil_lift() >= min_lift) {\n double drag = total_drag();\n if (min_drag > drag) {\n min_drag = drag;\n min_drag_speed = velocity;\n break;\n } else {\n // drag goes up now. can be done now, but\n // as a heuristic, now try from the upepr limit, and then find range:\n max_speed(min_lift, min_drag + 2, false);\n if (velocity < min_drag_speed) {\n // something went wrong (iteration stepped over the sweets spot etc)\n // so we take min_lift, min_drag, and min_drag_speed as is\n make_cruising_info(min_lift, min_drag, min_drag_speed); \n System.out.println(\"\\nDone!\\n----------------\\n\" + cruising_info);\n } else {\n // done, report with average of min_drag_speed and velocity\n make_cruising_info(min_lift, min_drag+1, (min_drag_speed+velocity)/2); \n trace(\"done with refinement! \");\n System.out.println(\"\\nDone!\\n----------------\\n\" + cruising_info);\n }\n return;\n }\n }\n }\n }\n }", "private static void speedup(String [] args){\n\t\t\n\t\tint warningCnt = 0;\n\t\t\n\t\tString applicationPath = convertApplication(args[2], null);\n\t\tConfMan baseConfigManager;\n\t\t\n\n\n\n\n\t\tbaseConfigManager = new ConfMan(args[1], applicationPath, false);\n\t\tConfMan[] cms;\n\t\t\n\t\tSweepConfig sweepConfig = new SweepConfig(baseConfigManager, \"config/sweep/cacheSpeedupSweep.json\",true);\n//\t\tSweepConfig sweepConfig = new SweepConfig(baseConfigManager, \"config/sweep/speedupSweep.json\",true);\n\n\t\tcms = sweepConfig.getConfManager();\n\t\tString[] configNames = sweepConfig.getSweepConfigurations();\n//\t\tString[] speedupIdentifier = sweepConfig.getSpeedupIdentifier();\n//\t\tboolean[] isShortTest = sweepConfig.getIsShortTest();\n\n\t\tTrace speedupTrace = new Trace(System.out, System.in, \"\", \"\");\n\t\tspeedupTrace.setPrefix(\"basic config\");\n\t\tbaseConfigManager.printConfig(speedupTrace);\n\n\t\tspeedupTrace.setPrefix(\"speedup\");\n\t\t\n//\t\tLinkedHashMap<String, SpeedupMeasurementResult> speedupResults = new LinkedHashMap<>();\n\t\tMeasurementResult[] measurementResults = new MeasurementResult[cms.length];\n\t\tLinkedHashMap<String, BaseLineStorage> baseLineStorage = new LinkedHashMap<String, BaseLineStorage>();\n\t\t\n//\t\tAmidarSimulationResult[] results = parallelRemoteSimulation(sweepConfig, \"trav\", 1099, 8, speedupTrace);\n\t\t\n\t\tdouble overhead = 0;\n\t\tint transmission = 0;\n\t\tint run = 0;\n\t\tdouble overheadCnt = 0;\n\t\t\n\n\t\t////////////////////////// SIMULATE //////////////////////////////////////////////\n\t\tfor(int i = 0; i<cms.length; i++){\n\t\t\t\n\t\t\t/////// FIRST SHORT /////////////////////////////\n\t\t\tConfMan conf = cms[i];\n\t\t\t\n\t\t\tboolean isShort = true;\n\t\t\tString appBaseName = conf.getApplicationPath();\n\t\t\tString [] appBasePath = appBaseName.split(\"/\");\n\t\t\t\n\t\t\t\n\t\t\tconf.setApplication(\"../axt/\" + appBaseName+ \"_short/\" + appBasePath[appBasePath.length-1] + \"_short.axt\");\n\n\t\t\tMeasurementResult speedupRes = measurementResults[i];\n\t\t\tif(speedupRes == null){\n\t\t\t\tspeedupRes = new MeasurementResult();\n\t\t\t\tmeasurementResults[i] = speedupRes;\n\t\t\t}\n\t\t\t\n\t\t\tString app = conf.getApplicationPath();\n\t\t\tint benchmarkScale = conf.getBenchmarkScale();\n\t\t\tapp = app+\"-benchMarkScale-\"+benchmarkScale;\n\t\t\t\n\t\t\tspeedupTrace.printTableHeader(\"Running: \" + configNames[i] + \" SHORT\");\n\t\t\tif(!baseLineStorage.containsKey(app)){\n\t\t\t\tbaseLineStorage.put(app, new BaseLineStorage());\n\t\t\t}\n\t\t\t\n\t\t\tBaseLineStorage baseLine = baseLineStorage.get(app);\n \t\t\t\n\t\t\tif(!baseLine.isBaselineAvailable(isShort)){\n\t\t\t\tspeedupTrace.println(\"Running without synthesis...\");\n\t\t\t\tAmidarSimulationResult currentRes = run(conf, null, false);\n\t\t\t\tspeedupRes.addBaseline(currentRes, isShort);\n\t\t\t\tbaseLine.addBaseLine(isShort, currentRes);\n\t\t\t} else {\n\t\t\t\tspeedupRes.addBaseline(baseLine.getBaseLine(isShort), isShort);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tAmidarSimulationResult currentResult = null;\n\t\t\tconf.setSynthesis(true);\n\t\t\tspeedupTrace.println(\"Running with synthesis...\");\n\t\t\ttry{\n\t\t\t\tcurrentResult = run(conf, null, false);\n\t\t\t} catch(AmidarSimulatorException e ){\n\t\t\t\tspeedupTrace.println(\"WARNING: Aliasing speculation failed. Switching of speculation and repeat...\");\n\t\t\t\twarningCnt++;\n\t\t\t\tconf.getSynthesisConfig().put(\"ALIASING_SPECULATION\", AliasingSpeculation.OFF);\n\t\t\t\tcurrentResult = run(conf, null, false);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n//\t\t\tif(isShort){\n//\t\t\t\tHashMap<String, Integer> stateCNT = currentResult.getCgraStateCount();\n//\t\t\t\tdouble transmissionCnt = stateCNT.get(\"SEND\") + stateCNT.get(\"REC\") +stateCNT.get(\"WAIT\");\n//\t\t\t\tdouble runCnt = stateCNT.get(\"RUN\");\n//\t\t\t\t\n//\t\t\t\tdouble overheadCurrent = transmissionCnt/(transmissionCnt + runCnt);\n//\t\t\t\t\n//\t\t\t\toverhead += overheadCurrent;\n//\t\t\t\ttransmission +=transmissionCnt;\n//\t\t\t\trun += runCnt;\n//\t\t\t\toverheadCnt++;\n//\t\t\t}\n\t\t\t\n\t\t\tspeedupRes.addResults(currentResult, isShort);\n\t\t\t\n\t\t\t/////// THEN LONG /////////////////////////////\n\t\t\t\n\t\t\tisShort = false;\n\t\t\tconf.setApplication(\"../axt/\" + appBaseName+ \"_long/\" + appBasePath[appBasePath.length-1] + \"_long.axt\");\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tspeedupTrace.printTableHeader(\"Running: \" + configNames[i] + \" LONG\");\n\t\t\tif(!baseLine.isBaselineAvailable(isShort)){\n\t\t\t\tconf.setSynthesis(false);\n\t\t\t\tspeedupTrace.println(\"Running without synthesis...\");\n\t\t\t\tAmidarSimulationResult currentRes = run(conf, null, false);\n\t\t\t\tspeedupRes.addBaseline(currentRes, isShort);\n\t\t\t\tbaseLine.addBaseLine(isShort, currentRes);\n\t\t\t} else {\n\t\t\t\tspeedupRes.addBaseline(baseLine.getBaseLine(isShort), isShort);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tconf.setSynthesis(true);\n\t\t\tspeedupTrace.println(\"Running with synthesis...\");\n\t\t\ttry{\n\t\t\t\tcurrentResult = run(conf, null, false);\n\t\t\t} catch(AmidarSimulatorException e ){\n\t\t\t\tspeedupTrace.println(\"WARNING: Aliasing speculation failed. Switching of speculation and repeat...\");\n\t\t\t\twarningCnt++;\n\t\t\t\tconf.getSynthesisConfig().put(\"ALIASING_SPECULATION\", AliasingSpeculation.OFF);\n\t\t\t\tcurrentResult = run(conf, null, false);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n//\t\t\tif(isShort){\n//\t\t\t\tHashMap<String, Integer> stateCNT = currentResult.getCgraStateCount();\n//\t\t\t\tdouble transmissionCnt = stateCNT.get(\"SEND\") + stateCNT.get(\"REC\") +stateCNT.get(\"WAIT\");\n//\t\t\t\tdouble runCnt = stateCNT.get(\"RUN\");\n//\t\t\t\t\n//\t\t\t\tdouble overheadCurrent = transmissionCnt/(transmissionCnt + runCnt);\n//\t\t\t\t\n//\t\t\t\toverhead += overheadCurrent;\n//\t\t\t\ttransmission +=transmissionCnt;\n//\t\t\t\trun += runCnt;\n//\t\t\t\toverheadCnt++;\n//\t\t\t}\n\t\t\t\n\t\t\tspeedupRes.addResults(currentResult, isShort);\n\t\t}\n\t\t////////////////////////SIMULATE END//////////////////////////////////////////////\n\n\t\tspeedupTrace.printTableHeader(\"Speedup\");\n\t\t\n\t\tDecimalFormatSymbols symbols = new DecimalFormatSymbols();\n\t\tsymbols.setGroupingSeparator(',');\n\t\tsymbols.setDecimalSeparator('.');\n\t\tDecimalFormat formater = new DecimalFormat(\"#0.000\", symbols);\n\t\t\n\t\t\n\t\t/// GATHER INFORMATION //////////////////////////////////////////\n\t\t\n\t\tdouble[] speedupList = new double[cms.length];\n\t\tdouble[] communicationOverhead = new double[cms.length];\n\t\tdouble[] dmaOverhead = new double[cms.length];\n\t\tdouble[] l1usage = new double[cms.length];\n\t\tdouble[] l2usage = new double[cms.length];\n\t\tdouble[] averageMemTime = new double[cms.length];\n\t\t\n\t\tdouble[][] blockTimesPrefetch = new double[TaskType.values().length][cms.length];\n\t\tdouble[][] blockTimesRegular = new double[TaskType.values().length][cms.length];\n\t\t\n\t\tint[] nrOfContexts = new int[cms.length];\n\t\tint[] nrOfL1Prefetches = new int[cms.length];\n\t\tint[] nrOfL2Prefetches = new int[cms.length];\n\t\tint[] nrOfUsedL1Prefetches = new int[cms.length];\n\t\tint[] nrOfUsedL2Prefetches = new int[cms.length];\n\t\t\n\t\tint[] nrOfHandledPrefetchRequests = new int[cms.length];\n\t\tint[] nrOfHandledPrefetchRequestsAlreadyAvailable = new int[cms.length];\n\t\t\n\t\tint[] cachelineFills = new int[cms.length];\n\t\tlong[] synthTime = new long[cms.length];\n\t\t\n\t\tfor(int i = 0; i < measurementResults.length; i++){\n\t\t\tString res = \"Speedup of \" + configNames[i] + \"\\t\";\n\t\t\tdouble speedup = measurementResults[i].getSpeedup();\n\t\t\tspeedupList[i] = speedup;\n\t\t\tres = res + \": \" + formater.format(speedup);\n\t\t\tspeedupTrace.println(res);\n\t\t\t\n\t\t\tcommunicationOverhead[i] = measurementResults[i].getCommunicationOverhead();\n\t\t\tdmaOverhead[i] = measurementResults[i].getDMAOverhead();\n\t\t\tl1usage[i]= measurementResults[i].getL1Usage();\n\t\t\tl2usage[i]= measurementResults[i].getL2Usage();\n\t\t\taverageMemTime[i] = measurementResults[i].getAverageMemoryAccessTime();\n\t\t\tfor(TaskType tt: TaskType.values()){\n\t\t\t\tblockTimesPrefetch[tt.ordinal()][i] = measurementResults[i].getBlockTimesInPercent(RequestType.Prefetch, tt);\n//\t\t\t\tSystem.out.println(\"\\tBlocktime Pref\" +tt + \":\\t\" +blockTimesPrefetch[tt.ordinal()][i]);\n\t\t\t\tblockTimesRegular[tt.ordinal()][i] = measurementResults[i].getBlockTimesInPercent(RequestType.Regular, tt);\n//\t\t\t\tSystem.out.println(\"\\tBlocktime Regu\" +tt + \":\\t\" +blockTimesRegular[tt.ordinal()][i]);\n \t\t\t}\n\t\t\tnrOfContexts[i] = measurementResults[i].getNrOfContexts();\n\t\t\tnrOfL1Prefetches[i] = measurementResults[i].getNrOfL1Prefetches();\n\t\t\tnrOfUsedL1Prefetches[i] = measurementResults[i].getNrOfUsedL1Prefetches();\n\t\t\tnrOfHandledPrefetchRequests[i] = measurementResults[i].getNrOfHandledPrefetchRequests();\n\t\t\tnrOfHandledPrefetchRequestsAlreadyAvailable[i] = measurementResults[i].getNrOfHandledPrefetchRequestsAlreadyAvailable();\n\t\t\tcachelineFills[i] = measurementResults[i].getCachelineFills();\n\t\t\tsynthTime[i] = measurementResults[i].getSynthTime();\n\t\t}\n\t\t///// PLOT INFORMATION //////////////////////////////////////////////\n\t\tSweepResultPlotter plotter = new SweepResultPlotter();\n//\t\tplotter.configurePlotter( \"UNROLL\", \"\", true);\n\t\tLinkedHashMap<String, LinkedHashSet<String>> sweepInfo = sweepConfig.getSweepInfo();\n\t\t\n\t\tString path = \"log/sweep\"+new Date().toString();\n\t\tplotter.setPath(path);\n\t\tplotter.saveSweepInfo(sweepInfo);\n\t\t\n\t\tplotter.saveResults(speedupList,\"speedup\");\n\t\tplotter.saveResults(communicationOverhead, \"communicationOverhead\");\n\t\tplotter.saveResults(dmaOverhead, \"dmaOverhead\");\n\t\tplotter.saveResults(l1usage,\"l1usage\");\n\t\tplotter.saveResults(l2usage, \"l2usage\");\n\t\tplotter.saveResults(averageMemTime, \"memTime\");\n\t\tplotter.saveResults(nrOfContexts, \"contexts\");\n\t\tplotter.saveResults(nrOfL1Prefetches, \"l1prefetches\");\n\t\tplotter.saveResults(nrOfUsedL1Prefetches, \"usedL1prefetches\");\n\t\tplotter.saveResults(nrOfHandledPrefetchRequests, \"handledPrefetchRequests\");\n\t\tplotter.saveResults(nrOfHandledPrefetchRequestsAlreadyAvailable, \"handledPrefetchRequestsAvail\");\n\t\tplotter.saveResults(cachelineFills, \"cachelineFills\");\n\t\tplotter.saveResults(synthTime, \"Synthtime\");\n\t\t\n\t\t\n//\t\tfor(TaskType tt: TaskType.values()){\n//\t\t\t\n//\t\t}\n\t\t\n\t\t///// PRINT ON CONSOLE ///////////////////////////////\n\t\tspeedupTrace.printTableHeader(\"Average Speedup\");\n\t\tplotter.plot(sweepInfo, speedupList, speedupTrace,\"log/\", \"\");\n\t\t\n\t\tif(warningCnt > 1){\n\t\t\tspeedupTrace.println(warningCnt + \" Warnings\");\n\t\t} else if(warningCnt == 1){\n\t\t\tspeedupTrace.println(\"1 Warning\");\n\t\t}\n\t\t\n//\t\tspeedupTrace.println(\"CGRA transmission overhead in Percent: \" + formater.format(overhead*100/overheadCnt) + \" Ticks Running: \" + (int)(run/overheadCnt+0.5) + \" Ticks Transmitting: \" + (int)(transmission/overheadCnt+0.5));\n\t\t\n\t\t\n//\t\tspeedupTrace.println(ObjectHistory.indep*100/(ObjectHistory.indep+ObjectHistory.dep)+\"% of all memory accesses are independant\");\n//\n//\t\t\n\t\tspeedupTrace.printTableHeader(\"Average Communication Overhead\");\n\t\tplotter.plot(sweepConfig.getSweepInfo(), communicationOverhead, speedupTrace, null, \"\");\n\t\tspeedupTrace.printTableHeader(\"Average DMA Overhead\");\n\t\tplotter.plot(sweepConfig.getSweepInfo(), dmaOverhead, speedupTrace, null, \"\");\n\t\tspeedupTrace.printTableHeader(\"Memtime\");\n\t\tplotter.plot(sweepConfig.getSweepInfo(), averageMemTime, speedupTrace, null, \"\");\n\t\t\n\t\tdouble[] cffd = new double[cachelineFills.length];\n\t\tfor(int i = 0; i < cffd.length; i++){\n\t\t\tcffd[i] = cachelineFills[i];\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tspeedupTrace.printTableHeader(\"Cacheline fills\");\n\t\tplotter.plot(sweepConfig.getSweepInfo(), cffd, speedupTrace, null, \"\");\n\t\t\n\t\tdouble[] stdd = new double[synthTime.length];\n\t\tfor(int i = 0; i < stdd.length; i++){\n\t\t\tstdd[i] = synthTime[i];\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tspeedupTrace.printTableHeader(\"Synth time\");\n\t\tplotter.plot(sweepConfig.getSweepInfo(), stdd, speedupTrace, null, \"\");\n\t\t\n//\t\t\n//\t\tplotter.plot(sweepConfig.getSweepInfo(), l1usage, speedupTrace, null, \"\");\n//\t\tplotter.plot(sweepConfig.getSweepInfo(), l2usage, speedupTrace, null, \"\");\n//\t\tplotter.plot(sweepConfig.getSweepInfo(), averageMemTime, speedupTrace, null, \"\");\n\t\t\n//\t\tspeedupTrace.printTableHeader(\"CGRA blocked by Prefetch\");\n//\t\tfor(TaskType tt: TaskType.values()){\n//\t\t\tplotter.plot(sweepConfig.getSweepInfo(), blockTimesPrefetch[tt.ordinal()], speedupTrace,null, tt.toString());\n//\t\t}\n//\t\tspeedupTrace.printTableHeader(\"CGRA blocked by Regular Access\");\n//\t\tfor(TaskType tt: TaskType.values()){\n//\t\t\tplotter.plot(sweepConfig.getSweepInfo(), blockTimesRegular[tt.ordinal()], speedupTrace,null, tt.toString());\n//\t\t}\n\t\n\t}", "void easy_ride_from_70kmh_down (double min_lift) { \n double start_speed = 70; // kmh\n double pitch = 0;\n double min_drag = 10000.0;\n double step = -10;\n velocity = start_speed;\n for (int count = 0; count < 10000; count++) {\n trace(\"velocity: \" + velocity + \" step: \" + step);\n steady_flight_at_given_speed(5, 0);\n double total_drag = total_drag();\n double foil_lift = foil_lift();\n if (Math.abs(step) < 0.01) break;\n if ((step < 0 && velocity+step <= 0) ||\n // (step > 0 && velocity >= 70) ||\n foil_lift < load ||\n total_drag > min_drag) { // can't pivot because of local max of drag before taking off.... \n velocity -= step;\n step *= 0.5;\n } else {\n velocity += step;\n min_drag = total_drag;\n }\n }\n make_cruising_info(min_lift, min_drag, velocity); \n System.out.println(\"\\nDone!\\n----------------\\n\" + cruising_info);\n }", "@Override\n\tpublic void limitSpeed() {\n\t\tSystem.out.println(\"120 KMPH\");\n\t}", "@Override\n protected final void process() throws OutOfMemoryError {\n if(!caching()) return;\n \n // get station density\n Vector<EvaluationResult> stationSpeed = Evaluation.getResult(StationSpeed.class, this.opts); \n \n // get section that selected from TICAS GUI\n Section section = this.opts.getSection();\n \n // get stations including the section\n Station[] stations = section.getStations(this.detectorChecker); \n \n Period[] periods = this.opts.getPeriods();\n \n int idx = 0; \n int startIdx = 0;\n if(stationSpeed.size() > 1) startIdx = 1;\n for(int i=startIdx; i<stationSpeed.size(); i++)\n {\n if(printDebug && idx < periods.length) System.out.println(\" - \" + periods[idx++].getPeriodString()); \n \n EvaluationResult res = EvaluationResult.copy(stationSpeed.get(i));\n res = this.removeVirtualStationFromResult(res);\n EvaluationResult accelRes = EvaluationResult.copy(stationSpeed.get(i));\n accelRes = this.removeVirtualStationFromResult(accelRes);\n \n // add first station data (all of data are 0)\n for(int r=accelRes.ROW_DATA_START(); r<res.getRowSize(0); r++) {\n accelRes.set(accelRes.COL_DATA_START(), r, 0D);\n }\n \n for(int c=res.COL_DATA_START()+1; c<res.getColumnSize(); c++)\n {\n int stationIdx = c-res.COL_DATA_START();\n for(int r=res.ROW_DATA_START(); r<res.getRowSize(c); r++)\n {\n double u1 = Double.parseDouble(res.get(c-1, r).toString());\n double u2 = Double.parseDouble(res.get(c, r).toString());\n double distance = TMO.getDistanceInMile(stations[stationIdx-1], stations[stationIdx]);\n double accel = getAcceleration(u1, u2, distance);\n accelRes.set(c, r, accel);\n }\n }\n this.results.add(accelRes);\n } \n hasResult = true;\n }", "public void increaseSpeed() {\r\n\tupdateTimer.setDelay((int)Math.floor(updateTimer.getDelay()*0.95));\r\n\t\t}", "void accelerate() {\n isAccelerating = true;\n Bukkit.getScheduler().scheduleSyncRepeatingTask(Cars.getInstance(), new BukkitRunnable() {\n @Override\n public void run() {\n if (!isAccelerating) {\n cancel();\n return;\n } else if (CAR.getAcceleration(DIRECTION.getOpposite()).isAccelerating) {\n // Just stop the car if both cars are accelerating because it means the driver is holding down 's'\n // and 'w' at the same time.\n CAR.stopCompletely();\n return;\n }\n\n Minecart minecart = CAR.getMinecart();\n Vector velocity = minecart.getVelocity();\n velocity.add(/* TODO ACCELERATION direction*/new Vector());\n if (velocity.length() >= minecart.getMaxSpeed()) isAccelerating = false;\n minecart.setDerailedVelocityMod(velocity);\n }\n }, 1, 1);\n }", "public void slowDownX() {\n double temp;\n temp = this.getxSpeed();\n\n if (temp > 0.1 || temp < -0.1) {\n temp /= 1.1;\n } else {\n temp = 0;\n }\n this.setxSpeed(temp);\n }", "public void crunch(){\n cpuBurstTime--;\n rem--;\n }", "@Override\r\n\tpublic double getSlowness() {\n\t\treturn 10;\r\n\t}", "public void performance() {\n\t\tPositionVo s = currentPerformed.getFirst();\n\t\t@SuppressWarnings(\"unused\")\n\t\tPositionVo e = currentPerformed.getLast();\n//\t\tint timeCost = (int) (e.getTime() - s.getTime());\n//\t\tint span = (int) Math.abs(e.getHead().getX() - s.getHead().getX());\n\t\t// TODO according to the moving rate decide how many nodes fill the gap\n\n\t\tint size = currentPerformed.size();\n\n\t\tfor (int i = 1; i < size * 4 - 4; i += 4) {\n\t\t\tPositionVo s1 = currentPerformed.get(i - 1);\n\t\t\tPositionVo s2 = currentPerformed.get(i);\n\n\t\t\tPoint[] delta_Head = sim_dda(s1.getHead(), s2.getHead(), 4);\n\t\t\tPoint[] delta_left_hand = sim_dda(s1.getLeftHand(), s2.getRightHand(), 4);\n\t\t\tPoint[] delta_right_hand = sim_dda(s1.getRightHand(), s2.getRightHand(), 4);\n\n\t\t\tfor (int j = 0; j < 3; j++)\n\t\t\t\tcurrentPerformed.add(i + j, new PositionVo(delta_Head[j], delta_left_hand[j], delta_right_hand[j]));\n\t\t}\n\n\t\tnCount = currentPerformed.size();\n\t\tcursor = 0;\n\n\t\t/* (*)absolute point = initial point - current point */\n\t\treferX -= s.getHead().getX();\n\t\treferY += s.getHead().getY();\n\t\tcurrReferX = referX;\n\t\tcurrReferY = referY;\n\n\t\t/* update gui */\n\t\tmanager.proceBar.setMinimum(0);\n\t\tmanager.proceBar.setMaximum(nCount);\n\t\t/* end */\n\n\t\tstartTimer((int) (ANIMATE_FPS * speedRate));\n\t}", "public void reviseMotorSpeed() {\n\t\tmHandler.removeMessages(EVAL_MOTOR_SPEED);\n\t\tlong starttime = System.currentTimeMillis();\n\n\t\t//Retrieve current orientation.\t\t\n\t\t\n\t\tmAzimuth = mStatus.getReadingField(AZIMUTH);\t\t\n\t\tmPitchDeg = mStatus.getReadingField(PITCH);\n\t\tmRollDeg = -mStatus.getReadingField(ROLL);\n\t\t\n\t\tdouble[] errors = new double[4];\n\t\tsynchronized (mAngleTarget) {\n\t\t\t//logArray(\"mAngleTarget\", mAngleTarget);\n\t\t\terrors[0] = mAngleTarget[0] - mRollDeg;\n\t\t\terrors[1] = mAngleTarget[1] - mPitchDeg;\n\t\t\terrors[2] = mAngleTarget[2] - mStatus.getGpsField(dALT);\n\t\t\terrors[3] = mAngleTarget[3] - mAzimuth;\n\t\t\t//logArray(\"errors\", errors);\n\t\t}\n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tString errs = \"errors: \";\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\terrs += errors[i] + \": \";\n\t\t}\n\t\t//Log.v(TAG, errs);\n\t\t//For azimuth, multiple possibilities exist for error, each equally valid; but only the error nearest zero makes practical sense.\n\t\tif (errors[3] > 180.0)\n\t\t\terrors[3] -= 360.0;\n\t\tif (errors[3] < -180.0)\n\t\t\terrors[3] += 360.0;\n\t\t\n\t\t\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t//Calculate proportional errors\n\t\t\tdouble err = errors[i];//mTarget[i] - mCurrent[i];\n\t\t\t\n\n\t\t\t//Calculate derivative errors.\n\t\t\tlong timeInterval = starttime - mLastUpdate;\n\t\t\tif (timeInterval != 0) {\n\t\t\t\tmErrors[i][2] = (err - mErrors[i][0]) * 1000.0 / timeInterval;\n\t\t\t} else {\n\t\t\t\tmErrors[i][2] = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//Mark proportional error\n\t\t\tmErrors[i][0] = err;\n\t\t\t/*if (i == 2)\n\t\t\t\tLog.v(TAG, \"guid, dalt err is \" + err);*/\n\t\t\t//Update integral errors\n\t\t\tmErrors[i][1] -= mIntegralErrors[i][mIntegralIndex];\n\t\t\tmIntegralErrors[i][mIntegralIndex] = err;\n\t\t\tmErrors[i][1] += err;\n\t\t\tmIntegralIndex = ++mIntegralIndex % PIDREPS;\n\t\t\t\n\t\t\t//Calculate changes in output\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tmControlVars[i] += mErrors[i][j] * mGain[i][j];\n\t\t\t}\n\t\t}\n\t\tif (mGuidanceMode.get() == MANUAL) {\n\t\t\tsynchronized (mAngleTarget) {\n\t\t\t\tmControlVars[2] = mAngleTarget[2];\n\t\t\t}\n\t\t}\n\t\tmLastUpdate = starttime;\n\t\t\n\t\t// Constrain control vars:\n\t\tmControlVars[0] = constrainValue(mControlVars[0], -1, 1);\n\t\tmControlVars[1] = constrainValue(mControlVars[1], -1, 1);\n\t\tmControlVars[2] = constrainValue(mControlVars[2], 0, 1);\n\t\tmControlVars[3] = constrainValue(mControlVars[3], -2, 2);\n\t\t\n\t\t/*String vars = \"Control vars: \";\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tvars += mControlVars[i] + \": \";\n\t\t}\n\t\tLog.v(TAG, vars);*/\n\t\t\n\t\tcontrolVarsToMotorSpeeds();\n\t\t\n\t\t//Send motor values to motors here:\n\t\tupdateMotors();\n\t\tupdateAngleTarget();\n\t\t//Log.v(TAG, \"motors: \" + mMotorSpeed[0] + \", \" + mMotorSpeed[1] + \", \" + mMotorSpeed[2] + \", \" + mMotorSpeed[3]);\n\t\t//Sleep a while\n\t\tlong timetonext = (1000 / PIDREPS) - (System.currentTimeMillis() - starttime);\n\t\t//Log.v(TAG, \"time to next: \" + timetonext);\n\t\tint currentMode = mGuidanceMode.get();\n\t\tif ((currentMode == MANUAL) || (currentMode == AUTOPILOT)) {\n\t\t\tif (timetonext > 0)\n\t\t\t\tmHandler.sendEmptyMessageDelayed(EVAL_MOTOR_SPEED, timetonext);\n\t\t\telse {\n\t\t\t\tLog.e(TAG, \"Guidance too slow\");\n\t\t\t\tmHandler.sendEmptyMessage(EVAL_MOTOR_SPEED);\n\t\t\t}\n\t\t}\n\t}", "public void doubleSpeed()\r\n {\r\n \tthis.speed= speed-125;\r\n \tgrafico.setVelocidad(speed);\r\n }", "@Override\npublic int accelerate(int speed) {\n\tint carSpeed=getSpeed();\n\treturn carSpeed;\n}", "public void accelerateXL() {\n double temp;\n temp = this.getxSpeed();\n if (temp >= -this.getMaxSpeed()) {\n temp += -this.getMaxSpeed() / 10;\n }\n this.setxSpeed(temp);\n\n }", "public synchronized void updateGameDataAtSlowRate() {\n scheduleGameUpdate(slowUpdateSpeed);\n }", "public float getSpeed(List<Integer> collectTime);", "private static void testLongLoop() {\n test(1000 * 1000 * 1000);\n //uncomment the following line to see the hand-written cache performance\n //testManual( 1000 * 1000 * 1000 );\n }", "private static void testLongLoop() {\n test(1000 * 1000 * 1000);\n //uncomment the following line to see the hand-written cache performance\n //testManual( 1000 * 1000 * 1000 );\n }", "public double getSlowToFire();", "public void slowDownY() {\n double temp;\n temp = this.getySpeed();\n if (temp > 0.1 || temp < -0.1) {\n temp /= 1.1;\n } else {\n temp = 0;\n }\n this.setySpeed(temp);\n }", "protected long travel() {\n\n return Math.round(((1 / Factory.VERTEX_PER_METER_RATIO) / (this.speed / 3.6)) * 1000);\n }", "private long finTime(){\n \n long result = 0, time = 0;\n Integer[] temp;\n \n while(!this.prior.isEmpty()){\n \n // getting the head of the queue and removing it\n temp = this.prior.poll();\n \n // printing some temp. results\n //System.out.println(\"weight \" + temp[0] + \" length/time \" + temp[1]);\n \n // callculate the finishing time\n time += temp[1];\n \n // calculate the weighted time, we want to minimise\n result += (temp[0]*time);\n }\n return result;\n }", "public abstract void decelerateMotorSpeeds(double[] motorSpeeds, double distanceToTarget, double lastDistanceToTarget, long timeSinceLastCallNano, double configuredMovementSpeed, double configuredTurnSpeed);", "private void run() {\n\n //if no time has elapsed, do not do anything\n if (Harness.getTime().equals(lastRunTime)) {\n return;\n }\n\n //double deltaV, deltaX;\n double newSpeed;\n double newPosition;\n double targetSpeed = 0;\n double currentSpeed = 0;\n double acceleration = 0;\n\n switch (driveOrderedState.speed()) {\n case STOP:\n targetSpeed = 0.0;\n break;\n case LEVEL:\n targetSpeed = LevelingSpeed;\n break;\n case SLOW:\n targetSpeed = SlowSpeed;\n break;\n case FAST:\n targetSpeed = FastSpeed;\n break;\n default:\n throw new RuntimeException(\"Unknown speed\");\n }\n /*\n * JDR Bug fix to make the speed stop in the case where the command is\n * Direction=STOP but speed is something other than STOP.\n */\n if (driveOrderedState.direction() == Direction.STOP) {\n targetSpeed = 0.0;\n }\n if (driveOrderedState.direction() == Direction.DOWN) {\n targetSpeed *= -1;\n }\n\n currentSpeed = driveSpeedState.speed();\n if (driveSpeedState.direction() == Direction.DOWN) {\n currentSpeed *= -1;\n }\n\n if (Math.abs(targetSpeed) > Math.abs(currentSpeed)) {\n //need to accelerate\n acceleration = Acceleration;\n } else if (Math.abs(targetSpeed) < Math.abs(currentSpeed)) {\n //need to decelerate\n acceleration = -1 * Deceleration;\n } else {\n acceleration = 0;\n }\n if (currentSpeed < 0) {\n //reverse everything for negative motion (going down)\n acceleration *= -1;\n }\n\n //get the time offset in seconds since the last update\n double timeOffset = SimTime.subtract(Harness.getTime(), lastRunTime).getFracSeconds();\n //remember this time as the last update\n lastRunTime = Harness.getTime();\n\n //now update speed\n //deltav = at\n newSpeed = currentSpeed + (acceleration * timeOffset);\n\n //deltax= vt+ 1/2 at^2\n newPosition = carPositionState.position() +\n (currentSpeed * timeOffset) + \n (0.5 * acceleration * timeOffset * timeOffset);\n if ((currentSpeed < targetSpeed &&\n newSpeed > targetSpeed) ||\n (currentSpeed > targetSpeed &&\n newSpeed < targetSpeed)) {\n //if deltaV causes us to exceed the target speed, set the speed to the target speed\n driveSpeedState.setSpeed(Math.abs(targetSpeed));\n } else {\n driveSpeedState.setSpeed(Math.abs(newSpeed));\n }\n //determine the direction\n if (driveSpeedState.speed() == 0) {\n driveSpeedState.setDirection(Direction.STOP);\n } else if (targetSpeed > 0) {\n driveSpeedState.setDirection(Direction.UP);\n } else if (targetSpeed < 0) {\n driveSpeedState.setDirection(Direction.DOWN);\n }\n carPositionState.set(newPosition);\n\n physicalConnection.sendOnce(carPositionState);\n physicalConnection.sendOnce(driveSpeedState);\n\n log(\" Ordered State=\", driveOrderedState,\n \" Speed State=\", driveSpeedState,\n \" Car Position=\", carPositionState.position(), \" meters\");\n }", "private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}", "@Override\n\tpublic int getMaxSpeed() {\n\t\treturn super.getMaxSpeed();\n\t}", "void easy_ride (double min_lift) { \n double pitch = 0;\n double min_drag = 10000.0;\n double step = 2;\n for (int count = 0; count < 10000; count++) {\n trace(\"velocity: \" + velocity + \" step: \" + step);\n steady_flight_at_given_speed(5, 0);\n double total_drag = total_drag();\n double foil_lift = foil_lift();\n if (Math.abs(step) < 0.01) break;\n if (//(step < 0 && velocity+step <= 0) ||\n (step > 0 && velocity >= 70) ||\n foil_lift < load ||\n total_drag > min_drag) { // can't pivot because of local max of drag before taking off.... \n velocity -= step;\n step *= 0.5;\n } else {\n velocity += step;\n min_drag = total_drag;\n }\n }\n make_cruising_info(min_lift, min_drag, velocity); \n System.out.println(\"\\nDone!\\n----------------\\n\" + cruising_info);\n }", "public void decreaseSpeed(int time) {\n\t\tvelocity -= acceleration;\r\n\t}", "public void process()\n {\n // Get current time\n\t\tdouble t = readClock() * clockSpeed;\n\t\tdouble dTime = t - computeClock;\n\t\tdouble dtMax = 1/50.0f;\n\t\n\t\t// Set current time on display\n\t\tcomputeClock = t;\n\t\t\n\n // Only process if time has elapsed\n if (dTime <= 0)\n return;\n\n\n\t\t// ---------------\n\t\n\t\t// Compute accelerations, then integrate (using Critter methods)\n\t\n\t // This part advances the simulation forward by dTime seconds, but\n\t // using steps that are no larger than dtMax (this means it takes\n\t // more than one step when dTime > dtMax -- the number of steps\n\t // you need is stored in numSteps).\n\t\n\t // *** placeholder value\n\t int numSteps = (int) Math.floor(dTime / dtMax);\n\t \n\t // compute a new 'goal' point for the mainbug to attract toward - every 7 seconds\n\t if ((computeClock) - (goalPickClock) > 7)\n\t {\n\t \t// pick a new random goal point\n\t \tgoal = new Point3d(rgen.nextDouble()*16-8, rgen.nextDouble()*16-8, 0);\n\t \tgoalPickClock = computeClock;\n \t\n\t \ttarget = (int)rgen.nextDouble()*(critters.size()-2);\n\t \twhile (critters.get(target) == predator || critters.get(target) == mainBug)\n\t \t\ttarget = (int)(rgen.nextDouble()*(critters.size()-1));\n\t }\n\t \n\t // Here is the rough structure of what you'll need\n\t //\n\t\t// numSteps = how many steps to take for stable integration\n\t // do numSteps times\n\t // - reset acceleration\n\t // - compute acceleration (adding up accelerations from attractions,\n\t // repulsions, drag, ...)\n\t // - integrate (by dTime/numSteps)\n\t // end\n\t //\n\t // ...\n\t for (int i = 0; i < numSteps; i++)\n\t {\n\t \tfor (int k = 0; k < critters.size(); k++)\n\t \t{\n\t \t\tCritter tmp = critters.get(k);\n\t \t\ttmp.accelReset();\n\t \t\ttmp.accelDrag(0.6); // dampening\n\t \t\t\n\n\t \t\t\n\t \t\tif (tmp == mainBug)// big bug follows randomized 'goal' point (food? water? shelter? )\n\t \t\t{\n\t \t\t\ttmp.accelAttract(goal, 0.1, 1);\n\t \t\t\ttmp.accelAttract(predator.getLocation(), -rgen.nextDouble()*0.3, -2);\n\t \t\t\ttmp.accelAttract(origin, 0.25, 1);\t \t\t\t // attraction toward center of scene\n\t \t\t}\n\t \t\telse if (tmp == predator )\n\t \t\t{\n \t\t\t\t\ttmp.accelAttract(critters.get(target).getLocation(), rgen.nextDouble()*0.4, 2);\t \t\t\t\t\t\n\t \t\t}\n\t \t\telse \n\t \t\t{\n\t \t\t\t// baby bugs follow big bug and are repelled from other baby bugs and predator!\n\t \t\t\ttmp.accelAttract(mainBug.getLocation(), rgen.nextDouble()*0.3, 1);\n\t \t\t\ttmp.accelAttract(predator.getLocation(), -rgen.nextDouble()*0.45, -3);\n\t \t\t\tfor (int m = 0; m < critters.size(); m++)\n\t \t\t\t{\n\t \t\t\t\tif (critters.get(m) != mainBug && critters.get(m) != tmp)\n\t \t\t\t\t\ttmp.accelAttract(critters.get(m).getLocation(), -rgen.nextDouble()*0.5, -1);\t \t\t\t\t\t\n\t \t\t\t}\n\t \t\t}\n\t\n\t\t \t// repulsion away from obstacles\n\t\t \tfor (int j = 0; j < obstacles.size(); j++)\n\t\t \t{\n\t\t \t\ttmp.accelAttract(obstacles.get(j).getLocation(), -0.5, -2);\n\t\t \t}\n\t\t \t\n\t\t \ttmp.integrate(dTime/numSteps);\n\t \t}\n\t }\n\t\n\t // Keyframe motion for each critter\n\t for (int i = 0; i < critters.size(); i++)\n\t {\n\t \tcritters.get(i).keyframe(critters.get(i).dist);\n\t }\n }", "public void timeToRunDec()\n\t{\n\t\tthis.time_to_run -- ;\n\t}", "public synchronized void updateGameDataAtFastRate() {\n scheduleGameUpdate(fastUpdateSpeed);\n }", "public double accelerate(int mphIncrease){\r\n speed = speed + mphIncrease;\r\n return speed;\r\n }", "public void speedUp(){\r\n\t\tmoveSpeed+=1;\r\n\t\tmoveTimer.setDelay(1000/moveSpeed);\r\n\t}", "public void setMaxSpeed() {\n\t\tspeed = MAX_SPEED;\n\t}", "private static double simpleSpeedupRun(String [] args){\n\t\tString applicationPath = convertApplication(args[2], new String[] {\"1\", \"2\"});\n\t\tConfMan configManager;\n\n\t\tconfigManager = new ConfMan(args[1],applicationPath, false);\n\t\t\n\t\tTrace speedupTrace = new Trace(System.out, System.in, \"\", \"\");\n\t\tif(configManager.getTraceActivation(\"config\")){\n\t\t\tspeedupTrace.setPrefix(\"config\");\n\t\t\tconfigManager.printConfig(speedupTrace);\n\t\t}\n\t\tspeedupTrace.setPrefix(\"speedup\");\n\t\t\n\t\t\n\t\tspeedupTrace.printTableHeader(\"Measuring simple speedup\");\n\t\tspeedupTrace.printTableHeader(\"Running without Synthesis\");\n\t\tAmidarSimulationResult resultsOFF = run(configManager, null, false);\n\n\t\t\n\t\t\n\t\tspeedupTrace.printTableHeader(\"Running again with Synthesis\");\n\t\tconfigManager.setSynthesis(true);\n\t\tAmidarSimulationResult resultsON = run(configManager, null, false);\n\n\t\tdouble speedup = (double)resultsOFF.getTicks()/(double)resultsON.getTicks();\n\t\tdouble energySavings = (double)resultsON.getEnergy()/(double)resultsOFF.getEnergy();\n\n\t\tDecimalFormatSymbols symbols = new DecimalFormatSymbols();\n\t\tsymbols.setGroupingSeparator(',');\n\t\tsymbols.setDecimalSeparator('.');\n\t\tDecimalFormat formater = new DecimalFormat(\"#0.000\", symbols);\n\n\t\tif(configManager.getTraceActivation(\"results\")){\n\t\t\tspeedupTrace.setPrefix(\"results\");\n\t\t\tspeedupTrace.printTableHeader(\"Simulated \"+applicationPath+\" - Simple Speedup Measurement\");\n\t\t\tspeedupTrace.println(\"Ticks without synthesis: \"+resultsOFF.getTicks());\n\t\t\tspeedupTrace.println(\"Ticks with synthesis: \"+resultsON.getTicks());\n\t\t\tspeedupTrace.println(\"Speedup: \"+formater.format(speedup));\n\t\t\tspeedupTrace.println();\n\t\t\tspeedupTrace.println(\"Energy without synthesis: \"+formater.format(resultsOFF.getEnergy()));\n\t\t\tspeedupTrace.println(\"Energy with synthesis: \"+formater.format(resultsON.getEnergy()));\n\t\t\tspeedupTrace.println(\"Energy savings: \"+formater.format((1-energySavings)*100) + \"%\");\n\t\t\t\n\t\t\tspeedupTrace.printTableHeader(\"Loop Profiling\");\n\t\t\tresultsON.getProfiler().reportProfile(speedupTrace);\n\t\t\tspeedupTrace.printTableHeader(\"Kernel Profiling\");\n\t\t\tresultsON.getKernelProfiler().reportProfile(speedupTrace, resultsON.getTicks());\n\t\t}\n\t\t\t\n\t\treturn speedup;\n\n\t}", "@Override\n\tpublic int topSpeed() {\n\t\treturn 0;\n\t}", "int getSpeed();", "int getSpeed();", "int getSpeed();", "int getSpeed();", "int getSpeed();", "int getSpeed();", "public static long computeTimeout(long runtime) {\n return runtime * 10 + 2000;\n }", "public void updateSpeed() {\n\t\t// should work b/c of integer arithmetic\n\t\tif(isTwoPlayer)\n\t\t\treturn;\n\t\t//System.out.println(\"speed up factor: \" + speedUpFactor);\n\t\t//System.out.println(\"numlinescleared/6: \" + numLinesCleared/6);\n\t\tif (speedUpFactor != numLinesCleared/6) {\n\t\t\t// speed by 10% every lines cleared, needs to be checked\n\t\t\tspeedUpFactor = numLinesCleared/6;\n\t\t\tif(!(defaultSpeed - 30*speedUpFactor <= 0))\n\t\t\t\tdefaultSpeed = defaultSpeed - 30*speedUpFactor;\n\t\t\tlevel = speedUpFactor;\n\t\t}\n\t\t//System.out.println(\"default speed: \" + defaultSpeed);\n\t}", "public void setSpeed() {\r\n\t\tint delay = 0;\r\n\t\tint value = h.getS(\"speed\").getValue();\r\n\t\t\r\n\t\tif(value == 0) {\r\n\t\t\ttimer.stop();\r\n\t\t} else if(value >= 1 && value < 50) {\r\n\t\t\tif(!timer.isRunning()) {\r\n\t\t\t\ttimer.start();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//exponential function. value (1) == delay (5000). value (50) == delay (25)\r\n\t\t\tdelay = (int)(a1 * (Math.pow(25/5000.0000, value / 49.0000)));\r\n\t\t} else if(value >= 50 && value <= 100) {\r\n\t\t\tif(!timer.isRunning()) {\r\n\t\t\t\ttimer.start();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//exponential function. value (50) == delay(25). value (100) == delay (1)\r\n\t\t\tdelay = (int)(a2 * (Math.pow(1/25.0000, value/50.0000)));\r\n\t\t}\r\n\t\ttimer.setDelay(delay);\r\n\t}", "private void runBest() {\n }", "double getSpeed();", "protected int getTimesOptimized()\r\n {\r\n return timesOptimized;\r\n }", "void delayForDesiredFPS(){\n delayMs=(int)Math.round(desiredPeriodMs-(float)getLastDtNs()/1000000);\n if(delayMs<0) delayMs=1;\n try {Thread.currentThread().sleep(delayMs);} catch (java.lang.InterruptedException e) {}\n }", "public void run() {\n int tempRate;\n long frameTimeNanos = OppoRampAnimator.this.mChoreographer.getFrameTimeNanos();\n float timeDelta = ((float) (frameTimeNanos - OppoRampAnimator.this.mLastFrameTimeNanos)) * 1.0E-9f;\n OppoRampAnimator.this.mLastFrameTimeNanos = frameTimeNanos;\n OppoRampAnimator.access$208();\n if (OppoRampAnimator.this.mTargetValue > OppoRampAnimator.this.mCurrentValue) {\n int i = 300;\n if (4 == OppoBrightUtils.mBrightnessBitsConfig) {\n int i2 = OppoRampAnimator.this.mRate;\n if (OppoRampAnimator.mAnimationFrameCount <= 300) {\n i = OppoRampAnimator.mAnimationFrameCount;\n }\n tempRate = i2 + i;\n } else if (3 == OppoBrightUtils.mBrightnessBitsConfig) {\n int i3 = OppoRampAnimator.this.mRate;\n if (OppoRampAnimator.mAnimationFrameCount <= 300) {\n i = OppoRampAnimator.mAnimationFrameCount;\n }\n tempRate = i3 + i;\n } else if (2 == OppoBrightUtils.mBrightnessBitsConfig) {\n int i4 = OppoRampAnimator.this.mRate;\n if (OppoRampAnimator.mAnimationFrameCount <= 300) {\n i = OppoRampAnimator.mAnimationFrameCount;\n }\n tempRate = i4 + i;\n } else {\n tempRate = OppoRampAnimator.this.mRate;\n }\n } else {\n tempRate = OppoRampAnimator.this.mRate;\n }\n OppoBrightUtils unused = OppoRampAnimator.this.mOppoBrightUtils;\n float scale = OppoBrightUtils.mBrightnessNoAnimation ? 0.0f : ValueAnimator.getDurationScale();\n if (scale == OppoBrightUtils.MIN_LUX_LIMITI) {\n OppoRampAnimator oppoRampAnimator = OppoRampAnimator.this;\n oppoRampAnimator.mAnimatedValue = (float) oppoRampAnimator.mTargetValue;\n } else {\n float amount = OppoRampAnimator.this.caculateAmount((((float) tempRate) * timeDelta) / scale);\n float amountScaleFor4096 = 1.0f;\n OppoBrightUtils unused2 = OppoRampAnimator.this.mOppoBrightUtils;\n int i5 = OppoBrightUtils.mBrightnessBitsConfig;\n OppoBrightUtils unused3 = OppoRampAnimator.this.mOppoBrightUtils;\n if (i5 == 4) {\n amountScaleFor4096 = 2.0f;\n }\n if (OppoRampAnimator.this.mOppoBrightUtils.isAIBrightnessOpen()) {\n OppoBrightUtils unused4 = OppoRampAnimator.this.mOppoBrightUtils;\n if (!OppoBrightUtils.mManualSetAutoBrightness && OppoRampAnimator.this.mRate != OppoBrightUtils.BRIGHTNESS_RAMP_RATE_FAST && !DisplayPowerController.mScreenDimQuicklyDark) {\n OppoBrightUtils unused5 = OppoRampAnimator.this.mOppoBrightUtils;\n if (!OppoBrightUtils.mReduceBrightnessAnimating) {\n amount = amountScaleFor4096 * OppoRampAnimator.this.mOppoBrightUtils.getAIBrightnessHelper().getNextChange(OppoRampAnimator.this.mTargetValue, OppoRampAnimator.this.mAnimatedValue, timeDelta);\n }\n }\n }\n if (OppoRampAnimator.this.mTargetValue > OppoRampAnimator.this.mCurrentValue) {\n OppoRampAnimator oppoRampAnimator2 = OppoRampAnimator.this;\n oppoRampAnimator2.mAnimatedValue = Math.min(oppoRampAnimator2.mAnimatedValue + amount, (float) OppoRampAnimator.this.mTargetValue);\n } else {\n OppoBrightUtils unused6 = OppoRampAnimator.this.mOppoBrightUtils;\n if (!OppoBrightUtils.mUseAutoBrightness && amount < 10.0f) {\n amount = (float) (OppoBrightUtils.BRIGHTNESS_RAMP_RATE_FAST / 60);\n }\n OppoRampAnimator oppoRampAnimator3 = OppoRampAnimator.this;\n oppoRampAnimator3.mAnimatedValue = Math.max(oppoRampAnimator3.mAnimatedValue - amount, (float) OppoRampAnimator.this.mTargetValue);\n }\n }\n int oldCurrentValue = OppoRampAnimator.this.mCurrentValue;\n OppoRampAnimator oppoRampAnimator4 = OppoRampAnimator.this;\n oppoRampAnimator4.mCurrentValue = Math.round(oppoRampAnimator4.mAnimatedValue);\n if (oldCurrentValue != OppoRampAnimator.this.mCurrentValue) {\n OppoRampAnimator.this.mProperty.setValue(OppoRampAnimator.this.mObject, OppoRampAnimator.this.mCurrentValue);\n }\n if (OppoRampAnimator.this.mOppoBrightUtils.isSunnyBrightnessSupport()) {\n OppoRampAnimator.this.mOppoBrightUtils.setCurrentBrightnessRealValue(OppoRampAnimator.this.mCurrentValue);\n }\n if ((OppoBrightUtils.DEBUG_PRETEND_PROX_SENSOR_ABSENT || OppoRampAnimator.this.mTargetValue >= OppoRampAnimator.this.mCurrentValue || OppoAutomaticBrightnessController.mProximityNear) && ((OppoBrightUtils.DEBUG_PRETEND_PROX_SENSOR_ABSENT || OppoRampAnimator.this.mTargetValue <= OppoRampAnimator.this.mCurrentValue) && (!OppoBrightUtils.DEBUG_PRETEND_PROX_SENSOR_ABSENT || OppoRampAnimator.this.mTargetValue == OppoRampAnimator.this.mCurrentValue))) {\n OppoBrightUtils unused7 = OppoRampAnimator.this.mOppoBrightUtils;\n if (!OppoBrightUtils.mManualSetAutoBrightness || OppoRampAnimator.this.mTargetValue == OppoRampAnimator.this.mCurrentValue) {\n int unused8 = OppoRampAnimator.mAnimationFrameCount = 0;\n OppoRampAnimator.this.mAnimating = false;\n if (OppoRampAnimator.this.mListener != null) {\n OppoRampAnimator.this.mListener.onAnimationEnd();\n OppoBrightUtils unused9 = OppoRampAnimator.this.mOppoBrightUtils;\n OppoBrightUtils.mUseWindowBrightness = false;\n OppoBrightUtils unused10 = OppoRampAnimator.this.mOppoBrightUtils;\n OppoBrightUtils.mCameraUseAdjustmentSetting = false;\n return;\n }\n return;\n }\n }\n OppoRampAnimator.this.postAnimationCallback();\n }", "protected void speedRefresh() {\r\n\t\t\ttStartTime = System.currentTimeMillis();\r\n\t\t\ttDownloaded = 0;\r\n\t\t}", "void setMaxActiveAltitude(double maxActiveAltitude);", "@Override\n public void runOpMode() throws InterruptedException {\n initialize();\n\n waitForStart();\n\n /* drivetrain.Strafe(1F, 5, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(1F, 5, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(1F, 10, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(1F, 10, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(1F, 20, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(1F, 20, Direction.LEFT); */\n\n sleep(6000);\n\n drivetrain.Strafe(.5F, 5, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.5F, 5, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(.5F, 10, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.5F, 10, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(.5F, 20, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.5F, 20, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(.5F, 30, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.5F, 30, Direction.LEFT);\n\n Balanced_Strafe(.5F, 5, Direction.RIGHT, 1.1f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 5, Direction.LEFT, 1.1f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 10, Direction.RIGHT, 1.1f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 10, Direction.LEFT, 1.1f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 20, Direction.RIGHT, 1.1f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 20, Direction.LEFT, 1.1f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 30, Direction.RIGHT, 1.1f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 30, Direction.LEFT, 1.1f, this);\n\n Balanced_Strafe(.5F, 5, Direction.RIGHT, 1.3f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 5, Direction.LEFT, 1.3f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 10, Direction.RIGHT, 1.3f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 10, Direction.LEFT, 1.3f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 20, Direction.RIGHT, 1.3f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 20, Direction.LEFT, 1.3f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 30, Direction.RIGHT, 1.3f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 30, Direction.LEFT, 1.3f, this);\n\n Balanced_Strafe(.5F, 5, Direction.RIGHT, 1.5f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 5, Direction.LEFT, 1.5f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 10, Direction.RIGHT, 1.5f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 10, Direction.LEFT, 1.5f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 20, Direction.RIGHT, 1.5f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 20, Direction.LEFT, 1.5f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 30, Direction.RIGHT, 1.5f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 30, Direction.LEFT, 1.5f, this);\n\n Balanced_Strafe(.5F, 5, Direction.RIGHT, 2f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 5, Direction.LEFT, 2f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 10, Direction.RIGHT, 2f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 10, Direction.LEFT, 2f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 20, Direction.RIGHT, 2f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 20, Direction.LEFT, 2f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 30, Direction.RIGHT, 2f, this);\n sleep(2000);\n Balanced_Strafe(.5F, 30, Direction.LEFT, 2f, this);\n\n\n /*drivetrain.Strafe(.75F, 5, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.75F, 5, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(.75F, 10, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.75F, 10, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(.75F, 20, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.75F, 20, Direction.LEFT);\n sleep(6000);\n\n drivetrain.Strafe(.5F, 5, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.5F, 5, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(.5F, 10, Direction.RIGHT);\n sleep(2000);\n\n\n drivetrain.Strafe(.5F, 10, Direction.LEFT);\n sleep(2000);\n drivetrain.Strafe(.5F, 20, Direction.RIGHT);\n sleep(2000);\n drivetrain.Strafe(.5F, 20, Direction.LEFT);\n sleep(2000); */\n\n drivetrain.StopAll();\n\n\n\n }", "private static final double maxDecel(double speed) {\n return limit(1, speed * 0.5 + 1, 2);\n }", "private void optimiseEVProfile()\n\t{\n\t}", "public float maxTorque();", "void setFastSpeed () {\n if (stepDelay == fastSpeed)\n return;\n stepDelay = fastSpeed;\n step();\n resetLoop();\n }", "void steady_flight_at_given_speed (double step, double start_pitch) {\n // preamble: make sure inputs are in\n //computeFlowAndRegenPlotAndAdjust();\n\n //strut.aoa = 0.5; // ad hoc\n\n recomp_all_parts();\n\n double load = FoilBoard.this.load;\n\n // now moved into load box and bar \n //rider.weight = load - BOARD_WEIGHT - RIG_WEIGHT - FOIL_WEIGHT;\n\n steady_flight_at_given_speed___ok = false; // so far util done\n\n craft_pitch = start_pitch;\n // double prev_pitch = -20; // we nned it only because pitch value gets rounded somewhere in recomp_all_parts...\n while (craft_pitch < aoa_max && craft_pitch > aoa_min) {\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n double lift = foil_lift();\n if (lift == load // exact hit, done !(almost never happens, though)\n // happens due to rounding\n // || prev_pitch == craft_pitch\n ) \n break;\n if (step > 0 && lift > load) { // done or pivot\n if (step < 0.0025) { \n // done! flight is OK\n steady_flight_at_given_speed___ok = true;\n break;\n }\n step = -step/2; // shrink step & pivot\n } else if (step < 0 && lift < load) { \n step = -step/2; // shrink step & pivot\n } // else keep going with current stepa\n // prev_pitch = craft_pitch;\n craft_pitch += step;\n }\n\n // expect small increse in drag as the result\n vpp.set_mast_aoa_for_given_drag(total_drag()); // (wing.drag+stab.drag);\n recomp_all_parts();\n\n // old linearly increasing logic \n //find_aoa_of_min_drag();\n //if (foil_lift() > load_numeric) {\n // // need to reduce AoA\n // while (craft_pitch > aoa_min) {\n // craft_pitch -= 0.1;\n // System.out.println(\"-- reducing... craft_pitch: \" + craft_pitch);\n // computeFlowAndRegenPlotAndAdjust();\n // recomp_all_parts();\n // if (foil_lift() <= load_numeric) \n // break; // done\n // } \n //}\n //else if (foil_lift() < load_numeric) {\n // // need to increase AoA\n // while (craft_pitch < aoa_max) {\n // craft_pitch += 0.1;\n // System.out.println(\"-- increasing... craft_pitch: \" + craft_pitch);\n // computeFlowAndRegenPlotAndAdjust();\n // recomp_all_parts();\n // if (foil_lift() >= load_numeric) \n // break; // done\n // } \n //}\n\n }", "public TTPSolution SH2() {\n \n // get TTP data\n long[][] D = ttp.getDist();\n int[] A = ttp.getAvailability();\n double maxSpeed = ttp.getMaxSpeed();\n double minSpeed = ttp.getMinSpeed();\n long capacity = ttp.getCapacity();\n double C = (maxSpeed - minSpeed) / capacity;\n double R = ttp.getRent();\n int m = ttp.getNbCities(),\n n = ttp.getNbItems();\n TTPSolution s = new TTPSolution(m, n);\n int[] x = s.getTour(),\n z = s.getPickingPlan();\n \n /*\n * the tour\n * generated using greedy algorithm\n */\n x = linkernTour();\n z = zerosPickingPlan();\n Deb.echo(x);\n Deb.echo(z);\n \n /*\n * the picking plan\n * generated so that the TTP objective value is maximized\n */\n ttp.objective(s);\n \n // partial distance from city x_i\n long di;\n \n // partial time with item k collected from city x_i\n double tik;\n \n // item scores\n Double[] score = new Double[n];\n \n // total time with no items collected\n double t_ = s.ft;\n \n // total time with only item k collected\n double tik_;\n \n // fitness value\n double u[] = new double[n];\n \n for (int k=0; k<n; k++) {\n \n int i;\n for (i=0; i<m; i++) {\n if (A[k]==x[i]) break;\n }\n //P.echo2(\"[\"+k+\"]\"+(i+1)+\"~\");\n \n // time to start with\n tik = i==0 ? .0 : s.timeAcc[i-1];\n int iw = ttp.weightOf(k),\n ip = ttp.profitOf(k);\n \n // recalculate velocities from start\n di = 0;\n for (int r=i; r<m; r++) {\n \n int c1 = x[r]-1;\n int c2 = x[(r+1)%m]-1;\n \n di += D[c1][c2];\n tik += D[c1][c2] / (maxSpeed-iw*C);\n }\n \n score[k] = ip - R*tik;\n tik_ = t_ - di + tik;\n u[k] = R*t_ + ttp.profitOf(k) - R*tik_;\n //P.echo(k+\" : \"+u[k]);\n }\n \n Quicksort<Double> qs = new Quicksort<Double>(score);\n qs.sort();\n int[] si = qs.getIndices();\n int wc = 0;\n for (int k=0; k<n; k++) {\n int i = si[k];\n int wi = ttp.weightOf(i);\n // eliminate useless\n if (wi+wc <= capacity && u[i] > 0) {\n z[i] = A[i];\n wc += wi;\n }\n }\n \n ttp.objective(s);\n \n return s;\n }", "public void honourMaxCount() {\n // Get free and total counts\n int freeCount = getFreeLaunchers().size();\n int totalCount = getTotalLaunchers().size();\n\n // Scale down if max is exceeded, irrespective of free buffer count\n if (totalCount > maxCount) {\n log.info(\"Scaling down until [freeBufferCount] \" + freeBufferCount + \" is met since [Max Count] \"\n + maxCount + \" has been exceeded.\");\n\n while (freeCount <= freeBufferCount){\n log.info(\"Scaling DOWN: REASON -> [Total Count] \" + totalCount + \" > [Max Count] \" + maxCount);\n scaleDown();\n freeCount = getFreeLaunchers().size();\n }\n\n totalCount = getTotalLaunchers().size();\n freeCount = getFreeLaunchers().size();\n\n log.info(\"Stats after scale down operation: [Total Count] \" + totalCount + \", [Free Count] \" + freeCount);\n\n return;\n }\n\n // Don't scale down if there are not enough free launchers\n if (freeCount <= freeBufferCount) {\n log.info(\"Not scaling down since [Free Count] \" + freeCount + \" <= [Free Buffer Size] \" +\n freeBufferCount + \"...\");\n return;\n }\n\n // Don't scale down if the desired count is not exceeded\n if (totalCount <= desiredCount) {\n log.info(\"Not scaling down since [Total Count] \" + totalCount + \" <= [Desired Count] \" +\n desiredCount + \"...\");\n return;\n }\n\n // Scale down if desired count is exceeded, but with more free launchers than buffer count by stepDown count\n // TODO: to test scale down\n if ((freeCount - stepDown) >= freeBufferCount) {\n log.info(\"Scaling DOWN: REASON -> [Total Count] \" + totalCount + \" > [Desired Count] \" + desiredCount +\n \" AND [Free Count] - [Step Down] \" + freeCount + \" - \" + stepDown +\n \" >= [Free Buffer Count] \" + freeBufferCount);\n\n scaleDown();\n return;\n }\n\n // If after scaling down there wouldn't be enough free launchers, don't scale down\n log.info(\"Not scaling down since [Free Count] + [Step Down] \" + freeCount + \" + \" + stepDown +\n \" < [Free Buffer Count] \" + freeBufferCount);\n }", "public int calculateTimeForDeceleration(int i) {\n return super.calculateTimeForDeceleration(i) * 4;\n }", "@Override\n\tpublic int getTopSpeed() {\n\t\treturn 100;\n\t}", "public void stopEngine(){\n currentSpeed = 0;\n }", "public void stopEngine(){\n currentSpeed = 0;\n }", "private int speed() {\n final int slowfactor = 3;\n return speed * (cd.isSlow(curpos) ? slowfactor : 1);\n }", "public int MAX_Lookback( int optInTimePeriod )\n {\n if( (int)optInTimePeriod == ( Integer.MIN_VALUE ) )\n optInTimePeriod = 30;\n else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) )\n return -1;\n return (optInTimePeriod-1);\n }", "public void incWalkSpeed(int n)\n{\n walkSpeed = walkSpeed - n;\n}", "public abstract int getSpeed();", "public abstract int getSpeed();", "void stopAccelerating() {\n isAccelerating = false;\n }", "public void step() {\r\n for(int i = 0;i<numberOfCars;i++) {\r\n xtemp[i] = x[i];\r\n }\r\n for(int i = 0;i<numberOfCars;i++) {\r\n if(v[i]<maximumVelocity) {\r\n v[i]++; // acceleration\r\n }\r\n int d = xtemp[(i+1)%numberOfCars]-xtemp[i]; // distance between cars\r\n if(d<=0) { // periodic boundary conditions, d = 0 correctly treats one car on road\r\n d += roadLength;\r\n }\r\n if(v[i]>=d) {\r\n v[i] = d-1; // slow down due to cars in front\r\n }\r\n if((v[i]>0)&&(Math.random()<p)) {\r\n v[i]--; // randomization\r\n }\r\n x[i] = (xtemp[i]+v[i])%roadLength;\r\n flow += v[i];\r\n }\r\n steps++;\r\n computeSpaceTimeDiagram();\r\n }", "private int adjustSpeed(int speed)\n {\n int result = speed;\n if (speed >= FASTEST)\n {\n result = MAX_SPEED;\n }\n else if (speed <= SLOWEST)\n {\n result = MIN_SPEED;\n }\n return result;\n }" ]
[ "0.6710238", "0.62597805", "0.61660326", "0.6068018", "0.6038875", "0.60111064", "0.5878049", "0.58734566", "0.5854223", "0.58489376", "0.576782", "0.574166", "0.5734957", "0.5689618", "0.56776375", "0.56742305", "0.5671587", "0.5654901", "0.5652803", "0.56117684", "0.5560783", "0.5555221", "0.5552093", "0.55265635", "0.5521711", "0.5518042", "0.548043", "0.5480092", "0.5457756", "0.5422344", "0.54187995", "0.540139", "0.53967714", "0.53906643", "0.53710085", "0.5365626", "0.5354943", "0.53446335", "0.5329757", "0.53283477", "0.53146", "0.5308677", "0.53057927", "0.529205", "0.5269591", "0.5266399", "0.5266399", "0.52502495", "0.52461326", "0.52331483", "0.52312577", "0.5227925", "0.5220792", "0.52183914", "0.5211957", "0.5202594", "0.5202498", "0.5200605", "0.51942366", "0.51815784", "0.51767737", "0.51642406", "0.51617104", "0.51492196", "0.51410407", "0.5133211", "0.5133211", "0.5133211", "0.5133211", "0.5133211", "0.5133211", "0.5132534", "0.5131129", "0.51311177", "0.5129613", "0.511339", "0.5105621", "0.5104787", "0.5104633", "0.5101877", "0.5097178", "0.5088325", "0.50879997", "0.5087007", "0.50713396", "0.507057", "0.50579613", "0.5055732", "0.5049449", "0.5038617", "0.5037936", "0.50260544", "0.50260544", "0.50168985", "0.50163853", "0.50136536", "0.50054675", "0.50054675", "0.5004654", "0.5001708", "0.50003433" ]
0.0
-1
Creates a GameMove with the given type, data, and playerCode.
public GameMove(int type, Object data, PlayerCode playerCode){ this.type = type; this.data = data; this.playerCode = playerCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void createGameCode(GameCode gameCode);", "public static void newGame(GameType t) {\n\t\ttype = t;\n\t}", "private void setupGame(@NotNull String data) {\n if (game == null) {\n throw new IllegalArgumentException(\"Tried to start game with a null reference to GameGraphics\");\n }\n NewGameDto newGameDto = GameGraphics.gson.fromJson(data, NewGameDto.class);\n RoboRally.scheduleSync(() -> {\n game.setScreen(new GameScreen(game, newGameDto, this));\n writeToServer(ServerAction.FINISHED_SETUP + \"\");\n IPlayerHandler playerHandler = GameGraphics.getRoboRally().getPlayerHandler();\n if (playerHandler instanceof MultiPlayerHandler) {\n this.playerHandler = (MultiPlayerHandler) playerHandler;\n } else {\n throw new IllegalStateException(\"Player handler is not for multiplayer\");\n }\n\n }, 0);\n }", "public Player(int type, int playerNum, int color, int startField, int AI)\n {\n this.type = type;\n this.playerNum = playerNum;\n this.color = color;\n this.startField = startField;\n this.AI = AI;\n }", "public Player(String playerId, String ptype) {\n\t\tthis.playerid = playerId;\n\t\tthis.pieceType=PieceType.valueOf(ptype);\n\t\tthis.setWhenGo();\n\t}", "private void validPlayerMove(char moveType) {\n\n\t\t//Obtain X and Y of playerLocation\n\t\tint x = getPlayerLocation()[0];\n\t\tint y = getPlayerLocation()[1];\n\n\t\t//By default, set xOffset and yOffset to 0\n\t\tint xOffset = 0;\n\t\tint yOffset = 0;\n\n\t\t//Change xOffset and yOffset corresponding to each moveType\n\t\t//For example, RIGHT would set xOffset to +1\n\t\tswitch(moveType) {\n\t\tcase Legend.UP: \n\t\t\tyOffset = -1;\n\t\t\tbreak;\n\t\tcase Legend.UP_LEFT:\n\t\t\tyOffset = -1;\n\t\t\txOffset = -1;\n\t\t\tbreak;\n\t\tcase Legend.UP_RIGHT:\n\t\t\tyOffset = -1;\n\t\t\txOffset = 1;\n\t\t\tbreak;\n\t\tcase Legend.DOWN:\n\t\t\tyOffset = 1;\n\t\t\tbreak;\n\t\tcase Legend.DOWN_RIGHT:\n\t\t\tyOffset = 1;\n\t\t\txOffset = 1;\n\t\t\tbreak;\n\t\tcase Legend.DOWN_LEFT:\n\t\t\tyOffset = 1;\n\t\t\txOffset = -1;\n\t\t\tbreak;\n\t\tcase Legend.LEFT:\n\t\t\txOffset = -1;\n\t\t\tbreak;\n\t\tcase Legend.RIGHT:\n\t\t\txOffset = 1;\n\t\t\tbreak;\n\t\tcase Legend.JUMP:\n\n\t\t\t//Generate a random location of the jump\n\t\t\twhile (true) {\n\n\t\t\t\t//random x and y values (between 0-10)\n\t\t\t\tint randomX = 1+(int)(Math.random()*10);\n\t\t\t\tint randomY = 1+(int)(Math.random()*10);\n\n\t\t\t\t//If the new location is a BlankSpace, assign that as a Player, and assign a new move in moveList\n\t\t\t\tif(map[randomX][randomY] instanceof BlankSpace) {\n\t\t\t\t\tnewMap[randomX][randomY] = new Player(x, y, board);\n\t\t\t\t\tnewMap[x][y] = new BlankSpace(x, y, board);\n\t\t\t\t\tmoveList[x][y] = moveType;\n\t\t\t\t\tmap[x][y].setJumpLocation(randomX, randomY);\n\t\t\t\t\tsetNewPlayerLocation(new int[] {randomX, randomY});\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\n\t\t\t\t//If the new location is a Mho, completely wipe the board of the player, and initiate a gameOver procedure\n\t\t\t\telse if(map[randomX][randomY] instanceof Mho) {\n\t\t\t\t\tnewMap[randomX][randomY] = new Mho(x, y, board);\n\t\t\t\t\tnewMap[x][y] = new BlankSpace(x, y, board);\n\t\t\t\t\tmoveList[x][y] = moveType;\n\t\t\t\t\tmap[x][y].setJumpLocation(randomX, randomY);\n\t\t\t\t\tsetNewPlayerLocation(new int[] {randomX, randomY});\n\t\t\t\t\tgameOver();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t//If the new location that the Player will move to will be a Player (in the case of Legend.SHRINK), or BlankSpace, change map and newMap, as well as moveList and the playerLocation \n\t\tif (map[x+xOffset][y+yOffset] instanceof BlankSpace || map[x+xOffset][y+yOffset] instanceof Player) {\n\t\t\tnewMap[x][y] = new BlankSpace(x, y, board);\n\t\t\tnewMap[x+xOffset][y+yOffset] = new Player(x+xOffset, y+yOffset, board);\n\t\t\tmoveList[x][y] = moveType;\n\t\t\tsetNewPlayerLocation(new int[] {x+xOffset, y+yOffset});\n\t\t\treturn;\n\t\t} \n\n\t\t//If the new location that the Player will move to will be a Fence, remove the player from the map and initiate the gameOver() process\n\t\telse {\n\t\t\tnewMap[x][y] = new BlankSpace(x, y, board);\n\t\t\tmoveList[x][y] = Legend.SHRINK;\n\t\t\tsetNewPlayerLocation(new int[] {x, y});\n\t\t\tgameOver();\n\t\t\treturn;\n\t\t}\n\n\t}", "@Override\r\n public int makeMove(MainController.CellType opponentType) {\r\n MainController.CellType myType = opponentType == MainController.CellType.NOUGHT ? MainController.CellType.CROSS : MainController.CellType.NOUGHT;\r\n int res = checkWin(myType, myType);\r\n if (res != -1)\r\n return res;\r\n res = checkWin(opponentType, myType);\r\n if (res != -1)\r\n return res;\r\n return makeRandomMove(opponentType);\r\n }", "public abstract void makeMove(Move move, PlayerColor playerColor);", "public PlayerHandler create(String type, PlayerInfo playerInfo, List<Integer> otherPlayerIds);", "void createPlayer(Player player);", "public Player(String type){\n \n this.type = type;\n }", "public Move produceMove(Board board){\n\t\t\n\t\tswitch(playerType){\n\t\t\n\t\t\tcase RANDOM:\n\t\t\t\treturn produceRandomMove(board);\t\t\t\t\n\t\t\t\t \n\t\t\tcase SMART: \n\t\t\t\treturn produceSmartMove(board);\n\t\t\t\t\n\t\t\tcase HEURISTIC:\n\t\t\t\treturn produceHeuristicMove(board);\n\t\t\t\t\n\t\t\tcase HUMAN:\n\t\t\t\treturn produceHumanMove(board);\n\n\t\t\t//Because we checked for legal player types in the\n\t\t\t//constructor, this line shouldn't be reachable.\n\t\t\tdefault: \n\t\t\t\treturn null;\t\t\t\n\t\t}\n\t}", "public Board(String gameType) {\n propertyFactory = new TileFactory(gameType);\n createBoard();\n }", "public FlowAction(FlowActionType type, int data) {\n this.actionType = type;\n this.actionData = data;\n }", "void createNewGame(Player player);", "public static void createGame(String gamecode, String creator, String gamename){\n \ttry {\n\t\t\tDBHandler.newGame(gamecode,gamename, creator, c);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "public PlayerFighter create(GamePlayer player);", "public PlayerClass(PlayerData player, RPGClass classData) {\n this.player = player;\n this.classData = classData;\n this.level = 1;\n this.points = SkillAPI.getSettings().getGroupSettings(classData.getGroup()).getStartingPoints();\n this.exp = 0;\n\n for (Skill skill : classData.getSkills()) {\n player.giveSkill(skill, this);\n }\n }", "static Game newGame(Player player1, Player player2) {\n return new GameImpl(player1, player2);\n }", "public MoveMessage(MessageType type, Player owner, int turn, int id) {\n super(type, owner);\n this.turn = turn;\n this.id = id;\n }", "public abstract void buildMoveData(ChessBoard board);", "public PlayerGame create(PlayerGame playerGame) {\n if (playerGame.getId() == null) {\n playerGame.setId(++PLAYER_GAME_ID_SEQ);\n }\n\n playerGames.add(playerGame);\n\n return playerGame;\n }", "public Piece(int position, Team team, PieceType type, boolean movedAtLeastOnce) {\r\n\t\tthis.position = position;\r\n\t\tthis.x = Utils.getX(position);\r\n\t\tthis.y = Utils.getY(position);\r\n\t\tthis.team = team;\r\n\t\tthis.type = type;\r\n\t\tthis.movedAtLeastOnce = movedAtLeastOnce;\r\n\t}", "static Player createNewPlayer(String className, Color color) throws IllegalArgumentException {\n switch (className) {\n case \"PlayerKI\":\n return new PlayerKI(color);\n case \"PlayerKI2\":\n return new PlayerKI2(color);\n case \"PlayerKI3\":\n return new PlayerKI3(color);\n case \"PlayerKI4\":\n return new PlayerKI4(color);\n case \"PlayerHuman\":\n return new PlayerPhysical(color);\n default:\n throw new IllegalArgumentException(\"createNewPlayer in Player.java doesn't know how to handle this!\");\n }\n }", "public static FreecellOperations create(GameType type) {\r\n switch (type) {\r\n case SINGLEMOVE:\r\n return new FreecellModel();\r\n case MULTIMOVE:\r\n return new FreecellMultiMoveModel();\r\n default:\r\n throw new IllegalArgumentException(\"GameType cannot be null\");\r\n }\r\n }", "public Player(int type, int id, Scanner inputScanner){\t\t\n\t\t// Check for legal player type (we will see better ways to do this in the future).\n\t\tif (type != RANDOM && type != HEURISTIC \n\t\t\t\t&& type != SMART && type != HUMAN){\n\t\t\tSystem.out.println(\"Received an unknown player type as a parameter\"\n\t\t\t\t\t+ \" in Player constructor. Terminating.\");\n\t\t\tSystem.exit(-1);\n\t\t}\t\t\n\t\tplayerType = type;\t\n\t\tplayerId = id;\n\t\tscanner = inputScanner;\n\t}", "public static GameBoard createGameBoard(Context context, Bitmap bitmap,\n\t\t\tTableLayout parentLayout, int width, int height, short gridSize,\n\t\t\tTextView moveTextView) {\n\n\t\tboard = new GameBoard(context, bitmap, parentLayout, width, height,\n\t\t\t\tgridSize, moveTextView);\n\n\t\treturn board;\n\t}", "public Game newGame( String player ) throws IllegalArgumentException{\n Game game = new Game();\n game.setPlayer( playersRepository.getByLogin( player )\n .orElseThrow( () -> new IllegalArgumentException( \"This player doesn't exists\" ) ) );\n game.setGuessedNumber( new Random( System.currentTimeMillis() ).ints( 0 , 9 )\n .distinct()\n .limit( 4 )\n .boxed()\n .map( String::valueOf )\n .collect( Collectors.joining( \"\" ) ) );\n return gamesRepository.saveAndFlush( game );\n }", "public MoveResult makeMove(HantoPieceType pieceType, \n\t\t\tHantoCoordinate from, HantoCoordinate to) throws HantoException {\n\n\t\t// Convert the coordinates properly so the hashcode works\n\t\tfrom = from == null ? null : new HantoCoord(from);\n\t\tto = to == null ? null : new HantoCoord(to);\n\n\t\t// If all are null, the player is resigning\n\t\t// If the lastMoveResult is not OK, then a player\n\t\t// has either already won or resigned\n\t\tif(pieceType == null && from == null && to == null && lastMoveResult == MoveResult.OK){\n\n\t\t\tif(currentPlayerTurn == HantoPlayerColor.BLUE){\n\t\t\t\tlastMoveResult = MoveResult.RED_WINS;\n\t\t\t} else {\n\t\t\t\tlastMoveResult = MoveResult.BLUE_WINS;\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// Checks that the parameters are valid\n\t\t\tcheckMoveParams(pieceType, from, to);\n\n\t\t\tpreMoveCheck(pieceType, from, to);\n\t\t\tmovePiece(HantoPieceFactory.getInstance().createPiece(pieceType, currentPlayerTurn), \n\t\t\t\t\tfrom, to);\n\t\t\tswitchTurn();\n\t\t\tpostMoveCheck(); \n\t\t}\n\n\t\treturn lastMoveResult;\n\t}", "void create(GameLogic gameLogic);", "public abstract void makeMove(GameStatus gameStatus);", "CharacterType createCharacterType(CharacterType t, long gameId);", "public static Game createGame2Players(Player player1, Player player2) {\n\t\treturn new Game(player1, player2);\n\t}", "public static FreecellModel<Card> create(GameType type) throws IllegalArgumentException {\n if (type == null) {\n throw new IllegalArgumentException(\"GameType cannot be null.\");\n } else if (type == GameType.SINGLEMOVE) {\n return new SimpleFreecellModel();\n } else if (type == GameType.MULTIMOVE) {\n return new MultiFreecellModel();\n } else {\n throw new IllegalArgumentException(\"GameType not supported.\");\n }\n\n }", "public void setPlayerType(String type) {\r\n playerType = type;\r\n\t}", "public void movePlayer(String direction) {\n if(playerAlive(curPlayerRow, curPlayerCol)){\n if(direction.equals(\"u\")&&(curPlayerRow-1)>=0){\n overwritePosition(curPlayerRow, curPlayerCol, (curPlayerRow-1), curPlayerCol);\n curPlayerRow -= 1;\n }else if(direction.equals(\"d\")&&(curPlayerRow+1)<=7){\n overwritePosition(curPlayerRow, curPlayerCol, (curPlayerRow+1), curPlayerCol);\n curPlayerRow += 1;\n }else if(direction.equals(\"l\")&&(curPlayerCol-1)>=0){\n overwritePosition(curPlayerRow, curPlayerCol, curPlayerRow, (curPlayerCol-1));\n curPlayerCol -= 1;\n }else if(direction.equals(\"r\")&&(curPlayerCol+1)<=9){\n overwritePosition(curPlayerRow, curPlayerCol, curPlayerRow, (curPlayerCol+1));\n curPlayerCol += 1;\n }\n }\n if(playerFoundTreasure(curPlayerRow, curPlayerCol)){\n playerWins();\n }\n adjustPlayerLifeLevel(curPlayerRow, curPlayerCol);\n int[] array = calcNewTrollCoordinates(curPlayerRow, curPlayerCol, curTrollRow, curTrollCol);\n if(curPlayerRow == curTrollRow && curPlayerCol == curTrollCol){\n gameBoard[curTrollRow][curTrollCol] = new TrollPiece();\n }else{\n int newTrollRow = array[0];\n int newTrollCol = array[1];\n overwritePosition(curTrollRow, curTrollCol, newTrollRow, newTrollCol);\n curTrollRow = newTrollRow;\n curTrollCol = newTrollCol;\n }\n }", "private static Player create(String playername) throws GameException {\n\t\ttry {\n\t\t\treturn (Player) createObject(playername);\n\t\t} catch (Exception e) {\n\t\t\tthrow new GameException(\"Player \" + playername + \" not found\");\n\t\t}\n\t}", "private Player getPlayerFromType(String type, Piece piece) {\n if (type.equalsIgnoreCase(\"human\")) {\n return new Human(this.project, piece);\n } else if (type.equalsIgnoreCase(\"random\")) {\n return new Random(this.project, piece);\n } else if (type.equalsIgnoreCase(\"bad\")) {\n return new Bad(this.project, piece);\n }\n return new Good(this.project, piece);\n }", "public GameType(String name)\n\t\t{\n\t\t\tgame_name = name;\n\t\t}", "public abstract PlayerMove toPlayerMove(Player player, Match match);", "public Player giveType(String ptype) {\n\t\tthis.pieceType = PieceType.valueOf(ptype);\n\t\tthis.setWhenGo();\n\t\treturn this;\n\t}", "public void createPlayers() {\n\t\t\n\t\twhite = new Player(Color.WHITE);\n\t\twhite.initilizePieces();\n\t\tcurrentTurn = white;\n\t\t\n\t\tblack = new Player(Color.BLACK);\n\t\tblack.initilizePieces();\n\t}", "public Game createGame(int numberOfPlayers) {\n return new Game(numberOfPlayers);\n }", "public boolean addMoveData(Connection c, Move move) {\n Statement stmt = null;\n \n try {\n c.setAutoCommit(false);\n System.out.println(\"Database opened successfully\");\n \n stmt = c.createStatement();\n String sql = \"INSERT INTO GAMEBOARD (PLAYER_TYPE, COORD_X, COORD_Y, PLAYER_ID)\" \n + \"VALUES (\" + \"'\" + move.getPlayer().getType() + \"', \"\n + move.getX() + \", \" + move.getY() + \", \" + move.getPlayer().getId() + \" );\";\n stmt.executeUpdate(sql);\n c.commit();\n } catch (Exception e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n return false;\n } finally {\n if (stmt != null) {\n try {\n stmt.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }\n \n System.out.println(\"Add move succeed.\");\n return true;\n }", "public Message(Player player, int code, int tick, int newLine, int oldLine) {\r\n\t\tthis.tick = tick;\r\n\t\tthis.code = code;\r\n\t\tthis.player = player;\r\n\t\tthis.newLine = newLine;\r\n\t\tthis.oldLine = oldLine;\r\n\t}", "public GameBoard(Point2 position, Color BoardColor, BoardType Type) {\r\n this.position = position;\r\n this.BoardColor = BoardColor;\r\n this.boardType = Type;\r\n }", "@PostMapping(\"/createNewGameRoom\")\n @ResponseStatus(HttpStatus.CREATED)\n public Game generateNewGameRoom() {\n String entrycode = service.generateEntryCode();\n currentGame.setEntrycode(entrycode);\n currentGame = gameDao.add(currentGame);\n return currentGame;\n }", "public Tile (int pos, int type) { \r\n\t\tthis.tilePos = pos;\r\n\t\tthis.tileType = type;\r\n\t}", "public Player createPlayer(String name, Player.Token token, int playerNum) {\n switch (token) {\n case MissScarlett:\n return new Player(name, token, Parser.playersStartPositions.get(0), playerNum);\n case ProfessorPlum:\n return new Player(name, token, Parser.playersStartPositions.get(1), playerNum);\n case MrsWhite:\n return new Player(name, token, Parser.playersStartPositions.get(2), playerNum);\n case MrsPeacock:\n return new Player(name, token, Parser.playersStartPositions.get(3), playerNum);\n case MrGreen:\n return new Player(name, token, Parser.playersStartPositions.get(4), playerNum);\n case ColonelMustard:\n return new Player(name, token, Parser.playersStartPositions.get(5), playerNum);\n default:\n throw new IllegalArgumentException(\"Player selection was abnormally exited\");\n }\n }", "public void generatePlayer()\n {\n board.getTile(8,0).insertPlayer(this.player);\n }", "public void processTurn(Player player) {\n Move move;\n do {\n Scanner scan = new Scanner(System.in);\n\n System.out.println(\"Enter current position of Piece you want to move\");\n // Positions entered by player\n int startX = scan.nextInt();\n int startY = scan.nextInt();\n\n System.out.println(\"Enter position where you want to put Piece\");\n int endX = scan.nextInt();\n int endY = scan.nextInt();\n\n // Move created based on position entered by player 1\n move = new Move(player, board.getCellAtLocation(startX, startY), board.getCellAtLocation(endX, endY));\n } while (!makeMove(move));\n }", "public static Action buildShip(int id, char type) {\n\t\treturn new Action(id, type);\n\t}", "void startNewGame(String playerName, String gameType) throws GameServiceException;", "public abstract void buildMoveData(HexagonalBoard board);", "public void makeMove(Player player, int input) {\n\t\t// Get all the valid moves if there are any\n\t\tArrayList<ArrayList<Integer>> validMoves = getValidMoves(this.board, player.color);\n\t\tprintValidMoves(validMoves, board);\n\t\tif (!validMoves.isEmpty()) {\n\t\t\tif (setMove(input, validMoves, player.color, this.board)) {\n\t\t\t\tturn++;\n\t\t\t}\n\n\t\t\t// Reset noWinnerCount\n\t\t\tnoWinnerCount = 0;\n\t\t} else {\n\t\t\t// Player can't move, if this counter reaches 2, that means both players can't\n\t\t\t// move and the game will end\n\t\t\tnoWinnerCount++;\n\t\t\tSystem.out.println(\"Out of moves + Count = \" + noWinnerCount);\n\t\t}\n\n\t\t// Input is last player player\n\t\tArrayList<ArrayList<Integer>> validMovesOpponent = getValidMoves(board, player.opponent);\n\t\tif (validMovesOpponent.size() > 0) {\n\t\t\tswitchTurn(player);\n\t\t}\n\t}", "public Object create( DataWrapper data) {\n return LoadManager.getItem(data.getString(\"type\"),data.getName());\n }", "public static String newGame(final String token,\n final String teamA,\n final String teamB,\n final int gameType,\n final int ageCategory,\n final int court,\n final boolean mirrored) throws IOException {\n\n String NEW_GAME_URL = String.format(RestURI.CREATE_GAME.getValue(), Server.getIp(),\n URLEncoder.encode(teamA, \"UTF8\"),\n URLEncoder.encode(teamB, \"UTF8\"),\n gameType, ageCategory, court, mirrored, token);\n\n Request request = new Request.Builder()\n .url(NEW_GAME_URL)\n .post(emptyBody)\n .build();\n\n try (Response response = getHttpClient(30).newCall(request).execute()) {\n return getResponseMessage(response);\n }\n }", "public Player initPlayerToGameplane(String name, Player.PlayerType type, int attacks, int safeTP) {\n\t\tPlayer \t\t\tplayer;\n\t\tPoint p \t\t= new Point();\n\t\t\n\t\t//find a point that isn't already occupied\n\t\tp \t\t\t\t= getSafeTeleportPosition();\n\t\tplayer \t\t\t= new Player(name, p, type, attacks, safeTP);\n\t\t\n\t\taddNewPlayer(player);\n\t\toccupiedPositions.add(p);\n\t\t\n\t\tif(type == Player.PlayerType.Agent)\n\t\t\tagents += 1;\n\t\t//assign the robot a player to follow\n\t\telse if(type == Player.PlayerType.Robot) \n\t\t\tplayer.addPlayerToFollow(assignPlayerToFollow(null));\n\t\t\n\t\tserver.updateGameplane();\n\t\treturn player;\n\t}", "public String createNewGame(SportType type) {\n switch (type) {\n case Swimming:\n return String.format(\"S%02d\", ++swimmingID);\n case Running:\n return String.format(\"R%02d\", ++runningID);\n case Cycling:\n return String.format(\"C%02d\", ++cyclingID);\n default:\n return \"\";\n }\n }", "@Override\n public Move makeMove() {\n Random random = new Random();\n int max = this.board.getBoardDimension()*4 - 1;\n int row = random.nextInt(max);\n int col = random.nextInt(max);\n Point point = new Point(row, col);\n\n while (!this.board.validPoint(point)) {\n row = random.nextInt(max);\n col = random.nextInt(max);\n point.setPoint(row, col);\n }\n\n Move m = new Move();\n m.P = this.player;\n m.Row = row;\n m.Col = col;\n\n this.board.update(m);\n return m;\n }", "CodeType createCodeType();", "public Move(Player player, int moveX, int moveY) {\n super();\n this.player = player;\n this.moveX = moveX;\n this.moveY = moveY;\n }", "@Override\n \tpublic void createAndAddNewPlayer( int playerID )\n \t{\n \t\t//add player with default name\n \t\tPlayer newPlayer = new Player( playerID, \"Player_\"+playerID );\n \t\tgetPlayerMap().put( playerID, newPlayer );\n \t}", "public PlaceAndMoveAction(Game game, ModelPlayer player, Direction direction) {\n this.direction = direction;\n this.player = player;\n }", "protected void randomCellGenerator(String type, GameData data) {\n\t\tRandom numberGenerator = new Random();\n\t\tint randomX = numberGenerator.nextInt(data.getDimensions());\n\t\tint randomY = numberGenerator.nextInt(data.getDimensions());\n\t\tgetGrid().getCell(randomX, randomY).setType(type);\n\t}", "public GameInfo declareNewMove(int index) {\r\n\t\t//Disable the button\r\n\t\tbuttons[index].setDisable(true);\r\n\t\t\r\n\t\t//Change the text of the button\r\n\t\tbuttons[index].setText(\"O\");\r\n\t\t\r\n\t\t//Change the GameInfo board\r\n\t\tgameInfo.getBoard()[index] = \"O\";\r\n\t\t\r\n\t\t//Disable the board\r\n\t\tsetBoardDisabled(true);\r\n\t\t\r\n\t\treturn gameInfo;\r\n\t}", "private void makeMove() {\r\n //if not all pieces placed, place a new piece\r\n if(numPieces < 3) {\r\n if(pieces == null)\r\n pieces = new PositionData[Constants.NUM_PIECES];\r\n placePiece();\r\n return;\r\n }\r\n //move a random piece to a random location\r\n int pieceNumber = getRandomPiece();\r\n PositionData randomPoint = getRandomPoint();\r\n //move the piece\r\n Game.movePiece(pieces[pieceNumber], randomPoint);\r\n }", "Player createPlayer();", "public Operation(OperationType code) {\n\t\tthis.code = code;\n\t\tthis.timestamp = System.currentTimeMillis();\n\t}", "public Game(int id, String date, String opponent, String homeAway, String result, String opponentImage, String gameType, int monthRound){\n this._id = id;\n this._date = date;\n\t\tthis._opponent = opponent;\n this._home_away = homeAway;\n\t\tthis._result = result;\n\t\tthis._opponent_image = opponentImage;\n\t\tthis._game_type = gameType;\n\t\tthis._month_round = monthRound;\t\t\n }", "@Override @Transactional\n public Game createGame(LocalDate date, LocalTime time, String venue, String location, Set<UserAccount> users) {\n Game game = new Game(date, time, venue, location, users);\n gameDataAccess.save(game);\n return game;\n }", "public NewMove getRandomMove(char player) {\r\n\t\tint randomIndex;\r\n\t\tRandom random = new Random();\r\n\t\tgenerateLegalMovesPlayer(player);\r\n\t\tNewMove randomMove=null;\r\n\t\twhile(randomMove == null) {\r\n\t\t\trandomIndex = random.nextInt(this.moveList.length);\r\n\t\t\trandomMove = moveList[randomIndex];\r\n\t\t}\r\n\t\treturn randomMove;\r\n\t}", "public Move createMove(Move lastMove) {\n // unused for now\n return null;\n }", "Player createNewPlayer(PlayerDTO playerDTO);", "public PlayerPiece(String name, String type, int curH, int maxH, int x, int y, \n int atkP, int defP, int curSP, int maxSP) {\n pieceName = name;\n //fill in the rest of the values here\n pieceType = type;\n currentHealth = curH;\n maxHealth = maxH;\n locX = x;\n locY = y;\n attackPower = atkP;\n defensePower = defP;\n currentSpecialPower = curSP;\n maxSpecialPower = maxSP;\n }", "public ClientPacket(PacketType type, byte[] data){\r\n\t\tthis.type = type;\r\n\t\tthis.dataSize = data.length;\r\n\t\tthis.data = data;\r\n\t}", "private GameState doMove(Move move, Player player, GameState state) {\n\t\tGameState newState = state.deepClone();\n\t\tplayer = Main.getSWController().getPlayerController().getPlayer(player.getName(), newState);\n\t\tswitch (move.getAction()) {\n\t\tcase OLYMPIA:\n\t\tcase BUILD:\n\t\t\tplayer.getHand().remove(move.getCard());\n\t\t\tplayer.getBoard().addCard(move.getCard());\n\t\t\tplayer.setChooseCard(null);\n\t\t\tif (move.getCard().getEffects() != null)\n\t\t\t\tfor (Effect effect : move.getCard().getEffects())\n\t\t\t\t\tif (effect.getType() == EffectType.WHEN_PLAYED)\n\t\t\t\t\t\teffect.run(player, newState, newState.isTwoPlayers());\n\t\t\tif (move.getTradeOption() != null)\n\t\t\t\tMain.getSWController().getPlayerController().doTrade(newState, player, move.getTradeOption());\n\t\t\tbreak;\n\t\tcase PLACE_SLOT:\n\t\t\tplayer.getHand().remove(move.getCard());\n\t\t\tswitch (player.getBoard().nextSlot()) {\n\t\t\tcase 0:\n\t\t\t\tplayer.getBoard().slot1();\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tplayer.getBoard().slot2();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tplayer.getBoard().slot3();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tplayer.getBoard().fill(player.getBoard().nextSlot());\n\t\t\tplayer.setChooseCard(null);\n\t\t\tif (move.getTradeOption() != null)\n\t\t\t\tMain.getSWController().getPlayerController().doTrade(newState, player, move.getTradeOption());\n\t\t\tbreak;\n\t\tcase SELL:\n\t\t\tplayer.getHand().remove(move.getCard());\n\t\t\tplayer.addCoins(3);\n\t\t\tplayer.setChooseCard(null);\n\t\t}\n\n\t\treturn newState;\n\t}", "public Game createGame();", "boolean makeMove(int index, Player player);", "@Override\n public LocalGame createLocalGame() {\n return new LocalGameActual();\n }", "public Piece(int x , int y, PlayerType color,Names type){\n this.x = x;\n this.y = y;\n \n this.color = color;\n this.type = type;\n }", "public interface Player {\n /**\n * has to be implemented\n * wird von update() in Game aufgerufen.\n * @return eine der Actions aus Rules.getActionsTileMove()\n */\n GameState requestActionTile();\n /**\n * has to be implemented\n * wird von update() in Game aufgerufen.\n * @return eine der Actions aus Rules.getActionsGamePieceMove()\n */\n GameState requestActionGamePiece();\n\n /**\n * has to be implemented\n * wird von update() aufgerufen.\n * @param gameState aktueller GameState\n */\n void updateGameState(GameState gameState);\n\n GameState getGameState();\n\n /**\n * has to be implemented\n * @return the color of the Player\n */\n Color getColor();\n\n void setRules(Rules rules);\n Rules getRules();\n\n void setName(String name);\n String getName();\n\n void setThread(ThreadUpdate thread);\n void setSynchronizer(Object synchronizer);\n\n /**\n * wird von update aufgerufen, sobald ein anderer Spieler eine Karte gewinnt.\n * @param color Farbe des Spielers, der eine Karte gewonnen hat\n * @param symbol auf dieser Karte\n */\n void notifyWonCards(Color color, Symbol symbol);\n\n /**\n * legt die Karte ganz oben auf dem Stapel, die der Spieler als nächstes gewinnen muss fest.\n * Wird von Game_Impl aufgerufen um dem Player seine Karte mitzuteilen\n * @param symbol neue zu erreichende Karte/Symbol\n */\n void setActiveCard(Symbol symbol);\n\n /**\n * has to be implemented\n * @return the activeCard, that was set by Game_Impl\n */\n Symbol getActiveCard();\n\n\n /**\n * creates new instance of chosen player\n *\n * Correct place to add new and more KI players!\n *\n * @param className name of the class to create an instance of\n * @param color chosen color for a player\n * @return new instance of playerclass\n */\n static Player createNewPlayer(String className, Color color) throws IllegalArgumentException {\n switch (className) {\n case \"PlayerKI\":\n return new PlayerKI(color);\n case \"PlayerKI2\":\n return new PlayerKI2(color);\n case \"PlayerKI3\":\n return new PlayerKI3(color);\n case \"PlayerKI4\":\n return new PlayerKI4(color);\n case \"PlayerHuman\":\n return new PlayerPhysical(color);\n default:\n throw new IllegalArgumentException(\"createNewPlayer in Player.java doesn't know how to handle this!\");\n }\n }\n}", "public void putState(String gameData) {\r\n String[] fields = gameData.split(\",\");\r\n int index = 0;\r\n mLastLarge = Integer.parseInt(fields[index++]);\r\n mLastSmall = Integer.parseInt(fields[index++]);\r\n for (int large = 0; large < 9; large++) {\r\n for (int small = 0; small < 9; small++) {\r\n Tile.Owner owner = Tile.Owner.valueOf(fields[index++]);\r\n mSmallTiles[large][small].setOwner(owner);\r\n }\r\n }\r\n setAvailableFromLastMove(mLastSmall);\r\n updateAllTiles();\r\n }", "private Move _getNextMovePacket(Packet packet) {\n Move move = new Move();\n\n try {\n switch (packet.command) {\n\n case START:\n move.action = Action.START;\n move.id = packet.getField(\"id\", Integer.class);\n break;\n\n case ANTE:\n move.chips = packet.getField(\"chips\", Integer.class);\n\n // Request the next Move directly, which should be a STAKES\n Move stks = getNextMove();\n if (stks.action != Action.STAKES) {\n System.err.println(\"Invalid packet after ANTE\");\n move.action = Action.NOOP;\n return move;\n }\n\n move.action = Action.ANTE_STAKES;\n move.cStakes = stks.cStakes;\n move.sStakes = stks.sStakes;\n break;\n\n case STAKES:\n move.action = Action.STAKES;\n move.cStakes = packet.getField(\"stakes_client\", Integer.class);\n move.sStakes = packet.getField(\"stakes_server\", Integer.class);\n break;\n\n case ANTE_OK:\n move.action = Action.ANTE_OK;\n break;\n\n case QUIT:\n move.action = Action.QUIT;\n break;\n\n case DEALER:\n move.action = Action.DEALER_HAND;\n move.dealer = packet.getField(\"dealer\", Integer.class);\n Move hand = getNextMove();\n if (hand.cards == null) {\n System.err.println(\"Invalid packet after DEALER\");\n move.action = Action.NOOP;\n return move;\n }\n move.cards = hand.cards;\n break;\n case HAND:\n move.action = Action.DEALER_HAND;\n move.cards = cardsFromCodeString(packet.getField(\"cards\", String.class));\n break;\n\n case RAISE:\n move.action = Action.RAISE;\n move.chips = packet.getField(\"chips\", Integer.class);\n break;\n case BET:\n move.action = Action.BET;\n move.chips = packet.getField(\"chips\", Integer.class);\n break;\n\n case DRAW:\n // If any cards were requested, get the Card array\n move.action = Action.DRAW;\n move.cDrawn = packet.getField(\"number\", Integer.class);\n if (move.cDrawn > 0)\n move.cards = cardsFromCodeString(packet.getField(\"cards\", String.class));\n break;\n\n case DRAW_SERVER:\n move.action = Action.DRAW_SERVER;\n move.sDrawn = packet.getField(\"number\", Integer.class);\n move.cards = cardsFromCodeString(packet.getField(\"cards\", String.class));\n break;\n\n case SHOWDOWN:\n move.action = Action.SHOW;\n move.cards = cardsFromCodeString(packet.getField(\"cards\", String.class));\n break;\n\n case ERROR:\n move.action = Action.ERROR;\n move.error = packet.getField(\"error\", String.class);\n break;\n\n case NET_ERROR:\n // Irrecoverable network error. Terminate the Client Game\n move.action = Action.TERMINATE;\n break;\n\n case PASS:\n move.action = Action.PASS;\n break;\n case CALL:\n move.action = Action.CALL;\n break;\n case FOLD:\n move.action = Action.FOLD;\n break;\n }\n } catch (Exception e) {\n e.printStackTrace();\n NET_ERROR(\"Network Source: Problem reading next Move arguments\");\n move.action = Action.NOOP;\n }\n\n return move;\n }", "public void moveOrTurnPlayer(PlayerType playerType, Direction dir) {\r\n\t\tPlayer player = players.get(playerType);\r\n\r\n\t\tif (player == null) {\r\n\t\t\tGameLogger.logError(\"Trying to move a player that does not exist\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (player.getDirection() == dir) {\r\n\t\t\tplayer.move();\r\n\t\t} else {\r\n\t\t\tplayer.turn(dir);\r\n\t\t}\r\n\r\n\t\t// Check if the players are still alive\r\n\t\tfor (Player p : players.values()) {\r\n\t\t\tif (p != null && !p.isAlive()) {\r\n\t\t\t\t// Send notification that a player has been killed\r\n\t\t\t\tControllerEventSource.notifyMovableDestroyed(p);\r\n\r\n\t\t\t\tgame.stop(false);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public interface PlayerCreator {\n\n // Factory method for creating a player\n public PlayerHandler create(String type, PlayerInfo playerInfo, List<Integer> otherPlayerIds);\n \n public List<String> getPlayerTypes();\n}", "public Mob(int x, int y, int width, int height, Game game, int direction, int type){\r\n super(x, y, width, height);\r\n this.game = game;\r\n this.direction = direction;\r\n this.type = type;\r\n this.alive = true;\r\n this.endAnimationFrameCount = 0;\r\n this.collider = new Collider(getX()+getWidth()/2,getY()+getHeight()/2,Math.max(getWidth()/2, getHeight()/2));\r\n switch(type){\r\n case 1:\r\n damage = 30;\r\n switch(direction){\r\n case 1: \r\n sprite = new Animation(Assets.arrowLeft);\r\n break;\r\n case 2: \r\n sprite = new Animation(Assets.arrowUp);\r\n break;\r\n case 3: \r\n sprite = new Animation(Assets.arrowRight);\r\n break;\r\n case 4: \r\n sprite = new Animation(Assets.arrowDown);\r\n break;\r\n }\r\n this.speed = 15;\r\n break;\r\n case 2:\r\n damage = 50;\r\n switch(direction){\r\n case 1: \r\n sprite = new Animation(Assets.playerLPunch);\r\n break;\r\n case 2: \r\n sprite = new Animation(Assets.playerUPunch);\r\n break;\r\n case 3: \r\n sprite = new Animation(Assets.playerRPunch);\r\n break;\r\n case 4: \r\n sprite = new Animation(Assets.playerDPunch);\r\n break;\r\n default:\r\n sprite = new Animation(Assets.playerRPunch);\r\n }\r\n this.speed = 0;\r\n break;\r\n }\r\n }", "public RPSGame createNewGame(String playerId) {\n\t\tif (playerId == null) {\n\t\t\tthrow new RuntimeException(\"Player ID can't be null!\");\n\t\t}\n\t\tlong gameId = currentGameId.getAndIncrement();\n\t\tRPSGame newGame = new RPSGame(gameId, playerId);\n\t\tgames.put(gameId, newGame);\n\t\treturn newGame;\n\t}", "private Pokemon createPokemonFromClass(Class<?extends Pokemon> cl, Coord position) {\n\t\tConstructor<? extends Pokemon> con = null;\n\t\ttry {\n\t\t\tcon = cl.getConstructor(Environment.class, Coord.class, Movement.class);\n\t\t} catch (NoSuchMethodException | SecurityException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tPokemon evolution = null;\n\t\ttry {\n\t\t\tevolution = con.newInstance(this, position, Movement.Down);\n\t\t} catch (InstantiationException\n\t\t\t\t| IllegalAccessException\n\t\t\t\t| IllegalArgumentException\n\t\t\t\t| InvocationTargetException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn evolution;\n\t}", "public Player(Othello othello, char player) {\n\t\tthis.othello=othello;\n\t\tthis.player=player;\n\t\tthis.type = null;\n\t}", "protected void move(Player player, Movement move) {\n if (board.board[move.oldP.x][move.oldP.y] != null) {\n board.board[move.newP.x][move.newP.y] = board.board[move.oldP.x][move.oldP.y];\n board.board[move.oldP.x][move.oldP.y] = null;\n\n if (player.colour == Colour.BLACK) {\n blackPlayer.move(move);\n whitePlayer.removePiece(move.newP);\n } else if (player.colour == Colour.WHITE) {\n whitePlayer.move(move);\n blackPlayer.removePiece(move.newP);\n }\n\n sharedBoard.update(whitePlayer.getOccupied(), blackPlayer.getOccupied());\n\n // Check for promotions...\n for (int x = 0; x < board.board.length; ++x)\n if (board.board[x][0] instanceof Pawn)\n board.board[x][0] = new Queen(Colour.BLACK);\n else if (board.board[x][7] instanceof Pawn)\n board.board[x][7] = new Queen(Colour.WHITE);\n }\n }", "public Data createData(Address addr, DataType dataType) throws CodeUnitInsertionException;", "private static DatagramPacket createPacket(byte[] data, SocketAddress remote) {\r\n\t\tDatagramPacket packet = new DatagramPacket(data, data.length, remote);\r\n\t\treturn packet;\r\n\t}", "public GamePlayer() {}", "public void create(Player p) {\r\n\t\tAsyncCatcher.enabled = false;\r\n\t\tsboard.remove(p.getUniqueId());\r\n\t\t\r\n\t\tScoreboard sb = Bukkit.getScoreboardManager().getNewScoreboard();\r\n\t\t\r\n\t\tsboard.put(p.getUniqueId(), sb);\r\n\t\t\r\n\t\tp.setScoreboard(sb);\r\n\t\tAsyncCatcher.enabled = true;\r\n\t}", "private Position(Action action, int moveCounter, Player player, Position prevPosition) {\n\t\tthis.moveCounter = moveCounter;\n\t\tthis.player = player;\n\t\tcopyBoard(prevPosition);\n\t\t\n\t\tsetStone(action);\n\t\tcheckForGameOver();\n\n\t}", "public BoardState(int typeOfPlayer){\n board = new char[boardSize][boardSize];\n //ai\n if(typeOfPlayer == 0){\n aiInitBoard();\n }\n //human\n else if(typeOfPlayer == 1){\n initBoard();\n }\n }", "@Override\n\tpublic void makeMove(Game game) \n\t{\n\t\t\n\t\tint row1,col1,row2,col2;\n\t\tCheckers tttGame = (Checkers) game;\n\t\t\n\t\tboolean first = true;\n\n\t\t\tcorrectmove= false;\n\t\t\tSystem.out.println(\"Insert target (row,column) and destination (row, column) ([0,7])\");\n\n\t\t\trow1 = tttGame.x1;\n\t\t\tcol1 = tttGame.y1;\n\t\t\trow2 = tttGame.x2;\n\t\t\tcol2 = tttGame.y2;\n\t\t\tSystem.out.println(row1 + \" \" + col1 + \" \" + row2 + \" \" + col2 + \" \" + role);\n\t\t\t\n\t\t\tfirst=false;\n\t\tcorrectmove= tttGame.isValidCell(row1, col1, row2, col2,role);\n\t\tSystem.out.println(correctmove);\n\n\t\tif(correctmove)\n\t\t{\n\t\t\ttttGame.board[row2][col2]= tttGame.board[row1][col1];\n\t\t\tif(row2==0 && role==0) \n\t\t\t{\n\t\t\t\tif(role==0) tttGame.board[row2][col2]= 2;\n\t\t\t\telse tttGame.board[row2][col2]= -2;\n\t\t\t}\n\t\t\telse if(row2==7 && role==1) \n\t\t\t{\n\t\t\t\tif(role==0) tttGame.board[row2][col2]= 2;\n\t\t\t\telse tttGame.board[row2][col2]= -2;\n\t\t\t}\n\t\t\ttttGame.board[row1][col1]=0;\n\t\t\tif(abs(row1-row2)==2)\n\t\t\t{\n\t\t\t\tint x= (row1+ row2)/2;\n\t\t\t\tint y= (col1+ col2)/2;\n\t\t\t\ttttGame.board[x][y]=0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"invalid move!\");\n\t\t}\n\t\t\n//\t\ttttGame.board[row][col] = role;\n\t}", "public PlayerInterface createPlayer(String godName, PlayerInterface p) {\n God god = find(godName);\n p = addEffects(p, god.getEffects());\n return p;\n }", "public boolean move(KeyCode code){\n\t\tswitch (code) {\n\t\tcase Q:\n\t\tcase NUMPAD7:\n\t\t\tmoveUpLeft();\n\t\t\tbreak;\n\t\tcase W:\n\t\tcase NUMPAD8:\n\t\t\tmoveUp();\n\t\t\tbreak;\n\t\tcase E:\n\t\tcase NUMPAD9:\n\t\t\tmoveUpRight();\n\t\t\tbreak;\n\t\tcase A:\n\t\tcase NUMPAD4:\n\t\t\tmoveLeft();\n\t\t\tbreak;\n\t\tcase S:\n\t\tcase NUMPAD5:\n\t\t\tbreak;\n\t\tcase D:\n\t\tcase NUMPAD6:\n\t\t\tmoveRight();\n\t\t\tbreak;\n\t\tcase Z:\n\t\tcase NUMPAD1:\n\t\t\tmoveDownLeft();\n\t\t\tbreak;\n\t\tcase X:\n\t\tcase NUMPAD2:\n\t\t\tmoveDown();\n\t\t\tbreak;\n\t\tcase C:\n\t\tcase NUMPAD3:\n\t\t\tmoveDownRight();\n\t\t\tbreak;\n\t\tcase J:\n\t\tcase NUMPAD0:\n\t\t\tmoveJump();\n\t\t\treturn false;\t\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}" ]
[ "0.6244813", "0.5271747", "0.5262438", "0.51854396", "0.51447535", "0.5142498", "0.5100289", "0.5078502", "0.50754553", "0.5071384", "0.50573754", "0.5036784", "0.4973052", "0.49711752", "0.49615914", "0.49269986", "0.48886454", "0.48837736", "0.48773", "0.48641953", "0.48400462", "0.48391926", "0.4819708", "0.48107162", "0.47962862", "0.47932833", "0.47920728", "0.47918433", "0.47864684", "0.4778053", "0.4777232", "0.47458637", "0.4741258", "0.47232765", "0.47179765", "0.47127172", "0.47096252", "0.46999007", "0.46840793", "0.46805522", "0.46580094", "0.46511385", "0.46456116", "0.46342787", "0.46182138", "0.46082193", "0.4607357", "0.4605911", "0.46001354", "0.4594025", "0.45936114", "0.45817977", "0.45794842", "0.4569036", "0.45635095", "0.45620492", "0.4561515", "0.4558097", "0.45518705", "0.45510834", "0.4545482", "0.45414734", "0.4532075", "0.4528185", "0.45227313", "0.45189697", "0.45164296", "0.4503833", "0.4500725", "0.4499", "0.449556", "0.44898796", "0.4480822", "0.44801766", "0.44769135", "0.4468587", "0.44649726", "0.4451482", "0.44489157", "0.44464514", "0.44426823", "0.44421858", "0.44358686", "0.443375", "0.4431516", "0.44303882", "0.44263783", "0.4425146", "0.4422539", "0.44197732", "0.44114482", "0.44105613", "0.44012398", "0.4381637", "0.43782738", "0.43717313", "0.4367191", "0.4360837", "0.43530798", "0.43526024" ]
0.81241846
0
Gets the type of this GameMove.
public int getType(){ return this.type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getMOVE_TYPE() {\r\n return MOVE_TYPE;\r\n }", "public static GameType getGameType() {\n\t\treturn type;\n\t}", "public TurnType getType() {\n\t\treturn type;\n\t}", "public String getMovementType() {\n\t\treturn (String) get_Value(\"MovementType\");\n\t}", "public PuzzleType getMoverType( );", "public String getGameType() {\n return gameType;\n }", "SpawnType getGameSpawnType();", "public String getType() {\n\t\treturn String.valueOf(this.pieceType);\n\t}", "public MovingVioType getMovingVioType() {\n return movingVioType;\n }", "public String getMove() {\n\t\treturn move;\n\t}", "public SinglePieceMove getMove() {\n return move;\n }", "public FreeColGameObjectType getType() {\n return this;\n }", "public int getMoveMode();", "public float getTimeToMove()\n\t{\n\t\treturn this.timeToMove;\n\t}", "public MoveType GetMoveTypeForTurn(int turn) {\n switch ((turn - 1) % 6) {\n case 2:\n case 5:\n return MoveType.AllGrow;\n\n case 0:\n case 1:\n case 3:\n case 4:\n default:\n return MoveType.SingleGrow;\n }\n }", "public Type getType() {\n return this.mType;\n }", "public int getType() {\n return mType;\n }", "protected int getMove(){\r\n\t\treturn this.move;\r\n\t}", "public String type() {\n return \"Pawn\";\n }", "@Override\n public Move getMove() {\n\n return Move.ROCK;\n }", "public int getType() {\n validify();\n return Client.INSTANCE.pieceGetType(ptr);\n }", "public Type getType() {\n\t\treturn mType;\n\t}", "public String getType()\r\n {\r\n return mType;\r\n }", "public int getCurType(){\r\n\t\treturn this.curRobotType;\r\n\t}", "public int getWhoseMove() {\n\t\treturn playerToMove;\n\t}", "@Override\n\tpublic SpriteType getSpriteType() {\n\t\tif (isFinish) {\n\t\t\treturn SpriteType.FINISH_POINT;\n\t\t}\n\t\treturn SpriteType.BEGIN_POINT;\n\t}", "public String getType() {\n\t return mType;\n\t}", "public int getType() {\n\t\treturn this.mType;\n\t}", "public String getDirectionMove() {\n\t\treturn directionMove;\n\t}", "public int getType() {\n return m_type;\n }", "public BoardType getBoardType() {\r\n return this.boardType;\r\n }", "public static int getGameType()\n\t{\n\t\treturn -1;\n\t}", "public EnnemyType getType()\n\t{\n\t\treturn type;\n\t}", "String getType() {\n return mType;\n }", "public PieceType getPieceType() {\r\n\t\treturn piece;\r\n\t}", "public Move getLastMove() {\n return lastMove;\n }", "public int getType() {\n return theType;\n }", "public static ToolsEnums.UnitMovementType getMovementType(int unitType){\n\t\t\n\t\tswitch(unitType){\n\t\t\tcase unitWaypoint:\n\t\t\t\treturn ToolsEnums.UnitMovementType.NULL;\n\t\t\t\t\n\t\t\tcase unitNull:\n\t\t\t\treturn ToolsEnums.UnitMovementType.NULL;\n\t\t\t\t\n\t\t\tcase unitAvatar:\n\t\t\t\treturn ToolsEnums.UnitMovementType.GROUND;\n\t\t\t\t\n\t\t\tcase unitNovice:\n\t\t\t\treturn ToolsEnums.UnitMovementType.GROUND;\n\t\t\t\t\n\t\t\tdefault: \n\t\t\t\treturn ToolsEnums.UnitMovementType.NULL;\n\t\t}\n\t}", "Move getMove() {\n try {\n boolean playing0 = _playing;\n while (_playing == playing0) {\n prompt();\n\n String line = _input.readLine();\n if (line == null) {\n quit();\n }\n line = line.trim();\n if (!processCommand(line)) {\n Move move = Move.create(line, _board);\n if (move == null) {\n error(\"invalid move: %s%n\", line);\n } else if (!_playing) {\n error(\"game not started\");\n } else if (!_board.isLegal(move)) {\n error(\"illegal move: %s%n\", line);\n } else {\n return move;\n }\n }\n }\n } catch (IOException excp) {\n error(1, \"unexpected I/O error on input\");\n }\n return null;\n }", "public int getType()\n {\n return m_type;\n }", "public PlaceType getType() {\n\t\treturn type;\n\t}", "public String getType() {\n return m_Type;\n }", "public Type getType() {\n\t\treturn this.type;\n\t}", "public Type getType () {\n\t\treturn type;\n\t}", "public Type getType() {\r\n return this.type;\r\n }", "public long getMoveId() {\n return moveId_;\n }", "public Type getType() {\n return this.type;\n }", "public long getLastMoveTime() {\r\n\t\treturn lastMoveTime;\r\n\t}", "public Type getType() {\n return type;\n }", "public String getType() {\n return m_type;\n }", "public type getType() {\r\n\t\treturn this.Type;\r\n\t}", "public TypeMirror getType() {\n return type;\n }", "public Class<?> getType() {\n return this.value.getClass();\n }", "public Enum getType() {\n return type;\n }", "public Type getType() {\n\t\treturn type;\n\t}", "public Type getType() {\n\t\treturn type;\n\t}", "public String getType() {\r\n return this.getClass().getName();\r\n }", "@Override\r\n public int makeMove(MainController.CellType opponentType) {\r\n MainController.CellType myType = opponentType == MainController.CellType.NOUGHT ? MainController.CellType.CROSS : MainController.CellType.NOUGHT;\r\n int res = checkWin(myType, myType);\r\n if (res != -1)\r\n return res;\r\n res = checkWin(opponentType, myType);\r\n if (res != -1)\r\n return res;\r\n return makeRandomMove(opponentType);\r\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "public Type getType() {\n return type;\n }", "@Override\n\tpublic Direction getMove() {\n if (ticks < MAX_TICKS_PER_ROUND - 100) {\n Direction[] dirs = Direction.values();\n return dirs[random.nextInt(dirs.length)];\n } else {\n // Move towards boat\n int deltaX = 0;\n int deltaY = 0;\n if (currentLocation.getX() < 0)\n deltaX = 1;\n else if (currentLocation.getX() > 0)\n deltaX = -1;\n\n if (currentLocation.getY() < 0)\n deltaY = 1;\n else if (currentLocation.getY() > 0)\n deltaY = -1;\n\n if (deltaX > 0 && deltaY == 0) {\n return Direction.E;\n } else if (deltaX > 0 && deltaY > 0) {\n return Direction.NE;\n } else if (deltaX > 0 && deltaY < 0) {\n return Direction.SE;\n } else if (deltaX == 0 && deltaY == 0) {\n return Direction.STAYPUT;\n } else if (deltaX == 0 && deltaY < 0) {\n return Direction.N;\n } else if (deltaX == 0 && deltaY > 0) {\n return Direction.S;\n } else if (deltaX < 0 && deltaY == 0) {\n return Direction.W;\n } else if (deltaX < 0 && deltaY > 0) {\n return Direction.NW;\n } else if (deltaX < 0 && deltaY < 0) {\n return Direction.NE;\n } else {\n throw new RuntimeException(\"I HAVE NO IDEA\");\n }\n }\n\t}", "public PlayerTypes getPlayerType();", "protected int getMove() \t\t\t\t{\treturn move;\t\t}", "public Class<?> getType() {\n return this.type;\n }", "public long getMoveId() {\n return moveId_;\n }", "public ShapeType getType() {\n\t\t\treturn type.get();\n\t\t}", "public int getType() {\r\n\t\treturn (type);\r\n\t}", "public void setMOVE_TYPE(java.lang.String MOVE_TYPE) {\r\n this.MOVE_TYPE = MOVE_TYPE;\r\n }", "public TokenType getType() {\n\t\treturn this.type;\n\t}", "public int getMove(){\n return this.move;\n }", "@java.lang.Override public POGOProtos.Rpc.HoloPokemonMove getMove2() {\n @SuppressWarnings(\"deprecation\")\n POGOProtos.Rpc.HoloPokemonMove result = POGOProtos.Rpc.HoloPokemonMove.valueOf(move2_);\n return result == null ? POGOProtos.Rpc.HoloPokemonMove.UNRECOGNIZED : result;\n }", "public String getPlayerType() {\r\n return playerType;\r\n\t}", "public Type getType(){\n\t\treturn this.type;\n\t}", "public Class<?> getType() {\n\t\treturn this.type;\n\t}", "public Class<?> getType() {\n\t\treturn this.type;\n\t}", "@java.lang.Override\n public POGOProtos.Rpc.HoloPokemonMove getMove2() {\n @SuppressWarnings(\"deprecation\")\n POGOProtos.Rpc.HoloPokemonMove result = POGOProtos.Rpc.HoloPokemonMove.valueOf(move2_);\n return result == null ? POGOProtos.Rpc.HoloPokemonMove.UNRECOGNIZED : result;\n }", "public Type getType() {\n return _type;\n }", "public Type getType() {\n return type;\n }", "Action getType();", "public int tileType(){\n\t\treturn this.type;\n\t}", "public TypeEnum getType() {\n return type;\n }", "public TokenType getType() {\n\t\treturn type;\n\t}", "public Move chooseMove() {\n return new Move();\n }", "String getTileType();", "public int getType()\n {\n return pref.getInt(KEY_TYPE, 0);\n }", "public final ActorType getType() {\n return type;\n }", "public TokenType getType() {\n return type;\n }", "public int getType() {\n return this.type;\n }", "GLStateType getType();", "public Type getType()\n {\n return type;\n }", "public int getType() {\n return type_;\n }", "public int getType() {\n return type_;\n }", "public int getType() {\n return type_;\n }" ]
[ "0.70707554", "0.6904647", "0.6777184", "0.67754173", "0.66808224", "0.63184905", "0.62174165", "0.6166096", "0.6154459", "0.6150837", "0.6145124", "0.6127838", "0.597832", "0.58604825", "0.5857285", "0.58300954", "0.5820244", "0.5817545", "0.5798205", "0.57816267", "0.57534957", "0.57370895", "0.5721696", "0.5718271", "0.5711854", "0.57030386", "0.5677219", "0.56446296", "0.56424946", "0.563807", "0.5632064", "0.5629743", "0.56269723", "0.5617074", "0.5608546", "0.55899364", "0.558973", "0.5587536", "0.5581412", "0.5578238", "0.5566982", "0.55654335", "0.55531865", "0.5546177", "0.5542912", "0.5538993", "0.55353177", "0.5533353", "0.5533062", "0.5532062", "0.5531036", "0.55177516", "0.54960996", "0.54940367", "0.5487405", "0.5487405", "0.5484836", "0.5484332", "0.5480937", "0.5480937", "0.5480937", "0.5480937", "0.5480937", "0.5480937", "0.5480937", "0.5480937", "0.5480937", "0.5480937", "0.54801124", "0.5478663", "0.5474534", "0.5474054", "0.54724014", "0.5469351", "0.54690665", "0.5463521", "0.5460786", "0.5457297", "0.545725", "0.5452718", "0.5444719", "0.5443486", "0.5443486", "0.54433584", "0.5443191", "0.5443133", "0.5440742", "0.5439873", "0.54375845", "0.5418163", "0.54151314", "0.54106987", "0.53972256", "0.53893816", "0.5388687", "0.5386961", "0.53868914", "0.53867376", "0.53787434", "0.53787434", "0.53787434" ]
0.0
-1
Gets the data of this GameMove.
public Object getData(){ return this.data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private PawnMoveInformation getMoveInformation() {\n\t\treturn this.info;\n\t}", "protected int getMove(){\r\n\t\treturn this.move;\r\n\t}", "public int getMove(){\n return this.move;\n }", "public RPGClass getData() {\n return classData;\n }", "public PlayerFunctionality getPlayerData()\r\n\t{ return data; }", "public PlayerData getPlayerData() {\n return player;\n }", "public SinglePieceMove getMove() {\n return move;\n }", "public int getMovement() {\n return movement;\n }", "public G getData (){\n return this._data;\n }", "public String getMove() {\n\t\treturn move;\n\t}", "public Object getData() {\n if (this.mInvitation != null) return this.mInvitation;\n else if (this.mChatMessageFragment != null) return this.mChatMessageFragment;\n else return null;\n }", "public Object data() {\n return this.data;\n }", "public MapTile[] getData() {\n\t\treturn this.data;\n\t}", "public void getMove(){\n\t\t\n\t}", "@Override\n public ShipVictoryData getData() {\n ShipVictoryData data = new ShipVictoryData();\n data.setTitle(title);\n data.setDescription(description);\n data.setEvents(PersistentUtility.getData(matchers));\n data.setRequirementMet(requirementMet);\n data.setTotalPoints(totalPoints);\n data.setRequiredPoints(requiredPoints);\n return data;\n }", "public Object getData() {\r\n\t\t\treturn data;\r\n\t\t}", "public Object getData() {\n\t\treturn data;\n\t}", "public PData getData() {\n\t\treturn data;\n\t}", "protected int getMove() \t\t\t\t{\treturn move;\t\t}", "public Object getData()\r\n\t\t{\r\n\t\t\treturn data;\r\n\t\t}", "public int getMovement() {\n return tempUnit.getMovement();\n }", "public String getGameServerSessionData() {\n return this.GameServerSessionData;\n }", "public String [] getMoves() {\n return moves;\n }", "public int getMoves(){\r\n return moves;\r\n }", "@Override\n public Pair<GameObjectType, List<Object>> getObjectData() {\n List<Object> objData = new ArrayList<Object>(Arrays.asList(this.topLeft(),this.getRadius(),this.triggerState));\n return Pair.of(GameObjectType.BALLSPAWNER, objData);\n }", "@Override\n\tpublic GameInfo getGameInfo() {\n\t\treturn gameInfo;\n\t}", "public int getMoves(){\n return moves;\n }", "protected List<Move> getMoves() {\n return moves;\n }", "@Override\r\n\t\tpublic Meta_data getData() {\n\t\t\treturn this.data;\r\n\t\t}", "public int[][] getMove()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\twhile (br.ready())\r\n\t\t\t\tSystem.out.println(\"Dumping: \" + br.readLine());\r\n\r\n\t\t\tSystem.out.printf(\"Player %d queried for move%n\", colour);\r\n\t\t\tpw.println(\"4\");\r\n\t\t\tpw.flush();\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tlong start = System.currentTimeMillis();\r\n\t\tMoveThread m = new MoveThread();\r\n\t\tThread t = new Thread(m);\r\n\r\n\t\tt.start();\r\n\r\n\t\t// Query for a move every 10ms until the timeout is reached or the move\r\n\t\t// is received\r\n\t\twhile (m.getMove() == null\r\n\t\t\t\t&& System.currentTimeMillis() - start < timeOut)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tThread.sleep(10);\r\n\t\t\t}\r\n\t\t\tcatch (InterruptedException e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tm.timeout();\r\n\r\n\t\tint[][] move = m.getMove();\r\n\r\n\t\t// Tell a player of timeout\r\n\t\tif (move == null)\r\n\t\t{\r\n\t\t\tSystem.out.printf(\"Player %d timed out while choosing a move%n\",\r\n\t\t\t\t\tcolour);\r\n\t\t\tpw.println(\"6\");\r\n\t\t\tpw.flush();\r\n\t\t}\r\n\r\n\t\treturn move;\r\n\t}", "public static int getCoords()\n\t{\n\t\treturn moveCoords;\n\t}", "public String getData() {\n\t\treturn this.data;\n\t}", "public synchronized Object getData() {\n return data;\n }", "public int getData() {\n return this.data;\n }", "public K data()\n {\n\treturn this.data;\n }", "public int getData() {\n\t\t\treturn data;\n\t\t}", "public java.util.List<? extends com.rpg.framework.database.Protocol.MonsterStateOrBuilder> \n getDataOrBuilderList() {\n return data_;\n }", "public String getData() {\r\n return this.data;\r\n }", "public BubbleData getBubbleData() { return (BubbleData)this.mData; }", "public Data getData() {\n return data;\n }", "public Data getData() {\n return data;\n }", "public String getMoves() {\n\t\treturn moves;\n\t}", "public java.util.List<com.rpg.framework.database.Protocol.MonsterState> getDataList() {\n return data_;\n }", "public int getData() {\n\t\treturn data;\n\t}", "public int getData() {\n\t\treturn data;\n\t}", "public com.rpg.framework.database.Protocol.MonsterState getData(int index) {\n return data_.get(index);\n }", "public long getMoveId() {\n return moveId_;\n }", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\r\n return Data;\r\n }", "public String getData() {\r\n return Data;\r\n }", "@Override\r\n\tpublic E getData() {\n\t\treturn data;\r\n\t}", "public String getData() {\r\n\t\t\treturn data;\r\n\t\t}", "public String data() {\n return this.data;\n }", "public final HashMap<Integer, T> getData() {\n\t\treturn this.data;\n\t}", "public abstract void buildMoveData(ChessBoard board);", "public String getData() {\r\n\t\treturn data;\r\n\t}", "public int getWhoseMove() {\n\t\treturn playerToMove;\n\t}", "POGOProtos.Rpc.HoloPokemonMove getMove3();", "@java.lang.Override\n public POGOProtos.Rpc.HoloPokemonMove getMove3() {\n @SuppressWarnings(\"deprecation\")\n POGOProtos.Rpc.HoloPokemonMove result = POGOProtos.Rpc.HoloPokemonMove.valueOf(move3_);\n return result == null ? POGOProtos.Rpc.HoloPokemonMove.UNRECOGNIZED : result;\n }", "public AdHocCommandData getData() {\n return this.data;\n }", "public HashMap<Long, String> getData() {\n\t\treturn data;\n\t}", "public E getData(){\n\t\t\treturn data;\n\t\t}", "public Map<String, Object> getData() {\n\t\treturn this.data;\n\t}", "public Player getPlayerToMove()\n {\n return playerToMove;\n }", "public String getData()\n\t{\n\t\treturn data;\n\t}", "public long getData() {\n return data;\n }", "@Override\n public Object getData() {\n return outputData;\n }", "public LinkedHashMap<Integer, Data> getData(){\r\n\t\treturn data;\r\n\t}", "@java.lang.Override public POGOProtos.Rpc.HoloPokemonMove getMove3() {\n @SuppressWarnings(\"deprecation\")\n POGOProtos.Rpc.HoloPokemonMove result = POGOProtos.Rpc.HoloPokemonMove.valueOf(move3_);\n return result == null ? POGOProtos.Rpc.HoloPokemonMove.UNRECOGNIZED : result;\n }", "public Game getGame() {\r\n return game;\r\n }", "public int getData()\n\t{\n\t\treturn data;\n\t}", "public long getMoveId() {\n return moveId_;\n }", "public Game getGame () {\n return game;\n }", "public int moves() {\n return moves;\n }", "public int moves() {\n return moves;\n }", "@Override\n\tpublic String getData()\n\t{\n\t\treturn areaCell.toString();\n\t}", "public A getData()\n\t{\n\t\treturn data;\n\t}", "public int getStateOfMovement(){ return stateOfMovement; }", "public GameProperty [] getGameProperties() {\n return this.GameProperties;\n }", "public byte getData() {\n return this.data;\n }", "public E getData() {\r\n\t\treturn data;\r\n\t}", "public Game getGame() {\n return game;\n }", "public Game getGame() {\n return game;\n }", "public Game getGame() {\n return game;\n }", "public Game getGame() {\n return game;\n }", "public com.rpg.framework.database.Protocol.MonsterStateOrBuilder getDataOrBuilder(\n int index) {\n return data_.get(index);\n }", "public T getData() {\n return this.data;\n }", "@Override \n\tpublic PaymentInstruction18 getData() {\n\t\treturn (PaymentInstruction18)super.getData();\n\t}", "public D getData() {\n return data;\n }", "public D getData() {\n return data;\n }", "public D getData(){\n\t\treturn data;\n\t}", "public E getData() {\n return data;\n }", "public int moves()\n {\n return moves;\n }", "@java.lang.Override\n public com.clarifai.grpc.api.Data getData() {\n return data_ == null ? com.clarifai.grpc.api.Data.getDefaultInstance() : data_;\n }", "public IData getData() {\n return data;\n }", "public DerivedWord getData() {\n \treturn this.data;\n }", "public String getData() {\n return data;\n }" ]
[ "0.6856174", "0.6242035", "0.6225405", "0.6183892", "0.61800814", "0.6134495", "0.6100013", "0.60589087", "0.60053426", "0.5997718", "0.59746534", "0.5945438", "0.5942798", "0.59013844", "0.58995056", "0.58790123", "0.5866962", "0.5848368", "0.5838159", "0.58175653", "0.5805915", "0.5800276", "0.5782849", "0.5774498", "0.577269", "0.57571435", "0.57480615", "0.574527", "0.56951165", "0.56805056", "0.56716466", "0.5648072", "0.5631421", "0.5622964", "0.5618921", "0.5607112", "0.5601015", "0.5597369", "0.55900127", "0.55770075", "0.55770075", "0.55716", "0.5552532", "0.5543833", "0.5543833", "0.55333626", "0.55324394", "0.5530746", "0.5530746", "0.5530746", "0.5530746", "0.55271477", "0.55271477", "0.55231166", "0.55110735", "0.55097795", "0.5507383", "0.5503323", "0.54991424", "0.5495878", "0.5493595", "0.5492516", "0.54917395", "0.5491132", "0.5488814", "0.5485243", "0.5482789", "0.5477258", "0.5470038", "0.5465592", "0.5464191", "0.54577655", "0.5457532", "0.5452702", "0.54467344", "0.54382277", "0.54374284", "0.54374284", "0.54361796", "0.5435176", "0.5433947", "0.54318184", "0.54269403", "0.54187596", "0.5417248", "0.5417248", "0.5417248", "0.5417248", "0.5416766", "0.5405191", "0.5404632", "0.5400848", "0.5400848", "0.5400229", "0.53989834", "0.539806", "0.5393239", "0.53930134", "0.53911984", "0.5390025" ]
0.5946017
11